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

481 lines
1.7 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[108,3,5,7,8,16,18],{"+NIl":function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(Q,O){"use strict";function K(s,o){s.cmdState.push(o)}function M(s){return s.cmdState.length>0?s.cmdState[s.cmdState.length-1]:null}function B(s){var o=s.cmdState.pop();o&&o.closeBracket()}function R(s){for(var o=s.cmdState,f=o.length-1;f>=0;f--){var l=o[f];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function b(s,o,f){return function(){this.name=s,this.bracketNo=0,this.style=o,this.styles=f,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=b("importmodule","tag",["string","builtin"]),t.documentclass=b("documentclass","tag",["","atom"]),t.usepackage=b("usepackage","tag",["atom"]),t.begin=b("begin","tag",["atom"]),t.end=b("end","tag",["atom"]),t.label=b("label","tag",["atom"]),t.ref=b("ref","tag",["atom"]),t.eqref=b("eqref","tag",["atom"]),t.cite=b("cite","tag",["atom"]),t.bibitem=b("bibitem","tag",["atom"]),t.Bibitem=b("Bibitem","tag",["atom"]),t.RBibitem=b("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(s,o){s.f=o}function i(s,o){var f;if(s.match(/^\\[a-zA-Z@]+/)){var l=s.current().slice(1);return f=t.hasOwnProperty(l)?t[l]:t.DEFAULT,f=new f,K(o,f),E(o,h),f.style}if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/\\]/))return"tag";if(s.match("\\["))return E(o,function(a,u){return A(a,u,"\\]")}),"keyword";if(s.match("\\("))return E(o,function(a,u){return A(a,u,"\\)")}),"keyword";if(s.match("$$"))return E(o,function(a,u){return A(a,u,"$$")}),"keyword";if(s.match("$"))return E(o,function(a,u){return A(a,u,"$")}),"keyword";var c=s.next();if(c=="%")return s.skipToEnd(),"comment";if(c=="}"||c=="]"){if(f=M(o),f)f.closeBracket(c),E(o,h);else return"error";return"bracket"}else return c=="{"||c=="["?(f=t.DEFAULT,f=new f,K(o,f),"bracket"):/\d/.test(c)?(s.eatWhile(/[\w.%]/),"atom"):(s.eatWhile(/[\w\-_]/),f=R(o),f.name=="begin"&&(f.argument=s.current()),f.styleIdentifier())}function A(s,o,f){if(s.eatSpace())return null;if(f&&s.match(f))return E(o,i),"keyword";if(s.match(/^\\[a-zA-Z@]+/))return"tag";if(s.match(/^[a-zA-Z]+/))return"variable-2";if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/]/))return"tag";if(s.match(/^[\^_&]/))return"tag";if(s.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(s.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=s.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(s.skipToEnd(),"comment"):"error"}function h(s,o){var f=s.peek(),l;return f=="{"||f=="["?(l=M(o),l.openBracket(f),s.eat(f),E(o,i),"bracket"):/[ \t\r]/.test(f)?(s.eat(f),null):(E(o,i),B(o),i(s,o))}return{startState:function(){var s=O.inMathMode?function(o,f){return A(o,f)}:i;return{cmdState:[],f:s}},copyState:function(s){return{cmdState:s.cmdState.slice(),f:s.f}},token:function(s,o){return o.f(s,o)},blankLine:function(s){s.f=i,s.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+ua5":function(Xe,le,H){},"/cxE":function(Xe,le,H){"use strict";H.d(le,"f",function(){return O}),H.d(le,"g",function(){return K}),H.d(le,"h",function(){return M}),H.d(le,"e",function(){return R}),H.d(le,"b",function(){return b}),H.d(le,"c",function(){return t}),H.d(le,"d",function(){return E}),H.d(le,"a",function(){return i});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(A){setTimeout(()=>{throw A.stack?new Error(A.message+`
`+A.stack):A},0)}}emit(A){this.listeners.forEach(h=>{h(A)})}onUnexpectedError(A){this.unexpectedErrorHandler(A),this.emit(A)}onUnexpectedExternalError(A){this.unexpectedErrorHandler(A)}}const Q=new Z;function O(A){R(A)||Q.onUnexpectedError(A);return}function K(A){R(A)||Q.onUnexpectedExternalError(A);return}function M(A){if(A instanceof Error){let{name:h,message:s}=A;const o=A.stacktrace||A.stack;return{$isError:!0,name:h,message:s,stack:o}}return A}const B="Canceled";function R(A){return A instanceof Error&&A.name===B&&A.message===B}function b(){const A=new Error(B);return A.name=A.message,A}function t(A){return A?new Error(`Illegal argument: ${A}`):new Error("Illegal argument")}function E(A){return A?new Error(`Illegal state: ${A}`):new Error("Illegal state")}class i extends Error{constructor(A){super("NotSupported");A&&(this.message=A)}}},"06Qe":function(Xe,le,H){var Z=H("ItGF"),Q="urn:schemas-microsoft-com:vml",O=typeof window=="undefined"?null:window,K=!1,M=O&&O.document;function B(t){return R(t)}var R;if(M&&!Z.canvasSupported)try{!M.namespaces.zrvml&&M.namespaces.add("zrvml",Q),R=function(t){return M.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){R=function(E){return M.createElement("<"+E+' xmlns="'+Q+'" class="zrvml">')}}function b(){if(K||!M)return;K=!0;var t=M.styleSheets;t.length<31?M.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}le.doc=M,le.createNode=B,le.initVML=b},"0s+r":function(Xe,le,H){var Z=H("bYtY"),Q=H("QBsz"),O=H("y23F"),K=H("H6uX"),M=H("YH21"),B=H("C0SR"),R="silent";function b(f,l,c){return{type:f,event:c,target:l.target,topTarget:l.topTarget,cancelBubble:!1,offsetX:c.zrX,offsetY:c.zrY,gestureEvent:c.gestureEvent,pinchX:c.pinchX,pinchY:c.pinchY,pinchScale:c.pinchScale,wheelDelta:c.zrDelta,zrByTouch:c.zrByTouch,which:c.which,stop:t}}function t(){M.stop(this.event)}function E(){}E.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],A=function(f,l,c,a){K.call(this),this.storage=f,this.painter=l,this.painterRoot=a,c=c||new E,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,O.call(this),this.setHandlerProxy(c)};A.prototype={constructor:A,setHandlerProxy:function(f){this.proxy&&this.proxy.dispose(),f&&(Z.each(i,function(l){f.on&&f.on(l,this[l],this)},this),f.handler=this),this.proxy=f},mousemove:function(f){var l=f.zrX,c=f.zrY,a=s(this,l,c),u=this._hovered,v=u.target;v&&!v.__zr&&(u=this.findHover(u.x,u.y),v=u.target);var T=this._hovered=a?{x:l,y:c}:this.findHover(l,c),x=T.target,D=this.proxy;D.setCursor&&D.setCursor(x?x.cursor:"default"),v&&x!==v&&this.dispatchToElement(u,"mouseout",f),this.dispatchToElement(T,"mousemove",f),x&&x!==v&&this.dispatchToElement(T,"mouseover",f)},mouseout:function(f){var l=f.zrEventControl,c=f.zrIsToLocalDOM;l!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",f),l!=="no_globalout"&&(!c&&this.trigger("globalout",{type:"globalout",event:f}))},resize:function(f){this._hovered={}},dispatch:function(f,l){var c=this[f];c&&c.call(this,l)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(f){var l=this.proxy;l.setCursor&&l.setCursor(f)},dispatchToElement:function(f,l,c){f=f||{};var a=f.target;if(a&&a.silent)return;for(var u="on"+l,v=b(l,f,c);a&&!(a[u]&&(v.cancelBubble=a[u].call(a,v)),a.trigger(l,v),a=a.parent,v.cancelBubble););v.cancelBubble||(this.trigger(l,v),this.painter&&this.painter.eachOtherLayer(function(T){typeof T[u]=="function"&&T[u].call(T,v),T.trigger&&T.trigger(l,v)}))},findHover:function(f,l,c){for(var a=this.storage.getDisplayList(),u={x:f,y:l},v=a.length-1;v>=0;v--){var T;if(a[v]!==c&&!a[v].ignore&&(T=h(a[v],f,l))&&(!u.topTarget&&(u.topTarget=a[v]),T!==R)){u.target=a[v];break}}return u},processGesture:function(f,l){this._gestureMgr||(this._gestureMgr=new B);var c=this._gestureMgr;l==="start"&&c.clear();var a=c.recognize(f,this.findHover(f.zrX,f.zrY,null).target,this.proxy.dom);if(l==="end"&&c.clear(),a){var u=a.type;f.gestureEvent=u,this.dispatchToElement({target:a.target},u,a.event)}}},Z.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(f){A.prototype[f]=function(l){var c=l.zrX,a=l.zrY,u=s(this,c,a),v,T;if((f!=="mouseup"||!u)&&(v=this.findHover(c,a),T=v.target),f==="mousedown")this._downEl=T,this._downPoint=[l.zrX,l.zrY],this._upEl=T;else if(f==="mouseup")this._upEl=T;else if(f==="click"){if(this._downEl!==this._upEl||!this._downPoint||Q.dist(this._downPoint,[l.zrX,l.zrY])>4)return;this._downPoint=null}this.dispatchToElement(v,f,l)}});function h(f,l,c){if(f[f.rectHover?"rectContain":"contain"](l,c)){for(var a=f,u;a;){if(a.clipPath&&!a.clipPath.contain(l,c))return!1;a.silent&&(u=!0),a=a.parent}return u?R:!0}return!1}function s(f,l,c){var a=f.painter;return l<0||l>a.getWidth()||c<0||c>a.getHeight()}Z.mixin(A,K),Z.mixin(A,O);var o=A;Xe.exports=o},"19Vz":function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(b,t,E){var i=E&&E!=Z.Init;if(t&&!i)b.on("blur",M),b.on("change",B),b.on("swapDoc",B),Z.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){K(b)}),B(b);else if(!t&&i){b.off("blur",M),b.off("change",B),b.off("swapDoc",B),Z.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),Q(b);var A=b.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}t&&!b.hasFocus()&&M(b)});function Q(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){Q(b);var t=b.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=b.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var E=b.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),t.appendChild(E),b.display.lineSpace.insertBefore(t,b.display.lineSpace.firstChild)}function K(b){setTimeout(function(){var t=!1,E=b.getInputField();E.nodeName=="TEXTAREA"?t=!E.value:b.lineCount()==1&&(t=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),t?O(b):Q(b)},20)}function M(b){R(b)&&O(b)}function B(b){var t=b.getWrapperElement(),E=R(b);t.className=t.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?O(b):Q(b)}function R(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1Jh7":function(Xe,le,H){var Z=H("y+Vt"),Q=H("T6xi"),O=Z.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(K,M){Q.buildPath(K,M,!1)}});Xe.exports=O},"1MYJ":function(Xe,le,H){var Z=H("y+Vt"),Q=Z.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var O=this.__dirtyPath,K=this.shape.paths,M=0;M<K.length;M++)O=O||K[M].__dirtyPath;this.__dirtyPath=O,this.__dirty=this.__dirty||O},beforeBrush:function(){this._updatePathDirty();for(var O=this.shape.paths||[],K=this.getGlobalScale(),M=0;M<O.length;M++)O[M].path||O[M].createPathProxy(),O[M].path.setScale(K[0],K[1],O[M].segmentIgnoreThreshold)},buildPath:function(O,K){for(var M=K.paths||[],B=0;B<M.length;B++)M[B].buildPath(O,M[B].shape,!0)},afterBrush:function(){for(var O=this.shape.paths||[],K=0;K<O.length;K++)O[K].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Z.prototype.getBoundingRect.call(this)}});Xe.exports=Q},"1RvN":function(Xe,le){var H=function(){this.head=null,this.tail=null,this._len=0},Z=H.prototype;Z.insert=function(B){var R=new Q(B);return this.insertEntry(R),R},Z.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++},Z.remove=function(B){var R=B.prev,b=B.next;R?R.next=b:this.head=b,b?b.prev=R:this.tail=R,B.next=B.prev=null,this._len--},Z.len=function(){return this._len},Z.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 H,this._map={},this._maxSize=B||10,this._lastRemovedEntry=null},K=O.prototype;K.put=function(B,R){var b=this._list,t=this._map,E=null;if(t[B]==null){var i=b.len(),A=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var h=b.head;b.remove(h),delete t[h.key],E=h.value,this._lastRemovedEntry=h}A?A.value=R:A=new Q(R),A.key=B,b.insertEntry(A),t[B]=A}return E},K.get=function(B){var R=this._map[B],b=this._list;if(R!=null)return R!==b.tail&&(b.remove(R),b.insertEntry(R)),R.value},K.clear=function(){this._list.clear(),this._map={}};var M=O;Xe.exports=M},"1bdT":function(Xe,le,H){var Z=H("3gBT"),Q=H("H6uX"),O=H("DN4a"),K=H("vWvF"),M=H("bYtY"),B=function(b){O.call(this,b),Q.call(this,b),K.call(this,b),this.id=b.id||Z()};B.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(b,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":b=0;break}var E=this.transform;E||(E=this.transform=[1,0,0,1,0,0]),E[4]+=b,E[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(b,t){},attrKV:function(b,t){if(b==="position"||b==="scale"||b==="origin"){if(t){var E=this[b];E||(E=this[b]=[]),E[0]=t[0],E[1]=t[1]}}else this[b]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(b,t){if(typeof b=="string")this.attrKV(b,t);else if(M.isObject(b))for(var E in b)b.hasOwnProperty(E)&&this.attrKV(E,b[E]);return this.dirty(!1),this},setClipPath:function(b){var t=this.__zr;t&&b.addSelfToZr(t),this.clipPath&&this.clipPath!==b&&this.removeClipPath(),this.clipPath=b,b.__zr=t,b.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var b=this.clipPath;b&&(b.__zr&&b.removeSelfFromZr(b.__zr),b.__zr=null,b.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(b){this.__zr=b;var t=this.animators;if(t)for(var E=0;E<t.length;E++)b.animation.addAnimator(t[E]);this.clipPath&&this.clipPath.addSelfToZr(b)},removeSelfFromZr:function(b){this.__zr=null;var t=this.animators;if(t)for(var E=0;E<t.length;E++)b.animation.removeAnimator(t[E]);this.clipPath&&this.clipPath.removeSelfFromZr(b)}},M.mixin(B,K),M.mixin(B,O),M.mixin(B,Q);var R=B;Xe.exports=R},"1eCo":function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){"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};Z.defineMode("xml",function(K,M){var B=K.indentUnit,R={},b=M.htmlMode?Q:O;for(var t in b)R[t]=b[t];for(var t in M)R[t]=M[t];var E,i;function A(m,C){function y(k){return C.tokenize=k,k(m,C)}var g=m.next();if(g=="<")return m.eat("!")?m.eat("[")?m.match("CDATA[")?y(o("atom","]]>")):null:m.match("--")?y(o("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),y(f(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),C.tokenize=o("meta","?>"),"meta"):(E=m.eat("/")?"closeTag":"openTag",C.tokenize=h,"tag bracket");if(g=="&"){var U;return m.eat("#")?m.eat("x")?U=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):U=m.eatWhile(/[\d]/)&&m.eat(";"):U=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),U?"atom":"error"}else return m.eatWhile(/[^&<]/),null}A.isInText=!0;function h(m,C){var y=m.next();if(y==">"||y=="/"&&m.eat(">"))return C.tokenize=A,E=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return E="equals",null;if(y=="<"){C.tokenize=A,C.state=u,C.tagName=C.tagStart=null;var g=C.tokenize(m,C);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(y)?(C.tokenize=s(y),C.stringStartCol=m.column(),C.tokenize(m,C)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(m){var C=function(y,g){for(;!y.eol();)if(y.next()==m){g.tokenize=h;break}return"string"};return C.isInAttribute=!0,C}function o(m,C){return function(y,g){for(;!y.eol();){if(y.match(C)){g.tokenize=A;break}y.next()}return m}}function f(m){return function(C,y){for(var g;(g=C.next())!=null;){if(g=="<")return y.tokenize=f(m+1),y.tokenize(C,y);if(g==">")if(m==1){y.tokenize=A;break}else return y.tokenize=f(m-1),y.tokenize(C,y)}return"meta"}}function l(m,C,y){this.prev=m.context,this.tagName=C,this.indent=m.indented,this.startOfLine=y,(R.doNotIndent.hasOwnProperty(C)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function c(m){m.context&&(m.context=m.context.prev)}function a(m,C){for(var y;;){if(!m.context)return;if(y=m.context.tagName,!R.contextGrabbers.hasOwnProperty(y)||!R.contextGrabbers[y].hasOwnProperty(C))return;c(m)}}function u(m,C,y){return m=="openTag"?(y.tagStart=C.column(),v):m=="closeTag"?T:u}function v(m,C,y){return m=="word"?(y.tagName=C.current(),i="tag",w):R.allowMissingTagName&&m=="endTag"?(i="tag bracket",w(m,C,y)):(i="error",v)}function T(m,C,y){if(m=="word"){var g=C.current();return y.context&&y.context.tagName!=g&&R.implicitlyClosed.hasOwnProperty(y.context.tagName)&&c(y),y.context&&y.context.tagName==g||R.matchClosing===!1?(i="tag",x):(i="tag error",D)}else return R.allowMissingTagName&&m=="endTag"?(i="tag bracket",x(m,C,y)):(i="error",D)}function x(m,C,y){return m!="endTag"?(i="error",x):(c(y),u)}function D(m,C,y){return i="error",x(m,C,y)}function w(m,C,y){if(m=="word")return i="attribute",p;if(m=="endTag"||m=="selfcloseTag"){var g=y.tagName,U=y.tagStart;return y.tagName=y.tagStart=null,m=="selfcloseTag"||R.autoSelfClosers.hasOwnProperty(g)?a(y,g):(a(y,g),y.context=new l(y,g,U==y.indented)),u}return i="error",w}function p(m,C,y){return m=="equals"?n:(R.allowMissing||(i="error"),w(m,C,y))}function n(m,C,y){return m=="string"?d:m=="word"&&R.allowUnquoted?(i="string",w):(i="error",w(m,C,y))}function d(m,C,y){return m=="string"?d:w(m,C,y)}return{startState:function(m){var C={tokenize:A,state:u,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(C.baseIndent=m),C},token:function(m,C){if(!C.tagName&&m.sol()&&(C.indented=m.indentation()),m.eatSpace())return null;E=null;var y=C.tokenize(m,C);return(y||E)&&y!="comment"&&(i=null,C.state=C.state(E||y,m,C),i&&(y=i=="error"?y+" error":i)),y},indent:function(m,C,y){var g=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+B;if(g&&g.noIndent)return Z.Pass;if(m.tokenize!=h&&m.tokenize!=A)return y?y.match(/^(\s*)/)[0].length:0;if(m.tagName)return R.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+B*(R.multilineTagIndentFactor||1);if(R.alignCDATA&&/<!\[CDATA\[/.test(C))return 0;var U=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(U&&U[1])for(;g;)if(g.tagName==U[2]){g=g.prev;break}else if(R.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(U)for(;g;){var k=R.contextGrabbers[g.tagName];if(k&&k.hasOwnProperty(U[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+B:m.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:R.htmlMode?"html":"xml",helperType:R.htmlMode?"html":"xml",skipAttribute:function(m){m.state==n&&(m.state=w)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var C=[],y=m.context;y;y=y.prev)y.tagName&&C.push(y.tagName);return C.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function(Xe,le,H){Xe.exports={md:"md___1fRow"}},"1j5w":function(Xe,le,H){"use strict";H.d(le,"d",function(){return nt}),H.d(le,"b",function(){return Fe}),H.d(le,"c",function(){return pt}),H.d(le,"a",function(){return kt});var Z=H("VTBJ"),Q=H("1OyB"),O=H("vuIU"),K=H("JX7q"),M=H("Ji7U"),B=H("LK+K"),R=H("q1tI"),b=H("I8Z2"),t=H("BGR+"),E=H("wx14"),i=H("rePB"),A=H("4IlW"),h=H("2GS6"),s=H("Gytx"),o=H.n(s),f=H("TSYQ"),l=H.n(f),c=H("U8pU"),a=H("ODXe"),u=/iPhone/i,v=/iPod/i,T=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,D=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,p=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,n=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,m=/BlackBerry/i,C=/BB10/i,y=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function k(Bt,ht){return Bt.test(ht)}function I(Bt){var ht=Bt||(typeof navigator!="undefined"?navigator.userAgent:""),it=ht.split("[FBAN");if(typeof it[1]!="undefined"){var et=it,Te=Object(a.a)(et,1);ht=Te[0]}if(it=ht.split("Twitter"),typeof it[1]!="undefined"){var Ne=it,mt=Object(a.a)(Ne,1);ht=mt[0]}var lt={apple:{phone:k(u,ht)&&!k(n,ht),ipod:k(v,ht),tablet:!k(u,ht)&&k(T,ht)&&!k(n,ht),device:(k(u,ht)||k(v,ht)||k(T,ht))&&!k(n,ht)},amazon:{phone:k(w,ht),tablet:!k(w,ht)&&k(p,ht),device:k(w,ht)||k(p,ht)},android:{phone:!k(n,ht)&&k(w,ht)||!k(n,ht)&&k(x,ht),tablet:!k(n,ht)&&!k(w,ht)&&!k(x,ht)&&(k(p,ht)||k(D,ht)),device:!k(n,ht)&&(k(w,ht)||k(p,ht)||k(x,ht)||k(D,ht))||k(/\bokhttp\b/i,ht)},windows:{phone:k(n,ht),tablet:k(d,ht),device:k(n,ht)||k(d,ht)},other:{blackberry:k(m,ht),blackberry10:k(C,ht),opera:k(y,ht),firefox:k(U,ht),chrome:k(g,ht),device:k(m,ht)||k(C,ht)||k(y,ht)||k(U,ht)||k(g,ht)},any:null,phone:null,tablet:null};return lt.any=lt.apple.device||lt.android.device||lt.windows.device||lt.other.device,lt.phone=lt.apple.phone||lt.android.phone||lt.windows.phone,lt.tablet=lt.apple.tablet||lt.android.tablet||lt.windows.tablet,lt}var V=Object(Z.a)(Object(Z.a)({},I()),{},{isMobile:I}),G=V;function L(){}function $(Bt,ht,it){var et=ht||"";return Bt.key||"".concat(et,"item_").concat(it)}function Y(Bt){return"".concat(Bt,"-menu-")}function ne(Bt,ht){var it=-1;R.Children.forEach(Bt,function(et){it+=1,et&&et.type&&et.type.isMenuItemGroup?R.Children.forEach(et.props.children,function(Te){it+=1,ht(Te,it)}):ht(et,it)})}function se(Bt,ht,it){if(!Bt||it.find)return;R.Children.forEach(Bt,function(et){if(et){var Te=et.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;ht.indexOf(et.key)!==-1?it.find=!0:et.props.children&&se(et.props.children,ht,it)}})}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"],ve=function(ht){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=ht&&typeof ht.getBoundingClientRect=="function"&&ht.getBoundingClientRect().width;if(et){if(it){var Te=getComputedStyle(ht),Ne=Te.marginLeft,mt=Te.marginRight;et+=+Ne.replace("px","")+ +mt.replace("px","")}et=+et.toFixed(6)}return et||0},Ce=function(ht,it,et){ht&&Object(c.a)(ht.style)==="object"&&(ht.style[it]=et)},De=function(){return G.any},Qe=H("KQm4"),Se=H("Ff2n"),Ie=H("i8i4"),Je=H("bdgK"),Et=H("uciX"),Le=H("8XRh"),je={adjustX:1,adjustY:1},st={topLeft:{points:["bl","tl"],overflow:je,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:je,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:je,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:je,offset:[4,0]}},he={topLeft:{points:["bl","tl"],overflow:je,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:je,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:je,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:je,offset:[4,0]}},ie=st,oe=0,ee={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},de=function(ht,it,et){var Te=Y(it),Ne=ht.getState();ht.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},Ne.defaultActiveFirst),{},Object(i.a)({},Te,et))})},we=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(et){var Te;Object(Q.a)(this,it),Te=ht.call(this,et),Te.onDestroy=function(tt){Te.props.onDestroy(tt)},Te.onKeyDown=function(tt){var St=tt.keyCode,Lt=Te.menuInstance,Tt=Te.props,Ht=Tt.isOpen,gr=Tt.store;if(St===A.a.ENTER)return Te.onTitleClick(tt),de(gr,Te.props.eventKey,!0),!0;if(St===A.a.RIGHT)return Ht?Lt.onKeyDown(tt):(Te.triggerOpenChange(!0),de(gr,Te.props.eventKey,!0)),!0;if(St===A.a.LEFT){var Or;if(Ht)Or=Lt.onKeyDown(tt);else return;return Or||(Te.triggerOpenChange(!1),Or=!0),Or}return Ht&&(St===A.a.UP||St===A.a.DOWN)?Lt.onKeyDown(tt):void 0},Te.onOpenChange=function(tt){Te.props.onOpenChange(tt)},Te.onPopupVisibleChange=function(tt){Te.triggerOpenChange(tt,tt?"mouseenter":"mouseleave")},Te.onMouseEnter=function(tt){var St=Te.props,Lt=St.eventKey,Tt=St.onMouseEnter,Ht=St.store;de(Ht,Te.props.eventKey,!1),Tt({key:Lt,domEvent:tt})},Te.onMouseLeave=function(tt){var St=Te.props,Lt=St.parentMenu,Tt=St.eventKey,Ht=St.onMouseLeave;Lt.subMenuInstance=Object(K.a)(Te),Ht({key:Tt,domEvent:tt})},Te.onTitleMouseEnter=function(tt){var St=Te.props,Lt=St.eventKey,Tt=St.onItemHover,Ht=St.onTitleMouseEnter;Tt({key:Lt,hover:!0}),Ht({key:Lt,domEvent:tt})},Te.onTitleMouseLeave=function(tt){var St=Te.props,Lt=St.parentMenu,Tt=St.eventKey,Ht=St.onItemHover,gr=St.onTitleMouseLeave;Lt.subMenuInstance=Object(K.a)(Te),Ht({key:Tt,hover:!1}),gr({key:Tt,domEvent:tt})},Te.onTitleClick=function(tt){var St=Object(K.a)(Te),Lt=St.props;if(Lt.onTitleClick({key:Lt.eventKey,domEvent:tt}),Lt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!Lt.isOpen,"click"),de(Lt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(tt){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(tt))},Te.onSelect=function(tt){Te.props.onSelect(tt)},Te.onDeselect=function(tt){Te.props.onDeselect(tt)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(tt){Te.menuInstance=tt},Te.addKeyPath=function(tt){return Object(Z.a)(Object(Z.a)({},tt),{},{keyPath:(tt.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(tt,St){var Lt=Te.props.eventKey,Tt=function(){Te.onOpenChange({key:Lt,item:Object(K.a)(Te),trigger:St,open:tt})};St==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Tt()},0):Tt()},Te.isChildrenSelected=function(){var tt={find:!1};return se(Te.props.children,Te.props.selectedKeys,tt),tt.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var tt=Ie.findDOMNode(Te.menuInstance);if(tt.offsetWidth>=Te.subMenuTitle.offsetWidth)return;tt.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(tt){Te.subMenuTitle=tt},Te.getBaseProps=function(){var tt=Object(K.a)(Te),St=tt.props;return{mode:St.mode==="horizontal"?"vertical":St.mode,visible:Te.props.isOpen,level:St.level+1,inlineIndent:St.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:St.selectedKeys,eventKey:"".concat(St.eventKey,"-menu-"),openKeys:St.openKeys,motion:St.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:St.subMenuOpenDelay,parentMenu:Object(K.a)(Te),subMenuCloseDelay:St.subMenuCloseDelay,forceSubMenuRender:St.forceSubMenuRender,triggerSubMenuAction:St.triggerSubMenuAction,builtinPlacements:St.builtinPlacements,defaultActiveFirst:St.store.getState().defaultActiveFirst[Y(St.eventKey)],multiple:St.multiple,prefixCls:St.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:St.itemIcon,expandIcon:St.expandIcon,direction:St.direction}},Te.getMotion=function(tt,St){var Lt=Object(K.a)(Te),Tt=Lt.haveRendered,Ht=Te.props,gr=Ht.motion,Or=Ht.rootPrefixCls,vr=Object(Z.a)(Object(Z.a)({},gr),{},{leavedClassName:"".concat(Or,"-hidden"),removeOnLeave:!1,motionAppear:Tt||!St||tt!=="inline"});return vr};var Ne=et.store,mt=et.eventKey,lt=Ne.getState(),Ct=lt.defaultActiveFirst;Te.isRootMenu=!1;var bt=!1;return Ct&&(bt=Ct[mt]),de(Ne,mt,bt),Te}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,Ne=this.props,mt=Ne.mode,lt=Ne.parentMenu,Ct=Ne.manualRef;if(Ct&&Ct(this),mt!=="horizontal"||!lt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,Ne=Te.onDestroy,mt=Te.eventKey;Ne&&Ne(mt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var Ne=this,mt=this.getBaseProps(),lt=this.getMotion(mt.mode,mt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||mt.visible||mt.forceSubMenuRender,!this.haveOpened)return R.createElement("div",null);var Ct=mt.direction;return R.createElement(Le.default,Object.assign({visible:mt.visible},lt),function(bt){var tt=bt.className,St=bt.style,Lt=l()("".concat(mt.prefixCls,"-sub"),tt,Object(i.a)({},"".concat(mt.prefixCls,"-rtl"),Ct==="rtl"));return R.createElement(Ke,Object.assign({},mt,{id:Ne.internalMenuId,className:Lt,style:St}),Te)})}},{key:"render",value:function(){var Te,Ne=Object(Z.a)({},this.props),mt=Ne.isOpen,lt=this.getPrefixCls(),Ct=Ne.mode==="inline",bt=l()(lt,"".concat(lt,"-").concat(Ne.mode),(Te={},Object(i.a)(Te,Ne.className,!!Ne.className),Object(i.a)(Te,this.getOpenClassName(),mt),Object(i.a)(Te,this.getActiveClassName(),Ne.active||mt&&!Ct),Object(i.a)(Te,this.getDisabledClassName(),Ne.disabled),Object(i.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(Ne.eventKey?this.internalMenuId="".concat(Ne.eventKey,"$Menu"):(oe+=1,this.internalMenuId="$__$".concat(oe,"$Menu")));var tt={},St={},Lt={};Ne.disabled||(tt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},St={onClick:this.onTitleClick},Lt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Tt={},Ht=Ne.direction;Ct&&(Ht==="rtl"?Tt.paddingRight=Ne.inlineIndent*Ne.level:Tt.paddingLeft=Ne.inlineIndent*Ne.level);var gr={};this.props.isOpen&&(gr={"aria-owns":this.internalMenuId});var Or=null;Ne.mode!=="horizontal"&&(Or=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Or=R.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var vr=R.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Tt,className:"".concat(lt,"-title"),role:"button"},Lt,St,{"aria-expanded":mt},gr,{"aria-haspopup":"true",title:typeof Ne.title=="string"?Ne.title:void 0}),Ne.title,Or||R.createElement("i",{className:"".concat(lt,"-arrow")})),jt=this.renderChildren(Ne.children),Mr=Ne.parentMenu.isRootMenu?Ne.parentMenu.props.getPopupContainer:function(qe){return qe.parentNode},br=ee[Ne.mode],Tr=Ne.popupOffset?{offset:Ne.popupOffset}:{},Ar=Ne.mode==="inline"?"":Ne.popupClassName;Ar+=Ht==="rtl"?" ".concat(lt,"-rtl"):"";var Sr=Ne.disabled,tn=Ne.triggerSubMenuAction,Zr=Ne.subMenuOpenDelay,me=Ne.forceSubMenuRender,be=Ne.subMenuCloseDelay,Pe=Ne.builtinPlacements;_e.forEach(function(qe){return delete Ne[qe]}),delete Ne.onClick;var rt=Ht==="rtl"?Object.assign({},he,Pe):Object.assign({},st,Pe);return delete Ne.direction,R.createElement("li",Object.assign({},Ne,tt,{className:bt,role:"menuitem"}),Ct&&vr,Ct&&jt,!Ct&&R.createElement(Et.a,{prefixCls:lt,popupClassName:l()("".concat(lt,"-popup"),Ar),getPopupContainer:Mr,builtinPlacements:rt,popupPlacement:br,popupVisible:mt,popupAlign:Tr,popup:jt,action:Sr?[]:[tn],mouseEnterDelay:Zr,mouseLeaveDelay:be,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:me},vr))}}]),it}(R.Component);we.defaultProps={onMouseEnter:L,onMouseLeave:L,onTitleMouseEnter:L,onTitleMouseLeave:L,onTitleClick:L,manualRef:L,mode:"vertical",title:""};var Be=Object(b.b)(function(Bt,ht){var it=Bt.openKeys,et=Bt.activeKey,Te=Bt.selectedKeys,Ne=ht.eventKey,mt=ht.subMenuKey;return{isOpen:it.indexOf(Ne)>-1,active:et[mt]===Ne,selectedKeys:Te}})(we);Be.isSubMenu=!0;var nt=Be,at="menuitem-overflowed",At=.5,ft=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(){var et;return Object(Q.a)(this,it),et=ht.apply(this,arguments),et.resizeObserver=null,et.mutationObserver=null,et.originalTotalWidth=0,et.overflowedItems=[],et.menuItemSizes=[],et.cancelFrameId=null,et.state={lastVisibleIndex:void 0},et.getMenuItemNodes=function(){var Te=et.props.prefixCls,Ne=Ie.findDOMNode(Object(K.a)(et));return Ne?[].slice.call(Ne.children).filter(function(mt){return mt.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},et.getOverflowedSubMenuItem=function(Te,Ne,mt){var lt=et.props,Ct=lt.overflowedIndicator,bt=lt.level,tt=lt.mode,St=lt.prefixCls,Lt=lt.theme;if(bt!==1||tt!=="horizontal")return null;var Tt=et.props.children[0],Ht=Tt.props,gr=Ht.children,Or=Ht.title,vr=Ht.style,jt=Object(Se.a)(Ht,["children","title","style"]),Mr=Object(Z.a)({},vr),br="".concat(Te,"-overflowed-indicator"),Tr="".concat(Te,"-overflowed-indicator");Ne.length===0&&mt!==!0?Mr=Object(Z.a)(Object(Z.a)({},Mr),{},{display:"none"}):mt&&(Mr=Object(Z.a)(Object(Z.a)({},Mr),{},{visibility:"hidden",position:"absolute"}),br="".concat(br,"-placeholder"),Tr="".concat(Tr,"-placeholder"));var Ar=Lt?"".concat(St,"-").concat(Lt):"",Sr={};return _e.forEach(function(tn){jt[tn]!==void 0&&(Sr[tn]=jt[tn])}),R.createElement(nt,Object.assign({title:Ct,className:"".concat(St,"-overflowed-submenu"),popupClassName:Ar},Sr,{key:br,eventKey:Tr,disabled:!1,style:Mr}),Ne)},et.setChildrenWidthAndResize=function(){if(et.props.mode!=="horizontal")return;var Te=Ie.findDOMNode(Object(K.a)(et));if(!Te)return;var Ne=Te.children;if(!Ne||Ne.length===0)return;var mt=Te.children[Ne.length-1];Ce(mt,"display","inline-block");var lt=et.getMenuItemNodes(),Ct=lt.filter(function(bt){return bt.className.split(" ").indexOf(at)>=0});Ct.forEach(function(bt){Ce(bt,"display","inline-block")}),et.menuItemSizes=lt.map(function(bt){return ve(bt,!0)}),Ct.forEach(function(bt){Ce(bt,"display","none")}),et.overflowedIndicatorWidth=ve(Te.children[Te.children.length-1],!0),et.originalTotalWidth=et.menuItemSizes.reduce(function(bt,tt){return bt+tt},0),et.handleResize(),Ce(mt,"display","none")},et.handleResize=function(){if(et.props.mode!=="horizontal")return;var Te=Ie.findDOMNode(Object(K.a)(et));if(!Te)return;var Ne=ve(Te);et.overflowedItems=[];var mt=0,lt;et.originalTotalWidth>Ne+At&&(lt=-1,et.menuItemSizes.forEach(function(Ct){mt+=Ct,mt+et.overflowedIndicatorWidth<=Ne&&(lt+=1)})),et.setState({lastVisibleIndex:lt})},et}return Object(O.a)(it,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ne=Ie.findDOMNode(this);if(!Ne)return;this.resizeObserver=new Je.default(function(mt){mt.forEach(function(){var lt=Te.cancelFrameId;cancelAnimationFrame(lt),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(Ne.children).concat(Ne).forEach(function(mt){Te.resizeObserver.observe(mt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(Ne.children).concat(Ne).forEach(function(mt){Te.resizeObserver.observe(mt)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ne,{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(Te){var Ne=this,mt=this.state.lastVisibleIndex;return(Te||[]).reduce(function(lt,Ct,bt){var tt=Ct;if(Ne.props.mode==="horizontal"){var St=Ne.getOverflowedSubMenuItem(Ct.props.eventKey,[]);mt!==void 0&&Ne.props.className.indexOf("".concat(Ne.props.prefixCls,"-root"))!==-1&&(bt>mt&&(tt=R.cloneElement(Ct,{style:{display:"none"},eventKey:"".concat(Ct.props.eventKey,"-hidden"),className:"".concat(at)})),bt===mt+1&&(Ne.overflowedItems=Te.slice(mt+1).map(function(Tt){return R.cloneElement(Tt,{key:Tt.props.eventKey,mode:"vertical-left"})}),St=Ne.getOverflowedSubMenuItem(Ct.props.eventKey,Ne.overflowedItems)));var Lt=[].concat(Object(Qe.a)(lt),[St,tt]);return bt===Te.length-1&&Lt.push(Ne.getOverflowedSubMenuItem(Ct.props.eventKey,[],!0)),Lt}return[].concat(Object(Qe.a)(lt),[tt])},[])}},{key:"render",value:function(){var Te=this.props,Ne=Te.visible,mt=Te.prefixCls,lt=Te.overflowedIndicator,Ct=Te.mode,bt=Te.level,tt=Te.tag,St=Te.children,Lt=Te.theme,Tt=Object(Se.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ht=tt;return R.createElement(Ht,Object.assign({},Tt),this.renderChildren(St))}}]),it}(R.Component);ft.defaultProps={tag:"div",className:""};var xt=ft;function It(Bt){return Bt.length?Bt.every(function(ht){return!!ht.props.disabled}):!0}function He(Bt,ht,it){var et=Bt.getState();Bt.setState({activeKey:Object(Z.a)(Object(Z.a)({},et.activeKey),{},Object(i.a)({},ht,it))})}function ke(Bt){return Bt.eventKey||"0-menu-"}function ct(Bt,ht){var it=ht,et=Bt.children,Te=Bt.eventKey;if(it){var Ne;if(ne(et,function(mt,lt){mt&&mt.props&&!mt.props.disabled&&it===$(mt,Te,lt)&&(Ne=!0)}),Ne)return it}return it=null,Bt.defaultActiveFirst&&ne(et,function(mt,lt){!it&&mt&&!mt.props.disabled&&(it=$(mt,Te,lt))}),it}function gt(Bt){if(Bt){var ht=this.instanceArray.indexOf(Bt);ht!==-1?this.instanceArray[ht]=Bt:this.instanceArray.push(Bt)}}var Ze=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(et){var Te;return Object(Q.a)(this,it),Te=ht.call(this,et),Te.onKeyDown=function(Ne,mt){var lt=Ne.keyCode,Ct;if(Te.getFlatInstanceArray().forEach(function(tt){tt&&tt.props.active&&tt.onKeyDown&&(Ct=tt.onKeyDown(Ne))}),Ct)return 1;var bt=null;return(lt===A.a.UP||lt===A.a.DOWN)&&(bt=Te.step(lt===A.a.UP?-1:1)),bt?(Ne.preventDefault(),He(Te.props.store,ke(Te.props),bt.props.eventKey),typeof mt=="function"&&mt(bt),1):void 0},Te.onItemHover=function(Ne){var mt=Ne.key,lt=Ne.hover;He(Te.props.store,ke(Te.props),lt?mt:null)},Te.onDeselect=function(Ne){Te.props.onDeselect(Ne)},Te.onSelect=function(Ne){Te.props.onSelect(Ne)},Te.onClick=function(Ne){Te.props.onClick(Ne)},Te.onOpenChange=function(Ne){Te.props.onOpenChange(Ne)},Te.onDestroy=function(Ne){Te.props.onDestroy(Ne)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(Ne){var mt=Te.getFlatInstanceArray(),lt=Te.props.store.getState().activeKey[ke(Te.props)],Ct=mt.length;if(!Ct)return null;Ne<0&&(mt=mt.concat().reverse());var bt=-1;if(mt.every(function(Tt,Ht){return Tt&&Tt.props.eventKey===lt?(bt=Ht,!1):!0}),!Te.props.defaultActiveFirst&&bt!==-1&&It(mt.slice(bt,Ct-1)))return;var tt=(bt+1)%Ct,St=tt;do{var Lt=mt[St];if(!Lt||Lt.props.disabled)St=(St+1)%Ct;else return Lt}while(St!==tt);return null},Te.renderCommonMenuItem=function(Ne,mt,lt){var Ct=Te.props.store.getState(),bt=Object(K.a)(Te),tt=bt.props,St=$(Ne,tt.eventKey,mt),Lt=Ne.props;if(!Lt||typeof Ne.type=="string")return Ne;var Tt=St===Ct.activeKey,Ht=Object(Z.a)(Object(Z.a)({mode:Lt.mode||tt.mode,level:tt.level,inlineIndent:tt.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:tt.prefixCls,index:mt,parentMenu:tt.parentMenu,manualRef:Lt.disabled?void 0:Object(h.a)(Ne.ref,gt.bind(Object(K.a)(Te))),eventKey:St,active:!Lt.disabled&&Tt,multiple:tt.multiple,onClick:function(Or){(Lt.onClick||L)(Or),Te.onClick(Or)},onItemHover:Te.onItemHover,motion:tt.motion,subMenuOpenDelay:tt.subMenuOpenDelay,subMenuCloseDelay:tt.subMenuCloseDelay,forceSubMenuRender:tt.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:tt.builtinPlacements,itemIcon:Lt.itemIcon||Te.props.itemIcon,expandIcon:Lt.expandIcon||Te.props.expandIcon},lt),{},{direction:tt.direction});return(tt.mode==="inline"||De())&&(Ht.triggerSubMenuAction="click"),R.cloneElement(Ne,Ht)},Te.renderMenuItem=function(Ne,mt,lt){if(!Ne)return null;var Ct=Te.props.store.getState(),bt={openKeys:Ct.openKeys,selectedKeys:Ct.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:lt};return Te.renderCommonMenuItem(Ne,mt,bt)},et.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},et.store.getState().activeKey),{},Object(i.a)({},et.eventKey,ct(et,et.activeKey)))}),Te.instanceArray=[],Te}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!o()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var Ne=this.props,mt="activeKey"in Ne?Ne.activeKey:Ne.store.getState().activeKey[ke(Ne)],lt=ct(Ne,mt);if(lt!==mt)He(Ne.store,ke(Ne),lt);else if("activeKey"in Te){var Ct=ct(Te,Te.activeKey);lt!==Ct&&He(Ne.store,ke(Ne),lt)}}},{key:"render",value:function(){var Te=this,Ne=Object(E.a)({},this.props);this.instanceArray=[];var mt=l()(Ne.prefixCls,Ne.className,"".concat(Ne.prefixCls,"-").concat(Ne.mode)),lt={className:mt,role:Ne.role||"menu"};Ne.id&&(lt.id=Ne.id),Ne.focusable&&(lt.tabIndex=0,lt.onKeyDown=this.onKeyDown);var Ct=Ne.prefixCls,bt=Ne.eventKey,tt=Ne.visible,St=Ne.level,Lt=Ne.mode,Tt=Ne.overflowedIndicator,Ht=Ne.theme;return _e.forEach(function(gr){return delete Ne[gr]}),delete Ne.onClick,R.createElement(xt,Object.assign({},Ne,{prefixCls:Ct,mode:Lt,tag:"ul",level:St,theme:Ht,visible:tt,overflowedIndicator:Tt},lt),R.Children.map(Ne.children,function(gr,Or){return Te.renderMenuItem(gr,Or,bt||"0-menu-")}))}}]),it}(R.Component);Ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:L};var ot=Object(b.b)()(Ze),Ke=ot,Me=H("Kwbf");function Ue(Bt,ht,it){var et=Bt.prefixCls,Te=Bt.motion,Ne=Bt.defaultMotions,mt=Ne===void 0?{}:Ne,lt=Bt.openAnimation,Ct=Bt.openTransitionName,bt=ht.switchingModeFromInline;if(Te)return Te;if(Object(c.a)(lt)==="object"&&lt)Object(Me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof lt=="string")return{motionName:"".concat(et,"-open-").concat(lt)};if(Ct)return{motionName:Ct};var tt=mt[it];return tt||(bt?null:mt.other)}var ge=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(et){var Te;Object(Q.a)(this,it),Te=ht.call(this,et),Te.inlineOpenKeys=[],Te.onSelect=function(lt){var Ct=Object(K.a)(Te),bt=Ct.props;if(bt.selectable){var tt=Te.store.getState(),St=tt.selectedKeys,Lt=lt.key;bt.multiple?St=St.concat([Lt]):St=[Lt],"selectedKeys"in bt||Te.store.setState({selectedKeys:St}),bt.onSelect(Object(Z.a)(Object(Z.a)({},lt),{},{selectedKeys:St}))}},Te.onClick=function(lt){var Ct=Te.getRealMenuMode(),bt=Object(K.a)(Te),tt=bt.store,St=bt.props.onOpenChange;Ct!=="inline"&&!("openKeys"in Te.props)&&(tt.setState({openKeys:[]}),St([])),Te.props.onClick(lt)},Te.onKeyDown=function(lt,Ct){Te.innerMenu.getWrappedInstance().onKeyDown(lt,Ct)},Te.onOpenChange=function(lt){var Ct=Object(K.a)(Te),bt=Ct.props,tt=Te.store.getState().openKeys.concat(),St=!1,Lt=function(Ht){var gr=!1;if(Ht.open)gr=tt.indexOf(Ht.key)===-1,gr&&tt.push(Ht.key);else{var Or=tt.indexOf(Ht.key);gr=Or!==-1,gr&&tt.splice(Or,1)}St=St||gr};Array.isArray(lt)?lt.forEach(Lt):Lt(lt),St&&("openKeys"in Te.props||Te.store.setState({openKeys:tt}),bt.onOpenChange(tt))},Te.onDeselect=function(lt){var Ct=Object(K.a)(Te),bt=Ct.props;if(bt.selectable){var tt=Te.store.getState().selectedKeys.concat(),St=lt.key,Lt=tt.indexOf(St);Lt!==-1&&tt.splice(Lt,1),"selectedKeys"in bt||Te.store.setState({selectedKeys:tt}),bt.onDeselect(Object(Z.a)(Object(Z.a)({},lt),{},{selectedKeys:tt}))}},Te.onMouseEnter=function(lt){Te.restoreModeVerticalFromInline();var Ct=Te.props.onMouseEnter;Ct&&Ct(lt)},Te.onTransitionEnd=function(lt){var Ct=lt.propertyName==="width"&&lt.target===lt.currentTarget,bt=lt.target.className,tt=Object.prototype.toString.call(bt)==="[object SVGAnimatedString]"?bt.animVal:bt,St=lt.propertyName==="font-size"&&tt.indexOf("anticon")>=0;(Ct||St)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(lt){Te.innerMenu=lt},Te.isRootMenu=!0;var Ne=et.defaultSelectedKeys,mt=et.defaultOpenKeys;return"selectedKeys"in et&&(Ne=et.selectedKeys||[]),"openKeys"in et&&(mt=et.openKeys||[]),Te.store=Object(b.c)({selectedKeys:Ne,openKeys:mt,activeKey:{"0-menu-":ct(et,et.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var Ne=this.props,mt=Ne.siderCollapsed,lt=Ne.inlineCollapsed,Ct=Ne.onOpenChange;(!Te.inlineCollapsed&&lt||!Te.siderCollapsed&&mt)&&Ct([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var Ne=this.props,mt=this.store,lt=this.inlineOpenKeys,Ct=mt.getState(),bt={};Te.mode==="inline"&&Ne.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ne||((Ne.inlineCollapsed&&!Te.inlineCollapsed||Ne.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Ct.openKeys.concat(),bt.openKeys=[]),(!Ne.inlineCollapsed&&Te.inlineCollapsed||!Ne.siderCollapsed&&Te.siderCollapsed)&&(bt.openKeys=lt,this.inlineOpenKeys=[])),Object.keys(bt).length&&mt.setState(bt)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,Ne=this.store,mt=this.prevOpenKeys,lt=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");lt?(this.prevOpenKeys=Ne.getState().openKeys.concat(),this.store.setState({openKeys:[]})):mt&&(this.store.setState({openKeys:mt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,Ne=this.state.switchingModeFromInline,mt=this.getInlineCollapsed();return Ne&&mt?"inline":mt?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,Ne=Te.inlineCollapsed,mt=Te.siderCollapsed;return mt!==void 0?mt:Ne}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&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 Te=Object(Z.a)({},Object(t.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ne=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(Z.a)(Object(Z.a)({},Te),{},{mode:Ne,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ue(this.props,this.state,Ne)}),delete Te.openAnimation,delete Te.openTransitionName,R.createElement(b.a,{store:this.store},R.createElement(Ke,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),it}(R.Component);ge.defaultProps={selectable:!0,onClick:L,onSelect:L,onOpenChange:L,onDeselect:L,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:R.createElement("span",null,"\xB7\xB7\xB7")};var xe=ge,Ee=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(){var et;return Object(Q.a)(this,it),et=ht.apply(this,arguments),et.onKeyDown=function(Te){var Ne=Te.keyCode;return Ne===A.a.ENTER?(et.onClick(Te),!0):void 0},et.onMouseLeave=function(Te){var Ne=et.props,mt=Ne.eventKey,lt=Ne.onItemHover,Ct=Ne.onMouseLeave;lt({key:mt,hover:!1}),Ct({key:mt,domEvent:Te})},et.onMouseEnter=function(Te){var Ne=et.props,mt=Ne.eventKey,lt=Ne.onItemHover,Ct=Ne.onMouseEnter;lt({key:mt,hover:!0}),Ct({key:mt,domEvent:Te})},et.onClick=function(Te){var Ne=et.props,mt=Ne.eventKey,lt=Ne.multiple,Ct=Ne.onClick,bt=Ne.onSelect,tt=Ne.onDeselect,St=Ne.isSelected,Lt={key:mt,keyPath:[mt],item:Object(K.a)(et),domEvent:Te};Ct(Lt),lt?St?tt(Lt):bt(Lt):St||bt(Lt)},et.saveNode=function(Te){et.node=Te},et}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.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 Te,Ne=Object(Z.a)({},this.props),mt=l()(this.getPrefixCls(),Ne.className,(Te={},Object(i.a)(Te,this.getActiveClassName(),!Ne.disabled&&Ne.active),Object(i.a)(Te,this.getSelectedClassName(),Ne.isSelected),Object(i.a)(Te,this.getDisabledClassName(),Ne.disabled),Te)),lt=Object(Z.a)(Object(Z.a)({},Ne.attribute),{},{title:typeof Ne.title=="string"?Ne.title:void 0,className:mt,role:Ne.role||"menuitem","aria-disabled":Ne.disabled});Ne.role==="option"?lt=Object(Z.a)(Object(Z.a)({},lt),{},{role:"option","aria-selected":Ne.isSelected}):(Ne.role===null||Ne.role==="none")&&(lt.role="none");var Ct={onClick:Ne.disabled?null:this.onClick,onMouseLeave:Ne.disabled?null:this.onMouseLeave,onMouseEnter:Ne.disabled?null:this.onMouseEnter},bt=Object(Z.a)({},Ne.style);Ne.mode==="inline"&&(Ne.direction==="rtl"?bt.paddingRight=Ne.inlineIndent*Ne.level:bt.paddingLeft=Ne.inlineIndent*Ne.level),_e.forEach(function(St){return delete Ne[St]}),delete Ne.direction;var tt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(tt=R.createElement(this.props.itemIcon,this.props)),R.createElement("li",Object.assign({},Object(t.default)(Ne,["onClick","onMouseEnter","onMouseLeave","onSelect"]),lt,Ct,{style:bt,ref:this.saveNode}),Ne.children,tt)}}]),it}(R.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:L,onMouseEnter:L,onMouseLeave:L,manualRef:L};var Oe=Object(b.b)(function(Bt,ht){var it=Bt.activeKey,et=Bt.selectedKeys,Te=ht.eventKey,Ne=ht.subMenuKey;return{active:it[Ne]===Te,isSelected:et.indexOf(Te)!==-1}})(Ee),Fe=Oe,$e=function(Bt){Object(M.a)(it,Bt);var ht=Object(B.a)(it);function it(){var et;return Object(Q.a)(this,it),et=ht.apply(this,arguments),et.renderInnerMenuItem=function(Te){var Ne=et.props,mt=Ne.renderMenuItem,lt=Ne.index;return mt(Te,lt,et.props.subMenuKey)},et}return Object(O.a)(it,[{key:"render",value:function(){var Te=Object(E.a)({},this.props),Ne=Te.className,mt=Ne===void 0?"":Ne,lt=Te.rootPrefixCls,Ct="".concat(lt,"-item-group-title"),bt="".concat(lt,"-item-group-list"),tt=Te.title,St=Te.children;return _e.forEach(function(Lt){return delete Te[Lt]}),delete Te.onClick,delete Te.direction,R.createElement("li",Object.assign({},Te,{className:"".concat(mt," ").concat(lt,"-item-group")}),R.createElement("div",{className:Ct,title:typeof tt=="string"?tt:void 0},tt),R.createElement("ul",{className:bt},R.Children.map(St,this.renderInnerMenuItem)))}}]),it}(R.Component);$e.isMenuItemGroup=!0,$e.defaultProps={disabled:!0};var pt=$e,Ot=function(ht){var it=ht.className,et=ht.rootPrefixCls,Te=ht.style;return R.createElement("li",{className:"".concat(it," ").concat(et,"-item-divider"),style:Te})};Ot.defaultProps={disabled:!0,className:"",style:{}};var kt=Ot,Dt=le.e=xe},"24YM":function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.SensorTabIndex=le.SensorClassName=le.SizeSensorId=void 0;var Z="size-sensor-id";le.SizeSensorId=Z;var Q="size-sensor-object";le.SensorClassName=Q;var O="-1";le.SensorTabIndex=O},"24hK":function(Xe,le,H){"use strict";H.d(le,"a",function(){return Q});class Z{constructor(O){this.element=O,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class Q{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let O=this._first;for(;O!==Z.Undefined;){const K=O.next;O.prev=Z.Undefined,O.next=Z.Undefined,O=K}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(O){return this._insert(O,!1)}push(O){return this._insert(O,!0)}_insert(O,K){const M=new Z(O);if(this._first===Z.Undefined)this._first=M,this._last=M;else if(K){const R=this._last;this._last=M,M.prev=R,R.next=M}else{const R=this._first;this._first=M,M.next=R,R.prev=M}this._size+=1;let B=!1;return()=>{B||(B=!0,this._remove(M))}}shift(){if(this._first===Z.Undefined)return;{const O=this._first.element;return this._remove(this._first),O}}pop(){if(this._last===Z.Undefined)return;{const O=this._last.element;return this._remove(this._last),O}}_remove(O){if(O.prev!==Z.Undefined&&O.next!==Z.Undefined){const K=O.prev;K.next=O.next,O.next.prev=K}else O.prev===Z.Undefined&&O.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):O.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):O.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let O=this._first;for(;O!==Z.Undefined;)yield O.element,O=O.next}}},"2DNl":function(Xe,le,H){var Z=H("IMiH"),Q=H("loD1"),O=H("59Ip"),K=H("aKvl"),M=H("n1HI"),B=H("hX1E"),R=B.normalizeRadian,b=H("Sj9i"),t=H("hyiK"),E=Z.CMD,i=Math.PI*2,A=1e-4;function h(x,D){return Math.abs(x-D)<A}var s=[-1,-1,-1],o=[-1,-1];function f(){var x=o[0];o[0]=o[1],o[1]=x}function l(x,D,w,p,n,d,m,C,y,g){if(g>D&&g>p&&g>d&&g>C||g<D&&g<p&&g<d&&g<C)return 0;var U=b.cubicRootAt(D,p,d,C,g,s);if(U===0)return 0;for(var k=0,I=-1,V,G,L=0;L<U;L++){var $=s[L],Y=$===0||$===1?.5:1,ne=b.cubicAt(x,w,n,m,$);if(ne<y)continue;I<0&&(I=b.cubicExtrema(D,p,d,C,o),o[1]<o[0]&&I>1&&f(),V=b.cubicAt(D,p,d,C,o[0]),I>1&&(G=b.cubicAt(D,p,d,C,o[1]))),I===2?$<o[0]?k+=V<D?Y:-Y:$<o[1]?k+=G<V?Y:-Y:k+=C<G?Y:-Y:$<o[0]?k+=V<D?Y:-Y:k+=C<V?Y:-Y}return k}function c(x,D,w,p,n,d,m,C){if(C>D&&C>p&&C>d||C<D&&C<p&&C<d)return 0;var y=b.quadraticRootAt(D,p,d,C,s);if(y===0)return 0;var g=b.quadraticExtremum(D,p,d);if(g>=0&&g<=1){for(var U=0,k=b.quadraticAt(D,p,d,g),I=0;I<y;I++){var V=s[I]===0||s[I]===1?.5:1,G=b.quadraticAt(x,w,n,s[I]);if(G<m)continue;s[I]<g?U+=k<D?V:-V:U+=d<k?V:-V}return U}else{var V=s[0]===0||s[0]===1?.5:1,G=b.quadraticAt(x,w,n,s[0]);return G<m?0:d<D?V:-V}}function a(x,D,w,p,n,d,m,C){if(C-=D,C>w||C<-w)return 0;var y=Math.sqrt(w*w-C*C);s[0]=-y,s[1]=y;var g=Math.abs(p-n);if(g<1e-4)return 0;if(g%i<1e-4){p=0,n=i;var U=d?1:-1;return m>=s[0]+x&&m<=s[1]+x?U:0}if(d){var y=p;p=R(n),n=R(y)}else p=R(p),n=R(n);p>n&&(n+=i);for(var k=0,I=0;I<2;I++){var V=s[I];if(V+x>m){var G=Math.atan2(C,V),U=d?1:-1;G<0&&(G=i+G),(G>=p&&G<=n||G+i>=p&&G+i<=n)&&(G>Math.PI/2&&G<Math.PI*1.5&&(U=-U),k+=U)}}return k}function u(x,D,w,p,n){for(var d=0,m=0,C=0,y=0,g=0,U=0;U<x.length;){var k=x[U++];k===E.M&&U>1&&(w||(d+=t(m,C,y,g,p,n))),U===1&&(m=x[U],C=x[U+1],y=m,g=C);switch(k){case E.M:y=x[U++],g=x[U++],m=y,C=g;break;case E.L:if(w){if(Q.containStroke(m,C,x[U],x[U+1],D,p,n))return!0}else d+=t(m,C,x[U],x[U+1],p,n)||0;m=x[U++],C=x[U++];break;case E.C:if(w){if(O.containStroke(m,C,x[U++],x[U++],x[U++],x[U++],x[U],x[U+1],D,p,n))return!0}else d+=l(m,C,x[U++],x[U++],x[U++],x[U++],x[U],x[U+1],p,n)||0;m=x[U++],C=x[U++];break;case E.Q:if(w){if(K.containStroke(m,C,x[U++],x[U++],x[U],x[U+1],D,p,n))return!0}else d+=c(m,C,x[U++],x[U++],x[U],x[U+1],p,n)||0;m=x[U++],C=x[U++];break;case E.A:var I=x[U++],V=x[U++],G=x[U++],L=x[U++],$=x[U++],Y=x[U++];U+=1;var ne=1-x[U++],se=Math.cos($)*G+I,_e=Math.sin($)*L+V;U>1?d+=t(m,C,se,_e,p,n):(y=se,g=_e);var ve=(p-I)*L/G+I;if(w){if(M.containStroke(I,V,L,$,$+Y,ne,D,ve,n))return!0}else d+=a(I,V,L,$,$+Y,ne,ve,n);m=Math.cos($+Y)*G+I,C=Math.sin($+Y)*L+V;break;case E.R:y=m=x[U++],g=C=x[U++];var Ce=x[U++],De=x[U++],se=y+Ce,_e=g+De;if(w){if(Q.containStroke(y,g,se,g,D,p,n)||Q.containStroke(se,g,se,_e,D,p,n)||Q.containStroke(se,_e,y,_e,D,p,n)||Q.containStroke(y,_e,y,g,D,p,n))return!0}else d+=t(se,g,se,_e,p,n),d+=t(y,_e,y,g,p,n);break;case E.Z:if(w){if(Q.containStroke(m,C,y,g,D,p,n))return!0}else d+=t(m,C,y,g,p,n);m=y,C=g;break}}return!w&&!h(C,g)&&(d+=t(m,C,y,g,p,n)||0),d!==0}function v(x,D,w){return u(x,0,!1,D,w)}function T(x,D,w,p){return u(x,D,!0,w,p)}le.contain=v,le.containStroke=T},"2fw6":function(Xe,le,H){var Z=H("y+Vt"),Q=Z.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(O,K,M){M&&O.moveTo(K.cx+K.r,K.cy),O.arc(K.cx,K.cy,K.r,0,Math.PI*2,!0)}});Xe.exports=Q},"3/fG":function(Xe,le,H){"use strict";H.d(le,"a",function(){return Q});function Z(O,K){let M;return K.length===0?M=O:M=O.replace(/\{(\d+)\}/g,function(B,R){const b=R[0];return typeof K[b]!="undefined"?K[b]:B}),M}function Q(O,K,...M){return Z(K,M)}},"3C/r":function(Xe,le){var H=function(Q,O){this.image=Q,this.repeat=O,this.type="pattern"};H.prototype.getCanvasPattern=function(Q){return Q.createPattern(this.image,this.repeat||"repeat")};var Z=H;Xe.exports=Z},"3CBa":function(Xe,le,H){var Z=H("hydK"),Q=Z.createElement,O=H("bYtY"),K=H("SUKs"),M=H("y+Vt"),B=H("Dagg"),R=H("dqUG"),b=H("DBLp"),t=H("sW+o"),E=H("n6Mw"),i=H("vKoX"),A=H("P47w"),h=A.path,s=A.image,o=A.text;function f(n){return parseInt(n,10)}function l(n){return n instanceof M?h:n instanceof B?s:n instanceof R?o:h}function c(n,d){return d&&n&&d.parentNode!==n}function a(n,d,m){if(c(n,d)&&m){var C=m.nextSibling;C?n.insertBefore(d,C):n.appendChild(d)}}function u(n,d){if(c(n,d)){var m=n.firstChild;m?n.insertBefore(d,m):n.appendChild(d)}}function v(n,d){d&&n&&d.parentNode===n&&n.removeChild(d)}function T(n){return n.__textSvgEl}function x(n){return n.__svgEl}var D=function(n,d,m,C){this.root=n,this.storage=d,this._opts=m=O.extend({},m||{});var y=Q("svg");y.setAttribute("xmlns","http://www.w3.org/2000/svg"),y.setAttribute("version","1.1"),y.setAttribute("baseProfile","full"),y.style.cssText="user-select:none;position:absolute;left:0;top:0;";var g=Q("g");y.appendChild(g);var U=Q("g");y.appendChild(U),this.gradientManager=new t(C,U),this.clipPathManager=new E(C,U),this.shadowManager=new i(C,U);var k=document.createElement("div");k.style.cssText="overflow:hidden;position:relative",this._svgDom=y,this._svgRoot=U,this._backgroundRoot=g,this._viewport=k,n.appendChild(k),k.appendChild(y),this.resize(m.width,m.height),this._visibleList=[]};D.prototype={constructor:D,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var n=this.getViewportRoot();if(n)return{offsetLeft:n.offsetLeft||0,offsetTop:n.offsetTop||0}},refresh:function(){var n=this.storage.getDisplayList(!0);this._paintList(n)},setBackgroundColor:function(n){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var d=Q("rect");d.setAttribute("width",this.getWidth()),d.setAttribute("height",this.getHeight()),d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("id",0),d.style.fill=n,this._backgroundRoot.appendChild(d),this._backgroundNode=d},_paintList:function(n){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var d=this._svgRoot,m=this._visibleList,C=n.length,y=[],g;for(g=0;g<C;g++){var U=n[g],k=l(U),I=x(U)||T(U);U.invisible||(U.__dirty&&(k&&k.brush(U),this.clipPathManager.update(U),U.style&&(this.gradientManager.update(U.style.fill),this.gradientManager.update(U.style.stroke),this.shadowManager.update(I,U)),U.__dirty=!1),y.push(U))}var V=b(m,y),G;for(g=0;g<V.length;g++){var L=V[g];if(L.removed)for(var $=0;$<L.count;$++){var U=m[L.indices[$]],I=x(U),Y=T(U);v(d,I),v(d,Y)}}for(g=0;g<V.length;g++){var L=V[g];if(L.added)for(var $=0;$<L.count;$++){var U=y[L.indices[$]],I=x(U),Y=T(U);G?a(d,I,G):u(d,I),I?a(d,Y,I):G?a(d,Y,G):u(d,Y),a(d,Y,I),G=Y||I||G,this.gradientManager.addWithoutUpdate(I||Y,U),this.shadowManager.addWithoutUpdate(I||Y,U),this.clipPathManager.markUsed(U)}else if(!L.removed)for(var $=0;$<L.count;$++){var U=y[L.indices[$]],I=x(U),Y=T(U),I=x(U),Y=T(U);this.gradientManager.markUsed(U),this.gradientManager.addWithoutUpdate(I||Y,U),this.shadowManager.markUsed(U),this.shadowManager.addWithoutUpdate(I||Y,U),this.clipPathManager.markUsed(U),Y&&a(d,Y,I),G=I||Y||G}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=y},_getDefs:function(n){var d=this._svgDom,m=d.getElementsByTagName("defs");if(m.length===0)if(n){var m=d.insertBefore(Q("defs"),d.firstChild);return m.contains||(m.contains=function(y){var g=m.children;if(!g)return!1;for(var U=g.length-1;U>=0;--U)if(g[U]===y)return!0;return!1}),m}else return null;else return m[0]},resize:function(n,d){var m=this._viewport;m.style.display="none";var C=this._opts;if(n!=null&&(C.width=n),d!=null&&(C.height=d),n=this._getSize(0),d=this._getSize(1),m.style.display="",this._width!==n||this._height!==d){this._width=n,this._height=d;var y=m.style;y.width=n+"px",y.height=d+"px";var g=this._svgDom;g.setAttribute("width",n),g.setAttribute("height",d)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",n),this._backgroundNode.setAttribute("height",d))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(n){var d=this._opts,m=["width","height"][n],C=["clientWidth","clientHeight"][n],y=["paddingLeft","paddingTop"][n],g=["paddingRight","paddingBottom"][n];if(d[m]!=null&&d[m]!=="auto")return parseFloat(d[m]);var U=this.root,k=document.defaultView.getComputedStyle(U);return(U[C]||f(k[m])||f(U.style[m]))-(f(k[y])||0)-(f(k[g])||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 n=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+n}};function w(n){return function(){K('In SVG mode painter not support method "'+n+'"')}}O.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(n){D.prototype[n]=w(n)});var p=D;Xe.exports=p},"3e3G":function(Xe,le,H){var Z=H("bYtY"),Q=H("QuXc"),O=function(M,B,R,b,t){this.x=M==null?.5:M,this.y=B==null?.5:B,this.r=R==null?.5:R,this.type="radial",this.global=t||!1,Q.call(this,b)};O.prototype={constructor:O},Z.inherits(O,Q);var K=O;Xe.exports=K},"3gBT":function(Xe,le){var H=2311;function Z(){return H++}Xe.exports=Z},"49sm":function(Xe,le){var H={}.toString;Xe.exports=Array.isArray||function(Z){return H.call(Z)=="[object Array]"}},"4fz+":function(Xe,le,H){var Z=H("bYtY"),Q=H("1bdT"),O=H("mFDi"),K=function(B){B=B||{},Q.call(this,B);for(var R in B)B.hasOwnProperty(R)&&(this[R]=B[R]);this._children=[],this.__storage=null,this.__dirty=!0};K.prototype={constructor:K,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(B){return this._children[B]},childOfName:function(B){for(var R=this._children,b=0;b<R.length;b++)if(R[b].name===B)return R[b]},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,R){if(B&&B!==this&&B.parent!==this&&R&&R.parent===this){var b=this._children,t=b.indexOf(R);t>=0&&(b.splice(t,0,B),this._doAdd(B))}return this},_doAdd:function(B){B.parent&&B.parent.remove(B),B.parent=this;var R=this.__storage,b=this.__zr;R&&R!==B.__storage&&(R.addToStorage(B),B instanceof K&&B.addChildrenToStorage(R)),b&&b.refresh()},remove:function(B){var R=this.__zr,b=this.__storage,t=this._children,E=Z.indexOf(t,B);return E<0?this:(t.splice(E,1),B.parent=null,b&&(b.delFromStorage(B),B instanceof K&&B.delChildrenFromStorage(b)),R&&R.refresh(),this)},removeAll:function(){var B=this._children,R=this.__storage,b,t;for(t=0;t<B.length;t++)b=B[t],R&&(R.delFromStorage(b),b instanceof K&&b.delChildrenFromStorage(R)),b.parent=null;return B.length=0,this},eachChild:function(B,R){for(var b=this._children,t=0;t<b.length;t++){var E=b[t];B.call(R,E,t)}return this},traverse:function(B,R){for(var b=0;b<this._children.length;b++){var t=this._children[b];B.call(R,t),t.type==="group"&&t.traverse(B,R)}return this},addChildrenToStorage:function(B){for(var R=0;R<this._children.length;R++){var b=this._children[R];B.addToStorage(b),b instanceof K&&b.addChildrenToStorage(B)}},delChildrenFromStorage:function(B){for(var R=0;R<this._children.length;R++){var b=this._children[R];B.delFromStorage(b),b instanceof K&&b.delChildrenFromStorage(B)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(B){for(var R=null,b=new O(0,0,0,0),t=B||this._children,E=[],i=0;i<t.length;i++){var A=t[i];if(A.ignore||A.invisible)continue;var h=A.getBoundingRect(),s=A.getLocalTransform(E);s?(b.copy(h),b.applyTransform(s),R=R||b.clone(),R.union(b)):(R=R||h.clone(),R.union(h))}return R||b}},Z.inherits(K,Q);var M=K;Xe.exports=M},"4mN7":function(Xe,le,H){var Z=H("QBsz"),Q=H("Sj9i"),O=Math.min,K=Math.max,M=Math.sin,B=Math.cos,R=Math.PI*2,b=Z.create(),t=Z.create(),E=Z.create();function i(c,a,u){if(c.length===0)return;var v=c[0],T=v[0],x=v[0],D=v[1],w=v[1],p;for(p=1;p<c.length;p++)v=c[p],T=O(T,v[0]),x=K(x,v[0]),D=O(D,v[1]),w=K(w,v[1]);a[0]=T,a[1]=D,u[0]=x,u[1]=w}function A(c,a,u,v,T,x){T[0]=O(c,u),T[1]=O(a,v),x[0]=K(c,u),x[1]=K(a,v)}var h=[],s=[];function o(c,a,u,v,T,x,D,w,p,n){var d=Q.cubicExtrema,m=Q.cubicAt,C,y=d(c,u,T,D,h);for(p[0]=Infinity,p[1]=Infinity,n[0]=-Infinity,n[1]=-Infinity,C=0;C<y;C++){var g=m(c,u,T,D,h[C]);p[0]=O(g,p[0]),n[0]=K(g,n[0])}for(y=d(a,v,x,w,s),C=0;C<y;C++){var U=m(a,v,x,w,s[C]);p[1]=O(U,p[1]),n[1]=K(U,n[1])}p[0]=O(c,p[0]),n[0]=K(c,n[0]),p[0]=O(D,p[0]),n[0]=K(D,n[0]),p[1]=O(a,p[1]),n[1]=K(a,n[1]),p[1]=O(w,p[1]),n[1]=K(w,n[1])}function f(c,a,u,v,T,x,D,w){var p=Q.quadraticExtremum,n=Q.quadraticAt,d=K(O(p(c,u,T),1),0),m=K(O(p(a,v,x),1),0),C=n(c,u,T,d),y=n(a,v,x,m);D[0]=O(c,T,C),D[1]=O(a,x,y),w[0]=K(c,T,C),w[1]=K(a,x,y)}function l(c,a,u,v,T,x,D,w,p){var n=Z.min,d=Z.max,m=Math.abs(T-x);if(m%R<1e-4&&m>1e-4){w[0]=c-u,w[1]=a-v,p[0]=c+u,p[1]=a+v;return}if(b[0]=B(T)*u+c,b[1]=M(T)*v+a,t[0]=B(x)*u+c,t[1]=M(x)*v+a,n(w,b,t),d(p,b,t),T=T%R,T<0&&(T=T+R),x=x%R,x<0&&(x=x+R),T>x&&!D?x+=R:T<x&&D&&(T+=R),D){var C=x;x=T,T=C}for(var y=0;y<x;y+=Math.PI/2)y>T&&(E[0]=B(y)*u+c,E[1]=M(y)*v+a,n(w,E,w),d(p,E,p))}le.fromPoints=i,le.fromLine=A,le.fromCubic=o,le.fromQuadratic=f,le.fromArc=l},"55Ip":function(Xe,le,H){"use strict";H.d(le,"a",function(){return a});var Z=H("Ty5D"),Q=H("dI71"),O=H("q1tI"),K=H.n(O),M=H("YS25"),B=H("17x9"),R=H.n(B),b=H("wx14"),t=H("zLVn"),E=H("9R94"),i=function(n){Object(Q.a)(d,n);function d(){for(var C,y=arguments.length,g=new Array(y),U=0;U<y;U++)g[U]=arguments[U];return C=n.call.apply(n,[this].concat(g))||this,C.history=Object(M.a)(C.props),C}var m=d.prototype;return m.render=function(){return K.a.createElement(Z.c,{history:this.history,children:this.props.children})},d}(K.a.Component),A=function(n){Object(Q.a)(d,n);function d(){for(var C,y=arguments.length,g=new Array(y),U=0;U<y;U++)g[U]=arguments[U];return C=n.call.apply(n,[this].concat(g))||this,C.history=Object(M.b)(C.props),C}var m=d.prototype;return m.render=function(){return K.a.createElement(Z.c,{history:this.history,children:this.props.children})},d}(K.a.Component),h=function(d,m){return typeof d=="function"?d(m):d},s=function(d,m){return typeof d=="string"?Object(M.c)(d,null,null,m):d},o=function(d){return d},f=K.a.forwardRef;typeof f=="undefined"&&(f=o);function l(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var c=f(function(n,d){var m=n.innerRef,C=n.navigate,y=n.onClick,g=Object(t.a)(n,["innerRef","navigate","onClick"]),U=g.target,k=Object(b.a)({},g,{onClick:function(V){try{y&&y(V)}catch(G){throw V.preventDefault(),G}!V.defaultPrevented&&V.button===0&&(!U||U==="_self")&&!l(V)&&(V.preventDefault(),C())}});return o!==f?k.ref=d||m:k.ref=m,K.a.createElement("a",k)}),a=f(function(n,d){var m=n.component,C=m===void 0?c:m,y=n.replace,g=n.to,U=n.innerRef,k=Object(t.a)(n,["component","replace","to","innerRef"]);return K.a.createElement(Z.e.Consumer,null,function(I){I||Object(E.a)(!1);var V=I.history,G=s(h(g,I.location),I.location),L=G?V.createHref(G):"",$=Object(b.a)({},k,{href:L,navigate:function(){var ne=h(g,I.location),se=y?V.replace:V.push;se(ne)}});return o!==f?$.ref=d||U:$.innerRef=U,K.a.createElement(C,$)})});if(!1)var u,v;var T=function(d){return d},x=K.a.forwardRef;typeof x=="undefined"&&(x=T);function D(){for(var n=arguments.length,d=new Array(n),m=0;m<n;m++)d[m]=arguments[m];return d.filter(function(C){return C}).join(" ")}var w=x(function(n,d){var m=n["aria-current"],C=m===void 0?"page":m,y=n.activeClassName,g=y===void 0?"active":y,U=n.activeStyle,k=n.className,I=n.exact,V=n.isActive,G=n.location,L=n.sensitive,$=n.strict,Y=n.style,ne=n.to,se=n.innerRef,_e=Object(t.a)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return K.a.createElement(Z.e.Consumer,null,function(ve){ve||Object(E.a)(!1);var Ce=G||ve.location,De=s(h(ne,Ce),Ce),Qe=De.pathname,Se=Qe&&Qe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Ie=Se?Object(Z.f)(Ce.pathname,{path:Se,exact:I,sensitive:L,strict:$}):null,Je=!!(V?V(Ie,Ce):Ie),Et=Je?D(k,g):k,Le=Je?Object(b.a)({},Y,{},U):Y,je=Object(b.a)({"aria-current":Je&&C||null,className:Et,style:Le,to:De},_e);return T!==x?je.ref=d||se:je.innerRef=se,K.a.createElement(a,je)})});if(!1)var p},"59Ip":function(Xe,le,H){var Z=H("Sj9i");function Q(O,K,M,B,R,b,t,E,i,A,h){if(i===0)return!1;var s=i;if(h>K+s&&h>B+s&&h>b+s&&h>E+s||h<K-s&&h<B-s&&h<b-s&&h<E-s||A>O+s&&A>M+s&&A>R+s&&A>t+s||A<O-s&&A<M-s&&A<R-s&&A<t-s)return!1;var o=Z.cubicProjectPoint(O,K,M,B,R,b,t,E,A,h,null);return o<=s/2}le.containStroke=Q},"5VLF":function(Xe,le,H){"use strict";var Z,Q;function O(K,M,B){var R=function(b,t){return K.js_beautify(b,t)};return R.js=K.js_beautify,R.css=M.css_beautify,R.html=B.html_beautify,R.js_beautify=K.js_beautify,R.css_beautify=M.css_beautify,R.html_beautify=B.html_beautify,R}!(Z=[H("6UM0"),H("TXwP"),H("psGv")],Q=function(K,M,B){return O(K,M,B)}.apply(le,Z),Q!==void 0&&(Xe.exports=Q))},"5Y4S":function(Xe,le,H){"use strict";H.d(le,"a",function(){return O});var Z=H("MNsG");const Q=Z.b.performance&&typeof Z.b.performance.now=="function";class O{constructor(K){this._highResolution=Q&&K,this._startTime=this._now(),this._stopTime=-1}static create(K=!0){return new O(K)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Z.b.performance.now():Date.now()}}},"5gs/":function(Xe,le,H){"use strict";H.r(le);var Z=H("cWXX"),Q=H("/ezw"),O=H("g9YV"),K=H("wCAj"),M=H("/zsF"),B=H("PArb"),R=H("14J3"),b=H("BMrR"),t=H("+L6B"),E=H("2/Rp"),i=H("jCWc"),A=H("kPKH"),h=H("sPJy"),s=H("bE4q"),o=H("miYZ"),f=H("tsqr"),l=H("2qtc"),c=H("kLXV"),a=H("9og8"),u=H("Pv/L"),v=H("k1fw"),T=H("tJVT"),x=H("PpiC"),D=H("WmNS"),w=H.n(D),p=H("q1tI"),n=H.n(p),d=H("wd/R"),m=H.n(d),C=H("xOOu"),y=H.n(C),g=H("Ty5D"),U=H("9kvl"),k=H("55Ip"),I=H("jhfD"),V=H("CTES"),G=H("RCxd"),L=H("/MfK"),$=H("m3rI"),Y=H("xKgJ"),ne=H("1vsH"),se=H("cVA7"),_e=H.n(se),ve=H("z9Ch"),Ce=H.n(ve),De={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},Qe=function(Oe){var Fe,$e,pt,Ot,kt,Dt=Oe.shixunHomeworks,Bt=Oe.globalSetting,ht=Oe.loading,it=Oe.dispatch,et=Object(g.i)(),Te=Object(g.h)(),Ne=Object(p.useState)([]),mt=Object(T.a)(Ne,2),lt=mt[0],Ct=mt[1],bt=Object(p.useState)(Te.query.tabs||0),tt=Object(T.a)(bt,2),St=tt[0],Lt=tt[1],Tt=Dt.shixunWorkReport,Ht=((Fe=Tt.echart_data)===null||Fe===void 0?void 0:Fe.efficiency_list.length)-parseInt(($e=Tt.echart_data)===null||$e===void 0?void 0:$e.myself_eff[0]),gr=function(){var jt,Mr,br;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(Ar){if(Ar.name===Tt.username){var Sr;return"\u59D3\u540D\uFF1A"+Tt.username+"<br/>\u5B66\u53F7\uFF1A "+Tt.user_id+"<br/>\u6548\u7387\uFF1A"+((Sr=Tt.echart_data)===null||Sr===void 0?void 0:Sr.myself_eff[1])}else return Ar.name+":"+Ar.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:(jt=Tt.echart_data)===null||jt===void 0?void 0:jt.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:Tt.username,xAxis:Ht,yAxis:(Mr=Tt.echart_data)===null||Mr===void 0?void 0:Mr.myself_eff[1],value:(br=Tt.echart_data)===null||br===void 0?void 0:br.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},Or=function(){var jt,Mr,br,Tr;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(Sr){var tn=Sr.value;if(Sr.name===Tt.username){var Zr;return"\u59D3\u540D\uFF1A"+Tt.username+"<br/>\u5B66\u53F7\uFF1A "+Tt.user_id+"<br/>\u5F97\u5206\uFF1A"+((Zr=Tt.echart_data)===null||Zr===void 0?void 0:Zr.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:De,data:(jt=Tt.echart_data)===null||jt===void 0?void 0:jt.consume_list,symbolSize:function(Sr){return Math.round(Sr[2])},markPoint:{data:[{name:Tt.username,xAxis:(Mr=Tt.echart_data)===null||Mr===void 0?void 0:Mr.myself_object[0],yAxis:(br=Tt.echart_data)===null||br===void 0?void 0:br.myself_object[1],value:(Tr=Tt.echart_data)===null||Tr===void 0?void 0:Tr.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return n.a.createElement(n.a.Fragment,null,n.a.createElement("aside",{className:"ml60 pr30"},n.a.createElement(b.a,null,n.a.createElement(A.a,{flex:"800px"},n.a.createElement(_e.a,{style:{width:750,height:580},option:gr()})),n.a.createElement(A.a,{flex:"1"},n.a.createElement("aside",{className:Ce.a.rightInfo},n.a.createElement("ul",null,n.a.createElement("li",null,n.a.createElement("span",null,"\u59D3\u540D")," ",n.a.createElement("span",{className:"ml30"},Tt.username)),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u53F7")," ",n.a.createElement("span",{className:"ml30"},Tt.student_id||"--")),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",n.a.createElement("span",{className:"ml30 c-orange"},(pt=Tt.echart_data)===null||pt===void 0?void 0:pt.myself_eff[1])),n.a.createElement("li",null,n.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",n.a.createElement("span",{className:"ml30 c-orange"},(Ot=Tt.echart_data)===null||Ot===void 0?void 0:Ot.myself_eff[0]))),n.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",n.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",n.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",n.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"))))),n.a.createElement("aside",{className:"ml60 pr30"},n.a.createElement(b.a,null,n.a.createElement(A.a,{flex:"800px"},n.a.createElement(_e.a,{style:{width:750,height:580},option:Or()})),n.a.createElement(A.a,{flex:"1"},n.a.createElement("aside",{className:Ce.a.rightInfo},n.a.createElement("ul",null,n.a.createElement("li",null,n.a.createElement("span",null,"\u59D3\u540D")," ",n.a.createElement("span",{className:"ml30"},Tt.username)),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u53F7")," ",n.a.createElement("span",{className:"ml30"},Tt.student_id||"--")),n.a.createElement("li",null,n.a.createElement("span",null,"\u80FD\u529B")," ",n.a.createElement("span",{className:"ml30 c-orange"},(kt=Tt.echart_data)===null||kt===void 0?void 0:kt.myself_object[1]))),n.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",n.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",n.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",n.a.createElement("br",null)))))))},Se=Object(U.a)(function(Ee){var Oe=Ee.shixunHomeworks,Fe=Ee.loading,$e=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:$e,loading:Fe.effects}})(Qe),Ie=H("giR+"),Je=H("fyUT"),Et=function(Ee){var Oe=Ee.defaultValue,Fe=Ee.onBlur,$e=Ee.max,pt=Ee.className,Ot=pt===void 0?"game-score":pt,kt=Object(p.useState)(Oe),Dt=Object(T.a)(kt,2),Bt=Dt[0],ht=Dt[1];Object(p.useEffect)(function(){ht(Oe)},[Oe]);function it(Te){ht(Te)}function et(){Bt!==Oe&&Fe(Bt>$e?$e:Bt)}return n.a.createElement(Je.a,{max:$e,min:0,className:Ot,value:Bt,onChange:it,onBlur:et})},Le=H("OaEy"),je=H("2fM7"),st=H("ZW9T"),he=H("Ot1p"),ie=H("1eJ8"),oe=H.n(ie),ee=je.a.Option,de={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},we;(function(Ee){Ee[Ee.SET_PATH=0]="SET_PATH",Ee[Ee.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(we||(we={}));function Be(Ee,Oe){switch(Oe.type){case we.SET_PATH:return Object(v.a)(Object(v.a)({},Ee),{},{selectedPath:Oe.payload});case we.GET_PASSED_CONTENT:return Object(v.a)(Object(v.a)({},Ee),{},{passedContent:Oe.payload});default:throw new Error}}var nt=function(Ee){var Oe,Fe,$e,pt,Ot=Ee.path,kt=Ee.game_id,Dt=Ee.onPathChange,Bt=Ee.autoHeight,ht=Ee.diff_code_count,it=Ee.data,et=Ee.game_codes_cn,Te=Ot.split("\uFF1B").filter(function(Tt){return!!Tt}),Ne=Object(p.useReducer)(Be,{selectedPath:Te[0],passedContent:{language:"python",content:""}}),mt=Object(T.a)(Ne,2),lt=mt[0],Ct=mt[1],bt=lt.selectedPath,tt=lt.passedContent;function St(Tt){Ct({type:we.SET_PATH,payload:Tt})}var Lt={\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(it,22),n.a.createElement(n.a.Fragment,null,n.a.createElement("h2",null," ",n.a.createElement("span",null,et,et&&n.a.createElement("span",{className:"ml5 font12 c-grey-999"},Lt[et])),ht&&n.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ht),n.a.createElement("span",null,n.a.createElement(je.a,{style:{width:200},value:bt,onChange:St}," ",Te.map(function(Tt){return n.a.createElement(ee,{key:Tt,value:Tt},Tt)})," "))," "),(bt==null?void 0:bt.split(".")[1])==="md"&&n.a.createElement(he.a,{height:300,autoHeight:Bt,defaultValue:(it==null||((Oe=it.filter(function(Tt){return Tt.path===bt}))===null||Oe===void 0||((Fe=Oe[0])===null||Fe===void 0))?void 0:Fe.content)||"",className:oe.a.md}),(bt==null?void 0:bt.split(".")[1])!=="md"&&n.a.createElement(st.b,{height:300,language:tt.language,value:(it==null||(($e=it.filter(function(Tt){return Tt.path===bt}))===null||$e===void 0||((pt=$e[0])===null||pt===void 0))?void 0:pt.content)||"",autoHeight:Bt,theme:"default",options:de}))},at=H("ErOA"),At=function(Oe){var Fe=Oe.shixunHomeworks,$e=Oe.autoHeight,pt=Oe.dispatch,Ot=Fe.shixunWorkReport,kt=Ot.stage_list,Dt=Ot.work_id,Bt=Object(g.i)(),ht=Object(Y.c)(),it=[{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 et(lt,Ct){return Te.apply(this,arguments)}function Te(){return Te=Object(a.a)(w.a.mark(function lt(Ct,bt){var tt,St;return w.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return tt=kt[Ct].challenge_id,Tt.next=3,pt({type:"shixunHomeworks/changeScore",payload:{categoryId:Bt.homeworkId,type:"report",score:bt,challenge_id:tt}});case 3:return St=Tt.sent,Tt.next=6,pt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},Bt)});case 6:St.status===0&&f.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return Tt.stop()}},lt)})),Te.apply(this,arguments)}function Ne(lt,Ct){return Object(at.c)("student_works/".concat(Dt,"/rep_passed_content.json"),{path:Ct,game_id:lt})}var mt=Object(ne.p)(5,Ot.shixun_detail);return n.a.createElement(n.a.Fragment,null,mt==null?void 0:mt.map(function(lt,Ct){return n.a.createElement("div",{key:Ct},lt.map(function(bt,tt){var St;return n.a.createElement("aside",{className:"pl30 pr30",key:tt},n.a.createElement("div",{className:"".concat(Ce.a.shixunTitle," mt10")},n.a.createElement("div",null,n.a.createElement("span",{className:"fa fa-code "}),n.a.createElement("strong",{className:"c-black"},"\u7B2C",Ct*5+tt+1,"\u5173"," ",n.a.createElement(k.a,{className:"c-black",to:"/tasks/".concat(bt.game_identifier)},bt.subject))),ht?n.a.createElement("span",null,"\u8C03\u5206\uFF1A",n.a.createElement(Et,{className:"game-score",max:kt[tt].game_score_full,defaultValue:kt[tt].game_score,onBlur:function(Tt){et(tt,Tt)}})):null),n.a.createElement("div",{className:"font16 mt10"},bt.st===0&&(bt.path?n.a.createElement("aside",{className:Ce.a.shixunWrp},n.a.createElement(nt,{game_codes_cn:bt==null?void 0:bt.game_codes_cn,autoHeight:$e,path:bt.path,game_id:bt.id,data:bt.game_codes,diff_code_count:bt.diff_code_count,onPathChange:Ne})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),bt.st===1&&(bt.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),n.a.createElement("aside",{className:"mt10 font16"},(St=bt.outputs)!==null&&St!==void 0&&St.length?n.a.createElement(K.a,{columns:it,pagination:{hideOnSinglePage:!0},dataSource:bt.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},ft=Object(U.a)(function(Ee){var Oe=Ee.shixunHomeworks,Fe=Ee.loading,$e=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:$e,loading:Fe.effects}})(At),xt=H("5NDa"),It=H("5rEg"),He=H("y8nQ"),ke=H("Vl3Y"),ct=function(Oe){var Fe=Oe.shixunHomeworks,$e=Oe.dispatch,pt=Object(x.a)(Oe,["shixunHomeworks","dispatch"]),Ot=Object(g.i)(),kt=Object(p.useState)(!1),Dt=Object(T.a)(kt,2),Bt=Dt[0],ht=Dt[1],it=ke.a.useForm(),et=Object(T.a)(it,1),Te=et[0];Object(p.useEffect)(function(){var mt,lt,Ct,bt;Fe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Te.setFieldsValue({comment:(mt=Fe.actionTabs.selectArrs)===null||mt===void 0||((lt=mt.data)===null||lt===void 0)?void 0:lt.work_comment,hidden_comment:(Ct=Fe.actionTabs.selectArrs)===null||Ct===void 0||((bt=Ct.data)===null||bt===void 0)?void 0:bt.work_comment_hidden})},[Fe.actionTabs.key]);var Ne=function(){var mt=Object(a.a)(w.a.mark(function lt(){var Ct,bt;return w.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return Ct=Te.getFieldValue(),St.next=3,Object(at.a)("/api/student_works/".concat(Ot.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:Ct.hidden_comment,comment:Ct.comment}});case 3:bt=St.sent,bt.status===0&&(f.b.success("\u8BC4\u9605\u6210\u529F"),Te.resetFields(),$e({type:"shixunHomeworks/setActionTabs",payload:{}}),$e({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},Ot)}));case 5:case"end":return St.stop()}},lt)}));return function(){return mt.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(c.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:Fe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(a.a)(w.a.mark(function mt(){var lt;return w.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:lt=Te.getFieldValue(),JSON.stringify(lt)==="{}"||lt.hidden_comment===""&&lt.comment===""?ht(!0):Ne();case 2:case"end":return bt.stop()}},mt)})),onCancel:function(){$e({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(ke.a,{form:Te,onChange:function(){Bt&&ht(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(ke.a.Item,{name:"comment"},n.a.createElement(It.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(ke.a.Item,{name:"hidden_comment"},n.a.createElement(It.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Bt&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},gt=Object(U.a)(function(Ee){var Oe=Ee.shixunHomeworks;return{shixunHomeworks:Oe}})(ct),Ze=H("Xm8N"),ot=H("9Bee"),Ke=H("XYT7"),Me=H("1n7x"),Ue=H.n(Me),ge=function(Oe){var Fe,$e,pt=Oe.shixunHomeworks,Ot=Oe.globalSetting,kt=Oe.loading,Dt=Oe.dispatch,Bt=Object(x.a)(Oe,["shixunHomeworks","globalSetting","loading","dispatch"]),ht=Object(p.useState)(Object(v.a)({},Object(g.i)())),it=Object(T.a)(ht,2),et=it[0],Te=it[1],Ne=Object(g.i)(),mt=Object(p.useState)([]),lt=Object(u.a)(mt),Ct=Object(p.useState)({last:!1}),bt=Object(T.a)(Ct,2),tt=bt[0],St=bt[1],Lt=Object(p.useState)({last:!1}),Tt=Object(T.a)(Lt,2),Ht=Tt[0],gr=Tt[1],Or=Object(p.useRef)(),vr=Object(p.useRef)(),jt=Object(p.useState)(!1),Mr=Object(T.a)(jt,2),br=Mr[0],Tr=Mr[1],Ar=Object(p.useState)(!1),Sr=Object(T.a)(Ar,2),tn=Sr[0],Zr=Sr[1],me=Object(p.useState)(!1),be=Object(T.a)(me,2),Pe=be[0],rt=be[1],qe=pt.shixunWorkReport,Ft=Object(Y.c)(),te=Object(p.useState)(new y.a),P=Object(T.a)(te,2),j=P[0],q=P[1],Ae=Object(p.useState)(0),re=Object(T.a)(Ae,2),We=re[0],_t=re[1],Pt=Object(p.useState)([]),Qt=Object(T.a)(Pt,2),wt=Qt[0],Yt=Qt[1],Xt=Object(p.useState)(!1),qt=Object(T.a)(Xt,2),cr=qt[0],Dr=qt[1],wr=Object(p.useState)(!1),Fr=Object(T.a)(wr,2),hr=Fr[0],Ur=Fr[1];Object(p.useEffect)(function(){return Dt({type:"globalSetting/footerToggle",payload:!1}),function(){Dt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(p.useEffect)(function(){pt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&wt.length>0&&qr("all")},[wt]),Object(p.useEffect)(function(){Te(Object(v.a)({},Ne))},[Bt.location.pathname]);var Nr=function(){document.body.scrollIntoView()};function cn(){return Gr.apply(this,arguments)}function Gr(){return Gr=Object(a.a)(w.a.mark(function _r(){var dr,tr,nr,Zt,Er,mr,Ir;return w.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),On.next=3,Dt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(v.a)(Object(v.a)({},et),nr)});case 3:Zt=On.sent,Yt(Zt.all_student_works),Er=(dr=Zt.all_student_works)===null||dr===void 0?void 0:dr.map(function(zr){return String(zr.student_work_id)}).indexOf(et.homeworkId),Er===((tr=Zt.all_student_works)===null||tr===void 0?void 0:tr.length)-1?St({last:!0}):St((mr=Zt.all_student_works)===null||mr===void 0?void 0:mr[Er+1]),Er===0?gr({last:!0}):gr((Ir=Zt.all_student_works)===null||Ir===void 0?void 0:Ir[Er-1]);case 8:case"end":return On.stop()}},_r)})),Gr.apply(this,arguments)}var Jr=function(){document.querySelectorAll("canvas").forEach(function(dr){(!dr.clientWidth||!dr.clientHeight)&&dr.remove()})},bn=function(){Or.current.offsetHeight>62e3?rt(!1):rt(!0)},qr=function(){var _r=Object(a.a)(w.a.mark(function dr(tr){var nr,Zt,Er,mr,Ir,xr;return w.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(Ir=function(){return Ir=Object(a.a)(w.a.mark(function Qn(){var _n;return w.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Dt({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:wt[nr].student_work_id}});case 2:_n=Ln.sent,Nr(),nr++,setTimeout(Object(a.a)(w.a.mark(function In(){var Jn,Fn,si,Un,gn,Pn,er;return w.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:Jr(),Fn=j.folder("".concat(_n==null?void 0:_n.username)),si=document.querySelector("#export-all").children,Un=Ue()(),gn=w.a.mark(function yr(Rr){return w.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Un.set(Er).from(si[Rr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var ln=Object(a.a)(w.a.mark(function Dn(Pr){return w.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:if(!(Rr<si.length-1)){Hr.next=3;break}return Hr.next=3,Pr.addPage();case 3:case"end":return Hr.stop()}},Dn)}));return function(Dn){return ln.apply(this,arguments)}}());case 2:case"end":return Br.stop()}},yr)}),Pn=0;case 6:if(!(Pn<si.length)){Jt.next=11;break}return Jt.delegateYield(gn(Pn),"t0",8);case 8:Pn++,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"),_n==null||((Jn=_n.shixun_detail)===null||Jn===void 0)||Jn.map(function(yr,Rr){var Xr,Br=er.folder("\u7B2C".concat(Rr+1,"\u5173-").concat(yr.subject,"-").concat(yr.id));yr==null||((Xr=yr.game_codes)===null||Xr===void 0)||Xr.map(function(ln){Br.file("".concat(ln.filename,".txt"),ln==null?void 0:ln.content)})}),Zt.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr),"/",wt==null?void 0:wt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(wt==null?void 0:wt.length)?(Zt.destroy(),rn()):mr();case 16:case"end":return Jt.stop()}},In)})),2200);case 6:case"end":return Ln.stop()}},Qn)})),Ir.apply(this,arguments)},mr=function(){return Ir.apply(this,arguments)},nr=0,Zt=c.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr+1),"/",tr!=="all"?1:wt==null?void 0:wt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Ce.a.modal,onOk:function(){}}),Er={margin:[0,0],filename:"".concat(qe.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(tr!=="all"||(wt==null?void 0:wt.length)<2)){zr.next=12;break}return zr.delegateYield(w.a.mark(function En(){var Qn,_n,en,Ln,In,Jn,Fn;return w.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:Jr(),Nr(),_n=vr.current.children,en=Ue()(),Ln=j.folder("".concat(qe==null?void 0:qe.username)),In=w.a.mark(function gn(Pn){return w.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,en.set(Er).from(_n[Pn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Jt=Object(a.a)(w.a.mark(function yr(Rr){return w.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(!(Pn<_n.length-1)){Br.next=3;break}return Br.next=3,Rr.addPage();case 3:case"end":return Br.stop()}},yr)}));return function(yr){return Jt.apply(this,arguments)}}());case 2:case"end":return fr.stop()}},gn)}),Jn=0;case 7:if(!(Jn<_n.length)){Un.next=12;break}return Un.delegateYield(In(Jn),"t0",9);case 9:Jn++,Un.next=7;break;case 12:return Tr(!1),Ln.file("".concat(qe.username,".pdf"),en.output("blob"),{base64:!1}),Fn=Ln.folder("\u4EE3\u7801\u6587\u4EF6"),qe==null||((Qn=qe.shixun_detail)===null||Qn===void 0)||Qn.map(function(gn,Pn){var er,fr=Fn.folder("\u7B2C".concat(Pn+1,"\u5173-").concat(gn.subject,"-").concat(gn.id));gn==null||((er=gn.game_codes)===null||er===void 0)||er.map(function(Jt){fr.file("".concat(Jt.filename,".txt"),Jt==null?void 0:Jt.content)})}),Zt.destroy(),rn(),Un.abrupt("return",{v:void 0});case 19:case"end":return Un.stop()}},En)})(),"t0",7);case 7:if(xr=zr.t0,!(typeof xr=="object")){zr.next=10;break}return zr.abrupt("return",xr.v);case 10:zr.next=13;break;case 12:mr();case 13:case"end":return zr.stop()}},dr)}));return function(tr){return _r.apply(this,arguments)}}(),rn=function(){j.generateAsync({type:"blob"}).then(function(dr){var tr=document.createElement("a");tr.href=window.URL.createObjectURL(dr),tr.download=qe.course_name+".zip",document.body.appendChild(tr);var nr=document.createEvent("MouseEvents");nr.initEvent("click",!1,!1),tr.dispatchEvent(nr),document.body.removeChild(tr),q(new y.a)}),rt(!1)};Object(p.useEffect)(function(){sn()},[et.homeworkId]);var sn=function(){var _r=Object(a.a)(w.a.mark(function dr(){return w.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return Zr(!0),nr.next=3,Dt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},et)});case 3:Zr(!1),Object(Y.c)()&&cn();case 5:case"end":return nr.stop()}},dr)}));return function(){return _r.apply(this,arguments)}}(),hn=[{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 n.a.createElement("div",null,dr,tr.complete_status===4&&n.a.createElement(ne.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 n.a.createElement("div",null,n.a.createElement("span",{className:"c-green"},tr.myself_experience),"/",dr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(dr,tr){return n.a.createElement("div",null,n.a.createElement("span",{className:"c-green"},dr),"/",tr.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(dr,tr){return Ft?n.a.createElement(Et,{max:tr.game_score_full,defaultValue:parseFloat(dr),onBlur:function(){var nr=Object(a.a)(w.a.mark(function Zt(Er){var mr;return w.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Dt({type:"shixunHomeworks/changeScore",payload:{categoryId:et.homeworkId,type:"report",score:Er,challenge_id:tr.challenge_id}});case 2:return mr=xr.sent,xr.next=5,Dt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},et)});case 5:mr.status===0&&f.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return xr.stop()}},Zt)}));return function(Zt){return nr.apply(this,arguments)}}()}):dr}}],mn=function(dr){Dt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){dr==="next"?U.d.push("/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/").concat(tt==null?void 0:tt.student_work_id,"/comment")):U.d.push("/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/").concat(Ht==null?void 0:Ht.student_work_id,"/comment"))},200)};return n.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},n.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},n.a.createElement(Q.a,{loading:tn,active:!0,avatar:{size:40},paragraph:{rows:5}},n.a.createElement("div",{className:"edu-container"},qe.course_id&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:""},qe.category&&n.a.createElement(s.a,{separator:">"},n.a.createElement(s.a.Item,null,n.a.createElement(k.a,{to:"/classrooms/".concat(qe.course_id,"/shixun_homework")},qe.course_name)),n.a.createElement(s.a.Item,null,n.a.createElement(k.a,{to:"/classrooms/".concat(qe.course_id,"/shixun_homework/").concat(qe.category.main?"":qe.category.category_id)},qe.category.category_name)),n.a.createElement(s.a.Item,null,n.a.createElement(k.a,{to:"/classrooms/".concat(qe.course_id,"/shixun_homework/").concat(qe.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),n.a.createElement(s.a.Item,null,qe.username))),n.a.createElement("aside",{className:[Ce.a.title1,"mt20"].join(" ")},n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:1},n.a.createElement(k.a,{to:"/classrooms/".concat(qe.course_id,"/shixun_homework/").concat(qe.homework_common_id,"/detail")},n.a.createElement(I.a,{className:"font16 c-black"})),n.a.createElement("strong",{className:"font20 ml5"},qe.shixun_name),n.a.createElement(ne.m,{temporary:!0,status:qe.homework_status})),n.a.createElement(A.a,{className:Ce.a.title1_right},qe.view_tpi&&n.a.createElement(E.a,null,n.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),n.a.createElement(k.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(qe==null||((Fe=qe.shixun_detail)===null||Fe===void 0||(($e=Fe[0])===null||$e===void 0))?void 0:$e.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(Y.c)()&&qe.homework_end===!1&&!!qe.myshixun_id&&n.a.createElement(E.a,{className:"ml10",onClick:Object(a.a)(w.a.mark(function _r(){return w.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,Dt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:qe.myshixun_identifier}}});case 2:case"end":return tr.stop()}},_r)}))},n.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),n.a.createElement(E.a,{className:"ml10",onClick:function(){return qr("")},loading:br},n.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(Y.c)()&&(wt==null?void 0:wt.length)>1&&n.a.createElement(E.a,{className:"ml10",onClick:function(){return qr("all")}},n.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),n.a.createElement("aside",{className:"mt30 relative"})),n.a.createElement("aside",{className:"edu-container bg-white",ref:Or},n.a.createElement("div",{id:"export-all",ref:vr},n.a.createElement("div",{id:"export-all-1"},n.a.createElement("div",{className:Ce.a.title},n.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),n.a.createElement("div",null,Object(Y.c)()&&n.a.createElement(E.a,{className:"mr20",type:"primary",onClick:function(){Dt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:qe.user_id,data:Object(v.a)({},qe)}}})}},n.a.createElement(V.a,null),qe.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),n.a.createElement(B.a,{style:{marginTop:0}}),n.a.createElement(b.a,{className:"pl30 pr30"},n.a.createElement(A.a,null,n.a.createElement("img",{className:Ce.a.userPic,src:"".concat($.a.IMG_SERVER,"/images/").concat(qe.image_url),alt:qe.username})),n.a.createElement(A.a,null,n.a.createElement("span",{className:"font16 ml40"},qe.username),n.a.createElement(ne.g,{status:qe.compelete_status}),n.a.createElement("ul",{className:Ce.a.userInfo},n.a.createElement("li",null,"\u5B66\u53F7\uFF1A",qe.student_id||"--"),n.a.createElement("li",null,"\u5206\u73ED\uFF1A",qe.group_name||"--"),n.a.createElement("br",null),n.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",n.a.createElement("span",{className:"c-red"},qe.complete_count),"/",n.a.createElement("span",{className:"c-red"},qe.challenges_count)),n.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",n.a.createElement("span",{className:"c-red"},qe.current_complete_count||"-"),"/",n.a.createElement("span",{className:"c-red"},qe.challenges_count)),n.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",qe&&qe.efficiency===null?"--":qe&&qe.efficiency),n.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",qe&&qe.max_efficiency===null?"--":qe&&qe.max_efficiency))),n.a.createElement("ul",{className:[Ce.a.listItem,"mt10"].join(" ")},n.a.createElement("li",null,n.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),n.a.createElement("div",{className:"c-light-black mt20"},qe&&qe.passed_time===null||qe&&qe.passed_time==="--"?"--":m()(qe&&qe.passed_time).format("YYYY-MM-DD HH:mm"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",n.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"})),n.a.createElement("div",{className:"c-light-black mt20"},qe==null?void 0:qe.human_training_time_rules)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",n.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Ur(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),n.a.createElement("div",{className:"c-light-black mt20"},qe.time_consuming)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),n.a.createElement("div",{className:"mt20"},qe.evaluate_count)),(qe==null?void 0:qe.eff_score_full)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("li",null,n.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},qe.challenge_score),"/",n.a.createElement("span",{className:"c-light-black"},qe.challenge_score_full))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u6548\u7387\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},qe.eff_score),"/",n.a.createElement("span",{className:"c-light-black"},qe.eff_score_full)))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",null,qe.late_penalty||"- -"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},qe.work_score),"/",n.a.createElement("span",{className:"c-light-black"},qe.all_work_score))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u603B\u8BC4"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},qe.overall_appraisal))))),n.a.createElement(B.a,{style:{margin:0}}),(qe.work_comment_hidden||qe.work_comment)&&n.a.createElement("div",null,n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:1},n.a.createElement("h1",{className:Ce.a.title},"\u70B9\u8BC4\u5185\u5BB9")),n.a.createElement(A.a,{className:"pr30"},Object(Y.c)()&&n.a.createElement(E.a,{onClick:Object(a.a)(w.a.mark(function _r(){return w.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:c.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:n.a.createElement(G.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(a.a)(w.a.mark(function Zt(){var Er;return w.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(Ke.m)({comment_id:qe.comment_id,homeworkId:et.homeworkId});case 2:Er=Ir.sent,Er.status===0&&(f.b.success("\u5220\u9664\u6210\u529F"),Dt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},et)}));case 4:case"end":return Ir.stop()}},Zt)}))()}});case 1:case"end":return tr.stop()}},_r)}))},n.a.createElement(L.a,null),"\u5220\u9664"))),n.a.createElement(B.a,{style:{margin:0}}),qe.work_comment&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(ot.a,{value:qe.work_comment})),qe.work_comment_hidden&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(ot.a,{value:qe.work_comment_hidden}))),n.a.createElement("h1",{className:Ce.a.title},"\u9636\u6BB5\u6210\u7EE9"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(K.a,{dataSource:qe.stage_list,pagination:!1,columns:hn})),(qe==null?void 0:qe.work_description)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h1",{className:Ce.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(ot.a,{value:qe==null?void 0:qe.work_description}))),n.a.createElement("h1",{className:Ce.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),n.a.createElement(Se,null),n.a.createElement("h1",{className:Ce.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),n.a.createElement(ft,{autoHeight:Pe}))),Object(Y.c)()&&n.a.createElement("aside",{className:"".concat(Ce.a.footerBar," ").concat(br?Ce.a.footerBarStatic:"")},n.a.createElement("aside",{className:"edu-container"},n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:"1"},n.a.createElement(k.a,{className:Ce.a.exitComment,to:"/classrooms/".concat(et.coursesId,"/shixun_homework/").concat(et.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),n.a.createElement(A.a,{flex:"1",className:"tr"},n.a.createElement(E.a,{type:"default",disabled:Ht==null?void 0:Ht.last,onClick:function(){return mn()}},"\u4E0A\u4E00\u4E2A"),n.a.createElement(E.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:tt==null?void 0:tt.last,onClick:function(){return mn("next")}},"\u4E0B\u4E00\u4E2A"),Object(Y.c)()&&n.a.createElement(E.a,{type:"primary",onClick:Object(a.a)(w.a.mark(function _r(){return w.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:Dt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:qe.user_id,data:Object(v.a)({},qe)}}});case 1:case"end":return tr.stop()}},_r)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),n.a.createElement(gt,null),n.a.createElement(Ze.a,null),n.a.createElement(c.a,{visible:cr,width:860,centered:!0,onCancel:function(){Dr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},n.a.createElement("div",{style:{color:"#333333",fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement("br",null),n.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"),n.a.createElement("br",null),n.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"),n.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"," "),n.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")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement("br",null),n.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"," "),n.a.createElement("br",null),n.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"),n.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"," "),n.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"),n.a.createElement("br",null),n.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")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),n.a.createElement("br",null),n.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")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),n.a.createElement("br",null),n.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"))),n.a.createElement(c.a,{visible:hr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Ur(!1)},width:600},n.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},n.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.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"),n.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.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"),n.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.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"))))},xe=le.default=Object(U.a)(function(Ee){var Oe=Ee.shixunHomeworks,Fe=Ee.loading,$e=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:$e,loading:Fe.effects}})(ge)},"6+eU":function(Xe,le,H){"use strict";H.d(le,"a",function(){return x});var Z=H("wx14"),Q=H("rePB"),O=H("VTBJ"),K=H("1OyB"),M=H("vuIU"),B=H("Ji7U"),R=H("LK+K"),b=H("q1tI"),t=H.n(b),E=H("TSYQ"),i=H.n(E),A=function(w){var p,n="".concat(w.rootPrefixCls,"-item"),d=i()(n,"".concat(n,"-").concat(w.page),(p={},Object(Q.a)(p,"".concat(n,"-active"),w.active),Object(Q.a)(p,w.className,!!w.className),Object(Q.a)(p,"".concat(n,"-disabled"),!w.page),p)),m=function(){w.onClick(w.page)},C=function(g){w.onKeyPress(g,w.onClick,w.page)};return t.a.createElement("li",{title:w.showTitle?w.page:null,className:d,onClick:m,onKeyPress:C,tabIndex:"0"},w.itemRender(w.page,"page",t.a.createElement("a",{rel:"nofollow"},w.page)))},h=A,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(D){Object(B.a)(p,D);var w=Object(R.a)(p);function p(){var n;Object(K.a)(this,p);for(var d=arguments.length,m=new Array(d),C=0;C<d;C++)m[C]=arguments[C];return n=w.call.apply(w,[this].concat(m)),n.state={goInputText:""},n.buildOptionText=function(y){return"".concat(y," ").concat(n.props.locale.items_per_page)},n.changeSize=function(y){n.props.changeSize(Number(y))},n.handleChange=function(y){n.setState({goInputText:y.target.value})},n.handleBlur=function(y){var g=n.props,U=g.goButton,k=g.quickGo,I=g.rootPrefixCls,V=n.state.goInputText;if(U||V==="")return;if(y.relatedTarget&&(y.relatedTarget.className.indexOf("".concat(I,"-prev"))>=0||y.relatedTarget.className.indexOf("".concat(I,"-next"))>=0))return;n.setState({goInputText:""}),k(n.getValidValue())},n.go=function(y){var g=n.state.goInputText;if(g==="")return;(y.keyCode===s.ENTER||y.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(M.a)(p,[{key:"getValidValue",value:function(){var d=this.state,m=d.goInputText,C=d.current;return!m||isNaN(m)?C:Number(m)}},{key:"getPageSizeOptions",value:function(){var d=this.props,m=d.pageSize,C=d.pageSizeOptions;return C.some(function(y){return y.toString()===m.toString()})?C:C.concat([m.toString()]).sort(function(y,g){var U=isNaN(Number(y))?0:Number(y),k=isNaN(Number(g))?0:Number(g);return U-k})}},{key:"render",value:function(){var d=this,m=this.props,C=m.pageSize,y=m.locale,g=m.rootPrefixCls,U=m.changeSize,k=m.quickGo,I=m.goButton,V=m.selectComponentClass,G=m.buildOptionText,L=m.selectPrefixCls,$=m.disabled,Y=this.state.goInputText,ne="".concat(g,"-options"),se=V,_e=null,ve=null,Ce=null;if(!U&&!k)return null;var De=this.getPageSizeOptions();if(U&&se){var Qe=De.map(function(Se,Ie){return t.a.createElement(se.Option,{key:Ie,value:Se.toString()},(G||d.buildOptionText)(Se))});_e=t.a.createElement(se,{disabled:$,prefixCls:L,showSearch:!1,className:"".concat(ne,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||De[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ie){return Ie.parentNode}},Qe)}return k&&(I&&(Ce=typeof I=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:$,className:"".concat(ne,"-quick-jumper-button")},y.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},I)),ve=t.a.createElement("div",{className:"".concat(ne,"-quick-jumper")},y.jump_to,t.a.createElement("input",{disabled:$,type:"text",value:Y,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),y.page,Ce)),t.a.createElement("li",{className:"".concat(ne)},_e,ve)}}]),p}(t.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=o,l=H("N2Kk");function c(){}function a(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function u(D,w,p){return p}function v(D,w,p){var n=typeof D=="undefined"?w.pageSize:D;return Math.floor((p.total-1)/n)+1}var T=function(D){Object(B.a)(p,D);var w=Object(R.a)(p);function p(n){var d;Object(K.a)(this,p),d=w.call(this,n),d.getJumpPrevPage=function(){return Math.max(1,d.state.current-(d.props.showLessItems?3:5))},d.getJumpNextPage=function(){return Math.min(v(void 0,d.state,d.props),d.state.current+(d.props.showLessItems?3:5))},d.getItemIcon=function(U,k){var I=d.props.prefixCls,V=U||t.a.createElement("button",{type:"button","aria-label":k,className:"".concat(I,"-item-link")});return typeof U=="function"&&(V=t.a.createElement(U,Object(O.a)({},d.props))),V},d.savePaginationNode=function(U){d.paginationNode=U},d.isValid=function(U){return a(U)&&U!==d.state.current},d.shouldDisplayQuickJumper=function(){var U=d.props,k=U.showQuickJumper,I=U.pageSize,V=U.total;return V<=I?!1:k},d.handleKeyDown=function(U){(U.keyCode===s.ARROW_UP||U.keyCode===s.ARROW_DOWN)&&U.preventDefault()},d.handleKeyUp=function(U){var k=d.getValidValue(U),I=d.state.currentInputValue;k!==I&&d.setState({currentInputValue:k}),U.keyCode===s.ENTER?d.handleChange(k):U.keyCode===s.ARROW_UP?d.handleChange(k-1):U.keyCode===s.ARROW_DOWN&&d.handleChange(k+1)},d.changePageSize=function(U){var k=d.state.current,I=v(U,d.state,d.props);k=k>I?I:k,I===0&&(k=d.state.current),typeof U=="number"&&("pageSize"in d.props||d.setState({pageSize:U}),"current"in d.props||d.setState({current:k,currentInputValue:k})),d.props.onShowSizeChange(k,U),"onChange"in d.props&&d.props.onChange&&d.props.onChange(k,U)},d.handleChange=function(U){var k=d.props.disabled,I=U;if(d.isValid(I)&&!k){var V=v(void 0,d.state,d.props);I>V?I=V:I<1&&(I=1),"current"in d.props||d.setState({current:I,currentInputValue:I});var G=d.state.pageSize;return d.props.onChange(I,G),I}return d.state.current},d.prev=function(){d.hasPrev()&&d.handleChange(d.state.current-1)},d.next=function(){d.hasNext()&&d.handleChange(d.state.current+1)},d.jumpPrev=function(){d.handleChange(d.getJumpPrevPage())},d.jumpNext=function(){d.handleChange(d.getJumpNextPage())},d.hasPrev=function(){return d.state.current>1},d.hasNext=function(){return d.state.current<v(void 0,d.state,d.props)},d.runIfEnter=function(U,k){if(U.key==="Enter"||U.charCode===13){for(var I=arguments.length,V=new Array(I>2?I-2:0),G=2;G<I;G++)V[G-2]=arguments[G];k.apply(void 0,V)}},d.runIfEnterPrev=function(U){d.runIfEnter(U,d.prev)},d.runIfEnterNext=function(U){d.runIfEnter(U,d.next)},d.runIfEnterJumpPrev=function(U){d.runIfEnter(U,d.jumpPrev)},d.runIfEnterJumpNext=function(U){d.runIfEnter(U,d.jumpNext)},d.handleGoTO=function(U){(U.keyCode===s.ENTER||U.type==="click")&&d.handleChange(d.state.currentInputValue)};var m=n.onChange!==c,C="current"in n;C&&!m&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var y=n.defaultCurrent;"current"in n&&(y=n.current);var g=n.defaultPageSize;return"pageSize"in n&&(g=n.pageSize),y=Math.min(y,v(g,void 0,n)),d.state={current:y,currentInputValue:y,pageSize:g},d}return Object(M.a)(p,[{key:"componentDidUpdate",value:function(d,m){var C=this.props.prefixCls;if(m.current!==this.state.current&&this.paginationNode){var y=this.paginationNode.querySelector(".".concat(C,"-item-").concat(m.current));y&&document.activeElement===y&&y.blur()}}},{key:"getValidValue",value:function(d){var m=d.target.value,C=v(void 0,this.state,this.props),y=this.state.currentInputValue,g;return m===""?g=m:isNaN(Number(m))?g=y:m>=C?g=C:g=Number(m),g}},{key:"getShowSizeChanger",value:function(){var d=this.props,m=d.showSizeChanger,C=d.total,y=d.totalBoundaryShowSizeChanger;return typeof m!="undefined"?m:C>y}},{key:"renderPrev",value:function(d){var m=this.props,C=m.prevIcon,y=m.itemRender,g=y(d,"prev",this.getItemIcon(C,"prev page")),U=!this.hasPrev();return Object(b.isValidElement)(g)?Object(b.cloneElement)(g,{disabled:U}):g}},{key:"renderNext",value:function(d){var m=this.props,C=m.nextIcon,y=m.itemRender,g=y(d,"next",this.getItemIcon(C,"next page")),U=!this.hasNext();return Object(b.isValidElement)(g)?Object(b.cloneElement)(g,{disabled:U}):g}},{key:"render",value:function(){var d=this,m=this.props,C=m.prefixCls,y=m.className,g=m.style,U=m.disabled,k=m.hideOnSinglePage,I=m.total,V=m.locale,G=m.showQuickJumper,L=m.showLessItems,$=m.showTitle,Y=m.showTotal,ne=m.simple,se=m.itemRender,_e=m.showPrevNextJumpers,ve=m.jumpPrevIcon,Ce=m.jumpNextIcon,De=m.selectComponentClass,Qe=m.selectPrefixCls,Se=m.pageSizeOptions,Ie=this.state,Je=Ie.current,Et=Ie.pageSize,Le=Ie.currentInputValue;if(k===!0&&I<=Et)return null;var je=v(void 0,this.state,this.props),st=[],he=null,ie=null,oe=null,ee=null,de=null,we=G&&G.goButton,Be=L?1:2,nt=Je-1>0?Je-1:0,at=Je+1<je?Je+1:je,At=Object.keys(this.props).reduce(function(ge,xe){return(xe.substr(0,5)==="data-"||xe.substr(0,5)==="aria-"||xe==="role")&&(ge[xe]=d.props[xe]),ge},{});if(ne)return we&&(typeof we=="boolean"?de=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},V.jump_to_confirm):de=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},we),de=t.a.createElement("li",{title:$?"".concat(V.jump_to).concat(Je,"/").concat(je):null,className:"".concat(C,"-simple-pager")},de)),t.a.createElement("ul",Object(Z.a)({className:i()(C,"".concat(C,"-simple"),Object(Q.a)({},"".concat(C,"-disabled"),U),y),style:g,ref:this.savePaginationNode},At),t.a.createElement("li",{title:$?V.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(C,"-prev"),Object(Q.a)({},"".concat(C,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(nt)),t.a.createElement("li",{title:$?"".concat(Je,"/").concat(je):null,className:"".concat(C,"-simple-pager")},t.a.createElement("input",{type:"text",value:Le,disabled:U,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(C,"-slash")},"/"),je),t.a.createElement("li",{title:$?V.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(C,"-next"),Object(Q.a)({},"".concat(C,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(at)),de);if(je<=3+Be*2){var ft={locale:V,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:$,itemRender:se};je||st.push(t.a.createElement(h,Object(Z.a)({},ft,{key:"noPager",page:je,className:"".concat(C,"-disabled")})));for(var xt=1;xt<=je;xt+=1){var It=Je===xt;st.push(t.a.createElement(h,Object(Z.a)({},ft,{key:xt,page:xt,active:It})))}}else{var He=L?V.prev_3:V.prev_5,ke=L?V.next_3:V.next_5;_e&&(he=t.a.createElement("li",{title:$?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(C,"-jump-prev"),Object(Q.a)({},"".concat(C,"-jump-prev-custom-icon"),!!ve))},se(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ve,"prev page"))),ie=t.a.createElement("li",{title:$?ke:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(C,"-jump-next"),Object(Q.a)({},"".concat(C,"-jump-next-custom-icon"),!!Ce))},se(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ce,"next page")))),ee=t.a.createElement(h,{locale:V,last:!0,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:je,page:je,active:!1,showTitle:$,itemRender:se}),oe=t.a.createElement(h,{locale:V,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:$,itemRender:se});var ct=Math.max(1,Je-Be),gt=Math.min(Je+Be,je);Je-1<=Be&&(gt=1+Be*2),je-Je<=Be&&(ct=je-Be*2);for(var Ze=ct;Ze<=gt;Ze+=1){var ot=Je===Ze;st.push(t.a.createElement(h,{locale:V,rootPrefixCls:C,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:ot,showTitle:$,itemRender:se}))}Je-1>=Be*2&&Je!==1+2&&(st[0]=Object(b.cloneElement)(st[0],{className:"".concat(C,"-item-after-jump-prev")}),st.unshift(he)),je-Je>=Be*2&&Je!==je-2&&(st[st.length-1]=Object(b.cloneElement)(st[st.length-1],{className:"".concat(C,"-item-before-jump-next")}),st.push(ie)),ct!==1&&st.unshift(oe),gt!==je&&st.push(ee)}var Ke=null;Y&&(Ke=t.a.createElement("li",{className:"".concat(C,"-total-text")},Y(I,[I===0?0:(Je-1)*Et+1,Je*Et>I?I:Je*Et])));var Me=!this.hasPrev()||!je,Ue=!this.hasNext()||!je;return t.a.createElement("ul",Object(Z.a)({className:i()(C,y,Object(Q.a)({},"".concat(C,"-disabled"),U)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},At),Ke,t.a.createElement("li",{title:$?V.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(C,"-prev"),Object(Q.a)({},"".concat(C,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(nt)),st,t.a.createElement("li",{title:$?V.next_page:null,onClick:this.next,tabIndex:Ue?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(C,"-next"),Object(Q.a)({},"".concat(C,"-disabled"),Ue)),"aria-disabled":Ue},this.renderNext(at)),t.a.createElement(f,{disabled:U,locale:V,rootPrefixCls:C,selectComponentClass:De,selectPrefixCls:Qe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Je,pageSize:Et,pageSizeOptions:Se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(d,m){var C={};if("current"in d&&(C.current=d.current,d.current!==m.current&&(C.currentInputValue=C.current)),"pageSize"in d&&d.pageSize!==m.pageSize){var y=m.current,g=v(d.pageSize,m,d);y=y>g?g:y,"current"in d||(C.current=y,C.currentInputValue=y),C.pageSize=d.pageSize}return C}}]),p}(t.a.Component);T.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:c,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:c,locale:l.a,style:{},itemRender:u,totalBoundaryShowSizeChanger:50};var x=T},"6GrX":function(Xe,le,H){var Z=H("mFDi"),Q=H("Xnb7"),O=H("bYtY"),K=O.getContext,M=O.extend,B=O.retrieve2,R=O.retrieve3,b=O.trim,t={},E=0,i=5e3,A=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,h="12px sans-serif",s={};function o(k,I){s[k]=I}function f(k,I){I=I||h;var V=k+":"+I;if(t[V])return t[V];for(var G=(k+"").split(`
`),L=0,$=0,Y=G.length;$<Y;$++)L=Math.max(m(G[$],I).width,L);return E>i&&(E=0,t={}),E++,t[V]=L,L}function l(k,I,V,G,L,$,Y,ne){return Y?a(k,I,V,G,L,$,Y,ne):c(k,I,V,G,L,$,ne)}function c(k,I,V,G,L,$,Y){var ne=C(k,I,L,$,Y),se=f(k,I);L&&(se+=L[1]+L[3]);var _e=ne.outerHeight,ve=u(0,se,V),Ce=v(0,_e,G),De=new Z(ve,Ce,se,_e);return De.lineHeight=ne.lineHeight,De}function a(k,I,V,G,L,$,Y,ne){var se=y(k,{rich:Y,truncate:ne,font:I,textAlign:V,textPadding:L,textLineHeight:$}),_e=se.outerWidth,ve=se.outerHeight,Ce=u(0,_e,V),De=v(0,ve,G);return new Z(Ce,De,_e,ve)}function u(k,I,V){return V==="right"?k-=I:V==="center"&&(k-=I/2),k}function v(k,I,V){return V==="middle"?k-=I/2:V==="bottom"&&(k-=I),k}function T(k,I,V){var G=I.textPosition,L=I.textDistance,$=V.x,Y=V.y;L=L||0;var ne=V.height,se=V.width,_e=ne/2,ve="left",Ce="top";switch(G){case"left":$-=L,Y+=_e,ve="right",Ce="middle";break;case"right":$+=L+se,Y+=_e,Ce="middle";break;case"top":$+=se/2,Y-=L,ve="center",Ce="bottom";break;case"bottom":$+=se/2,Y+=ne+L,ve="center";break;case"inside":$+=se/2,Y+=_e,ve="center",Ce="middle";break;case"insideLeft":$+=L,Y+=_e,Ce="middle";break;case"insideRight":$+=se-L,Y+=_e,ve="right",Ce="middle";break;case"insideTop":$+=se/2,Y+=L,ve="center";break;case"insideBottom":$+=se/2,Y+=ne-L,ve="center",Ce="bottom";break;case"insideTopLeft":$+=L,Y+=L;break;case"insideTopRight":$+=se-L,Y+=L,ve="right";break;case"insideBottomLeft":$+=L,Y+=ne-L,Ce="bottom";break;case"insideBottomRight":$+=se-L,Y+=ne-L,ve="right",Ce="bottom";break}return k=k||{},k.x=$,k.y=Y,k.textAlign=ve,k.textVerticalAlign=Ce,k}function x(k,I,V){var G={textPosition:k,textDistance:V};return T({},G,I)}function D(k,I,V,G,L){if(!I)return"";var $=(k+"").split(`
`);L=w(I,V,G,L);for(var Y=0,ne=$.length;Y<ne;Y++)$[Y]=p($[Y],L);return $.join(`
`)}function w(k,I,V,G){G=M({},G),G.font=I;var V=B(V,"...");G.maxIterations=B(G.maxIterations,2);var L=G.minChar=B(G.minChar,0);G.cnCharWidth=f("\u56FD",I);var $=G.ascCharWidth=f("a",I);G.placeholder=B(G.placeholder,"");for(var Y=k=Math.max(0,k-1),ne=0;ne<L&&Y>=$;ne++)Y-=$;var se=f(V,I);return se>Y&&(V="",se=0),Y=k-se,G.ellipsis=V,G.ellipsisWidth=se,G.contentWidth=Y,G.containerWidth=k,G}function p(k,I){var V=I.containerWidth,G=I.font,L=I.contentWidth;if(!V)return"";var $=f(k,G);if($<=V)return k;for(var Y=0;;Y++){if($<=L||Y>=I.maxIterations){k+=I.ellipsis;break}var ne=Y===0?n(k,L,I.ascCharWidth,I.cnCharWidth):$>0?Math.floor(k.length*L/$):0;k=k.substr(0,ne),$=f(k,G)}return k===""&&(k=I.placeholder),k}function n(k,I,V,G){for(var L=0,$=0,Y=k.length;$<Y&&L<I;$++){var ne=k.charCodeAt($);L+=0<=ne&&ne<=127?V:G}return $}function d(k){return f("\u56FD",k)}function m(k,I){return s.measureText(k,I)}s.measureText=function(k,I){var V=K();return V.font=I||h,V.measureText(k)};function C(k,I,V,G,L){k!=null&&(k+="");var $=B(G,d(I)),Y=k?k.split(`
`):[],ne=Y.length*$,se=ne,_e=!0;if(V&&(se+=V[0]+V[2]),k&&L){_e=!1;var ve=L.outerHeight,Ce=L.outerWidth;if(ve!=null&&se>ve)k="",Y=[];else if(Ce!=null)for(var De=w(Ce-(V?V[1]+V[3]:0),I,L.ellipsis,{minChar:L.minChar,placeholder:L.placeholder}),Qe=0,Se=Y.length;Qe<Se;Qe++)Y[Qe]=p(Y[Qe],De)}return{lines:Y,height:ne,outerHeight:se,lineHeight:$,canCacheByTextString:_e}}function y(k,I){var V={lines:[],width:0,height:0};if(k!=null&&(k+=""),!k)return V;for(var G=A.lastIndex=0,L;(L=A.exec(k))!=null;){var $=L.index;$>G&&g(V,k.substring(G,$)),g(V,L[2],L[1]),G=A.lastIndex}G<k.length&&g(V,k.substring(G,k.length));var Y=V.lines,ne=0,se=0,_e=[],ve=I.textPadding,Ce=I.truncate,De=Ce&&Ce.outerWidth,Qe=Ce&&Ce.outerHeight;ve&&(De!=null&&(De-=ve[1]+ve[3]),Qe!=null&&(Qe-=ve[0]+ve[2]));for(var Se=0;Se<Y.length;Se++){for(var Ie=Y[Se],Je=0,Et=0,Le=0;Le<Ie.tokens.length;Le++){var je=Ie.tokens[Le],st=je.styleName&&I.rich[je.styleName]||{},he=je.textPadding=st.textPadding,ie=je.font=st.font||I.font,oe=je.textHeight=B(st.textHeight,d(ie));if(he&&(oe+=he[0]+he[2]),je.height=oe,je.lineHeight=R(st.textLineHeight,I.textLineHeight,oe),je.textAlign=st&&st.textAlign||I.textAlign,je.textVerticalAlign=st&&st.textVerticalAlign||"middle",Qe!=null&&ne+je.lineHeight>Qe)return{lines:[],width:0,height:0};je.textWidth=f(je.text,ie);var ee=st.textWidth,de=ee==null||ee==="auto";if(typeof ee=="string"&&ee.charAt(ee.length-1)==="%")je.percentWidth=ee,_e.push(je),ee=0;else{if(de){ee=je.textWidth;var we=st.textBackgroundColor,Be=we&&we.image;Be&&(Be=Q.findExistImage(Be),Q.isImageReady(Be)&&(ee=Math.max(ee,Be.width*oe/Be.height)))}var nt=he?he[1]+he[3]:0;ee+=nt;var at=De!=null?De-Et:null;at!=null&&at<ee&&(!de||at<nt?(je.text="",je.textWidth=ee=0):(je.text=D(je.text,at-nt,ie,Ce.ellipsis,{minChar:Ce.minChar}),je.textWidth=f(je.text,ie),ee=je.textWidth+nt))}Et+=je.width=ee,st&&(Je=Math.max(Je,je.lineHeight))}Ie.width=Et,Ie.lineHeight=Je,ne+=Je,se=Math.max(se,Et)}V.outerWidth=V.width=B(I.textWidth,se),V.outerHeight=V.height=B(I.textHeight,ne),ve&&(V.outerWidth+=ve[1]+ve[3],V.outerHeight+=ve[0]+ve[2]);for(var Se=0;Se<_e.length;Se++){var je=_e[Se],At=je.percentWidth;je.width=parseInt(At,10)/100*se}return V}function g(k,I,V){for(var G=I==="",L=I.split(`
`),$=k.lines,Y=0;Y<L.length;Y++){var ne=L[Y],se={styleName:V,text:ne,isLineHolder:!ne&&!G};if(Y)$.push({tokens:[se]});else{var _e=($[$.length-1]||($[0]={tokens:[]})).tokens,ve=_e.length;ve===1&&_e[0].isLineHolder?_e[0]=se:(ne||!ve||G)&&_e.push(se)}}}function U(k){var I=(k.fontSize||k.fontFamily)&&[k.fontStyle,k.fontWeight,(k.fontSize||12)+"px",k.fontFamily||"sans-serif"].join(" ");return I&&b(I)||k.textFont||k.font}le.DEFAULT_FONT=h,le.$override=o,le.getWidth=f,le.getBoundingRect=l,le.adjustTextX=u,le.adjustTextY=v,le.calculateTextPosition=T,le.adjustTextPositionOnRect=x,le.truncateText=D,le.getLineHeight=d,le.measureText=m,le.parsePlainText=C,le.parseRichText=y,le.makeFont=U},"6RRn":function(Xe,le,H){"use strict";var Z=H("wCXF"),Q=H("n6Qo");H.d(le,"b",function(){return Q.a});var O=H("IBYe"),K=H("6eGT"),M=H("hW8S");H.d(le,"a",function(){return M.a}),le.c=Z.b},"6UM0":function(Xe,le,H){var Z,Q;(function(){var O;(function(){"use strict";var M=[function(t,E,i){var A=i(1).Beautifier,h=i(5).Options;function s(o,f){var l=new A(o,f);return l.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new h}},function(t,E,i){var A=i(2).Output,h=i(3).Token,s=i(4),o=i(5).Options,f=i(7).Tokenizer,l=i(7).line_starters,c=i(7).positionable_operators,a=i(7).TOKEN;function u(L,$){return $.indexOf(L)!==-1}function v(L){return L.replace(/^\s+/g,"")}function T(L){for(var $={},Y=0;Y<L.length;Y++)$[L[Y].replace(/-/g,"_")]=L[Y];return $}function x(L,$){return L&&L.type===a.RESERVED&&L.text===$}function D(L,$){return L&&L.type===a.RESERVED&&u(L.text,$)}var w=["case","return","do","if","throw","else","await","break","continue","async"],p=["before-newline","after-newline","preserve-newline"],n=T(p),d=[n.before_newline,n.preserve_newline],m={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function C(L,$){if($.multiline_frame||$.mode===m.ForInitializer||$.mode===m.Conditional)return;L.remove_indent($.start_line_index)}function y(L){L=L.replace(s.allLineBreaks,`
`);for(var $=[],Y=L.indexOf(`
`);Y!==-1;)$.push(L.substring(0,Y)),L=L.substring(Y+1),Y=L.indexOf(`
`);return L.length&&$.push(L),$}function g(L){return L===m.ArrayLiteral}function U(L){return u(L,[m.Expression,m.ForInitializer,m.Conditional])}function k(L,$){for(var Y=0;Y<L.length;Y++){var ne=L[Y].trim();if(ne.charAt(0)!==$)return!1}return!0}function I(L,$){for(var Y=0,ne=L.length,se;Y<ne;Y++)if(se=L[Y],se&&se.indexOf($)!==0)return!1;return!0}function V(L,$){$=$||{},this._source_text=L||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o($)}V.prototype.create_flags=function(L,$){var Y=0;L&&(Y=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>Y&&(Y=L.line_indent_level));var ne={mode:$,parent:L,last_token:L?L.last_token:new h(a.START_BLOCK,""),last_word:L?L.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:Y,alignment:0,line_indent_level:L?L.line_indent_level:Y,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},V.prototype._reset=function(L){var $=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new A(this._options,$),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m.BlockStatement);var Y=new f(L,this._options);return this._tokens=Y.tokenize(),L},V.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,$=this._reset(this._source_text),Y=this._options.eol;this._options.eol==="auto"&&(Y=`
`,$&&s.lineBreak.test($||"")&&(Y=$.match(s.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return L=this._output.get_code(Y),L},V.prototype.handle_token=function(L,$){L.type===a.START_EXPR?this.handle_start_expr(L):L.type===a.END_EXPR?this.handle_end_expr(L):L.type===a.START_BLOCK?this.handle_start_block(L):L.type===a.END_BLOCK?this.handle_end_block(L):L.type===a.WORD?this.handle_word(L):L.type===a.RESERVED?this.handle_word(L):L.type===a.SEMICOLON?this.handle_semicolon(L):L.type===a.STRING?this.handle_string(L):L.type===a.EQUALS?this.handle_equals(L):L.type===a.OPERATOR?this.handle_operator(L):L.type===a.COMMA?this.handle_comma(L):L.type===a.BLOCK_COMMENT?this.handle_block_comment(L,$):L.type===a.COMMENT?this.handle_comment(L,$):L.type===a.DOT?this.handle_dot(L):L.type===a.EOF?this.handle_eof(L):L.type===a.UNKNOWN?this.handle_unknown(L,$):this.handle_unknown(L,$)},V.prototype.handle_whitespace_and_comments=function(L,$){var Y=L.newlines,ne=this._options.keep_array_indentation&&g(this._flags.mode);if(L.comments_before)for(var se=L.comments_before.next();se;)this.handle_whitespace_and_comments(se,$),this.handle_token(se,$),se=L.comments_before.next();if(ne)for(var _e=0;_e<Y;_e+=1)this.print_newline(_e>0,$);else if(this._options.max_preserve_newlines&&Y>this._options.max_preserve_newlines&&(Y=this._options.max_preserve_newlines),this._options.preserve_newlines&&Y>1){this.print_newline(!1,$);for(var ve=1;ve<Y;ve+=1)this.print_newline(!0,$)}};var G=["async","break","continue","return","throw","yield"];V.prototype.allow_wrap_or_preserved_newline=function(L,$){if($=$===void 0?!1:$,this._output.just_added_newline())return;var Y=this._options.preserve_newlines&&L.newlines||$,ne=u(this._flags.last_token.text,c)||u(L.text,c);if(ne){var se=u(this._flags.last_token.text,c)&&u(this._options.operator_position,d)||u(L.text,c);Y=Y&&se}if(Y)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,G))return;this._output.set_wrap_point()}},V.prototype.print_newline=function(L,$){if(!$&&(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 Y=this._tokens.peek();this._flags.mode===m.Statement&&!(this._flags.if_block&&x(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},V.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.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))},V.prototype.print_token=function(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var $=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push($),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},V.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.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))},V.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m.Statement&&C(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},V.prototype.start_of_object_property=function(){return this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},V.prototype.start_of_statement=function(L){var $=!1;return $=$||D(this._flags.last_token,["var","let","const"])&&L.type===a.WORD,$=$||x(this._flags.last_token,"do"),$=$||!(this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement)&&D(this._flags.last_token,G)&&!L.newlines,$=$||x(this._flags.last_token,"else")&&!(x(L,"if")&&!L.comments_before),$=$||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===m.ForInitializer||this._previous_flags.mode===m.Conditional),$=$||this._flags.last_token.type===a.WORD&&this._flags.mode===m.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==a.WORD&&L.type!==a.RESERVED,$=$||this._flags.mode===m.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),$?(this.set_mode(m.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,D(L,["do","for","if","while"])),!0):!1},V.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var $=m.Expression;if(L.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode($),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}$=m.ArrayLiteral,g(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())),u(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,$=m.ForInitializer):u(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,$=m.Conditional):u(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(u(this._flags.last_token.text,l)||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(L);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var Y=this._tokens.peek(-3);if(this._options.space_after_named_function&&Y){var ne=this._tokens.peek(-4);D(Y,["async","function"])||Y.text==="*"&&D(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===m.ObjectLiteral?(Y.text==="{"||Y.text===","||Y.text==="*"&&(ne.text==="{"||ne.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(L);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&u(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(L,L.newlines),this.print_token(L),this.set_mode($),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},V.prototype.handle_end_expr=function(L){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&g(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(L),this.restore_mode(),C(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===m.Conditional&&(this._previous_flags.mode=m.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},V.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var $=this._tokens.peek(),Y=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(m.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m.BlockStatement):Y&&(u(Y.text,[":",","])&&u($.type,[a.STRING,a.WORD,a.RESERVED])||u($.text,["get","set","..."])&&u(Y.type,[a.WORD,a.RESERVED]))?u(this._last_last_text,["class","interface"])&&!u(Y.text,[":",","])?this.set_mode(m.BlockStatement):this.set_mode(m.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(m.BlockStatement):u(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(m.ObjectLiteral):this.set_mode(m.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!$.comments_before&&$.text==="}",se=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var _e=0,ve=null;this._flags.inline_frame=!0;do if(_e+=1,ve=this._tokens.peek(_e-1),ve.newlines){this._flags.inline_frame=!1;break}while(ve.type!==a.EOF&&!(ve.type===a.END_BLOCK&&ve.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(se||this._flags.last_token.type===a.EQUALS||D(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(g(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(L),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(L),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},V.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===m.Statement;)this.restore_mode();var $=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!$?this._output.space_before_token=!0:this._options.brace_style==="expand"?$||this.print_newline():$||(g(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(L)},V.prototype.handle_word=function(L){if(L.type===a.RESERVED){if(u(L.text,["set","get"])&&this._flags.mode!==m.ObjectLiteral)L.type=a.WORD;else if(L.text==="import"&&u(this._tokens.peek().text,["(","."]))L.type=a.WORD;else if(u(L.text,["as","from"])&&!this._flags.import_block)L.type=a.WORD;else if(this._flags.mode===m.ObjectLiteral){var $=this._tokens.peek();$.text===":"&&(L.type=a.WORD)}}if(this.start_of_statement(L)?D(this._flags.last_token,["var","let","const"])&&L.type===a.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!U(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||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(x(L,"while")){this._output.space_before_token=!0,this.print_token(L),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(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(L,["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(L),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(L)),x(L,"function")){(u(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(u(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,G)?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&&(U(this._flags.mode)||g(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var Y="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?Y="SPACE":D(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?Y="NEWLINE":(Y="SPACE",this._output.space_before_token=!0):Y="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===m.BlockStatement?Y="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&U(this._flags.mode)?Y="SPACE":this._flags.last_token.type===a.STRING?Y="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&u(this._last_last_text,["{",","]))?Y="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?Y="SPACE":Y="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,Y="NEWLINE"),D(L,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Y="SPACE":Y="NEWLINE"),D(L,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===m.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Y==="NEWLINE"?D(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(L,["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||!D(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(L,"if")&&x(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(L,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&g(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Y==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===a.WORD||L.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===a.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(L,"from")&&(this._flags.import_block=!1))},V.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var $=this._tokens.peek();this._flags.mode===m.Statement&&!(this._flags.if_block&&x($,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},V.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),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(L):L.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},V.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},V.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(U(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)):this._flags.mode===m.ObjectLiteral||this._flags.mode===m.Statement&&this._flags.parent.mode===m.ObjectLiteral?(this._flags.mode===m.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},V.prototype.handle_operator=function(L){var $=L.text==="*"&&(D(this._flags.last_token,["function","yield"])||u(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),Y=u(L.text,["-","+"])&&(u(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||u(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var ne=!$;this.handle_whitespace_and_comments(L,ne)}if(L.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===a.OPERATOR&&u(this._options.operator_position,d)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),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,ve=!1;if(L.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,ve=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!Y&&!$&&this._options.preserve_newlines&&u(L.text,c)){var Ce=L.text===":",De=Ce&&ve,Qe=Ce&&!ve;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!Qe,this.print_token(L),(!Ce||De)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!Ce||De?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case n.preserve_newline:Qe||this.allow_wrap_or_preserved_newline(L),se=!(this._output.just_added_newline()||Qe),this._output.space_before_token=se,this.print_token(L),this._output.space_before_token=!0;return}}if($){this.allow_wrap_or_preserved_newline(L),se=!1;var Se=this._tokens.peek();_e=Se&&u(Se.type,[a.WORD,a.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),se=this._flags.last_token.type===a.START_BLOCK,_e=!1;else if(u(L.text,["--","++","!","~"])||Y){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),se=!1,_e=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var Ie=D(this._flags.last_token,w)&&L.newlines;Ie&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Ie,!0)}this._flags.last_token.text===";"&&U(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==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===a.OPERATOR&&(se=u(L.text,["--","-","++","+"])&&u(this._flags.last_token.text,["--","-","++","+"]),u(L.text,["+","-"])&&u(this._flags.last_token.text,["--","++"])&&(_e=!0)),(this._flags.mode===m.BlockStatement&&!this._flags.inline_frame||this._flags.mode===m.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(L),this._output.space_before_token=_e},V.prototype.handle_block_comment=function(L,$){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,$),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,$)},V.prototype.print_block_commment=function(L,$){var Y=y(L.text),ne,se=!1,_e=!1,ve=L.whitespace_before,Ce=ve.length;if(this.print_newline(!1,$),this.print_token_line_indentation(L),this._output.add_token(Y[0]),this.print_newline(!1,$),Y.length>1){for(Y=Y.slice(1),se=k(Y,"*"),_e=I(Y,ve),se&&(this._flags.alignment=1),ne=0;ne<Y.length;ne++)se?(this.print_token_line_indentation(L),this._output.add_token(v(Y[ne]))):_e&&Y[ne]?(this.print_token_line_indentation(L),this._output.add_token(Y[ne].substring(Ce))):(this._output.current_line.set_indent(-1),this._output.add_token(Y[ne])),this.print_newline(!1,$);this._flags.alignment=0}},V.prototype.handle_comment=function(L,$){L.newlines?this.print_newline(!1,$):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,$)},V.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,w)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,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(L)},V.prototype.handle_unknown=function(L,$){this.print_token(L),L.text[L.text.length-1]===`
`&&this.print_newline(!1,$)},V.prototype.handle_eof=function(L){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},t.exports.Beautifier=V},function(t){function E(h){this.__parent=h,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 h=new E(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},E.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},E.prototype.has_match=function(h){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(h))return!0;return!1},E.prototype.set_indent=function(h,s){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=s||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 h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__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(h){this.__items.push(h);var s=h.lastIndexOf(`
`);s!==-1?this.__character_count=h.length-s:this.__character_count+=h.length},E.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},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 h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function i(h,s){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),s=s||"",h.indent_level>0&&(s=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}i.prototype.get_indent_size=function(h,s){var o=this.__base_string_length;return s=s||0,h<0&&(o=0),o+=h*this.__indent_size,o+=s,o},i.prototype.get_indent_string=function(h,s){var o=this.__base_string;return s=s||0,h<0&&(h=0,o=""),s+=h*this.__indent_size,this.__ensure_cache(s),o+=this.__cache[s],o},i.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var h=this.__cache.length,s=0,o="";this.__indent_size&&h>=this.__indent_size&&(s=Math.floor(h/this.__indent_size),h-=s*this.__indent_size,o=new Array(s+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function A(h,s){this.__indent_cache=new i(h,s),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.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()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(h,s){return this.__indent_cache.get_indent_string(h,s)},A.prototype.get_indent_size=function(h,s){return this.__indent_cache.get_indent_size(h,s)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(h){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return h!==`
`&&(o=o.replace(/[\n]/g,h)),o},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(h,s){return h=h||0,s=s||0,this.next_line.set_indent(h,s),this.__lines.length>1?(this.current_line.set_indent(h,s),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(h){for(var s=0;s<h.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.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(" "))},A.prototype.remove_indent=function(h){for(var s=this.__lines.length;h<s;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&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},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(h,s){for(var o=this.__lines.length-2;o>=0;){var f=this.__lines[o];if(f.is_empty())break;if(f.item(0).indexOf(h)!==0&&f.item(-1)!==s){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=A},function(t){function E(i,A,h,s){this.type=i,this.text=A,this.comments_before=null,this.newlines=h||0,this.whitespace_before=s||"",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 i="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\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",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+i+h+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+A+h+s+"])*";E.identifier=new RegExp(o+f,"g"),E.identifierStart=new RegExp(o),E.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+A+h+s+"])+");var l=/[\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,i){var A=i(6).Options,h=["before-newline","after-newline","preserve-newline"];function s(o){A.call(this,o,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="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 l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var c=0;c<l.length;c++)l[c]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=l[c];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",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}s.prototype=new A,t.exports.Options=s},function(t){function E(h,s){this.raw_options=i(h,s),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(h,s){var o=this.raw_options[h],f=s||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(f=o.concat()):typeof o=="string"&&(f=o.split(/[^a-zA-Z0-9_\/\-]+/)),f},E.prototype._get_boolean=function(h,s){var o=this.raw_options[h],f=o===void 0?!!s:!!o;return f},E.prototype._get_characters=function(h,s){var o=this.raw_options[h],f=s||"";return typeof o=="string"&&(f=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),f},E.prototype._get_number=function(h,s){var o=this.raw_options[h];s=parseInt(s,10),isNaN(s)&&(s=0);var f=parseInt(o,10);return isNaN(f)&&(f=s),f},E.prototype._get_selection=function(h,s,o){var f=this._get_selection_list(h,s,o);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+s+`
You passed in: '`+this.raw_options[h]+"'");return f[0]},E.prototype._get_selection_list=function(h,s,o){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[s[0]],!this._is_valid_selection(o,s))throw new Error("Invalid Default Value!");var f=this._get_array(h,o);if(!this._is_valid_selection(f,s))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+s+`
You passed in: '`+this.raw_options[h]+"'");return f},E.prototype._is_valid_selection=function(h,s){return h.length&&s.length&&!h.some(function(o){return s.indexOf(o)===-1})};function i(h,s){var o={};h=A(h);var f;for(f in h)f!==s&&(o[f]=h[f]);if(s&&h[s])for(f in h[s])o[f]=h[s][f];return o}function A(h){var s={},o;for(o in h){var f=o.replace(/-/g,"_");s[f]=h[o]}return s}t.exports.Options=E,t.exports.normalizeOpts=A,t.exports.mergeOpts=i},function(t,E,i){var A=i(8).InputScanner,h=i(9).Tokenizer,s=i(9).TOKEN,o=i(13).Directives,f=i(4),l=i(12).Pattern,c=i(14).TemplatablePattern;function a(k,I){return I.indexOf(k)!==-1}var u={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:s.START,RAW:s.RAW,EOF:s.EOF},v=new o(/\/\*/,/\*\//),T=/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]/,D=/[^\d\.]/,w=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),p="\\?\\.(?!\\d) "+p,p=p.replace(/ /g,"|");var n=new RegExp(p),d="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),m=d.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),C=new RegExp("^(?:"+m.join("|")+")$"),y,g=function(k,I){h.call(this,k,I),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var V=new l(this._input),G=new c(this._input).read_options(this._options);this.__patterns={template:G,identifier:G.starting_with(f.identifier).matching(f.identifierMatch),number:V.matching(T),punct:V.matching(n),comment:V.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:V.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:V.matching(/<!--/),html_comment_end:V.matching(/-->/),include:V.starting_with(/#include/).until_after(f.lineBreak),shebang:V.starting_with(/#!/).until_after(f.lineBreak),xml:V.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:G.until(/['\\\n\r\u2028\u2029]/),double_quote:G.until(/["\\\n\r\u2028\u2029]/),template_text:G.until(/[`\\$]/),template_expression:G.until(/[`}\\]/)}};g.prototype=new h,g.prototype._is_comment=function(k){return k.type===u.COMMENT||k.type===u.BLOCK_COMMENT||k.type===u.UNKNOWN},g.prototype._is_opening=function(k){return k.type===u.START_BLOCK||k.type===u.START_EXPR},g.prototype._is_closing=function(k,I){return(k.type===u.END_BLOCK||k.type===u.END_EXPR)&&I&&(k.text==="]"&&I.text==="["||k.text===")"&&I.text==="("||k.text==="}"&&I.text==="{")},g.prototype._reset=function(){y=!1},g.prototype._get_next_token=function(k,I){var V=null;this._readWhitespace();var G=this._input.peek();return G===null?this._create_token(u.EOF,""):(V=V||this._read_non_javascript(G),V=V||this._read_string(G),V=V||this._read_word(k),V=V||this._read_singles(G),V=V||this._read_comment(G),V=V||this._read_regexp(G,k),V=V||this._read_xml(G,k),V=V||this._read_punctuation(),V=V||this._create_token(u.UNKNOWN,this._input.next()),V)},g.prototype._read_word=function(k){var I;if(I=this.__patterns.identifier.read(),I!=="")return I=I.replace(f.allLineBreaks,`
`),!(k.type===u.DOT||k.type===u.RESERVED&&(k.text==="set"||k.text==="get"))&&C.test(I)?(I==="in"||I==="of")&&(k.type===u.WORD||k.type===u.STRING)?this._create_token(u.OPERATOR,I):this._create_token(u.RESERVED,I):this._create_token(u.WORD,I);if(I=this.__patterns.number.read(),I!=="")return this._create_token(u.WORD,I)},g.prototype._read_singles=function(k){var I=null;return k==="("||k==="["?I=this._create_token(u.START_EXPR,k):k===")"||k==="]"?I=this._create_token(u.END_EXPR,k):k==="{"?I=this._create_token(u.START_BLOCK,k):k==="}"?I=this._create_token(u.END_BLOCK,k):k===";"?I=this._create_token(u.SEMICOLON,k):k==="."&&D.test(this._input.peek(1))?I=this._create_token(u.DOT,k):k===","&&(I=this._create_token(u.COMMA,k)),I&&this._input.next(),I},g.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(u.EQUALS,k):k==="?."?this._create_token(u.DOT,k):this._create_token(u.OPERATOR,k)},g.prototype._read_non_javascript=function(k){var I="";if(k==="#"){if(this._is_first_token()&&(I=this.__patterns.shebang.read(),I))return this._create_token(u.UNKNOWN,I.trim()+`
`);if(I=this.__patterns.include.read(),I)return this._create_token(u.UNKNOWN,I.trim()+`
`);k=this._input.next();var V="#";if(this._input.hasNext()&&this._input.testChar(x)){do k=this._input.next(),V+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(V+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(V+="{}",this._input.next(),this._input.next())),this._create_token(u.WORD,V)}this._input.back()}else if(k==="<"&&this._is_first_token()){if(I=this.__patterns.html_comment_start.read(),I){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)I+=this._input.next();return y=!0,this._create_token(u.COMMENT,I)}}else if(y&&k==="-"&&(I=this.__patterns.html_comment_end.read(),I))return y=!1,this._create_token(u.COMMENT,I);return null},g.prototype._read_comment=function(k){var I=null;if(k==="/"){var V="";if(this._input.peek(1)==="*"){V=this.__patterns.block_comment.read();var G=v.get_directives(V);G&&G.ignore==="start"&&(V+=v.readIgnored(this._input)),V=V.replace(f.allLineBreaks,`
`),I=this._create_token(u.BLOCK_COMMENT,V),I.directives=G}else this._input.peek(1)==="/"&&(V=this.__patterns.comment.read(),I=this._create_token(u.COMMENT,V))}return I},g.prototype._read_string=function(k){if(k==="`"||k==="'"||k==='"'){var I=this._input.next();return this.has_char_escapes=!1,k==="`"?I+=this._read_string_recursive("`",!0,"${"):I+=this._read_string_recursive(k),this.has_char_escapes&&this._options.unescape_strings&&(I=U(I)),this._input.peek()===k&&(I+=this._input.next()),I=I.replace(f.allLineBreaks,`
`),this._create_token(u.STRING,I)}return null},g.prototype._allow_regexp_or_xml=function(k){return k.type===u.RESERVED&&a(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===u.END_EXPR&&k.text===")"&&k.opened.previous.type===u.RESERVED&&a(k.opened.previous.text,["if","while","for"])||a(k.type,[u.COMMENT,u.START_EXPR,u.START_BLOCK,u.START,u.END_BLOCK,u.OPERATOR,u.EQUALS,u.EOF,u.SEMICOLON,u.COMMA])},g.prototype._read_regexp=function(k,I){if(k==="/"&&this._allow_regexp_or_xml(I)){for(var V=this._input.next(),G=!1,L=!1;this._input.hasNext()&&(G||L||this._input.peek()!==k)&&!this._input.testChar(f.newline);)V+=this._input.peek(),G?G=!1:(G=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===k&&(V+=this._input.next(),V+=this._input.read(f.identifier)),this._create_token(u.STRING,V)}return null},g.prototype._read_xml=function(k,I){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(I)){var V="",G=this.__patterns.xml.read_match();if(G){for(var L=G[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),$=L.indexOf("{")===0,Y=0;G;){var ne=!!G[1],se=G[2],_e=!!G[G.length-1]||se.slice(0,8)==="![CDATA[";if(!_e&&(se===L||$&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ne?--Y:++Y),V+=G[0],Y<=0)break;G=this.__patterns.xml.read_match()}return G||(V+=this._input.match(/[\s\S]*/g)[0]),V=V.replace(f.allLineBreaks,`
`),this._create_token(u.STRING,V)}}return null};function U(k){for(var I="",V=0,G=new A(k),L=null;G.hasNext();)if(L=G.match(/([\s]|[^\\]|\\\\)+/g),L&&(I+=L[0]),G.peek()==="\\"){if(G.next(),G.peek()==="x")L=G.match(/x([0-9A-Fa-f]{2})/g);else if(G.peek()==="u")L=G.match(/u([0-9A-Fa-f]{4})/g);else{I+="\\",G.hasNext()&&(I+=G.next());continue}if(!L)return k;if(V=parseInt(L[1],16),V>126&&V<=255&&L[0].indexOf("x")===0)return k;if(V>=0&&V<32){I+="\\"+L[0];continue}else V===34||V===39||V===92?I+="\\"+String.fromCharCode(V):I+=String.fromCharCode(V)}return I}g.prototype._read_string_recursive=function(k,I,V){var G,L;k==="'"?L=this.__patterns.single_quote:k==='"'?L=this.__patterns.double_quote:k==="`"?L=this.__patterns.template_text:k==="}"&&(L=this.__patterns.template_expression);for(var $=L.read(),Y="";this._input.hasNext();){if(Y=this._input.next(),Y===k||!I&&f.newline.test(Y)){this._input.back();break}else Y==="\\"&&this._input.hasNext()?(G=this._input.peek(),G==="x"||G==="u"?this.has_char_escapes=!0:G==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Y+=this._input.next()):V&&(V==="${"&&Y==="$"&&this._input.peek()==="{"&&(Y+=this._input.next()),V===Y&&(k==="`"?Y+=this._read_string_recursive("}",I,"`"):Y+=this._read_string_recursive("`",I,"${"),this._input.hasNext()&&(Y+=this._input.next())));Y+=L.read(),$+=Y}return $},t.exports.Tokenizer=g,t.exports.TOKEN=u,t.exports.positionable_operators=w.slice(),t.exports.line_starters=d.slice()},function(t){var E=RegExp.prototype.hasOwnProperty("sticky");function i(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},i.prototype.peek=function(A){var h=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(h=this.__input.charAt(A)),h},i.prototype.__match=function(A,h){A.lastIndex=h;var s=A.exec(this.__input);return s&&!(E&&A.sticky)&&(s.index!==h&&(s=null)),s},i.prototype.test=function(A,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(A,h):!1},i.prototype.testChar=function(A,h){var s=this.peek(h);return A.lastIndex=0,s!==null&&A.test(s)},i.prototype.match=function(A){var h=this.__match(A,this.__position);return h?this.__position+=h[0].length:h=null,h},i.prototype.read=function(A,h,s){var o="",f;return A&&(f=this.match(A),f&&(o+=f[0])),h&&(f||!A)&&(o+=this.readUntil(h,s)),o},i.prototype.readUntil=function(A,h){var s="",o=this.__position;A.lastIndex=this.__position;var f=A.exec(this.__input);return f?(o=f.index,h&&(o+=f[0].length)):o=this.__input_length,s=this.__input.substring(this.__position,o),this.__position=o,s},i.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},i.prototype.get_regexp=function(A,h){var s=null,o="g";return h&&E&&(o="y"),typeof A=="string"&&A!==""?s=new RegExp(A,o):A&&(s=new RegExp(A.source,o)),s},i.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(A){var h=this.__position,s=this.readUntilAfter(A);return this.__position=h,s},i.prototype.lookBack=function(A){var h=this.__position-1;return h>=A.length&&this.__input.substring(h-A.length,h).toLowerCase()===A},t.exports.InputScanner=i},function(t,E,i){var A=i(8).InputScanner,h=i(3).Token,s=i(10).TokenStream,o=i(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(c,a){this._input=new A(c),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var c,a=new h(f.START,""),u=null,v=[],T=new s;a.type!==f.EOF;){for(c=this._get_next_token(a,u);this._is_comment(c);)T.add(c),c=this._get_next_token(a,u);T.isEmpty()||(c.comments_before=T,T=new s),c.parent=u,this._is_opening(c)?(v.push(u),u=c):u&&this._is_closing(c,u)&&(c.opened=u,u.closed=c,u=v.pop(),c.parent=u),c.previous=a,a.next=c,this.__tokens.add(c),a=c}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(c,a){this._readWhitespace();var u=this._input.read(/.+/g);return u?this._create_token(f.RAW,u):this._create_token(f.EOF,"")},l.prototype._is_comment=function(c){return!1},l.prototype._is_opening=function(c){return!1},l.prototype._is_closing=function(c,a){return!1},l.prototype._create_token=function(c,a){var u=new h(c,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return u},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=f},function(t){function E(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}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 i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},E.prototype.peek=function(i){var A=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(A=this.__tokens[i]),A},E.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},t.exports.TokenStream=E},function(t,E,i){var A=i(12).Pattern;function h(s,o){A.call(this,s,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new A,h.prototype.__set_whitespace_patterns=function(s,o){s+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var o=this.__split(this._newline_regexp,s);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return s},h.prototype.matching=function(s,o){var f=this._create();return f.__set_whitespace_patterns(s,o),f._update(),f},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(s,o){s.lastIndex=0;for(var f=0,l=[],c=s.exec(o);c;)l.push(o.substring(f,c.index)),f=c.index+c[0].length,c=s.exec(o);return f<o.length?l.push(o.substring(f,o.length)):l.push(""),l},t.exports.WhitespacePattern=h},function(t){function E(i,A){this._input=i,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,A&&(this._starting_pattern=this._input.get_regexp(A._starting_pattern,!0),this._match_pattern=this._input.get_regexp(A._match_pattern,!0),this._until_pattern=this._input.get_regexp(A._until_pattern),this._until_after=A._until_after)}E.prototype.read=function(){var i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(i){var A=this._create();return A._until_after=!0,A._until_pattern=this._input.get_regexp(i),A._update(),A},E.prototype.until=function(i){var A=this._create();return A._until_after=!1,A._until_pattern=this._input.get_regexp(i),A._update(),A},E.prototype.starting_with=function(i){var A=this._create();return A._starting_pattern=this._input.get_regexp(i,!0),A._update(),A},E.prototype.matching=function(i){var A=this._create();return A._match_pattern=this._input.get_regexp(i,!0),A._update(),A},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},t.exports.Pattern=E},function(t){function E(i,A){i=typeof i=="string"?i:i.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+A,"g")}E.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(i);h;)A[h[1]]=h[2],h=this.__directive_pattern.exec(i);return A},E.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=E},function(t,E,i){var A=i(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(o,f){A.call(this,o,f),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var l=new A(o);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new A,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(o){var f=this._create();return f._disabled[o]=!0,f._update(),f},s.prototype.read_options=function(o){var f=this._create();for(var l in h)f._disabled[l]=o.templating.indexOf(l)===-1;return f._update(),f},s.prototype.exclude=function(o){var f=this._create();return f._excluded[o]=!0,f._update(),f},s.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),o+=f,f=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},s.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},s.prototype._read_template=function(){var o="",f=this._input.peek();if(f==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(o=o||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},t.exports.TemplatablePattern=s}],B={};function R(t){var E=B[t];if(E!==void 0)return E.exports;var i=B[t]={exports:{}};return M[t](i,i.exports,R),i.exports}var b=R(0);O=b})();var K=O;!(Z=[],Q=function(){return{js_beautify:K}}.apply(le,Z),Q!==void 0&&(Xe.exports=Q))})()},"6eGT":function(Xe,le,H){"use strict";function Z(Q){return null}le.a=Z},"6fms":function(Xe,le,H){var Z=H("SUKs"),Q=H("06Qe"),O=H("bYtY"),K=O.each;function M(t){return parseInt(t,10)}function B(t,E){Q.initVML(),this.root=t,this.storage=E;var i=document.createElement("div"),A=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",A.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=A,this._vmlViewport=i,this.resize();var h=E.delFromStorage,s=E.addToStorage;E.delFromStorage=function(o){h.call(E,o),o&&(o.onRemove&&o.onRemove(A))},E.addToStorage=function(o){o.onAdd&&o.onAdd(A),s.call(E,o)},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,i=0;i<t.length;i++){var A=t[i];A.invisible||A.ignore?(A.__alreadyNotVisible||A.onRemove(E),A.__alreadyNotVisible=!0):(A.__alreadyNotVisible&&A.onAdd(E),A.__alreadyNotVisible=!1,A.__dirty&&(A.beforeBrush&&A.beforeBrush(),(A.brushVML||A.brush).call(A,E),A.afterBrush&&A.afterBrush())),A.__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 i=this._vmlViewport.style;i.width=t+"px",i.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||M(E.width))-M(E.paddingLeft)-M(E.paddingRight)|0},_getHeight:function(){var t=this.root,E=t.currentStyle;return(t.clientHeight||M(E.height))-M(E.paddingTop)-M(E.paddingBottom)|0}};function R(t){return function(){Z('In IE8.0 VML mode painter not support method "'+t+'"')}}K(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){B.prototype[t]=R(t)});var b=B;Xe.exports=b},"746U":function(Xe,le,H){"use strict";H.d(le,"f",function(){return Z}),H.d(le,"l",function(){return Q}),H.d(le,"k",function(){return O}),H.d(le,"j",function(){return K}),H.d(le,"g",function(){return M}),H.d(le,"m",function(){return B}),H.d(le,"h",function(){return R}),H.d(le,"n",function(){return b}),H.d(le,"c",function(){return t}),H.d(le,"a",function(){return E}),H.d(le,"i",function(){return i}),H.d(le,"o",function(){return A}),H.d(le,"e",function(){return o}),H.d(le,"d",function(){return f}),H.d(le,"p",function(){return l}),H.d(le,"b",function(){return c});function Z(a){return Array.isArray(a)}function Q(a){return typeof a=="string"}function O(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&!(a instanceof RegExp)&&!(a instanceof Date)}function K(a){return typeof a=="number"&&!isNaN(a)}function M(a){return a===!0||a===!1}function B(a){return typeof a=="undefined"}function R(a){return!b(a)}function b(a){return B(a)||a===null}function t(a,u){if(!a)throw new Error(u?`Unexpected type, expected '${u}'`:"Unexpected type")}function E(a){if(b(a))throw new Error("Assertion Failed: argument is undefined or null");return a}function i(a){return typeof a=="function"}function A(a,u){const v=Math.min(a.length,u.length);for(let T=0;T<v;T++)h(a[T],u[T])}function h(a,u){if(Q(u)){if(typeof a!==u)throw new Error(`argument does not match constraint: typeof ${u}`)}else if(i(u)){try{if(a instanceof u)return}catch(v){}if(!b(a)&&a.constructor===u)return;if(u.length===1&&u.call(void 0,a)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(a){let u=[],v=Object.getPrototypeOf(a);for(;Object.prototype!==v;)u=u.concat(Object.getOwnPropertyNames(v)),v=Object.getPrototypeOf(v);return u}function o(a){const u=[];for(const v of s(a))typeof a[v]=="function"&&u.push(v);return u}function f(a,u){const v=x=>function(){const D=Array.prototype.slice.call(arguments,0);return u(x,D)};let T={};for(const x of a)T[x]=v(x);return T}function l(a){return a===null?void 0:a}function c(a,u="Unreachable"){throw new Error(u)}},"7Cbv":function(Xe,le,H){"use strict";var Z=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(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(Q)}var K=/^(?:[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 M(h){return typeof h=="string"&&K.test(h)}for(var B=M,R=[],b=0;b<256;++b)R.push((b+256).toString(16).substr(1));function t(h){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(R[h[s+0]]+R[h[s+1]]+R[h[s+2]]+R[h[s+3]]+"-"+R[h[s+4]]+R[h[s+5]]+"-"+R[h[s+6]]+R[h[s+7]]+"-"+R[h[s+8]]+R[h[s+9]]+"-"+R[h[s+10]]+R[h[s+11]]+R[h[s+12]]+R[h[s+13]]+R[h[s+14]]+R[h[s+15]]).toLowerCase();if(!B(o))throw TypeError("Stringified UUID is invalid");return o}var E=t;function i(h,s,o){h=h||{};var f=h.random||(h.rng||O)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,s){o=o||0;for(var l=0;l<16;++l)s[o+l]=f[l];return s}return E(f)}var A=le.a=i},"7SHv":function(Xe,le,H){var Z=H("LPTA"),Q=Z.devicePixelRatio,O=H("bYtY"),K=H("SUKs"),M=H("mFDi"),B=H("BPZU"),R=H("Xmg4"),b=H("mLcG"),t=H("Dagg"),E=H("ItGF"),i=1e5,A=314159,h=.01,s=.001;function o(w){return parseInt(w,10)}function f(w){return w?w.__builtin__?!0:!(typeof w.resize!="function"||typeof w.refresh!="function"):!1}var l=new M(0,0,0,0),c=new M(0,0,0,0);function a(w,p,n){return l.copy(w.getBoundingRect()),w.transform&&l.applyTransform(w.transform),c.width=p,c.height=n,!l.intersect(c)}function u(w,p){if(w===p)return!1;if(!w||!p||w.length!==p.length)return!0;for(var n=0;n<w.length;n++)if(w[n]!==p[n])return!0;return!1}function v(w,p){for(var n=0;n<w.length;n++){var d=w[n];d.setTransform(p),p.beginPath(),d.buildPath(p,d.shape),p.clip(),d.restoreTransform(p)}}function T(w,p){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+w+"px","height:"+p+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}var x=function(w,p,n){this.type="canvas";var d=!w.nodeName||w.nodeName.toUpperCase()==="CANVAS";this._opts=n=O.extend({},n||{}),this.dpr=n.devicePixelRatio||Q,this._singleCanvas=d,this.root=w;var m=w.style;m&&(m["-webkit-tap-highlight-color"]="transparent",m["-webkit-user-select"]=m["user-select"]=m["-webkit-touch-callout"]="none",w.innerHTML=""),this.storage=p;var C=this._zlevelList=[],y=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,d){var U=w.width,k=w.height;n.width!=null&&(U=n.width),n.height!=null&&(k=n.height),this.dpr=n.devicePixelRatio||1,w.width=U*this.dpr,w.height=k*this.dpr,this._width=U,this._height=k;var I=new R(w,this,this.dpr);I.__builtin__=!0,I.initContext(),y[A]=I,I.zlevel=A,C.push(A),this._domRoot=w}else{this._width=this._getSize(0),this._height=this._getSize(1);var g=this._domRoot=T(this._width,this._height);w.appendChild(g)}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 w=this.getViewportRoot();if(w)return{offsetLeft:w.offsetLeft||0,offsetTop:w.offsetTop||0}},refresh:function(w){var p=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(p,w,this._redrawId);for(var d=0;d<n.length;d++){var m=n[d],C=this._layers[m];if(!C.__builtin__&&C.refresh){var y=d===0?this._backgroundColor:null;C.refresh(y)}}return this.refreshHover(),this},addHover:function(w,p){if(w.__hoverMir)return;var n=new w.constructor({style:w.style,shape:w.shape,z:w.z,z2:w.z2,silent:w.silent});return n.__from=w,w.__hoverMir=n,p&&n.setStyle(p),this._hoverElements.push(n),n},removeHover:function(w){var p=w.__hoverMir,n=this._hoverElements,d=O.indexOf(n,p);d>=0&&n.splice(d,1),w.__hoverMir=null},clearHover:function(w){for(var p=this._hoverElements,n=0;n<p.length;n++){var d=p[n].__from;d&&(d.__hoverMir=null)}p.length=0},refreshHover:function(){var w=this._hoverElements,p=w.length,n=this._hoverlayer;if(n&&n.clear(),!p)return;B(w,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(i));var d={};n.ctx.save();for(var m=0;m<p;){var C=w[m],y=C.__from;if(!(y&&y.__zr)){w.splice(m,1),y.__hoverMir=null,p--;continue}m++,y.invisible||(C.transform=y.transform,C.invTransform=y.invTransform,C.__clipPaths=y.__clipPaths,this._doPaintEl(C,n,!0,d))}n.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(w,p,n){if(this._redrawId!==n)return;p=p||!1,this._updateLayerStatus(w);var d=this._doPaintList(w,p);if(this._needsManuallyCompositing&&this._compositeManually(),!d){var m=this;b(function(){m._paintList(w,p,n)})}},_compositeManually:function(){var w=this.getLayer(A).ctx,p=this._domRoot.width,n=this._domRoot.height;w.clearRect(0,0,p,n),this.eachBuiltinLayer(function(d){d.virtual&&w.drawImage(d.dom,0,0,p,n)})},_doPaintList:function(w,p){for(var n=[],d=0;d<this._zlevelList.length;d++){var m=this._zlevelList[d],C=this._layers[m];C.__builtin__&&C!==this._hoverlayer&&(C.__dirty||p)&&n.push(C)}for(var y=!0,g=0;g<n.length;g++){var C=n[g],U=C.ctx,k={};U.save();var I=p?C.__startIndex:C.__drawIndex,V=!p&&C.incremental&&Date.now,G=V&&Date.now(),L=C.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(C.__startIndex===C.__endIndex)C.clear(!1,L);else if(I===C.__startIndex){var $=w[I];(!$.incremental||!$.notClear||p)&&C.clear(!1,L)}I===-1&&(console.error("For some unknown reason. drawIndex is -1"),I=C.__startIndex);for(var Y=I;Y<C.__endIndex;Y++){var ne=w[Y];if(this._doPaintEl(ne,C,p,k),ne.__dirty=ne.__dirtyText=!1,V){var se=Date.now()-G;if(se>15)break}}C.__drawIndex=Y,C.__drawIndex<C.__endIndex&&(y=!1),k.prevElClipPaths&&U.restore(),U.restore()}return E.wxa&&O.each(this._layers,function(_e){_e&&_e.ctx&&_e.ctx.draw&&_e.ctx.draw()}),y},_doPaintEl:function(w,p,n,d){var m=p.ctx,C=w.transform;if((p.__dirty||n)&&!w.invisible&&w.style.opacity!==0&&!(C&&!C[0]&&!C[3])&&!(w.culling&&a(w,this._width,this._height))){var y=w.__clipPaths,g=d.prevElClipPaths;(!g||u(y,g))&&(g&&(m.restore(),d.prevElClipPaths=null,d.prevEl=null),y&&(m.save(),v(y,m),d.prevElClipPaths=y)),w.beforeBrush&&w.beforeBrush(m),w.brush(m,d.prevEl||null),d.prevEl=w,w.afterBrush&&w.afterBrush(m)}},getLayer:function(w,p){this._singleCanvas&&!this._needsManuallyCompositing&&(w=A);var n=this._layers[w];return n||(n=new R("zr_"+w,this,this.dpr),n.zlevel=w,n.__builtin__=!0,this._layerConfig[w]?O.merge(n,this._layerConfig[w],!0):this._layerConfig[w-h]&&O.merge(n,this._layerConfig[w-h],!0),p&&(n.virtual=p),this.insertLayer(w,n),n.initContext()),n},insertLayer:function(w,p){var n=this._layers,d=this._zlevelList,m=d.length,C=null,y=-1,g=this._domRoot;if(n[w]){K("ZLevel "+w+" has been used already");return}if(!f(p)){K("Layer of zlevel "+w+" is not valid");return}if(m>0&&w>d[0]){for(y=0;y<m-1&&!(d[y]<w&&d[y+1]>w);y++);C=n[d[y]]}if(d.splice(y+1,0,w),n[w]=p,!p.virtual)if(C){var U=C.dom;U.nextSibling?g.insertBefore(p.dom,U.nextSibling):g.appendChild(p.dom)}else g.firstChild?g.insertBefore(p.dom,g.firstChild):g.appendChild(p.dom)},eachLayer:function(w,p){var n=this._zlevelList,d,m;for(m=0;m<n.length;m++)d=n[m],w.call(p,this._layers[d],d)},eachBuiltinLayer:function(w,p){var n=this._zlevelList,d,m,C;for(C=0;C<n.length;C++)m=n[C],d=this._layers[m],d.__builtin__&&w.call(p,d,m)},eachOtherLayer:function(w,p){var n=this._zlevelList,d,m,C;for(C=0;C<n.length;C++)m=n[C],d=this._layers[m],d.__builtin__||w.call(p,d,m)},getLayers:function(){return this._layers},_updateLayerStatus:function(w){this.eachBuiltinLayer(function(k,I){k.__dirty=k.__used=!1});function p(k){m&&(m.__endIndex!==k&&(m.__dirty=!0),m.__endIndex=k)}if(this._singleCanvas)for(var n=1;n<w.length;n++){var d=w[n];if(d.zlevel!==w[n-1].zlevel||d.incremental){this._needsManuallyCompositing=!0;break}}for(var m=null,C=0,y,n=0;n<w.length;n++){var d=w[n],g=d.zlevel,U;y!==g&&(y=g,C=0),d.incremental?(U=this.getLayer(g+s,this._needsManuallyCompositing),U.incremental=!0,C=1):U=this.getLayer(g+(C>0?h:0),this._needsManuallyCompositing),U.__builtin__||K("ZLevel "+g+" has been used by unkown layer "+U.id),U!==m&&(U.__used=!0,U.__startIndex!==n&&(U.__dirty=!0),U.__startIndex=n,U.incremental?U.__drawIndex=-1:U.__drawIndex=n,p(n),m=U),d.__dirty&&(U.__dirty=!0,U.incremental&&U.__drawIndex<0&&(U.__drawIndex=n))}p(n),this.eachBuiltinLayer(function(k,I){!k.__used&&k.getElementCount()>0&&(k.__dirty=!0,k.__startIndex=k.__endIndex=k.__drawIndex=0),k.__dirty&&k.__drawIndex<0&&(k.__drawIndex=k.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(w){w.clear()},setBackgroundColor:function(w){this._backgroundColor=w},configLayer:function(w,p){if(p){var n=this._layerConfig;n[w]?O.merge(n[w],p,!0):n[w]=p;for(var d=0;d<this._zlevelList.length;d++){var m=this._zlevelList[d];if(m===w||m===w+h){var C=this._layers[m];O.merge(C,n[w],!0)}}}},delLayer:function(w){var p=this._layers,n=this._zlevelList,d=p[w];if(!d)return;d.dom.parentNode.removeChild(d.dom),delete p[w],n.splice(O.indexOf(n,w),1)},resize:function(w,p){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var d=this._opts;if(w!=null&&(d.width=w),p!=null&&(d.height=p),w=this._getSize(0),p=this._getSize(1),n.style.display="",this._width!==w||p!==this._height){n.style.width=w+"px",n.style.height=p+"px";for(var m in this._layers)this._layers.hasOwnProperty(m)&&this._layers[m].resize(w,p);O.each(this._progressiveLayers,function(C){C.resize(w,p)}),this.refresh(!0)}this._width=w,this._height=p}else{if(w==null||p==null)return;this._width=w,this._height=p,this.getLayer(A).resize(w,p)}return this},clearLayer:function(w){var p=this._layers[w];p&&p.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(w){if(w=w||{},this._singleCanvas&&!this._compositeManually)return this._layers[A].dom;var p=new R("image",this,w.pixelRatio||this.dpr);if(p.initContext(),p.clear(!1,w.backgroundColor||this._backgroundColor),w.pixelRatio<=this.dpr){this.refresh();var n=p.dom.width,d=p.dom.height,m=p.ctx;this.eachLayer(function(k){k.__builtin__?m.drawImage(k.dom,0,0,n,d):k.renderToCanvas&&(p.ctx.save(),k.renderToCanvas(p.ctx),p.ctx.restore())})}else for(var C={},y=this.storage.getDisplayList(!0),g=0;g<y.length;g++){var U=y[g];this._doPaintEl(U,p,!0,C)}return p.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(w){var p=this._opts,n=["width","height"][w],d=["clientWidth","clientHeight"][w],m=["paddingLeft","paddingTop"][w],C=["paddingRight","paddingBottom"][w];if(p[n]!=null&&p[n]!=="auto")return parseFloat(p[n]);var y=this.root,g=document.defaultView.getComputedStyle(y);return(y[d]||o(g[n])||o(y.style[n]))-(o(g[m])||0)-(o(g[C])||0)|0},pathToImage:function(w,p){p=p||this.dpr;var n=document.createElement("canvas"),d=n.getContext("2d"),m=w.getBoundingRect(),C=w.style,y=C.shadowBlur*p,g=C.shadowOffsetX*p,U=C.shadowOffsetY*p,k=C.hasStroke()?C.lineWidth:0,I=Math.max(k/2,-g+y),V=Math.max(k/2,g+y),G=Math.max(k/2,-U+y),L=Math.max(k/2,U+y),$=m.width+I+V,Y=m.height+G+L;n.width=$*p,n.height=Y*p,d.scale(p,p),d.clearRect(0,0,$,Y),d.dpr=p;var ne={position:w.position,rotation:w.rotation,scale:w.scale};w.position=[I-m.x,G-m.y],w.rotation=0,w.scale=[1,1],w.updateTransform(),w&&w.brush(d);var se=t,_e=new se({style:{x:0,y:0,image:n}});return ne.position!=null&&(_e.position=w.position=ne.position),ne.rotation!=null&&(_e.rotation=w.rotation=ne.rotation),ne.scale!=null&&(_e.scale=w.scale=ne.scale),_e}};var D=x;Xe.exports=D},"7ahc":function(Xe,le,H){"use strict";H.d(le,"a",function(){return v});var Z=H("k1fw"),Q=H("0Owb"),O=H("+L6B"),K=H("2/Rp"),M=H("y8nQ"),B=H("Vl3Y"),R=H("tJVT"),b=H("OaEy"),t=H("2fM7"),E=H("q1tI"),i=H.n(E),A=H("VrN/"),h=H.n(A),s=H("p77/"),o=H.n(s),f=H("c5Ni"),l=H.n(f),c=t.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},u={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};le.b=function(T){var x=T.callback,D=T.onCancel,w=Object(E.useState)("python"),p=Object(R.a)(w,2),n=p[0],d=p[1];function m(y){d(u[y][1])}function C(y){x(y)}return i.a.createElement(B.a,Object(Q.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),i.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(t.a,{onChange:m},Object.keys(u).map(function(y){return i.a.createElement(c,{key:y,value:y},u[y][0])}))),i.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(v,{mode:n})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(K.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function v(T){var x=T.value,D=T.onChange,w=T.mode,p=T.options,n=p===void 0?{}:p,d=Object(E.useRef)(),m=Object(E.useState)(),C=Object(R.a)(m,2),y=C[0],g=C[1];return Object(E.useEffect)(function(){if(y){function U(k){var I=k.getValue();D&&D(I)}return y.on("change",U),function(){y.off("change",U)}}},[y,D]),Object(E.useEffect)(function(){y&&y.setOption("mode",w)},[y,w]),Object(E.useEffect)(function(){y&&((x!==y.getValue()||x==="")&&setTimeout(function(){y.setValue(x||" ")},300))},[y,x]),Object(E.useEffect)(function(){if(d.current&&!y){var U=h.a.fromTextArea(d.current,Object(Z.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},n));g(U)}},[d.current,y]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:d}))}},"7ixt":function(Xe,le,H){"use strict";H.d(le,"a",function(){return O});var Z={adjustX:1,adjustY:1},Q=[0,0],O={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:Q},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:Q},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:Q},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:Q},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:Q},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:Q},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:Q},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:Q},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:Q},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:Q},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:Q},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:Q}},K=O},"7oTu":function(Xe,le,H){var Z=H("IMiH"),Q=H("QBsz"),O=Q.applyTransform,K=Z.CMD,M=[[],[],[]],B=Math.sqrt,R=Math.atan2;function b(t,E){var i=t.data,A,h,s,o,f,l,c=K.M,a=K.C,u=K.L,v=K.R,T=K.A,x=K.Q;for(s=0,o=0;s<i.length;){A=i[s++],o=s,h=0;switch(A){case c:h=1;break;case u:h=1;break;case a:h=3;break;case x:h=2;break;case T:var D=E[4],w=E[5],p=B(E[0]*E[0]+E[1]*E[1]),n=B(E[2]*E[2]+E[3]*E[3]),d=R(-E[1]/n,E[0]/p);i[s]*=p,i[s++]+=D,i[s]*=n,i[s++]+=w,i[s++]*=p,i[s++]*=n,i[s++]+=d,i[s++]+=d,s+=2,o=s;break;case v:l[0]=i[s++],l[1]=i[s++],O(l,l,E),i[o++]=l[0],i[o++]=l[1],l[0]+=i[s++],l[1]+=i[s++],O(l,l,E),i[o++]=l[0],i[o++]=l[1]}for(f=0;f<h;f++){var l=M[f];l[0]=i[s++],l[1]=i[s++],O(l,l,E),i[o++]=l[0],i[o++]=l[1]}}}Xe.exports=b},"815F":function(Xe,le,H){"use strict";H.d(le,"e",function(){return R}),H.d(le,"c",function(){return t}),H.d(le,"d",function(){return E}),H.d(le,"a",function(){return A}),H.d(le,"f",function(){return h}),H.d(le,"b",function(){return s});var Z=H("KQm4"),Q=H("VTBJ"),O=H("Ff2n"),K=H("Zm9Q"),M=H("Kwbf"),B=H("OZM5");function R(o,f){return o!=null?o:f}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function l(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(c||[]).forEach(function(u){var v=u.key,T=u.children;Object(M.a)(v!=null,"Tree node must have a certain key: [".concat(a).concat(v,"]"));var x=String(v);Object(M.a)(!f.has(x)||v===null||v===void 0,"Same 'key' exist in the Tree: ".concat(x)),f.set(x,!0),l(T,"".concat(a).concat(x," > "))})}l(o)}function t(o){function f(l){var c=Object(K.a)(l);return c.map(function(a){if(!Object(B.i)(a))return Object(M.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var u=a.key,v=a.props,T=v.children,x=Object(O.a)(v,["children"]),D=Object(Q.a)({key:u},x),w=f(T);return w.length&&(D.children=w),D}).filter(function(a){return a})}return f(o)}function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(f===!0?[]:f),c=[];function a(u){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(T,x){var D=Object(B.h)(v?v.pos:"0",x),w=R(T.key,D),p=Object(Q.a)(Object(Q.a)({},T),{},{parent:v,pos:D,children:null,data:T,isStart:[].concat(Object(Z.a)(v?v.isStart:[]),[x===0]),isEnd:[].concat(Object(Z.a)(v?v.isEnd:[]),[x===u.length-1])});return c.push(p),f===!0||l.has(w)?p.children=a(T.children||[],p):p.children=[],p})}return a(o),c}function i(o,f,l){var c;l?typeof l=="string"?c=function(v){return v[l]}:typeof l=="function"&&(c=function(v){return l(v)}):c=function(v,T){return R(v.key,T)};function a(u,v,T){var x=u?u.children:o,D=u?Object(B.h)(T.pos,v):"0";if(u){var w=c(u,D),p={node:u,index:v,pos:D,key:w,parentPos:T.node?T.pos:null,level:T.level+1};f(p)}x&&x.forEach(function(n,d){a(n,d,{node:u,pos:D,level:T?T.level+1:-1})})}a(null)}function A(o){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=f.initWrapper,c=f.processEntity,a=f.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,v={},T={},x={posEntities:v,keyEntities:T};return l&&(x=l(x)||x),i(o,function(D){var w=D.node,p=D.index,n=D.pos,d=D.key,m=D.parentPos,C=D.level,y={node:w,index:p,key:d,pos:n,level:C},g=R(d,n);v[n]=y,T[g]=y,y.parent=v[m],y.parent&&(y.parent.children=y.parent.children||[],y.parent.children.push(y)),c&&c(y,x)},u),a&&a(x),x}function h(o,f){var l=f.expandedKeys,c=f.selectedKeys,a=f.loadedKeys,u=f.loadingKeys,v=f.checkedKeys,T=f.halfCheckedKeys,x=f.dragOverNodeKey,D=f.dropPosition,w=f.keyEntities,p=w[o],n={eventKey:o,expanded:l.indexOf(o)!==-1,selected:c.indexOf(o)!==-1,loaded:a.indexOf(o)!==-1,loading:u.indexOf(o)!==-1,checked:v.indexOf(o)!==-1,halfChecked:T.indexOf(o)!==-1,pos:String(p?p.pos:""),dragOver:x===o&&D===0,dragOverGapTop:x===o&&D===-1,dragOverGapBottom:x===o&&D===1};return n}function s(o){var f=o.data,l=o.expanded,c=o.selected,a=o.checked,u=o.loaded,v=o.loading,T=o.halfChecked,x=o.dragOver,D=o.dragOverGapTop,w=o.dragOverGapBottom,p=o.pos,n=o.active,d=Object(Q.a)(Object(Q.a)({},f),{},{expanded:l,selected:c,checked:a,loaded:u,loading:v,halfChecked:T,dragOver:x,dragOverGapTop:D,dragOverGapBottom:w,pos:p,active:n});return"props"in d||Object.defineProperty(d,"props",{get:function(){return Object(M.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),d}},"8EBN":function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){"use strict";Z.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<Z.modeInfo.length;Q++){var O=Z.modeInfo[Q];O.mimes&&(O.mime=O.mimes[0])}Z.findModeByMIME=function(K){K=K.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var B=Z.modeInfo[M];if(B.mime==K)return B;if(B.mimes){for(var R=0;R<B.mimes.length;R++)if(B.mimes[R]==K)return B}}if(/\+xml$/.test(K))return Z.findModeByMIME("application/xml");if(/\+json$/.test(K))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(K){K=K.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var B=Z.modeInfo[M];if(B.ext){for(var R=0;R<B.ext.length;R++)if(B.ext[R]==K)return B}}},Z.findModeByFileName=function(K){for(var M=0;M<Z.modeInfo.length;M++){var B=Z.modeInfo[M];if(B.file&&B.file.test(K))return B}var R=K.lastIndexOf("."),b=R>-1&&K.substring(R+1,K.length);if(b)return Z.findModeByExtension(b)},Z.findModeByName=function(K){K=K.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var B=Z.modeInfo[M];if(B.name.toLowerCase()==K)return B;if(B.alias){for(var R=0;R<B.alias.length;R++)if(B.alias[R].toLowerCase()==K)return B}}}})},"8HAY":function(Xe,le,H){"use strict";H.d(le,"a",function(){return M}),H.d(le,"b",function(){return B}),H.d(le,"d",function(){return R}),H.d(le,"e",function(){return b}),H.d(le,"c",function(){return t});var Z=H("MI8n"),Q=H("pmY6"),O=H("3/fG"),K=function(E,i,A,h){function s(o){return o instanceof A?o:new A(function(f){f(o)})}return new(A||(A=Promise))(function(o,f){function l(u){try{a(h.next(u))}catch(v){f(v)}}function c(u){try{a(h.throw(u))}catch(v){f(v)}}function a(u){u.done?o(u.value):s(u.value).then(l,c)}a((h=h.apply(E,i||[])).next())})};class M extends Q.a{constructor(E,i="",A="",h=!0,s){super();this._onDidChange=this._register(new Z.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=E,this._label=i,this._cssClass=A,this._enabled=h,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(E){this._setLabel(E)}_setLabel(E){this._label!==E&&(this._label=E,this._onDidChange.fire({label:E}))}get tooltip(){return this._tooltip||""}set tooltip(E){this._setTooltip(E)}_setTooltip(E){this._tooltip!==E&&(this._tooltip=E,this._onDidChange.fire({tooltip:E}))}get class(){return this._cssClass}set class(E){this._setClass(E)}_setClass(E){this._cssClass!==E&&(this._cssClass=E,this._onDidChange.fire({class:E}))}get enabled(){return this._enabled}set enabled(E){this._setEnabled(E)}_setEnabled(E){this._enabled!==E&&(this._enabled=E,this._onDidChange.fire({enabled:E}))}get checked(){return this._checked}set checked(E){this._setChecked(E)}_setChecked(E){this._checked!==E&&(this._checked=E,this._onDidChange.fire({checked:E}))}run(E,i){return K(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(E))})}}class B extends Q.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Z.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Z.b),this.onDidRun=this._onDidRun.event}run(E,i){return K(this,void 0,void 0,function*(){if(!E.enabled)return;this._onBeforeRun.fire({action:E});let A;try{yield this.runAction(E,i)}catch(h){A=h}this._onDidRun.fire({action:E,error:A})})}runAction(E,i){return K(this,void 0,void 0,function*(){yield E.run(i)})}}class R extends M{constructor(E){super(R.ID,E,E?"separator text":"separator");this.checked=!1,this.enabled=!1}}R.ID="vs.actions.separator";class b{constructor(E,i,A,h){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=E,this.label=i,this.class=h,this._actions=A}get actions(){return this._actions}dispose(){}run(){return K(this,void 0,void 0,function*(){})}}class t extends M{constructor(){super(t.ID,O.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8XDt":function(Xe,le,H){H("qH13");var Z=H("aX58"),Q=Z.registerPainter,O=H("6fms");Q("vml",O)},"8hTe":function(Xe,le,H){Xe.exports={button:"button___1wy9m"}},"9Bee":function(Xe,le,H){"use strict";var Z=H("DYRE"),Q=H("zeV3"),O=H("+L6B"),K=H("2/Rp"),M=H("k1fw"),B=H("9og8"),R=H("tJVT"),b=H("WmNS"),t=H.n(b),E=H("q1tI"),i=H.n(E),A=H("vg9a"),h=H("DlQD"),s=H.n(h),o=H("rUJ1");function f(te,P){var j=te.match(/^(\s+)(?:```)/);if(j===null)return P;var q=j[1];return P.split(`
`).map(function(Ae){var re=Ae.match(/^\s+/);if(re===null)return Ae;var We=Object(R.a)(re,1),_t=We[0];return _t.length>=q.length?Ae.slice(q.length):Ae}).join(`
`)}var l=[],c=["<ul>"],a=new s.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function v(){l.length=0,c=["<ul>"]}var T={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(te,P,j,q){if(P>=te.length||te[P].level<=j)return P;var Ae=te[P];q.push("<li><a href='#"+Ae.anchor+"'>"+Ae.text+"</a>"),P++;var re=[];return P=x(te,P,Ae.level,re),re.length>0&&(q.push("<ul>"),re.forEach(function(We){q.push(We)}),q.push("</ul>")),q.push("</li>"),P=x(te,P,j,q),P}function D(){return x(l,0,0,c),c.push("</ul>"),c.join("")}var w={heading:function(P){var j=u.exec(P);if(j)return{type:"heading",raw:j[0],depth:j[1].length,text:j[2]}},fences:function(P){var j=this.rules.block.fences.exec(P);if(j){var q=j[0],Ae=f(q,j[3]||""),re=j[2]?j[2].trim():j[2];if(["latex","katex","math"].indexOf(re)>=0){var We=d(),_t=Ae;Ae=We,m[We]={type:"block",expression:_t}}return{type:"code",raw:q,lang:re,text:Ae}}}},p=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,d=function(){return"__special_katext_id_".concat(n++,"__")},m={};function C(){return m}function y(){n=0,m={}}function g(te){return te=te.replace(p,function(P,j){var q=d();return m[q]={type:"inline",expression:j},q}),te}var U=a.listitem;a.listitem=function(te){return U(g(te))};var k=a.paragraph;a.paragraph=function(te){return k(g(te))};var I=a.tablecell;a.tablecell=function(te,P){return I(g(te),P)},a.code=function(te,P,j){var q=(P||"").match(/\S*/)[0];return q?["latex","katex","math"].indexOf(q)>=0?"<p class='editormd-tex'>".concat(te,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(P,'">').concat(j?te:Object(o.escape)(te,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(j?te:Object(o.escape)(te,!0))+"</code></pre>"},a.heading=function(te,P,j){var q=this.options.headerPrefix+j.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:q,level:P,text:te}),"<h"+P+' id="'+q+'">'+te+"</h"+P+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:w,renderer:a});var V=s.a,G=H("SJMd"),L=H("ulZh"),$=H.n(L),Y=H("m3rI"),ne=H("Oy/b"),se=H("p5ED"),_e=H("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 ve=function(te,P){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,q){j.__proto__=q}||function(j,q){for(var Ae in q)Object.prototype.hasOwnProperty.call(q,Ae)&&(j[Ae]=q[Ae])})(te,P)};function Ce(te,P){function j(){this.constructor=te}ve(te,P),te.prototype=P===null?Object.create(P):(j.prototype=P.prototype,new j)}function De(te,P,j,q){return new(j||(j=Promise))(function(Ae,re){function We(Qt){try{Pt(q.next(Qt))}catch(wt){re(wt)}}function _t(Qt){try{Pt(q.throw(Qt))}catch(wt){re(wt)}}function Pt(Qt){var wt;Qt.done?Ae(Qt.value):(wt=Qt.value,wt instanceof j?wt:new j(function(Yt){Yt(wt)})).then(We,_t)}Pt((q=q.apply(te,P||[])).next())})}function Qe(te,P){var j,q,Ae,re,We={label:0,sent:function(){if(1&Ae[0])throw Ae[1];return Ae[1]},trys:[],ops:[]};return re={next:_t(0),throw:_t(1),return:_t(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function _t(Pt){return function(Qt){return function(wt){if(j)throw new TypeError("Generator is already executing.");for(;We;)try{if(j=1,q&&(Ae=2&wt[0]?q.return:wt[0]?q.throw||((Ae=q.return)&&Ae.call(q),0):q.next)&&!(Ae=Ae.call(q,wt[1])).done)return Ae;switch(q=0,Ae&&(wt=[2&wt[0],Ae.value]),wt[0]){case 0:case 1:Ae=wt;break;case 4:return We.label++,{value:wt[1],done:!1};case 5:We.label++,q=wt[1],wt=[0];continue;case 7:wt=We.ops.pop(),We.trys.pop();continue;default:if(!(Ae=We.trys,(Ae=Ae.length>0&&Ae[Ae.length-1])||wt[0]!==6&&wt[0]!==2)){We=0;continue}if(wt[0]===3&&(!Ae||wt[1]>Ae[0]&&wt[1]<Ae[3])){We.label=wt[1];break}if(wt[0]===6&&We.label<Ae[1]){We.label=Ae[1],Ae=wt;break}if(Ae&&We.label<Ae[2]){We.label=Ae[2],We.ops.push(wt);break}Ae[2]&&We.ops.pop(),We.trys.pop();continue}wt=P.call(te,We)}catch(Yt){wt=[6,Yt],q=0}finally{j=Ae=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([Pt,Qt])}}}function Se(){for(var te=0,P=0,j=arguments.length;P<j;P++)te+=arguments[P].length;var q=Array(te),Ae=0;for(P=0;P<j;P++)for(var re=arguments[P],We=0,_t=re.length;We<_t;We++,Ae++)q[Ae]=re[We];return q}var Ie=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(P,j){for(var q=0,Ae=j;q<Ae.length;q++){var re=Ae[q],We=re[0],_t=re[1];P.setAttribute(We,_t)}},te.createRect=function(P,j,q){var Ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ae.setAttribute("width",P.toString()),Ae.setAttribute("height",j.toString()),q&&te.setAttributes(Ae,q),Ae},te.createLine=function(P,j,q,Ae,re){var We=document.createElementNS("http://www.w3.org/2000/svg","line");return We.setAttribute("x1",P.toString()),We.setAttribute("y1",j.toString()),We.setAttribute("x2",q.toString()),We.setAttribute("y2",Ae.toString()),re&&te.setAttributes(We,re),We},te.createPolygon=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return q.setAttribute("points",P),j&&te.setAttributes(q,j),q},te.createCircle=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","circle");return q.setAttribute("cx",(P/2).toString()),q.setAttribute("cy",(P/2).toString()),q.setAttribute("r",P.toString()),j&&te.setAttributes(q,j),q},te.createEllipse=function(P,j,q){var Ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ae.setAttribute("cx",(P/2).toString()),Ae.setAttribute("cy",(j/2).toString()),Ae.setAttribute("rx",(P/2).toString()),Ae.setAttribute("ry",(j/2).toString()),q&&te.setAttributes(Ae,q),Ae},te.createGroup=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","g");return P&&te.setAttributes(j,P),j},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(P,j,q,Ae,re,We,_t){var Pt=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(Pt,[["id",P],["orient",j],["markerWidth",q.toString()],["markerHeight",Ae.toString()],["refX",re.toString()],["refY",We.toString()]]),Pt.appendChild(_t),Pt},te.createText=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","text");return j.setAttribute("x","0"),j.setAttribute("y","0"),P&&te.setAttributes(j,P),j},te.createTSpan=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return q.textContent=P,j&&te.setAttributes(q,j),q},te.createImage=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","image");return P&&te.setAttributes(j,P),j},te.createPoint=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return q.x=P,q.y=j,q},te.createPath=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","path");return q.setAttribute("d",P),j&&te.setAttributes(q,j),q},te}(),Je=function(){function te(){}return te.addKey=function(P){te.key=P},Object.defineProperty(te,"isLicensed",{get:function(){return!!te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(te.key)},enumerable:!1,configurable:!0}),te}(),Et=function(){function te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return te.prototype.rasterize=function(P,j,q){var Ae=this;return new Promise(function(re){var We=q!==void 0?q:document.createElement("canvas");P===null&&(Ae.markersOnly=!0,Ae.naturalSize=!1);var _t=document.createElementNS("http://www.w3.org/2000/svg","svg");_t.setAttribute("xmlns","http://www.w3.org/2000/svg"),_t.setAttribute("width",j.width.baseVal.valueAsString),_t.setAttribute("height",j.height.baseVal.valueAsString),_t.setAttribute("viewBox","0 0 "+j.viewBox.baseVal.width.toString()+" "+j.viewBox.baseVal.height.toString()),_t.innerHTML=j.innerHTML,Ae.naturalSize===!0?(_t.width.baseVal.value=P.naturalWidth,_t.height.baseVal.value=P.naturalHeight):Ae.width!==void 0&&Ae.height!==void 0&&(_t.width.baseVal.value=Ae.width,_t.height.baseVal.value=Ae.height),We.width=_t.width.baseVal.value,We.height=_t.height.baseVal.value;var Pt=_t.outerHTML,Qt=We.getContext("2d");Ae.markersOnly!==!0&&Qt.drawImage(P,0,0,We.width,We.height);var wt=window.URL,Yt=new Image(We.width,We.height);Yt.setAttribute("crossOrigin","anonymous");var Xt=new Blob([Pt],{type:"image/svg+xml"}),qt=wt.createObjectURL(Xt);Yt.onload=function(){Qt.drawImage(Yt,0,0),wt.revokeObjectURL(qt);var cr=We.toDataURL(Ae.imageType,Ae.imageQuality);re(cr)},Yt.src=qt})},te}(),Le=function(){},je=function(){function te(P){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+P+"_"}return Object.defineProperty(te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(te.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(te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),te.prototype.addClass=function(P){return this.styleSheet===void 0&&this.addStyleSheet(),P.name=""+this.classNamePrefix+P.localName,this.classes.push(P),this.styleSheet.sheet.insertRule("."+P.name+" {"+P.style+"}",this.styleSheet.sheet.cssRules.length),P},te.prototype.addRule=function(P){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(P),this.styleSheet.sheet.insertRule(P.selector+" {"+P.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var P;this.styleSheet=document.createElement("style"),((P=this.styleSheetRoot)!==null&&P!==void 0?P:document.head).appendChild(this.styleSheet),this.addRule(new st("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new st("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new he("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new he("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},te.prototype.removeStyleSheet=function(){var P;this.styleSheet&&(((P=this.styleSheetRoot)!==null&&P!==void 0?P:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),st=function(te,P){this.selector=te,this.style=P},he=function(te,P){this.localName=te,this.style=P},ie=function(){function te(P,j,q,Ae,re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=P,this.displayMode=j,this.markerItems=q,this.uiStyleSettings=Ae,this.styles=re,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return te.prototype.show=function(P){var j=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=P,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var q=document.createElement("div");q.className=this.toolbarBlockStyleClass.name,q.style.whiteSpace="nowrap",this.uiContainer.appendChild(q),this.addActionButton(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(q,'<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(re){var We=document.createElement("div");We.className=""+j.toolbarButtonStyleClass.name,We.setAttribute("data-type-name",re.typeName),We.innerHTML=re.icon,We.addEventListener("click",function(){j.markerToolbarButtonClicked(We,re)}),j.buttons.push(We),j.markerButtons.push(We)}),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 Ae=document.createElement("div");Ae.className=this.toolbarBlockStyleClass.name,Ae.style.whiteSpace="nowrap",Ae.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ae),this.addActionButton(Ae,'<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(Ae,'<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()},te.prototype.addButtonClickListener=function(P){this.buttonClickListeners.push(P)},te.prototype.removeButtonClickListener=function(P){this.buttonClickListeners.indexOf(P)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(P),1)},te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var P=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var j=0;j<this.markerButtons.length;j++)j<P||j===P&&this.markerButtons.length-1===P?this.markerButtonBlock.appendChild(this.markerButtons[j]):(j===P&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[j]))}},te.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")},te.prototype.resetButtonStyles=function(){var P=this;this.buttons.forEach(function(j){j.className=j.className.replace(P.uiStyleSettings.toolbarButtonStyleColorsClassName?P.uiStyleSettings.toolbarButtonStyleColorsClassName:P.toolbarButtonStyleColorsClass.name,"").trim(),j.className=j.className.replace(P.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?P.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:P.toolbarActiveButtonStyleColorsClass.name,"").trim(),j.className+=" "+(P.uiStyleSettings.toolbarButtonStyleColorsClassName?P.uiStyleSettings.toolbarButtonStyleColorsClassName:P.toolbarButtonStyleColorsClass.name)})},te.prototype.addActionButton=function(P,j,q){var Ae=this,re=document.createElement("div");switch(re.className=""+this.toolbarButtonStyleClass.name,re.innerHTML=j,re.setAttribute("data-action",q),re.addEventListener("click",function(){Ae.actionToolbarButtonClicked(re,q)}),q){case"select":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":re.style.fill=this.uiStyleSettings.closeButtonColor}P.appendChild(re),this.buttons.push(re)},te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new he("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 he("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new he("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new he("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 he("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var P=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new he("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
padding: `+P+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new he("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new he("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new st("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},te.prototype.markerToolbarButtonClicked=function(P,j){this.setActiveButton(P),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("marker",j)}),this.markerButtonOverflowBlock.style.display="none"},te.prototype.actionToolbarButtonClicked=function(P,j){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("action",j)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},te.prototype.setActiveButton=function(P){this.resetButtonStyles(),P.className=P.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),P.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},te.prototype.setActiveMarkerButton=function(P){var j=this.markerButtons.find(function(q){return q.getAttribute("data-type-name")===P});j&&this.setActiveButton(j)},te.prototype.setCurrentMarker=function(P){var j=this;this.currentMarker=P,this.buttons.filter(function(q){return/delete|notes/.test(q.getAttribute("data-action"))}).forEach(function(q){j.currentMarker===void 0?(q.style.fillOpacity="0.4",q.style.pointerEvents="none"):(q.style.fillOpacity="1",q.style.pointerEvents="all")})},te}(),oe=function(){function te(P,j,q,Ae){this.panels=[],this.panelButtons=[],this.markerjsContainer=P,this.displayMode=j,this.uiStyleSettings=q,this.styles=Ae,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return te.prototype.addStyles=function(){var P;this.toolboxStyleClass=this.styles.addClass(new he("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 he("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var j=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new he("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new he("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new he("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 he("toolbox-panel-row_colors",`
background-color: `+((P=this.uiStyleSettings.toolboxBackgroundColor)!==null&&P!==void 0?P:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new he("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*j)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*j)+`px;
padding: `+j+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new he("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new he("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new st("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new st("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},te.prototype.show=function(P){var j;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=P,this.uiContainer.className=this.toolboxStyleClass.name+" "+((j=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&j!==void 0?j:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},te.prototype.setPanelButtons=function(P){var j,q,Ae=this;this.panels=P,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((j=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&j!==void 0?j:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((q=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&q!==void 0?q:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(re){var We;re.uiStyleSettings=Ae.uiStyleSettings;var _t=document.createElement("div");_t.className=Ae.toolboxButtonStyleClass.name+" "+((We=Ae.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&We!==void 0?We:Ae.toolboxButtonStyleColorsClass.name),_t.innerHTML=re.icon,_t.title=re.title,_t.addEventListener("click",function(){Ae.panelButtonClick(re)}),Ae.panelButtons.push(_t),Ae.buttonRow.appendChild(_t)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},te.prototype.panelButtonClick=function(P){var j=this,q=-1;if(P!==this.activePanel){q=this.panels.indexOf(P),this.panelRow.innerHTML="";var Ae=P.getUi();Ae.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ae),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=P}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){j.displayMode==="inline"?j.panelRow.style.display="none":j.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(re,We){var _t,Pt;re.className=j.toolboxButtonStyleClass.name+" "+(We===q?""+((_t=j.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&_t!==void 0?_t:j.toolboxActiveButtonStyleColorsClass.name):""+((Pt=j.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:j.toolboxButtonStyleColorsClass.name))})},te}(),ee=function(te,P){this.title=te,this.icon=P},de=function(te){function P(j,q,Ae,re){var We=te.call(this,j,re||'<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 We.colors=[],We.addTransparent=!1,We.colorBoxes=[],We.colors=q,We.currentColor=Ae,We.setCurrentColor=We.setCurrentColor.bind(We),We.getColorBox=We.getColorBox.bind(We),We}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.whiteSpace="nowrap",this.colors.forEach(function(Ae){var re=j.getColorBox(Ae);q.appendChild(re),j.colorBoxes.push(re)}),q},P.prototype.getColorBox=function(j){var q=this,Ae=this.uiStyleSettings.toolbarHeight/4,re=this.uiStyleSettings.toolbarHeight-Ae,We=document.createElement("div");We.style.display="inline-block",We.style.boxSizing="content-box",We.style.width=re-2+"px",We.style.height=re-2+"px",We.style.padding="1px",We.style.marginRight="2px",We.style.marginBottom="2px",We.style.borderWidth="2px",We.style.borderStyle="solid",We.style.borderRadius=(re+2)/2+"px",We.style.borderColor=j===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",We.addEventListener("click",function(){q.setCurrentColor(j,We)});var _t=document.createElement("div");return _t.style.display="inline-block",_t.style.width=re-2+"px",_t.style.height=re-2+"px",_t.style.backgroundColor=j,_t.style.borderRadius=re/2+"px",j==="transparent"&&(_t.style.fill=this.uiStyleSettings.toolboxAccentColor,_t.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>`),We.appendChild(_t),We},P.prototype.setCurrentColor=function(j,q){var Ae=this;this.currentColor=j,this.colorBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(j)},P}(ee),we=function(){function te(P,j,q){this._state="new",this._isSelected=!1,this._container=P,this._overlayContainer=j,this.globalSettings=q,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(P){return!1},Object.defineProperty(te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},te.prototype.pointerDown=function(P,j){},te.prototype.dblClick=function(P,j){},te.prototype.manipulate=function(P){},te.prototype.pointerUp=function(P){this.stateChanged()},te.prototype.dispose=function(){},te.prototype.addMarkerVisualToContainer=function(P){this.container.childNodes.length>0?this.container.insertBefore(P,this.container.childNodes[0]):this.container.appendChild(P)},te.prototype.getState=function(){return{typeName:te.typeName,state:this.state,notes:this.notes}},te.prototype.restoreState=function(P){this._state=P.state,this.notes=P.notes},te.prototype.scale=function(P,j){},te.prototype.colorChanged=function(P){this.onColorChanged&&this.onColorChanged(P),this.stateChanged()},te.prototype.fillColorChanged=function(P){this.onFillColorChanged&&this.onFillColorChanged(P),this.stateChanged()},te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var P=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),P.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(P)&&this.onStateChanged(this)}},te.typeName="MarkerBase",te}(),Be=function(){function te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return te.prototype.findGripByVisual=function(P){return this.topLeft.ownsTarget(P)?this.topLeft:this.topCenter.ownsTarget(P)?this.topCenter:this.topRight.ownsTarget(P)?this.topRight:this.centerLeft.ownsTarget(P)?this.centerLeft:this.centerRight.ownsTarget(P)?this.centerRight:this.bottomLeft.ownsTarget(P)?this.bottomLeft:this.bottomCenter.ownsTarget(P)?this.bottomCenter:this.bottomRight.ownsTarget(P)?this.bottomRight:void 0},te}(),nt=function(){function te(){this.GRIP_SIZE=10,this.visual=Ie.createGroup(),this.visual.appendChild(Ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ie.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(P){return P===this.visual||P===this.visual.childNodes[0]||P===this.visual.childNodes[1]},te}(),at=function(){function te(){}return te.toITransformMatrix=function(P){return{a:P.a,b:P.b,c:P.c,d:P.d,e:P.e,f:P.f}},te.toSVGMatrix=function(P,j){return P.a=j.a,P.b=j.b,P.c=j.c,P.d=j.d,P.e=j.e,P.f=j.f,P},te}(),At=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.left=0,re.top=0,re.width=0,re.height=0,re.defaultSize={x:50,y:20},re.offsetX=0,re.offsetY=0,re.rotationAngle=0,re.CB_DISTANCE=10,re._suppressMarkerCreateEvent=!1,re.container.transform.baseVal.appendItem(Ie.createTransform()),re.setupControlBox(),re}return Ce(P,te),Object.defineProperty(P.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"visual",{get:function(){return this._visual},set:function(j){this._visual=j;var q=Ie.createTransform();this._visual.transform.baseVal.appendItem(q)},enumerable:!1,configurable:!0}),P.prototype.ownsTarget=function(j){return!!te.prototype.ownsTarget.call(this,j)||!!(this.controlGrips.findGripByVisual(j)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(j))},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="new"&&(this.left=j.x,this.top=j.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ae=this.unrotatePoint(j);if(this.manipulationStartX=Ae.x,this.manipulationStartY=Ae.y,this.offsetX=Ae.x-this.left,this.offsetY=Ae.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(q),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(q)){this.activeGrip=this.rotatorGrip;var re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=re.x-this.width/2,this.top=re.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var We=this.container.transform.baseVal.getItem(0);We.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(We,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},P.prototype.pointerUp=function(j){var q=this.state;te.prototype.pointerUp.call(this,j),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(j),this._state="select",q==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},P.prototype.moveVisual=function(j){this.visual.style.transform="translate("+j.x+"px, "+j.y+"px)"},P.prototype.manipulate=function(j){var q=this.unrotatePoint(j);this.state==="creating"?this.resize(j):this.state==="move"?(this.left=this.manipulationStartLeft+(q.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(q.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(q):this.state==="rotate"&&this.rotate(j)},P.prototype.resize=function(j){var q=this.manipulationStartLeft,Ae=this.manipulationStartWidth,re=this.manipulationStartTop,We=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:q=this.manipulationStartLeft+j.x-this.manipulationStartX,Ae=this.manipulationStartWidth+this.manipulationStartLeft-q;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ae=this.manipulationStartWidth+j.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:re=this.manipulationStartTop+j.y-this.manipulationStartY,We=this.manipulationStartHeight+this.manipulationStartTop-re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:We=this.manipulationStartHeight+j.y-this.manipulationStartY}Ae>=0?(this.left=q,this.width=Ae):(this.left=q+Ae,this.width=-Ae),We>=0?(this.top=re,this.height=We):(this.top=re+We,this.height=-We),this.setSize()},P.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},P.prototype.rotate=function(j){if(Math.abs(j.x-this.centerX)>.1){var q=Math.sign(j.x-this.centerX);this.rotationAngle=180*Math.atan((j.y-this.centerY)/(j.x-this.centerX))/Math.PI+90*q,this.applyRotation()}},P.prototype.applyRotation=function(){var j=this.container.transform.baseVal.getItem(0);j.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(j,0)},P.prototype.rotatePoint=function(j){if(this.rotationAngle===0)return j;var q=this.container.getCTM(),Ae=Ie.createPoint(j.x,j.y);return{x:(Ae=Ae.matrixTransform(q)).x,y:Ae.y}},P.prototype.unrotatePoint=function(j){if(this.rotationAngle===0)return j;var q=this.container.getCTM();q=q.inverse();var Ae=Ie.createPoint(j.x,j.y);return{x:(Ae=Ae.matrixTransform(q)).x,y:Ae.y}},P.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},P.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},P.prototype.setupControlBox=function(){this.controlBox=Ie.createGroup();var j=Ie.createTransform();j.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(j),this.container.appendChild(this.controlBox),this.controlRect=Ie.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=Ie.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 Be,this.addControlGrips(),this.controlBox.style.display="none"},P.prototype.adjustControlBox=function(){var j=this.controlBox.transform.baseVal.getItem(0);j.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(j,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()},P.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()},P.prototype.createGrip=function(){var j=new nt;return j.visual.transform.baseVal.appendItem(Ie.createTransform()),this.controlBox.appendChild(j.visual),j},P.prototype.positionGrips=function(){var j=this.controlGrips.topLeft.GRIP_SIZE,q=-j/2,Ae=q,re=(this.width+this.CB_DISTANCE)/2-j/2,We=(this.height+this.CB_DISTANCE)/2-j/2,_t=this.height+this.CB_DISTANCE-j/2,Pt=this.width+this.CB_DISTANCE-j/2;this.positionGrip(this.controlGrips.topLeft.visual,q,Ae),this.positionGrip(this.controlGrips.topCenter.visual,re,Ae),this.positionGrip(this.controlGrips.topRight.visual,Pt,Ae),this.positionGrip(this.controlGrips.centerLeft.visual,q,We),this.positionGrip(this.controlGrips.centerRight.visual,Pt,We),this.positionGrip(this.controlGrips.bottomLeft.visual,q,_t),this.positionGrip(this.controlGrips.bottomCenter.visual,re,_t),this.positionGrip(this.controlGrips.bottomRight.visual,Pt,_t),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,re,Ae-3*this.CB_DISTANCE)},P.prototype.positionGrip=function(j,q,Ae){var re=j.transform.baseVal.getItem(0);re.setTranslate(q,Ae),j.transform.baseVal.replaceItem(re,0)},P.prototype.hideControlBox=function(){this.controlBox.style.display="none"},P.prototype.showControlBox=function(){this.controlBox.style.display=""},P.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:at.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:at.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},te.prototype.getState.call(this))},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j);var q=j;this.left=q.left,this.top=q.top,this.width=q.width,this.height=q.height,this.rotationAngle=q.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(at.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(at.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,q.containerTransformMatrix))},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q);var Ae=this.rotatePoint({x:this.left,y:this.top}),re=this.unrotatePoint({x:Ae.x*j,y:Ae.y*q});this.left=re.x,this.top=re.y,this.width=this.width*j,this.height=this.height*q,this.adjustControlBox()},P}(we),ft=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.visual)},P.prototype.createVisual=function(){this.visual=Ie.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)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="new"&&(this.createVisual(),this.moveVisual(j),this._state="creating")},P.prototype.manipulate=function(j){te.prototype.manipulate.call(this,j)},P.prototype.resize=function(j){te.prototype.resize.call(this,j),this.setSize()},P.prototype.setSize=function(){te.prototype.setSize.call(this),Ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},P.prototype.pointerUp=function(j){te.prototype.pointerUp.call(this,j),this.setSize()},P.prototype.setStrokeColor=function(j){this.strokeColor=j,this.visual&&Ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(j),this.stateChanged()},P.prototype.setFillColor=function(j){this.fillColor=j,this.visual&&Ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},P.prototype.setStrokeWidth=function(j){this.strokeWidth=j,this.visual&&Ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},P.prototype.setStrokeDasharray=function(j){this.strokeDasharray=j,this.visual&&Ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},P.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this))},P.prototype.restoreState=function(j){var q=j;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),te.prototype.restoreState.call(this,j),this.setSize()},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.setSize()},P.title="Rectangle marker",P}(At),xt=function(te){function P(j,q,Ae,re){var We=te.call(this,j,re||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return We.widths=[],We.widthBoxes=[],We.widths=q,We.currentWidth=Ae,We.setCurrentWidth=We.setCurrentWidth.bind(We),We}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.widths.forEach(function(Ae){var re=document.createElement("div");re.style.display="flex",re.style.flexGrow="2",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=Ae===j.currentWidth?j.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){j.setCurrentWidth(Ae,re)}),q.appendChild(re);var We=document.createElement("div");We.innerText=Ae.toString(),We.style.marginRight="5px",re.appendChild(We);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.display="flex",_t.style.alignItems="center";var Pt=document.createElement("hr");Pt.style.minWidth="20px",Pt.style.border="0px",Pt.style.borderTop=Ae+"px solid "+j.uiStyleSettings.toolboxColor,Pt.style.flexGrow="2",_t.appendChild(Pt),re.appendChild(_t),j.widthBoxes.push(re)}),q},P.prototype.setCurrentWidth=function(j,q){var Ae=this;this.currentWidth=j,this.widthBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},P}(ee),It=function(te){function P(j,q,Ae,re){var We=te.call(this,j,re||'<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 We.styles=[],We.styleBoxes=[],We.styles=q,We.currentStyle=Ae,We.setCurrentStyle=We.setCurrentStyle.bind(We),We}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.styles.forEach(function(Ae){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/j.styles.length-5+"%",re.style.borderColor=Ae===j.currentStyle?j.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){j.setCurrentStyle(Ae,re)}),q.appendChild(re);var We=document.createElement("div");We.style.minHeight="20px",We.style.flexGrow="2",We.style.overflow="hidden";var _t=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+j.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ae!==""?'stroke-dasharray="'+Ae+'"':"")+` />
</svg>`;We.innerHTML=_t,re.appendChild(We),j.styleBoxes.push(re)}),q},P.prototype.setCurrentStyle=function(j,q){var Ae=this;this.currentStyle=j,this.styleBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},P}(ee),He=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.strokeColor=Ae.defaultColor,re.strokeWidth=Ae.defaultStrokeWidth,re.strokeDasharray=Ae.defaultStrokeDasharray,re.strokePanel=new de("Line color",Ae.defaultColorSet,Ae.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new xt("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new It("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ce(P,te),Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=te.prototype.getState.call(this);return j.typeName=P.typeName,j},P.typeName="FrameMarker",P.title="Frame marker",P.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',P}(ft),ke=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},ct=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.x1=0,re.y1=0,re.x2=0,re.y2=0,re.defaultLength=50,re.manipulationStartX=0,re.manipulationStartY=0,re.manipulationStartX1=0,re.manipulationStartY1=0,re.manipulationStartX2=0,re.manipulationStartY2=0,re.setupControlBox(),re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!!te.prototype.ownsTarget.call(this,j)||!(!this.grip1.ownsTarget(j)&&!this.grip2.ownsTarget(j))},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.manipulationStartX=j.x,this.manipulationStartY=j.y,this.state==="new"&&(this.x1=j.x,this.y1=j.y,this.x2=j.x,this.y2=j.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(q)?this.activeGrip=this.grip1:this.grip2.ownsTarget(q)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},P.prototype.pointerUp=function(j){var q=this.state;te.prototype.pointerUp.call(this,j),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(j),this._state="select",q==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},P.prototype.adjustVisual=function(){},P.prototype.manipulate=function(j){this.state==="creating"?this.resize(j):this.state==="move"?(this.x1=this.manipulationStartX1+j.x-this.manipulationStartX,this.y1=this.manipulationStartY1+j.y-this.manipulationStartY,this.x2=this.manipulationStartX2+j.x-this.manipulationStartX,this.y2=this.manipulationStartY2+j.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(j)},P.prototype.resize=function(j){switch(this.activeGrip){case this.grip1:this.x1=j.x,this.y1=j.y;break;case this.grip2:case void 0:this.x2=j.x,this.y2=j.y}this.adjustVisual(),this.adjustControlBox()},P.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},P.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},P.prototype.setupControlBox=function(){this.controlBox=Ie.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},P.prototype.adjustControlBox=function(){this.positionGrips()},P.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},P.prototype.createGrip=function(){var j=new nt;return j.visual.transform.baseVal.appendItem(Ie.createTransform()),this.controlBox.appendChild(j.visual),j},P.prototype.positionGrips=function(){var j=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-j/2,this.y1-j/2),this.positionGrip(this.grip2.visual,this.x2-j/2,this.y2-j/2)},P.prototype.positionGrip=function(j,q,Ae){var re=j.transform.baseVal.getItem(0);re.setTranslate(q,Ae),j.transform.baseVal.replaceItem(re,0)},P.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},te.prototype.getState.call(this))},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j);var q=j;this.x1=q.x1,this.y1=q.y1,this.x2=q.x2,this.y2=q.y2},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.x1=this.x1*j,this.y1=this.y1*q,this.x2=this.x2*j,this.y2=this.y2*q,this.adjustVisual(),this.adjustControlBox()},P}(we),gt=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.strokeColor=Ae.defaultColor,re.strokeWidth=Ae.defaultStrokeWidth,re.strokeDasharray=Ae.defaultStrokeDasharray,re.strokePanel=new de("Line color",Ae.defaultColorSet,Ae.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new xt("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new It("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.visual&&j!==this.selectorLine&&j!==this.visibleLine)},P.prototype.createVisual=function(){this.visual=Ie.createGroup(),this.selectorLine=Ie.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ie.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)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},P.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()),Ie.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ie.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ie.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},P.prototype.setStrokeColor=function(j){this.strokeColor=j,this.adjustVisual(),this.colorChanged(j)},P.prototype.setStrokeWidth=function(j){this.strokeWidth=j,this.adjustVisual()},P.prototype.setStrokeDasharray=function(j){this.strokeDasharray=j,this.adjustVisual(),this.stateChanged()},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j);var q=j;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.createVisual(),this.adjustVisual()},P.typeName="LineMarker",P.title="Line marker",P.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',P}(ct),Ze=function(te){function P(j,q,Ae,re){var We=te.call(this,j,re||'<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 We.fonts=[],We.fontBoxes=[],We.fonts=q,We.currentFont=Ae,We.setCurrentFont=We.setCurrentFont.bind(We),We}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.flexGrow="2",this.fonts.forEach(function(Ae){var re=document.createElement("div");re.style.display="inline-block",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/j.fonts.length-5+"%",re.style.borderColor=Ae===j.currentFont?j.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){j.setCurrentFont(Ae,re)}),q.appendChild(re);var We=document.createElement("div");We.style.display="flex",We.style.minHeight="20px",We.style.flexGrow="2",We.style.fontFamily=Ae,We.style.overflow="hidden";var _t=document.createElement("div");_t.style.whiteSpace="nowrap",_t.style.overflow="hidden",_t.style.textOverflow="ellipsis",_t.innerHTML="The quick brown fox jumps over the lazy dog",We.appendChild(_t),re.appendChild(We),j.fontBoxes.push(re)}),q},P.prototype.setCurrentFont=function(j,q){var Ae=this;this.currentFont=j,this.fontBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},P}(ee),ot=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.color="transparent",re.padding=5,re.DEFAULT_TEXT="your text here",re.text=re.DEFAULT_TEXT,re.isMoved=!1,re.color=Ae.defaultColor,re.fontFamily=Ae.defaultFontFamily,re.defaultSize={x:100,y:30},re.setColor=re.setColor.bind(re),re.setFont=re.setFont.bind(re),re.renderText=re.renderText.bind(re),re.sizeText=re.sizeText.bind(re),re.textEditDivClicked=re.textEditDivClicked.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.setSize=re.setSize.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.colorPanel=new de("Color",Ae.defaultColorSet,Ae.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.fontFamilyPanel=new Ze("Font",Ae.defaultFontFamilies,Ae.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re}return Ce(P,te),P.prototype.ownsTarget=function(j){if(te.prototype.ownsTarget.call(this,j)||j===this.visual||j===this.textElement||j===this.bgRectangle)return!0;var q=!1;return this.textElement.childNodes.forEach(function(Ae){Ae===j&&(q=!0)}),q},P.prototype.createVisual=function(){this.visual=Ie.createGroup(),this.bgRectangle=Ie.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ie.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ie.createTransform()),this.textElement.transform.baseVal.appendItem(Ie.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.isMoved=!1,this.pointerDownPoint=j,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(j),this._state="creating")},P.prototype.renderText=function(){var j=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(q){j.textElement.appendChild(Ie.createTSpan(q.trim()===""?" ":q.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},P.prototype.getTextScale=function(){var j=this.textElement.getBBox(),q=1;if(j.width>0&&j.height>0){var Ae=(1*this.width-this.width*this.padding*2/100)/j.width,re=(1*this.height-this.height*this.padding*2/100)/j.height;q=Math.min(Ae,re)}return q},P.prototype.getTextPosition=function(j){var q=this.textElement.getBBox(),Ae=0,re=0;return q.width>0&&q.height>0&&(Ae=(this.width-q.width*j)/2,re=this.height/2-q.height*j/2),{x:Ae,y:re}},P.prototype.sizeText=function(){var j=this.textElement.getBBox(),q=this.getTextScale(),Ae=this.getTextPosition(q);Ae.y-=j.y*q,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ae.x+"px, "+Ae.y+"px) scale("+q+", "+q+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ae.x,Ae.y),this.textElement.transform.baseVal.getItem(1).setScale(q,q))},P.prototype.manipulate=function(j){te.prototype.manipulate.call(this,j),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(j.x-this.pointerDownPoint.x)>5||Math.abs(j.y-this.pointerDownPoint.y)>5)},P.prototype.resize=function(j){te.prototype.resize.call(this,j),this.isMoved=!0,this.setSize(),this.sizeText()},P.prototype.setSize=function(){te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ie.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},P.prototype.pointerUp=function(j){var q=this.state;q==="creating"&&(this._suppressMarkerCreateEvent=!0),te.prototype.pointerUp.call(this,j),this.setSize(),(q==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},P.prototype.showTextEditor=function(){var j=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(q){q.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var q=Number.parseFloat(j.textEditor.style.fontSize);j.textEditor.clientWidth>=Number.parseInt(j.textEditor.style.maxWidth)&&q>.9;)q-=.1,j.textEditor.style.fontSize=Math.max(q,.9)+"em"}),this.textEditor.addEventListener("keyup",function(q){q.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(q){if(q.clipboardData){var Ae=q.clipboardData.getData("text"),re=window.getSelection();if(!re.rangeCount)return!1;re.deleteFromDocument(),re.getRangeAt(0).insertNode(document.createTextNode(Ae)),q.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){j.textEditDivClicked(j.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},P.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var j=this.getTextScale(),q=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ae=this.textElement.getBBox(),re={x:Ae.width*j,y:Ae.height*j};q.x-=re.x/2,q.y-=re.y/2,this.textEditor.style.top=q.y+"px",this.textEditor.style.left=q.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-q.x+"px",this.textEditor.style.fontSize=Math.max(16*j,12)+"px",this.textElement.style.display="none"}},P.prototype.textEditDivClicked=function(j){this.text=j.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},P.prototype.select=function(){te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},P.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),te.prototype.deselect.call(this)},P.prototype.dblClick=function(j,q){te.prototype.dblClick.call(this,j,q),this.showTextEditor()},P.prototype.setColor=function(j){this.textElement&&Ie.setAttributes(this.textElement,[["fill",j]]),this.color=j,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(j)},P.prototype.setFont=function(j){this.textElement&&Ie.setAttributes(this.textElement,[["font-family",j]]),this.fontFamily=j,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},P.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},P.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){var q=j;this.color=q.color,this.fontFamily=q.fontFamily,this.padding=q.padding,this.text=q.text,this.createVisual(),te.prototype.restoreState.call(this,j),this.setSize()},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.setSize(),this.sizeText(),this.positionTextEditor()},P.typeName="TextMarker",P.title="Text marker",P.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>',P}(At),Ke=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.color="transparent",re.lineWidth=3,re.drawing=!1,re.pixelRatio=1,re.color=Ae.defaultColor,re.lineWidth=Ae.defaultStrokeWidth,re.pixelRatio=Ae.freehandPixelRatio,re.setColor=re.setColor.bind(re),re.addCanvas=re.addCanvas.bind(re),re.finishCreation=re.finishCreation.bind(re),re.setLineWidth=re.setLineWidth.bind(re),re.colorPanel=new de("Color",Ae.defaultColorSet,Ae.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.lineWidthPanel=new xt("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),re.lineWidthPanel.onWidthChanged=re.setLineWidth,re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.visual&&j!==this.drawingImage)},P.prototype.createVisual=function(){this.visual=Ie.createGroup(),this.drawingImage=Ie.createImage(),this.visual.appendChild(this.drawingImage);var j=Ie.createTransform();this.visual.transform.baseVal.appendItem(j),this.addMarkerVisualToContainer(this.visual)},P.prototype.pointerDown=function(j,q){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(j.x,j.y),this.drawing=!0):te.prototype.pointerDown.call(this,j,q)},P.prototype.manipulate=function(j){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(j.x,j.y),this.canvasContext.stroke()):te.prototype.manipulate.call(this,j)},P.prototype.resize=function(j){te.prototype.resize.call(this,j),Ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},P.prototype.pointerUp=function(j){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):te.prototype.pointerUp.call(this,j)},P.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)},P.prototype.select=function(){this.state==="creating"&&this.finishCreation(),te.prototype.select.call(this)},P.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),te.prototype.deselect.call(this)},P.prototype.finishCreation=function(){for(var j=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),q=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ae=q[0],re=q[1],We=q[2],_t=q[3],Pt=!1,Qt=0;Qt<this.canvasElement.height;Qt++)for(var wt=0;wt<this.canvasElement.width;wt++)j.data[Qt*this.canvasElement.width*4+4*wt+3]>0&&(Pt=!0,Qt<re&&(re=Qt),wt<Ae&&(Ae=wt),Qt>_t&&(_t=Qt),wt>We&&(We=wt));if(Pt){this.left=Ae/this.pixelRatio,this.top=re/this.pixelRatio,this.width=(We-Ae)/this.pixelRatio,this.height=(_t-re)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=We-Ae,Yt.height=_t-re,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(Ae,re,We-Ae,_t-re),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},P.prototype.setDrawingImage=function(){Ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ie.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},P.prototype.setColor=function(j){this.color=j,this.colorChanged(j)},P.prototype.setLineWidth=function(j){this.lineWidth=j},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({drawingImgUrl:this.drawingImgUrl},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){this.createVisual(),te.prototype.restoreState.call(this,j),this.drawingImgUrl=j.drawingImgUrl,this.setDrawingImage()},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.setDrawingImage()},P.typeName="FreehandMarker",P.title="Freehand marker",P.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>',P}(At),Me=function(te){function P(j,q,Ae){var re=te.call(this,j,Ae||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return re.typeBoxes=[],re.currentType=q,re.setCurrentType=re.setCurrentType.bind(re),re}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2";for(var Ae=function(_t){var Pt="both";switch(_t){case 0:Pt="both";break;case 1:Pt="start";break;case 2:Pt="end";break;case 3:Pt="none"}var Qt=document.createElement("div");if(Qt.style.display="flex",Qt.style.flexGrow="2",Qt.style.alignItems="center",Qt.style.justifyContent="space-between",Qt.style.padding="5px",Qt.style.borderWidth="2px",Qt.style.borderStyle="solid",Qt.style.borderColor=Pt===re.currentType?re.uiStyleSettings.toolboxAccentColor:"transparent",Qt.addEventListener("click",function(){j.setCurrentType(Pt,Qt)}),q.appendChild(Qt),Pt==="both"||Pt==="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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,wt.style.marginLeft="5px",Qt.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 "+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee"),Xt.style.flexGrow="2",Yt.appendChild(Xt),Qt.appendChild(Yt),Pt==="both"||Pt==="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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,qt.style.marginRight="5px",Qt.appendChild(qt)}re.typeBoxes.push(Qt)},re=this,We=0;We<4;We++)Ae(We);return q},P.prototype.setCurrentType=function(j,q){var Ae=this;this.currentType=j,this.typeBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings!==void 0?Ae.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},P}(ee),Ue=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.arrowType="end",re.arrowBaseHeight=10,re.arrowBaseWidth=10,re.getArrowPoints=re.getArrowPoints.bind(re),re.setArrowType=re.setArrowType.bind(re),re.arrowTypePanel=new Me("Arrow type","end"),re.arrowTypePanel.onArrowTypeChanged=re.setArrowType,re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.arrow1&&j!==this.arrow2)},P.prototype.getArrowPoints=function(j,q){var Ae=this.arrowBaseWidth+2*this.strokeWidth,re=this.arrowBaseHeight+2*this.strokeWidth;return j-Ae/2+","+(q+re/2)+" "+j+","+(q-re/2)+" "+(j+Ae/2)+","+(q+re/2)},P.prototype.createTips=function(){this.arrow1=Ie.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ie.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ie.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ie.createTransform()),this.visual.appendChild(this.arrow2)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="creating"&&this.createTips()},P.prototype.adjustVisual=function(){if(te.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",Ie.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ie.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var j=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),q=this.arrow1.transform.baseVal.getItem(0);q.setRotate(j,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(q,0);var Ae=this.arrow2.transform.baseVal.getItem(0);Ae.setRotate(j+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ae,0)}},P.prototype.setArrowType=function(j){this.arrowType=j,this.adjustVisual(),this.stateChanged()},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({arrowType:this.arrowType},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j);var q=j;this.arrowType=q.arrowType,this.createTips(),this.adjustVisual()},P.typeName="ArrowMarker",P.title="Arrow marker",P.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',P}(gt),ge=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.fillColor=Ae.defaultFillColor,re.strokeWidth=0,re.fillPanel=new de("Color",Ae.defaultColorSet,Ae.defaultFillColor),re.fillPanel.onColorChanged=re.setFillColor,re}return Ce(P,te),Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=te.prototype.getState.call(this);return j.typeName=P.typeName,j},P.typeName="CoverMarker",P.title="Cover marker",P.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',P}(ft),xe=function(te){function P(j,q,Ae,re){var We=te.call(this,j,re||'<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 We.opacities=[],We.opacityBoxes=[],We.opacities=q,We.currentOpacity=Ae,We.setCurrentOpacity=We.setCurrentOpacity.bind(We),We}return Ce(P,te),P.prototype.getUi=function(){var j=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",q.style.justifyContent="space-between",this.opacities.forEach(function(Ae){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="center",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=Ae===j.currentOpacity?j.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){j.setCurrentOpacity(Ae,re)}),q.appendChild(re);var We=document.createElement("div");We.innerText=100*Ae+"%",re.appendChild(We),j.opacityBoxes.push(re)}),q},P.prototype.setCurrentOpacity=function(j,q){var Ae=this;this.currentOpacity=j,this.opacityBoxes.forEach(function(re){re.style.borderColor=re===q?Ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},P}(ee),Ee=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.setOpacity=re.setOpacity.bind(re),re.fillColor=Ae.defaultHighlightColor,re.strokeWidth=0,re.opacity=Ae.defaultHighlightOpacity,re.fillPanel=new de("Color",Ae.defaultColorSet,re.fillColor),re.fillPanel.onColorChanged=re.setFillColor,re.opacityPanel=new xe("Opacity",Ae.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return Ce(P,te),P.prototype.setOpacity=function(j){this.opacity=j,this.visual&&Ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=te.prototype.getState.call(this);return j.typeName=P.typeName,j},P.typeName="HighlightMarker",P.title="Highlight marker",P.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>',P}(ge),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>',Fe=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.bgColor="transparent",re.tipPosition={x:0,y:0},re.tipBase1Position={x:0,y:0},re.tipBase2Position={x:0,y:0},re.tipMoving=!1,re.color=Ae.defaultStrokeColor,re.bgColor=Ae.defaultFillColor,re.fontFamily=Ae.defaultFontFamily,re.defaultSize={x:100,y:30},re.setBgColor=re.setBgColor.bind(re),re.getTipPoints=re.getTipPoints.bind(re),re.positionTip=re.positionTip.bind(re),re.setTipPoints=re.setTipPoints.bind(re),re.colorPanel=new de("Text color",Ae.defaultColorSet,re.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>'),re.colorPanel.onColorChanged=re.setColor,re.bgColorPanel=new de("Fill color",Ae.defaultColorSet,re.bgColor,Oe),re.bgColorPanel.onColorChanged=re.setBgColor,re.fontFamilyPanel=new Ze("Font",Ae.defaultFontFamilies,Ae.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.tipGrip=new nt,re.tipGrip.visual.transform.baseVal.appendItem(Ie.createTransform()),re.controlBox.appendChild(re.tipGrip.visual),re}return Ce(P,te),P.prototype.ownsTarget=function(j){return te.prototype.ownsTarget.call(this,j)||this.tipGrip.ownsTarget(j)||this.tip===j},P.prototype.createTip=function(){Ie.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ie.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},P.prototype.pointerDown=function(j,q){this.state==="new"&&te.prototype.pointerDown.call(this,j,q),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(q)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):te.prototype.pointerDown.call(this,j,q)},P.prototype.pointerUp=function(j){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,te.prototype.pointerUp.call(this,j);else{var q=this.state==="creating";te.prototype.pointerUp.call(this,j),this.setTipPoints(q),this.positionTip()}},P.prototype.manipulate=function(j){if(this.tipMoving){var q=this.unrotatePoint(j);this.tipPosition={x:q.x-this.manipulationStartLeft,y:q.y-this.manipulationStartTop},this.positionTip()}else te.prototype.manipulate.call(this,j)},P.prototype.setBgColor=function(j){this.bgRectangle&&this.tip&&(Ie.setAttributes(this.bgRectangle,[["fill",j]]),Ie.setAttributes(this.tip,[["fill",j]])),this.bgColor=j,this.fillColorChanged(j)},P.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},P.prototype.setTipPoints=function(j){j===void 0&&(j=!1);var q=Math.min(this.height/2,15),Ae=this.height/5;j&&(this.tipPosition={x:q+Ae/2,y:this.height+20});var re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ae=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:0},this.tipBase2Position={x:q+Ae,y:0}):(this.tipBase1Position={x:0,y:q},this.tipBase2Position={x:0,y:q+Ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ae=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-Ae,y:0},this.tipBase2Position={x:this.width-q,y:0}):(this.tipBase1Position={x:this.width,y:q},this.tipBase2Position={x:this.width,y:q+Ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ae=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-Ae,y:this.height},this.tipBase2Position={x:this.width-q,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-q-Ae},this.tipBase2Position={x:this.width,y:this.height-q}):re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ae=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:this.height},this.tipBase2Position={x:q+Ae,y:this.height}):(this.tipBase1Position={x:0,y:this.height-q},this.tipBase2Position={x:0,y:this.height-q-Ae})},P.prototype.resize=function(j){te.prototype.resize.call(this,j),this.positionTip()},P.prototype.positionTip=function(){Ie.setAttributes(this.tip,[["points",this.getTipPoints()]]);var j=this.tipGrip.visual.transform.baseVal.getItem(0);j.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(j,0)},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),P.prototype.select=function(){this.positionTip(),te.prototype.select.call(this)},P.prototype.getState=function(){var j=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){var q=j;this.bgColor=q.bgColor,this.tipPosition=q.tipPosition,te.prototype.restoreState.call(this,j),this.createTip(),this.setTipPoints()},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.tipPosition={x:this.tipPosition.x*j,y:this.tipPosition.y*q},this.positionTip()},P.typeName="CalloutMarker",P.title="Callout marker",P.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>',P}(ot),$e=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.strokeColor=Ae.defaultColor,re.strokeWidth=Ae.defaultStrokeWidth,re.strokeDasharray=Ae.defaultStrokeDasharray,re.fillColor=Ae.defaultFillColor,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.setOpacity=re.setOpacity.bind(re),re.createVisual=re.createVisual.bind(re),re.strokePanel=new de("Line color",Se(Ae.defaultColorSet,["transparent"]),Ae.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new de("Fill color",Se(Ae.defaultColorSet,["transparent"]),re.fillColor,Oe),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new xt("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new It("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.opacityPanel=new xe("Opacity",Ae.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.visual)},P.prototype.createVisual=function(){this.visual=Ie.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)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="new"&&(this.createVisual(),this.moveVisual(j),this._state="creating")},P.prototype.manipulate=function(j){te.prototype.manipulate.call(this,j)},P.prototype.resize=function(j){te.prototype.resize.call(this,j),this.setSize()},P.prototype.setSize=function(){te.prototype.setSize.call(this),Ie.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},P.prototype.pointerUp=function(j){te.prototype.pointerUp.call(this,j),this.setSize()},P.prototype.setStrokeColor=function(j){this.strokeColor=j,this.visual&&Ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(j),this.stateChanged()},P.prototype.setFillColor=function(j){this.fillColor=j,this.visual&&Ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(j),this.stateChanged()},P.prototype.setStrokeWidth=function(j){this.strokeWidth=j,this.visual&&Ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},P.prototype.setStrokeDasharray=function(j){this.strokeDasharray=j,this.visual&&Ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},P.prototype.setOpacity=function(j){this.opacity=j,this.visual&&Ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){var q=j;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),te.prototype.restoreState.call(this,j),this.setSize()},P.prototype.scale=function(j,q){te.prototype.scale.call(this,j,q),this.setSize()},P.typeName="EllipseMarker",P.title="Ellipse marker",P.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>',P}(At),pt=function(te){function P(j,q,Ae){return te.call(this,j,q,Ae)||this}return Ce(P,te),Object.defineProperty(P.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.tip1&&j!==this.tip2)},P.prototype.createTips=function(){this.tip1=Ie.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(Ie.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ie.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(Ie.createTransform()),this.visual.appendChild(this.tip2)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.state==="creating"&&this.createTips()},P.prototype.adjustVisual=function(){if(te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ie.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()]]),Ie.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 j=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),q=this.tip1.transform.baseVal.getItem(0);q.setRotate(j,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(q,0);var Ae=this.tip2.transform.baseVal.getItem(0);Ae.setRotate(j+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ae,0)}},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=te.prototype.getState.call(this);return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j),this.createTips(),this.adjustVisual()},P.typeName="MeasurementMarker",P.title="Measurement marker",P.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>',P}(gt),Ot=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.strokePanel.colors=Ae.defaultColorSet,re.fillColor="transparent",re}return Ce(P,te),Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=te.prototype.getState.call(this);return j.typeName=P.typeName,j},P.typeName="EllipseFrameMarker",P.title="Ellipse frame marker",P.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>',P}($e),kt=function(){function te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),te.prototype.addUndoStep=function(P){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(P)||(this.undoStack.push(P),JSON.stringify(this.lastRedoStep)!==JSON.stringify(P)&&this.redoStack.splice(0,this.redoStack.length))},te.prototype.replaceLastUndoStep=function(P){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=P)},te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},te.prototype.undo=function(){if(this.undoStack.length>1){var P=this.undoStack.pop();return P!==void 0&&this.redoStack.push(P),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},te}(),Dt=function(te){function P(j,q,Ae){var re=te.call(this,j,q,Ae)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.curveX=0,re.curveY=0,re.manipulationStartCurveX=0,re.manipulationStartCurveY=0,re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.positionGrips=re.positionGrips.bind(re),re.addControlGrips=re.addControlGrips.bind(re),re.adjustVisual=re.adjustVisual.bind(re),re.setupControlBox=re.setupControlBox.bind(re),re.resize=re.resize.bind(re),re.strokeColor=Ae.defaultColor,re.strokeWidth=Ae.defaultStrokeWidth,re.strokeDasharray=Ae.defaultStrokeDasharray,re.strokePanel=new de("Line color",Ae.defaultColorSet,Ae.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new xt("Line width",Ae.defaultStrokeWidths,Ae.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new It("Line style",Ae.defaultStrokeDasharrays,Ae.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return Ce(P,te),P.prototype.ownsTarget=function(j){return!(!te.prototype.ownsTarget.call(this,j)&&j!==this.visual&&j!==this.selectorCurve&&j!==this.visibleCurve&&!this.curveGrip.ownsTarget(j))},P.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},P.prototype.createVisual=function(){this.visual=Ie.createGroup(),this.selectorCurve=Ie.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ie.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)},P.prototype.pointerDown=function(j,q){te.prototype.pointerDown.call(this,j,q),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=j.x,this.curveY=j.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(q)&&(this.activeGrip=this.curveGrip,this._state="resize")},P.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ie.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ie.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ie.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},P.prototype.setupControlBox=function(){te.prototype.setupControlBox.call(this),this.curveControlLine1=Ie.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ie.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)},P.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,te.prototype.addControlGrips.call(this)},P.prototype.positionGrips=function(){te.prototype.positionGrips.call(this);var j=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-j/2,this.curveY-j/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()))},P.prototype.manipulate=function(j){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+j.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+j.y-this.manipulationStartY),te.prototype.manipulate.call(this,j)},P.prototype.resize=function(j){this.activeGrip===this.curveGrip&&(this.curveX=j.x,this.curveY=j.y),te.prototype.resize.call(this,j),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},P.prototype.setStrokeColor=function(j){this.strokeColor=j,this.adjustVisual(),this.colorChanged(j)},P.prototype.setStrokeWidth=function(j){this.strokeWidth=j,this.adjustVisual()},P.prototype.setStrokeDasharray=function(j){this.strokeDasharray=j,this.adjustVisual()},P.prototype.scale=function(j,q){this.curveX=this.curveX*j,this.curveY=this.curveY*q,te.prototype.scale.call(this,j,q)},Object.defineProperty(P.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),P.prototype.getState=function(){var j=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},te.prototype.getState.call(this));return j.typeName=P.typeName,j},P.prototype.restoreState=function(j){te.prototype.restoreState.call(this,j);var q=j;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.curveX=q.curveX,this.curveY=q.curveY,this.createVisual(),this.adjustVisual()},P.typeName="CurveMarker",P.title="Curve marker",P.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>',P}(ct),Bt=function(){function te(P,j){j===void 0&&(j=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=P,this.cancelable=j}return Object.defineProperty(te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),te.prototype.preventDefault=function(){this._defaultPrevented=!0},te}(),ht=function(te){function P(j,q,Ae){var re=te.call(this,j,!1)||this;return re.dataUrl=q,re.state=Ae,re}return Ce(P,te),P}(Bt),it=function(te){function P(j,q,Ae){Ae===void 0&&(Ae=!1);var re=te.call(this,j,Ae)||this;return re.marker=q,re}return Ce(P,te),P}(Bt),et=function(){function te(){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 te.prototype.addEventListener=function(P,j){this[P].push(j)},te.prototype.removeEventListener=function(P,j){var q=this[P].indexOf(j);q>-1&&this[P].splice(q,1)},te}(),Te=function(){function te(P){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ke,this._isOpen=!1,this.undoRedoManager=new 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 et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=te.instanceCounter++,this.styles=new je(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=P,this.targetRoot=document.body,this.width=P.clientWidth,this.height=P.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(te.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ke,Ue,ot,Ot,$e,Ee,Fe,pt,ge,gt,Dt]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ke,Ue,ot,$e,Ee,Fe]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ke,Ue,ot,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(P){var j=this;this._availableMarkerTypes.splice(0),P.forEach(function(q){if(typeof q=="string"){var Ae=j.ALL_MARKER_TYPES.find(function(re){return re.typeName===q});Ae!==void 0&&j._availableMarkerTypes.push(Ae)}else j._availableMarkerTypes.push(q)})},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(P){this._zoomLevel=P,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(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Je.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},te.prototype.show=function(){var P=this;this.styles.styleSheetRoot===void 0&&Le.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Le.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(j){return j(new Bt(P))})},te.prototype.render=function(){return De(this,void 0,void 0,function(){var P;return Qe(this,function(j){switch(j.label){case 0:return this.setCurrentMarker(),(P=new Et).naturalSize=this.renderAtNaturalSize,P.imageType=this.renderImageType,P.imageQuality=this.renderImageQuality,P.markersOnly=this.renderMarkersOnly,P.width=this.renderWidth,P.height=this.renderHeight,[4,P.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return j.sent(),[4,P.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,j.sent()]}})})},te.prototype.close=function(P){var j=this;if(P===void 0&&(P=!1),this.isOpen){var q=!1;P||this.eventListeners.beforeclose.forEach(function(Ae){var re=new Bt(j,!0);Ae(re),re.defaultPrevented&&(q=!0)}),q||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Ae){return Ae(new Bt(j))}),this.detachEvents(),this._isOpen=!1)}},te.prototype.addMarkersToToolbar=function(){for(var P,j=[],q=0;q<arguments.length;q++)j[q]=arguments[q];(P=this._availableMarkerTypes).push.apply(P,j)},te.prototype.addRenderEventListener=function(P){this.addEventListener("render",function(j){P(j.dataUrl,j.state)})},te.prototype.removeRenderEventListener=function(P){},te.prototype.addCloseEventListener=function(P){this.addEventListener("close",function(){P()})},te.prototype.removeCloseEventListener=function(P){},te.prototype.setupResizeObserver=function(){var P=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){P.resize(P.target.clientWidth,P.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return P.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},te.prototype.onPopupTargetResize=function(){var P=1*this.target.clientWidth/this.target.clientHeight,j=this.editorCanvas.clientWidth/P>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*P:this.editorCanvas.clientWidth,q=j<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/P;this.resize(j,q)},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.prototype.resize=function(P,j){this._isResizing=!0;var q=P/this.imageWidth,Ae=j/this.imageHeight;this.imageWidth=Math.round(P),this.imageHeight=Math.round(j),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(q,Ae),this._isResizing=!1},te.prototype.scaleMarkers=function(P,j){var q,Ae=this;this._currentMarker&&this._currentMarker instanceof ot?this._currentMarker.scale(P,j):(q=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(re){re!==Ae._currentMarker&&re.scale(P,j)}),q!==void 0&&this.setCurrentMarker(q)},te.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"},te.prototype.setTopLeft=function(){var P=this.editingTarget.getBoundingClientRect(),j=this.editorCanvas.getBoundingClientRect();this.left=P.left-j.left,this.top=P.top-j.top},te.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)},te.prototype.addDefs=function(){for(var P,j=[],q=0;q<arguments.length;q++)j[q]=arguments[q];this.defs=Ie.createDefs(),this.addDefsToImage(),(P=this.defs).append.apply(P,j)},te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},te.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)},te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},te.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)},te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},te.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)},te.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 P=document.createElement("a");P.href="https://markerjs.com/",P.target="_blank",P.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>',P.title="Powered by marker.js",P.style.display="grid",P.style.alignItems="center",P.style.justifyItems="center",P.style.padding="3px",P.style.width="20px",P.style.height="20px",this.logoUI.appendChild(P),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},te.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")},te.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"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.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 P=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=P+"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 ie(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 oe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},te.prototype.removeMarker=function(P){this.markerImage.removeChild(P.container),this.markers.indexOf(P)>-1&&this.markers.splice(this.markers.indexOf(P),1),P.dispose()},te.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())},te.prototype.toolbarButtonClicked=function(P,j){if(P==="marker"&&j!==void 0)this.createNewMarker(j);else if(P==="action")switch(j){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()}},te.prototype.deleteSelectedMarker=function(){var P=this;if(this._currentMarker!==void 0){var j=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ae){var re=new it(P,P._currentMarker,!0);Ae(re),re.defaultPrevented&&(j=!0)}),!j){var q=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Ae){return Ae(new it(P,q))})}}},te.prototype.clear=function(){var P=this,j=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(We){var _t=new it(P,void 0,!0);We(_t),_t.defaultPrevented&&(j=!0)}),!j)){this.setCurrentMarker();for(var q=function(We){var _t=Ae.markers[We];Ae.setCurrentMarker(Ae.markers[We]),Ae._currentMarker.dispose(),Ae.markerImage.removeChild(Ae._currentMarker.container),Ae.markers.splice(Ae.markers.indexOf(Ae._currentMarker),1),Ae.eventListeners.markerdelete.forEach(function(Pt){return Pt(new it(P,_t))})},Ae=this,re=this.markers.length-1;re>=0;re--)q(re);this.addUndoStep()}},Object.defineProperty(te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),te.prototype.showNotesEditor=function(){var P;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=(P=this._currentMarker.notes)!==null&&P!==void 0?P:"",this.overlayContainer.appendChild(this.notesArea))},te.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)},te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},te.prototype.addUndoStep=function(){var P=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var j=this.getState(),q=this.undoRedoManager.getLastUndoStep();if(!q||q.width===j.width&&q.height===j.height){var Ae=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(j),Ae<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(re){return re(new Bt(P))})}else this.undoRedoManager.replaceLastUndoStep(j),this.eventListeners.statechange.forEach(function(re){return re(new Bt(P))})}},te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},te.prototype.undoStep=function(){var P=this,j=this.undoRedoManager.undo();j!==void 0&&(this.restoreState(j),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new Bt(P))}))},te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},te.prototype.redoStep=function(){var P=this,j=this.undoRedoManager.redo();j!==void 0&&(this.restoreState(j),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new Bt(P))}))},te.prototype.stepZoom=function(){var P=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=P<this.zoomSteps.length-1?this.zoomSteps[P+1]:this.zoomSteps[0]},te.prototype.panTo=function(P){this.contentDiv.scrollBy({left:this.prevPanPoint.x-P.x,top:this.prevPanPoint.y-P.y}),this.prevPanPoint=P},te.prototype.startRenderAndClose=function(){return De(this,void 0,void 0,function(){var P,j,q=this;return Qe(this,function(Ae){switch(Ae.label){case 0:return[4,this.render()];case 1:return P=Ae.sent(),j=this.getState(),this.eventListeners.render.forEach(function(re){return re(new ht(q,P,j))}),this.close(!0),[2]}})})},te.prototype.getState=function(P){P===!0&&this.setCurrentMarker();var j={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(q){return j.markers.push(q.getState())}),j},te.prototype.restoreState=function(P){var j=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);P.markers.forEach(function(q){var Ae=j._availableMarkerTypes.find(function(We){return We.typeName===q.typeName});if(Ae!==void 0){var re=j.addNewMarker(Ae);re.restoreState(q),j.markers.push(re)}}),P.width&&P.height&&(P.width!==this.imageWidth||P.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/P.width,this.imageHeight/P.height),this.eventListeners.restorestate.forEach(function(q){return q(new Bt(j))})},te.prototype.addNewMarker=function(P){var j=Ie.createGroup();return this.markerImage.appendChild(j),new P(j,this.overlayContainer,this.settings)},te.prototype.createNewMarker=function(P){var j,q=this;(j=typeof P=="string"?this._availableMarkerTypes.find(function(Ae){return Ae.typeName===P}):P)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(j),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(j.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ae){return Ae(new it(q,q._currentMarker))}))},te.prototype.markerCreated=function(P){var j=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(P),this.setCurrentMarker(P),P instanceof Ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(q){return q(new it(j,j._currentMarker))})},te.prototype.colorChanged=function(P){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=P,this.settings.defaultStrokeColor=P)},te.prototype.fillColorChanged=function(P){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=P)},te.prototype.markerStateChanged=function(P){var j=this;this.eventListeners.markerchange.forEach(function(q){return q(new it(j,P))})},te.prototype.setCurrentMarker=function(P){var j=this;this._currentMarker!==P&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(q){return q(new it(j,j._currentMarker))})),this._currentMarker=P,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(q){return q(new it(j,j._currentMarker))}))},te.prototype.onPointerDown=function(P){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||P.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var j=this.markers.find(function(q){return q.ownsTarget(P.target)});j!==void 0?(this.setCurrentMarker(j),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(P.clientX,P.clientY),P.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:P.clientX,y:P.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(P.clientX,P.clientY))},te.prototype.onDblClick=function(P){if(this._isFocused||this.focus(),this.mode==="select"){var j=this.markers.find(function(q){return q.ownsTarget(P.target)});j!==void 0&&j!==this._currentMarker&&this.setCurrentMarker(j),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(P.clientX,P.clientY),P.target):this.setCurrentMarker()}},te.prototype.onPointerMove=function(P){this.touchPoints!==1&&P.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||P.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(P.clientX,P.clientY)):this.zoomLevel>1&&this.panTo({x:P.clientX,y:P.clientY}))},te.prototype.onPointerUp=function(P){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(P.clientX,P.clientY)),this.isDragging=!1,this.addUndoStep()},te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},te.prototype.onKeyUp=function(P){this._currentMarker===void 0||this.notesArea!==void 0||P.key!=="Delete"&&P.key!=="Backspace"||this.deleteSelectedMarker()},te.prototype.clientToLocalCoordinates=function(P,j){var q=this.markerImage.getBoundingClientRect();return{x:(P-q.left)/this.zoomLevel,y:(j-q.top)/this.zoomLevel}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var P=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=P+"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()},te.prototype.addLicenseKey=function(P){Je.addKey(P)},te.prototype.addEventListener=function(P,j){this.eventListeners.addEventListener(P,j)},te.prototype.removeEventListener=function(P,j){this.eventListeners.removeEventListener(P,j)},te.prototype.renderState=function(P){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(P),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),te.prototype.focus=function(){var P=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(j){return j(new Bt(P))}))},te.prototype.blur=function(){var P=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(j){return j(new Bt(P))}))},te.instanceCounter=0,te}();/* **********************************
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 Ne=function(te,P){return(Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,q){j.__proto__=q}||function(j,q){for(var Ae in q)Object.prototype.hasOwnProperty.call(q,Ae)&&(j[Ae]=q[Ae])})(te,P)};function mt(te,P){if(typeof P!="function"&&P!==null)throw new TypeError("Class extends value "+String(P)+" is not a constructor or null");function j(){this.constructor=te}Ne(te,P),te.prototype=P===null?Object.create(P):(j.prototype=P.prototype,new j)}function lt(te,P,j,q){return new(j||(j=Promise))(function(Ae,re){function We(Qt){try{Pt(q.next(Qt))}catch(wt){re(wt)}}function _t(Qt){try{Pt(q.throw(Qt))}catch(wt){re(wt)}}function Pt(Qt){var wt;Qt.done?Ae(Qt.value):(wt=Qt.value,wt instanceof j?wt:new j(function(Yt){Yt(wt)})).then(We,_t)}Pt((q=q.apply(te,P||[])).next())})}function Ct(te,P){var j,q,Ae,re,We={label:0,sent:function(){if(1&Ae[0])throw Ae[1];return Ae[1]},trys:[],ops:[]};return re={next:_t(0),throw:_t(1),return:_t(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function _t(Pt){return function(Qt){return function(wt){if(j)throw new TypeError("Generator is already executing.");for(;We;)try{if(j=1,q&&(Ae=2&wt[0]?q.return:wt[0]?q.throw||((Ae=q.return)&&Ae.call(q),0):q.next)&&!(Ae=Ae.call(q,wt[1])).done)return Ae;switch(q=0,Ae&&(wt=[2&wt[0],Ae.value]),wt[0]){case 0:case 1:Ae=wt;break;case 4:return We.label++,{value:wt[1],done:!1};case 5:We.label++,q=wt[1],wt=[0];continue;case 7:wt=We.ops.pop(),We.trys.pop();continue;default:if(!(Ae=We.trys,(Ae=Ae.length>0&&Ae[Ae.length-1])||wt[0]!==6&&wt[0]!==2)){We=0;continue}if(wt[0]===3&&(!Ae||wt[1]>Ae[0]&&wt[1]<Ae[3])){We.label=wt[1];break}if(wt[0]===6&&We.label<Ae[1]){We.label=Ae[1],Ae=wt;break}if(Ae&&We.label<Ae[2]){We.label=Ae[2],We.ops.push(wt);break}Ae[2]&&We.ops.pop(),We.trys.pop();continue}wt=P.call(te,We)}catch(Yt){wt=[6,Yt],q=0}finally{j=Ae=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([Pt,Qt])}}}var bt=function(){function te(){}return te.addKey=function(P){te.key=P},Object.defineProperty(te,"isLicensed",{get:function(){return!!te.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(te.key)},enumerable:!1,configurable:!0}),te}(),tt=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(P,j){for(var q=0,Ae=j;q<Ae.length;q++){var re=Ae[q],We=re[0],_t=re[1];P.setAttribute(We,_t)}},te.createRect=function(P,j,q){var Ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ae.setAttribute("width",P.toString()),Ae.setAttribute("height",j.toString()),q&&te.setAttributes(Ae,q),Ae},te.createLine=function(P,j,q,Ae,re){var We=document.createElementNS("http://www.w3.org/2000/svg","line");return We.setAttribute("x1",P.toString()),We.setAttribute("y1",j.toString()),We.setAttribute("x2",q.toString()),We.setAttribute("y2",Ae.toString()),re&&te.setAttributes(We,re),We},te.createPolygon=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return q.setAttribute("points",P),j&&te.setAttributes(q,j),q},te.createCircle=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","circle");return q.setAttribute("cx",(P/2).toString()),q.setAttribute("cy",(P/2).toString()),q.setAttribute("r",P.toString()),j&&te.setAttributes(q,j),q},te.createEllipse=function(P,j,q){var Ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ae.setAttribute("cx",(P/2).toString()),Ae.setAttribute("cy",(j/2).toString()),Ae.setAttribute("rx",(P/2).toString()),Ae.setAttribute("ry",(j/2).toString()),q&&te.setAttributes(Ae,q),Ae},te.createGroup=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","g");return P&&te.setAttributes(j,P),j},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(P,j,q,Ae,re,We,_t){var Pt=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(Pt,[["id",P],["orient",j],["markerWidth",q.toString()],["markerHeight",Ae.toString()],["refX",re.toString()],["refY",We.toString()]]),Pt.appendChild(_t),Pt},te.createText=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","text");return j.setAttribute("x","0"),j.setAttribute("y","0"),P&&te.setAttributes(j,P),j},te.createTSpan=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return q.textContent=P,j&&te.setAttributes(q,j),q},te.createImage=function(P){var j=document.createElementNS("http://www.w3.org/2000/svg","image");return P&&te.setAttributes(j,P),j},te.createPoint=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return q.x=P,q.y=j,q},te.createPath=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg","path");return q.setAttribute("d",P),j&&te.setAttributes(q,j),q},te.createElement=function(P,j){var q=document.createElementNS("http://www.w3.org/2000/svg",P);return j&&te.setAttributes(q,j),q},te.getHollowRectanglePath=function(P,j,q,Ae,re,We,_t,Pt){return"M"+P+","+j+"V"+(j+Ae)+"H"+(P+q)+"V"+j+"H"+re+"V"+We+"H"+(re+_t)+"V"+(We+Pt)+"H"+re+"V"+j+"Z"},te}(),St=function(){function te(P){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+P+"_"}return Object.defineProperty(te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(te.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(te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),te.prototype.addClass=function(P){return this.styleSheet===void 0&&this.addStyleSheet(),P.name=""+this.classNamePrefix+P.localName,this.classes.push(P),this.styleSheet.sheet.insertRule("."+P.name+" {"+P.style+"}",this.styleSheet.sheet.cssRules.length),P},te.prototype.addRule=function(P){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(P),this.styleSheet.sheet.insertRule(P.selector+" {"+P.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var P;this.styleSheet=document.createElement("style"),((P=this.styleSheetRoot)!==null&&P!==void 0?P:document.head).appendChild(this.styleSheet),this.addRule(new Lt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Lt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Tt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Tt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},te.prototype.removeStyleSheet=function(){var P;this.styleSheet&&(((P=this.styleSheetRoot)!==null&&P!==void 0?P:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),Lt=function(te,P){this.selector=te,this.style=P},Tt=function(te,P){this.localName=te,this.style=P},Ht=function(){function te(){this.blocks=[],this.display=""}return te.prototype.addButtonBlock=function(P){P.className=this.blockClassName,P.buttonClassName=this.buttonClassName,P.buttonColorsClassName=this.buttonColorsClassName,P.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(P)},te.prototype.addElementBlock=function(P){P.className===void 0&&(P.className=this.blockClassName),this.blocks.push(P)},te.prototype.getUI=function(){var P=document.createElement("div");return P.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,P.style.display=this.display,this.blocks.forEach(function(j){return P.appendChild(j.getUI())}),P},te}(),gr=function(){function te(){}return te.prototype.getUI=function(){var P=document.createElement("div");if(P.className=this.className,this.minWidth!==void 0&&(P.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":P.style.justifyContent="flex-start";break;case"center":P.style.justifyContent="center";break;case"end":P.style.justifyContent="flex-end"}return P.style.whiteSpace="nowrap",P},te}(),Or=function(te){function P(){var j=te!==null&&te.apply(this,arguments)||this;return j.buttons=[],j}return mt(P,te),P.prototype.addButton=function(j){j.className=this.buttonClassName,j.colorsClassName=this.buttonColorsClassName,j.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(j)},P.prototype.getUI=function(){var j=te.prototype.getUI.call(this);return this.buttons.forEach(function(q){return j.appendChild(q.getUI())}),j},P}(gr),vr=function(){function te(P,j){this._isActive=!1,this._isHidden=!1,this._icon=P,this.title=j,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(te.prototype,"icon",{get:function(){return this._icon},set:function(P){this._icon=P,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isActive",{get:function(){return this._isActive},set:function(P){this._isActive=P,this.adjustClassName()},enumerable:!1,configurable:!0}),te.prototype.getUI=function(){var P=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 P.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},te.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,"")))},te.prototype.hide=function(){this._isHidden=!0},te}(),jt=function(te){function P(){var j=te!==null&&te.apply(this,arguments)||this;return j.elements=[],j}return mt(P,te),P.prototype.addElement=function(j){this.elements.push(j)},P.prototype.getUI=function(){var j=te.prototype.getUI.call(this);return this.elements.forEach(function(q){return j.appendChild(q)}),j},P}(gr),Mr=function(){function te(P,j){this.horizontal=P,this.vertical=j}return Object.defineProperty(te.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),te.prototype.getVerticalLength=function(P){return P/this.ratio},te.prototype.getHorizontalLength=function(P){return P*this.ratio},te}(),br=function(){function te(){}return te.getIcon=function(P,j){if(P>0&&j>0){var q=new Mr(P,j),Ae=q.ratio>=1?20:q.getHorizontalLength(20),re=q.ratio<1?20:q.getVerticalLength(20),We=document.createElementNS("http://www.w3.org/2000/svg","svg");We.setAttribute("xmlns","http://www.w3.org/2000/svg"),We.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(We);var _t=tt.createDefs();We.appendChild(_t);var Pt=tt.createElement("clipPath",[["id","text-bg-clip"]]);_t.appendChild(Pt);var Qt=tt.createPath(tt.getHollowRectanglePath((24-Ae)/2,(24-re)/2,Ae,re,(24-Ae)/2+2,(24-re)/2+2,Ae-4,re-4));We.appendChild(Qt);var wt=tt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);wt.appendChild(tt.createTSpan(P+":"+j)),We.appendChild(wt);var Yt=wt.getBBox();tt.setAttributes(wt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var Xt=tt.createPath(tt.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 Pt.appendChild(Xt),tt.setAttributes(Qt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(We),We.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>'},te}(),Tr=function(te){function P(j,q,Ae){var re=te.call(this,j,q)||this;return re.isDropdownOpen=!1,re.onClick=re.dropdownButtonClicked,re.dropdownButtons=Ae,re}return mt(P,te),P.prototype.setupDropdown=function(){var j=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(q){q.className=j.className,q.colorsClassName=j.colorsClassName,j.dropdownBlock.appendChild(q.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},P.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},P.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},P.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},P.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},P.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},P}(vr),Ar=function(){function te(P,j){this.GRIP_SIZE=10,this.color=P,this.fillColor=j,this.visual=tt.createGroup(),this.visual.appendChild(tt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(tt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(P){return P===this.visual||P===this.visual.childNodes[0]||P===this.visual.childNodes[1]},te.prototype.setCenter=function(P,j){this.visual.childNodes.forEach(function(q){return tt.setAttributes(q,[["cx",P.toString()],["cy",j.toString()]])})},te}(),Sr=function(){function te(P,j,q,Ae){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=P,this.canvasHeight=j,this.margin=q,this.container=Ae,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(te.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(P){this._aspectRatio=P,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(P){this._isGridVisible=P,this.gridContainer&&tt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(P){this._zoomFactor=P,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),te.prototype.open=function(){var P=this;this.cropShadeElement=tt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=tt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var j=0;j<this.numberOfGridLines;j++)this.horizontalGridLines.push(tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(tt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(q){return P.gridContainer.appendChild(q)}),this.verticalGridLines.forEach(function(q){return P.gridContainer.appendChild(q)}),this.cropRectElement=tt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ar(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ar(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ar(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ar(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},te.prototype.setCropRectangle=function(P){this.cropRect=P;var j=Object.assign({},this.cropRect);this.zoomFactor!==1&&(j.width=this.cropRect.width*this.zoomFactor,j.height=this.cropRect.height*this.zoomFactor,j.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-j.width/2,j.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-j.height/2),tt.setAttributes(this.cropRectElement,[["x",j.x.toString()],["y",j.y.toString()],["width",j.width.toString()],["height",j.height.toString()]]);var q=j.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(re,We){var _t=j.y+q*(We+1);tt.setAttributes(re,[["x1",""+j.x],["y1",""+_t],["x2",""+(j.x+j.width)],["y2",""+_t]])});var Ae=j.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(re,We){var _t=j.x+Ae*(We+1);tt.setAttributes(re,[["x1",""+_t],["y1",""+j.y],["x2",""+_t],["y2",""+(j.y+j.height)]])}),tt.setAttributes(this.cropShadeElement,[["d",tt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,j.x,j.y,j.width,j.height)]]),this.topLeftGrip.setCenter(j.x,j.y),this.topRightGrip.setCenter(j.x+j.width,j.y),this.bottomLeftGrip.setCenter(j.x,j.y+j.height),this.bottomRightGrip.setCenter(j.x+j.width,j.y+j.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},te.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)},te.prototype.clientToLocalCoordinates=function(P,j){var q=this.container.getBoundingClientRect();return{x:P-q.left+this.margin,y:j-q.top+this.margin}},te.prototype.onPointerDown=function(P){this.container.setPointerCapture(P.pointerId),this.previousPoint=this.clientToLocalCoordinates(P.clientX,P.clientY),this.cropRectElement===P.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(P.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(P.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(P.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(P.target)&&(this.activeGrip=this.bottomRightGrip)},te.prototype.onPointerMove=function(P){if(this.isMoving)this.move(this.clientToLocalCoordinates(P.clientX,P.clientY));else if(this.activeGrip){var j=this.clientToLocalCoordinates(P.clientX,P.clientY);this.resize(j)}P.preventDefault()},te.prototype.onPointerUp=function(P){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(P.pointerId)},te.prototype.move=function(P){var j=P.x-this.previousPoint.x,q=P.y-this.previousPoint.y;this.zoomFactor!==1&&(j=-j/this.zoomFactor,q=-q/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+j),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+q),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=P},te.prototype.resize=function(P){var j=Object.assign({},this.cropRect),q=P.x-this.previousPoint.x,Ae=P.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:j.x+q<this.margin&&(q=this.margin-j.x),j.x+=q,j.width=this.cropRect.x+this.cropRect.width-j.x;break;case this.bottomRightGrip:case this.topRightGrip:j.width+q>this.canvasWidth*this.zoomFactor&&(q=this.canvasWidth*this.zoomFactor-j.width),j.width+=q}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(j.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(q),j.height=this.aspectRatio.getVerticalLength(j.width)):(j.y+=Ae,j.height=this.cropRect.y+this.cropRect.height-j.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?j.height=this.aspectRatio.getVerticalLength(j.width):j.height+=Ae}j.width<10&&(j.x=this.cropRect.x,j.width=10),j.height<10&&(j.y=this.cropRect.y,j.height=10),this.previousPoint=P,j.x>=this.margin&&j.y>=this.margin&&j.x-this.margin+j.width<=this.canvasWidth&&j.y-this.margin+j.height<=this.canvasHeight&&(this.cropRect=j,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},te.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var P=this.cropRect.x+this.cropRect.width/2,j=this.cropRect.y+this.cropRect.height/2,q=this.aspectRatio.getHorizontalLength(this.cropRect.height),Ae=this.aspectRatio.getVerticalLength(this.cropRect.width);q/this.canvasWidth<Ae/this.canvasHeight?this.cropRect.width=q:this.cropRect.height=Ae,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=P-this.cropRect.width/2,this.cropRect.y=j-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)}},te.prototype.getRescaledRect=function(P,j,q,Ae,re,We){var _t=q/P,Pt=Ae/j;return{x:(re.x-We)*_t+We,y:(re.y-We)*Pt+We,width:re.width*_t,height:re.height*Pt}},te.prototype.scaleCanvas=function(P,j){var q=this.getRescaledRect(this.canvasWidth,this.canvasHeight,P,j,this.cropRect,this.margin);this.canvasWidth=P,this.canvasHeight=j,this.onCropChange&&this.onCropChange(q),this.setCropRectangle(q)},te}(),tn=function(){function te(P){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=P,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(te.prototype,"angle",{get:function(){return this._angle},set:function(P){this._angle=P,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),te.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},te.prototype.onPointerDown=function(P){this.controlContainer.setPointerCapture(P.pointerId),this.isDragging=!0,this.previousPoint={x:P.clientX,y:P.clientY}},te.prototype.onPointerMove=function(P){this.isDragging&&(this.onAngleChange&&this.onAngleChange((P.clientX-this.previousPoint.x)/5),this.previousPoint.x=P.clientX)},te.prototype.onPointerUp=function(P){this.isDragging&&this.onAngleChange&&this.onAngleChange((P.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(P.pointerId)},te.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var P=this.angleLabelText.getBBox();tt.setAttributes(this.angleLabelElement,[["x",((this.width-P.width)/2).toString()],["y",(this.height/2).toString()]])}},te.prototype.positionScaleShape=function(){if(this.scaleShape){var P=this.scaleShape.transform.baseVal.getItem(0);P.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(P,0)}},te.prototype.getVisual=function(){var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.setAttribute("xmlns","http://www.w3.org/2000/svg"),P.setAttribute("width",this.width+"px"),P.setAttribute("height",this.height+"px"),P.setAttribute("viewBox","0 0 "+this.width+" "+this.height),P.style.flexShrink="0",document.body.appendChild(P);for(var j="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,q=1;q<=this.width/5+10;q++){var Ae=q%5==0?this.height/3:this.height/6;j+="h4v"+-Ae+"h1v"+Ae}j+="v1H0Z",this.scaleShape=tt.createPath(j);var re=tt.createTransform();this.scaleShape.transform.baseVal.appendItem(re),P.appendChild(this.scaleShape),this.angleLabelElement=tt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=tt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var We=tt.createTSpan("");return We.innerHTML="&deg;",this.angleLabelElement.appendChild(We),P.appendChild(this.angleLabelElement),document.body.removeChild(P),P},te}(),Zr=function(){function te(){this.naturalSize=!1,this.imageType="image/png"}return te.prototype.rasterize=function(P,j,q,Ae,re,We,_t){var Pt=this;return new Promise(function(Qt){var wt=document.createElement("canvas");wt.width=P.width.baseVal.value-2*Ae,wt.height=P.height.baseVal.value-2*Ae;var Yt=1,Xt=1;Pt.naturalSize===!0?(Yt=j.naturalWidth/(P.width.baseVal.value-2*Ae)/We,Xt=j.naturalHeight/(P.height.baseVal.value-2*Ae)/_t,wt.width=j.naturalWidth/We,wt.height=j.naturalHeight/_t):Pt.width!==void 0&&Pt.height!==void 0&&(Yt=Pt.width/q.width,Xt=Pt.height/q.height,wt.width*=Yt,wt.height*=Xt);var qt=wt.getContext("2d");qt.translate(wt.width/2,wt.height/2),qt.rotate(re*Math.PI/180),qt.scale(We,_t),qt.translate(-wt.width/2,-wt.height/2),qt.drawImage(j,0,0,wt.width,wt.height);var cr=document.createElement("canvas");cr.width=q.width*Yt,cr.height=q.height*Xt,cr.getContext("2d").putImageData(qt.getImageData((q.x-Ae)*Yt,(q.y-Ae)*Xt,q.width*Yt,q.height*Xt),0,0),Qt(cr.toDataURL(Pt.imageType,Pt.imageQuality))})},te}(),me=function(){function te(P){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=te.instanceCounter++,this.styles=new St(this.instanceNo),this.target=P,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(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(P){this._zoomToCropEnabled=P,P?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(P){this._isGridVisible=P,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"gridLines",{get:function(){return this._gridLines},set:function(P){this._gridLines=P,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(P){this._rotationAngle=P,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"aspectRatio",{get:function(){var P;return(P=this._aspectRatio)!==null&&P!==void 0?P:this.aspectRatios[0]},set:function(P){this._aspectRatio=P},enumerable:!1,configurable:!0}),te.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},te.prototype.show=function(){this.showUI(),this.open()},te.prototype.close=function(P){P===void 0&&(P=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),P||this.closeEventListeners.forEach(function(j){return j()}),this._isOpen=!1)},te.prototype.addRenderEventListener=function(P){this.renderEventListeners.push(P)},te.prototype.removeRenderEventListener=function(P){this.renderEventListeners.indexOf(P)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(P),1)},te.prototype.addCloseEventListener=function(P){this.closeEventListeners.push(P)},te.prototype.removeCloseEventListener=function(P){this.closeEventListeners.indexOf(P)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(P),1)},te.prototype.setupResizeObserver=function(){var P=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){P.resize(P.target.clientWidth,P.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))},te.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var P=1*this.target.clientWidth/this.target.clientHeight,j=this.contentDiv.clientWidth/P>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*P:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,q=j+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/P;this.resize(j,q)}},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.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",tt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},te.prototype.resize=function(P,j){this.imageWidth=Math.round(P),this.imageHeight=Math.round(j),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()},te.prototype.setEditingTarget=function(){var P=document.createElement("canvas");P.width=this.target.naturalWidth,P.height=this.target.naturalHeight,P.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var j=P.toDataURL();tt.setAttributes(this.editingTarget,[["href",j]]),this.setEditingTargetSize()},te.prototype.setTopLeft=function(){var P=this.target.getBoundingClientRect(),j=this.editorCanvas.getBoundingClientRect();this.left=P.left-j.left-this.CANVAS_MARGIN,this.top=P.top-j.top-this.CANVAS_MARGIN},te.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=tt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=tt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=tt.createGroup(),this.editingTargetRotationScaleContainer=tt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var P=tt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(P);var j=tt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(j),this.editingTargetContainer=tt.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)},te.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},te.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=tt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sr(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()},te.prototype.zoomToCrop=function(){if(this.cropRect){var P=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,j=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=P+"px "+j+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-P+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-j+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},te.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)},te.prototype.cropRectChanged=function(P){this.cropRect=P,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},te.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},te.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"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.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 P=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,j=this.target.offsetTop>P+this.CANVAS_MARGIN?this.target.offsetTop-(P+this.CANVAS_MARGIN):0;this.coverDiv.style.top=j+"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},te.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},te.prototype.addTopToolbar=function(){var P=this;this.topToolbar=new Ht,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 j=new Or;j.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(j);var q=[];this.aspectRatios.forEach(function(Xt){var qt=new vr(br.getIcon(Xt.horizontal,Xt.vertical),Xt.horizontal===0&&Xt.vertical===0?"FREE":Xt.horizontal+":"+Xt.vertical);qt.onClick=function(){return P.ratioButtonClicked(Xt)},q.push(qt)}),this.aspectRatioButton=new Tr(br.getIcon(0,0),"Aspect ratio",q),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,j.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Ae=new vr('<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");Ae.isActive=this.isGridVisible,Ae.onClick=function(){P.isGridVisible=!P.isGridVisible,Ae.isActive=P.isGridVisible},j.addButton(Ae);var re=new vr('<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(re.isActive=this.zoomToCropEnabled,re.onClick=function(){P.zoomToCropEnabled=!P.zoomToCropEnabled,re.isActive=P.zoomToCropEnabled},j.addButton(re),!bt.isLicensed){var We=new jt;this.topToolbar.addElementBlock(We);var _t=document.createElement("div");_t.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Pt=document.createElement("a");Pt.style.color="currentColor",Pt.href="https://markerjs.com/products/cropro",Pt.target="_blank",Pt.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>',_t.appendChild(Pt),We.addElement(_t)}var Qt=new Or;Qt.minWidth=3*this.toolbarHeight+"px",Qt.contentAlign="end",this.topToolbar.addButtonBlock(Qt);var wt=new vr('<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,Qt.addButton(wt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(wt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new vr('<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,Qt.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},te.prototype.addBottomToolbar=function(){var P=this;this.bottomToolbar=new Ht,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 j=new Or;j.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(j);var q=new vr('<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");q.onClick=this.rotateLeftButtonClicked,j.addButton(q);var Ae=new vr('<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");Ae.onClick=this.rotateRightButtonClicked,j.addButton(Ae);var re=new jt;re.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(re),this.straightener=new tn("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(Qt){P.rotateBy(Qt),P.straightener.angle=P.rotationAngle},re.addElement(this.straightener.getUI());var We=new Or;We.minWidth=2*this.toolbarHeight+"px",We.contentAlign="end",this.bottomToolbar.addButtonBlock(We);var _t=new vr('<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");_t.onClick=this.flipHorizontallyButtonClicked,We.addButton(_t);var Pt=new vr('<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");Pt.onClick=this.flipVerticallyButtonClicked,We.addButton(Pt)},te.prototype.ratioButtonClicked=function(P){this.aspectRatio=P,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},te.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=br.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},te.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Mr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},te.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},te.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},te.prototype.restoreState=function(P){if(P){var j=this.cropLayer.getRescaledRect(P.width,P.height,this.imageWidth,this.imageHeight,P.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(j),this.cropRectChanged(j),this.flippedHorizontally=P.flippedHorizontally,this.flippedVertically=P.flippedVertically,this.applyFlip(),this.rotationAngle=P.rotationAngle,this.applyRotation()}},te.prototype.clientToLocalCoordinates=function(P,j){var q=this.cropImage.getBoundingClientRect();return{x:P-q.left,y:j-q.top}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var P=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=P+"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()},te.prototype.rotateLeftButtonClicked=function(){var P=this.rotationAngle-90;this.rotationAngle%90!=0&&(P+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(P)},te.prototype.rotateRightButtonClicked=function(){var P=this.rotationAngle+90;this.rotationAngle%90!=0&&(P-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(P)},te.prototype.rotateTo=function(P){P=(P=P>180?P-360:P)<=-180?P+360:P,this.rotationAngle=P,this.applyRotation()},te.prototype.rotateBy=function(P){this.rotateTo((this.rotationAngle+P)%360)},te.prototype.applyRotation=function(){var P=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var j=this.editingTargetRotationContainer.transform.baseVal.getItem(0);j.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(j,0);var q=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/q.width,this.imageHeight/q.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=P},te.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},te.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},te.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},te.prototype.startRenderAndClose=function(){return lt(this,void 0,void 0,function(){var P,j;return Ct(this,function(q){switch(q.label){case 0:return[4,this.render()];case 1:return P=q.sent(),j=this.getState(),this.renderEventListeners.forEach(function(Ae){return Ae(P,j)}),this.close(!0),[2]}})})},te.prototype.render=function(){return lt(this,void 0,void 0,function(){var P;return Ct(this,function(j){switch(j.label){case 0:return(P=new Zr).naturalSize=this.renderAtNaturalSize,P.imageType=this.renderImageType,P.imageQuality=this.renderImageQuality,P.width=this.renderWidth,P.height=this.renderHeight,this.unzoomFromCrop(),tt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,P.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 j.sent(),[4,P.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,j.sent()]}})})},te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Tt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Tt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Tt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var P=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Tt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*P)+`px;
height: `+(this.toolbarHeight-2*P)+`px;
padding: `+P+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Tt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Tt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Lt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Tt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Tt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Tt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Tt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*P)+`px;
padding: `+P+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Tt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},te.instanceCounter=0,te}(),be=H("8hTe"),Pe=H.n(be),rt=/<pre[^>]*>/g;function qe(te){var P=document.createElement("div");return P.innerHTML=te,P.childNodes.length===0?"":P.childNodes[0].nodeValue}var Ft=le.a=function(te){var P=te.value,j=P===void 0?"":P,q=te.edit,Ae=q===void 0?!1:q,re=te.className,We=te.showTextOnly,_t=te.showLines,Pt=te.replaces,Qt=te.zoomImg,wt=te.hasMask,Yt=te.style,Xt=Yt===void 0?{}:Yt,qt=te.stylesPrev,cr=qt===void 0?{}:qt,Dr=String(j),wr=Object(E.useRef)(),Fr=Object(E.useRef)(),hr=Object(E.useState)(""),Ur=Object(R.a)(hr,2),Nr=Ur[0],cn=Ur[1],Gr=Object(E.useState)("office"),Jr=Object(R.a)(Gr,2),bn=Jr[0],qr=Jr[1],rn=function(){var Zt=new me(Fr.current);Zt.displayMode="popup",Zt.addRenderEventListener(function(){var Er=Object(B.a)(t.a.mark(function mr(Ir){var xr;return t.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return wr.current.style.display="none",zr.next=3,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ir}});case 3:xr=zr.sent,xr!=null&&xr.id&&Pt(Fr.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(xr==null?void 0:xr.id,"?type=").concat(xr.content_type));case 5:case"end":return zr.stop()}},mr)}));return function(mr){return Er.apply(this,arguments)}}()),Zt.show()},sn=function(){var Zt=new Te(Fr.current);Zt.settings.displayMode="popup",Zt.addEventListener("render",function(){var Er=Object(B.a)(t.a.mark(function mr(Ir){var xr;return t.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(wr.current.style.display="none",!Fr.current){zr.next=6;break}return zr.next=4,Object(_e.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ir.dataUrl}});case 4:xr=zr.sent,xr!=null&&xr.id&&Pt(Fr.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(xr==null?void 0:xr.id,"?type=").concat(xr.content_type));case 6:case"end":return zr.stop()}},mr)}));return function(mr){return Er.apply(this,arguments)}}()),Zt.show(),window.markerArea=Zt},hn=Object(E.useMemo)(function(){wr.current&&(wr.current.style.zIndex=-1);try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Er=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Dr=Dr.replace(nr,"("+Y.a.API_SERVER+"/api/attachments/").replace(Zt,'"'+Y.a.API_SERVER+"/api/attachments/").replace(Er,'"'+Y.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=V(Dr),Ir=C();if(Dr.match(/\[TOC\]/)&&(mr=mr.replace("<p>[TOC]</p>",D()),v()),mr=mr.replace(/(__special_katext_id_\d+__)/g,function(On,zr){var En=Ir[zr],Qn=En.type,_n=En.expression;return Object(ne.renderToString)(qe(_n)||"",{displayMode:Qn==="block",throwOnError:!1,output:"html"})}),mr=mr.replace(/▁/g,"\u2581\u2581\u2581"),y(),We){var xr=document.createElement("div");return xr.innerHTML=mr,xr.innerText}return setTimeout(function(){return dr()},500),mr},[Dr]),mn=Object(E.useRef)();T.WebkitLineClamp=_t,_t&&(Xt=Object(M.a)(Object(M.a)({},Xt),T));function _r(nr){var Zt=nr.target;if(Zt.tagName.toUpperCase()==="IMG"){if(Qt){var Er=Zt.getAttribute("src");cn(Er),qr("image")}}else if(Zt.tagName.toUpperCase()==="A"){var mr=Zt.getAttribute("href");if(mr.indexOf("office")>-1)nr.preventDefault(),cn(mr),qr("office");else if(mr.indexOf("application/pdf")>-1)nr.preventDefault(),cn(mr),qr("pdf");else if(mr.indexOf("text/html")>-1)nr.preventDefault(),cn(mr),qr("html");else if(mr.startsWith("#")){nr.preventDefault();var Ir=document.getElementById(mr.replace("#",""));Ir&&Ir.scrollIntoView(!0)}}}var dr=function(){var Zt,Er=(Zt=mn.current)===null||Zt===void 0?void 0:Zt.querySelectorAll("video");Er==null||Er.forEach(function(mr){if(mr.oncontextmenu=function(){return!1},mr.src.indexOf(".m3u8")>-1&&!mr.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var Ir=new $.a;Ir.loadSource(mr.src),Ir.attachMedia(mr)}}})};Object(E.useEffect)(function(){if(mn.current&&hn&&(hn.match(rt)&&window.PR.prettyPrint()),mn.current)return mn.current.addEventListener("click",_r),function(){mn.current.removeEventListener("click",_r),y(),v()}},[hn,mn.current,_r]);var tr=function(Zt){if(!Ae)return;Zt.target.nodeName==="IMG"?(wr.current.style.zIndex=1,wr.current.style.display="flex",wr.current.style.width=Zt.target.clientWidth+"px",wr.current.style.height=Zt.target.clientHeight+"px",wr.current.style.top=Zt.target.offsetTop+"px",wr.current.style.left=Zt.target.offsetLeft+"px",Fr.current.src=Zt.target.getAttribute("src")):wr.current.style.display="none"};return i.a.createElement("div",{style:{}},i.a.createElement("div",{ref:mn,style:Object(M.a)({},Xt),className:"".concat(re||""," markdown-body ").concat(Pe.a.mdBody),onMouseOver:tr,dangerouslySetInnerHTML:{__html:hn}}),i.a.createElement("div",{ref:wr,className:Pe.a.button},i.a.createElement(Q.a,null,i.a.createElement(K.a,{onClick:function(){return rn()}},"\u88C1\u526A"),i.a.createElement(K.a,{onClick:function(){return sn()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:Fr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(se.a,{close:!0,data:Nr,type:Nr!=null&&Nr.length?bn:"",style:Object(M.a)({},cr),onClose:function(){return cn("")}}))}},"9VGf":function(Xe,le,H){"use strict";H.d(le,"a",function(){return O});var Z=H("q1tI"),Q=H.n(Z);function O(K,M){var B=Object(Z.useRef)();Object(Z.useEffect)(function(){B.current=K}),Object(Z.useEffect)(function(){function R(){B.current()}if(M!==null){var b=setInterval(R,M);return function(){return clearInterval(b)}}},[M])}},BPZU:function(Xe,le){var H=32,Z=7,Q=256;function O(i){for(var A=0;i>=H;)A|=i&1,i>>=1;return i+A}function K(i,A,h,s){var o=A+1;if(o===h)return 1;if(s(i[o++],i[A])<0){for(;o<h&&s(i[o],i[o-1])<0;)o++;M(i,A,o)}else for(;o<h&&s(i[o],i[o-1])>=0;)o++;return o-A}function M(i,A,h){for(h--;A<h;){var s=i[A];i[A++]=i[h],i[h--]=s}}function B(i,A,h,s,o){for(s===A&&s++;s<h;s++){for(var f=i[s],l=A,c=s,a;l<c;)a=l+c>>>1,o(f,i[a])<0?c=a:l=a+1;var u=s-l;switch(u){case 3:i[l+3]=i[l+2];case 2:i[l+2]=i[l+1];case 1:i[l+1]=i[l];break;default:for(;u>0;)i[l+u]=i[l+u-1],u--}i[l]=f}}function R(i,A,h,s,o,f){var l=0,c=0,a=1;if(f(i,A[h+o])>0){for(c=s-o;a<c&&f(i,A[h+o+a])>0;)l=a,a=(a<<1)+1,a<=0&&(a=c);a>c&&(a=c),l+=o,a+=o}else{for(c=o+1;a<c&&f(i,A[h+o-a])<=0;)l=a,a=(a<<1)+1,a<=0&&(a=c);a>c&&(a=c);var u=l;l=o-a,a=o-u}for(l++;l<a;){var v=l+(a-l>>>1);f(i,A[h+v])>0?l=v+1:a=v}return a}function b(i,A,h,s,o,f){var l=0,c=0,a=1;if(f(i,A[h+o])<0){for(c=o+1;a<c&&f(i,A[h+o-a])<0;)l=a,a=(a<<1)+1,a<=0&&(a=c);a>c&&(a=c);var u=l;l=o-a,a=o-u}else{for(c=s-o;a<c&&f(i,A[h+o+a])>=0;)l=a,a=(a<<1)+1,a<=0&&(a=c);a>c&&(a=c),l+=o,a+=o}for(l++;l<a;){var v=l+(a-l>>>1);f(i,A[h+v])<0?a=v:l=v+1}return a}function t(i,A){var h=Z,s=0,o=Q,f=0,l,c,a=0;s=i.length,s<2*Q&&(o=s>>>1);var u=[];f=s<120?5:s<1542?10:s<119151?19:40,l=[],c=[];function v(n,d){l[a]=n,c[a]=d,a+=1}function T(){for(;a>1;){var n=a-2;if(n>=1&&c[n-1]<=c[n]+c[n+1]||n>=2&&c[n-2]<=c[n]+c[n-1])c[n-1]<c[n+1]&&n--;else if(c[n]>c[n+1])break;D(n)}}function x(){for(;a>1;){var n=a-2;n>0&&c[n-1]<c[n+1]&&n--,D(n)}}function D(n){var d=l[n],m=c[n],C=l[n+1],y=c[n+1];c[n]=m+y,n===a-3&&(l[n+1]=l[n+2],c[n+1]=c[n+2]),a--;var g=b(i[C],i,d,m,0,A);if(d+=g,m-=g,m===0)return;if(y=R(i[d+m-1],i,C,y,y-1,A),y===0)return;m<=y?w(d,m,C,y):p(d,m,C,y)}function w(n,d,m,C){var y=0;for(y=0;y<d;y++)u[y]=i[n+y];var g=0,U=m,k=n;if(i[k++]=i[U++],--C===0){for(y=0;y<d;y++)i[k+y]=u[g+y];return}if(d===1){for(y=0;y<C;y++)i[k+y]=i[U+y];i[k+C]=u[g];return}for(var I=h,V,G,L;;){V=0,G=0,L=!1;do if(A(i[U],u[g])<0){if(i[k++]=i[U++],G++,V=0,--C===0){L=!0;break}}else if(i[k++]=u[g++],V++,G=0,--d===1){L=!0;break}while((V|G)<I);if(L)break;do{if(V=b(i[U],u,g,d,0,A),V!==0){for(y=0;y<V;y++)i[k+y]=u[g+y];if(k+=V,g+=V,d-=V,d<=1){L=!0;break}}if(i[k++]=i[U++],--C===0){L=!0;break}if(G=R(u[g],i,U,C,0,A),G!==0){for(y=0;y<G;y++)i[k+y]=i[U+y];if(k+=G,U+=G,C-=G,C===0){L=!0;break}}if(i[k++]=u[g++],--d===1){L=!0;break}I--}while(V>=Z||G>=Z);if(L)break;I<0&&(I=0),I+=2}if(h=I,h<1&&(h=1),d===1){for(y=0;y<C;y++)i[k+y]=i[U+y];i[k+C]=u[g]}else{if(d===0)throw new Error;for(y=0;y<d;y++)i[k+y]=u[g+y]}}function p(n,d,m,C){var y=0;for(y=0;y<C;y++)u[y]=i[m+y];var g=n+d-1,U=C-1,k=m+C-1,I=0,V=0;if(i[k--]=i[g--],--d===0){for(I=k-(C-1),y=0;y<C;y++)i[I+y]=u[y];return}if(C===1){for(k-=d,g-=d,V=k+1,I=g+1,y=d-1;y>=0;y--)i[V+y]=i[I+y];i[k]=u[U];return}for(var G=h;;){var L=0,$=0,Y=!1;do if(A(u[U],i[g])<0){if(i[k--]=i[g--],L++,$=0,--d===0){Y=!0;break}}else if(i[k--]=u[U--],$++,L=0,--C===1){Y=!0;break}while((L|$)<G);if(Y)break;do{if(L=d-b(u[U],i,n,d,d-1,A),L!==0){for(k-=L,g-=L,d-=L,V=k+1,I=g+1,y=L-1;y>=0;y--)i[V+y]=i[I+y];if(d===0){Y=!0;break}}if(i[k--]=u[U--],--C===1){Y=!0;break}if($=C-R(i[g],u,0,C,C-1,A),$!==0){for(k-=$,U-=$,C-=$,V=k+1,I=U+1,y=0;y<$;y++)i[V+y]=u[I+y];if(C<=1){Y=!0;break}}if(i[k--]=i[g--],--d===0){Y=!0;break}G--}while(L>=Z||$>=Z);if(Y)break;G<0&&(G=0),G+=2}if(h=G,h<1&&(h=1),C===1){for(k-=d,g-=d,V=k+1,I=g+1,y=d-1;y>=0;y--)i[V+y]=i[I+y];i[k]=u[U]}else{if(C===0)throw new Error;for(I=k-(C-1),y=0;y<C;y++)i[I+y]=u[y]}}this.mergeRuns=T,this.forceMergeRuns=x,this.pushRun=v}function E(i,A,h,s){h||(h=0),s||(s=i.length);var o=s-h;if(o<2)return;var f=0;if(o<H){f=K(i,h,s,A),B(i,h,s,h+f,A);return}var l=new t(i,A),c=O(o);do{if(f=K(i,h,s,A),f<c){var a=o;a>c&&(a=c),B(i,h,h+a,h+f,A),f=a}l.pushRun(h,f),l.mergeRuns(),o-=f,h+=f}while(o!==0);l.forceMergeRuns()}Xe.exports=E},BU3w:function(Xe,le,H){"use strict";H.d(le,"a",function(){return B});var Z=H("MNnm"),Q="rc-util-key";function O(R){if(R.attachTo)return R.attachTo;var b=document.querySelector("head");return b||document.body}function K(R){var b,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var E=document.createElement("style");if((b=t.csp)===null||b===void 0?void 0:b.nonce){var i;E.nonce=(i=t.csp)===null||i===void 0?void 0:i.nonce}E.innerHTML=R;var A=O(t),h=A.firstChild;return t.prepend&&A.prepend?A.prepend(E):t.prepend&&h?A.insertBefore(E,h):A.appendChild(E),E}var M=new Map;function B(R,b){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=O(t);if(!M.has(E)){var i=K("",t),A=i.parentNode;M.set(E,A),A.removeChild(i)}var h=Array.from(M.get(E).children).find(function(c){return c.tagName==="STYLE"&&c[Q]===b});if(h){var s,o;if(((s=t.csp)===null||s===void 0?void 0:s.nonce)&&h.nonce!==((o=t.csp)===null||o===void 0?void 0:o.nonce)){var f;h.nonce=(f=t.csp)===null||f===void 0?void 0:f.nonce}return h.innerHTML!==R&&(h.innerHTML=R),h}var l=K(R,t);return l[Q]=b,l}},Bd2K:function(Xe,le,H){(function(Z){Z(H("VrN/"),H("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(t,E,i){if(i!=Z.Init&&i&&t.removeKeyMap("autoCloseTags"),!E)return;var A={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(A["'/'"]=function(h){return B(h)}),(typeof E!="object"||E.whenOpening!==!1)&&(A["'>'"]=function(h){return K(h)}),t.addKeyMap(A)});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 K(t){if(t.getOption("disableInput"))return Z.Pass;for(var E=t.listSelections(),i=[],A=t.getOption("autoCloseTags"),h=0;h<E.length;h++){if(!E[h].empty())return Z.Pass;var s=E[h].head,o=t.getTokenAt(s),f=Z.innerMode(t.getMode(),o.state),l=f.state,c=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(l),a=c&&c.name;if(!a)return Z.Pass;var u=f.mode.configuration=="html",v=typeof A=="object"&&A.dontCloseTags||u&&Q,T=typeof A=="object"&&A.indentTags||u&&O;o.end>s.ch&&(a=a.slice(0,a.length-o.end+s.ch));var x=a.toLowerCase();if(!a||o.type=="string"&&(o.end!=s.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&c.close||o.string.indexOf("/")==s.ch-o.start-1||v&&R(v,x)>-1||b(t,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(l)||[],a,s,!0))return Z.Pass;var D=typeof A=="object"&&A.emptyTags;if(D&&R(D,a)>-1){i[h]={text:"/>",newPos:Z.Pos(s.line,s.ch+2)};continue}var w=T&&R(T,x)>-1;i[h]={indent:w,text:">"+(w?`
`:"")+"</"+a+">",newPos:w?Z.Pos(s.line+1,0):Z.Pos(s.line,s.ch+1)}}for(var p=typeof A=="object"&&A.dontIndentOnAutoClose,h=E.length-1;h>=0;h--){var n=i[h];t.replaceRange(n.text,E[h].head,E[h].anchor,"+insert");var d=t.listSelections().slice(0);d[h]={head:n.newPos,anchor:n.newPos},t.setSelections(d),!p&&n.indent&&(t.indentLine(n.newPos.line,null,!0),t.indentLine(n.newPos.line+1,null,!0))}}function M(t,E){for(var i=t.listSelections(),A=[],h=E?"/":"</",s=t.getOption("autoCloseTags"),o=typeof s=="object"&&s.dontIndentOnSlash,f=0;f<i.length;f++){if(!i[f].empty())return Z.Pass;var l=i[f].head,c=t.getTokenAt(l),a=Z.innerMode(t.getMode(),c.state),u=a.state;if(E&&(c.type=="string"||c.string.charAt(0)!="<"||c.start!=l.ch-1))return Z.Pass;var v,T=a.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(T&&a.mode.name=="javascript")v=h+"script";else if(T&&a.mode.name=="css")v=h+"style";else{var x=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(u);if(!x||x.length&&b(t,x,x[x.length-1],l))return Z.Pass;v=h+x[x.length-1]}t.getLine(l.line).charAt(c.end)!=">"&&(v+=">"),A[f]=v}if(t.replaceSelections(A),i=t.listSelections(),!o)for(var f=0;f<i.length;f++)(f==i.length-1||i[f].head.line<i[f+1].head.line)&&t.indentLine(i[f].head.line)}function B(t){return t.getOption("disableInput")?Z.Pass:M(t,!0)}Z.commands.closeTag=function(t){return M(t)};function R(t,E){if(t.indexOf)return t.indexOf(E);for(var i=0,A=t.length;i<A;++i)if(t[i]==E)return i;return-1}function b(t,E,i,A,h){if(!Z.scanForClosingTag)return!1;var s=Math.min(t.lastLine()+1,A.line+500),o=Z.scanForClosingTag(t,A,null,s);if(!o||o.tag!=i)return!1;for(var f=h?1:0,l=E.length-1;l>=0&&E[l]==i;l--)++f;A=o.to;for(var l=1;l<f;l++){var c=Z.scanForClosingTag(t,A,null,s);if(!c||c.tag!=i)return!1;A=c.to}return!0}})},BjJ7:function(Xe,le,H){"use strict";H.d(le,"d",function(){return Q}),H.d(le,"c",function(){return O}),H.d(le,"e",function(){return K}),H.d(le,"b",function(){return M}),H.d(le,"a",function(){return R});var Z=H("m3rI");function Q(b){var t=!0;if(b.length>0){for(var E=0;E<b.length;E++)if(b[E].compile_success==0||!b[E].compile_success){t=!1;break}}else t=!1;return t}function O(b){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=[],i=0;i<b.length;i++){var A=b[i],h=t?"".concat(t,"/").concat(A.name):"".concat(A.name);E.push({title:A.name,isLeaf:!(A.type==="tree"),key:h})}return E}function K(b,t,E){for(var i=0;i<b.length;i++){var A=b[i];if(A.key===t){A.children=E;break}A.children&&K(A.children,t,E)}return b}function M(b,t,E){var i;return function(){var A=this,h=arguments,s=function(){i=null,E||b.apply(A,h)},o=E&&!i;clearTimeout(i),i=setTimeout(s,t),o&&b.apply(A,h)}}var B=!0,R=Z.a.API_SERVER},BlVb:function(Xe,le,H){var Z=H("hyiK"),Q=1e-8;function O(M,B){return Math.abs(M-B)<Q}function K(M,B,R){var b=0,t=M[0];if(!t)return!1;for(var E=1;E<M.length;E++){var i=M[E];b+=Z(t[0],t[1],i[0],i[1],B,R),t=i}var A=M[0];return(!O(t[0],A[0])||!O(t[1],A[1]))&&(b+=Z(t[0],t[1],A[0],A[1],B,R)),b!==0}le.contain=K},Bq2U:function(Xe,le,H){var Z=H("RDYZ"),Q=H("Qe9p"),O=H("bYtY"),K=O.isArrayLike,M=Array.prototype.slice;function B(v,T){return v[T]}function R(v,T,x){v[T]=x}function b(v,T,x){return(T-v)*x+v}function t(v,T,x){return x>.5?T:v}function E(v,T,x,D,w){var p=v.length;if(w===1)for(var n=0;n<p;n++)D[n]=b(v[n],T[n],x);else for(var d=p&&v[0].length,n=0;n<p;n++)for(var m=0;m<d;m++)D[n][m]=b(v[n][m],T[n][m],x)}function i(v,T,x){var D=v.length,w=T.length;if(D!==w){var p=D>w;if(p)v.length=w;else for(var n=D;n<w;n++)v.push(x===1?T[n]:M.call(T[n]))}for(var d=v[0]&&v[0].length,n=0;n<v.length;n++)if(x===1)isNaN(v[n])&&(v[n]=T[n]);else for(var m=0;m<d;m++)isNaN(v[n][m])&&(v[n][m]=T[n][m])}function A(v,T,x){if(v===T)return!0;var D=v.length;if(D!==T.length)return!1;if(x===1){for(var w=0;w<D;w++)if(v[w]!==T[w])return!1}else for(var p=v[0].length,w=0;w<D;w++)for(var n=0;n<p;n++)if(v[w][n]!==T[w][n])return!1;return!0}function h(v,T,x,D,w,p,n,d,m){var C=v.length;if(m===1)for(var y=0;y<C;y++)d[y]=s(v[y],T[y],x[y],D[y],w,p,n);else for(var g=v[0].length,y=0;y<C;y++)for(var U=0;U<g;U++)d[y][U]=s(v[y][U],T[y][U],x[y][U],D[y][U],w,p,n)}function s(v,T,x,D,w,p,n){var d=(x-v)*.5,m=(D-T)*.5;return(2*(T-x)+d+m)*n+(-3*(T-x)-2*d-m)*p+d*w+T}function o(v){if(K(v)){var T=v.length;if(K(v[0])){for(var x=[],D=0;D<T;D++)x.push(M.call(v[D]));return x}return M.call(v)}return v}function f(v){return v[0]=Math.floor(v[0]),v[1]=Math.floor(v[1]),v[2]=Math.floor(v[2]),"rgba("+v.join(",")+")"}function l(v){var T=v[v.length-1].value;return K(T&&T[0])?2:1}function c(v,T,x,D,w,p){var n=v._getter,d=v._setter,m=T==="spline",C=D.length;if(!C)return;var y=D[0].value,g=K(y),U=!1,k=!1,I=g?l(D):0,V;D.sort(function(ie,oe){return ie.time-oe.time}),V=D[C-1].time;for(var G=[],L=[],$=D[0].value,Y=!0,ne=0;ne<C;ne++){G.push(D[ne].time/V);var se=D[ne].value;if(g&&A(se,$,I)||!g&&se===$||(Y=!1),$=se,typeof se=="string"){var _e=Q.parse(se);_e?(se=_e,U=!0):k=!0}L.push(se)}if(!p&&Y)return;for(var ve=L[C-1],ne=0;ne<C-1;ne++)g?i(L[ne],ve,I):isNaN(L[ne])&&!isNaN(ve)&&!k&&!U&&(L[ne]=ve);g&&i(n(v._target,w),ve,I);var Ce=0,De=0,Qe,Se,Ie,Je,Et,Le;if(U)var je=[0,0,0,0];var st=function(ie,oe){var ee;if(oe<0)ee=0;else if(oe<De){for(Qe=Math.min(Ce+1,C-1),ee=Qe;ee>=0&&!(G[ee]<=oe);ee--);ee=Math.min(ee,C-2)}else{for(ee=Ce;ee<C&&!(G[ee]>oe);ee++);ee=Math.min(ee-1,C-2)}Ce=ee,De=oe;var de=G[ee+1]-G[ee];if(de===0)return;if(Se=(oe-G[ee])/de,m)if(Je=L[ee],Ie=L[ee===0?ee:ee-1],Et=L[ee>C-2?C-1:ee+1],Le=L[ee>C-3?C-1:ee+2],g)h(Ie,Je,Et,Le,Se,Se*Se,Se*Se*Se,n(ie,w),I);else{var we;if(U)we=h(Ie,Je,Et,Le,Se,Se*Se,Se*Se*Se,je,1),we=f(je);else{if(k)return t(Je,Et,Se);we=s(Ie,Je,Et,Le,Se,Se*Se,Se*Se*Se)}d(ie,w,we)}else if(g)E(L[ee],L[ee+1],Se,n(ie,w),I);else{var we;if(U)E(L[ee],L[ee+1],Se,je,1),we=f(je);else{if(k)return t(L[ee],L[ee+1],Se);we=b(L[ee],L[ee+1],Se)}d(ie,w,we)}},he=new Z({target:v._target,life:V,loop:v._loop,delay:v._delay,onframe:st,ondestroy:x});return T&&T!=="spline"&&(he.easing=T),he}var a=function(v,T,x,D){this._tracks={},this._target=v,this._loop=T||!1,this._getter=x||B,this._setter=D||R,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};a.prototype={when:function(v,T){var x=this._tracks;for(var D in T){if(!T.hasOwnProperty(D))continue;if(!x[D]){x[D]=[];var w=this._getter(this._target,D);if(w==null)continue;v!==0&&x[D].push({time:0,value:o(w)})}x[D].push({time:v,value:T[D]})}return this},during:function(v){return this._onframeList.push(v),this},pause:function(){for(var v=0;v<this._clipList.length;v++)this._clipList[v].pause();this._paused=!0},resume:function(){for(var v=0;v<this._clipList.length;v++)this._clipList[v].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var v=this._doneList,T=v.length,x=0;x<T;x++)v[x].call(this)},start:function(v,T){var x=this,D=0,w=function(){D--,D||x._doneCallback()},p;for(var n in this._tracks){if(!this._tracks.hasOwnProperty(n))continue;var d=c(this,v,w,this._tracks[n],n,T);d&&(this._clipList.push(d),D++,this.animation&&this.animation.addClip(d),p=d)}if(p){var m=p.onframe;p.onframe=function(C,y){m(C,y);for(var g=0;g<x._onframeList.length;g++)x._onframeList[g](C,y)}}return D||this._doneCallback(),this},stop:function(v){for(var T=this._clipList,x=this.animation,D=0;D<T.length;D++){var w=T[D];v&&w.onframe(this._target,1),x&&x.removeClip(w)}T.length=0},delay:function(v){return this._delay=v,this},done:function(v){return v&&this._doneList.push(v),this},getClips:function(){return this._clipList}};var u=a;Xe.exports=u},"C+DQ":function(Xe,le,H){},"C/vA":function(Xe,le,H){"use strict";H.d(le,"a",function(){return Z});function Z(Q){const O=this;let K=!1,M;return function(){return K||(K=!0,M=Q.apply(O,arguments)),M}}},C0SR:function(Xe,le,H){var Z=H("YH21"),Q=function(){this._track=[]};Q.prototype={constructor:Q,recognize:function(R,b,t){return this._doTrack(R,b,t),this._recognize(R)},clear:function(){return this._track.length=0,this},_doTrack:function(R,b,t){var E=R.touches;if(!E)return;for(var i={points:[],touches:[],target:b,event:R},A=0,h=E.length;A<h;A++){var s=E[A],o=Z.clientToLocal(t,s,{});i.points.push([o.zrX,o.zrY]),i.touches.push(s)}this._track.push(i)},_recognize:function(R){for(var b in M)if(M.hasOwnProperty(b)){var t=M[b](this._track,R);if(t)return t}}};function O(R){var b=R[1][0]-R[0][0],t=R[1][1]-R[0][1];return Math.sqrt(b*b+t*t)}function K(R){return[(R[0][0]+R[1][0])/2,(R[0][1]+R[1][1])/2]}var M={pinch:function(R,b){var t=R.length;if(!t)return;var E=(R[t-1]||{}).points,i=(R[t-2]||{}).points||E;if(i&&i.length>1&&E&&E.length>1){var A=O(E)/O(i);!isFinite(A)&&(A=1),b.pinchScale=A;var h=K(E);return b.pinchX=h[0],b.pinchY=h[1],{type:"pinch",target:R[0].target,event:b}}}},B=Q;Xe.exports=B},"Cg/j":function(Xe,le,H){"use strict";H.d(le,"b",function(){return Z}),H.d(le,"a",function(){return Q}),H.d(le,"c",function(){return K}),H.d(le,"d",function(){return M});var Z;(function(B){B.serviceIds=new Map,B.DI_TARGET="$di$target",B.DI_DEPENDENCIES="$di$dependencies";function R(b){return b[B.DI_DEPENDENCIES]||[]}B.getServiceDependencies=R})(Z||(Z={}));const Q=K("instantiationService");function O(B,R,b,t){R[Z.DI_TARGET]===R?R[Z.DI_DEPENDENCIES].push({id:B,index:b,optional:t}):(R[Z.DI_DEPENDENCIES]=[{id:B,index:b,optional:t}],R[Z.DI_TARGET]=R)}function K(B){if(Z.serviceIds.has(B))return Z.serviceIds.get(B);const R=function(b,t,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");O(R,b,E,!1)};return R.toString=()=>B,Z.serviceIds.set(B,R),R}function M(B){return function(R,b,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");O(B,R,t,!0)}}},DBLp:function(Xe,le){function H(){}H.prototype={diff:function(M,B,R){R||(R=function(a,u){return a===u}),this.equals=R;var b=this;M=M.slice(),B=B.slice();var t=B.length,E=M.length,i=1,A=t+E,h=[{newPos:-1,components:[]}],s=this.extractCommon(h[0],B,M,0);if(h[0].newPos+1>=t&&s+1>=E){for(var o=[],f=0;f<B.length;f++)o.push(f);return[{indices:o,count:B.length}]}function l(){for(var a=-1*i;a<=i;a+=2){var u,v=h[a-1],T=h[a+1],x=(T?T.newPos:0)-a;v&&(h[a-1]=void 0);var D=v&&v.newPos+1<t,w=T&&0<=x&&x<E;if(!D&&!w){h[a]=void 0;continue}if(!D||w&&v.newPos<T.newPos?(u=Q(T),b.pushComponent(u.components,void 0,!0)):(u=v,u.newPos++,b.pushComponent(u.components,!0,void 0)),x=b.extractCommon(u,B,M,a),u.newPos+1>=t&&x+1>=E)return Z(b,u.components,B,M);h[a]=u}i++}for(;i<=A;){var c=l();if(c)return c}},pushComponent:function(M,B,R){var b=M[M.length-1];b&&b.added===B&&b.removed===R?M[M.length-1]={count:b.count+1,added:B,removed:R}:M.push({count:1,added:B,removed:R})},extractCommon:function(M,B,R,b){for(var t=B.length,E=R.length,i=M.newPos,A=i-b,h=0;i+1<t&&A+1<E&&this.equals(B[i+1],R[A+1]);)i++,A++,h++;return h&&M.components.push({count:h}),M.newPos=i,A},tokenize:function(M){return M.slice()},join:function(M){return M.slice()}};function Z(M,B,R,b){for(var t=0,E=B.length,i=0,A=0;t<E;t++){var h=B[t];if(h.removed){for(var s=[],o=A;o<A+h.count;o++)s.push(o);h.indices=s,A+=h.count}else{for(var s=[],o=i;o<i+h.count;o++)s.push(o);h.indices=s,i+=h.count,h.added||(A+=h.count)}}return B}function Q(M){return{newPos:M.newPos,components:M.components.slice(0)}}var O=new H;function K(M,B,R){return O.diff(M,B,R)}Xe.exports=K},DN4a:function(Xe,le,H){var Z=H("Fofx"),Q=H("QBsz"),O=Z.identity,K=5e-5;function M(A){return A>K||A<-K}var B=function(A){A=A||{},A.position||(this.position=[0,0]),A.rotation==null&&(this.rotation=0),A.scale||(this.scale=[1,1]),this.origin=this.origin||null},R=B.prototype;R.transform=null,R.needLocalTransform=function(){return M(this.rotation)||M(this.position[0])||M(this.position[1])||M(this.scale[0]-1)||M(this.scale[1]-1)};var b=[];R.updateTransform=function(){var A=this.parent,h=A&&A.transform,s=this.needLocalTransform(),o=this.transform;if(!(s||h)){o&&O(o);return}o=o||Z.create(),s?this.getLocalTransform(o):O(o),h&&(s?Z.mul(o,A.transform,o):Z.copy(o,A.transform)),this.transform=o;var f=this.globalScaleRatio;if(f!=null&&f!==1){this.getGlobalScale(b);var l=b[0]<0?-1:1,c=b[1]<0?-1:1,a=((b[0]-l)*f+l)/b[0]||0,u=((b[1]-c)*f+c)/b[1]||0;o[0]*=a,o[1]*=a,o[2]*=u,o[3]*=u}this.invTransform=this.invTransform||Z.create(),Z.invert(this.invTransform,o)},R.getLocalTransform=function(A){return B.getLocalTransform(this,A)},R.setTransform=function(A){var h=this.transform,s=A.dpr||1;h?A.setTransform(s*h[0],s*h[1],s*h[2],s*h[3],s*h[4],s*h[5]):A.setTransform(s,0,0,s,0,0)},R.restoreTransform=function(A){var h=A.dpr||1;A.setTransform(h,0,0,h,0,0)};var t=[],E=Z.create();R.setLocalTransform=function(A){if(!A)return;var h=A[0]*A[0]+A[1]*A[1],s=A[2]*A[2]+A[3]*A[3],o=this.position,f=this.scale;M(h-1)&&(h=Math.sqrt(h)),M(s-1)&&(s=Math.sqrt(s)),A[0]<0&&(h=-h),A[3]<0&&(s=-s),o[0]=A[4],o[1]=A[5],f[0]=h,f[1]=s,this.rotation=Math.atan2(-A[1]/s,A[0]/h)},R.decomposeTransform=function(){if(!this.transform)return;var A=this.parent,h=this.transform;A&&A.transform&&(Z.mul(t,A.invTransform,h),h=t);var s=this.origin;s&&(s[0]||s[1])&&(E[4]=s[0],E[5]=s[1],Z.mul(t,h,E),t[4]-=s[0],t[5]-=s[1],h=t),this.setLocalTransform(h)},R.getGlobalScale=function(A){var h=this.transform;return A=A||[],h?(A[0]=Math.sqrt(h[0]*h[0]+h[1]*h[1]),A[1]=Math.sqrt(h[2]*h[2]+h[3]*h[3]),h[0]<0&&(A[0]=-A[0]),h[3]<0&&(A[1]=-A[1]),A):(A[0]=1,A[1]=1,A)},R.transformCoordToLocal=function(A,h){var s=[A,h],o=this.invTransform;return o&&Q.applyTransform(s,s,o),s},R.transformCoordToGlobal=function(A,h){var s=[A,h],o=this.transform;return o&&Q.applyTransform(s,s,o),s},B.getLocalTransform=function(A,h){h=h||[],O(h);var s=A.origin,o=A.scale||[1,1],f=A.rotation||0,l=A.position||[0,0];return s&&(h[4]-=s[0],h[5]-=s[1]),Z.scale(h,h,o),f&&Z.rotate(h,h,f),s&&(h[4]+=s[0],h[5]+=s[1]),h[4]+=l[0],h[5]+=l[1],h};var i=B;Xe.exports=i},Dagg:function(Xe,le,H){var Z=H("Gev7"),Q=H("mFDi"),O=H("bYtY"),K=H("Xnb7");function M(R){Z.call(this,R)}M.prototype={constructor:M,type:"image",brush:function(R,b){var t=this.style,E=t.image;t.bind(R,this,b);var i=this._image=K.createOrUpdateImage(E,this._image,this,this.onload);if(!i||!K.isImageReady(i))return;var A=t.x||0,h=t.y||0,s=t.width,o=t.height,f=i.width/i.height;if(s==null&&o!=null?s=o*f:o==null&&s!=null?o=s/f:s==null&&o==null&&(s=i.width,o=i.height),this.setTransform(R),t.sWidth&&t.sHeight){var l=t.sx||0,c=t.sy||0;R.drawImage(i,l,c,t.sWidth,t.sHeight,A,h,s,o)}else if(t.sx&&t.sy){var l=t.sx,c=t.sy,a=s-l,u=o-c;R.drawImage(i,l,c,a,u,A,h,s,o)}else R.drawImage(i,A,h,s,o);t.text!=null&&(this.restoreTransform(R),this.drawRectText(R,this.getBoundingRect()))},getBoundingRect:function(){var R=this.style;return this._rect||(this._rect=new Q(R.x||0,R.y||0,R.width||0,R.height||0)),this._rect}},O.inherits(M,Z);var B=M;Xe.exports=B},DlQD:function(Xe,le,H){(function(Z,Q){Xe.exports=Q()})(this,function(){"use strict";function Z(Ke,Me){for(var Ue=0;Ue<Me.length;Ue++){var ge=Me[Ue];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(Ke,ge.key,ge)}}function Q(Ke,Me,Ue){return Me&&Z(Ke.prototype,Me),Ue&&Z(Ke,Ue),Ke}function O(Ke,Me){if(!Ke)return;if(typeof Ke=="string")return K(Ke,Me);var Ue=Object.prototype.toString.call(Ke).slice(8,-1);if(Ue==="Object"&&Ke.constructor&&(Ue=Ke.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(Ke);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return K(Ke,Me)}function K(Ke,Me){(Me==null||Me>Ke.length)&&(Me=Ke.length);for(var Ue=0,ge=new Array(Me);Ue<Me;Ue++)ge[Ue]=Ke[Ue];return ge}function M(Ke,Me){var Ue;if(typeof Symbol=="undefined"||Ke[Symbol.iterator]==null){if(Array.isArray(Ke)||(Ue=O(Ke))||Me&&Ke&&typeof Ke.length=="number"){Ue&&(Ke=Ue);var ge=0;return function(){return ge>=Ke.length?{done:!0}:{done:!1,value:Ke[ge++]}}}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 Ue=Ke[Symbol.iterator](),Ue.next.bind(Ue)}function B(Ke,Me){return Me={exports:{}},Ke(Me,Me.exports),Me.exports}var R=B(function(Ke){function Me(){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 Ue(ge){Ke.exports.defaults=ge}Ke.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ue}}),b=R.defaults,t=R.getDefaults,E=R.changeDefaults,i=/[&<>"']/,A=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},f=function(Me){return o[Me]};function l(Ke,Me){if(Me){if(i.test(Ke))return Ke.replace(A,f)}else if(h.test(Ke))return Ke.replace(s,f);return Ke}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ke){return Ke.replace(c,function(Me,Ue){return Ue=Ue.toLowerCase(),Ue==="colon"?":":Ue.charAt(0)==="#"?Ue.charAt(1)==="x"?String.fromCharCode(parseInt(Ue.substring(2),16)):String.fromCharCode(+Ue.substring(1)):""})}var u=/(^|[^\[])\^/g;function v(Ke,Me){Ke=Ke.source||Ke,Me=Me||"";var Ue={replace:function(xe,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(u,"$1"),Ke=Ke.replace(xe,Ee),Ue},getRegex:function(){return new RegExp(Ke,Me)}};return Ue}var T=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ke,Me,Ue){if(Ke){var ge;try{ge=decodeURIComponent(a(Ue)).replace(T,"").toLowerCase()}catch(xe){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}Me&&!x.test(Ue)&&(Ue=m(Me,Ue));try{Ue=encodeURI(Ue).replace(/%25/g,"%")}catch(xe){return null}return Ue}var w={},p=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(Ke,Me){w[" "+Ke]||(p.test(Ke)?w[" "+Ke]=Ke+"/":w[" "+Ke]=U(Ke,"/",!0)),Ke=w[" "+Ke];var Ue=Ke.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ue?Me:Ke.replace(n,"$1")+Me:Me.charAt(0)==="/"?Ue?Me:Ke.replace(d,"$1")+Me:Ke+Me}var C={exec:function(){}};function y(Ke){for(var Me=1,Ue,ge;Me<arguments.length;Me++){Ue=arguments[Me];for(ge in Ue)Object.prototype.hasOwnProperty.call(Ue,ge)&&(Ke[ge]=Ue[ge])}return Ke}function g(Ke,Me){var Ue=Ke.replace(/\|/g,function(Ee,Oe,Fe){for(var $e=!1,pt=Oe;--pt>=0&&Fe[pt]==="\\";)$e=!$e;return $e?"|":" |"}),ge=Ue.split(/ \|/),xe=0;if(ge.length>Me)ge.splice(Me);else for(;ge.length<Me;)ge.push("");for(;xe<ge.length;xe++)ge[xe]=ge[xe].trim().replace(/\\\|/g,"|");return ge}function U(Ke,Me,Ue){var ge=Ke.length;if(ge===0)return"";for(var xe=0;xe<ge;){var Ee=Ke.charAt(ge-xe-1);if(Ee===Me&&!Ue)xe++;else if(Ee!==Me&&Ue)xe++;else break}return Ke.substr(0,ge-xe)}function k(Ke,Me){if(Ke.indexOf(Me[1])===-1)return-1;for(var Ue=Ke.length,ge=0,xe=0;xe<Ue;xe++)if(Ke[xe]==="\\")xe++;else if(Ke[xe]===Me[0])ge++;else if(Ke[xe]===Me[1]&&(ge--,ge<0))return xe;return-1}function I(Ke){Ke&&Ke.sanitize&&!Ke.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 V={escape:l,unescape:a,edit:v,cleanUrl:D,resolveUrl:m,noopTest:C,merge:y,splitCells:g,rtrim:U,findClosingBracket:k,checkSanitizeDeprecation:I},G=R.defaults,L=V.rtrim,$=V.splitCells,Y=V.escape,ne=V.findClosingBracket;function se(Ke,Me,Ue){var ge=Me.href,xe=Me.title?Y(Me.title):null,Ee=Ke[1].replace(/\\([\[\]])/g,"$1");return Ke[0].charAt(0)!=="!"?{type:"link",raw:Ue,href:ge,title:xe,text:Ee}:{type:"image",raw:Ue,href:ge,title:xe,text:Y(Ee)}}function _e(Ke,Me){var Ue=Ke.match(/^(\s+)(?:```)/);if(Ue===null)return Me;var ge=Ue[1];return Me.split(`
`).map(function(xe){var Ee=xe.match(/^\s+/);if(Ee===null)return xe;var Oe=Ee[0];return Oe.length>=ge.length?xe.slice(ge.length):xe}).join(`
`)}var ve=function(){function Ke(Ue){this.options=Ue||G}var Me=Ke.prototype;return Me.space=function(ge){var xe=this.rules.block.newline.exec(ge);if(xe)return xe[0].length>1?{type:"space",raw:xe[0]}:{raw:`
`}},Me.code=function(ge,xe){var Ee=this.rules.block.code.exec(ge);if(Ee){var Oe=xe[xe.length-1];if(Oe&&Oe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Fe=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Fe:L(Fe,`
`)}}},Me.fences=function(ge){var xe=this.rules.block.fences.exec(ge);if(xe){var Ee=xe[0],Oe=_e(Ee,xe[3]||"");return{type:"code",raw:Ee,lang:xe[2]?xe[2].trim():xe[2],text:Oe}}},Me.heading=function(ge){var xe=this.rules.block.heading.exec(ge);if(xe)return{type:"heading",raw:xe[0],depth:xe[1].length,text:xe[2]}},Me.nptable=function(ge){var xe=this.rules.block.nptable.exec(ge);if(xe){var Ee={type:"table",header:$(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
`):[],raw:xe[0]};if(Ee.header.length===Ee.align.length){var Oe=Ee.align.length,Fe;for(Fe=0;Fe<Oe;Fe++)/^ *-+: *$/.test(Ee.align[Fe])?Ee.align[Fe]="right":/^ *:-+: *$/.test(Ee.align[Fe])?Ee.align[Fe]="center":/^ *:-+ *$/.test(Ee.align[Fe])?Ee.align[Fe]="left":Ee.align[Fe]=null;for(Oe=Ee.cells.length,Fe=0;Fe<Oe;Fe++)Ee.cells[Fe]=$(Ee.cells[Fe],Ee.header.length);return Ee}}},Me.hr=function(ge){var xe=this.rules.block.hr.exec(ge);if(xe)return{type:"hr",raw:xe[0]}},Me.blockquote=function(ge){var xe=this.rules.block.blockquote.exec(ge);if(xe){var Ee=xe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:xe[0],text:Ee}}},Me.list=function(ge){var xe=this.rules.block.list.exec(ge);if(xe){for(var Ee=xe[0],Oe=xe[2],Fe=Oe.length>1,$e=Oe[Oe.length-1]===")",pt={type:"list",raw:Ee,ordered:Fe,start:Fe?+Oe.slice(0,-1):"",loose:!1,items:[]},Ot=xe[0].match(this.rules.block.item),kt=!1,Dt,Bt,ht,it,et,Te,Ne,mt=Ot.length,lt=0;lt<mt;lt++)Dt=Ot[lt],Ee=Dt,Bt=Dt.length,Dt=Dt.replace(/^ *([*+-]|\d+[.)]) */,""),~Dt.indexOf(`
`)&&(Bt-=Dt.length,Dt=this.options.pedantic?Dt.replace(/^ {1,4}/gm,""):Dt.replace(new RegExp("^ {1,"+Bt+"}","gm"),"")),lt!==mt-1&&(ht=this.rules.block.bullet.exec(Ot[lt+1])[0],(Fe?ht.length===1||!$e&&ht[ht.length-1]===")":ht.length>1||this.options.smartLists&&ht!==Oe)&&(it=Ot.slice(lt+1).join(`
`),pt.raw=pt.raw.substring(0,pt.raw.length-it.length),lt=mt-1)),et=kt||/\n\n(?!\s*$)/.test(Dt),lt!==mt-1&&(kt=Dt.charAt(Dt.length-1)===`
`,et||(et=kt)),et&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Dt),Ne=void 0,Te&&(Ne=Dt[1]!==" ",Dt=Dt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:Ee,task:Te,checked:Ne,loose:et,text:Dt});return pt}},Me.html=function(ge){var xe=this.rules.block.html.exec(ge);if(xe)return{type:this.options.sanitize?"paragraph":"html",raw:xe[0],pre:!this.options.sanitizer&&(xe[1]==="pre"||xe[1]==="script"||xe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Y(xe[0]):xe[0]}},Me.def=function(ge){var xe=this.rules.block.def.exec(ge);if(xe){xe[3]&&(xe[3]=xe[3].substring(1,xe[3].length-1));var Ee=xe[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:xe[0],href:xe[2],title:xe[3]}}},Me.table=function(ge){var xe=this.rules.block.table.exec(ge);if(xe){var Ee={type:"table",header:$(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=xe[0];var Oe=Ee.align.length,Fe;for(Fe=0;Fe<Oe;Fe++)/^ *-+: *$/.test(Ee.align[Fe])?Ee.align[Fe]="right":/^ *:-+: *$/.test(Ee.align[Fe])?Ee.align[Fe]="center":/^ *:-+ *$/.test(Ee.align[Fe])?Ee.align[Fe]="left":Ee.align[Fe]=null;for(Oe=Ee.cells.length,Fe=0;Fe<Oe;Fe++)Ee.cells[Fe]=$(Ee.cells[Fe].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},Me.lheading=function(ge){var xe=this.rules.block.lheading.exec(ge);if(xe)return{type:"heading",raw:xe[0],depth:xe[2].charAt(0)==="="?1:2,text:xe[1]}},Me.paragraph=function(ge){var xe=this.rules.block.paragraph.exec(ge);if(xe)return{type:"paragraph",raw:xe[0],text:xe[1].charAt(xe[1].length-1)===`
`?xe[1].slice(0,-1):xe[1]}},Me.text=function(ge,xe){var Ee=this.rules.block.text.exec(ge);if(Ee){var Oe=xe[xe.length-1];return Oe&&Oe.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},Me.escape=function(ge){var xe=this.rules.inline.escape.exec(ge);if(xe)return{type:"escape",raw:xe[0],text:Y(xe[1])}},Me.tag=function(ge,xe,Ee){var Oe=this.rules.inline.tag.exec(ge);if(Oe)return!xe&&/^<a /i.test(Oe[0])?xe=!0:xe&&/^<\/a>/i.test(Oe[0])&&(xe=!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:xe,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Y(Oe[0]):Oe[0]}},Me.link=function(ge){var xe=this.rules.inline.link.exec(ge);if(xe){var Ee=ne(xe[2],"()");if(Ee>-1){var Oe=xe[0].indexOf("!")===0?5:4,Fe=Oe+xe[1].length+Ee;xe[2]=xe[2].substring(0,Ee),xe[0]=xe[0].substring(0,Fe).trim(),xe[3]=""}var $e=xe[2],pt="";if(this.options.pedantic){var Ot=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);Ot?($e=Ot[1],pt=Ot[3]):pt=""}else pt=xe[3]?xe[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var kt=se(xe,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},xe[0]);return kt}},Me.reflink=function(ge,xe){var Ee;if((Ee=this.rules.inline.reflink.exec(ge))||(Ee=this.rules.inline.nolink.exec(ge))){var Oe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Oe=xe[Oe.toLowerCase()],!Oe||!Oe.href){var Fe=Ee[0].charAt(0);return{type:"text",raw:Fe,text:Fe}}var $e=se(Ee,Oe,Ee[0]);return $e}},Me.strong=function(ge,xe,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.strong.start.exec(ge);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){xe=xe.slice(-1*ge.length);var Fe=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Fe.lastIndex=0;for(var $e;(Oe=Fe.exec(xe))!=null;)if($e=this.rules.inline.strong.middle.exec(xe.slice(0,Oe.index+3)),$e)return{type:"strong",raw:ge.slice(0,$e[0].length),text:ge.slice(2,$e[0].length-2)}}},Me.em=function(ge,xe,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.em.start.exec(ge);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){xe=xe.slice(-1*ge.length);var Fe=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Fe.lastIndex=0;for(var $e;(Oe=Fe.exec(xe))!=null;)if($e=this.rules.inline.em.middle.exec(xe.slice(0,Oe.index+2)),$e)return{type:"em",raw:ge.slice(0,$e[0].length),text:ge.slice(1,$e[0].length-1)}}},Me.codespan=function(ge){var xe=this.rules.inline.code.exec(ge);if(xe){var Ee=xe[2].replace(/\n/g," "),Oe=/[^ ]/.test(Ee),Fe=Ee.startsWith(" ")&&Ee.endsWith(" ");return Oe&&Fe&&(Ee=Ee.substring(1,Ee.length-1)),Ee=Y(Ee,!0),{type:"codespan",raw:xe[0],text:Ee}}},Me.br=function(ge){var xe=this.rules.inline.br.exec(ge);if(xe)return{type:"br",raw:xe[0]}},Me.del=function(ge){var xe=this.rules.inline.del.exec(ge);if(xe)return{type:"del",raw:xe[0],text:xe[1]}},Me.autolink=function(ge,xe){var Ee=this.rules.inline.autolink.exec(ge);if(Ee){var Oe,Fe;return Ee[2]==="@"?(Oe=Y(this.options.mangle?xe(Ee[1]):Ee[1]),Fe="mailto:"+Oe):(Oe=Y(Ee[1]),Fe=Oe),{type:"link",raw:Ee[0],text:Oe,href:Fe,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Me.url=function(ge,xe){var Ee;if(Ee=this.rules.inline.url.exec(ge)){var Oe,Fe;if(Ee[2]==="@")Oe=Y(this.options.mangle?xe(Ee[0]):Ee[0]),Fe="mailto:"+Oe;else{var $e;do $e=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while($e!==Ee[0]);Oe=Y(Ee[0]),Ee[1]==="www."?Fe="http://"+Oe:Fe=Oe}return{type:"link",raw:Ee[0],text:Oe,href:Fe,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Me.inlineText=function(ge,xe,Ee){var Oe=this.rules.inline.text.exec(ge);if(Oe){var Fe;return xe?Fe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Y(Oe[0]):Oe[0]:Fe=Y(this.options.smartypants?Ee(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:Fe}}},Ke}(),Ce=V.noopTest,De=V.edit,Qe=V.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:Ce,table:Ce,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=De(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=De(Se.item,"gm").replace(/bull/g,Se.bullet).getRegex(),Se.list=De(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=De(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Se.paragraph=De(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=De(Se.blockquote).replace("paragraph",Se.paragraph).getRegex(),Se.normal=Qe({},Se),Se.gfm=Qe({},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=De(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=De(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=Qe({},Se.normal,{html:De(`^ *(?: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:Ce,paragraph:De(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 Ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ce,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:Ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Ie._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ie.punctuation=De(Ie.punctuation).replace(/punctuation/g,Ie._punctuation).getRegex(),Ie._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ie._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ie.em.start=De(Ie.em.start).replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.em.middle=De(Ie.em.middle).replace(/punctuation/g,Ie._punctuation).replace(/overlapSkip/g,Ie._overlapSkip).getRegex(),Ie.em.endAst=De(Ie.em.endAst,"g").replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.em.endUnd=De(Ie.em.endUnd,"g").replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.strong.start=De(Ie.strong.start).replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.strong.middle=De(Ie.strong.middle).replace(/punctuation/g,Ie._punctuation).replace(/blockSkip/g,Ie._blockSkip).getRegex(),Ie.strong.endAst=De(Ie.strong.endAst,"g").replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.strong.endUnd=De(Ie.strong.endUnd,"g").replace(/punctuation/g,Ie._punctuation).getRegex(),Ie.blockSkip=De(Ie._blockSkip,"g").getRegex(),Ie.overlapSkip=De(Ie._overlapSkip,"g").getRegex(),Ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ie._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])?)+(?![-_])/,Ie.autolink=De(Ie.autolink).replace("scheme",Ie._scheme).replace("email",Ie._email).getRegex(),Ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ie.tag=De(Ie.tag).replace("comment",Se._comment).replace("attribute",Ie._attribute).getRegex(),Ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ie.link=De(Ie.link).replace("label",Ie._label).replace("href",Ie._href).replace("title",Ie._title).getRegex(),Ie.reflink=De(Ie.reflink).replace("label",Ie._label).getRegex(),Ie.reflinkSearch=De(Ie.reflinkSearch,"g").replace("reflink",Ie.reflink).replace("nolink",Ie.nolink).getRegex(),Ie.normal=Qe({},Ie),Ie.pedantic=Qe({},Ie.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:De(/^!?\[(label)\]\((.*?)\)/).replace("label",Ie._label).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ie._label).getRegex()}),Ie.gfm=Qe({},Ie.normal,{escape:De(Ie.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Ie.gfm.url=De(Ie.gfm.url,"i").replace("email",Ie.gfm._extended_email).getRegex(),Ie.breaks=Qe({},Ie.gfm,{br:De(Ie.br).replace("{2,}","*").getRegex(),text:De(Ie.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Je={block:Se,inline:Ie},Et=R.defaults,Le=Je.block,je=Je.inline;function st(Ke){return Ke.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 he(Ke){var Me="",Ue,ge,xe=Ke.length;for(Ue=0;Ue<xe;Ue++)ge=Ke.charCodeAt(Ue),Math.random()>.5&&(ge="x"+ge.toString(16)),Me+="&#"+ge+";";return Me}var ie=function(){function Ke(Ue){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ue||Et,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:Le.normal,inline:je.normal};this.options.pedantic?(ge.block=Le.pedantic,ge.inline=je.pedantic):this.options.gfm&&(ge.block=Le.gfm,this.options.breaks?ge.inline=je.breaks:ge.inline=je.gfm),this.tokenizer.rules=ge}Ke.lex=function(ge,xe){var Ee=new Ke(xe);return Ee.lex(ge)};var Me=Ke.prototype;return Me.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(ge,xe,Ee){xe===void 0&&(xe=[]),Ee===void 0&&(Ee=!0),ge=ge.replace(/^ +$/gm,"");for(var Oe,Fe,$e,pt;ge;){if(Oe=this.tokenizer.space(ge)){ge=ge.substring(Oe.raw.length),Oe.type&&xe.push(Oe);continue}if(Oe=this.tokenizer.code(ge,xe)){ge=ge.substring(Oe.raw.length),Oe.type?xe.push(Oe):(pt=xe[xe.length-1],pt.raw+=`
`+Oe.raw,pt.text+=`
`+Oe.text);continue}if(Oe=this.tokenizer.fences(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.heading(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.nptable(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.hr(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.blockquote(ge)){ge=ge.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],Ee),xe.push(Oe);continue}if(Oe=this.tokenizer.list(ge)){for(ge=ge.substring(Oe.raw.length),$e=Oe.items.length,Fe=0;Fe<$e;Fe++)Oe.items[Fe].tokens=this.blockTokens(Oe.items[Fe].text,[],!1);xe.push(Oe);continue}if(Oe=this.tokenizer.html(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.def(ge))){ge=ge.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(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.lheading(ge)){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.paragraph(ge))){ge=ge.substring(Oe.raw.length),xe.push(Oe);continue}if(Oe=this.tokenizer.text(ge,xe)){ge=ge.substring(Oe.raw.length),Oe.type?xe.push(Oe):(pt=xe[xe.length-1],pt.raw+=`
`+Oe.raw,pt.text+=`
`+Oe.text);continue}if(ge){var Ot="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Ot);break}else throw new Error(Ot)}}return xe},Me.inline=function(ge){var xe,Ee,Oe,Fe,$e,pt,Ot=ge.length;for(xe=0;xe<Ot;xe++){pt=ge[xe];switch(pt.type){case"paragraph":case"text":case"heading":{pt.tokens=[],this.inlineTokens(pt.text,pt.tokens);break}case"table":{for(pt.tokens={header:[],cells:[]},Fe=pt.header.length,Ee=0;Ee<Fe;Ee++)pt.tokens.header[Ee]=[],this.inlineTokens(pt.header[Ee],pt.tokens.header[Ee]);for(Fe=pt.cells.length,Ee=0;Ee<Fe;Ee++)for($e=pt.cells[Ee],pt.tokens.cells[Ee]=[],Oe=0;Oe<$e.length;Oe++)pt.tokens.cells[Ee][Oe]=[],this.inlineTokens($e[Oe],pt.tokens.cells[Ee][Oe]);break}case"blockquote":{this.inline(pt.tokens);break}case"list":{for(Fe=pt.items.length,Ee=0;Ee<Fe;Ee++)this.inline(pt.items[Ee].tokens);break}}}return ge},Me.inlineTokens=function(ge,xe,Ee,Oe,Fe){xe===void 0&&(xe=[]),Ee===void 0&&(Ee=!1),Oe===void 0&&(Oe=!1),Fe===void 0&&(Fe="");var $e,pt=ge,Ot;if(this.tokens.links){var kt=Object.keys(this.tokens.links);if(kt.length>0)for(;(Ot=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)kt.includes(Ot[0].slice(Ot[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Ot.index)+"["+"a".repeat(Ot[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ot=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Ot.index)+"["+"a".repeat(Ot[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if($e=this.tokenizer.escape(ge)){ge=ge.substring($e.raw.length),xe.push($e);continue}if($e=this.tokenizer.tag(ge,Ee,Oe)){ge=ge.substring($e.raw.length),Ee=$e.inLink,Oe=$e.inRawBlock,xe.push($e);continue}if($e=this.tokenizer.link(ge)){ge=ge.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Oe)),xe.push($e);continue}if($e=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Oe)),xe.push($e);continue}if($e=this.tokenizer.strong(ge,pt,Fe)){ge=ge.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Oe),xe.push($e);continue}if($e=this.tokenizer.em(ge,pt,Fe)){ge=ge.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Oe),xe.push($e);continue}if($e=this.tokenizer.codespan(ge)){ge=ge.substring($e.raw.length),xe.push($e);continue}if($e=this.tokenizer.br(ge)){ge=ge.substring($e.raw.length),xe.push($e);continue}if($e=this.tokenizer.del(ge)){ge=ge.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],Ee,Oe),xe.push($e);continue}if($e=this.tokenizer.autolink(ge,he)){ge=ge.substring($e.raw.length),xe.push($e);continue}if(!Ee&&($e=this.tokenizer.url(ge,he))){ge=ge.substring($e.raw.length),xe.push($e);continue}if($e=this.tokenizer.inlineText(ge,Oe,st)){ge=ge.substring($e.raw.length),Fe=$e.raw.slice(-1),xe.push($e);continue}if(ge){var Dt="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Dt);break}else throw new Error(Dt)}}return xe},Q(Ke,null,[{key:"rules",get:function(){return{block:Le,inline:je}}}]),Ke}(),oe=R.defaults,ee=V.cleanUrl,de=V.escape,we=function(){function Ke(Ue){this.options=Ue||oe}var Me=Ke.prototype;return Me.code=function(ge,xe,Ee){var Oe=(xe||"").match(/\S*/)[0];if(this.options.highlight){var Fe=this.options.highlight(ge,Oe);Fe!=null&&Fe!==ge&&(Ee=!0,ge=Fe)}return Oe?'<pre><code class="'+this.options.langPrefix+de(Oe,!0)+'">'+(Ee?ge:de(ge,!0))+`</code></pre>
`:"<pre><code>"+(Ee?ge:de(ge,!0))+`</code></pre>
`},Me.blockquote=function(ge){return`<blockquote>
`+ge+`</blockquote>
`},Me.html=function(ge){return ge},Me.heading=function(ge,xe,Ee,Oe){return this.options.headerIds?"<h"+xe+' id="'+this.options.headerPrefix+Oe.slug(Ee)+'">'+ge+"</h"+xe+`>
`:"<h"+xe+">"+ge+"</h"+xe+`>
`},Me.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Me.list=function(ge,xe,Ee){var Oe=xe?"ol":"ul",Fe=xe&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+Fe+`>
`+ge+"</"+Oe+`>
`},Me.listitem=function(ge){return"<li>"+ge+`</li>
`},Me.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(ge){return"<p>"+ge+`</p>
`},Me.table=function(ge,xe){return xe&&(xe="<tbody>"+xe+"</tbody>"),`<table>
<thead>
`+ge+`</thead>
`+xe+`</table>
`},Me.tablerow=function(ge){return`<tr>
`+ge+`</tr>
`},Me.tablecell=function(ge,xe){var Ee=xe.header?"th":"td",Oe=xe.align?"<"+Ee+' align="'+xe.align+'">':"<"+Ee+">";return Oe+ge+"</"+Ee+`>
`},Me.strong=function(ge){return"<strong>"+ge+"</strong>"},Me.em=function(ge){return"<em>"+ge+"</em>"},Me.codespan=function(ge){return"<code>"+ge+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(ge){return"<del>"+ge+"</del>"},Me.link=function(ge,xe,Ee){if(ge=ee(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ee;var Oe='<a href="'+de(ge)+'"';return xe&&(Oe+=' title="'+xe+'"'),Oe+=">"+Ee+"</a>",Oe},Me.image=function(ge,xe,Ee){if(ge=ee(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ee;var Oe='<img src="'+ge+'" alt="'+Ee+'"';return xe&&(Oe+=' title="'+xe+'"'),Oe+=this.options.xhtml?"/>":">",Oe},Me.text=function(ge){return ge},Ke}(),Be=function(){function Ke(){}var Me=Ke.prototype;return Me.strong=function(ge){return ge},Me.em=function(ge){return ge},Me.codespan=function(ge){return ge},Me.del=function(ge){return ge},Me.html=function(ge){return ge},Me.text=function(ge){return ge},Me.link=function(ge,xe,Ee){return""+Ee},Me.image=function(ge,xe,Ee){return""+Ee},Me.br=function(){return""},Ke}(),nt=function(){function Ke(){this.seen={}}var Me=Ke.prototype;return Me.slug=function(ge){var xe=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var Ee=xe;do this.seen[Ee]++,xe=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},Ke}(),at=R.defaults,At=V.unescape,ft=function(){function Ke(Ue){this.options=Ue||at,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Be,this.slugger=new nt}Ke.parse=function(ge,xe){var Ee=new Ke(xe);return Ee.parse(ge)};var Me=Ke.prototype;return Me.parse=function(ge,xe){xe===void 0&&(xe=!0);var Ee="",Oe,Fe,$e,pt,Ot,kt,Dt,Bt,ht,it,et,Te,Ne,mt,lt,Ct,bt,tt,St=ge.length;for(Oe=0;Oe<St;Oe++){it=ge[Oe];switch(it.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(it.tokens),it.depth,At(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(Bt="",Dt="",pt=it.header.length,Fe=0;Fe<pt;Fe++)Dt+=this.renderer.tablecell(this.parseInline(it.tokens.header[Fe]),{header:!0,align:it.align[Fe]});for(Bt+=this.renderer.tablerow(Dt),ht="",pt=it.cells.length,Fe=0;Fe<pt;Fe++){for(kt=it.tokens.cells[Fe],Dt="",Ot=kt.length,$e=0;$e<Ot;$e++)Dt+=this.renderer.tablecell(this.parseInline(kt[$e]),{header:!1,align:it.align[$e]});ht+=this.renderer.tablerow(Dt)}Ee+=this.renderer.table(Bt,ht);continue}case"blockquote":{ht=this.parse(it.tokens),Ee+=this.renderer.blockquote(ht);continue}case"list":{for(et=it.ordered,Te=it.start,Ne=it.loose,pt=it.items.length,ht="",Fe=0;Fe<pt;Fe++)lt=it.items[Fe],Ct=lt.checked,bt=lt.task,mt="",lt.task&&(tt=this.renderer.checkbox(Ct),Ne?lt.tokens.length>0&&lt.tokens[0].type==="text"?(lt.tokens[0].text=tt+" "+lt.tokens[0].text,lt.tokens[0].tokens&&lt.tokens[0].tokens.length>0&&lt.tokens[0].tokens[0].type==="text"&&(lt.tokens[0].tokens[0].text=tt+" "+lt.tokens[0].tokens[0].text)):lt.tokens.unshift({type:"text",text:tt}):mt+=tt),mt+=this.parse(lt.tokens,Ne),ht+=this.renderer.listitem(mt,bt,Ct);Ee+=this.renderer.list(ht,et,Te);continue}case"html":{Ee+=this.renderer.html(it.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(ht=it.tokens?this.parseInline(it.tokens):it.text;Oe+1<St&&ge[Oe+1].type==="text";)it=ge[++Oe],ht+=`
`+(it.tokens?this.parseInline(it.tokens):it.text);Ee+=xe?this.renderer.paragraph(ht):ht;continue}default:{var Lt='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(Lt);return}else throw new Error(Lt)}}}return Ee},Me.parseInline=function(ge,xe){xe=xe||this.renderer;var Ee="",Oe,Fe,$e=ge.length;for(Oe=0;Oe<$e;Oe++){Fe=ge[Oe];switch(Fe.type){case"escape":{Ee+=xe.text(Fe.text);break}case"html":{Ee+=xe.html(Fe.text);break}case"link":{Ee+=xe.link(Fe.href,Fe.title,this.parseInline(Fe.tokens,xe));break}case"image":{Ee+=xe.image(Fe.href,Fe.title,Fe.text);break}case"strong":{Ee+=xe.strong(this.parseInline(Fe.tokens,xe));break}case"em":{Ee+=xe.em(this.parseInline(Fe.tokens,xe));break}case"codespan":{Ee+=xe.codespan(Fe.text);break}case"br":{Ee+=xe.br();break}case"del":{Ee+=xe.del(this.parseInline(Fe.tokens,xe));break}case"text":{Ee+=xe.text(Fe.text);break}default:{var pt='Token with "'+Fe.type+'" type was not found.';if(this.options.silent){console.error(pt);return}else throw new Error(pt)}}}return Ee},Ke}(),xt=V.merge,It=V.checkSanitizeDeprecation,He=V.escape,ke=R.getDefaults,ct=R.changeDefaults,gt=R.defaults;function Ze(Ke,Me,Ue){if(typeof Ke=="undefined"||Ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ke)+", string expected");if(typeof Me=="function"&&(Ue=Me,Me=null),Me=xt({},Ze.defaults,Me||{}),It(Me),Ue){var ge=Me.highlight,xe;try{xe=ie.lex(Ke,Me)}catch($e){return Ue($e)}var Ee=function(pt){var Ot;if(!pt)try{Ot=ft.parse(xe,Me)}catch(kt){pt=kt}return Me.highlight=ge,pt?Ue(pt):Ue(null,Ot)};if(!ge||ge.length<3)return Ee();if(delete Me.highlight,!xe.length)return Ee();var Oe=0;Ze.walkTokens(xe,function($e){$e.type==="code"&&(Oe++,setTimeout(function(){ge($e.text,$e.lang,function(pt,Ot){if(pt)return Ee(pt);Ot!=null&&Ot!==$e.text&&($e.text=Ot,$e.escaped=!0),Oe--,Oe===0&&Ee()})},0))}),Oe===0&&Ee();return}try{var Fe=ie.lex(Ke,Me);return Me.walkTokens&&Ze.walkTokens(Fe,Me.walkTokens),ft.parse(Fe,Me)}catch($e){if($e.message+=`
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+He($e.message+"",!0)+"</pre>";throw $e}}Ze.options=Ze.setOptions=function(Ke){return xt(Ze.defaults,Ke),ct(Ze.defaults),Ze},Ze.getDefaults=ke,Ze.defaults=gt,Ze.use=function(Ke){var Me=xt({},Ke);if(Ke.renderer&&function(){var ge=Ze.defaults.renderer||new we,xe=function(Fe){var $e=ge[Fe];ge[Fe]=function(){for(var pt=arguments.length,Ot=new Array(pt),kt=0;kt<pt;kt++)Ot[kt]=arguments[kt];var Dt=Ke.renderer[Fe].apply(ge,Ot);return Dt===!1&&(Dt=$e.apply(ge,Ot)),Dt}};for(var Ee in Ke.renderer)xe(Ee);Me.renderer=ge}(),Ke.tokenizer&&function(){var ge=Ze.defaults.tokenizer||new ve,xe=function(Fe){var $e=ge[Fe];ge[Fe]=function(){for(var pt=arguments.length,Ot=new Array(pt),kt=0;kt<pt;kt++)Ot[kt]=arguments[kt];var Dt=Ke.tokenizer[Fe].apply(ge,Ot);return Dt===!1&&(Dt=$e.apply(ge,Ot)),Dt}};for(var Ee in Ke.tokenizer)xe(Ee);Me.tokenizer=ge}(),Ke.walkTokens){var Ue=Ze.defaults.walkTokens;Me.walkTokens=function(ge){Ke.walkTokens(ge),Ue&&Ue(ge)}}Ze.setOptions(Me)},Ze.walkTokens=function(Ke,Me){for(var Ue=M(Ke),ge;!(ge=Ue()).done;){var xe=ge.value;Me(xe);switch(xe.type){case"table":{for(var Ee=M(xe.tokens.header),Oe;!(Oe=Ee()).done;){var Fe=Oe.value;Ze.walkTokens(Fe,Me)}for(var $e=M(xe.tokens.cells),pt;!(pt=$e()).done;)for(var Ot=pt.value,kt=M(Ot),Dt;!(Dt=kt()).done;){var Bt=Dt.value;Ze.walkTokens(Bt,Me)}break}case"list":{Ze.walkTokens(xe.items,Me);break}default:xe.tokens&&Ze.walkTokens(xe.tokens,Me)}}},Ze.Parser=ft,Ze.parser=ft.parse,Ze.Renderer=we,Ze.TextRenderer=Be,Ze.Lexer=ie,Ze.lexer=ie.lex,Ze.Tokenizer=ve,Ze.Slugger=nt,Ze.parse=Ze;var ot=Ze;return ot})},ELLl:function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){var Q={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(o,f,l){l&&l!=Z.Init&&(o.removeKeyMap(M),o.state.closeBrackets=null),f&&(B(K(f,"pairs")),o.state.closeBrackets=f,o.addKeyMap(M))});function K(o,f){return f=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[f]!=null?o[f]:Q[f]}var M={Backspace:t,Enter:E};function B(o){for(var f=0;f<o.length;f++){var l=o.charAt(f),c="'"+l+"'";M[c]||(M[c]=R(l))}}B(Q.pairs+"`");function R(o){return function(f){return A(f,o)}}function b(o){var f=o.state.closeBrackets;if(!f||f.override)return f;var l=o.getModeAt(o.getCursor());return l.closeBrackets||f}function t(o){var f=b(o);if(!f||o.getOption("disableInput"))return Z.Pass;for(var l=K(f,"pairs"),c=o.listSelections(),a=0;a<c.length;a++){if(!c[a].empty())return Z.Pass;var u=h(o,c[a].head);if(!u||l.indexOf(u)%2!=0)return Z.Pass}for(var a=c.length-1;a>=0;a--){var v=c[a].head;o.replaceRange("",O(v.line,v.ch-1),O(v.line,v.ch+1),"+delete")}}function E(o){var f=b(o),l=f&&K(f,"explode");if(!l||o.getOption("disableInput"))return Z.Pass;for(var c=o.listSelections(),a=0;a<c.length;a++){if(!c[a].empty())return Z.Pass;var u=h(o,c[a].head);if(!u||l.indexOf(u)%2!=0)return Z.Pass}o.operation(function(){var v=o.lineSeparator()||`
`;o.replaceSelection(v+v,null),o.execCommand("goCharLeft"),c=o.listSelections();for(var T=0;T<c.length;T++){var x=c[T].head.line;o.indentLine(x,null,!0),o.indentLine(x+1,null,!0)}})}function i(o){var f=Z.cmpPos(o.anchor,o.head)>0;return{anchor:new O(o.anchor.line,o.anchor.ch+(f?-1:1)),head:new O(o.head.line,o.head.ch+(f?1:-1))}}function A(o,f){var l=b(o);if(!l||o.getOption("disableInput"))return Z.Pass;var c=K(l,"pairs"),a=c.indexOf(f);if(a==-1)return Z.Pass;for(var u=K(l,"closeBefore"),v=K(l,"triples"),T=c.charAt(a+1)==f,x=o.listSelections(),D=a%2==0,w,p=0;p<x.length;p++){var n=x[p],d=n.head,m,C=o.getRange(d,O(d.line,d.ch+1));if(D&&!n.empty())m="surround";else if((T||!D)&&C==f)T&&s(o,d)?m="both":v.indexOf(f)>=0&&o.getRange(d,O(d.line,d.ch+3))==f+f+f?m="skipThree":m="skip";else if(T&&d.ch>1&&v.indexOf(f)>=0&&o.getRange(O(d.line,d.ch-2),d)==f+f){if(d.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(d.line,d.ch-2))))return Z.Pass;m="addFour"}else if(T){var y=d.ch==0?" ":o.getRange(O(d.line,d.ch-1),d);if(!Z.isWordChar(C)&&y!=f&&!Z.isWordChar(y))m="both";else return Z.Pass}else if(D&&(C.length===0||/\s/.test(C)||u.indexOf(C)>-1))m="both";else return Z.Pass;if(!w)w=m;else if(w!=m)return Z.Pass}var g=a%2?c.charAt(a-1):f,U=a%2?f:c.charAt(a+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var k=0;k<3;k++)o.execCommand("goCharRight");else if(w=="surround"){for(var I=o.getSelections(),k=0;k<I.length;k++)I[k]=g+I[k]+U;o.replaceSelections(I,"around"),I=o.listSelections().slice();for(var k=0;k<I.length;k++)I[k]=i(I[k]);o.setSelections(I)}else w=="both"?(o.replaceSelection(g+U,null),o.triggerElectric(g+U),o.execCommand("goCharLeft")):w=="addFour"&&(o.replaceSelection(g+g+g+g,"before"),o.execCommand("goCharRight"))})}function h(o,f){var l=o.getRange(O(f.line,f.ch-1),O(f.line,f.ch+1));return l.length==2?l:null}function s(o,f){var l=o.getTokenAt(O(f.line,f.ch+1));return/\bstring/.test(l.type)&&l.start==f.ch&&(f.ch==0||!/\bstring/.test(o.getTokenTypeAt(f)))}})},FWmy:function(Xe,le,H){"use strict";H.d(le,"a",function(){return Z});function Z(Q,O){if(!Q)throw new Error(O?`Assertion failed (${O})`:"Assertion Failed")}},Fofx:function(Xe,le){var H=typeof Float32Array=="undefined"?Array:Float32Array;function Z(){var E=new H(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,i){return E[0]=i[0],E[1]=i[1],E[2]=i[2],E[3]=i[3],E[4]=i[4],E[5]=i[5],E}function K(E,i,A){var h=i[0]*A[0]+i[2]*A[1],s=i[1]*A[0]+i[3]*A[1],o=i[0]*A[2]+i[2]*A[3],f=i[1]*A[2]+i[3]*A[3],l=i[0]*A[4]+i[2]*A[5]+i[4],c=i[1]*A[4]+i[3]*A[5]+i[5];return E[0]=h,E[1]=s,E[2]=o,E[3]=f,E[4]=l,E[5]=c,E}function M(E,i,A){return E[0]=i[0],E[1]=i[1],E[2]=i[2],E[3]=i[3],E[4]=i[4]+A[0],E[5]=i[5]+A[1],E}function B(E,i,A){var h=i[0],s=i[2],o=i[4],f=i[1],l=i[3],c=i[5],a=Math.sin(A),u=Math.cos(A);return E[0]=h*u+f*a,E[1]=-h*a+f*u,E[2]=s*u+l*a,E[3]=-s*a+u*l,E[4]=u*o+a*c,E[5]=u*c-a*o,E}function R(E,i,A){var h=A[0],s=A[1];return E[0]=i[0]*h,E[1]=i[1]*s,E[2]=i[2]*h,E[3]=i[3]*s,E[4]=i[4]*h,E[5]=i[5]*s,E}function b(E,i){var A=i[0],h=i[2],s=i[4],o=i[1],f=i[3],l=i[5],c=A*f-o*h;return c?(c=1/c,E[0]=f*c,E[1]=-o*c,E[2]=-h*c,E[3]=A*c,E[4]=(h*l-f*s)*c,E[5]=(o*s-A*l)*c,E):null}function t(E){var i=Z();return O(i,E),i}le.create=Z,le.identity=Q,le.copy=O,le.mul=K,le.translate=M,le.rotate=B,le.scale=R,le.invert=b,le.clone=t},FxDU:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.createSensor=void 0;var Z=H("QO+J"),Q=H("j5sG"),O=typeof ResizeObserver!="undefined"?Q.createSensor:Z.createSensor;le.createSensor=O},Gev7:function(Xe,le,H){var Z=H("bYtY"),Q=H("K2GJ"),O=H("1bdT"),K=H("ni6a");function M(R){R=R||{},O.call(this,R);for(var b in R)R.hasOwnProperty(b)&&b!=="style"&&(this[b]=R[b]);this.style=new Q(R.style,this),this._rect=null,this.__clipPaths=null}M.prototype={constructor:M,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(R){},afterBrush:function(R){},brush:function(R,b){},getBoundingRect:function(){},contain:function(R,b){return this.rectContain(R,b)},traverse:function(R,b){R.call(b,this)},rectContain:function(R,b){var t=this.transformCoordToLocal(R,b),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(R){return this.animate("style",R)},attrKV:function(R,b){R!=="style"?O.prototype.attrKV.call(this,R,b):this.style.set(b)},setStyle:function(R,b){return this.style.set(R,b),this.dirty(!1),this},useStyle:function(R){return this.style=new Q(R,this),this.dirty(!1),this},calculateTextPosition:null},Z.inherits(M,O),Z.mixin(M,K);var B=M;Xe.exports=B},Gytx:function(Xe,le){Xe.exports=function(Z,Q,O,K){var M=O?O.call(K,Z,Q):void 0;if(M!==void 0)return!!M;if(Z===Q)return!0;if(typeof Z!="object"||!Z||typeof Q!="object"||!Q)return!1;var B=Object.keys(Z),R=Object.keys(Q);if(B.length!==R.length)return!1;for(var b=Object.prototype.hasOwnProperty.bind(Q),t=0;t<B.length;t++){var E=B[t];if(!b(E))return!1;var i=Z[E],A=Q[E];if(M=O?O.call(K,i,A,E):void 0,M===!1||M===void 0&&i!==A)return!1}return!0}},H6uX:function(Xe,le){var H=Array.prototype.slice,Z=function(M){this._$handlers={},this._$eventProcessor=M};Z.prototype={constructor:Z,one:function(M,B,R,b){return O(this,M,B,R,b,!0)},on:function(M,B,R,b){return O(this,M,B,R,b,!1)},isSilent:function(M){var B=this._$handlers;return!B[M]||!B[M].length},off:function(M,B){var R=this._$handlers;if(!M)return this._$handlers={},this;if(B){if(R[M]){for(var b=[],t=0,E=R[M].length;t<E;t++)R[M][t].h!==B&&b.push(R[M][t]);R[M]=b}R[M]&&R[M].length===0&&delete R[M]}else delete R[M];return this},trigger:function(M){var B=this._$handlers[M],R=this._$eventProcessor;if(B){var b=arguments,t=b.length;t>3&&(b=H.call(b,1));for(var E=B.length,i=0;i<E;){var A=B[i];if(R&&R.filter&&A.query!=null&&!R.filter(M,A.query)){i++;continue}switch(t){case 1:A.h.call(A.ctx);break;case 2:A.h.call(A.ctx,b[1]);break;case 3:A.h.call(A.ctx,b[1],b[2]);break;default:A.h.apply(A.ctx,b);break}A.one?(B.splice(i,1),E--):i++}}return R&&R.afterTrigger&&R.afterTrigger(M),this},triggerWithContext:function(M){var B=this._$handlers[M],R=this._$eventProcessor;if(B){var b=arguments,t=b.length;t>4&&(b=H.call(b,1,b.length-1));for(var E=b[b.length-1],i=B.length,A=0;A<i;){var h=B[A];if(R&&R.filter&&h.query!=null&&!R.filter(M,h.query)){A++;continue}switch(t){case 1:h.h.call(E);break;case 2:h.h.call(E,b[1]);break;case 3:h.h.call(E,b[1],b[2]);break;default:h.h.apply(E,b);break}h.one?(B.splice(A,1),i--):A++}}return R&&R.afterTrigger&&R.afterTrigger(M),this}};function Q(M,B){var R=M._$eventProcessor;return B!=null&&R&&R.normalizeQuery&&(B=R.normalizeQuery(B)),B}function O(M,B,R,b,t,E){var i=M._$handlers;if(typeof R=="function"&&(t=b,b=R,R=null),!b||!B)return M;R=Q(M,R),i[B]||(i[B]=[]);for(var A=0;A<i[B].length;A++)if(i[B][A].h===b)return M;var h={h:b,one:E,query:R,ctx:t||M,callAtLast:b.zrEventfulCallAtLast},s=i[B].length-1,o=i[B][s];return o&&o.callAtLast?i[B].splice(s,0,h):i[B].push(h),M}var K=Z;Xe.exports=K},H7XF:function(Xe,le,H){"use strict";le.byteLength=b,le.toByteArray=E,le.fromByteArray=h;for(var Z=[],Q=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,B=K.length;M<B;++M)Z[M]=K[M],Q[K.charCodeAt(M)]=M;Q["-".charCodeAt(0)]=62,Q["_".charCodeAt(0)]=63;function R(s){var o=s.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=s.indexOf("=");f===-1&&(f=o);var l=f===o?0:4-f%4;return[f,l]}function b(s){var o=R(s),f=o[0],l=o[1];return(f+l)*3/4-l}function t(s,o,f){return(o+f)*3/4-f}function E(s){var o,f=R(s),l=f[0],c=f[1],a=new O(t(s,l,c)),u=0,v=c>0?l-4:l,T;for(T=0;T<v;T+=4)o=Q[s.charCodeAt(T)]<<18|Q[s.charCodeAt(T+1)]<<12|Q[s.charCodeAt(T+2)]<<6|Q[s.charCodeAt(T+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=o&255;return c===2&&(o=Q[s.charCodeAt(T)]<<2|Q[s.charCodeAt(T+1)]>>4,a[u++]=o&255),c===1&&(o=Q[s.charCodeAt(T)]<<10|Q[s.charCodeAt(T+1)]<<4|Q[s.charCodeAt(T+2)]>>2,a[u++]=o>>8&255,a[u++]=o&255),a}function i(s){return Z[s>>18&63]+Z[s>>12&63]+Z[s>>6&63]+Z[s&63]}function A(s,o,f){for(var l,c=[],a=o;a<f;a+=3)l=(s[a]<<16&16711680)+(s[a+1]<<8&65280)+(s[a+2]&255),c.push(i(l));return c.join("")}function h(s){for(var o,f=s.length,l=f%3,c=[],a=16383,u=0,v=f-l;u<v;u+=a)c.push(A(s,u,u+a>v?v:u+a));return l===1?(o=s[f-1],c.push(Z[o>>2]+Z[o<<4&63]+"==")):l===2&&(o=(s[f-2]<<8)+s[f-1],c.push(Z[o>>10]+Z[o>>4&63]+Z[o<<2&63]+"=")),c.join("")}},HDXh:function(Xe,le,H){"use strict";(function(Z){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/var Q=H("H7XF"),O=H("kVK+"),K=H("49sm");le.Buffer=b,le.SlowBuffer=c,le.INSPECT_MAX_BYTES=50,b.TYPED_ARRAY_SUPPORT=Z.TYPED_ARRAY_SUPPORT!==void 0?Z.TYPED_ARRAY_SUPPORT:M(),le.kMaxLength=B();function M(){try{var he=new Uint8Array(1);return he.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},he.foo()===42&&typeof he.subarray=="function"&&he.subarray(1,1).byteLength===0}catch(ie){return!1}}function B(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function R(he,ie){if(B()<ie)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(he=new Uint8Array(ie),he.__proto__=b.prototype):(he===null&&(he=new b(ie)),he.length=ie),he}function b(he,ie,oe){if(!b.TYPED_ARRAY_SUPPORT&&!(this instanceof b))return new b(he,ie,oe);if(typeof he=="number"){if(typeof ie=="string")throw new Error("If encoding is specified then the first argument must be a string");return A(this,he)}return t(this,he,ie,oe)}b.poolSize=8192,b._augment=function(he){return he.__proto__=b.prototype,he};function t(he,ie,oe,ee){if(typeof ie=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ie instanceof ArrayBuffer?o(he,ie,oe,ee):typeof ie=="string"?h(he,ie,oe):f(he,ie)}b.from=function(he,ie,oe){return t(null,he,ie,oe)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&b[Symbol.species]===b&&Object.defineProperty(b,Symbol.species,{value:null,configurable:!0}));function E(he){if(typeof he!="number")throw new TypeError('"size" argument must be a number');if(he<0)throw new RangeError('"size" argument must not be negative')}function i(he,ie,oe,ee){return E(ie),ie<=0?R(he,ie):oe!==void 0?typeof ee=="string"?R(he,ie).fill(oe,ee):R(he,ie).fill(oe):R(he,ie)}b.alloc=function(he,ie,oe){return i(null,he,ie,oe)};function A(he,ie){if(E(ie),he=R(he,ie<0?0:l(ie)|0),!b.TYPED_ARRAY_SUPPORT)for(var oe=0;oe<ie;++oe)he[oe]=0;return he}b.allocUnsafe=function(he){return A(null,he)},b.allocUnsafeSlow=function(he){return A(null,he)};function h(he,ie,oe){if((typeof oe!="string"||oe==="")&&(oe="utf8"),!b.isEncoding(oe))throw new TypeError('"encoding" must be a valid string encoding');var ee=a(ie,oe)|0;he=R(he,ee);var de=he.write(ie,oe);return de!==ee&&(he=he.slice(0,de)),he}function s(he,ie){var oe=ie.length<0?0:l(ie.length)|0;he=R(he,oe);for(var ee=0;ee<oe;ee+=1)he[ee]=ie[ee]&255;return he}function o(he,ie,oe,ee){if(ie.byteLength,oe<0||ie.byteLength<oe)throw new RangeError("'offset' is out of bounds");if(ie.byteLength<oe+(ee||0))throw new RangeError("'length' is out of bounds");return oe===void 0&&ee===void 0?ie=new Uint8Array(ie):ee===void 0?ie=new Uint8Array(ie,oe):ie=new Uint8Array(ie,oe,ee),b.TYPED_ARRAY_SUPPORT?(he=ie,he.__proto__=b.prototype):he=s(he,ie),he}function f(he,ie){if(b.isBuffer(ie)){var oe=l(ie.length)|0;return he=R(he,oe),he.length===0||ie.copy(he,0,0,oe),he}if(ie){if(typeof ArrayBuffer!="undefined"&&ie.buffer instanceof ArrayBuffer||"length"in ie)return typeof ie.length!="number"||st(ie.length)?R(he,0):s(he,ie);if(ie.type==="Buffer"&&K(ie.data))return s(he,ie.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function l(he){if(he>=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return he|0}function c(he){return+he!=he&&(he=0),b.alloc(+he)}b.isBuffer=function(ie){return!!(ie!=null&&ie._isBuffer)},b.compare=function(ie,oe){if(!b.isBuffer(ie)||!b.isBuffer(oe))throw new TypeError("Arguments must be Buffers");if(ie===oe)return 0;for(var ee=ie.length,de=oe.length,we=0,Be=Math.min(ee,de);we<Be;++we)if(ie[we]!==oe[we]){ee=ie[we],de=oe[we];break}return ee<de?-1:de<ee?1:0},b.isEncoding=function(ie){switch(String(ie).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}},b.concat=function(ie,oe){if(!K(ie))throw new TypeError('"list" argument must be an Array of Buffers');if(ie.length===0)return b.alloc(0);var ee;if(oe===void 0)for(oe=0,ee=0;ee<ie.length;++ee)oe+=ie[ee].length;var de=b.allocUnsafe(oe),we=0;for(ee=0;ee<ie.length;++ee){var Be=ie[ee];if(!b.isBuffer(Be))throw new TypeError('"list" argument must be an Array of Buffers');Be.copy(de,we),we+=Be.length}return de};function a(he,ie){if(b.isBuffer(he))return he.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(he)||he instanceof ArrayBuffer))return he.byteLength;typeof he!="string"&&(he=""+he);var oe=he.length;if(oe===0)return 0;for(var ee=!1;;)switch(ie){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":case void 0:return Ie(he).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return Le(he).length;default:if(ee)return Ie(he).length;ie=(""+ie).toLowerCase(),ee=!0}}b.byteLength=a;function u(he,ie,oe){var ee=!1;if((ie===void 0||ie<0)&&(ie=0),ie>this.length)return"";if((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)return"";if(oe>>>=0,ie>>>=0,oe<=ie)return"";for(he||(he="utf8");;)switch(he){case"hex":return V(this,ie,oe);case"utf8":case"utf-8":return y(this,ie,oe);case"ascii":return k(this,ie,oe);case"latin1":case"binary":return I(this,ie,oe);case"base64":return C(this,ie,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,ie,oe);default:if(ee)throw new TypeError("Unknown encoding: "+he);he=(he+"").toLowerCase(),ee=!0}}b.prototype._isBuffer=!0;function v(he,ie,oe){var ee=he[ie];he[ie]=he[oe],he[oe]=ee}b.prototype.swap16=function(){var ie=this.length;if(ie%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var oe=0;oe<ie;oe+=2)v(this,oe,oe+1);return this},b.prototype.swap32=function(){var ie=this.length;if(ie%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var oe=0;oe<ie;oe+=4)v(this,oe,oe+3),v(this,oe+1,oe+2);return this},b.prototype.swap64=function(){var ie=this.length;if(ie%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var oe=0;oe<ie;oe+=8)v(this,oe,oe+7),v(this,oe+1,oe+6),v(this,oe+2,oe+5),v(this,oe+3,oe+4);return this},b.prototype.toString=function(){var ie=this.length|0;return ie===0?"":arguments.length===0?y(this,0,ie):u.apply(this,arguments)},b.prototype.equals=function(ie){if(!b.isBuffer(ie))throw new TypeError("Argument must be a Buffer");return this===ie?!0:b.compare(this,ie)===0},b.prototype.inspect=function(){var ie="",oe=le.INSPECT_MAX_BYTES;return this.length>0&&(ie=this.toString("hex",0,oe).match(/.{2}/g).join(" "),this.length>oe&&(ie+=" ... ")),"<Buffer "+ie+">"},b.prototype.compare=function(ie,oe,ee,de,we){if(!b.isBuffer(ie))throw new TypeError("Argument must be a Buffer");if(oe===void 0&&(oe=0),ee===void 0&&(ee=ie?ie.length:0),de===void 0&&(de=0),we===void 0&&(we=this.length),oe<0||ee>ie.length||de<0||we>this.length)throw new RangeError("out of range index");if(de>=we&&oe>=ee)return 0;if(de>=we)return-1;if(oe>=ee)return 1;if(oe>>>=0,ee>>>=0,de>>>=0,we>>>=0,this===ie)return 0;for(var Be=we-de,nt=ee-oe,at=Math.min(Be,nt),At=this.slice(de,we),ft=ie.slice(oe,ee),xt=0;xt<at;++xt)if(At[xt]!==ft[xt]){Be=At[xt],nt=ft[xt];break}return Be<nt?-1:nt<Be?1:0};function T(he,ie,oe,ee,de){if(he.length===0)return-1;if(typeof oe=="string"?(ee=oe,oe=0):oe>2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,isNaN(oe)&&(oe=de?0:he.length-1),oe<0&&(oe=he.length+oe),oe>=he.length){if(de)return-1;oe=he.length-1}else if(oe<0)if(de)oe=0;else return-1;if(typeof ie=="string"&&(ie=b.from(ie,ee)),b.isBuffer(ie))return ie.length===0?-1:x(he,ie,oe,ee,de);if(typeof ie=="number")return ie=ie&255,b.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?de?Uint8Array.prototype.indexOf.call(he,ie,oe):Uint8Array.prototype.lastIndexOf.call(he,ie,oe):x(he,[ie],oe,ee,de);throw new TypeError("val must be string, number or Buffer")}function x(he,ie,oe,ee,de){var we=1,Be=he.length,nt=ie.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(he.length<2||ie.length<2)return-1;we=2,Be/=2,nt/=2,oe/=2}function at(He,ke){return we===1?He[ke]:He.readUInt16BE(ke*we)}var At;if(de){var ft=-1;for(At=oe;At<Be;At++)if(at(he,At)===at(ie,ft===-1?0:At-ft)){if(ft===-1&&(ft=At),At-ft+1===nt)return ft*we}else ft!==-1&&(At-=At-ft),ft=-1}else for(oe+nt>Be&&(oe=Be-nt),At=oe;At>=0;At--){for(var xt=!0,It=0;It<nt;It++)if(at(he,At+It)!==at(ie,It)){xt=!1;break}if(xt)return At}return-1}b.prototype.includes=function(ie,oe,ee){return this.indexOf(ie,oe,ee)!==-1},b.prototype.indexOf=function(ie,oe,ee){return T(this,ie,oe,ee,!0)},b.prototype.lastIndexOf=function(ie,oe,ee){return T(this,ie,oe,ee,!1)};function D(he,ie,oe,ee){oe=Number(oe)||0;var de=he.length-oe;ee?(ee=Number(ee),ee>de&&(ee=de)):ee=de;var we=ie.length;if(we%2!==0)throw new TypeError("Invalid hex string");ee>we/2&&(ee=we/2);for(var Be=0;Be<ee;++Be){var nt=parseInt(ie.substr(Be*2,2),16);if(isNaN(nt))return Be;he[oe+Be]=nt}return Be}function w(he,ie,oe,ee){return je(Ie(ie,he.length-oe),he,oe,ee)}function p(he,ie,oe,ee){return je(Je(ie),he,oe,ee)}function n(he,ie,oe,ee){return p(he,ie,oe,ee)}function d(he,ie,oe,ee){return je(Le(ie),he,oe,ee)}function m(he,ie,oe,ee){return je(Et(ie,he.length-oe),he,oe,ee)}b.prototype.write=function(ie,oe,ee,de){if(oe===void 0)de="utf8",ee=this.length,oe=0;else if(ee===void 0&&typeof oe=="string")de=oe,ee=this.length,oe=0;else if(isFinite(oe))oe=oe|0,isFinite(ee)?(ee=ee|0,de===void 0&&(de="utf8")):(de=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var we=this.length-oe;if((ee===void 0||ee>we)&&(ee=we),ie.length>0&&(ee<0||oe<0)||oe>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var Be=!1;;)switch(de){case"hex":return D(this,ie,oe,ee);case"utf8":case"utf-8":return w(this,ie,oe,ee);case"ascii":return p(this,ie,oe,ee);case"latin1":case"binary":return n(this,ie,oe,ee);case"base64":return d(this,ie,oe,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,ie,oe,ee);default:if(Be)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),Be=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(he,ie,oe){return ie===0&&oe===he.length?Q.fromByteArray(he):Q.fromByteArray(he.slice(ie,oe))}function y(he,ie,oe){oe=Math.min(he.length,oe);for(var ee=[],de=ie;de<oe;){var we=he[de],Be=null,nt=we>239?4:we>223?3:we>191?2:1;if(de+nt<=oe){var at,At,ft,xt;switch(nt){case 1:we<128&&(Be=we);break;case 2:at=he[de+1],(at&192)===128&&(xt=(we&31)<<6|at&63,xt>127&&(Be=xt));break;case 3:at=he[de+1],At=he[de+2],(at&192)===128&&(At&192)===128&&(xt=(we&15)<<12|(at&63)<<6|At&63,xt>2047&&(xt<55296||xt>57343)&&(Be=xt));break;case 4:at=he[de+1],At=he[de+2],ft=he[de+3],(at&192)===128&&(At&192)===128&&(ft&192)===128&&(xt=(we&15)<<18|(at&63)<<12|(At&63)<<6|ft&63,xt>65535&&xt<1114112&&(Be=xt))}}Be===null?(Be=65533,nt=1):Be>65535&&(Be-=65536,ee.push(Be>>>10&1023|55296),Be=56320|Be&1023),ee.push(Be),de+=nt}return U(ee)}var g=4096;function U(he){var ie=he.length;if(ie<=g)return String.fromCharCode.apply(String,he);for(var oe="",ee=0;ee<ie;)oe+=String.fromCharCode.apply(String,he.slice(ee,ee+=g));return oe}function k(he,ie,oe){var ee="";oe=Math.min(he.length,oe);for(var de=ie;de<oe;++de)ee+=String.fromCharCode(he[de]&127);return ee}function I(he,ie,oe){var ee="";oe=Math.min(he.length,oe);for(var de=ie;de<oe;++de)ee+=String.fromCharCode(he[de]);return ee}function V(he,ie,oe){var ee=he.length;(!ie||ie<0)&&(ie=0),(!oe||oe<0||oe>ee)&&(oe=ee);for(var de="",we=ie;we<oe;++we)de+=Se(he[we]);return de}function G(he,ie,oe){for(var ee=he.slice(ie,oe),de="",we=0;we<ee.length;we+=2)de+=String.fromCharCode(ee[we]+ee[we+1]*256);return de}b.prototype.slice=function(ie,oe){var ee=this.length;ie=~~ie,oe=oe===void 0?ee:~~oe,ie<0?(ie+=ee,ie<0&&(ie=0)):ie>ee&&(ie=ee),oe<0?(oe+=ee,oe<0&&(oe=0)):oe>ee&&(oe=ee),oe<ie&&(oe=ie);var de;if(b.TYPED_ARRAY_SUPPORT)de=this.subarray(ie,oe),de.__proto__=b.prototype;else{var we=oe-ie;de=new b(we,void 0);for(var Be=0;Be<we;++Be)de[Be]=this[Be+ie]}return de};function L(he,ie,oe){if(he%1!==0||he<0)throw new RangeError("offset is not uint");if(he+ie>oe)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUIntLE=function(ie,oe,ee){ie=ie|0,oe=oe|0,ee||L(ie,oe,this.length);for(var de=this[ie],we=1,Be=0;++Be<oe&&(we*=256);)de+=this[ie+Be]*we;return de},b.prototype.readUIntBE=function(ie,oe,ee){ie=ie|0,oe=oe|0,ee||L(ie,oe,this.length);for(var de=this[ie+--oe],we=1;oe>0&&(we*=256);)de+=this[ie+--oe]*we;return de},b.prototype.readUInt8=function(ie,oe){return oe||L(ie,1,this.length),this[ie]},b.prototype.readUInt16LE=function(ie,oe){return oe||L(ie,2,this.length),this[ie]|this[ie+1]<<8},b.prototype.readUInt16BE=function(ie,oe){return oe||L(ie,2,this.length),this[ie]<<8|this[ie+1]},b.prototype.readUInt32LE=function(ie,oe){return oe||L(ie,4,this.length),(this[ie]|this[ie+1]<<8|this[ie+2]<<16)+this[ie+3]*16777216},b.prototype.readUInt32BE=function(ie,oe){return oe||L(ie,4,this.length),this[ie]*16777216+(this[ie+1]<<16|this[ie+2]<<8|this[ie+3])},b.prototype.readIntLE=function(ie,oe,ee){ie=ie|0,oe=oe|0,ee||L(ie,oe,this.length);for(var de=this[ie],we=1,Be=0;++Be<oe&&(we*=256);)de+=this[ie+Be]*we;return we*=128,de>=we&&(de-=Math.pow(2,8*oe)),de},b.prototype.readIntBE=function(ie,oe,ee){ie=ie|0,oe=oe|0,ee||L(ie,oe,this.length);for(var de=oe,we=1,Be=this[ie+--de];de>0&&(we*=256);)Be+=this[ie+--de]*we;return we*=128,Be>=we&&(Be-=Math.pow(2,8*oe)),Be},b.prototype.readInt8=function(ie,oe){return oe||L(ie,1,this.length),this[ie]&128?(255-this[ie]+1)*-1:this[ie]},b.prototype.readInt16LE=function(ie,oe){oe||L(ie,2,this.length);var ee=this[ie]|this[ie+1]<<8;return ee&32768?ee|4294901760:ee},b.prototype.readInt16BE=function(ie,oe){oe||L(ie,2,this.length);var ee=this[ie+1]|this[ie]<<8;return ee&32768?ee|4294901760:ee},b.prototype.readInt32LE=function(ie,oe){return oe||L(ie,4,this.length),this[ie]|this[ie+1]<<8|this[ie+2]<<16|this[ie+3]<<24},b.prototype.readInt32BE=function(ie,oe){return oe||L(ie,4,this.length),this[ie]<<24|this[ie+1]<<16|this[ie+2]<<8|this[ie+3]},b.prototype.readFloatLE=function(ie,oe){return oe||L(ie,4,this.length),O.read(this,ie,!0,23,4)},b.prototype.readFloatBE=function(ie,oe){return oe||L(ie,4,this.length),O.read(this,ie,!1,23,4)},b.prototype.readDoubleLE=function(ie,oe){return oe||L(ie,8,this.length),O.read(this,ie,!0,52,8)},b.prototype.readDoubleBE=function(ie,oe){return oe||L(ie,8,this.length),O.read(this,ie,!1,52,8)};function $(he,ie,oe,ee,de,we){if(!b.isBuffer(he))throw new TypeError('"buffer" argument must be a Buffer instance');if(ie>de||ie<we)throw new RangeError('"value" argument is out of bounds');if(oe+ee>he.length)throw new RangeError("Index out of range")}b.prototype.writeUIntLE=function(ie,oe,ee,de){if(ie=+ie,oe=oe|0,ee=ee|0,!de){var we=Math.pow(2,8*ee)-1;$(this,ie,oe,ee,we,0)}var Be=1,nt=0;for(this[oe]=ie&255;++nt<ee&&(Be*=256);)this[oe+nt]=ie/Be&255;return oe+ee},b.prototype.writeUIntBE=function(ie,oe,ee,de){if(ie=+ie,oe=oe|0,ee=ee|0,!de){var we=Math.pow(2,8*ee)-1;$(this,ie,oe,ee,we,0)}var Be=ee-1,nt=1;for(this[oe+Be]=ie&255;--Be>=0&&(nt*=256);)this[oe+Be]=ie/nt&255;return oe+ee},b.prototype.writeUInt8=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,1,255,0),b.TYPED_ARRAY_SUPPORT||(ie=Math.floor(ie)),this[oe]=ie&255,oe+1};function Y(he,ie,oe,ee){ie<0&&(ie=65535+ie+1);for(var de=0,we=Math.min(he.length-oe,2);de<we;++de)he[oe+de]=(ie&255<<8*(ee?de:1-de))>>>(ee?de:1-de)*8}b.prototype.writeUInt16LE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie&255,this[oe+1]=ie>>>8):Y(this,ie,oe,!0),oe+2},b.prototype.writeUInt16BE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie>>>8,this[oe+1]=ie&255):Y(this,ie,oe,!1),oe+2};function ne(he,ie,oe,ee){ie<0&&(ie=4294967295+ie+1);for(var de=0,we=Math.min(he.length-oe,4);de<we;++de)he[oe+de]=ie>>>(ee?de:3-de)*8&255}b.prototype.writeUInt32LE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[oe+3]=ie>>>24,this[oe+2]=ie>>>16,this[oe+1]=ie>>>8,this[oe]=ie&255):ne(this,ie,oe,!0),oe+4},b.prototype.writeUInt32BE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie>>>24,this[oe+1]=ie>>>16,this[oe+2]=ie>>>8,this[oe+3]=ie&255):ne(this,ie,oe,!1),oe+4},b.prototype.writeIntLE=function(ie,oe,ee,de){if(ie=+ie,oe=oe|0,!de){var we=Math.pow(2,8*ee-1);$(this,ie,oe,ee,we-1,-we)}var Be=0,nt=1,at=0;for(this[oe]=ie&255;++Be<ee&&(nt*=256);)ie<0&&at===0&&this[oe+Be-1]!==0&&(at=1),this[oe+Be]=(ie/nt>>0)-at&255;return oe+ee},b.prototype.writeIntBE=function(ie,oe,ee,de){if(ie=+ie,oe=oe|0,!de){var we=Math.pow(2,8*ee-1);$(this,ie,oe,ee,we-1,-we)}var Be=ee-1,nt=1,at=0;for(this[oe+Be]=ie&255;--Be>=0&&(nt*=256);)ie<0&&at===0&&this[oe+Be+1]!==0&&(at=1),this[oe+Be]=(ie/nt>>0)-at&255;return oe+ee},b.prototype.writeInt8=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,1,127,-128),b.TYPED_ARRAY_SUPPORT||(ie=Math.floor(ie)),ie<0&&(ie=255+ie+1),this[oe]=ie&255,oe+1},b.prototype.writeInt16LE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie&255,this[oe+1]=ie>>>8):Y(this,ie,oe,!0),oe+2},b.prototype.writeInt16BE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie>>>8,this[oe+1]=ie&255):Y(this,ie,oe,!1),oe+2},b.prototype.writeInt32LE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie&255,this[oe+1]=ie>>>8,this[oe+2]=ie>>>16,this[oe+3]=ie>>>24):ne(this,ie,oe,!0),oe+4},b.prototype.writeInt32BE=function(ie,oe,ee){return ie=+ie,oe=oe|0,ee||$(this,ie,oe,4,2147483647,-2147483648),ie<0&&(ie=4294967295+ie+1),b.TYPED_ARRAY_SUPPORT?(this[oe]=ie>>>24,this[oe+1]=ie>>>16,this[oe+2]=ie>>>8,this[oe+3]=ie&255):ne(this,ie,oe,!1),oe+4};function se(he,ie,oe,ee,de,we){if(oe+ee>he.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function _e(he,ie,oe,ee,de){return de||se(he,ie,oe,4,34028234663852886e22,-34028234663852886e22),O.write(he,ie,oe,ee,23,4),oe+4}b.prototype.writeFloatLE=function(ie,oe,ee){return _e(this,ie,oe,!0,ee)},b.prototype.writeFloatBE=function(ie,oe,ee){return _e(this,ie,oe,!1,ee)};function ve(he,ie,oe,ee,de){return de||se(he,ie,oe,8,17976931348623157e292,-17976931348623157e292),O.write(he,ie,oe,ee,52,8),oe+8}b.prototype.writeDoubleLE=function(ie,oe,ee){return ve(this,ie,oe,!0,ee)},b.prototype.writeDoubleBE=function(ie,oe,ee){return ve(this,ie,oe,!1,ee)},b.prototype.copy=function(ie,oe,ee,de){if(ee||(ee=0),!de&&de!==0&&(de=this.length),oe>=ie.length&&(oe=ie.length),oe||(oe=0),de>0&&de<ee&&(de=ee),de===ee)return 0;if(ie.length===0||this.length===0)return 0;if(oe<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("sourceStart out of bounds");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),ie.length-oe<de-ee&&(de=ie.length-oe+ee);var we=de-ee,Be;if(this===ie&&ee<oe&&oe<de)for(Be=we-1;Be>=0;--Be)ie[Be+oe]=this[Be+ee];else if(we<1e3||!b.TYPED_ARRAY_SUPPORT)for(Be=0;Be<we;++Be)ie[Be+oe]=this[Be+ee];else Uint8Array.prototype.set.call(ie,this.subarray(ee,ee+we),oe);return we},b.prototype.fill=function(ie,oe,ee,de){if(typeof ie=="string"){if(typeof oe=="string"?(de=oe,oe=0,ee=this.length):typeof ee=="string"&&(de=ee,ee=this.length),ie.length===1){var we=ie.charCodeAt(0);we<256&&(ie=we)}if(de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!b.isEncoding(de))throw new TypeError("Unknown encoding: "+de)}else typeof ie=="number"&&(ie=ie&255);if(oe<0||this.length<oe||this.length<ee)throw new RangeError("Out of range index");if(ee<=oe)return this;oe=oe>>>0,ee=ee===void 0?this.length:ee>>>0,ie||(ie=0);var Be;if(typeof ie=="number")for(Be=oe;Be<ee;++Be)this[Be]=ie;else{var nt=b.isBuffer(ie)?ie:Ie(new b(ie,de).toString()),at=nt.length;for(Be=0;Be<ee-oe;++Be)this[Be+oe]=nt[Be%at]}return this};var Ce=/[^+\/0-9A-Za-z-_]/g;function De(he){if(he=Qe(he).replace(Ce,""),he.length<2)return"";for(;he.length%4!==0;)he=he+"=";return he}function Qe(he){return he.trim?he.trim():he.replace(/^\s+|\s+$/g,"")}function Se(he){return he<16?"0"+he.toString(16):he.toString(16)}function Ie(he,ie){ie=ie||Infinity;for(var oe,ee=he.length,de=null,we=[],Be=0;Be<ee;++Be){if(oe=he.charCodeAt(Be),oe>55295&&oe<57344){if(!de){if(oe>56319){(ie-=3)>-1&&we.push(239,191,189);continue}else if(Be+1===ee){(ie-=3)>-1&&we.push(239,191,189);continue}de=oe;continue}if(oe<56320){(ie-=3)>-1&&we.push(239,191,189),de=oe;continue}oe=(de-55296<<10|oe-56320)+65536}else de&&((ie-=3)>-1&&we.push(239,191,189));if(de=null,oe<128){if((ie-=1)<0)break;we.push(oe)}else if(oe<2048){if((ie-=2)<0)break;we.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((ie-=3)<0)break;we.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((ie-=4)<0)break;we.push(oe>>18|240,oe>>12&63|128,oe>>6&63|128,oe&63|128)}else throw new Error("Invalid code point")}return we}function Je(he){for(var ie=[],oe=0;oe<he.length;++oe)ie.push(he.charCodeAt(oe)&255);return ie}function Et(he,ie){for(var oe,ee,de,we=[],Be=0;Be<he.length&&!((ie-=2)<0);++Be)oe=he.charCodeAt(Be),ee=oe>>8,de=oe%256,we.push(de),we.push(ee);return we}function Le(he){return Q.toByteArray(De(he))}function je(he,ie,oe,ee){for(var de=0;de<ee&&!(de+oe>=ie.length||de>=he.length);++de)ie[de+oe]=he[de];return de}function st(he){return he!==he}}).call(this,H("IyRk"))},HmJG:function(Xe,le,H){},I8Z2:function(Xe,le,H){"use strict";H.d(le,"a",function(){return K}),H.d(le,"b",function(){return h}),H.d(le,"c",function(){return o});var Z=H("q1tI"),Q=function(){var f=function(l,c){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var v in u)u.hasOwnProperty(v)&&(a[v]=u[v])},f(l,c)};return function(l,c){f(l,c);function a(){this.constructor=l}l.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)}}(),O=Z.createContext(null),K=function(f){Q(l,f);function l(){return f!==null&&f.apply(this,arguments)||this}return l.prototype.render=function(){return Z.createElement(O.Provider,{value:this.props.store},this.props.children)},l}(Z.Component),M=H("Gytx"),B=H.n(M),R=H("2mql"),b=H.n(R),t=function(){var f=function(l,c){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var v in u)u.hasOwnProperty(v)&&(a[v]=u[v])},f(l,c)};return function(l,c){f(l,c);function a(){this.constructor=l}l.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)}}(),E=function(){return E=Object.assign||function(f){for(var l,c=1,a=arguments.length;c<a;c++){l=arguments[c];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(f[u]=l[u])}return f},E.apply(this,arguments)};function i(f){return f.displayName||f.name||"Component"}var A=function(){return{}};function h(f,l){l===void 0&&(l={});var c=!!f,a=f||A;return function(v){var T=function(D){t(w,D);function w(p,n){var d=D.call(this,p,n)||this;return d.unsubscribe=null,d.handleChange=function(){if(!d.unsubscribe)return;var m=a(d.store.getState(),d.props);d.setState({subscribed:m})},d.store=d.context,d.state={subscribed:a(d.store.getState(),p),store:d.store,props:p},d}return w.getDerivedStateFromProps=function(p,n){return f&&f.length===2&&p!==n.props?{subscribed:a(n.store.getState(),p),props:p}:{props:p}},w.prototype.componentDidMount=function(){this.trySubscribe()},w.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},w.prototype.shouldComponentUpdate=function(p,n){return!B()(this.props,p)||!B()(this.state.subscribed,n.subscribed)},w.prototype.trySubscribe=function(){c&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},w.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},w.prototype.render=function(){var p=E(E(E({},this.props),this.state.subscribed),{store:this.store});return Z.createElement(v,E({},p,{ref:this.props.miniStoreForwardedRef}))},w.displayName="Connect("+i(v)+")",w.contextType=O,w}(Z.Component);if(l.forwardRef){var x=Z.forwardRef(function(D,w){return Z.createElement(T,E({},D,{miniStoreForwardedRef:w}))});return b()(x,v)}return b()(T,v)}}var s=function(){return s=Object.assign||function(f){for(var l,c=1,a=arguments.length;c<a;c++){l=arguments[c];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(f[u]=l[u])}return f},s.apply(this,arguments)};function o(f){var l=f,c=[];function a(T){l=s(s({},l),T);for(var x=0;x<c.length;x++)c[x]()}function u(){return l}function v(T){return c.push(T),function(){var D=c.indexOf(T);c.splice(D,1)}}return{setState:a,getState:u,subscribe:v}}},IBYe:function(Xe,le,H){"use strict";function Z(Q){return null}le.a=Z},IMiH:function(Xe,le,H){var Z=H("Sj9i"),Q=H("QBsz"),O=H("4mN7"),K=H("mFDi"),M=H("LPTA"),B=M.devicePixelRatio,R={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},b=[],t=[],E=[],i=[],A=Math.min,h=Math.max,s=Math.cos,o=Math.sin,f=Math.sqrt,l=Math.abs,c=typeof Float32Array!="undefined",a=function(v){this._saveData=!(v||!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(v,T,x){x=x||0,this._ux=l(x/B/v)||0,this._uy=l(x/B/T)||0},getContext:function(){return this._ctx},beginPath:function(v){return this._ctx=v,v&&v.beginPath(),v&&(this.dpr=v.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(v,T){return this.addData(R.M,v,T),this._ctx&&this._ctx.moveTo(v,T),this._x0=v,this._y0=T,this._xi=v,this._yi=T,this},lineTo:function(v,T){var x=l(v-this._xi)>this._ux||l(T-this._yi)>this._uy||this._len<5;return this.addData(R.L,v,T),this._ctx&&x&&(this._needsDash()?this._dashedLineTo(v,T):this._ctx.lineTo(v,T)),x&&(this._xi=v,this._yi=T),this},bezierCurveTo:function(v,T,x,D,w,p){return this.addData(R.C,v,T,x,D,w,p),this._ctx&&(this._needsDash()?this._dashedBezierTo(v,T,x,D,w,p):this._ctx.bezierCurveTo(v,T,x,D,w,p)),this._xi=w,this._yi=p,this},quadraticCurveTo:function(v,T,x,D){return this.addData(R.Q,v,T,x,D),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(v,T,x,D):this._ctx.quadraticCurveTo(v,T,x,D)),this._xi=x,this._yi=D,this},arc:function(v,T,x,D,w,p){return this.addData(R.A,v,T,x,x,D,w-D,0,p?0:1),this._ctx&&this._ctx.arc(v,T,x,D,w,p),this._xi=s(w)*x+v,this._yi=o(w)*x+T,this},arcTo:function(v,T,x,D,w){return this._ctx&&this._ctx.arcTo(v,T,x,D,w),this},rect:function(v,T,x,D){return this._ctx&&this._ctx.rect(v,T,x,D),this.addData(R.R,v,T,x,D),this},closePath:function(){this.addData(R.Z);var v=this._ctx,T=this._x0,x=this._y0;return v&&(this._needsDash()&&this._dashedLineTo(T,x),v.closePath()),this._xi=T,this._yi=x,this},fill:function(v){v&&v.fill(),this.toStatic()},stroke:function(v){v&&v.stroke(),this.toStatic()},setLineDash:function(v){if(v instanceof Array){this._lineDash=v,this._dashIdx=0;for(var T=0,x=0;x<v.length;x++)T+=v[x];this._dashSum=T}return this},setLineDashOffset:function(v){return this._dashOffset=v,this},len:function(){return this._len},setData:function(v){var T=v.length;!(this.data&&this.data.length===T)&&c&&(this.data=new Float32Array(T));for(var x=0;x<T;x++)this.data[x]=v[x];this._len=T},appendPath:function(v){v instanceof Array||(v=[v]);for(var T=v.length,x=0,D=this._len,w=0;w<T;w++)x+=v[w].len();c&&this.data instanceof Float32Array&&(this.data=new Float32Array(D+x));for(var w=0;w<T;w++)for(var p=v[w].data,n=0;n<p.length;n++)this.data[D++]=p[n];this._len=D},addData:function(v){if(!this._saveData)return;var T=this.data;this._len+arguments.length>T.length&&(this._expandData(),T=this.data);for(var x=0;x<arguments.length;x++)T[this._len++]=arguments[x];this._prevCmd=v},_expandData:function(){if(!(this.data instanceof Array)){for(var v=[],T=0;T<this._len;T++)v[T]=this.data[T];this.data=v}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(v,T){var x=this._dashSum,D=this._dashOffset,w=this._lineDash,p=this._ctx,n=this._xi,d=this._yi,m=v-n,C=T-d,y=f(m*m+C*C),g=n,U=d,k,I=w.length,V;for(m/=y,C/=y,D<0&&(D=x+D),D%=x,g-=D*m,U-=D*C;m>0&&g<=v||m<0&&g>=v||m===0&&(C>0&&U<=T||C<0&&U>=T);){if(V=this._dashIdx,k=w[V],g+=m*k,U+=C*k,this._dashIdx=(V+1)%I,m>0&&g<n||m<0&&g>n||C>0&&U<d||C<0&&U>d)continue;p[V%2?"moveTo":"lineTo"](m>=0?A(g,v):h(g,v),C>=0?A(U,T):h(U,T))}m=g-v,C=U-T,this._dashOffset=-f(m*m+C*C)},_dashedBezierTo:function(v,T,x,D,w,p){var n=this._dashSum,d=this._dashOffset,m=this._lineDash,C=this._ctx,y=this._xi,g=this._yi,U,k,I,V=Z.cubicAt,G=0,L=this._dashIdx,$=m.length,Y,ne,se=0;for(d<0&&(d=n+d),d%=n,U=0;U<1;U+=.1)k=V(y,v,x,w,U+.1)-V(y,v,x,w,U),I=V(g,T,D,p,U+.1)-V(g,T,D,p,U),G+=f(k*k+I*I);for(;L<$&&!(se+=m[L],se>d);L++);for(U=(se-d)/G;U<=1;)Y=V(y,v,x,w,U),ne=V(g,T,D,p,U),L%2?C.moveTo(Y,ne):C.lineTo(Y,ne),U+=m[L]/G,L=(L+1)%$;L%2!==0&&C.lineTo(w,p),k=w-Y,I=p-ne,this._dashOffset=-f(k*k+I*I)},_dashedQuadraticTo:function(v,T,x,D){var w=x,p=D;x=(x+2*v)/3,D=(D+2*T)/3,v=(this._xi+2*v)/3,T=(this._yi+2*T)/3,this._dashedBezierTo(v,T,x,D,w,p)},toStatic:function(){var v=this.data;v instanceof Array&&(v.length=this._len,c&&(this.data=new Float32Array(v)))},getBoundingRect:function(){b[0]=b[1]=E[0]=E[1]=Number.MAX_VALUE,t[0]=t[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var v=this.data,T=0,x=0,D=0,w=0,p=0;p<v.length;){var n=v[p++];p===1&&(T=v[p],x=v[p+1],D=T,w=x);switch(n){case R.M:D=v[p++],w=v[p++],T=D,x=w,E[0]=D,E[1]=w,i[0]=D,i[1]=w;break;case R.L:O.fromLine(T,x,v[p],v[p+1],E,i),T=v[p++],x=v[p++];break;case R.C:O.fromCubic(T,x,v[p++],v[p++],v[p++],v[p++],v[p],v[p+1],E,i),T=v[p++],x=v[p++];break;case R.Q:O.fromQuadratic(T,x,v[p++],v[p++],v[p],v[p+1],E,i),T=v[p++],x=v[p++];break;case R.A:var d=v[p++],m=v[p++],C=v[p++],y=v[p++],g=v[p++],U=v[p++]+g;p+=1;var k=1-v[p++];p===1&&(D=s(g)*C+d,w=o(g)*y+m),O.fromArc(d,m,C,y,g,U,k,E,i),T=s(U)*C+d,x=o(U)*y+m;break;case R.R:D=T=v[p++],w=x=v[p++];var I=v[p++],V=v[p++];O.fromLine(D,w,D+I,w+V,E,i);break;case R.Z:T=D,x=w;break}Q.min(b,b,E),Q.max(t,t,i)}return p===0&&(b[0]=b[1]=t[0]=t[1]=0),new K(b[0],b[1],t[0]-b[0],t[1]-b[1])},rebuildPath:function(v){for(var T=this.data,x,D,w,p,n,d,m=this._ux,C=this._uy,y=this._len,g=0;g<y;){var U=T[g++];g===1&&(w=T[g],p=T[g+1],x=w,D=p);switch(U){case R.M:x=w=T[g++],D=p=T[g++],v.moveTo(w,p);break;case R.L:n=T[g++],d=T[g++],(l(n-w)>m||l(d-p)>C||g===y-1)&&(v.lineTo(n,d),w=n,p=d);break;case R.C:v.bezierCurveTo(T[g++],T[g++],T[g++],T[g++],T[g++],T[g++]),w=T[g-2],p=T[g-1];break;case R.Q:v.quadraticCurveTo(T[g++],T[g++],T[g++],T[g++]),w=T[g-2],p=T[g-1];break;case R.A:var k=T[g++],I=T[g++],V=T[g++],G=T[g++],L=T[g++],$=T[g++],Y=T[g++],ne=T[g++],se=V>G?V:G,_e=V>G?1:V/G,ve=V>G?G/V:1,Ce=Math.abs(V-G)>.001,De=L+$;Ce?(v.translate(k,I),v.rotate(Y),v.scale(_e,ve),v.arc(0,0,se,L,De,1-ne),v.scale(1/_e,1/ve),v.rotate(-Y),v.translate(-k,-I)):v.arc(k,I,se,L,De,1-ne),g===1&&(x=s(L)*V+k,D=o(L)*G+I),w=s(De)*V+k,p=o(De)*G+I;break;case R.R:x=w=T[g],D=p=T[g+1],v.rect(T[g++],T[g++],T[g++],T[g++]);break;case R.Z:v.closePath(),w=x,p=D}}}},a.CMD=R;var u=a;Xe.exports=u},ItGF:function(Xe,le){var H={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?H={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?H={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?H={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:H=Q(navigator.userAgent);var Z=H;function Q(O){var K={},M={},B=O.match(/Firefox\/([\d.]+)/),R=O.match(/MSIE\s([\d.]+)/)||O.match(/Trident\/.+?rv:(([\d.]+))/),b=O.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(O);return B&&(M.firefox=!0,M.version=B[1]),R&&(M.ie=!0,M.version=R[1]),b&&(M.edge=!0,M.version=b[1]),t&&(M.weChat=!0),{browser:M,os:K,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!M.ie&&!M.edge,pointerEventsSupported:"onpointerdown"in window&&(M.edge||M.ie&&M.version>=11),domSupported:typeof document!="undefined"}}Xe.exports=Z},JYp7:function(Xe,le,H){"use strict";H.d(le,"a",function(){return Z});var Z;(function(Q){function O(u){return u&&typeof u=="object"&&typeof u[Symbol.iterator]=="function"}Q.is=O;const K=Object.freeze([]);function M(){return K}Q.empty=M;function*B(u){yield u}Q.single=B;function R(u){return u||K}Q.from=R;function b(u){return!u||u[Symbol.iterator]().next().done===!0}Q.isEmpty=b;function t(u){return u[Symbol.iterator]().next().value}Q.first=t;function E(u,v){for(const T of u)if(v(T))return!0;return!1}Q.some=E;function i(u,v){for(const T of u)if(v(T))return T;return}Q.find=i;function*A(u,v){for(const T of u)v(T)&&(yield T)}Q.filter=A;function*h(u,v){let T=0;for(const x of u)yield v(x,T++)}Q.map=h;function*s(...u){for(const v of u)for(const T of v)yield T}Q.concat=s;function*o(u){for(const v of u)for(const T of v)yield T}Q.concatNested=o;function f(u,v,T){let x=T;for(const D of u)x=v(x,D);return x}Q.reduce=f;function*l(u,v,T=u.length){for(v<0&&(v+=u.length),T<0?T+=u.length:T>u.length&&(T=u.length);v<T;v++)yield u[v]}Q.slice=l;function c(u,v=Number.POSITIVE_INFINITY){const T=[];if(v===0)return[T,u];const x=u[Symbol.iterator]();for(let D=0;D<v;D++){const w=x.next();if(w.done)return[T,Q.empty()];T.push(w.value)}return[T,{[Symbol.iterator](){return x}}]}Q.consume=c;function a(u,v,T=(x,D)=>x===D){const x=u[Symbol.iterator](),D=v[Symbol.iterator]();for(;;){const w=x.next(),p=D.next();if(w.done!==p.done)return!1;if(w.done)return!0;if(!T(w.value,p.value))return!1}}Q.equals=a})(Z||(Z={}))},K2GJ:function(Xe,le,H){var Z=H("fW2E"),Q=H("gut8"),O=Q.ContextCachedBy,K=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],M=function(A){this.extendFrom(A,!1)};function B(A,h,s){var o=h.x==null?0:h.x,f=h.x2==null?1:h.x2,l=h.y==null?0:h.y,c=h.y2==null?0:h.y2;h.global||(o=o*s.width+s.x,f=f*s.width+s.x,l=l*s.height+s.y,c=c*s.height+s.y),o=isNaN(o)?0:o,f=isNaN(f)?1:f,l=isNaN(l)?0:l,c=isNaN(c)?0:c;var a=A.createLinearGradient(o,l,f,c);return a}function R(A,h,s){var o=s.width,f=s.height,l=Math.min(o,f),c=h.x==null?.5:h.x,a=h.y==null?.5:h.y,u=h.r==null?.5:h.r;h.global||(c=c*o+s.x,a=a*f+s.y,u=u*l);var v=A.createRadialGradient(c,a,0,c,a,u);return v}M.prototype={constructor:M,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(A,h,s){var o=this,f=s&&s.style,l=!f||A.__attrCachedBy!==O.STYLE_BIND;A.__attrCachedBy=O.STYLE_BIND;for(var c=0;c<K.length;c++){var a=K[c],u=a[0];(l||o[u]!==f[u])&&(A[u]=Z(A,u,o[u]||a[1]))}if((l||o.fill!==f.fill)&&(A.fillStyle=o.fill),(l||o.stroke!==f.stroke)&&(A.strokeStyle=o.stroke),(l||o.opacity!==f.opacity)&&(A.globalAlpha=o.opacity==null?1:o.opacity),(l||o.blend!==f.blend)&&(A.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()){var v=o.lineWidth;A.lineWidth=v/(this.strokeNoScale&&h&&h.getLineScale?h.getLineScale():1)}},hasFill:function(){var A=this.fill;return A!=null&&A!=="none"},hasStroke:function(){var A=this.stroke;return A!=null&&A!=="none"&&this.lineWidth>0},extendFrom:function(A,h){if(A)for(var s in A)A.hasOwnProperty(s)&&(h===!0||(h===!1?!this.hasOwnProperty(s):A[s]!=null))&&(this[s]=A[s])},set:function(A,h){typeof A=="string"?this[A]=h:this.extendFrom(A,!0)},clone:function(){var A=new this.constructor;return A.extendFrom(this,!0),A},getGradient:function(A,h,s){for(var o=h.type==="radial"?R:B,f=o(A,h,s),l=h.colorStops,c=0;c<l.length;c++)f.addColorStop(l[c].offset,l[c].color);return f}};for(var b=M.prototype,t=0;t<K.length;t++){var E=K[t];E[0]in b||(b[E[0]]=E[1])}M.getGradient=b.getGradient;var i=M;Xe.exports=i},LPTA:function(Xe,le){var H=1;typeof window!="undefined"&&(H=Math.max(window.devicePixelRatio||1,1));var Z=0,Q=H;le.debugMode=Z,le.devicePixelRatio=Q},LdHM:function(Xe,le,H){"use strict";H.d(le,"b",function(){return u}),H.d(le,"a",function(){return T});var Z=H("1OyB"),Q=H("vuIU"),O=H("Ji7U"),K=H("LK+K"),M=H("q1tI"),B=H("rePB"),R=H("Ff2n"),b=H("ODXe"),t=H("4IlW"),E=H("bX4T"),i=H("YrtM"),A=H("TSYQ"),h=H.n(A),s=H("+nKL"),o=H("8OUc"),f=function($,Y){var ne=$.prefixCls,se=$.id,_e=$.flattenOptions,ve=$.childrenAsData,Ce=$.values,De=$.searchValue,Qe=$.multiple,Se=$.defaultActiveFirstOption,Ie=$.height,Je=$.itemHeight,Et=$.notFoundContent,Le=$.open,je=$.menuItemSelectedIcon,st=$.virtual,he=$.onSelect,ie=$.onToggleOpen,oe=$.onActiveValue,ee=$.onScroll,de=$.onMouseEnter,we="".concat(ne,"-item"),Be=Object(i.a)(function(){return _e},[Le,_e],function(ot,Ke){return Ke[0]&&ot[1]!==Ke[1]}),nt=M.useRef(null),at=function(Ke){Ke.preventDefault()},At=function(Ke){nt.current&&nt.current.scrollTo({index:Ke})},ft=function(Ke){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ue=Be.length,ge=0;ge<Ue;ge+=1){var xe=(Ke+ge*Me+Ue)%Ue,Ee=Be[xe],Oe=Ee.group,Fe=Ee.data;if(!Oe&&!Fe.disabled)return xe}return-1},xt=M.useState(function(){return ft(0)}),It=Object(b.a)(xt,2),He=It[0],ke=It[1],ct=function(Ke){ke(Ke);var Me=Be[Ke];if(!Me){oe(null,-1);return}oe(Me.data.value,Ke)};M.useEffect(function(){ct(Se!==!1?ft(0):-1)},[Be.length,De]),M.useEffect(function(){var ot=setTimeout(function(){if(!Qe&&Le&&Ce.size===1){var Ke=Array.from(Ce)[0],Me=Be.findIndex(function(Ue){var ge=Ue.data;return ge.value===Ke});ct(Me),At(Me)}});return function(){return clearTimeout(ot)}},[Le]);var gt=function(Ke){Ke!==void 0&&he(Ke,{selected:!Ce.has(Ke)}),Qe||ie(!1)};if(M.useImperativeHandle(Y,function(){return{onKeyDown:function(Ke){var Me=Ke.which;switch(Me){case t.a.UP:case t.a.DOWN:{var Ue=0;if(Me===t.a.UP?Ue=-1:Me===t.a.DOWN&&(Ue=1),Ue!==0){var ge=ft(He+Ue,Ue);At(ge),ct(ge)}break}case t.a.ENTER:{var xe=Be[He];xe&&!xe.data.disabled?gt(xe.data.value):gt(void 0),Le&&Ke.preventDefault();break}case t.a.ESC:ie(!1)}},onKeyUp:function(){},scrollTo:function(Ke){At(Ke)}}}),Be.length===0)return M.createElement("div",{role:"listbox",id:"".concat(se,"_list"),className:"".concat(we,"-empty"),onMouseDown:at},Et);function Ze(ot){var Ke=Be[ot];if(!Ke)return null;var Me=Ke.data||{},Ue=Me.value,ge=Me.label,xe=Me.children,Ee=Object(E.a)(Me,!0),Oe=ve?xe:ge;return Ke?M.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},Ee,{key:ot,role:"option",id:"".concat(se,"_list_").concat(ot),"aria-selected":Ce.has(Ue)}),Ue):null}return M.createElement(M.Fragment,null,M.createElement("div",{role:"listbox",id:"".concat(se,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(He-1),Ze(He),Ze(He+1)),M.createElement(s.a,{itemKey:"key",ref:nt,data:Be,height:Ie,itemHeight:Je,fullHeight:!1,onMouseDown:at,onScroll:ee,virtual:st,onMouseEnter:de},function(ot,Ke){var Me,Ue=ot.group,ge=ot.groupOption,xe=ot.data,Ee=xe.label,Oe=xe.key;if(Ue)return M.createElement("div",{className:h()(we,"".concat(we,"-group"))},Ee!==void 0?Ee:Oe);var Fe=xe.disabled,$e=xe.value,pt=xe.title,Ot=xe.children,kt=xe.style,Dt=xe.className,Bt=Object(R.a)(xe,["disabled","value","title","children","style","className"]),ht=Ce.has($e),it="".concat(we,"-option"),et=h()(we,it,Dt,(Me={},Object(B.a)(Me,"".concat(it,"-grouped"),ge),Object(B.a)(Me,"".concat(it,"-active"),He===Ke&&!Fe),Object(B.a)(Me,"".concat(it,"-disabled"),Fe),Object(B.a)(Me,"".concat(it,"-selected"),ht),Me)),Te=ve?Ot:Ee,Ne=!je||typeof je=="function"||ht;return M.createElement("div",Object.assign({},Bt,{"aria-selected":ht,className:et,title:pt,onMouseMove:function(){if(He===Ke||Fe)return;ct(Ke)},onClick:function(){Fe||gt($e)},style:kt}),M.createElement("div",{className:"".concat(it,"-content")},Te||$e),M.isValidElement(je)||ht,Ne&&M.createElement(o.a,{className:"".concat(we,"-option-state"),customizeIcon:je,customizeIconProps:{isSelected:ht}},ht?"\u2713":null))}))},l=M.forwardRef(f);l.displayName="OptionList";var c=l,a=function(){return null};a.isSelectOption=!0;var u=a,v=function(){return null};v.isSelectOptGroup=!0;var T=v,x=H("VTBJ"),D=H("Zm9Q");function w(L){var $=L.key,Y=L.props,ne=Y.children,se=Y.value,_e=Object(R.a)(Y,["children","value"]);return Object(x.a)({key:$,value:se!==void 0?se:$,children:ne},_e)}function p(L){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(L).map(function(Y,ne){if(!M.isValidElement(Y)||!Y.type)return null;var se=Y.type.isSelectOptGroup,_e=Y.key,ve=Y.props,Ce=ve.children,De=Object(R.a)(ve,["children"]);return $||!se?w(Y):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(_e===null?ne:_e,"__"),label:_e},De),{},{options:p(Ce)})}).filter(function(Y){return Y})}var n=H("2Qr1"),d=H("qNPg"),m=H("U8pU"),C=H("Kwbf"),y=H("WKfj");function g(L){var $=L.mode,Y=L.options,ne=L.children,se=L.backfill,_e=L.allowClear,ve=L.placeholder,Ce=L.getInputElement,De=L.showSearch,Qe=L.onSearch,Se=L.defaultOpen,Ie=L.autoFocus,Je=L.labelInValue,Et=L.value,Le=L.inputValue,je=L.optionLabelProp,st=$==="multiple"||$==="tags",he=De!==void 0?De:st||$==="combobox",ie=Y||p(ne);if(Object(C.a)($!=="tags"||ie.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var oe=ie.some(function(we){return we.options?we.options.some(function(Be){return typeof("value"in Be?Be.value:Be.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(C.a)(!oe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)($!=="combobox"||!je,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)($==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(C.a)($==="combobox"||!Ce,"`getInputElement` only work with `combobox` mode."),Object(C.b)($!=="combobox"||!Ce||!_e||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Qe&&!he&&$!=="combobox"&&$!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!Se||Ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Et!=null){var ee=Object(y.d)(Et);Object(C.a)(!Je||ee.every(function(we){return Object(m.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!st||Array.isArray(Et),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var de=null;Object(D.a)(ne).some(function(we){if(!M.isValidElement(we)||!we.type)return!1;var Be=we.type;if(Be.isSelectOption)return!1;if(Be.isSelectOptGroup){var nt=Object(D.a)(we.props.children).every(function(at){return!M.isValidElement(at)||!we.type||at.type.isSelectOption?!0:(de=at.type,!1)});return!nt}return de=Be,!0}),de&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(de.displayName||de.name||de,"`.")),Object(C.a)(Le===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=g,k=Object(d.a)({prefixCls:"rc-select",components:{optionList:c},convertChildrenToData:p,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:U,fillOptionsWithMissingValue:n.a}),I=function(L){Object(O.a)(Y,L);var $=Object(K.a)(Y);function Y(){var ne;return Object(Z.a)(this,Y),ne=$.apply(this,arguments),ne.selectRef=M.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(Q.a)(Y,[{key:"render",value:function(){return M.createElement(k,Object.assign({ref:this.selectRef},this.props))}}]),Y}(M.Component);I.Option=u,I.OptGroup=T;var V=I,G=le.c=V},M8RZ:function(Xe,le,H){"use strict";H.d(le,"a",function(){return t});var Z=H("fWQN"),Q=H("mtLc"),O=H("yKVA"),K=H("879j"),M=H("q1tI"),B=H.n(M),R=H("i8i4"),b=H.n(R),t=function(E){Object(O.a)(A,E);var i=Object(K.a)(A);function A(h){var s;Object(Z.a)(this,A),s=i.call(this,h);var o=window.document;return s.node=o.createElement("div"),o.body.appendChild(s.node),s}return Object(Q.a)(A,[{key:"render",value:function(){var s=this.props.children;return Object(R.createPortal)(s,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),A}(B.a.Component)},MEGo:function(Xe,le,H){var Z=H("4fz+"),Q=H("Dagg"),O=H("dqUG"),K=H("2fw6"),M=H("x6Kt"),B=H("rmlV"),R=H("yxFR"),b=H("y+Vt"),t=H("h7HQ"),E=H("1Jh7"),i=H("SKnc"),A=H("K2GJ"),h=H("Fofx"),s=H("NC18"),o=s.createFromString,f=H("bYtY"),l=f.isString,c=f.extend,a=f.defaults,u=f.trim,v=f.each,T=/[\s,]+/;function x(Y){if(l(Y)){var ne=new DOMParser;Y=ne.parseFromString(Y,"text/xml")}for(Y.nodeType===9&&(Y=Y.firstChild);Y.nodeName.toLowerCase()!=="svg"||Y.nodeType!==1;)Y=Y.nextSibling;return Y}function D(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}D.prototype.parse=function(Y,ne){ne=ne||{};var se=x(Y);if(!se)throw new Error("Illegal svg");var _e=new Z;this._root=_e;var ve=se.getAttribute("viewBox")||"",Ce=parseFloat(se.getAttribute("width")||ne.width),De=parseFloat(se.getAttribute("height")||ne.height);isNaN(Ce)&&(Ce=null),isNaN(De)&&(De=null),y(se,_e,null,!0);for(var Qe=se.firstChild;Qe;)this._parseNode(Qe,_e),Qe=Qe.nextSibling;var Se,Ie;if(ve){var Je=u(ve).split(T);Je.length>=4&&(Se={x:parseFloat(Je[0]||0),y:parseFloat(Je[1]||0),width:parseFloat(Je[2]),height:parseFloat(Je[3])})}if(Se&&Ce!=null&&De!=null&&(Ie=L(Se,Ce,De),!ne.ignoreViewBox)){var Et=_e;_e=new Z,_e.add(Et),Et.scale=Ie.scale.slice(),Et.position=Ie.position.slice()}return!ne.ignoreRootClip&&Ce!=null&&De!=null&&_e.setClipPath(new M({shape:{x:0,y:0,width:Ce,height:De}})),{root:_e,width:Ce,height:De,viewBoxRect:Se,viewBoxTransform:Ie}},D.prototype._parseNode=function(Y,ne){var se=Y.nodeName.toLowerCase();se==="defs"?this._isDefine=!0:se==="text"&&(this._isText=!0);var _e;if(this._isDefine){var ve=p[se];if(ve){var Ce=ve.call(this,Y),De=Y.getAttribute("id");De&&(this._defs[De]=Ce)}}else{var ve=w[se];ve&&(_e=ve.call(this,Y,ne),ne.add(_e))}for(var Qe=Y.firstChild;Qe;)Qe.nodeType===1&&this._parseNode(Qe,_e),Qe.nodeType===3&&this._isText&&this._parseText(Qe,_e),Qe=Qe.nextSibling;se==="defs"?this._isDefine=!1:se==="text"&&(this._isText=!1)},D.prototype._parseText=function(Y,ne){if(Y.nodeType===1){var se=Y.getAttribute("dx")||0,_e=Y.getAttribute("dy")||0;this._textX+=parseFloat(se),this._textY+=parseFloat(_e)}var ve=new O({style:{text:Y.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});d(ne,ve),y(Y,ve,this._defs);var Ce=ve.style.fontSize;Ce&&Ce<9&&(ve.style.fontSize=9,ve.scale=ve.scale||[1,1],ve.scale[0]*=Ce/9,ve.scale[1]*=Ce/9);var De=ve.getBoundingRect();return this._textX+=De.width,ne.add(ve),ve};var w={g:function(Y,ne){var se=new Z;return d(ne,se),y(Y,se,this._defs),se},rect:function(Y,ne){var se=new M;return d(ne,se),y(Y,se,this._defs),se.setShape({x:parseFloat(Y.getAttribute("x")||0),y:parseFloat(Y.getAttribute("y")||0),width:parseFloat(Y.getAttribute("width")||0),height:parseFloat(Y.getAttribute("height")||0)}),se},circle:function(Y,ne){var se=new K;return d(ne,se),y(Y,se,this._defs),se.setShape({cx:parseFloat(Y.getAttribute("cx")||0),cy:parseFloat(Y.getAttribute("cy")||0),r:parseFloat(Y.getAttribute("r")||0)}),se},line:function(Y,ne){var se=new R;return d(ne,se),y(Y,se,this._defs),se.setShape({x1:parseFloat(Y.getAttribute("x1")||0),y1:parseFloat(Y.getAttribute("y1")||0),x2:parseFloat(Y.getAttribute("x2")||0),y2:parseFloat(Y.getAttribute("y2")||0)}),se},ellipse:function(Y,ne){var se=new B;return d(ne,se),y(Y,se,this._defs),se.setShape({cx:parseFloat(Y.getAttribute("cx")||0),cy:parseFloat(Y.getAttribute("cy")||0),rx:parseFloat(Y.getAttribute("rx")||0),ry:parseFloat(Y.getAttribute("ry")||0)}),se},polygon:function(Y,ne){var se=Y.getAttribute("points");se&&(se=m(se));var _e=new t({shape:{points:se||[]}});return d(ne,_e),y(Y,_e,this._defs),_e},polyline:function(Y,ne){var se=new b;d(ne,se),y(Y,se,this._defs);var _e=Y.getAttribute("points");_e&&(_e=m(_e));var ve=new E({shape:{points:_e||[]}});return ve},image:function(Y,ne){var se=new Q;return d(ne,se),y(Y,se,this._defs),se.setStyle({image:Y.getAttribute("xlink:href"),x:Y.getAttribute("x"),y:Y.getAttribute("y"),width:Y.getAttribute("width"),height:Y.getAttribute("height")}),se},text:function(Y,ne){var se=Y.getAttribute("x")||0,_e=Y.getAttribute("y")||0,ve=Y.getAttribute("dx")||0,Ce=Y.getAttribute("dy")||0;this._textX=parseFloat(se)+parseFloat(ve),this._textY=parseFloat(_e)+parseFloat(Ce);var De=new Z;return d(ne,De),y(Y,De,this._defs),De},tspan:function(Y,ne){var se=Y.getAttribute("x"),_e=Y.getAttribute("y");se!=null&&(this._textX=parseFloat(se)),_e!=null&&(this._textY=parseFloat(_e));var ve=Y.getAttribute("dx")||0,Ce=Y.getAttribute("dy")||0,De=new Z;return d(ne,De),y(Y,De,this._defs),this._textX+=ve,this._textY+=Ce,De},path:function(Y,ne){var se=Y.getAttribute("d")||"",_e=o(se);return d(ne,_e),y(Y,_e,this._defs),_e}},p={lineargradient:function(Y){var ne=parseInt(Y.getAttribute("x1")||0,10),se=parseInt(Y.getAttribute("y1")||0,10),_e=parseInt(Y.getAttribute("x2")||10,10),ve=parseInt(Y.getAttribute("y2")||0,10),Ce=new i(ne,se,_e,ve);return n(Y,Ce),Ce},radialgradient:function(Y){}};function n(Y,ne){for(var se=Y.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 ve=se.getAttribute("stop-color")||"#000000";ne.addColorStop(_e,ve)}se=se.nextSibling}}function d(Y,ne){Y&&Y.__inheritedStyle&&(ne.__inheritedStyle||(ne.__inheritedStyle={}),a(ne.__inheritedStyle,Y.__inheritedStyle))}function m(Y){for(var ne=u(Y).split(T),se=[],_e=0;_e<ne.length;_e+=2){var ve=parseFloat(ne[_e]),Ce=parseFloat(ne[_e+1]);se.push([ve,Ce])}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 y(Y,ne,se,_e){var ve=ne.__inheritedStyle||{},Ce=ne.type==="text";if(Y.nodeType===1&&(I(Y,ne),c(ve,G(Y)),!_e)){for(var De in C)if(C.hasOwnProperty(De)){var Qe=Y.getAttribute(De);Qe!=null&&(ve[C[De]]=Qe)}}var Se=Ce?"textFill":"fill",Ie=Ce?"textStroke":"stroke";ne.style=ne.style||new A;var Je=ne.style;ve.fill!=null&&Je.set(Se,U(ve.fill,se)),ve.stroke!=null&&Je.set(Ie,U(ve.stroke,se)),v(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Et){var Le=Et==="lineWidth"&&Ce?"textStrokeWidth":Et;ve[Et]!=null&&Je.set(Le,parseFloat(ve[Et]))}),(!ve.textBaseline||ve.textBaseline==="auto")&&(ve.textBaseline="alphabetic"),ve.textBaseline==="alphabetic"&&(ve.textBaseline="bottom"),ve.textAlign==="start"&&(ve.textAlign="left"),ve.textAlign==="end"&&(ve.textAlign="right"),v(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Et){ve[Et]!=null&&Je.set(Et,ve[Et])}),ve.lineDash&&(ne.style.lineDash=u(ve.lineDash).split(T)),Je[Ie]&&Je[Ie]!=="none"&&(ne[Ie]=!0),ne.__inheritedStyle=ve}var g=/url\(\s*#(.*?)\)/;function U(Y,ne){var se=ne&&Y&&Y.match(g);if(se){var _e=u(se[1]),ve=ne[_e];return ve}return Y}var k=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function I(Y,ne){var se=Y.getAttribute("transform");if(se){se=se.replace(/,/g," ");var _e=null,ve=[];se.replace(k,function(Se,Ie,Je){ve.push(Ie,Je)});for(var Ce=ve.length-1;Ce>0;Ce-=2){var De=ve[Ce],Qe=ve[Ce-1];_e=_e||h.create();switch(Qe){case"translate":De=u(De).split(T),h.translate(_e,_e,[parseFloat(De[0]),parseFloat(De[1]||0)]);break;case"scale":De=u(De).split(T),h.scale(_e,_e,[parseFloat(De[0]),parseFloat(De[1]||De[0])]);break;case"rotate":De=u(De).split(T),h.rotate(_e,_e,parseFloat(De[0]));break;case"skew":De=u(De).split(T),console.warn("Skew transform is not supported yet");break;case"matrix":var De=u(De).split(T);_e[0]=parseFloat(De[0]),_e[1]=parseFloat(De[1]),_e[2]=parseFloat(De[2]),_e[3]=parseFloat(De[3]),_e[4]=parseFloat(De[4]),_e[5]=parseFloat(De[5]);break}}ne.setLocalTransform(_e)}}var V=/([^\s:;]+)\s*:\s*([^:;]+)/g;function G(Y){var ne=Y.getAttribute("style"),se={};if(!ne)return se;var _e={};V.lastIndex=0;for(var ve;(ve=V.exec(ne))!=null;)_e[ve[1]]=ve[2];for(var Ce in C)C.hasOwnProperty(Ce)&&_e[Ce]!=null&&(se[C[Ce]]=_e[Ce]);return se}function L(Y,ne,se){var _e=ne/Y.width,ve=se/Y.height,Ce=Math.min(_e,ve),De=[Ce,Ce],Qe=[-(Y.x+Y.width/2)*Ce+ne/2,-(Y.y+Y.height/2)*Ce+se/2];return{scale:De,position:Qe}}function $(Y,ne){var se=new D;return se.parse(Y,ne)}le.parseXML=x,le.makeViewBoxTransform=L,le.parseSVG=$},MI8n:function(Xe,le,H){"use strict";H.d(le,"c",function(){return M}),H.d(le,"b",function(){return t}),H.d(le,"e",function(){return E}),H.d(le,"a",function(){return i}),H.d(le,"d",function(){return A}),H.d(le,"f",function(){return h});var Z=H("/cxE"),Q=H("pmY6"),O=H("24hK"),K=H("5Y4S"),M;(function(s){s.None=()=>Q.a.None;function o(g){return(U,k=null,I)=>{let V=!1,G;return G=g(L=>V?void 0:(G?G.dispose():V=!0,U.call(k,L)),null,I),V&&G.dispose(),G}}s.once=o;function f(g,U){return T((k,I=null,V)=>g(G=>k.call(I,U(G)),null,V))}s.map=f;function l(g,U){return T((k,I=null,V)=>g(G=>{U(G),k.call(I,G)},null,V))}s.forEach=l;function c(g,U){return T((k,I=null,V)=>g(G=>U(G)&&k.call(I,G),null,V))}s.filter=c;function a(g){return g}s.signal=a;function u(...g){return(U,k=null,I)=>Object(Q.e)(...g.map(V=>V(G=>U.call(k,G),null,I)))}s.any=u;function v(g,U,k){let I=k;return f(g,V=>(I=U(I,V),I))}s.reduce=v;function T(g){let U;const k=new t({onFirstListenerAdd(){U=g(k.fire,k)},onLastListenerRemove(){U.dispose()}});return k.event}function x(g,U,k=100,I=!1,V){let G,L,$,Y=0;const ne=new t({leakWarningThreshold:V,onFirstListenerAdd(){G=g(se=>{Y++,L=U(L,se),I&&!$&&(ne.fire(L),L=void 0),clearTimeout($),$=setTimeout(()=>{const _e=L;L=void 0,$=void 0,(!I||Y>1)&&ne.fire(_e),Y=0},k)})},onLastListenerRemove(){G.dispose()}});return ne.event}s.debounce=x;function D(g,U=(k,I)=>k===I){let k=!0,I;return c(g,V=>{const G=k||!U(V,I);return k=!1,I=V,G})}s.latch=D;function w(g,U){return[s.filter(g,U),s.filter(g,k=>!U(k))]}s.split=w;function p(g,U=!1,k=[]){let I=k.slice(),V=g($=>{I?I.push($):L.fire($)});const G=()=>{I&&I.forEach($=>L.fire($)),I=null},L=new t({onFirstListenerAdd(){V||(V=g($=>L.fire($)))},onFirstListenerDidAdd(){I&&(U?setTimeout(G):G())},onLastListenerRemove(){V&&V.dispose(),V=null}});return L.event}s.buffer=p;class n{constructor(g){this.event=g}map(g){return new n(f(this.event,g))}forEach(g){return new n(l(this.event,g))}filter(g){return new n(c(this.event,g))}reduce(g,U){return new n(v(this.event,g,U))}latch(){return new n(D(this.event))}debounce(g,U=100,k=!1,I){return new n(x(this.event,g,U,k,I))}on(g,U,k){return this.event(g,U,k)}once(g,U,k){return o(this.event)(g,U,k)}}function d(g){return new n(g)}s.chain=d;function m(g,U,k=I=>I){const I=(...$)=>L.fire(k(...$)),V=()=>g.on(U,I),G=()=>g.removeListener(U,I),L=new t({onFirstListenerAdd:V,onLastListenerRemove:G});return L.event}s.fromNodeEventEmitter=m;function C(g,U,k=I=>I){const I=(...$)=>L.fire(k(...$)),V=()=>g.addEventListener(U,I),G=()=>g.removeEventListener(U,I),L=new t({onFirstListenerAdd:V,onLastListenerRemove:G});return L.event}s.fromDOMEventEmitter=C;function y(g){return new Promise(U=>o(g)(U))}s.toPromise=y})(M||(M={}));class B{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${B._idPool++}`}start(s){this._stopWatch=new K.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}B._idPool=0;let R=-1;class b{constructor(s,o=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let o=R;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||s<o)return;this._stacks||(this._stacks=new Map);const f=new Error().stack.split(`
`).slice(3).join(`
`),l=this._stacks.get(f)||0;if(this._stacks.set(f,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let c,a=0;for(const[u,v]of this._stacks)(!c||a<v)&&(c=u,a=v);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${a}):`),console.warn(c)}return()=>{const c=this._stacks.get(f)||0;this._stacks.set(f,c-1)}}}class t{constructor(s){var o;this._disposed=!1,this._options=s,this._leakageMon=R>0?new b(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new B(this._options._profName):void 0}get event(){return this._event||(this._event=(s,o,f)=>{var l;this._listeners||(this._listeners=new O.a);const c=this._listeners.isEmpty();c&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(o?[s,o]:s);c&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,o);const u=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),v=Object(Q.i)(()=>{if(u&&u(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const T=this._listeners&&!this._listeners.isEmpty();T||this._options.onLastListenerRemove(this)}});return f instanceof Q.b?f.add(v):Array.isArray(f)&&f.push(v),v}),this._event}fire(s){var o,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new O.a);for(let l of this._listeners)this._deliveryQueue.push([l,s]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,c]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,c):l[0].call(l[1],c)}catch(a){Object(Z.f)(a)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var s,o,f,l,c;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(l=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||l===void 0||l.call(f),(c=this._leakageMon)===null||c===void 0||c.dispose())}}class E extends t{constructor(s){super(s);this._isPaused=0,this._eventQueue=new O.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class i extends E{constructor(s){var o;super(s);this._delay=(o=s.delay)!==null&&o!==void 0?o:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class A{constructor(){this.buffers=[]}wrapEvent(s){return(o,f,l)=>s(c=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>o.call(f,c)):o.call(f,c)},void 0,l)}bufferEvents(s){const o=[];this.buffers.push(o);const f=s();return this.buffers.pop(),o.forEach(l=>l()),f}}class h{constructor(){this.listening=!1,this.inputEvent=M.None,this.inputEventListener=Q.a.None,this.emitter=new t({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MKOG:function(Xe,le,H){var Z=H("bYtY"),Q=H("YH21"),O=Q.Dispatcher,K=H("mLcG"),M=H("Bq2U"),B=function(b){b=b||{},this.stage=b.stage||{},this.onframe=b.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(b){this._clips.push(b)},addAnimator:function(b){b.animation=this;for(var t=b.getClips(),E=0;E<t.length;E++)this.addClip(t[E])},removeClip:function(b){var t=Z.indexOf(this._clips,b);t>=0&&this._clips.splice(t,1)},removeAnimator:function(b){for(var t=b.getClips(),E=0;E<t.length;E++)this.removeClip(t[E]);b.animation=null},_update:function(){for(var b=new Date().getTime()-this._pausedTime,t=b-this._time,E=this._clips,i=E.length,A=[],h=[],s=0;s<i;s++){var o=E[s],f=o.step(b,t);f&&(A.push(f),h.push(o))}for(var s=0;s<i;)E[s]._needsRemove?(E[s]=E[i-1],E.pop(),i--):s++;i=A.length;for(var s=0;s<i;s++)h[s].fire(A[s]);this._time=b,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var b=this;this._running=!0;function t(){b._running&&(K(t),!b._paused&&b._update())}K(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(b,t){t=t||{};var E=new M(b,t.loop,t.getter,t.setter);return this.addAnimator(E),E}},Z.mixin(B,O);var R=B;Xe.exports=R},MNsG:function(Xe,le,H){"use strict";(function(Z,Q){H.d(le,"b",function(){return f}),H.d(le,"i",function(){return u}),H.d(le,"f",function(){return v}),H.d(le,"d",function(){return T}),H.d(le,"g",function(){return x}),H.d(le,"h",function(){return D}),H.d(le,"c",function(){return w}),H.d(le,"k",function(){return p}),H.d(le,"j",function(){return n}),H.d(le,"a",function(){return d}),H.d(le,"e",function(){return y});var O;const K="en";let M=!1,B=!1,R=!1,b=!1,t=!1,E=!1,i=!1,A,h=K,s,o;const f=typeof self=="object"?self:typeof Z=="object"?Z:{};let l;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?l=f.vscode.process:typeof Q!="undefined"&&(l=Q);const c=typeof((O=l==null?void 0:l.versions)===null||O===void 0?void 0:O.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!c)o=navigator.userAgent,M=o.indexOf("Windows")>=0,B=o.indexOf("Macintosh")>=0,i=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,R=o.indexOf("Linux")>=0,E=!0,A=navigator.language,h=A;else if(typeof l=="object"){M=l.platform==="win32",B=l.platform==="darwin",R=l.platform==="linux",b=R&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,A=K,h=K;const g=l.env.VSCODE_NLS_CONFIG;if(g)try{const U=JSON.parse(g),k=U.availableLanguages["*"];A=U.locale,h=k||K,s=U._translationsConfigFile}catch(U){}t=!0}else console.error("Unable to resolve platform.");let a=0;B?a=1:M?a=3:R&&(a=2);const u=M,v=B,T=R,x=t,D=E,w=i,p=o,n=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let k=[];f.addEventListener("message",V=>{if(V.data&&V.data.vscodeSetImmediateId)for(let G=0,L=k.length;G<L;G++){const $=k[G];if($.id===V.data.vscodeSetImmediateId){k.splice(G,1),$.callback();return}}});let I=0;return V=>{const G=++I;k.push({id:G,callback:V}),f.postMessage({vscodeSetImmediateId:G},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const U=Promise.resolve();return k=>U.then(k)}(),d=B||i?2:M?1:3;let m=!0,C=!1;function y(){if(!C){C=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const U=new Uint16Array(g.buffer);m=U[0]===(2<<8)+1}return m}}).call(this,H("IyRk"),H("Q2Ig"))},N0LK:function(Xe,le,H){"use strict";H.d(le,"C",function(){return Z}),H.d(le,"v",function(){return O}),H.d(le,"s",function(){return K}),H.d(le,"t",function(){return M}),H.d(le,"U",function(){return B}),H.d(le,"J",function(){return R}),H.d(le,"O",function(){return b}),H.d(le,"p",function(){return t}),H.d(le,"T",function(){return E}),H.d(le,"q",function(){return i}),H.d(le,"N",function(){return A}),H.d(le,"M",function(){return h}),H.d(le,"Q",function(){return s}),H.d(le,"u",function(){return o}),H.d(le,"x",function(){return f}),H.d(le,"I",function(){return l}),H.d(le,"f",function(){return c}),H.d(le,"h",function(){return a}),H.d(le,"g",function(){return u}),H.d(le,"i",function(){return v}),H.d(le,"G",function(){return T}),H.d(le,"H",function(){return x}),H.d(le,"r",function(){return D}),H.d(le,"R",function(){return w}),H.d(le,"d",function(){return p}),H.d(le,"e",function(){return n}),H.d(le,"E",function(){return d}),H.d(le,"F",function(){return m}),H.d(le,"j",function(){return C}),H.d(le,"z",function(){return y}),H.d(le,"K",function(){return U}),H.d(le,"L",function(){return k}),H.d(le,"m",function(){return V}),H.d(le,"k",function(){return L}),H.d(le,"A",function(){return Y}),H.d(le,"a",function(){return ne}),H.d(le,"n",function(){return se}),H.d(le,"l",function(){return _e}),H.d(le,"D",function(){return ve}),H.d(le,"B",function(){return Ce}),H.d(le,"b",function(){return De}),H.d(le,"S",function(){return Qe}),H.d(le,"o",function(){return Se}),H.d(le,"P",function(){return Ie}),H.d(le,"w",function(){return Je}),H.d(le,"c",function(){return Et}),H.d(le,"y",function(){return st});function Z(ee){return!ee||typeof ee!="string"?!0:ee.trim().length===0}const Q=/{(\d+)}/g;function O(ee,...de){return de.length===0?ee:ee.replace(Q,function(we,Be){const nt=parseInt(Be,10);return isNaN(nt)||nt<0||nt>=de.length?we:de[nt]})}function K(ee){return ee.replace(/[<>&]/g,function(de){switch(de){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return de}})}function M(ee){return ee.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function B(ee,de=" "){const we=R(ee,de);return b(we,de)}function R(ee,de){if(!ee||!de)return ee;const we=de.length;if(we===0||ee.length===0)return ee;let Be=0;for(;ee.indexOf(de,Be)===Be;)Be=Be+we;return ee.substring(Be)}function b(ee,de){if(!ee||!de)return ee;const we=de.length,Be=ee.length;if(we===0||Be===0)return ee;let nt=Be,at=-1;for(;!(at=ee.lastIndexOf(de,nt-1),at===-1||at+we!==nt);){if(at===0)return"";nt=at}return ee.substring(0,nt)}function t(ee){return ee.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function E(ee){return ee.replace(/\*/g,"")}function i(ee,de,we={}){if(!ee)throw new Error("Cannot create regex from empty string");de||(ee=M(ee)),we.wholeWord&&(/\B/.test(ee.charAt(0))||(ee="\\b"+ee),/\B/.test(ee.charAt(ee.length-1))||(ee=ee+"\\b"));let Be="";return we.global&&(Be+="g"),we.matchCase||(Be+="i"),we.multiline&&(Be+="m"),we.unicode&&(Be+="u"),new RegExp(ee,Be)}function A(ee){if(ee.source==="^"||ee.source==="^$"||ee.source==="$"||ee.source==="^\\s*$")return!1;const de=ee.exec("");return!!(de&&ee.lastIndex===0)}function h(ee){return(ee.global?"g":"")+(ee.ignoreCase?"i":"")+(ee.multiline?"m":"")+(ee.unicode?"u":"")}function s(ee){return ee.split(/\r\n|\r|\n/)}function o(ee){for(let de=0,we=ee.length;de<we;de++){const Be=ee.charCodeAt(de);if(Be!==32&&Be!==9)return de}return-1}function f(ee,de=0,we=ee.length){for(let Be=de;Be<we;Be++){const nt=ee.charCodeAt(Be);if(nt!==32&&nt!==9)return ee.substring(de,Be)}return ee.substring(de,we)}function l(ee,de=ee.length-1){for(let we=de;we>=0;we--){const Be=ee.charCodeAt(we);if(Be!==32&&Be!==9)return we}return-1}function c(ee,de){return ee<de?-1:ee>de?1:0}function a(ee,de,we=0,Be=ee.length,nt=0,at=de.length){for(;we<Be&&nt<at;we++,nt++){let xt=ee.charCodeAt(we),It=de.charCodeAt(nt);if(xt<It)return-1;if(xt>It)return 1}const At=Be-we,ft=at-nt;return At<ft?-1:At>ft?1:0}function u(ee,de){return v(ee,de,0,ee.length,0,de.length)}function v(ee,de,we=0,Be=ee.length,nt=0,at=de.length){for(;we<Be&&nt<at;we++,nt++){let xt=ee.charCodeAt(we),It=de.charCodeAt(nt);if(xt===It)continue;if(xt>=128||It>=128)return a(ee.toLowerCase(),de.toLowerCase(),we,Be,nt,at);T(xt)&&(xt-=32),T(It)&&(It-=32);const He=xt-It;if(He===0)continue;return He}const At=Be-we,ft=at-nt;return At<ft?-1:At>ft?1:0}function T(ee){return ee>=97&&ee<=122}function x(ee){return ee>=65&&ee<=90}function D(ee,de){return ee.length===de.length&&v(ee,de)===0}function w(ee,de){const we=de.length;return de.length>ee.length?!1:v(ee,de,0,we)===0}function p(ee,de){let we,Be=Math.min(ee.length,de.length);for(we=0;we<Be;we++)if(ee.charCodeAt(we)!==de.charCodeAt(we))return we;return Be}function n(ee,de){let we,Be=Math.min(ee.length,de.length);const nt=ee.length-1,at=de.length-1;for(we=0;we<Be;we++)if(ee.charCodeAt(nt-we)!==de.charCodeAt(at-we))return we;return Be}function d(ee){return 55296<=ee&&ee<=56319}function m(ee){return 56320<=ee&&ee<=57343}function C(ee,de){return(ee-55296<<10)+(de-56320)+65536}function y(ee,de,we){const Be=ee.charCodeAt(we);if(d(Be)&&we+1<de){const nt=ee.charCodeAt(we+1);if(m(nt))return C(Be,nt)}return Be}function g(ee,de){const we=ee.charCodeAt(de-1);if(m(we)&&de>1){const Be=ee.charCodeAt(de-2);if(d(Be))return C(Be,we)}return we}function U(ee,de){const we=Le.getInstance(),Be=de,nt=ee.length,at=y(ee,nt,de);de+=at>=65536?2:1;let At=we.getGraphemeBreakType(at);for(;de<nt;){const ft=y(ee,nt,de),xt=we.getGraphemeBreakType(ft);if(Et(At,xt))break;de+=ft>=65536?2:1,At=xt}return de-Be}function k(ee,de){const we=Le.getInstance(),Be=de,nt=g(ee,de);de-=nt>=65536?2:1;let at=we.getGraphemeBreakType(nt);for(;de>0;){const At=g(ee,de),ft=we.getGraphemeBreakType(At);if(Et(ft,at))break;de-=At>=65536?2:1,at=ft}return Be-de}const I=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(ee){return I.test(ee)}const G=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(ee){return G.test(ee)}const $=/^[\t\n\r\x20-\x7E]*$/;function Y(ee){return $.test(ee)}const ne=/[\u2028\u2029]/;function se(ee){return ne.test(ee)}function _e(ee){for(let de=0,we=ee.length;de<we;de++)if(ve(ee.charCodeAt(de)))return!0;return!1}function ve(ee){return ee=+ee,ee>=11904&&ee<=55215||ee>=63744&&ee<=64255||ee>=65281&&ee<=65374}function Ce(ee){return ee>=127462&&ee<=127487||ee===8986||ee===8987||ee===9200||ee===9203||ee>=9728&&ee<=10175||ee===11088||ee===11093||ee>=127744&&ee<=128591||ee>=128640&&ee<=128764||ee>=128992&&ee<=129003||ee>=129280&&ee<=129535||ee>=129648&&ee<=129750}const De=String.fromCharCode(65279);function Qe(ee){return!!(ee&&ee.length>0&&ee.charCodeAt(0)===65279)}function Se(ee,de=!1){return ee?(de&&(ee=ee.replace(/\\./g,"")),ee.toLowerCase()!==ee):!1}function Ie(ee){const de=90-65+1;return ee=ee%(2*de),ee<de?String.fromCharCode(97+ee):String.fromCharCode(65+ee-de)}function Je(ee){const de=Le.getInstance();return de.getGraphemeBreakType(ee)}function Et(ee,de){return ee===0?de!==5&&de!==7:ee===2&&de===3?!1:ee===4||ee===2||ee===3||(de===4||de===2||de===3)?!0:ee===8&&(de===8||de===9||de===11||de===12)||((ee===11||ee===9)&&(de===9||de===10)||((ee===12||ee===10)&&de===10||(de===5||de===13||(de===7||(ee===1||ee===13&&de===14)))))?!1:!(ee===6&&de===6)}class Le{constructor(){this._data=je()}static getInstance(){return Le._INSTANCE||(Le._INSTANCE=new Le),Le._INSTANCE}getGraphemeBreakType(ee){if(ee<32)return ee===10?3:ee===13?2:4;if(ee<127)return 0;const de=this._data,we=de.length/3;let Be=1;for(;Be<=we;)if(ee<de[3*Be])Be=2*Be;else if(ee>de[3*Be+1])Be=2*Be+1;else return de[3*Be+2];return 0}}Le._INSTANCE=null;function je(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function st(ee,de){if(ee===0)return 0;const we=he(ee,de);if(we!==void 0)return we;const Be=g(de,ee);return ee-=ie(Be),ee}function he(ee,de){let we=g(de,ee);for(ee-=ie(we);oe(we)||we===65039||we===8419;){if(ee===0)return;we=g(de,ee),ee-=ie(we)}if(!Ce(we))return;if(ee>=0){const Be=g(de,ee);Be===8205&&(ee-=ie(Be))}return ee}function ie(ee){return ee>=65536?2:1}function oe(ee){return 127995<=ee&&ee<=127999}},NC18:function(Xe,le,H){var Z=H("y+Vt"),Q=H("IMiH"),O=H("7oTu"),K=Math.sqrt,M=Math.sin,B=Math.cos,R=Math.PI,b=function(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1])},t=function(a,u){return(a[0]*u[0]+a[1]*u[1])/(b(a)*b(u))},E=function(a,u){return(a[0]*u[1]<a[1]*u[0]?-1:1)*Math.acos(t(a,u))};function i(a,u,v,T,x,D,w,p,n,d,m){var C=n*(R/180),y=B(C)*(a-v)/2+M(C)*(u-T)/2,g=-1*M(C)*(a-v)/2+B(C)*(u-T)/2,U=y*y/(w*w)+g*g/(p*p);U>1&&(w*=K(U),p*=K(U));var k=(x===D?-1:1)*K((w*w*(p*p)-w*w*(g*g)-p*p*(y*y))/(w*w*(g*g)+p*p*(y*y)))||0,I=k*w*g/p,V=k*-p*y/w,G=(a+v)/2+B(C)*I-M(C)*V,L=(u+T)/2+M(C)*I+B(C)*V,$=E([1,0],[(y-I)/w,(g-V)/p]),Y=[(y-I)/w,(g-V)/p],ne=[(-1*y-I)/w,(-1*g-V)/p],se=E(Y,ne);t(Y,ne)<=-1&&(se=R),t(Y,ne)>=1&&(se=0),D===0&&se>0&&(se=se-2*R),D===1&&se<0&&(se=se+2*R),m.addData(d,G,L,w,p,$,se,C,D)}var A=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,h=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function s(a){if(!a)return new Q;for(var u=0,v=0,T=u,x=v,D,w=new Q,p=Q.CMD,n=a.match(A),d=0;d<n.length;d++){for(var m=n[d],C=m.charAt(0),y,g=m.match(h)||[],U=g.length,k=0;k<U;k++)g[k]=parseFloat(g[k]);for(var I=0;I<U;){var V,G,L,$,Y,ne,se,_e=u,ve=v;switch(C){case"l":u+=g[I++],v+=g[I++],y=p.L,w.addData(y,u,v);break;case"L":u=g[I++],v=g[I++],y=p.L,w.addData(y,u,v);break;case"m":u+=g[I++],v+=g[I++],y=p.M,w.addData(y,u,v),T=u,x=v,C="l";break;case"M":u=g[I++],v=g[I++],y=p.M,w.addData(y,u,v),T=u,x=v,C="L";break;case"h":u+=g[I++],y=p.L,w.addData(y,u,v);break;case"H":u=g[I++],y=p.L,w.addData(y,u,v);break;case"v":v+=g[I++],y=p.L,w.addData(y,u,v);break;case"V":v=g[I++],y=p.L,w.addData(y,u,v);break;case"C":y=p.C,w.addData(y,g[I++],g[I++],g[I++],g[I++],g[I++],g[I++]),u=g[I-2],v=g[I-1];break;case"c":y=p.C,w.addData(y,g[I++]+u,g[I++]+v,g[I++]+u,g[I++]+v,g[I++]+u,g[I++]+v),u+=g[I-2],v+=g[I-1];break;case"S":V=u,G=v;var Ce=w.len(),De=w.data;D===p.C&&(V+=u-De[Ce-4],G+=v-De[Ce-3]),y=p.C,_e=g[I++],ve=g[I++],u=g[I++],v=g[I++],w.addData(y,V,G,_e,ve,u,v);break;case"s":V=u,G=v;var Ce=w.len(),De=w.data;D===p.C&&(V+=u-De[Ce-4],G+=v-De[Ce-3]),y=p.C,_e=u+g[I++],ve=v+g[I++],u+=g[I++],v+=g[I++],w.addData(y,V,G,_e,ve,u,v);break;case"Q":_e=g[I++],ve=g[I++],u=g[I++],v=g[I++],y=p.Q,w.addData(y,_e,ve,u,v);break;case"q":_e=g[I++]+u,ve=g[I++]+v,u+=g[I++],v+=g[I++],y=p.Q,w.addData(y,_e,ve,u,v);break;case"T":V=u,G=v;var Ce=w.len(),De=w.data;D===p.Q&&(V+=u-De[Ce-4],G+=v-De[Ce-3]),u=g[I++],v=g[I++],y=p.Q,w.addData(y,V,G,u,v);break;case"t":V=u,G=v;var Ce=w.len(),De=w.data;D===p.Q&&(V+=u-De[Ce-4],G+=v-De[Ce-3]),u+=g[I++],v+=g[I++],y=p.Q,w.addData(y,V,G,u,v);break;case"A":L=g[I++],$=g[I++],Y=g[I++],ne=g[I++],se=g[I++],_e=u,ve=v,u=g[I++],v=g[I++],y=p.A,i(_e,ve,u,v,ne,se,L,$,Y,y,w);break;case"a":L=g[I++],$=g[I++],Y=g[I++],ne=g[I++],se=g[I++],_e=u,ve=v,u+=g[I++],v+=g[I++],y=p.A,i(_e,ve,u,v,ne,se,L,$,Y,y,w);break}}(C==="z"||C==="Z")&&(y=p.Z,w.addData(y),u=T,v=x),D=y}return w.toStatic(),w}function o(a,u){var v=s(a);return u=u||{},u.buildPath=function(T){if(T.setData){T.setData(v.data);var x=T.getContext();x&&T.rebuildPath(x)}else{var x=T;v.rebuildPath(x)}},u.applyTransform=function(T){O(v,T),this.dirty(!0)},u}function f(a,u){return new Z(o(a,u))}function l(a,u){return Z.extend(o(a,u))}function c(a,u){for(var v=[],T=a.length,x=0;x<T;x++){var D=a[x];D.path||D.createPathProxy(),D.__dirtyPath&&D.buildPath(D.path,D.shape,!0),v.push(D.path)}var w=new Z(u);return w.createPathProxy(),w.buildPath=function(p){p.appendPath(v);var n=p.getContext();n&&p.rebuildPath(n)},w}le.createFromString=f,le.extendFromString=l,le.mergePath=c},NohK:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.default=void 0;var Z=function(O){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,M=null;return function(){for(var B=this,R=arguments.length,b=new Array(R),t=0;t<R;t++)b[t]=arguments[t];clearTimeout(M),M=setTimeout(function(){O.apply(B,b)},K)}};le.default=Z},NvD2:function(Xe,le,H){"use strict";H.d(le,"a",function(){return B});var Z=H("Kwbf");function Q(R,b){var t=new Set;return R.forEach(function(E){b.has(E)||t.add(E)}),t}function O(R){var b=R||{},t=b.disabled,E=b.disableCheckbox,i=b.checkable;return!!(t||E)||i===!1}function K(R,b,t,E){for(var i=new Set(R),A=new Set,h=0;h<=t;h+=1){var s=b.get(h)||new Set;s.forEach(function(c){var a=c.key,u=c.node,v=c.children,T=v===void 0?[]:v;i.has(a)&&!E(u)&&T.filter(function(x){return!E(x.node)}).forEach(function(x){i.add(x.key)})})}for(var o=new Set,f=t;f>=0;f-=1){var l=b.get(f)||new Set;l.forEach(function(c){var a=c.parent,u=c.node;if(E(u)||!c.parent||o.has(c.parent.key))return;if(E(c.parent.node)){o.add(a.key);return}var v=!0,T=!1;(a.children||[]).filter(function(x){return!E(x.node)}).forEach(function(x){var D=x.key,w=i.has(D);v&&!w&&(v=!1),!T&&(w||A.has(D))&&(T=!0)}),v&&i.add(a.key),T&&A.add(a.key),o.add(a.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(Q(A,i))}}function M(R,b,t,E,i){for(var A=new Set(R),h=new Set(b),s=0;s<=E;s+=1){var o=t.get(s)||new Set;o.forEach(function(a){var u=a.key,v=a.node,T=a.children,x=T===void 0?[]:T;!A.has(u)&&!h.has(u)&&!i(v)&&x.filter(function(D){return!i(D.node)}).forEach(function(D){A.delete(D.key)})})}h=new Set;for(var f=new Set,l=E;l>=0;l-=1){var c=t.get(l)||new Set;c.forEach(function(a){var u=a.parent,v=a.node;if(i(v)||!a.parent||f.has(a.parent.key))return;if(i(a.parent.node)){f.add(u.key);return}var T=!0,x=!1;(u.children||[]).filter(function(D){return!i(D.node)}).forEach(function(D){var w=D.key,p=A.has(w);T&&!p&&(T=!1),!x&&(p||h.has(w))&&(x=!0)}),T||A.delete(u.key),x&&h.add(u.key),f.add(u.key)})}return{checkedKeys:Array.from(A),halfCheckedKeys:Array.from(Q(h,A))}}function B(R,b,t,E){var i=[],A;E?A=E:A=O;var h=new Set(R.filter(function(l){var c=!!t[l];return c||i.push(l),c})),s=new Map,o=0;Object.keys(t).forEach(function(l){var c=t[l],a=c.level,u=s.get(a);u||(u=new Set,s.set(a,u)),u.add(c),o=Math.max(o,a)}),Object(Z.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var f;return b===!0?f=K(h,s,o,A):f=M(h,b.halfCheckedKeys,s,o,A),f}},OLES:function(Xe,le,H){"use strict";var Z=H("U8pU"),Q=H("VTBJ"),O=H("Ff2n"),K=H("q1tI"),M=H("uciX"),B=H("7ixt"),R=function(h){var s=h.overlay,o=h.prefixCls,f=h.id,l=h.overlayInnerStyle;return K.createElement("div",{className:"".concat(o,"-inner"),id:f,role:"tooltip",style:l},typeof s=="function"?s():s)},b=R,t=function(h,s){var o=h.overlayClassName,f=h.trigger,l=f===void 0?["hover"]:f,c=h.mouseEnterDelay,a=c===void 0?0:c,u=h.mouseLeaveDelay,v=u===void 0?.1:u,T=h.overlayStyle,x=h.prefixCls,D=x===void 0?"rc-tooltip":x,w=h.children,p=h.onVisibleChange,n=h.afterVisibleChange,d=h.transitionName,m=h.animation,C=h.placement,y=C===void 0?"right":C,g=h.align,U=g===void 0?{}:g,k=h.destroyTooltipOnHide,I=k===void 0?!1:k,V=h.defaultVisible,G=h.getTooltipContainer,L=h.overlayInnerStyle,$=Object(O.a)(h,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Y=Object(K.useRef)(null);Object(K.useImperativeHandle)(s,function(){return Y.current});var ne=Object(Q.a)({},$);"visible"in h&&(ne.popupVisible=h.visible);var se=function(){var Qe=h.arrowContent,Se=Qe===void 0?null:Qe,Ie=h.overlay,Je=h.id;return[K.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},Se),K.createElement(b,{key:"content",prefixCls:D,id:Je,overlay:Ie,overlayInnerStyle:L})]},_e=!1,ve=!1;if(typeof I=="boolean")_e=I;else if(I&&Object(Z.a)(I)==="object"){var Ce=I.keepParent;_e=Ce===!0,ve=Ce===!1}return K.createElement(M.a,Object.assign({popupClassName:o,prefixCls:D,popup:se,action:l,builtinPlacements:B.a,popupPlacement:y,ref:Y,popupAlign:U,getPopupContainer:G,onPopupVisibleChange:p,afterPopupVisibleChange:n,popupTransitionName:d,popupAnimation:m,defaultPopupVisible:V,destroyPopupOnHide:_e,autoDestroy:ve,mouseLeaveDelay:v,popupStyle:T,mouseEnterDelay:a},ne),w)},E=Object(K.forwardRef)(t),i=le.a=E},OS9S:function(Xe,le,H){var Z=H("bYtY"),Q=Z.inherits,O=H("Gev7"),K=H("mFDi");function M(b){O.call(this,b),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}M.prototype.incremental=!0,M.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},M.prototype.addDisplayable=function(b,t){t?this._temporaryDisplayables.push(b):this._displayables.push(b),this.dirty()},M.prototype.addDisplayables=function(b,t){t=t||!1;for(var E=0;E<b.length;E++)this.addDisplayable(b[E],t)},M.prototype.eachPendingDisplayable=function(b){for(var t=this._cursor;t<this._displayables.length;t++)b&&b(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)b&&b(this._temporaryDisplayables[t])},M.prototype.update=function(){this.updateTransform();for(var b=this._cursor;b<this._displayables.length;b++){var t=this._displayables[b];t.parent=this,t.update(),t.parent=null}for(var b=0;b<this._temporaryDisplayables.length;b++){var t=this._temporaryDisplayables[b];t.parent=this,t.update(),t.parent=null}},M.prototype.brush=function(b,t){for(var E=this._cursor;E<this._displayables.length;E++){var i=this._displayables[E];i.beforeBrush&&i.beforeBrush(b),i.brush(b,E===this._cursor?null:this._displayables[E-1]),i.afterBrush&&i.afterBrush(b)}this._cursor=E;for(var E=0;E<this._temporaryDisplayables.length;E++){var i=this._temporaryDisplayables[E];i.beforeBrush&&i.beforeBrush(b),i.brush(b,E===0?null:this._temporaryDisplayables[E-1]),i.afterBrush&&i.afterBrush(b)}this._temporaryDisplayables=[],this.notClear=!0};var B=[];M.prototype.getBoundingRect=function(){if(!this._rect){for(var b=new K(Infinity,Infinity,-Infinity,-Infinity),t=0;t<this._displayables.length;t++){var E=this._displayables[t],i=E.getBoundingRect().clone();E.needLocalTransform()&&i.applyTransform(E.getLocalTransform(B)),b.union(i)}this._rect=b}return this._rect},M.prototype.contain=function(b,t){var E=this.transformCoordToLocal(b,t),i=this.getBoundingRect();if(i.contain(E[0],E[1]))for(var A=0;A<this._displayables.length;A++){var h=this._displayables[A];if(h.contain(b,t))return!0}return!1},Q(M,O);var R=M;Xe.exports=R},OZM5:function(Xe,le,H){"use strict";H.d(le,"b",function(){return E}),H.d(le,"a",function(){return i}),H.d(le,"k",function(){return A}),H.d(le,"h",function(){return h}),H.d(le,"i",function(){return s}),H.d(le,"g",function(){return o}),H.d(le,"c",function(){return f}),H.d(le,"d",function(){return l}),H.d(le,"j",function(){return u}),H.d(le,"e",function(){return v}),H.d(le,"f",function(){return T});var Z=H("KQm4"),Q=H("U8pU"),O=H("Ff2n"),K=H("q1tI"),M=H.n(K),B=H("Kwbf"),R=H("WaYH"),b=.25,t=2;function E(x,D){var w=x.slice(),p=w.indexOf(D);return p>=0&&w.splice(p,1),w}function i(x,D){var w=x.slice();return w.indexOf(D)===-1&&w.push(D),w}function A(x){return x.split("-")}function h(x,D){return"".concat(x,"-").concat(D)}function s(x){return x&&x.type&&x.type.isTreeNode}function o(x,D){var w=[x],p=D[x];function n(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];d.forEach(function(m){var C=m.key,y=m.children;w.push(C),n(y)})}return n(p.children),w}function f(x,D){var w=x.clientY,p=D.selectHandle.getBoundingClientRect(),n=p.top,d=p.bottom,m=p.height,C=Math.max(m*b,t);return w<=n+C?-1:w>=d-C?1:0}function l(x,D){if(!x)return;var w=D.multiple;return w?x.slice():x.length?[x[0]]:x}var c=function(D){return D};function a(x,D){if(!x)return[];var w=D||{},p=w.processProps,n=p===void 0?c:p,d=Array.isArray(x)?x:[x];return d.map(function(m){var C=m.children,y=Object(O.a)(m,["children"]),g=a(C,D);return M.a.createElement(R.a,Object.assign({},n(y)),g)})}function u(x){if(!x)return null;var D;if(Array.isArray(x))D={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(Q.a)(x)==="object")D={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 D}function v(x,D){var w=new Set;function p(n){if(w.has(n))return;var d=D[n];if(!d)return;w.add(n);var m=d.parent,C=d.node;if(C.disabled)return;m&&p(m.key)}return(x||[]).forEach(function(n){p(n)}),Object(Z.a)(w)}function T(x){var D={};return Object.keys(x).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(D[w]=x[w])}),D}},Ot1p:function(Xe,le,H){"use strict";var Z=H("2qtc"),Q=H("kLXV"),O=H("rAM+"),K=H("miYZ"),M=H("tsqr"),B=H("9og8"),R=H("tJVT"),b=H("jrin"),t=H("WmNS"),E=H.n(t),i=H("q1tI"),A=H.n(i),h=H("VrN/"),s=H.n(h),o=H("bdgK"),f=H("p77/"),l=H("Bd2K"),c=H("ELLl"),a=H("19Vz"),u=H("lZu9"),v=H("+NIl"),T=H("kSUc"),x=H("9Bee"),D=function(Fe){var $e=Fe.value,pt=$e===void 0?"":$e,Ot=Fe.className,kt=Fe.showTextOnly,Dt=Fe.showLines,Bt=Fe.style,ht=Bt===void 0?{}:Bt,it=Object(i.useMemo)(function(){return""},[pt]);return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{dangerouslySetInnerHTML:{__html:it}}))},w=H("0Owb"),p=H("dejd"),n=H("C+DQ"),d=H("1vsH"),m=H("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 y(Fe){var $e=Fe.onActionCallback,pt=Fe.title,Ot=Fe.icon,kt=Fe.actionName,Dt=Fe.className,Bt=Dt===void 0?"":Dt,ht=Fe.children;function it(){$e(kt)}return A.a.createElement("a",{title:pt,className:Bt,onClick:it},A.a.createElement("i",{className:"md-iconfont ".concat(Ot)}),ht)}var g=function(Fe){var $e=Fe.watch,pt=Fe.showNullButton,Ot=Fe.onActionCallback,kt=Fe.fullScreen,Dt=Fe.insertTemp,Bt=Fe.hidetoolBar,ht=Fe.uuid,it=Fe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(d.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(d.F)("_educoder_session"),"&key=").concat(ht,"&api=").concat(encodeURIComponent(m.a.PROXY_SERVER)));var et=[].concat(C,[{title:"".concat($e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat($e?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return A.a.createElement("ul",{className:"markdown-toolbar-container"},!Bt&&et.map(function(Te,Ne){return A.a.createElement("li",{key:Ne},Te.actionName?A.a.createElement(y,Object(w.a)({},Te,{onActionCallback:Ot})):A.a.createElement("span",{className:"v-line"}))}),pt?A.a.createElement("li",null,A.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ot},A.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Dt&&A.a.createElement("li",null,A.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Dt),onActionCallback:Ot},A.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),A.a.createElement("li",{className:"btn-full-screen"},A.a.createElement(y,{icon:"".concat(kt?"icon-shrink":"icon-enlarge"),title:kt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ot})))},U=H("M8RZ"),k=H("+L6B"),I=H("2/Rp"),V=H("y8nQ"),G=H("Vl3Y"),L=H("5NDa"),$=H("5rEg"),Y={labelCol:{span:4},wrapperCol:{span:20}},ne=function(Fe){var $e=Fe.callback,pt=Fe.onCancel;function Ot(kt){$e(kt)}return A.a.createElement(G.a,Object(w.a)({},Y,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ot}),A.a.createElement(G.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},A.a.createElement($.a,null)),A.a.createElement(G.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},A.a.createElement($.a,null)),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))},se=H("7ahc"),_e=H("HmJG"),ve=H("BjJ7"),Ce=G.a.useForm,De={width:280,marginRight:10},Qe={labelCol:{span:5},wrapperCol:{span:19}},Se=function(Fe){var $e=Fe.callback,pt=Fe.onCancel,Ot=Ce(),kt=Object(R.a)(Ot,1),Dt=kt[0];function Bt(et){$e(et)}function ht(et,Te){if(et.status===-1){M.b.error(et.message);return}Dt.setFieldsValue({src:"/api/attachments/".concat(et.id),type:Te.type})}function it(et){var Te=et.target.files[0];Je(Te,ht)}return A.a.createElement(G.a,Object(w.a)({form:Dt},Qe,{className:"upload-image-panel",onFinish:Bt}),A.a.createElement(G.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},A.a.createElement("div",{className:"flex-container"},A.a.createElement(G.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},A.a.createElement($.a,{style:De})),A.a.createElement(Ie,{onFileChange:it}))),A.a.createElement(G.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},A.a.createElement($.a,{style:{width:264}})),A.a.createElement(G.a.Item,{style:{textAlign:"right"}},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))};function Ie(Fe){var $e=Fe.onFileChange;return A.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",A.a.createElement("input",{type:"file",onChange:$e}))}function Je(Fe,$e){if(!Fe)throw new String("\u6CA1\u6709\u6587\u4EF6");var pt=new FormData;pt.append("editormd-image-file",Fe),pt.append("file_param_name","editormd-image-file"),pt.append("byxhr","true");var Ot=new window.XMLHttpRequest;Ot.withCredentials=!0,Ot.addEventListener("load",function(kt){$e(JSON.parse(kt.target.responseText),Fe)},!1),Ot.addEventListener("error",function(kt){console.error(kt)},!1),Ot.open("POST","".concat(ve.a,"/api/attachments.json")),Ot.send(pt)}var Et=H("giR+"),Le=H("fyUT"),je=H("7Kak"),st=H("9yH6"),he=st.a.Group,ie={margin:"0 8px"},oe=function(Fe){var $e=Fe.callback,pt=Fe.onCancel;function Ot(kt){$e(kt)}return A.a.createElement(G.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ot},A.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},A.a.createElement("span",{style:ie},"\u5355\u5143\u683C\u6570\uFF1A"),A.a.createElement("span",{style:ie},"\u884C\u6570"),A.a.createElement(G.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},A.a.createElement(Le.a,null)),A.a.createElement("span",{style:ie},"\u5217\u6570"),A.a.createElement(G.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},A.a.createElement(Le.a,null))),A.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},A.a.createElement("span",{style:ie},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),A.a.createElement(G.a.Item,{name:"align"},A.a.createElement(he,null,A.a.createElement(st.a,{value:"default"},A.a.createElement("i",{className:"fa fa-align-justify"})),A.a.createElement(st.a,{value:"left"},A.a.createElement("i",{className:"fa fa-align-left"})),A.a.createElement(st.a,{value:"center"},A.a.createElement("i",{className:"fa fa-align-center"})),A.a.createElement(st.a,{value:"right"},A.a.createElement("i",{className:"fa fa-align-right"}))))),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:pt},"\u53D6\u6D88")))},ee=H("ErOA"),de=H("7Cbv"),we="link",Be="upload-image",nt="code-block",at="add-table",At="------------",ft={default:At,left:":".concat(At),center:":".concat(At,":"),right:"".concat(At,":")},xt=H("9VGf"),It,He;function ke(){}var ct=0,gt=1e4,Ze="\u2581",ot=`
**\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 Ke(Fe){return/^\d+$/.test(Fe)?"".concat(Fe,"px"):Fe}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ue=Me?"Cmd":"Ctrl",ge=["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"],xe=(It={},Object(b.a)(It,Ue+"-B","bold"),Object(b.a)(It,Ue+"-I","italic"),It),Ee=(He={},Object(b.a)(He,we,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(He,nt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(He,Be,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(He,at,"\u6DFB\u52A0\u8868\u683C"),He),Oe=le.a=function(Fe){var $e=Fe.defaultValue,pt=$e===void 0?"":$e,Ot=Fe.onChange,kt=Fe.width,Dt=kt===void 0?"100%":kt,Bt=Fe.height,ht=Bt===void 0?400:Bt,it=Fe.miniToolbar,et=it===void 0?!1:it,Te=Fe.isFocus,Ne=Te===void 0?!1:Te,mt=Fe.watch,lt=Fe.insertTemp,Ct=Fe.mode,bt=Ct===void 0?"markdown":Ct,tt=Fe.id,St=tt===void 0?"markdown-editor-id":tt,Lt=Fe.showResizeBar,Tt=Lt===void 0?!1:Lt,Ht=Fe.noStorage,gr=Ht===void 0?!1:Ht,Or=Fe.showNullButton,vr=Or===void 0?!1:Or,jt=Fe.hidetoolBar,Mr=jt===void 0?!1:jt,br=Fe.fullScreen,Tr=br===void 0?!1:br,Ar=Fe.onBlur,Sr=Fe.onCMBeforeChange,tn=Fe.onFullScreen,Zr=Fe.className,me=Zr===void 0?"":Zr,be=Fe.disablePaste,Pe=be===void 0?!1:be,rt=Fe.placeholder,qe=rt===void 0?"":rt,Ft=Fe.values,te=Ft===void 0?"":Ft,P=Object(i.useState)(null),j=Object(R.a)(P,2),q=j[0],Ae=j[1],re=Object(i.useState)(pt),We=Object(R.a)(re,2),_t=We[0],Pt=We[1],Qt=Object(i.useState)(mt),wt=Object(R.a)(Qt,2),Yt=wt[0],Xt=wt[1],qt=Object(i.useState)(Tr),cr=Object(R.a)(qt,2),Dr=cr[0],wr=cr[1],Fr=Object(i.useState)(""),hr=Object(R.a)(Fr,2),Ur=hr[0],Nr=hr[1],cn=Object(i.useState)(0),Gr=Object(R.a)(cn,2),Jr=Gr[0],bn=Gr[1],qr=Object(i.useState)(ht),rn=Object(R.a)(qr,2),sn=rn[0],hn=rn[1],mn=Object(i.useState)(!1),_r=Object(R.a)(mn,2),dr=_r[0],tr=_r[1],nr=Object(i.useRef)(Object(de.a)()),Zt=Object(i.useRef)(!1),Er=Object(i.useRef)(),mr=Object(i.useRef)(),Ir=Object(i.useRef)(),xr=Object(i.useRef)(),On=Object(i.useRef)(),zr=function(){var er=Object(B.a)(E.a.mark(function fr(){var Jt,yr;return E.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:return Xr.next=2,Object(ee.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:nr.current}});case 2:yr=Xr.sent,yr!=null&&(Jt=yr.attachments)!==null&&Jt!==void 0&&Jt.length&&(console.log("cm:",q,mr),yr.attachments.map(function(Br){Br.content_type.indexOf("image")>-1?q.replaceSelection("![,](/api/attachments/".concat(Br.id,"?type=").concat(Br.content_type,")")):Br.content_type.indexOf("video")>-1?q.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Br.content_type.indexOf("pdf")>-1?q.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Br.id,"?type=").concat(Br.content_type,'&disposition=inline" target="_blank">').concat(Br.name,"</a>")):q.replaceSelection("[".concat(Br.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Br.id,"?type=").concat(Br.content_type,")"))}));case 4:case"end":return Xr.stop()}},fr)}));return function(){return er.apply(this,arguments)}}();Object(i.useEffect)(function(){Pt(te),q==null||q.setValue(te)},[te]),Object(i.useEffect)(function(){tn==null||tn(Dr)},[Dr]),Object(i.useEffect)(function(){if(mr.current){var er=s.a.fromTextArea(mr.current,{mode:bt,lineNumbers:!et,lineWrapping:!0,value:pt,autoCloseTags:!0,autoCloseBrackets:!0});Ne&&er.focus();function fr(Jt,yr){if(Pe){yr.preventDefault();return}var Rr=yr.clipboardData;if(Rr){var Xr=Rr.types.toString(),Br=Rr.items;if(Xr==="Files"||Rr.types.indexOf("Files")>-1){if(yr.preventDefault(),bt=="stex")return;try{var ln,Dn=Br[1];((ln=Br[0])===null||ln===void 0?void 0:ln.kind)==="file"&&(Dn=Br[0]);var Pr=Dn.getAsFile(),li=Pr.name.split(".").pop();Je(Pr,function(Hr){if(Hr.id){var jn,Kn,ui;(Pr==null||((jn=Pr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection("![,](/api/attachments/".concat(Hr.id,"?type=").concat(Hr.content_type,")")):(Pr==null||((Kn=Pr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,'"></video>')):(Pr==null||((ui=Pr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,"?type=").concat(Pr.type,'&disposition=inline" target="_blank">').concat(Pr.name,"</a>")):ge.includes(li)?er.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,'?type=office&disposition=inline" target="_blank">').concat(Pr.name,"</a>")):er.replaceSelection("[".concat(Pr.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,"?type=").concat(Hr.content_type,")"))}else(Hr==null?void 0:Hr.status)===401&&(document.location.href="/user/login")})}catch(Hr){M.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return er.on("paste",fr),er.on("dragleave",function(Jt,yr){Ir.current.classList.remove("mouse-hover-md")}),er.on("dragover",function(Jt,yr){Ir.current.classList.add("mouse-hover-md")}),er.on("drop",function(Jt,yr){Ir.current.classList.add("mouse-hover-md");var Rr;if(Rr=yr.dataTransfer.files,Rr.length>0){yr.preventDefault(),yr.stopPropagation();for(var Xr=function(Dn){var Pr=Rr[Dn],li=Pr.name.split(".").pop();Je(Pr,function(Hr){if(Hr.id){var jn,Kn,ui;(Pr==null||((jn=Pr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?er.replaceSelection("![,](/api/attachments/".concat(Hr.id,"?type=").concat(Hr.content_type,")")):(Pr==null||((Kn=Pr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?er.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,'"></video>')):(Pr==null||((ui=Pr.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?er.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,"?type=").concat(Pr.type,'&disposition=inline" target="_blank">').concat(Pr.name,"</a>")):ge.includes(li)?er.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,'?type=office&disposition=inline" target="_blank">').concat(Pr.name,"</a>")):er.replaceSelection("[".concat(Pr.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Hr.id,"?type=").concat(Hr.content_type,")"))}else(Hr==null?void 0:Hr.status)===401&&(document.location.href="/user/login")})},Br=0;Br<Rr.length;Br++)Xr(Br)}}),Ae(er),function(){er.off("paste",fr)}}},[]);var En=Object(i.useCallback)(function(){if(Ir.current)try{}catch(er){console.log(er,"---- to set md editor body height")}},[sn,Ir,Dr]);Object(i.useEffect)(function(){function er(){var Jt=new o.default(function(yr){var Rr=Object(O.a)(yr),Xr;try{for(Rr.s();!(Xr=Rr.n()).done;){var Br=Xr.value;(Br.target.offsetHeight>0||Br.target.offsetWidth>0)&&(En(),q.setSize("100%","100%"),q.refresh())}}catch(ln){Rr.e(ln)}finally{Rr.f()}});return Jt.observe(mr.current.parentElement),Jt}if(q){var fr=er();return function(){fr.unobserve(mr.current.parentElement)}}},[q,En]),Object(i.useEffect)(function(){if(q){for(var er=[],fr=function(){var Br=yr[Jt];Rr=Object(R.a)(Br,2);var ln=Rr[0],Dn=Rr[1],Pr=Object(b.a)({},ln,function(){Qn(Dn)});er.push(Pr),q.addKeyMap(Pr)},Jt=0,yr=Object.entries(xe);Jt<yr.length;Jt++){var Rr;fr()}return Er.current=setInterval(function(){Zt.current&&zr()},4e3),function(){clearInterval(Er.current);var Xr=Object(O.a)(er),Br;try{for(Xr.s();!(Br=Xr.n()).done;){var ln=Br.value;q.removeKeyMap(ln)}}catch(Dn){Xr.e(Dn)}finally{Xr.f()}}}},[q]),Object(i.useEffect)(function(){Tr!==Dr&&wr(Tr)},[Tr]),Object(xt.a)(function(){if(!gr&&Jr>0){var er=new Date().getTime(),fr=window.sessionStorage.getItem(St);er>=Jr+gt&&(!fr||fr!==_t)&&(window.sessionStorage.setItem(St,_t),tr(!0))}},gt),Object(i.useEffect)(function(){Xt(mt)},[q,mt]),Object(i.useEffect)(function(){q&&(Ne&&q.focus())},[q,Ne]),Object(i.useEffect)(function(){if(Yt&&q){var er=q.getScrollerElement();function fr(Jt){var yr=Jt.target;if(On.current){var Rr=yr.scrollTop/yr.scrollHeight;On.current.scrollTop=On.current.scrollHeight*Rr}}return er.addEventListener("scroll",fr),function(){er.removeEventListener("scroll",fr)}}},[q,Yt]),Object(i.useEffect)(function(){if(q&&Sr){function er(fr,Jt){Sr(fr,Jt)}return q.on("beforeChange",er),function(){q.off("beforeChange",er)}}},[q,Sr]),Object(i.useEffect)(function(){if(q&&Ar){function er(){Ar(q.getValue())}return q.on("blur",er),function(){q.off("blur",er)}}},[q,Ar]),Object(i.useEffect)(function(){if(q){function er(fr){var Jt=fr.getValue();Pt(Jt),bn(new Date().getTime()),fr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ot&&Ot(Jt)}return q.on("change",er),function(){q.off("change",er)}}},[q,Ot]),Object(i.useEffect)(function(){q&&(pt==null?(q.setValue(""),Pt("")):pt!==q.getValue()&&(q.setValue(pt),Pt(pt),q.setCursor(q.lineCount(),0)))},[q,pt]);var Qn=Object(i.useCallback)(function(er){var fr=q.getCursor(),Jt=q.getSelection(),yr=Jt.split(`
`);switch(er){case"bold":return q.replaceSelection("**"+Jt+"**"),Jt===""&&q.setCursor(fr.line,fr.ch+2),q.focus();case"italic":return q.replaceSelection("*"+Jt+"*"),Jt===""&&q.setCursor(fr.line,fr.ch+1),q.focus();case"code":return q.replaceSelection("`"+Jt+"`"),Jt===""&&q.setCursor(fr.line,fr.ch+1),q.focus();case"inline-latex":return q.replaceSelection("`$$"+Jt+"$$`"),Jt===""&&q.setCursor(fr.line,fr.ch+3),q.focus();case"latex":return q.replaceSelection("```latex\n"+Jt+"\n```"),q.setCursor(fr.line+1,Jt.length+1),q.focus();case"line-break":return q.replaceSelection(`<br/>
`),q.focus();case"list-ul":return Jt===""?q.replaceSelection("- "+Jt):q.replaceSelection(yr.map(function(Rr){return Rr===""?"":"- ".concat(Rr)}).join(`
`)),q.focus();case"list-ol":return Jt===""?q.replaceSelection("1. "+Jt):q.replaceSelection(yr.map(function(Rr,Xr){return Rr===""?"":"".concat(Xr+1,". ").concat(Rr)}).join(`
`)),q.focus();case"add-null-ch":return Jt===""&&q.setCursor(fr.line,fr.ch+1),q.replaceSelection(Ze),q.focus();case"inster-template-1":return Jt===""&&q.setCursor(fr.line,fr.ch),q.replaceSelection(ot),q.focus();case"eraser":return q.setValue(""),q.focus();case"trigger-watch":return Xt(!Yt),q.focus();case"trigger-full-screen":return wr(!Dr),q.focus();case we:Nr(we);return;case nt:Nr(nt);return;case Be:Nr(Be);return;case at:Nr(at);return;default:throw new Error}},[q,Yt,Dr]),_n=Object(i.useCallback)(function(er){Nr("");switch(Ur){case we:var fr=er.title,Jt=er.link;return q.replaceSelection("[".concat(fr,"](").concat(Jt,")")),q.focus();case nt:var yr=er.language,Rr=er.content;return q.replaceSelection(["```"+yr,Rr,"```"].join(`
`)),q.focus();case Be:var Xr=er.src,Br=er.alt;return Br?q.replaceSelection("![ ".concat(Br," ]( ").concat(Xr,' "').concat(Br,'" )')):q.replaceSelection("![,](".concat(Xr,")")),q.focus();case at:for(var ln=er.row,Dn=er.col,Pr=er.align,li=`
`,Hr=0;Hr<ln;Hr++){for(var jn=[],Kn=[],ui=0;ui<Dn;ui++)Hr===1&&Kn.push(ft[Pr]),jn.push(" ");Hr===1&&(li+="| ".concat(Kn.join(" | "),` |
`)),li+="| ".concat(jn.join(Dn===1?"":" | "),` |
`)}return q.replaceSelection(li+`
`),q.focus();default:throw new Error}},[q,Ur]),en=Object(i.useMemo)(function(){switch(Ur){case we:return A.a.createElement(ne,{callback:_n,onCancel:Ln});case nt:return A.a.createElement(se.b,{callback:_n,onCancel:Ln});case Be:return A.a.createElement(Se,{callback:_n,onCancel:Ln});case at:return A.a.createElement(oe,{callback:_n,onCancel:Ln});default:return null}},[Ur]);function Ln(){Nr("")}Object(i.useEffect)(function(){if(xr.current){var er=xr.current,fr=!1,Jt=0;function yr(Br){fr=!0,Jt=Br.pageY}function Rr(){fr=!1}function Xr(Br){if(fr){var ln=Br.pageY-Jt;ln<0&&(ln=0),ln>300&&(ln=300);var Dn=ht+ln+"px";hn(Dn)}}return er.addEventListener("mousedown",yr),document.addEventListener("mousemove",Xr),document.addEventListener("mouseup",Rr),function(){er.removeEventListener("mousedown",yr),document.removeEventListener("mousemove",Xr),document.removeEventListener("mouseup",Rr)}}},[q,xr]),Object(i.useEffect)(function(){hn(ht)},[ht]);var In=Ke(Dt),Jn=Ke(sn),Fn={width:In,height:Jn},si=Object(i.useMemo)(function(){if(Jr){var er=new Date(Jr),fr=er.getHours(),Jt=er.getMinutes(),yr=er.getSeconds();return fr=fr<10?"0"+fr:fr,Jt=Jt<10?"0"+Jt:Jt,yr=yr<10?"0"+yr:yr,"".concat(fr,":").concat(Jt,":").concat(yr)}return 0},[Jr]);function Un(){window.sessionStorage.removeItem(St),tr(!1),bn(0)}function gn(){tr(!1),bn(0),q.setValue(window.sessionStorage.getItem(St))}function Pn(er,fr){var Jt=q.getValue();Jt=Jt.replace(er,fr),Pt(Jt),q==null||q.setValue(Jt)}return A.a.createElement(i.Fragment,null,A.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ir},A.a.createElement("div",{className:"markdown-editor-container ".concat(me," ").concat(Yt?"on-preview":""," ").concat(et?"mini":""," ").concat(Dr?"full-screen":""),style:Fn},A.a.createElement(g,{insertTemp:lt,watch:Yt,fullScreen:Dr,showNullButton:vr,onActionCallback:Qn,hidetoolBar:Mr,uuid:nr.current,setOpenPhones:function(){Zt.current=!0}}),A.a.createElement("div",{className:"markdown-editor-body"},A.a.createElement("div",{className:"codemirror-container"},A.a.createElement("textarea",{ref:mr,placeholder:qe})),Yt?A.a.createElement("div",{ref:On,className:"preview-container"},bt==="stex"&&A.a.createElement(D,{value:_t}),bt!=="stex"&&A.a.createElement(x.a,{edit:!0,value:_t,replaces:Pn})):null))),Tt?A.a.createElement("a",{ref:xr,className:"editor-resize"}):null,A.a.createElement(U.a,null,Ee[Ur]?A.a.createElement(Q.a,{centered:!0,title:Ee[Ur],visible:!0,onCancel:Ln,footer:null,className:"markdown-popup-form"},en):null))}},P47w:function(Xe,le,H){var Z=H("hydK"),Q=Z.createElement,O=H("IMiH"),K=H("mFDi"),M=H("Fofx"),B=H("6GrX"),R=H("pzxd"),b=H("dqUG"),t=O.CMD,E=Array.prototype.join,i="none",A=Math.round,h=Math.sin,s=Math.cos,o=Math.PI,f=Math.PI*2,l=180/o,c=1e-4;function a(Y){return A(Y*1e4)/1e4}function u(Y){return Y<c&&Y>-c}function v(Y,ne){var se=ne?Y.textFill:Y.fill;return se!=null&&se!==i}function T(Y,ne){var se=ne?Y.textStroke:Y.stroke;return se!=null&&se!==i}function x(Y,ne){ne&&D(Y,"transform","matrix("+E.call(ne,",")+")")}function D(Y,ne,se){(!se||se.type!=="linear"&&se.type!=="radial")&&Y.setAttribute(ne,se)}function w(Y,ne,se){Y.setAttributeNS("http://www.w3.org/1999/xlink",ne,se)}function p(Y,ne,se,_e){if(v(ne,se)){var ve=se?ne.textFill:ne.fill;ve=ve==="transparent"?i:ve,D(Y,"fill",ve),D(Y,"fill-opacity",ne.fillOpacity!=null?ne.fillOpacity*ne.opacity:ne.opacity)}else D(Y,"fill",i);if(T(ne,se)){var Ce=se?ne.textStroke:ne.stroke;Ce=Ce==="transparent"?i:Ce,D(Y,"stroke",Ce);var De=se?ne.textStrokeWidth:ne.lineWidth,Qe=!se&&ne.strokeNoScale?_e.getLineScale():1;D(Y,"stroke-width",De/Qe),D(Y,"paint-order",se?"stroke":"fill"),D(Y,"stroke-opacity",ne.strokeOpacity!=null?ne.strokeOpacity:ne.opacity);var Se=ne.lineDash;Se?(D(Y,"stroke-dasharray",ne.lineDash.join(",")),D(Y,"stroke-dashoffset",A(ne.lineDashOffset||0))):D(Y,"stroke-dasharray",""),ne.lineCap&&D(Y,"stroke-linecap",ne.lineCap),ne.lineJoin&&D(Y,"stroke-linejoin",ne.lineJoin),ne.miterLimit&&D(Y,"stroke-miterlimit",ne.miterLimit)}else D(Y,"stroke",i)}function n(Y){for(var ne=[],se=Y.data,_e=Y.len(),ve=0;ve<_e;){var Ce=se[ve++],De="",Qe=0;switch(Ce){case t.M:De="M",Qe=2;break;case t.L:De="L",Qe=2;break;case t.Q:De="Q",Qe=4;break;case t.C:De="C",Qe=6;break;case t.A:var Se=se[ve++],Ie=se[ve++],Je=se[ve++],Et=se[ve++],Le=se[ve++],je=se[ve++],st=se[ve++],he=se[ve++],ie=Math.abs(je),oe=u(ie-f)||(he?je>=f:-je>=f),ee=je>0?je%f:je%f+f,de=!1;oe?de=!0:u(ie)?de=!1:de=ee>=o===!!he;var we=a(Se+Je*s(Le)),Be=a(Ie+Et*h(Le));oe&&(he?je=f-1e-4:je=-f+1e-4,de=!0,ve===9&&ne.push("M",we,Be));var nt=a(Se+Je*s(Le+je)),at=a(Ie+Et*h(Le+je));ne.push("A",a(Je),a(Et),A(st*l),+de,+he,nt,at);break;case t.Z:De="Z";break;case t.R:var nt=a(se[ve++]),at=a(se[ve++]),At=a(se[ve++]),ft=a(se[ve++]);ne.push("M",nt,at,"L",nt+At,at,"L",nt+At,at+ft,"L",nt,at+ft,"L",nt,at);break}De&&ne.push(De);for(var xt=0;xt<Qe;xt++)ne.push(a(se[ve++]))}return ne.join(" ")}var d={};d.brush=function(Y){var ne=Y.style,se=Y.__svgEl;se||(se=Q("path"),Y.__svgEl=se),Y.path||Y.createPathProxy();var _e=Y.path;if(Y.__dirtyPath){_e.beginPath(),_e.subPixelOptimize=!1,Y.buildPath(_e,Y.shape),Y.__dirtyPath=!1;var ve=n(_e);ve.indexOf("NaN")<0&&D(se,"d",ve)}p(se,ne,!1,Y),x(se,Y.transform),ne.text!=null?I(Y,Y.getBoundingRect()):$(Y)};var m={};m.brush=function(Y){var ne=Y.style,se=ne.image;if(se instanceof HTMLImageElement){var _e=se.src;se=_e}if(!se)return;var ve=ne.x||0,Ce=ne.y||0,De=ne.width,Qe=ne.height,Se=Y.__svgEl;Se||(Se=Q("image"),Y.__svgEl=Se),se!==Y.__imageSrc&&(w(Se,"href",se),Y.__imageSrc=se),D(Se,"width",De),D(Se,"height",Qe),D(Se,"x",ve),D(Se,"y",Ce),x(Se,Y.transform),ne.text!=null?I(Y,Y.getBoundingRect()):$(Y)};var C={},y=new K,g={},U=[],k={left:"start",right:"end",center:"middle",middle:"middle"},I=function(Y,ne){var se=Y.style,_e=Y.transform,ve=Y instanceof b||se.transformText;Y.__dirty&&R.normalizeTextStyle(se,!0);var Ce=se.text;if(Ce!=null&&(Ce+=""),!R.needDrawText(Ce,se))return;Ce==null&&(Ce=""),!ve&&_e&&(y.copy(ne),y.applyTransform(_e),ne=y);var De=Y.__textSvgEl;De||(De=Q("text"),Y.__textSvgEl=De);var Qe=De.style,Se=se.font||B.DEFAULT_FONT,Ie=De.__computedFont;Se!==De.__styleFont&&(Qe.font=De.__styleFont=Se,Ie=De.__computedFont=Qe.font);var Je=se.textPadding,Et=se.textLineHeight,Le=Y.__textCotentBlock;(!Le||Y.__dirtyText)&&(Le=Y.__textCotentBlock=B.parsePlainText(Ce,Ie,Je,Et,se.truncate));var je=Le.outerHeight,st=Le.lineHeight;R.getBoxPosition(g,Y,se,ne);var he=g.baseX,ie=g.baseY,oe=g.textAlign||"left",ee=g.textVerticalAlign;V(De,ve,_e,se,ne,he,ie);var de=B.adjustTextY(ie,je,ee),we=he,Be=de;Je&&(we=G(he,oe,Je),Be+=Je[0]),Be+=st/2,p(De,se,!0,Y);var nt=Le.canCacheByTextString,at=Y.__tspanList||(Y.__tspanList=[]),At=at.length;if(nt&&Y.__canCacheByTextString&&Y.__text===Ce){if(Y.__dirtyText&&At)for(var ft=0;ft<At;++ft)L(at[ft],oe,we,Be+ft*st)}else{Y.__text=Ce,Y.__canCacheByTextString=nt;for(var xt=Le.lines,It=xt.length,ft=0;ft<It;ft++){var He=at[ft],ke=xt[ft];He?He.__zrText!==ke&&(He.innerHTML="",He.appendChild(document.createTextNode(ke))):(He=at[ft]=Q("tspan"),De.appendChild(He),He.appendChild(document.createTextNode(ke))),L(He,oe,we,Be+ft*st)}if(At>It){for(;ft<At;ft++)De.removeChild(at[ft]);at.length=It}}};function V(Y,ne,se,_e,ve,Ce,De){M.identity(U),ne&&se&&M.copy(U,se);var Qe=_e.textRotation;if(ve&&Qe){var Se=_e.textOrigin;Se==="center"?(Ce=ve.width/2+ve.x,De=ve.height/2+ve.y):Se&&(Ce=Se[0]+ve.x,De=Se[1]+ve.y),U[4]-=Ce,U[5]-=De,M.rotate(U,U,Qe),U[4]+=Ce,U[5]+=De}x(Y,U)}function G(Y,ne,se){return ne==="right"?Y-se[1]:ne==="center"?Y+se[3]/2-se[1]/2:Y+se[3]}function L(Y,ne,se,_e){D(Y,"dominant-baseline","middle"),D(Y,"text-anchor",k[ne]),D(Y,"x",se),D(Y,"y",_e)}function $(Y){Y&&Y.__textSvgEl&&(Y.__textSvgEl.parentNode&&Y.__textSvgEl.parentNode.removeChild(Y.__textSvgEl),Y.__textSvgEl=null,Y.__tspanList=[],Y.__text=null)}C.drawRectText=I,C.brush=function(Y){var ne=Y.style;ne.text!=null?I(Y,!1):$(Y)},le.path=d,le.image=m,le.text=C},P4Qj:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.removeSensor=le.getSensor=void 0;var Z=K(H("chpo")),Q=H("FxDU"),O=H("24YM");function K(b){return b&&b.__esModule?b:{default:b}}var M={},B=function(t){var E=t.getAttribute(O.SizeSensorId);if(E&&M[E])return M[E];var i=(0,Z.default)();t.setAttribute(O.SizeSensorId,i);var A=(0,Q.createSensor)(t);return M[i]=A,A};le.getSensor=B;var R=function(t){var E=t.element.getAttribute(O.SizeSensorId);t.element.removeAttribute(O.SizeSensorId),t.destroy(),E&&M[E]&&delete M[E]};le.removeSensor=R},QBsz:function(Xe,le){var H=typeof Float32Array=="undefined"?Array:Float32Array;function Z(p,n){var d=new H(2);return p==null&&(p=0),n==null&&(n=0),d[0]=p,d[1]=n,d}function Q(p,n){return p[0]=n[0],p[1]=n[1],p}function O(p){var n=new H(2);return n[0]=p[0],n[1]=p[1],n}function K(p,n,d){return p[0]=n,p[1]=d,p}function M(p,n,d){return p[0]=n[0]+d[0],p[1]=n[1]+d[1],p}function B(p,n,d,m){return p[0]=n[0]+d[0]*m,p[1]=n[1]+d[1]*m,p}function R(p,n,d){return p[0]=n[0]-d[0],p[1]=n[1]-d[1],p}function b(p){return Math.sqrt(E(p))}var t=b;function E(p){return p[0]*p[0]+p[1]*p[1]}var i=E;function A(p,n,d){return p[0]=n[0]*d[0],p[1]=n[1]*d[1],p}function h(p,n,d){return p[0]=n[0]/d[0],p[1]=n[1]/d[1],p}function s(p,n){return p[0]*n[0]+p[1]*n[1]}function o(p,n,d){return p[0]=n[0]*d,p[1]=n[1]*d,p}function f(p,n){var d=b(n);return d===0?(p[0]=0,p[1]=0):(p[0]=n[0]/d,p[1]=n[1]/d),p}function l(p,n){return Math.sqrt((p[0]-n[0])*(p[0]-n[0])+(p[1]-n[1])*(p[1]-n[1]))}var c=l;function a(p,n){return(p[0]-n[0])*(p[0]-n[0])+(p[1]-n[1])*(p[1]-n[1])}var u=a;function v(p,n){return p[0]=-n[0],p[1]=-n[1],p}function T(p,n,d,m){return p[0]=n[0]+m*(d[0]-n[0]),p[1]=n[1]+m*(d[1]-n[1]),p}function x(p,n,d){var m=n[0],C=n[1];return p[0]=d[0]*m+d[2]*C+d[4],p[1]=d[1]*m+d[3]*C+d[5],p}function D(p,n,d){return p[0]=Math.min(n[0],d[0]),p[1]=Math.min(n[1],d[1]),p}function w(p,n,d){return p[0]=Math.max(n[0],d[0]),p[1]=Math.max(n[1],d[1]),p}le.create=Z,le.copy=Q,le.clone=O,le.set=K,le.add=M,le.scaleAndAdd=B,le.sub=R,le.len=b,le.length=t,le.lenSquare=E,le.lengthSquare=i,le.mul=A,le.div=h,le.dot=s,le.scale=o,le.normalize=f,le.distance=l,le.dist=c,le.distanceSquare=a,le.distSquare=u,le.negate=v,le.lerp=T,le.applyTransform=x,le.min=D,le.max=w},"QO+J":function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.createSensor=void 0;var Z=O(H("NohK")),Q=H("24YM");function O(M){return M&&M.__esModule?M:{default:M}}var K=function(B){var R=void 0,b=[],t=function(){getComputedStyle(B).position==="static"&&(B.style.position="relative");var o=document.createElement("object");return o.onload=function(){o.contentDocument.defaultView.addEventListener("resize",E),E()},o.style.display="block",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.height="100%",o.style.width="100%",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.opacity="0",o.setAttribute("class",Q.SensorClassName),o.setAttribute("tabindex",Q.SensorTabIndex),o.type="text/html",B.appendChild(o),o.data="about:blank",o},E=(0,Z.default)(function(){b.forEach(function(s){s(B)})}),i=function(o){R||(R=t()),b.indexOf(o)===-1&&b.push(o)},A=function(){R&&R.parentNode&&(R.contentDocument&&R.contentDocument.defaultView.removeEventListener("resize",E),R.parentNode.removeChild(R),R=void 0,b=[])},h=function(o){var f=b.indexOf(o);f!==-1&&b.splice(f,1),b.length===0&&R&&A()};return{element:B,bind:i,destroy:A,unbind:h}};le.createSensor=K},Qe9p:function(Xe,le,H){var Z=H("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(n){return n=Math.round(n),n<0?0:n>255?255:n}function K(n){return n=Math.round(n),n<0?0:n>360?360:n}function M(n){return n<0?0:n>1?1:n}function B(n){return n.length&&n.charAt(n.length-1)==="%"?O(parseFloat(n)/100*255):O(parseInt(n,10))}function R(n){return n.length&&n.charAt(n.length-1)==="%"?M(parseFloat(n)/100):M(parseFloat(n))}function b(n,d,m){return m<0?m+=1:m>1&&(m-=1),m*6<1?n+(d-n)*m*6:m*2<1?d:m*3<2?n+(d-n)*(2/3-m)*6:n}function t(n,d,m){return n+(d-n)*m}function E(n,d,m,C,y){return n[0]=d,n[1]=m,n[2]=C,n[3]=y,n}function i(n,d){return n[0]=d[0],n[1]=d[1],n[2]=d[2],n[3]=d[3],n}var A=new Z(20),h=null;function s(n,d){h&&i(h,d),h=A.put(n,h||d.slice())}function o(n,d){if(!n)return;d=d||[];var m=A.get(n);if(m)return i(d,m);n=n+"";var C=n.replace(/ /g,"").toLowerCase();if(C in Q)return i(d,Q[C]),s(n,d),d;if(C.charAt(0)==="#"){if(C.length===4){var y=parseInt(C.substr(1),16);if(!(y>=0&&y<=4095)){E(d,0,0,0,1);return}return E(d,(y&3840)>>4|(y&3840)>>8,y&240|(y&240)>>4,y&15|(y&15)<<4,1),s(n,d),d}else if(C.length===7){var y=parseInt(C.substr(1),16);if(!(y>=0&&y<=16777215)){E(d,0,0,0,1);return}return E(d,(y&16711680)>>16,(y&65280)>>8,y&255,1),s(n,d),d}return}var g=C.indexOf("("),U=C.indexOf(")");if(g!==-1&&U+1===C.length){var k=C.substr(0,g),I=C.substr(g+1,U-(g+1)).split(","),V=1;switch(k){case"rgba":if(I.length!==4){E(d,0,0,0,1);return}V=R(I.pop());case"rgb":if(I.length!==3){E(d,0,0,0,1);return}return E(d,B(I[0]),B(I[1]),B(I[2]),V),s(n,d),d;case"hsla":if(I.length!==4){E(d,0,0,0,1);return}return I[3]=R(I[3]),f(I,d),s(n,d),d;case"hsl":if(I.length!==3){E(d,0,0,0,1);return}return f(I,d),s(n,d),d;default:return}}E(d,0,0,0,1);return}function f(n,d){var m=(parseFloat(n[0])%360+360)%360/360,C=R(n[1]),y=R(n[2]),g=y<=.5?y*(C+1):y+C-y*C,U=y*2-g;return d=d||[],E(d,O(b(U,g,m+1/3)*255),O(b(U,g,m)*255),O(b(U,g,m-1/3)*255),1),n.length===4&&(d[3]=n[3]),d}function l(n){if(!n)return;var d=n[0]/255,m=n[1]/255,C=n[2]/255,y=Math.min(d,m,C),g=Math.max(d,m,C),U=g-y,k=(g+y)/2,I,V;if(U===0)I=0,V=0;else{k<.5?V=U/(g+y):V=U/(2-g-y);var G=((g-d)/6+U/2)/U,L=((g-m)/6+U/2)/U,$=((g-C)/6+U/2)/U;d===g?I=$-L:m===g?I=1/3+G-$:C===g&&(I=2/3+L-G),I<0&&(I+=1),I>1&&(I-=1)}var Y=[I*360,V,k];return n[3]!=null&&Y.push(n[3]),Y}function c(n,d){var m=o(n);if(m){for(var C=0;C<3;C++)d<0?m[C]=m[C]*(1-d)|0:m[C]=(255-m[C])*d+m[C]|0,m[C]>255?m[C]=255:n[C]<0&&(m[C]=0);return p(m,m.length===4?"rgba":"rgb")}}function a(n){var d=o(n);if(d)return((1<<24)+(d[0]<<16)+(d[1]<<8)+ +d[2]).toString(16).slice(1)}function u(n,d,m){if(!(d&&d.length)||!(n>=0&&n<=1))return;m=m||[];var C=n*(d.length-1),y=Math.floor(C),g=Math.ceil(C),U=d[y],k=d[g],I=C-y;return m[0]=O(t(U[0],k[0],I)),m[1]=O(t(U[1],k[1],I)),m[2]=O(t(U[2],k[2],I)),m[3]=M(t(U[3],k[3],I)),m}var v=u;function T(n,d,m){if(!(d&&d.length)||!(n>=0&&n<=1))return;var C=n*(d.length-1),y=Math.floor(C),g=Math.ceil(C),U=o(d[y]),k=o(d[g]),I=C-y,V=p([O(t(U[0],k[0],I)),O(t(U[1],k[1],I)),O(t(U[2],k[2],I)),M(t(U[3],k[3],I))],"rgba");return m?{color:V,leftIndex:y,rightIndex:g,value:C}:V}var x=T;function D(n,d,m,C){if(n=o(n),n)return n=l(n),d!=null&&(n[0]=K(d)),m!=null&&(n[1]=R(m)),C!=null&&(n[2]=R(C)),p(f(n),"rgba")}function w(n,d){if(n=o(n),n&&d!=null)return n[3]=M(d),p(n,"rgba")}function p(n,d){if(!n||!n.length)return;var m=n[0]+","+n[1]+","+n[2];return(d==="rgba"||d==="hsva"||d==="hsla")&&(m+=","+n[3]),d+"("+m+")"}le.parse=o,le.lift=c,le.toHex=a,le.fastLerp=u,le.fastMapToColor=v,le.lerp=T,le.mapToColor=x,le.modifyHSL=D,le.modifyAlpha=w,le.stringify=p},QuXc:function(Xe,le){var H=function(Q){this.colorStops=Q||[]};H.prototype={constructor:H,addColorStop:function(Q,O){this.colorStops.push({offset:Q,color:O})}};var Z=H;Xe.exports=Z},RDYZ:function(Xe,le,H){var Z=H("dMvE");function Q(K){this._target=K.target,this._life=K.life||1e3,this._delay=K.delay||0,this._initialized=!1,this.loop=K.loop==null?!1:K.loop,this.gap=K.gap||0,this.easing=K.easing||"Linear",this.onframe=K.onframe,this.ondestroy=K.ondestroy,this.onrestart=K.onrestart,this._pausedTime=0,this._paused=!1}Q.prototype={constructor:Q,step:function(K,M){if(this._initialized||(this._startTime=K+this._delay,this._initialized=!0),this._paused){this._pausedTime+=M;return}var B=(K-this._startTime-this._pausedTime)/this._life;if(B<0)return;B=Math.min(B,1);var R=this.easing,b=typeof R=="string"?Z[R]:R,t=typeof b=="function"?b(B):B;return this.fire("frame",t),B===1?this.loop?(this.restart(K),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(K){var M=(K-this._startTime-this._pausedTime)%this._life;this._startTime=K-M+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(K,M){K="on"+K,this[K]&&this[K](this._target,M)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var O=Q;Xe.exports=O},RXMa:function(Xe,le,H){var Z=H("y+Vt"),Q=Z.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(O,K){var M=K.cx,B=K.cy,R=Math.PI*2;O.moveTo(M+K.r,B),O.arc(M,B,K.r,0,R,!1),O.moveTo(M+K.r0,B),O.arc(M,B,K.r0,0,R,!0)}});Xe.exports=Q},"SA+Z":function(Xe,le,H){var Z=H("wTVA"),Q=H("EbDI"),O=H("ZhPi"),K=H("wkBT");function M(B){return Z(B)||Q(B)||O(B)||K()}Xe.exports=M,Xe.exports.__esModule=!0,Xe.exports.default=Xe.exports},SJMd:function(Xe,le){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var H,Z,Q,O=!1,K,M;window.PR_SHOULD_USE_CONTINUATION=!0;var B,R;(function(){var b=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"],i=[E,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[i,"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"],h=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[i,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="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",c=[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"],u=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=[A,s,h,f,l,c,a,u],T=/^(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",D="kwd",w="com",p="typ",n="lit",d="pun",m="pln",C="tag",y="dec",g="src",U="atn",k="atv",I="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function G(he){for(var ie=0,oe=!1,ee=!1,de=0,we=he.length;de<we;++de){var Be=he[de];if(Be.ignoreCase)ee=!0;else if(/[a-z]/i.test(Be.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){oe=!0,ee=!1;break}}var nt={b:8,t:9,n:10,v:11,f:12,r:13};function at(He){var ke=He.charCodeAt(0);if(ke!==92)return ke;var ct=He.charAt(1);return ke=nt[ct],ke||("0"<=ct&&ct<="7"?parseInt(He.substring(1),8):ct==="u"||ct==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function At(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var ke=String.fromCharCode(He);return ke==="\\"||ke==="-"||ke==="]"||ke==="^"?"\\"+ke:ke}function ft(He){var ke=He.substring(1,He.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")),ct=[],gt=ke[0]==="^",Ze=["["];gt&&Ze.push("^");for(var ot=gt?1:0,Ke=ke.length;ot<Ke;++ot){var Me=ke[ot];if(/\\[bdsw]/i.test(Me))Ze.push(Me);else{var Ue=at(Me),ge;ot+2<Ke&&ke[ot+1]==="-"?(ge=at(ke[ot+2]),ot+=2):ge=Ue,ct.push([Ue,ge]),ge<65||Ue>122||(ge<65||Ue>90||ct.push([Math.max(65,Ue)|32,Math.min(ge,90)|32]),ge<97||Ue>122||ct.push([Math.max(97,Ue)&~32,Math.min(ge,122)&~32]))}}ct.sort(function(Fe,$e){return Fe[0]-$e[0]||$e[1]-Fe[1]});for(var xe=[],Ee=[],ot=0;ot<ct.length;++ot){var Oe=ct[ot];Oe[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],Oe[1]):xe.push(Ee=Oe)}for(var ot=0;ot<xe.length;++ot){var Oe=xe[ot];Ze.push(At(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&Ze.push("-"),Ze.push(At(Oe[1])))}return Ze.push("]"),Ze.join("")}function xt(He){for(var ke=He.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")),ct=ke.length,gt=[],Ze=0,ot=0;Ze<ct;++Ze){var Ke=ke[Ze];if(Ke==="(")++ot;else if(Ke.charAt(0)==="\\"){var Me=+Ke.substring(1);Me&&(Me<=ot?gt[Me]=-1:ke[Ze]=At(Me))}}for(var Ze=1;Ze<gt.length;++Ze)gt[Ze]===-1&&(gt[Ze]=++ie);for(var Ze=0,ot=0;Ze<ct;++Ze){var Ke=ke[Ze];if(Ke==="(")++ot,gt[ot]||(ke[Ze]="(?:");else if(Ke.charAt(0)==="\\"){var Me=+Ke.substring(1);Me&&Me<=ot&&(ke[Ze]="\\"+gt[Me])}}for(var Ze=0;Ze<ct;++Ze)ke[Ze]==="^"&&ke[Ze+1]!=="^"&&(ke[Ze]="");if(He.ignoreCase&&oe)for(var Ze=0;Ze<ct;++Ze){var Ke=ke[Ze],Ue=Ke.charAt(0);Ke.length>=2&&Ue==="["?ke[Ze]=ft(Ke):Ue!=="\\"&&(ke[Ze]=Ke.replace(/[a-zA-Z]/g,function(Ee){var Oe=Ee.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return ke.join("")}for(var It=[],de=0,we=he.length;de<we;++de){var Be=he[de];if(Be.global||Be.multiline)throw new Error(""+Be);It.push("(?:"+xt(Be)+")")}return new RegExp(It.join("|"),ee?"gi":"g")}function L(he,ie){var oe=/(?:^|\s)nocode(?:\s|$)/,ee=[],de=0,we=[],Be=0;function nt(at){var At=at.nodeType;if(At==1){if(oe.test(at.className))return;for(var ft=at.firstChild;ft;ft=ft.nextSibling)nt(ft);var xt=at.nodeName.toLowerCase();(xt==="br"||xt==="li")&&(ee[Be]=`
`,we[Be<<1]=de++,we[Be++<<1|1]=at)}else if(At==3||At==4){var It=at.nodeValue;It.length&&(ie?It=It.replace(/\r\n?/g,`
`):It=It.replace(/[ \t\r\n]+/g," "),ee[Be]=It,we[Be<<1]=de,de+=It.length,we[Be++<<1|1]=at)}}return nt(he),{sourceCode:ee.join("").replace(/\n$/,""),spans:we}}function $(he,ie,oe,ee,de){if(!oe)return;var we={sourceNode:he,pre:1,langExtension:null,numberLines:null,sourceCode:oe,spans:null,basePos:ie,decorations:null};ee(we),de.push.apply(de,we.decorations)}var Y=/\S/;function ne(he){for(var ie=void 0,oe=he.firstChild;oe;oe=oe.nextSibling){var ee=oe.nodeType;ie=ee===1?ie?he:oe:ee===3&&Y.test(oe.nodeValue)?he:ie}return ie===he?void 0:ie}function se(he,ie){var oe={},ee;(function(){for(var Be=he.concat(ie),nt=[],at={},At=0,ft=Be.length;At<ft;++At){var xt=Be[At],It=xt[3];if(It)for(var He=It.length;--He>=0;)oe[It.charAt(He)]=xt;var ke=xt[1],ct=""+ke;at.hasOwnProperty(ct)||(nt.push(ke),at[ct]=null)}nt.push(/[\0-\uffff]/),ee=G(nt)})();var de=ie.length,we=function(Be){for(var nt=Be.sourceCode,at=Be.basePos,At=Be.sourceNode,ft=[at,m],xt=0,It=nt.match(ee)||[],He={},ke=0,ct=It.length;ke<ct;++ke){var gt=It[ke],Ze=He[gt],ot=void 0,Ke;if(typeof Ze=="string")Ke=!1;else{var Me=oe[gt.charAt(0)];if(Me)ot=gt.match(Me[1]),Ze=Me[0];else{for(var Ue=0;Ue<de;++Ue)if(Me=ie[Ue],ot=gt.match(Me[1]),ot){Ze=Me[0];break}ot||(Ze=m)}Ke=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ke&&!(ot&&typeof ot[1]=="string")&&(Ke=!1,Ze=g),Ke||(He[gt]=Ze)}var ge=xt;if(xt+=gt.length,!Ke)ft.push(at+ge,Ze);else{var xe=ot[1],Ee=gt.indexOf(xe),Oe=Ee+xe.length;ot[2]&&(Oe=gt.length-ot[2].length,Ee=Oe-xe.length);var Fe=Ze.substring(5);$(At,at+ge,gt.substring(0,Ee),we,ft),$(At,at+ge+Ee,xe,Ie(Fe,xe),ft),$(At,at+ge+Oe,gt.substring(Oe),we,ft)}}Be.decorations=ft};return we}function _e(he){var ie=[],oe=[];he.tripleQuotedStrings?ie.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):he.multiLineStrings?ie.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ie.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),he.verbatimStrings&&oe.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ee=he.hashComments;ee&&(he.cStyleComments?(ee>1?ie.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ie.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),oe.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ie.push([w,/^#[^\r\n]*/,null,"#"])),he.cStyleComments&&(oe.push([w,/^\/\/[^\r\n]*/,null]),oe.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var de=he.regexLiterals;if(de){var we=de>1?"":`
\r`,Be=we?".":"[\\S\\s]",nt="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Be+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Be+")*(?:\\x5D|$))+/";oe.push(["lang-regex",RegExp("^"+V+"("+nt+")")])}var at=he.types;at&&oe.push([p,at]);var At=(""+he.keywords).replace(/^ | $/g,"");At.length&&oe.push([D,new RegExp("^(?:"+At.replace(/[\s,]+/g,"|")+")\\b"),null]),ie.push([m,/^\s+/,null,` \r
\xA0`]);var ft="^.[^\\s\\w.$@'\"`/\\\\]*";return he.regexLiterals&&(ft+="(?!s*/)"),oe.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[p,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[m,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[m,/^\\[\s\S]?/,null],[d,new RegExp(ft),null]),se(ie,oe)}var ve=_e({keywords:v,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ce(he,ie,oe){for(var ee=/(?:^|\s)nocode(?:\s|$)/,de=/\r\n?|\n/,we=he.ownerDocument,Be=we.createElement("li");he.firstChild;)Be.appendChild(he.firstChild);var nt=[Be];function at(ke){var ct=ke.nodeType;if(ct==1&&!ee.test(ke.className))if(ke.nodeName==="br")At(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var gt=ke.firstChild;gt;gt=gt.nextSibling)at(gt);else if((ct==3||ct==4)&&oe){var Ze=ke.nodeValue,ot=Ze.match(de);if(ot){var Ke=Ze.substring(0,ot.index);ke.nodeValue=Ke;var Me=Ze.substring(ot.index+ot[0].length);if(Me){var Ue=ke.parentNode;Ue.insertBefore(we.createTextNode(Me),ke.nextSibling)}At(ke),Ke||ke.parentNode.removeChild(ke)}}}function At(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function ct(ot,Ke){var Me=Ke?ot.cloneNode(!1):ot,Ue=ot.parentNode;if(Ue){var ge=ct(Ue,1),xe=ot.nextSibling;ge.appendChild(Me);for(var Ee=xe;Ee;Ee=xe)xe=Ee.nextSibling,ge.appendChild(Ee)}return Me}for(var gt=ct(ke.nextSibling,0),Ze;(Ze=gt.parentNode)&&Ze.nodeType===1;)gt=Ze;nt.push(gt)}for(var ft=0;ft<nt.length;++ft)at(nt[ft]);ie===(ie|0)&&nt[0].setAttribute("value",ie);var xt=we.createElement("ol");xt.className="linenums";for(var It=Math.max(0,ie-1|0)||0,ft=0,He=nt.length;ft<He;++ft)Be=nt[ft],Be.className="L"+(ft+It)%10,Be.firstChild||Be.appendChild(we.createTextNode("\xA0")),xt.appendChild(Be);he.appendChild(xt)}function De(he){var ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ie=ie&&+ie[1]<=8;var oe=/\n/g,ee=he.sourceCode,de=ee.length,we=0,Be=he.spans,nt=Be.length,at=0,At=he.decorations,ft=At.length,xt=0;At[ft]=de;var It,He;for(He=It=0;He<ft;)At[He]!==At[He+2]?(At[It++]=At[He++],At[It++]=At[He++]):He+=2;for(ft=It,He=It=0;He<ft;){for(var ke=At[He],ct=At[He+1],gt=He+2;gt+2<=ft&&At[gt+1]===ct;)gt+=2;At[It++]=ke,At[It++]=ct,He=gt}ft=At.length=It;var Ze=he.sourceNode,ot="";Ze&&(ot=Ze.style.display,Ze.style.display="none");try{for(var Ke=null;at<nt;){var Me=Be[at],Ue=Be[at+2]||de,ge=At[xt+2]||de,gt=Math.min(Ue,ge),xe=Be[at+1],Ee;if(xe.nodeType!==1&&(Ee=ee.substring(we,gt))){ie&&(Ee=Ee.replace(oe,"\r")),xe.nodeValue=Ee;var Oe=xe.ownerDocument,Fe=Oe.createElement("span");Fe.className=At[xt+1];var $e=xe.parentNode;$e.replaceChild(Fe,xe),Fe.appendChild(xe),we<Ue&&(Be[at+1]=xe=Oe.createTextNode(ee.substring(gt,Ue)),$e.insertBefore(xe,Fe.nextSibling))}we=gt,we>=Ue&&(at+=2),we>=ge&&(xt+=2)}}finally{Ze&&(Ze.style.display=ot)}}var Qe={};function Se(he,ie){for(var oe=ie.length;--oe>=0;){var ee=ie[oe];Qe.hasOwnProperty(ee)?b.console&&console.warn("cannot override language handler %s",ee):Qe[ee]=he}}function Ie(he,ie){return he&&Qe.hasOwnProperty(he)||(he=/^\s*</.test(ie)?"default-markup":"default-code"),Qe[he]}Se(ve,["default-code"]),Se(se([],[[m,/^[^<?]+/],[y,/^<!\w[^>]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[d,/^(?:<[%?]|[%?]>)/],["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([[m,/^[\s]+/,null,` \r
`],[k,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[d,/^[=<>\/]+/],["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([],[[k,/^[\s\S]+/]]),["uq.val"]),Se(_e({keywords:A,hashComments:!0,cStyleComments:!0,types:T}),["c","cc","cpp","cxx","cyc","m"]),Se(_e({keywords:"null,true,false"}),["json"]),Se(_e({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:T}),["cs"]),Se(_e({keywords:h,cStyleComments:!0}),["java"]),Se(_e({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Se(_e({keywords:c,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Se(_e({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Se(_e({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Se(_e({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Se(_e({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Se(se([],[[x,/^[\s\S]+/]]),["regex"]);function Je(he){var ie=he.langExtension;try{var oe=L(he.sourceNode,he.pre),ee=oe.sourceCode;he.sourceCode=ee,he.spans=oe.spans,he.basePos=0,Ie(ie,ee)(he),De(he)}catch(de){b.console&&console.log(de&&de.stack||de)}}function Et(he,ie,oe){var ee=oe||!1,de=ie||null,we=document.createElement("div");we.innerHTML="<pre>"+he+"</pre>",we=we.firstChild,ee&&Ce(we,ee,!0);var Be={langExtension:de,numberLines:ee,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Je(Be),we.innerHTML}function Le(he,ie){var oe=ie||document.body,ee=oe.ownerDocument||document;function de(Me){return oe.getElementsByTagName(Me)}for(var we=[de("pre"),de("code"),de("xmp")],Be=[],nt=0;nt<we.length;++nt)for(var at=0,At=we[nt].length;at<At;++at)Be.push(we[nt][at]);we=null;var ft=Date;ft.now||(ft={now:function(){return+new Date}});var xt=0,It=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,ke=/\bprettyprinted\b/,ct=/pre|xmp/i,gt=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,ot={};function Ke(){for(var Me=b.PR_SHOULD_USE_CONTINUATION?ft.now()+250:Infinity;xt<Be.length&&ft.now()<Me;xt++){for(var Ue=Be[xt],ge=ot,xe=Ue;xe=xe.previousSibling;){var Ee=xe.nodeType,Oe=(Ee===7||Ee===8)&&xe.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):Ee!==3||/\S/.test(xe.nodeValue))break;if(Oe){ge={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(mt,lt,Ct){ge[lt]=Ct});break}}var Fe=Ue.className;if((ge!==ot||He.test(Fe))&&!ke.test(Fe)){for(var $e=!1,pt=Ue.parentNode;pt;pt=pt.parentNode){var Ot=pt.tagName;if(Ze.test(Ot)&&pt.className&&He.test(pt.className)){$e=!0;break}}if(!$e){Ue.className+=" prettyprinted";var kt=ge.lang;if(!kt){kt=Fe.match(It);var Dt;!kt&&(Dt=ne(Ue))&&gt.test(Dt.tagName)&&(kt=Dt.className.match(It)),kt&&(kt=kt[1])}var Bt;if(ct.test(Ue.tagName))Bt=1;else{var ht=Ue.currentStyle,it=ee.defaultView,et=ht?ht.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(Ue,null).getPropertyValue("white-space"):0;Bt=et&&et.substring(0,3)==="pre"}var Te=ge.linenums;(Te=Te==="true"||+Te)||(Te=Fe.match(/\blinenums\b(?::(\d+))?/),Te=Te?Te[1]&&Te[1].length?+Te[1]:!0:!1),Te&&Ce(Ue,Te,Bt);var Ne={langExtension:kt,sourceNode:Ue,numberLines:Te,pre:Bt,sourceCode:null,basePos:null,spans:null,decorations:null};Je(Ne)}}}xt<Be.length?b.setTimeout(Ke,250):typeof he=="function"&&he()}Ke()}var je=b.PR={createSimpleLexer:se,registerLangHandler:Se,sourceDecorator:_e,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:k,PR_COMMENT:w,PR_DECLARATION:y,PR_KEYWORD:D,PR_LITERAL:n,PR_NOCODE:I,PR_PLAIN:m,PR_PUNCTUATION:d,PR_SOURCE:g,PR_STRING:x,PR_TAG:C,PR_TYPE:p,prettyPrintOne:O?b.prettyPrintOne=Et:B=Et,prettyPrint:R=O?b.prettyPrint=Le:R=Le},st=b.define;typeof st=="function"&&st.amd&&st("google-code-prettify",[],function(){return je})})()},SKnc:function(Xe,le,H){var Z=H("bYtY"),Q=H("QuXc"),O=function(M,B,R,b,t,E){this.x=M==null?0:M,this.y=B==null?0:B,this.x2=R==null?1:R,this.y2=b==null?0:b,this.type="linear",this.global=E||!1,Q.call(this,t)};O.prototype={constructor:O},Z.inherits(O,Q);var K=O;Xe.exports=K},SUKs:function(Xe,le,H){var Z=H("LPTA"),Q=Z.debugMode,O=function(){};Q===1&&(O=console.error);var K=O;Xe.exports=K},Sj9i:function(Xe,le,H){var Z=H("QBsz"),Q=Z.create,O=Z.distSquare,K=Math.pow,M=Math.sqrt,B=1e-8,R=1e-4,b=M(3),t=1/3,E=Q(),i=Q(),A=Q();function h(n){return n>-B&&n<B}function s(n){return n>B||n<-B}function o(n,d,m,C,y){var g=1-y;return g*g*(g*n+3*y*d)+y*y*(y*C+3*g*m)}function f(n,d,m,C,y){var g=1-y;return 3*(((d-n)*g+2*(m-d)*y)*g+(C-m)*y*y)}function l(n,d,m,C,y,g){var U=C+3*(d-m)-n,k=3*(m-d*2+n),I=3*(d-n),V=n-y,G=k*k-3*U*I,L=k*I-9*U*V,$=I*I-3*k*V,Y=0;if(h(G)&&h(L))if(h(k))g[0]=0;else{var ne=-I/k;ne>=0&&ne<=1&&(g[Y++]=ne)}else{var se=L*L-4*G*$;if(h(se)){var _e=L/G,ne=-k/U+_e,ve=-_e/2;ne>=0&&ne<=1&&(g[Y++]=ne),ve>=0&&ve<=1&&(g[Y++]=ve)}else if(se>0){var Ce=M(se),De=G*k+1.5*U*(-L+Ce),Qe=G*k+1.5*U*(-L-Ce);De<0?De=-K(-De,t):De=K(De,t),Qe<0?Qe=-K(-Qe,t):Qe=K(Qe,t);var ne=(-k-(De+Qe))/(3*U);ne>=0&&ne<=1&&(g[Y++]=ne)}else{var Se=(2*G*k-3*U*L)/(2*M(G*G*G)),Ie=Math.acos(Se)/3,Je=M(G),Et=Math.cos(Ie),ne=(-k-2*Je*Et)/(3*U),ve=(-k+Je*(Et+b*Math.sin(Ie)))/(3*U),Le=(-k+Je*(Et-b*Math.sin(Ie)))/(3*U);ne>=0&&ne<=1&&(g[Y++]=ne),ve>=0&&ve<=1&&(g[Y++]=ve),Le>=0&&Le<=1&&(g[Y++]=Le)}}return Y}function c(n,d,m,C,y){var g=6*m-12*d+6*n,U=9*d+3*C-3*n-9*m,k=3*d-3*n,I=0;if(h(U)){if(s(g)){var V=-k/g;V>=0&&V<=1&&(y[I++]=V)}}else{var G=g*g-4*U*k;if(h(G))y[0]=-g/(2*U);else if(G>0){var L=M(G),V=(-g+L)/(2*U),$=(-g-L)/(2*U);V>=0&&V<=1&&(y[I++]=V),$>=0&&$<=1&&(y[I++]=$)}}return I}function a(n,d,m,C,y,g){var U=(d-n)*y+n,k=(m-d)*y+d,I=(C-m)*y+m,V=(k-U)*y+U,G=(I-k)*y+k,L=(G-V)*y+V;g[0]=n,g[1]=U,g[2]=V,g[3]=L,g[4]=L,g[5]=G,g[6]=I,g[7]=C}function u(n,d,m,C,y,g,U,k,I,V,G){var L,$=.005,Y=Infinity,ne,se,_e,ve;E[0]=I,E[1]=V;for(var Ce=0;Ce<1;Ce+=.05)i[0]=o(n,m,y,U,Ce),i[1]=o(d,C,g,k,Ce),_e=O(E,i),_e<Y&&(L=Ce,Y=_e);Y=Infinity;for(var De=0;De<32&&!($<R);De++)ne=L-$,se=L+$,i[0]=o(n,m,y,U,ne),i[1]=o(d,C,g,k,ne),_e=O(i,E),ne>=0&&_e<Y?(L=ne,Y=_e):(A[0]=o(n,m,y,U,se),A[1]=o(d,C,g,k,se),ve=O(A,E),se<=1&&ve<Y?(L=se,Y=ve):$*=.5);return G&&(G[0]=o(n,m,y,U,L),G[1]=o(d,C,g,k,L)),M(Y)}function v(n,d,m,C){var y=1-C;return y*(y*n+2*C*d)+C*C*m}function T(n,d,m,C){return 2*((1-C)*(d-n)+C*(m-d))}function x(n,d,m,C,y){var g=n-2*d+m,U=2*(d-n),k=n-C,I=0;if(h(g)){if(s(U)){var V=-k/U;V>=0&&V<=1&&(y[I++]=V)}}else{var G=U*U-4*g*k;if(h(G)){var V=-U/(2*g);V>=0&&V<=1&&(y[I++]=V)}else if(G>0){var L=M(G),V=(-U+L)/(2*g),$=(-U-L)/(2*g);V>=0&&V<=1&&(y[I++]=V),$>=0&&$<=1&&(y[I++]=$)}}return I}function D(n,d,m){var C=n+m-2*d;return C===0?.5:(n-d)/C}function w(n,d,m,C,y){var g=(d-n)*C+n,U=(m-d)*C+d,k=(U-g)*C+g;y[0]=n,y[1]=g,y[2]=k,y[3]=k,y[4]=U,y[5]=m}function p(n,d,m,C,y,g,U,k,I){var V,G=.005,L=Infinity;E[0]=U,E[1]=k;for(var $=0;$<1;$+=.05){i[0]=v(n,m,y,$),i[1]=v(d,C,g,$);var Y=O(E,i);Y<L&&(V=$,L=Y)}L=Infinity;for(var ne=0;ne<32&&!(G<R);ne++){var se=V-G,_e=V+G;i[0]=v(n,m,y,se),i[1]=v(d,C,g,se);var Y=O(i,E);if(se>=0&&Y<L)V=se,L=Y;else{A[0]=v(n,m,y,_e),A[1]=v(d,C,g,_e);var ve=O(A,E);_e<=1&&ve<L?(V=_e,L=ve):G*=.5}}return I&&(I[0]=v(n,m,y,V),I[1]=v(d,C,g,V)),M(L)}le.cubicAt=o,le.cubicDerivativeAt=f,le.cubicRootAt=l,le.cubicExtrema=c,le.cubicSubdivide=a,le.cubicProjectPoint=u,le.quadraticAt=v,le.quadraticDerivativeAt=T,le.quadraticRootAt=x,le.quadraticExtremum=D,le.quadraticSubdivide=w,le.quadraticProjectPoint=p},SqI9:function(Xe,le,H){var Z=H("y+Vt"),Q=H("iXp4"),O=Z.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:Q(Z.prototype.brush),buildPath:function(K,M){var B=M.cx,R=M.cy,b=Math.max(M.r0||0,0),t=Math.max(M.r,0),E=M.startAngle,i=M.endAngle,A=M.clockwise,h=Math.cos(E),s=Math.sin(E);K.moveTo(h*b+B,s*b+R),K.lineTo(h*t+B,s*t+R),K.arc(B,R,t,E,i,!A),K.lineTo(Math.cos(i)*b+B,Math.sin(i)*b+R),b!==0&&K.arc(B,R,b,i,E,A),K.closePath()}});Xe.exports=O},SrGk:function(Xe,le,H){var Z=H("hydK"),Q=Z.createElement,O=H("bYtY"),K=H("y+Vt"),M=H("Dagg"),B=H("dqUG"),R=H("P47w"),b=R.path,t=R.image,E=R.text,i="0",A="1";function h(o,f,l,c,a){this._zrId=o,this._svgRoot=f,this._tagNames=typeof l=="string"?[l]:l,this._markLabel=c,this._domName=a||"_dom",this.nextId=0}h.prototype.createElement=Q,h.prototype.getDefs=function(o){var f=this._svgRoot,l=this._svgRoot.getElementsByTagName("defs");return l.length===0?o?(l=f.insertBefore(this.createElement("defs"),f.firstChild),l.contains||(l.contains=function(c){var a=l.children;if(!a)return!1;for(var u=a.length-1;u>=0;--u)if(a[u]===c)return!0;return!1}),l):null:l[0]},h.prototype.update=function(o,f){if(!o)return;var l=this.getDefs(!1);if(o[this._domName]&&l.contains(o[this._domName]))typeof f=="function"&&f(o);else{var c=this.add(o);c&&(o[this._domName]=c)}},h.prototype.addDom=function(o){var f=this.getDefs(!0);f.appendChild(o)},h.prototype.removeDom=function(o){var f=this.getDefs(!1);f&&o[this._domName]&&(f.removeChild(o[this._domName]),o[this._domName]=null)},h.prototype.getDoms=function(){var o=this.getDefs(!1);if(!o)return[];var f=[];return O.each(this._tagNames,function(l){var c=o.getElementsByTagName(l);f=f.concat([].slice.call(c))}),f},h.prototype.markAllUnused=function(){var o=this.getDoms(),f=this;O.each(o,function(l){l[f._markLabel]=i})},h.prototype.markUsed=function(o){o&&(o[this._markLabel]=A)},h.prototype.removeUnused=function(){var o=this.getDefs(!1);if(!o)return;var f=this.getDoms(),l=this;O.each(f,function(c){c[l._markLabel]!==A&&o.removeChild(c)})},h.prototype.getSvgProxy=function(o){return o instanceof K?b:o instanceof M?t:o instanceof B?E:b},h.prototype.getTextSvgElement=function(o){return o.__textSvgEl},h.prototype.getSvgElement=function(o){return o.__svgEl};var s=h;Xe.exports=s},T6xi:function(Xe,le,H){var Z=H("YgsL"),Q=H("nCxF");function O(K,M,B){var R=M.points,b=M.smooth;if(R&&R.length>=2){if(b&&b!=="spline"){var t=Q(R,b,B,M.smoothConstraint);K.moveTo(R[0][0],R[0][1]);for(var E=R.length,i=0;i<(B?E:E-1);i++){var A=t[i*2],h=t[i*2+1],s=R[(i+1)%E];K.bezierCurveTo(A[0],A[1],h[0],h[1],s[0],s[1])}}else{b==="spline"&&(R=Z(R,B)),K.moveTo(R[0][0],R[0][1]);for(var i=1,o=R.length;i<o;i++)K.lineTo(R[i][0],R[i][1])}B&&K.closePath()}}le.buildPath=O},T8No:function(Xe,le,H){"use strict";H.d(le,"a",function(){return R}),H.d(le,"e",function(){return b}),H.d(le,"c",function(){return d}),H.d(le,"b",function(){return m}),H.d(le,"d",function(){return C}),H.d(le,"f",function(){return U});var Z=H("MNsG"),Q=H("N0LK"),O=H("Cg/j");let K=Z.k||"";const M=new Map;M.set("false",!1),M.set("true",!0),M.set("isMac",Z.f),M.set("isLinux",Z.d),M.set("isWindows",Z.i),M.set("isWeb",Z.h),M.set("isMacNative",Z.f&&!Z.h),M.set("isEdge",K.indexOf("Edg/")>=0),M.set("isFirefox",K.indexOf("Firefox")>=0),M.set("isChrome",K.indexOf("Chrome")>=0),M.set("isSafari",K.indexOf("Safari")>=0);const B=Object.prototype.hasOwnProperty;class R{static has(I){return A.create(I)}static equals(I,V){return h.create(I,V)}static regex(I,V){return x.create(I,V)}static not(I){return l.create(I)}static and(...I){return p.create(I,null)}static or(...I){return n.create(I,null,!0)}static deserialize(I,V=!1){return I?this._deserializeOrExpression(I,V):void 0}static _deserializeOrExpression(I,V){let G=I.split("||");return n.create(G.map(L=>this._deserializeAndExpression(L,V)),null,!0)}static _deserializeAndExpression(I,V){let G=I.split("&&");return p.create(G.map(L=>this._deserializeOne(L,V)),null)}static _deserializeOne(I,V){if(I=I.trim(),I.indexOf("!=")>=0){let G=I.split("!=");return f.create(G[0].trim(),this._deserializeValue(G[1],V))}if(I.indexOf("==")>=0){let G=I.split("==");return h.create(G[0].trim(),this._deserializeValue(G[1],V))}if(I.indexOf("=~")>=0){let G=I.split("=~");return x.create(G[0].trim(),this._deserializeRegexValue(G[1],V))}if(I.indexOf(" in ")>=0){let G=I.split(" in ");return s.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(I)){const G=I.split(">=");return u.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(I)){const G=I.split(">");return a.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(I)){const G=I.split("<=");return T.create(G[0].trim(),G[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(I)){const G=I.split("<");return v.create(G[0].trim(),G[1].trim())}return/^\!\s*/.test(I)?l.create(I.substr(1).trim()):A.create(I)}static _deserializeValue(I,V){if(I=I.trim(),I==="true")return!0;if(I==="false")return!1;let G=/^'([^']*)'$/.exec(I);return G?G[1].trim():I}static _deserializeRegexValue(I,V){if(Object(Q.C)(I)){if(V)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let G=I.indexOf("/"),L=I.lastIndexOf("/");if(G===L||G<0){if(V)throw new Error(`bad regexp-value '${I}', missing /-enclosure`);return console.warn(`bad regexp-value '${I}', missing /-enclosure`),null}let $=I.slice(G+1,L),Y=I[L+1]==="i"?"i":"";try{return new RegExp($,Y)}catch(ne){if(V)throw new Error(`bad regexp-value '${I}', parse error: ${ne}`);return console.warn(`bad regexp-value '${I}', parse error: ${ne}`),null}}}function b(I,V){const G=I?I.substituteConstants():void 0,L=V?V.substituteConstants():void 0;return!G&&!L?!0:!G||!L?!1:G.equals(L)}function t(I,V){return I.cmp(V)}class E{constructor(){this.type=0}cmp(I){return this.type-I.type}equals(I){return I.type===this.type}substituteConstants(){return this}evaluate(I){return!1}serialize(){return"false"}keys(){return[]}negate(){return i.INSTANCE}}E.INSTANCE=new E;class i{constructor(){this.type=1}cmp(I){return this.type-I.type}equals(I){return I.type===this.type}substituteConstants(){return this}evaluate(I){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}i.INSTANCE=new i;class A{constructor(I,V){this.key=I,this.negated=V,this.type=2}static create(I,V=null){const G=M.get(I);return typeof G=="boolean"?G?i.INSTANCE:E.INSTANCE:new A(I,V)}cmp(I){return I.type!==this.type?this.type-I.type:y(this.key,I.key)}equals(I){return I.type===this.type?this.key===I.key:!1}substituteConstants(){const I=M.get(this.key);return typeof I=="boolean"?I?i.INSTANCE:E.INSTANCE:this}evaluate(I){return!!I.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class h{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=4}static create(I,V,G=null){if(typeof V=="boolean")return V?A.create(I,G):l.create(I,G);const L=M.get(I);if(typeof L=="boolean"){const $=L?"true":"false";return V===$?i.INSTANCE:E.INSTANCE}return new h(I,V,G)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){const I=M.get(this.key);if(typeof I=="boolean"){const V=I?"true":"false";return this.value===V?i.INSTANCE:E.INSTANCE}return this}evaluate(I){return I.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class s{constructor(I,V){this.key=I,this.valueKey=V,this.type=10,this.negated=null}static create(I,V){return new s(I,V)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.valueKey,I.key,I.valueKey)}equals(I){return I.type===this.type?this.key===I.key&&this.valueKey===I.valueKey:!1}substituteConstants(){return this}evaluate(I){const V=I.getValue(this.valueKey),G=I.getValue(this.key);return Array.isArray(V)?V.indexOf(G)>=0:typeof G=="string"&&typeof V=="object"&&V!==null?B.call(V,G):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=o.create(this)),this.negated}}class o{constructor(I){this._actual=I,this.type=11}static create(I){return new o(I)}cmp(I){return I.type!==this.type?this.type-I.type:this._actual.cmp(I._actual)}equals(I){return I.type===this.type?this._actual.equals(I._actual):!1}substituteConstants(){return this}evaluate(I){return!this._actual.evaluate(I)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=5}static create(I,V,G=null){if(typeof V=="boolean")return V?l.create(I,G):A.create(I,G);const L=M.get(I);if(typeof L=="boolean"){const $=L?"true":"false";return V===$?E.INSTANCE:i.INSTANCE}return new f(I,V,G)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){const I=M.get(this.key);if(typeof I=="boolean"){const V=I?"true":"false";return this.value===V?E.INSTANCE:i.INSTANCE}return this}evaluate(I){return I.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class l{constructor(I,V){this.key=I,this.negated=V,this.type=3}static create(I,V=null){const G=M.get(I);return typeof G=="boolean"?G?E.INSTANCE:i.INSTANCE:new l(I,V)}cmp(I){return I.type!==this.type?this.type-I.type:y(this.key,I.key)}equals(I){return I.type===this.type?this.key===I.key:!1}substituteConstants(){const I=M.get(this.key);return typeof I=="boolean"?I?E.INSTANCE:i.INSTANCE:this}evaluate(I){return!I.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}function c(I,V){if(typeof I=="string"){const G=parseFloat(I);isNaN(G)||(I=G)}return typeof I=="string"||typeof I=="number"?V(I):E.INSTANCE}class a{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=12}static create(I,V,G=null){return c(V,L=>new a(I,L,G))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class u{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=13}static create(I,V,G=null){return c(V,L=>new u(I,L,G))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class v{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=14}static create(I,V,G=null){return c(V,L=>new v(I,L,G))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class T{constructor(I,V,G){this.key=I,this.value=V,this.negated=G,this.type=15}static create(I,V,G=null){return c(V,L=>new T(I,L,G))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class x{constructor(I,V){this.key=I,this.regexp=V,this.type=7,this.negated=null}static create(I,V){return new x(I,V)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.key<I.key)return-1;if(this.key>I.key)return 1;const V=this.regexp?this.regexp.source:"",G=I.regexp?I.regexp.source:"";return V<G?-1:V>G?1:0}equals(I){if(I.type===this.type){const V=this.regexp?this.regexp.source:"",G=I.regexp?I.regexp.source:"";return this.key===I.key&&V===G}return!1}substituteConstants(){return this}evaluate(I){let V=I.getValue(this.key);return this.regexp?this.regexp.test(V):!1}serialize(){const I=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${I}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(I){this._actual=I,this.type=8}static create(I){return new D(I)}cmp(I){return I.type!==this.type?this.type-I.type:this._actual.cmp(I._actual)}equals(I){return I.type===this.type?this._actual.equals(I._actual):!1}substituteConstants(){return this}evaluate(I){return!this._actual.evaluate(I)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function w(I){let V=null;for(let G=0,L=I.length;G<L;G++){const $=I[G].substituteConstants();if(I[G]!==$&&V===null){V=[];for(let Y=0;Y<G;Y++)V[Y]=I[Y]}V!==null&&(V[G]=$)}return V===null?I:V}class p{constructor(I,V){this.expr=I,this.negated=V,this.type=6}static create(I,V){return p._normalizeArr(I,V)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.expr.length<I.expr.length)return-1;if(this.expr.length>I.expr.length)return 1;for(let V=0,G=this.expr.length;V<G;V++){const L=t(this.expr[V],I.expr[V]);if(L!==0)return L}return 0}equals(I){if(I.type===this.type){if(this.expr.length!==I.expr.length)return!1;for(let V=0,G=this.expr.length;V<G;V++)if(!this.expr[V].equals(I.expr[V]))return!1;return!0}return!1}substituteConstants(){const I=w(this.expr);return I===this.expr?this:p.create(I,this.negated)}evaluate(I){for(let V=0,G=this.expr.length;V<G;V++)if(!this.expr[V].evaluate(I))return!1;return!0}static _normalizeArr(I,V){const G=[];let L=!1;for(const $ of I){if(!$)continue;if($.type===1){L=!0;continue}if($.type===0)return E.INSTANCE;if($.type===6){G.push(...$.expr);continue}G.push($)}if(G.length===0&&L)return i.INSTANCE;if(G.length===0)return;if(G.length===1)return G[0];G.sort(t);for(let $=1;$<G.length;$++)G[$-1].equals(G[$])&&(G.splice($,1),$--);if(G.length===1)return G[0];for(;G.length>1;){const $=G[G.length-1];if($.type!==9)break;G.pop();const Y=G.pop(),ne=G.length===0,se=n.create($.expr.map(_e=>p.create([_e,Y],null)),null,ne);se&&(G.push(se),G.sort(t))}return G.length===1?G[0]:new p(G,V)}serialize(){return this.expr.map(I=>I.serialize()).join(" && ")}keys(){const I=[];for(let V of this.expr)I.push(...V.keys());return I}negate(){if(!this.negated){const I=[];for(let V of this.expr)I.push(V.negate());this.negated=n.create(I,this,!0)}return this.negated}}class n{constructor(I,V){this.expr=I,this.negated=V,this.type=9}static create(I,V,G){return n._normalizeArr(I,V,G)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.expr.length<I.expr.length)return-1;if(this.expr.length>I.expr.length)return 1;for(let V=0,G=this.expr.length;V<G;V++){const L=t(this.expr[V],I.expr[V]);if(L!==0)return L}return 0}equals(I){if(I.type===this.type){if(this.expr.length!==I.expr.length)return!1;for(let V=0,G=this.expr.length;V<G;V++)if(!this.expr[V].equals(I.expr[V]))return!1;return!0}return!1}substituteConstants(){const I=w(this.expr);return I===this.expr?this:n.create(I,this.negated,!1)}evaluate(I){for(let V=0,G=this.expr.length;V<G;V++)if(this.expr[V].evaluate(I))return!0;return!1}static _normalizeArr(I,V,G){let L=[],$=!1;if(I){for(let Y=0,ne=I.length;Y<ne;Y++){const se=I[Y];if(!se)continue;if(se.type===0){$=!0;continue}if(se.type===1)return i.INSTANCE;if(se.type===9){L=L.concat(se.expr);continue}L.push(se)}if(L.length===0&&$)return E.INSTANCE;L.sort(t)}if(L.length===0)return;if(L.length===1)return L[0];for(let Y=1;Y<L.length;Y++)L[Y-1].equals(L[Y])&&(L.splice(Y,1),Y--);if(L.length===1)return L[0];if(G){for(let Y=0;Y<L.length;Y++)for(let ne=Y+1;ne<L.length;ne++)U(L[Y],L[ne])&&(L.splice(ne,1),ne--);if(L.length===1)return L[0]}return new n(L,V)}serialize(){return this.expr.map(I=>I.serialize()).join(" || ")}keys(){const I=[];for(let V of this.expr)I.push(...V.keys());return I}negate(){if(!this.negated){let I=[];for(let V of this.expr)I.push(V.negate());for(;I.length>1;){const V=I.shift(),G=I.shift(),L=[];for(const Y of k(V))for(const ne of k(G))L.push(p.create([Y,ne],null));const $=I.length===0;I.unshift(n.create(L,null,$))}this.negated=I[0]}return this.negated}}class d extends A{constructor(I,V,G){super(I,null);this._defaultValue=V,typeof G=="object"?d._info.push(Object.assign(Object.assign({},G),{key:I})):G!==!0&&d._info.push({key:I,description:G,type:V!=null?typeof V:void 0})}static all(){return d._info.values()}bindTo(I){return I.createKey(this.key,this._defaultValue)}getValue(I){return I.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(I){return h.create(this.key,I)}}d._info=[];const m=Object(O.c)("contextKeyService"),C="setContext";function y(I,V){return I<V?-1:I>V?1:0}function g(I,V,G,L){return I<G?-1:I>G?1:V<L?-1:V>L?1:0}function U(I,V){if(V.type===6&&I.type!==9&&I.type!==6){for(const $ of V.expr)if(I.equals($))return!0}const G=I.negate(),L=k(G).concat(k(V));L.sort(t);for(let $=0;$<L.length;$++){const Y=L[$],ne=Y.negate();for(let se=$+1;se<L.length;se++){const _e=L[se];if(ne.equals(_e))return!0}}return!1}function k(I){return I.type===9?I.expr:[I]}},TXwP:function(Xe,le,H){var Z,Q;(function(){var O;(function(){"use strict";var M=[,,function(t){function E(h){this.__parent=h,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 h=new E(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},E.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},E.prototype.has_match=function(h){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(h))return!0;return!1},E.prototype.set_indent=function(h,s){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=s||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 h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__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(h){this.__items.push(h);var s=h.lastIndexOf(`
`);s!==-1?this.__character_count=h.length-s:this.__character_count+=h.length},E.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},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 h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function i(h,s){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),s=s||"",h.indent_level>0&&(s=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}i.prototype.get_indent_size=function(h,s){var o=this.__base_string_length;return s=s||0,h<0&&(o=0),o+=h*this.__indent_size,o+=s,o},i.prototype.get_indent_string=function(h,s){var o=this.__base_string;return s=s||0,h<0&&(h=0,o=""),s+=h*this.__indent_size,this.__ensure_cache(s),o+=this.__cache[s],o},i.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var h=this.__cache.length,s=0,o="";this.__indent_size&&h>=this.__indent_size&&(s=Math.floor(h/this.__indent_size),h-=s*this.__indent_size,o=new Array(s+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function A(h,s){this.__indent_cache=new i(h,s),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.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()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(h,s){return this.__indent_cache.get_indent_string(h,s)},A.prototype.get_indent_size=function(h,s){return this.__indent_cache.get_indent_size(h,s)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(h){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return h!==`
`&&(o=o.replace(/[\n]/g,h)),o},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(h,s){return h=h||0,s=s||0,this.next_line.set_indent(h,s),this.__lines.length>1?(this.current_line.set_indent(h,s),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(h){for(var s=0;s<h.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.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(" "))},A.prototype.remove_indent=function(h){for(var s=this.__lines.length;h<s;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&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},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(h,s){for(var o=this.__lines.length-2;o>=0;){var f=this.__lines[o];if(f.is_empty())break;if(f.item(0).indexOf(h)!==0&&f.item(-1)!==s){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=A},,,,function(t){function E(h,s){this.raw_options=i(h,s),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(h,s){var o=this.raw_options[h],f=s||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(f=o.concat()):typeof o=="string"&&(f=o.split(/[^a-zA-Z0-9_\/\-]+/)),f},E.prototype._get_boolean=function(h,s){var o=this.raw_options[h],f=o===void 0?!!s:!!o;return f},E.prototype._get_characters=function(h,s){var o=this.raw_options[h],f=s||"";return typeof o=="string"&&(f=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),f},E.prototype._get_number=function(h,s){var o=this.raw_options[h];s=parseInt(s,10),isNaN(s)&&(s=0);var f=parseInt(o,10);return isNaN(f)&&(f=s),f},E.prototype._get_selection=function(h,s,o){var f=this._get_selection_list(h,s,o);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
`+s+`
You passed in: '`+this.raw_options[h]+"'");return f[0]},E.prototype._get_selection_list=function(h,s,o){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[s[0]],!this._is_valid_selection(o,s))throw new Error("Invalid Default Value!");var f=this._get_array(h,o);if(!this._is_valid_selection(f,s))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
`+s+`
You passed in: '`+this.raw_options[h]+"'");return f},E.prototype._is_valid_selection=function(h,s){return h.length&&s.length&&!h.some(function(o){return s.indexOf(o)===-1})};function i(h,s){var o={};h=A(h);var f;for(f in h)f!==s&&(o[f]=h[f]);if(s&&h[s])for(f in h[s])o[f]=h[s][f];return o}function A(h){var s={},o;for(o in h){var f=o.replace(/-/g,"_");s[f]=h[o]}return s}t.exports.Options=E,t.exports.normalizeOpts=A,t.exports.mergeOpts=i},,function(t){var E=RegExp.prototype.hasOwnProperty("sticky");function i(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},i.prototype.peek=function(A){var h=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(h=this.__input.charAt(A)),h},i.prototype.__match=function(A,h){A.lastIndex=h;var s=A.exec(this.__input);return s&&!(E&&A.sticky)&&(s.index!==h&&(s=null)),s},i.prototype.test=function(A,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(A,h):!1},i.prototype.testChar=function(A,h){var s=this.peek(h);return A.lastIndex=0,s!==null&&A.test(s)},i.prototype.match=function(A){var h=this.__match(A,this.__position);return h?this.__position+=h[0].length:h=null,h},i.prototype.read=function(A,h,s){var o="",f;return A&&(f=this.match(A),f&&(o+=f[0])),h&&(f||!A)&&(o+=this.readUntil(h,s)),o},i.prototype.readUntil=function(A,h){var s="",o=this.__position;A.lastIndex=this.__position;var f=A.exec(this.__input);return f?(o=f.index,h&&(o+=f[0].length)):o=this.__input_length,s=this.__input.substring(this.__position,o),this.__position=o,s},i.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},i.prototype.get_regexp=function(A,h){var s=null,o="g";return h&&E&&(o="y"),typeof A=="string"&&A!==""?s=new RegExp(A,o):A&&(s=new RegExp(A.source,o)),s},i.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(A){var h=this.__position,s=this.readUntilAfter(A);return this.__position=h,s},i.prototype.lookBack=function(A){var h=this.__position-1;return h>=A.length&&this.__input.substring(h-A.length,h).toLowerCase()===A},t.exports.InputScanner=i},,,,,function(t){function E(i,A){i=typeof i=="string"?i:i.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+A,"g")}E.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(i);h;)A[h[1]]=h[2],h=this.__directive_pattern.exec(i);return A},E.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=E},,function(t,E,i){var A=i(16).Beautifier,h=i(17).Options;function s(o,f){var l=new A(o,f);return l.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new h}},function(t,E,i){var A=i(17).Options,h=i(2).Output,s=i(8).InputScanner,o=i(13).Directives,f=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,a=/\s/,u=/(?:\s|\n)+/g,v=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,T=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function x(D,w){this._source_text=D||"",this._options=new A(w),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(D){var w="";for(this._ch=this._input.next();this._ch;){if(w+=this._ch,this._ch==="\\")w+=this._input.next();else if(D.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return w},x.prototype.eatWhitespace=function(D){for(var w=a.test(this._input.peek()),p=0;a.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===`
`&&((p===0||p<this._options.max_preserve_newlines)&&(p++,this._output.add_new_line(!0)));return w},x.prototype.foundNestedPseudoClass=function(){for(var D=0,w=1,p=this._input.peek(w);p;){if(p==="{")return!0;if(p==="(")D+=1;else if(p===")"){if(D===0)return!1;D-=1}else if(p===";"||p==="}")return!1;w++,p=this._input.peek(w)}return!1},x.prototype.print_string=function(D){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(D)},x.prototype.preserveSingleSpace=function(D){D&&(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 D=this._source_text,w=this._options.eol;w==="auto"&&(w=`
`,D&&l.test(D||"")&&(w=D.match(l)[0])),D=D.replace(c,`
`);var p=D.match(/^[\t ]*/)[0];this._output=new h(this._options,p),this._input=new s(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n=0,d=!1,m=!1,C=!1,y=!1,g=!1,U=!1,k=this._ch,I=!1,V,G,L;V=this._input.read(u),G=V!=="",L=k,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),k=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var $=this._input.read(v),Y=f.get_directives($);Y&&Y.ignore==="start"&&($+=f.readIgnored(this._input)),this.print_string($),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(T)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(G),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ne.match(/[ :]$/)&&(ne=this.eatString(": ").replace(/\s$/,""),this.print_string(ne),this._output.space_before_token=!0),ne=ne.replace(/\s$/,""),ne==="extend"?y=!0:ne==="import"&&(g=!0),ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,ne in this.CONDITIONAL_GROUP_RULE&&(C=!0)):!d&&n===0&&ne.indexOf(":")!==-1&&(m=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(G),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")m&&(m=!1,this.outdent()),C?(C=!1,d=this._indentLevel>=this._nestedLevel):d=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&d&&(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)):(L==="("?this._output.space_before_token=!1:L!==","&&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(),L==="{"&&this._output.trim(!0),g=!1,y=!1,m&&(this.outdent(),m=!1),this.print_string(this._ch),d=!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])){I=!0;break}(d||C)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!y&&n===0?(this.print_string(":"),m||(m=!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=L==='"'||L==="'";this.preserveSingleSpace(_e||G),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")I=!1,n===0?(m&&(this.outdent(),m=!1),y=!1,g=!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(),n++,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(")")),n&&(n--,this.outdent()));else{var ve=!1;this._input.lookBack("with")&&(ve=!0),this.preserveSingleSpace(G||ve),this.print_string(this._ch),m&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),U=!0):(this.eatWhitespace(),n++,this.indent())}else if(this._ch===")")n&&(n--,this.outdent()),U&&this._input.peek()===";"&&this._options.selector_separator_newline&&(U=!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&&(!m||U)&&n===0&&!g&&!y?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!m&&n===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(G),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 Ce=L==='"'||L==="'";this.preserveSingleSpace(Ce||G),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&I&&this._output.add_new_line()}var De=this._output.get_code(w);return De},t.exports.Beautifier=x},function(t,E,i){var A=i(6).Options;function h(s){A.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l<f.length;l++)f[l]!=="expand"?this.brace_style="collapse":this.brace_style=f[l]}h.prototype=new A,t.exports.Options=h}],B={};function R(t){var E=B[t];if(E!==void 0)return E.exports;var i=B[t]={exports:{}};return M[t](i,i.exports,R),i.exports}var b=R(15);O=b})();var K=O;!(Z=[],Q=function(){return{css_beautify:K}}.apply(le,Z),Q!==void 0&&(Xe.exports=Q))})()},Vhoy:function(Xe,le,H){"use strict";H.d(le,"d",function(){return K}),H.d(le,"e",function(){return M}),H.d(le,"c",function(){return B}),H.d(le,"b",function(){return R}),H.d(le,"a",function(){return b});var Z=H("MI8n");class Q{constructor(){this._icons=new Map,this._onDidRegister=new Z.b}add(t){const E=this._icons.get(t.id);E?t.description?E.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const O=new Q,K=O;function M(t,E){return new R(t,E)}function B(t){return t?t.replace(/\$\((.*?)\)/g,(E,i)=>` ${i} `).trim():""}class R{constructor(t,E,i){this.id=t,this.definition=E,this.description=i,O.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var b;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const E=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function i(s){if(s instanceof R)return["codicon","codicon-"+s.id];const o=E.exec(s.id);if(!o)return i(R.error);let[,f,l]=o;const c=["codicon","codicon-"+f];return l&&c.push("codicon-modifier-"+l.substr(1)),c}t.asClassNameArray=i;function A(s){return i(s).join(" ")}t.asClassName=A;function h(s){return"."+i(s).join(".")}t.asCSSSelector=h})(b||(b={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(R||(R={}))},VpOo:function(Xe,le){function H(Z,Q){var O=Q.x,K=Q.y,M=Q.width,B=Q.height,R=Q.r,b,t,E,i;M<0&&(O=O+M,M=-M),B<0&&(K=K+B,B=-B),typeof R=="number"?b=t=E=i=R:R instanceof Array?R.length===1?b=t=E=i=R[0]:R.length===2?(b=E=R[0],t=i=R[1]):R.length===3?(b=R[0],t=i=R[1],E=R[2]):(b=R[0],t=R[1],E=R[2],i=R[3]):b=t=E=i=0;var A;b+t>M&&(A=b+t,b*=M/A,t*=M/A),E+i>M&&(A=E+i,E*=M/A,i*=M/A),t+E>B&&(A=t+E,t*=B/A,E*=B/A),b+i>B&&(A=b+i,b*=B/A,i*=B/A),Z.moveTo(O+b,K),Z.lineTo(O+M-t,K),t!==0&&Z.arc(O+M-t,K+t,t,-Math.PI/2,0),Z.lineTo(O+M,K+B-E),E!==0&&Z.arc(O+M-E,K+B-E,E,0,Math.PI/2),Z.lineTo(O+i,K+B),i!==0&&Z.arc(O+i,K+B-i,i,Math.PI/2,Math.PI),Z.lineTo(O,K+b),b!==0&&Z.arc(O+b,K+b,b,Math.PI,Math.PI*1.5)}le.buildPath=H},"VrN/":function(Xe,le,H){(function(Z,Q){Xe.exports=Q()})(this,function(){"use strict";var Z=navigator.userAgent,Q=navigator.platform,O=/gecko\/\d/i.test(Z),K=/MSIE \d/.test(Z),M=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),B=/Edge\/(\d+)/.exec(Z),R=K||M||B,b=R&&(K?document.documentMode||6:+(B||M)[1]),t=!B&&/WebKit\//.test(Z),E=t&&/Qt\/\d+\.\d+/.test(Z),i=!B&&/Chrome\//.test(Z),A=/Opera\//.test(Z),h=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),o=/PhantomJS/.test(Z),f=!B&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),l=/Android/.test(Z),c=f||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),a=f||/Mac/.test(Q),u=/\bCrOS\b/.test(Z),v=/win/i.test(Q),T=A&&Z.match(/Version\/(\d*\.\d*)/);T&&(T=Number(T[1])),T&&T>=15&&(A=!1,t=!0);var x=a&&(E||A&&(T==null||T<12.11)),D=O||R&&b>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var p=function(e,r){var S=e.className,_=w(r).exec(S);if(_){var F=S.slice(_.index+_[0].length);e.className=S.slice(0,_.index)+(F?_[1]+F:"")}};function n(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function d(e,r){return n(e).appendChild(r)}function m(e,r,S,_){var F=document.createElement(e);if(S&&(F.className=S),_&&(F.style.cssText=_),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var J=0;J<r.length;++J)F.appendChild(r[J]);return F}function C(e,r,S,_){var F=m(e,r,S,_);return F.setAttribute("role","presentation"),F}var y;document.createRange?y=function(e,r,S,_){var F=document.createRange();return F.setEnd(_||e,S),F.setStart(e,r),F}:y=function(e,r,S){var _=document.body.createTextRange();try{_.moveToElementText(e.parentNode)}catch(F){return _}return _.collapse(!0),_.moveEnd("character",S),_.moveStart("character",r),_};function g(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function U(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function k(e,r){var S=e.className;w(r).test(S)||(e.className+=(S?" ":"")+r)}function I(e,r){for(var S=e.split(" "),_=0;_<S.length;_++)S[_]&&!w(S[_]).test(r)&&(r+=" "+S[_]);return r}var V=function(e){e.select()};f?V=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:R&&(V=function(e){try{e.select()}catch(r){}});function G(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function L(e,r,S){r||(r={});for(var _ in e)e.hasOwnProperty(_)&&(S!==!1||!r.hasOwnProperty(_))&&(r[_]=e[_]);return r}function $(e,r,S,_,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var J=_||0,ae=F||0;;){var ce=e.indexOf(" ",J);if(ce<0||ce>=r)return ae+(r-J);ae+=ce-J,ae+=S-ae%S,J=ce+1}}var Y=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};Y.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Y.prototype.set=function(e,r){this.f=r;var S=+new Date+e;(!this.id||S<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=S)};function ne(e,r){for(var S=0;S<e.length;++S)if(e[S]==r)return S;return-1}var se=50,_e={toString:function(){return"CodeMirror.Pass"}},ve={scroll:!1},Ce={origin:"*mouse"},De={origin:"+move"};function Qe(e,r,S){for(var _=0,F=0;;){var J=e.indexOf(" ",_);J==-1&&(J=e.length);var ae=J-_;if(J==e.length||F+ae>=r)return _+Math.min(ae,r-F);if(F+=J-_,F+=S-F%S,_=J+1,F>=r)return _}}var Se=[""];function Ie(e){for(;Se.length<=e;)Se.push(Je(Se)+" ");return Se[e]}function Je(e){return e[e.length-1]}function Et(e,r){for(var S=[],_=0;_<e.length;_++)S[_]=r(e[_],_);return S}function Le(e,r,S){for(var _=0,F=S(r);_<e.length&&S(e[_])<=F;)_++;e.splice(_,0,r)}function je(){}function st(e,r){var S;return Object.create?S=Object.create(e):(je.prototype=e,S=new je),r&&L(r,S),S}var he=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||he.test(e))}function oe(e,r){return r?r.source.indexOf("\\w")>-1&&ie(e)?!0:r.test(e):ie(e)}function ee(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var de=/[\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 we(e){return e.charCodeAt(0)>=768&&de.test(e)}function Be(e,r,S){for(;(S<0?r>0:r<e.length)&&we(e.charAt(r));)r+=S;return r}function nt(e,r,S){for(var _=r>S?-1:1;;){if(r==S)return r;var F=(r+S)/2,J=_<0?Math.ceil(F):Math.floor(F);if(J==r)return e(J)?r:S;e(J)?S=J:r=J+_}}function at(e,r,S,_){if(!e)return _(r,S,"ltr",0);for(var F=!1,J=0;J<e.length;++J){var ae=e[J];(ae.from<S&&ae.to>r||r==S&&ae.to==r)&&(_(Math.max(ae.from,r),Math.min(ae.to,S),ae.level==1?"rtl":"ltr",J),F=!0)}F||_(r,S,"ltr")}var At=null;function ft(e,r,S){var _;At=null;for(var F=0;F<e.length;++F){var J=e[F];if(J.from<r&&J.to>r)return F;J.to==r&&(J.from!=J.to&&S=="before"?_=F:At=F),J.from==r&&(J.from!=J.to&&S!="before"?_=F:At=F)}return _!=null?_:At}var xt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function S(ye){return ye<=247?e.charAt(ye):1424<=ye&&ye<=1524?"R":1536<=ye&&ye<=1785?r.charAt(ye-1536):1774<=ye&&ye<=2220?"r":8192<=ye&&ye<=8203?"w":ye==8204?"b":"L"}var _=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,J=/[LRr]/,ae=/[Lb1n]/,ce=/[1n]/;function fe(ye,Ve,Ye){this.level=ye,this.from=Ve,this.to=Ye}return function(ye,Ve){var Ye=Ve=="ltr"?"L":"R";if(ye.length==0||Ve=="ltr"&&!_.test(ye))return!1;for(var vt=ye.length,dt=[],Ut=0;Ut<vt;++Ut)dt.push(S(ye.charCodeAt(Ut)));for(var Nt=0,Kt=Ye;Nt<vt;++Nt){var zt=dt[Nt];zt=="m"?dt[Nt]=Kt:Kt=zt}for(var $t=0,Vt=Ye;$t<vt;++$t){var ir=dt[$t];ir=="1"&&Vt=="r"?dt[$t]="n":J.test(ir)&&(Vt=ir,ir=="r"&&(dt[$t]="R"))}for(var Cr=1,pr=dt[0];Cr<vt-1;++Cr){var kr=dt[Cr];kr=="+"&&pr=="1"&&dt[Cr+1]=="1"?dt[Cr]="1":kr==","&&pr==dt[Cr+1]&&(pr=="1"||pr=="n")&&(dt[Cr]=pr),pr=kr}for(var yn=0;yn<vt;++yn){var zn=dt[yn];if(zn==",")dt[yn]="N";else if(zn=="%"){var Bn=void 0;for(Bn=yn+1;Bn<vt&&dt[Bn]=="%";++Bn);for(var di=yn&&dt[yn-1]=="!"||Bn<vt&&dt[Bn]=="1"?"1":"N",qn=yn;qn<Bn;++qn)dt[qn]=di;yn=Bn-1}}for(var Mn=0,ei=Ye;Mn<vt;++Mn){var Yn=dt[Mn];ei=="L"&&Yn=="1"?dt[Mn]="L":J.test(Yn)&&(ei=Yn)}for(var Gt=0;Gt<vt;++Gt)if(F.test(dt[Gt])){var Cn=void 0;for(Cn=Gt+1;Cn<vt&&F.test(dt[Cn]);++Cn);for(var Tn=(Gt?dt[Gt-1]:Ye)=="L",Sn=(Cn<vt?dt[Cn]:Ye)=="L",Wa=Tn==Sn?Tn?"L":"R":Ye,Vr=Gt;Vr<Cn;++Vr)dt[Vr]=Wa;Gt=Cn-1}for(var jr=[],vi,Vn=0;Vn<vt;)if(ae.test(dt[Vn])){var Ga=Vn;for(++Vn;Vn<vt&&ae.test(dt[Vn]);++Vn);jr.push(new fe(0,Ga,Vn))}else{var Gi=Vn,Mi=jr.length,xa=Ve=="rtl"?1:0;for(++Vn;Vn<vt&&dt[Vn]!="L";++Vn);for(var ii=Gi;ii<Vn;)if(ce.test(dt[ii])){Gi<ii&&(jr.splice(Mi,0,new fe(1,Gi,ii)),Mi+=xa);var Ca=ii;for(++ii;ii<Vn&&ce.test(dt[ii]);++ii);jr.splice(Mi,0,new fe(2,Ca,ii)),Mi+=xa,Gi=ii}else++ii;Gi<Vn&&jr.splice(Mi,0,new fe(1,Gi,Vn))}return Ve=="ltr"&&(jr[0].level==1&&(vi=ye.match(/^\s+/))&&(jr[0].from=vi[0].length,jr.unshift(new fe(0,0,vi[0].length))),Je(jr).level==1&&(vi=ye.match(/\s+$/))&&(Je(jr).to-=vi[0].length,jr.push(new fe(0,vt-vi[0].length,vt)))),Ve=="rtl"?jr.reverse():jr}}();function It(e,r){var S=e.order;return S==null&&(S=e.order=xt(e.text,r)),S}var He=[],ke=function(e,r,S){if(e.addEventListener)e.addEventListener(r,S,!1);else if(e.attachEvent)e.attachEvent("on"+r,S);else{var _=e._handlers||(e._handlers={});_[r]=(_[r]||He).concat(S)}};function ct(e,r){return e._handlers&&e._handlers[r]||He}function gt(e,r,S){if(e.removeEventListener)e.removeEventListener(r,S,!1);else if(e.detachEvent)e.detachEvent("on"+r,S);else{var _=e._handlers,F=_&&_[r];if(F){var J=ne(F,S);J>-1&&(_[r]=F.slice(0,J).concat(F.slice(J+1)))}}}function Ze(e,r){var S=ct(e,r);if(!S.length)return;for(var _=Array.prototype.slice.call(arguments,2),F=0;F<S.length;++F)S[F].apply(null,_)}function ot(e,r,S){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,S||r.type,e,r),Ee(r)||r.codemirrorIgnore}function Ke(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var S=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),_=0;_<r.length;++_)ne(S,r[_])==-1&&S.push(r[_])}function Me(e,r){return ct(e,r).length>0}function Ue(e){e.prototype.on=function(r,S){ke(this,r,S)},e.prototype.off=function(r,S){gt(this,r,S)}}function ge(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){ge(e),xe(e)}function Fe(e){return e.target||e.srcElement}function $e(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),a&&e.ctrlKey&&r==1&&(r=3),r}var pt=function(){if(R&&b<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),Ot;function kt(e){if(Ot==null){var r=m("span","\u200B");d(e,m("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ot=r.offsetWidth<=1&&r.offsetHeight>2&&!(R&&b<8))}var S=Ot?m("span","\u200B"):m("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return S.setAttribute("cm-text",""),S}var Dt;function Bt(e){if(Dt!=null)return Dt;var r=d(e,document.createTextNode("A\u062EA")),S=y(r,0,1).getBoundingClientRect(),_=y(r,1,2).getBoundingClientRect();return n(e),!S||S.left==S.right?!1:Dt=_.right-S.right<3}var ht=`
b`.split(/\n/).length!=3?function(e){for(var r=0,S=[],_=e.length;r<=_;){var F=e.indexOf(`
`,r);F==-1&&(F=e.length);var J=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),ae=J.indexOf("\r");ae!=-1?(S.push(J.slice(0,ae)),r+=ae+1):(S.push(J),r=F+1)}return S}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(S){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},et=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Te=null;function Ne(e){if(Te!=null)return Te;var r=d(e,m("span","x")),S=r.getBoundingClientRect(),_=y(r,0,1).getBoundingClientRect();return Te=Math.abs(S.left-_.left)>1}var mt={},lt={};function Ct(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),mt[e]=r}function bt(e,r){lt[e]=r}function tt(e){if(typeof e=="string"&&lt.hasOwnProperty(e))e=lt[e];else if(e&&typeof e.name=="string"&&lt.hasOwnProperty(e.name)){var r=lt[e.name];typeof r=="string"&&(r={name:r}),e=st(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return tt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return tt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function St(e,r){r=tt(r);var S=mt[r.name];if(!S)return St(e,"text/plain");var _=S(e,r);if(Lt.hasOwnProperty(r.name)){var F=Lt[r.name];for(var J in F){if(!F.hasOwnProperty(J))continue;_.hasOwnProperty(J)&&(_["_"+J]=_[J]),_[J]=F[J]}}if(_.name=r.name,r.helperType&&(_.helperType=r.helperType),r.modeProps)for(var ae in r.modeProps)_[ae]=r.modeProps[ae];return _}var Lt={};function Tt(e,r){var S=Lt.hasOwnProperty(e)?Lt[e]:Lt[e]={};L(r,S)}function Ht(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var S={};for(var _ in r){var F=r[_];F instanceof Array&&(F=F.concat([])),S[_]=F}return S}function gr(e,r){for(var S;e.innerMode&&!(S=e.innerMode(r),!S||S.mode==e);)r=S.state,e=S.mode;return S||{mode:e,state:r}}function Or(e,r,S){return e.startState?e.startState(r,S):!0}var vr=function(e,r,S){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=S};vr.prototype.eol=function(){return this.pos>=this.string.length},vr.prototype.sol=function(){return this.pos==this.lineStart},vr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},vr.prototype.eat=function(e){var r=this.string.charAt(this.pos),S;if(typeof e=="string"?S=r==e:S=r&&(e.test?e.test(r):e(r)),S)return++this.pos,r},vr.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},vr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},vr.prototype.skipToEnd=function(){this.pos=this.string.length},vr.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},vr.prototype.backUp=function(e){this.pos-=e},vr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$(this.string,this.lineStart,this.tabSize):0)},vr.prototype.indentation=function(){return $(this.string,null,this.tabSize)-(this.lineStart?$(this.string,this.lineStart,this.tabSize):0)},vr.prototype.match=function(e,r,S){if(typeof e=="string"){var _=function(ae){return S?ae.toLowerCase():ae},F=this.string.substr(this.pos,e.length);if(_(F)==_(e))return r!==!1&&(this.pos+=e.length),!0}else{var J=this.string.slice(this.pos).match(e);return J&&J.index>0?null:(J&&r!==!1&&(this.pos+=J[0].length),J)}},vr.prototype.current=function(){return this.string.slice(this.start,this.pos)},vr.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},vr.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},vr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function jt(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var S=e;!S.lines;)for(var _=0;;++_){var F=S.children[_],J=F.chunkSize();if(r<J){S=F;break}r-=J}return S.lines[r]}function Mr(e,r,S){var _=[],F=r.line;return e.iter(r.line,S.line+1,function(J){var ae=J.text;F==S.line&&(ae=ae.slice(0,S.ch)),F==r.line&&(ae=ae.slice(r.ch)),_.push(ae),++F}),_}function br(e,r,S){var _=[];return e.iter(r,S,function(F){_.push(F.text)}),_}function Tr(e,r){var S=r-e.height;if(S)for(var _=e;_;_=_.parent)_.height+=S}function Ar(e){if(e.parent==null)return null;for(var r=e.parent,S=ne(r.lines,e),_=r.parent;_;r=_,_=_.parent)for(var F=0;!(_.children[F]==r);++F)S+=_.children[F].chunkSize();return S+r.first}function Sr(e,r){var S=e.first;e:do{for(var _=0;_<e.children.length;++_){var F=e.children[_],J=F.height;if(r<J){e=F;continue e}r-=J,S+=F.chunkSize()}return S}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var ce=e.lines[ae],fe=ce.height;if(r<fe)break;r-=fe}return S+ae}function tn(e,r){return r>=e.first&&r<e.first+e.size}function Zr(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function me(e,r,S){if(S===void 0&&(S=null),!(this instanceof me))return new me(e,r,S);this.line=e,this.ch=r,this.sticky=S}function be(e,r){return e.line-r.line||e.ch-r.ch}function Pe(e,r){return e.sticky==r.sticky&&be(e,r)==0}function rt(e){return me(e.line,e.ch)}function qe(e,r){return be(e,r)<0?r:e}function Ft(e,r){return be(e,r)<0?e:r}function te(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function P(e,r){if(r.line<e.first)return me(e.first,0);var S=e.first+e.size-1;return r.line>S?me(S,jt(e,S).text.length):j(r,jt(e,r.line).text.length)}function j(e,r){var S=e.ch;return S==null||S>r?me(e.line,r):S<0?me(e.line,0):e}function q(e,r){for(var S=[],_=0;_<r.length;_++)S[_]=P(e,r[_]);return S}var Ae=function(e,r){this.state=e,this.lookAhead=r},re=function(e,r,S,_){this.state=r,this.doc=e,this.line=S,this.maxLookAhead=_||0,this.baseTokens=null,this.baseTokenPos=1};re.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},re.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},re.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},re.fromSaved=function(e,r,S){return r instanceof Ae?new re(e,Ht(e.mode,r.state),S,r.lookAhead):new re(e,Ht(e.mode,r),S)},re.prototype.save=function(e){var r=e!==!1?Ht(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ae(r,this.maxLookAhead):r};function We(e,r,S,_){var F=[e.state.modeGen],J={};Dr(e,r.text,e.doc.mode,S,function(ye,Ve){return F.push(ye,Ve)},J,_);for(var ae=S.state,ce=function(ye){S.baseTokens=F;var Ve=e.state.overlays[ye],Ye=1,vt=0;S.state=!0,Dr(e,r.text,Ve.mode,S,function(dt,Ut){for(var Nt=Ye;vt<dt;){var Kt=F[Ye];Kt>dt&&F.splice(Ye,1,dt,F[Ye+1],Kt),Ye+=2,vt=Math.min(dt,Kt)}if(!Ut)return;if(Ve.opaque)F.splice(Nt,Ye-Nt,dt,"overlay "+Ut),Ye=Nt+2;else for(;Nt<Ye;Nt+=2){var zt=F[Nt+1];F[Nt+1]=(zt?zt+" ":"")+"overlay "+Ut}},J),S.state=ae,S.baseTokens=null,S.baseTokenPos=1},fe=0;fe<e.state.overlays.length;++fe)ce(fe);return{styles:F,classes:J.bgClass||J.textClass?J:null}}function _t(e,r,S){if(!r.styles||r.styles[0]!=e.state.modeGen){var _=Pt(e,Ar(r)),F=r.text.length>e.options.maxHighlightLength&&Ht(e.doc.mode,_.state),J=We(e,r,_);F&&(_.state=F),r.stateAfter=_.save(!F),r.styles=J.styles,J.classes?r.styleClasses=J.classes:r.styleClasses&&(r.styleClasses=null),S===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Pt(e,r,S){var _=e.doc,F=e.display;if(!_.mode.startState)return new re(_,!0,r);var J=wr(e,r,S),ae=J>_.first&&jt(_,J-1).stateAfter,ce=ae?re.fromSaved(_,ae,J):new re(_,Or(_.mode),J);return _.iter(J,r,function(fe){Qt(e,fe.text,ce);var ye=ce.line;fe.stateAfter=ye==r-1||ye%5==0||ye>=F.viewFrom&&ye<F.viewTo?ce.save():null,ce.nextLine()}),S&&(_.modeFrontier=ce.line),ce}function Qt(e,r,S,_){var F=e.doc.mode,J=new vr(r,e.options.tabSize,S);for(J.start=J.pos=_||0,r==""&&wt(F,S.state);!J.eol();)Yt(F,J,S.state),J.start=J.pos}function wt(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var S=gr(e,r);if(S.mode.blankLine)return S.mode.blankLine(S.state)}function Yt(e,r,S,_){for(var F=0;F<10;F++){_&&(_[0]=gr(e,S).mode);var J=e.token(r,S);if(r.pos>r.start)return J}throw new Error("Mode "+e.name+" failed to advance stream.")}var Xt=function(e,r,S){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=S};function qt(e,r,S,_){var F=e.doc,J=F.mode,ae;r=P(F,r);var ce=jt(F,r.line),fe=Pt(e,r.line,S),ye=new vr(ce.text,e.options.tabSize,fe),Ve;for(_&&(Ve=[]);(_||ye.pos<r.ch)&&!ye.eol();)ye.start=ye.pos,ae=Yt(J,ye,fe.state),_&&Ve.push(new Xt(ye,ae,Ht(F.mode,fe.state)));return _?Ve:new Xt(ye,ae,fe.state)}function cr(e,r){if(e)for(;;){var S=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!S)break;e=e.slice(0,S.index)+e.slice(S.index+S[0].length);var _=S[1]?"bgClass":"textClass";r[_]==null?r[_]=S[2]:new RegExp("(?:^|\\s)"+S[2]+"(?:$|\\s)").test(r[_])||(r[_]+=" "+S[2])}return e}function Dr(e,r,S,_,F,J,ae){var ce=S.flattenSpans;ce==null&&(ce=e.options.flattenSpans);var fe=0,ye=null,Ve=new vr(r,e.options.tabSize,_),Ye,vt=e.options.addModeClass&&[null];for(r==""&&cr(wt(S,_.state),J);!Ve.eol();){if(Ve.pos>e.options.maxHighlightLength?(ce=!1,ae&&Qt(e,r,_,Ve.pos),Ve.pos=r.length,Ye=null):Ye=cr(Yt(S,Ve,_.state,vt),J),vt){var dt=vt[0].name;dt&&(Ye="m-"+(Ye?dt+" "+Ye:dt))}if(!ce||ye!=Ye){for(;fe<Ve.start;)fe=Math.min(Ve.start,fe+5e3),F(fe,ye);ye=Ye}Ve.start=Ve.pos}for(;fe<Ve.pos;){var Ut=Math.min(Ve.pos,fe+5e3);F(Ut,ye),fe=Ut}}function wr(e,r,S){for(var _,F,J=e.doc,ae=S?-1:r-(e.doc.mode.innerMode?1e3:100),ce=r;ce>ae;--ce){if(ce<=J.first)return J.first;var fe=jt(J,ce-1),ye=fe.stateAfter;if(ye&&(!S||ce+(ye instanceof Ae?ye.lookAhead:0)<=J.modeFrontier))return ce;var Ve=$(fe.text,null,e.options.tabSize);(F==null||_>Ve)&&(F=ce-1,_=Ve)}return F}function Fr(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var S=e.first,_=r-1;_>S;_--){var F=jt(e,_).stateAfter;if(F&&(!(F instanceof Ae)||_+F.lookAhead<r)){S=_+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,S)}var hr=!1,Ur=!1;function Nr(){hr=!0}function cn(){Ur=!0}function Gr(e,r,S){this.marker=e,this.from=r,this.to=S}function Jr(e,r){if(e)for(var S=0;S<e.length;++S){var _=e[S];if(_.marker==r)return _}}function bn(e,r){for(var S,_=0;_<e.length;++_)e[_]!=r&&(S||(S=[])).push(e[_]);return S}function qr(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function rn(e,r,S){var _;if(e)for(var F=0;F<e.length;++F){var J=e[F],ae=J.marker,ce=J.from==null||(ae.inclusiveLeft?J.from<=r:J.from<r);if(ce||J.from==r&&ae.type=="bookmark"&&(!S||!J.marker.insertLeft)){var fe=J.to==null||(ae.inclusiveRight?J.to>=r:J.to>r);(_||(_=[])).push(new Gr(ae,J.from,fe?null:J.to))}}return _}function sn(e,r,S){var _;if(e)for(var F=0;F<e.length;++F){var J=e[F],ae=J.marker,ce=J.to==null||(ae.inclusiveRight?J.to>=r:J.to>r);if(ce||J.from==r&&ae.type=="bookmark"&&(!S||J.marker.insertLeft)){var fe=J.from==null||(ae.inclusiveLeft?J.from<=r:J.from<r);(_||(_=[])).push(new Gr(ae,fe?null:J.from-r,J.to==null?null:J.to-r))}}return _}function hn(e,r){if(r.full)return null;var S=tn(e,r.from.line)&&jt(e,r.from.line).markedSpans,_=tn(e,r.to.line)&&jt(e,r.to.line).markedSpans;if(!S&&!_)return null;var F=r.from.ch,J=r.to.ch,ae=be(r.from,r.to)==0,ce=rn(S,F,ae),fe=sn(_,J,ae),ye=r.text.length==1,Ve=Je(r.text).length+(ye?F:0);if(ce)for(var Ye=0;Ye<ce.length;++Ye){var vt=ce[Ye];if(vt.to==null){var dt=Jr(fe,vt.marker);dt?ye&&(vt.to=dt.to==null?null:dt.to+Ve):vt.to=F}}if(fe)for(var Ut=0;Ut<fe.length;++Ut){var Nt=fe[Ut];if(Nt.to!=null&&(Nt.to+=Ve),Nt.from==null){var Kt=Jr(ce,Nt.marker);Kt||(Nt.from=Ve,ye&&(ce||(ce=[])).push(Nt))}else Nt.from+=Ve,ye&&(ce||(ce=[])).push(Nt)}ce&&(ce=mn(ce)),fe&&fe!=ce&&(fe=mn(fe));var zt=[ce];if(!ye){var $t=r.text.length-2,Vt;if($t>0&&ce)for(var ir=0;ir<ce.length;++ir)ce[ir].to==null&&(Vt||(Vt=[])).push(new Gr(ce[ir].marker,null,null));for(var Cr=0;Cr<$t;++Cr)zt.push(Vt);zt.push(fe)}return zt}function mn(e){for(var r=0;r<e.length;++r){var S=e[r];S.from!=null&&S.from==S.to&&S.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function _r(e,r,S){var _=null;if(e.iter(r.line,S.line+1,function(dt){if(dt.markedSpans)for(var Ut=0;Ut<dt.markedSpans.length;++Ut){var Nt=dt.markedSpans[Ut].marker;Nt.readOnly&&(!_||ne(_,Nt)==-1)&&(_||(_=[])).push(Nt)}}),!_)return null;for(var F=[{from:r,to:S}],J=0;J<_.length;++J)for(var ae=_[J],ce=ae.find(0),fe=0;fe<F.length;++fe){var ye=F[fe];if(be(ye.to,ce.from)<0||be(ye.from,ce.to)>0)continue;var Ve=[fe,1],Ye=be(ye.from,ce.from),vt=be(ye.to,ce.to);(Ye<0||!ae.inclusiveLeft&&!Ye)&&Ve.push({from:ye.from,to:ce.from}),(vt>0||!ae.inclusiveRight&&!vt)&&Ve.push({from:ce.to,to:ye.to}),F.splice.apply(F,Ve),fe+=Ve.length-3}return F}function dr(e){var r=e.markedSpans;if(!r)return;for(var S=0;S<r.length;++S)r[S].marker.detachLine(e);e.markedSpans=null}function tr(e,r){if(!r)return;for(var S=0;S<r.length;++S)r[S].marker.attachLine(e);e.markedSpans=r}function nr(e){return e.inclusiveLeft?-1:0}function Zt(e){return e.inclusiveRight?1:0}function Er(e,r){var S=e.lines.length-r.lines.length;if(S!=0)return S;var _=e.find(),F=r.find(),J=be(_.from,F.from)||nr(e)-nr(r);if(J)return-J;var ae=be(_.to,F.to)||Zt(e)-Zt(r);return ae||r.id-e.id}function mr(e,r){var S=Ur&&e.markedSpans,_;if(S)for(var F=void 0,J=0;J<S.length;++J)F=S[J],F.marker.collapsed&&(r?F.from:F.to)==null&&(!_||Er(_,F.marker)<0)&&(_=F.marker);return _}function Ir(e){return mr(e,!0)}function xr(e){return mr(e,!1)}function On(e,r){var S=Ur&&e.markedSpans,_;if(S)for(var F=0;F<S.length;++F){var J=S[F];J.marker.collapsed&&(J.from==null||J.from<r)&&(J.to==null||J.to>r)&&(!_||Er(_,J.marker)<0)&&(_=J.marker)}return _}function zr(e,r,S,_,F){var J=jt(e,r),ae=Ur&&J.markedSpans;if(ae)for(var ce=0;ce<ae.length;++ce){var fe=ae[ce];if(!fe.marker.collapsed)continue;var ye=fe.marker.find(0),Ve=be(ye.from,S)||nr(fe.marker)-nr(F),Ye=be(ye.to,_)||Zt(fe.marker)-Zt(F);if(Ve>=0&&Ye<=0||Ve<=0&&Ye>=0)continue;if(Ve<=0&&(fe.marker.inclusiveRight&&F.inclusiveLeft?be(ye.to,S)>=0:be(ye.to,S)>0)||Ve>=0&&(fe.marker.inclusiveRight&&F.inclusiveLeft?be(ye.from,_)<=0:be(ye.from,_)<0))return!0}}function En(e){for(var r;r=Ir(e);)e=r.find(-1,!0).line;return e}function Qn(e){for(var r;r=xr(e);)e=r.find(1,!0).line;return e}function _n(e){for(var r,S;r=xr(e);)e=r.find(1,!0).line,(S||(S=[])).push(e);return S}function en(e,r){var S=jt(e,r),_=En(S);return S==_?r:Ar(_)}function Ln(e,r){if(r>e.lastLine())return r;var S=jt(e,r),_;if(!In(e,S))return r;for(;_=xr(S);)S=_.find(1,!0).line;return Ar(S)+1}function In(e,r){var S=Ur&&r.markedSpans;if(S)for(var _=void 0,F=0;F<S.length;++F){if(_=S[F],!_.marker.collapsed)continue;if(_.from==null)return!0;if(_.marker.widgetNode)continue;if(_.from==0&&_.marker.inclusiveLeft&&Jn(e,r,_))return!0}}function Jn(e,r,S){if(S.to==null){var _=S.marker.find(1,!0);return Jn(e,_.line,Jr(_.line.markedSpans,S.marker))}if(S.marker.inclusiveRight&&S.to==r.text.length)return!0;for(var F=void 0,J=0;J<r.markedSpans.length;++J)if(F=r.markedSpans[J],F.marker.collapsed&&!F.marker.widgetNode&&F.from==S.to&&(F.to==null||F.to!=S.from)&&(F.marker.inclusiveLeft||S.marker.inclusiveRight)&&Jn(e,r,F))return!0}function Fn(e){e=En(e);for(var r=0,S=e.parent,_=0;_<S.lines.length;++_){var F=S.lines[_];if(F==e)break;r+=F.height}for(var J=S.parent;J;S=J,J=S.parent)for(var ae=0;ae<J.children.length;++ae){var ce=J.children[ae];if(ce==S)break;r+=ce.height}return r}function si(e){if(e.height==0)return 0;for(var r=e.text.length,S,_=e;S=Ir(_);){var F=S.find(0,!0);_=F.from.line,r+=F.from.ch-F.to.ch}for(_=e;S=xr(_);){var J=S.find(0,!0);r-=_.text.length-J.from.ch,_=J.to.line,r+=_.text.length-J.to.ch}return r}function Un(e){var r=e.display,S=e.doc;r.maxLine=jt(S,S.first),r.maxLineLength=si(r.maxLine),r.maxLineChanged=!0,S.iter(function(_){var F=si(_);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=_)})}var gn=function(e,r,S){this.text=e,tr(this,r),this.height=S?S(this):1};gn.prototype.lineNo=function(){return Ar(this)},Ue(gn);function Pn(e,r,S,_){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dr(e),tr(e,S);var F=_?_(e):1;F!=e.height&&Tr(e,F)}function er(e){e.parent=null,dr(e)}var fr={},Jt={};function yr(e,r){if(!e||/^\s*$/.test(e))return null;var S=r.addModeClass?Jt:fr;return S[e]||(S[e]=e.replace(/\S+/g,"cm-$&"))}function Rr(e,r){var S=C("span",null,null,t?"padding-right: .1px":null),_={pre:C("pre",[S],"CodeMirror-line"),content:S,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var J=F?r.rest[F-1]:r.line,ae=void 0;_.pos=0,_.addToken=Br,Bt(e.display.measure)&&(ae=It(J,e.doc.direction))&&(_.addToken=Dn(_.addToken,ae)),_.map=[];var ce=r!=e.display.externalMeasured&&Ar(J);li(J,_,_t(e,J,ce)),J.styleClasses&&(J.styleClasses.bgClass&&(_.bgClass=I(J.styleClasses.bgClass,_.bgClass||"")),J.styleClasses.textClass&&(_.textClass=I(J.styleClasses.textClass,_.textClass||""))),_.map.length==0&&_.map.push(0,0,_.content.appendChild(kt(e.display.measure))),F==0?(r.measure.map=_.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(_.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(t){var fe=_.content.lastChild;(/\bcm-tab\b/.test(fe.className)||fe.querySelector&&fe.querySelector(".cm-tab"))&&(_.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,r.line,_.pre),_.pre.className&&(_.textClass=I(_.pre.className,_.textClass||"")),_}function Xr(e){var r=m("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Br(e,r,S,_,F,J,ae){if(!r)return;var ce=e.splitSpaces?ln(r,e.trailingSpace):r,fe=e.cm.state.specialChars,ye=!1,Ve;if(!fe.test(r))e.col+=r.length,Ve=document.createTextNode(ce),e.map.push(e.pos,e.pos+r.length,Ve),R&&b<9&&(ye=!0),e.pos+=r.length;else{Ve=document.createDocumentFragment();for(var Ye=0;;){fe.lastIndex=Ye;var vt=fe.exec(r),dt=vt?vt.index-Ye:r.length-Ye;if(dt){var Ut=document.createTextNode(ce.slice(Ye,Ye+dt));R&&b<9?Ve.appendChild(m("span",[Ut])):Ve.appendChild(Ut),e.map.push(e.pos,e.pos+dt,Ut),e.col+=dt,e.pos+=dt}if(!vt)break;Ye+=dt+1;var Nt=void 0;if(vt[0]==" "){var Kt=e.cm.options.tabSize,zt=Kt-e.col%Kt;Nt=Ve.appendChild(m("span",Ie(zt),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),e.col+=zt}else vt[0]=="\r"||vt[0]==`
`?(Nt=Ve.appendChild(m("span",vt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",vt[0]),e.col+=1):(Nt=e.cm.options.specialCharPlaceholder(vt[0]),Nt.setAttribute("cm-text",vt[0]),R&&b<9?Ve.appendChild(m("span",[Nt])):Ve.appendChild(Nt),e.col+=1);e.map.push(e.pos,e.pos+1,Nt),e.pos++}}if(e.trailingSpace=ce.charCodeAt(r.length-1)==32,S||_||F||ye||J||ae){var $t=S||"";_&&($t+=_),F&&($t+=F);var Vt=m("span",[Ve],$t,J);if(ae)for(var ir in ae)ae.hasOwnProperty(ir)&&ir!="style"&&ir!="class"&&Vt.setAttribute(ir,ae[ir]);return e.content.appendChild(Vt)}e.content.appendChild(Ve)}function ln(e,r){if(e.length>1&&!/ /.test(e))return e;for(var S=r,_="",F=0;F<e.length;F++){var J=e.charAt(F);J==" "&&S&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(J="\xA0"),_+=J,S=J==" "}return _}function Dn(e,r){return function(S,_,F,J,ae,ce,fe){F=F?F+" cm-force-border":"cm-force-border";for(var ye=S.pos,Ve=ye+_.length;;){for(var Ye=void 0,vt=0;vt<r.length&&!(Ye=r[vt],Ye.to>ye&&Ye.from<=ye);vt++);if(Ye.to>=Ve)return e(S,_,F,J,ae,ce,fe);e(S,_.slice(0,Ye.to-ye),F,J,null,ce,fe),J=null,_=_.slice(Ye.to-ye),ye=Ye.to}}}function Pr(e,r,S,_){var F=!_&&S.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!_&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",S.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function li(e,r,S){var _=e.markedSpans,F=e.text,J=0;if(!_){for(var ae=1;ae<S.length;ae+=2)r.addToken(r,F.slice(J,J=S[ae]),yr(S[ae+1],r.cm.options));return}for(var ce=F.length,fe=0,ye=1,Ve="",Ye,vt,dt=0,Ut,Nt,Kt,zt,$t;;){if(dt==fe){Ut=Nt=Kt=vt="",$t=null,zt=null,dt=Infinity;for(var Vt=[],ir=void 0,Cr=0;Cr<_.length;++Cr){var pr=_[Cr],kr=pr.marker;if(kr.type=="bookmark"&&pr.from==fe&&kr.widgetNode)Vt.push(kr);else if(pr.from<=fe&&(pr.to==null||pr.to>fe||kr.collapsed&&pr.to==fe&&pr.from==fe)){if(pr.to!=null&&pr.to!=fe&&dt>pr.to&&(dt=pr.to,Nt=""),kr.className&&(Ut+=" "+kr.className),kr.css&&(vt=(vt?vt+";":"")+kr.css),kr.startStyle&&pr.from==fe&&(Kt+=" "+kr.startStyle),kr.endStyle&&pr.to==dt&&(ir||(ir=[])).push(kr.endStyle,pr.to),kr.title&&(($t||($t={})).title=kr.title),kr.attributes)for(var yn in kr.attributes)($t||($t={}))[yn]=kr.attributes[yn];kr.collapsed&&(!zt||Er(zt.marker,kr)<0)&&(zt=pr)}else pr.from>fe&&dt>pr.from&&(dt=pr.from)}if(ir)for(var zn=0;zn<ir.length;zn+=2)ir[zn+1]==dt&&(Nt+=" "+ir[zn]);if(!zt||zt.from==fe)for(var Bn=0;Bn<Vt.length;++Bn)Pr(r,0,Vt[Bn]);if(zt&&(zt.from||0)==fe){if(Pr(r,(zt.to==null?ce+1:zt.to)-fe,zt.marker,zt.from==null),zt.to==null)return;zt.to==fe&&(zt=!1)}}if(fe>=ce)break;for(var di=Math.min(ce,dt);;){if(Ve){var qn=fe+Ve.length;if(!zt){var Mn=qn>di?Ve.slice(0,di-fe):Ve;r.addToken(r,Mn,Ye?Ye+Ut:Ut,Kt,fe+Mn.length==dt?Nt:"",vt,$t)}if(qn>=di){Ve=Ve.slice(di-fe),fe=di;break}fe=qn,Kt=""}Ve=F.slice(J,J=S[ye++]),Ye=yr(S[ye++],r.cm.options)}}}function Hr(e,r,S){this.line=r,this.rest=_n(r),this.size=this.rest?Ar(Je(this.rest))-S+1:1,this.node=this.text=null,this.hidden=In(e,r)}function jn(e,r,S){for(var _=[],F,J=r;J<S;J=F){var ae=new Hr(e.doc,jt(e.doc,J),J);F=J+ae.size,_.push(ae)}return _}var Kn=null;function ui(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function hs(e){var r=e.delayedCallbacks,S=0;do{for(;S<r.length;S++)r[S].call(null);for(var _=0;_<e.ops.length;_++){var F=e.ops[_];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(S<r.length)}function $r(e,r){var S=e.ownsGroup;if(!S)return;try{hs(S)}finally{Kn=null,r(S)}}var Qr=null;function Yr(e,r){var S=ct(e,r);if(!S.length)return;var _=Array.prototype.slice.call(arguments,2),F;Kn?F=Kn.delayedCallbacks:Qr?F=Qr:(F=Qr=[],setTimeout(Ai,0));for(var J=function(ce){F.push(function(){return S[ce].apply(null,_)})},ae=0;ae<S.length;++ae)J(ae)}function Ai(){var e=Qr;Qr=null;for(var r=0;r<e.length;++r)e[r]()}function zi(e,r,S,_){for(var F=0;F<r.changes.length;F++){var J=r.changes[F];J=="text"?ds(e,r):J=="gutter"?Lo(e,r,S,_):J=="class"?fs(e,r):J=="widget"&&nl(e,r,_)}r.changes=null}function Vi(e){return e.node==e.text&&(e.node=m("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),R&&b<8&&(e.node.style.zIndex=2)),e.node}function Ja(e,r){var S=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(S&&(S+=" CodeMirror-linebackground"),r.background)S?r.background.className=S:(r.background.parentNode.removeChild(r.background),r.background=null);else if(S){var _=Vi(r);r.background=_.insertBefore(m("div",null,S),_.firstChild),e.display.input.setUneditable(r.background)}}function Ro(e,r){var S=e.display.externalMeasured;return S&&S.line==r.line?(e.display.externalMeasured=null,r.measure=S.measure,S.built):Rr(e,r)}function ds(e,r){var S=r.text.className,_=Ro(e,r);r.text==r.node&&(r.node=_.pre),r.text.parentNode.replaceChild(_.pre,r.text),r.text=_.pre,_.bgClass!=r.bgClass||_.textClass!=r.textClass?(r.bgClass=_.bgClass,r.textClass=_.textClass,fs(e,r)):S&&(r.text.className=S)}function fs(e,r){Ja(e,r),r.line.wrapClass?Vi(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var S=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=S||""}function Lo(e,r,S,_){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var F=Vi(r);r.gutterBackground=m("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?_.fixedPos:-_.gutterTotalWidth)+"px; width: "+_.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var J=r.line.gutterMarkers;if(e.options.lineNumbers||J){var ae=Vi(r),ce=r.gutter=m("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?_.fixedPos:-_.gutterTotalWidth)+"px");if(e.display.input.setUneditable(ce),ae.insertBefore(ce,r.text),r.line.gutterClass&&(ce.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!J||!J["CodeMirror-linenumbers"])&&(r.lineNumber=ce.appendChild(m("div",Zr(e.options,S),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+_.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),J)for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ye=e.display.gutterSpecs[fe].className,Ve=J.hasOwnProperty(ye)&&J[ye];Ve&&ce.appendChild(m("div",[Ve],"CodeMirror-gutter-elt","left: "+_.gutterLeft[ye]+"px; width: "+_.gutterWidth[ye]+"px"))}}}function nl(e,r,S){r.alignable&&(r.alignable=null);for(var _=w("CodeMirror-linewidget"),F=r.node.firstChild,J=void 0;F;F=J)J=F.nextSibling,_.test(F.className)&&r.node.removeChild(F);Ba(e,r,S)}function il(e,r,S,_){var F=Ro(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),fs(e,r),Lo(e,r,S,_),Ba(e,r,_),r.node}function Ba(e,r,S){if(ua(e,r.line,r,S,!0),r.rest)for(var _=0;_<r.rest.length;_++)ua(e,r.rest[_],r,S,!1)}function ua(e,r,S,_,F){if(!r.widgets)return;for(var J=Vi(S),ae=0,ce=r.widgets;ae<ce.length;++ae){var fe=ce[ae],ye=m("div",[fe.node],"CodeMirror-linewidget"+(fe.className?" "+fe.className:""));fe.handleMouseEvents||ye.setAttribute("cm-ignore-events","true"),vn(fe,ye,S,_),e.display.input.setUneditable(ye),F&&fe.above?J.insertBefore(ye,S.gutter||S.text):J.appendChild(ye),Yr(fe,"redraw")}}function vn(e,r,S,_){if(e.noHScroll){(S.alignable||(S.alignable=[])).push(r);var F=_.wrapperWidth;r.style.left=_.fixedPos+"px",e.coverGutter||(F-=_.gutterTotalWidth,r.style.paddingLeft=_.gutterTotalWidth+"px"),r.style.width=F+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-_.gutterTotalWidth+"px"))}function $a(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!g(document.body,e.node)){var S="position: relative;";e.coverGutter&&(S+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(S+="width: "+r.display.wrapper.clientWidth+"px;"),d(r.display.measure,m("div",[e.node],null,S))}return e.height=e.node.parentNode.offsetHeight}function xi(e,r){for(var S=Fe(r);S!=e.wrapper;S=S.parentNode)if(!S||S.nodeType==1&&S.getAttribute("cm-ignore-events")=="true"||S.parentNode==e.sizer&&S!=e.mover)return!0}function Za(e){return e.lineSpace.offsetTop}function Xi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ci(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=d(e.measure,m("pre","x","CodeMirror-line-like")),S=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,_={left:parseInt(S.paddingLeft),right:parseInt(S.paddingRight)};return!isNaN(_.left)&&!isNaN(_.right)&&(e.cachedPaddingH=_),_}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,r,S){var _=e.options.lineWrapping,F=_&&ci(e);if(!r.measure.heights||_&&r.measure.width!=F){var J=r.measure.heights=[];if(_){r.measure.width=F;for(var ae=r.text.firstChild.getClientRects(),ce=0;ce<ae.length-1;ce++){var fe=ae[ce],ye=ae[ce+1];Math.abs(fe.bottom-ye.bottom)>2&&J.push((fe.bottom+ye.top)/2-S.top)}}J.push(S.bottom-S.top)}}function Xn(e,r,S){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var _=0;_<e.rest.length;_++)if(e.rest[_]==r)return{map:e.measure.maps[_],cache:e.measure.caches[_]};for(var F=0;F<e.rest.length;F++)if(Ar(e.rest[F])>S)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function ps(e,r){r=En(r);var S=Ar(r),_=e.display.externalMeasured=new Hr(e.doc,r,S);_.lineN=S;var F=_.built=Rr(e,_);return _.text=F.pre,d(e.display.lineMeasure,F.pre),_}function Ui(e,r,S,_){return Ti(e,on(e,r),S,_)}function Aa(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Ji(e,r)];var S=e.display.externalMeasured;if(S&&r>=S.lineN&&r<S.lineN+S.size)return S}function on(e,r){var S=Ar(r),_=Aa(e,S);_&&!_.text?_=null:_&&_.changes&&(zi(e,_,S,bs(e)),e.curOp.forceUpdate=!0),_||(_=ps(e,r));var F=Xn(_,r,S);return{line:r,view:_,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function Ti(e,r,S,_,F){r.before&&(S=-1);var J=S+(_||""),ae;return r.cache.hasOwnProperty(J)?ae=r.cache[J]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(al(e,r.view,r.rect),r.hasHeights=!0),ae=Do(e,r,S,_),ae.bogus||(r.cache[J]=ae)),{left:ae.left,right:ae.right,top:F?ae.rtop:ae.top,bottom:F?ae.rbottom:ae.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,r,S){for(var _,F,J,ae,ce,fe,ye=0;ye<e.length;ye+=3)if(ce=e[ye],fe=e[ye+1],r<ce?(F=0,J=1,ae="left"):r<fe?(F=r-ce,J=F+1):(ye==e.length-3||r==fe&&e[ye+3]>r)&&(J=fe-ce,F=J-1,r>=fe&&(ae="right")),F!=null){if(_=e[ye+2],ce==fe&&S==(_.insertLeft?"left":"right")&&(ae=S),S=="left"&&F==0)for(;ye&&e[ye-2]==e[ye-3]&&e[ye-1].insertLeft;)_=e[(ye-=3)+2],ae="left";if(S=="right"&&F==fe-ce)for(;ye<e.length-3&&e[ye+3]==e[ye+4]&&!e[ye+5].insertLeft;)_=e[(ye+=3)+2],ae="right";break}return{node:_,start:F,end:J,collapse:ae,coverStart:ce,coverEnd:fe}}function ol(e,r){var S=ms;if(r=="left")for(var _=0;_<e.length&&!((S=e[_]).left!=S.right);_++);else for(var F=e.length-1;F>=0&&!((S=e[F]).left!=S.right);F--);return S}function Do(e,r,S,_){var F=gs(r.map,S,_),J=F.node,ae=F.start,ce=F.end,fe=F.collapse,ye;if(J.nodeType==3){for(var Ve=0;Ve<4;Ve++){for(;ae&&we(r.line.text.charAt(F.coverStart+ae));)--ae;for(;F.coverStart+ce<F.coverEnd&&we(r.line.text.charAt(F.coverStart+ce));)++ce;if(R&&b<9&&ae==0&&ce==F.coverEnd-F.coverStart?ye=J.parentNode.getBoundingClientRect():ye=ol(y(J,ae,ce).getClientRects(),_),ye.left||ye.right||ae==0)break;ce=ae,ae=ae-1,fe="right"}R&&b<11&&(ye=sl(e.display.measure,ye))}else{ae>0&&(fe=_="right");var Ye;e.options.lineWrapping&&(Ye=J.getClientRects()).length>1?ye=Ye[_=="right"?Ye.length-1:0]:ye=J.getBoundingClientRect()}if(R&&b<9&&!ae&&(!ye||!ye.left&&!ye.right)){var vt=J.parentNode.getClientRects()[0];vt?ye={left:vt.left,right:vt.left+Ia(e.display),top:vt.top,bottom:vt.bottom}:ye=ms}for(var dt=ye.top-r.rect.top,Ut=ye.bottom-r.rect.top,Nt=(dt+Ut)/2,Kt=r.view.measure.heights,zt=0;zt<Kt.length-1&&!(Nt<Kt[zt]);zt++);var $t=zt?Kt[zt-1]:0,Vt=Kt[zt],ir={left:(fe=="right"?ye.right:ye.left)-r.rect.left,right:(fe=="left"?ye.left:ye.right)-r.rect.left,top:$t,bottom:Vt};return!ye.left&&!ye.right&&(ir.bogus=!0),e.options.singleCursorHeightPerLine||(ir.rtop=dt,ir.rbottom=Ut),ir}function sl(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ne(e))return r;var S=screen.logicalXDPI/screen.deviceXDPI,_=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*S,right:r.right*S,top:r.top*_,bottom:r.bottom*_}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function fi(e){e.display.externalMeasure=null,n(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)vs(e.display.view[r])}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 Pi(){return i&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return i&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ri(e){var r=0;if(e.widgets)for(var S=0;S<e.widgets.length;++S)e.widgets[S].above&&(r+=$a(e.widgets[S]));return r}function qa(e,r,S,_,F){if(!F){var J=Ri(r);S.top+=J,S.bottom+=J}if(_=="line")return S;_||(_="local");var ae=Fn(r);if(_=="local"?ae+=Za(e.display):ae-=e.display.viewOffset,_=="page"||_=="window"){var ce=e.display.lineSpace.getBoundingClientRect();ae+=ce.top+(_=="window"?0:Wn());var fe=ce.left+(_=="window"?0:Pi());S.left+=fe,S.right+=fe}return S.top+=ae,S.bottom+=ae,S}function ys(e,r,S){if(S=="div")return r;var _=r.left,F=r.top;if(S=="page")_-=Pi(),F-=Wn();else if(S=="local"||!S){var J=e.display.sizer.getBoundingClientRect();_+=J.left,F+=J.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:_-ae.left,top:F-ae.top}}function eo(e,r,S,_,F){return _||(_=jt(e.doc,r.line)),qa(e,_,Ui(e,_,r.ch,F),S)}function Ei(e,r,S,_,F,J){_=_||jt(e.doc,r.line),F||(F=on(e,_));function ae(Ut,Nt){var Kt=Ti(e,F,Ut,Nt?"right":"left",J);return Nt?Kt.left=Kt.right:Kt.right=Kt.left,qa(e,_,Kt,S)}var ce=It(_,e.doc.direction),fe=r.ch,ye=r.sticky;if(fe>=_.text.length?(fe=_.text.length,ye="before"):fe<=0&&(fe=0,ye="after"),!ce)return ae(ye=="before"?fe-1:fe,ye=="before");function Ve(Ut,Nt,Kt){var zt=ce[Nt],$t=zt.level==1;return ae(Kt?Ut-1:Ut,$t!=Kt)}var Ye=ft(ce,fe,ye),vt=At,dt=Ve(fe,Ye,ye=="before");return vt!=null&&(dt.other=Ve(fe,vt,ye!="before")),dt}function ll(e,r){var S=0;r=P(e.doc,r),e.options.lineWrapping||(S=Ia(e.display)*r.ch);var _=jt(e.doc,r.line),F=Fn(_)+Za(e.display);return{left:S,right:S,top:F,bottom:F+_.height}}function ca(e,r,S,_,F){var J=me(e,r,S);return J.xRel=F,_&&(J.outside=_),J}function Si(e,r,S){var _=e.doc;if(S+=e.display.viewOffset,S<0)return ca(_.first,0,null,-1,-1);var F=Sr(_,S),J=_.first+_.size-1;if(F>J)return ca(_.first+_.size-1,jt(_,J).text.length,null,1,1);r<0&&(r=0);for(var ae=jt(_,F);;){var ce=cl(e,ae,F,r,S),fe=On(ae,ce.ch+(ce.xRel>0||ce.outside>0?1:0));if(!fe)return ce;var ye=fe.find(1);if(ye.line==F)return ye;ae=jt(_,F=ye.line)}}function ul(e,r,S,_){_-=Ri(r);var F=r.text.length,J=nt(function(ae){return Ti(e,S,ae-1).bottom<=_},F,0);return F=nt(function(ae){return Ti(e,S,ae).top>_},J,F),{begin:J,end:F}}function Al(e,r,S,_){S||(S=on(e,r));var F=qa(e,r,Ti(e,S,_),"line").top;return ul(e,r,S,F)}function Oa(e,r,S,_){return e.bottom<=S?!1:e.top>S?!0:(_?e.left:e.right)>r}function cl(e,r,S,_,F){F-=Fn(r);var J=on(e,r),ae=Ri(r),ce=0,fe=r.text.length,ye=!0,Ve=It(r,e.doc.direction);if(Ve){var Ye=(e.options.lineWrapping?yu:vu)(e,r,S,J,Ve,_,F);ye=Ye.level!=1,ce=ye?Ye.from:Ye.to-1,fe=ye?Ye.to:Ye.from-1}var vt=null,dt=null,Ut=nt(function(Cr){var pr=Ti(e,J,Cr);return pr.top+=ae,pr.bottom+=ae,Oa(pr,_,F,!1)?(pr.top<=F&&pr.left<=_&&(vt=Cr,dt=pr),!0):!1},ce,fe),Nt,Kt,zt=!1;if(dt){var $t=_-dt.left<dt.right-_,Vt=$t==ye;Ut=vt+(Vt?0:1),Kt=Vt?"after":"before",Nt=$t?dt.left:dt.right}else{!ye&&(Ut==fe||Ut==ce)&&Ut++,Kt=Ut==0?"after":Ut==r.text.length?"before":Ti(e,J,Ut-(ye?1:0)).bottom+ae<=F==ye?"after":"before";var ir=Ei(e,me(S,Ut,Kt),"line",r,J);Nt=ir.left,zt=F<ir.top?-1:F>=ir.bottom?1:0}return Ut=Be(r.text,Ut,1),ca(S,Ut,Kt,zt,_-Nt)}function vu(e,r,S,_,F,J,ae){var ce=nt(function(Ye){var vt=F[Ye],dt=vt.level!=1;return Oa(Ei(e,me(S,dt?vt.to:vt.from,dt?"before":"after"),"line",r,_),J,ae,!0)},0,F.length-1),fe=F[ce];if(ce>0){var ye=fe.level!=1,Ve=Ei(e,me(S,ye?fe.from:fe.to,ye?"after":"before"),"line",r,_);Oa(Ve,J,ae,!0)&&Ve.top>ae&&(fe=F[ce-1])}return fe}function yu(e,r,S,_,F,J,ae){var ce=ul(e,r,_,ae),fe=ce.begin,ye=ce.end;/\s/.test(r.text.charAt(ye-1))&&ye--;for(var Ve=null,Ye=null,vt=0;vt<F.length;vt++){var dt=F[vt];if(dt.from>=ye||dt.to<=fe)continue;var Ut=dt.level!=1,Nt=Ti(e,_,Ut?Math.min(ye,dt.to)-1:Math.max(fe,dt.from)).right,Kt=Nt<J?J-Nt+1e9:Nt-J;(!Ve||Ye>Kt)&&(Ve=dt,Ye=Kt)}return Ve||(Ve=F[F.length-1]),Ve.from<fe&&(Ve={from:fe,to:Ve.to,level:Ve.level}),Ve.to>ye&&(Ve={from:Ve.from,to:ye,level:Ve.level}),Ve}var $n;function ha(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if($n==null){$n=m("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)$n.appendChild(document.createTextNode("x")),$n.appendChild(m("br"));$n.appendChild(document.createTextNode("x"))}d(e.measure,$n);var S=$n.offsetHeight/50;return S>3&&(e.cachedTextHeight=S),n(e.measure),S||1}function Ia(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=m("span","xxxxxxxxxx"),S=m("pre",[r],"CodeMirror-line-like");d(e.measure,S);var _=r.getBoundingClientRect(),F=(_.right-_.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function bs(e){for(var r=e.display,S={},_={},F=r.gutters.clientLeft,J=r.gutters.firstChild,ae=0;J;J=J.nextSibling,++ae){var ce=e.display.gutterSpecs[ae].className;S[ce]=J.offsetLeft+J.clientLeft+F,_[ce]=J.clientWidth}return{fixedPos:Ra(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:S,gutterWidth:_,wrapperWidth:r.wrapper.clientWidth}}function Ra(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function hl(e){var r=ha(e.display),S=e.options.lineWrapping,_=S&&Math.max(5,e.display.scroller.clientWidth/Ia(e.display)-3);return function(F){if(In(e.doc,F))return 0;var J=0;if(F.widgets)for(var ae=0;ae<F.widgets.length;ae++)F.widgets[ae].height&&(J+=F.widgets[ae].height);return S?J+(Math.ceil(F.text.length/_)||1)*r:J+r}}function Mo(e){var r=e.doc,S=hl(e);r.iter(function(_){var F=S(_);F!=_.height&&Tr(_,F)})}function Yi(e,r,S,_){var F=e.display;if(!S&&Fe(r).getAttribute("cm-not-content")=="true")return null;var J,ae,ce=F.lineSpace.getBoundingClientRect();try{J=r.clientX-ce.left,ae=r.clientY-ce.top}catch(Ye){return null}var fe=Si(e,J,ae),ye;if(_&&fe.xRel>0&&(ye=jt(e.doc,fe.line).text).length==fe.ch){var Ve=$(ye,ye.length,e.options.tabSize)-ye.length;fe=me(fe.line,Math.max(0,Math.round((J-Ci(e.display).left)/Ia(e.display))-Ve))}return fe}function Ji(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var S=e.display.view,_=0;_<S.length;_++)if(r-=S[_].size,r<0)return _}function ti(e,r,S,_){r==null&&(r=e.doc.first),S==null&&(S=e.doc.first+e.doc.size),_||(_=0);var F=e.display;if(_&&S<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>r)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)Ur&&en(e.doc,r)<F.viewTo&&Ni(e);else if(S<=F.viewFrom)Ur&&Ln(e.doc,S+_)>F.viewFrom?Ni(e):(F.viewFrom+=_,F.viewTo+=_);else if(r<=F.viewFrom&&S>=F.viewTo)Ni(e);else if(r<=F.viewFrom){var J=to(e,S,S+_,1);J?(F.view=F.view.slice(J.index),F.viewFrom=J.lineN,F.viewTo+=_):Ni(e)}else if(S>=F.viewTo){var ae=to(e,r,r,-1);ae?(F.view=F.view.slice(0,ae.index),F.viewTo=ae.lineN):Ni(e)}else{var ce=to(e,r,r,-1),fe=to(e,S,S+_,1);ce&&fe?(F.view=F.view.slice(0,ce.index).concat(jn(e,ce.lineN,fe.lineN)).concat(F.view.slice(fe.index)),F.viewTo+=_):Ni(e)}var ye=F.externalMeasured;ye&&(S<ye.lineN?ye.lineN+=_:r<ye.lineN+ye.size&&(F.externalMeasured=null))}function ki(e,r,S){e.curOp.viewChanged=!0;var _=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r<F.lineN+F.size&&(_.externalMeasured=null),r<_.viewFrom||r>=_.viewTo)return;var J=_.view[Ji(e,r)];if(J.node==null)return;var ae=J.changes||(J.changes=[]);ne(ae,S)==-1&&ae.push(S)}function Ni(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function to(e,r,S,_){var F=Ji(e,r),J,ae=e.display.view;if(!Ur||S==e.doc.first+e.doc.size)return{index:F,lineN:S};for(var ce=e.display.viewFrom,fe=0;fe<F;fe++)ce+=ae[fe].size;if(ce!=r){if(_>0){if(F==ae.length-1)return null;J=ce+ae[F].size-r,F++}else J=ce-r;r+=J,S+=J}for(;en(e.doc,S)!=S;){if(F==(_<0?0:ae.length-1))return null;S+=_*ae[F-(_<0?1:0)].size,F+=_}return{index:F,lineN:S}}function dl(e,r,S){var _=e.display,F=_.view;F.length==0||r>=_.viewTo||S<=_.viewFrom?(_.view=jn(e,r,S),_.viewFrom=r):(_.viewFrom>r?_.view=jn(e,r,_.viewFrom).concat(_.view):_.viewFrom<r&&(_.view=_.view.slice(Ji(e,r))),_.viewFrom=r,_.viewTo<S?_.view=_.view.concat(jn(e,_.viewTo,S)):_.viewTo>S&&(_.view=_.view.slice(0,Ji(e,S)))),_.viewTo=S}function fl(e){for(var r=e.display.view,S=0,_=0;_<r.length;_++){var F=r[_];!F.hidden&&(!F.node||F.changes)&&++S}return S}function $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,r){r===void 0&&(r=!0);for(var S=e.doc,_={},F=_.cursors=document.createDocumentFragment(),J=_.selection=document.createDocumentFragment(),ae=0;ae<S.sel.ranges.length;ae++){if(!r&&ae==S.sel.primIndex)continue;var ce=S.sel.ranges[ae];if(ce.from().line>=e.display.viewTo||ce.to().line<e.display.viewFrom)continue;var fe=ce.empty();(fe||e.options.showCursorWhenSelecting)&&ml(e,ce.head,F),fe||bu(e,ce,J)}return _}function ml(e,r,S){var _=Ei(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=S.appendChild(m("div","\xA0","CodeMirror-cursor"));if(F.style.left=_.left+"px",F.style.top=_.top+"px",F.style.height=Math.max(0,_.bottom-_.top)*e.options.cursorHeight+"px",_.other){var J=S.appendChild(m("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));J.style.display="",J.style.left=_.other.left+"px",J.style.top=_.other.top+"px",J.style.height=(_.other.bottom-_.other.top)*.85+"px"}}function La(e,r){return e.top-r.top||e.left-r.left}function bu(e,r,S){var _=e.display,F=e.doc,J=document.createDocumentFragment(),ae=Ci(e.display),ce=ae.left,fe=Math.max(_.sizerWidth,ci(e)-_.sizer.offsetLeft)-ae.right,ye=F.direction=="ltr";function Ve(Vt,ir,Cr,pr){ir<0&&(ir=0),ir=Math.round(ir),pr=Math.round(pr),J.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+Vt+`px;
top: `+ir+"px; width: "+(Cr==null?fe-Vt:Cr)+`px;
height: `+(pr-ir)+"px"))}function Ye(Vt,ir,Cr){var pr=jt(F,Vt),kr=pr.text.length,yn,zn;function Bn(Mn,ei){return eo(e,me(Vt,Mn),"div",pr,ei)}function di(Mn,ei,Yn){var Gt=Al(e,pr,null,Mn),Cn=ei=="ltr"==(Yn=="after")?"left":"right",Tn=Yn=="after"?Gt.begin:Gt.end-(/\s/.test(pr.text.charAt(Gt.end-1))?2:1);return Bn(Tn,Cn)[Cn]}var qn=It(pr,F.direction);return at(qn,ir||0,Cr==null?kr:Cr,function(Mn,ei,Yn,Gt){var Cn=Yn=="ltr",Tn=Bn(Mn,Cn?"left":"right"),Sn=Bn(ei-1,Cn?"right":"left"),Wa=ir==null&&Mn==0,Vr=Cr==null&&ei==kr,jr=Gt==0,vi=!qn||Gt==qn.length-1;if(Sn.top-Tn.top<=3){var Vn=(ye?Wa:Vr)&&jr,Ga=(ye?Vr:Wa)&&vi,Gi=Vn?ce:(Cn?Tn:Sn).left,Mi=Ga?fe:(Cn?Sn:Tn).right;Ve(Gi,Tn.top,Mi-Gi,Tn.bottom)}else{var xa,ii,Ca,tl;Cn?(xa=ye&&Wa&&jr?ce:Tn.left,ii=ye?fe:di(Mn,Yn,"before"),Ca=ye?ce:di(ei,Yn,"after"),tl=ye&&Vr&&vi?fe:Sn.right):(xa=ye?di(Mn,Yn,"before"):ce,ii=!ye&&Wa&&jr?fe:Tn.right,Ca=!ye&&Vr&&vi?ce:Sn.left,tl=ye?di(ei,Yn,"after"):fe),Ve(xa,Tn.top,ii-xa,Tn.bottom),Tn.bottom<Sn.top&&Ve(ce,Tn.bottom,null,Sn.top),Ve(Ca,Sn.top,tl-Ca,Sn.bottom)}(!yn||La(Tn,yn)<0)&&(yn=Tn),La(Sn,yn)<0&&(yn=Sn),(!zn||La(Tn,zn)<0)&&(zn=Tn),La(Sn,zn)<0&&(zn=Sn)}),{start:yn,end:zn}}var vt=r.from(),dt=r.to();if(vt.line==dt.line)Ye(vt.line,vt.ch,dt.ch);else{var Ut=jt(F,vt.line),Nt=jt(F,dt.line),Kt=En(Ut)==En(Nt),zt=Ye(vt.line,vt.ch,Kt?Ut.text.length+1:null).end,$t=Ye(dt.line,Kt?0:null,dt.ch).start;Kt&&(zt.top<$t.top-2?(Ve(zt.right,zt.top,null,zt.bottom),Ve(ce,$t.top,$t.left,$t.bottom)):Ve(zt.right,zt.top,$t.left-zt.right,zt.bottom)),zt.bottom<$t.top&&Ve(ce,zt.bottom,null,$t.top)}S.appendChild(J)}function Fo(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var S=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Da(e),r.cursorDiv.style.visibility=(S=!S)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.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,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,r),e.state.focused=!0,k(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,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,r),e.state.focused=!1,p(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Uo(e){for(var r=e.display,S=r.lineDiv.offsetTop,_=0;_<r.view.length;_++){var F=r.view[_],J=e.options.lineWrapping,ae=void 0,ce=0;if(F.hidden)continue;if(R&&b<8){var fe=F.node.offsetTop+F.node.offsetHeight;ae=fe-S,S=fe}else{var ye=F.node.getBoundingClientRect();ae=ye.bottom-ye.top,!J&&F.text.firstChild&&(ce=F.text.firstChild.getBoundingClientRect().right-ye.left-1)}var Ve=F.line.height-ae;if((Ve>.005||Ve<-.005)&&(Tr(F.line,ae),da(F.line),F.rest))for(var Ye=0;Ye<F.rest.length;Ye++)da(F.rest[Ye]);if(ce>e.display.sizerWidth){var vt=Math.ceil(ce/Ia(e.display));vt>e.display.maxLineLength&&(e.display.maxLineLength=vt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function da(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var S=e.widgets[r],_=S.node.parentNode;_&&(S.height=_.offsetHeight)}}function Po(e,r,S){var _=S&&S.top!=null?Math.max(0,S.top):e.scroller.scrollTop;_=Math.floor(_-Za(e));var F=S&&S.bottom!=null?S.bottom:_+e.wrapper.clientHeight,J=Sr(r,_),ae=Sr(r,F);if(S&&S.ensure){var ce=S.ensure.from.line,fe=S.ensure.to.line;ce<J?(J=ce,ae=Sr(r,Fn(jt(r,ce))+e.wrapper.clientHeight)):Math.min(fe,r.lastLine())>=ae&&(J=Sr(r,Fn(jt(r,fe))-e.wrapper.clientHeight),ae=fe)}return{from:J,to:Math.max(ae,J+1)}}function Eu(e,r){if(ot(e,"scrollCursorIntoView"))return;var S=e.display,_=S.sizer.getBoundingClientRect(),F=null;if(r.top+_.top<0?F=!0:r.bottom+_.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!o){var J=m("div","\u200B",null,`position: absolute;
top: `+(r.top-S.viewOffset-Za(e.display))+`px;
height: `+(r.bottom-r.top+Ii(e)+S.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(J),J.scrollIntoView(F),e.display.lineSpace.removeChild(J)}}function ko(e,r,S,_){_==null&&(_=0);var F;!e.options.lineWrapping&&r==S&&(r=r.ch?me(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,S=r.sticky=="before"?me(r.line,r.ch+1,"before"):r);for(var J=0;J<5;J++){var ae=!1,ce=Ei(e,r),fe=!S||S==r?ce:Ei(e,S);F={left:Math.min(ce.left,fe.left),top:Math.min(ce.top,fe.top)-_,right:Math.max(ce.left,fe.left),bottom:Math.max(ce.bottom,fe.bottom)+_};var ye=ws(e,F),Ve=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(ye.scrollTop!=null&&(ro(e,ye.scrollTop),Math.abs(e.doc.scrollTop-Ve)>1&&(ae=!0)),ye.scrollLeft!=null&&(fa(e,ye.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(ae=!0)),!ae)break}return F}function wu(e,r){var S=ws(e,r);S.scrollTop!=null&&ro(e,S.scrollTop),S.scrollLeft!=null&&fa(e,S.scrollLeft)}function ws(e,r){var S=e.display,_=ha(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:S.scroller.scrollTop,J=Rn(e),ae={};r.bottom-r.top>J&&(r.bottom=r.top+J);var ce=e.doc.height+Xi(S),fe=r.top<_,ye=r.bottom>ce-_;if(r.top<F)ae.scrollTop=fe?0:r.top;else if(r.bottom>F+J){var Ve=Math.min(r.top,(ye?ce:r.bottom)-J);Ve!=F&&(ae.scrollTop=Ve)}var Ye=e.options.fixedGutter?0:S.gutters.offsetWidth,vt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:S.scroller.scrollLeft-Ye,dt=ci(e)-S.gutters.offsetWidth,Ut=r.right-r.left>dt;return Ut&&(r.right=r.left+dt),r.left<10?ae.scrollLeft=0:r.left<vt?ae.scrollLeft=Math.max(0,r.left+Ye-(Ut?0:10)):r.right>dt+vt-3&&(ae.scrollLeft=r.right+(Ut?0:10)-dt),ae}function _s(e,r){if(r==null)return;No(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ma(e){No(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Zi(e,r,S){(r!=null||S!=null)&&No(e),r!=null&&(e.curOp.scrollLeft=r),S!=null&&(e.curOp.scrollTop=S)}function _u(e,r){No(e),e.curOp.scrollToPos=r}function No(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var S=ll(e,r.from),_=ll(e,r.to);yl(e,S,_,r.margin)}}function yl(e,r,S,_){var F=ws(e,{left:Math.min(r.left,S.left),top:Math.min(r.top,S.top)-_,right:Math.max(r.right,S.right),bottom:Math.max(r.bottom,S.bottom)+_});Zi(e,F.scrollLeft,F.scrollTop)}function ro(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;O||Fa(e,{top:r}),no(e,r,!0),O&&Fa(e),va(e,100)}function no(e,r,S){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!S)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function fa(e,r,S,_){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(S?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!_)return;e.doc.scrollLeft=r,xl(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function io(e){var r=e.display,S=r.gutters.offsetWidth,_=Math.round(e.doc.height+Xi(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?S:0,docHeight:_,scrollHeight:_+Ii(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:S}}var pa=function(e,r,S){this.cm=S;var _=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");_.tabIndex=F.tabIndex=-1,e(_),e(F),ke(_,"scroll",function(){_.clientHeight&&r(_.scrollTop,"vertical")}),ke(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,R&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,S=e.scrollHeight>e.clientHeight+1,_=e.nativeBarWidth;if(S){this.vert.style.display="block",this.vert.style.bottom=r?_+"px":"0";var F=e.viewHeight-(r?_:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=S?_+"px":"0",this.horiz.style.left=e.barLeft+"px";var J=e.viewWidth-e.barLeft-(S?_:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+J)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(_==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:S?_:0,bottom:r?_: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&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Y,this.disableVert=new Y},pa.prototype.enableZeroWidthBar=function(e,r,S){e.style.pointerEvents="auto";function _(){var F=e.getBoundingClientRect(),J=S=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);J!=e?e.style.pointerEvents="none":r.set(1e3,_)}r.set(1e3,_)},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,r){r||(r=io(e));var S=e.display.barWidth,_=e.display.barHeight;bl(e,r);for(var F=0;F<4&&S!=e.display.barWidth||_!=e.display.barHeight;F++)S!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),bl(e,io(e)),S=e.display.barWidth,_=e.display.barHeight}function bl(e,r){var S=e.display,_=S.scrollbars.update(r);S.sizer.style.paddingRight=(S.barWidth=_.right)+"px",S.sizer.style.paddingBottom=(S.barHeight=_.bottom)+"px",S.heightForcer.style.borderBottom=_.bottom+"px solid transparent",_.right&&_.bottom?(S.scrollbarFiller.style.display="block",S.scrollbarFiller.style.height=_.bottom+"px",S.scrollbarFiller.style.width=_.right+"px"):S.scrollbarFiller.style.display="",_.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(S.gutterFiller.style.display="block",S.gutterFiller.style.height=_.bottom+"px",S.gutterFiller.style.width=r.gutterWidth+"px"):S.gutterFiller.style.display=""}var El={native:pa,null:ao};function wl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&p(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),ke(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,S){S=="horizontal"?fa(e,r):ro(e,r)},e),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)}var xu=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:++xu},ui(e.curOp)}function ga(e){var r=e.curOp;r&&$r(r,function(S){for(var _=0;_<S.ops.length;_++)S.ops[_].cm.curOp=null;Cu(S)})}function Cu(e){for(var r=e.ops,S=0;S<r.length;S++)Tu(r[S]);for(var _=0;_<r.length;_++)Su(r[_]);for(var F=0;F<r.length;F++)Bu(r[F]);for(var J=0;J<r.length;J++)Ho(r[J]);for(var ae=0;ae<r.length;ae++)Ou(r[ae])}function Tu(e){var r=e.cm,S=r.display;Iu(r),e.updateMaxLine&&Un(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<S.viewFrom||e.scrollToPos.to.line>=S.viewTo)||S.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new jo(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Su(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Bu(e){var r=e.cm,S=r.display;e.updatedDisplay&&Uo(r),e.barMeasure=io(r),S.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ui(r,S.maxLine,S.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(S.scroller.clientWidth,S.sizer.offsetLeft+e.adjustWidthTo+Ii(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,S.sizer.offsetLeft+e.adjustWidthTo-ci(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=S.input.prepareSelection())}function Ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&fa(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var S=e.focus&&e.focus==U();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,S),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Hi(r,e.barMeasure),e.updatedDisplay&&Ts(r,e.barMeasure),e.selectionChanged&&Fo(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),S&&gl(e.cm)}function Ou(e){var r=e.cm,S=r.display,_=r.doc;if(e.updatedDisplay&&_l(r,e.update),S.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(S.wheelStartX=S.wheelStartY=null),e.scrollTop!=null&&no(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&fa(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=ko(r,P(_,e.scrollToPos.from),P(_,e.scrollToPos.to),e.scrollToPos.margin);Eu(r,F)}var J=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(J)for(var ce=0;ce<J.length;++ce)J[ce].lines.length||Ze(J[ce],"hide");if(ae)for(var fe=0;fe<ae.length;++fe)ae[fe].lines.length&&Ze(ae[fe],"unhide");S.wrapper.offsetHeight&&(_.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function hi(e,r){if(e.curOp)return r();ma(e);try{return r()}finally{ga(e)}}function kn(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ma(e);try{return r.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 Gn(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ma(r);try{return e.apply(this,arguments)}finally{ga(r)}}}function va(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,G(Qo,e))}function Qo(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var S=+new Date+e.options.workTime,_=Pt(e,r.highlightFrontier),F=[];r.iter(_.line,Math.min(r.first+r.size,e.display.viewTo+500),function(J){if(_.line>=e.display.viewFrom){var ae=J.styles,ce=J.text.length>e.options.maxHighlightLength?Ht(r.mode,_.state):null,fe=We(e,J,_,!0);ce&&(_.state=ce),J.styles=fe.styles;var ye=J.styleClasses,Ve=fe.classes;Ve?J.styleClasses=Ve:ye&&(J.styleClasses=null);for(var Ye=!ae||ae.length!=J.styles.length||ye!=Ve&&(!ye||!Ve||ye.bgClass!=Ve.bgClass||ye.textClass!=Ve.textClass),vt=0;!Ye&&vt<ae.length;++vt)Ye=ae[vt]!=J.styles[vt];Ye&&F.push(_.line),J.stateAfter=_.save(),_.nextLine()}else J.text.length<=e.options.maxHighlightLength&&Qt(e,J.text,_),J.stateAfter=_.line%5==0?_.save():null,_.nextLine();if(+new Date>S)return va(e,e.options.workDelay),!0}),r.highlightFrontier=_.line,r.modeFrontier=Math.max(r.modeFrontier,_.line),F.length&&hi(e,function(){for(var J=0;J<F.length;J++)ki(e,F[J],"text")})}var jo=function(e,r,S){var _=e.display;this.viewport=r,this.visible=Po(_,e.doc,r),this.editorIsHidden=!_.wrapper.offsetWidth,this.wrapperHeight=_.wrapper.clientHeight,this.wrapperWidth=_.wrapper.clientWidth,this.oldDisplayWidth=ci(e),this.force=S,this.dims=bs(e),this.events=[]};jo.prototype.signal=function(e,r){Me(e,r)&&this.events.push(arguments)},jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function Iu(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Ii(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Ii(e)+"px",r.scrollbarsClipped=!0)}function Ru(e){if(e.hasFocus())return null;var r=U();if(!r||!g(e.display.lineDiv,r))return null;var S={activeElt:r};if(window.getSelection){var _=window.getSelection();_.anchorNode&&_.extend&&g(e.display.lineDiv,_.anchorNode)&&(S.anchorNode=_.anchorNode,S.anchorOffset=_.anchorOffset,S.focusNode=_.focusNode,S.focusOffset=_.focusOffset)}return S}function Lu(e){if(!e||!e.activeElt||e.activeElt==U())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode)){var r=window.getSelection(),S=document.createRange();S.setEnd(e.anchorNode,e.anchorOffset),S.collapse(!1),r.removeAllRanges(),r.addRange(S),r.extend(e.focusNode,e.focusOffset)}}function xs(e,r){var S=e.display,_=e.doc;if(r.editorIsHidden)return Ni(e),!1;if(!r.force&&r.visible.from>=S.viewFrom&&r.visible.to<=S.viewTo&&(S.updateLineNumbers==null||S.updateLineNumbers>=S.viewTo)&&S.renderedView==S.view&&fl(e)==0)return!1;Cl(e)&&(Ni(e),r.dims=bs(e));var F=_.first+_.size,J=Math.max(r.visible.from-e.options.viewportMargin,_.first),ae=Math.min(F,r.visible.to+e.options.viewportMargin);S.viewFrom<J&&J-S.viewFrom<20&&(J=Math.max(_.first,S.viewFrom)),S.viewTo>ae&&S.viewTo-ae<20&&(ae=Math.min(F,S.viewTo)),Ur&&(J=en(e.doc,J),ae=Ln(e.doc,ae));var ce=J!=S.viewFrom||ae!=S.viewTo||S.lastWrapHeight!=r.wrapperHeight||S.lastWrapWidth!=r.wrapperWidth;dl(e,J,ae),S.viewOffset=Fn(jt(e.doc,S.viewFrom)),e.display.mover.style.top=S.viewOffset+"px";var fe=fl(e);if(!ce&&fe==0&&!r.force&&S.renderedView==S.view&&(S.updateLineNumbers==null||S.updateLineNumbers>=S.viewTo))return!1;var ye=Ru(e);return fe>4&&(S.lineDiv.style.display="none"),Du(e,S.updateLineNumbers,r.dims),fe>4&&(S.lineDiv.style.display=""),S.renderedView=S.view,Lu(ye),n(S.cursorDiv),n(S.selectionDiv),S.gutters.style.height=S.sizer.style.minHeight=0,ce&&(S.lastWrapHeight=r.wrapperHeight,S.lastWrapWidth=r.wrapperWidth,va(e,400)),S.updateLineNumbers=null,!0}function _l(e,r){for(var S=r.viewport,_=!0;;_=!1){if(!_||!e.options.lineWrapping||r.oldDisplayWidth==ci(e)){if(S&&S.top!=null&&(S={top:Math.min(e.doc.height+Xi(e.display)-Rn(e),S.top)}),r.visible=Po(e.display,e.doc,S),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else _&&(r.visible=Po(e.display,e.doc,S));if(!xs(e,r))break;Uo(e);var F=io(e);$i(e),Hi(e,F),Ts(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.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,r){var S=new jo(e,r);if(xs(e,S)){Uo(e),_l(e,S);var _=io(e);$i(e),Hi(e,_),Ts(e,_),S.finish()}}function Du(e,r,S){var _=e.display,F=e.options.lineNumbers,J=_.lineDiv,ae=J.firstChild;function ce(Ut){var Nt=Ut.nextSibling;return t&&a&&e.display.currentWheelTarget==Ut?Ut.style.display="none":Ut.parentNode.removeChild(Ut),Nt}for(var fe=_.view,ye=_.viewFrom,Ve=0;Ve<fe.length;Ve++){var Ye=fe[Ve];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=J){var vt=il(e,Ye,ye,S);J.insertBefore(vt,ae)}else{for(;ae!=Ye.node;)ae=ce(ae);var dt=F&&r!=null&&r<=ye&&Ye.lineNumber;Ye.changes&&(ne(Ye.changes,"gutter")>-1&&(dt=!1),zi(e,Ye,ye,S)),dt&&(n(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(Zr(e.options,ye)))),ae=Ye.node.nextSibling}ye+=Ye.size}for(;ae;)ae=ce(ae)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ts(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Ii(e)+"px"}function xl(e){var r=e.display,S=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var _=Ra(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,J=_+"px",ae=0;ae<S.length;ae++)if(!S[ae].hidden){e.options.fixedGutter&&(S[ae].gutter&&(S[ae].gutter.style.left=J),S[ae].gutterBackground&&(S[ae].gutterBackground.style.left=J));var ce=S[ae].alignable;if(ce)for(var fe=0;fe<ce.length;fe++)ce[fe].style.left=J}e.options.fixedGutter&&(r.gutters.style.left=_+F+"px")}function Cl(e){if(!e.options.lineNumbers)return!1;var r=e.doc,S=Zr(e.options,r.first+r.size-1),_=e.display;if(S.length!=_.lineNumChars){var F=_.measure.appendChild(m("div",[m("div",S)],"CodeMirror-linenumber CodeMirror-gutter-elt")),J=F.firstChild.offsetWidth,ae=F.offsetWidth-J;return _.lineGutter.style.width="",_.lineNumInnerWidth=Math.max(J,_.lineGutter.offsetWidth-ae)+1,_.lineNumWidth=_.lineNumInnerWidth+ae,_.lineNumChars=_.lineNumInnerWidth?S.length:-1,_.lineGutter.style.width=_.lineNumWidth+"px",Cs(e.display),!0}return!1}function Ss(e,r){for(var S=[],_=!1,F=0;F<e.length;F++){var J=e[F],ae=null;if(typeof J!="string"&&(ae=J.style,J=J.className),J=="CodeMirror-linenumbers")if(r)_=!0;else continue;S.push({className:J,style:ae})}return r&&!_&&S.push({className:"CodeMirror-linenumbers",style:null}),S}function Tl(e){var r=e.gutters,S=e.gutterSpecs;n(r),e.lineGutter=null;for(var _=0;_<S.length;++_){var F=S[_],J=F.className,ae=F.style,ce=r.appendChild(m("div",null,"CodeMirror-gutter "+J));ae&&(ce.style.cssText=ae),J=="CodeMirror-linenumbers"&&(e.lineGutter=ce,ce.style.width=(e.lineNumWidth||1)+"px")}r.style.display=S.length?"":"none",Cs(e)}function oo(e){Tl(e.display),ti(e),xl(e)}function Mu(e,r,S,_){var F=this;this.input=S,F.scrollbarFiller=m("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=m("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=C("div",null,"CodeMirror-code"),F.selectionDiv=m("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=m("div",null,"CodeMirror-cursors"),F.measure=m("div",null,"CodeMirror-measure"),F.lineMeasure=m("div",null,"CodeMirror-measure"),F.lineSpace=C("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var J=C("div",[F.lineSpace],"CodeMirror-lines");F.mover=m("div",[J],null,"position: relative"),F.sizer=m("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=m("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),F.gutters=m("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=m("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=m("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),R&&b<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!t&&!(O&&c)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=r.first,F.reportedViewFrom=F.reportedViewTo=r.first,F.view=[],F.renderedView=null,F.externalMeasured=null,F.viewOffset=0,F.lastWrapHeight=F.lastWrapWidth=0,F.updateLineNumbers=null,F.nativeBarWidth=F.barHeight=F.barWidth=0,F.scrollbarsClipped=!1,F.lineNumWidth=F.lineNumInnerWidth=F.lineNumChars=null,F.alignWidgets=!1,F.cachedCharWidth=F.cachedTextHeight=F.cachedPaddingH=null,F.maxLine=null,F.maxLineLength=0,F.maxLineChanged=!1,F.wheelDX=F.wheelDY=F.wheelStartX=F.wheelStartY=null,F.shift=!1,F.selForContextMenu=null,F.activeTouch=null,F.gutterSpecs=Ss(_.gutters,_.lineNumbers),Tl(F),S.init(F)}var Ko=0,pi=null;R?pi=-.53:O?pi=15:i?pi=-.7:h&&(pi=-1/3);function Sl(e){var r=e.wheelDeltaX,S=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),S==null&&e.detail&&e.axis==e.VERTICAL_AXIS?S=e.detail:S==null&&(S=e.wheelDelta),{x:r,y:S}}function Bl(e){var r=Sl(e);return r.x*=pi,r.y*=pi,r}function Ol(e,r){var S=Sl(r),_=S.x,F=S.y,J=e.display,ae=J.scroller,ce=ae.scrollWidth>ae.clientWidth,fe=ae.scrollHeight>ae.clientHeight;if(!(_&&ce||F&&fe))return;if(F&&a&&t){e:for(var ye=r.target,Ve=J.view;ye!=ae;ye=ye.parentNode)for(var Ye=0;Ye<Ve.length;Ye++)if(Ve[Ye].node==ye){e.display.currentWheelTarget=ye;break e}}if(_&&!O&&!A&&pi!=null){F&&fe&&ro(e,Math.max(0,ae.scrollTop+F*pi)),fa(e,Math.max(0,ae.scrollLeft+_*pi)),(!F||F&&fe)&&ge(r),J.wheelStartX=null;return}if(F&&pi!=null){var vt=F*pi,dt=e.doc.scrollTop,Ut=dt+J.wrapper.clientHeight;vt<0?dt=Math.max(0,dt+vt-50):Ut=Math.min(e.doc.height,Ut+vt+50),Fa(e,{top:dt,bottom:Ut})}Ko<20&&(J.wheelStartX==null?(J.wheelStartX=ae.scrollLeft,J.wheelStartY=ae.scrollTop,J.wheelDX=_,J.wheelDY=F,setTimeout(function(){if(J.wheelStartX==null)return;var Nt=ae.scrollLeft-J.wheelStartX,Kt=ae.scrollTop-J.wheelStartY,zt=Kt&&J.wheelDY&&Kt/J.wheelDY||Nt&&J.wheelDX&&Nt/J.wheelDX;if(J.wheelStartX=J.wheelStartY=null,!zt)return;pi=(pi*Ko+zt)/(Ko+1),++Ko},200)):(J.wheelDX+=_,J.wheelDY+=F))}var mi=function(e,r){this.ranges=e,this.primIndex=r};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 r=0;r<this.ranges.length;r++){var S=this.ranges[r],_=e.ranges[r];if(!Pe(S.anchor,_.anchor)||!Pe(S.head,_.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new nn(rt(this.ranges[r].anchor),rt(this.ranges[r].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,r){r||(r=e);for(var S=0;S<this.ranges.length;S++){var _=this.ranges[S];if(be(r,_.from())>=0&&be(e,_.to())<=0)return S}return-1};var nn=function(e,r){this.anchor=e,this.head=r};nn.prototype.from=function(){return Ft(this.anchor,this.head)},nn.prototype.to=function(){return qe(this.anchor,this.head)},nn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function oi(e,r,S){var _=e&&e.options.selectionsMayTouch,F=r[S];r.sort(function(vt,dt){return be(vt.from(),dt.from())}),S=ne(r,F);for(var J=1;J<r.length;J++){var ae=r[J],ce=r[J-1],fe=be(ce.to(),ae.from());if(_&&!ae.empty()?fe>0:fe>=0){var ye=Ft(ce.from(),ae.from()),Ve=qe(ce.to(),ae.to()),Ye=ce.empty()?ae.from()==ae.head:ce.from()==ce.head;J<=S&&--S,r.splice(--J,2,new nn(Ye?Ve:ye,Ye?ye:Ve))}}return new mi(r,S)}function qi(e,r){return new mi([new nn(e,r||e)],0)}function ea(e){return e.text?me(e.from.line+e.text.length-1,Je(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Bs(e,r){if(be(e,r.from)<0)return e;if(be(e,r.to)<=0)return ea(r);var S=e.line+r.text.length-(r.to.line-r.from.line)-1,_=e.ch;return e.line==r.to.line&&(_+=ea(r).ch-r.to.ch),me(S,_)}function Os(e,r){for(var S=[],_=0;_<e.sel.ranges.length;_++){var F=e.sel.ranges[_];S.push(new nn(Bs(F.anchor,r),Bs(F.head,r)))}return oi(e.cm,S,e.sel.primIndex)}function Il(e,r,S){return e.line==r.line?me(S.line,e.ch-r.ch+S.ch):me(S.line+(e.line-r.line),e.ch)}function Fu(e,r,S){for(var _=[],F=me(e.first,0),J=F,ae=0;ae<r.length;ae++){var ce=r[ae],fe=Il(ce.from,F,J),ye=Il(ea(ce),F,J);if(F=ce.to,J=ye,S=="around"){var Ve=e.sel.ranges[ae],Ye=be(Ve.head,Ve.anchor)<0;_[ae]=new nn(Ye?ye:fe,Ye?fe:ye)}else _[ae]=new nn(fe,fe)}return new mi(_,e.sel.primIndex)}function Is(e){e.doc.mode=St(e.options,e.doc.modeOption),so(e)}function so(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,va(e,100),e.state.modeGen++,e.curOp&&ti(e)}function Rl(e,r){return r.from.ch==0&&r.to.ch==0&&Je(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Rs(e,r,S,_){function F($t){return S?S[$t]:null}function J($t,Vt,ir){Pn($t,Vt,ir,_),Yr($t,"change",$t,r)}function ae($t,Vt){for(var ir=[],Cr=$t;Cr<Vt;++Cr)ir.push(new gn(ye[Cr],F(Cr),_));return ir}var ce=r.from,fe=r.to,ye=r.text,Ve=jt(e,ce.line),Ye=jt(e,fe.line),vt=Je(ye),dt=F(ye.length-1),Ut=fe.line-ce.line;if(r.full)e.insert(0,ae(0,ye.length)),e.remove(ye.length,e.size-ye.length);else if(Rl(e,r)){var Nt=ae(0,ye.length-1);J(Ye,Ye.text,dt),Ut&&e.remove(ce.line,Ut),Nt.length&&e.insert(ce.line,Nt)}else if(Ve==Ye)if(ye.length==1)J(Ve,Ve.text.slice(0,ce.ch)+vt+Ve.text.slice(fe.ch),dt);else{var Kt=ae(1,ye.length-1);Kt.push(new gn(vt+Ve.text.slice(fe.ch),dt,_)),J(Ve,Ve.text.slice(0,ce.ch)+ye[0],F(0)),e.insert(ce.line+1,Kt)}else if(ye.length==1)J(Ve,Ve.text.slice(0,ce.ch)+ye[0]+Ye.text.slice(fe.ch),F(0)),e.remove(ce.line+1,Ut);else{J(Ve,Ve.text.slice(0,ce.ch)+ye[0],F(0)),J(Ye,vt+Ye.text.slice(fe.ch),dt);var zt=ae(1,ye.length-1);Ut>1&&e.remove(ce.line+1,Ut-1),e.insert(ce.line+1,zt)}Yr(e,"change",e,r)}function ta(e,r,S){function _(F,J,ae){if(F.linked)for(var ce=0;ce<F.linked.length;++ce){var fe=F.linked[ce];if(fe.doc==J)continue;var ye=ae&&fe.sharedHist;if(S&&!ye)continue;r(fe.doc,ye),_(fe.doc,F,ye)}}_(e,null,!0)}function Nn(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Mo(e),Is(e),Ll(e),e.options.lineWrapping||Un(e),e.options.mode=r.modeOption,ti(e)}function Ll(e){(e.doc.direction=="rtl"?k:p)(e.display.lineDiv,"CodeMirror-rtl")}function Uu(e){hi(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,r){var S={from:rt(r.from),to:ea(r),text:Mr(e,r.from,r.to)};return Ul(e,S,r.from.line,r.to.line+1),ta(e,function(_){return Ul(_,S,r.from.line,r.to.line+1)},!0),S}function Dl(e){for(;e.length;){var r=Je(e);if(r.ranges)e.pop();else break}}function Ml(e,r){if(r)return Dl(e.done),Je(e.done);if(e.done.length&&!Je(e.done).ranges)return Je(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Je(e.done)}function Fl(e,r,S,_){var F=e.history;F.undone.length=0;var J=+new Date,ae,ce;if((F.lastOp==_||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>J-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ae=Ml(F,F.lastOp==_)))ce=Je(ae.changes),be(r.from,r.to)==0&&be(r.from,ce.to)==0?ce.to=ea(r):ae.changes.push(Ls(e,r));else{var fe=Je(F.done);for((!fe||!fe.ranges)&&Go(e.sel,F.done),ae={changes:[Ls(e,r)],generation:F.generation},F.done.push(ae);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(S),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=J,F.lastOp=F.lastSelOp=_,F.lastOrigin=F.lastSelOrigin=r.origin,ce||Ze(e,"historyAdded")}function Pu(e,r,S,_){var F=r.charAt(0);return F=="*"||F=="+"&&S.ranges.length==_.ranges.length&&S.somethingSelected()==_.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ku(e,r,S,_){var F=e.history,J=_&&_.origin;S==F.lastSelOp||J&&F.lastSelOrigin==J&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==J||Pu(e,J,Je(F.done),r))?F.done[F.done.length-1]=r:Go(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=J,F.lastSelOp=S,_&&_.clearRedo!==!1&&Dl(F.undone)}function Go(e,r){var S=Je(r);S&&S.ranges&&S.equals(e)||r.push(e)}function Ul(e,r,S,_){var F=r["spans_"+e.id],J=0;e.iter(Math.max(e.first,S),Math.min(e.first+e.size,_),function(ae){ae.markedSpans&&((F||(F=r["spans_"+e.id]={}))[J]=ae.markedSpans),++J})}function Nu(e){if(!e)return null;for(var r,S=0;S<e.length;++S)e[S].marker.explicitlyCleared?r||(r=e.slice(0,S)):r&&r.push(e[S]);return r?r.length?r:null:e}function Pl(e,r){var S=r["spans_"+e.id];if(!S)return null;for(var _=[],F=0;F<r.text.length;++F)_.push(Nu(S[F]));return _}function ar(e,r){var S=Pl(e,r),_=hn(e,r);if(!S)return _;if(!_)return S;for(var F=0;F<S.length;++F){var J=S[F],ae=_[F];if(J&&ae){e:for(var ce=0;ce<ae.length;++ce){for(var fe=ae[ce],ye=0;ye<J.length;++ye)if(J[ye].marker==fe.marker)continue e;J.push(fe)}}else ae&&(S[F]=ae)}return S}function Ua(e,r,S){for(var _=[],F=0;F<e.length;++F){var J=e[F];if(J.ranges){_.push(S?mi.prototype.deepCopy.call(J):J);continue}var ae=J.changes,ce=[];_.push({changes:ce});for(var fe=0;fe<ae.length;++fe){var ye=ae[fe],Ve=void 0;if(ce.push({from:ye.from,to:ye.to,text:ye.text}),r)for(var Ye in ye)(Ve=Ye.match(/^spans_(\d+)$/))&&(ne(r,Number(Ve[1]))>-1&&(Je(ce)[Ye]=ye[Ye],delete ye[Ye]))}}return _}function Ds(e,r,S,_){if(_){var F=e.anchor;if(S){var J=be(r,F)<0;J!=be(S,F)<0?(F=r,r=S):J!=be(r,S)<0&&(r=S)}return new nn(F,r)}else return new nn(S||r,r)}function Pa(e,r,S,_,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Zn(e,new mi([Ds(e.sel.primary(),r,S,F)],0),_)}function Bi(e,r,S){for(var _=[],F=e.cm&&(e.cm.display.shift||e.extend),J=0;J<e.sel.ranges.length;J++)_[J]=Ds(e.sel.ranges[J],r[J],null,F);var ae=oi(e.cm,_,e.sel.primIndex);Zn(e,ae,S)}function Ms(e,r,S,_){var F=e.sel.ranges.slice(0);F[r]=S,Zn(e,oi(e.cm,F,e.sel.primIndex),_)}function Fs(e,r,S,_){Zn(e,qi(r,S),_)}function lo(e,r,S){var _={ranges:r.ranges,update:function(F){this.ranges=[];for(var J=0;J<F.length;J++)this.ranges[J]=new nn(P(e,F[J].anchor),P(e,F[J].head))},origin:S&&S.origin};return Ze(e,"beforeSelectionChange",e,_),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,_),_.ranges!=r.ranges?oi(e.cm,_.ranges,_.ranges.length-1):r}function uo(e,r,S){var _=e.history.done,F=Je(_);F&&F.ranges?(_[_.length-1]=r,zo(e,r,S)):Zn(e,r,S)}function Zn(e,r,S){zo(e,r,S),ku(e,e.sel,e.cm?e.cm.curOp.id:NaN,S)}function zo(e,r,S){(Me(e,"beforeSelectionChange")||e.cm&&Me(e.cm,"beforeSelectionChange"))&&(r=lo(e,r,S));var _=S&&S.bias||(be(r.primary().head,e.sel.primary().head)<0?-1:1);kl(e,Vo(e,r,_,!0)),!(S&&S.scroll===!1)&&e.cm&&Ma(e.cm)}function kl(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ke(e.cm)),Yr(e,"cursorActivity",e)}function ra(e){kl(e,Vo(e,e.sel,null,!1))}function Vo(e,r,S,_){for(var F,J=0;J<r.ranges.length;J++){var ae=r.ranges[J],ce=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[J],fe=Xo(e,ae.anchor,ce&&ce.anchor,S,_),ye=Xo(e,ae.head,ce&&ce.head,S,_);(F||fe!=ae.anchor||ye!=ae.head)&&(F||(F=r.ranges.slice(0,J)),F[J]=new nn(fe,ye))}return F?oi(e.cm,F,r.primIndex):r}function na(e,r,S,_,F){var J=jt(e,r.line);if(J.markedSpans)for(var ae=0;ae<J.markedSpans.length;++ae){var ce=J.markedSpans[ae],fe=ce.marker,ye="selectLeft"in fe?!fe.selectLeft:fe.inclusiveLeft,Ve="selectRight"in fe?!fe.selectRight:fe.inclusiveRight;if((ce.from==null||(ye?ce.from<=r.ch:ce.from<r.ch))&&(ce.to==null||(Ve?ce.to>=r.ch:ce.to>r.ch))){if(F&&(Ze(fe,"beforeCursorEnter"),fe.explicitlyCleared))if(J.markedSpans){--ae;continue}else break;if(!fe.atomic)continue;if(S){var Ye=fe.find(_<0?1:-1),vt=void 0;if((_<0?Ve:ye)&&(Ye=Us(e,Ye,-_,Ye&&Ye.line==r.line?J:null)),Ye&&Ye.line==r.line&&(vt=be(Ye,S))&&(_<0?vt<0:vt>0))return na(e,Ye,r,_,F)}var dt=fe.find(_<0?-1:1);return(_<0?ye:Ve)&&(dt=Us(e,dt,_,dt.line==r.line?J:null)),dt?na(e,dt,r,_,F):null}}return r}function Xo(e,r,S,_,F){var J=_||1,ae=na(e,r,S,J,F)||!F&&na(e,r,S,J,!0)||na(e,r,S,-J,F)||!F&&na(e,r,S,-J,!0);return ae||(e.cantEdit=!0,me(e.first,0))}function Us(e,r,S,_){return S<0&&r.ch==0?r.line>e.first?P(e,me(r.line-1)):null:S>0&&r.ch==(_||jt(e,r.line)).text.length?r.line<e.first+e.size-1?me(r.line+1,0):null:new me(r.line,r.ch+S)}function Nl(e){e.setSelection(me(e.firstLine(),0),me(e.lastLine()),ve)}function Yo(e,r,S){var _={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return _.canceled=!0}};return S&&(_.update=function(F,J,ae,ce){F&&(_.from=P(e,F)),J&&(_.to=P(e,J)),ae&&(_.text=ae),ce!==void 0&&(_.origin=ce)}),Ze(e,"beforeChange",e,_),e.cm&&Ze(e.cm,"beforeChange",e.cm,_),_.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:_.from,to:_.to,text:_.text,origin:_.origin}}function ka(e,r,S){if(e.cm){if(!e.cm.curOp)return kn(e.cm,ka)(e,r,S);if(e.cm.state.suppressEdits)return}if((Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"))&&(r=Yo(e,r,!0),!r))return;var _=hr&&!S&&_r(e,r.from,r.to);if(_)for(var F=_.length-1;F>=0;--F)Hl(e,{from:_[F].from,to:_[F].to,text:F?[""]:r.text,origin:r.origin});else Hl(e,r)}function Hl(e,r){if(r.text.length==1&&r.text[0]==""&&be(r.from,r.to)==0)return;var S=Os(e,r);Fl(e,r,S,e.cm?e.cm.curOp.id:NaN),Ao(e,r,S,hn(e,r));var _=[];ta(e,function(F,J){!J&&ne(_,F.history)==-1&&(Kl(F.history,r),_.push(F.history)),Ao(F,r,null,hn(F,r))})}function Jo(e,r,S){var _=e.cm&&e.cm.state.suppressEdits;if(_&&!S)return;for(var F=e.history,J,ae=e.sel,ce=r=="undo"?F.done:F.undone,fe=r=="undo"?F.undone:F.done,ye=0;ye<ce.length&&!(J=ce[ye],S?J.ranges&&!J.equals(e.sel):!J.ranges);ye++);if(ye==ce.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(J=ce.pop(),J.ranges){if(Go(J,fe),S&&!J.equals(e.sel)){Zn(e,J,{clearRedo:!1});return}ae=J}else if(_){ce.push(J);return}else break;var Ve=[];Go(ae,fe),fe.push({changes:Ve,generation:F.generation}),F.generation=J.generation||++F.maxGeneration;for(var Ye=Me(e,"beforeChange")||e.cm&&Me(e.cm,"beforeChange"),vt=function(Nt){var Kt=J.changes[Nt];if(Kt.origin=r,Ye&&!Yo(e,Kt,!1))return ce.length=0,{};Ve.push(Ls(e,Kt));var zt=Nt?Os(e,Kt):Je(ce);Ao(e,Kt,zt,ar(e,Kt)),!Nt&&e.cm&&e.cm.scrollIntoView({from:Kt.from,to:ea(Kt)});var $t=[];ta(e,function(Vt,ir){!ir&&ne($t,Vt.history)==-1&&(Kl(Vt.history,Kt),$t.push(Vt.history)),Ao(Vt,Kt,null,ar(Vt,Kt))})},dt=J.changes.length-1;dt>=0;--dt){var Ut=vt(dt);if(Ut)return Ut.v}}function Ql(e,r){if(r==0)return;if(e.first+=r,e.sel=new mi(Et(e.sel.ranges,function(F){return new nn(me(F.anchor.line+r,F.anchor.ch),me(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){ti(e.cm,e.first,e.first-r,r);for(var S=e.cm.display,_=S.viewFrom;_<S.viewTo;_++)ki(e.cm,_,"gutter")}}function Ao(e,r,S,_){if(e.cm&&!e.cm.curOp)return kn(e.cm,Ao)(e,r,S,_);if(r.to.line<e.first){Ql(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var F=r.text.length-1-(e.first-r.from.line);Ql(e,F),r={from:me(e.first,0),to:me(r.to.line+F,r.to.ch),text:[Je(r.text)],origin:r.origin}}var J=e.lastLine();r.to.line>J&&(r={from:r.from,to:me(J,jt(e,J).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Mr(e,r.from,r.to),S||(S=Os(e,r)),e.cm?Hu(e.cm,r,_):Rs(e,r,_),zo(e,S,ve),e.cantEdit&&Xo(e,me(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,r,S){var _=e.doc,F=e.display,J=r.from,ae=r.to,ce=!1,fe=J.line;e.options.lineWrapping||(fe=Ar(En(jt(_,J.line))),_.iter(fe,ae.line+1,function(dt){if(dt==F.maxLine)return ce=!0,!0})),_.sel.contains(r.from,r.to)>-1&&Ke(e),Rs(_,r,S,hl(e)),e.options.lineWrapping||(_.iter(fe,J.line+r.text.length,function(dt){var Ut=si(dt);Ut>F.maxLineLength&&(F.maxLine=dt,F.maxLineLength=Ut,F.maxLineChanged=!0,ce=!1)}),ce&&(e.curOp.updateMaxLine=!0)),Fr(_,J.line),va(e,400);var ye=r.text.length-(ae.line-J.line)-1;r.full?ti(e):J.line==ae.line&&r.text.length==1&&!Rl(e.doc,r)?ki(e,J.line,"text"):ti(e,J.line,ae.line+1,ye);var Ve=Me(e,"changes"),Ye=Me(e,"change");if(Ye||Ve){var vt={from:J,to:ae,text:r.text,removed:r.removed,origin:r.origin};Ye&&Yr(e,"change",e,vt),Ve&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(vt)}e.display.selForContextMenu=null}function Na(e,r,S,_,F){var J;_||(_=S),be(_,S)<0&&(J=[_,S],S=J[0],_=J[1]),typeof r=="string"&&(r=e.splitLines(r)),ka(e,{from:S,to:_,text:r,origin:F})}function jl(e,r,S,_){S<e.line?e.line+=_:r<e.line&&(e.line=r,e.ch=0)}function Ps(e,r,S,_){for(var F=0;F<e.length;++F){var J=e[F],ae=!0;if(J.ranges){J.copied||(J=e[F]=J.deepCopy(),J.copied=!0);for(var ce=0;ce<J.ranges.length;ce++)jl(J.ranges[ce].anchor,r,S,_),jl(J.ranges[ce].head,r,S,_);continue}for(var fe=0;fe<J.changes.length;++fe){var ye=J.changes[fe];if(S<ye.from.line)ye.from=me(ye.from.line+_,ye.from.ch),ye.to=me(ye.to.line+_,ye.to.ch);else if(r<=ye.to.line){ae=!1;break}}ae||(e.splice(0,F+1),F=0)}}function Kl(e,r){var S=r.from.line,_=r.to.line,F=r.text.length-(_-S)-1;Ps(e.done,S,_,F),Ps(e.undone,S,_,F)}function co(e,r,S,_){var F=r,J=r;return typeof r=="number"?J=jt(e,te(e,r)):F=Ar(r),F==null?null:(_(J,F)&&e.cm&&ki(e.cm,F,S),J)}function ho(e){this.lines=e,this.parent=null;for(var r=0,S=0;S<e.length;++S)e[S].parent=this,r+=e[S].height;this.height=r}ho.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var S=e,_=e+r;S<_;++S){var F=this.lines[S];this.height-=F.height,er(F),Yr(F,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,S){this.height+=S,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var _=0;_<r.length;++_)r[_].parent=this},iterN:function(e,r,S){for(var _=e+r;e<_;++e)if(S(this.lines[e]))return!0}};function Ha(e){this.children=e;for(var r=0,S=0,_=0;_<e.length;++_){var F=e[_];r+=F.chunkSize(),S+=F.height,F.parent=this}this.size=r,this.height=S,this.parent=null}Ha.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var S=0;S<this.children.length;++S){var _=this.children[S],F=_.chunkSize();if(e<F){var J=Math.min(r,F-e),ae=_.height;if(_.removeInner(e,J),this.height-=ae-_.height,F==J&&(this.children.splice(S--,1),_.parent=null),(r-=J)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof ho))){var ce=[];this.collapse(ce),this.children=[new ho(ce)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,S){this.size+=r.length,this.height+=S;for(var _=0;_<this.children.length;++_){var F=this.children[_],J=F.chunkSize();if(e<=J){if(F.insertInner(e,r,S),F.lines&&F.lines.length>50){for(var ae=F.lines.length%25+25,ce=ae;ce<F.lines.length;){var fe=new ho(F.lines.slice(ce,ce+=25));F.height-=fe.height,this.children.splice(++_,0,fe),fe.parent=this}F.lines=F.lines.slice(0,ae),this.maybeSpill()}break}e-=J}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),S=new Ha(r);if(e.parent){e.size-=S.size,e.height-=S.height;var F=ne(e.parent.children,e);e.parent.children.splice(F+1,0,S)}else{var _=new Ha(e.children);_.parent=e,e.children=[_,S],e=_}S.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,S){for(var _=0;_<this.children.length;++_){var F=this.children[_],J=F.chunkSize();if(e<J){var ae=Math.min(r,J-e);if(F.iterN(e,ae,S))return!0;if((r-=ae)==0)break;e=0}else e-=J}}};var fo=function(e,r,S){if(S)for(var _ in S)S.hasOwnProperty(_)&&(this[_]=S[_]);this.doc=e,this.node=r};fo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,S=this.line,_=Ar(S);if(_==null||!r)return;for(var F=0;F<r.length;++F)r[F]==this&&r.splice(F--,1);r.length||(S.widgets=null);var J=$a(this);Tr(S,Math.max(0,S.height-J)),e&&(hi(e,function(){po(e,S,-J),ki(e,_,"widget")}),Yr(e,"lineWidgetCleared",e,this,_))},fo.prototype.changed=function(){var e=this,r=this.height,S=this.doc.cm,_=this.line;this.height=null;var F=$a(this)-r;if(!F)return;In(this.doc,_)||Tr(_,_.height+F),S&&hi(S,function(){S.curOp.forceUpdate=!0,po(S,_,F),Yr(S,"lineWidgetChanged",S,e,Ar(_))})},Ue(fo);function po(e,r,S){Fn(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_s(e,S)}function Qu(e,r,S,_){var F=new fo(e,S,_),J=e.cm;return J&&F.noHScroll&&(J.display.alignWidgets=!0),co(e,r,"widget",function(ae){var ce=ae.widgets||(ae.widgets=[]);if(F.insertAt==null?ce.push(F):ce.splice(Math.min(ce.length-1,Math.max(0,F.insertAt)),0,F),F.line=ae,J&&!In(e,ae)){var fe=Fn(ae)<e.scrollTop;Tr(ae,ae.height+$a(F)),fe&&_s(J,F.height),J.curOp.forceUpdate=!0}return!0}),J&&Yr(J,"lineWidgetAdded",J,F,typeof r=="number"?r:Ar(r)),F}var $o=0,Li=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++$o};Li.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ma(e),Me(this,"clear")){var S=this.find();S&&Yr(this,"clear",S.from,S.to)}for(var _=null,F=null,J=0;J<this.lines.length;++J){var ae=this.lines[J],ce=Jr(ae.markedSpans,this);e&&!this.collapsed?ki(e,Ar(ae),"text"):e&&(ce.to!=null&&(F=Ar(ae)),ce.from!=null&&(_=Ar(ae))),ae.markedSpans=bn(ae.markedSpans,ce),ce.from==null&&this.collapsed&&!In(this.doc,ae)&&e&&Tr(ae,ha(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var fe=0;fe<this.lines.length;++fe){var ye=En(this.lines[fe]),Ve=si(ye);Ve>e.display.maxLineLength&&(e.display.maxLine=ye,e.display.maxLineLength=Ve,e.display.maxLineChanged=!0)}_!=null&&e&&this.collapsed&&ti(e,_,F+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,_,F),r&&ga(e),this.parent&&this.parent.clear()},Li.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var S,_,F=0;F<this.lines.length;++F){var J=this.lines[F],ae=Jr(J.markedSpans,this);if(ae.from!=null&&(S=me(r?J:Ar(J),ae.from),e==-1))return S;if(ae.to!=null&&(_=me(r?J:Ar(J),ae.to),e==1))return _}return S&&{from:S,to:_}},Li.prototype.changed=function(){var e=this,r=this.find(-1,!0),S=this,_=this.doc.cm;if(!r||!_)return;hi(_,function(){var F=r.line,J=Ar(r.line),ae=Aa(_,J);if(ae&&(vs(ae),_.curOp.selectionChanged=_.curOp.forceUpdate=!0),_.curOp.updateMaxLine=!0,!In(S.doc,F)&&S.height!=null){var ce=S.height;S.height=null;var fe=$a(S)-ce;fe&&Tr(F,F.height+fe)}Yr(_,"markerChanged",_,e)})},Li.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ne(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Li.prototype.detachLine=function(e){if(this.lines.splice(ne(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Ue(Li);function ya(e,r,S,_,F){if(_&&_.shared)return ju(e,r,S,_,F);if(e.cm&&!e.cm.curOp)return kn(e.cm,ya)(e,r,S,_,F);var J=new Li(e,F),ae=be(r,S);if(_&&L(_,J,!1),ae>0||ae==0&&J.clearWhenEmpty!==!1)return J;if(J.replacedWith&&(J.collapsed=!0,J.widgetNode=C("span",[J.replacedWith],"CodeMirror-widget"),_.handleMouseEvents||J.widgetNode.setAttribute("cm-ignore-events","true"),_.insertLeft&&(J.widgetNode.insertLeft=!0)),J.collapsed){if(zr(e,r.line,r,S,J)||r.line!=S.line&&zr(e,S.line,r,S,J))throw new Error("Inserting collapsed marker partially overlapping an existing one");cn()}J.addToHistory&&Fl(e,{from:r,to:S,origin:"markText"},e.sel,NaN);var ce=r.line,fe=e.cm,ye;if(e.iter(ce,S.line+1,function(Ye){fe&&J.collapsed&&!fe.options.lineWrapping&&En(Ye)==fe.display.maxLine&&(ye=!0),J.collapsed&&ce!=r.line&&Tr(Ye,0),qr(Ye,new Gr(J,ce==r.line?r.ch:null,ce==S.line?S.ch:null)),++ce}),J.collapsed&&e.iter(r.line,S.line+1,function(Ye){In(e,Ye)&&Tr(Ye,0)}),J.clearOnEnter&&ke(J,"beforeCursorEnter",function(){return J.clear()}),J.readOnly&&(Nr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),J.collapsed&&(J.id=++$o,J.atomic=!0),fe){if(ye&&(fe.curOp.updateMaxLine=!0),J.collapsed)ti(fe,r.line,S.line+1);else if(J.className||J.startStyle||J.endStyle||J.css||J.attributes||J.title)for(var Ve=r.line;Ve<=S.line;Ve++)ki(fe,Ve,"text");J.atomic&&ra(fe.doc),Yr(fe,"markerAdded",fe,J)}return J}var Qa=function(e,r){this.markers=e,this.primary=r;for(var S=0;S<e.length;++S)e[S].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,r){return this.primary.find(e,r)},Ue(Qa);function ju(e,r,S,_,F){_=L(_),_.shared=!1;var J=[ya(e,r,S,_,F)],ae=J[0],ce=_.widgetNode;return ta(e,function(fe){ce&&(_.widgetNode=ce.cloneNode(!0)),J.push(ya(fe,P(fe,r),P(fe,S),_,F));for(var ye=0;ye<fe.linked.length;++ye)if(fe.linked[ye].isParent)return;ae=Je(J)}),new Qa(J,ae)}function ks(e){return e.findMarks(me(e.first,0),e.clipPos(me(e.lastLine())),function(r){return r.parent})}function Ns(e,r){for(var S=0;S<r.length;S++){var _=r[S],F=_.find(),J=e.clipPos(F.from),ae=e.clipPos(F.to);if(be(J,ae)){var ce=ya(e,J,ae,_.primary,_.primary.type);_.markers.push(ce),ce.parent=_}}}function Hs(e){for(var r=function(_){var F=e[_],J=[F.primary.doc];ta(F.primary.doc,function(fe){return J.push(fe)});for(var ae=0;ae<F.markers.length;ae++){var ce=F.markers[ae];ne(J,ce.doc)==-1&&(ce.parent=null,F.markers.splice(ae--,1))}},S=0;S<e.length;S++)r(S)}var Wl=0,ni=function(e,r,S,_,F){if(!(this instanceof ni))return new ni(e,r,S,_,F);S==null&&(S=0),Ha.call(this,[new ho([new gn("",null)])]),this.first=S,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=S;var J=me(S,0);this.sel=qi(J),this.history=new Wo(null),this.id=++Wl,this.modeOption=r,this.lineSep=_,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Rs(this,{from:J,to:J,text:e}),Zn(this,qi(J),ve)};ni.prototype=st(Ha.prototype,{constructor:ni,iter:function(e,r,S){S?this.iterN(e-this.first,r-e,S):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var S=0,_=0;_<r.length;++_)S+=r[_].height;this.insertInner(e-this.first,r,S)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=br(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Gn(function(e){var r=me(this.first,0),S=this.first+this.size-1;ka(this,{from:r,to:me(S,jt(this,S).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zi(this.cm,0,0),Zn(this,qi(r),ve)}),replaceRange:function(e,r,S,_){r=P(this,r),S=S?P(this,S):r,Na(this,e,r,S,_)},getRange:function(e,r,S){var _=Mr(this,P(this,e),P(this,r));return S===!1?_:_.join(S||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(tn(this,e))return jt(this,e)},getLineNumber:function(e){return Ar(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=jt(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 P(this,e)},getCursor:function(e){var r=this.sel.primary(),S;return e==null||e=="head"?S=r.head:e=="anchor"?S=r.anchor:e=="end"||e=="to"||e===!1?S=r.to():S=r.from(),S},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Gn(function(e,r,S){Fs(this,P(this,typeof e=="number"?me(e,r||0):e),null,S)}),setSelection:Gn(function(e,r,S){Fs(this,P(this,e),P(this,r||e),S)}),extendSelection:Gn(function(e,r,S){Pa(this,P(this,e),r&&P(this,r),S)}),extendSelections:Gn(function(e,r){Bi(this,q(this,e),r)}),extendSelectionsBy:Gn(function(e,r){var S=Et(this.sel.ranges,e);Bi(this,q(this,S),r)}),setSelections:Gn(function(e,r,S){if(!e.length)return;for(var _=[],F=0;F<e.length;F++)_[F]=new nn(P(this,e[F].anchor),P(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Zn(this,oi(this.cm,_,r),S)}),addSelection:Gn(function(e,r,S){var _=this.sel.ranges.slice(0);_.push(new nn(P(this,e),P(this,r||e))),Zn(this,oi(this.cm,_,_.length-1),S)}),getSelection:function(e){for(var r=this.sel.ranges,S,_=0;_<r.length;_++){var F=Mr(this,r[_].from(),r[_].to());S=S?S.concat(F):F}return e===!1?S:S.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],S=this.sel.ranges,_=0;_<S.length;_++){var F=Mr(this,S[_].from(),S[_].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[_]=F}return r},replaceSelection:function(e,r,S){for(var _=[],F=0;F<this.sel.ranges.length;F++)_[F]=e;this.replaceSelections(_,r,S||"+input")},replaceSelections:Gn(function(e,r,S){for(var _=[],F=this.sel,J=0;J<F.ranges.length;J++){var ae=F.ranges[J];_[J]={from:ae.from(),to:ae.to(),text:this.splitLines(e[J]),origin:S}}for(var ce=r&&r!="end"&&Fu(this,_,r),fe=_.length-1;fe>=0;fe--)ka(this,_[fe]);ce?uo(this,ce):this.cm&&Ma(this.cm)}),undo:Gn(function(){Jo(this,"undo")}),redo:Gn(function(){Jo(this,"redo")}),undoSelection:Gn(function(){Jo(this,"undo",!0)}),redoSelection:Gn(function(){Jo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,S=0,_=0;_<e.done.length;_++)e.done[_].ranges||++r;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++S;return{undo:r,redo:S}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ta(this,function(r){return r.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 r=this.history=new Wo(this.history.maxGeneration);r.done=Ua(e.done.slice(0),null,!0),r.undone=Ua(e.undone.slice(0),null,!0)},setGutterMarker:Gn(function(e,r,S){return co(this,e,"gutter",function(_){var F=_.gutterMarkers||(_.gutterMarkers={});return F[r]=S,!S&&ee(F)&&(_.gutterMarkers=null),!0})}),clearGutter:Gn(function(e){var r=this;this.iter(function(S){S.gutterMarkers&&S.gutterMarkers[e]&&co(r,S,"gutter",function(){return S.gutterMarkers[e]=null,ee(S.gutterMarkers)&&(S.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!tn(this,e))return null;if(r=e,e=jt(this,e),!e)return null}else if(r=Ar(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Gn(function(e,r,S){return co(this,e,r=="gutter"?"gutter":"class",function(_){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!_[F])_[F]=S;else{if(w(S).test(_[F]))return!1;_[F]+=" "+S}return!0})}),removeLineClass:Gn(function(e,r,S){return co(this,e,r=="gutter"?"gutter":"class",function(_){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",J=_[F];if(J)if(S==null)_[F]=null;else{var ae=J.match(w(S));if(!ae)return!1;var ce=ae.index+ae[0].length;_[F]=J.slice(0,ae.index)+(!ae.index||ce==J.length?"":" ")+J.slice(ce)||null}else return!1;return!0})}),addLineWidget:Gn(function(e,r,S){return Qu(this,e,r,S)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,S){return ya(this,P(this,e),P(this,r),S,S&&S.type||"range")},setBookmark:function(e,r){var S={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=P(this,e),ya(this,e,e,S,"bookmark")},findMarksAt:function(e){e=P(this,e);var r=[],S=jt(this,e.line).markedSpans;if(S)for(var _=0;_<S.length;++_){var F=S[_];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,S){e=P(this,e),r=P(this,r);var _=[],F=e.line;return this.iter(e.line,r.line+1,function(J){var ae=J.markedSpans;if(ae)for(var ce=0;ce<ae.length;ce++){var fe=ae[ce];!(fe.to!=null&&F==e.line&&e.ch>=fe.to||fe.from==null&&F!=e.line||fe.from!=null&&F==r.line&&fe.from>=r.ch)&&(!S||S(fe.marker))&&_.push(fe.marker.parent||fe.marker)}++F}),_},getAllMarks:function(){var e=[];return this.iter(function(r){var S=r.markedSpans;if(S)for(var _=0;_<S.length;++_)S[_].from!=null&&e.push(S[_].marker)}),e},posFromIndex:function(e){var r,S=this.first,_=this.lineSeparator().length;return this.iter(function(F){var J=F.text.length+_;if(J>e)return r=e,!0;e-=J,++S}),P(this,me(S,r))},indexFromPos:function(e){e=P(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var S=this.lineSeparator().length;return this.iter(this.first,e.line,function(_){r+=_.text.length+S}),r},copy:function(e){var r=new ni(br(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,S=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<S&&(S=e.to);var _=new ni(br(this,r,S),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(_.history=this.history),(this.linked||(this.linked=[])).push({doc:_,sharedHist:e.sharedHist}),_.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(_,ks(this)),_},unlinkDoc:function(e){if(e instanceof wn&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var S=this.linked[r];if(S.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Hs(ks(this));break}if(e.history==this.history){var _=[e.id];ta(e,function(F){return _.push(F.id)},!0),e.history=new Wo(null),e.history.done=Ua(this.history.done,_),e.history.undone=Ua(this.history.undone,_)}},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):ht(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Gn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Uu(this.cm)})}),ni.prototype.eachLine=ni.prototype.iter;var Qs=0;function Gl(e){var r=this;if(zl(r),ot(r,e)||xi(r.display,e))return;ge(e),R&&(Qs=+new Date);var S=Yi(r,e,!0),_=e.dataTransfer.files;if(!S||r.isReadOnly())return;if(_&&_.length&&window.FileReader&&window.File)for(var F=_.length,J=Array(F),ae=0,ce=function(){++ae==F&&kn(r,function(){S=P(r.doc,S);var dt={from:S,to:S,text:r.doc.splitLines(J.filter(function(Ut){return Ut!=null}).join(r.doc.lineSeparator())),origin:"paste"};ka(r.doc,dt),uo(r.doc,qi(P(r.doc,S),P(r.doc,ea(dt))))})()},fe=function(dt,Ut){if(r.options.allowDropFileTypes&&ne(r.options.allowDropFileTypes,dt.type)==-1){ce();return}var Nt=new FileReader;Nt.onerror=function(){return ce()},Nt.onload=function(){var Kt=Nt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Kt)){ce();return}J[Ut]=Kt,ce()},Nt.readAsText(dt)},ye=0;ye<_.length;ye++)fe(_[ye],ye);else{if(r.state.draggingText&&r.doc.sel.contains(S)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Ve=e.dataTransfer.getData("Text");if(Ve){var Ye;if(r.state.draggingText&&!r.state.draggingText.copy&&(Ye=r.listSelections()),zo(r.doc,qi(S,S)),Ye)for(var vt=0;vt<Ye.length;++vt)Na(r.doc,"",Ye[vt].anchor,Ye[vt].head,"drag");r.replaceSelection(Ve,"around","paste"),r.display.input.focus()}}catch(dt){}}}function js(e,r){if(R&&(!e.state.draggingText||+new Date-Qs<100)){Oe(r);return}if(ot(e,r)||xi(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!h){var S=m("img",null,null,"position: fixed; left: 0; top: 0;");S.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(S.width=S.height=1,e.display.wrapper.appendChild(S),S._top=S.offsetTop),r.dataTransfer.setDragImage(S,0,0),A&&S.parentNode.removeChild(S)}}function Ku(e,r){var S=Yi(e,r);if(!S)return;var _=document.createDocumentFragment();ml(e,S,_),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),d(e.display.dragCursor,_)}function zl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),S=[],_=0;_<r.length;_++){var F=r[_].CodeMirror;F&&S.push(F)}S.length&&S[0].operation(function(){for(var J=0;J<S.length;J++)e(S[J])})}var gi=!1;function Ks(){if(gi)return;Wu(),gi=!0}function Wu(){var e;ke(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(Gu)},100))}),ke(window,"blur",function(){return Vl(Da)})}function Gu(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.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 Zo=65;Zo<=90;Zo++)ia[Zo]=String.fromCharCode(Zo);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 zu(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var S,_,F,J,ae=0;ae<r.length-1;ae++){var ce=r[ae];if(/^(cmd|meta|m)$/i.test(ce))J=!0;else if(/^a(lt)?$/i.test(ce))S=!0;else if(/^(c|ctrl|control)$/i.test(ce))_=!0;else if(/^s(hift)?$/i.test(ce))F=!0;else throw new Error("Unrecognized modifier name: "+ce)}return S&&(e="Alt-"+e),_&&(e="Ctrl-"+e),J&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Vu(e){var r={};for(var S in e)if(e.hasOwnProperty(S)){var _=e[S];if(/^(name|fallthrough|(de|at)tach)$/.test(S))continue;if(_=="..."){delete e[S];continue}for(var F=Et(S.split(" "),zu),J=0;J<F.length;J++){var ae=void 0,ce=void 0;J==F.length-1?(ce=F.join(" "),ae=_):(ce=F.slice(0,J+1).join(" "),ae="...");var fe=r[ce];if(!fe)r[ce]=ae;else if(fe!=ae)throw new Error("Inconsistent bindings for "+ce)}delete e[S]}for(var ye in r)e[ye]=r[ye];return e}function ba(e,r,S,_){r=Hn(r);var F=r.call?r.call(e,_):r[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&S(F))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return ba(e,r.fallthrough,S,_);for(var J=0;J<r.fallthrough.length;J++){var ae=ba(e,r.fallthrough[J],S,_);if(ae)return ae}}}function Xl(e){var r=typeof e=="string"?e:ia[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function qo(e,r,S){var _=e;return r.altKey&&_!="Alt"&&(e="Alt-"+e),(x?r.metaKey:r.ctrlKey)&&_!="Ctrl"&&(e="Ctrl-"+e),(x?r.ctrlKey:r.metaKey)&&_!="Mod"&&(e="Cmd-"+e),!S&&r.shiftKey&&_!="Shift"&&(e="Shift-"+e),e}function Ws(e,r){if(A&&e.keyCode==34&&e.char)return!1;var S=ia[e.keyCode];return S==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(S=e.code),qo(S,e,r))}function Hn(e){return typeof e=="string"?Qi[e]:e}function Di(e,r){for(var S=e.doc.sel.ranges,_=[],F=0;F<S.length;F++){for(var J=r(S[F]);_.length&&be(J.from,Je(_).to)<=0;){var ae=_.pop();if(be(ae.from,J.from)<0){J.from=ae.from;break}}_.push(J)}hi(e,function(){for(var ce=_.length-1;ce>=0;ce--)Na(e.doc,"",_[ce].from,_[ce].to,"+delete");Ma(e)})}function Gs(e,r,S){var _=Be(e.text,r+S,S);return _<0||_>e.text.length?null:_}function zs(e,r,S){var _=Gs(e,r.ch,S);return _==null?null:new me(r.line,_,S<0?"after":"before")}function es(e,r,S,_,F){if(e){r.doc.direction=="rtl"&&(F=-F);var J=It(S,r.doc.direction);if(J){var ae=F<0?Je(J):J[0],ce=F<0==(ae.level==1),fe=ce?"after":"before",ye;if(ae.level>0||r.doc.direction=="rtl"){var Ve=on(r,S);ye=F<0?S.text.length-1:0;var Ye=Ti(r,Ve,ye).top;ye=nt(function(vt){return Ti(r,Ve,vt).top==Ye},F<0==(ae.level==1)?ae.from:ae.to-1,ye),fe=="before"&&(ye=Gs(S,ye,1))}else ye=F<0?ae.to:ae.from;return new me(_,ye,fe)}}return new me(_,F<0?S.text.length:0,F<0?"before":"after")}function Vs(e,r,S,_){var F=It(r,e.doc.direction);if(!F)return zs(r,S,_);S.ch>=r.text.length?(S.ch=r.text.length,S.sticky="before"):S.ch<=0&&(S.ch=0,S.sticky="after");var J=ft(F,S.ch,S.sticky),ae=F[J];if(e.doc.direction=="ltr"&&ae.level%2==0&&(_>0?ae.to>S.ch:ae.from<S.ch))return zs(r,S,_);var ce=function(zt,$t){return Gs(r,zt instanceof me?zt.ch:zt,$t)},fe,ye=function(zt){return e.options.lineWrapping?(fe=fe||on(e,r),Al(e,r,fe,zt)):{begin:0,end:r.text.length}},Ve=ye(S.sticky=="before"?ce(S,-1):S.ch);if(e.doc.direction=="rtl"||ae.level==1){var Ye=ae.level==1==_<0,vt=ce(S,Ye?1:-1);if(vt!=null&&(Ye?vt<=ae.to&&vt<=Ve.end:vt>=ae.from&&vt>=Ve.begin)){var dt=Ye?"before":"after";return new me(S.line,vt,dt)}}var Ut=function(zt,$t,Vt){for(var ir=function(yn,zn){return zn?new me(S.line,ce(yn,1),"before"):new me(S.line,yn,"after")};zt>=0&&zt<F.length;zt+=$t){var Cr=F[zt],pr=$t>0==(Cr.level!=1),kr=pr?Vt.begin:ce(Vt.end,-1);if(Cr.from<=kr&&kr<Cr.to)return ir(kr,pr);if(kr=pr?Cr.from:ce(Cr.to,-1),Vt.begin<=kr&&kr<Vt.end)return ir(kr,pr)}},Nt=Ut(J+_,_,Ve);if(Nt)return Nt;var Kt=_>0?Ve.end:ce(Ve.begin,-1);return Kt!=null&&!(_>0&&Kt==r.text.length)&&(Nt=Ut(_>0?0:F.length-1,_,ye(Kt)),Nt)?Nt:null}var vo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ve)},killLine:function(e){return Di(e,function(r){if(r.empty()){var S=jt(e.doc,r.head.line).text.length;return r.head.ch==S&&r.head.line<e.lastLine()?{from:r.head,to:me(r.head.line+1,0)}:{from:r.head,to:me(r.head.line,S)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Di(e,function(r){return{from:me(r.from().line,0),to:P(e.doc,me(r.to().line+1,0))}})},delLineLeft:function(e){return Di(e,function(r){return{from:me(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Di(e,function(r){var S=e.charCoords(r.head,"div").top+5,_=e.coordsChar({left:0,top:S},"div");return{from:_,to:r.from()}})},delWrappedLineRight:function(e){return Di(e,function(r){var S=e.charCoords(r.head,"div").top+5,_=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:S},"div");return{from:r.from(),to:_}})},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(me(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(me(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Yl(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Jl(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Xu(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:S},"div")},De)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:S},"div")},De)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5,_=e.coordsChar({left:0,top:S},"div");return _.ch<e.getLine(_.line).search(/\S/)?Jl(e,r.head):_},De)},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 r=[],S=e.listSelections(),_=e.options.tabSize,F=0;F<S.length;F++){var J=S[F].from(),ae=$(e.getLine(J.line),J.ch,_);r.push(Ie(_-ae%_))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var r=e.listSelections(),S=[],_=0;_<r.length;_++){if(!r[_].empty())continue;var F=r[_].head,J=jt(e.doc,F.line).text;if(J){if(F.ch==J.length&&(F=new me(F.line,F.ch-1)),F.ch>0)F=new me(F.line,F.ch+1),e.replaceRange(J.charAt(F.ch-1)+J.charAt(F.ch-2),me(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var ae=jt(e.doc,F.line-1).text;ae&&(F=new me(F.line,1),e.replaceRange(J.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),me(F.line-1,ae.length-1),F,"+transpose"))}}S.push(new nn(F,F))}e.setSelections(S)})},newlineAndIndent:function(e){return hi(e,function(){for(var r=e.listSelections(),S=r.length-1;S>=0;S--)e.replaceRange(e.doc.lineSeparator(),r[S].anchor,r[S].head,"+input");r=e.listSelections();for(var _=0;_<r.length;_++)e.indentLine(r[_].from().line,null,!0);Ma(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,r){var S=jt(e.doc,r),_=En(S);return _!=S&&(r=Ar(_)),es(!0,e,_,r,1)}function Xu(e,r){var S=jt(e.doc,r),_=Qn(S);return _!=S&&(r=Ar(_)),es(!0,e,S,r,-1)}function Jl(e,r){var S=Yl(e,r.line),_=jt(e.doc,S.line),F=It(_,e.doc.direction);if(!F||F[0].level==0){var J=Math.max(S.ch,_.text.search(/\S/)),ae=r.line==S.line&&r.ch<=J&&r.ch;return me(S.line,ae?0:J,S.sticky)}return S}function ts(e,r,S){if(typeof r=="string"&&(r=vo[r],!r))return!1;e.display.input.ensurePolled();var _=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),S&&(e.display.shift=!1),F=r(e)!=_e}finally{e.display.shift=_,e.state.suppressEdits=!1}return F}function Yu(e,r,S){for(var _=0;_<e.state.keyMaps.length;_++){var F=ba(r,e.state.keyMaps[_],S,e);if(F)return F}return e.options.extraKeys&&ba(r,e.options.extraKeys,S,e)||ba(r,e.options.keyMap,S,e)}var Ju=new Y;function yo(e,r,S,_){var F=e.state.keySeq;if(F){if(Xl(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,F+" "+r,S,_))return!0}return Xs(e,r,S,_)}function Xs(e,r,S,_){var F=Yu(e,r,_);return F=="multi"&&(e.state.keySeq=r),F=="handled"&&Yr(e,"keyHandled",e,r,S),(F=="handled"||F=="multi")&&(ge(S),Fo(e)),!!F}function Ys(e,r){var S=Ws(r,!0);return S?r.shiftKey&&!e.state.keySeq?yo(e,"Shift-"+S,r,function(_){return ts(e,_,!0)})||yo(e,S,r,function(_){if(typeof _=="string"?/^go[A-Z]/.test(_):_.motion)return ts(e,_)}):yo(e,S,r,function(_){return ts(e,_)}):!1}function $l(e,r,S){return yo(e,"'"+S+"'",r,function(_){return ts(e,_,!0)})}var rs=null;function ns(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=U(),ot(r,e))return;R&&b<11&&e.keyCode==27&&(e.returnValue=!1);var S=e.keyCode;r.display.shift=S==16||e.shiftKey;var _=Ys(r,e);A&&(rs=_?S:null,!_&&S==88&&!et&&(a?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),O&&!a&&!_&&S==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),S==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&$u(r)}function $u(e){var r=e.display.lineDiv;k(r,"CodeMirror-crosshair");function S(_){(_.keyCode==18||!_.altKey)&&(p(r,"CodeMirror-crosshair"),gt(document,"keyup",S),gt(document,"mouseover",S))}ke(document,"keyup",S),ke(document,"mouseover",S)}function Zl(e){e.keyCode==16&&(this.doc.sel.shift=!1),ot(this,e)}function ql(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(xi(r.display,e)||ot(r,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var S=e.keyCode,_=e.charCode;if(A&&S==rs){rs=null,ge(e);return}if(A&&(!e.which||e.which<10)&&Ys(r,e))return;var F=String.fromCharCode(_==null?S:_);if(F=="\b")return;if($l(r,e,F))return;r.display.input.onKeyPress(e)}var Zu=400,ja=function(e,r,S){this.time=e,this.pos=r,this.button=S};ja.prototype.compare=function(e,r,S){return this.time+Zu>e&&be(r,this.pos)==0&&S==this.button};var aa,bo;function eu(e,r){var S=+new Date;return bo&&bo.compare(S,e,r)?(aa=bo=null,"triple"):aa&&aa.compare(S,e,r)?(bo=new ja(S,e,r),aa=null,"double"):(aa=new ja(S,e,r),bo=null,"single")}function is(e){var r=this,S=r.display;if(ot(r,e)||S.activeTouch&&S.input.supportsTouch())return;if(S.input.ensurePolled(),S.shift=e.shiftKey,xi(S,e)){t||(S.scroller.draggable=!1,setTimeout(function(){return S.scroller.draggable=!0},100));return}if(Js(r,e))return;var _=Yi(r,e),F=$e(e),J=_?eu(_,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),_&&tu(r,F,_,J,e))return;F==1?_?nu(r,_,J,e):Fe(e)==S.scroller&&ge(e):F==2?(_&&Pa(r.doc,_),setTimeout(function(){return S.input.focus()},20)):F==3&&(D?r.display.input.onContextMenu(e):vl(r))}function tu(e,r,S,_,F){var J="Click";return _=="double"?J="Double"+J:_=="triple"&&(J="Triple"+J),J=(r==1?"Left":r==2?"Middle":"Right")+J,yo(e,qo(J,F),F,function(ae){if(typeof ae=="string"&&(ae=vo[ae]),!ae)return!1;var ce=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),ce=ae(e,S)!=_e}finally{e.state.suppressEdits=!1}return ce})}function ru(e,r,S){var _=e.getOption("configureMouse"),F=_?_(e,r,S):{};if(F.unit==null){var J=u?S.shiftKey&&S.metaKey:S.altKey;F.unit=J?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||S.shiftKey),F.addNew==null&&(F.addNew=a?S.metaKey:S.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(a?S.altKey:S.ctrlKey)),F}function nu(e,r,S,_){R?setTimeout(G(gl,e),0):e.curOp.focus=U();var F=ru(e,S,_),J=e.doc.sel,ae;e.options.dragDrop&&pt&&!e.isReadOnly()&&S=="single"&&(ae=J.contains(r))>-1&&(be((ae=J.ranges[ae]).from(),r)<0||r.xRel>0)&&(be(ae.to(),r)>0||r.xRel<0)?qu(e,_,r,F):iu(e,_,r,F)}function qu(e,r,S,_){var F=e.display,J=!1,ae=kn(e,function(ye){t&&(F.scroller.draggable=!1),e.state.draggingText=!1,gt(F.wrapper.ownerDocument,"mouseup",ae),gt(F.wrapper.ownerDocument,"mousemove",ce),gt(F.scroller,"dragstart",fe),gt(F.scroller,"drop",ae),J||(ge(ye),_.addNew||Pa(e.doc,S,null,null,_.extend),t&&!h||R&&b==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),ce=function(ye){J=J||Math.abs(r.clientX-ye.clientX)+Math.abs(r.clientY-ye.clientY)>=10},fe=function(){return J=!0};t&&(F.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!_.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),ke(F.wrapper.ownerDocument,"mouseup",ae),ke(F.wrapper.ownerDocument,"mousemove",ce),ke(F.scroller,"dragstart",fe),ke(F.scroller,"drop",ae),vl(e),setTimeout(function(){return F.input.focus()},20)}function Eo(e,r,S){if(S=="char")return new nn(r,r);if(S=="word")return e.findWordAt(r);if(S=="line")return new nn(me(r.line,0),P(e.doc,me(r.line+1,0)));var _=S(e,r);return new nn(_.from,_.to)}function iu(e,r,S,_){var F=e.display,J=e.doc;ge(r);var ae,ce,fe=J.sel,ye=fe.ranges;if(_.addNew&&!_.extend?(ce=J.sel.contains(S),ce>-1?ae=ye[ce]:ae=new nn(S,S)):(ae=J.sel.primary(),ce=J.sel.primIndex),_.unit=="rectangle")_.addNew||(ae=new nn(S,S)),S=Yi(e,r,!0,!0),ce=-1;else{var Ve=Eo(e,S,_.unit);_.extend?ae=Ds(ae,Ve.anchor,Ve.head,_.extend):ae=Ve}_.addNew?ce==-1?(ce=ye.length,Zn(J,oi(e,ye.concat([ae]),ce),{scroll:!1,origin:"*mouse"})):ye.length>1&&ye[ce].empty()&&_.unit=="char"&&!_.extend?(Zn(J,oi(e,ye.slice(0,ce).concat(ye.slice(ce+1)),0),{scroll:!1,origin:"*mouse"}),fe=J.sel):Ms(J,ce,ae,Ce):(ce=0,Zn(J,new mi([ae],0),Ce),fe=J.sel);var Ye=S;function vt(Vt){if(be(Ye,Vt)==0)return;if(Ye=Vt,_.unit=="rectangle"){for(var ir=[],Cr=e.options.tabSize,pr=$(jt(J,S.line).text,S.ch,Cr),kr=$(jt(J,Vt.line).text,Vt.ch,Cr),yn=Math.min(pr,kr),zn=Math.max(pr,kr),Bn=Math.min(S.line,Vt.line),di=Math.min(e.lastLine(),Math.max(S.line,Vt.line));Bn<=di;Bn++){var qn=jt(J,Bn).text,Mn=Qe(qn,yn,Cr);yn==zn?ir.push(new nn(me(Bn,Mn),me(Bn,Mn))):qn.length>Mn&&ir.push(new nn(me(Bn,Mn),me(Bn,Qe(qn,zn,Cr))))}ir.length||ir.push(new nn(S,S)),Zn(J,oi(e,fe.ranges.slice(0,ce).concat(ir),ce),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Vt)}else{var ei=ae,Yn=Eo(e,Vt,_.unit),Gt=ei.anchor,Cn;be(Yn.anchor,Gt)>0?(Cn=Yn.head,Gt=Ft(ei.from(),Yn.anchor)):(Cn=Yn.anchor,Gt=qe(ei.to(),Yn.head));var Tn=fe.ranges.slice(0);Tn[ce]=au(e,new nn(P(J,Gt),Cn)),Zn(J,oi(e,Tn,ce),Ce)}}var dt=F.wrapper.getBoundingClientRect(),Ut=0;function Nt(Vt){var ir=++Ut,Cr=Yi(e,Vt,!0,_.unit=="rectangle");if(!Cr)return;if(be(Cr,Ye)!=0){e.curOp.focus=U(),vt(Cr);var pr=Po(F,J);(Cr.line>=pr.to||Cr.line<pr.from)&&setTimeout(kn(e,function(){Ut==ir&&Nt(Vt)}),150)}else{var kr=Vt.clientY<dt.top?-20:Vt.clientY>dt.bottom?20:0;kr&&setTimeout(kn(e,function(){if(Ut!=ir)return;F.scroller.scrollTop+=kr,Nt(Vt)}),50)}}function Kt(Vt){e.state.selectingText=!1,Ut=Infinity,Vt&&(ge(Vt),F.input.focus()),gt(F.wrapper.ownerDocument,"mousemove",zt),gt(F.wrapper.ownerDocument,"mouseup",$t),J.history.lastSelOrigin=null}var zt=kn(e,function(Vt){Vt.buttons===0||!$e(Vt)?Kt(Vt):Nt(Vt)}),$t=kn(e,Kt);e.state.selectingText=$t,ke(F.wrapper.ownerDocument,"mousemove",zt),ke(F.wrapper.ownerDocument,"mouseup",$t)}function au(e,r){var S=r.anchor,_=r.head,F=jt(e.doc,S.line);if(be(S,_)==0&&S.sticky==_.sticky)return r;var J=It(F);if(!J)return r;var ae=ft(J,S.ch,S.sticky),ce=J[ae];if(ce.from!=S.ch&&ce.to!=S.ch)return r;var fe=ae+(ce.from==S.ch==(ce.level!=1)?0:1);if(fe==0||fe==J.length)return r;var ye;if(_.line!=S.line)ye=(_.line-S.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ve=ft(J,_.ch,_.sticky),Ye=Ve-ae||(_.ch-S.ch)*(ce.level==1?-1:1);Ve==fe-1||Ve==fe?ye=Ye<0:ye=Ye>0}var vt=J[fe+(ye?-1:0)],dt=ye==(vt.level==1),Ut=dt?vt.from:vt.to,Nt=dt?"after":"before";return S.ch==Ut&&S.sticky==Nt?r:new nn(new me(S.line,Ut,Nt),_)}function ou(e,r,S,_){var F,J;if(r.touches)F=r.touches[0].clientX,J=r.touches[0].clientY;else try{F=r.clientX,J=r.clientY}catch(vt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;_&&ge(r);var ae=e.display,ce=ae.lineDiv.getBoundingClientRect();if(J>ce.bottom||!Me(e,S))return Ee(r);J-=ce.top-ae.viewOffset;for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ye=ae.gutters.childNodes[fe];if(ye&&ye.getBoundingClientRect().right>=F){var Ve=Sr(e.doc,J),Ye=e.display.gutterSpecs[fe];return Ze(e,S,e,Ve,Ye.className,r),Ee(r)}}}function Js(e,r){return ou(e,r,"gutterClick",!0)}function $s(e,r){if(xi(e.display,r)||Ka(e,r))return;if(ot(e,r,"contextmenu"))return;D||e.display.input.onContextMenu(r)}function Ka(e,r){return Me(e,"gutterContextMenu")?ou(e,r,"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 r=e.optionHandlers;function S(_,F,J,ae){e.defaults[_]=F,J&&(r[_]=ae?function(ce,fe,ye){ye!=ji&&J(ce,fe,ye)}:J)}e.defineOption=S,e.Init=ji,S("value","",function(_,F){return _.setValue(F)},!0),S("mode",null,function(_,F){_.doc.modeOption=F,Is(_)},!0),S("indentUnit",2,Is,!0),S("indentWithTabs",!1),S("smartIndent",!0),S("tabSize",4,function(_){so(_),bi(_),ti(_)},!0),S("lineSeparator",null,function(_,F){if(_.doc.lineSep=F,!F)return;var J=[],ae=_.doc.first;_.doc.iter(function(fe){for(var ye=0;;){var Ve=fe.text.indexOf(F,ye);if(Ve==-1)break;ye=Ve+F.length,J.push(me(ae,Ve))}ae++});for(var ce=J.length-1;ce>=0;ce--)Na(_.doc,F,J[ce],me(J[ce].line,J[ce].ch+F.length))}),S("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(_,F,J){_.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),J!=ji&&_.refresh()}),S("specialCharPlaceholder",Xr,function(_){return _.refresh()},!0),S("electricChars",!0),S("inputStyle",c?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),S("spellcheck",!1,function(_,F){return _.getInputField().spellcheck=F},!0),S("autocorrect",!1,function(_,F){return _.getInputField().autocorrect=F},!0),S("autocapitalize",!1,function(_,F){return _.getInputField().autocapitalize=F},!0),S("rtlMoveVisually",!v),S("wholeLineUpdateBefore",!0),S("theme","default",function(_){as(_),oo(_)},!0),S("keyMap","default",function(_,F,J){var ae=Hn(F),ce=J!=ji&&Hn(J);ce&&ce.detach&&ce.detach(_,ae),ae.attach&&ae.attach(_,ce||null)}),S("extraKeys",null),S("configureMouse",null),S("lineWrapping",!1,lu,!0),S("gutters",[],function(_,F){_.display.gutterSpecs=Ss(F,_.options.lineNumbers),oo(_)},!0),S("fixedGutter",!0,function(_,F){_.display.gutters.style.left=F?Ra(_.display)+"px":"0",_.refresh()},!0),S("coverGutterNextToScrollbar",!1,function(_){return Hi(_)},!0),S("scrollbarStyle","native",function(_){wl(_),Hi(_),_.display.scrollbars.setScrollTop(_.doc.scrollTop),_.display.scrollbars.setScrollLeft(_.doc.scrollLeft)},!0),S("lineNumbers",!1,function(_,F){_.display.gutterSpecs=Ss(_.options.gutters,F),oo(_)},!0),S("firstLineNumber",1,oo,!0),S("lineNumberFormatter",function(_){return _},oo,!0),S("showCursorWhenSelecting",!1,$i,!0),S("resetSelectionOnContextMenu",!0),S("lineWiseCopyCut",!0),S("pasteLinesPerSelection",!0),S("selectionsMayTouch",!1),S("readOnly",!1,function(_,F){F=="nocursor"&&(Da(_),_.display.input.blur()),_.display.input.readOnlyChanged(F)}),S("screenReaderLabel",null,function(_,F){F=F===""?null:F,_.display.input.screenReaderLabelChanged(F)}),S("disableInput",!1,function(_,F){F||_.display.input.reset()},!0),S("dragDrop",!0,tA),S("allowDropFileTypes",null),S("cursorBlinkRate",530),S("cursorScrollMargin",0),S("cursorHeight",1,$i,!0),S("singleCursorHeightPerLine",!0,$i,!0),S("workTime",100),S("workDelay",100),S("flattenSpans",!0,so,!0),S("addModeClass",!1,so,!0),S("pollInterval",100),S("undoDepth",200,function(_,F){return _.doc.history.undoDepth=F}),S("historyEventDelay",1250),S("viewportMargin",10,function(_){return _.refresh()},!0),S("maxHighlightLength",1e4,so,!0),S("moveInputWithCursor",!0,function(_,F){F||_.display.input.resetPosition()}),S("tabindex",null,function(_,F){return _.display.input.getField().tabIndex=F||""}),S("autofocus",null),S("direction","ltr",function(_,F){return _.doc.setDirection(F)},!0),S("phrases",null)}function tA(e,r,S){var _=S&&S!=ji;if(!r!=!_){var F=e.display.dragFunctions,J=r?ke:gt;J(e.display.scroller,"dragstart",F.start),J(e.display.scroller,"dragenter",F.enter),J(e.display.scroller,"dragover",F.over),J(e.display.scroller,"dragleave",F.leave),J(e.display.scroller,"drop",F.drop)}}function lu(e){e.options.lineWrapping?(k(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(p(e.display.wrapper,"CodeMirror-wrap"),Un(e)),Mo(e),ti(e),bi(e),setTimeout(function(){return Hi(e)},100)}function wn(e,r){var S=this;if(!(this instanceof wn))return new wn(e,r);this.options=r=r?L(r):{},L(su,r,!1);var _=r.value;typeof _=="string"?_=new ni(_,r.mode,null,r.lineSeparator,r.direction):r.mode&&(_.modeOption=r.mode),this.doc=_;var F=new wn.inputStyles[r.inputStyle](this),J=this.display=new Mu(e,_,F,r);J.wrapper.CodeMirror=this,as(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wl(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 Y,keySeq:null,specialChars:null},r.autofocus&&!c&&J.input.focus(),R&&b<11&&setTimeout(function(){return S.display.input.reset(!0)},20),uu(this),Ks(),ma(this),this.curOp.forceUpdate=!0,Nn(this,_),r.autofocus&&!c||this.hasFocus()?setTimeout(function(){S.hasFocus()&&!S.state.focused&&Es(S)},20):Da(this);for(var ae in os)os.hasOwnProperty(ae)&&os[ae](this,r[ae],ji);Cl(this),r.finishInit&&r.finishInit(this);for(var ce=0;ce<ss.length;++ce)ss[ce](this);ga(this),t&&r.lineWrapping&&getComputedStyle(J.lineDiv).textRendering=="optimizelegibility"&&(J.lineDiv.style.textRendering="auto")}wn.defaults=su,wn.optionHandlers=os;function uu(e){var r=e.display;ke(r.scroller,"mousedown",kn(e,is)),R&&b<11?ke(r.scroller,"dblclick",kn(e,function(fe){if(ot(e,fe))return;var ye=Yi(e,fe);if(!ye||Js(e,fe)||xi(e.display,fe))return;ge(fe);var Ve=e.findWordAt(ye);Pa(e.doc,Ve.anchor,Ve.head)})):ke(r.scroller,"dblclick",function(fe){return ot(e,fe)||ge(fe)}),ke(r.scroller,"contextmenu",function(fe){return $s(e,fe)}),ke(r.input.getField(),"contextmenu",function(fe){r.scroller.contains(fe.target)||$s(e,fe)});var S,_={end:0};function F(){r.activeTouch&&(S=setTimeout(function(){return r.activeTouch=null},1e3),_=r.activeTouch,_.end=+new Date)}function J(fe){if(fe.touches.length!=1)return!1;var ye=fe.touches[0];return ye.radiusX<=1&&ye.radiusY<=1}function ae(fe,ye){if(ye.left==null)return!0;var Ve=ye.left-fe.left,Ye=ye.top-fe.top;return Ve*Ve+Ye*Ye>20*20}ke(r.scroller,"touchstart",function(fe){if(!ot(e,fe)&&!J(fe)&&!Js(e,fe)){r.input.ensurePolled(),clearTimeout(S);var ye=+new Date;r.activeTouch={start:ye,moved:!1,prev:ye-_.end<=300?_:null},fe.touches.length==1&&(r.activeTouch.left=fe.touches[0].pageX,r.activeTouch.top=fe.touches[0].pageY)}}),ke(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),ke(r.scroller,"touchend",function(fe){var ye=r.activeTouch;if(ye&&!xi(r,fe)&&ye.left!=null&&!ye.moved&&new Date-ye.start<300){var Ve=e.coordsChar(r.activeTouch,"page"),Ye;!ye.prev||ae(ye,ye.prev)?Ye=new nn(Ve,Ve):!ye.prev.prev||ae(ye,ye.prev.prev)?Ye=e.findWordAt(Ve):Ye=new nn(me(Ve.line,0),P(e.doc,me(Ve.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),ge(fe)}F()}),ke(r.scroller,"touchcancel",F),ke(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ro(e,r.scroller.scrollTop),fa(e,r.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),ke(r.scroller,"mousewheel",function(fe){return Ol(e,fe)}),ke(r.scroller,"DOMMouseScroll",function(fe){return Ol(e,fe)}),ke(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(fe){ot(e,fe)||Oe(fe)},over:function(fe){ot(e,fe)||(Ku(e,fe),Oe(fe))},start:function(fe){return js(e,fe)},drop:kn(e,Gl),leave:function(fe){ot(e,fe)||zl(e)}};var ce=r.input.getField();ke(ce,"keyup",function(fe){return Zl.call(e,fe)}),ke(ce,"keydown",kn(e,ns)),ke(ce,"keypress",kn(e,ql)),ke(ce,"focus",function(fe){return Es(e,fe)}),ke(ce,"blur",function(fe){return Da(e,fe)})}var ss=[];wn.defineInitHook=function(e){return ss.push(e)};function Ea(e,r,S,_){var F=e.doc,J;S==null&&(S="add"),S=="smart"&&(F.mode.indent?J=Pt(e,r).state:S="prev");var ae=e.options.tabSize,ce=jt(F,r),fe=$(ce.text,null,ae);ce.stateAfter&&(ce.stateAfter=null);var ye=ce.text.match(/^\s*/)[0],Ve;if(!_&&!/\S/.test(ce.text))Ve=0,S="not";else if(S=="smart"&&(Ve=F.mode.indent(J,ce.text.slice(ye.length),ce.text),Ve==_e||Ve>150)){if(!_)return;S="prev"}S=="prev"?r>F.first?Ve=$(jt(F,r-1).text,null,ae):Ve=0:S=="add"?Ve=fe+e.options.indentUnit:S=="subtract"?Ve=fe-e.options.indentUnit:typeof S=="number"&&(Ve=fe+S),Ve=Math.max(0,Ve);var Ye="",vt=0;if(e.options.indentWithTabs)for(var dt=Math.floor(Ve/ae);dt;--dt)vt+=ae,Ye+=" ";if(vt<Ve&&(Ye+=Ie(Ve-vt)),Ye!=ye)return Na(F,Ye,me(r,0),me(r,ye.length),"+input"),ce.stateAfter=null,!0;for(var Ut=0;Ut<F.sel.ranges.length;Ut++){var Nt=F.sel.ranges[Ut];if(Nt.head.line==r&&Nt.head.ch<ye.length){var Kt=me(r,ye.length);Ms(F,Ut,new nn(Kt,Kt));break}}}var wi=null;function wo(e){wi=e}function Zs(e,r,S,_,F){var J=e.doc;e.display.shift=!1,_||(_=J.sel);var ae=+new Date-200,ce=F=="paste"||e.state.pasteIncoming>ae,fe=ht(r),ye=null;if(ce&&_.ranges.length>1)if(wi&&wi.text.join(`
`)==r){if(_.ranges.length%wi.text.length==0){ye=[];for(var Ve=0;Ve<wi.text.length;Ve++)ye.push(J.splitLines(wi.text[Ve]))}}else fe.length==_.ranges.length&&e.options.pasteLinesPerSelection&&(ye=Et(fe,function(zt){return[zt]}));for(var Ye=e.curOp.updateInput,vt=_.ranges.length-1;vt>=0;vt--){var dt=_.ranges[vt],Ut=dt.from(),Nt=dt.to();dt.empty()&&(S&&S>0?Ut=me(Ut.line,Ut.ch-S):e.state.overwrite&&!ce?Nt=me(Nt.line,Math.min(jt(J,Nt.line).text.length,Nt.ch+Je(fe).length)):ce&&wi&&wi.lineWise&&wi.text.join(`
`)==fe.join(`
`)&&(Ut=Nt=me(Ut.line,0)));var Kt={from:Ut,to:Nt,text:ye?ye[vt%ye.length]:fe,origin:F||(ce?"paste":e.state.cutIncoming>ae?"cut":"+input")};ka(e.doc,Kt),Yr(e,"inputRead",e,Kt)}r&&!ce&&xo(e,r),Ma(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function _o(e,r){var S=e.clipboardData&&e.clipboardData.getData("Text");if(S)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&hi(r,function(){return Zs(r,S,0,null,"paste")}),!0}function xo(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var S=e.doc.sel,_=S.ranges.length-1;_>=0;_--){var F=S.ranges[_];if(F.head.ch>100||_&&S.ranges[_-1].head.line==F.head.line)continue;var J=e.getModeAt(F.head),ae=!1;if(J.electricChars){for(var ce=0;ce<J.electricChars.length;ce++)if(r.indexOf(J.electricChars.charAt(ce))>-1){ae=Ea(e,F.head.line,"smart");break}}else J.electricInput&&(J.electricInput.test(jt(e.doc,F.head.line).text.slice(0,F.head.ch))&&(ae=Ea(e,F.head.line,"smart")));ae&&Yr(e,"electricInput",e,F.head.line)}}function qs(e){for(var r=[],S=[],_=0;_<e.doc.sel.ranges.length;_++){var F=e.doc.sel.ranges[_].head.line,J={anchor:me(F,0),head:me(F+1,0)};S.push(J),r.push(e.getRange(J.anchor,J.head))}return{text:r,ranges:S}}function el(e,r,S,_){e.setAttribute("autocorrect",S?"":"off"),e.setAttribute("autocapitalize",_?"":"off"),e.setAttribute("spellcheck",!!r)}function Au(){var e=m("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=m("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),f&&(e.style.border="1px solid black"),el(e),r}function cu(e){var r=e.optionHandlers,S=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(_,F){var J=this.options,ae=J[_];if(J[_]==F&&_!="mode")return;J[_]=F,r.hasOwnProperty(_)&&kn(this,r[_])(this,F,ae),Ze(this,"optionChange",this,_)},getOption:function(_){return this.options[_]},getDoc:function(){return this.doc},addKeyMap:function(_,F){this.state.keyMaps[F?"push":"unshift"](Hn(_))},removeKeyMap:function(_){for(var F=this.state.keyMaps,J=0;J<F.length;++J)if(F[J]==_||F[J].name==_)return F.splice(J,1),!0},addOverlay:ri(function(_,F){var J=_.token?_:e.getMode(this.options,_);if(J.startState)throw new Error("Overlays may not be stateful.");Le(this.state.overlays,{mode:J,modeSpec:_,opaque:F&&F.opaque,priority:F&&F.priority||0},function(ae){return ae.priority}),this.state.modeGen++,ti(this)}),removeOverlay:ri(function(_){for(var F=this.state.overlays,J=0;J<F.length;++J){var ae=F[J].modeSpec;if(ae==_||typeof _=="string"&&ae.name==_){F.splice(J,1),this.state.modeGen++,ti(this);return}}}),indentLine:ri(function(_,F,J){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),tn(this.doc,_)&&Ea(this,_,F,J)}),indentSelection:ri(function(_){for(var F=this.doc.sel.ranges,J=-1,ae=0;ae<F.length;ae++){var ce=F[ae];if(ce.empty())ce.head.line>J&&(Ea(this,ce.head.line,_,!0),J=ce.head.line,ae==this.doc.sel.primIndex&&Ma(this));else{var fe=ce.from(),ye=ce.to(),Ve=Math.max(J,fe.line);J=Math.min(this.lastLine(),ye.line-(ye.ch?0:1))+1;for(var Ye=Ve;Ye<J;++Ye)Ea(this,Ye,_);var vt=this.doc.sel.ranges;fe.ch==0&&F.length==vt.length&&vt[ae].from().ch>0&&Ms(this.doc,ae,new nn(fe,vt[ae].to()),ve)}}}),getTokenAt:function(_,F){return qt(this,_,F)},getLineTokens:function(_,F){return qt(this,me(_),F,!0)},getTokenTypeAt:function(_){_=P(this.doc,_);var F=_t(this,jt(this.doc,_.line)),J=0,ae=(F.length-1)/2,ce=_.ch,fe;if(ce==0)fe=F[2];else for(;;){var ye=J+ae>>1;if((ye?F[ye*2-1]:0)>=ce)ae=ye;else if(F[ye*2+1]<ce)J=ye+1;else{fe=F[ye*2+2];break}}var Ve=fe?fe.indexOf("overlay "):-1;return Ve<0?fe:Ve==0?null:fe.slice(0,Ve-1)},getModeAt:function(_){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(_).state).mode:F},getHelper:function(_,F){return this.getHelpers(_,F)[0]},getHelpers:function(_,F){var J=[];if(!S.hasOwnProperty(F))return J;var ae=S[F],ce=this.getModeAt(_);if(typeof ce[F]=="string")ae[ce[F]]&&J.push(ae[ce[F]]);else if(ce[F])for(var fe=0;fe<ce[F].length;fe++){var ye=ae[ce[F][fe]];ye&&J.push(ye)}else ce.helperType&&ae[ce.helperType]?J.push(ae[ce.helperType]):ae[ce.name]&&J.push(ae[ce.name]);for(var Ve=0;Ve<ae._global.length;Ve++){var Ye=ae._global[Ve];Ye.pred(ce,this)&&ne(J,Ye.val)==-1&&J.push(Ye.val)}return J},getStateAfter:function(_,F){var J=this.doc;return _=te(J,_==null?J.first+J.size-1:_),Pt(this,_+1,F).state},cursorCoords:function(_,F){var J,ae=this.doc.sel.primary();return _==null?J=ae.head:typeof _=="object"?J=P(this.doc,_):J=_?ae.from():ae.to(),Ei(this,J,F||"page")},charCoords:function(_,F){return eo(this,P(this.doc,_),F||"page")},coordsChar:function(_,F){return _=ys(this,_,F||"page"),Si(this,_.left,_.top)},lineAtHeight:function(_,F){return _=ys(this,{top:_,left:0},F||"page").top,Sr(this.doc,_+this.display.viewOffset)},heightAtLine:function(_,F,J){var ae=!1,ce;if(typeof _=="number"){var fe=this.doc.first+this.doc.size-1;_<this.doc.first?_=this.doc.first:_>fe&&(_=fe,ae=!0),ce=jt(this.doc,_)}else ce=_;return qa(this,ce,{top:0,left:0},F||"page",J||ae).top+(ae?this.doc.height-Fn(ce):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Ia(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(_,F,J,ae,ce){var fe=this.display;_=Ei(this,P(this.doc,_));var ye=_.bottom,Ve=_.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),fe.sizer.appendChild(F),ae=="over")ye=_.top;else if(ae=="above"||ae=="near"){var Ye=Math.max(fe.wrapper.clientHeight,this.doc.height),vt=Math.max(fe.sizer.clientWidth,fe.lineSpace.clientWidth);(ae=="above"||_.bottom+F.offsetHeight>Ye)&&_.top>F.offsetHeight?ye=_.top-F.offsetHeight:_.bottom+F.offsetHeight<=Ye&&(ye=_.bottom),Ve+F.offsetWidth>vt&&(Ve=vt-F.offsetWidth)}F.style.top=ye+"px",F.style.left=F.style.right="",ce=="right"?(Ve=fe.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(ce=="left"?Ve=0:ce=="middle"&&(Ve=(fe.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Ve+"px"),J&&wu(this,{left:Ve,top:ye,right:Ve+F.offsetWidth,bottom:ye+F.offsetHeight})},triggerOnKeyDown:ri(ns),triggerOnKeyPress:ri(ql),triggerOnKeyUp:Zl,triggerOnMouseDown:ri(is),execCommand:function(_){if(vo.hasOwnProperty(_))return vo[_].call(null,this)},triggerElectric:ri(function(_){xo(this,_)}),findPosH:function(_,F,J,ae){var ce=1;F<0&&(ce=-1,F=-F);for(var fe=P(this.doc,_),ye=0;ye<F&&!(fe=ls(this.doc,fe,ce,J,ae),fe.hitSide);++ye);return fe},moveH:ri(function(_,F){var J=this;this.extendSelectionsBy(function(ae){return J.display.shift||J.doc.extend||ae.empty()?ls(J.doc,ae.head,_,F,J.options.rtlMoveVisually):_<0?ae.from():ae.to()},De)}),deleteH:ri(function(_,F){var J=this.doc.sel,ae=this.doc;J.somethingSelected()?ae.replaceSelection("",null,"+delete"):Di(this,function(ce){var fe=ls(ae,ce.head,_,F,!1);return _<0?{from:fe,to:ce.head}:{from:ce.head,to:fe}})}),findPosV:function(_,F,J,ae){var ce=1,fe=ae;F<0&&(ce=-1,F=-F);for(var ye=P(this.doc,_),Ve=0;Ve<F;++Ve){var Ye=Ei(this,ye,"div");if(fe==null?fe=Ye.left:Ye.left=fe,ye=hu(this,Ye,ce,J),ye.hitSide)break}return ye},moveV:ri(function(_,F){var J=this,ae=this.doc,ce=[],fe=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Ve){if(fe)return _<0?Ve.from():Ve.to();var Ye=Ei(J,Ve.head,"div");Ve.goalColumn!=null&&(Ye.left=Ve.goalColumn),ce.push(Ye.left);var vt=hu(J,Ye,_,F);return F=="page"&&Ve==ae.sel.primary()&&_s(J,eo(J,vt,"div").top-Ye.top),vt},De),ce.length)for(var ye=0;ye<ae.sel.ranges.length;ye++)ae.sel.ranges[ye].goalColumn=ce[ye]}),findWordAt:function(_){var F=this.doc,J=jt(F,_.line).text,ae=_.ch,ce=_.ch;if(J){var fe=this.getHelper(_,"wordChars");(_.sticky=="before"||ce==J.length)&&ae?--ae:++ce;for(var ye=J.charAt(ae),Ve=oe(ye,fe)?function(Ye){return oe(Ye,fe)}:/\s/.test(ye)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!oe(Ye)};ae>0&&Ve(J.charAt(ae-1));)--ae;for(;ce<J.length&&Ve(J.charAt(ce));)++ce}return new nn(me(_.line,ae),me(_.line,ce))},toggleOverwrite:function(_){if(_!=null&&_==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?k(this.display.cursorDiv,"CodeMirror-overwrite"):p(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==U()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ri(function(_,F){Zi(this,_,F)}),getScrollInfo:function(){var _=this.display.scroller;return{left:_.scrollLeft,top:_.scrollTop,height:_.scrollHeight-Ii(this)-this.display.barHeight,width:_.scrollWidth-Ii(this)-this.display.barWidth,clientHeight:Rn(this),clientWidth:ci(this)}},scrollIntoView:ri(function(_,F){_==null?(_={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof _=="number"?_={from:me(_,0),to:null}:_.from==null&&(_={from:_,to:null}),_.to||(_.to=_.from),_.margin=F||0,_.from.line!=null?_u(this,_):yl(this,_.from,_.to,_.margin)}),setSize:ri(function(_,F){var J=this,ae=function(fe){return typeof fe=="number"||/^\d+$/.test(String(fe))?fe+"px":fe};_!=null&&(this.display.wrapper.style.width=ae(_)),F!=null&&(this.display.wrapper.style.height=ae(F)),this.options.lineWrapping&&fi(this);var ce=this.display.viewFrom;this.doc.iter(ce,this.display.viewTo,function(fe){if(fe.widgets){for(var ye=0;ye<fe.widgets.length;ye++)if(fe.widgets[ye].noHScroll){ki(J,ce,"widget");break}}++ce}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(_){return hi(this,_)},startOperation:function(){return ma(this)},endOperation:function(){return ga(this)},refresh:ri(function(){var _=this.display.cachedTextHeight;ti(this),this.curOp.forceUpdate=!0,bi(this),Zi(this,this.doc.scrollLeft,this.doc.scrollTop),Cs(this.display),(_==null||Math.abs(_-ha(this.display))>.5||this.options.lineWrapping)&&Mo(this),Ze(this,"refresh",this)}),swapDoc:ri(function(_){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),Nn(this,_),bi(this),this.display.input.reset(),Zi(this,_.scrollLeft,_.scrollTop),this.curOp.forceScroll=!0,Yr(this,"swapDoc",this,F),F}),phrase:function(_){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,_)?F[_]:_},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}},Ue(e),e.registerHelper=function(_,F,J){S.hasOwnProperty(_)||(S[_]=e[_]={_global:[]}),S[_][F]=J},e.registerGlobalHelper=function(_,F,J,ae){e.registerHelper(_,F,ae),S[_]._global.push({pred:J,val:ae})}}function ls(e,r,S,_,F){var J=r,ae=S,ce=jt(e,r.line),fe=F&&e.direction=="rtl"?-S:S;function ye(){var $t=r.line+fe;return $t<e.first||$t>=e.first+e.size?!1:(r=new me($t,r.ch,r.sticky),ce=jt(e,$t))}function Ve($t){var Vt;if(_=="codepoint"){var ir=ce.text.charCodeAt(r.ch+(_>0?0:-1));isNaN(ir)?Vt=null:Vt=new me(r.line,Math.max(0,Math.min(ce.text.length,r.ch+S*(ir>=55296&&ir<56320?2:1))),-S)}else F?Vt=Vs(e.cm,ce,r,S):Vt=zs(ce,r,S);if(Vt==null)if(!$t&&ye())r=es(F,e.cm,ce,r.line,fe);else return!1;else r=Vt;return!0}if(_=="char"||_=="codepoint")Ve();else if(_=="column")Ve(!0);else if(_=="word"||_=="group")for(var Ye=null,vt=_=="group",dt=e.cm&&e.cm.getHelper(r,"wordChars"),Ut=!0;!(S<0&&!Ve(!Ut));Ut=!1){var Nt=ce.text.charAt(r.ch)||`
`,Kt=oe(Nt,dt)?"w":vt&&Nt==`
`?"n":!vt||/\s/.test(Nt)?null:"p";if(vt&&!Ut&&!Kt&&(Kt="s"),Ye&&Ye!=Kt){S<0&&(S=1,Ve(),r.sticky="after");break}if(Kt&&(Ye=Kt),S>0&&!Ve(!Ut))break}var zt=Xo(e,r,J,ae,!0);return Pe(J,zt)&&(zt.hitSide=!0),zt}function hu(e,r,S,_){var F=e.doc,J=r.left,ae;if(_=="page"){var ce=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),fe=Math.max(ce-.5*ha(e.display),3);ae=(S>0?r.bottom:r.top)+S*fe}else _=="line"&&(ae=S>0?r.bottom+3:r.top-3);for(var ye;!(ye=Si(e,J,ae),!ye.outside);){if(S<0?ae<=0:ae>=F.height){ye.hitSide=!0;break}ae+=S*5}return ye}var un=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Y,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};un.prototype.init=function(e){var r=this,S=this,_=S.cm,F=S.div=e.lineDiv;el(F,_.options.spellcheck,_.options.autocorrect,_.options.autocapitalize);function J(ce){for(var fe=ce.target;fe;fe=fe.parentNode){if(fe==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(fe.className))break}return!1}ke(F,"paste",function(ce){if(!J(ce)||ot(_,ce)||_o(ce,_))return;b<=11&&setTimeout(kn(_,function(){return r.updateFromDOM()}),20)}),ke(F,"compositionstart",function(ce){r.composing={data:ce.data,done:!1}}),ke(F,"compositionupdate",function(ce){r.composing||(r.composing={data:ce.data,done:!1})}),ke(F,"compositionend",function(ce){r.composing&&(ce.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),ke(F,"touchstart",function(){return S.forceCompositionEnd()}),ke(F,"input",function(){r.composing||r.readFromDOMSoon()});function ae(ce){if(!J(ce)||ot(_,ce))return;if(_.somethingSelected())wo({lineWise:!1,text:_.getSelections()}),ce.type=="cut"&&_.replaceSelection("",null,"cut");else if(_.options.lineWiseCopyCut){var fe=qs(_);wo({lineWise:!0,text:fe.text}),ce.type=="cut"&&_.operation(function(){_.setSelections(fe.ranges,0,ve),_.replaceSelection("",null,"cut")})}else return;if(ce.clipboardData){ce.clipboardData.clearData();var ye=wi.text.join(`
`);if(ce.clipboardData.setData("Text",ye),ce.clipboardData.getData("Text")==ye){ce.preventDefault();return}}var Ve=Au(),Ye=Ve.firstChild;_.display.lineSpace.insertBefore(Ve,_.display.lineSpace.firstChild),Ye.value=wi.text.join(`
`);var vt=document.activeElement;V(Ye),setTimeout(function(){_.display.lineSpace.removeChild(Ve),vt.focus(),vt==F&&S.showPrimarySelection()},50)}ke(F,"copy",ae),ke(F,"cut",ae)},un.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},un.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},un.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},un.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},un.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,S=r.doc.sel.primary(),_=S.from(),F=S.to();if(r.display.viewTo==r.display.viewFrom||_.line>=r.display.viewTo||F.line<r.display.viewFrom){e.removeAllRanges();return}var J=Ki(r,e.anchorNode,e.anchorOffset),ae=Ki(r,e.focusNode,e.focusOffset);if(J&&!J.bad&&ae&&!ae.bad&&be(Ft(J,ae),_)==0&&be(qe(J,ae),F)==0)return;var ce=r.display.view,fe=_.line>=r.display.viewFrom&&wa(r,_)||{node:ce[0].measure.map[2],offset:0},ye=F.line<r.display.viewTo&&wa(r,F);if(!ye){var Ve=ce[ce.length-1].measure,Ye=Ve.maps?Ve.maps[Ve.maps.length-1]:Ve.map;ye={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!fe||!ye){e.removeAllRanges();return}var vt=e.rangeCount&&e.getRangeAt(0),dt;try{dt=y(fe.node,fe.offset,ye.offset,ye.node)}catch(Ut){}dt&&(!O&&r.state.focused?(e.collapse(fe.node,fe.offset),dt.collapsed||(e.removeAllRanges(),e.addRange(dt))):(e.removeAllRanges(),e.addRange(dt)),vt&&e.anchorNode==null?e.addRange(vt):O&&this.startGracePeriod()),this.rememberSelection()},un.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)},un.prototype.showMultipleSelections=function(e){d(this.cm.display.cursorDiv,e.cursors),d(this.cm.display.selectionDiv,e.selection)},un.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},un.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return g(this.div,r)},un.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},un.prototype.blur=function(){this.div.blur()},un.prototype.getField=function(){return this.div},un.prototype.supportsTouch=function(){return!0},un.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},un.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},un.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(l&&i&&this.cm.display.gutterSpecs.length&&du(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var S=Ki(r,e.anchorNode,e.anchorOffset),_=Ki(r,e.focusNode,e.focusOffset);S&&_&&hi(r,function(){Zn(r.doc,qi(S,_),ve),(S.bad||_.bad)&&(r.curOp.selectionChanged=!0)})},un.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,S=e.doc.sel.primary(),_=S.from(),F=S.to();if(_.ch==0&&_.line>e.firstLine()&&(_=me(_.line-1,jt(e.doc,_.line-1).length)),F.ch==jt(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=me(F.line+1,0)),_.line<r.viewFrom||F.line>r.viewTo-1)return!1;var J,ae,ce;_.line==r.viewFrom||(J=Ji(e,_.line))==0?(ae=Ar(r.view[0].line),ce=r.view[0].node):(ae=Ar(r.view[J].line),ce=r.view[J-1].node.nextSibling);var fe=Ji(e,F.line),ye,Ve;if(fe==r.view.length-1?(ye=r.viewTo-1,Ve=r.lineDiv.lastChild):(ye=Ar(r.view[fe+1].line)-1,Ve=r.view[fe+1].node.previousSibling),!ce)return!1;for(var Ye=e.doc.splitLines(_a(e,ce,Ve,ae,ye)),vt=Mr(e.doc,me(ae,0),me(ye,jt(e.doc,ye).text.length));Ye.length>1&&vt.length>1;)if(Je(Ye)==Je(vt))Ye.pop(),vt.pop(),ye--;else if(Ye[0]==vt[0])Ye.shift(),vt.shift(),ae++;else break;for(var dt=0,Ut=0,Nt=Ye[0],Kt=vt[0],zt=Math.min(Nt.length,Kt.length);dt<zt&&Nt.charCodeAt(dt)==Kt.charCodeAt(dt);)++dt;for(var $t=Je(Ye),Vt=Je(vt),ir=Math.min($t.length-(Ye.length==1?dt:0),Vt.length-(vt.length==1?dt:0));Ut<ir&&$t.charCodeAt($t.length-Ut-1)==Vt.charCodeAt(Vt.length-Ut-1);)++Ut;if(Ye.length==1&&vt.length==1&&ae==_.line)for(;dt&&dt>_.ch&&$t.charCodeAt($t.length-Ut-1)==Vt.charCodeAt(Vt.length-Ut-1);)dt--,Ut++;Ye[Ye.length-1]=$t.slice(0,$t.length-Ut).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(dt).replace(/\u200b+$/,"");var Cr=me(ae,dt),pr=me(ye,vt.length?Je(vt).length-Ut:0);if(Ye.length>1||Ye[0]||be(Cr,pr))return Na(e.doc,Ye,Cr,pr,"+input"),!0},un.prototype.ensurePolled=function(){this.forceCompositionEnd()},un.prototype.reset=function(){this.forceCompositionEnd()},un.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},un.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)},un.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return ti(e.cm)})},un.prototype.setUneditable=function(e){e.contentEditable="false"},un.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||kn(this.cm,Zs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},un.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},un.prototype.onContextMenu=function(){},un.prototype.resetPosition=function(){},un.prototype.needsContentAttribute=!0;function wa(e,r){var S=Aa(e,r.line);if(!S||S.hidden)return null;var _=jt(e.doc,r.line),F=Xn(S,_,r.line),J=It(_,e.doc.direction),ae="left";if(J){var ce=ft(J,r.ch);ae=ce%2?"right":"left"}var fe=gs(F.map,r.ch,ae);return fe.offset=fe.collapse=="right"?fe.end:fe.start,fe}function du(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function xn(e,r){return r&&(e.bad=!0),e}function _a(e,r,S,_,F){var J="",ae=!1,ce=e.doc.lineSeparator(),fe=!1;function ye(dt){return function(Ut){return Ut.id==dt}}function Ve(){ae&&(J+=ce,fe&&(J+=ce),ae=fe=!1)}function Ye(dt){dt&&(Ve(),J+=dt)}function vt(dt){if(dt.nodeType==1){var Ut=dt.getAttribute("cm-text");if(Ut){Ye(Ut);return}var Nt=dt.getAttribute("cm-marker"),Kt;if(Nt){var zt=e.findMarks(me(_,0),me(F+1,0),ye(+Nt));zt.length&&(Kt=zt[0].find(0))&&Ye(Mr(e.doc,Kt.from,Kt.to).join(ce));return}if(dt.getAttribute("contenteditable")=="false")return;var $t=/^(pre|div|p|li|table|br)$/i.test(dt.nodeName);if(!/^br$/i.test(dt.nodeName)&&dt.textContent.length==0)return;$t&&Ve();for(var Vt=0;Vt<dt.childNodes.length;Vt++)vt(dt.childNodes[Vt]);/^(pre|p)$/i.test(dt.nodeName)&&(fe=!0),$t&&(ae=!0)}else dt.nodeType==3&&Ye(dt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(vt(r),r==S);)r=r.nextSibling,fe=!1;return J}function Ki(e,r,S){var _;if(r==e.display.lineDiv){if(_=e.display.lineDiv.childNodes[S],!_)return xn(e.clipPos(me(e.display.viewTo-1)),!0);r=null,S=0}else for(_=r;;_=_.parentNode){if(!_||_==e.display.lineDiv)return null;if(_.parentNode&&_.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var J=e.display.view[F];if(J.node==_)return oa(J,r,S)}}function oa(e,r,S){var _=e.text.firstChild,F=!1;if(!r||!g(_,r))return xn(me(Ar(e.line),0),!0);if(r==_&&(F=!0,r=_.childNodes[S],S=0,!r)){var J=e.rest?Je(e.rest):e.line;return xn(me(Ar(J),J.text.length),F)}var ae=r.nodeType==3?r:null,ce=r;for(!ae&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(ae=r.firstChild,S&&(S=ae.nodeValue.length));ce.parentNode!=_;)ce=ce.parentNode;var fe=e.measure,ye=fe.maps;function Ve(Kt,zt,$t){for(var Vt=-1;Vt<(ye?ye.length:0);Vt++)for(var ir=Vt<0?fe.map:ye[Vt],Cr=0;Cr<ir.length;Cr+=3){var pr=ir[Cr+2];if(pr==Kt||pr==zt){var kr=Ar(Vt<0?e.line:e.rest[Vt]),yn=ir[Cr]+$t;return($t<0||pr!=Kt)&&(yn=ir[Cr+($t?1:0)]),me(kr,yn)}}}var Ye=Ve(ae,ce,S);if(Ye)return xn(Ye,F);for(var vt=ce.nextSibling,dt=ae?ae.nodeValue.length-S:0;vt;vt=vt.nextSibling){if(Ye=Ve(vt,vt.firstChild,0),Ye)return xn(me(Ye.line,Ye.ch-dt),F);dt+=vt.textContent.length}for(var Ut=ce.previousSibling,Nt=S;Ut;Ut=Ut.previousSibling){if(Ye=Ve(Ut,Ut.firstChild,-1),Ye)return xn(me(Ye.line,Ye.ch+Nt),F);Nt+=Ut.textContent.length}}var dn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Y,this.hasSelection=!1,this.composing=null};dn.prototype.init=function(e){var r=this,S=this,_=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),f&&(F.style.width="0px"),ke(F,"input",function(){R&&b>=9&&r.hasSelection&&(r.hasSelection=null),S.poll()}),ke(F,"paste",function(ae){if(ot(_,ae)||_o(ae,_))return;_.state.pasteIncoming=+new Date,S.fastPoll()});function J(ae){if(ot(_,ae))return;if(_.somethingSelected())wo({lineWise:!1,text:_.getSelections()});else if(_.options.lineWiseCopyCut){var ce=qs(_);wo({lineWise:!0,text:ce.text}),ae.type=="cut"?_.setSelections(ce.ranges,null,ve):(S.prevInput="",F.value=ce.text.join(`
`),V(F))}else return;ae.type=="cut"&&(_.state.cutIncoming=+new Date)}ke(F,"cut",J),ke(F,"copy",J),ke(e.scroller,"paste",function(ae){if(xi(e,ae)||ot(_,ae))return;if(!F.dispatchEvent){_.state.pasteIncoming=+new Date,S.focus();return}var ce=new Event("paste");ce.clipboardData=ae.clipboardData,F.dispatchEvent(ce)}),ke(e.lineSpace,"selectstart",function(ae){xi(e,ae)||ge(ae)}),ke(F,"compositionstart",function(){var ae=_.getCursor("from");S.composing&&S.composing.range.clear(),S.composing={start:ae,range:_.markText(ae,_.getCursor("to"),{className:"CodeMirror-composing"})}}),ke(F,"compositionend",function(){S.composing&&(S.poll(),S.composing.range.clear(),S.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,r=e.display,S=e.doc,_=pl(e);if(e.options.moveInputWithCursor){var F=Ei(e,S.sel.primary().head,"div"),J=r.wrapper.getBoundingClientRect(),ae=r.lineDiv.getBoundingClientRect();_.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+ae.top-J.top)),_.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+ae.left-J.left))}return _},dn.prototype.showSelection=function(e){var r=this.cm,S=r.display;d(S.cursorDiv,e.cursors),d(S.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 r=this.cm;if(r.somethingSelected()){this.prevInput="";var S=r.getSelection();this.textarea.value=S,r.state.focused&&V(this.textarea),R&&b>=9&&(this.hasSelection=S)}else e||(this.prevInput=this.textarea.value="",R&&b>=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"&&(!c||U()!=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,r=this;r.pollingFast=!0;function S(){var _=r.poll();!_&&!e?(e=!0,r.polling.set(60,S)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,S)},dn.prototype.poll=function(){var e=this,r=this.cm,S=this.textarea,_=this.prevInput;if(this.contextMenuPending||!r.state.focused||it(S)&&!_&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=S.value;if(F==_&&!r.somethingSelected())return!1;if(R&&b>=9&&this.hasSelection===F||a&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var J=F.charCodeAt(0);if(J==8203&&!_&&(_="\u200B"),J==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,ce=Math.min(_.length,F.length);ae<ce&&_.charCodeAt(ae)==F.charCodeAt(ae);)++ae;return hi(r,function(){Zs(r,F.slice(ae),_.length-ae,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
`)>-1?S.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},dn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},dn.prototype.onKeyPress=function(){R&&b>=9&&(this.hasSelection=null),this.fastPoll()},dn.prototype.onContextMenu=function(e){var r=this,S=r.cm,_=S.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var J=Yi(S,e),ae=_.scroller.scrollTop;if(!J||A)return;var ce=S.options.resetSelectionOnContextMenu;ce&&S.doc.sel.contains(J)==-1&&kn(S,Zn)(S.doc,qi(J),ve);var fe=F.style.cssText,ye=r.wrapper.style.cssText,Ve=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.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: `+(R?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;t&&(Ye=window.scrollY),_.input.focus(),t&&window.scrollTo(null,Ye),_.input.reset(),S.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=dt,_.selForContextMenu=S.doc.sel,clearTimeout(_.detectingSelectAll);function vt(){if(F.selectionStart!=null){var Nt=S.somethingSelected(),Kt="\u200B"+(Nt?F.value:"");F.value="\u21DA",F.value=Kt,r.prevInput=Nt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Kt.length,_.selForContextMenu=S.doc.sel}}function dt(){if(r.contextMenuPending!=dt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ye,F.style.cssText=fe,R&&b<9&&_.scrollbars.setScrollTop(_.scroller.scrollTop=ae),F.selectionStart!=null){(!R||R&&b<9)&&vt();var Nt=0,Kt=function(){_.selForContextMenu==S.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?kn(S,Nl)(S):Nt++<10?_.detectingSelectAll=setTimeout(Kt,500):(_.selForContextMenu=null,_.input.reset())};_.detectingSelectAll=setTimeout(Kt,200)}}if(R&&b>=9&&vt(),D){Oe(e);var Ut=function(){gt(window,"mouseup",Ut),setTimeout(dt,20)};ke(window,"mouseup",Ut)}else setTimeout(dt,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 Co(e,r){if(r=r?L(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var S=U();r.autofocus=S==e||e.getAttribute("autofocus")!=null&&S==document.body}function _(){e.value=ce.getValue()}var F;if(e.form&&(ke(e.form,"submit",_),!r.leaveSubmitMethodAlone)){var J=e.form;F=J.submit;try{var ae=J.submit=function(){_(),J.submit=F,J.submit(),J.submit=ae}}catch(fe){}}r.finishInit=function(fe){fe.save=_,fe.getTextArea=function(){return e},fe.toTextArea=function(){fe.toTextArea=isNaN,_(),e.parentNode.removeChild(fe.getWrapperElement()),e.style.display="",e.form&&(gt(e.form,"submit",_),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var ce=wn(function(fe){return e.parentNode.insertBefore(fe,e.nextSibling)},r);return ce}function Wi(e){e.off=gt,e.on=ke,e.wheelEventPixels=Bl,e.Doc=ni,e.splitLines=ht,e.countColumn=$,e.findColumn=Qe,e.isWordChar=ie,e.Pass=_e,e.signal=Ze,e.Line=gn,e.changeEnd=ea,e.scrollbarModel=El,e.Pos=me,e.cmpPos=be,e.modes=mt,e.mimeModes=lt,e.resolveMode=tt,e.getMode=St,e.modeExtensions=Lt,e.extendMode=Tt,e.copyState=Ht,e.startState=Or,e.innerMode=gr,e.commands=vo,e.keyMap=Qi,e.keyName=Ws,e.isModifierKey=Xl,e.lookupKey=ba,e.normalizeKeyMap=Vu,e.StringStream=vr,e.SharedTextMarker=Qa,e.TextMarker=Li,e.LineWidget=fo,e.e_preventDefault=ge,e.e_stopPropagation=xe,e.e_stop=Oe,e.addClass=k,e.contains=g,e.rmClass=p,e.keyNames=ia}eA(wn),cu(wn);var fu="iter insert remove copy getEditor constructor".split(" ");for(var To in ni.prototype)ni.prototype.hasOwnProperty(To)&&ne(fu,To)<0&&(wn.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(ni.prototype[To]));return Ue(ni),wn.inputStyles={textarea:dn,contenteditable:un},wn.defineMode=function(e){!wn.defaults.mode&&e!="null"&&(wn.defaults.mode=e),Ct.apply(this,arguments)},wn.defineMIME=bt,wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(e,r){wn.prototype[e]=r},wn.defineDocExtension=function(e,r){ni.prototype[e]=r},wn.fromTextArea=Co,Wi(wn),wn.version="5.58.2",wn})},WaYH:function(Xe,le,H){"use strict";var Z=H("rePB"),Q=H("Ff2n"),O=H("VTBJ"),K=H("1OyB"),M=H("vuIU"),B=H("JX7q"),R=H("Ji7U"),b=H("LK+K"),t=H("q1tI"),E=H("TSYQ"),i=H.n(E),A=H("sboe"),h=H("OZM5"),s=function(D){var w=D.prefixCls,p=D.level,n=D.isStart,d=D.isEnd;if(!p)return null;for(var m="".concat(w,"-indent-unit"),C=[],y=0;y<p;y+=1){var g;C.push(t.createElement("span",{key:y,className:i()(m,(g={},Object(Z.a)(g,"".concat(m,"-start"),n[y+1]),Object(Z.a)(g,"".concat(m,"-end"),d[y+1]),Object(Z.a)(g,"".concat(m,"-end-first-level"),!y&&d[0]),g))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(w,"-indent")},C)},o=s,f=H("815F"),l="open",c="close",a="---",u=function(x){Object(R.a)(w,x);var D=Object(b.a)(w);function w(){var p;return Object(K.a)(this,w),p=D.apply(this,arguments),p.state={dragNodeHighlight:!1},p.onSelectorClick=function(n){var d=p.props.context.onNodeClick;d(n,Object(f.b)(p.props)),p.isSelectable()?p.onSelect(n):p.onCheck(n)},p.onSelectorDoubleClick=function(n){var d=p.props.context.onNodeDoubleClick;d(n,Object(f.b)(p.props))},p.onSelect=function(n){if(p.isDisabled())return;var d=p.props.context.onNodeSelect;n.preventDefault(),d(n,Object(f.b)(p.props))},p.onCheck=function(n){if(p.isDisabled())return;var d=p.props,m=d.disableCheckbox,C=d.checked,y=p.props.context.onNodeCheck;if(!p.isCheckable()||m)return;n.preventDefault();var g=!C;y(n,Object(f.b)(p.props),g)},p.onMouseEnter=function(n){var d=p.props.context.onNodeMouseEnter;d(n,Object(f.b)(p.props))},p.onMouseLeave=function(n){var d=p.props.context.onNodeMouseLeave;d(n,Object(f.b)(p.props))},p.onContextMenu=function(n){var d=p.props.context.onNodeContextMenu;d(n,Object(f.b)(p.props))},p.onDragStart=function(n){var d=p.props.context.onNodeDragStart;n.stopPropagation(),p.setState({dragNodeHighlight:!0}),d(n,Object(B.a)(p));try{n.dataTransfer.setData("text/plain","")}catch(m){}},p.onDragEnter=function(n){var d=p.props.context.onNodeDragEnter;n.preventDefault(),n.stopPropagation(),d(n,Object(B.a)(p))},p.onDragOver=function(n){var d=p.props.context.onNodeDragOver;n.preventDefault(),n.stopPropagation(),d(n,Object(B.a)(p))},p.onDragLeave=function(n){var d=p.props.context.onNodeDragLeave;n.stopPropagation(),d(n,Object(B.a)(p))},p.onDragEnd=function(n){var d=p.props.context.onNodeDragEnd;n.stopPropagation(),p.setState({dragNodeHighlight:!1}),d(n,Object(B.a)(p))},p.onDrop=function(n){var d=p.props.context.onNodeDrop;n.preventDefault(),n.stopPropagation(),p.setState({dragNodeHighlight:!1}),d(n,Object(B.a)(p))},p.onExpand=function(n){var d=p.props.context.onNodeExpand;d(n,Object(f.b)(p.props))},p.setSelectHandle=function(n){p.selectHandle=n},p.getNodeState=function(){var n=p.props.expanded;return p.isLeaf()?null:n?l:c},p.hasChildren=function(){var n=p.props.eventKey,d=p.props.context.keyEntities,m=d[n]||{},C=m.children;return!!(C||[]).length},p.isLeaf=function(){var n=p.props,d=n.isLeaf,m=n.loaded,C=p.props.context.loadData,y=p.hasChildren();return d===!1?!1:d||!C&&!y||C&&m&&!y},p.isDisabled=function(){var n=p.props.disabled,d=p.props.context.disabled;return!!(d||n)},p.isCheckable=function(){var n=p.props.checkable,d=p.props.context.checkable;return!d||n===!1?!1:d},p.syncLoadData=function(n){var d=n.expanded,m=n.loading,C=n.loaded,y=p.props.context,g=y.loadData,U=y.onNodeLoad;if(m)return;g&&d&&!p.isLeaf()&&(!p.hasChildren()&&!C&&U(Object(f.b)(p.props)))},p.renderSwitcher=function(){var n=p.props,d=n.expanded,m=n.switcherIcon,C=p.props.context,y=C.prefixCls,g=C.switcherIcon,U=m||g;if(p.isLeaf())return t.createElement("span",{className:i()("".concat(y,"-switcher"),"".concat(y,"-switcher-noop"))},typeof U=="function"?U(Object(O.a)(Object(O.a)({},p.props),{},{isLeaf:!0})):U);var k=i()("".concat(y,"-switcher"),"".concat(y,"-switcher_").concat(d?l:c));return t.createElement("span",{onClick:p.onExpand,className:k},typeof U=="function"?U(Object(O.a)(Object(O.a)({},p.props),{},{isLeaf:!1})):U)},p.renderCheckbox=function(){var n=p.props,d=n.checked,m=n.halfChecked,C=n.disableCheckbox,y=p.props.context.prefixCls,g=p.isDisabled(),U=p.isCheckable();if(!U)return null;var k=typeof U!="boolean"?U:null;return t.createElement("span",{className:i()("".concat(y,"-checkbox"),d&&"".concat(y,"-checkbox-checked"),!d&&m&&"".concat(y,"-checkbox-indeterminate"),(g||C)&&"".concat(y,"-checkbox-disabled")),onClick:p.onCheck},k)},p.renderIcon=function(){var n=p.props.loading,d=p.props.context.prefixCls;return t.createElement("span",{className:i()("".concat(d,"-iconEle"),"".concat(d,"-icon__").concat(p.getNodeState()||"docu"),n&&"".concat(d,"-icon_loading"))})},p.renderSelector=function(){var n=p.state.dragNodeHighlight,d=p.props,m=d.title,C=d.selected,y=d.icon,g=d.loading,U=d.data,k=p.props.context,I=k.prefixCls,V=k.showIcon,G=k.icon,L=k.draggable,$=k.loadData,Y=k.titleRender,ne=p.isDisabled(),se="".concat(I,"-node-content-wrapper"),_e;if(V){var ve=y||G;_e=ve?t.createElement("span",{className:i()("".concat(I,"-iconEle"),"".concat(I,"-icon__customize"))},typeof ve=="function"?ve(p.props):ve):p.renderIcon()}else $&&g&&(_e=p.renderIcon());var Ce;typeof m=="function"?Ce=m(U):Y?Ce=Y(U):Ce=m;var De=t.createElement("span",{className:"".concat(I,"-title")},Ce);return t.createElement("span",{ref:p.setSelectHandle,title:typeof m=="string"?m:"",className:i()("".concat(se),"".concat(se,"-").concat(p.getNodeState()||"normal"),!ne&&(C||n)&&"".concat(I,"-node-selected"),!ne&&L&&"draggable"),draggable:!ne&&L||void 0,"aria-grabbed":!ne&&L||void 0,onMouseEnter:p.onMouseEnter,onMouseLeave:p.onMouseLeave,onContextMenu:p.onContextMenu,onClick:p.onSelectorClick,onDoubleClick:p.onSelectorDoubleClick,onDragStart:L?p.onDragStart:void 0},_e,De)},p}return Object(M.a)(w,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var n=this.props.selectable,d=this.props.context.selectable;return typeof n=="boolean"?n:d}},{key:"render",value:function(){var n,d=this.props,m=d.eventKey,C=d.className,y=d.style,g=d.dragOver,U=d.dragOverGapTop,k=d.dragOverGapBottom,I=d.isLeaf,V=d.isStart,G=d.isEnd,L=d.expanded,$=d.selected,Y=d.checked,ne=d.halfChecked,se=d.loading,_e=d.domRef,ve=d.active,Ce=d.onMouseMove,De=Object(Q.a)(d,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Qe=this.props.context,Se=Qe.prefixCls,Ie=Qe.filterTreeNode,Je=Qe.draggable,Et=Qe.keyEntities,Le=this.isDisabled(),je=Object(h.f)(De),st=Et[m]||{},he=st.level,ie=G[G.length-1];return t.createElement("div",Object.assign({ref:_e,className:i()(C,"".concat(Se,"-treenode"),(n={},Object(Z.a)(n,"".concat(Se,"-treenode-disabled"),Le),Object(Z.a)(n,"".concat(Se,"-treenode-switcher-").concat(L?"open":"close"),!I),Object(Z.a)(n,"".concat(Se,"-treenode-checkbox-checked"),Y),Object(Z.a)(n,"".concat(Se,"-treenode-checkbox-indeterminate"),ne),Object(Z.a)(n,"".concat(Se,"-treenode-selected"),$),Object(Z.a)(n,"".concat(Se,"-treenode-loading"),se),Object(Z.a)(n,"".concat(Se,"-treenode-active"),ve),Object(Z.a)(n,"".concat(Se,"-treenode-leaf-last"),ie),Object(Z.a)(n,"drag-over",!Le&&g),Object(Z.a)(n,"drag-over-gap-top",!Le&&U),Object(Z.a)(n,"drag-over-gap-bottom",!Le&&k),Object(Z.a)(n,"filter-node",Ie&&Ie(Object(f.b)(this.props))),n)),style:y,onDragEnter:Je?this.onDragEnter:void 0,onDragOver:Je?this.onDragOver:void 0,onDragLeave:Je?this.onDragLeave:void 0,onDrop:Je?this.onDrop:void 0,onDragEnd:Je?this.onDragEnd:void 0,onMouseMove:Ce},je),t.createElement(o,{prefixCls:Se,level:he,isStart:V,isEnd:G}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),w}(t.Component),v=function(D){return t.createElement(A.a.Consumer,null,function(w){return t.createElement(u,Object.assign({},D,{context:w}))})};v.displayName="TreeNode",v.defaultProps={title:a},v.isTreeNode=1;var T=le.a=v},Xm8N:function(Xe,le,H){"use strict";var Z=H("2qtc"),Q=H("kLXV"),O=H("miYZ"),K=H("tsqr"),M=H("9og8"),B=H("WmNS"),R=H.n(B),b=H("q1tI"),t=H.n(b),E=H("ErOA"),i=H("Ty5D"),A=H("9kvl"),h=function(o){var f=o.shixunHomeworks,l=o.dispatch,c=Object(i.i)();return t.a.createElement(Q.a,{centered:!0,title:"\u63D0\u793A",visible:f.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(M.a)(R.a.mark(function a(){var u,v,T,x;return R.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(E.a)("/api/myshixuns/".concat(f.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:c.coursesId}});case 2:u=w.sent,u.shixun_identifier&&(K.b.success("\u64CD\u4F5C\u6210\u529F"),l({type:"shixunHomeworks/setActionTabs",payload:{}}),x=u==null||((v=u.new_works)===null||v===void 0||((T=v.find(function(p){return"".concat(p.homework_common_id)===c.categoryId}))===null||T===void 0))?void 0:T.id,A.d.replace("/classrooms/".concat(c.coursesId,"/shixun_homework/").concat(c.categoryId,"/").concat(x,"/comment")));case 4:case"end":return w.stop()}},a)})),onCancel:function(){l({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?"))};le.a=Object(A.a)(function(s){var o=s.shixunHomeworks;return{shixunHomeworks:o}})(h)},Xmg4:function(Xe,le,H){var Z=H("bYtY"),Q=H("LPTA"),O=Q.devicePixelRatio,K=H("K2GJ"),M=H("3C/r");function B(){return!1}function R(E,i,A){var h=Z.createCanvas(),s=i.getWidth(),o=i.getHeight(),f=h.style;return f&&(f.position="absolute",f.left=0,f.top=0,f.width=s+"px",f.height=o+"px",h.setAttribute("data-zr-dom-id",E)),h.width=s*A,h.height=o*A,h}var b=function(E,i,A){var h;A=A||O,typeof E=="string"?h=R(E,i,A):Z.isObject(E)&&(h=E,E=h.id),this.id=E,this.dom=h;var s=h.style;s&&(h.onselectstart=B,s["-webkit-user-select"]="none",s["user-select"]="none",s["-webkit-touch-callout"]="none",s["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",s.padding=0,s.margin=0,s["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=i,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=A};b.prototype={constructor:b,__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=R("back-"+this.id,this.painter,E),this.ctxBack=this.domBack.getContext("2d"),E!==1&&this.ctxBack.scale(E,E)},resize:function(E,i){var A=this.dpr,h=this.dom,s=h.style,o=this.domBack;s&&(s.width=E+"px",s.height=i+"px"),h.width=E*A,h.height=i*A,o&&(o.width=E*A,o.height=i*A,A!==1&&this.ctxBack.scale(A,A))},clear:function(E,i){var A=this.dom,h=this.ctx,s=A.width,o=A.height,i=i||this.clearColor,f=this.motionBlur&&!E,l=this.lastFrameAlpha,c=this.dpr;if(f&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(A,0,0,s/c,o/c)),h.clearRect(0,0,s,o),i&&i!=="transparent"){var a;i.colorStops?(a=i.__canvasGradient||K.getGradient(h,i,{x:0,y:0,width:s,height:o}),i.__canvasGradient=a):i.image&&(a=M.prototype.getCanvasPattern.call(i,h)),h.save(),h.fillStyle=a||i,h.fillRect(0,0,s,o),h.restore()}if(f){var u=this.domBack;h.save(),h.globalAlpha=l,h.drawImage(u,0,0,s,o),h.restore()}}};var t=b;Xe.exports=t},Xnb7:function(Xe,le,H){var Z=H("1RvN"),Q=new Z(50);function O(R){if(typeof R=="string"){var b=Q.get(R);return b&&b.image}else return R}function K(R,b,t,E,i){if(R)if(typeof R=="string"){if(b&&b.__zrImageSrc===R||!t)return b;var A=Q.get(R),h={hostEl:t,cb:E,cbPayload:i};return A?(b=A.image,!B(b)&&A.pending.push(h)):(b=new Image,b.onload=b.onerror=M,Q.put(R,b.__cachedImgObj={image:b,pending:[h]}),b.src=b.__zrImageSrc=R),b}else return R;else return b}function M(){var R=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var b=0;b<R.pending.length;b++){var t=R.pending[b],E=t.cb;E&&E(this,t.cbPayload),t.hostEl.dirty()}R.pending.length=0}function B(R){return R&&R.width&&R.height}le.findExistImage=O,le.createOrUpdateImage=K,le.isImageReady=B},Y1PL:function(Xe,le,H){"use strict";H.r(le),H.d(le,"ResizableTextArea",function(){return ne});var Z=H("wx14"),Q=H("1OyB"),O=H("vuIU"),K=H("Ji7U"),M=H("LK+K"),B=H("q1tI"),R=H("VTBJ"),b=H("rePB"),t=H("Zm9Q"),E=H("Kwbf"),i=H("c+Xe"),A=H("m+aA"),h=H("bdgK"),s=new Map;function o(ve){ve.forEach(function(Ce){var De,Qe=Ce.target;(De=s.get(Qe))===null||De===void 0||De.forEach(function(Se){return Se(Qe)})})}var f=new h.default(o),l=null,c=null;function a(ve,Ce){s.has(ve)||(s.set(ve,new Set),f.observe(ve)),s.get(ve).add(Ce)}function u(ve,Ce){s.has(ve)&&(s.get(ve).delete(Ce),s.get(ve).size||(f.unobserve(ve),s.delete(ve)))}var v=function(ve){Object(K.a)(De,ve);var Ce=Object(M.a)(De);function De(){return Object(Q.a)(this,De),Ce.apply(this,arguments)}return Object(O.a)(De,[{key:"render",value:function(){return this.props.children}}]),De}(B.Component),T=B.createContext(null);function x(ve){var Ce=ve.children,De=ve.onBatchResize,Qe=B.useRef(0),Se=B.useRef([]),Ie=B.useContext(T),Je=B.useCallback(function(Et,Le,je){Qe.current+=1;var st=Qe.current;Se.current.push({size:Et,element:Le,data:je}),Promise.resolve().then(function(){st===Qe.current&&(De==null||De(Se.current),Se.current=[])}),Ie==null||Ie(Et,Le,je)},[De,Ie]);return B.createElement(T.Provider,{value:Je},Ce)}function D(ve){var Ce=ve.children,De=ve.disabled,Qe=B.useRef(null),Se=B.useRef(null),Ie=B.useContext(T),Je=B.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Et=B.isValidElement(Ce)&&Object(i.c)(Ce),Le=Et?Ce.ref:null,je=B.useMemo(function(){return Object(i.a)(Le,Qe)},[Le,Qe]),st=B.useRef(ve);st.current=ve;var he=B.useCallback(function(ie){var oe=st.current,ee=oe.onResize,de=oe.data,we=ie.getBoundingClientRect(),Be=we.width,nt=we.height,at=ie.offsetWidth,At=ie.offsetHeight,ft=Math.floor(Be),xt=Math.floor(nt);if(Je.current.width!==ft||Je.current.height!==xt||Je.current.offsetWidth!==at||Je.current.offsetHeight!==At){var It={width:ft,height:xt,offsetWidth:at,offsetHeight:At};Je.current=It;var He=at===Math.round(Be)?Be:at,ke=At===Math.round(nt)?nt:At,ct=Object(R.a)(Object(R.a)({},It),{},{offsetWidth:He,offsetHeight:ke});Ie==null||Ie(ct,ie,de),ee&&Promise.resolve().then(function(){ee(ct,ie)})}},[]);return B.useEffect(function(){var ie=Object(A.a)(Qe.current)||Object(A.a)(Se.current);return ie&&!De&&a(ie,he),function(){return u(ie,he)}},[Qe.current,De]),B.createElement(v,{ref:Se},Et?B.cloneElement(Ce,{ref:je}):Ce)}var w="rc-observer-key";function p(ve){var Ce=ve.children,De=Object(t.a)(Ce);return De.map(function(Qe,Se){var Ie=(Qe==null?void 0:Qe.key)||"".concat(w,"-").concat(Se);return B.createElement(D,Object(Z.a)({},ve,{key:Ie}),Qe)})}p.Collection=x;var n=p,d=H("bT9E"),m=H("TSYQ"),C=H.n(m),y=`
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
`,g=["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"],U={},k;function I(ve){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=ve.getAttribute("id")||ve.getAttribute("data-reactid")||ve.getAttribute("name");if(Ce&&U[De])return U[De];var Qe=window.getComputedStyle(ve),Se=Qe.getPropertyValue("box-sizing")||Qe.getPropertyValue("-moz-box-sizing")||Qe.getPropertyValue("-webkit-box-sizing"),Ie=parseFloat(Qe.getPropertyValue("padding-bottom"))+parseFloat(Qe.getPropertyValue("padding-top")),Je=parseFloat(Qe.getPropertyValue("border-bottom-width"))+parseFloat(Qe.getPropertyValue("border-top-width")),Et=g.map(function(je){return"".concat(je,":").concat(Qe.getPropertyValue(je))}).join(";"),Le={sizingStyle:Et,paddingSize:Ie,borderSize:Je,boxSizing:Se};return Ce&&De&&(U[De]=Le),Le}function V(ve){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Qe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;k||(k=document.createElement("textarea"),k.setAttribute("tab-index","-1"),k.setAttribute("aria-hidden","true"),document.body.appendChild(k)),ve.getAttribute("wrap")?k.setAttribute("wrap",ve.getAttribute("wrap")):k.removeAttribute("wrap");var Se=I(ve,Ce),Ie=Se.paddingSize,Je=Se.borderSize,Et=Se.boxSizing,Le=Se.sizingStyle;k.setAttribute("style","".concat(Le,";").concat(y)),k.value=ve.value||ve.placeholder||"";var je=Number.MIN_SAFE_INTEGER,st=Number.MAX_SAFE_INTEGER,he=k.scrollHeight,ie;if(Et==="border-box"?he+=Je:Et==="content-box"&&(he-=Ie),De!==null||Qe!==null){k.value=" ";var oe=k.scrollHeight-Ie;De!==null&&(je=oe*De,Et==="border-box"&&(je=je+Ie+Je),he=Math.max(je,he)),Qe!==null&&(st=oe*Qe,Et==="border-box"&&(st=st+Ie+Je),ie=he>st?"":"hidden",he=Math.min(st,he))}return{height:he,minHeight:je,maxHeight:st,overflowY:ie,resize:"none"}}var G=H("Gytx"),L=H.n(G),$;(function(ve){ve[ve.NONE=0]="NONE",ve[ve.RESIZING=1]="RESIZING",ve[ve.RESIZED=2]="RESIZED"})($||($={}));var Y=function(ve){Object(K.a)(De,ve);var Ce=Object(M.a)(De);function De(Qe){var Se;return Object(Q.a)(this,De),Se=Ce.call(this,Qe),Se.nextFrameActionId=void 0,Se.resizeFrameId=void 0,Se.textArea=void 0,Se.saveTextArea=function(Ie){Se.textArea=Ie},Se.handleResize=function(Ie){var Je=Se.state.resizeStatus,Et=Se.props,Le=Et.autoSize,je=Et.onResize;if(Je!==$.NONE)return;typeof je=="function"&&je(Ie),Le&&Se.resizeOnNextFrame()},Se.resizeOnNextFrame=function(){cancelAnimationFrame(Se.nextFrameActionId),Se.nextFrameActionId=requestAnimationFrame(Se.resizeTextarea)},Se.resizeTextarea=function(){var Ie=Se.props.autoSize;if(!Ie||!Se.textArea)return;var Je=Ie.minRows,Et=Ie.maxRows,Le=V(Se.textArea,!1,Je,Et);Se.setState({textareaStyles:Le,resizeStatus:$.RESIZING},function(){cancelAnimationFrame(Se.resizeFrameId),Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:$.RESIZED},function(){Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:$.NONE}),Se.fixFirefoxAutoScroll()})})})})},Se.renderTextArea=function(){var Ie=Se.props,Je=Ie.prefixCls,Et=Je===void 0?"rc-textarea":Je,Le=Ie.autoSize,je=Ie.onResize,st=Ie.className,he=Ie.disabled,ie=Se.state,oe=ie.textareaStyles,ee=ie.resizeStatus,de=Object(d.a)(Se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=C()(Et,st,Object(b.a)({},"".concat(Et,"-disabled"),he));"value"in de&&(de.value=de.value||"");var Be=Object(R.a)(Object(R.a)(Object(R.a)({},Se.props.style),oe),ee===$.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return B.createElement(n,{onResize:Se.handleResize,disabled:!(Le||je)},B.createElement("textarea",Object(Z.a)({},de,{className:we,style:Be,ref:Se.saveTextArea})))},Se.state={textareaStyles:{},resizeStatus:$.NONE},Se}return Object(O.a)(De,[{key:"componentDidUpdate",value:function(Se){(Se.value!==this.props.value||!L()(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,Ie=this.textArea.selectionEnd;this.textArea.setSelectionRange(Se,Ie)}}catch(Je){}}},{key:"render",value:function(){return this.renderTextArea()}}]),De}(B.Component),ne=Y,se=function(ve){Object(K.a)(De,ve);var Ce=Object(M.a)(De);function De(Qe){var Se;Object(Q.a)(this,De),Se=Ce.call(this,Qe),Se.resizableTextArea=void 0,Se.focus=function(){Se.resizableTextArea.textArea.focus()},Se.saveTextArea=function(Je){Se.resizableTextArea=Je},Se.handleChange=function(Je){var Et=Se.props.onChange;Se.setValue(Je.target.value,function(){Se.resizableTextArea.resizeTextarea()}),Et&&Et(Je)},Se.handleKeyDown=function(Je){var Et=Se.props,Le=Et.onPressEnter,je=Et.onKeyDown;Je.keyCode===13&&Le&&Le(Je),je&&je(Je)};var Ie=typeof Qe.value=="undefined"||Qe.value===null?Qe.defaultValue:Qe.value;return Se.state={value:Ie},Se}return Object(O.a)(De,[{key:"setValue",value:function(Se,Ie){"value"in this.props||this.setState({value:Se},Ie)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return B.createElement(ne,Object(Z.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}}]),De}(B.Component),_e=le.default=se},YH21:function(Xe,le,H){var Z=H("H6uX");le.Dispatcher=Z;var Q=H("ItGF"),O=H("Ze12"),K=O.isCanvasEl,M=O.transformCoordWithViewport,B=typeof window!="undefined"&&!!window.addEventListener,R=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,b=[];function t(c,a,u,v){return u=u||{},v||!Q.canvasSupported?E(c,a,u):Q.browser.firefox&&a.layerX!=null&&a.layerX!==a.offsetX?(u.zrX=a.layerX,u.zrY=a.layerY):a.offsetX!=null?(u.zrX=a.offsetX,u.zrY=a.offsetY):E(c,a,u),u}function E(c,a,u){if(Q.domSupported&&c.getBoundingClientRect){var v=a.clientX,T=a.clientY;if(K(c)){var x=c.getBoundingClientRect();u.zrX=v-x.left,u.zrY=T-x.top;return}else if(M(b,c,v,T)){u.zrX=b[0],u.zrY=b[1];return}}u.zrX=u.zrY=0}function i(c){return c||window.event}function A(c,a,u){if(a=i(a),a.zrX!=null)return a;var v=a.type,T=v&&v.indexOf("touch")>=0;if(!T)t(c,a,a,u),a.zrDelta=a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3;else{var x=v!=="touchend"?a.targetTouches[0]:a.changedTouches[0];x&&t(c,x,a,u)}var D=a.button;return a.which==null&&D!==void 0&&R.test(a.type)&&(a.which=D&1?1:D&2?3:D&4?2:0),a}function h(c,a,u,v){B?c.addEventListener(a,u,v):c.attachEvent("on"+a,u)}function s(c,a,u,v){B?c.removeEventListener(a,u,v):c.detachEvent("on"+a,u)}var o=B?function(c){c.preventDefault(),c.stopPropagation(),c.cancelBubble=!0}:function(c){c.returnValue=!1,c.cancelBubble=!0};function f(c){return c.which===2||c.which===3}function l(c){return c.which>1}le.clientToLocal=t,le.getNativeEvent=i,le.normalizeEvent=A,le.addEventListener=h,le.removeEventListener=s,le.stop=o,le.isMiddleOrRightButtonOnMouseUpDown=f,le.notLeftMouse=l},YgsL:function(Xe,le,H){var Z=H("QBsz"),Q=Z.distance;function O(M,B,R,b,t,E,i){var A=(R-M)*.5,h=(b-B)*.5;return(2*(B-R)+A+h)*i+(-3*(B-R)-2*A-h)*E+A*t+B}function K(M,B){for(var R=M.length,b=[],t=0,E=1;E<R;E++)t+=Q(M[E-1],M[E]);var i=t/2;i=i<R?R:i;for(var E=0;E<i;E++){var A=E/(i-1)*(B?R:R-1),h=Math.floor(A),s=A-h,o,f=M[h%R],l,c;B?(o=M[(h-1+R)%R],l=M[(h+1)%R],c=M[(h+2)%R]):(o=M[h===0?h:h-1],l=M[h>R-2?R-1:h+1],c=M[h>R-3?R-1:h+2]);var a=s*s,u=s*a;b.push([O(o[0],f[0],l[0],c[0],s,a,u),O(o[1],f[1],l[1],c[1],s,a,u)])}return b}Xe.exports=K},ZW9T:function(Xe,le,H){"use strict";H.d(le,"a",function(){return G});var Z=H("k1fw"),Q=H("oBTY"),O=H("miYZ"),K=H("tsqr"),M=H("rAM+"),B=H("tJVT"),R=H("PpiC"),b=H("q1tI"),t=H.n(b),E=H("bdgK"),i=H("9og8"),A=H("WmNS"),h=H.n(A),s={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={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","friend","gcnew","generic","goto","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:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $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 <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},l={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(`
`)}]},c=H("5VLF"),a=H.n(c),u={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"]}},v=function($,Y){return Y.map(function(ne){return{label:ne,kind:$.languages.CompletionItemKind.Keyword,insertText:ne}})},T=function($){return Object.keys(u.tables).map(function(Y){return{label:Y,kind:$.languages.CompletionItemKind.Variable,insertText:Y}})},x=function($,Y){var ne=u.tables[$];return ne?ne.map(function(se){return{label:se,kind:Y.languages.CompletionItemKind.Field,insertText:se}}):[]};function D(L,$,Y,ne,se){var _e=$.getWordUntilPosition(Y),ve={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},Ce=ne.map(function(De){return{label:De,kind:L.languages.CompletionItemKind.Keyword,insertText:De,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ve}});return se.map(function(De){Ce.push(Object(Z.a)(Object(Z.a)({},De),{},{range:ve}))}),Ce}var w=function(L){u.languages.map(function(se){return L.languages.registerDocumentFormattingEditProvider(se,{provideDocumentFormattingEdits:function(ve,Ce,De){return Object(i.a)(h.a.mark(function Qe(){var Se;return h.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Se=a()(ve.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}),Je.abrupt("return",[{range:ve.getFullModelRange(),text:Se}]);case 2:case"end":return Je.stop()}},Qe)}))()}}),se});var $=f.quickKey.map(function(se){return{label:se.label,kind:L.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Y=l.quickKey.map(function(se){return{label:se.label,kind:L.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=o.quickKey.map(function(se){return{label:se.label,kind:L.languages.CompletionItemKind.Method,insertText:se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(_e,ve){var Ce=_e.getWordUntilPosition(ve),De={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},Qe=_e.getLineContent(ve.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object(Q.a)(f.keywords.map(function(Se){return{label:Se,kind:L.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})),Object(Q.a)(f.quickKey.map(function(Se){return{label:Se.label,kind:L.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Qe.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(_e,ve){var Ce=_e.getWordUntilPosition(ve),De={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn};return{suggestions:Object(Q.a)(s.keywords.map(function(Qe){return{label:Qe,kind:L.languages.CompletionItemKind.Function,documentation:Qe,insertText:Qe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(_e,ve){var Ce=_e.getWordUntilPosition(ve),De={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},Qe=_e.getLineContent(ve.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object(Q.a)(o.keywords.map(function(Se){return{label:Se,kind:L.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})),Object(Q.a)(o.quickKey.map(function(Se){return{label:Se.label,kind:L.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Qe.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(_e,ve){var Ce=_e.getWordUntilPosition(ve),De={startLineNumber:ve.lineNumber,endLineNumber:ve.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},Qe=_e.getLineContent(ve.lineNumber).substring(Ce.startColumn-2,Ce.endColumn);return{suggestions:[].concat(Object(Q.a)(l.keywords.map(function(Se){return{label:Se,kind:L.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})),Object(Q.a)(l.quickKey.map(function(Se){return{label:Se.label,kind:L.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Qe.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}})))}}})},p="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",n=H("fjLI"),d=H("LvDl"),m=H("+ua5");function C(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function y(){}var g=!1,U={"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 k(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$=L;if(Array.isArray(L)){for(var Y=0;Y<L.length;Y++){var ne=U[L[Y]];if(ne)return ne}return $[0]}return U[$]||$}var I=null,V=le.b=function(L){var $=L.width,Y=$===void 0?"100%":$,ne=L.height,se=ne===void 0?"100%":ne,_e=L.value,ve=L.language,Ce=ve===void 0?"javascript":ve,De=L.style,Qe=De===void 0?{}:De,Se=L.options,Ie=Se===void 0?{}:Se,Je=L.overrideServices,Et=Je===void 0?{}:Je,Le=L.theme,je=Le===void 0?"vs-dark":Le,st=L.onEditBlur,he=L.onSave,ie=L.autoHeight,oe=ie===void 0?!1:ie,ee=L.forbidCopy,de=ee===void 0?!1:ee,we=L.onChange,Be=we===void 0?y:we,nt=L.editorDidMount,at=nt===void 0?y:nt,At=L.onFocus,ft=At===void 0?y:At,xt=L.filename,It=xt===void 0?"educoder.txt":xt,He=L.errorLine,ke=L.errorContent,ct=ke===void 0?"":ke,gt=Object(R.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ze=Object(b.useRef)(),ot=Object(b.useRef)({}),Ke=Object(b.useRef)(),Me=Object(b.useRef)(),Ue=Object(b.useRef)(!1),ge=Object(b.useRef)(),xe=Object(b.useState)(!1),Ee=Object(B.a)(xe,2),Oe=Ee[0],Fe=Ee[1];function $e(){var Lt;return Ze.current&&(Lt=new E.default(function(Tt){var Ht=Object(M.a)(Tt),gr;try{for(Ht.s();!(gr=Ht.n()).done;){var Or=gr.value;(Or.target.offsetHeight>0||Or.target.offsetWidth>0)&&ot.current.instance.layout()}}catch(vr){Ht.e(vr)}finally{Ht.f()}}),Lt.observe(Ze.current)),Lt}function pt(){K.b.warn(decodeURIComponent(p))}var Ot=function(){var Tt=ot.current.instance;if(_e!=null&&Tt&&Oe){var Ht=Tt.getModel();Ht&&_e!==Ht.getValue()&&(g=!0,Ht.setValue(_e),Tt.layout(),g=!1)}};Object(b.useEffect)(function(){Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Ot()},500)},[_e,Oe,ot.current]),Object(b.useEffect)(function(){if(He&&ot.current&&ot.current.instance){var Lt=ot.current.instance;Lt.changeViewZones(function(Ht){var gr=document.createElement("div");gr.style.padding="10px 20px",gr.style.width="calc(100% - 20px)",gr.className="my-error-line-wrp",gr.innerHTML=ct,Ht.addZone({afterLineNumber:He||11,heightInLines:3,domNode:gr})});var Tt={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}};Lt.addOverlayWidget(Tt),Lt.revealPositionInCenter({lineNumber:20,column:1})}},[He,ot.current,Oe]);function kt(){var Lt=ot.current.instance;if(Lt){var Tt=Lt.getSelection(),Ht=ot.current.pastePos||{},gr=new I.Range(Ht.startLineNumber||Tt.endLineNumber,Ht.startColumn||Tt.endColumn,Ht.endLineNumber||Tt.endLineNumber,Ht.endColumn||Tt.endColumn);setTimeout(function(){Lt.executeEdits("",[{range:gr,text:""}])},300)}}function Dt(Lt){(window.navigator.platform.match("Mac")?Lt.metaKey:Lt.ctrlKey)&&Lt.keyCode==83&&(Lt.preventDefault(),he())}var Bt=function(){if(oe&&ot.current.instance){var Tt=ot.current.instance.getContentHeight();tt(Tt<se?se:Tt)}else tt(se)};function ht(Lt){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Lt.dispatchEvent(Tt)}function it(Lt,Tt){var Ht=window.URL||window.webkitURL||window,gr=new Blob([Tt]),Or=document.createElementNS("http://www.w3.org/1999/xhtml","a");Or.href=Ht.createObjectURL(gr),Or.download=Lt,ht(Or)}Object(b.useEffect)(function(){Bt()},[Bt]),Object(b.useEffect)(function(){Ze.current&&!Oe&&Promise.all([H.e(16),H.e(28)]).then(H.t.bind(null,"M/lh",7)).then(function(Lt){try{I=Lt,ot.current.instance=I.editor.create(Ze.current,{value:_e,language:k(Ce),theme:je,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Et);var Tt=ot.current.instance,Ht=n.d._menuItems,gr=Object(Q.a)(Ht).find(function(br){return br[0]._debugName=="EditorContext"}),Or=gr[1],vr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],jt=function(Tr,Ar){var Sr=Tr._first;do{var tn,Zr,me=Ar.includes((tn=Sr.element)===null||tn===void 0||((Zr=tn.command)===null||Zr===void 0)?void 0:Zr.id);me&&Tr._remove(Sr)}while(Sr=Sr.next)};if(at(Tt,I),setTimeout(function(){Bt(),ot.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){it(It||"educoder.txt",Tt.getValue())}}),Tt.getDomNode().addEventListener("input",function(){Ke.current.autoFormat&&Tt.getAction("editor.action.formatDocument").run()})},500),ot.current.subscription=Tt.onDidChangeModelContent(function(br){Ue.current?clearTimeout(ge.current):(Bt(),Be(Tt.getValue(),br)),ge.current=setTimeout(function(){Ue.current=!1},500)}),window.Monaco||w(I,k(Ce)),de&&(jt(Or,vr),Ze.current.classList.add("noCopyPaste"),Tt.onKeyDown(function(br){var Tr=br.keyCode,Ar=br.ctrlKey,Sr=br.metaKey;(Tr===33||Tr===52)&&(Sr||Ar)&&(pt(),br.preventDefault())})),window.Monaco=I,st&&Tt.onDidBlurEditorWidget(function(){st(Tt.getValue())}),ft&&Tt.onDidFocusEditorText(function(){ft(Tt.getValue())}),de){Tt.addCommand(I.KeyMod.CtrlCmd|I.KeyCode.KEY_V,function(){return pt(),null}),Tt.onDidPaste(function(br){ot.current.pastePos=br});try{window.addEventListener("paste",kt)}catch(br){}}var Mr=$e();return Fe(!0),function(){var br=ot.current.instance;br.dispose();var Tr=br.getModel();Tr&&Tr.dispose(),ot.current.subscription&&ot.current.subscription.dispose(),de&&window.removeEventListener("paste",kt),Mr.unobserve(Ze.current)}}catch(br){}})},[]),Object(b.useEffect)(function(){var Lt=ot.current.instance;if(Lt&&Oe)return document.addEventListener("keydown",Dt,!1),function(){document.removeEventListener("keydown",Dt)}},[he,Oe]),Object(b.useEffect)(function(){var Lt=ot.current.instance;if(Lt&&Oe){var Tt=k(Ce);I.editor.setModelLanguage(Lt.getModel(),Tt),console.log("language:",Ce,Lt.getModel(),Tt)}},[Ce,Oe]),Object(b.useEffect)(function(){var Lt=ot.current.instance;Lt&&Oe&&I.editor.setTheme(je)},[je,Oe]),Object(b.useEffect)(function(){var Lt=ot.current.instance;Ke.current=Ie,Lt&&Oe&&(Lt.updateOptions(Object(Z.a)({},Ie)),setTimeout(function(){Lt.getModel().updateOptions(Object(Z.a)({},Ie))},200))},[JSON.stringify(Ie),Oe]),Object(b.useEffect)(function(){var Lt=ot.current.instance;Lt&&Oe&&Lt.layout()},[Y,se,Oe]);var et=Object(b.useState)(C(Y)),Te=Object(B.a)(et,2),Ne=Te[0],mt=Te[1],lt=Object(b.useState)(C(se)),Ct=Object(B.a)(lt,2),bt=Ct[0],tt=Ct[1],St=Object(Z.a)(Object(Z.a)({},Qe),{},{width:Ne,height:bt});return t.a.createElement("div",{className:"my-monaco-editor",ref:Ze,style:St})};function G(L){var $=L.width,Y=$===void 0?"100%":$,ne=L.height,se=ne===void 0?"100%":ne,_e=L.original,ve=L.modified,Ce=L.language,De=L.options,Qe=De===void 0?{}:De,Se=Object(b.useRef)(),Ie=Object(b.useState)(null),Je=Object(B.a)(Ie,2),Et=Je[0],Le=Je[1];function je(oe){var ee;return Se.current&&(ee=new E.default(function(de){var we=Object(M.a)(de),Be;try{for(we.s();!(Be=we.n()).done;){var nt=Be.value;(nt.target.offsetHeight>0||nt.target.offsetWidth>0)&&oe.layout()}}catch(at){we.e(at)}finally{we.f()}}),ee.observe(Se.current)),ee}Object(b.useEffect)(function(){Se.current&&Promise.all([H.e(16),H.e(28)]).then(H.t.bind(null,"M/lh",7)).then(function(oe){I=oe;var ee=I.editor.createDiffEditor(Se.current,Object(Z.a)(Object(Z.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},Qe),{},{wordWrap:!0}));Le(ee);var de=je(ee);return function(){ee.dispose();var we=ee.getModel();we&&we.dispose(),de.unobserve(Se.current)}})},[]),Object(b.useEffect)(function(){Et&&Et.setModel({original:I.editor.createModel(_e,Ce),modified:I.editor.createModel(ve,Ce)})},[_e,ve,Ce,Et]);var st=C(Y),he=C(se),ie={width:st,height:he};return t.a.createElement("div",{className:"my-diff-editor",ref:Se,style:ie})}},Ze12:function(Xe,le,H){var Z=H("ItGF"),Q=H("hOwI"),O=Q.buildTransformer,K="___zrEVENTSAVED",M=[];function B(i,A,h,s,o){return R(M,A,s,o,!0)&&R(i,h,M[0],M[1])}function R(i,A,h,s,o){if(A.getBoundingClientRect&&Z.domSupported&&!E(A)){var f=A[K]||(A[K]={}),l=b(A,f),c=t(l,f,o);if(c)return c(i,h,s),!0}return!1}function b(i,A){var h=A.markers;if(h)return h;h=A.markers=[];for(var s=["left","right"],o=["top","bottom"],f=0;f<4;f++){var l=document.createElement("div"),c=l.style,a=f%2,u=(f>>1)%2;c.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",s[a]+":0",o[u]+":0",s[1-a]+":auto",o[1-u]+":auto",""].join("!important;"),i.appendChild(l),h.push(l)}return h}function t(i,A,h){for(var s=h?"invTrans":"trans",o=A[s],f=A.srcCoords,l=!0,c=[],a=[],u=0;u<4;u++){var v=i[u].getBoundingClientRect(),T=2*u,x=v.left,D=v.top;c.push(x,D),l=l&&f&&x===f[T]&&D===f[T+1],a.push(i[u].offsetLeft,i[u].offsetTop)}return l&&o?o:(A.srcCoords=c,A[s]=h?O(a,c):O(c,a))}function E(i){return i.nodeName.toUpperCase()==="CANVAS"}le.transformLocalCoord=B,le.transformCoordWithViewport=R,le.isCanvasEl=E},ZpRC:function(Xe,le,H){"use strict";function Z(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function Q(i,A){return(!A||i!=="hidden")&&i!=="visible"&&i!=="clip"}function O(i,A){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var h=getComputedStyle(i,null);return Q(h.overflowY,A)||Q(h.overflowX,A)||function(s){var o=function(f){if(!f.ownerDocument||!f.ownerDocument.defaultView)return null;try{return f.ownerDocument.defaultView.frameElement}catch(l){return null}}(s);return!!o&&(o.clientHeight<s.scrollHeight||o.clientWidth<s.scrollWidth)}(i)}return!1}function K(i,A,h,s,o,f,l,c){return f<i&&l>A||f>i&&l<A?0:f<=i&&c<=h||l>=A&&c>=h?f-i-s:l>A&&c<h||f<i&&c>h?l-A+o:0}var M=function(i,A){var h=window,s=A.scrollMode,o=A.block,f=A.inline,l=A.boundary,c=A.skipOverflowHiddenElements,a=typeof l=="function"?l:function(oe){return oe!==l};if(!Z(i))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,v=[],T=i;Z(T)&&a(T);){if((T=T.parentElement)===u){v.push(T);break}T!=null&&T===document.body&&O(T)&&!O(document.documentElement)||T!=null&&O(T,c)&&v.push(T)}for(var x=h.visualViewport?h.visualViewport.width:innerWidth,D=h.visualViewport?h.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,p=window.scrollY||pageYOffset,n=i.getBoundingClientRect(),d=n.height,m=n.width,C=n.top,y=n.right,g=n.bottom,U=n.left,k=o==="start"||o==="nearest"?C:o==="end"?g:C+d/2,I=f==="center"?U+m/2:f==="end"?y:U,V=[],G=0;G<v.length;G++){var L=v[G],$=L.getBoundingClientRect(),Y=$.height,ne=$.width,se=$.top,_e=$.right,ve=$.bottom,Ce=$.left;if(s==="if-needed"&&C>=0&&U>=0&&g<=D&&y<=x&&C>=se&&g<=ve&&U>=Ce&&y<=_e)return V;var De=getComputedStyle(L),Qe=parseInt(De.borderLeftWidth,10),Se=parseInt(De.borderTopWidth,10),Ie=parseInt(De.borderRightWidth,10),Je=parseInt(De.borderBottomWidth,10),Et=0,Le=0,je="offsetWidth"in L?L.offsetWidth-L.clientWidth-Qe-Ie:0,st="offsetHeight"in L?L.offsetHeight-L.clientHeight-Se-Je:0;if(u===L)Et=o==="start"?k:o==="end"?k-D:o==="nearest"?K(p,p+D,D,Se,Je,p+k,p+k+d,d):k-D/2,Le=f==="start"?I:f==="center"?I-x/2:f==="end"?I-x:K(w,w+x,x,Qe,Ie,w+I,w+I+m,m),Et=Math.max(0,Et+p),Le=Math.max(0,Le+w);else{Et=o==="start"?k-se-Se:o==="end"?k-ve+Je+st:o==="nearest"?K(se,ve,Y,Se,Je+st,k,k+d,d):k-(se+Y/2)+st/2,Le=f==="start"?I-Ce-Qe:f==="center"?I-(Ce+ne/2)+je/2:f==="end"?I-_e+Ie+je:K(Ce,_e,ne,Qe,Ie+je,I,I+m,m);var he=L.scrollLeft,ie=L.scrollTop;k+=ie-(Et=Math.max(0,Math.min(ie+Et,L.scrollHeight-Y+st))),I+=he-(Le=Math.max(0,Math.min(he+Le,L.scrollWidth-ne+je)))}V.push({el:L,top:Et,left:Le})}return V};function B(i){return i===Object(i)&&Object.keys(i).length!==0}function R(i,A){A===void 0&&(A="auto");var h="scrollBehavior"in document.body.style;i.forEach(function(s){var o=s.el,f=s.top,l=s.left;o.scroll&&h?o.scroll({top:f,left:l,behavior:A}):(o.scrollTop=f,o.scrollLeft=l)})}function b(i){return i===!1?{block:"end",inline:"nearest"}:B(i)?i:{block:"start",inline:"nearest"}}function t(i,A){var h=!i.ownerDocument.documentElement.contains(i);if(B(A)&&typeof A.behavior=="function")return A.behavior(h?[]:M(i,A));if(h)return;var s=b(A);return R(M(i,s),s.behavior)}var E=le.a=t},aKvl:function(Xe,le,H){var Z=H("Sj9i"),Q=Z.quadraticProjectPoint;function O(K,M,B,R,b,t,E,i,A){if(E===0)return!1;var h=E;if(A>M+h&&A>R+h&&A>t+h||A<M-h&&A<R-h&&A<t-h||i>K+h&&i>B+h&&i>b+h||i<K-h&&i<B-h&&i<b-h)return!1;var s=Q(K,M,B,R,b,t,i,A,null);return s<=h/2}le.containStroke=O},aX58:function(Xe,le,H){var Z=H("3gBT"),Q=H("ItGF"),O=H("bYtY"),K=H("0s+r"),M=H("r6Bn"),B=H("7SHv"),R=H("MKOG"),b=H("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},i={},A="4.3.1";function h(a,u){var v=new c(Z(),a,u);return i[v.id]=v,v}function s(a){if(a)a.dispose();else{for(var u in i)i.hasOwnProperty(u)&&i[u].dispose();i={}}return this}function o(a){return i[a]}function f(a,u){E[a]=u}function l(a){delete i[a]}var c=function(a,u,v){v=v||{},this.dom=u,this.id=a;var T=this,x=new M,D=v.renderer;if(t){if(!E.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");D="vml"}else(!D||!E[D])&&(D="canvas");var w=new E[D](u,x,v,a);this.storage=x,this.painter=w;var p=!Q.node&&!Q.worker?new b(w.getViewportRoot(),w.root):null;this.handler=new K(x,w,p,w.root),this.animation=new R({stage:{update:O.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var n=x.delFromStorage,d=x.addToStorage;x.delFromStorage=function(m){n.call(x,m),m&&m.removeSelfFromZr(T)},x.addToStorage=function(m){d.call(x,m),m.addSelfToZr(T)}};c.prototype={constructor:c,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,u){this.painter.configLayer&&this.painter.configLayer(a,u),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,u){if(this.painter.addHover){var v=this.painter.addHover(a,u);return this.refreshHover(),v}},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,u){return this.painter.pathToImage(a,u)},setCursorStyle:function(a){this.handler.setCursorStyle(a)},findHover:function(a,u){return this.handler.findHover(a,u)},on:function(a,u,v){this.handler.on(a,u,v)},off:function(a,u){this.handler.off(a,u)},trigger:function(a,u){this.handler.trigger(a,u)},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,l(this.id)}},le.version=A,le.init=h,le.dispose=s,le.getInstance=o,le.registerPainter=f},bT9E:function(Xe,le,H){"use strict";H.d(le,"a",function(){return Q});var Z=H("VTBJ");function Q(O,K){var M=Object(Z.a)({},O);return Array.isArray(K)&&K.forEach(function(B){delete M[B]}),M}},bYtY:function(Xe,le){var H={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Z={"[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,K=O.forEach,M=O.filter,B=O.slice,R=O.map,b=O.reduce,t={};function E(Le,je){Le==="createCanvas"&&(l=null),t[Le]=je}function i(Le){if(Le==null||typeof Le!="object")return Le;var je=Le,st=Q.call(Le);if(st==="[object Array]"){if(!Qe(Le)){je=[];for(var he=0,ie=Le.length;he<ie;he++)je[he]=i(Le[he])}}else if(Z[st]){if(!Qe(Le)){var oe=Le.constructor;if(Le.constructor.from)je=oe.from(Le);else{je=new oe(Le.length);for(var he=0,ie=Le.length;he<ie;he++)je[he]=i(Le[he])}}}else if(!H[st]&&!Qe(Le)&&!V(Le)){je={};for(var ee in Le)Le.hasOwnProperty(ee)&&(je[ee]=i(Le[ee]))}return je}function A(Le,je,st){if(!U(je)||!U(Le))return st?i(je):Le;for(var he in je)if(je.hasOwnProperty(he)){var ie=Le[he],oe=je[he];U(oe)&&U(ie)&&!C(oe)&&!C(ie)&&!V(oe)&&!V(ie)&&!k(oe)&&!k(ie)&&!Qe(oe)&&!Qe(ie)?A(ie,oe,st):(st||!(he in Le))&&(Le[he]=i(je[he],!0))}return Le}function h(Le,je){for(var st=Le[0],he=1,ie=Le.length;he<ie;he++)st=A(st,Le[he],je);return st}function s(Le,je){for(var st in je)je.hasOwnProperty(st)&&(Le[st]=je[st]);return Le}function o(Le,je,st){for(var he in je)je.hasOwnProperty(he)&&(st?je[he]!=null:Le[he]==null)&&(Le[he]=je[he]);return Le}var f=function(){return t.createCanvas()};t.createCanvas=function(){return document.createElement("canvas")};var l;function c(){return l||(l=f().getContext("2d")),l}function a(Le,je){if(Le){if(Le.indexOf)return Le.indexOf(je);for(var st=0,he=Le.length;st<he;st++)if(Le[st]===je)return st}return-1}function u(Le,je){var st=Le.prototype;function he(){}he.prototype=je.prototype,Le.prototype=new he;for(var ie in st)st.hasOwnProperty(ie)&&(Le.prototype[ie]=st[ie]);Le.prototype.constructor=Le,Le.superClass=je}function v(Le,je,st){Le="prototype"in Le?Le.prototype:Le,je="prototype"in je?je.prototype:je,o(Le,je,st)}function T(Le){return Le?typeof Le=="string"?!1:typeof Le.length=="number":void 0}function x(Le,je,st){if(!(Le&&je))return;if(Le.forEach&&Le.forEach===K)Le.forEach(je,st);else if(Le.length===+Le.length)for(var he=0,ie=Le.length;he<ie;he++)je.call(st,Le[he],he,Le);else for(var oe in Le)Le.hasOwnProperty(oe)&&je.call(st,Le[oe],oe,Le)}function D(Le,je,st){if(!(Le&&je))return;if(Le.map&&Le.map===R)return Le.map(je,st);for(var he=[],ie=0,oe=Le.length;ie<oe;ie++)he.push(je.call(st,Le[ie],ie,Le));return he}function w(Le,je,st,he){if(!(Le&&je))return;if(Le.reduce&&Le.reduce===b)return Le.reduce(je,st,he);for(var ie=0,oe=Le.length;ie<oe;ie++)st=je.call(he,st,Le[ie],ie,Le);return st}function p(Le,je,st){if(!(Le&&je))return;if(Le.filter&&Le.filter===M)return Le.filter(je,st);for(var he=[],ie=0,oe=Le.length;ie<oe;ie++)je.call(st,Le[ie],ie,Le)&&he.push(Le[ie]);return he}function n(Le,je,st){if(!(Le&&je))return;for(var he=0,ie=Le.length;he<ie;he++)if(je.call(st,Le[he],he,Le))return Le[he]}function d(Le,je){var st=B.call(arguments,2);return function(){return Le.apply(je,st.concat(B.call(arguments)))}}function m(Le){var je=B.call(arguments,1);return function(){return Le.apply(this,je.concat(B.call(arguments)))}}function C(Le){return Q.call(Le)==="[object Array]"}function y(Le){return typeof Le=="function"}function g(Le){return Q.call(Le)==="[object String]"}function U(Le){var je=typeof Le;return je==="function"||!!Le&&je==="object"}function k(Le){return!!H[Q.call(Le)]}function I(Le){return!!Z[Q.call(Le)]}function V(Le){return typeof Le=="object"&&typeof Le.nodeType=="number"&&typeof Le.ownerDocument=="object"}function G(Le){return Le!==Le}function L(Le){for(var je=0,st=arguments.length;je<st;je++)if(arguments[je]!=null)return arguments[je]}function $(Le,je){return Le!=null?Le:je}function Y(Le,je,st){return Le!=null?Le:je!=null?je:st}function ne(){return Function.call.apply(B,arguments)}function se(Le){if(typeof Le=="number")return[Le,Le,Le,Le];var je=Le.length;return je===2?[Le[0],Le[1],Le[0],Le[1]]:je===3?[Le[0],Le[1],Le[2],Le[1]]:Le}function _e(Le,je){if(!Le)throw new Error(je)}function ve(Le){return Le==null?null:typeof Le.trim=="function"?Le.trim():Le.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Ce="__ec_primitive__";function De(Le){Le[Ce]=!0}function Qe(Le){return Le[Ce]}function Se(Le){var je=C(Le);this.data={};var st=this;Le instanceof Se?Le.each(he):Le&&x(Le,he);function he(ie,oe){je?st.set(ie,oe):st.set(oe,ie)}}Se.prototype={constructor:Se,get:function(Le){return this.data.hasOwnProperty(Le)?this.data[Le]:null},set:function(Le,je){return this.data[Le]=je},each:function(Le,je){je!==void 0&&(Le=d(Le,je));for(var st in this.data)this.data.hasOwnProperty(st)&&Le(this.data[st],st)},removeKey:function(Le){delete this.data[Le]}};function Ie(Le){return new Se(Le)}function Je(Le,je){for(var st=new Le.constructor(Le.length+je.length),he=0;he<Le.length;he++)st[he]=Le[he];var ie=Le.length;for(he=0;he<je.length;he++)st[he+ie]=je[he];return st}function Et(){}le.$override=E,le.clone=i,le.merge=A,le.mergeAll=h,le.extend=s,le.defaults=o,le.createCanvas=f,le.getContext=c,le.indexOf=a,le.inherits=u,le.mixin=v,le.isArrayLike=T,le.each=x,le.map=D,le.reduce=w,le.filter=p,le.find=n,le.bind=d,le.curry=m,le.isArray=C,le.isFunction=y,le.isString=g,le.isObject=U,le.isBuiltInObject=k,le.isTypedArray=I,le.isDom=V,le.eqNaN=G,le.retrieve=L,le.retrieve2=$,le.retrieve3=Y,le.slice=ne,le.normalizeCssArray=se,le.assert=_e,le.trim=ve,le.setAsPrimitive=De,le.isPrimitive=Qe,le.createHashMap=Ie,le.concatArray=Je,le.noop=Et},biw7:function(Xe,le,H){"use strict";var Z=H("q1tI"),Q=H.n(Z),O=Z.createContext(null);le.a=O},c5Ni:function(Xe,le,H){},chpo:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.default=void 0;var Z=1,Q=function(){return"".concat(Z++)};le.default=Q},crp1:function(Xe,le,H){"use strict";H.d(le,"b",function(){return Ne}),H.d(le,"a",function(){return bt});var Z={},Q=function(me,be,Pe,rt,qe){var Ft=Z[be]||(Z[be]=URL.createObjectURL(new Blob([me],{type:"text/javascript"}))),te=new Worker(Ft);return te.onerror=function(P){return qe(P.error,null)},te.onmessage=function(P){return qe(null,P.data)},te.postMessage(Pe,rt),te},O=Uint8Array,K=Uint16Array,M=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]),R=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]),b=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=function(me,be){for(var Pe=new K(31),rt=0;rt<31;++rt)Pe[rt]=be+=1<<me[rt-1];for(var qe=new M(Pe[30]),rt=1;rt<30;++rt)for(var Ft=Pe[rt];Ft<Pe[rt+1];++Ft)qe[Ft]=Ft-Pe[rt]<<5|rt;return[Pe,qe]},E=t(B,2),i=E[0],A=E[1];i[28]=258,A[258]=28;for(var h=t(R,0),s=h[0],o=h[1],f=new K(32768),l=0;l<32768;++l){var c=(l&43690)>>>1|(l&21845)<<1;c=(c&52428)>>>2|(c&13107)<<2,c=(c&61680)>>>4|(c&3855)<<4,f[l]=((c&65280)>>>8|(c&255)<<8)>>>1}for(var a=function(me,be,Pe){for(var rt=me.length,qe=0,Ft=new K(be);qe<rt;++qe)++Ft[me[qe]-1];var te=new K(be);for(qe=0;qe<be;++qe)te[qe]=te[qe-1]+Ft[qe-1]<<1;var P;if(Pe){P=new K(1<<be);var j=15-be;for(qe=0;qe<rt;++qe)if(me[qe])for(var q=qe<<4|me[qe],Ae=be-me[qe],re=te[me[qe]-1]++<<Ae,We=re|(1<<Ae)-1;re<=We;++re)P[f[re]>>>j]=q}else for(P=new K(rt),qe=0;qe<rt;++qe)P[qe]=f[te[me[qe]-1]++]>>>15-me[qe];return P},u=new O(288),l=0;l<144;++l)u[l]=8;for(var l=144;l<256;++l)u[l]=9;for(var l=256;l<280;++l)u[l]=7;for(var l=280;l<288;++l)u[l]=8;for(var v=new O(32),l=0;l<32;++l)v[l]=5;var T=a(u,9,0),x=a(u,9,1),D=a(v,5,0),w=a(v,5,1),p=function(me){for(var be=me[0],Pe=1;Pe<me.length;++Pe)me[Pe]>be&&(be=me[Pe]);return be},n=function(me,be,Pe){var rt=be/8>>0;return(me[rt]|me[rt+1]<<8)>>>(be&7)&Pe},d=function(me,be){var Pe=be/8>>0;return(me[Pe]|me[Pe+1]<<8|me[Pe+2]<<16)>>>(be&7)},m=function(me){return(me/8>>0)+(me&7&&1)},C=function(me,be,Pe){(be==null||be<0)&&(be=0),(Pe==null||Pe>me.length)&&(Pe=me.length);var rt=new(me instanceof K?K:me instanceof M?M:O)(Pe-be);return rt.set(me.subarray(be,Pe)),rt},y=function(me,be,Pe){var rt=me.length,qe=!be||Pe,Ft=!Pe||Pe.i;Pe||(Pe={}),be||(be=new O(rt*3));var te=function(mr){var Ir=be.length;if(mr>Ir){var xr=new O(Math.max(Ir*2,mr));xr.set(be),be=xr}},P=Pe.f||0,j=Pe.p||0,q=Pe.b||0,Ae=Pe.l,re=Pe.d,We=Pe.m,_t=Pe.n,Pt=rt*8;do{if(!Ae){Pe.f=P=n(me,j,1);var Qt=n(me,j+1,3);if(j+=3,Qt)if(Qt==1)Ae=x,re=w,We=9,_t=5;else if(Qt==2){var qt=n(me,j,31)+257,cr=n(me,j+10,15)+4,Dr=qt+n(me,j+5,31)+1;j+=14;for(var wr=new O(Dr),Fr=new O(19),hr=0;hr<cr;++hr)Fr[b[hr]]=n(me,j+hr*3,7);j+=cr*3;var Ur=p(Fr),Nr=(1<<Ur)-1;if(!Ft&&j+Dr*(Ur+7)>Pt)break;for(var cn=a(Fr,Ur,1),hr=0;hr<Dr;){var Gr=cn[n(me,j,Nr)];j+=Gr&15;var wt=Gr>>>4;if(wt<16)wr[hr++]=wt;else{var Jr=0,bn=0;for(wt==16?(bn=3+n(me,j,3),j+=2,Jr=wr[hr-1]):wt==17?(bn=3+n(me,j,7),j+=3):wt==18&&(bn=11+n(me,j,127),j+=7);bn--;)wr[hr++]=Jr}}var qr=wr.subarray(0,qt),rn=wr.subarray(qt);We=p(qr),_t=p(rn),Ae=a(qr,We,1),re=a(rn,_t,1)}else throw"invalid block type";else{var wt=m(j)+4,Yt=me[wt-4]|me[wt-3]<<8,Xt=wt+Yt;if(Xt>rt){if(Ft)throw"unexpected EOF";break}qe&&te(q+Yt),be.set(me.subarray(wt,Xt),q),Pe.b=q+=Yt,Pe.p=j=Xt*8;continue}if(j>Pt)throw"unexpected EOF"}qe&&te(q+131072);for(var sn=(1<<We)-1,hn=(1<<_t)-1,mn=We+_t+18;Ft||j+mn<Pt;){var Jr=Ae[d(me,j)&sn],_r=Jr>>>4;if(j+=Jr&15,j>Pt)throw"unexpected EOF";if(!Jr)throw"invalid length/literal";if(_r<256)be[q++]=_r;else if(_r==256){Ae=null;break}else{var dr=_r-254;if(_r>264){var hr=_r-257,tr=B[hr];dr=n(me,j,(1<<tr)-1)+i[hr],j+=tr}var nr=re[d(me,j)&hn],Zt=nr>>>4;if(!nr)throw"invalid distance";j+=nr&15;var rn=s[Zt];if(Zt>3){var tr=R[Zt];rn+=d(me,j)&(1<<tr)-1,j+=tr}if(j>Pt)throw"unexpected EOF";qe&&te(q+131072);for(var Er=q+dr;q<Er;q+=4)be[q]=be[q-rn],be[q+1]=be[q+1-rn],be[q+2]=be[q+2-rn],be[q+3]=be[q+3-rn];q=Er}}Pe.l=Ae,Pe.p=j,Pe.b=q,Ae&&(P=1,Pe.m=We,Pe.d=re,Pe.n=_t)}while(!P);return q==be.length?be:C(be,0,q)},g=function(me,be,Pe){Pe<<=be&7;var rt=be/8>>0;me[rt]|=Pe,me[rt+1]|=Pe>>>8},U=function(me,be,Pe){Pe<<=be&7;var rt=be/8>>0;me[rt]|=Pe,me[rt+1]|=Pe>>>8,me[rt+2]|=Pe>>>16},k=function(me,be){for(var Pe=[],rt=0;rt<me.length;++rt)me[rt]&&Pe.push({s:rt,f:me[rt]});var qe=Pe.length,Ft=Pe.slice();if(!qe)return[new O(0),0];if(qe==1){var te=new O(Pe[0].s+1);return te[Pe[0].s]=1,[te,1]}Pe.sort(function(Dr,wr){return Dr.f-wr.f}),Pe.push({s:-1,f:25001});var P=Pe[0],j=Pe[1],q=0,Ae=1,re=2;for(Pe[0]={s:-1,f:P.f+j.f,l:P,r:j};Ae!=qe-1;)P=Pe[Pe[q].f<Pe[re].f?q++:re++],j=Pe[q!=Ae&&Pe[q].f<Pe[re].f?q++:re++],Pe[Ae++]={s:-1,f:P.f+j.f,l:P,r:j};for(var We=Ft[0].s,rt=1;rt<qe;++rt)Ft[rt].s>We&&(We=Ft[rt].s);var _t=new K(We+1),Pt=I(Pe[Ae-1],_t,0);if(Pt>be){var rt=0,Qt=0,wt=Pt-be,Yt=1<<wt;for(Ft.sort(function(wr,Fr){return _t[Fr.s]-_t[wr.s]||wr.f-Fr.f});rt<qe;++rt){var Xt=Ft[rt].s;if(_t[Xt]>be)Qt+=Yt-(1<<Pt-_t[Xt]),_t[Xt]=be;else break}for(Qt>>>=wt;Qt>0;){var qt=Ft[rt].s;_t[qt]<be?Qt-=1<<be-_t[qt]++-1:++rt}for(;rt>=0&&Qt;--rt){var cr=Ft[rt].s;_t[cr]==be&&(--_t[cr],++Qt)}Pt=be}return[new O(_t),Pt]},I=function(me,be,Pe){return me.s==-1?Math.max(I(me.l,be,Pe+1),I(me.r,be,Pe+1)):be[me.s]=Pe},V=function(me){for(var be=me.length;be&&!me[--be];);for(var Pe=new K(++be),rt=0,qe=me[0],Ft=1,te=function(j){Pe[rt++]=j},P=1;P<=be;++P)if(me[P]==qe&&P!=be)++Ft;else{if(!qe&&Ft>2){for(;Ft>138;Ft-=138)te(32754);Ft>2&&(te(Ft>10?Ft-11<<5|28690:Ft-3<<5|12305),Ft=0)}else if(Ft>3){for(te(qe),--Ft;Ft>6;Ft-=6)te(8304);Ft>2&&(te(Ft-3<<5|8208),Ft=0)}for(;Ft--;)te(qe);Ft=1,qe=me[P]}return[Pe.subarray(0,rt),be]},G=function(me,be){for(var Pe=0,rt=0;rt<be.length;++rt)Pe+=me[rt]*be[rt];return Pe},L=function(me,be,Pe){var rt=Pe.length,qe=m(be+2);me[qe]=rt&255,me[qe+1]=rt>>>8,me[qe+2]=me[qe]^255,me[qe+3]=me[qe+1]^255;for(var Ft=0;Ft<rt;++Ft)me[qe+Ft+4]=Pe[Ft];return(qe+4+rt)*8},$=function(me,be,Pe,rt,qe,Ft,te,P,j,q,Ae){g(be,Ae++,Pe),++qe[256];for(var re=k(qe,15),We=re[0],_t=re[1],Pt=k(Ft,15),Qt=Pt[0],wt=Pt[1],Yt=V(We),Xt=Yt[0],qt=Yt[1],cr=V(Qt),Dr=cr[0],wr=cr[1],Fr=new K(19),hr=0;hr<Xt.length;++hr)Fr[Xt[hr]&31]++;for(var hr=0;hr<Dr.length;++hr)Fr[Dr[hr]&31]++;for(var Ur=k(Fr,7),Nr=Ur[0],cn=Ur[1],Gr=19;Gr>4&&!Nr[b[Gr-1]];--Gr);var Jr=q+5<<3,bn=G(qe,u)+G(Ft,v)+te,qr=G(qe,We)+G(Ft,Qt)+te+14+3*Gr+G(Fr,Nr)+(2*Fr[16]+3*Fr[17]+7*Fr[18]);if(Jr<=bn&&Jr<=qr)return L(be,Ae,me.subarray(j,j+q));var rn,sn,hn,mn;if(g(be,Ae,1+(qr<bn)),Ae+=2,qr<bn){rn=a(We,_t,0),sn=We,hn=a(Qt,wt,0),mn=Qt;var _r=a(Nr,cn,0);g(be,Ae,qt-257),g(be,Ae+5,wr-1),g(be,Ae+10,Gr-4),Ae+=14;for(var hr=0;hr<Gr;++hr)g(be,Ae+3*hr,Nr[b[hr]]);Ae+=3*Gr;for(var dr=[Xt,Dr],tr=0;tr<2;++tr)for(var nr=dr[tr],hr=0;hr<nr.length;++hr){var Zt=nr[hr]&31;g(be,Ae,_r[Zt]),Ae+=Nr[Zt],Zt>15&&(g(be,Ae,nr[hr]>>>5&127),Ae+=nr[hr]>>>12)}}else rn=T,sn=u,hn=D,mn=v;for(var hr=0;hr<P;++hr)if(rt[hr]>255){var Zt=rt[hr]>>>18&31;U(be,Ae,rn[Zt+257]),Ae+=sn[Zt+257],Zt>7&&(g(be,Ae,rt[hr]>>>23&31),Ae+=B[Zt]);var Er=rt[hr]&31;U(be,Ae,hn[Er]),Ae+=mn[Er],Er>3&&(U(be,Ae,rt[hr]>>>5&8191),Ae+=R[Er])}else U(be,Ae,rn[rt[hr]]),Ae+=sn[rt[hr]];return U(be,Ae,rn[256]),Ae+sn[256]},Y=new M([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ne=new O(0),se=function(me,be,Pe,rt,qe,Ft){var te=me.length,P=new O(rt+te+5*(1+Math.floor(te/7e3))+qe),j=P.subarray(rt,P.length-qe),q=0;if(!be||te<8)for(var Ae=0;Ae<=te;Ae+=65535){var re=Ae+65535;re<te?q=L(j,q,me.subarray(Ae,re)):(j[Ae]=Ft,q=L(j,q,me.subarray(Ae,te)))}else{for(var We=Y[be-1],_t=We>>>13,Pt=We&8191,Qt=(1<<Pe)-1,wt=new K(32768),Yt=new K(Qt+1),Xt=Math.ceil(Pe/3),qt=2*Xt,cr=function(en){return(me[en]^me[en+1]<<Xt^me[en+2]<<qt)&Qt},Dr=new M(25e3),wr=new K(288),Fr=new K(32),hr=0,Ur=0,Ae=0,Nr=0,cn=0,Gr=0;Ae<te;++Ae){var Jr=cr(Ae),bn=Ae&32767,qr=Yt[Jr];if(wt[bn]=qr,Yt[Jr]=bn,cn<=Ae){var rn=te-Ae;if((hr>7e3||Nr>24576)&&rn>423){q=$(me,j,0,Dr,wr,Fr,Ur,Nr,Gr,Ae-Gr,q),Nr=hr=Ur=0,Gr=Ae;for(var sn=0;sn<286;++sn)wr[sn]=0;for(var sn=0;sn<30;++sn)Fr[sn]=0}var hn=2,mn=0,_r=Pt,dr=bn-qr&32767;if(rn>2&&Jr==cr(Ae-dr))for(var tr=Math.min(_t,rn)-1,nr=Math.min(32767,Ae),Zt=Math.min(258,rn);dr<=nr&&--_r&&bn!=qr;){if(me[Ae+hn]==me[Ae+hn-dr]){for(var Er=0;Er<Zt&&me[Ae+Er]==me[Ae+Er-dr];++Er);if(Er>hn){if(hn=Er,mn=dr,Er>tr)break;for(var mr=Math.min(dr,Er-2),Ir=0,sn=0;sn<mr;++sn){var xr=Ae-dr+sn+32768&32767,On=wt[xr],zr=xr-On+32768&32767;zr>Ir&&(Ir=zr,qr=xr)}}}bn=qr,qr=wt[bn],dr+=bn-qr+32768&32767}if(mn){Dr[Nr++]=268435456|A[hn]<<18|o[mn];var En=A[hn]&31,Qn=o[mn]&31;Ur+=B[En]+R[Qn],++wr[257+En],++Fr[Qn],cn=Ae+hn,++hr}else Dr[Nr++]=me[Ae],++wr[me[Ae]]}}q=$(me,j,Ft,Dr,wr,Fr,Ur,Nr,Gr,Ae-Gr,q),Ft||(q=L(j,q,ne))}return C(P,0,rt+m(q)+qe)},_e=function(){for(var me=new M(256),be=0;be<256;++be){for(var Pe=be,rt=9;--rt;)Pe=(Pe&1&&3988292384)^Pe>>>1;me[be]=Pe}return me}(),ve=function(){var me=4294967295;return{p:function(be){for(var Pe=me,rt=0;rt<be.length;++rt)Pe=_e[Pe&255^be[rt]]^Pe>>>8;me=Pe},d:function(){return me^4294967295}}},Ce=function(){var me=1,be=0;return{p:function(Pe){for(var rt=me,qe=be,Ft=Pe.length,te=0;te!=Ft;){for(var P=Math.min(te+5552,Ft);te<P;++te)rt+=Pe[te],qe+=rt;rt%=65521,qe%=65521}me=rt,be=qe},d:function(){return(me>>>8<<16|(be&255)<<8|be>>>8)+((me&255)<<23)*2}}},De=function(me,be,Pe,rt,qe){return se(me,be.level==null?6:be.level,be.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(me.length)))*1.5):12+be.mem,Pe,rt,!qe)},Qe=function(me,be){var Pe={};for(var rt in me)Pe[rt]=me[rt];for(var rt in be)Pe[rt]=be[rt];return Pe},Se=function(me,be,Pe){for(var rt=me(),qe=me.toString(),Ft=qe.slice(qe.indexOf("[")+1,qe.lastIndexOf("]")).replace(/ /g,"").split(","),te=0;te<rt.length;++te){var P=rt[te],j=Ft[te];if(typeof P=="function"){be+=";"+j+"=";var q=P.toString();if(P.prototype)if(q.indexOf("[native code]")!=-1){var Ae=q.indexOf(" ",8)+1;be+=q.slice(Ae,q.indexOf("(",Ae))}else{be+=q;for(var re in P.prototype)be+=";"+j+".prototype."+re+"="+P.prototype[re].toString()}else be+=q}else Pe[j]=P}return[be,Pe]},Ie=[],Je=function(me){var be=[];for(var Pe in me)(me[Pe]instanceof O||me[Pe]instanceof K||me[Pe]instanceof M)&&be.push((me[Pe]=new me[Pe].constructor(me[Pe])).buffer);return be},Et=function(me,be,Pe,rt){var qe;if(!Ie[Pe]){for(var Ft="",te={},P=me.length-1,j=0;j<P;++j)qe=Se(me[j],Ft,te),Ft=qe[0],te=qe[1];Ie[Pe]=Se(me[P],Ft,te)}var q=Qe({},Ie[Pe][1]);return Q(Ie[Pe][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+be.toString()+"}",Pe,q,Je(q),rt)},Le=function(){return[O,K,M,B,R,b,i,s,x,w,f,a,p,n,d,m,C,y,Oe,ee,de]},je=function(){return[O,K,M,B,R,b,A,o,T,u,D,v,f,Y,ne,a,g,U,k,I,V,G,L,$,m,C,se,De,Ue,ee]},st=function(){return[xt,ke,ft,ve,_e]},he=function(){return[It,He]},ie=function(){return[ct,ft,Ce]},oe=function(){return[gt]},ee=function(me){return postMessage(me,[me.buffer])},de=function(me){return me&&me.size&&new O(me.size)},we=function(me,be,Pe,rt,qe,Ft){var te=Et(Pe,rt,qe,function(P,j){te.terminate(),Ft(P,j)});return be.consume||(me=new O(me)),te.postMessage([me,be],[me.buffer]),function(){te.terminate()}},Be=function(me){return me.ondata=function(be,Pe){return postMessage([be,Pe],[be.buffer])},function(be){return me.push(be.data[0],be.data[1])}},nt=function(me,be,Pe,rt,qe){var Ft,te=Et(me,rt,qe,function(P,j){P?(te.terminate(),be.ondata.call(be,P)):(j[1]&&te.terminate(),be.ondata.call(be,P,j[0],j[1]))});te.postMessage(Pe),be.push=function(P,j){if(Ft)throw"stream finished";if(!be.ondata)throw"no stream handler";te.postMessage([P,Ft=j],[P.buffer])},be.terminate=function(){te.terminate()}},at=function(me,be){return me[be]|me[be+1]<<8},At=function(me,be){return(me[be]|me[be+1]<<8|me[be+2]<<16)+(me[be+3]<<23)*2},ft=function(me,be,Pe){for(;Pe;++be)me[be]=Pe,Pe>>>=8},xt=function(me,be){var Pe=be.filename;if(me[0]=31,me[1]=139,me[2]=8,me[8]=be.level<2?4:be.level==9?2:0,me[9]=3,be.mtime!=0&&ft(me,4,Math.floor(new Date(be.mtime||Date.now())/1e3)),Pe){me[3]=8;for(var rt=0;rt<=Pe.length;++rt)me[rt+10]=Pe.charCodeAt(rt)}},It=function(me){if(me[0]!=31||me[1]!=139||me[2]!=8)throw"invalid gzip data";var be=me[3],Pe=10;be&4&&(Pe+=me[10]|(me[11]<<8)+2);for(var rt=(be>>3&1)+(be>>4&1);rt>0;rt-=!me[Pe++]);return Pe+(be&2)},He=function(me){var be=me.length;return(me[be-4]|me[be-3]<<8|me[be-2]<<16)+2*(me[be-1]<<23)},ke=function(me){return 10+(me.filename&&me.filename.length+1||0)},ct=function(me,be){var Pe=be.level,rt=Pe==0?0:Pe<6?1:Pe==9?3:2;me[0]=120,me[1]=rt<<6|(rt?32-2*rt:1)},gt=function(me){if((me[0]&15)!=8||me[0]>>>4>7||(me[0]<<8|me[1])%31)throw"invalid zlib data";if(me[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Ze(me,be){return!be&&typeof me=="function"&&(be=me,me={}),this.ondata=be,me}var ot=function(){function me(be,Pe){!Pe&&typeof be=="function"&&(Pe=be,be={}),this.ondata=Pe,this.o=be||{}}return me.prototype.p=function(be,Pe){this.ondata(De(be,this.o,0,0,!Pe),Pe)},me.prototype.push=function(be,Pe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Pe,this.p(be,Pe||!1)},me}(),Ke=function(){function me(be,Pe){nt([je,function(){return[Be,ot]}],this,Ze.call(this,be,Pe),function(rt){var qe=new ot(rt.data);onmessage=Be(qe)},6)}return me}();function Me(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[je],function(rt){return ee(Ue(rt.data[0],rt.data[1]))},0,Pe)}function Ue(me,be){return be===void 0&&(be={}),De(me,be,0,0)}var ge=function(){function me(be){this.s={},this.p=new O(0),this.ondata=be}return me.prototype.e=function(be){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Pe=this.p.length,rt=new O(Pe+be.length);rt.set(this.p),rt.set(be,Pe),this.p=rt},me.prototype.c=function(be){this.d=this.s.i=be||!1;var Pe=this.s.b,rt=y(this.p,this.o,this.s);this.ondata(C(rt,Pe,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},me.prototype.push=function(be,Pe){this.e(be),this.c(Pe)},me}(),xe=function(){function me(be){this.ondata=be,nt([Le,function(){return[Be,ge]}],this,0,function(){var Pe=new ge;onmessage=Be(Pe)},7)}return me}();function Ee(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[Le],function(rt){return ee(Oe(rt.data[0],de(rt.data[1])))},1,Pe)}function Oe(me,be){return y(me,be)}var Fe=function(){function me(be,Pe){this.c=ve(),this.l=0,this.v=1,ot.call(this,be,Pe)}return me.prototype.push=function(be,Pe){ot.prototype.push.call(this,be,Pe)},me.prototype.p=function(be,Pe){this.c.p(be),this.l+=be.length;var rt=De(be,this.o,this.v&&ke(this.o),Pe&&8,!Pe);this.v&&(xt(rt,this.o),this.v=0),Pe&&(ft(rt,rt.length-8,this.c.d()),ft(rt,rt.length-4,this.l)),this.ondata(rt,Pe)},me}(),$e=function(){function me(be,Pe){nt([je,st,function(){return[Be,ot,Fe]}],this,Ze.call(this,be,Pe),function(rt){var qe=new Fe(rt.data);onmessage=Be(qe)},8)}return me}();function pt(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[je,st,function(){return[Ot]}],function(rt){return ee(Ot(rt.data[0],rt.data[1]))},2,Pe)}function Ot(me,be){be===void 0&&(be={});var Pe=ve(),rt=me.length;Pe.p(me);var qe=De(me,be,ke(be),8),Ft=qe.length;return xt(qe,be),ft(qe,Ft-8,Pe.d()),ft(qe,Ft-4,rt),qe}var kt=function(){function me(be){this.v=1,ge.call(this,be)}return me.prototype.push=function(be,Pe){if(ge.prototype.e.call(this,be),this.v){var rt=It(this.p);if(rt>=this.p.length&&!Pe)return;this.p=this.p.subarray(rt),this.v=0}if(Pe){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}ge.prototype.c.call(this,Pe)},me}(),Dt=function(){function me(be){this.ondata=be,nt([Le,he,function(){return[Be,ge,kt]}],this,0,function(){var Pe=new kt;onmessage=Be(Pe)},9)}return me}();function Bt(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[Le,he,function(){return[ht]}],function(rt){return ee(ht(rt.data[0]))},3,Pe)}function ht(me,be){return y(me.subarray(It(me),-8),be||new O(He(me)))}var it=function(){function me(be,Pe){this.c=Ce(),this.v=1,ot.call(this,be,Pe)}return me.prototype.push=function(be,Pe){ot.prototype.push.call(this,be,Pe)},me.prototype.p=function(be,Pe){this.c.p(be);var rt=De(be,this.o,this.v&&2,Pe&&4,!Pe);this.v&&(ct(rt,this.o),this.v=0),Pe&&ft(rt,rt.length-4,this.c.d()),this.ondata(rt,Pe)},me}(),et=function(){function me(be,Pe){nt([je,ie,function(){return[Be,ot,it]}],this,Ze.call(this,be,Pe),function(rt){var qe=new it(rt.data);onmessage=Be(qe)},10)}return me}();function Te(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[je,ie,function(){return[Ne]}],function(rt){return ee(Ne(rt.data[0],rt.data[1]))},4,Pe)}function Ne(me,be){be===void 0&&(be={});var Pe=Ce();Pe.p(me);var rt=De(me,be,2,4);return ct(rt,be),ft(rt,rt.length-4,Pe.d()),rt}var mt=function(){function me(be){this.v=1,ge.call(this,be)}return me.prototype.push=function(be,Pe){if(ge.prototype.e.call(this,be),this.v){if(this.p.length<2&&!Pe)return;this.p=this.p.subarray(2),this.v=0}if(Pe){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}ge.prototype.c.call(this,Pe)},me}(),lt=function(){function me(be){this.ondata=be,nt([Le,oe,function(){return[Be,ge,mt]}],this,0,function(){var Pe=new mt;onmessage=Be(Pe)},11)}return me}();function Ct(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return we(me,be,[Le,oe,function(){return[bt]}],function(rt){return ee(bt(rt.data[0],de(rt.data[1])))},5,Pe)}function bt(me,be){return y((gt(me),me.subarray(2,-4)),be)}var tt=function(){function me(be){this.G=kt,this.I=ge,this.Z=mt,this.ondata=be}return me.prototype.push=function(be,Pe){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(be,Pe);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 qe=this,Ft=function(){qe.ondata.apply(qe,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Ft):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Ft):new this.Z(Ft),this.s.push(this.p,Pe),this.p=null}}},me}(),St=function(){function me(be){this.G=Dt,this.I=xe,this.Z=lt,this.ondata=be}return me.prototype.push=function(be,Pe){tt.prototype.push.call(this,be,Pe)},me}();function Lt(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";return me[0]==31&&me[1]==139&&me[2]==8?Bt(me,be,Pe):(me[0]&15)!=8||me[0]>>4>7||(me[0]<<8|me[1])%31?Ee(me,be,Pe):Ct(me,be,Pe)}function Tt(me,be){return me[0]==31&&me[1]==139&&me[2]==8?ht(me,be):(me[0]&15)!=8||me[0]>>4>7||(me[0]<<8|me[1])%31?Oe(me,be):bt(me,be)}var Ht=function(me,be,Pe,rt){for(var qe in me){var Ft=me[qe],te=be+qe;Ft instanceof O?Pe[te]=[Ft,rt]:Array.isArray(Ft)?Pe[te]=[Ft[0],Qe(rt,Ft[1])]:Ht(Ft,te+"/",Pe,rt)}};function gr(me,be){var Pe=me.length;if(!be&&typeof TextEncoder!="undefined")return new TextEncoder().encode(me);for(var rt=new O(me.length+(me.length>>>1)),qe=0,Ft=function(q){rt[qe++]=q},te=0;te<Pe;++te){if(qe+5>rt.length){var P=new O(qe+8+(Pe-te<<1));P.set(rt),rt=P}var j=me.charCodeAt(te);j<128||be?Ft(j):j<2048?(Ft(192|j>>>6),Ft(128|j&63)):j>55295&&j<57344?(j=65536+(j&1023<<10)|me.charCodeAt(++te)&1023,Ft(240|j>>>18),Ft(128|j>>>12&63),Ft(128|j>>>6&63),Ft(128|j&63)):(Ft(224|j>>>12),Ft(128|j>>>6&63),Ft(128|j&63))}return C(rt,0,qe)}function Or(me,be){var Pe="";if(!be&&typeof TextDecoder!="undefined")return new TextDecoder().decode(me);for(var rt=0;rt<me.length;){var qe=me[rt++];qe<128||be?Pe+=String.fromCharCode(qe):qe<224?Pe+=String.fromCharCode((qe&31)<<6|me[rt++]&63):qe<240?Pe+=String.fromCharCode((qe&15)<<12|(me[rt++]&63)<<6|me[rt++]&63):(qe=((qe&15)<<18|(me[rt++]&63)<<12|(me[rt++]&63)<<6|me[rt++]&63)-65536,Pe+=String.fromCharCode(55296|qe>>10,56320|qe&1023))}return Pe}var vr=function(me,be){return be+30+at(me,be+26)+at(me,be+28)},jt=function(me,be,Pe){var rt=at(me,be+28),qe=Or(me.subarray(be+46,be+46+rt),!(at(me,be+8)&2048)),Ft=be+46+rt,te=Pe?Mr(me,Ft):[At(me,be+20),At(me,be+24),At(me,be+42)],P=te[0],j=te[1],q=te[2];return[at(me,be+10),P,j,qe,Ft+at(me,be+30)+at(me,be+32),q]},Mr=function(me,be){for(;at(me,be)!=1;be+=4+at(me,be+2));return[At(me,be+12),At(me,be+4),At(me,be+20)]},br=function(me,be,Pe,rt,qe,Ft,te,P,j,q){var Ae=Ft.length,re=rt.length;ft(me,be,j!=null?33639248:67324752),be+=4,j!=null&&(me[be]=20,be+=2),me[be]=20,be+=2,me[be++]=q==8&&(P.level==1?6:P.level<6?4:P.level==9?2:0),me[be++]=te&&8,me[be]=q,be+=2;var We=new Date(P.mtime||Date.now()),_t=We.getFullYear()-1980;if(_t<0||_t>119)throw"date not in range 1980-2099";ft(me,be,(_t<<24)*2|We.getMonth()+1<<21|We.getDate()<<16|We.getHours()<<11|We.getMinutes()<<5|We.getSeconds()>>>1),be+=4,ft(me,be,Pe),ft(me,be+4,re),ft(me,be+8,qe),ft(me,be+12,Ae),be+=16,j!=null&&(ft(me,be+=10,j),be+=4),me.set(Ft,be),be+=Ae,j==null&&me.set(rt,be)},Tr=function(me,be,Pe,rt,qe){ft(me,be,101010256),ft(me,be+8,Pe),ft(me,be+10,Pe),ft(me,be+12,rt),ft(me,be+16,qe)};function Ar(me,be,Pe){if(Pe||(Pe=be,be={}),typeof Pe!="function")throw"no callback";var rt={};Ht(me,"",rt,be);var qe=Object.keys(rt),Ft=qe.length,te=0,P=0,j=Ft,q=new Array(Ft),Ae=[],re=function(){for(var Qt=0;Qt<Ae.length;++Qt)Ae[Qt]()},We=function(){var Qt=new O(P+22),wt=te,Yt=P-te;P=0;for(var Xt=0;Xt<j;++Xt){var qt=q[Xt];try{br(Qt,P,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,null,qt.t),br(Qt,te,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,P,qt.t),te+=46+qt.n.length,P+=30+qt.n.length+qt.d.length}catch(cr){return Pe(cr,null)}}Tr(Qt,te,q.length,Yt,wt),Pe(null,Qt)};Ft||We();for(var _t=function(Qt){var wt=qe[Qt],Yt=rt[wt],Xt=Yt[0],qt=Yt[1],cr=ve(),Dr=Xt.length;cr.p(Xt);var wr=gr(wt),Fr=wr.length,hr=qt.level==0?0:8,Ur=function(Nr,cn){if(Nr)re(),Pe(Nr,null);else{var Gr=cn.length;q[Qt]={t:hr,d:cn,m:Dr,c:cr.d(),u:wt.length!=Gr,n:wr,p:qt},te+=30+Fr+Gr,P+=76+2*Fr+Gr,--Ft||We()}};if(wr.length>65535&&Ur("filename too long",null),!hr)Ur(null,Xt);else if(Dr<16e4)try{Ur(null,Ue(Xt,qt))}catch(Nr){Ur(Nr,null)}else Ae.push(Me(Xt,qt,Ur))},Pt=0;Pt<j;++Pt)_t(Pt);return re}function Sr(me,be){be===void 0&&(be={});var Pe={},rt=[];Ht(me,"",Pe,be);var qe=0,Ft=0;for(var te in Pe){var P=Pe[te],j=P[0],q=P[1],Ae=q.level==0?0:8,re=gr(te),We=re.length;if(re.length>65535)throw"filename too long";var _t=Ae?Ue(j,q):j,Pt=_t.length,Qt=ve();Qt.p(j),rt.push({t:Ae,d:_t,m:j.length,c:Qt.d(),u:te.length!=We,n:re,o:qe,p:q}),qe+=30+We+Pt,Ft+=76+2*We+Pt}for(var wt=new O(Ft+22),Yt=qe,Xt=Ft-qe,qt=0;qt<rt.length;++qt){var cr=rt[qt];br(wt,cr.o,cr.c,cr.d,cr.m,cr.n,cr.u,cr.p,null,cr.t),br(wt,qe,cr.c,cr.d,cr.m,cr.n,cr.u,cr.p,cr.o,cr.t),qe+=46+cr.n.length}return Tr(wt,qe,rt.length,Xt,Yt),wt}function tn(me,be){if(typeof be!="function")throw"no callback";for(var Pe=[],rt=function(){for(var We=0;We<Pe.length;++We)Pe[We]()},qe={},Ft=me.length-22;At(me,Ft)!=101010256;--Ft)if(!Ft||me.length-Ft>65558){be("invalid zip file",null);return}var te=at(me,Ft+8);te||be(null,{});var P=te,j=At(me,Ft+16),q=j==4294967295;if(q){if(Ft=At(me,Ft-12),At(me,Ft)!=101075792)throw"invalid zip file";P=te=At(me,Ft+32),j=At(me,Ft+48)}for(var Ae=function(We){var _t=jt(me,j,q),Pt=_t[0],Qt=_t[1],wt=_t[2],Yt=_t[3],Xt=_t[4],qt=_t[5],cr=vr(me,qt);j=Xt;var Dr=function(Fr,hr){Fr?(rt(),be(Fr,null)):(qe[Yt]=hr,--te||be(null,qe))};if(!Pt)Dr(null,C(me,cr,cr+Qt));else if(Pt==8){var wr=me.subarray(cr,cr+Qt);if(Qt<32e4)try{Dr(null,Oe(wr,new O(wt)))}catch(Fr){Dr(Fr,null)}else Pe.push(Ee(wr,{size:wt},Dr))}else Dr("unknown compression type "+Pt,null)},re=0;re<P;++re)Ae(re);return rt}function Zr(me){for(var be={},Pe=me.length-22;At(me,Pe)!=101010256;--Pe)if(!Pe||me.length-Pe>65558)throw"invalid zip file";var rt=at(me,Pe+8);if(!rt)return{};var qe=At(me,Pe+16),Ft=qe==4294967295;if(Ft){if(Pe=At(me,Pe-12),At(me,Pe)!=101075792)throw"invalid zip file";rt=At(me,Pe+32),qe=At(me,Pe+48)}for(var te=0;te<rt;++te){var P=jt(me,qe,Ft),j=P[0],q=P[1],Ae=P[2],re=P[3],We=P[4],_t=P[5],Pt=vr(me,_t);if(qe=We,!j)be[re]=C(me,Pt,Pt+q);else if(j==8)be[re]=Oe(me.subarray(Pt,Pt+q),new O(Ae));else throw"unknown compression type "+j}return be}},dMvE:function(Xe,le){var H={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,K=.1,M=.4;return Q===0?0:Q===1?1:(!K||K<1?(K=1,O=M/4):O=M*Math.asin(1/K)/(2*Math.PI),-(K*Math.pow(2,10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/M)))},elasticOut:function(Q){var O,K=.1,M=.4;return Q===0?0:Q===1?1:(!K||K<1?(K=1,O=M/4):O=M*Math.asin(1/K)/(2*Math.PI),K*Math.pow(2,-10*Q)*Math.sin((Q-O)*(2*Math.PI)/M)+1)},elasticInOut:function(Q){var O,K=.1,M=.4;return Q===0?0:Q===1?1:(!K||K<1?(K=1,O=M/4):O=M*Math.asin(1/K)/(2*Math.PI),(Q*=2)<1?-.5*(K*Math.pow(2,10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/M)):K*Math.pow(2,-10*(Q-=1))*Math.sin((Q-O)*(2*Math.PI)/M)*.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-H.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?H.bounceIn(Q*2)*.5:H.bounceOut(Q*2-1)*.5+.5}},Z=H;Xe.exports=Z},dejd:function(Xe,le,H){},dmUQ:function(Xe,le,H){"use strict";var Z=H("Ff2n"),Q=H("rePB"),O=H("1OyB"),K=H("vuIU"),M=H("Ji7U"),B=H("md7G"),R=H("foSv"),b=H("q1tI"),t=H.n(b),E=H("TSYQ"),i=H.n(E),A=H("4IlW");function h(d,m){var C=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);m&&(y=y.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),C.push.apply(C,y)}return C}function s(d){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?h(Object(C),!0).forEach(function(y){Object(Q.a)(d,y,C[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(C)):h(Object(C)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(C,y))})}return d}function o(d){var m=f();return function(){var y=Object(R.a)(d),g;if(m){var U=Object(R.a)(this).constructor;g=Reflect.construct(y,arguments,U)}else g=y.apply(this,arguments);return Object(B.a)(this,g)}}function f(){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(d){return!1}}function l(){}function c(d){d.preventDefault()}var a=function(m){return m.replace(/[^\w.-]+/g,"")},u=200,v=600,T=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(m){return m!=null},D=function(m,C){return C===m||typeof C=="number"&&typeof m=="number"&&isNaN(C)&&isNaN(m)},w=function(d){Object(M.a)(C,d);var m=o(C);function C(y){var g;Object(O.a)(this,C),g=m.call(this,y),g.onKeyDown=function(I){var V=g.props,G=V.onKeyDown,L=V.onPressEnter;if(I.keyCode===A.a.UP){var $=g.getRatio(I);g.up(I,$,null),g.stop()}else if(I.keyCode===A.a.DOWN){var Y=g.getRatio(I);g.down(I,Y,null),g.stop()}else I.keyCode===A.a.ENTER&&L&&L(I);if(g.recordCursorPosition(),g.lastKeyCode=I.keyCode,G){for(var ne=arguments.length,se=new Array(ne>1?ne-1:0),_e=1;_e<ne;_e++)se[_e-1]=arguments[_e];G.apply(void 0,[I].concat(se))}},g.onKeyUp=function(I){var V=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),V){for(var G=arguments.length,L=new Array(G>1?G-1:0),$=1;$<G;$++)L[$-1]=arguments[$];V.apply(void 0,[I].concat(L))}},g.onChange=function(I){var V=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(I)),g.setState({inputValue:g.rawInput}),V(g.toNumber(g.rawInput))},g.onMouseUp=function(){var I=g.props.onMouseUp;g.recordCursorPosition(),I&&I.apply(void 0,arguments)},g.onFocus=function(){var I;g.setState({focused:!0}),(I=g.props).onFocus.apply(I,arguments)},g.onBlur=function(){var I=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var V=g.getCurrentValidValue(g.state.inputValue),G=g.setValue(V,l);if(I){var L=g.input.value,$=g.getInputDisplayValue({focus:!1,value:G});g.input.value=$&&Number($),I.apply(void 0,arguments),g.input.value=L}},g.getRatio=function(I){var V=1;return I.metaKey||I.ctrlKey?V=.1:I.shiftKey&&(V=10),V},g.getFullNum=function(I){return isNaN(I)?I:/e/i.test(String(I))?Number(I).toFixed(18).replace(/\.?0+$/,""):I},g.getPrecision=function(I){if(x(g.props.precision))return g.props.precision;var V=String(I);if(V.indexOf("e-")>=0)return parseInt(V.slice(V.indexOf("e-")+2),10);var G=0;return V.indexOf(".")>=0&&(G=V.length-V.indexOf(".")-1),G},g.getInputDisplayValue=function(I){var V=I||g.state,G=V.focused,L=V.inputValue,$=V.value,Y;G?Y=L:Y=g.toPrecisionAsStep($),Y==null&&(Y="");var ne=g.formatWrapper(Y);return x(g.props.decimalSeparator)&&(ne=ne.toString().replace(".",g.props.decimalSeparator)),ne},g.recordCursorPosition=function(){try{g.cursorStart=g.input.selectionStart,g.cursorEnd=g.input.selectionEnd,g.currentValue=g.input.value,g.cursorBefore=g.input.value.substring(0,g.cursorStart),g.cursorAfter=g.input.value.substring(g.cursorEnd)}catch(I){}},g.restoreByAfter=function(I){if(I===void 0)return!1;var V=g.input.value,G=V.lastIndexOf(I);if(G===-1)return!1;var L=g.cursorBefore.length;return g.lastKeyCode===A.a.DELETE&&g.cursorBefore.charAt(L-1)===I[0]?(g.fixCaret(L,L),!0):G+I.length===V.length?(g.fixCaret(G,G),!0):!1},g.partRestoreByAfter=function(I){return I===void 0?!1:Array.prototype.some.call(I,function(V,G){var L=I.substring(G);return g.restoreByAfter(L)})},g.isNotCompleteNumber=function(I){return isNaN(I)||I===""||I===null||I&&I.toString().indexOf(".")===I.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(I,V,G){g.pressingUpOrDown=!0,g.step("down",I,V,G)},g.up=function(I,V,G){g.pressingUpOrDown=!0,g.step("up",I,V,G)},g.saveInput=function(I){g.input=I};var U=y.value;U===void 0&&(U=y.defaultValue),g.state={focused:y.autoFocus};var k=g.getValidValue(g.toNumber(U));return g.state=s(s({},g.state),{},{inputValue:g.toPrecisionAsStep(k),value:k}),g}return Object(K.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var U=this.props,k=U.value,I=U.onChange,V=U.max,G=U.min,L=this.state.focused;if(g){if(!D(g.value,k)||!D(g.max,V)||!D(g.min,G)){var $=L?k:this.getValidValue(k),Y;this.pressingUpOrDown?Y=$:this.inputting?Y=this.rawInput:Y=this.toPrecisionAsStep($),this.setState({value:$,inputValue:Y})}var ne="value"in this.props?k:this.state.value;"max"in this.props&&g.max!==V&&typeof ne=="number"&&ne>V&&I&&I(V),"min"in this.props&&g.min!==G&&typeof ne=="number"&&ne<G&&I&&I(G)}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===A.a.BACKSPACE?se=this.cursorStart-1:this.lastKeyCode===A.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 A.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case A.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(g){var U=g;return U===""?U="":this.isNotCompleteNumber(parseFloat(U))?U=this.state.value:U=this.getValidValue(U),this.toNumber(U)}},{key:"getValueFromEvent",value:function(g){var U=g.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(U=U.replace(this.props.decimalSeparator,".")),U}},{key:"getValidValue",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,I=parseFloat(g);return isNaN(I)?g:(I<U&&(I=U),I>k&&(I=k),I)}},{key:"setValue",value:function(g,U){var k=this.props.precision,I=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),V=this.state.value,G=V===void 0?null:V,L=this.state.inputValue,$=L===void 0?null:L,Y=typeof I=="number"?I.toFixed(k):"".concat(I),ne=I!==G||Y!=="".concat($);return"value"in this.props?($=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:$},U)):this.setState({value:I,inputValue:this.toPrecisionAsStep(g)},U),ne&&this.props.onChange(I),I}},{key:"getMaxPrecision",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.props,I=k.precision,V=k.step;if(x(I))return I;var G=this.getPrecision(U),L=this.getPrecision(V),$=this.getPrecision(g);return g?Math.max($,G+L):G+L}},{key:"getPrecisionFactor",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.getMaxPrecision(g,U);return Math.pow(10,k)}},{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(g){return this.props.formatter?this.props.formatter(g):g}},{key:"toPrecisionAsStep",value:function(g){if(this.isNotCompleteNumber(g)||g==="")return g;var U=Math.abs(this.getMaxPrecision(g));return isNaN(U)?g.toString():Number(g).toFixed(U)}},{key:"toNumber",value:function(g){var U=this.props.precision,k=this.state.focused,I=g&&g.length>16&&k;return this.isNotCompleteNumber(g)||I?g:x(U)?Math.round(g*Math.pow(10,U))/Math.pow(10,U):Number(g)}},{key:"upStep",value:function(g,U){var k=this.props.step,I=this.getPrecisionFactor(g,U),V=Math.abs(this.getMaxPrecision(g,U)),G=((I*g+I*k*U)/I).toFixed(V);return this.toNumber(G)}},{key:"downStep",value:function(g,U){var k=this.props.step,I=this.getPrecisionFactor(g,U),V=Math.abs(this.getMaxPrecision(g,U)),G=((I*g-I*k*U)/I).toFixed(V);return this.toNumber(G)}},{key:"step",value:function(g,U){var k=this,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,V=arguments.length>3?arguments[3]:void 0;this.stop(),U&&(U.persist(),U.preventDefault());var G=this.props;if(G.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var $=this["".concat(g,"Step")](L,I),Y=$>G.max||$<G.min;if($>G.max?$=G.max:$<G.min&&($=G.min),this.setValue($,null),this.setState({focused:!0},function(){k.pressingUpOrDown=!1}),Y)return;this.autoStepTimer=setTimeout(function(){k[g](U,I,!0)},V?u:v)}},{key:"fixCaret",value:function(g,U){if(g===void 0||U===void 0||!this.input||!this.input.value)return;try{var k=this.input.selectionStart,I=this.input.selectionEnd;(g!==k||U!==I)&&this.input.setSelectionRange(g,U)}catch(V){}}},{key:"render",value:function(){var g,U=this.props,k=U.prefixCls,I=U.disabled,V=U.readOnly,G=U.useTouch,L=U.autoComplete,$=U.upHandler,Y=U.downHandler,ne=U.className,se=U.max,_e=U.min,ve=U.style,Ce=U.title,De=U.onMouseEnter,Qe=U.onMouseLeave,Se=U.onMouseOver,Ie=U.onMouseOut,Je=U.required,Et=U.onClick,Le=U.tabIndex,je=U.type,st=U.placeholder,he=U.id,ie=U.inputMode,oe=U.pattern,ee=U.step,de=U.maxLength,we=U.autoFocus,Be=U.name,nt=U.onPaste,at=U.onInput,At=Object(Z.a)(U,["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"]),ft=this.state,xt=ft.value,It=ft.focused,He=i()(k,(g={},Object(Q.a)(g,ne,!!ne),Object(Q.a)(g,"".concat(k,"-disabled"),I),Object(Q.a)(g,"".concat(k,"-focused"),It),g)),ke={};Object.keys(At).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(ke[Oe]=At[Oe])});var ct=!V&&!I,gt=this.getInputDisplayValue(null),Ze=(xt||xt===0)&&(isNaN(xt)||Number(xt)>=se),ot=(xt||xt===0)&&(isNaN(xt)||Number(xt)<=_e),Ke=Ze||I||V,Me=ot||I||V,Ue=i()("".concat(k,"-handler"),"".concat(k,"-handler-up"),Object(Q.a)({},"".concat(k,"-handler-up-disabled"),Ke)),ge=i()("".concat(k,"-handler"),"".concat(k,"-handler-down"),Object(Q.a)({},"".concat(k,"-handler-down-disabled"),Me)),xe=G?{onTouchStart:Ke?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Ke?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=G?{onTouchStart:Me?l:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:He,style:ve,title:Ce,onMouseEnter:De,onMouseLeave:Qe,onMouseOver:Se,onMouseOut:Ie,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(k,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":Ke,className:Ue}),$||t.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-up-inner"),onClick:c})),t.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:ge}),Y||t.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-down-inner"),onClick:c}))),t.a.createElement("div",{className:"".concat(k,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":_e,"aria-valuemax":se,"aria-valuenow":xt,required:Je,type:je,placeholder:st,onPaste:nt,onClick:Et,onMouseUp:this.onMouseUp,className:"".concat(k,"-input"),tabIndex:Le,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ct?this.onKeyDown:l,onKeyUp:ct?this.onKeyUp:l,autoFocus:we,maxLength:de,readOnly:V,disabled:I,max:se,min:_e,step:ee,name:Be,title:Ce,id:he,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(gt),pattern:oe,inputMode:ie,onInput:at},ke))))}}]),C}(t.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:T,min:-T,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:a,required:!1,autoComplete:"off"};var p=w,n=le.a=p},dqUG:function(Xe,le,H){var Z=H("Gev7"),Q=H("bYtY"),O=H("6GrX"),K=H("pzxd"),M=H("gut8"),B=M.ContextCachedBy,R=function(t){Z.call(this,t)};R.prototype={constructor:R,type:"text",brush:function(t,E){var i=this.style;this.__dirty&&K.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var A=i.text;if(A!=null&&(A+=""),!K.needDrawText(A,i)){t.__attrCachedBy=B.NONE;return}this.setTransform(t),K.renderText(this,t,A,i,null,E),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&K.normalizeTextStyle(t,!0),!this._rect){var E=t.text;E!=null?E+="":E="";var i=O.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,K.getStroke(t.textStroke,t.textStrokeWidth)){var A=t.textStrokeWidth;i.x-=A/2,i.y-=A/2,i.width+=A,i.height+=A}this._rect=i}return this._rect}},Q.inherits(R,Z);var b=R;Xe.exports=b},fW2E:function(Xe,le){var H={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function Z(Q,O,K){return H.hasOwnProperty(O)?K*=Q.dpr:K}Xe.exports=Z},fjLI:function(Xe,le,H){"use strict";H.d(le,"f",function(){return h}),H.d(le,"b",function(){return s}),H.d(le,"a",function(){return o}),H.d(le,"d",function(){return f}),H.d(le,"e",function(){return l}),H.d(le,"c",function(){return c});var Z=H("8HAY"),Q=H("Vhoy"),O=H("MI8n"),K=H("JYp7"),M=H("pmY6"),B=H("24hK"),R=H("nnTU"),b=H("T8No"),t=H("Cg/j"),E=H("t9D7"),i=function(a,u,v,T){var x=arguments.length,D=x<3?u:T===null?T=Object.getOwnPropertyDescriptor(u,v):T,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(a,u,v,T);else for(var p=a.length-1;p>=0;p--)(w=a[p])&&(D=(x<3?w(D):x>3?w(u,v,D):w(u,v))||D);return x>3&&D&&Object.defineProperty(u,v,D),D},A=function(a,u){return function(v,T){u(v,T,a)}};function h(a){return a.command!==void 0}class s{constructor(a){this.id=s._idPool++,this._debugName=a}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const o=Object(t.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new O.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:a=>a===s.CommandPalette}}addCommand(a){return this.addCommands(K.a.single(a))}addCommands(a){for(const u of a)this._commands.set(u.id,u);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(M.i)(()=>{let u=!1;for(const v of a)u=this._commands.delete(v.id)||u;u&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(a){return this._commands.get(a)}getCommands(){const a=new Map;return this._commands.forEach((u,v)=>a.set(v,u)),a}appendMenuItem(a,u){return this.appendMenuItems(K.a.single({id:a,item:u}))}appendMenuItems(a){const u=new Set,v=new B.a;for(const{id:T,item:x}of a){let D=this._menuItems.get(T);D||(D=new B.a,this._menuItems.set(T,D)),v.push(D.push(x)),u.add(T)}return this._onDidChangeMenu.fire(u),Object(M.i)(()=>{if(v.size>0){for(let T of v)T();this._onDidChangeMenu.fire(u),v.clear()}})}getMenuItems(a){let u;return this._menuItems.has(a)?u=[...this._menuItems.get(a)]:u=[],a===s.CommandPalette&&this._appendImplicitItems(u),u}_appendImplicitItems(a){const u=new Set;for(const v of a)h(v)&&(u.add(v.command.id),v.alt&&u.add(v.alt.id));this._commands.forEach((v,T)=>{u.has(T)||a.push({command:v})})}};class l extends Z.e{constructor(a,u,v,T){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,[],"submenu");this.item=a,this._menuService=u,this._contextKeyService=v,this._options=T}get actions(){const a=[],u=this._menuService.createMenu(this.item.submenu,this._contextKeyService),v=u.getActions(this._options);u.dispose();for(const[,T]of v)T.length>0&&(a.push(...T),a.push(new Z.d));return a.length&&a.pop(),a}}let c=class a{constructor(u,v,T,x,D){var w,p;if(this._commandService=D,this.id=u.id,this.label=(T==null?void 0:T.renderShortTitle)&&u.shortTitle?typeof u.shortTitle=="string"?u.shortTitle:u.shortTitle.value:typeof u.title=="string"?u.title:u.title.value,this.tooltip=(p=typeof u.tooltip=="string"?u.tooltip:(w=u.tooltip)===null||w===void 0?void 0:w.value)!==null&&p!==void 0?p:"",this.enabled=!u.precondition||x.contextMatchesRules(u.precondition),this.checked=void 0,u.toggled){const n=u.toggled.condition?u.toggled:{condition:u.toggled};this.checked=x.contextMatchesRules(n.condition),this.checked&&n.tooltip&&(this.tooltip=typeof n.tooltip=="string"?n.tooltip:n.tooltip.value),n.title&&(this.label=typeof n.title=="string"?n.title:n.title.value)}this.item=u,this.alt=v?new a(v,void 0,T,x,D):void 0,this._options=T,E.d.isThemeIcon(u.icon)&&(this.class=Q.a.asClassName(u.icon))}dispose(){}run(...u){var v,T;let x=[];return((v=this._options)===null||v===void 0?void 0:v.arg)&&(x=[...x,this._options.arg]),((T=this._options)===null||T===void 0?void 0:T.shouldForwardArgs)&&(x=[...x,...u]),this._commandService.executeCommand(this.id,...x)}};c=i([A(3,b.b),A(4,R.b)],c)},fyJ8:function(Xe,le,H){"use strict";var Z=H("rePB"),Q=H("VTBJ"),O=H("Ff2n"),K=H("U8pU"),M=H("q1tI"),B=H.n(M),R=H("TSYQ"),b=H.n(R),t=H("c+Xe"),E=H("sR1s");function i(f){return f&&Object(K.a)(f)==="object"&&!Array.isArray(f)&&!M.isValidElement(f)}function A(f){return typeof f=="string"?!0:Object(t.c)(f)}function h(f,l){var c,a=f.prefixCls,u=f.className,v=f.record,T=f.index,x=f.dataIndex,D=f.render,w=f.children,p=f.component,n=p===void 0?"td":p,d=f.colSpan,m=f.rowSpan,C=f.fixLeft,y=f.fixRight,g=f.firstFixLeft,U=f.lastFixLeft,k=f.firstFixRight,I=f.lastFixRight,V=f.appendNode,G=f.additionalProps,L=G===void 0?{}:G,$=f.ellipsis,Y=f.align,ne=f.rowType,se=f.isSticky,_e="".concat(a,"-cell"),ve,Ce;if(w)Ce=w;else{var De=Object(E.b)(v,x);if(Ce=De,D){var Qe=D(De,v,T);i(Qe)?(Ce=Qe.children,ve=Qe.props):Ce=Qe}}Object(K.a)(Ce)==="object"&&!Array.isArray(Ce)&&!M.isValidElement(Ce)&&(Ce=null),$&&(U||k)&&(Ce=M.createElement("span",{className:"".concat(_e,"-content")},Ce));var Se=ve||{},Ie=Se.colSpan,Je=Se.rowSpan,Et=Se.style,Le=Se.className,je=Object(O.a)(Se,["colSpan","rowSpan","style","className"]),st=Ie!==void 0?Ie:d,he=Je!==void 0?Je:m;if(st===0||he===0)return null;var ie={},oe=typeof C=="number",ee=typeof y=="number";oe&&(ie.position="sticky",ie.left=C),ee&&(ie.position="sticky",ie.right=y);var de={};Y&&(de.textAlign=Y);var we,Be=$===!0?{showTitle:!0}:$;Be&&(Be.showTitle||ne==="header")&&(typeof Ce=="string"||typeof Ce=="number"?we=Ce.toString():M.isValidElement(Ce)&&typeof Ce.props.children=="string"&&(we=Ce.props.children));var nt=Object(Q.a)(Object(Q.a)(Object(Q.a)({title:we},je),L),{},{colSpan:st&&st!==1?st:null,rowSpan:he&&he!==1?he:null,className:b()(_e,u,(c={},Object(Z.a)(c,"".concat(_e,"-fix-left"),oe),Object(Z.a)(c,"".concat(_e,"-fix-left-first"),g),Object(Z.a)(c,"".concat(_e,"-fix-left-last"),U),Object(Z.a)(c,"".concat(_e,"-fix-right"),ee),Object(Z.a)(c,"".concat(_e,"-fix-right-first"),k),Object(Z.a)(c,"".concat(_e,"-fix-right-last"),I),Object(Z.a)(c,"".concat(_e,"-ellipsis"),$),Object(Z.a)(c,"".concat(_e,"-with-append"),V),Object(Z.a)(c,"".concat(_e,"-fix-sticky"),(oe||ee)&&se),c),L.className,Le),style:Object(Q.a)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},L.style),de),ie),Et),ref:A(n)?l:null});return M.createElement(n,Object.assign({},nt),V,Ce)}var s=M.forwardRef(h);s.displayName="Cell";var o=M.memo(s,function(f,l){return l.shouldCellUpdate?!l.shouldCellUpdate(l.record,f.record):!1});le.a=o},gut8:function(Xe,le){var H={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Z=9;le.ContextCachedBy=H,le.WILL_BE_RESTORED=Z},h7HQ:function(Xe,le,H){var Z=H("y+Vt"),Q=H("T6xi"),O=Z.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(K,M){Q.buildPath(K,M,!0)}});Xe.exports=O},hOwI:function(Xe,le){var H=Math.log(2);function Z(O,K,M,B,R,b){var t=B+"-"+R,E=O.length;if(b.hasOwnProperty(t))return b[t];if(K===1){var i=Math.round(Math.log((1<<E)-1&~R)/H);return O[M][i]}for(var A=B|1<<M,h=M+1;B&1<<h;)h++;for(var s=0,o=0,f=0;o<E;o++){var l=1<<o;l&R||(s+=(f%2?-1:1)*O[M][o]*Z(O,K-1,h,A,R|l,b),f++)}return b[t]=s,s}function Q(O,K){var M=[[O[0],O[1],1,0,0,0,-K[0]*O[0],-K[0]*O[1]],[0,0,0,O[0],O[1],1,-K[1]*O[0],-K[1]*O[1]],[O[2],O[3],1,0,0,0,-K[2]*O[2],-K[2]*O[3]],[0,0,0,O[2],O[3],1,-K[3]*O[2],-K[3]*O[3]],[O[4],O[5],1,0,0,0,-K[4]*O[4],-K[4]*O[5]],[0,0,0,O[4],O[5],1,-K[5]*O[4],-K[5]*O[5]],[O[6],O[7],1,0,0,0,-K[6]*O[6],-K[6]*O[7]],[0,0,0,O[6],O[7],1,-K[7]*O[6],-K[7]*O[7]]],B={},R=Z(M,8,0,0,0,B);if(R===0)return;for(var b=[],t=0;t<8;t++)for(var E=0;E<8;E++)b[E]==null&&(b[E]=0),b[E]+=((t+E)%2?-1:1)*Z(M,7,t===0?1:0,1<<t,1<<E,B)/R*K[t];return function(i,A,h){var s=A*b[6]+h*b[7]+1;i[0]=(A*b[0]+h*b[1]+b[2])/s,i[1]=(A*b[3]+h*b[4]+b[5])/s}}le.buildTransformer=Q},hW8S:function(Xe,le,H){"use strict";H.d(le,"a",function(){return K}),H.d(le,"c",function(){return M}),H.d(le,"b",function(){return B});var Z=H("VTBJ"),Q=H("Ff2n"),O=H("Kwbf"),K="RC_TABLE_INTERNAL_COL_DEFINE";function M(R){var b=R.expandable,t=Object(Q.a)(R,["expandable"]);return"expandable"in R?Object(Z.a)(Object(Z.a)({},t),b):t}function B(R){return Object.keys(R).reduce(function(b,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(b[t]=R[t]),b},{})}},hX1E:function(Xe,le){var H=Math.PI*2;function Z(Q){return Q%=H,Q<0&&(Q+=H),Q}le.normalizeRadian=Z},hydK:function(Xe,le){var H="http://www.w3.org/2000/svg";function Z(Q){return document.createElementNS(H,Q)}le.createElement=Z},hyiK:function(Xe,le){function H(Z,Q,O,K,M,B){if(B>Q&&B>K||B<Q&&B<K)return 0;if(K===Q)return 0;var R=K<Q?1:-1,b=(B-Q)/(K-Q);(b===1||b===0)&&(R=K<Q?.5:-.5);var t=b*(O-Z)+Z;return t===M?Infinity:t>M?R:0}Xe.exports=H},iXp4:function(Xe,le,H){var Z=H("ItGF"),Q=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function O(K){return Z.browser.ie&&Z.browser.version>=11?function(){var M=this.__clipPaths,B=this.style,R;if(M)for(var b=0;b<M.length;b++){var t=M[b],E=t&&t.shape,i=t&&t.type;if(E&&(i==="sector"&&E.startAngle===E.endAngle||i==="rect"&&(!E.width||!E.height))){for(var A=0;A<Q.length;A++)Q[A][2]=B[Q[A][0]],B[Q[A][0]]=Q[A][1];R=!0;break}}if(K.apply(this,arguments),R)for(var A=0;A<Q.length;A++)B[Q[A][0]]=Q[A][2]}:K}Xe.exports=O},ic2d:function(Xe,le,H){"use strict";H.d(le,"a",function(){return K});var Z=H("FWmy"),Q=H("746U");class O{constructor(){this.data=new Map}add(M,B){Z.a(Q.l(M)),Z.a(Q.k(B)),Z.a(!this.data.has(M),"There is already an extension with this id"),this.data.set(M,B)}as(M){return this.data.get(M)||null}}const K=new O},j5sG:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.createSensor=void 0;var Z=Q(H("NohK"));function Q(K){return K&&K.__esModule?K:{default:K}}var O=function(M){var B=void 0,R=[],b=(0,Z.default)(function(){R.forEach(function(h){h(M)})}),t=function(){var s=new ResizeObserver(b);return s.observe(M),b(),s},E=function(s){B||(B=t()),R.indexOf(s)===-1&&R.push(s)},i=function(){B.disconnect(),R=[],B=void 0},A=function(s){var o=R.indexOf(s);o!==-1&&R.splice(o,1),R.length===0&&B&&i()};return{element:M,bind:E,destroy:i,unbind:A}};le.createSensor=O},jTL6:function(Xe,le,H){var Z=H("y+Vt"),Q=Z.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,K){var M=K.cx,B=K.cy,R=Math.max(K.r,0),b=K.startAngle,t=K.endAngle,E=K.clockwise,i=Math.cos(b),A=Math.sin(b);O.moveTo(i*R+M,A*R+B),O.arc(M,B,R,b,t,!E)}});Xe.exports=Q},juDX:function(Xe,le,H){H("P47w");var Z=H("aX58"),Q=Z.registerPainter,O=H("3CBa");Q("svg",O)},kSUc:function(Xe,le,H){},"kVK+":function(Xe,le){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */le.read=function(H,Z,Q,O,K){var M,B,R=K*8-O-1,b=(1<<R)-1,t=b>>1,E=-7,i=Q?K-1:0,A=Q?-1:1,h=H[Z+i];for(i+=A,M=h&(1<<-E)-1,h>>=-E,E+=R;E>0;M=M*256+H[Z+i],i+=A,E-=8);for(B=M&(1<<-E)-1,M>>=-E,E+=O;E>0;B=B*256+H[Z+i],i+=A,E-=8);if(M===0)M=1-t;else{if(M===b)return B?NaN:(h?-1:1)*Infinity;B=B+Math.pow(2,O),M=M-t}return(h?-1:1)*B*Math.pow(2,M-O)},le.write=function(H,Z,Q,O,K,M){var B,R,b,t=M*8-K-1,E=(1<<t)-1,i=E>>1,A=K===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=O?0:M-1,s=O?1:-1,o=Z<0||Z===0&&1/Z<0?1:0;for(Z=Math.abs(Z),isNaN(Z)||Z===Infinity?(R=isNaN(Z)?1:0,B=E):(B=Math.floor(Math.log(Z)/Math.LN2),Z*(b=Math.pow(2,-B))<1&&(B--,b*=2),B+i>=1?Z+=A/b:Z+=A*Math.pow(2,1-i),Z*b>=2&&(B++,b/=2),B+i>=E?(R=0,B=E):B+i>=1?(R=(Z*b-1)*Math.pow(2,K),B=B+i):(R=Z*Math.pow(2,i-1)*Math.pow(2,K),B=0));K>=8;H[Q+h]=R&255,h+=s,R/=256,K-=8);for(B=B<<K|R,t+=K;t>0;H[Q+h]=B&255,h+=s,B/=256,t-=8);H[Q+h-s]|=o*128}},lZu9:function(Xe,le,H){(function(Z){Z(H("VrN/"),H("1eCo"),H("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(Q,O){var K=Z.getMode(Q,"text/html"),M=K.name=="null";function B(G){if(Z.findModeByName){var L=Z.findModeByName(G);L&&(G=L.mime||L.mimes[0])}var $=Z.getMode(Q,G);return $.name=="null"?null:$}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 R={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var b in R)R.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(R[b]=O.tokenTypeOverrides[b]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,A=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,s=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,c=" ";function a(G,L,$){return L.f=L.inline=$,$(G,L)}function u(G,L,$){return L.f=L.block=$,$(G,L)}function v(G){return!G||!/\S/.test(G.string)}function T(G){if(G.linkTitle=!1,G.linkHref=!1,G.linkText=!1,G.em=!1,G.strong=!1,G.strikethrough=!1,G.quote=0,G.indentedCode=!1,G.f==D){var L=M;if(!L){var $=Z.innerMode(K,G.htmlState);L=$.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText}L&&(G.f=d,G.block=x,G.htmlState=null)}return G.trailingSpace=0,G.trailingSpaceNewLine=!1,G.prevLine=G.thisLine,G.thisLine={stream:null},null}function x(G,L){var $=G.column()===L.indentation,Y=v(L.prevLine.stream),ne=L.indentedCode,se=L.prevLine.hr,_e=L.list!==!1,ve=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var Ce=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,_e)){for(L.list=null;Ce<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=Ce-L.listStack[L.listStack.length-1])}var De=!Y&&!se&&!L.prevLine.header&&(!_e||!ne)&&!L.prevLine.fencedCodeEnd,Qe=(L.list===!1||se||Y)&&L.indentation<=ve&&G.match(t),Se=null;if(L.indentationDiff>=4&&(ne||L.prevLine.fencedCodeEnd||L.prevLine.header||Y))return G.skipToEnd(),L.indentedCode=!0,R.code;if(G.eatSpace())return null;if($&&L.indentation<=ve&&(Se=G.match(A))&&Se[1].length<=6)return L.quote=0,L.header=Se[1].length,L.thisLine.header=!0,O.highlightFormatting&&(L.formatting="header"),L.f=L.inline,p(L);if(L.indentation<=ve&&G.eat(">"))return L.quote=$?1:L.quote+1,O.highlightFormatting&&(L.formatting="quote"),G.eatSpace(),p(L);if(!Qe&&!L.setext&&$&&L.indentation<=ve&&(Se=G.match(E))){var Ie=Se[1]?"ol":"ul";return L.indentation=Ce+G.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,O.taskLists&&G.match(i,!1)&&(L.taskList=!0),L.f=L.inline,O.highlightFormatting&&(L.formatting=["list","list-"+Ie]),p(L)}else{if($&&L.indentation<=ve&&(Se=G.match(o,!0)))return L.quote=0,L.fencedEndRE=new RegExp(Se[1]+"+ *$"),L.localMode=O.fencedCodeBlockHighlighting&&B(Se[2]||O.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=Z.startState(L.localMode)),L.f=L.block=w,O.highlightFormatting&&(L.formatting="code-block"),L.code=-1,p(L);if(L.setext||(!De||!_e)&&!L.quote&&L.list===!1&&!L.code&&!Qe&&!f.test(G.string)&&(Se=G.lookAhead(1))&&(Se=Se.match(h)))return L.setext?(L.header=L.setext,L.setext=0,G.skipToEnd(),O.highlightFormatting&&(L.formatting="header")):(L.header=Se[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,p(L);if(Qe)return G.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,R.hr;if(G.peek()==="[")return a(G,L,U)}return a(G,L,L.inline)}function D(G,L){var $=K.token(G,L.htmlState);if(!M){var Y=Z.innerMode(K,L.htmlState);(Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText||L.md_inside&&G.current().indexOf(">")>-1)&&(L.f=d,L.block=x,L.htmlState=null)}return $}function w(G,L){var $=L.listStack[L.listStack.length-1]||0,Y=L.indentation<$,ne=$+3;if(L.fencedEndRE&&L.indentation<=ne&&(Y||G.match(L.fencedEndRE))){O.highlightFormatting&&(L.formatting="code-block");var se;return Y||(se=p(L)),L.localMode=L.localState=null,L.block=x,L.f=d,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,Y?u(G,L,L.block):se}else return L.localMode?L.localMode.token(G,L.localState):(G.skipToEnd(),R.code)}function p(G){var L=[];if(G.formatting){L.push(R.formatting),typeof G.formatting=="string"&&(G.formatting=[G.formatting]);for(var $=0;$<G.formatting.length;$++)L.push(R.formatting+"-"+G.formatting[$]),G.formatting[$]==="header"&&L.push(R.formatting+"-"+G.formatting[$]+"-"+G.header),G.formatting[$]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=G.quote?L.push(R.formatting+"-"+G.formatting[$]+"-"+G.quote):L.push("error"))}if(G.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(G.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(G.linkHref?L.push(R.linkHref,"url"):(G.strong&&L.push(R.strong),G.em&&L.push(R.em),G.strikethrough&&L.push(R.strikethrough),G.emoji&&L.push(R.emoji),G.linkText&&L.push(R.linkText),G.code&&L.push(R.code),G.image&&L.push(R.image),G.imageAltText&&L.push(R.imageAltText,"link"),G.imageMarker&&L.push(R.imageMarker)),G.header&&L.push(R.header,R.header+"-"+G.header),G.quote&&(L.push(R.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=G.quote?L.push(R.quote+"-"+G.quote):L.push(R.quote+"-"+O.maxBlockquoteDepth)),G.list!==!1){var Y=(G.listStack.length-1)%3;Y?Y===1?L.push(R.list2):L.push(R.list3):L.push(R.list1)}return G.trailingSpaceNewLine?L.push("trailing-space-new-line"):G.trailingSpace&&L.push("trailing-space-"+(G.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function n(G,L){return G.match(s,!0)?p(L):void 0}function d(G,L){var $=L.text(G,L);if(typeof $!="undefined")return $;if(L.list)return L.list=null,p(L);if(L.taskList){var Y=G.match(i,!0)[1]===" ";return Y?L.taskOpen=!0:L.taskClosed=!0,O.highlightFormatting&&(L.formatting="task"),L.taskList=!1,p(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&G.match(/^#+$/,!0))return O.highlightFormatting&&(L.formatting="header"),p(L);var ne=G.next();if(L.linkTitle){L.linkTitle=!1;var se=ne;ne==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var _e="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(G.match(new RegExp(_e),!0))return R.linkHref}if(ne==="`"){var ve=L.formatting;O.highlightFormatting&&(L.formatting="code"),G.eatWhile("`");var Ce=G.current().length;if(L.code==0&&(!L.quote||Ce==1))return L.code=Ce,p(L);if(Ce==L.code){var De=p(L);return L.code=0,De}else return L.formatting=ve,p(L)}else if(L.code)return p(L);if(ne==="\\"&&(G.next(),O.highlightFormatting)){var Qe=p(L),Se=R.formatting+"-escape";return Qe?Qe+" "+Se:Se}if(ne==="!"&&G.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,O.highlightFormatting&&(L.formatting="image"),p(L);if(ne==="["&&L.imageMarker&&G.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,O.highlightFormatting&&(L.formatting="image"),p(L);if(ne==="]"&&L.imageAltText){O.highlightFormatting&&(L.formatting="image");var Qe=p(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=C,Qe}if(ne==="["&&!L.image)return L.linkText&&G.match(/^.*?\]/)||(L.linkText=!0,O.highlightFormatting&&(L.formatting="link")),p(L);if(ne==="]"&&L.linkText){O.highlightFormatting&&(L.formatting="link");var Qe=p(L);return L.linkText=!1,L.inline=L.f=G.match(/\(.*?\)| ?\[.*?\]/,!1)?C:d,Qe}if(ne==="<"&&G.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=m,O.highlightFormatting&&(L.formatting="link");var Qe=p(L);return Qe?Qe+=" ":Qe="",Qe+R.linkInline}if(ne==="<"&&G.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=m,O.highlightFormatting&&(L.formatting="link");var Qe=p(L);return Qe?Qe+=" ":Qe="",Qe+R.linkEmail}if(O.xml&&ne==="<"&&G.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ie=G.string.indexOf(">",G.pos);if(Ie!=-1){var Je=G.string.substring(G.start,Ie);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Je)&&(L.md_inside=!0)}return G.backUp(1),L.htmlState=Z.startState(K),u(G,L,D)}if(O.xml&&ne==="<"&&G.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(ne==="*"||ne==="_"){for(var Et=1,Le=G.pos==1?" ":G.string.charAt(G.pos-2);Et<3&&G.eat(ne);)Et++;var je=G.peek()||" ",st=!/\s/.test(je)&&(!l.test(je)||/\s/.test(Le)||l.test(Le)),he=!/\s/.test(Le)&&(!l.test(Le)||/\s/.test(je)||l.test(je)),ie=null,oe=null;if(Et%2&&(!L.em&&st&&(ne==="*"||!he||l.test(Le))?ie=!0:L.em==ne&&he&&(ne==="*"||!st||l.test(je))&&(ie=!1)),Et>1&&(!L.strong&&st&&(ne==="*"||!he||l.test(Le))?oe=!0:L.strong==ne&&he&&(ne==="*"||!st||l.test(je))&&(oe=!1)),oe!=null||ie!=null){O.highlightFormatting&&(L.formatting=ie==null?"strong":oe==null?"em":"strong em"),ie===!0&&(L.em=ne),oe===!0&&(L.strong=ne);var De=p(L);return ie===!1&&(L.em=!1),oe===!1&&(L.strong=!1),De}}else if(ne===" "&&(G.eat("*")||G.eat("_"))){if(G.peek()===" ")return p(L);G.backUp(1)}if(O.strikethrough){if(ne==="~"&&G.eatWhile(ne)){if(L.strikethrough){O.highlightFormatting&&(L.formatting="strikethrough");var De=p(L);return L.strikethrough=!1,De}else if(G.match(/^[^\s]/,!1))return L.strikethrough=!0,O.highlightFormatting&&(L.formatting="strikethrough"),p(L)}else if(ne===" "&&G.match(/^~~/,!0)){if(G.peek()===" ")return p(L);G.backUp(2)}}if(O.emoji&&ne===":"&&G.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,O.highlightFormatting&&(L.formatting="emoji");var ee=p(L);return L.emoji=!1,ee}return ne===" "&&(G.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),p(L)}function m(G,L){var $=G.next();if($===">"){L.f=L.inline=d,O.highlightFormatting&&(L.formatting="link");var Y=p(L);return Y?Y+=" ":Y="",Y+R.linkInline}return G.match(/^[^>]+/,!0),R.linkInline}function C(G,L){if(G.eatSpace())return null;var $=G.next();return $==="("||$==="["?(L.f=L.inline=g($==="("?")":"]"),O.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,p(L)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(G){return function(L,$){var Y=L.next();if(Y===G){$.f=$.inline=d,O.highlightFormatting&&($.formatting="link-string");var ne=p($);return $.linkHref=!1,ne}return L.match(y[G]),$.linkHref=!0,p($)}}function U(G,L){return G.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=k,G.next(),O.highlightFormatting&&(L.formatting="link"),L.linkText=!0,p(L)):a(G,L,d)}function k(G,L){if(G.match(/^\]:/,!0)){L.f=L.inline=I,O.highlightFormatting&&(L.formatting="link");var $=p(L);return L.linkText=!1,$}return G.match(/^([^\]\\]|\\.)+/,!0),R.linkText}function I(G,L){return G.eatSpace()?null:(G.match(/^[^\s]+/,!0),G.peek()===void 0?L.linkTitle=!0:G.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=d,R.linkHref+" url")}var V={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:d,text:n,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(G){return{f:G.f,prevLine:G.prevLine,thisLine:G.thisLine,block:G.block,htmlState:G.htmlState&&Z.copyState(K,G.htmlState),indentation:G.indentation,localMode:G.localMode,localState:G.localMode?Z.copyState(G.localMode,G.localState):null,inline:G.inline,text:G.text,formatting:!1,linkText:G.linkText,linkTitle:G.linkTitle,linkHref:G.linkHref,code:G.code,em:G.em,strong:G.strong,strikethrough:G.strikethrough,emoji:G.emoji,header:G.header,setext:G.setext,hr:G.hr,taskList:G.taskList,list:G.list,listStack:G.listStack.slice(0),quote:G.quote,indentedCode:G.indentedCode,trailingSpace:G.trailingSpace,trailingSpaceNewLine:G.trailingSpaceNewLine,md_inside:G.md_inside,fencedEndRE:G.fencedEndRE}},token:function(G,L){if(L.formatting=!1,G!=L.thisLine.stream){if(L.header=0,L.hr=!1,G.match(/^\s*$/,!0))return T(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:G},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=D)){var $=G.match(/^\s*/,!0)[0].replace(/\t/g,c).length;if(L.indentation=$,L.indentationDiff=null,$>0)return null}}return L.f(G,L)},innerMode:function(G){return G.block==D?{state:G.htmlState,mode:K}:G.localState?{state:G.localState,mode:G.localMode}:{state:G,mode:V}},indent:function(G,L,$){return G.block==D&&K.indent?K.indent(G.htmlState,L,$):G.localState&&G.localMode.indent?G.localMode.indent(G.localState,L,$):Z.Pass},blankLine:T,getType:p,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return V},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},loD1:function(Xe,le){function H(Z,Q,O,K,M,B,R){if(M===0)return!1;var b=M,t=0,E=Z;if(R>Q+b&&R>K+b||R<Q-b&&R<K-b||B>Z+b&&B>O+b||B<Z-b&&B<O-b)return!1;if(Z!==O)t=(Q-K)/(Z-O),E=(Z*K-O*Q)/(Z-O);else return Math.abs(B-Z)<=b/2;var i=t*B-R+E,A=i*i/(t*t+1);return A<=b/2*b/2}le.containStroke=H},mFDi:function(Xe,le,H){var Z=H("QBsz"),Q=H("Fofx"),O=Z.applyTransform,K=Math.min,M=Math.max;function B(b,t,E,i){E<0&&(b=b+E,E=-E),i<0&&(t=t+i,i=-i),this.x=b,this.y=t,this.width=E,this.height=i}B.prototype={constructor:B,union:function(b){var t=K(b.x,this.x),E=K(b.y,this.y);this.width=M(b.x+b.width,this.x+this.width)-t,this.height=M(b.y+b.height,this.y+this.height)-E,this.x=t,this.y=E},applyTransform:function(){var b=[],t=[],E=[],i=[];return function(A){if(!A)return;b[0]=E[0]=this.x,b[1]=i[1]=this.y,t[0]=i[0]=this.x+this.width,t[1]=E[1]=this.y+this.height,O(b,b,A),O(t,t,A),O(E,E,A),O(i,i,A),this.x=K(b[0],t[0],E[0],i[0]),this.y=K(b[1],t[1],E[1],i[1]);var h=M(b[0],t[0],E[0],i[0]),s=M(b[1],t[1],E[1],i[1]);this.width=h-this.x,this.height=s-this.y}}(),calculateTransform:function(b){var t=this,E=b.width/t.width,i=b.height/t.height,A=Q.create();return Q.translate(A,A,[-t.x,-t.y]),Q.scale(A,A,[E,i]),Q.translate(A,A,[b.x,b.y]),A},intersect:function(b){if(!b)return!1;b instanceof B||(b=B.create(b));var t=this,E=t.x,i=t.x+t.width,A=t.y,h=t.y+t.height,s=b.x,o=b.x+b.width,f=b.y,l=b.y+b.height;return!(i<s||o<E||h<f||l<A)},contain:function(b,t){var E=this;return b>=E.x&&b<=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(b){this.x=b.x,this.y=b.y,this.width=b.width,this.height=b.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},B.create=function(b){return new B(b.x,b.y,b.width,b.height)};var R=B;Xe.exports=R},mLcG:function(Xe,le){var H=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(Z){setTimeout(Z,16)};Xe.exports=H},n1HI:function(Xe,le,H){var Z=H("hX1E"),Q=Z.normalizeRadian,O=Math.PI*2;function K(M,B,R,b,t,E,i,A,h){if(i===0)return!1;var s=i;A-=M,h-=B;var o=Math.sqrt(A*A+h*h);if(o-s>R||o+s<R)return!1;if(Math.abs(b-t)%O<1e-4)return!0;if(E){var f=b;b=Q(t),t=Q(f)}else b=Q(b),t=Q(t);b>t&&(t+=O);var l=Math.atan2(h,A);return l<0&&(l+=O),l>=b&&l<=t||l+O>=b&&l+O<=t}le.containStroke=K},n6Mw:function(Xe,le,H){var Z=H("SrGk"),Q=H("bYtY"),O=H("Fofx");function K(B,R){Z.call(this,B,R,"clipPath","__clippath_in_use__")}Q.inherits(K,Z),K.prototype.update=function(B){var R=this.getSvgElement(B);R&&this.updateDom(R,B.__clipPaths,!1);var b=this.getTextSvgElement(B);b&&this.updateDom(b,B.__clipPaths,!0),this.markUsed(B)},K.prototype.updateDom=function(B,R,b){if(R&&R.length>0){var t=this.getDefs(!0),E=R[0],i,A,h=b?"_textDom":"_dom";E[h]?(A=E[h].getAttribute("id"),i=E[h],t.contains(i)||t.appendChild(i)):(A="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",A),t.appendChild(i),E[h]=i);var s=this.getSvgProxy(E);if(E.transform&&E.parent.invTransform&&!b){var o=Array.prototype.slice.call(E.transform);O.mul(E.transform,E.parent.invTransform,E.transform),s.brush(E),E.transform=o}else s.brush(E);var f=this.getSvgElement(E);i.innerHTML="",i.appendChild(f.cloneNode()),B.setAttribute("clip-path","url(#"+A+")"),R.length>1&&this.updateDom(i,R.slice(1),b)}else B&&B.setAttribute("clip-path","none")},K.prototype.markUsed=function(B){var R=this;B.__clipPaths&&Q.each(B.__clipPaths,function(b){b._dom&&Z.prototype.markUsed.call(R,b._dom),b._textDom&&Z.prototype.markUsed.call(R,b._textDom)})};var M=K;Xe.exports=M},n6Qo:function(Xe,le,H){"use strict";H.d(le,"a",function(){return b});var Z=H("q1tI"),Q=H("biw7"),O=H("fyJ8");function K(t){var E=t.className,i=t.index,A=t.children,h=t.colSpan,s=t.rowSpan,o=Z.useContext(Q.a),f=o.prefixCls,l=o.fixedInfoList,c=l[i];return Z.createElement(O.a,Object.assign({className:E,index:i,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:A,props:{colSpan:h,rowSpan:s}}}},c))}function M(t){return Z.createElement("tr",Object.assign({},t))}function B(t){var E=t.children,i=Z.useContext(Q.a),A=i.prefixCls;return Z.createElement("tfoot",{className:"".concat(A,"-summary")},E)}var R=le.b=B,b={Cell:K,Row:M}},nCxF:function(Xe,le,H){var Z=H("QBsz"),Q=Z.min,O=Z.max,K=Z.scale,M=Z.distance,B=Z.add,R=Z.clone,b=Z.sub;function t(E,i,A,h){var s=[],o=[],f=[],l=[],c,a,u,v;if(h){u=[Infinity,Infinity],v=[-Infinity,-Infinity];for(var T=0,x=E.length;T<x;T++)Q(u,u,E[T]),O(v,v,E[T]);Q(u,u,h[0]),O(v,v,h[1])}for(var T=0,x=E.length;T<x;T++){var D=E[T];if(A)c=E[T?T-1:x-1],a=E[(T+1)%x];else if(T===0||T===x-1){s.push(R(E[T]));continue}else c=E[T-1],a=E[T+1];b(o,a,c),K(o,o,i);var w=M(D,c),p=M(D,a),n=w+p;n!==0&&(w/=n,p/=n),K(f,o,-w),K(l,o,p);var d=B([],D,f),m=B([],D,l);h&&(O(d,d,u),Q(d,d,v),O(m,m,u),Q(m,m,v)),s.push(d),s.push(m)}return A&&s.push(s.shift()),s}Xe.exports=t},nEHx:function(Xe,le,H){"use strict";H.d(le,"a",function(){return Z});var Z;(function(Q){Q.DARK="dark",Q.LIGHT="light",Q.HIGH_CONTRAST="hc"})(Z||(Z={}))},nPnh:function(Xe,le){var H=Math.round;function Z(K,M,B){if(!M)return;var R=M.x1,b=M.x2,t=M.y1,E=M.y2;K.x1=R,K.x2=b,K.y1=t,K.y2=E;var i=B&&B.lineWidth;if(!i)return;H(R*2)===H(b*2)&&(K.x1=K.x2=O(R,i,!0)),H(t*2)===H(E*2)&&(K.y1=K.y2=O(t,i,!0))}function Q(K,M,B){if(!M)return;var R=M.x,b=M.y,t=M.width,E=M.height;K.x=R,K.y=b,K.width=t,K.height=E;var i=B&&B.lineWidth;if(!i)return;K.x=O(R,i,!0),K.y=O(b,i,!0),K.width=Math.max(O(R+t,i,!1)-K.x,t===0?0:1),K.height=Math.max(O(b+E,i,!1)-K.y,E===0?0:1)}function O(K,M,B){if(!M)return K;var R=H(K*2);return(R+H(M))%2===0?R/2:(R+(B?1:-1))/2}le.subPixelOptimizeLine=Z,le.subPixelOptimizeRect=Q,le.subPixelOptimize=O},ni6a:function(Xe,le,H){var Z=H("pzxd"),Q=H("mFDi"),O=H("gut8"),K=O.WILL_BE_RESTORED,M=new Q,B=function(){};B.prototype={constructor:B,drawRectText:function(b,t){var E=this.style;t=E.textRect||t,this.__dirty&&Z.normalizeTextStyle(E,!0);var i=E.text;if(i!=null&&(i+=""),!Z.needDrawText(i,E))return;b.save();var A=this.transform;E.transformText?this.setTransform(b):A&&(M.copy(t),M.applyTransform(A),t=M),Z.renderText(this,b,i,E,t,K),b.restore()}};var R=B;Xe.exports=R},nnTU:function(Xe,le,H){"use strict";H.d(le,"b",function(){return R}),H.d(le,"a",function(){return b});var Z=H("MI8n"),Q=H("JYp7"),O=H("pmY6"),K=H("24hK"),M=H("746U"),B=H("Cg/j");const R=Object(B.c)("commandService"),b=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,E){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!E)throw new Error("invalid command");return this.registerCommand({id:t,handler:E})}if(t.description){const o=[];for(let l of t.description.args)o.push(l.constraint);const f=t.handler;t.handler=function(l,...c){return Object(M.o)(c,o),f(l,...c)}}const{id:i}=t;let A=this._commands.get(i);A||(A=new K.a,this._commands.set(i,A));let h=A.unshift(t),s=Object(O.i)(()=>{h();const o=this._commands.get(i);(o==null?void 0:o.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),s}registerCommandAlias(t,E){return b.registerCommand(t,(i,...A)=>i.get(R).executeCommand(E,...A))}getCommand(t){const E=this._commands.get(t);return!E||E.isEmpty()?void 0:Q.a.first(E)}getCommands(){const t=new Map;for(const E of this._commands.keys()){const i=this.getCommand(E);i&&t.set(E,i)}return t}};b.registerCommand("noop",()=>{})},osHv:function(Xe,le,H){(function(Z){Z(H("VrN/"))})(function(Z){"use strict";var Q=Z.Pos;function O(l,c){return l.line-c.line||l.ch-c.ch}var K="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",M=K+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B=new RegExp("<(/?)(["+K+"]["+M+"]*)","g");function R(l,c,a,u){this.line=c,this.ch=a,this.cm=l,this.text=l.getLine(c),this.min=u?Math.max(u.from,l.firstLine()):l.firstLine(),this.max=u?Math.min(u.to-1,l.lastLine()):l.lastLine()}function b(l,c){var a=l.cm.getTokenTypeAt(Q(l.line,c));return a&&/\btag\b/.test(a)}function t(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function E(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function i(l){for(;;){var c=l.text.indexOf(">",l.ch);if(c==-1){if(t(l))continue;return}if(!b(l,c+1)){l.ch=c+1;continue}var a=l.text.lastIndexOf("/",c),u=a>-1&&!/\S/.test(l.text.slice(a+1,c));return l.ch=c+1,u?"selfClose":"regular"}}function A(l){for(;;){var c=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(c==-1){if(E(l))continue;return}if(!b(l,c+1)){l.ch=c;continue}B.lastIndex=c,l.ch=c;var a=B.exec(l.text);if(a&&a.index==c)return a}}function h(l){for(;;){B.lastIndex=l.ch;var c=B.exec(l.text);if(!c){if(t(l))continue;return}if(!b(l,c.index+1)){l.ch=c.index+1;continue}return l.ch=c.index+c[0].length,c}}function s(l){for(;;){var c=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(c==-1){if(E(l))continue;return}if(!b(l,c+1)){l.ch=c;continue}var a=l.text.lastIndexOf("/",c),u=a>-1&&!/\S/.test(l.text.slice(a+1,c));return l.ch=c+1,u?"selfClose":"regular"}}function o(l,c){for(var a=[];;){var u=h(l),v,T=l.line,x=l.ch-(u?u[0].length:0);if(!u||!(v=i(l)))return;if(v=="selfClose")continue;if(u[1]){for(var D=a.length-1;D>=0;--D)if(a[D]==u[2]){a.length=D;break}if(D<0&&(!c||c==u[2]))return{tag:u[2],from:Q(T,x),to:Q(l.line,l.ch)}}else a.push(u[2])}}function f(l,c){for(var a=[];;){var u=s(l);if(!u)return;if(u=="selfClose"){A(l);continue}var v=l.line,T=l.ch,x=A(l);if(!x)return;if(x[1])a.push(x[2]);else{for(var D=a.length-1;D>=0;--D)if(a[D]==x[2]){a.length=D;break}if(D<0&&(!c||c==x[2]))return{tag:x[2],from:Q(l.line,l.ch),to:Q(v,T)}}}}Z.registerHelper("fold","xml",function(l,c){for(var a=new R(l,c.line,0);;){var u=h(a);if(!u||a.line!=c.line)return;var v=i(a);if(!v)return;if(!u[1]&&v!="selfClose"){var T=Q(a.line,a.ch),x=o(a,u[2]);return x&&O(x.from,T)>0?{from:T,to:x.from}:null}}}),Z.findMatchingTag=function(l,c,a){var u=new R(l,c.line,c.ch,a);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var v=i(u),T=v&&Q(u.line,u.ch),x=v&&A(u);if(!v||!x||O(u,c)>0)return;var D={from:Q(u.line,u.ch),to:T,tag:x[2]};return v=="selfClose"?{open:D,close:null,at:"open"}:x[1]?{open:f(u,x[2]),close:D,at:"close"}:(u=new R(l,T.line,T.ch,a),{open:D,close:o(u,x[2]),at:"open"})},Z.findEnclosingTag=function(l,c,a,u){for(var v=new R(l,c.line,c.ch,a);;){var T=f(v,u);if(!T)break;var x=new R(l,c.line,c.ch,a),D=o(x,T.tag);if(D)return{open:T,close:D}}},Z.scanForClosingTag=function(l,c,a,u){var v=new R(l,c.line,c.ch,u?{from:0,to:u}:null);return o(v,a)}})},p5ED:function(Xe,le,H){"use strict";var Z=H("+L6B"),Q=H("2/Rp"),O=H("5Dmo"),K=H("3S7+"),M=H("k1fw"),B=H("9og8"),R=H("tJVT"),b=H("WmNS"),t=H.n(b),E=H("q1tI"),i=H.n(E),A=H("vHTk"),h=H.n(A),s=H("yEEn"),o=H("ZW9T"),f=H("1vsH"),l=H("V0Rq"),c=H("m3rI");le.a=function(a){var u,v,T,x,D,w,p,n=a.editOffice,d=n===void 0?"view":n,m=a.data,C=a.theme,y=a.type,g=a.filename,U=a.monacoEditor,k=a.className,I=a.style,V=a.close,G=a.onClose,L=a.hasMask,$=a.disabledDownload,Y=Object(E.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ne=Object(R.a)(Y,2),se=ne[0],_e=ne[1],ve=Object(E.useState)(""),Ce=Object(R.a)(ve,2),De=Ce[0],Qe=Ce[1],Se=Object(E.useState)(),Ie=Object(R.a)(Se,2),Je=Ie[0],Et=Ie[1],Le=window.ENV==="build"?"/react/build":"",je=c.a.PROXY_SERVER||location.origin,st,he=1024*1024,ie=10*he,oe=Object(E.useRef)();(u=m)!==null&&u!==void 0&&u.startsWith("/api")&&y!=="txt"&&(m=c.a.API_SERVER+m),y==="office"&&(st=Object(f.T)(m).filesize,st>ie&&(y="other")),g&&U&&(U.filename=g),Object(E.useEffect)(function(){var Be,nt,at=(Be=document.cookie)===null||Be===void 0||((nt=Be.replace(/\s/g,""))===null||nt===void 0)?void 0:nt.split(";");at==null||at.map(function(At){var ft=At.split("=");ft[0]==="_educoder_session"&&Qe(ft[1])})},[]),Object(E.useEffect)(function(){y==="office"&&ee()},[y,m]);var ee=function(){var Be=Object(B.a)(t.a.mark(function nt(){var at,At,ft;return t.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return console.log("data:",m),at=m,m.startsWith("http")||(at=location.origin+at),At=new URL(at).pathname.split("/").pop(),It.next=6,Object(l.V)({attachment_id:At});case 6:ft=It.sent,Et(ft);case 8:case"end":return It.stop()}},nt)}));return function(){return Be.apply(this,arguments)}}(),de=function(){if(m.startsWith("http")||m.startsWith("blob:")){we();return}Object(f.z)(g||"educoder",m,g)},we=function(){Object(f.x)(g||"educoder",decodeURIComponent(m))};return i.a.createElement("div",{style:Object(M.a)({},I||{}),className:"".concat(L&&h.a.bgBlack," ").concat(y?h.a.wrp:"hide")},V&&i.a.createElement("div",{className:h.a.close,ref:oe},!$&&i.a.createElement(K.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return oe.current}},i.a.createElement("span",{onClick:we},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(K.a,{title:"\u5173\u95ED",getPopupContainer:function(){return oe.current}},i.a.createElement("span",{className:"",onClick:G},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(h.a[k]," ").concat(k," ").concat(h.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&i.a.createElement(o.b,U)),y==="audio"&&i.a.createElement("audio",{src:"".concat(((v=m)===null||v===void 0?void 0:v.indexOf("http://"))>-1||((T=m)===null||T===void 0?void 0:T.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(m),autoPlay:!0}),y==="video"&&i.a.createElement(i.a.Fragment,null,((x=m)===null||x===void 0?void 0:x.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(m),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})),y==="office"&&Je&&i.a.createElement("iframe",{src:"".concat(Le,"/office.html?key=").concat(Je.key,"&url=").concat(je+Je.url,"&callbackUrl=").concat(je+Je.callbackUrl,"&fileType=").concat(Je.fileType,"&title=").concat(Je.title,"&model=").concat(d,"&officeServer=").concat(c.a.OFFICE_SERVER,"&disabledDownload=").concat(!!$)}),y==="html"&&i.a.createElement("iframe",{src:m+"&disposition=inline"}),y==="pdf"&&i.a.createElement("iframe",{src:"".concat(Le,"/js/pdfview/index.html?url=").concat(m,"&disabledDownload=").concat(!!$)}),y==="image"&&i.a.createElement("img",{src:"".concat(((D=m)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((w=m)===null||w===void 0?void 0:w.indexOf("https://"))>-1||(p=m)!==null&&p!==void 0&&p.startsWith("/api")?"":"data:image/png;base64,").concat(m)}),y==="other"&&i.a.createElement("div",null,i.a.createElement(Q.a,{type:"primary",size:"large",onClick:de},i.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&i.a.createElement(Q.a,{type:"primary",size:"large",onClick:de},i.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Xe,le,H){},pmY6:function(Xe,le,H){"use strict";H.d(le,"h",function(){return E}),H.d(le,"g",function(){return A}),H.d(le,"f",function(){return h}),H.d(le,"e",function(){return s}),H.d(le,"i",function(){return o}),H.d(le,"b",function(){return f}),H.d(le,"a",function(){return l}),H.d(le,"d",function(){return c}),H.d(le,"c",function(){return a});var Z=H("C/vA"),Q=H("JYp7");const O=!1;let K=null;function M(u){K=u}if(O){const u="__is_disposable_tracked__";M(new class{trackDisposable(v){const T=new Error("Potentially leaked disposable").stack;setTimeout(()=>{v[u]||console.log(T)},3e3)}setParent(v,T){if(v&&v!==l.None)try{v[u]=!0}catch(x){}}markAsDisposed(v){if(v&&v!==l.None)try{v[u]=!0}catch(T){}}markAsSingleton(v){}})}function B(u){return K==null||K.trackDisposable(u),u}function R(u){K==null||K.markAsDisposed(u)}function b(u,v){K==null||K.setParent(u,v)}function t(u,v){if(!K)return;for(const T of u)K.setParent(T,v)}function E(u){return K==null||K.markAsSingleton(u),u}class i extends Error{constructor(u){super(`Encountered errors while disposing of store. Errors: [${u.join(", ")}]`);this.errors=u}}function A(u){return typeof u.dispose=="function"&&u.dispose.length===0}function h(u){if(Q.a.is(u)){let v=[];for(const T of u)if(T)try{T.dispose()}catch(x){v.push(x)}if(v.length===1)throw v[0];if(v.length>1)throw new i(v);return Array.isArray(u)?[]:u}else if(u)return u.dispose(),u}function s(...u){const v=o(()=>h(u));return t(u,v),v}function o(u){const v=B({dispose:Object(Z.a)(()=>{R(v),u()})});return v}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,B(this)}dispose(){if(this._isDisposed)return;R(this),this._isDisposed=!0,this.clear()}clear(){try{h(this._toDispose.values())}finally{this._toDispose.clear()}}add(u){if(!u)return u;if(u===this)throw new Error("Cannot register a disposable on itself!");return b(u,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(u),u}}f.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new f,B(this),b(this._store,this)}dispose(){R(this),this._store.dispose()}_register(u){if(u===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(u)}}l.None=Object.freeze({dispose(){}});class c{constructor(){this._isDisposed=!1,B(this)}get value(){return this._isDisposed?void 0:this._value}set value(u){var v;if(this._isDisposed||u===this._value)return;(v=this._value)===null||v===void 0||v.dispose(),u&&b(u,this),this._value=u}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,R(this),(u=this._value)===null||u===void 0||u.dispose(),this._value=void 0}clearAndLeak(){const u=this._value;return this._value=void 0,u&&b(u,null),u}}class a{constructor(u){this.object=u}dispose(){}}},psGv:function(Xe,le,H){var Z,Q;(function(){var O;(function(){"use strict";var R=[,,function(i){function A(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var o=new A(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},A.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},A.prototype.has_match=function(o){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(o))return!0;return!1},A.prototype.set_indent=function(o,f){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(o){this.__items.push(o);var f=o.lastIndexOf(`
`);f!==-1?this.__character_count=o.length-f:this.__character_count+=o.length},A.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function h(o,f){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),f=f||"",o.indent_level>0&&(f=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}h.prototype.get_indent_size=function(o,f){var l=this.__base_string_length;return f=f||0,o<0&&(l=0),l+=o*this.__indent_size,l+=f,l},h.prototype.get_indent_string=function(o,f){var l=this.__base_string;return f=f||0,o<0&&(o=0,l=""),f+=o*this.__indent_size,this.__ensure_cache(f),l+=this.__cache[f],l},h.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},h.prototype.__add_column=function(){var o=this.__cache.length,f=0,l="";this.__indent_size&&o>=this.__indent_size&&(f=Math.floor(o/this.__indent_size),o-=f*this.__indent_size,l=new Array(f+1).join(this.__indent_string)),o&&(l+=new Array(o+1).join(" ")),this.__cache.push(l)};function s(o,f){this.__indent_cache=new h(o,f),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(o,f){return this.__indent_cache.get_indent_string(o,f)},s.prototype.get_indent_size=function(o,f){return this.__indent_cache.get_indent_size(o,f)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(o){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
`);return o!==`
`&&(l=l.replace(/[\n]/g,o)),l},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(o,f){return o=o||0,f=f||0,this.next_line.set_indent(o,f),this.__lines.length>1?(this.current_line.set_indent(o,f),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(o){for(var f=0;f<o.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.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(" "))},s.prototype.remove_indent=function(o){for(var f=this.__lines.length;o<f;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(o,f){for(var l=this.__lines.length-2;l>=0;){var c=this.__lines[l];if(c.is_empty())break;if(c.item(0).indexOf(o)!==0&&c.item(-1)!==f){this.__lines.splice(l+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},i.exports.Output=s},function(i){function A(h,s,o,f){this.type=h,this.text=s,this.comments_before=null,this.newlines=o||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=A},,,function(i){function A(o,f){this.raw_options=h(o,f),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"])}A.prototype._get_array=function(o,f){var l=this.raw_options[o],c=f||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(c=l.concat()):typeof l=="string"&&(c=l.split(/[^a-zA-Z0-9_\/\-]+/)),c},A.prototype._get_boolean=function(o,f){var l=this.raw_options[o],c=l===void 0?!!f:!!l;return c},A.prototype._get_characters=function(o,f){var l=this.raw_options[o],c=f||"";return typeof l=="string"&&(c=l.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),c},A.prototype._get_number=function(o,f){var l=this.raw_options[o];f=parseInt(f,10),isNaN(f)&&(f=0);var c=parseInt(l,10);return isNaN(c)&&(c=f),c},A.prototype._get_selection=function(o,f,l){var c=this._get_selection_list(o,f,l);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+f+`
You passed in: '`+this.raw_options[o]+"'");return c[0]},A.prototype._get_selection_list=function(o,f,l){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[f[0]],!this._is_valid_selection(l,f))throw new Error("Invalid Default Value!");var c=this._get_array(o,l);if(!this._is_valid_selection(c,f))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+f+`
You passed in: '`+this.raw_options[o]+"'");return c},A.prototype._is_valid_selection=function(o,f){return o.length&&f.length&&!o.some(function(l){return f.indexOf(l)===-1})};function h(o,f){var l={};o=s(o);var c;for(c in o)c!==f&&(l[c]=o[c]);if(f&&o[f])for(c in o[f])l[c]=o[f][c];return l}function s(o){var f={},l;for(l in o){var c=l.replace(/-/g,"_");f[c]=o[l]}return f}i.exports.Options=A,i.exports.normalizeOpts=s,i.exports.mergeOpts=h},,function(i){var A=RegExp.prototype.hasOwnProperty("sticky");function h(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}h.prototype.restart=function(){this.__position=0},h.prototype.back=function(){this.__position>0&&(this.__position-=1)},h.prototype.hasNext=function(){return this.__position<this.__input_length},h.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},h.prototype.peek=function(s){var o=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(o=this.__input.charAt(s)),o},h.prototype.__match=function(s,o){s.lastIndex=o;var f=s.exec(this.__input);return f&&!(A&&s.sticky)&&(f.index!==o&&(f=null)),f},h.prototype.test=function(s,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(s,o):!1},h.prototype.testChar=function(s,o){var f=this.peek(o);return s.lastIndex=0,f!==null&&s.test(f)},h.prototype.match=function(s){var o=this.__match(s,this.__position);return o?this.__position+=o[0].length:o=null,o},h.prototype.read=function(s,o,f){var l="",c;return s&&(c=this.match(s),c&&(l+=c[0])),o&&(c||!s)&&(l+=this.readUntil(o,f)),l},h.prototype.readUntil=function(s,o){var f="",l=this.__position;s.lastIndex=this.__position;var c=s.exec(this.__input);return c?(l=c.index,o&&(l+=c[0].length)):l=this.__input_length,f=this.__input.substring(this.__position,l),this.__position=l,f},h.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},h.prototype.get_regexp=function(s,o){var f=null,l="g";return o&&A&&(l="y"),typeof s=="string"&&s!==""?f=new RegExp(s,l):s&&(f=new RegExp(s.source,l)),f},h.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},h.prototype.peekUntilAfter=function(s){var o=this.__position,f=this.readUntilAfter(s);return this.__position=o,f},h.prototype.lookBack=function(s){var o=this.__position-1;return o>=s.length&&this.__input.substring(o-s.length,o).toLowerCase()===s},i.exports.InputScanner=h},function(i,A,h){var s=h(8).InputScanner,o=h(3).Token,f=h(10).TokenStream,l=h(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(u,v){this._input=new s(u),this._options=v||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var u,v=new o(c.START,""),T=null,x=[],D=new f;v.type!==c.EOF;){for(u=this._get_next_token(v,T);this._is_comment(u);)D.add(u),u=this._get_next_token(v,T);D.isEmpty()||(u.comments_before=D,D=new f),u.parent=T,this._is_opening(u)?(x.push(T),T=u):T&&this._is_closing(u,T)&&(u.opened=T,T.closed=u,T=x.pop(),u.parent=T),u.previous=v,v.next=u,this.__tokens.add(u),v=u}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(u,v){this._readWhitespace();var T=this._input.read(/.+/g);return T?this._create_token(c.RAW,T):this._create_token(c.EOF,"")},a.prototype._is_comment=function(u){return!1},a.prototype._is_opening=function(u){return!1},a.prototype._is_closing=function(u,v){return!1},a.prototype._create_token=function(u,v){var T=new o(u,v,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return T},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=a,i.exports.TOKEN=c},function(i){function A(h){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=h}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__tokens[this.__position],this.__position+=1),h},A.prototype.peek=function(h){var s=null;return h=h||0,h+=this.__position,h>=0&&h<this.__tokens_length&&(s=this.__tokens[h]),s},A.prototype.add=function(h){this.__parent_token&&(h.parent=this.__parent_token),this.__tokens.push(h),this.__tokens_length+=1},i.exports.TokenStream=A},function(i,A,h){var s=h(12).Pattern;function o(f,l){s.call(this,f,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new s,o.prototype.__set_whitespace_patterns=function(f,l){f+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var l=this.__split(this._newline_regexp,f);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return f},o.prototype.matching=function(f,l){var c=this._create();return c.__set_whitespace_patterns(f,l),c._update(),c},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(f,l){f.lastIndex=0;for(var c=0,a=[],u=f.exec(l);u;)a.push(l.substring(c,u.index)),c=u.index+u[0].length,u=f.exec(l);return c<l.length?a.push(l.substring(c,l.length)):a.push(""),a},i.exports.WhitespacePattern=o},function(i){function A(h,s){this._input=h,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}A.prototype.read=function(){var h=this._input.read(this._starting_pattern);return(!this._starting_pattern||h)&&(h+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),h},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(h){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(h),s._update(),s},A.prototype.until=function(h){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(h),s._update(),s},A.prototype.starting_with=function(h){var s=this._create();return s._starting_pattern=this._input.get_regexp(h,!0),s._update(),s},A.prototype.matching=function(h){var s=this._create();return s._match_pattern=this._input.get_regexp(h,!0),s._update(),s},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},i.exports.Pattern=A},function(i){function A(h,s){h=typeof h=="string"?h:h.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(h+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(h+/\sbeautify\signore:end\s/.source+s,"g")}A.prototype.get_directives=function(h){if(!h.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(h);o;)s[o[1]]=o[2],o=this.__directive_pattern.exec(h);return s},A.prototype.readIgnored=function(h){return h.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=A},function(i,A,h){var s=h(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function f(l,c){s.call(this,l,c),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),c&&(this.__template_pattern=this._input.get_regexp(c.__template_pattern),this._excluded=Object.assign(this._excluded,c._excluded),this._disabled=Object.assign(this._disabled,c._disabled));var a=new s(l);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}/)}}f.prototype=new s,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(l){var c=this._create();return c._disabled[l]=!0,c._update(),c},f.prototype.read_options=function(l){var c=this._create();for(var a in o)c._disabled[a]=l.templating.indexOf(a)===-1;return c._update(),c},f.prototype.exclude=function(l){var c=this._create();return c._excluded[l]=!0,c._update(),c},f.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),l+=c,c=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},f.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},f.prototype._read_template=function(){var l="",c=this._input.peek();if(c==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(l=l||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},i.exports.TemplatablePattern=f},,,,function(i,A,h){var s=h(19).Beautifier,o=h(20).Options;function f(l,c,a,u){var v=new s(l,c,a,u);return v.beautify()}i.exports=f,i.exports.defaultOptions=function(){return new o}},function(i,A,h){var s=h(20).Options,o=h(2).Output,f=h(21).Tokenizer,l=h(21).TOKEN,c=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,u=function(C,y){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 o(C,y)};u.prototype.current_line_has_match=function(C){return this._output.current_line.has_match(C)},u.prototype.set_space_before_token=function(C,y){this._output.space_before_token=C,this._output.non_breaking_space=y},u.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},u.prototype.add_raw_token=function(C){this._output.add_raw_token(C)},u.prototype.print_preserved_newlines=function(C){var y=0;C.type!==l.TEXT&&C.previous.type!==l.TEXT&&(y=C.newlines?1:0),this.preserve_newlines&&(y=C.newlines<this.max_preserve_newlines+1?C.newlines:this.max_preserve_newlines+1);for(var g=0;g<y;g++)this.print_newline(g>0);return y!==0},u.prototype.traverse_whitespace=function(C){return C.whitespace_before||C.newlines?(this.print_preserved_newlines(C)||(this._output.space_before_token=!0),!0):!1},u.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},u.prototype.print_newline=function(C){this._output.add_new_line(C)},u.prototype.print_token=function(C){C.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(C.text))},u.prototype.indent=function(){this.indent_level++},u.prototype.get_full_indent=function(C){return C=this.indent_level+(C||0),C<1?"":this._output.get_indent_string(C)};var v=function(C){for(var y=null,g=C.next;g.type!==l.EOF&&C.closed!==g;){if(g.type===l.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===l.EQUALS&&g.next.next&&g.next.next.type===l.VALUE&&(y=g.next.next.text);break}g=g.next}return y},T=function(C,y){var g=null,U=null;return y.closed?(C==="script"?g="text/javascript":C==="style"&&(g="text/css"),g=v(y)||g,g.search("text/css")>-1?U="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?U="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?U="html":g.search(/test\/null/)>-1&&(U="null"),U):null};function x(C,y){return y.indexOf(C)!==-1}function D(C,y,g){this.parent=C||null,this.tag=y?y.tag_name:"",this.indent_level=g||0,this.parser_token=y||null}function w(C){this._printer=C,this._current_frame=null}w.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},w.prototype.record_tag=function(C){var y=new D(this._current_frame,C,this._printer.indent_level);this._current_frame=y},w.prototype._try_pop_frame=function(C){var y=null;return C&&(y=C.parser_token,this._printer.indent_level=C.indent_level,this._current_frame=C.parent),y},w.prototype._get_frame=function(C,y){for(var g=this._current_frame;g&&!(C.indexOf(g.tag)!==-1);){if(y&&y.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},w.prototype.try_pop=function(C,y){var g=this._get_frame([C],y);return this._try_pop_frame(g)},w.prototype.indent_to_tag=function(C){var y=this._get_frame(C);y&&(this._printer.indent_level=y.indent_level)};function p(C,y,g,U){this._source_text=C||"",y=y||{},this._js_beautify=g,this._css_beautify=U,this._tag_stack=null;var k=new s(y,"html");this._options=k,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"}p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C=this._source_text,y=this._options.eol;this._options.eol==="auto"&&(y=`
`,C&&c.test(C)&&(y=C.match(c)[0])),C=C.replace(a,`
`);var g=C.match(/^[\t ]*/)[0],U={text:"",type:""},k=new n,I=new u(this._options,g),V=new f(C,this._options).tokenize();this._tag_stack=new w(I);for(var G=null,L=V.next();L.type!==l.EOF;)L.type===l.TAG_OPEN||L.type===l.COMMENT?(G=this._handle_tag_open(I,L,k,U),k=G):L.type===l.ATTRIBUTE||L.type===l.EQUALS||L.type===l.VALUE||L.type===l.TEXT&&!k.tag_complete?G=this._handle_inside_tag(I,L,k,V):L.type===l.TAG_CLOSE?G=this._handle_tag_close(I,L,k):L.type===l.TEXT?G=this._handle_text(I,L,k):I.add_raw_token(L),U=G,L=V.next();var $=I._output.get_code(y);return $},p.prototype._handle_tag_close=function(C,y,g){var U={text:y.text,type:y.type};return C.alignment_size=0,g.tag_complete=!0,C.set_space_before_token(y.newlines||y.whitespace_before!=="",!0),g.is_unformatted?C.add_raw_token(y):(g.tag_start_char==="<"&&(C.set_space_before_token(y.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&C.print_newline(!1)),C.print_token(y)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(C.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&C.set_wrap_point(),U},p.prototype._handle_inside_tag=function(C,y,g,U){var k=g.has_wrapped_attrs,I={text:y.text,type:y.type};if(C.set_space_before_token(y.newlines||y.whitespace_before!=="",!0),g.is_unformatted)C.add_raw_token(y);else if(g.tag_start_char==="{"&&y.type===l.TEXT)C.print_preserved_newlines(y)?(y.newlines=0,C.add_raw_token(y)):C.print_token(y);else{if(y.type===l.ATTRIBUTE?(C.set_space_before_token(!0),g.attr_count+=1):(y.type===l.EQUALS||y.type===l.VALUE&&y.previous.type===l.EQUALS)&&C.set_space_before_token(!1),y.type===l.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(C.traverse_whitespace(y),k=k||y.newlines!==0),this._is_wrap_attributes_force)){var V=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var G=!0,L=0,$;do{if($=U.peek(L),$.type===l.ATTRIBUTE){G=!1;break}L+=1}while(L<4&&$.type!==l.EOF&&$.type!==l.TAG_CLOSE);V=!G}V&&(C.print_newline(!1),k=!0)}C.print_token(y),k=k||C.previous_token_wrapped(),g.has_wrapped_attrs=k}return I},p.prototype._handle_text=function(C,y,g){var U={text:y.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(C,y,g):g.is_unformatted||g.is_content_unformatted?C.add_raw_token(y):(C.traverse_whitespace(y),C.print_token(y)),U},p.prototype._print_custom_beatifier_text=function(C,y,g){var U=this;if(y.text!==""){var k=y.text,I,V=1,G="",L="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?I=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?I=this._css_beautify:g.custom_beautifier_name==="html"&&(I=function(ve,Ce){var De=new p(ve,Ce,U._js_beautify,U._css_beautify);return De.beautify()}),this._options.indent_scripts==="keep"?V=0:this._options.indent_scripts==="separate"&&(V=-C.indent_level);var $=C.get_full_indent(V);if(k=k.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var Y=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!Y){C.add_raw_token(y);return}G=$+Y[1]+`
`,k=Y[4],Y[5]&&(L=$+Y[5]),k=k.replace(/\n[ \t]*$/,""),(Y[2]||Y[3].indexOf(`
`)!==-1)&&(Y=Y[3].match(/[ \t]+$/),Y&&(y.whitespace_before=Y[0]))}if(k)if(I){var ne=function(){this.eol=`
`};ne.prototype=this._options.raw_options;var se=new ne;k=I($+k,se)}else{var _e=y.whitespace_before;_e&&(k=k.replace(new RegExp(`
(`+_e+")?","g"),`
`)),k=$+k.replace(/\n/g,`
`+$)}G&&(k?k=G+k+`
`+L:k=G+L),C.print_newline(!1),k&&(y.text=k,y.whitespace_before="",y.newlines=0,C.add_raw_token(y),C.print_newline(!0))}},p.prototype._handle_tag_open=function(C,y,g,U){var k=this._get_tag_open_token(y);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&y.type===l.TAG_OPEN&&y.text.indexOf("</")===0?(C.add_raw_token(y),k.start_tag_token=this._tag_stack.try_pop(k.tag_name)):(C.traverse_whitespace(y),this._set_tag_position(C,y,k,g,U),k.is_inline_element||C.set_wrap_point(),C.print_token(y)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(k.alignment_size=y.text.length+1),!k.tag_complete&&!k.is_unformatted&&(C.alignment_size=k.alignment_size),k};var n=function(C,y){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="",!y)this.tag_complete=!0;else{var g;this.tag_start_char=y.text[0],this.text=y.text,this.tag_start_char==="<"?(g=y.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=y.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[1]:"",(y.text.startsWith("{{#>")||y.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&y.next!==null?this.tag_check=y.next.text.split(" ")[0]:this.tag_check=y.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),y.type===l.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||y.closed&&y.closed.text==="/>";var U=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(U=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(U)))}};p.prototype._get_tag_open_token=function(C){var y=new n(this._tag_stack.get_parser_token(),C);return y.alignment_size=this._options.wrap_attributes_indent_size,y.is_end_tag=y.is_end_tag||x(y.tag_check,this._options.void_elements),y.is_empty_element=y.tag_complete||y.is_start_tag&&y.is_end_tag,y.is_unformatted=!y.tag_complete&&x(y.tag_check,this._options.unformatted),y.is_content_unformatted=!y.is_empty_element&&x(y.tag_check,this._options.content_unformatted),y.is_inline_element=x(y.tag_name,this._options.inline)||y.tag_name.includes("-")||y.tag_start_char==="{",y},p.prototype._set_tag_position=function(C,y,g,U,k){if(g.is_empty_element||(g.is_end_tag?g.start_tag_token=this._tag_stack.try_pop(g.tag_name):(this._do_optional_end_element(g)&&(g.is_inline_element||C.print_newline(!1)),this._tag_stack.record_tag(g),(g.tag_name==="script"||g.tag_name==="style")&&!(g.is_unformatted||g.is_content_unformatted)&&(g.custom_beautifier_name=T(g.tag_check,y)))),x(g.tag_check,this._options.extra_liners)&&(C.print_newline(!1),C._output.just_added_blankline()||C.print_newline(!0)),g.is_empty_element){if(g.tag_start_char==="{"&&g.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),g.indent_content=!0;var I=C.current_line_has_match(/{{#if/);I||C.print_newline(!1)}g.tag_name==="!--"&&k.type===l.TAG_CLOSE&&U.is_end_tag&&g.text.indexOf(`
`)===-1||(g.is_inline_element||g.is_unformatted||C.print_newline(!1),this._calcluate_parent_multiline(C,g))}else if(g.is_end_tag){var V=!1;V=g.start_tag_token&&g.start_tag_token.multiline_content,V=V||!g.is_inline_element&&!(U.is_inline_element||U.is_unformatted)&&!(k.type===l.TAG_CLOSE&&g.start_tag_token===U)&&k.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(V=!1),V&&C.print_newline(!1)}else g.indent_content=!g.custom_beautifier_name,g.tag_start_char==="<"&&(g.tag_name==="html"?g.indent_content=this._options.indent_inner_html:g.tag_name==="head"?g.indent_content=this._options.indent_head_inner_html:g.tag_name==="body"&&(g.indent_content=this._options.indent_body_inner_html)),!(g.is_inline_element||g.is_unformatted)&&(k.type!=="TK_CONTENT"||g.is_content_unformatted)&&C.print_newline(!1),this._calcluate_parent_multiline(C,g)},p.prototype._calcluate_parent_multiline=function(C,y){y.parent&&C._output.just_added_newline()&&!((y.is_inline_element||y.is_unformatted)&&y.parent.is_inline_element)&&(y.parent.multiline_content=!0)};var d=["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"],m=["a","audio","del","ins","map","noscript","video"];p.prototype._do_optional_end_element=function(C){var y=null;if(C.is_empty_element||!C.is_start_tag||!C.parent)return;if(C.tag_name==="body")y=y||this._tag_stack.try_pop("head");else if(C.tag_name==="li")y=y||this._tag_stack.try_pop("li",["ol","ul"]);else if(C.tag_name==="dd"||C.tag_name==="dt")y=y||this._tag_stack.try_pop("dt",["dl"]),y=y||this._tag_stack.try_pop("dd",["dl"]);else if(C.parent.tag_name==="p"&&d.indexOf(C.tag_name)!==-1){var g=C.parent.parent;(!g||m.indexOf(g.tag_name)===-1)&&(y=y||this._tag_stack.try_pop("p"))}else C.tag_name==="rp"||C.tag_name==="rt"?(y=y||this._tag_stack.try_pop("rt",["ruby","rtc"]),y=y||this._tag_stack.try_pop("rp",["ruby","rtc"])):C.tag_name==="optgroup"?y=y||this._tag_stack.try_pop("optgroup",["select"]):C.tag_name==="option"?y=y||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):C.tag_name==="colgroup"?y=y||this._tag_stack.try_pop("caption",["table"]):C.tag_name==="thead"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"])):C.tag_name==="tbody"||C.tag_name==="tfoot"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("thead",["table"]),y=y||this._tag_stack.try_pop("tbody",["table"])):C.tag_name==="tr"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(C.tag_name==="th"||C.tag_name==="td")&&(y=y||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),y=y||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return C.parent=this._tag_stack.get_parser_token(),y},i.exports.Beautifier=p},function(i,A,h){var s=h(6).Options;function o(f){s.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new s,i.exports.Options=o},function(i,A,h){var s=h(9).Tokenizer,o=h(9).TOKEN,f=h(13).Directives,l=h(14).TemplatablePattern,c=h(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:o.START,RAW:o.RAW,EOF:o.EOF},u=new f(/<\!--/,/-->/),v=function(T,x){s.call(this,T,x),this._current_tag_name="";var D=new l(this._input).read_options(this._options),w=new c(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:w.starting_with(/{{!--/).until_after(/--}}/),handlebars:w.starting_with(/{{/).until_after(/}}/),handlebars_open:w.until(/[\n\r\t }]/),handlebars_raw_close:w.until(/}}/),comment:w.starting_with(/<!--/).until_after(/-->/),cdata:w.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:w.starting_with(/<!\[/).until_after(/]>/),processing:w.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 p=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=w.matching(p).until_after(p)}};v.prototype=new s,v.prototype._is_comment=function(T){return!1},v.prototype._is_opening=function(T){return T.type===a.TAG_OPEN},v.prototype._is_closing=function(T,x){return T.type===a.TAG_CLOSE&&x&&((T.text===">"||T.text==="/>")&&x.text[0]==="<"||T.text==="}}"&&x.text[0]==="{"&&x.text[1]==="{")},v.prototype._reset=function(){this._current_tag_name=""},v.prototype._get_next_token=function(T,x){var D=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(a.EOF,""):(D=D||this._read_open_handlebars(w,x),D=D||this._read_attribute(w,T,x),D=D||this._read_close(w,x),D=D||this._read_raw_content(w,T,x),D=D||this._read_content_word(w),D=D||this._read_comment_or_cdata(w),D=D||this._read_processing(w),D=D||this._read_open(w,x),D=D||this._create_token(a.UNKNOWN,this._input.next()),D)},v.prototype._read_comment_or_cdata=function(T){var x=null,D=null,w=null;if(T==="<"){var p=this._input.peek(1);p==="!"&&(D=this.__patterns.comment.read(),D?(w=u.get_directives(D),w&&w.ignore==="start"&&(D+=u.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(x=this._create_token(a.COMMENT,D),x.directives=w)}return x},v.prototype._read_processing=function(T){var x=null,D=null,w=null;if(T==="<"){var p=this._input.peek(1);(p==="!"||p==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(x=this._create_token(a.COMMENT,D),x.directives=w)}return x},v.prototype._read_open=function(T,x){var D=null,w=null;return x||T==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),w=this._create_token(a.TAG_OPEN,D)),w},v.prototype._read_open_handlebars=function(T,x){var D=null,w=null;return x||this._options.indent_handlebars&&T==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),w=this._create_token(a.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),w=this._create_token(a.TAG_OPEN,D))),w},v.prototype._read_close=function(T,x){var D=null,w=null;return x&&(x.text[0]==="<"&&(T===">"||T==="/"&&this._input.peek(1)===">")?(D=this._input.next(),T==="/"&&(D+=this._input.next()),w=this._create_token(a.TAG_CLOSE,D)):x.text[0]==="{"&&T==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),w=this._create_token(a.TAG_CLOSE,"}}"))),w},v.prototype._read_attribute=function(T,x,D){var w=null,p="";if(D&&D.text[0]==="<")if(T==="=")w=this._create_token(a.EQUALS,this._input.next());else if(T==='"'||T==="'"){var n=this._input.next();T==='"'?n+=this.__patterns.double_quote.read():n+=this.__patterns.single_quote.read(),w=this._create_token(a.VALUE,n)}else p=this.__patterns.attribute.read(),p&&(x.type===a.EQUALS?w=this._create_token(a.VALUE,p):w=this._create_token(a.ATTRIBUTE,p));return w},v.prototype._is_content_unformatted=function(T){return this._options.void_elements.indexOf(T)===-1&&(this._options.content_unformatted.indexOf(T)!==-1||this._options.unformatted.indexOf(T)!==-1)},v.prototype._read_raw_content=function(T,x,D){var w="";if(D&&D.text[0]==="{")w=this.__patterns.handlebars_raw_close.read();else if(x.type===a.TAG_CLOSE&&x.opened.text[0]==="<"&&x.text[0]!=="/"){var p=x.opened.text.substr(1).toLowerCase();if(p==="script"||p==="style"){var n=this._read_comment_or_cdata(T);if(n)return n.type=a.TEXT,n;w=this._input.readUntil(new RegExp("</"+p+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(p)&&(w=this._input.readUntil(new RegExp("</"+p+"[\\n\\r\\t ]*?>","ig")))}return w?this._create_token(a.TEXT,w):null},v.prototype._read_content_word=function(T){var x="";if(this._options.unformatted_content_delimiter&&(T===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)},i.exports.Tokenizer=v,i.exports.TOKEN=a}],b={};function t(i){var A=b[i];if(A!==void 0)return A.exports;var h=b[i]={exports:{}};return R[i](h,h.exports,t),h.exports}var E=t(18);O=E})();var K=O;if(!0)!(Z=[H,H("6UM0"),H("TXwP")],Q=function(R){var b=H("6UM0"),t=H("TXwP");return{html_beautify:function(E,i){return K(E,i,b.js_beautify,t.css_beautify)}}}.apply(le,Z),Q!==void 0&&(Xe.exports=Q));else var M,B})()},pzxd:function(Xe,le,H){var Z=H("bYtY"),Q=Z.retrieve2,O=Z.retrieve3,K=Z.each,M=Z.normalizeCssArray,B=Z.isString,R=Z.isObject,b=H("6GrX"),t=H("VpOo"),E=H("Xnb7"),i=H("fW2E"),A=H("gut8"),h=A.ContextCachedBy,s=A.WILL_BE_RESTORED,o=b.DEFAULT_FONT,f={left:1,right:1,center:1},l={top:1,bottom:1,middle:1},c=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],a={},u={};function v($){return T($),K($.rich,T),$}function T($){if($){$.font=b.makeFont($);var Y=$.textAlign;Y==="middle"&&(Y="center"),$.textAlign=Y==null||f[Y]?Y:"left";var ne=$.textVerticalAlign||$.textBaseline;ne==="center"&&(ne="middle"),$.textVerticalAlign=ne==null||l[ne]?ne:"top";var se=$.textPadding;se&&($.textPadding=M($.textPadding))}}function x($,Y,ne,se,_e,ve){se.rich?w($,Y,ne,se,_e,ve):D($,Y,ne,se,_e,ve)}function D($,Y,ne,se,_e,ve){"use strict";var Ce=m(se),De,Qe=!1,Se=Y.__attrCachedBy===h.PLAIN_TEXT;ve!==s?(ve&&(De=ve.style,Qe=!Ce&&Se&&De),Y.__attrCachedBy=Ce?h.NONE:h.PLAIN_TEXT):Se&&(Y.__attrCachedBy=h.NONE);var Ie=se.font||o;(!Qe||Ie!==(De.font||o))&&(Y.font=Ie);var Je=$.__computedFont;$.__styleFont!==Ie&&($.__styleFont=Ie,Je=$.__computedFont=Y.font);var Et=se.textPadding,Le=se.textLineHeight,je=$.__textCotentBlock;(!je||$.__dirtyText)&&(je=$.__textCotentBlock=b.parsePlainText(ne,Je,Et,Le,se.truncate));var st=je.outerHeight,he=je.lines,ie=je.lineHeight,oe=g(u,$,se,_e),ee=oe.baseX,de=oe.baseY,we=oe.textAlign||"left",Be=oe.textVerticalAlign;n(Y,se,_e,ee,de);var nt=b.adjustTextY(de,st,Be),at=ee,At=nt;if(Ce||Et){var ft=b.getWidth(ne,Je),xt=ft;Et&&(xt+=Et[1]+Et[3]);var It=b.adjustTextX(ee,xt,we);Ce&&C($,Y,se,It,nt,xt,st),Et&&(at=G(ee,we,Et),At+=Et[0])}Y.textAlign=we,Y.textBaseline="middle",Y.globalAlpha=se.opacity||1;for(var He=0;He<c.length;He++){var ke=c[He],ct=ke[0],gt=ke[1],Ze=se[ct];(!Qe||Ze!==De[ct])&&(Y[gt]=i(Y,gt,Ze||ke[2]))}At+=ie/2;var ot=se.textStrokeWidth,Ke=Qe?De.textStrokeWidth:null,Me=!Qe||ot!==Ke,Ue=!Qe||Me||se.textStroke!==De.textStroke,ge=k(se.textStroke,ot),xe=I(se.textFill);if(ge&&(Me&&(Y.lineWidth=ot),Ue&&(Y.strokeStyle=ge)),xe&&((!Qe||se.textFill!==De.textFill)&&(Y.fillStyle=xe)),he.length===1)ge&&Y.strokeText(he[0],at,At),xe&&Y.fillText(he[0],at,At);else for(var He=0;He<he.length;He++)ge&&Y.strokeText(he[He],at,At),xe&&Y.fillText(he[He],at,At),At+=ie}function w($,Y,ne,se,_e,ve){ve!==s&&(Y.__attrCachedBy=h.NONE);var Ce=$.__textCotentBlock;(!Ce||$.__dirtyText)&&(Ce=$.__textCotentBlock=b.parseRichText(ne,se)),p($,Y,Ce,se,_e)}function p($,Y,ne,se,_e){var ve=ne.width,Ce=ne.outerWidth,De=ne.outerHeight,Qe=se.textPadding,Se=g(u,$,se,_e),Ie=Se.baseX,Je=Se.baseY,Et=Se.textAlign,Le=Se.textVerticalAlign;n(Y,se,_e,Ie,Je);var je=b.adjustTextX(Ie,Ce,Et),st=b.adjustTextY(Je,De,Le),he=je,ie=st;Qe&&(he+=Qe[3],ie+=Qe[0]);var oe=he+ve;m(se)&&C($,Y,se,je,st,Ce,De);for(var ee=0;ee<ne.lines.length;ee++){for(var de=ne.lines[ee],we=de.tokens,Be=we.length,nt=de.lineHeight,at=de.width,At=0,ft=he,xt=oe,It=Be-1,He;At<Be&&(He=we[At],!He.textAlign||He.textAlign==="left");)d($,Y,He,se,nt,ie,ft,"left"),at-=He.width,ft+=He.width,At++;for(;It>=0&&(He=we[It],He.textAlign==="right");)d($,Y,He,se,nt,ie,xt,"right"),at-=He.width,xt-=He.width,It--;for(ft+=(ve-(ft-he)-(oe-xt)-at)/2;At<=It;)He=we[At],d($,Y,He,se,nt,ie,ft+He.width/2,"center"),ft+=He.width,At++;ie+=nt}}function n($,Y,ne,se,_e){if(ne&&Y.textRotation){var ve=Y.textOrigin;ve==="center"?(se=ne.width/2+ne.x,_e=ne.height/2+ne.y):ve&&(se=ve[0]+ne.x,_e=ve[1]+ne.y),$.translate(se,_e),$.rotate(-Y.textRotation),$.translate(-se,-_e)}}function d($,Y,ne,se,_e,ve,Ce,De){var Qe=se.rich[ne.styleName]||{};Qe.text=ne.text;var Se=ne.textVerticalAlign,Ie=ve+_e/2;Se==="top"?Ie=ve+ne.height/2:Se==="bottom"&&(Ie=ve+_e-ne.height/2),!ne.isLineHolder&&m(Qe)&&C($,Y,Qe,De==="right"?Ce-ne.width:De==="center"?Ce-ne.width/2:Ce,Ie-ne.height/2,ne.width,ne.height);var Je=ne.textPadding;Je&&(Ce=G(Ce,De,Je),Ie-=ne.height/2-Je[2]-ne.textHeight/2),U(Y,"shadowBlur",O(Qe.textShadowBlur,se.textShadowBlur,0)),U(Y,"shadowColor",Qe.textShadowColor||se.textShadowColor||"transparent"),U(Y,"shadowOffsetX",O(Qe.textShadowOffsetX,se.textShadowOffsetX,0)),U(Y,"shadowOffsetY",O(Qe.textShadowOffsetY,se.textShadowOffsetY,0)),U(Y,"textAlign",De),U(Y,"textBaseline","middle"),U(Y,"font",ne.font||o);var Et=k(Qe.textStroke||se.textStroke,je),Le=I(Qe.textFill||se.textFill),je=Q(Qe.textStrokeWidth,se.textStrokeWidth);Et&&(U(Y,"lineWidth",je),U(Y,"strokeStyle",Et),Y.strokeText(ne.text,Ce,Ie)),Le&&(U(Y,"fillStyle",Le),Y.fillText(ne.text,Ce,Ie))}function m($){return!!($.textBackgroundColor||$.textBorderWidth&&$.textBorderColor)}function C($,Y,ne,se,_e,ve,Ce){var De=ne.textBackgroundColor,Qe=ne.textBorderWidth,Se=ne.textBorderColor,Ie=B(De);if(U(Y,"shadowBlur",ne.textBoxShadowBlur||0),U(Y,"shadowColor",ne.textBoxShadowColor||"transparent"),U(Y,"shadowOffsetX",ne.textBoxShadowOffsetX||0),U(Y,"shadowOffsetY",ne.textBoxShadowOffsetY||0),Ie||Qe&&Se){Y.beginPath();var Je=ne.textBorderRadius;Je?t.buildPath(Y,{x:se,y:_e,width:ve,height:Ce,r:Je}):Y.rect(se,_e,ve,Ce),Y.closePath()}if(Ie)if(U(Y,"fillStyle",De),ne.fillOpacity!=null){var Et=Y.globalAlpha;Y.globalAlpha=ne.fillOpacity*ne.opacity,Y.fill(),Y.globalAlpha=Et}else Y.fill();else if(R(De)){var Le=De.image;Le=E.createOrUpdateImage(Le,null,$,y,De),Le&&E.isImageReady(Le)&&Y.drawImage(Le,se,_e,ve,Ce)}if(Qe&&Se)if(U(Y,"lineWidth",Qe),U(Y,"strokeStyle",Se),ne.strokeOpacity!=null){var Et=Y.globalAlpha;Y.globalAlpha=ne.strokeOpacity*ne.opacity,Y.stroke(),Y.globalAlpha=Et}else Y.stroke()}function y($,Y){Y.image=$}function g($,Y,ne,se){var _e=ne.x||0,ve=ne.y||0,Ce=ne.textAlign,De=ne.textVerticalAlign;if(se){var Qe=ne.textPosition;if(Qe instanceof Array)_e=se.x+V(Qe[0],se.width),ve=se.y+V(Qe[1],se.height);else{var Se=Y&&Y.calculateTextPosition?Y.calculateTextPosition(a,ne,se):b.calculateTextPosition(a,ne,se);_e=Se.x,ve=Se.y,Ce=Ce||Se.textAlign,De=De||Se.textVerticalAlign}var Ie=ne.textOffset;Ie&&(_e+=Ie[0],ve+=Ie[1])}return $=$||{},$.baseX=_e,$.baseY=ve,$.textAlign=Ce,$.textVerticalAlign=De,$}function U($,Y,ne){return $[Y]=i($,Y,ne),$[Y]}function k($,Y){return $==null||Y<=0||$==="transparent"||$==="none"?null:$.image||$.colorStops?"#000":$}function I($){return $==null||$==="none"?null:$.image||$.colorStops?"#000":$}function V($,Y){return typeof $=="string"?$.lastIndexOf("%")>=0?parseFloat($)/100*Y:parseFloat($):$}function G($,Y,ne){return Y==="right"?$-ne[1]:Y==="center"?$+ne[3]/2-ne[1]/2:$+ne[3]}function L($,Y){return $!=null&&($||Y.textBackgroundColor||Y.textBorderWidth&&Y.textBorderColor||Y.textPadding)}le.normalizeTextStyle=v,le.renderText=x,le.getBoxPosition=g,le.getStroke=k,le.getFill=I,le.parsePercent=V,le.needDrawText=L},qH13:function(Xe,le,H){var Z=H("ItGF"),Q=H("QBsz"),O=Q.applyTransform,K=H("mFDi"),M=H("Qe9p"),B=H("6GrX"),R=H("pzxd"),b=H("ni6a"),t=H("Gev7"),E=H("Dagg"),i=H("dqUG"),A=H("y+Vt"),h=H("IMiH"),s=H("QuXc"),o=H("06Qe"),f=h.CMD,l=Math.round,c=Math.sqrt,a=Math.abs,u=Math.cos,v=Math.sin,T=Math.max;if(!Z.canvasSupported){var x=",",D="progid:DXImageTransform.Microsoft",w=21600,p=w/2,n=1e5,d=1e3,m=function(ee){ee.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ee.coordsize=w+","+w,ee.coordorigin="0,0"},C=function(ee){return String(ee).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},y=function(ee,de,we){return"rgb("+[ee,de,we].join(",")+")"},g=function(ee,de){de&&ee&&de.parentNode!==ee&&ee.appendChild(de)},U=function(ee,de){de&&ee&&de.parentNode===ee&&ee.removeChild(de)},k=function(ee,de,we){return(parseFloat(ee)||0)*n+(parseFloat(de)||0)*d+we},I=R.parsePercent,V=function(ee,de,we){var Be=M.parse(de);we=+we,isNaN(we)&&(we=1),Be&&(ee.color=y(Be[0],Be[1],Be[2]),ee.opacity=we*Be[3])},G=function(ee){var de=M.parse(ee);return[y(de[0],de[1],de[2]),de[3]]},L=function(ee,de,we){var Be=de.fill;if(Be!=null)if(Be instanceof s){var nt,at=0,At=[0,0],ft=0,xt=1,It=we.getBoundingRect(),He=It.width,ke=It.height;if(Be.type==="linear"){nt="gradient";var ct=we.transform,gt=[Be.x*He,Be.y*ke],Ze=[Be.x2*He,Be.y2*ke];ct&&(O(gt,gt,ct),O(Ze,Ze,ct));var ot=Ze[0]-gt[0],Ke=Ze[1]-gt[1];at=Math.atan2(ot,Ke)*180/Math.PI,at<0&&(at+=360),at<1e-6&&(at=0)}else{nt="gradientradial";var gt=[Be.x*He,Be.y*ke],ct=we.transform,Me=we.scale,Ue=He,ge=ke;At=[(gt[0]-It.x)/Ue,(gt[1]-It.y)/ge],ct&&O(gt,gt,ct),Ue/=Me[0]*w,ge/=Me[1]*w;var xe=T(Ue,ge);ft=2*0/xe,xt=2*Be.r/xe-ft}var Ee=Be.colorStops.slice();Ee.sort(function(et,Te){return et.offset-Te.offset});for(var Oe=Ee.length,Fe=[],$e=[],pt=0;pt<Oe;pt++){var Ot=Ee[pt],kt=G(Ot.color);$e.push(Ot.offset*xt+ft+" "+kt[0]),(pt===0||pt===Oe-1)&&Fe.push(kt)}if(Oe>=2){var Dt=Fe[0][0],Bt=Fe[1][0],ht=Fe[0][1]*de.opacity,it=Fe[1][1]*de.opacity;ee.type=nt,ee.method="none",ee.focus="100%",ee.angle=at,ee.color=Dt,ee.color2=Bt,ee.colors=$e.join(","),ee.opacity=it,ee.opacity2=ht}nt==="radial"&&(ee.focusposition=At.join(","))}else V(ee,Be,de.opacity)},$=function(ee,de){de.lineDash&&(ee.dashstyle=de.lineDash.join(" ")),de.stroke!=null&&!(de.stroke instanceof s)&&V(ee,de.stroke,de.opacity)},Y=function(ee,de,we,Be){var nt=de==="fill",at=ee.getElementsByTagName(de)[0];we[de]!=null&&we[de]!=="none"&&(nt||!nt&&we.lineWidth)?(ee[nt?"filled":"stroked"]="true",we[de]instanceof s&&U(ee,at),at||(at=o.createNode(de)),nt?L(at,we,Be):$(at,we),g(ee,at)):(ee[nt?"filled":"stroked"]="false",U(ee,at))},ne=[[],[],[]],se=function(ee,de){var we=f.M,Be=f.C,nt=f.L,at=f.A,At=f.Q,ft=[],xt,It,He,ke,ct,gt,Ze=ee.data,ot=ee.len();for(ke=0;ke<ot;){He=Ze[ke++],It="",xt=0;switch(He){case we:It=" m ",xt=1,ct=Ze[ke++],gt=Ze[ke++],ne[0][0]=ct,ne[0][1]=gt;break;case nt:It=" l ",xt=1,ct=Ze[ke++],gt=Ze[ke++],ne[0][0]=ct,ne[0][1]=gt;break;case At:case Be:It=" c ",xt=3;var Ke=Ze[ke++],Me=Ze[ke++],Ue=Ze[ke++],ge=Ze[ke++],xe,Ee;He===At?(xe=Ue,Ee=ge,Ue=(Ue+2*Ke)/3,ge=(ge+2*Me)/3,Ke=(ct+2*Ke)/3,Me=(gt+2*Me)/3):(xe=Ze[ke++],Ee=Ze[ke++]),ne[0][0]=Ke,ne[0][1]=Me,ne[1][0]=Ue,ne[1][1]=ge,ne[2][0]=xe,ne[2][1]=Ee,ct=xe,gt=Ee;break;case at:var Oe=0,Fe=0,$e=1,pt=1,Ot=0;de&&(Oe=de[4],Fe=de[5],$e=c(de[0]*de[0]+de[1]*de[1]),pt=c(de[2]*de[2]+de[3]*de[3]),Ot=Math.atan2(-de[1]/pt,de[0]/$e));var kt=Ze[ke++],Dt=Ze[ke++],Bt=Ze[ke++],ht=Ze[ke++],it=Ze[ke++]+Ot,et=Ze[ke++]+it+Ot;ke++;var Te=Ze[ke++],Ne=kt+u(it)*Bt,mt=Dt+v(it)*ht,Ke=kt+u(et)*Bt,Me=Dt+v(et)*ht,lt=Te?" wa ":" at ";Math.abs(Ne-Ke)<1e-4&&(Math.abs(et-it)>.01?Te&&(Ne+=270/w):Math.abs(mt-Dt)<1e-4?Te&&Ne<kt||!Te&&Ne>kt?Me-=270/w:Me+=270/w:Te&&mt<Dt||!Te&&mt>Dt?Ke+=270/w:Ke-=270/w),ft.push(lt,l(((kt-Bt)*$e+Oe)*w-p),x,l(((Dt-ht)*pt+Fe)*w-p),x,l(((kt+Bt)*$e+Oe)*w-p),x,l(((Dt+ht)*pt+Fe)*w-p),x,l((Ne*$e+Oe)*w-p),x,l((mt*pt+Fe)*w-p),x,l((Ke*$e+Oe)*w-p),x,l((Me*pt+Fe)*w-p)),ct=Ke,gt=Me;break;case f.R:var Ct=ne[0],bt=ne[1];Ct[0]=Ze[ke++],Ct[1]=Ze[ke++],bt[0]=Ct[0]+Ze[ke++],bt[1]=Ct[1]+Ze[ke++],de&&(O(Ct,Ct,de),O(bt,bt,de)),Ct[0]=l(Ct[0]*w-p),bt[0]=l(bt[0]*w-p),Ct[1]=l(Ct[1]*w-p),bt[1]=l(bt[1]*w-p),ft.push(" m ",Ct[0],x,Ct[1]," l ",bt[0],x,Ct[1]," l ",bt[0],x,bt[1]," l ",Ct[0],x,bt[1]);break;case f.Z:ft.push(" x ")}if(xt>0){ft.push(It);for(var tt=0;tt<xt;tt++){var St=ne[tt];de&&O(St,St,de),ft.push(l(St[0]*w-p),x,l(St[1]*w-p),tt<xt-1?x:"")}}}return ft.join("")};A.prototype.brushVML=function(ee){var de=this.style,we=this._vmlEl;we||(we=o.createNode("shape"),m(we),this._vmlEl=we),Y(we,"fill",de,this),Y(we,"stroke",de,this);var Be=this.transform,nt=Be!=null,at=we.getElementsByTagName("stroke")[0];if(at){var At=de.lineWidth;if(nt&&!de.strokeNoScale){var ft=Be[0]*Be[3]-Be[1]*Be[2];At*=c(a(ft))}at.weight=At+"px"}var xt=this.path||(this.path=new h);this.__dirtyPath&&(xt.beginPath(),xt.subPixelOptimize=!1,this.buildPath(xt,this.shape),xt.toStatic(),this.__dirtyPath=!1),we.path=se(xt,this.transform),we.style.zIndex=k(this.zlevel,this.z,this.z2),g(ee,we),de.text!=null?this.drawRectText(ee,this.getBoundingRect()):this.removeRectText(ee)},A.prototype.onRemove=function(ee){U(ee,this._vmlEl),this.removeRectText(ee)},A.prototype.onAdd=function(ee){g(ee,this._vmlEl),this.appendRectText(ee)};var _e=function(ee){return typeof ee=="object"&&ee.tagName&&ee.tagName.toUpperCase()==="IMG"};E.prototype.brushVML=function(ee){var de=this.style,we=de.image,Be,nt;if(_e(we)){var at=we.src;if(at===this._imageSrc)Be=this._imageWidth,nt=this._imageHeight;else{var At=we.runtimeStyle,ft=At.width,xt=At.height;At.width="auto",At.height="auto",Be=we.width,nt=we.height,At.width=ft,At.height=xt,this._imageSrc=at,this._imageWidth=Be,this._imageHeight=nt}we=at}else we===this._imageSrc&&(Be=this._imageWidth,nt=this._imageHeight);if(!we)return;var It=de.x||0,He=de.y||0,ke=de.width,ct=de.height,gt=de.sWidth,Ze=de.sHeight,ot=de.sx||0,Ke=de.sy||0,Me=gt&&Ze,Ue=this._vmlEl;Ue||(Ue=o.doc.createElement("div"),m(Ue),this._vmlEl=Ue);var ge=Ue.style,xe=!1,Ee,Oe=1,Fe=1;if(this.transform&&(Ee=this.transform,Oe=c(Ee[0]*Ee[0]+Ee[1]*Ee[1]),Fe=c(Ee[2]*Ee[2]+Ee[3]*Ee[3]),xe=Ee[1]||Ee[2]),xe){var $e=[It,He],pt=[It+ke,He],Ot=[It,He+ct],kt=[It+ke,He+ct];O($e,$e,Ee),O(pt,pt,Ee),O(Ot,Ot,Ee),O(kt,kt,Ee);var Dt=T($e[0],pt[0],Ot[0],kt[0]),Bt=T($e[1],pt[1],Ot[1],kt[1]),ht=[];ht.push("M11=",Ee[0]/Oe,x,"M12=",Ee[2]/Fe,x,"M21=",Ee[1]/Oe,x,"M22=",Ee[3]/Fe,x,"Dx=",l(It*Oe+Ee[4]),x,"Dy=",l(He*Fe+Ee[5])),ge.padding="0 "+l(Dt)+"px "+l(Bt)+"px 0",ge.filter=D+".Matrix("+ht.join("")+", SizingMethod=clip)"}else Ee&&(It=It*Oe+Ee[4],He=He*Fe+Ee[5]),ge.filter="",ge.left=l(It)+"px",ge.top=l(He)+"px";var it=this._imageEl,et=this._cropEl;it||(it=o.doc.createElement("div"),this._imageEl=it);var Te=it.style;if(Me){if(Be&&nt)Te.width=l(Oe*Be*ke/gt)+"px",Te.height=l(Fe*nt*ct/Ze)+"px";else{var Ne=new Image,mt=this;Ne.onload=function(){Ne.onload=null,Be=Ne.width,nt=Ne.height,Te.width=l(Oe*Be*ke/gt)+"px",Te.height=l(Fe*nt*ct/Ze)+"px",mt._imageWidth=Be,mt._imageHeight=nt,mt._imageSrc=we},Ne.src=we}et||(et=o.doc.createElement("div"),et.style.overflow="hidden",this._cropEl=et);var lt=et.style;lt.width=l((ke+ot*ke/gt)*Oe),lt.height=l((ct+Ke*ct/Ze)*Fe),lt.filter=D+".Matrix(Dx="+-ot*ke/gt*Oe+",Dy="+-Ke*ct/Ze*Fe+")",et.parentNode||Ue.appendChild(et),it.parentNode!==et&&et.appendChild(it)}else Te.width=l(Oe*ke)+"px",Te.height=l(Fe*ct)+"px",Ue.appendChild(it),et&&et.parentNode&&(Ue.removeChild(et),this._cropEl=null);var Ct="",bt=de.opacity;bt<1&&(Ct+=".Alpha(opacity="+l(bt*100)+") "),Ct+=D+".AlphaImageLoader(src="+we+", SizingMethod=scale)",Te.filter=Ct,Ue.style.zIndex=k(this.zlevel,this.z,this.z2),g(ee,Ue),de.text!=null&&this.drawRectText(ee,this.getBoundingRect())},E.prototype.onRemove=function(ee){U(ee,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ee)},E.prototype.onAdd=function(ee){g(ee,this._vmlEl),this.appendRectText(ee)};var ve="normal",Ce={},De=0,Qe=100,Se=document.createElement("div"),Ie=function(ee){var de=Ce[ee];if(!de){De>Qe&&(De=0,Ce={});var we=Se.style,Be;try{we.font=ee,Be=we.fontFamily.split(",")[0]}catch(nt){}de={style:we.fontStyle||ve,variant:we.fontVariant||ve,weight:we.fontWeight||ve,size:parseFloat(we.fontSize||12)|0,family:Be||"Microsoft YaHei"},Ce[ee]=de,De++}return de},Je;B.$override("measureText",function(ee,de){var we=o.doc;Je||(Je=we.createElement("div"),Je.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",o.doc.body.appendChild(Je));try{Je.style.font=de}catch(Be){}return Je.innerHTML="",Je.appendChild(we.createTextNode(ee)),{width:Je.offsetWidth}});for(var Et=new K,Le=function(ee,de,we,Be){var nt=this.style;this.__dirty&&R.normalizeTextStyle(nt,!0);var at=nt.text;if(at!=null&&(at+=""),!at)return;if(nt.rich){var At=B.parseRichText(at,nt);at=[];for(var ft=0;ft<At.lines.length;ft++){for(var xt=At.lines[ft].tokens,It=[],He=0;He<xt.length;He++)It.push(xt[He].text);at.push(It.join(""))}at=at.join(`
`)}var ke,ct,gt=nt.textAlign,Ze=nt.textVerticalAlign,ot=Ie(nt.font),Ke=ot.style+" "+ot.variant+" "+ot.weight+" "+ot.size+'px "'+ot.family+'"';we=we||B.getBoundingRect(at,Ke,gt,Ze,nt.textPadding,nt.textLineHeight);var Me=this.transform;if(Me&&!Be&&(Et.copy(de),Et.applyTransform(Me),de=Et),Be)ke=de.x,ct=de.y;else{var Ue=nt.textPosition;if(Ue instanceof Array)ke=de.x+I(Ue[0],de.width),ct=de.y+I(Ue[1],de.height),gt=gt||"left";else{var ge=this.calculateTextPosition?this.calculateTextPosition({},nt,de):B.calculateTextPosition({},nt,de);ke=ge.x,ct=ge.y,gt=gt||ge.textAlign,Ze=Ze||ge.textVerticalAlign}}ke=B.adjustTextX(ke,we.width,gt),ct=B.adjustTextY(ct,we.height,Ze),ct+=we.height/2;var xe=o.createNode,Ee=this._textVmlEl,Oe,Fe,$e;Ee?($e=Ee.firstChild,Oe=$e.nextSibling,Fe=Oe.nextSibling):(Ee=xe("line"),Oe=xe("path"),Fe=xe("textpath"),$e=xe("skew"),Fe.style["v-text-align"]="left",m(Ee),Oe.textpathok=!0,Fe.on=!0,Ee.from="0 0",Ee.to="1000 0.05",g(Ee,$e),g(Ee,Oe),g(Ee,Fe),this._textVmlEl=Ee);var pt=[ke,ct],Ot=Ee.style;Me&&Be?(O(pt,pt,Me),$e.on=!0,$e.matrix=Me[0].toFixed(3)+x+Me[2].toFixed(3)+x+Me[1].toFixed(3)+x+Me[3].toFixed(3)+",0,0",$e.offset=(l(pt[0])||0)+","+(l(pt[1])||0),$e.origin="0 0",Ot.left="0px",Ot.top="0px"):($e.on=!1,Ot.left=l(ke)+"px",Ot.top=l(ct)+"px"),Fe.string=C(at);try{Fe.style.font=Ke}catch(kt){}Y(Ee,"fill",{fill:nt.textFill,opacity:nt.opacity},this),Y(Ee,"stroke",{stroke:nt.textStroke,opacity:nt.opacity,lineDash:nt.lineDash||null},this),Ee.style.zIndex=k(this.zlevel,this.z,this.z2),g(ee,Ee)},je=function(ee){U(ee,this._textVmlEl),this._textVmlEl=null},st=function(ee){g(ee,this._textVmlEl)},he=[b,t,E,A,i],ie=0;ie<he.length;ie++){var oe=he[ie].prototype;oe.drawRectText=Le,oe.removeRectText=je,oe.appendRectText=st}i.prototype.brushVML=function(ee){var de=this.style;de.text!=null?this.drawRectText(ee,{x:de.x||0,y:de.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ee)},i.prototype.onRemove=function(ee){this.removeRectText(ee)},i.prototype.onAdd=function(ee){this.appendRectText(ee)}}},r6Bn:function(Xe,le,H){var Z=H("bYtY"),Q=H("ItGF"),O=H("4fz+"),K=H("BPZU");function M(b,t){return b.zlevel===t.zlevel?b.z===t.z?b.z2-t.z2:b.z-t.z:b.zlevel-t.zlevel}var B=function(){this._roots=[],this._displayList=[],this._displayListLen=0};B.prototype={constructor:B,traverse:function(b,t){for(var E=0;E<this._roots.length;E++)this._roots[E].traverse(b,t)},getDisplayList:function(b,t){return t=t||!1,b&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(b){this._displayListLen=0;for(var t=this._roots,E=this._displayList,i=0,A=t.length;i<A;i++)this._updateAndAddDisplayable(t[i],null,b);E.length=this._displayListLen,Q.canvasSupported&&K(E,M)},_updateAndAddDisplayable:function(b,t,E){if(b.ignore&&!E)return;b.beforeUpdate(),b.__dirty&&b.update(),b.afterUpdate();var i=b.clipPath;if(i){t?t=t.slice():t=[];for(var A=i,h=b;A;)A.parent=h,A.updateTransform(),t.push(A),h=A,A=A.clipPath}if(b.isGroup){for(var s=b._children,o=0;o<s.length;o++){var f=s[o];b.__dirty&&(f.__dirty=!0),this._updateAndAddDisplayable(f,t,E)}b.__dirty=!1}else b.__clipPaths=t,this._displayList[this._displayListLen++]=b},addRoot:function(b){if(b.__storage===this)return;b instanceof O&&b.addChildrenToStorage(this),this.addToStorage(b),this._roots.push(b)},delRoot:function(b){if(b==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(b instanceof Array){for(var t=0,i=b.length;t<i;t++)this.delRoot(b[t]);return}var A=Z.indexOf(this._roots,b);A>=0&&(this.delFromStorage(b),this._roots.splice(A,1),b instanceof O&&b.delChildrenFromStorage(this))},addToStorage:function(b){return b&&(b.__storage=this,b.dirty(!1)),this},delFromStorage:function(b){return b&&(b.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:M};var R=B;Xe.exports=R},rA99:function(Xe,le,H){var Z=H("y+Vt"),Q=H("QBsz"),O=H("Sj9i"),K=O.quadraticSubdivide,M=O.cubicSubdivide,B=O.quadraticAt,R=O.cubicAt,b=O.quadraticDerivativeAt,t=O.cubicDerivativeAt,E=[];function i(h,s,o){var f=h.cpx2,l=h.cpy2;return f===null||l===null?[(o?t:R)(h.x1,h.cpx1,h.cpx2,h.x2,s),(o?t:R)(h.y1,h.cpy1,h.cpy2,h.y2,s)]:[(o?b:B)(h.x1,h.cpx1,h.x2,s),(o?b:B)(h.y1,h.cpy1,h.y2,s)]}var A=Z.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(h,s){var o=s.x1,f=s.y1,l=s.x2,c=s.y2,a=s.cpx1,u=s.cpy1,v=s.cpx2,T=s.cpy2,x=s.percent;if(x===0)return;h.moveTo(o,f),v==null||T==null?(x<1&&(K(o,a,l,x,E),a=E[1],l=E[2],K(f,u,c,x,E),u=E[1],c=E[2]),h.quadraticCurveTo(a,u,l,c)):(x<1&&(M(o,a,v,l,x,E),a=E[1],v=E[2],l=E[3],M(f,u,T,c,x,E),u=E[1],T=E[2],c=E[3]),h.bezierCurveTo(a,u,v,T,l,c))},pointAt:function(h){return i(this.shape,h,!1)},tangentAt:function(h){var s=i(this.shape,h,!0);return Q.normalize(s,s)}});Xe.exports=A},"rAM+":function(Xe,le,H){"use strict";H.d(le,"a",function(){return Q});var Z=H("Qw5x");function Q(O,K){var M;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(M=Object(Z.a)(O))||K&&O&&typeof O.length=="number"){M&&(O=M);var B=0,R=function(){};return{s:R,n:function(){return B>=O.length?{done:!0}:{done:!1,value:O[B++]}},e:function(A){throw A},f:R}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,t=!1,E;return{s:function(){M=O[Symbol.iterator]()},n:function(){var A=M.next();return b=A.done,A},e:function(A){t=!0,E=A},f:function(){try{!b&&M.return!=null&&M.return()}finally{if(t)throw E}}}}},rUJ1:function(Xe,le){const H=/[&<>"']/,Z=/[&<>"']/g,Q=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,K={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},M=w=>K[w];function B(w,p){if(p){if(H.test(w))return w.replace(Z,M)}else if(Q.test(w))return w.replace(O,M);return w}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(w){return w.replace(R,(p,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const t=/(^|[^\[])\^/g;function E(w,p){w=w.source||w,p=p||"";const n={replace:(d,m)=>(m=m.source||m,m=m.replace(t,"$1"),w=w.replace(d,m),n),getRegex:()=>new RegExp(w,p)};return n}const i=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(w,p,n){if(w){let d;try{d=decodeURIComponent(b(n)).replace(i,"").toLowerCase()}catch(m){return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}p&&!A.test(n)&&(n=c(p,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(d){return null}return n}const s={},o=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(w,p){s[" "+w]||(o.test(w)?s[" "+w]=w+"/":s[" "+w]=T(w,"/",!0)),w=s[" "+w];const n=w.indexOf(":")===-1;return p.substring(0,2)==="//"?n?p:w.replace(f,"$1")+p:p.charAt(0)==="/"?n?p:w.replace(l,"$1")+p:w+p}const a={exec:function(){}};function u(w){let p=1,n,d;for(;p<arguments.length;p++){n=arguments[p];for(d in n)Object.prototype.hasOwnProperty.call(n,d)&&(w[d]=n[d])}return w}function v(w,p){const n=w.replace(/\|/g,(C,y,g)=>{let U=!1,k=y;for(;--k>=0&&g[k]==="\\";)U=!U;return U?"|":" |"}),d=n.split(/ \|/);let m=0;if(d.length>p)d.splice(p);else for(;d.length<p;)d.push("");for(;m<d.length;m++)d[m]=d[m].trim().replace(/\\\|/g,"|");return d}function T(w,p,n){const d=w.length;if(d===0)return"";let m=0;for(;m<d;){const C=w.charAt(d-m-1);if(C===p&&!n)m++;else if(C!==p&&n)m++;else break}return w.substr(0,d-m)}function x(w,p){if(w.indexOf(p[1])===-1)return-1;const n=w.length;let d=0,m=0;for(;m<n;m++)if(w[m]==="\\")m++;else if(w[m]===p[0])d++;else if(w[m]===p[1]&&(d--,d<0))return m;return-1}function D(w){w&&w.sanitize&&!w.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")}Xe.exports={escape:B,unescape:b,edit:E,cleanUrl:h,resolveUrl:c,noopTest:a,merge:u,splitCells:v,rtrim:T,findClosingBracket:x,checkSanitizeDeprecation:D}},rmlV:function(Xe,le,H){var Z=H("y+Vt"),Q=Z.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(O,K){var M=.5522848,B=K.cx,R=K.cy,b=K.rx,t=K.ry,E=b*M,i=t*M;O.moveTo(B-b,R),O.bezierCurveTo(B-b,R-i,B-E,R-t,B,R-t),O.bezierCurveTo(B+E,R-t,B+b,R-i,B+b,R),O.bezierCurveTo(B+b,R+i,B+E,R+t,B,R+t),O.bezierCurveTo(B-E,R+t,B-b,R+i,B-b,R),O.closePath()}});Xe.exports=Q},sR1s:function(Xe,le,H){"use strict";H.d(le,"b",function(){return K}),H.d(le,"a",function(){return M}),H.d(le,"c",function(){return B}),H.d(le,"d",function(){return R});var Z=H("U8pU"),Q="RC_TABLE_KEY";function O(b){return b==null?[]:Array.isArray(b)?b:[b]}function K(b,t){if(!t&&typeof t!="number")return b;for(var E=O(t),i=b,A=0;A<E.length;A+=1){if(!i)return null;var h=E[A];i=i[h]}return i}function M(b){var t=[],E={};return b.forEach(function(i){for(var A=i||{},h=A.key,s=A.dataIndex,o=h||O(s).join("-")||Q;E[o];)o="".concat(o,"_next");E[o]=!0,t.push(o)}),t}function B(){var b={};function t(h,s){s&&Object.keys(s).forEach(function(o){var f=s[o];f&&Object(Z.a)(f)==="object"?(h[o]=h[o]||{},t(h[o],f)):h[o]=f})}for(var E=arguments.length,i=new Array(E),A=0;A<E;A++)i[A]=arguments[A];return i.forEach(function(h){t(b,h)}),b}function R(b){return b!=null}},"sW+o":function(Xe,le,H){var Z=H("SrGk"),Q=H("bYtY"),O=H("SUKs"),K=H("Qe9p");function M(R,b){Z.call(this,R,b,["linearGradient","radialGradient"],"__gradient_in_use__")}Q.inherits(M,Z),M.prototype.addWithoutUpdate=function(R,b){if(b&&b.style){var t=this;Q.each(["fill","stroke"],function(E){if(b.style[E]&&(b.style[E].type==="linear"||b.style[E].type==="radial")){var i=b.style[E],A=t.getDefs(!0),h;i._dom?(h=i._dom,A.contains(i._dom)||t.addDom(h)):h=t.add(i),t.markUsed(b);var s=h.getAttribute("id");R.setAttribute(E,"url(#"+s+")")}})}},M.prototype.add=function(R){var b;if(R.type==="linear")b=this.createElement("linearGradient");else if(R.type==="radial")b=this.createElement("radialGradient");else return O("Illegal gradient type."),null;return R.id=R.id||this.nextId++,b.setAttribute("id","zr"+this._zrId+"-gradient-"+R.id),this.updateDom(R,b),this.addDom(b),b},M.prototype.update=function(R){var b=this;Z.prototype.update.call(this,R,function(){var t=R.type,E=R._dom.tagName;t==="linear"&&E==="linearGradient"||t==="radial"&&E==="radialGradient"?b.updateDom(R,R._dom):(b.removeDom(R),b.add(R))})},M.prototype.updateDom=function(R,b){if(R.type==="linear")b.setAttribute("x1",R.x),b.setAttribute("y1",R.y),b.setAttribute("x2",R.x2),b.setAttribute("y2",R.y2);else if(R.type==="radial")b.setAttribute("cx",R.x),b.setAttribute("cy",R.y),b.setAttribute("r",R.r);else{O("Illegal gradient type.");return}R.global?b.setAttribute("gradientUnits","userSpaceOnUse"):b.setAttribute("gradientUnits","objectBoundingBox"),b.innerHTML="";for(var t=R.colorStops,E=0,i=t.length;E<i;++E){var A=this.createElement("stop");A.setAttribute("offset",t[E].offset*100+"%");var h=t[E].color;if(h.indexOf("rgba">-1)){var s=K.parse(h)[3],o=K.toHex(h);A.setAttribute("stop-color","#"+o),A.setAttribute("stop-opacity",s)}else A.setAttribute("stop-color",t[E].color);b.appendChild(A)}R._dom=b},M.prototype.markUsed=function(R){if(R.style){var b=R.style.fill;b&&b._dom&&Z.prototype.markUsed.call(this,b._dom),b=R.style.stroke,b&&b._dom&&Z.prototype.markUsed.call(this,b._dom)}};var B=M;Xe.exports=B},sboe:function(Xe,le,H){"use strict";H.d(le,"a",function(){return O});var Z=H("q1tI"),Q=H.n(Z),O=Z.createContext(null)},t23M:function(Xe,le,H){"use strict";var Z=H("VTBJ"),Q=H("1OyB"),O=H("vuIU"),K=H("Ji7U"),M=H("LK+K"),B=H("q1tI"),R=H.n(B),b=H("m+aA"),t=H("Zm9Q"),E=H("Kwbf"),i=H("c+Xe"),A=H("bdgK"),h="rc-observer-key",s=function(o){Object(K.a)(l,o);var f=Object(M.a)(l);function l(){var c;return Object(Q.a)(this,l),c=f.apply(this,arguments),c.resizeObserver=null,c.childNode=null,c.currentElement=null,c.state={width:0,height:0,offsetHeight:0,offsetWidth:0},c.onResize=function(a){var u=c.props.onResize,v=a[0].target,T=v.getBoundingClientRect(),x=T.width,D=T.height,w=v.offsetWidth,p=v.offsetHeight,n=Math.floor(x),d=Math.floor(D);if(c.state.width!==n||c.state.height!==d||c.state.offsetWidth!==w||c.state.offsetHeight!==p){var m={width:n,height:d,offsetWidth:w,offsetHeight:p};c.setState(m),u&&Promise.resolve().then(function(){u(Object(Z.a)(Object(Z.a)({},m),{},{offsetWidth:w,offsetHeight:p}))})}},c.setChildNode=function(a){c.childNode=a},c}return Object(O.a)(l,[{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 u=Object(b.a)(this.childNode||this),v=u!==this.currentElement;v&&(this.destroyObserver(),this.currentElement=u),!this.resizeObserver&&u&&(this.resizeObserver=new A.default(this.onResize),this.resizeObserver.observe(u))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,u=Object(t.a)(a);if(u.length>1)Object(E.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(u.length===0)return Object(E.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var v=u[0];if(B.isValidElement(v)&&Object(i.c)(v)){var T=v.ref;u[0]=B.cloneElement(v,{ref:Object(i.a)(T,this.setChildNode)})}return u.length===1?u[0]:u.map(function(x,D){return!B.isValidElement(x)||"key"in x&&x.key!==null?x:B.cloneElement(x,{key:"".concat(h,"-").concat(D)})})}}]),l}(B.Component);s.displayName="ResizeObserver",le.a=s},t9D7:function(Xe,le,H){"use strict";H.d(le,"b",function(){return R}),H.d(le,"g",function(){return t}),H.d(le,"d",function(){return E}),H.d(le,"e",function(){return i}),H.d(le,"a",function(){return A}),H.d(le,"f",function(){return o}),H.d(le,"c",function(){return f});var Z=H("Vhoy"),Q=H("MI8n"),O=H("pmY6"),K=H("Cg/j"),M=H("ic2d"),B=H("nEHx");const R=Object(K.c)("themeService");var b;(function(l){function c(a){return a&&typeof a=="object"&&typeof a.id=="string"}l.isThemeColor=c})(b||(b={}));function t(l){return{id:l}}var E;(function(l){function c(D){return D&&typeof D=="object"&&typeof D.id=="string"&&(typeof D.color=="undefined"||b.isThemeColor(D.color))}l.isThemeIcon=c;const a=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function u(D){const w=a.exec(D);if(!w)return;let[,p]=w;return{id:p}}l.fromString=u;function v(D,w){let p=D.id;const n=p.lastIndexOf("~");return n!==-1&&(p=p.substring(0,n)),w&&(p=`${p}~${w}`),{id:p}}l.modify=v;function T(D,w){var p,n;return D.id===w.id&&((p=D.color)===null||p===void 0?void 0:p.id)===((n=w.color)===null||n===void 0?void 0:n.id)}l.isEqual=T;function x(D,w){return{id:D.id,color:w?t(w):void 0}}l.asThemeIcon=x,l.asClassNameArray=Z.a.asClassNameArray,l.asClassName=Z.a.asClassName,l.asCSSSelector=Z.a.asCSSSelector})(E||(E={}));function i(l){switch(l){case B.a.DARK:return"vs-dark";case B.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const A={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Q.b}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),Object(O.i)(()=>{const c=this.themingParticipants.indexOf(l);this.themingParticipants.splice(c,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new h;M.a.add(A.ThemingContribution,s);function o(l){return s.onColorThemeChange(l)}class f extends O.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(c=>this.onThemeChange(c)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},u3os:function(Xe,le,H){"use strict";Object.defineProperty(le,"__esModule",{value:!0}),le.ver=le.clear=le.bind=void 0;var Z=H("P4Qj"),Q=function(B,R){var b=(0,Z.getSensor)(B);return b.bind(R),function(){b.unbind(R)}};le.bind=Q;var O=function(B){var R=(0,Z.getSensor)(B);(0,Z.removeSensor)(R)};le.clear=O;var K="1.0.1";le.ver=K},ulZh:function(Xe,le,H){typeof window!="undefined"&&function(Q,O){Xe.exports=O()}(this,function(){return function(Z){var Q={};function O(K){if(Q[K])return Q[K].exports;var M=Q[K]={i:K,l:!1,exports:{}};return Z[K].call(M.exports,M,M.exports,O),M.l=!0,M.exports}return O.m=Z,O.c=Q,O.d=function(K,M,B){O.o(K,M)||Object.defineProperty(K,M,{enumerable:!0,get:B})},O.r=function(K){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})},O.t=function(K,M){if(M&1&&(K=O(K)),M&8)return K;if(M&4&&typeof K=="object"&&K&&K.__esModule)return K;var B=Object.create(null);if(O.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:K}),M&2&&typeof K!="string")for(var R in K)O.d(B,R,function(b){return K[b]}.bind(null,R));return B},O.n=function(K){var M=K&&K.__esModule?function(){return K.default}:function(){return K};return O.d(M,"a",M),M},O.o=function(K,M){return Object.prototype.hasOwnProperty.call(K,M)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,Q,O){"use strict";var K=Object.prototype.hasOwnProperty,M="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(M=!1));function R(i,A,h){this.fn=i,this.context=A,this.once=h||!1}function b(i,A,h,s,o){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new R(h,s||i,o),l=M?M+A:A;return i._events[l]?i._events[l].fn?i._events[l]=[i._events[l],f]:i._events[l].push(f):(i._events[l]=f,i._eventsCount++),i}function t(i,A){--i._eventsCount===0?i._events=new B:delete i._events[A]}function E(){this._events=new B,this._eventsCount=0}E.prototype.eventNames=function(){var A=[],h,s;if(this._eventsCount===0)return A;for(s in h=this._events)K.call(h,s)&&A.push(M?s.slice(1):s);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(h)):A},E.prototype.listeners=function(A){var h=M?M+A:A,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var o=0,f=s.length,l=new Array(f);o<f;o++)l[o]=s[o].fn;return l},E.prototype.listenerCount=function(A){var h=M?M+A:A,s=this._events[h];return s?s.fn?1:s.length:0},E.prototype.emit=function(A,h,s,o,f,l){var c=M?M+A:A;if(!this._events[c])return!1;var a=this._events[c],u=arguments.length,v,T;if(a.fn){a.once&&this.removeListener(A,a.fn,void 0,!0);switch(u){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,h),!0;case 3:return a.fn.call(a.context,h,s),!0;case 4:return a.fn.call(a.context,h,s,o),!0;case 5:return a.fn.call(a.context,h,s,o,f),!0;case 6:return a.fn.call(a.context,h,s,o,f,l),!0}for(T=1,v=new Array(u-1);T<u;T++)v[T-1]=arguments[T];a.fn.apply(a.context,v)}else{var x=a.length,D;for(T=0;T<x;T++){a[T].once&&this.removeListener(A,a[T].fn,void 0,!0);switch(u){case 1:a[T].fn.call(a[T].context);break;case 2:a[T].fn.call(a[T].context,h);break;case 3:a[T].fn.call(a[T].context,h,s);break;case 4:a[T].fn.call(a[T].context,h,s,o);break;default:if(!v)for(D=1,v=new Array(u-1);D<u;D++)v[D-1]=arguments[D];a[T].fn.apply(a[T].context,v)}}}return!0},E.prototype.on=function(A,h,s){return b(this,A,h,s,!1)},E.prototype.once=function(A,h,s){return b(this,A,h,s,!0)},E.prototype.removeListener=function(A,h,s,o){var f=M?M+A:A;if(!this._events[f])return this;if(!h)return t(this,f),this;var l=this._events[f];if(l.fn)l.fn===h&&(!o||l.once)&&(!s||l.context===s)&&t(this,f);else{for(var c=0,a=[],u=l.length;c<u;c++)(l[c].fn!==h||o&&!l[c].once||s&&l[c].context!==s)&&a.push(l[c]);a.length?this._events[f]=a.length===1?a[0]:a:t(this,f)}return this},E.prototype.removeAllListeners=function(A){var h;return A?(h=M?M+A:A,this._events[h]&&t(this,h)):(this._events=new B,this._eventsCount=0),this},E.prototype.off=E.prototype.removeListener,E.prototype.addListener=E.prototype.on,E.prefixed=M,E.EventEmitter=E,Z.exports=E},"./node_modules/url-toolkit/src/url-toolkit.js":function(Z,Q,O){(function(K){var M=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,B=/^([^\/?#]*)([^]*)$/,R=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(E,i,A){if(A=A||{},E=E.trim(),i=i.trim(),!i){if(!A.alwaysNormalize)return E;var h=t.parseURL(E);if(!h)throw new Error("Error trying to parse base URL.");return h.path=t.normalizePath(h.path),t.buildURLFromParts(h)}var s=t.parseURL(i);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return A.alwaysNormalize?(s.path=t.normalizePath(s.path),t.buildURLFromParts(s)):i;var o=t.parseURL(E);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var f=B.exec(o.path);o.netLoc=f[1],o.path=f[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,s.path[0]!=="/"))if(!s.path)l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));else{var c=o.path,a=c.substring(0,c.lastIndexOf("/")+1)+s.path;l.path=t.normalizePath(a)}return l.path===null&&(l.path=A.alwaysNormalize?t.normalizePath(s.path):s.path),t.buildURLFromParts(l)},parseURL:function(E){var i=M.exec(E);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(E){for(E=E.split("").reverse().join("").replace(R,"");E.length!==(E=E.replace(b,"")).length;);return E.split("").reverse().join("")},buildURLFromParts:function(E){return E.scheme+E.netLoc+E.path+E.params+E.query+E.fragment}};Z.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(Z,Q,O){function K(A){var h={};function s(f){if(h[f])return h[f].exports;var l=h[f]={i:f,l:!1,exports:{}};return A[f].call(l.exports,l,l.exports,s),l.l=!0,l.exports}s.m=A,s.c=h,s.i=function(f){return f},s.d=function(f,l,c){s.o(f,l)||Object.defineProperty(f,l,{configurable:!1,enumerable:!0,get:c})},s.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},s.n=function(f){var l=f&&f.__esModule?function(){return f.default}:function(){return f};return s.d(l,"a",l),l},s.o=function(f,l){return Object.prototype.hasOwnProperty.call(f,l)},s.p="/",s.oe=function(f){throw console.error(f),f};var o=s(s.s=ENTRY_MODULE);return o.default||o}var M="[\\.|\\-|\\+|\\w|/|@]+",B="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+M+").*?\\)";function R(A){return(A+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(A){return!isNaN(1*A)}function t(A,h,s){var o={};o[s]=[];var f=h.toString(),l=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return o;for(var c=l[1],a=new RegExp("(\\\\n|\\W)"+R(c)+B,"g"),u;u=a.exec(f);){if(u[3]==="dll-reference")continue;o[s].push(u[3])}for(a=new RegExp("\\("+R(c)+'\\("(dll-reference\\s('+M+'))"\\)\\)'+B,"g");u=a.exec(f);)A[u[2]]||(o[s].push(u[1]),A[u[2]]=O(u[1]).m),o[u[2]]=o[u[2]]||[],o[u[2]].push(u[4]);for(var v=Object.keys(o),T=0;T<v.length;T++)for(var x=0;x<o[v[T]].length;x++)b(o[v[T]][x])&&(o[v[T]][x]=1*o[v[T]][x]);return o}function E(A){var h=Object.keys(A);return h.reduce(function(s,o){return s||A[o].length>0},!1)}function i(A,h){for(var s={main:[h]},o={main:[]},f={main:{}};E(s);)for(var l=Object.keys(s),c=0;c<l.length;c++){var a=l[c],u=s[a],v=u.pop();if(f[a]=f[a]||{},f[a][v]||!A[a][v])continue;f[a][v]=!0,o[a]=o[a]||[],o[a].push(v);for(var T=t(A,A[a][v],a),x=Object.keys(T),D=0;D<x.length;D++)s[x[D]]=s[x[D]]||[],s[x[D]]=s[x[D]].concat(T[x[D]])}return o}Z.exports=function(A,h){h=h||{};var s={main:O.m},o=h.all?{main:Object.keys(s.main)}:i(s,A),f="";Object.keys(o).filter(function(v){return v!=="main"}).forEach(function(v){for(var T=0;o[v][T];)T++;o[v].push(T),s[v][T]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+v+" = ("+K.toString().replace("ENTRY_MODULE",JSON.stringify(T))+")({"+o[v].map(function(x){return""+JSON.stringify(x)+": "+s[v][x].toString()}).join(",")+`});
`}),f=f+"new (("+K.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+o.main.map(function(v){return""+JSON.stringify(v)+": "+s.main[v].toString()}).join(",")+"}))(self);";var l=new window.Blob([f],{type:"text/javascript"});if(h.bare)return l;var c=window.URL||window.webkitURL||window.mozURL||window.msURL,a=c.createObjectURL(l),u=new window.Worker(a);return u.objectURL=a,u}},"./src/config.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"hlsDefaultConfig",function(){return D}),O.d(Q,"mergeConfig",function(){return p}),O.d(Q,"enableStreamingMode",function(){return n});var K=O("./src/controller/abr-controller.ts"),M=O("./src/controller/audio-stream-controller.ts"),B=O("./src/controller/audio-track-controller.ts"),R=O("./src/controller/subtitle-stream-controller.ts"),b=O("./src/controller/subtitle-track-controller.ts"),t=O("./src/controller/buffer-controller.ts"),E=O("./src/controller/timeline-controller.ts"),i=O("./src/controller/cap-level-controller.ts"),A=O("./src/controller/fps-controller.ts"),h=O("./src/controller/eme-controller.ts"),s=O("./src/controller/cmcd-controller.ts"),o=O("./src/utils/xhr-loader.ts"),f=O("./src/utils/fetch-loader.ts"),l=O("./src/utils/cues.ts"),c=O("./src/utils/mediakeys-helper.ts"),a=O("./src/utils/logger.ts");function u(){return u=Object.assign||function(d){for(var m=1;m<arguments.length;m++){var C=arguments[m];for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(d[y]=C[y])}return d},u.apply(this,arguments)}function v(d,m){var C=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);m&&(y=y.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),C.push.apply(C,y)}return C}function T(d){for(var m=1;m<arguments.length;m++){var C=arguments[m]!=null?arguments[m]:{};m%2?v(Object(C),!0).forEach(function(y){x(d,y,C[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(C)):v(Object(C)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(C,y))})}return d}function x(d,m,C){return m in d?Object.defineProperty(d,m,{value:C,enumerable:!0,configurable:!0,writable:!0}):d[m]=C,d}var D=T(T({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:K.default,bufferController:t.default,capLevelController:i.default,fpsController:A.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:c.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},w()),{},{subtitleStreamController:R.SubtitleStreamController,subtitleTrackController:b.default,timelineController:E.TimelineController,audioStreamController:M.default,audioTrackController:B.default,emeController:h.default,cmcdController:s.default});function w(){return{cueHandler:l.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 p(d,m){if((m.liveSyncDurationCount||m.liveMaxLatencyDurationCount)&&(m.liveSyncDuration||m.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(m.liveMaxLatencyDurationCount!==void 0&&(m.liveSyncDurationCount===void 0||m.liveMaxLatencyDurationCount<=m.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(m.liveMaxLatencyDuration!==void 0&&(m.liveSyncDuration===void 0||m.liveMaxLatencyDuration<=m.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},d,m)}function n(d){var m=d.loader;if(m!==f.default&&m!==o.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),d.progressive=!1;else{var C=Object(f.fetchSupported)();C&&(d.loader=f.default,d.progressive=!0,d.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/polyfills/number.ts"),M=O("./src/utils/ewma-bandwidth-estimator.ts"),B=O("./src/events.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/errors.ts"),t=O("./src/types/loader.ts"),E=O("./src/utils/logger.ts");function i(s,o){for(var f=0;f<o.length;f++){var l=o[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function A(s,o,f){return o&&i(s.prototype,o),f&&i(s,f),s}var h=function(){function s(f){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=f;var l=f.config;this.bwEstimator=new M.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var o=s.prototype;return o.registerListeners=function(){var l=this.hls;l.on(B.Events.FRAG_LOADING,this.onFragLoading,this),l.on(B.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(B.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(B.Events.FRAG_LOADING,this.onFragLoading,this),l.off(B.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(B.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(l,c){var a=c.frag;if(a.type===t.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=a,this.partCurrent=(u=c.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(l,c){var a=this.hls.config;c.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var l=this.fragCurrent,c=this.partCurrent,a=this.hls,u=a.autoLevelEnabled,v=a.config,T=a.media;if(!l||!T)return;var x=c?c.stats:l.stats,D=c?c.duration:l.duration;if(x.aborted){E.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||T.paused||!T.playbackRate||!T.readyState)return;var w=performance.now()-x.loading.start,p=Math.abs(T.playbackRate);if(w<=500*D/p)return;var n=a.levels,d=a.minAutoLevel,m=n[l.level],C=x.total||Math.max(x.loaded,Math.round(D*m.maxBitrate/8)),y=Math.max(1,x.bwEstimate?x.bwEstimate/8:x.loaded*1e3/w),g=(C-x.loaded)/y,U=T.currentTime,k=(R.BufferHelper.bufferInfo(T,U,v.maxBufferHole).end-U)/p;if(k>=2*D/p||g<=k)return;var I=Number.POSITIVE_INFINITY,V;for(V=l.level-1;V>d;V--){var G=n[V].maxBitrate;if(I=D*G/(8*.8*y),I<k)break}if(I>=g)return;var L=this.bwEstimator.getEstimate();E.logger.warn("Fragment "+l.sn+(c?" part "+c.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+V+`
Current BW estimate: `+(Object(K.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+g.toFixed(3)+` s
Estimated load time for the next fragment: `+I.toFixed(3)+` s
Time to underbuffer: `+k.toFixed(3)+" s"),a.nextLoadLevel=V,this.bwEstimator.sample(w,x.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),a.trigger(B.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:c,stats:x})},o.onFragLoaded=function(l,c){var a=c.frag,u=c.part;if(a.type===t.PlaylistLevelType.MAIN&&Object(K.isFiniteNumber)(a.sn)){var v=u?u.stats:a.stats,T=u?u.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[a.level],D=(x.loaded?x.loaded.bytes:0)+v.loaded,w=(x.loaded?x.loaded.duration:0)+T;x.loaded={bytes:D,duration:w},x.realBitrate=Math.round(8*D/w)}if(a.bitrateTest){var p={stats:v,frag:a,part:u,id:a.type};this.onFragBuffered(B.Events.FRAG_BUFFERED,p),a.bitrateTest=!1}}},o.onFragBuffered=function(l,c){var a=c.frag,u=c.part,v=u?u.stats:a.stats;if(v.aborted)return;if(a.type!==t.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var T=v.parsing.end-v.loading.start;this.bwEstimator.sample(T,v.loaded),v.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=T/1e3:this.bitrateTestDelay=0},o.onError=function(l,c){switch(c.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var l=this.fragCurrent,c=this.partCurrent,a=this.hls,u=a.maxAutoLevel,v=a.config,T=a.minAutoLevel,x=a.media,D=c?c.duration:l?l.duration:0,w=x?x.currentTime:0,p=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():v.abrEwmaDefaultEstimate,d=(R.BufferHelper.bufferInfo(x,w,v.maxBufferHole).end-w)/p,m=this.findBestLevel(n,T,u,d,v.abrBandWidthFactor,v.abrBandWidthUpFactor);if(m>=0)return m;E.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=D?Math.min(D,v.maxStarvationDelay):v.maxStarvationDelay,y=v.abrBandWidthFactor,g=v.abrBandWidthUpFactor;if(!d){var U=this.bitrateTestDelay;if(U){var k=D?Math.min(D,v.maxLoadingDelay):v.maxLoadingDelay;C=k-U,E.logger.trace("bitrate test took "+Math.round(1e3*U)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),y=g=1}}return m=this.findBestLevel(n,T,u,d+C,y,g),Math.max(m,0)},o.findBestLevel=function(l,c,a,u,v,T){for(var x,D=this.fragCurrent,w=this.partCurrent,p=this.lastLoadedFragLevel,n=this.hls.levels,d=n[p],m=!!(d!=null&&(x=d.details)!==null&&x!==void 0&&x.live),C=d==null?void 0:d.codecSet,y=w?w.duration:D?D.duration:0,g=a;g>=c;g--){var U=n[g];if(!U||C&&U.codecSet!==C)continue;var k=U.details,I=(w?k==null?void 0:k.partTarget:k==null?void 0:k.averagetargetduration)||y,V=void 0;g<=p?V=v*l:V=T*l;var G=n[g].maxBitrate,L=G*I/V;if(E.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(V)+"/"+G+"/"+I+"/"+u+"/"+L),V>G&&(!L||m&&!this.bitrateTestDelay||L<u))return g}return-1},A(s,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,c=this.bwEstimator;if(l!==-1&&(!c||!c.canEstimate()))return l;var a=this.getNextABRAutoLevel();return l!==-1&&(a=Math.min(l,a)),a},set:function(l){this._nextAutoLevel=l}}]),s}();Q.default=h},"./src/controller/audio-stream-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/polyfills/number.ts"),M=O("./src/controller/base-stream-controller.ts"),B=O("./src/events.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/controller/fragment-tracker.ts"),t=O("./src/types/level.ts"),E=O("./src/types/loader.ts"),i=O("./src/loader/fragment.ts"),A=O("./src/demux/chunk-cache.ts"),h=O("./src/demux/transmuxer-interface.ts"),s=O("./src/types/transmuxer.ts"),o=O("./src/controller/fragment-finders.ts"),f=O("./src/utils/discontinuities.ts"),l=O("./src/errors.ts"),c=O("./src/utils/logger.ts");function a(){return a=Object.assign||function(D){for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(D[n]=p[n])}return D},a.apply(this,arguments)}function u(D,w){D.prototype=Object.create(w.prototype),D.prototype.constructor=D,v(D,w)}function v(D,w){return v=Object.setPrototypeOf||function(n,d){return n.__proto__=d,n},v(D,w)}var T=100,x=function(D){u(w,D);function w(n,d){var m;return m=D.call(this,n,d,"[audio-stream-controller]")||this,m.videoBuffer=null,m.videoTrackCC=-1,m.waitingVideoCC=-1,m.audioSwitch=!1,m.trackId=-1,m.waitingData=null,m.mainDetails=null,m.bufferFlushed=!1,m._registerListeners(),m}var p=w.prototype;return p.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},p._registerListeners=function(){var d=this.hls;d.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),d.on(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(B.Events.ERROR,this.onError,this),d.on(B.Events.BUFFER_RESET,this.onBufferReset,this),d.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p._unregisterListeners=function(){var d=this.hls;d.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),d.off(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(B.Events.ERROR,this.onError,this),d.off(B.Events.BUFFER_RESET,this.onBufferReset,this),d.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p.onInitPtsFound=function(d,m){var C=m.frag,y=m.id,g=m.initPTS;if(y==="main"){var U=C.cc;this.initPTS[C.cc]=g,this.log("InitPTS for cc: "+U+" found from main: "+g),this.videoTrackCC=U,this.state===M.State.WAITING_INIT_PTS&&this.tick()}},p.startLoad=function(d){if(!this.levels){this.startPosition=d,this.state=M.State.STOPPED;return}var m=this.lastCurrentTime;this.stopLoad(),this.setInterval(T),this.fragLoadError=0,m>0&&d===-1?(this.log("Override startPosition with lastCurrentTime @"+m.toFixed(3)),this.state=M.State.IDLE):(this.loadedmetadata=!1,this.state=M.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()},p.doTick=function(){switch(this.state){case M.State.IDLE:this.doTickIdle();break;case M.State.WAITING_TRACK:{var d,m=this.levels,C=this.trackId,y=m==null||((d=m[C])===null||d===void 0)?void 0:d.details;if(y){if(this.waitForCdnTuneIn(y))break;this.state=M.State.WAITING_INIT_PTS}break}case M.State.FRAG_LOADING_WAITING_RETRY:{var g,U=performance.now(),k=this.retryDate;(!k||U>=k||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=M.State.IDLE);break}case M.State.WAITING_INIT_PTS:{var I=this.waitingData;if(I){var V=I.frag,G=I.part,L=I.cache,$=I.complete;if(this.initPTS[V.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=M.State.FRAG_LOADING;var Y=L.flush(),ne={frag:V,part:G,payload:Y,networkDetails:null};this._handleFragmentLoadProgress(ne),$&&D.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)c.logger.log("Waiting fragment cc ("+V.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),_e=R.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),ve=Object(o.fragmentWithinToleranceTest)(_e.end,this.config.maxFragLookUpTolerance,V);ve<0&&(c.logger.log("Waiting fragment cc ("+V.cc+") @ "+V.start+" cancelled because another fragment at "+_e.end+" is needed"),this.clearWaitingFragment())}}else this.state=M.State.IDLE}}this.onTickEnd()},p.clearWaitingFragment=function(){var d=this.waitingData;d&&(this.fragmentTracker.removeFragment(d.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=M.State.IDLE)},p.onTickEnd=function(){var d=this.media;if(!d||!d.readyState)return;var m=this.mediaBuffer?this.mediaBuffer:d,C=m.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=d.currentTime},p.doTickIdle=function(){var d,m,C=this.hls,y=this.levels,g=this.media,U=this.trackId,k=C.config;if(!y||!y[U])return;if(!g&&(this.startFragRequested||!k.startFragPrefetch))return;var I=y[U],V=I.details;if(!V||V.live&&this.levelLastLoaded!==U||this.waitForCdnTuneIn(V)){this.state=M.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,E.PlaylistLevelType.AUDIO));var G=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,E.PlaylistLevelType.AUDIO);if(G===null)return;var L=G.len,$=this.getMaxBufferLength(),Y=this.audioSwitch;if(L>=$&&!Y)return;if(!Y&&this._streamEnded(G,V)){C.trigger(B.Events.BUFFER_EOS,{type:"audio"}),this.state=M.State.ENDED;return}var ne=V.fragments,se=ne[0].start,_e=G.end;if(Y){var ve=this.getLoadPosition();_e=ve,V.PTSKnown&&ve<se&&((G.end>se||G.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=se+.05))}var Ce=this.getNextFragment(_e,V);if(!Ce){this.bufferFlushed=!0;return}((d=Ce.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((m=Ce.decryptdata)!==null&&m!==void 0&&m.key)?this.loadKey(Ce,V):this.loadFragment(Ce,V,_e)},p.getMaxBufferLength=function(){var d=D.prototype.getMaxBufferLength.call(this),m=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,E.PlaylistLevelType.MAIN);return m===null?d:Math.max(d,m.len)},p.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},p.onAudioTracksUpdated=function(d,m){var C=m.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(y){return new t.Level(y)})},p.onAudioTrackSwitching=function(d,m){var C=!!m.url;this.trackId=m.id;var y=this.fragCurrent;y!=null&&y.loader&&y.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(T):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=M.State.IDLE):this.state=M.State.STOPPED,this.tick()},p.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},p.onLevelLoaded=function(d,m){this.mainDetails=m.details},p.onAudioTrackLoaded=function(d,m){var C,y=this.levels,g=m.details,U=m.id;if(!y){this.warn("Audio tracks were reset while loading level "+U);return}this.log("Track "+U+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var k=y[U],I=0;if(g.live||(C=k.details)!==null&&C!==void 0&&C.live){var V=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!V)return;!k.details&&g.hasProgramDateTime&&V.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(g,V),I=g.fragments[0].start):I=this.alignPlaylists(g,k.details)}k.details=g,this.levelLastLoaded=U,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(k.details,I),this.state===M.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=M.State.IDLE),this.tick()},p._handleFragmentLoadProgress=function(d){var m,C=d.frag,y=d.part,g=d.payload,U=this.config,k=this.trackId,I=this.levels;if(!I){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 V=I[k];console.assert(V,"Audio track is defined on fragment load progress");var G=V.details;console.assert(G,"Audio track details are defined on fragment load progress");var L=U.defaultAudioCodec||V.audioCodec||"mp4a.40.2",$=this.transmuxer;$||($=this.transmuxer=new h.default(this.hls,E.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Y=this.initPTS[C.cc],ne=(m=C.initSegment)===null||m===void 0?void 0:m.data;if(Y!==void 0){var se=!1,_e=y?y.index:-1,ve=_e!==-1,Ce=new s.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,g.byteLength,_e,ve);$.push(g,ne,L,"",C,y,G.totalduration,se,Ce,Y)}else{c.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+G.startSN+" ,"+G.endSN+"],track "+k);var De=this.waitingData=this.waitingData||{frag:C,part:y,cache:new A.default,complete:!1},Qe=De.cache;Qe.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=M.State.WAITING_INIT_PTS}},p._handleFragmentLoadComplete=function(d){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,d)},p.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},p.onBufferCreated=function(d,m){var C=m.tracks.audio;C&&(this.mediaBuffer=C.buffer),m.tracks.video&&(this.videoBuffer=m.tracks.video.buffer)},p.onFragBuffered=function(d,m){var C=m.frag,y=m.part;if(C.type!==E.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(y?" p: "+y.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,y)},p.onError=function(d,m){switch(m.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.AUDIO,m);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==M.State.ERROR&&this.state!==M.State.STOPPED&&(this.state=m.fatal?M.State.ERROR:M.State.IDLE,this.warn(m.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(m.parent==="audio"&&(this.state===M.State.PARSING||this.state===M.State.PARSED)){var C=!0,y=this.getFwdBufferInfo(this.mediaBuffer,E.PlaylistLevelType.AUDIO);y&&y.len>.5&&(C=!this.reduceMaxBufferLength(y.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},p.onBufferFlushed=function(d,m){var C=m.type;C===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},p._handleTransmuxComplete=function(d){var m,C="audio",y=this.hls,g=d.remuxResult,U=d.chunkMeta,k=this.getCurrentContext(U);if(!k){this.warn("The loading context changed while buffering fragment "+U.sn+" of level "+U.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(U.level);return}var I=k.frag,V=k.part,G=g.audio,L=g.text,$=g.id3,Y=g.initSegment;if(this.fragContextChanged(I))return;if(this.state=M.State.PARSING,this.audioSwitch&&G&&this.completeAudioSwitch(),Y!=null&&Y.tracks&&(this._bufferInitSegment(Y.tracks,I,U),y.trigger(B.Events.FRAG_PARSING_INIT_SEGMENT,{frag:I,id:C,tracks:Y.tracks})),G){var ne=G.startPTS,se=G.endPTS,_e=G.startDTS,ve=G.endDTS;V&&(V.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:ne,endPTS:se,startDTS:_e,endDTS:ve}),I.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,ne,se,_e,ve),this.bufferFragmentData(G,I,V,U)}if($!=null&&(m=$.samples)!==null&&m!==void 0&&m.length){var Ce=a({frag:I,id:C},$);y.trigger(B.Events.FRAG_PARSING_METADATA,Ce)}if(L){var De=a({frag:I,id:C},L);y.trigger(B.Events.FRAG_PARSING_USERDATA,De)}},p._bufferInitSegment=function(d,m,C){if(this.state!==M.State.PARSING)return;d.video&&delete d.video;var y=d.audio;if(!y)return;y.levelCodec=y.codec,y.id="audio",this.log("Init audio buffer, container:"+y.container+", codecs[parsed]=["+y.codec+"]"),this.hls.trigger(B.Events.BUFFER_CODECS,d);var g=y.initSegment;if(g!=null&&g.byteLength){var U={type:"audio",frag:m,part:null,chunkMeta:C,parent:m.type,data:g};this.hls.trigger(B.Events.BUFFER_APPENDING,U)}this.tick()},p.loadFragment=function(d,m,C){var y=this.fragmentTracker.getState(d);this.fragCurrent=d,(this.audioSwitch||y===b.FragmentState.NOT_LOADED||y===b.FragmentState.PARTIAL)&&(d.sn==="initSegment"?this._loadInitSegment(d):m.live&&!Object(K.isFiniteNumber)(this.initPTS[d.cc])?(this.log("Waiting for video PTS in continuity counter "+d.cc+" of live stream before loading audio fragment "+d.sn+" of level "+this.trackId),this.state=M.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,d,m,C)))},p.completeAudioSwitch=function(){var d=this.hls,m=this.media,C=this.trackId;m&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,d.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:C})},w}(M.default);Q.default=x},"./src/controller/audio-track-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts"),M=O("./src/errors.ts"),B=O("./src/controller/base-playlist-controller.ts"),R=O("./src/types/loader.ts");function b(h,s){for(var o=0;o<s.length;o++){var f=s[o];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function t(h,s,o){return s&&b(h.prototype,s),o&&b(h,o),h}function E(h,s){h.prototype=Object.create(s.prototype),h.prototype.constructor=h,i(h,s)}function i(h,s){return i=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},i(h,s)}var A=function(h){E(s,h);function s(f){var l;return l=h.call(this,f,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var o=s.prototype;return o.registerListeners=function(){var l=this.hls;l.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(K.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(K.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(K.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(K.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(K.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,h.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(l,c){this.tracks=c.audioTracks||[]},o.onAudioTrackLoaded=function(l,c){var a=c.id,u=c.details,v=this.tracksInGroup[a];if(!v){this.warn("Invalid audio track id "+a);return}var T=v.details;v.details=c.details,this.log("audioTrack "+a+" loaded ["+u.startSN+"-"+u.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,c,T))},o.onLevelLoading=function(l,c){this.switchLevel(c.level)},o.onLevelSwitching=function(l,c){this.switchLevel(c.level)},o.switchLevel=function(l){var c=this.hls.levels[l];if(!(c!=null&&c.audioGroupIds))return;var a=c.audioGroupIds[c.urlId];if(this.groupId!==a){this.groupId=a;var u=this.tracks.filter(function(T){return!a||T.groupId===a});this.selectDefaultTrack&&!u.some(function(T){return T.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var v={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(K.Events.AUDIO_TRACKS_UPDATED,v),this.selectInitialTrack()}},o.onError=function(l,c){if(h.prototype.onError.call(this,l,c),c.fatal||!c.context)return;c.context.type===R.PlaylistContextType.AUDIO_TRACK&&c.context.id===this.trackId&&c.context.groupId===this.groupId&&this.retryLoadingOrFail(c)},o.setAudioTrack=function(l){var c=this.tracksInGroup;if(l<0||l>=c.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=c[this.trackId];this.log("Now switching to audio-track index "+l);var u=c[l],v=u.id,T=u.groupId,x=T===void 0?"":T,D=u.name,w=u.type,p=u.url;if(this.trackId=l,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(K.Events.AUDIO_TRACK_SWITCHING,{id:v,groupId:x,name:D,type:w,url:p}),u.details&&!u.details.live)return;var n=this.switchParams(u.url,a==null?void 0:a.details);this.loadPlaylist(n)},o.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var c=this.trackName,a=this.findTrackId(c)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(l){for(var c=this.tracksInGroup,a=0;a<c.length;a++){var u=c[a];if((!this.selectDefaultTrack||u.default)&&(!l||l===u.name))return u.id}return-1},o.loadPlaylist=function(l){var c=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(c)){var a=c.id,u=c.groupId,v=c.url;if(l)try{v=l.addDirectives(v)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(K.Events.AUDIO_TRACK_LOADING,{url:v,id:a,groupId:u,deliveryDirectives:l||null})}},t(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),s}(B.default);Q.default=A},"./src/controller/base-playlist-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return t});var K=O("./src/polyfills/number.ts"),M=O("./src/types/level.ts"),B=O("./src/controller/level-helper.ts"),R=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),t=function(){function E(A,h){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=R.logger.log.bind(R.logger,h+":"),this.warn=R.logger.warn.bind(R.logger,h+":"),this.hls=A}var i=E.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(h,s){s.fatal&&s.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(h,s){var o=s==null?void 0:s.renditionReports;if(o)for(var f=0;f<o.length;f++){var l=o[f],c=""+l.URI;if(c===h.substr(-c.length)){var a=parseInt(l["LAST-MSN"]),u=parseInt(l["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var v=Math.min(s.age-s.partTarget,s.targetduration);u!==void 0&&v>s.partTarget&&(u+=1)}if(Object(K.isFiniteNumber)(a))return new M.HlsUrlParameters(a,Object(K.isFiniteNumber)(u)?u:void 0,M.HlsSkip.No)}}},i.loadPlaylist=function(h){},i.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},i.playlistLoaded=function(h,s,o){var f=this,l=s.details,c=s.stats,a=c.loading.end?Math.max(0,self.performance.now()-c.loading.end):0;if(l.advancedDateTime=Date.now()-a,l.live||o!=null&&o.live){if(l.reloaded(o),o&&this.log("live playlist "+h+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),o&&l.fragments.length>0&&Object(B.mergeDetails)(o,l),!this.canLoad||!l.live)return;var u,v=void 0,T=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var x=this.hls.config.lowLatencyMode,D=l.lastPartSn,w=l.endSN,p=l.lastPartIndex,n=p!==-1,d=D===w,m=x?0:p;n?(v=d?w+1:D,T=d?m:p+1):v=w+1;var C=l.age,y=C+l.ageHeader,g=Math.min(y-l.partTarget,l.targetduration*1.5);if(g>0){if(o&&g>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+g+" with playlist age: "+l.age),g=0;else{var U=Math.floor(g/l.targetduration);if(v+=U,T!==void 0){var k=Math.round(g%l.targetduration/l.partTarget);T+=k}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+g+" skip sn "+U+" to part "+T)}l.tuneInGoal=g}if(u=this.getDeliveryDirectives(l,s.deliveryDirectives,v,T),x||!d){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(l,s.deliveryDirectives,v,T);var I=Object(B.computeReloadInterval)(l,c);v!==void 0&&l.canBlockReload&&(I-=l.partTarget||1),this.log("reload live playlist "+h+" in "+Math.round(I)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(u)},I)}else this.clearTimer()},i.getDeliveryDirectives=function(h,s,o,f){var l=Object(M.getSkipValue)(h,o);return s!=null&&s.skip&&h.deltaUpdateFailed&&(o=s.msn,f=s.part,l=M.HlsSkip.No),new M.HlsUrlParameters(o,f,l)},i.retryLoadingOrFail=function(h){var s=this,o=this.hls.config,f=this.retryCount<o.levelLoadingMaxRetry;if(f){var l;if(this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(l=h.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var c=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},c),this.warn("retry playlist loading #"+this.retryCount+" in "+c+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return f},E}()},"./src/controller/base-stream-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"State",function(){return w}),O.d(Q,"default",function(){return p});var K=O("./src/polyfills/number.ts"),M=O("./src/task-loop.ts"),B=O("./src/controller/fragment-tracker.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),t=O("./src/events.ts"),E=O("./src/errors.ts"),i=O("./src/types/transmuxer.ts"),A=O("./src/utils/mp4-tools.ts"),h=O("./src/utils/discontinuities.ts"),s=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),f=O("./src/loader/fragment-loader.ts"),l=O("./src/crypt/decrypter.ts"),c=O("./src/utils/time-ranges.ts"),a=O("./src/types/loader.ts");function u(n,d){for(var m=0;m<d.length;m++){var C=d[m];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(n,C.key,C)}}function v(n,d,m){return d&&u(n.prototype,d),m&&u(n,m),n}function T(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function x(n,d){n.prototype=Object.create(d.prototype),n.prototype.constructor=n,D(n,d)}function D(n,d){return D=Object.setPrototypeOf||function(C,y){return C.__proto__=y,C},D(n,d)}var w={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"},p=function(n){x(d,n);function d(C,y,g){var U;return U=n.call(this)||this,U.hls=void 0,U.fragPrevious=null,U.fragCurrent=null,U.fragmentTracker=void 0,U.transmuxer=null,U._state=w.STOPPED,U.media=void 0,U.mediaBuffer=void 0,U.config=void 0,U.bitrateTest=!1,U.lastCurrentTime=0,U.nextLoadPosition=0,U.startPosition=0,U.loadedmetadata=!1,U.fragLoadError=0,U.retryDate=0,U.levels=null,U.fragmentLoader=void 0,U.levelLastLoaded=null,U.startFragRequested=!1,U.decrypter=void 0,U.initPTS=[],U.onvseeking=null,U.onvended=null,U.logPrefix="",U.log=void 0,U.warn=void 0,U.logPrefix=g,U.log=b.logger.log.bind(b.logger,g+":"),U.warn=b.logger.warn.bind(b.logger,g+":"),U.hls=C,U.fragmentLoader=new f.default(C.config),U.fragmentTracker=y,U.config=C.config,U.decrypter=new l.default(C,C.config),C.on(t.Events.KEY_LOADED,U.onKeyLoaded,T(U)),U}var m=d.prototype;return m.doTick=function(){this.onTickEnd()},m.onTickEnd=function(){},m.startLoad=function(y){},m.stopLoad=function(){this.fragmentLoader.abort();var y=this.fragCurrent;y&&this.fragmentTracker.removeFragment(y),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},m._streamEnded=function(y,g){var U=this.fragCurrent,k=this.fragmentTracker;if(!g.live&&U&&U.sn===g.endSN&&!y.nextStart){var I=k.getState(U);return I===B.FragmentState.PARTIAL||I===B.FragmentState.OK}return!1},m.onMediaAttached=function(y,g){var U=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),U.addEventListener("seeking",this.onvseeking),U.addEventListener("ended",this.onvended);var k=this.config;this.levels&&k.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(k.startPosition)},m.onMediaDetaching=function(){var y=this.media;y!=null&&y.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),y&&(y.removeEventListener("seeking",this.onvseeking),y.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},m.onMediaSeeking=function(){var y=this.config,g=this.fragCurrent,U=this.media,k=this.mediaBuffer,I=this.state,V=U?U.currentTime:0,G=R.BufferHelper.bufferInfo(k||U,V,y.maxBufferHole);if(this.log("media seeking to "+(Object(K.isFiniteNumber)(V)?V.toFixed(3):V)+", state: "+I),I===w.ENDED)this.resetLoadingState();else if(g&&!G.len){var L=y.maxFragLookUpTolerance,$=g.start-L,Y=g.start+g.duration+L,ne=V>Y;(V<$||ne)&&(ne&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}U&&(this.lastCurrentTime=V),!this.loadedmetadata&&!G.len&&(this.nextLoadPosition=this.startPosition=V),this.tickImmediate()},m.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},m.onKeyLoaded=function(y,g){if(this.state!==w.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=w.IDLE;var U=this.levels[g.frag.level].details;U&&this.loadFragment(g.frag,U,g.frag.start)},m.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},m.onHandlerDestroyed=function(){this.state=w.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,n.prototype.onHandlerDestroyed.call(this)},m.loadKey=function(y,g){this.log("Loading key for "+y.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level),this.state=w.KEY_LOADING,this.fragCurrent=y,this.hls.trigger(t.Events.KEY_LOADING,{frag:y})},m.loadFragment=function(y,g,U){this._loadFragForPlayback(y,g,U)},m._loadFragForPlayback=function(y,g,U){var k=this,I=function(G){if(k.fragContextChanged(y)){k.warn("Fragment "+y.sn+(G.part?" p: "+G.part.index:"")+" of level "+y.level+" was dropped during download."),k.fragmentTracker.removeFragment(y);return}y.stats.chunkCount++,k._handleFragmentLoadProgress(G)};this._doFragLoad(y,g,U,I).then(function(V){if(!V)return;k.fragLoadError=0;var G=k.state;if(k.fragContextChanged(y)){(G===w.FRAG_LOADING||G===w.BACKTRACKING||!k.fragCurrent&&G===w.PARSING)&&(k.fragmentTracker.removeFragment(y),k.state=w.IDLE);return}if("payload"in V&&(k.log("Loaded fragment "+y.sn+" of level "+y.level),k.hls.trigger(t.Events.FRAG_LOADED,V),k.state===w.BACKTRACKING)){k.fragmentTracker.backtrack(y,V),k.resetFragmentLoading(y);return}k._handleFragmentLoadComplete(V)}).catch(function(V){k.warn(V),k.resetFragmentLoading(y)})},m.flushMainBuffer=function(y,g,U){if(U===void 0&&(U=null),!(y-g))return;var k={startOffset:y,endOffset:g,type:U};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,k)},m._loadInitSegment=function(y){var g=this;this._doFragLoad(y).then(function(U){if(!U||g.fragContextChanged(y)||!g.levels)throw new Error("init load aborted");return U}).then(function(U){var k=g.hls,I=U.payload,V=y.decryptdata;if(I&&I.byteLength>0&&V&&V.key&&V.iv&&V.method==="AES-128"){var G=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(I),V.key.buffer,V.iv.buffer).then(function(L){var $=self.performance.now();return k.trigger(t.Events.FRAG_DECRYPTED,{frag:y,payload:L,stats:{tstart:G,tdecrypt:$}}),U.payload=L,U})}return U}).then(function(U){var k=g.fragCurrent,I=g.hls,V=g.levels;if(!V)throw new Error("init load aborted, missing levels");var G=V[y.level].details;console.assert(G,"Level details are defined when init segment is loaded");var L=y.stats;g.state=w.IDLE,g.fragLoadError=0,y.data=new Uint8Array(U.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),U.frag===k&&I.trigger(t.Events.FRAG_BUFFERED,{stats:L,frag:k,part:null,id:y.type}),g.tick()}).catch(function(U){g.warn(U),g.resetFragmentLoading(y)})},m.fragContextChanged=function(y){var g=this.fragCurrent;return!y||!g||y.level!==g.level||y.sn!==g.sn||y.urlId!==g.urlId},m.fragBufferedComplete=function(y,g){var U=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" "+c.default.toString(R.BufferHelper.getBuffered(U))),this.state=w.IDLE,this.tick()},m._handleFragmentLoadComplete=function(y){var g=this.transmuxer;if(!g)return;var U=y.frag,k=y.part,I=y.partsLoaded,V=!I||I.length===0||I.some(function(L){return!L}),G=new i.ChunkMetadata(U.level,U.sn,U.stats.chunkCount+1,0,k?k.index:-1,!V);g.flush(G)},m._handleFragmentLoadProgress=function(y){},m._doFragLoad=function(y,g,U,k){var I=this;if(U===void 0&&(U=null),!this.levels)throw new Error("frag load aborted, missing levels");if(U=Math.max(y.start,U||0),this.config.lowLatencyMode&&g){var V=g.partList;if(V&&k){U>y.end&&g.fragmentHint&&(y=g.fragmentHint);var G=this.getNextPart(V,y,U);if(G>-1){var L=V[G];return this.log("Loading part sn: "+y.sn+" p: "+L.index+" cc: "+y.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+G+"-"+(V.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(U.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:y,part:V[G],targetBufferTime:U}),this.doFragPartsLoad(y,V,G,k).catch(function($){return I.handleFragLoadError($)})}else if(!y.url||this.loadedEndOfParts(V,U))return Promise.resolve(null)}}return this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(U.toFixed(3))),Object(K.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:y,targetBufferTime:U}),this.fragmentLoader.load(y,k).catch(function($){return I.handleFragLoadError($)})},m.doFragPartsLoad=function(y,g,U,k){var I=this;return new Promise(function(V,G){var L=[],$=function Y(ne){var se=g[ne];I.fragmentLoader.loadPart(y,se,k).then(function(_e){L[se.index]=_e;var ve=_e.part;I.hls.trigger(t.Events.FRAG_LOADED,_e);var Ce=g[ne+1];if(Ce&&Ce.fragment===y)Y(ne+1);else return V({frag:y,part:ve,partsLoaded:L})}).catch(G)};$(U)})},m.handleFragLoadError=function(y){var g=y.data;return g&&g.details===E.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(t.Events.ERROR,g),null},m._handleTransmuxerFlush=function(y){var g=this.getCurrentContext(y);if(!g||this.state!==w.PARSING){this.fragCurrent||(this.state=w.IDLE);return}var U=g.frag,k=g.part,I=g.level,V=self.performance.now();U.stats.parsing.end=V,k&&(k.stats.parsing.end=V),this.updateLevelTiming(U,k,I,y.partial)},m.getCurrentContext=function(y){var g=this.levels,U=y.level,k=y.sn,I=y.part;if(!g||!g[U])return this.warn("Levels object was unset while buffering fragment "+k+" of level "+U+". The current chunk will not be buffered."),null;var V=g[U],G=I>-1?Object(o.getPartWith)(V,k,I):null,L=G?G.fragment:Object(o.getFragmentWithSN)(V,k,this.fragCurrent);return L?{frag:L,part:G,level:V}:null},m.bufferFragmentData=function(y,g,U,k){if(!y||this.state!==w.PARSING)return;var I=y.data1,V=y.data2,G=I;if(I&&V&&(G=Object(A.appendUint8Array)(I,V)),!G||!G.length)return;var L={type:y.type,frag:g,part:U,chunkMeta:k,parent:g.type,data:G};this.hls.trigger(t.Events.BUFFER_APPENDING,L),y.dropped&&y.independent&&!U&&this.flushBufferGap(g)},m.flushBufferGap=function(y){var g=this.media;if(!g)return;if(!R.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,y.start);return}var U=g.currentTime,k=R.BufferHelper.bufferInfo(g,U,0),I=y.duration,V=Math.min(this.config.maxFragLookUpTolerance*2,I*.25),G=Math.max(Math.min(y.start-V,k.end-V),U+V);y.start-G>V&&this.flushMainBuffer(G,y.start)},m.getFwdBufferInfo=function(y,g){var U=this.config,k=this.getLoadPosition();if(!Object(K.isFiniteNumber)(k))return null;var I=R.BufferHelper.bufferInfo(y,k,U.maxBufferHole);if(I.len===0&&I.nextStart!==void 0){var V=this.fragmentTracker.getBufferedFrag(k,g);if(V&&I.nextStart<V.end)return R.BufferHelper.bufferInfo(y,k,Math.max(I.nextStart,U.maxBufferHole))}return I},m.getMaxBufferLength=function(y){var g=this.config,U;return y?U=Math.max(8*g.maxBufferSize/y,g.maxBufferLength):U=g.maxBufferLength,Math.min(U,g.maxMaxBufferLength)},m.reduceMaxBufferLength=function(y){var g=this.config,U=y||g.maxBufferLength;return g.maxMaxBufferLength>=U?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},m.getNextFragment=function(y,g){var U,k,I=g.fragments,V=I.length;if(!V)return null;var G=this.config,L=I[0].start,$;if(g.live){var Y=G.initialLiveManifestSize;if(V<Y)return this.warn("Not enough fragments to start playback (have: "+V+", need: "+Y+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&($=this.getInitialLiveFragment(g,I),this.startPosition=$?this.hls.liveSyncPosition||$.start:y)}else y<=L&&($=I[0]);if(!$){var ne=G.lowLatencyMode?g.partEnd:g.fragmentEnd;$=this.getFragmentAtPosition(y,ne,g)}return(U=$)!==null&&U!==void 0&&U.initSegment&&!((k=$)!==null&&k!==void 0&&k.initSegment.data)&&!this.bitrateTest&&($=$.initSegment),$},m.getNextPart=function(y,g,U){for(var k=-1,I=!1,V=!0,G=0,L=y.length;G<L;G++){var $=y[G];if(V=V&&!$.independent,k>-1&&U<$.start)break;var Y=$.loaded;!Y&&(I||$.independent||V)&&$.fragment===g&&(k=G),I=Y}return k},m.loadedEndOfParts=function(y,g){var U=y[y.length-1];return U&&g>U.start&&U.loaded},m.getInitialLiveFragment=function(y,g){var U=this.fragPrevious,k=null;if(U){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+U.programDateTime),k=Object(s.findFragmentByPDT)(g,U.endProgramDateTime,this.config.maxFragLookUpTolerance)),!k){var I=U.sn+1;if(I>=y.startSN&&I<=y.endSN){var V=g[I-y.startSN];U.cc===V.cc&&(k=V,this.log("Live playlist, switching playlist, load frag with next SN: "+k.sn))}k||(k=Object(s.findFragWithCC)(g,U.cc),k&&this.log("Live playlist, switching playlist, load frag with same CC: "+k.sn))}}else{var G=this.hls.liveSyncPosition;G!==null&&(k=this.getFragmentAtPosition(G,this.bitrateTest?y.fragmentEnd:y.edge,y))}return k},m.getFragmentAtPosition=function(y,g,U){var k=this.config,I=this.fragPrevious,V=U.fragments,G=U.endSN,L=U.fragmentHint,$=k.maxFragLookUpTolerance,Y=!!(k.lowLatencyMode&&U.partList&&L);Y&&L&&!this.bitrateTest&&(V=V.concat(L),G=L.sn);var ne;if(y<g){var se=y>g-$?0:$;ne=Object(s.findFragmentByPTS)(I,V,y,se)}else ne=V[V.length-1];if(ne){var _e=ne.sn-U.startSN,ve=I&&ne.level===I.level,Ce=V[_e+1],De=this.fragmentTracker.getState(ne);if(De===B.FragmentState.BACKTRACKED){ne=null;for(var Qe=_e;V[Qe]&&this.fragmentTracker.getState(V[Qe])===B.FragmentState.BACKTRACKED;)I?ne=V[Qe--]:ne=V[--Qe];ne||(ne=Ce)}else I&&ne.sn===I.sn&&!Y&&(ve&&(ne.sn<G&&this.fragmentTracker.getState(Ce)!==B.FragmentState.OK?(this.log("SN "+ne.sn+" just loaded, load next one: "+Ce.sn),ne=Ce):ne=null))}return ne},m.synchronizeToLiveEdge=function(y){var g=this.config,U=this.media;if(!U)return;var k=this.hls.liveSyncPosition,I=U.currentTime,V=y.fragments[0].start,G=y.edge,L=I>=V-g.maxFragLookUpTolerance&&I<=G;if(k!==null&&U.duration>k&&(I<k||!L)){var $=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*y.targetduration;(!L&&U.readyState<4||I<G-$)&&(this.loadedmetadata||(this.nextLoadPosition=k),U.readyState&&(this.warn("Playback: "+I.toFixed(3)+" is located too far from the end of live sliding playlist: "+G+", reset currentTime to : "+k.toFixed(3)),U.currentTime=k))}},m.alignPlaylists=function(y,g){var U=this.levels,k=this.levelLastLoaded,I=this.fragPrevious,V=k!==null?U[k]:null,G=y.fragments.length;if(!G)return this.warn("No fragments in live playlist"),0;var L=y.fragments[0].start,$=!g,Y=y.alignedSliding&&Object(K.isFiniteNumber)(L);if($||!Y&&!L){Object(h.alignStream)(I,V,y);var ne=y.fragments[0].start;return this.log("Live playlist sliding: "+ne.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+y.startSN+" prev-sn: "+(I?I.sn:"na")+" fragments: "+G),ne}return L},m.waitForCdnTuneIn=function(y){var g=3;return y.live&&y.canBlockReload&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*g)},m.setStartPosition=function(y,g){var U=this.startPosition;if(U<g&&(U=-1),U===-1||this.lastCurrentTime===-1){var k=y.startTimeOffset;Object(K.isFiniteNumber)(k)?(U=g+k,k<0&&(U+=y.totalduration),U=Math.min(Math.max(g,U),g+y.totalduration),this.log("Start time offset "+k+" found in playlist, adjust startPosition to "+U),this.startPosition=U):y.live?U=this.hls.liveSyncPosition||g:this.startPosition=U=0,this.lastCurrentTime=U}this.nextLoadPosition=U},m.getLoadPosition=function(){var y=this.media,g=0;return this.loadedmetadata&&y?g=y.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},m.handleFragLoadAborted=function(y,g){this.transmuxer&&y.sn!=="initSegment"&&y.stats.aborted&&(this.warn("Fragment "+y.sn+(g?" part"+g.index:"")+" of level "+y.level+" was aborted"),this.resetFragmentLoading(y))},m.resetFragmentLoading=function(y){(!this.fragCurrent||!this.fragContextChanged(y))&&(this.state=w.IDLE)},m.onFragmentOrKeyLoadError=function(y,g){if(g.fatal)return;var U=g.frag;if(!U||U.type!==y)return;var k=this.fragCurrent;console.assert(k&&U.sn===k.sn&&U.level===k.level&&U.urlId===k.urlId,"Frag load error must match current frag to retry");var I=this.config;if(this.fragLoadError+1<=I.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(U.level))return;var V=Math.min(Math.pow(2,this.fragLoadError)*I.fragLoadingRetryDelay,I.fragLoadingMaxRetryTimeout);this.warn("Fragment "+U.sn+" of "+y+" "+U.level+" failed to load, retrying in "+V+"ms"),this.retryDate=self.performance.now()+V,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(y===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(b.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)},m.afterBufferFlushed=function(y,g,U){if(!y)return;var k=R.BufferHelper.getBuffered(y);this.fragmentTracker.detectEvictedFragments(g,k,U),this.state===w.ENDED&&this.resetLoadingState()},m.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},m.resetLiveStartWhenNotLoaded=function(y){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[y].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},m.updateLevelTiming=function(y,g,U,k){var I=this,V=U.details;console.assert(!!V,"level.details must be defined");var G=Object.keys(y.elementaryStreams).reduce(function(L,$){var Y=y.elementaryStreams[$];if(Y){var ne=Y.endPTS-Y.startPTS;if(ne<=0)return I.warn("Could not parse fragment "+y.sn+" "+$+" duration reliably ("+ne+") resetting transmuxer to fallback to playlist timing"),I.resetTransmuxer(),L||!1;var se=k?0:Object(o.updateFragPTSDTS)(V,y,Y.startPTS,Y.endPTS,Y.startDTS,Y.endDTS);return I.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:V,level:U,drift:se,type:$,frag:y,start:Y.startPTS,end:Y.endPTS}),!0}return L},!1);G?(this.state=w.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:y,part:g})):this.resetLoadingState()},m.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},v(d,[{key:"state",get:function(){return this._state},set:function(y){var g=this._state;g!==y&&(this._state=y,this.log(g+"->"+y))}}]),d}(M.default)},"./src/controller/buffer-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return s});var K=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),B=O("./src/utils/logger.ts"),R=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),t=O("./src/utils/mediasource-helper.ts"),E=O("./src/loader/fragment.ts"),i=O("./src/controller/buffer-operation-queue.ts"),A=Object(t.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function o(l){var c=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=c.hls,u=c.media,v=c.mediaSource;B.logger.log("[buffer-controller]: Media source opened"),u&&(c.updateMediaElementDuration(),a.trigger(M.Events.MEDIA_ATTACHED,{media:u})),v&&v.removeEventListener("sourceopen",c._onMediaSourceOpen),c.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=l,this._initSourceBuffer(),this.registerListeners()}var f=o.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var c=this.hls;c.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(M.Events.BUFFER_RESET,this.onBufferReset,this),c.on(M.Events.BUFFER_APPENDING,this.onBufferAppending,this),c.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.on(M.Events.BUFFER_EOS,this.onBufferEos,this),c.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),c.on(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),c.on(M.Events.FRAG_PARSED,this.onFragParsed,this),c.on(M.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var c=this.hls;c.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(M.Events.BUFFER_RESET,this.onBufferReset,this),c.off(M.Events.BUFFER_APPENDING,this.onBufferAppending,this),c.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.off(M.Events.BUFFER_EOS,this.onBufferEos,this),c.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),c.off(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),c.off(M.Events.FRAG_PARSED,this.onFragParsed,this),c.off(M.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(c,a){var u=2;(a.audio&&!a.video||!a.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,B.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(c,a){var u=this.media=a.media;if(u&&A){var v=this.mediaSource=new A;v.addEventListener("sourceopen",this._onMediaSourceOpen),v.addEventListener("sourceended",this._onMediaSourceEnded),v.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(v),this._objectUrl=u.src}},f.onMediaDetaching=function(){var c=this.media,a=this.mediaSource,u=this._objectUrl;if(a){if(B.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(v){B.logger.warn("[buffer-controller]: onMediaDetaching: "+v.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),c&&(u&&self.URL.revokeObjectURL(u),c.src===u?(c.removeAttribute("src"),c.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(M.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var c=this;this.getSourceBufferTypes().forEach(function(a){var u=c.sourceBuffer[a];try{u&&(c.removeBufferListeners(a),c.mediaSource&&c.mediaSource.removeSourceBuffer(u),c.sourceBuffer[a]=void 0)}catch(v){B.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",v)}}),this._initSourceBuffer()},f.onBufferCodecs=function(c,a){var u=this,v=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(T){if(v){var x=u.tracks[T];if(x&&typeof x.buffer.changeType=="function"){var D=a[T],w=D.codec,p=D.levelCodec,n=D.container,d=(x.levelCodec||x.codec).replace(h,"$1"),m=(p||w).replace(h,"$1");if(d!==m){var C=n+";codecs="+(p||w);u.appendChangeType(T,C)}}}else u.pendingTracks[T]=a[T]}),v)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(c,a){var u=this,v=this.operationQueue,T={execute:function(){var D=u.sourceBuffer[c];D&&(B.logger.log("[buffer-controller]: changing "+c+" sourceBuffer type to "+a),D.changeType(a)),v.shiftAndExecuteNext(c)},onStart:function(){},onComplete:function(){},onError:function(D){B.logger.warn("[buffer-controller]: Failed to change "+c+" SourceBuffer type",D)}};v.append(T,c)},f.onBufferAppending=function(c,a){var u=this,v=this.hls,T=this.operationQueue,x=this.tracks,D=a.data,w=a.type,p=a.frag,n=a.part,d=a.chunkMeta,m=d.buffering[w],C=self.performance.now();m.start=C;var y=p.stats.buffering,g=n?n.stats.buffering:null;y.start===0&&(y.start=C),g&&g.start===0&&(g.start=C);var U=x.audio,k=w==="audio"&&d.id===1&&(U==null?void 0:U.container)==="audio/mpeg",I={execute:function(){if(m.executeStart=self.performance.now(),k){var G=u.sourceBuffer[w];if(G){var L=p.start-G.timestampOffset;Math.abs(L)>=.1&&(B.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+p.start+" (delta: "+L+") sn: "+p.sn+")"),G.timestampOffset=p.start)}}u.appendExecutor(D,w)},onStart:function(){},onComplete:function(){var G=self.performance.now();m.executeEnd=m.end=G,y.first===0&&(y.first=G),g&&g.first===0&&(g.first=G);var L=u.sourceBuffer,$={};for(var Y in L)$[Y]=b.BufferHelper.getBuffered(L[Y]);u.appendError=0,u.hls.trigger(M.Events.BUFFER_APPENDED,{type:w,frag:p,part:n,chunkMeta:d,parent:p.type,timeRanges:$})},onError:function(G){B.logger.error("[buffer-controller]: Error encountered while trying to append to the "+w+" SourceBuffer",G);var L={type:R.ErrorTypes.MEDIA_ERROR,parent:p.type,details:R.ErrorDetails.BUFFER_APPEND_ERROR,err:G,fatal:!1};G.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=R.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,L.details=R.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>v.config.appendErrorMaxRetry&&(B.logger.error("[buffer-controller]: Failed "+v.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),v.trigger(M.Events.ERROR,L)}};T.append(I,w)},f.onBufferFlushing=function(c,a){var u=this,v=this.operationQueue,T=function(D){return{execute:u.removeExecutor.bind(u,D,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(M.Events.BUFFER_FLUSHED,{type:D})},onError:function(p){B.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",p)}}};a.type?v.append(T(a.type),a.type):this.getSourceBufferTypes().forEach(function(x){v.append(T(x),x)})},f.onFragParsed=function(c,a){var u=this,v=a.frag,T=a.part,x=[],D=T?T.elementaryStreams:v.elementaryStreams;D[E.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(D[E.ElementaryStreamTypes.AUDIO]&&x.push("audio"),D[E.ElementaryStreamTypes.VIDEO]&&x.push("video"));var w=function(){var n=self.performance.now();v.stats.buffering.end=n,T&&(T.stats.buffering.end=n);var d=T?T.stats:v.stats;u.hls.trigger(M.Events.FRAG_BUFFERED,{frag:v,part:T,stats:d,id:v.type})};x.length===0&&B.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+v.type+" level: "+v.level+" sn: "+v.sn),this.blockBuffers(w,x)},f.onFragChanged=function(c,a){this.flushBackBuffer()},f.onBufferEos=function(c,a){var u=this,v=this.getSourceBufferTypes().reduce(function(T,x){var D=u.sourceBuffer[x];return(!a.type||a.type===x)&&(D&&!D.ended&&(D.ended=!0,B.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),T&&!!(!D||D.ended)},!0);v&&this.blockBuffers(function(){var T=u.mediaSource;if(!T||T.readyState!=="open")return;T.endOfStream()})},f.onLevelUpdated=function(c,a){var u=a.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var c=this.hls,a=this.details,u=this.media,v=this.sourceBuffer;if(!u||a===null)return;var T=this.getSourceBufferTypes();if(!T.length)return;var x=a.live&&c.config.liveBackBufferLength!==null?c.config.liveBackBufferLength:c.config.backBufferLength;if(!Object(K.isFiniteNumber)(x)||x<0)return;var D=u.currentTime,w=a.levelTargetDuration,p=Math.max(x,w),n=Math.floor(D/w)*w-p;T.forEach(function(d){var m=v[d];if(m){var C=b.BufferHelper.getBuffered(m);C.length>0&&n>C.start(0)&&(c.trigger(M.Events.BACK_BUFFER_REACHED,{bufferEnd:n}),a.live&&c.trigger(M.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n}),c.trigger(M.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:d}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var c=this.details,a=this.hls,u=this.media,v=this.mediaSource,T=c.fragments[0].start+c.totalduration,x=u.duration,D=Object(K.isFiniteNumber)(v.duration)?v.duration:0;c.live&&a.config.liveDurationInfinity?(B.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),v.duration=Infinity,this.updateSeekableRange(c)):(T>D&&T>x||!Object(K.isFiniteNumber)(x))&&(B.logger.log("[buffer-controller]: Updating Media Source duration to "+T.toFixed(3)),v.duration=T)},f.updateSeekableRange=function(c){var a=this.mediaSource,u=c.fragments,v=u.length;if(v&&c.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var T=Math.max(0,u[0].start),x=Math.max(T,T+c.totalduration);a.setLiveSeekableRange(T,x)}},f.checkPendingTracks=function(){var c=this.bufferCodecEventsExpected,a=this.operationQueue,u=this.pendingTracks,v=Object.keys(u).length;if(v&&!c||v===2){this.createSourceBuffers(u),this.pendingTracks={};var T=this.getSourceBufferTypes();if(T.length===0){this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}T.forEach(function(x){a.executeNext(x)})}},f.createSourceBuffers=function(c){var a=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var v=0;for(var T in c)if(!a[T]){var x=c[T];if(!x)throw Error("source buffer exists for track "+T+", however track does not");var D=x.levelCodec||x.codec,w=x.container+";codecs="+D;B.logger.log("[buffer-controller]: creating sourceBuffer("+w+")");try{var p=a[T]=u.addSourceBuffer(w),n=T;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[T]={buffer:p,codec:D,container:x.container,levelCodec:x.levelCodec,id:x.id},v++}catch(d){B.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+d.message),this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:d,mimeType:w})}}v&&this.hls.trigger(M.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(c){var a=this.operationQueue,u=a.current(c);u.onStart()},f._onSBUpdateEnd=function(c){var a=this.operationQueue,u=a.current(c);u.onComplete(),a.shiftAndExecuteNext(c)},f._onSBUpdateError=function(c,a){B.logger.error("[buffer-controller]: "+c+" SourceBuffer error",a),this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(c);u&&u.onError(a)},f.removeExecutor=function(c,a,u){var v=this.media,T=this.mediaSource,x=this.operationQueue,D=this.sourceBuffer,w=D[c];if(!v||!T||!w){B.logger.warn("[buffer-controller]: Attempting to remove from the "+c+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(c);return}var p=Object(K.isFiniteNumber)(v.duration)?v.duration:Infinity,n=Object(K.isFiniteNumber)(T.duration)?T.duration:Infinity,d=Math.max(0,a),m=Math.min(u,p,n);m>d?(B.logger.log("[buffer-controller]: Removing ["+d+","+m+"] from the "+c+" SourceBuffer"),console.assert(!w.updating,c+" sourceBuffer must not be updating"),w.remove(d,m)):x.shiftAndExecuteNext(c)},f.appendExecutor=function(c,a){var u=this.operationQueue,v=this.sourceBuffer,T=v[a];if(!T){B.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(a);return}T.ended=!1,console.assert(!T.updating,a+" sourceBuffer must not be updating"),T.appendBuffer(c)},f.blockBuffers=function(c,a){var u=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){B.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(c);return}var v=this.operationQueue,T=a.map(function(x){return v.appendBlocker(x)});Promise.all(T).then(function(){c(),a.forEach(function(x){var D=u.sourceBuffer[x];(!D||!D.updating)&&v.shiftAndExecuteNext(x)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(c,a,u){var v=this.sourceBuffer[c];if(!v)return;var T=u.bind(this,c);this.listeners[c].push({event:a,listener:T}),v.addEventListener(a,T)},f.removeBufferListeners=function(c){var a=this.sourceBuffer[c];if(!a)return;this.listeners[c].forEach(function(u){a.removeEventListener(u.event,u.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return M});var K=O("./src/utils/logger.ts"),M=function(){function B(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var R=B.prototype;return R.append=function(t,E){var i=this.queues[E];i.push(t),i.length===1&&this.buffers[E]&&this.executeNext(E)},R.insertAbort=function(t,E){var i=this.queues[E];i.unshift(t),this.executeNext(E)},R.appendBlocker=function(t){var E,i=new Promise(function(h){E=h}),A={execute:E,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(A,t),i},R.executeNext=function(t){var E=this.buffers,i=this.queues,A=E[t],h=i[t];if(h.length){var s=h[0];try{s.execute()}catch(o){K.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(o),(!A||!A.updating)&&(h.shift(),this.executeNext(t))}}},R.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},R.current=function(t){return this.queues[t][0]},B}()},"./src/controller/cap-level-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts");function M(b,t){for(var E=0;E<t.length;E++){var i=t[E];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(b,i.key,i)}}function B(b,t,E){return t&&M(b.prototype,t),E&&M(b,E),b}var R=function(){function b(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=b.prototype;return t.setStreamController=function(i){this.streamController=i},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 i=this.hls;i.on(K.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(K.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var i=this.hls;i.off(K.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(K.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(i,A){b.isLevelAllowed(A.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(A.droppedLevel)},t.onMediaAttaching=function(i,A){this.media=A.media instanceof HTMLVideoElement?A.media:null},t.onManifestParsed=function(i,A){var h=this.hls;this.restrictedLevels=[],this.firstLevel=A.firstLevel,h.config.capLevelToPlayerSize&&A.video&&this.startCapping()},t.onBufferCodecs=function(i,A){var h=this.hls;h.config.capLevelToPlayerSize&&A.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var A=this.hls;A.autoLevelCapping=this.getMaxLevel(i.length-1),A.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=A.autoLevelCapping}}},t.getMaxLevel=function(i){var A=this,h=this.hls.levels;if(!h.length)return-1;var s=h.filter(function(o,f){return b.isLevelAllowed(f,A.restrictedLevels)&&f<=i});return this.clientRect=null,b.getMaxLevelByMediaSize(s,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 i=this.media,A={width:0,height:0};if(i){var h=i.getBoundingClientRect();A.width=h.width,A.height=h.height,!A.width&&!A.height&&(A.width=h.right-h.left||i.width||0,A.height=h.bottom-h.top||i.height||0)}return this.clientRect=A,A},b.isLevelAllowed=function(i,A){return A===void 0&&(A=[]),A.indexOf(i)===-1},b.getMaxLevelByMediaSize=function(i,A,h){if(!i||!i.length)return-1;for(var s=function(a,u){return u?a.width!==u.width||a.height!==u.height:!0},o=i.length-1,f=0;f<i.length;f+=1){var l=i[f];if((l.width>=A||l.height>=h)&&s(l,i[f+1])){o=f;break}}return o},B(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(A){}return i}}]),b}();Q.default=R},"./src/controller/cmcd-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return s});var K=O("./src/events.ts"),M=O("./src/types/cmcd.ts"),B=O("./src/utils/buffer-helper.ts"),R=O("./src/utils/logger.ts");function b(o,f){for(var l=0;l<f.length;l++){var c=f[l];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(o,c.key,c)}}function t(o,f,l){return f&&b(o.prototype,f),l&&b(o,l),o}function E(o,f){var l=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(l)return(l=l.call(o)).next.bind(l);if(Array.isArray(o)||(l=i(o))||f&&o&&typeof o.length=="number"){l&&(o=l);var c=0;return function(){return c>=o.length?{done:!0}:{done:!1,value:o[c++]}}}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 i(o,f){if(!o)return;if(typeof o=="string")return A(o,f);var l=Object.prototype.toString.call(o).slice(8,-1);if(l==="Object"&&o.constructor&&(l=o.constructor.name),l==="Map"||l==="Set")return Array.from(o);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return A(o,f)}function A(o,f){(f==null||f>o.length)&&(f=o.length);for(var l=0,c=new Array(f);l<f;l++)c[l]=o[l];return c}function h(){return h=Object.assign||function(o){for(var f=1;f<arguments.length;f++){var l=arguments[f];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(o[c]=l[c])}return o},h.apply(this,arguments)}var s=function(){function o(l){var c=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(){c.initialized&&(c.starved=!0),c.buffering=!0},this.onPlaying=function(){c.initialized||(c.initialized=!0),c.buffering=!1},this.applyPlaylistData=function(v){try{c.apply(v,{ot:M.CMCDObjectType.MANIFEST,su:!c.initialized})}catch(T){R.logger.warn("Could not generate manifest CMCD data.",T)}},this.applyFragmentData=function(v){try{var T=v.frag,x=c.hls.levels[T.level],D=c.getObjectType(T),w={d:T.duration*1e3,ot:D};(D===M.CMCDObjectType.VIDEO||D===M.CMCDObjectType.AUDIO||D==M.CMCDObjectType.MUXED)&&(w.br=x.bitrate/1e3,w.tb=c.getTopBandwidth(D),w.bl=c.getBufferLength(D)),c.apply(v,w)}catch(p){R.logger.warn("Could not generate segment CMCD data.",p)}},this.hls=l;var a=this.config=l.config,u=a.cmcd;u!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||o.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var f=o.prototype;return f.registerListeners=function(){var c=this.hls;c.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),c.on(K.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var c=this.hls;c.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),c.off(K.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(c,a){this.media=a.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(c,a){var u,v;this.audioBuffer=(u=a.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(v=a.tracks.video)===null||v===void 0?void 0:v.buffer},f.createData=function(){var c;return{v:M.CMCDVersion,sf:M.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(c=this.media)===null||c===void 0?void 0:c.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(c,a){a===void 0&&(a={}),h(a,this.createData());var u=a.ot===M.CMCDObjectType.INIT||a.ot===M.CMCDObjectType.VIDEO||a.ot===M.CMCDObjectType.MUXED;if(this.starved&&u&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var v=o.toHeaders(a);if(!Object.keys(v).length)return;c.headers||(c.headers={}),h(c.headers,v)}else{var T=o.toQuery(a);if(!T)return;c.url=o.appendQueryToUri(c.url,T)}},f.getObjectType=function(c){var a=c.type;return a==="subtitle"?M.CMCDObjectType.TIMED_TEXT:c.sn==="initSegment"?M.CMCDObjectType.INIT:a==="audio"?M.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?M.CMCDObjectType.VIDEO:M.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(c){for(var a=0,u=c===M.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,v=E(u),T;!(T=v()).done;){var x=T.value;x.bitrate>a&&(a=x.bitrate)}return a>0?a:NaN},f.getBufferLength=function(c){var a=this.hls.media,u=c===M.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!a)return NaN;var v=B.BufferHelper.bufferInfo(u,a.currentTime,this.config.maxBufferHole);return v.len*1e3},f.createPlaylistLoader=function(){var c=this.config.pLoader,a=this.applyPlaylistData,u=c||this.config.loader;return function(){function v(x){this.loader=void 0,this.loader=new u(x)}var T=v.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(D,w,p){a(D),this.loader.load(D,w,p)},t(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},f.createFragmentLoader=function(){var c=this.config.fLoader,a=this.applyFragmentData,u=c||this.config.loader;return function(){function v(x){this.loader=void 0,this.loader=new u(x)}var T=v.prototype;return T.destroy=function(){this.loader.destroy()},T.abort=function(){this.loader.abort()},T.load=function(D,w,p){a(D),this.loader.load(D,w,p)},t(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},o.uuid=function(){var c=URL.createObjectURL(new Blob),a=c.toString();return URL.revokeObjectURL(c),a.substr(a.lastIndexOf("/")+1)},o.serialize=function(c){for(var a=[],u=function(k){return!Number.isNaN(k)&&k!=null&&k!==""&&k!==!1},v=function(k){return Math.round(k)},T=function(k){return v(k/100)*100},x=function(k){return encodeURIComponent(k)},D={br:v,d:v,bl:T,dl:T,mtp:T,nor:x,rtp:T,tb:v},w=Object.keys(c||{}).sort(),p=E(w),n;!(n=p()).done;){var d=n.value,m=c[d];if(!u(m))continue;if(d==="v"&&m===1)continue;if(d=="pr"&&m===1)continue;var C=D[d];C&&(m=C(m));var y=typeof m,g=void 0;d==="ot"||d==="sf"||d==="st"?g=d+"="+m:y==="boolean"?g=d:y==="number"?g=d+"="+m:g=d+"="+JSON.stringify(m),a.push(g)}return a.join(",")},o.toHeaders=function(c){for(var a=Object.keys(c),u={},v=["Object","Request","Session","Status"],T=[{},{},{},{}],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},D=0,w=a;D<w.length;D++){var p=w[D],n=x[p]!=null?x[p]:1;T[n][p]=c[p]}for(var d=0;d<T.length;d++){var m=o.serialize(T[d]);m&&(u["CMCD-"+v[d]]=m)}return u},o.toQuery=function(c){return"CMCD="+encodeURIComponent(o.serialize(c))},o.appendQueryToUri=function(c,a){if(!a)return c;var u=c.includes("?")?"&":"?";return""+c+u+a},o}()},"./src/controller/eme-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts"),M=O("./src/errors.ts"),B=O("./src/utils/logger.ts"),R=O("./src/utils/mediakeys-helper.ts");function b(s,o){for(var f=0;f<o.length;f++){var l=o[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function t(s,o,f){return o&&b(s.prototype,o),f&&b(s,f),s}var E=3,i=function(o,f,l){var c={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(a){c.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:l.audioRobustness||""})}),f.forEach(function(a){c.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:l.videoRobustness||""})}),[c]},A=function(o,f,l,c){switch(o){case R.KeySystems.WIDEVINE:return i(f,l,c);default:throw new Error("Unknown key-system: "+o)}},h=function(){function s(f){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=f,this._config=f.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var o=s.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(K.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(l){switch(l){case R.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},o._attemptKeySystemAccess=function(l,c,a){var u=this,v=A(l,c,a,this._drmSystemOptions);B.logger.log("Requesting encrypted media key-system access");var T=this.requestMediaKeySystemAccess(l,v);this.mediaKeysPromise=T.then(function(x){return u._onMediaKeySystemAccessObtained(l,x)}),T.catch(function(x){B.logger.error('Failed to obtain key-system "'+l+'" access:',x)})},o._onMediaKeySystemAccessObtained=function(l,c){var a=this;B.logger.log('Access for key-system "'+l+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:c,mediaKeySystemDomain:l};this._mediaKeysList.push(u);var v=Promise.resolve().then(function(){return c.createMediaKeys()}).then(function(T){return u.mediaKeys=T,B.logger.log('Media-keys created for key-system "'+l+'"'),a._onMediaKeysCreated(),T});return v.catch(function(T){B.logger.error("Failed to create media-keys:",T)}),v},o._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(c){c.mediaKeysSession||(c.mediaKeysSession=c.mediaKeys.createSession(),l._onNewMediaKeySession(c.mediaKeysSession))})},o._onNewMediaKeySession=function(l){var c=this;B.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(a){c._onKeySessionMessage(l,a.message)},!1)},o._onKeySessionMessage=function(l,c){B.logger.log("Got EME message event, creating license request"),this._requestLicense(c,function(a){B.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),l.update(a)})},o.onMediaEncrypted=function(l){var c=this;if(B.logger.log('Media is encrypted using "'+l.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(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(v){if(!c._media)return;c._attemptSetMediaKeys(v),c._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(a).catch(a)},o._attemptSetMediaKeys=function(l){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var c=this._mediaKeysList[0];if(!c||!c.mediaKeys){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}B.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(c.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(l,c){var a=this,u=this._mediaKeysList[0];if(!u){B.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){B.logger.warn("Key-Session already initialized but requested again");return}var v=u.mediaKeysSession;if(!v){B.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!c){B.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}B.logger.log('Generating key-session request for "'+l+'" init data type'),u.mediaKeysSessionInitialized=!0,v.generateRequest(l,c).then(function(){B.logger.debug("Key-session generation succeeded")}).catch(function(T){B.logger.error("Error generating key-session request:",T),a.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(l,c,a){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,l,c,a);var v=this._licenseXhrSetup;if(v)try{v.call(this.hls,u,l),v=void 0}catch(T){B.logger.error(T)}try{u.readyState||u.open("POST",l,!0),v&&v.call(this.hls,u,l)}catch(T){throw new Error("issue setting up KeySystem license XHR "+T)}return u},o._onLicenseRequestReadyStageChange=function(l,c,a,u){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,B.logger.log("License request succeeded");var v=l.response,T=this._licenseResponseCallback;if(T)try{v=T.call(this.hls,l,c)}catch(D){B.logger.error(D)}u(v)}else{if(B.logger.error("License Request XHR failed ("+c+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>E){this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.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,u)}break}},o._generateLicenseRequestChallenge=function(l,c){switch(l.mediaKeySystemDomain){case R.KeySystems.WIDEVINE:return c}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},o._requestLicense=function(l,c){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(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(a.mediaKeySystemDomain),v=this._createLicenseXhr(u,l,c);B.logger.log("Sending license request to URL: "+u);var T=this._generateLicenseRequestChallenge(a,l);v.send(T)}catch(x){B.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(l,c){if(!this._emeEnabled)return;var a=c.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var l=this._media,c=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(c.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(l,c){if(!this._emeEnabled)return;var a=c.levels.map(function(v){return v.audioCodec}).filter(function(v){return!!v}),u=c.levels.map(function(v){return v.videoCodec}).filter(function(v){return!!v});this._attemptKeySystemAccess(R.KeySystems.WIDEVINE,a,u)},t(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();Q.default=h},"./src/controller/fps-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts"),M=O("./src/utils/logger.ts"),B=function(){function R(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 b=R.prototype;return b.setStreamController=function(E){this.streamController=E},b.registerListeners=function(){this.hls.on(K.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(K.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(E,i){var A=this.hls.config;if(A.capLevelOnFPSDrop){var h=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=h,h&&typeof h.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),A.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(E,i,A){var h=performance.now();if(i){if(this.lastTime){var s=h-this.lastTime,o=A-this.lastDroppedFrames,f=i-this.lastDecodedFrames,l=1e3*o/s,c=this.hls;if(c.trigger(K.Events.FPS_DROP,{currentDropped:o,currentDecoded:f,totalDroppedFrames:A}),l>0&&o>c.config.fpsDroppedMonitoringThreshold*f){var a=c.currentLevel;M.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=a)&&(a=a-1,c.trigger(K.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:c.currentLevel}),c.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=h,this.lastDroppedFrames=A,this.lastDecodedFrames=i}},b.checkFPSInterval=function(){var E=this.media;if(E)if(this.isVideoPlaybackQualityAvailable){var i=E.getVideoPlaybackQuality();this.checkFPS(E,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(E,E.webkitDecodedFrameCount,E.webkitDroppedFrameCount)},R}();Q.default=B},"./src/controller/fragment-finders.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"findFragmentByPDT",function(){return B}),O.d(Q,"findFragmentByPTS",function(){return R}),O.d(Q,"fragmentWithinToleranceTest",function(){return b}),O.d(Q,"pdtWithinToleranceTest",function(){return t}),O.d(Q,"findFragWithCC",function(){return E});var K=O("./src/polyfills/number.ts"),M=O("./src/utils/binary-search.ts");function B(i,A,h){if(A===null||!Array.isArray(i)||!i.length||!Object(K.isFiniteNumber)(A))return null;var s=i[0].programDateTime;if(A<(s||0))return null;var o=i[i.length-1].endProgramDateTime;if(A>=(o||0))return null;h=h||0;for(var f=0;f<i.length;++f){var l=i[f];if(t(A,h,l))return l}return null}function R(i,A,h,s){h===void 0&&(h=0),s===void 0&&(s=0);var o=null;if(i?o=A[i.sn-A[0].sn+1]||null:h===0&&A[0].start===0&&(o=A[0]),o&&b(h,s,o)===0)return o;var f=M.default.search(A,b.bind(null,h,s));return f||o}function b(i,A,h){i===void 0&&(i=0),A===void 0&&(A=0);var s=Math.min(A,h.duration+(h.deltaPTS?h.deltaPTS:0));return h.start+h.duration-s<=i?1:h.start-s>i&&h.start?-1:0}function t(i,A,h){var s=Math.min(A,h.duration+(h.deltaPTS?h.deltaPTS:0))*1e3,o=h.endProgramDateTime||0;return o-s>i}function E(i,A){return M.default.search(i,function(h){return h.cc<A?1:h.cc>A?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"FragmentState",function(){return B}),O.d(Q,"FragmentTracker",function(){return R});var K=O("./src/events.ts"),M=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 R=function(){function E(A){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=A,this._registerListeners()}var i=E.prototype;return i._registerListeners=function(){var h=this.hls;h.on(K.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.on(K.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.on(K.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var h=this.hls;h.off(K.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.off(K.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.off(K.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(h,s){if(s===M.PlaylistLevelType.MAIN){var o=this.activeFragment,f=this.activeParts;if(!o)return null;if(f)for(var l=f.length;l--;){var c=f[l],a=c?c.end:o.appendedPTS;if(c.start<=h&&a!==void 0&&h<=a)return l>9&&(this.activeParts=f.slice(l-9)),c}else if(o.start<=h&&o.appendedPTS!==void 0&&h<=o.appendedPTS)return o}return this.getBufferedFrag(h,s)},i.getBufferedFrag=function(h,s){for(var o=this.fragments,f=Object.keys(o),l=f.length;l--;){var c=o[f[l]];if((c==null?void 0:c.body.type)===s&&c.buffered){var a=c.body;if(a.start<=h&&h<=a.end)return a}}return null},i.detectEvictedFragments=function(h,s,o){var f=this;Object.keys(this.fragments).forEach(function(l){var c=f.fragments[l];if(!c)return;if(!c.buffered){c.body.type===o&&f.removeFragment(c.body);return}var a=c.range[h];if(!a)return;a.time.some(function(u){var v=!f.isTimeBuffered(u.startPTS,u.endPTS,s);return v&&f.removeFragment(c.body),v})})},i.detectPartialFragments=function(h){var s=this,o=this.timeRanges,f=h.frag,l=h.part;if(!o||f.sn==="initSegment")return;var c=t(f),a=this.fragments[c];if(!a)return;Object.keys(o).forEach(function(u){var v=f.elementaryStreams[u];if(!v)return;var T=o[u],x=l!==null||v.partial===!0;a.range[u]=s.getBufferedTimes(f,l,x,T)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},i.fragBuffered=function(h){var s=t(h),o=this.fragments[s];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},i.getBufferedTimes=function(h,s,o,f){for(var l={time:[],partial:o},c=s?s.start:h.start,a=s?s.end:h.end,u=h.minEndPTS||a,v=h.maxStartPTS||c,T=0;T<f.length;T++){var x=f.start(T)-this.bufferPadding,D=f.end(T)+this.bufferPadding;if(v>=x&&u<=D){l.time.push({startPTS:Math.max(c,f.start(T)),endPTS:Math.min(a,f.end(T))});break}else if(c<D&&a>x)l.partial=!0,l.time.push({startPTS:Math.max(c,f.start(T)),endPTS:Math.min(a,f.end(T))});else if(a<=x)break}return l},i.getPartialFragment=function(h){var s=null,o,f,l,c=0,a=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(v){var T=u[v];if(!T)return;b(T)&&(f=T.body.start-a,l=T.body.end+a,h>=f&&h<=l&&(o=Math.min(h-f,l-h),c<=o&&(s=T.body,c=o)))}),s},i.getState=function(h){var s=t(h),o=this.fragments[s];return o?o.buffered?b(o)?B.PARTIAL:B.OK:o.backtrack?B.BACKTRACKED:B.APPENDING:B.NOT_LOADED},i.backtrack=function(h,s){var o=t(h),f=this.fragments[o];if(!f||f.backtrack)return null;var l=f.backtrack=s||f.loaded;return f.loaded=null,l},i.getBacktrackData=function(h){var s=t(h),o=this.fragments[s];if(o){var f,l=o.backtrack;if(l!=null&&(f=l.payload)!==null&&f!==void 0&&f.byteLength)return l;this.removeFragment(h)}return null},i.isTimeBuffered=function(h,s,o){for(var f,l,c=0;c<o.length;c++){if(f=o.start(c)-this.bufferPadding,l=o.end(c)+this.bufferPadding,h>=f&&s<=l)return!0;if(s<=f)return!1}return!1},i.onFragLoaded=function(h,s){var o=s.frag,f=s.part;if(o.sn==="initSegment"||o.bitrateTest||f)return;var l=t(o);this.fragments[l]={body:o,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(h,s){var o=this,f=s.frag,l=s.part,c=s.timeRanges;if(f.type===M.PlaylistLevelType.MAIN)if(this.activeFragment=f,l){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(l)}else this.activeParts=null;this.timeRanges=c,Object.keys(c).forEach(function(u){var v=c[u];if(o.detectEvictedFragments(u,v),!l)for(var T=0;T<v.length;T++)f.appendedPTS=Math.max(v.end(T),f.appendedPTS||0)})},i.onFragBuffered=function(h,s){this.detectPartialFragments(s)},i.hasFragment=function(h){var s=t(h);return!!this.fragments[s]},i.removeFragmentsInRange=function(h,s,o){var f=this;Object.keys(this.fragments).forEach(function(l){var c=f.fragments[l];if(!c)return;if(c.buffered){var a=c.body;a.type===o&&a.start<s&&a.end>h&&f.removeFragment(a)}})},i.removeFragment=function(h){var s=t(h);h.stats.loaded=0,h.clearElementaryStreamInfo(),delete this.fragments[s]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},E}();function b(E){var i,A;return E.buffered&&(((i=E.range.video)===null||i===void 0?void 0:i.partial)||((A=E.range.audio)===null||A===void 0?void 0:A.partial))}function t(E){return E.type+"_"+E.level+"_"+E.urlId+"_"+E.sn}},"./src/controller/gap-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"STALL_MINIMUM_DURATION_MS",function(){return b}),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 i}),O.d(Q,"default",function(){return A});var K=O("./src/utils/buffer-helper.ts"),M=O("./src/errors.ts"),B=O("./src/events.ts"),R=O("./src/utils/logger.ts"),b=250,t=2,E=.1,i=.05,A=function(){function h(o,f,l,c){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=o,this.media=f,this.fragmentTracker=l,this.hls=c}var s=h.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(f){var l=this.config,c=this.media,a=this.stalled,u=c.currentTime,v=c.seeking,T=this.seeking&&!v,x=!this.seeking&&v;if(this.seeking=v,u!==f){if(this.moved=!0,a!==null){if(this.stallReported){var D=self.performance.now()-a;R.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||T)&&(this.stalled=null),c.paused||c.ended||c.playbackRate===0||!K.BufferHelper.getBuffered(c).length)return;var w=K.BufferHelper.bufferInfo(c,u,0),p=w.len>0,n=w.nextStart||0;if(!p&&!n)return;if(v){var d=w.len>t,m=!n||n-u>t&&!this.fragmentTracker.getPartialFragment(u);if(d||m)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,y=Math.max(n,w.start||0)-u,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,U=g==null||((C=g.details)===null||C===void 0)?void 0:C.live,k=U?g.details.targetduration*2:t;if(y>0&&y<=k){this._trySkipBufferHole(null);return}}var I=self.performance.now();if(a===null){this.stalled=I;return}var V=I-a;!v&&V>=b&&this._reportStall(w.len);var G=K.BufferHelper.bufferInfo(c,u,l.maxBufferHole);this._tryFixBufferStall(G,V)},s._tryFixBufferStall=function(f,l){var c=this.config,a=this.fragmentTracker,u=this.media,v=u.currentTime,T=a.getPartialFragment(v);if(T){var x=this._trySkipBufferHole(T);if(x)return}f.len>c.maxBufferHole&&l>c.highBufferWatchdogPeriod*1e3&&(R.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(f){var l=this.hls,c=this.media,a=this.stallReported;a||(this.stallReported=!0,R.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer (buffer="+f+")"),l.trigger(B.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},s._trySkipBufferHole=function(f){for(var l=this.config,c=this.hls,a=this.media,u=a.currentTime,v=0,T=K.BufferHelper.getBuffered(a),x=0;x<T.length;x++){var D=T.start(x);if(u+l.maxBufferHole>=v&&u<D){var w=Math.max(D+i,a.currentTime+E);return R.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+w),this.moved=!0,this.stalled=null,a.currentTime=w,f&&c.trigger(B.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+w,frag:f}),w}v=T.end(x)}return 0},s._tryNudgeBuffer=function(){var f=this.config,l=this.hls,c=this.media,a=c.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<f.nudgeMaxRetry){var v=a+u*f.nudgeOffset;R.logger.warn("Nudging 'currentTime' from "+a+" to "+v),c.currentTime=v,l.trigger(B.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else R.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+f.nudgeMaxRetry+" nudges"),l.trigger(B.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},h}()},"./src/controller/id3-track-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts"),M=O("./src/utils/texttrack-utils.ts"),B=O("./src/demux/id3.ts"),R=.25,b=function(){function t(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var E=t.prototype;return E.destroy=function(){this._unregisterListeners()},E._registerListeners=function(){var A=this.hls;A.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(K.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.on(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var A=this.hls;A.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(K.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.off(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.onMediaAttached=function(A,h){this.media=h.media},E.onMediaDetaching=function(){if(!this.id3Track)return;Object(M.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},E.getID3Track=function(A){if(!this.media)return;for(var h=0;h<A.length;h++){var s=A[h];if(s.kind==="metadata"&&s.label==="id3")return Object(M.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},E.onFragParsingMetadata=function(A,h){if(!this.media)return;var s=h.frag,o=h.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<o.length;l++){var c=B.getID3Frames(o[l].data);if(c){var a=o[l].pts,u=l<o.length-1?o[l+1].pts:s.end,v=u-a;v<=0&&(u=a+R);for(var T=0;T<c.length;T++){var x=c[T];if(!B.isTimeStampFrame(x)){var D=new f(a,u,"");D.value=x,this.id3Track.addCue(D)}}}}},E.onBufferFlushing=function(A,h){var s=h.startOffset,o=h.endOffset,f=h.type;if(!f||f==="audio"){var l=this.id3Track;l&&Object(M.removeCuesInRange)(l,s,o)}},t}();Q.default=b},"./src/controller/latency-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return t});var K=O("./src/errors.ts"),M=O("./src/events.ts"),B=O("./src/utils/logger.ts");function R(E,i){for(var A=0;A<i.length;A++){var h=i[A];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function b(E,i,A){return i&&R(E.prototype,i),A&&R(E,A),E}var t=function(){function E(A){var h=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 h.timeupdate()},this.hls=A,this.config=A.config,this.registerListeners()}var i=E.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(M.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(M.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(M.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(M.Events.ERROR,this.onError)},i.onMediaAttached=function(h,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(h,s){var o=s.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(h,s){if(s.details!==K.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,B.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var h=this.media,s=this.levelDetails;if(!h||!s)return;this.currentTime=h.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var f=this.config,l=f.lowLatencyMode,c=f.maxLiveSyncPlaybackRate;if(!l||c===1)return;var a=this.targetLatency;if(a===null)return;var u=o-a,v=Math.min(this.maxLatency,a+s.targetduration),T=u<v;if(s.live&&T&&u>.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,c)),D=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;h.playbackRate=Math.min(x,Math.max(1,D))}else h.playbackRate!==1&&h.playbackRate!==0&&(h.playbackRate=1)},i.estimateLiveEdge=function(){var h=this.levelDetails;return h===null?null:h.edge+h.age},i.computeLatency=function(){var h=this.estimateLiveEdge();return h===null?null:h-this.currentTime},b(E,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var h=this.config,s=this.levelDetails;return h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:s?h.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var h=this.levelDetails;if(h===null)return null;var s=h.holdBack,o=h.partHoldBack,f=h.targetduration,l=this.config,c=l.liveSyncDuration,a=l.liveSyncDurationCount,u=l.lowLatencyMode,v=this.hls.userConfig,T=u&&o||s;(v.liveSyncDuration||v.liveSyncDurationCount||T===0)&&(T=c!==void 0?c:a*f);var x=f,D=1;return T+Math.min(this.stallCount*D,x)}},{key:"liveSyncPosition",get:function(){var h=this.estimateLiveEdge(),s=this.targetLatency,o=this.levelDetails;if(h===null||s===null||o===null)return null;var f=o.edge,l=h-s-this.edgeStalled,c=f-o.totalduration,a=f-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(c,l),a)}},{key:"drift",get:function(){var h=this.levelDetails;return h===null?1:h.drift}},{key:"edgeStalled",get:function(){var h=this.levelDetails;if(h===null)return 0;var s=(this.config.lowLatencyMode&&h.partTarget||h.targetduration)*3;return Math.max(h.age-s,0)}},{key:"forwardBufferLength",get:function(){var h=this.media,s=this.levelDetails;if(!h||!s)return 0;var o=h.buffered.length;return o?h.buffered.end(o-1):s.edge-this.currentTime}}]),E}()},"./src/controller/level-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return l});var K=O("./src/types/level.ts"),M=O("./src/events.ts"),B=O("./src/errors.ts"),R=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),t=O("./src/controller/base-playlist-controller.ts"),E=O("./src/types/loader.ts");function i(){return i=Object.assign||function(c){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&(c[v]=u[v])}return c},i.apply(this,arguments)}function A(c,a){for(var u=0;u<a.length;u++){var v=a[u];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,v.key,v)}}function h(c,a,u){return a&&A(c.prototype,a),u&&A(c,u),c}function s(c,a){c.prototype=Object.create(a.prototype),c.prototype.constructor=c,o(c,a)}function o(c,a){return o=Object.setPrototypeOf||function(v,T){return v.__proto__=T,v},o(c,a)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(c){s(a,c);function a(v){var T;return T=c.call(this,v,"[level-controller]")||this,T._levels=[],T._firstLevel=-1,T._startLevel=void 0,T.currentLevelIndex=-1,T.manualLevelIndex=-1,T.onParsedComplete=void 0,T._registerListeners(),T}var u=a.prototype;return u._registerListeners=function(){var T=this.hls;T.on(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(M.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),T.on(M.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var T=this.hls;T.off(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),T.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(M.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),T.off(M.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,c.prototype.destroy.call(this)},u.startLoad=function(){var T=this._levels;T.forEach(function(x){x.loadError=0}),c.prototype.startLoad.call(this)},u.onManifestLoaded=function(T,x){var D=[],w=[],p=[],n,d={},m,C=!1,y=!1,g=!1;if(x.levels.forEach(function(V){var G=V.attrs;C=C||!!(V.width&&V.height),y=y||!!V.videoCodec,g=g||!!V.audioCodec,f&&V.audioCodec&&V.audioCodec.indexOf("mp4a.40.34")!==-1&&(V.audioCodec=void 0);var L=V.bitrate+"-"+V.attrs.RESOLUTION+"-"+V.attrs.CODECS;m=d[L],m?m.url.push(V.url):(m=new K.Level(V),d[L]=m,D.push(m)),G&&(G.AUDIO&&Object(b.addGroupId)(m,"audio",G.AUDIO),G.SUBTITLES&&Object(b.addGroupId)(m,"text",G.SUBTITLES))}),(C||y)&&g&&(D=D.filter(function(V){var G=V.videoCodec,L=V.width,$=V.height;return!!G||!!(L&&$)})),D=D.filter(function(V){var G=V.audioCodec,L=V.videoCodec;return(!G||Object(R.isCodecSupportedInMp4)(G,"audio"))&&(!L||Object(R.isCodecSupportedInMp4)(L,"video"))}),x.audioTracks&&(w=x.audioTracks.filter(function(V){return!V.audioCodec||Object(R.isCodecSupportedInMp4)(V.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(w)),x.subtitles&&(p=x.subtitles,Object(b.assignTrackIdsByGroup)(p)),D.length>0){n=D[0].bitrate,D.sort(function(V,G){return V.bitrate-G.bitrate}),this._levels=D;for(var U=0;U<D.length;U++)if(D[U].bitrate===n){this._firstLevel=U,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+n);break}var k=g&&!y,I={levels:D,audioTracks:w,subtitleTracks:p,firstLevel:this._firstLevel,stats:x.stats,audio:g,video:y,altAudio:!k&&w.some(function(V){return!!V.url})};this.hls.trigger(M.Events.MANIFEST_PARSED,I),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(M.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"})},u.onError=function(T,x){if(c.prototype.onError.call(this,T,x),x.fatal)return;var D=x.context,w=this._levels[this.currentLevelIndex];if(D&&(D.type===E.PlaylistContextType.AUDIO_TRACK&&w.audioGroupIds&&D.groupId===w.audioGroupIds[w.urlId]||D.type===E.PlaylistContextType.SUBTITLE_TRACK&&w.textGroupIds&&D.groupId===w.textGroupIds[w.urlId])){this.redundantFailover(this.currentLevelIndex);return}var p=!1,n=!0,d;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 m=this._levels[x.frag.level];m?(m.fragmentError++,m.fragmentError>this.hls.config.fragLoadingMaxRetry&&(d=x.frag.level)):d=x.frag.level}break;case B.ErrorDetails.LEVEL_LOAD_ERROR:case B.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(n=!1),d=D.level),p=!0;break;case B.ErrorDetails.REMUX_ALLOC_ERROR:d=x.level,p=!0;break}d!==void 0&&this.recoverLevel(x,d,p,n)},u.recoverLevel=function(T,x,D,w){var p=T.details,n=this._levels[x];if(n.loadError++,D){var d=this.retryLoadingOrFail(T);if(d)T.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var m=n.url.length;if(m>1&&n.loadError<m)T.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(p+": switch to "+C),T.levelRetry=!0,this.hls.nextAutoLevel=C)}}},u.redundantFailover=function(T){var x=this._levels[T],D=x.url.length;if(D>1){var w=(x.urlId+1)%D;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(p){p.urlId=w}),this.level=T}},u.onFragLoaded=function(T,x){var D=x.frag;if(D!==void 0&&D.type===E.PlaylistLevelType.MAIN){var w=this._levels[D.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},u.onLevelLoaded=function(T,x){var D,w=x.level,p=x.details,n=this._levels[w];if(!n){var d;this.warn("Invalid level index "+w),(d=x.deliveryDirectives)!==null&&d!==void 0&&d.skip&&(p.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(w,x,n.details)):(D=x.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(p.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(T,x){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var w=-1,p=this.hls.audioTracks[x.id].groupId,n=0;n<D.audioGroupIds.length;n++)if(D.audioGroupIds[n]===p){w=n;break}w!==D.urlId&&(D.urlId=w,this.startLoad())}},u.loadPlaylist=function(T){var x=this.currentLevelIndex,D=this._levels[x];if(this.canLoad&&D&&D.url.length>0){var w=D.urlId,p=D.url[w];if(T)try{p=T.addDirectives(p)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+x+(T?" at sn "+T.msn+" part "+T.part:"")+" with URL-id "+w+" "+p),this.clearTimer(),this.hls.trigger(M.Events.LEVEL_LOADING,{url:p,level:x,id:w,deliveryDirectives:T||null})}},u.removeLevel=function(T,x){var D=function(n,d){return d!==x},w=this._levels.filter(function(p,n){return n!==T?!0:p.url.length>1&&x!==void 0?(p.url=p.url.filter(D),p.audioGroupIds&&(p.audioGroupIds=p.audioGroupIds.filter(D)),p.textGroupIds&&(p.textGroupIds=p.textGroupIds.filter(D)),p.urlId=0,!0):!1}).map(function(p,n){var d=p.details;return d!=null&&d.fragments&&d.fragments.forEach(function(m){m.level=n}),p});this._levels=w,this.hls.trigger(M.Events.LEVELS_UPDATED,{levels:w})},h(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(T){var x,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===T&&(x=D[T])!==null&&x!==void 0&&x.details)return;if(T<0||T>=D.length){var w=T<0;if(this.hls.trigger(M.Events.ERROR,{type:B.ErrorTypes.OTHER_ERROR,details:B.ErrorDetails.LEVEL_SWITCH_ERROR,level:T,fatal:w,reason:"invalid level idx"}),w)return;T=Math.min(T,D.length-1)}this.clearTimer();var p=this.currentLevelIndex,n=D[p],d=D[T];this.log("switching to level "+T+" from "+p),this.currentLevelIndex=T;var m=i({},d,{level:T,maxBitrate:d.maxBitrate,uri:d.uri,urlId:d.urlId});delete m._urlId,this.hls.trigger(M.Events.LEVEL_SWITCHING,m);var C=d.details;if(!C||C.live){var y=this.switchParams(d.uri,n==null?void 0:n.details);this.loadPlaylist(y)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(T){this.manualLevelIndex=T,this._startLevel===void 0&&(this._startLevel=T),T!==-1&&(this.level=T)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(T){this._firstLevel=T}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var T=this.hls.config.startLevel;return T!==void 0?T:this._firstLevel}else return this._startLevel},set:function(T){this._startLevel=T}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(T){this.level=T,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=T)}}]),a}(t.default)},"./src/controller/level-helper.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"addGroupId",function(){return B}),O.d(Q,"assignTrackIdsByGroup",function(){return R}),O.d(Q,"updatePTS",function(){return b}),O.d(Q,"updateFragPTSDTS",function(){return E}),O.d(Q,"mergeDetails",function(){return i}),O.d(Q,"mapPartIntersection",function(){return A}),O.d(Q,"mapFragmentIntersection",function(){return h}),O.d(Q,"adjustSliding",function(){return s}),O.d(Q,"addSliding",function(){return o}),O.d(Q,"computeReloadInterval",function(){return f}),O.d(Q,"getFragmentWithSN",function(){return l}),O.d(Q,"getPartWith",function(){return c});var K=O("./src/polyfills/number.ts"),M=O("./src/utils/logger.ts");function B(a,u,v){switch(u){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(v);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(v);break}}function R(a){var u={};a.forEach(function(v){var T=v.groupId||"";v.id=u[T]=u[T]||0,u[T]++})}function b(a,u,v){var T=a[u],x=a[v];t(T,x)}function t(a,u){var v=u.startPTS;if(Object(K.isFiniteNumber)(v)){var T=0,x;u.sn>a.sn?(T=v-a.start,x=a):(T=a.start-v,x=u),x.duration!==T&&(x.duration=T)}else if(u.sn>a.sn){var D=a.cc===u.cc;D&&a.minEndPTS?u.start=a.start+(a.minEndPTS-a.start):u.start=a.start+a.duration}else u.start=Math.max(a.start-u.duration,0)}function E(a,u,v,T,x,D){var w=T-v;w<=0&&(M.logger.warn("Fragment should have a positive duration",u),T=v+u.duration,D=x+u.duration);var p=v,n=T,d=u.startPTS,m=u.endPTS;if(Object(K.isFiniteNumber)(d)){var C=Math.abs(d-v);Object(K.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(C,u.deltaPTS):u.deltaPTS=C,p=Math.max(v,d),v=Math.min(v,d),x=Math.min(x,u.startDTS),n=Math.min(T,m),T=Math.max(T,m),D=Math.max(D,u.endDTS)}u.duration=T-v;var y=v-u.start;u.appendedPTS=T,u.start=u.startPTS=v,u.maxStartPTS=p,u.startDTS=x,u.endPTS=T,u.minEndPTS=n,u.endDTS=D;var g=u.sn;if(!a||g<a.startSN||g>a.endSN)return 0;var U,k=g-a.startSN,I=a.fragments;for(I[k]=u,U=k;U>0;U--)t(I[U],I[U-1]);for(U=k;U<I.length-1;U++)t(I[U],I[U+1]);return a.fragmentHint&&t(I[I.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,y}function i(a,u){for(var v=null,T=a.fragments,x=T.length-1;x>=0;x--){var D=T[x].initSegment;if(D){v=D;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var w=0,p;if(h(a,u,function(U,k){U.relurl&&(w=U.cc-k.cc),Object(K.isFiniteNumber)(U.startPTS)&&Object(K.isFiniteNumber)(U.endPTS)&&(k.start=k.startPTS=U.startPTS,k.startDTS=U.startDTS,k.appendedPTS=U.appendedPTS,k.maxStartPTS=U.maxStartPTS,k.endPTS=U.endPTS,k.endDTS=U.endDTS,k.minEndPTS=U.minEndPTS,k.duration=U.endPTS-U.startPTS,k.duration&&(p=k),u.PTSKnown=u.alignedSliding=!0),k.elementaryStreams=U.elementaryStreams,k.loader=U.loader,k.stats=U.stats,k.urlId=U.urlId,U.initSegment&&(k.initSegment=U.initSegment,v=U.initSegment)}),v){var n=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;n.forEach(function(U){var k;(!U.initSegment||U.initSegment.relurl===((k=v)===null||k===void 0?void 0:k.relurl))&&(U.initSegment=v)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(U){return!U}),u.deltaUpdateFailed)){M.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var d=u.skippedSegments;d--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var m=u.fragments;if(w){M.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C<m.length;C++)m[C].cc+=w}u.skippedSegments&&(u.startCC=u.fragments[0].cc),A(a.partList,u.partList,function(U,k){k.elementaryStreams=U.elementaryStreams,k.stats=U.stats}),p?E(u,p,p.startPTS,p.endPTS,p.startDTS,p.endDTS):s(a,u),m.length&&(u.totalduration=u.edge-m[0].start),u.driftStartTime=a.driftStartTime,u.driftStart=a.driftStart;var y=u.advancedDateTime;if(u.advanced&&y){var g=u.edge;u.driftStart||(u.driftStartTime=y,u.driftStart=g),u.driftEndTime=y,u.driftEnd=g}else u.driftEndTime=a.driftEndTime,u.driftEnd=a.driftEnd,u.advancedDateTime=a.advancedDateTime}function A(a,u,v){if(a&&u)for(var T=0,x=0,D=a.length;x<=D;x++){var w=a[x],p=u[x+T];w&&p&&w.index===p.index&&w.fragment.sn===p.fragment.sn?v(w,p):T--}}function h(a,u,v){for(var T=u.skippedSegments,x=Math.max(a.startSN,u.startSN)-u.startSN,D=(a.fragmentHint?1:0)+(T?u.endSN:Math.min(a.endSN,u.endSN))-u.startSN,w=u.startSN-a.startSN,p=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,n=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,d=x;d<=D;d++){var m=n[w+d],C=p[d];T&&!C&&d<T&&(C=u.fragments[d]=m),m&&C&&v(m,C)}}function s(a,u){var v=u.startSN+u.skippedSegments-a.startSN,T=a.fragments;if(v<0||v>=T.length)return;o(u,T[v].start)}function o(a,u){if(u){for(var v=a.fragments,T=a.skippedSegments;T<v.length;T++)v[T].start+=u;a.fragmentHint&&(a.fragmentHint.start+=u)}}function f(a,u){var v=1e3*a.levelTargetDuration,T=v/2,x=a.age,D=x>0&&x<v*3,w=u.loading.end-u.loading.start,p,n=a.availabilityDelay;if(a.updated===!1)if(D){var d=333*a.misses;p=Math.max(Math.min(T,w*2),d),a.availabilityDelay=(a.availabilityDelay||0)+p}else p=T;else D?(n=Math.min(n||v/2,x),a.availabilityDelay=n,p=n+v-x):p=v-w;return Math.round(p)}function l(a,u,v){if(!a||!a.details)return null;var T=a.details,x=T.fragments[u-T.startSN];return x||(x=T.fragmentHint,x&&x.sn===u?x:u<T.startSN&&v&&v.sn===u?v:null)}function c(a,u,v){if(!a||!a.details)return null;var T=a.details.partList;if(T)for(var x=T.length;x--;){var D=T[x];if(D.index===v&&D.fragment.sn===u)return D}return null}},"./src/controller/stream-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return T});var K=O("./src/polyfills/number.ts"),M=O("./src/controller/base-stream-controller.ts"),B=O("./src/is-supported.ts"),R=O("./src/events.ts"),b=O("./src/utils/buffer-helper.ts"),t=O("./src/controller/fragment-tracker.ts"),E=O("./src/types/loader.ts"),i=O("./src/loader/fragment.ts"),A=O("./src/demux/transmuxer-interface.ts"),h=O("./src/types/transmuxer.ts"),s=O("./src/controller/gap-controller.ts"),o=O("./src/errors.ts"),f=O("./src/utils/logger.ts");function l(x,D){for(var w=0;w<D.length;w++){var p=D[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(x,p.key,p)}}function c(x,D,w){return D&&l(x.prototype,D),w&&l(x,w),x}function a(x,D){x.prototype=Object.create(D.prototype),x.prototype.constructor=x,u(x,D)}function u(x,D){return u=Object.setPrototypeOf||function(p,n){return p.__proto__=n,p},u(x,D)}var v=100,T=function(x){a(D,x);function D(p,n){var d;return d=x.call(this,p,n,"[stream-controller]")||this,d.audioCodecSwap=!1,d.gapController=null,d.level=-1,d._forceStartLoad=!1,d.altAudio=!1,d.audioOnly=!1,d.fragPlaying=null,d.onvplaying=null,d.onvseeked=null,d.fragLastKbps=0,d.stalled=!1,d.couldBacktrack=!1,d.audioCodecSwitch=!1,d.videoBuffer=null,d._registerListeners(),d}var w=D.prototype;return w._registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.on(R.Events.ERROR,this.onError,this),n.on(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(R.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.off(R.Events.ERROR,this.onError,this),n.off(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(R.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},w.startLoad=function(n){if(this.levels){var d=this.lastCurrentTime,m=this.hls;if(this.stopLoad(),this.setInterval(v),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var C=m.startLevel;C===-1&&(m.config.testBandwidth?(C=0,this.bitrateTest=!0):C=m.nextAutoLevel),this.level=m.nextLoadLevel=C,this.loadedmetadata=!1}d>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),n=d),this.state=M.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=M.State.STOPPED},w.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},w.doTick=function(){switch(this.state){case M.State.IDLE:this.doTickIdle();break;case M.State.WAITING_LEVEL:{var n,d=this.levels,m=this.level,C=d==null||((n=d[m])===null||n===void 0)?void 0:n.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=M.State.IDLE;break}break}case M.State.FRAG_LOADING_WAITING_RETRY:{var y,g=self.performance.now(),U=this.retryDate;(!U||g>=U||(y=this.media)!==null&&y!==void 0&&y.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=M.State.IDLE)}break;default:break}this.onTickEnd()},w.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},w.doTickIdle=function(){var n,d,m=this.hls,C=this.levelLastLoaded,y=this.levels,g=this.media,U=m.config,k=m.nextLoadLevel;if(C===null||!g&&(this.startFragRequested||!U.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!y||!y[k])return;var I=y[k];this.level=m.nextLoadLevel=k;var V=I.details;if(!V||this.state===M.State.WAITING_LEVEL||V.live&&this.levelLastLoaded!==k){this.state=M.State.WAITING_LEVEL;return}var G=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,E.PlaylistLevelType.MAIN);if(G===null)return;var L=G.len,$=this.getMaxBufferLength(I.maxBitrate);if(L>=$)return;if(this._streamEnded(G,V)){var Y={};this.altAudio&&(Y.type="video"),this.hls.trigger(R.Events.BUFFER_EOS,Y),this.state=M.State.ENDED;return}var ne=G.end,se=this.getNextFragment(ne,V);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var _e=se.sn-V.startSN;_e>1&&(se=V.fragments[_e-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===t.FragmentState.OK&&this.nextLoadPosition>ne){var ve=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,ve,E.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,V)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((n=se.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((d=se.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(se,V):this.loadFragment(se,V,ne)},w.loadFragment=function(n,d,m){var C,y=this.fragmentTracker.getState(n);if(this.fragCurrent=n,y===t.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(n);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else y=t.FragmentState.NOT_LOADED}y===t.FragmentState.NOT_LOADED||y===t.FragmentState.PARTIAL?n.sn==="initSegment"?this._loadInitSegment(n):this.bitrateTest?(n.bitrateTest=!0,this.log("Fragment "+n.sn+" of level "+n.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(n)):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,n,d,m)):y===t.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},w.getAppendedFrag=function(n){var d=this.fragmentTracker.getAppendedFrag(n,E.PlaylistLevelType.MAIN);return d&&"fragment"in d?d.fragment:d},w.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,E.PlaylistLevelType.MAIN)},w.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},w.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},w.nextLevelSwitch=function(){var n=this.levels,d=this.media;if(d!=null&&d.readyState){var m,C=this.getAppendedFrag(d.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!d.paused&&n){var y=this.hls.nextLoadLevel,g=n[y],U=this.fragLastKbps;U&&this.fragCurrent?m=this.fragCurrent.duration*g.maxBitrate/(1e3*U)+1:m=0}else m=0;var k=this.getBufferedFrag(d.currentTime+m);if(k){var I=this.followingBufferedFrag(k);if(I){this.abortCurrentFrag();var V=I.maxStartPTS?I.maxStartPTS:I.start,G=I.duration,L=Math.max(k.end,V+Math.min(Math.max(G-this.config.maxFragLookUpTolerance,G*.5),G*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},w.abortCurrentFrag=function(){var n=this.fragCurrent;this.fragCurrent=null,n!=null&&n.loader&&n.loader.abort(),this.state===M.State.KEY_LOADING&&(this.state=M.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},w.flushMainBuffer=function(n,d){x.prototype.flushMainBuffer.call(this,n,d,this.altAudio?"video":null)},w.onMediaAttached=function(n,d){x.prototype.onMediaAttached.call(this,n,d);var m=d.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),m.addEventListener("playing",this.onvplaying),m.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,m,this.fragmentTracker,this.hls)},w.onMediaDetaching=function(){var n=this.media;n&&(n.removeEventListener("playing",this.onvplaying),n.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)},w.onMediaPlaying=function(){this.tick()},w.onMediaSeeked=function(){var n=this.media,d=n?n.currentTime:null;Object(K.isFiniteNumber)(d)&&this.log("Media seeked to "+d.toFixed(3)),this.tick()},w.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(R.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},w.onManifestParsed=function(n,d){var m=!1,C=!1,y;d.levels.forEach(function(g){y=g.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(m=!0),y.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=m&&C&&!Object(B.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=d.levels,this.startFragRequested=!1},w.onLevelLoading=function(n,d){var m=this.levels;if(!m||this.state!==M.State.IDLE)return;var C=m[d.level];(!C.details||C.details.live&&this.levelLastLoaded!==d.level||this.waitForCdnTuneIn(C.details))&&(this.state=M.State.WAITING_LEVEL)},w.onLevelLoaded=function(n,d){var m,C=this.levels,y=d.level,g=d.details,U=g.totalduration;if(!C){this.warn("Levels were reset while loading level "+y);return}this.log("Level "+y+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+U);var k=this.fragCurrent;k&&(this.state===M.State.FRAG_LOADING||this.state===M.State.FRAG_LOADING_WAITING_RETRY)&&(k.level!==d.level&&k.loader&&(this.state=M.State.IDLE,k.loader.abort()));var I=C[y],V=0;if(g.live||(m=I.details)!==null&&m!==void 0&&m.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;V=this.alignPlaylists(g,I.details)}if(I.details=g,this.levelLastLoaded=y,this.hls.trigger(R.Events.LEVEL_UPDATED,{details:g,level:y}),this.state===M.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=M.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,V),this.tick()},w._handleFragmentLoadProgress=function(n){var d,m=n.frag,C=n.part,y=n.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var U=g[m.level],k=U.details;if(!k){this.warn("Dropping fragment "+m.sn+" of level "+m.level+" after level details were reset");return}var I=U.videoCodec,V=k.PTSKnown||!k.live,G=(d=m.initSegment)===null||d===void 0?void 0:d.data,L=this._getAudioCodec(U),$=this.transmuxer=this.transmuxer||new A.default(this.hls,E.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Y=C?C.index:-1,ne=Y!==-1,se=new h.ChunkMetadata(m.level,m.sn,m.stats.chunkCount,y.byteLength,Y,ne),_e=this.initPTS[m.cc];$.push(y,G,L,I,m,C,k.totalduration,V,se,_e)},w.onAudioTrackSwitching=function(n,d){var m=this.altAudio,C=!!d.url,y=d.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 g=this.fragCurrent;g!=null&&g.loader&&(this.log("Switching to main audio track, cancel main fragment load"),g.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var U=this.hls;m&&U.trigger(R.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),U.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:y})}},w.onAudioTrackSwitched=function(n,d){var m=d.id,C=!!this.hls.audioTracks[m].url;if(C){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=C,this.tick()},w.onBufferCreated=function(n,d){var m=d.tracks,C,y,g=!1;for(var U in m){var k=m[U];if(k.id==="main"){if(y=U,C=k,U==="video"){var I=m[U];I&&(this.videoBuffer=I.buffer)}}else g=!0}g&&C?(this.log("Alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},w.onFragBuffered=function(n,d){var m=d.frag,C=d.part;if(m&&m.type!==E.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(C?" p: "+C.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state),this.state===M.State.PARSED&&(this.state=M.State.IDLE);return}var y=C?C.stats:m.stats;this.fragLastKbps=Math.round(8*y.total/(y.buffering.end-y.loading.first)),m.sn!=="initSegment"&&(this.fragPrevious=m),this.fragBufferedComplete(m,C)},w.onError=function(n,d){switch(d.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.MAIN,d);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==M.State.ERROR&&(d.fatal?(this.warn(""+d.details),this.state=M.State.ERROR):!d.levelRetry&&this.state===M.State.WAITING_LEVEL&&(this.state=M.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="main"&&(this.state===M.State.PARSING||this.state===M.State.PARSED)){var m=!0,C=this.getFwdBufferInfo(this.media,E.PlaylistLevelType.MAIN);C&&C.len>.5&&(m=!this.reduceMaxBufferLength(C.len)),m&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},w.checkBuffer=function(){var n=this.media,d=this.gapController;if(!n||!d||!n.readyState)return;var m=b.BufferHelper.getBuffered(n);!this.loadedmetadata&&m.length?(this.loadedmetadata=!0,this.seekToStartPos()):d.poll(this.lastCurrentTime),this.lastCurrentTime=n.currentTime},w.onFragLoadEmergencyAborted=function(){this.state=M.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},w.onBufferFlushed=function(n,d){var m=d.type;if(m!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(m===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,m,E.PlaylistLevelType.MAIN)}},w.onLevelsUpdated=function(n,d){this.levels=d.levels},w.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},w.seekToStartPos=function(){var n=this.media,d=n.currentTime,m=this.startPosition;if(m>=0&&d<m){if(n.seeking){f.logger.log("could not seek to "+m+", already seeking at "+d);return}var C=b.BufferHelper.getBuffered(n),y=C.length?C.start(0):0,g=y-m;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+g+" to match buffer start"),m+=g,this.startPosition=m),this.log("seek to target start position "+m+" from current time "+d),n.currentTime=m}},w._getAudioCodec=function(n){var d=this.config.defaultAudioCodec||n.audioCodec;return this.audioCodecSwap&&d&&(this.log("Swapping audio codec"),d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5"),d},w._loadBitrateTestFrag=function(n){var d=this;this._doFragLoad(n).then(function(m){var C=d.hls;if(!m||C.nextLoadLevel||d.fragContextChanged(n))return;d.fragLoadError=0,d.state=M.State.IDLE,d.startFragRequested=!1,d.bitrateTest=!1;var y=n.stats;y.parsing.start=y.parsing.end=y.buffering.start=y.buffering.end=self.performance.now(),C.trigger(R.Events.FRAG_LOADED,m)})},w._handleTransmuxComplete=function(n){var d,m="main",C=this.hls,y=n.remuxResult,g=n.chunkMeta,U=this.getCurrentContext(g);if(!U){this.warn("The loading context changed while buffering fragment "+g.sn+" of level "+g.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(g.level);return}var k=U.frag,I=U.part,V=U.level,G=y.video,L=y.text,$=y.id3,Y=y.initSegment,ne=this.altAudio?void 0:y.audio;if(this.fragContextChanged(k))return;if(this.state=M.State.PARSING,Y){Y.tracks&&(this._bufferInitSegment(V,Y.tracks,k,g),C.trigger(R.Events.FRAG_PARSING_INIT_SEGMENT,{frag:k,id:m,tracks:Y.tracks}));var se=Y.initPTS,_e=Y.timescale;Object(K.isFiniteNumber)(se)&&(this.initPTS[k.cc]=se,C.trigger(R.Events.INIT_PTS_FOUND,{frag:k,id:m,initPTS:se,timescale:_e}))}if(G&&y.independent!==!1){if(V.details){var ve=G.startPTS,Ce=G.endPTS,De=G.startDTS,Qe=G.endDTS;if(I)I.elementaryStreams[G.type]={startPTS:ve,endPTS:Ce,startDTS:De,endDTS:Qe};else if(G.firstKeyFrame&&G.independent&&(this.couldBacktrack=!0),G.dropped&&G.independent){var Se=this.getLoadPosition()+this.config.maxBufferHole;if(Se<ve){this.backtrack(k);return}k.setElementaryStreamInfo(G.type,k.start,Ce,k.start,Qe,!0)}k.setElementaryStreamInfo(G.type,ve,Ce,De,Qe),this.bufferFragmentData(G,k,I,g)}}else if(y.independent===!1){this.backtrack(k);return}if(ne){var Ie=ne.startPTS,Je=ne.endPTS,Et=ne.startDTS,Le=ne.endDTS;I&&(I.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:Ie,endPTS:Je,startDTS:Et,endDTS:Le}),k.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,Ie,Je,Et,Le),this.bufferFragmentData(ne,k,I,g)}if($!=null&&(d=$.samples)!==null&&d!==void 0&&d.length){var je={frag:k,id:m,samples:$.samples};C.trigger(R.Events.FRAG_PARSING_METADATA,je)}if(L){var st={frag:k,id:m,samples:L.samples};C.trigger(R.Events.FRAG_PARSING_USERDATA,st)}},w._bufferInitSegment=function(n,d,m,C){var y=this;if(this.state!==M.State.PARSING)return;this.audioOnly=!!d.audio&&!d.video,this.altAudio&&!this.audioOnly&&delete d.audio;var g=d.audio,U=d.video,k=d.audiovideo;if(g){var I=n.audioCodec,V=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(I&&(I.indexOf("mp4a.40.5")!==-1?I="mp4a.40.2":I="mp4a.40.5"),g.metadata.channelCount!==1&&V.indexOf("firefox")===-1&&(I="mp4a.40.5")),V.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(I="mp4a.40.2",this.log("Android: force audio codec to "+I)),n.audioCodec&&n.audioCodec!==I&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+I+'"'),g.levelCodec=I,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(I||"")+"/"+(n.audioCodec||"")+"/"+g.codec+"]")}U&&(U.levelCodec=n.videoCodec,U.id="main",this.log("Init video buffer, container:"+U.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+U.codec+"]")),k&&this.log("Init audiovideo buffer, container:"+k.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+k.codec+"]"),this.hls.trigger(R.Events.BUFFER_CODECS,d),Object.keys(d).forEach(function(G){var L=d[G],$=L.initSegment;$!=null&&$.byteLength&&y.hls.trigger(R.Events.BUFFER_APPENDING,{type:G,data:$,frag:m,part:null,chunkMeta:C,parent:m.type})}),this.tick()},w.backtrack=function(n){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(n);var d=this.fragmentTracker.backtrack(n);this.fragPrevious=null,this.nextLoadPosition=n.start,d?this.resetFragmentLoading(n):this.state=M.State.BACKTRACKING},w.checkFragmentChanged=function(){var n=this.media,d=null;if(n&&n.readyState>1&&n.seeking===!1){var m=n.currentTime;if(b.BufferHelper.isBuffered(n,m)?d=this.getAppendedFrag(m):b.BufferHelper.isBuffered(n,m+.1)&&(d=this.getAppendedFrag(m+.1)),d){var C=this.fragPlaying,y=d.level;(!C||d.sn!==C.sn||C.level!==y||d.urlId!==C.urlId)&&(this.hls.trigger(R.Events.FRAG_CHANGED,{frag:d}),(!C||C.level!==y)&&this.hls.trigger(R.Events.LEVEL_SWITCHED,{level:y}),this.fragPlaying=d)}}},c(D,[{key:"nextLevel",get:function(){var n=this.nextBufferedFrag;return n?n.level:-1}},{key:"currentLevel",get:function(){var n=this.media;if(n){var d=this.getAppendedFrag(n.currentTime);if(d)return d.level}return-1}},{key:"nextBufferedFrag",get:function(){var n=this.media;if(n){var d=this.getAppendedFrag(n.currentTime);return this.followingBufferedFrag(d)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(M.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"SubtitleStreamController",function(){return a});var K=O("./src/events.ts"),M=O("./src/utils/logger.ts"),B=O("./src/utils/buffer-helper.ts"),R=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),t=O("./src/controller/level-helper.ts"),E=O("./src/controller/fragment-tracker.ts"),i=O("./src/controller/base-stream-controller.ts"),A=O("./src/types/loader.ts"),h=O("./src/types/level.ts");function s(u,v){for(var T=0;T<v.length;T++){var x=v[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}function o(u,v,T){return v&&s(u.prototype,v),T&&s(u,T),u}function f(u,v){u.prototype=Object.create(v.prototype),u.prototype.constructor=u,l(u,v)}function l(u,v){return l=Object.setPrototypeOf||function(x,D){return x.__proto__=D,x},l(u,v)}var c=500,a=function(u){f(v,u);function v(x,D){var w;return w=u.call(this,x,D,"[subtitle-stream-controller]")||this,w.levels=[],w.currentTrackId=-1,w.tracksBuffered=[],w.mainDetails=null,w._registerListeners(),w}var T=v.prototype;return T.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},T._registerListeners=function(){var D=this.hls;D.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(K.Events.ERROR,this.onError,this),D.on(K.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(K.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(K.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T._unregisterListeners=function(){var D=this.hls;D.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(K.Events.ERROR,this.onError,this),D.off(K.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(K.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(K.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(K.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},T.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(c),this.tick()},T.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},T.onLevelLoaded=function(D,w){this.mainDetails=w.details},T.onSubtitleFragProcessed=function(D,w){var p=w.frag,n=w.success;if(this.fragPrevious=p,this.state=i.State.IDLE,!n)return;var d=this.tracksBuffered[this.currentTrackId];if(!d)return;for(var m,C=p.start,y=0;y<d.length;y++)if(C>=d[y].start&&C<=d[y].end){m=d[y];break}var g=p.start+p.duration;m?m.end=g:(m={start:C,end:g},d.push(m)),this.fragmentTracker.fragBuffered(p)},T.onBufferFlushing=function(D,w){var p=w.startOffset,n=w.endOffset;if(p===0&&n!==Number.POSITIVE_INFINITY){var d=this.currentTrackId,m=this.levels;if(!m.length||!m[d]||!m[d].details)return;var C=m[d].details,y=C.targetduration,g=n-y;if(g<=0)return;w.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(U){for(var k=0;k<U.length;){if(U[k].end<=g){U.shift();continue}else if(U[k].start<g)U[k].start=g;else break;k++}}),this.fragmentTracker.removeFragmentsInRange(p,g,A.PlaylistLevelType.SUBTITLE)}},T.onError=function(D,w){var p,n=w.frag;if(!n||n.type!==A.PlaylistLevelType.SUBTITLE)return;(p=this.fragCurrent)!==null&&p!==void 0&&p.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},T.onSubtitleTracksUpdated=function(D,w){var p=this,n=w.subtitleTracks;this.tracksBuffered=[],this.levels=n.map(function(d){return new h.Level(d)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(d){p.tracksBuffered[d.id]=[]}),this.mediaBuffer=null},T.onSubtitleTrackSwitch=function(D,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var p=this.levels[this.currentTrackId];p!=null&&p.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,p&&this.setInterval(c)},T.onSubtitleTrackLoaded=function(D,w){var p,n=w.details,d=w.id,m=this.currentTrackId,C=this.levels;if(!C.length)return;var y=C[m];if(d>=C.length||d!==m||!y)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||(p=y.details)!==null&&p!==void 0&&p.live){var g=this.mainDetails;if(n.deltaUpdateFailed||!g)return;var U=g.fragments[0];if(!y.details)n.hasProgramDateTime&&g.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(n,g):U&&Object(t.addSliding)(n,U.start);else{var k=this.alignPlaylists(n,y.details);k===0&&U&&Object(t.addSliding)(n,U.start)}}if(y.details=n,this.levelLastLoaded=d,this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var I=Object(R.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);I||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}},T._handleFragmentLoadComplete=function(D){var w=D.frag,p=D.payload,n=w.decryptdata,d=this.hls;if(this.fragContextChanged(w))return;if(p&&p.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var m=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(p),n.key.buffer,n.iv.buffer).then(function(C){var y=performance.now();d.trigger(K.Events.FRAG_DECRYPTED,{frag:w,payload:C,stats:{tstart:m,tdecrypt:y}})})}},T.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var D,w=this.currentTrackId,p=this.levels;if(!p.length||!p[w]||!p[w].details)return;var n=p[w].details,d=n.targetduration,m=this.config,C=this.media,y=B.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-d,m.maxBufferHole),g=y.end,U=y.len,k=this.getMaxBufferLength()+d;if(U>k)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var I=n.fragments,V=I.length,G=n.edge,L,$=this.fragPrevious;if(g<G){var Y=m.maxFragLookUpTolerance;$&&n.hasProgramDateTime&&(L=Object(R.findFragmentByPDT)(I,$.endProgramDateTime,Y)),L||(L=Object(R.findFragmentByPTS)($,I,g,Y),!L&&$&&$.start<I[0].start&&(L=I[0]))}else L=I[V-1];(D=L)!==null&&D!==void 0&&D.encrypted?(M.logger.log("Loading key for "+L.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(K.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===E.FragmentState.NOT_LOADED&&this.loadFragment(L,n,g)}},T.loadFragment=function(D,w,p){this.fragCurrent=D,u.prototype.loadFragment.call(this,D,w,p)},o(v,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),v}(i.default)},"./src/controller/subtitle-track-controller.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/events.ts"),M=O("./src/utils/texttrack-utils.ts"),B=O("./src/controller/base-playlist-controller.ts"),R=O("./src/types/loader.ts");function b(s,o){for(var f=0;f<o.length;f++){var l=o[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function t(s,o,f){return o&&b(s.prototype,o),f&&b(s,f),s}function E(s,o){s.prototype=Object.create(o.prototype),s.prototype.constructor=s,i(s,o)}function i(s,o){return i=Object.setPrototypeOf||function(l,c){return l.__proto__=c,l},i(s,o)}var A=function(s){E(o,s);function o(l){var c;return c=s.call(this,l,"[subtitle-track-controller]")||this,c.media=null,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.selectDefaultTrack=!0,c.queuedDefaultTrack=-1,c.trackChangeListener=function(){return c.onTextTracksChanged()},c.asyncPollTrackChange=function(){return c.pollTrackChange(0)},c.useTextTrackPolling=!1,c.subtitlePollingInterval=-1,c.subtitleDisplay=!0,c.registerListeners(),c}var f=o.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},f.registerListeners=function(){var c=this.hls;c.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.on(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),c.on(K.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var c=this.hls;c.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(K.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(K.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.off(K.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),c.off(K.Events.ERROR,this.onError,this)},f.onMediaAttached=function(c,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)},f.pollTrackChange=function(c){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,c)},f.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 c=h(this.media.textTracks);c.forEach(function(a){Object(M.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(c,a){this.tracks=a.subtitleTracks},f.onSubtitleTrackLoaded=function(c,a){var u=a.id,v=a.details,T=this.trackId,x=this.tracksInGroup[T];if(!x){this.warn("Invalid subtitle track id "+u);return}var D=x.details;x.details=a.details,this.log("subtitle track "+u+" loaded ["+v.startSN+"-"+v.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,a,D))},f.onLevelLoading=function(c,a){this.switchLevel(a.level)},f.onLevelSwitching=function(c,a){this.switchLevel(a.level)},f.switchLevel=function(c){var a=this.hls.levels[c];if(!(a!=null&&a.textGroupIds))return;var u=a.textGroupIds[a.urlId];if(this.groupId!==u){var v=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,T=this.tracks.filter(function(w){return!u||w.groupId===u});this.tracksInGroup=T;var x=this.findTrackId(v==null?void 0:v.name)||this.findTrackId();this.groupId=u;var D={subtitleTracks:T};this.log("Updating subtitle tracks, "+T.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(K.Events.SUBTITLE_TRACKS_UPDATED,D),x!==-1&&this.setSubtitleTrack(x,v)}},f.findTrackId=function(c){for(var a=this.tracksInGroup,u=0;u<a.length;u++){var v=a[u];if((!this.selectDefaultTrack||v.default)&&(!c||c===v.name))return v.id}return-1},f.onError=function(c,a){if(s.prototype.onError.call(this,c,a),a.fatal||!a.context)return;a.context.type===R.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},f.loadPlaylist=function(c){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var u=a.id,v=a.groupId,T=a.url;if(c)try{T=c.addDirectives(T)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(K.Events.SUBTITLE_TRACK_LOADING,{url:T,id:u,groupId:v,deliveryDirectives:c||null})}},f.toggleTrackModes=function(c){var a=this,u=this.media,v=this.subtitleDisplay,T=this.trackId;if(!u)return;var x=h(u.textTracks),D=x.filter(function(n){return n.groupId===a.groupId});if(c===-1)[].slice.call(x).forEach(function(n){n.mode="disabled"});else{var w=D[T];w&&(w.mode="disabled")}var p=D[c];p&&(p.mode=v?"showing":"hidden")},f.setSubtitleTrack=function(c,a){var u,v=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=c;return}if(this.trackId!==c&&this.toggleTrackModes(c),this.trackId===c&&(c===-1||(u=v[c])!==null&&u!==void 0&&u.details)||c<-1||c>=v.length)return;this.clearTimer();var T=v[c];if(this.log("Switching to subtitle track "+c),this.trackId=c,T){var x=T.id,D=T.groupId,w=D===void 0?"":D,p=T.name,n=T.type,d=T.url;this.hls.trigger(K.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:w,name:p,type:n,url:d});var m=this.switchParams(T.url,a==null?void 0:a.details);this.loadPlaylist(m)}else this.hls.trigger(K.Events.SUBTITLE_TRACK_SWITCH,{id:c})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var c=-1,a=h(this.media.textTracks),u=0;u<a.length;u++)if(a[u].mode==="hidden")c=u;else if(a[u].mode==="showing"){c=u;break}this.subtitleTrack!==c&&(this.subtitleTrack=c)},t(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(c){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(c,a)}}]),o}(B.default);function h(s){for(var o=[],f=0;f<s.length;f++){var l=s[f];l.kind==="subtitles"&&l.label&&o.push(s[f])}return o}Q.default=A},"./src/controller/timeline-controller.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"TimelineController",function(){return h});var K=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),B=O("./src/utils/cea-608-parser.ts"),R=O("./src/utils/output-filter.ts"),b=O("./src/utils/webvtt-parser.ts"),t=O("./src/utils/texttrack-utils.ts"),E=O("./src/utils/imsc1-ttml-parser.ts"),i=O("./src/types/loader.ts"),A=O("./src/utils/logger.ts"),h=function(){function l(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=f(),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 u=new R.default(this,"textTrack1"),v=new R.default(this,"textTrack2"),T=new R.default(this,"textTrack3"),x=new R.default(this,"textTrack4");this.cea608Parser1=new B.default(1,u,v),this.cea608Parser2=new B.default(3,T,x)}a.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(M.Events.FRAG_LOADING,this.onFragLoading,this),a.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(M.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(M.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(M.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var c=l.prototype;return c.destroy=function(){var u=this.hls;u.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(M.Events.FRAG_LOADING,this.onFragLoading,this),u.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(M.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(M.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(M.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},c.addCues=function(u,v,T,x,D){for(var w=!1,p=D.length;p--;){var n=D[p],d=o(n[0],n[1],v,T);if(d>=0&&(n[0]=Math.min(n[0],v),n[1]=Math.max(n[1],T),w=!0,d/(T-v)>.5))return}if(w||D.push([v,T]),this.config.renderTextTracksNatively){var m=this.captionsTracks[u];this.Cues.newCue(m,v,T,x)}else{var C=this.Cues.newCue(null,v,T,x);this.hls.trigger(M.Events.CUES_PARSED,{type:"captions",cues:C,track:u})}},c.onInitPtsFound=function(u,v){var T=this,x=v.frag,D=v.id,w=v.initPTS,p=v.timescale,n=this.unparsedVttFrags;D==="main"&&(this.initPTS[x.cc]=w,this.timescale[x.cc]=p),n.length&&(this.unparsedVttFrags=[],n.forEach(function(d){T.onFragLoaded(M.Events.FRAG_LOADED,d)}))},c.getExistingTrack=function(u){var v=this.media;if(v)for(var T=0;T<v.textTracks.length;T++){var x=v.textTracks[T];if(x[u])return x}return null},c.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},c.createNativeTrack=function(u){if(this.captionsTracks[u])return;var v=this.captionsProperties,T=this.captionsTracks,x=this.media,D=v[u],w=D.label,p=D.languageCode,n=this.getExistingTrack(u);if(n)T[u]=n,Object(t.clearCurrentCues)(T[u]),Object(t.sendAddTrackEvent)(T[u],x);else{var d=this.createTextTrack("captions",w,p);d&&(d[u]=!0,T[u]=d)}},c.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var v=this.captionsProperties[u];if(!v)return;var T=v.label,x={_id:u,label:T,kind:"captions",default:v.media?!!v.media.default:!1,closedCaptions:v.media};this.nonNativeCaptionsTracks[u]=x,this.hls.trigger(M.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[x]})},c.createTextTrack=function(u,v,T){var x=this.media;return x?x.addTextTrack(u,v,T):void 0},c.onMediaAttaching=function(u,v){this.media=v.media,this._cleanTracks()},c.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(v){Object(t.clearCurrentCues)(u[v]),delete u[v]}),this.nonNativeCaptionsTracks={}},c.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),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())},c._cleanTracks=function(){var u=this.media;if(!u)return;var v=u.textTracks;if(v)for(var T=0;T<v.length;T++)Object(t.clearCurrentCues)(v[T])},c.onSubtitleTracksUpdated=function(u,v){var T=this;this.textTracks=[];var x=v.subtitleTracks||[],D=x.some(function(d){return d.textCodec===E.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var w=this.tracks&&x&&this.tracks.length===x.length;if(this.tracks=x||[],this.config.renderTextTracksNatively){var p=this.media?this.media.textTracks:[];this.tracks.forEach(function(d,m){var C;if(m<p.length){for(var y=null,g=0;g<p.length;g++)if(s(p[g],d)){y=p[g];break}y&&(C=y)}C?Object(t.clearCurrentCues)(C):(C=T.createTextTrack("subtitles",d.name,d.lang),C&&(C.mode="disabled")),C&&(C.groupId=d.groupId,T.textTracks.push(C))})}else if(!w&&this.tracks&&this.tracks.length){var n=this.tracks.map(function(d){return{label:d.name,kind:d.type.toLowerCase(),default:d.default,subtitleTrack:d}});this.hls.trigger(M.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},c.onManifestLoaded=function(u,v){var T=this;this.config.enableCEA708Captions&&v.captions&&v.captions.forEach(function(x){var D=/(?:CC|SERVICE)([1-4])/.exec(x.instreamId);if(!D)return;var w="textTrack"+D[1],p=T.captionsProperties[w];if(!p)return;p.label=x.name,x.lang&&(p.languageCode=x.lang),p.media=x})},c.onFragLoading=function(u,v){var T=this.cea608Parser1,x=this.cea608Parser2,D=this.lastSn,w=this.lastPartIndex;if(!this.enabled||!(T&&x))return;if(v.frag.type===i.PlaylistLevelType.MAIN){var p,n,d=v.frag.sn,m=(p=v==null||((n=v.part)===null||n===void 0)?void 0:n.index)!=null?p:-1;d===D+1||d===D&&m===w+1||(T.reset(),x.reset()),this.lastSn=d,this.lastPartIndex=m}},c.onFragLoaded=function(u,v){var T=v.frag,x=v.payload,D=this.initPTS,w=this.unparsedVttFrags;if(T.type===i.PlaylistLevelType.SUBTITLE)if(x.byteLength){if(!Object(K.isFiniteNumber)(D[T.cc])){w.push(v),D.length&&this.hls.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Missing initial subtitle PTS")});return}var p=T.decryptdata;if(p==null||p.key==null||p.method!=="AES-128"){var n=this.tracks[T.level],d=this.vttCCs;d[T.cc]||(d[T.cc]={start:T.start,prevCC:this.prevCC,new:!0},this.prevCC=T.cc),n&&n.textCodec===E.IMSC1_CODEC?this._parseIMSC1(T,x):this._parseVTTs(T,x,d)}}else this.hls.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:T,error:new Error("Empty subtitle payload")})},c._parseIMSC1=function(u,v){var T=this,x=this.hls;Object(E.parseIMSC1)(v,this.initPTS[u.cc],this.timescale[u.cc],function(D){T._appendCues(D,u.level),x.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(D){A.logger.log("Failed to parse IMSC1: "+D),x.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:D})})},c._parseVTTs=function(u,v,T){var x=this,D=this.hls;Object(b.parseWebVTT)(v,this.initPTS[u.cc],this.timescale[u.cc],T,u.cc,u.start,function(w){x._appendCues(w,u.level),D.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(w){x._fallbackToIMSC1(u,v),A.logger.log("Failed to parse VTT cue: "+w),D.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:w})})},c._fallbackToIMSC1=function(u,v){var T=this,x=this.tracks[u.level];x.textCodec||Object(E.parseIMSC1)(v,this.initPTS[u.cc],this.timescale[u.cc],function(){x.textCodec=E.IMSC1_CODEC,T._parseIMSC1(u,v)},function(){x.textCodec="wvtt"})},c._appendCues=function(u,v){var T=this.hls;if(this.config.renderTextTracksNatively){var x=this.textTracks[v];if(x.mode==="disabled")return;u.forEach(function(p){return Object(t.addCueToTrack)(x,p)})}else{var D=this.tracks[v],w=D.default?"default":"subtitles"+v;T.trigger(M.Events.CUES_PARSED,{type:"subtitles",cues:u,track:w})}},c.onFragDecrypted=function(u,v){var T=v.frag;if(T.type===i.PlaylistLevelType.SUBTITLE){if(!Object(K.isFiniteNumber)(this.initPTS[T.cc])){this.unparsedVttFrags.push(v);return}this.onFragLoaded(M.Events.FRAG_LOADED,v)}},c.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},c.onFragParsingUserdata=function(u,v){var T=this.cea608Parser1,x=this.cea608Parser2;if(!this.enabled||!(T&&x))return;for(var D=0;D<v.samples.length;D++){var w=v.samples[D].bytes;if(w){var p=this.extractCea608Data(w);T.addData(v.samples[D].pts,p[0]),x.addData(v.samples[D].pts,p[1])}}},c.onBufferFlushing=function(u,v){var T=v.startOffset,x=v.endOffset,D=v.endOffsetSubtitles,w=v.type,p=this.media;if(!p||p.currentTime<x)return;if(!w||w==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(m){return Object(t.removeCuesInRange)(n[m],T,x)})}if(this.config.renderTextTracksNatively&&(T===0&&D!==void 0)){var d=this.textTracks;Object.keys(d).forEach(function(m){return Object(t.removeCuesInRange)(d[m],T,D)})}},c.extractCea608Data=function(u){for(var v=u[0]&31,T=2,x=[[],[]],D=0;D<v;D++){var w=u[T++],p=127&u[T++],n=127&u[T++],d=(4&w)!==0,m=3&w;if(p===0&&n===0)continue;d&&((m===0||m===1)&&(x[m].push(p),x[m].push(n)))}return x},l}();function s(l,c){return l&&l.label===c.name&&!(l.textTrack1||l.textTrack2)}function o(l,c,a,u){return Math.min(c,u)-Math.max(l,a)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return K});var K=function(){function M(R,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=R,this.aesIV=b}var B=M.prototype;return B.decrypt=function(b,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,b)},M}()},"./src/crypt/aes-decryptor.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"removePadding",function(){return M}),O.d(Q,"default",function(){return B});var K=O("./src/utils/typed-array.ts");function M(R){var b=R.byteLength,t=b&&new DataView(R.buffer).getUint8(b-1);return t?Object(K.sliceUint8)(R,0,b-t):R}var B=function(){function R(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var b=R.prototype;return b.uint8ArrayToUint32Array_=function(E){for(var i=new DataView(E),A=new Uint32Array(4),h=0;h<4;h++)A[h]=i.getUint32(h*4);return A},b.initTable=function(){var E=this.sBox,i=this.invSBox,A=this.subMix,h=A[0],s=A[1],o=A[2],f=A[3],l=this.invSubMix,c=l[0],a=l[1],u=l[2],v=l[3],T=new Uint32Array(256),x=0,D=0,w=0;for(w=0;w<256;w++)w<128?T[w]=w<<1:T[w]=w<<1^283;for(w=0;w<256;w++){var p=D^D<<1^D<<2^D<<3^D<<4;p=p>>>8^p&255^99,E[x]=p,i[p]=x;var n=T[x],d=T[n],m=T[d],C=T[p]*257^p*16843008;h[x]=C<<24|C>>>8,s[x]=C<<16|C>>>16,o[x]=C<<8|C>>>24,f[x]=C,C=m*16843009^d*65537^n*257^x*16843008,c[p]=C<<24|C>>>8,a[p]=C<<16|C>>>16,u[p]=C<<8|C>>>24,v[p]=C,x?(x=n^T[T[T[m^n]]],D^=T[T[D]]):x=D=1}},b.expandKey=function(E){for(var i=this.uint8ArrayToUint32Array_(E),A=!0,h=0;h<i.length&&A;)A=i[h]===this.key[h],h++;if(A)return;this.key=i;var s=this.keySize=i.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var o=this.ksRows=(s+6+1)*4,f,l,c=this.keySchedule=new Uint32Array(o),a=this.invKeySchedule=new Uint32Array(o),u=this.sBox,v=this.rcon,T=this.invSubMix,x=T[0],D=T[1],w=T[2],p=T[3],n,d;for(f=0;f<o;f++){if(f<s){n=c[f]=i[f];continue}d=n,f%s===0?(d=d<<8|d>>>24,d=u[d>>>24]<<24|u[d>>>16&255]<<16|u[d>>>8&255]<<8|u[d&255],d^=v[f/s|0]<<24):s>6&&f%s===4&&(d=u[d>>>24]<<24|u[d>>>16&255]<<16|u[d>>>8&255]<<8|u[d&255]),c[f]=n=(c[f-s]^d)>>>0}for(l=0;l<o;l++)f=o-l,l&3?d=c[f]:d=c[f-4],l<4||f<=4?a[l]=d:a[l]=x[u[d>>>24]]^D[u[d>>>16&255]]^w[u[d>>>8&255]]^p[u[d&255]],a[l]=a[l]>>>0},b.networkToHostOrderSwap=function(E){return E<<24|(E&65280)<<8|(E&16711680)>>8|E>>>24},b.decrypt=function(E,i,A){for(var h=this.keySize+6,s=this.invKeySchedule,o=this.invSBox,f=this.invSubMix,l=f[0],c=f[1],a=f[2],u=f[3],v=this.uint8ArrayToUint32Array_(A),T=v[0],x=v[1],D=v[2],w=v[3],p=new Int32Array(E),n=new Int32Array(p.length),d,m,C,y,g,U,k,I,V,G,L,$,Y,ne,se=this.networkToHostOrderSwap;i<p.length;){for(V=se(p[i]),G=se(p[i+1]),L=se(p[i+2]),$=se(p[i+3]),g=V^s[0],U=$^s[1],k=L^s[2],I=G^s[3],Y=4,ne=1;ne<h;ne++)d=l[g>>>24]^c[U>>16&255]^a[k>>8&255]^u[I&255]^s[Y],m=l[U>>>24]^c[k>>16&255]^a[I>>8&255]^u[g&255]^s[Y+1],C=l[k>>>24]^c[I>>16&255]^a[g>>8&255]^u[U&255]^s[Y+2],y=l[I>>>24]^c[g>>16&255]^a[U>>8&255]^u[k&255]^s[Y+3],g=d,U=m,k=C,I=y,Y=Y+4;d=o[g>>>24]<<24^o[U>>16&255]<<16^o[k>>8&255]<<8^o[I&255]^s[Y],m=o[U>>>24]<<24^o[k>>16&255]<<16^o[I>>8&255]<<8^o[g&255]^s[Y+1],C=o[k>>>24]<<24^o[I>>16&255]<<16^o[g>>8&255]<<8^o[U&255]^s[Y+2],y=o[I>>>24]<<24^o[g>>16&255]<<16^o[U>>8&255]<<8^o[k&255]^s[Y+3],n[i]=se(d^T),n[i+1]=se(y^x),n[i+2]=se(C^D),n[i+3]=se(m^w),T=V,x=G,D=L,w=$,i=i+4}return n.buffer},R}()},"./src/crypt/decrypter.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return i});var K=O("./src/crypt/aes-crypto.ts"),M=O("./src/crypt/fast-aes-key.ts"),B=O("./src/crypt/aes-decryptor.ts"),R=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),t=O("./src/utils/typed-array.ts"),E=16,i=function(){function A(s,o,f){var l=f===void 0?{}:f,c=l.removePKCS7Padding,a=c===void 0?!0:c;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=s,this.config=o,this.removePKCS7Padding=a,a)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(v){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var h=A.prototype;return h.destroy=function(){this.observer=null},h.isSync=function(){return this.config.enableSoftwareAES},h.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var f=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(B.removePadding)(f):f},h.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},h.decrypt=function(o,f,l,c){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),f,l);var a=this.flush();a&&c(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),f,l).then(c)},h.softwareDecrypt=function(o,f,l){var c=this.currentIV,a=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(o=Object(b.appendUint8Array)(u,o),this.remainderData=null);var v=this.getValidChunk(o);if(!v.length)return null;c&&(l=c);var T=this.softwareDecrypter;T||(T=this.softwareDecrypter=new B.default),T.expandKey(f);var x=a;return this.currentResult=T.decrypt(v.buffer,0,l),this.currentIV=Object(t.sliceUint8)(v,-16).buffer,x||null},h.webCryptoDecrypt=function(o,f,l){var c=this,a=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new M.default(a,f)),this.fastAesKey.expandKey().then(function(u){if(!a)return Promise.reject(new Error("web crypto not initialized"));var v=new K.default(a,l);return v.decrypt(o.buffer,u)}).catch(function(u){return c.onWebCryptoError(u,o,f,l)})},h.onWebCryptoError=function(o,f,l,c){return R.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,l,c)},h.getValidChunk=function(o){var f=o,l=o.length-o.length%E;return l!==o.length&&(f=Object(t.sliceUint8)(o,0,l),this.remainderData=Object(t.sliceUint8)(o,l)),f},h.logOnce=function(o){if(!this.logEnabled)return;R.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},A}()},"./src/crypt/fast-aes-key.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return K});var K=function(){function M(R,b){this.subtle=void 0,this.key=void 0,this.subtle=R,this.key=b}var B=M.prototype;return B.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},M}()},"./src/demux/aacdemuxer.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/demux/base-audio-demuxer.ts"),M=O("./src/demux/adts.ts"),B=O("./src/utils/logger.ts"),R=O("./src/demux/id3.ts");function b(i,A){i.prototype=Object.create(A.prototype),i.prototype.constructor=i,t(i,A)}function t(i,A){return t=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},t(i,A)}var E=function(i){b(A,i);function A(s,o){var f;return f=i.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=s,f.config=o,f}var h=A.prototype;return h.resetInitSegment=function(o,f,l){i.prototype.resetInitSegment.call(this,o,f,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},A.probe=function(o){if(!o)return!1;for(var f=R.getID3Data(o,0)||[],l=f.length,c=o.length;l<c;l++)if(M.probe(o,l))return B.logger.log("ADTS sync word found !"),!0;return!1},h.canParse=function(o,f){return M.canParse(o,f)},h.appendFrame=function(o,f,l){M.initTrackConfig(o,this.observer,f,l,o.manifestCodec);var c=M.appendFrame(o,f,l,this.initPTS,this.frameIndex);if(c&&c.missing===0)return c},A}(K.default);E.minProbeByteLength=9,Q.default=E},"./src/demux/adts.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"getAudioConfig",function(){return R}),O.d(Q,"isHeaderPattern",function(){return b}),O.d(Q,"getHeaderLength",function(){return t}),O.d(Q,"getFullFrameLength",function(){return E}),O.d(Q,"canGetFrameLength",function(){return i}),O.d(Q,"isHeader",function(){return A}),O.d(Q,"canParse",function(){return h}),O.d(Q,"probe",function(){return s}),O.d(Q,"initTrackConfig",function(){return o}),O.d(Q,"getFrameDuration",function(){return f}),O.d(Q,"parseFrameHeader",function(){return l}),O.d(Q,"appendFrame",function(){return c});var K=O("./src/utils/logger.ts"),M=O("./src/errors.ts"),B=O("./src/events.ts");function R(a,u,v,T){var x,D,w,p,n=navigator.userAgent.toLowerCase(),d=T,m=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];x=((u[v+2]&192)>>>6)+1;var C=(u[v+2]&60)>>>2;if(C>m.length-1){a.trigger(B.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return w=(u[v+2]&1)<<2,w|=(u[v+3]&192)>>>6,K.logger.log("manifest codec:"+T+", ADTS type:"+x+", samplingIndex:"+C),/firefox/i.test(n)?C>=6?(x=5,p=new Array(4),D=C-3):(x=2,p=new Array(2),D=C):n.indexOf("android")!==-1?(x=2,p=new Array(2),D=C):(x=5,p=new Array(4),T&&(T.indexOf("mp4a.40.29")!==-1||T.indexOf("mp4a.40.5")!==-1)||!T&&C>=6?D=C-3:((T&&T.indexOf("mp4a.40.2")!==-1&&(C>=6&&w===1||/vivaldi/i.test(n))||!T&&w===1)&&(x=2,p=new Array(2)),D=C)),p[0]=x<<3,p[0]|=(C&14)>>1,p[1]|=(C&1)<<7,p[1]|=w<<3,x===5&&(p[1]|=(D&14)>>1,p[2]=(D&1)<<7,p[2]|=2<<2,p[3]=0),{config:p,samplerate:m[C],channelCount:w,codec:"mp4a.40."+x,manifestCodec:d}}function b(a,u){return a[u]===255&&(a[u+1]&246)===240}function t(a,u){return a[u+1]&1?7:9}function E(a,u){return(a[u+3]&3)<<11|a[u+4]<<3|(a[u+5]&224)>>>5}function i(a,u){return u+5<a.length}function A(a,u){return u+1<a.length&&b(a,u)}function h(a,u){return i(a,u)&&b(a,u)&&E(a,u)<=a.length-u}function s(a,u){if(A(a,u)){var v=t(a,u);if(u+v>=a.length)return!1;var T=E(a,u);if(T<=v)return!1;var x=u+T;return x===a.length||A(a,x)}return!1}function o(a,u,v,T,x){if(!a.samplerate){var D=R(u,v,T,x);if(!D)return;a.config=D.config,a.samplerate=D.samplerate,a.channelCount=D.channelCount,a.codec=D.codec,a.manifestCodec=D.manifestCodec,K.logger.log("parsed codec:"+a.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function f(a){return 1024*9e4/a}function l(a,u,v,T,x){var D=t(a,u),w=E(a,u);if(w-=D,w>0){var p=v+T*x;return{headerLength:D,frameLength:w,stamp:p}}}function c(a,u,v,T,x){var D=f(a.samplerate),w=l(u,v,T,x,D);if(w){var p=w.frameLength,n=w.headerLength,d=w.stamp,m=n+p,C=Math.max(0,v+m-u.length),y;C?(y=new Uint8Array(m-n),y.set(u.subarray(v+n,u.length),0)):y=u.subarray(v+n,v+m);var g={unit:y,pts:d};return C||a.samples.push(g),{sample:g,length:m,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"initPTSFn",function(){return E});var K=O("./src/polyfills/number.ts"),M=O("./src/demux/id3.ts"),B=O("./src/demux/dummy-demuxed-track.ts"),R=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),t=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var A=i.prototype;return A.resetInitSegment=function(s,o,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},A.resetTimeStamp=function(){},A.resetContiguity=function(){},A.canParse=function(s,o){return!1},A.appendFrame=function(s,o,f){},A.demux=function(s,o){this.cachedData&&(s=Object(R.appendUint8Array)(this.cachedData,s),this.cachedData=null);var f=M.getID3Data(s,0),l=f?f.length:0,c,a,u=this._audioTrack,v=this._id3Track,T=f?M.getTimeStamp(f):void 0,x=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=E(T,o)),f&&f.length>0&&v.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),a=this.initPTS;l<x;){if(this.canParse(s,l)){var D=this.appendFrame(u,s,l);D?(this.frameIndex++,a=D.sample.pts,l+=D.length,c=l):l=x}else M.canParse(s,l)?(f=M.getID3Data(s,l),v.samples.push({pts:a,dts:a,data:f}),l+=f.length,c=l):l++;if(l===x&&c!==x){var w=Object(b.sliceUint8)(s,c);this.cachedData?this.cachedData=Object(R.appendUint8Array)(this.cachedData,w):this.cachedData=w}}return{audioTrack:u,avcTrack:Object(B.dummyTrack)(),id3Track:v,textTrack:Object(B.dummyTrack)()}},A.demuxSampleAes=function(s,o,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},A.flush=function(s){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(B.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(B.dummyTrack)()}},A.destroy=function(){},i}(),E=function(A,h){return Object(K.isFiniteNumber)(A)?A*90:h*9e4};Q.default=t},"./src/demux/chunk-cache.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return K});var K=function(){function B(){this.chunks=[],this.dataLength=0}var R=B.prototype;return R.push=function(t){this.chunks.push(t),this.dataLength+=t.length},R.flush=function(){var t=this.chunks,E=this.dataLength,i;if(t.length)t.length===1?i=t[0]:i=M(t,E);else return new Uint8Array(0);return this.reset(),i},R.reset=function(){this.chunks.length=0,this.dataLength=0},B}();function M(B,R){for(var b=new Uint8Array(R),t=0,E=0;E<B.length;E++){var i=B[E];b.set(i,t),t+=i.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"dummyTrack",function(){return K});function K(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/utils/logger.ts"),M=function(){function B(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var R=B.prototype;return R.loadWord=function(){var t=this.data,E=this.bytesAvailable,i=t.byteLength-E,A=new Uint8Array(4),h=Math.min(4,E);if(h===0)throw new Error("no bytes available");A.set(t.subarray(i,i+h)),this.word=new DataView(A.buffer).getUint32(0),this.bitsAvailable=h*8,this.bytesAvailable-=h},R.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)},R.readBits=function(t){var E=Math.min(this.bitsAvailable,t),i=this.word>>>32-E;return t>32&&K.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?i<<E|this.readBits(E):i},R.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()},R.skipUEG=function(){this.skipBits(1+this.skipLZ())},R.skipEG=function(){this.skipBits(1+this.skipLZ())},R.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},R.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},R.readBoolean=function(){return this.readBits(1)===1},R.readUByte=function(){return this.readBits(8)},R.readUShort=function(){return this.readBits(16)},R.readUInt=function(){return this.readBits(32)},R.skipScalingList=function(t){for(var E=8,i=8,A,h=0;h<t;h++)i!==0&&(A=this.readEG(),i=(E+A+256)%256),E=i===0?E:i},R.readSPS=function(){var t=0,E=0,i=0,A=0,h,s,o,f=this.readUByte.bind(this),l=this.readBits.bind(this),c=this.readUEG.bind(this),a=this.readBoolean.bind(this),u=this.skipBits.bind(this),v=this.skipEG.bind(this),T=this.skipUEG.bind(this),x=this.skipScalingList.bind(this);f();var D=f();if(l(5),u(3),f(),T(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var w=c();if(w===3&&u(1),T(),T(),u(1),a())for(s=w!==3?8:12,o=0;o<s;o++)a()&&(o<6?x(16):x(64))}T();var p=c();if(p===0)c();else if(p===1)for(u(1),v(),v(),h=c(),o=0;o<h;o++)v();T(),u(1);var n=c(),d=c(),m=l(1);m===0&&u(1),u(1),a()&&(t=c(),E=c(),i=c(),A=c());var C=[1,1];if(a()&&a()){var y=f();switch(y){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=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((n+1)*16-t*2-E*2),height:(2-m)*(d+1)*16-(m?2:4)*(i+A),pixelRatio:C}},R.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},B}();Q.default=M},"./src/demux/id3.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"isHeader",function(){return K}),O.d(Q,"isFooter",function(){return M}),O.d(Q,"getID3Data",function(){return B}),O.d(Q,"canParse",function(){return b}),O.d(Q,"getTimeStamp",function(){return t}),O.d(Q,"isTimeStampFrame",function(){return E}),O.d(Q,"getID3Frames",function(){return A}),O.d(Q,"decodeFrame",function(){return h}),O.d(Q,"utf8ArrayToStr",function(){return c}),O.d(Q,"testables",function(){return a});var K=function(x,D){return D+10<=x.length&&(x[D]===73&&x[D+1]===68&&x[D+2]===51&&(x[D+3]<255&&x[D+4]<255&&(x[D+6]<128&&x[D+7]<128&&x[D+8]<128&&x[D+9]<128)))},M=function(x,D){return D+10<=x.length&&(x[D]===51&&x[D+1]===68&&x[D+2]===73&&(x[D+3]<255&&x[D+4]<255&&(x[D+6]<128&&x[D+7]<128&&x[D+8]<128&&x[D+9]<128)))},B=function(x,D){for(var w=D,p=0;K(x,D);){p+=10;var n=R(x,D+6);p+=n,M(x,D+10)&&(p+=10),D+=p}return p>0?x.subarray(w,w+p):void 0},R=function(x,D){var w=0;return w=(x[D]&127)<<21,w|=(x[D+1]&127)<<14,w|=(x[D+2]&127)<<7,w|=x[D+3]&127,w},b=function(x,D){return K(x,D)&&R(x,D+6)+10<=x.length-D},t=function(x){for(var D=A(x),w=0;w<D.length;w++){var p=D[w];if(E(p))return l(p)}return},E=function(x){return x&&x.key==="PRIV"&&x.info==="com.apple.streaming.transportStreamTimestamp"},i=function(x){var D=String.fromCharCode(x[0],x[1],x[2],x[3]),w=R(x,4),p=10;return{type:D,size:w,data:x.subarray(p,p+w)}},A=function(x){for(var D=0,w=[];K(x,D);){var p=R(x,D+6);D+=10;for(var n=D+p;D+8<n;){var d=i(x.subarray(D)),m=h(d);m&&w.push(m),D+=d.size+10}M(x,D)&&(D+=10)}return w},h=function(x){return x.type==="PRIV"?s(x):x.type[0]==="W"?f(x):o(x)},s=function(x){if(x.size<2)return;var D=c(x.data,!0),w=new Uint8Array(x.data.subarray(D.length+1));return{key:x.type,info:D,data:w.buffer}},o=function(x){if(x.size<2)return;if(x.type==="TXXX"){var D=1,w=c(x.data.subarray(D),!0);D+=w.length+1;var p=c(x.data.subarray(D));return{key:x.type,info:w,data:p}}var n=c(x.data.subarray(1));return{key:x.type,data:n}},f=function(x){if(x.type==="WXXX"){if(x.size<2)return;var D=1,w=c(x.data.subarray(D),!0);D+=w.length+1;var p=c(x.data.subarray(D));return{key:x.type,info:w,data:p}}var n=c(x.data);return{key:x.type,data:n}},l=function(x){if(x.data.byteLength===8){var D=new Uint8Array(x.data),w=D[3]&1,p=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return p/=45,w&&(p+=4772185884e-2),Math.round(p)}return},c=function(x,D){D===void 0&&(D=!1);var w=v();if(w){var p=w.decode(x);if(D){var n=p.indexOf("\0");return n!==-1?p.substring(0,n):p}return p.replace(/\0/g,"")}for(var d=x.length,m,C,y,g="",U=0;U<d;){if(m=x[U++],m===0&&D)return g;if(m===0||m===3)continue;switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(m);break;case 12:case 13:C=x[U++],g+=String.fromCharCode((m&31)<<6|C&63);break;case 14:C=x[U++],y=x[U++],g+=String.fromCharCode((m&15)<<12|(C&63)<<6|(y&63)<<0);break;default:}}return g},a={decodeTextFrame:o},u;function v(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/demux/base-audio-demuxer.ts"),M=O("./src/demux/id3.ts"),B=O("./src/utils/logger.ts"),R=O("./src/demux/mpegaudio.ts");function b(i,A){i.prototype=Object.create(A.prototype),i.prototype.constructor=i,t(i,A)}function t(i,A){return t=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},t(i,A)}var E=function(i){b(A,i);function A(){return i.apply(this,arguments)||this}var h=A.prototype;return h.resetInitSegment=function(o,f,l){i.prototype.resetInitSegment.call(this,o,f,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},A.probe=function(o){if(!o)return!1;for(var f=M.getID3Data(o,0)||[],l=f.length,c=o.length;l<c;l++)if(R.probe(o,l))return B.logger.log("MPEG Audio sync word found !"),!0;return!1},h.canParse=function(o,f){return R.canParse(o,f)},h.appendFrame=function(o,f,l){return this.initPTS===null?void 0:R.appendFrame(o,f,l,this.initPTS,this.frameIndex)},A}(K.default);E.minProbeByteLength=4,Q.default=E},"./src/demux/mp4demuxer.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/utils/mp4-tools.ts"),M=O("./src/demux/dummy-demuxed-track.ts"),B=function(){function R(t,E){this.remainderData=null,this.config=void 0,this.config=E}var b=R.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},R.probe=function(E){return Object(K.findBox)({data:E,start:0,end:Math.min(E.length,16384)},["moof"]).length>0},b.demux=function(E){var i=E,A=Object(M.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(K.appendUint8Array)(this.remainderData,E));var h=Object(K.segmentValidRange)(i);this.remainderData=h.remainder,A.samples=h.valid||new Uint8Array}else A.samples=i;return{audioTrack:Object(M.dummyTrack)(),avcTrack:A,id3Track:Object(M.dummyTrack)(),textTrack:Object(M.dummyTrack)()}},b.flush=function(){var E=Object(M.dummyTrack)();return E.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(M.dummyTrack)(),avcTrack:E,id3Track:Object(M.dummyTrack)(),textTrack:Object(M.dummyTrack)()}},b.demuxSampleAes=function(E,i,A){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},R}();B.minProbeByteLength=1024,Q.default=B},"./src/demux/mpegaudio.ts":function(Z,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 i}),O.d(Q,"isHeader",function(){return A}),O.d(Q,"canParse",function(){return h}),O.d(Q,"probe",function(){return s});var K=null,M=[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],R=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function t(o,f,l,c,a){if(l+24>f.length)return;var u=E(f,l);if(u&&l+u.frameLength<=f.length){var v=u.samplesPerFrame*9e4/u.sampleRate,T=c+a*v,x={unit:f.subarray(l,l+u.frameLength),pts:T,dts:T};return o.config=[],o.channelCount=u.channelCount,o.samplerate=u.sampleRate,o.samples.push(x),{sample:x,length:u.frameLength,missing:0}}}function E(o,f){var l=o[f+1]>>3&3,c=o[f+1]>>1&3,a=o[f+2]>>4&15,u=o[f+2]>>2&3;if(l!==1&&a!==0&&a!==15&&u!==3){var v=o[f+2]>>1&1,T=o[f+3]>>6,x=l===3?3-c:c===3?3:4,D=M[x*14+a-1]*1e3,w=l===3?0:l===2?1:2,p=B[w*3+u],n=T===3?1:2,d=R[l][c],m=b[c],C=d*8*m,y=Math.floor(d*D/p+v)*m;if(K===null){var g=navigator.userAgent||"",U=g.match(/Chrome\/(\d+)/i);K=U?parseInt(U[1]):0}var k=!!K&&K<=87;return k&&c===2&&D>=224e3&&T===0&&(o[f+3]=o[f+3]|128),{sampleRate:p,channelCount:n,frameLength:y,samplesPerFrame:C}}}function i(o,f){return o[f]===255&&(o[f+1]&224)===224&&(o[f+1]&6)!==0}function A(o,f){return f+1<o.length&&i(o,f)}function h(o,f){var l=4;return i(o,f)&&l<=o.length-f}function s(o,f){if(f+1<o.length&&i(o,f)){var l=4,c=E(o,f),a=l;c!=null&&c.frameLength&&(a=c.frameLength);var u=f+a;return u===o.length||A(o,u)}return!1}},"./src/demux/sample-aes.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/crypt/decrypter.ts"),M=O("./src/demux/tsdemuxer.ts"),B=function(){function R(t,E,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new K.default(t,E,{removePKCS7Padding:!1})}var b=R.prototype;return b.decryptBuffer=function(E,i){this.decrypter.decrypt(E,this.keyData.key.buffer,this.keyData.iv.buffer,i)},b.decryptAacSample=function(E,i,A,h){var s=E[i].unit,o=s.subarray(16,s.length-s.length%16),f=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),l=this;this.decryptBuffer(f,function(c){var a=new Uint8Array(c);s.set(a,16),h||l.decryptAacSamples(E,i+1,A)})},b.decryptAacSamples=function(E,i,A){for(;;i++){if(i>=E.length){A();return}if(E[i].unit.length<32)continue;var h=this.decrypter.isSync();if(this.decryptAacSample(E,i,A,h),!h)return}},b.getAvcEncryptedData=function(E){for(var i=Math.floor((E.length-48)/160)*16+16,A=new Int8Array(i),h=0,s=32;s<=E.length-16;s+=160,h+=16)A.set(E.subarray(s,s+16),h);return A},b.getAvcDecryptedUnit=function(E,i){for(var A=new Uint8Array(i),h=0,s=32;s<=E.length-16;s+=160,h+=16)E.set(A.subarray(h,h+16),s);return E},b.decryptAvcSample=function(E,i,A,h,s,o){var f=Object(M.discardEPB)(s.data),l=this.getAvcEncryptedData(f),c=this;this.decryptBuffer(l.buffer,function(a){s.data=c.getAvcDecryptedUnit(f,a),o||c.decryptAvcSamples(E,i,A+1,h)})},b.decryptAvcSamples=function(E,i,A,h){if(E instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,A=0){if(i>=E.length){h();return}for(var s=E[i].units;!(A>=s.length);A++){var o=s[A];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(E,i,A,h,o,f),!f)return}}},R}();Q.default=B},"./src/demux/transmuxer-interface.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return s});var K=O("./node_modules/webworkify-webpack/index.js"),M=O.n(K),B=O("./src/events.ts"),R=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),t=O("./src/errors.ts"),E=O("./src/utils/mediasource-helper.ts"),i=O("./node_modules/eventemitter3/index.js"),A=O.n(i),h=Object(E.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function o(l,c,a,u){var v=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=l,this.id=c,this.onTransmuxComplete=a,this.onFlush=u;var T=l.config,x=function(d,m){m=m||{},m.frag=v.frag,m.id=v.id,l.trigger(d,m)};this.observer=new i.EventEmitter,this.observer.on(B.Events.FRAG_DECRYPTED,x),this.observer.on(B.Events.ERROR,x);var D={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},w=navigator.vendor;if(T.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var p;try{p=this.worker=K("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),p.addEventListener("message",this.onwmsg),p.onerror=function(n){l.trigger(B.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(n.message+" ("+n.filename+":"+n.lineno+")")})},p.postMessage({cmd:"init",typeSupported:D,vendor:w,id:c,config:JSON.stringify(T)})}catch(n){b.logger.warn("Error in worker:",n),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),p&&self.URL.revokeObjectURL(p.objectURL),this.transmuxer=new R.default(this.observer,D,T,w,c),this.worker=null}}else this.transmuxer=new R.default(this.observer,D,T,w,c)}var f=o.prototype;return f.destroy=function(){var c=this.worker;if(c)c.removeEventListener("message",this.onwmsg),c.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},f.push=function(c,a,u,v,T,x,D,w,p,n){var d=this;p.transmuxing.start=self.performance.now();var m=this.transmuxer,C=this.worker,y=x?x.start:T.start,g=T.decryptdata,U=this.frag,k=!(U&&T.cc===U.cc),I=!(U&&p.level===U.level),V=U?p.sn-U.sn:-1,G=this.part?p.part-this.part.index:1,L=!I&&(V===1||V===0&&G===1),$=self.performance.now();(I||V||T.stats.parsing.start===0)&&(T.stats.parsing.start=$),x&&(G||!L)&&(x.stats.parsing.start=$);var Y=new R.TransmuxState(k,L,w,I,y);if(!L||k){b.logger.log("[transmuxer-interface, "+T.type+"]: Starting new transmux session for sn: "+p.sn+" p: "+p.part+" level: "+p.level+" id: "+p.id+`
discontinuity: `+k+`
trackSwitch: `+I+`
contiguous: `+L+`
accurateTimeOffset: `+w+`
timeOffset: `+y);var ne=new R.TransmuxConfig(u,v,a,D,n);this.configureTransmuxer(ne)}if(this.frag=T,this.part=x,C)C.postMessage({cmd:"demux",data:c,decryptdata:g,chunkMeta:p,state:Y},c instanceof ArrayBuffer?[c]:[]);else if(m){var se=m.push(c,g,p,Y);Object(R.isPromise)(se)?se.then(function(_e){d.handleTransmuxComplete(_e)}):this.handleTransmuxComplete(se)}},f.flush=function(c){var a=this;c.transmuxing.start=self.performance.now();var u=this.transmuxer,v=this.worker;if(v)v.postMessage({cmd:"flush",chunkMeta:c});else if(u){var T=u.flush(c);Object(R.isPromise)(T)?T.then(function(x){a.handleFlushResult(x,c)}):this.handleFlushResult(T,c)}},f.handleFlushResult=function(c,a){var u=this;c.forEach(function(v){u.handleTransmuxComplete(v)}),this.onFlush(a)},f.onWorkerMessage=function(c){var a=c.data,u=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,u.trigger(a.event,a.data);break}}},f.configureTransmuxer=function(c){var a=this.worker,u=this.transmuxer;a?a.postMessage({cmd:"configure",config:c}):u&&u.configure(c)},f.handleTransmuxComplete=function(c){c.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(c)},o}()},"./src/demux/transmuxer-worker.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return t});var K=O("./src/demux/transmuxer.ts"),M=O("./src/events.ts"),B=O("./src/utils/logger.ts"),R=O("./node_modules/eventemitter3/index.js"),b=O.n(R);function t(s){var o=new R.EventEmitter,f=function(c,a){s.postMessage({event:c,data:a})};o.on(M.Events.FRAG_DECRYPTED,f),o.on(M.Events.ERROR,f),s.addEventListener("message",function(l){var c=l.data;switch(c.cmd){case"init":{var a=JSON.parse(c.config);s.transmuxer=new K.default(o,c.typeSupported,a,c.vendor,c.id),Object(B.enableLogs)(a.debug),f("init",null);break}case"configure":{s.transmuxer.configure(c.config);break}case"demux":{var u=s.transmuxer.push(c.data,c.decryptdata,c.chunkMeta,c.state);Object(K.isPromise)(u)?u.then(function(x){E(s,x)}):E(s,u);break}case"flush":{var v=c.chunkMeta,T=s.transmuxer.flush(v);Object(K.isPromise)(T)?T.then(function(x){A(s,x,v)}):A(s,T,v);break}default:break}})}function E(s,o){if(h(o.remuxResult))return;var f=[],l=o.remuxResult,c=l.audio,a=l.video;c&&i(f,c),a&&i(f,a),s.postMessage({event:"transmuxComplete",data:o},f)}function i(s,o){o.data1&&s.push(o.data1.buffer),o.data2&&s.push(o.data2.buffer)}function A(s,o,f){o.forEach(function(l){E(s,l)}),s.postMessage({event:"flush",data:f})}function h(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a}),O.d(Q,"isPromise",function(){return T}),O.d(Q,"TransmuxConfig",function(){return x}),O.d(Q,"TransmuxState",function(){return D});var K=O("./src/events.ts"),M=O("./src/errors.ts"),B=O("./src/crypt/decrypter.ts"),R=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),t=O("./src/demux/tsdemuxer.ts"),E=O("./src/demux/mp3demuxer.ts"),i=O("./src/remux/mp4-remuxer.ts"),A=O("./src/remux/passthrough-remuxer.ts"),h=O("./src/demux/chunk-cache.ts"),s=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(w){o.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var l=[{demux:t.default,remux:i.default},{demux:b.default,remux:A.default},{demux:R.default,remux:i.default},{demux:E.default,remux:i.default}],c=1024;l.forEach(function(w){var p=w.demux;c=Math.max(c,p.minProbeByteLength)});var a=function(){function w(n,d,m,C,y){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 h.default,this.observer=n,this.typeSupported=d,this.config=m,this.vendor=C,this.id=y}var p=w.prototype;return p.configure=function(d){this.transmuxConfig=d,this.decrypter&&this.decrypter.reset()},p.push=function(d,m,C,y){var g=this,U=C.transmuxing;U.executeStart=f();var k=new Uint8Array(d),I=this.cache,V=this.config,G=this.currentTransmuxState,L=this.transmuxConfig;y&&(this.currentTransmuxState=y);var $=u(k,m);if($&&$.method==="AES-128"){var Y=this.getDecrypter();if(V.enableSoftwareAES){var ne=Y.softwareDecrypt(k,$.key.buffer,$.iv.buffer);if(!ne)return U.executeEnd=f(),v(C);k=new Uint8Array(ne)}else return this.decryptionPromise=Y.webCryptoDecrypt(k,$.key.buffer,$.iv.buffer).then(function(ie){var oe=g.push(ie,null,C);return g.decryptionPromise=null,oe}),this.decryptionPromise}var se=y||G,_e=se.contiguous,ve=se.discontinuity,Ce=se.trackSwitch,De=se.accurateTimeOffset,Qe=se.timeOffset,Se=L.audioCodec,Ie=L.videoCodec,Je=L.defaultInitPts,Et=L.duration,Le=L.initSegmentData;if((ve||Ce)&&this.resetInitSegment(Le,Se,Ie,Et),ve&&this.resetInitialTimestamp(Je),_e||this.resetContiguity(),this.needsProbing(k,ve,Ce)){if(I.dataLength){var je=I.flush();k=Object(s.appendUint8Array)(je,k)}this.configureTransmuxer(k,L)}var st=this.transmux(k,$,Qe,De,C),he=this.currentTransmuxState;return he.contiguous=!0,he.discontinuity=!1,he.trackSwitch=!1,U.executeEnd=f(),st},p.flush=function(d){var m=this,C=d.transmuxing;C.executeStart=f();var y=this.decrypter,g=this.cache,U=this.currentTransmuxState,k=this.decryptionPromise;if(k)return k.then(function(){return m.flush(d)});var I=[],V=U.timeOffset;if(y){var G=y.flush();G&&I.push(this.push(G,null,d))}var L=g.dataLength;g.reset();var $=this.demuxer,Y=this.remuxer;if(!$||!Y)return L>=c&&this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=f(),[v(d)];var ne=$.flush(V);return T(ne)?ne.then(function(se){return m.flushRemux(I,se,d),I}):(this.flushRemux(I,ne,d),I)},p.flushRemux=function(d,m,C){var y=m.audioTrack,g=m.avcTrack,U=m.id3Track,k=m.textTrack,I=this.currentTransmuxState,V=I.accurateTimeOffset,G=I.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var L=this.remuxer.remux(y,g,U,k,G,V,!0,this.id);d.push({remuxResult:L,chunkMeta:C}),C.transmuxing.executeEnd=f()},p.resetInitialTimestamp=function(d){var m=this.demuxer,C=this.remuxer;if(!m||!C)return;m.resetTimeStamp(d),C.resetTimeStamp(d)},p.resetContiguity=function(){var d=this.demuxer,m=this.remuxer;if(!d||!m)return;d.resetContiguity(),m.resetNextTimestamp()},p.resetInitSegment=function(d,m,C,y){var g=this.demuxer,U=this.remuxer;if(!g||!U)return;g.resetInitSegment(m,C,y),U.resetInitSegment(d,m,C)},p.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},p.transmux=function(d,m,C,y,g){var U;return m&&m.method==="SAMPLE-AES"?U=this.transmuxSampleAes(d,m,C,y,g):U=this.transmuxUnencrypted(d,C,y,g),U},p.transmuxUnencrypted=function(d,m,C,y){var g=this.demuxer.demux(d,m,!1,!this.config.progressive),U=g.audioTrack,k=g.avcTrack,I=g.id3Track,V=g.textTrack,G=this.remuxer.remux(U,k,I,V,m,C,!1,this.id);return{remuxResult:G,chunkMeta:y}},p.transmuxSampleAes=function(d,m,C,y,g){var U=this;return this.demuxer.demuxSampleAes(d,m,C).then(function(k){var I=U.remuxer.remux(k.audioTrack,k.avcTrack,k.id3Track,k.textTrack,C,y,!1,U.id);return{remuxResult:I,chunkMeta:g}})},p.configureTransmuxer=function(d,m){for(var C=this.config,y=this.observer,g=this.typeSupported,U=this.vendor,k=m.audioCodec,I=m.defaultInitPts,V=m.duration,G=m.initSegmentData,L=m.videoCodec,$,Y=0,ne=l.length;Y<ne;Y++)if(l[Y].demux.probe(d)){$=l[Y];break}$||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),$={demux:b.default,remux:A.default});var se=this.demuxer,_e=this.remuxer,ve=$.remux,Ce=$.demux;(!_e||!(_e instanceof ve))&&(this.remuxer=new ve(y,C,g,U)),(!se||!(se instanceof Ce))&&(this.demuxer=new Ce(y,C,g),this.probe=Ce.probe),this.resetInitSegment(G,k,L,V),this.resetInitialTimestamp(I)},p.needsProbing=function(d,m,C){return!this.demuxer||!this.remuxer||m||C},p.getDecrypter=function(){var d=this.decrypter;return d||(d=this.decrypter=new B.default(this.observer,this.config)),d},w}();function u(w,p){var n=null;return w.byteLength>0&&p!=null&&p.key!=null&&p.iv!==null&&p.method!=null&&(n=p),n}var v=function(p){return{remuxResult:{},chunkMeta:p}};function T(w){return"then"in w&&w.then instanceof Function}var x=function(p,n,d,m,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=p,this.videoCodec=n,this.initSegmentData=d,this.duration=m,this.defaultInitPts=C},D=function(p,n,d,m,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=p,this.contiguous=n,this.accurateTimeOffset=d,this.trackSwitch=m,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"discardEPB",function(){return v});var K=O("./src/demux/adts.ts"),M=O("./src/demux/mpegaudio.ts"),B=O("./src/demux/exp-golomb.ts"),R=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),t=O("./src/events.ts"),E=O("./src/utils/mp4-tools.ts"),i=O("./src/utils/logger.ts"),A=O("./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},s=function(){function T(D,w,p){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=w,this.typeSupported=p}T.probe=function(w){var p=T.syncOffset(w);return p<0?!1:(p&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+p+", junk ahead ?"),!0)},T.syncOffset=function(w){for(var p=Math.min(1e3,w.length-3*188),n=0;n<p;){if(w[n]===71&&w[n+188]===71&&w[n+2*188]===71)return n;n++}return-1},T.createTrack=function(w,p){return{container:w==="video"||w==="audio"?"video/mp2t":void 0,type:w,id:h[w],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:w==="audio"?p:void 0}};var x=T.prototype;return x.resetInitSegment=function(w,p,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=T.createTrack("video",n),this._audioTrack=T.createTrack("audio",n),this._id3Track=T.createTrack("id3",n),this._txtTrack=T.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=w,this.videoCodec=p,this._duration=n},x.resetTimeStamp=function(){},x.resetContiguity=function(){var w=this._audioTrack,p=this._avcTrack,n=this._id3Track;w&&(w.pesData=null),p&&(p.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},x.demux=function(w,p,n,d){n===void 0&&(n=!1),d===void 0&&(d=!1),n||(this.sampleAes=null);var m,C=this._avcTrack,y=this._audioTrack,g=this._id3Track,U=C.pid,k=C.pesData,I=y.pid,V=g.pid,G=y.pesData,L=g.pesData,$=!1,Y=this.pmtParsed,ne=this._pmtId,se=w.length;if(this.remainderData&&(w=Object(E.appendUint8Array)(this.remainderData,w),se=w.length,this.remainderData=null),se<188&&!d)return this.remainderData=w,{audioTrack:y,avcTrack:C,id3Track:g,textTrack:this._txtTrack};var _e=Math.max(0,T.syncOffset(w));se-=(se+_e)%188,se<w.byteLength&&!d&&(this.remainderData=new Uint8Array(w.buffer,se,w.buffer.byteLength-se));for(var ve=_e;ve<se;ve+=188)if(w[ve]===71){var Ce=!!(w[ve+1]&64),De=((w[ve+1]&31)<<8)+w[ve+2],Qe=(w[ve+3]&48)>>4,Se=void 0;if(Qe>1){if(Se=ve+5+w[ve+4],Se===ve+188)continue}else Se=ve+4;switch(De){case U:Ce&&(k&&(m=c(k))&&this.parseAVCPES(m,!1),k={data:[],size:0}),k&&(k.data.push(w.subarray(Se,ve+188)),k.size+=ve+188-Se);break;case I:Ce&&(G&&(m=c(G))&&(y.isAAC?this.parseAACPES(m):this.parseMPEGPES(m)),G={data:[],size:0}),G&&(G.data.push(w.subarray(Se,ve+188)),G.size+=ve+188-Se);break;case V:Ce&&(L&&(m=c(L))&&this.parseID3PES(m),L={data:[],size:0}),L&&(L.data.push(w.subarray(Se,ve+188)),L.size+=ve+188-Se);break;case 0:Ce&&(Se+=w[Se]+1),ne=this._pmtId=f(w,Se);break;case ne:{Ce&&(Se+=w[Se]+1);var Ie=l(w,Se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,n);U=Ie.avc,U>0&&(C.pid=U),I=Ie.audio,I>0&&(y.pid=I,y.isAAC=Ie.isAAC),V=Ie.id3,V>0&&(g.pid=V),$&&!Y&&(i.logger.log("reparse from beginning"),$=!1,ve=_e-188),Y=this.pmtParsed=!0;break}case 17:case 8191:break;default:$=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=k,y.pesData=G,g.pesData=L;var Je={audioTrack:y,avcTrack:C,id3Track:g,textTrack:this._txtTrack};return d&&this.extractRemainingSamples(Je),Je},x.flush=function(){var w=this.remainderData;this.remainderData=null;var p;return w?p=this.demux(w,-1,!1,!0):p={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(p),this.sampleAes?this.decrypt(p,this.sampleAes):p},x.extractRemainingSamples=function(w){var p=w.audioTrack,n=w.avcTrack,d=w.id3Track,m=n.pesData,C=p.pesData,y=d.pesData,g;m&&(g=c(m))?(this.parseAVCPES(g,!0),n.pesData=null):n.pesData=m,C&&(g=c(C))?(p.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),p.pesData=null):(C!=null&&C.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=C),y&&(g=c(y))?(this.parseID3PES(g),d.pesData=null):d.pesData=y},x.demuxSampleAes=function(w,p,n){var d=this.demux(w,n,!0,!this.config.progressive),m=this.sampleAes=new b.default(this.observer,this.config,p);return this.decrypt(d,m)},x.decrypt=function(w,p){return new Promise(function(n){var d=w.audioTrack,m=w.avcTrack;d.samples&&d.isAAC?p.decryptAacSamples(d.samples,0,function(){m.samples?p.decryptAvcSamples(m.samples,0,0,function(){n(w)}):n(w)}):m.samples&&p.decryptAvcSamples(m.samples,0,0,function(){n(w)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(w,p){var n=this,d=this._avcTrack,m=this.parseAVCNALu(w.data),C=!1,y=this.avcSample,g,U=!1;w.data=null,y&&m.length&&!d.audFound&&(a(y,d),y=this.avcSample=o(!1,w.pts,w.dts,"")),m.forEach(function(k){switch(k.type){case 1:{g=!0,y||(y=n.avcSample=o(!0,w.pts,w.dts,"")),C&&(y.debug+="NDR "),y.frame=!0;var I=k.data;if(U&&I.length>4){var V=new B.default(I).readSliceType();(V===2||V===4||V===7||V===9)&&(y.key=!0)}break}case 5:g=!0,y||(y=n.avcSample=o(!0,w.pts,w.dts,"")),C&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{g=!0,C&&y&&(y.debug+="SEI ");var G=new B.default(v(k.data));G.readUByte();for(var L=0,$=0,Y=!1,ne=0;!Y&&G.bytesAvailable>1;){L=0;do ne=G.readUByte(),L+=ne;while(ne===255);$=0;do ne=G.readUByte(),$+=ne;while(ne===255);if(L===4&&G.bytesAvailable!==0){Y=!0;var se=G.readUByte();if(se===181){var _e=G.readUShort();if(_e===49){var ve=G.readUInt();if(ve===1195456820){var Ce=G.readUByte();if(Ce===3){for(var De=G.readUByte(),Qe=G.readUByte(),Se=31&De,Ie=[De,Qe],Je=0;Je<Se;Je++)Ie.push(G.readUByte()),Ie.push(G.readUByte()),Ie.push(G.readUByte());u(n._txtTrack.samples,{type:3,pts:w.pts,bytes:Ie})}}}}}else if(L===5&&G.bytesAvailable!==0){if(Y=!0,$>16){for(var Et=[],Le=0;Le<16;Le++)Et.push(G.readUByte().toString(16)),(Le===3||Le===5||Le===7||Le===9)&&Et.push("-");for(var je=$-16,st=new Uint8Array(je),he=0;he<je;he++)st[he]=G.readUByte();u(n._txtTrack.samples,{pts:w.pts,payloadType:L,uuid:Et.join(""),userData:Object(R.utf8ArrayToStr)(st),userDataBytes:st})}}else if($<G.bytesAvailable)for(var ie=0;ie<$;ie++)G.readUByte()}break}case 7:if(g=!0,U=!0,C&&y&&(y.debug+="SPS "),!d.sps){var oe=new B.default(k.data),ee=oe.readSPS();d.width=ee.width,d.height=ee.height,d.pixelRatio=ee.pixelRatio,d.sps=[k.data],d.duration=n._duration;for(var de=k.data.subarray(1,4),we="avc1.",Be=0;Be<3;Be++){var nt=de[Be].toString(16);nt.length<2&&(nt="0"+nt),we+=nt}d.codec=we}break;case 8:g=!0,C&&y&&(y.debug+="PPS "),d.pps||(d.pps=[k.data]);break;case 9:g=!1,d.audFound=!0,y&&a(y,d),y=n.avcSample=o(!1,w.pts,w.dts,C?"AUD ":"");break;case 12:g=!1;break;default:g=!1,y&&(y.debug+="unknown NAL "+k.type+" ");break}if(y&&g){var at=y.units;at.push(k)}}),p&&y&&(a(y,d),this.avcSample=null)},x.getLastNalUnit=function(){var w,p=this.avcSample,n;if(!p||p.units.length===0){var d=this._avcTrack.samples;p=d[d.length-1]}if((w=p)!==null&&w!==void 0&&w.units){var m=p.units;n=m[m.length-1]}return n},x.parseAVCNALu=function(w){var p=w.byteLength,n=this._avcTrack,d=n.naluState||0,m=d,C=[],y=0,g,U,k,I=-1,V=0;for(d===-1&&(I=0,V=w[0]&31,d=0,y=1);y<p;){if(g=w[y++],!d){d=g?0:1;continue}if(d===1){d=g?0:2;continue}if(!g)d=3;else if(g===1){if(I>=0){var G={data:w.subarray(I,y-d-1),type:V};C.push(G)}else{var L=this.getLastNalUnit();if(L&&(m&&y<=4-m&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-m))),U=y-d-1,U>0)){var $=new Uint8Array(L.data.byteLength+U);$.set(L.data,0),$.set(w.subarray(0,U),L.data.byteLength),L.data=$,L.state=0}}y<p?(k=w[y]&31,I=y,V=k,d=0):d=-1}else d=0}if(I>=0&&d>=0){var Y={data:w.subarray(I,p),type:V,state:d};C.push(Y)}if(C.length===0){var ne=this.getLastNalUnit();if(ne){var se=new Uint8Array(ne.data.byteLength+w.byteLength);se.set(ne.data,0),se.set(w,ne.data.byteLength),ne.data=se}}return n.naluState=d,C},x.parseAACPES=function(w){var p=0,n=this._audioTrack,d=this.aacOverFlow,m=w.data;if(d){this.aacOverFlow=null;var C=d.sample.unit.byteLength,y=Math.min(d.missing,C),g=C-y;d.sample.unit.set(m.subarray(0,y),g),n.samples.push(d.sample),p=d.missing}var U,k;for(U=p,k=m.length;U<k-1&&!K.isHeader(m,U);U++);if(U!==p){var I,V;if(U<k-1?(I="AAC PES did not start with ADTS header,offset:"+U,V=!1):(I="no ADTS header found in AAC PES",V=!0),i.logger.warn("parsing error:"+I),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:V,reason:I}),V)return}K.initTrackConfig(n,this.observer,m,U,this.audioCodec);var G;if(w.pts!==void 0)G=w.pts;else if(d){var L=K.getFrameDuration(n.samplerate);G=d.sample.pts+L}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var $=0;U<k;)if(K.isHeader(m,U)){if(U+5<k){var Y=K.appendFrame(n,m,U,G,$);if(Y)if(Y.missing)this.aacOverFlow=Y;else{U+=Y.length,$++;continue}}break}else U++},x.parseMPEGPES=function(w){var p=w.data,n=p.length,d=0,m=0,C=w.pts;if(C===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;m<n;)if(M.isHeader(p,m)){var y=M.appendFrame(this._audioTrack,p,m,C,d);if(y)m+=y.length,d++;else break}else m++},x.parseID3PES=function(w){if(w.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(w)},T}();s.minProbeByteLength=188;function o(T,x,D,w){return{key:T,frame:!1,pts:x,dts:D,units:[],debug:w,length:0}}function f(T,x){return(T[x+10]&31)<<8|T[x+11]}function l(T,x,D,w){var p={audio:-1,avc:-1,id3:-1,isAAC:!0},n=(T[x+1]&15)<<8|T[x+2],d=x+3+n-4,m=(T[x+10]&15)<<8|T[x+11];for(x+=12+m;x<d;){var C=(T[x+1]&31)<<8|T[x+2];switch(T[x]){case 207:if(!w){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:p.audio===-1&&(p.audio=C);break;case 21:p.id3===-1&&(p.id3=C);break;case 219:if(!w){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:p.avc===-1&&(p.avc=C);break;case 3:case 4:D?p.audio===-1&&(p.audio=C,p.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}x+=((T[x+3]&15)<<8|T[x+4])+5}return p}function c(T){var x=0,D,w,p,n,d,m=T.data;if(!T||T.size===0)return null;for(;m[0].length<19&&m.length>1;){var C=new Uint8Array(m[0].length+m[1].length);C.set(m[0]),C.set(m[1],m[0].length),m[0]=C,m.splice(1,1)}D=m[0];var y=(D[0]<<16)+(D[1]<<8)+D[2];if(y===1){if(w=(D[4]<<8)+D[5],w&&w>T.size-6)return null;var g=D[7];g&192&&(n=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,g&64?(d=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,n-d>60*9e4&&(i.logger.warn(Math.round((n-d)/9e4)+"s delta between PTS and DTS, align them"),n=d)):d=n),p=D[8];var U=p+9;if(T.size<=U)return null;T.size-=U;for(var k=new Uint8Array(T.size),I=0,V=m.length;I<V;I++){D=m[I];var G=D.byteLength;if(U)if(U>G){U-=G;continue}else D=D.subarray(U),G-=U,U=0;k.set(D,x),x+=G}return w&&(w-=p+3),{data:k,pts:n,dts:d,len:w}}return null}function a(T,x){if(T.units.length&&T.frame){if(T.pts===void 0){var D=x.samples,w=D.length;if(w){var p=D[w-1];T.pts=p.pts,T.dts=p.dts}else{x.dropped++;return}}x.samples.push(T)}T.debug.length&&i.logger.log(T.pts+"/"+T.dts+":"+T.debug)}function u(T,x){var D=T.length;if(D>0){if(x.pts>=T[D-1].pts)T.push(x);else for(var w=D-1;w>=0;w--)if(x.pts<T[w].pts){T.splice(w,0,x);break}}else T.push(x)}function v(T){for(var x=T.byteLength,D=[],w=1;w<x-2;)T[w]===0&&T[w+1]===0&&T[w+2]===3?(D.push(w+2),w+=2):w++;if(D.length===0)return T;var p=x-D.length,n=new Uint8Array(p),d=0;for(w=0;w<p;d++,w++)d===D[0]&&(d++,D.shift()),n[w]=T[d];return n}Q.default=s},"./src/errors.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"ErrorTypes",function(){return K}),O.d(Q,"ErrorDetails",function(){return M});var K;(function(B){B.NETWORK_ERROR="networkError",B.MEDIA_ERROR="mediaError",B.KEY_SYSTEM_ERROR="keySystemError",B.MUX_ERROR="muxError",B.OTHER_ERROR="otherError"})(K||(K={}));var M;(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"})(M||(M={}))},"./src/events.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"Events",function(){return K});var K;(function(M){M.MEDIA_ATTACHING="hlsMediaAttaching",M.MEDIA_ATTACHED="hlsMediaAttached",M.MEDIA_DETACHING="hlsMediaDetaching",M.MEDIA_DETACHED="hlsMediaDetached",M.BUFFER_RESET="hlsBufferReset",M.BUFFER_CODECS="hlsBufferCodecs",M.BUFFER_CREATED="hlsBufferCreated",M.BUFFER_APPENDING="hlsBufferAppending",M.BUFFER_APPENDED="hlsBufferAppended",M.BUFFER_EOS="hlsBufferEos",M.BUFFER_FLUSHING="hlsBufferFlushing",M.BUFFER_FLUSHED="hlsBufferFlushed",M.MANIFEST_LOADING="hlsManifestLoading",M.MANIFEST_LOADED="hlsManifestLoaded",M.MANIFEST_PARSED="hlsManifestParsed",M.LEVEL_SWITCHING="hlsLevelSwitching",M.LEVEL_SWITCHED="hlsLevelSwitched",M.LEVEL_LOADING="hlsLevelLoading",M.LEVEL_LOADED="hlsLevelLoaded",M.LEVEL_UPDATED="hlsLevelUpdated",M.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",M.LEVELS_UPDATED="hlsLevelsUpdated",M.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",M.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",M.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",M.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",M.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",M.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",M.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",M.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",M.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",M.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",M.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",M.CUES_PARSED="hlsCuesParsed",M.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",M.INIT_PTS_FOUND="hlsInitPtsFound",M.FRAG_LOADING="hlsFragLoading",M.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",M.FRAG_LOADED="hlsFragLoaded",M.FRAG_DECRYPTED="hlsFragDecrypted",M.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",M.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",M.FRAG_PARSING_METADATA="hlsFragParsingMetadata",M.FRAG_PARSED="hlsFragParsed",M.FRAG_BUFFERED="hlsFragBuffered",M.FRAG_CHANGED="hlsFragChanged",M.FPS_DROP="hlsFpsDrop",M.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",M.ERROR="hlsError",M.DESTROYING="hlsDestroying",M.KEY_LOADING="hlsKeyLoading",M.KEY_LOADED="hlsKeyLoaded",M.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",M.BACK_BUFFER_REACHED="hlsBackBufferReached"})(K||(K={}))},"./src/hls.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return T});var K=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(K),B=O("./src/loader/playlist-loader.ts"),R=O("./src/loader/key-loader.ts"),b=O("./src/controller/id3-track-controller.ts"),t=O("./src/controller/latency-controller.ts"),E=O("./src/controller/level-controller.ts"),i=O("./src/controller/fragment-tracker.ts"),A=O("./src/controller/stream-controller.ts"),h=O("./src/is-supported.ts"),s=O("./src/utils/logger.ts"),o=O("./src/config.ts"),f=O("./node_modules/eventemitter3/index.js"),l=O.n(f),c=O("./src/events.ts"),a=O("./src/errors.ts");function u(x,D){for(var w=0;w<D.length;w++){var p=D[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(x,p.key,p)}}function v(x,D,w){return D&&u(x.prototype,D),w&&u(x,w),x}var T=function(){x.isSupported=function(){return Object(h.isSupported)()};function x(w){w===void 0&&(w={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.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 p=this.config=Object(o.mergeConfig)(x.DefaultConfig,w);this.userConfig=w,Object(s.enableLogs)(p.debug),this._autoLevelCapping=-1,p.progressive&&Object(o.enableStreamingMode)(p);var n=p.abrController,d=p.bufferController,m=p.capLevelController,C=p.fpsController,y=this.abrController=new n(this),g=this.bufferController=new d(this),U=this.capLevelController=new m(this),k=new C(this),I=new B.default(this),V=new R.default(this),G=new b.default(this),L=this.levelController=new E.default(this),$=new i.FragmentTracker(this),Y=this.streamController=new A.default(this,$);U.setStreamController(Y),k.setStreamController(Y);var ne=[L,Y];this.networkControllers=ne;var se=[I,V,y,g,U,k,G,$];this.audioTrackController=this.createController(p.audioTrackController,null,ne),this.createController(p.audioStreamController,$,ne),this.subtitleTrackController=this.createController(p.subtitleTrackController,null,ne),this.createController(p.subtitleStreamController,$,ne),this.createController(p.timelineController,null,se),this.emeController=this.createController(p.emeController,null,se),this.cmcdController=this.createController(p.cmcdController,null,se),this.latencyController=this.createController(t.default,null,se),this.coreComponents=se}var D=x.prototype;return D.createController=function(p,n,d){if(p){var m=n?new p(this,n):new p(this);return d&&d.push(m),m}return null},D.on=function(p,n,d){d===void 0&&(d=this),this._emitter.on(p,n,d)},D.once=function(p,n,d){d===void 0&&(d=this),this._emitter.once(p,n,d)},D.removeAllListeners=function(p){this._emitter.removeAllListeners(p)},D.off=function(p,n,d,m){d===void 0&&(d=this),this._emitter.off(p,n,d,m)},D.listeners=function(p){return this._emitter.listeners(p)},D.emit=function(p,n,d){return this._emitter.emit(p,n,d)},D.trigger=function(p,n){if(this.config.debug)return this.emit(p,p,n);try{return this.emit(p,p,n)}catch(d){s.logger.error("An internal error happened while handling event "+p+'. Error message: "'+d.message+'". Here is a stacktrace:',d),this.trigger(c.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:p,error:d})}return!1},D.listenerCount=function(p){return this._emitter.listenerCount(p)},D.destroy=function(){s.logger.log("destroy"),this.trigger(c.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(p){return p.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(p){return p.destroy()}),this.coreComponents.length=0},D.attachMedia=function(p){s.logger.log("attachMedia"),this._media=p,this.trigger(c.Events.MEDIA_ATTACHING,{media:p})},D.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(c.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(p){this.stopLoad();var n=this.media,d=this.url,m=this.url=K.buildAbsoluteURL(self.location.href,p,{alwaysNormalize:!0});s.logger.log("loadSource:"+m),n&&d&&d!==m&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(c.Events.MANIFEST_LOADING,{url:p})},D.startLoad=function(p){p===void 0&&(p=-1),s.logger.log("startLoad("+p+")"),this.networkControllers.forEach(function(n){n.startLoad(p)})},D.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(p){p.stopLoad()})},D.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){s.logger.log("recoverMediaError");var p=this._media;this.detachMedia(),p&&this.attachMedia(p)},D.removeLevel=function(p,n){n===void 0&&(n=0),this.levelController.removeLevel(p,n)},v(x,[{key:"levels",get:function(){var p=this.levelController.levels;return p||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(p){s.logger.log("set currentLevel:"+p),this.loadLevel=p,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(p){s.logger.log("set nextLevel:"+p),this.levelController.manualLevel=p,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(p){s.logger.log("set loadLevel:"+p),this.levelController.manualLevel=p}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(p){this.levelController.nextLoadLevel=p}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(p){s.logger.log("set firstLevel:"+p),this.levelController.firstLevel=p}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(p){s.logger.log("set startLevel:"+p),p!==-1&&(p=Math.max(p,this.minAutoLevel)),this.levelController.startLevel=p}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(p){var n=!!p;n!==this.config.capLevelToPlayerSize&&(n?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=n)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(p){this._autoLevelCapping!==p&&(s.logger.log("set autoLevelCapping:"+p),this._autoLevelCapping=p)}},{key:"bandwidthEstimate",get:function(){var p=this.abrController.bwEstimator;return p?p.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var p=this.levels,n=this.config.minAutoBitrate;if(!p)return 0;for(var d=p.length,m=0;m<d;m++)if(p[m].maxBitrate>n)return m;return 0}},{key:"maxAutoLevel",get:function(){var p=this.levels,n=this.autoLevelCapping,d;return n===-1&&p&&p.length?d=p.length-1:d=n,d}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(p){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,p)}},{key:"audioTracks",get:function(){var p=this.audioTrackController;return p?p.audioTracks:[]}},{key:"audioTrack",get:function(){var p=this.audioTrackController;return p?p.audioTrack:-1},set:function(p){var n=this.audioTrackController;n&&(n.audioTrack=p)}},{key:"subtitleTracks",get:function(){var p=this.subtitleTrackController;return p?p.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var p=this.subtitleTrackController;return p?p.subtitleTrack:-1},set:function(p){var n=this.subtitleTrackController;n&&(n.subtitleTrack=p)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var p=this.subtitleTrackController;return p?p.subtitleDisplay:!1},set:function(p){var n=this.subtitleTrackController;n&&(n.subtitleDisplay=p)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(p){this.config.lowLatencyMode=p}},{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 c.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:o.hlsDefaultConfig},set:function(p){x.defaultConfig=p}}]),x}();T.defaultConfig=void 0},"./src/is-supported.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"isSupported",function(){return B}),O.d(Q,"changeTypeSupported",function(){return R});var K=O("./src/utils/mediasource-helper.ts");function M(){return self.SourceBuffer||self.WebKitSourceBuffer}function B(){var b=Object(K.getMediaSource)();if(!b)return!1;var t=M(),E=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!E&&!!i}function R(){var b,t=M();return typeof(t==null||((b=t.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return s}),O.d(Q,"LoadError",function(){return f});var K=O("./src/polyfills/number.ts"),M=O("./src/errors.ts");function B(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,i(l,c)}function R(l){var c=typeof Map=="function"?new Map:void 0;return R=function(u){if(u===null||!E(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof c!="undefined"){if(c.has(u))return c.get(u);c.set(u,v)}function v(){return b(u,arguments,A(this).constructor)}return v.prototype=Object.create(u.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),i(v,u)},R(l)}function b(l,c,a){return t()?b=Reflect.construct:b=function(v,T,x){var D=[null];D.push.apply(D,T);var w=Function.bind.apply(v,D),p=new w;return x&&i(p,x.prototype),p},b.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(l){return!1}}function E(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function i(l,c){return i=Object.setPrototypeOf||function(u,v){return u.__proto__=v,u},i(l,c)}function A(l){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},A(l)}var h=Math.pow(2,17),s=function(){function l(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var c=l.prototype;return c.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},c.abort=function(){this.loader&&this.loader.abort()},c.load=function(u,v){var T=this,x=u.url;if(!x)return Promise.reject(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var D=this.config,w=D.fLoader,p=D.loader;return new Promise(function(n,d){T.loader&&T.loader.destroy();var m=T.loader=u.loader=w?new w(D):new p(D),C=o(u),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:h};u.stats=m.stats,m.load(C,y,{onSuccess:function(U,k,I,V){T.resetLoader(u,m),n({frag:u,part:null,payload:U.data,networkDetails:V})},onError:function(U,k,I){T.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:U,networkDetails:I}))},onAbort:function(U,k,I){T.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:I}))},onTimeout:function(U,k,I){T.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:I}))},onProgress:function(U,k,I,V){v&&v({frag:u,part:null,payload:I,networkDetails:V})}})})},c.loadPart=function(u,v,T){var x=this;this.abort();var D=this.config,w=D.fLoader,p=D.loader;return new Promise(function(n,d){x.loader&&x.loader.destroy();var m=x.loader=u.loader=w?new w(D):new p(D),C=o(u,v),y={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:h};v.stats=m.stats,m.load(C,y,{onSuccess:function(U,k,I,V){x.resetLoader(u,m),x.updateStatsFromPart(u,v);var G={frag:u,part:v,payload:U.data,networkDetails:V};T(G),n(G)},onError:function(U,k,I){x.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:v,response:U,networkDetails:I}))},onAbort:function(U,k,I){u.stats.aborted=v.stats.aborted,x.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:v,networkDetails:I}))},onTimeout:function(U,k,I){x.resetLoader(u,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:v,networkDetails:I}))}})})},c.updateStatsFromPart=function(u,v){var T=u.stats,x=v.stats,D=x.total;if(T.loaded+=x.loaded,D){var w=Math.round(u.duration/v.duration),p=Math.min(Math.round(T.loaded/D),w),n=w-p,d=n*Math.round(T.loaded/p);T.total=T.loaded+d}else T.total=Math.max(T.loaded,T.total);var m=T.loading,C=x.loading;m.start?m.first+=C.first-C.start:(m.start=C.start,m.first=C.first),m.end=C.end},c.resetLoader=function(u,v){u.loader=null,this.loader===v&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),v.destroy()},l}();function o(l,c){c===void 0&&(c=null);var a=c||l,u={frag:l,part:c,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},v=a.byteRangeStartOffset,T=a.byteRangeEndOffset;return Object(K.isFiniteNumber)(v)&&Object(K.isFiniteNumber)(T)&&(u.rangeStart=v,u.rangeEnd=T),u}var f=function(l){B(c,l);function c(a){for(var u,v=arguments.length,T=new Array(v>1?v-1:0),x=1;x<v;x++)T[x-1]=arguments[x];return u=l.call.apply(l,[this].concat(T))||this,u.data=void 0,u.data=a,u}return c}(R(Error))},"./src/loader/fragment.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"ElementaryStreamTypes",function(){return s}),O.d(Q,"BaseSegment",function(){return o}),O.d(Q,"Fragment",function(){return f}),O.d(Q,"Part",function(){return l});var K=O("./src/polyfills/number.ts"),M=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(M),R=O("./src/utils/logger.ts"),b=O("./src/loader/level-key.ts"),t=O("./src/loader/load-stats.ts");function E(c,a){c.prototype=Object.create(a.prototype),c.prototype.constructor=c,i(c,a)}function i(c,a){return i=Object.setPrototypeOf||function(v,T){return v.__proto__=T,v},i(c,a)}function A(c,a){for(var u=0;u<a.length;u++){var v=a[u];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,v.key,v)}}function h(c,a,u){return a&&A(c.prototype,a),u&&A(c,u),c}var s;(function(c){c.AUDIO="audio",c.VIDEO="video",c.AUDIOVIDEO="audiovideo"})(s||(s={}));var o=function(){function c(u){var v;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(v={},v[s.AUDIO]=null,v[s.VIDEO]=null,v[s.AUDIOVIDEO]=null,v),this.baseurl=u}var a=c.prototype;return a.setByteRange=function(v,T){var x=v.split("@",2),D=[];x.length===1?D[0]=T?T.byteRangeEndOffset:0:D[0]=parseInt(x[1]),D[1]=parseInt(x[0])+D[0],this._byteRange=D},h(c,[{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(M.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(v){this._url=v}}]),c}(),f=function(c){E(a,c);function a(v,T){var x;return x=c.call(this,T)||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=v,x}var u=a.prototype;return u.createInitializationVector=function(T){for(var x=new Uint8Array(16),D=12;D<16;D++)x[D]=T>>8*(15-D)&255;return x},u.setDecryptDataFromLevelKey=function(T,x){var D=T;return(T==null?void 0:T.method)==="AES-128"&&T.uri&&!T.iv&&(D=b.LevelKey.fromURI(T.uri),D.method=T.method,D.iv=this.createInitializationVector(x),D.keyFormat="identity"),D},u.setElementaryStreamInfo=function(T,x,D,w,p,n){n===void 0&&(n=!1);var d=this.elementaryStreams,m=d[T];if(!m){d[T]={startPTS:x,endPTS:D,startDTS:w,endDTS:p,partial:n};return}m.startPTS=Math.min(m.startPTS,x),m.endPTS=Math.max(m.endPTS,D),m.startDTS=Math.min(m.startDTS,w),m.endDTS=Math.max(m.endDTS,p)},u.clearElementaryStreamInfo=function(){var T=this.elementaryStreams;T[s.AUDIO]=null,T[s.VIDEO]=null,T[s.AUDIOVIDEO]=null},h(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var T=this.sn;typeof T!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&R.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),T=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,T)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(K.isFiniteNumber)(this.programDateTime))return null;var T=Object(K.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+T*1e3}},{key:"encrypted",get:function(){var T;return!!((T=this.decryptdata)!==null&&T!==void 0&&T.keyFormat&&this.decryptdata.uri)}}]),a}(o),l=function(c){E(a,c);function a(u,v,T,x,D){var w;w=c.call(this,T)||this,w.fragOffset=0,w.duration=0,w.gap=!1,w.independent=!1,w.relurl=void 0,w.fragment=void 0,w.index=void 0,w.stats=new t.LoadStats,w.duration=u.decimalFloatingPoint("DURATION"),w.gap=u.bool("GAP"),w.independent=u.bool("INDEPENDENT"),w.relurl=u.enumeratedString("URI"),w.fragment=v,w.index=x;var p=u.enumeratedString("BYTERANGE");return p&&w.setByteRange(p,D),D&&(w.fragOffset=D.fragOffset+D.duration),w}return h(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 v=this.elementaryStreams;return!!(v.audio||v.video||v.audiovideo)}}]),a}(o)},"./src/loader/key-loader.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return R});var K=O("./src/events.ts"),M=O("./src/errors.ts"),B=O("./src/utils/logger.ts"),R=function(){function b(E){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=E,this._registerListeners()}var t=b.prototype;return t._registerListeners=function(){this.hls.on(K.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(K.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var A=this.loaders[i];A&&A.destroy()}this.loaders={}},t.onKeyLoading=function(i,A){var h=A.frag,s=h.type,o=this.loaders[s];if(!h.decryptdata){B.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=h.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(o&&(B.logger.warn("abort previous key loader for type:"+s),o.abort()),!f){B.logger.warn("key uri is falsy");return}var c=l.loader,a=h.loader=this.loaders[s]=new c(l);this.decrypturl=f,this.decryptkey=null;var u={url:f,frag:h,responseType:"arraybuffer"},v={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(u,v,T)}else this.decryptkey&&(h.decryptdata.key=this.decryptkey,this.hls.trigger(K.Events.KEY_LOADED,{frag:h}))},t.loadsuccess=function(i,A,h){var s=h.frag;if(!s.decryptdata){B.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(i.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(K.Events.KEY_LOADED,{frag:s})},t.loaderror=function(i,A){var h=A.frag,s=h.loader;s&&s.abort(),delete this.loaders[h.type],this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:h,response:i})},t.loadtimeout=function(i,A){var h=A.frag,s=h.loader;s&&s.abort(),delete this.loaders[h.type],this.hls.trigger(K.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:h})},b}()},"./src/loader/level-details.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"LevelDetails",function(){return b});var K=O("./src/polyfills/number.ts");function M(t,E){for(var i=0;i<E.length;i++){var A=E[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(t,A.key,A)}}function B(t,E,i){return E&&M(t.prototype,E),i&&M(t,i),t}var R=10,b=function(){function t(i){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=i}var E=t.prototype;return E.reloaded=function(A){if(!A){this.advanced=!0,this.updated=!0;return}var h=this.lastPartSn-A.lastPartSn,s=this.lastPartIndex-A.lastPartIndex;this.updated=this.endSN!==A.endSN||!!s||!!h,this.advanced=this.endSN>A.endSN||h>0||h===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(A.misses*.6):this.misses=A.misses+1,this.availabilityDelay=A.availabilityDelay},B(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(K.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||R}},{key:"drift",get:function(){var A=this.driftEndTime-this.driftStartTime;if(A>0){var h=this.driftEnd-this.driftStart;return h*1e3/A}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var A;return(A=this.fragments)!==null&&A!==void 0&&A.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 A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),t}()},"./src/loader/level-key.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"LevelKey",function(){return b});var K=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(K);function B(t,E){for(var i=0;i<E.length;i++){var A=E[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(t,A.key,A)}}function R(t,E,i){return E&&B(t.prototype,E),i&&B(t,i),t}var b=function(){t.fromURL=function(i,A){return new t(i,A)},t.fromURI=function(i){return new t(i)};function t(E,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(K.buildAbsoluteURL)(E,i,{alwaysNormalize:!0}):this._uri=E}return R(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"LoadStats",function(){return K});var K=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(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a});var K=O("./src/polyfills/number.ts"),M=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(M),R=O("./src/loader/fragment.ts"),b=O("./src/loader/level-details.ts"),t=O("./src/loader/level-key.ts"),E=O("./src/utils/attr-list.ts"),i=O("./src/utils/logger.ts"),A=O("./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,s=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=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("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function c(D){var w,p;return l.test((w=(p=M.parseURL(D))===null||p===void 0?void 0:p.path)!=null?w:"")}var a=function(){function D(){}return D.findGroup=function(p,n){for(var d=0;d<p.length;d++){var m=p[d];if(m.id===n)return m}},D.convertAVC1ToAVCOTI=function(p){var n=p.split(".");if(n.length>2){var d=n.shift()+".";return d+=parseInt(n.shift()).toString(16),d+=("000"+parseInt(n.shift()).toString(16)).substr(-4),d}return p},D.resolve=function(p,n){return M.buildAbsoluteURL(n,p,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(p,n){var d=[],m={},C=!1;h.lastIndex=0;for(var y;(y=h.exec(p))!=null;)if(y[1]){var g=new E.AttrList(y[1]),U={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:D.resolve(y[2],n)},k=g.decimalResolution("RESOLUTION");k&&(U.width=k.width,U.height=k.height),u((g.CODECS||"").split(/[ ,]+/).filter(function(V){return V}),U),U.videoCodec&&U.videoCodec.indexOf("avc1")!==-1&&(U.videoCodec=D.convertAVC1ToAVCOTI(U.videoCodec)),d.push(U)}else if(y[3]){var I=new E.AttrList(y[3]);I["DATA-ID"]&&(C=!0,m[I["DATA-ID"]]=I)}return{levels:d,sessionData:C?m:null}},D.parseMasterPlaylistMedia=function(p,n,d,m){m===void 0&&(m=[]);var C,y=[],g=0;for(s.lastIndex=0;(C=s.exec(p))!==null;){var U=new E.AttrList(C[1]);if(U.TYPE===d){var k={attrs:U,bitrate:0,id:g++,groupId:U["GROUP-ID"],instreamId:U["INSTREAM-ID"],name:U.NAME||U.LANGUAGE||"",type:d,default:U.bool("DEFAULT"),autoselect:U.bool("AUTOSELECT"),forced:U.bool("FORCED"),lang:U.LANGUAGE,url:U.URI?D.resolve(U.URI,n):""};if(m.length){var I=D.findGroup(m,k.groupId)||m[0];v(k,I,"audioCodec"),v(k,I,"textCodec")}y.push(k)}}return y},D.parseLevelPlaylist=function(p,n,d,m,C){var y=new b.LevelDetails(n),g=y.fragments,U=null,k=0,I=0,V=0,G=0,L=null,$=new R.Fragment(m,n),Y,ne,se,_e=-1,ve=!1;for(o.lastIndex=0,y.m3u8=p;(Y=o.exec(p))!==null;){ve&&(ve=!1,$=new R.Fragment(m,n),$.start=V,$.sn=k,$.cc=G,$.level=d,U&&($.initSegment=U,$.rawProgramDateTime=U.rawProgramDateTime));var Ce=Y[1];if(Ce){$.duration=parseFloat(Ce);var De=(" "+Y[2]).slice(1);$.title=De||null,$.tagList.push(De?["INF",Ce,De]:["INF",Ce])}else if(Y[3])Object(K.isFiniteNumber)($.duration)&&($.start=V,se&&($.levelkey=se),$.sn=k,$.level=d,$.cc=G,$.urlId=C,g.push($),$.relurl=(" "+Y[3]).slice(1),x($,L),L=$,V+=$.duration,k++,I=0,ve=!0);else if(Y[4]){var Qe=(" "+Y[4]).slice(1);L?$.setByteRange(Qe,L):$.setByteRange(Qe)}else if(Y[5])$.rawProgramDateTime=(" "+Y[5]).slice(1),$.tagList.push(["PROGRAM-DATE-TIME",$.rawProgramDateTime]),_e===-1&&(_e=g.length);else{if(Y=Y[0].match(f),!Y){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(ne=1;ne<Y.length&&!(typeof Y[ne]!="undefined");ne++);var Se=(" "+Y[ne]).slice(1),Ie=(" "+Y[ne+1]).slice(1),Je=Y[ne+2]?(" "+Y[ne+2]).slice(1):"";switch(Se){case"PLAYLIST-TYPE":y.type=Ie.toUpperCase();break;case"MEDIA-SEQUENCE":k=y.startSN=parseInt(Ie);break;case"SKIP":{var Et=new E.AttrList(Ie),Le=Et.decimalInteger("SKIPPED-SEGMENTS");if(Object(K.isFiniteNumber)(Le)){y.skippedSegments=Le;for(var je=Le;je--;)g.unshift(null);k+=Le}var st=Et.enumeratedString("RECENTLY-REMOVED-DATERANGES");st&&(y.recentlyRemovedDateranges=st.split(" "));break}case"TARGETDURATION":y.targetduration=parseFloat(Ie);break;case"VERSION":y.version=parseInt(Ie);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(Ie||Je)&&$.tagList.push(Je?[Ie,Je]:[Ie]);break;case"DIS":G++;case"GAP":$.tagList.push([Se]);break;case"BITRATE":$.tagList.push([Se,Ie]);break;case"DISCONTINUITY-SEQ":G=parseInt(Ie);break;case"KEY":{var he,ie=new E.AttrList(Ie),oe=ie.enumeratedString("METHOD"),ee=ie.URI,de=ie.hexadecimalInteger("IV"),we=ie.enumeratedString("KEYFORMATVERSIONS"),Be=ie.enumeratedString("KEYID"),nt=(he=ie.enumeratedString("KEYFORMAT"))!=null?he:"identity",at=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(at.indexOf(nt)>-1){i.logger.warn("Keyformat "+nt+" is not supported from the manifest");continue}else if(nt!=="identity")continue;oe&&(se=t.LevelKey.fromURL(n,ee),ee&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(oe)>=0&&(se.method=oe,se.keyFormat=nt,Be&&(se.keyID=Be),we&&(se.keyFormatVersions=we),se.iv=de));break}case"START":{var At=new E.AttrList(Ie),ft=At.decimalFloatingPoint("TIME-OFFSET");Object(K.isFiniteNumber)(ft)&&(y.startTimeOffset=ft);break}case"MAP":{var xt=new E.AttrList(Ie);$.relurl=xt.URI,xt.BYTERANGE&&$.setByteRange(xt.BYTERANGE),$.level=d,$.sn="initSegment",se&&($.levelkey=se),$.initSegment=null,U=$,ve=!0;break}case"SERVER-CONTROL":{var It=new E.AttrList(Ie);y.canBlockReload=It.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=It.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&It.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=It.optionalFloat("PART-HOLD-BACK",0),y.holdBack=It.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new E.AttrList(Ie);y.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var ke=y.partList;ke||(ke=y.partList=[]);var ct=I>0?ke[ke.length-1]:void 0,gt=I++,Ze=new R.Part(new E.AttrList(Ie),$,n,gt,ct);ke.push(Ze),$.duration+=Ze.duration;break}case"PRELOAD-HINT":{var ot=new E.AttrList(Ie);y.preloadHint=ot;break}case"RENDITION-REPORT":{var Ke=new E.AttrList(Ie);y.renditionReports=y.renditionReports||[],y.renditionReports.push(Ke);break}default:i.logger.warn("line parsed but not handled: "+Y);break}}}L&&!L.relurl?(g.pop(),V-=L.duration,y.partList&&(y.fragmentHint=L)):y.partList&&(x($,L),$.cc=G,y.fragmentHint=$);var Me=g.length,Ue=g[0],ge=g[Me-1];if(V+=y.skippedSegments*y.targetduration,V>0&&Me&&ge){y.averagetargetduration=V/Me;var xe=ge.sn;y.endSN=xe!=="initSegment"?xe:0,Ue&&(y.startCC=Ue.cc,Ue.initSegment||y.fragments.every(function(Ee){return Ee.relurl&&c(Ee.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),$=new R.Fragment(m,n),$.relurl=ge.relurl,$.level=d,$.sn="initSegment",Ue.initSegment=$,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(V+=y.fragmentHint.duration),y.totalduration=V,y.endCC=G,_e>0&&T(g,_e),y},D}();function u(D,w){["video","audio","text"].forEach(function(p){var n=D.filter(function(m){return Object(A.isCodecType)(m,p)});if(n.length){var d=n.filter(function(m){return m.lastIndexOf("avc1",0)===0||m.lastIndexOf("mp4a",0)===0});w[p+"Codec"]=d.length>0?d[0]:n[0],D=D.filter(function(m){return n.indexOf(m)===-1})}}),w.unknownCodecs=D}function v(D,w,p){var n=w[p];n&&(D[p]=n)}function T(D,w){for(var p=D[w],n=w;n--;){var d=D[n];if(!d)return;d.programDateTime=p.programDateTime-d.duration*1e3,p=d}}function x(D,w){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):w!=null&&w.programDateTime&&(D.programDateTime=w.endProgramDateTime),Object(K.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),B=O("./src/errors.ts"),R=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),t=O("./src/loader/m3u8-parser.ts"),E=O("./src/types/loader.ts"),i=O("./src/utils/attr-list.ts");function A(o){var f=o.type;switch(f){case E.PlaylistContextType.AUDIO_TRACK:return E.PlaylistLevelType.AUDIO;case E.PlaylistContextType.SUBTITLE_TRACK:return E.PlaylistLevelType.SUBTITLE;default:return E.PlaylistLevelType.MAIN}}function h(o,f){var l=o.url;return(l===void 0||l.indexOf("data:")===0)&&(l=f.url),l}var s=function(){function o(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var f=o.prototype;return f.registerListeners=function(){var c=this.hls;c.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(M.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),c.on(M.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var c=this.hls;c.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(M.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),c.off(M.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(c){var a=this.hls.config,u=a.pLoader,v=a.loader,T=u||v,x=new T(a);return c.loader=x,this.loaders[c.type]=x,x},f.getInternalLoader=function(c){return this.loaders[c.type]},f.resetInternalLoader=function(c){this.loaders[c]&&delete this.loaders[c]},f.destroyInternalLoaders=function(){for(var c in this.loaders){var a=this.loaders[c];a&&a.destroy(),this.resetInternalLoader(c)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(c,a){var u=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:E.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},f.onLevelLoading=function(c,a){var u=a.id,v=a.level,T=a.url,x=a.deliveryDirectives;this.load({id:u,groupId:null,level:v,responseType:"text",type:E.PlaylistContextType.LEVEL,url:T,deliveryDirectives:x})},f.onAudioTrackLoading=function(c,a){var u=a.id,v=a.groupId,T=a.url,x=a.deliveryDirectives;this.load({id:u,groupId:v,level:null,responseType:"text",type:E.PlaylistContextType.AUDIO_TRACK,url:T,deliveryDirectives:x})},f.onSubtitleTrackLoading=function(c,a){var u=a.id,v=a.groupId,T=a.url,x=a.deliveryDirectives;this.load({id:u,groupId:v,level:null,responseType:"text",type:E.PlaylistContextType.SUBTITLE_TRACK,url:T,deliveryDirectives:x})},f.load=function(c){var a,u=this.hls.config,v=this.getInternalLoader(c);if(v){var T=v.context;if(T&&T.url===c.url){R.logger.trace("[playlist-loader]: playlist request ongoing");return}R.logger.log("[playlist-loader]: aborting previous loader for type: "+c.type),v.abort()}var x,D,w,p;switch(c.type){case E.PlaylistContextType.MANIFEST:x=u.manifestLoadingMaxRetry,D=u.manifestLoadingTimeOut,w=u.manifestLoadingRetryDelay,p=u.manifestLoadingMaxRetryTimeout;break;case E.PlaylistContextType.LEVEL:case E.PlaylistContextType.AUDIO_TRACK:case E.PlaylistContextType.SUBTITLE_TRACK:x=0,D=u.levelLoadingTimeOut;break;default:x=u.levelLoadingMaxRetry,D=u.levelLoadingTimeOut,w=u.levelLoadingRetryDelay,p=u.levelLoadingMaxRetryTimeout;break}if(v=this.createInternalLoader(c),(a=c.deliveryDirectives)!==null&&a!==void 0&&a.part){var n;if(c.type===E.PlaylistContextType.LEVEL&&c.level!==null?n=this.hls.levels[c.level].details:c.type===E.PlaylistContextType.AUDIO_TRACK&&c.id!==null?n=this.hls.audioTracks[c.id].details:c.type===E.PlaylistContextType.SUBTITLE_TRACK&&c.id!==null&&(n=this.hls.subtitleTracks[c.id].details),n){var d=n.partTarget,m=n.targetduration;d&&m&&(D=Math.min(Math.max(d*3,m*.8)*1e3,D))}}var C={timeout:D,maxRetry:x,retryDelay:w,maxRetryDelay:p,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};v.load(c,C,y)},f.loadsuccess=function(c,a,u,v){if(v===void 0&&(v=null),u.isSidxRequest){this.handleSidxRequest(c,u),this.handlePlaylistLoaded(c,a,u,v);return}this.resetInternalLoader(u.type);var T=c.data;if(T.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,u,"no EXTM3U delimiter",v);return}a.parsing.start=performance.now(),T.indexOf("#EXTINF:")>0||T.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(c,a,u,v):this.handleMasterPlaylist(c,a,u,v)},f.loaderror=function(c,a,u){u===void 0&&(u=null),this.handleNetworkError(a,u,!1,c)},f.loadtimeout=function(c,a,u){u===void 0&&(u=null),this.handleNetworkError(a,u,!0)},f.handleMasterPlaylist=function(c,a,u,v){var T=this.hls,x=c.data,D=h(c,u),w=t.default.parseMasterPlaylist(x,D),p=w.levels,n=w.sessionData;if(!p.length){this.handleManifestParsingError(c,u,"no level found in manifest",v);return}var d=p.map(function(k){return{id:k.attrs.AUDIO,audioCodec:k.audioCodec}}),m=p.map(function(k){return{id:k.attrs.SUBTITLES,textCodec:k.textCodec}}),C=t.default.parseMasterPlaylistMedia(x,D,"AUDIO",d),y=t.default.parseMasterPlaylistMedia(x,D,"SUBTITLES",m),g=t.default.parseMasterPlaylistMedia(x,D,"CLOSED-CAPTIONS");if(C.length){var U=C.some(function(k){return!k.url});!U&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(R.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 i.AttrList({}),bitrate:0,url:""}))}T.trigger(M.Events.MANIFEST_LOADED,{levels:p,audioTracks:C,subtitles:y,captions:g,url:D,stats:a,networkDetails:v,sessionData:n})},f.handleTrackOrLevelPlaylist=function(c,a,u,v){var T=this.hls,x=u.id,D=u.level,w=u.type,p=h(c,u),n=Object(K.isFiniteNumber)(x)?x:0,d=Object(K.isFiniteNumber)(D)?D:n,m=A(u),C=t.default.parseLevelPlaylist(c.data,p,d,m,n);if(!C.fragments.length){T.trigger(M.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:p,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(w===E.PlaylistContextType.MANIFEST){var y={attrs:new i.AttrList({}),bitrate:0,details:C,name:"",url:p};T.trigger(M.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:p,stats:a,networkDetails:v,sessionData:null})}if(a.parsing.end=performance.now(),C.needSidxRanges){var g,U=(g=C.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:U,isSidxRequest:!0,type:w,level:D,levelDetails:C,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=C,this.handlePlaylistLoaded(c,a,u,v)},f.handleSidxRequest=function(c,a){var u=Object(b.parseSegmentIndex)(new Uint8Array(c.data));if(!u)return;var v=u.references,T=a.levelDetails;v.forEach(function(x,D){var w=x.info,p=T.fragments[D];p.byteRange.length===0&&p.setByteRange(String(1+w.end-w.start)+"@"+String(w.start)),p.initSegment&&p.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(c,a,u,v){this.hls.trigger(M.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===E.PlaylistContextType.MANIFEST,url:c.url,reason:u,response:c,context:a,networkDetails:v})},f.handleNetworkError=function(c,a,u,v){u===void 0&&(u=!1),R.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+c.type+" level: "+c.level+" id: "+c.id+' group-id: "'+c.groupId+'"');var T=B.ErrorDetails.UNKNOWN,x=!1,D=this.getInternalLoader(c);switch(c.type){case E.PlaylistContextType.MANIFEST:T=u?B.ErrorDetails.MANIFEST_LOAD_TIMEOUT:B.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case E.PlaylistContextType.LEVEL:T=u?B.ErrorDetails.LEVEL_LOAD_TIMEOUT:B.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case E.PlaylistContextType.AUDIO_TRACK:T=u?B.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:B.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case E.PlaylistContextType.SUBTITLE_TRACK:T=u?B.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:B.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}D&&this.resetInternalLoader(c.type);var w={type:B.ErrorTypes.NETWORK_ERROR,details:T,fatal:x,url:c.url,loader:D,context:c,networkDetails:a};v&&(w.response=v),this.hls.trigger(M.Events.ERROR,w)},f.handlePlaylistLoaded=function(c,a,u,v){var T=u.type,x=u.level,D=u.id,w=u.groupId,p=u.loader,n=u.levelDetails,d=u.deliveryDirectives;if(!(n!=null&&n.targetduration)){this.handleManifestParsingError(c,u,"invalid target duration",v);return}if(!p)return;n.live&&(p.getCacheAge&&(n.ageHeader=p.getCacheAge()||0),(!p.getCacheAge||isNaN(n.ageHeader))&&(n.ageHeader=0));switch(T){case E.PlaylistContextType.MANIFEST:case E.PlaylistContextType.LEVEL:this.hls.trigger(M.Events.LEVEL_LOADED,{details:n,level:x||0,id:D||0,stats:a,networkDetails:v,deliveryDirectives:d});break;case E.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(M.Events.AUDIO_TRACK_LOADED,{details:n,id:D||0,groupId:w||"",stats:a,networkDetails:v,deliveryDirectives:d});break;case E.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADED,{details:n,id:D||0,groupId:w||"",stats:a,networkDetails:v,deliveryDirectives:d});break}},o}();Q.default=s},"./src/polyfills/number.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"isFiniteNumber",function(){return K}),O.d(Q,"MAX_SAFE_INTEGER",function(){return M});var K=Number.isFinite||function(B){return typeof B=="number"&&isFinite(B)},M=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,Q,O){"use strict";O.r(Q);var K=function(){function M(){}return M.getSilentFrame=function(R,b){switch(R){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(b===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(b===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(b===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},M}();Q.default=K},"./src/remux/mp4-generator.ts":function(Z,Q,O){"use strict";O.r(Q);var K=Math.pow(2,32)-1,M=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 b;for(b in B.types)B.types.hasOwnProperty(b)&&(B.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.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 i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]);B.STTS=B.STSC=B.STCO=A,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 h=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);B.FTYP=B.box(B.types.ftyp,h,o,h,s),B.DINF=B.box(B.types.dinf,B.box(B.types.dref,i))},B.box=function(b){for(var t=8,E=arguments.length,i=new Array(E>1?E-1:0),A=1;A<E;A++)i[A-1]=arguments[A];for(var h=i.length,s=h;h--;)t+=i[h].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=t&255,o.set(b,4),h=0,t=8;h<s;h++)o.set(i[h],t),t+=i[h].byteLength;return o},B.hdlr=function(b){return B.box(B.types.hdlr,B.HDLR_TYPES[b])},B.mdat=function(b){return B.box(B.types.mdat,b)},B.mdhd=function(b,t){t*=b;var E=Math.floor(t/(K+1)),i=Math.floor(t%(K+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,b>>24&255,b>>16&255,b>>8&255,b&255,E>>24,E>>16&255,E>>8&255,E&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},B.mdia=function(b){return B.box(B.types.mdia,B.mdhd(b.timescale,b.duration),B.hdlr(b.type),B.minf(b))},B.mfhd=function(b){return B.box(B.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},B.minf=function(b){return b.type==="audio"?B.box(B.types.minf,B.box(B.types.smhd,B.SMHD),B.DINF,B.stbl(b)):B.box(B.types.minf,B.box(B.types.vmhd,B.VMHD),B.DINF,B.stbl(b))},B.moof=function(b,t,E){return B.box(B.types.moof,B.mfhd(b),B.traf(E,t))},B.moov=function(b){for(var t=b.length,E=[];t--;)E[t]=B.trak(b[t]);return B.box.apply(null,[B.types.moov,B.mvhd(b[0].timescale,b[0].duration)].concat(E).concat(B.mvex(b)))},B.mvex=function(b){for(var t=b.length,E=[];t--;)E[t]=B.trex(b[t]);return B.box.apply(null,[B.types.mvex].concat(E))},B.mvhd=function(b,t){t*=b;var E=Math.floor(t/(K+1)),i=Math.floor(t%(K+1)),A=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,E>>24,E>>16&255,E>>8&255,E&255,i>>24,i>>16&255,i>>8&255,i&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,A)},B.sdtp=function(b){var t=b.samples||[],E=new Uint8Array(4+t.length),i,A;for(i=0;i<t.length;i++)A=t[i].flags,E[i+4]=A.dependsOn<<4|A.isDependedOn<<2|A.hasRedundancy;return B.box(B.types.sdtp,E)},B.stbl=function(b){return B.box(B.types.stbl,B.stsd(b),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(b){var t=[],E=[],i,A,h;for(i=0;i<b.sps.length;i++)A=b.sps[i],h=A.byteLength,t.push(h>>>8&255),t.push(h&255),t=t.concat(Array.prototype.slice.call(A));for(i=0;i<b.pps.length;i++)A=b.pps[i],h=A.byteLength,E.push(h>>>8&255),E.push(h&255),E=E.concat(Array.prototype.slice.call(A));var s=B.box(B.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|b.sps.length].concat(t).concat([b.pps.length]).concat(E))),o=b.width,f=b.height,l=b.pixelRatio[0],c=b.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,o>>8&255,o&255,f>>8&255,f&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]),s,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([l>>24,l>>16&255,l>>8&255,l&255,c>>24,c>>16&255,c>>8&255,c&255])))},B.esds=function(b){var t=b.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(b.config).concat([6,1,2]))},B.mp4a=function(b){var t=b.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,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),B.box(B.types.esds,B.esds(b)))},B.mp3=function(b){var t=b.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,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},B.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?B.box(B.types.stsd,B.STSD,B.mp3(b)):B.box(B.types.stsd,B.STSD,B.mp4a(b)):B.box(B.types.stsd,B.STSD,B.avc1(b))},B.tkhd=function(b){var t=b.id,E=b.duration*b.timescale,i=b.width,A=b.height,h=Math.floor(E/(K+1)),s=Math.floor(E%(K+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,h>>24,h>>16&255,h>>8&255,h&255,s>>24,s>>16&255,s>>8&255,s&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,i>>8&255,i&255,0,0,A>>8&255,A&255,0,0]))},B.traf=function(b,t){var E=B.sdtp(b),i=b.id,A=Math.floor(t/(K+1)),h=Math.floor(t%(K+1));return B.box(B.types.traf,B.box(B.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),B.box(B.types.tfdt,new Uint8Array([1,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,h>>24,h>>16&255,h>>8&255,h&255])),B.trun(b,E.length+16+20+8+16+8+8),E)},B.trak=function(b){return b.duration=b.duration||4294967295,B.box(B.types.trak,B.tkhd(b),B.mdia(b))},B.trex=function(b){var t=b.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(b,t){var E=b.samples||[],i=E.length,A=12+16*i,h=new Uint8Array(A),s,o,f,l,c,a;for(t+=8+A,h.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),s=0;s<i;s++)o=E[s],f=o.duration,l=o.size,c=o.flags,a=o.cts,h.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,c.degradPrio&240<<8,c.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*s);return B.box(B.types.trun,h)},B.initSegment=function(b){B.types||B.init();var t=B.moov(b),E=new Uint8Array(B.FTYP.byteLength+t.byteLength);return E.set(B.FTYP),E.set(t,B.FTYP.byteLength),E},B}();M.types=void 0,M.HDLR_TYPES=void 0,M.STTS=void 0,M.STSC=void 0,M.STCO=void 0,M.STSZ=void 0,M.VMHD=void 0,M.SMHD=void 0,M.STSD=void 0,M.FTYP=void 0,M.DINF=void 0,Q.default=M},"./src/remux/mp4-remuxer.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return a}),O.d(Q,"normalizePts",function(){return u});var K=O("./src/polyfills/number.ts"),M=O("./src/remux/aac-helper.ts"),B=O("./src/remux/mp4-generator.ts"),R=O("./src/events.ts"),b=O("./src/errors.ts"),t=O("./src/utils/logger.ts"),E=O("./src/types/loader.ts"),i=O("./src/utils/timescale-conversion.ts");function A(){return A=Object.assign||function(D){for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(D[n]=p[n])}return D},A.apply(this,arguments)}var h=10*1e3,s=1024,o=1152,f=null,l=null,c=!1,a=function(){function D(p,n,d,m){if(m===void 0&&(m=""),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=p,this.config=n,this.typeSupported=d,this.ISGenerated=!1,f===null){var C=navigator.userAgent||"",y=C.match(/Chrome\/(\d+)/i);f=y?parseInt(y[1]):0}if(l===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);l=g?parseInt(g[1]):0}c=!!f&&f<75||!!l&&l<600}var w=D.prototype;return w.destroy=function(){},w.resetTimeStamp=function(n){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},w.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},w.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},w.getVideoStartPts=function(n){var d=!1,m=n.reduce(function(C,y){var g=y.pts-C;return g<-4294967296?(d=!0,u(C,y.pts)):g>0?C:y.pts},n[0].pts);return d&&t.logger.debug("PTS rollover detected"),m},w.remux=function(n,d,m,C,y,g,U,k){var I,V,G,L,$,Y,ne=y,se=y,_e=n.pid>-1,ve=d.pid>-1,Ce=d.samples.length,De=n.samples.length>0,Qe=Ce>1,Se=(!_e||De)&&(!ve||Qe)||this.ISGenerated||U;if(Se){this.ISGenerated||(G=this.generateIS(n,d,y));var Ie=this.isVideoContiguous,Je=-1;if(Qe&&(Je=v(d.samples),!Ie&&this.config.forceKeyFrameOnDiscontinuity))if(Y=!0,Je>0){t.logger.warn("[mp4-remuxer]: Dropped "+Je+" out of "+Ce+" video samples due to a missing keyframe");var Et=this.getVideoStartPts(d.samples);d.samples=d.samples.slice(Je),d.dropped+=Je,se+=(d.samples[0].pts-Et)/(d.timescale||9e4)}else Je===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ce+" video samples"),Y=!1);if(this.ISGenerated){if(De&&Qe){var Le=this.getVideoStartPts(d.samples),je=u(n.samples[0].pts,Le)-Le,st=je/d.inputTimeScale;ne+=Math.max(0,st),se+=Math.max(0,-st)}if(De){if(n.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),G=this.generateIS(n,d,y)),V=this.remuxAudio(n,ne,this.isAudioContiguous,g,ve||Qe||k===E.PlaylistLevelType.AUDIO?se:void 0),Qe){var he=V?V.endPTS-V.startPTS:0;d.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),G=this.generateIS(n,d,y)),I=this.remuxVideo(d,se,Ie,he)}}else Qe&&(I=this.remuxVideo(d,se,Ie,0));I&&(I.firstKeyFrame=Je,I.independent=Je!==-1)}}return this.ISGenerated&&(m.samples.length&&($=this.remuxID3(m,y)),C.samples.length&&(L=this.remuxText(C,y))),{audio:V,video:I,initSegment:G,independent:Y,text:L,id3:$}},w.generateIS=function(n,d,m){var C=n.samples,y=d.samples,g=this.typeSupported,U={},k=!Object(K.isFiniteNumber)(this._initPTS),I="audio/mp4",V,G,L;if(k&&(V=G=Infinity),n.config&&C.length&&(n.timescale=n.samplerate,n.isAAC||(g.mpeg?(I="audio/mpeg",n.codec=""):g.mp3&&(n.codec="mp3")),U.audio={id:"audio",container:I,codec:n.codec,initSegment:!n.isAAC&&g.mpeg?new Uint8Array(0):B.default.initSegment([n]),metadata:{channelCount:n.channelCount}},k&&(L=n.inputTimeScale,V=G=C[0].pts-Math.round(L*m))),d.sps&&d.pps&&y.length&&(d.timescale=d.inputTimeScale,U.video={id:"main",container:"video/mp4",codec:d.codec,initSegment:B.default.initSegment([d]),metadata:{width:d.width,height:d.height}},k)){L=d.inputTimeScale;var $=this.getVideoStartPts(y),Y=Math.round(L*m);G=Math.min(G,u(y[0].dts,$)-Y),V=Math.min(V,$-Y)}if(Object.keys(U).length)return this.ISGenerated=!0,k&&(this._initPTS=V,this._initDTS=G),{tracks:U,initPTS:V,timescale:L}},w.remuxVideo=function(n,d,m,C){var y=n.inputTimeScale,g=n.samples,U=[],k=g.length,I=this._initPTS,V=this.nextAvcDts,G=8,L,$,Y,ne=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,_e=0,ve=!1;if(!m||V===null){var Ce=d*y,De=g[0].pts-u(g[0].dts,g[0].pts);V=Ce-De}for(var Qe=0;Qe<k;Qe++){var Se=g[Qe];if(Se.pts=u(Se.pts-I,V),Se.dts=u(Se.dts-I,V),Se.dts>Se.pts){var Ie=9e4*.2;_e=Math.max(Math.min(_e,Se.pts-Se.dts),-1*Ie)}Se.dts<g[Qe>0?Qe-1:Qe].dts&&(ve=!0)}ve&&g.sort(function(Bt,ht){var it=Bt.dts-ht.dts,et=Bt.pts-ht.pts;return it||et}),$=g[0].dts,Y=g[g.length-1].dts;var Je=Math.round((Y-$)/(k-1));if(_e<0){if(_e<Je*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-Je,!0)+" ms");for(var Et=_e,Le=0;Le<k;Le++)g[Le].dts=Et=Math.max(Et,g[Le].pts-Je),g[Le].pts=Math.max(Et,g[Le].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(_e,!0)+" ms to overcome this issue");for(var je=0;je<k;je++)g[je].dts=g[je].dts+_e}$=g[0].dts}if(m){var st=$-V,he=st>Je,ie=st<-1;if(he||ie){he?t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(st,!0)+" ms ("+st+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-st,!0)+" ms ("+st+"dts) overlapping between fragments detected"),$=V;var oe=g[0].pts-st;g[0].dts=$,g[0].pts=oe,t.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(oe,!0)+"/"+Object(i.toMsFromMpegTsClock)($,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(st,!0)+" ms")}}c&&($=Math.max(0,$));for(var ee=0,de=0,we=0;we<k;we++){for(var Be=g[we],nt=Be.units,at=nt.length,At=0,ft=0;ft<at;ft++)At+=nt[ft].data.length;de+=At,ee+=at,Be.length=At,Be.dts=Math.max(Be.dts,$),Be.pts=Math.max(Be.pts,Be.dts,0),ne=Math.min(Be.pts,ne),se=Math.max(Be.pts,se)}Y=g[k-1].dts;var xt=de+4*ee+8,It;try{It=new Uint8Array(xt)}catch(Bt){this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xt,reason:"fail allocating video mdat "+xt});return}var He=new DataView(It.buffer);He.setUint32(0,xt),It.set(B.default.types.mdat,4);for(var ke=0;ke<k;ke++){for(var ct=g[ke],gt=ct.units,Ze=0,ot=0,Ke=gt.length;ot<Ke;ot++){var Me=gt[ot],Ue=Me.data,ge=Me.data.byteLength;He.setUint32(G,ge),G+=4,It.set(Ue,G),G+=ge,Ze+=4+ge}if(ke<k-1)L=g[ke+1].dts-ct.dts;else{var xe=this.config,Ee=ct.dts-g[ke>0?ke-1:ke].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(xe.maxBufferHole*y),Fe=(C?ne+C*y:this.nextAudioPts)-ct.pts;Fe>Oe?(L=Fe-Ee,L<0&&(L=Ee),t.logger.log("[mp4-remuxer]: It is approximately "+Fe/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=Ee}else L=Ee}var $e=Math.round(ct.pts-ct.dts);U.push(new T(ct.key,L,Ze,$e))}if(U.length&&f&&f<70){var pt=U[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=V=Y+L,this.isVideoContiguous=!0;var Ot=B.default.moof(n.sequenceNumber++,$,A({},n,{samples:U})),kt="video",Dt={data1:Ot,data2:It,startPTS:ne/y,endPTS:(se+L)/y,startDTS:$/y,endDTS:V/y,type:kt,hasAudio:!1,hasVideo:!0,nb:U.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(It.length,"MDAT length must not be zero"),Dt},w.remuxAudio=function(n,d,m,C,y){var g=n.inputTimeScale,U=n.samplerate?n.samplerate:g,k=g/U,I=n.isAAC?s:o,V=I*k,G=this._initPTS,L=!n.isAAC&&this.typeSupported.mpeg,$=[],Y=n.samples,ne=L?0:8,se=this.nextAudioPts||-1,_e=d*g;if(this.isAudioContiguous=m=m||Y.length&&se>0&&(C&&Math.abs(_e-se)<9e3||Math.abs(u(Y[0].pts-G,_e)-se)<20*V),Y.forEach(function(Ue){Ue.pts=u(Ue.pts-G,_e)}),!m||se<0){if(Y=Y.filter(function(Ue){return Ue.pts>=0}),!Y.length)return;y===0?se=0:C?se=Math.max(0,_e):se=Y[0].pts}if(n.isAAC)for(var ve=y!==void 0,Ce=this.config.maxAudioFramesDrift,De=0,Qe=se;De<Y.length;De++){var Se=Y[De],Ie=Se.pts,Je=Ie-Qe,Et=Math.abs(1e3*Je/g);if(Je<=-Ce*V&&ve)De===0&&(t.logger.warn("Audio frame @ "+(Ie/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Je/g)+" ms."),this.nextAudioPts=se=Qe=Ie);else if(Je>=Ce*V&&Et<h&&ve){var Le=Math.round(Je/V);Qe=Ie-Le*V,Qe<0&&(Le--,Qe+=V),De===0&&(this.nextAudioPts=se=Qe),t.logger.warn("[mp4-remuxer]: Injecting "+Le+" audio frame @ "+(Qe/g).toFixed(3)+"s due to "+Math.round(1e3*Je/g)+" ms gap.");for(var je=0;je<Le;je++){var st=Math.max(Qe,0),he=M.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);he||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),he=Se.unit.subarray()),Y.splice(De,0,{unit:he,pts:st}),Qe+=V,De++}}Se.pts=Qe,Qe+=V}for(var ie=null,oe=null,ee,de=0,we=Y.length;we--;)de+=Y[we].unit.byteLength;for(var Be=0,nt=Y.length;Be<nt;Be++){var at=Y[Be],At=at.unit,ft=at.pts;if(oe!==null){var xt=$[Be-1];xt.duration=Math.round((ft-oe)/k)}else if(m&&n.isAAC&&(ft=se),ie=ft,de>0){de+=ne;try{ee=new Uint8Array(de)}catch(Ue){this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:de,reason:"fail allocating audio mdat "+de});return}if(!L){var It=new DataView(ee.buffer);It.setUint32(0,de),ee.set(B.default.types.mdat,4)}}else return;ee.set(At,ne);var He=At.byteLength;ne+=He,$.push(new T(!0,I,He,0)),oe=ft}var ke=$.length;if(!ke)return;var ct=$[$.length-1];this.nextAudioPts=se=oe+k*ct.duration;var gt=L?new Uint8Array(0):B.default.moof(n.sequenceNumber++,ie/k,A({},n,{samples:$}));n.samples=[];var Ze=ie/g,ot=se/g,Ke="audio",Me={data1:gt,data2:ee,startPTS:Ze,endPTS:ot,startDTS:Ze,endDTS:ot,type:Ke,hasAudio:!0,hasVideo:!1,nb:ke};return this.isAudioContiguous=!0,console.assert(ee.length,"MDAT length must not be zero"),Me},w.remuxEmptyAudio=function(n,d,m,C){var y=n.inputTimeScale,g=n.samplerate?n.samplerate:y,U=y/g,k=this.nextAudioPts,I=(k!==null?k:C.startDTS*y)+this._initDTS,V=C.endDTS*y+this._initDTS,G=U*s,L=Math.ceil((V-I)/G),$=M.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!$){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Y=[],ne=0;ne<L;ne++){var se=I+ne*G;Y.push({unit:$,pts:se,dts:se})}return n.samples=Y,this.remuxAudio(n,d,m,!1)},w.remuxID3=function(n,d){var m=n.samples.length;if(!m)return;for(var C=n.inputTimeScale,y=this._initPTS,g=this._initDTS,U=0;U<m;U++){var k=n.samples[U];k.pts=u(k.pts-y,d*C)/C,k.dts=u(k.dts-g,d*C)/C}var I=n.samples;return n.samples=[],{samples:I}},w.remuxText=function(n,d){var m=n.samples.length;if(!m)return;for(var C=n.inputTimeScale,y=this._initPTS,g=0;g<m;g++){var U=n.samples[g];U.pts=u(U.pts-y,d*C)/C}n.samples.sort(function(I,V){return I.pts-V.pts});var k=n.samples;return n.samples=[],{samples:k}},D}();function u(D,w){var p;if(w===null)return D;for(w<D?p=-8589934592:p=8589934592;Math.abs(D-w)>4294967296;)D+=p;return D}function v(D){for(var w=0;w<D.length;w++)if(D[w].key)return w;return-1}var T=function(w,p,n,d){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=p,this.size=n,this.cts=d,this.flags=new x(w)},x=function(w){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=w?2:1,this.isNonSync=w?0:1}},"./src/remux/passthrough-remuxer.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/polyfills/number.ts"),M=O("./src/utils/mp4-tools.ts"),B=O("./src/loader/fragment.ts"),R=O("./src/utils/logger.ts"),b=function(){function i(){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 A=i.prototype;return A.destroy=function(){},A.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},A.resetNextTimestamp=function(){this.lastEndDTS=null},A.resetInitSegment=function(s,o,f){this.audioCodec=o,this.videoCodec=f,this.generateInitSegment(s),this.emitInitSegment=!0},A.generateInitSegment=function(s){var o=this.audioCodec,f=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(M.parseInitSegment)(s);o||(o=E(l.audio,B.ElementaryStreamTypes.AUDIO)),f||(f=E(l.video,B.ElementaryStreamTypes.VIDEO));var c={};l.audio&&l.video?c.audiovideo={container:"video/mp4",codec:o+","+f,initSegment:s,id:"main"}:l.audio?c.audio={container:"audio/mp4",codec:o,initSegment:s,id:"audio"}:l.video?c.video={container:"video/mp4",codec:f,initSegment:s,id:"main"}:R.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=c},A.remux=function(s,o,f,l,c){var a=this.initPTS,u=this.lastEndDTS,v={audio:void 0,video:void 0,text:l,id3:f,initSegment:void 0};Object(K.isFiniteNumber)(u)||(u=this.lastEndDTS=c||0);var T=o.samples;if(!T||!T.length)return v;var x={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(T),D=this.initData),!D||!D.length)return R.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),v;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1),Object(K.isFiniteNumber)(a)||(this.initPTS=x.initPTS=a=t(D,T,u));var w=Object(M.getDuration)(T,D),p=u,n=w+p;Object(M.offsetStartDTS)(D,T,a),w>0?this.lastEndDTS=n:(R.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var d=!!D.audio,m=!!D.video,C="";d&&(C+="audio"),m&&(C+="video");var y={data1:T,startPTS:p,startDTS:p,endPTS:n,endDTS:n,type:C,hasAudio:d,hasVideo:m,nb:1,dropped:0};return v.audio=y.type==="audio"?y:void 0,v.video=y.type!=="audio"?y:void 0,v.text=l,v.id3=f,v.initSegment=x,v},i}(),t=function(A,h,s){return Object(M.getStartDTS)(A,h)-s};function E(i,A){var h=i==null?void 0:i.codec;return h&&h.length>4?h:h==="hvc1"?"hvc1.1.c.L120.90":h==="av01"?"av01.0.04M.08":h==="avc1"||A===B.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Q.default=b},"./src/task-loop.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return K});var K=function(){function M(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var B=M.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(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!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(){},M}()},"./src/types/cmcd.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"CMCDVersion",function(){return K}),O.d(Q,"CMCDObjectType",function(){return M}),O.d(Q,"CMCDStreamingFormat",function(){return B}),O.d(Q,"CMCDStreamType",function(){return R});var K=1,M;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(M||(M={}));var B;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(B||(B={}));var R;(function(b){b.VOD="v",b.LIVE="l"})(R||(R={}))},"./src/types/level.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"HlsSkip",function(){return B}),O.d(Q,"getSkipValue",function(){return R}),O.d(Q,"HlsUrlParameters",function(){return b}),O.d(Q,"Level",function(){return t});function K(E,i){for(var A=0;A<i.length;A++){var h=i[A];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function M(E,i,A){return i&&K(E.prototype,i),A&&K(E,A),E}var B;(function(E){E.No="",E.Yes="YES",E.v2="v2"})(B||(B={}));function R(E,i){var A=E.canSkipUntil,h=E.canSkipDateRanges,s=E.endSN,o=i!==void 0?i-s:0;return A&&o<A?h?B.v2:B.Yes:B.No}var b=function(){function E(A,h,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=A,this.part=h,this.skip=s}var i=E.prototype;return i.addDirectives=function(h){var s=new self.URL(h);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},E}(),t=function(){function E(i){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=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(A){return A}).join(",").replace(/\.[^.,]+/g,"")}return M(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(A){var h=A%this.url.length;this._urlId!==h&&(this.details=void 0,this._urlId=h)}}]),E}()},"./src/types/loader.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"PlaylistContextType",function(){return K}),O.d(Q,"PlaylistLevelType",function(){return M});var K;(function(B){B.MANIFEST="manifest",B.LEVEL="level",B.AUDIO_TRACK="audioTrack",B.SUBTITLE_TRACK="subtitleTrack"})(K||(K={}));var M;(function(B){B.MAIN="main",B.AUDIO="audio",B.SUBTITLE="subtitle"})(M||(M={}))},"./src/types/transmuxer.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"ChunkMetadata",function(){return K});var K=function(R,b,t,E,i,A){E===void 0&&(E=0),i===void 0&&(i=-1),A===void 0&&(A=!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=M(),this.buffering={audio:M(),video:M(),audiovideo:M()},this.level=R,this.sn=b,this.id=t,this.size=E,this.part=i,this.partial=A};function M(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"AttrList",function(){return B});var K=/^(\d+)x(\d+)$/,M=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,B=function(){function R(t){typeof t=="string"&&(t=R.parseAttrList(t));for(var E in t)t.hasOwnProperty(E)&&(this[E]=t[E])}var b=R.prototype;return b.decimalInteger=function(E){var i=parseInt(this[E],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},b.hexadecimalInteger=function(E){if(this[E]){var i=(this[E]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var A=new Uint8Array(i.length/2),h=0;h<i.length/2;h++)A[h]=parseInt(i.slice(h*2,h*2+2),16);return A}else return null},b.hexadecimalIntegerAsNumber=function(E){var i=parseInt(this[E],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},b.decimalFloatingPoint=function(E){return parseFloat(this[E])},b.optionalFloat=function(E,i){var A=this[E];return A?parseFloat(A):i},b.enumeratedString=function(E){return this[E]},b.bool=function(E){return this[E]==="YES"},b.decimalResolution=function(E){var i=K.exec(this[E]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},R.parseAttrList=function(E){var i,A={},h='"';for(M.lastIndex=0;(i=M.exec(E))!==null;){var s=i[2];s.indexOf(h)===0&&s.lastIndexOf(h)===s.length-1&&(s=s.slice(1,-1)),A[i[1]]=s}return A},R}()},"./src/utils/binary-search.ts":function(Z,Q,O){"use strict";O.r(Q);var K={search:function(B,R){for(var b=0,t=B.length-1,E=null,i=null;b<=t;){E=(b+t)/2|0,i=B[E];var A=R(i);if(A>0)b=E+1;else if(A<0)t=E-1;else return i}return null}};Q.default=K},"./src/utils/buffer-helper.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"BufferHelper",function(){return B});var K=O("./src/utils/logger.ts"),M={length:0,start:function(){return 0},end:function(){return 0}},B=function(){function R(){}return R.isBuffered=function(t,E){try{if(t){for(var i=R.getBuffered(t),A=0;A<i.length;A++)if(E>=i.start(A)&&E<=i.end(A))return!0}}catch(h){}return!1},R.bufferInfo=function(t,E,i){try{if(t){var A=R.getBuffered(t),h=[],s;for(s=0;s<A.length;s++)h.push({start:A.start(s),end:A.end(s)});return this.bufferedInfo(h,E,i)}}catch(o){}return{len:0,start:E,end:E,nextStart:void 0}},R.bufferedInfo=function(t,E,i){E=Math.max(0,E),t.sort(function(x,D){var w=x.start-D.start;return w||D.end-x.end});var A=[];if(i)for(var h=0;h<t.length;h++){var s=A.length;if(s){var o=A[s-1].end;t[h].start-o<i?t[h].end>o&&(A[s-1].end=t[h].end):A.push(t[h])}else A.push(t[h])}else A=t;for(var f=0,l,c=E,a=E,u=0;u<A.length;u++){var v=A[u].start,T=A[u].end;if(E+i>=v&&E<T)c=v,a=T,f=a-E;else if(E+i<v){l=v;break}}return{len:f,start:c||0,end:a||0,nextStart:l}},R.getBuffered=function(t){try{return t.buffered}catch(E){return K.logger.log("failed to get media.buffered",E),M}},R}()},"./src/utils/cea-608-parser.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"Row",function(){return a}),O.d(Q,"CaptionScreen",function(){return u});var K=O("./src/utils/logger.ts"),M={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(n){var d=n;return M.hasOwnProperty(n)&&(d=M[n]),String.fromCharCode(d)},R=15,b=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},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},A={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(p){p[p.ERROR=0]="ERROR",p[p.TEXT=1]="TEXT",p[p.WARNING=2]="WARNING",p[p.INFO=2]="INFO",p[p.DEBUG=3]="DEBUG",p[p.DATA=3]="DATA"})(s||(s={}));var o=function(){function p(){this.time=null,this.verboseLevel=s.ERROR}var n=p.prototype;return n.log=function(m,C){this.verboseLevel>=m&&K.logger.log(this.time+" ["+m+"] "+C)},p}(),f=function(n){for(var d=[],m=0;m<n.length;m++)d.push(n[m].toString(16));return d},l=function(){function p(d,m,C,y,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=d||"white",this.underline=m||!1,this.italics=C||!1,this.background=y||"black",this.flash=g||!1}var n=p.prototype;return n.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},n.setStyles=function(m){for(var C=["foreground","underline","italics","background","flash"],y=0;y<C.length;y++){var g=C[y];m.hasOwnProperty(g)&&(this[g]=m[g])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(m){return this.foreground===m.foreground&&this.underline===m.underline&&this.italics===m.italics&&this.background===m.background&&this.flash===m.flash},n.copy=function(m){this.foreground=m.foreground,this.underline=m.underline,this.italics=m.italics,this.background=m.background,this.flash=m.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},p}(),c=function(){function p(d,m,C,y,g,U){this.uchar=void 0,this.penState=void 0,this.uchar=d||" ",this.penState=new l(m,C,y,g,U)}var n=p.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(m,C){this.uchar=m,this.penState.copy(C)},n.setPenState=function(m){this.penState.copy(m)},n.equals=function(m){return this.uchar===m.uchar&&this.penState.equals(m.penState)},n.copy=function(m){this.uchar=m.uchar,this.penState.copy(m.penState)},n.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},p}(),a=function(){function p(d){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var m=0;m<b;m++)this.chars.push(new c);this.logger=d,this.pos=0,this.currPenState=new l}var n=p.prototype;return n.equals=function(m){for(var C=!0,y=0;y<b;y++)if(!this.chars[y].equals(m.chars[y])){C=!1;break}return C},n.copy=function(m){for(var C=0;C<b;C++)this.chars[C].copy(m.chars[C])},n.isEmpty=function(){for(var m=!0,C=0;C<b;C++)if(!this.chars[C].isEmpty()){m=!1;break}return m},n.setCursor=function(m){this.pos!==m&&(this.pos=m),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},n.moveCursor=function(m){var C=this.pos+m;if(m>1)for(var y=this.pos+1;y<C+1;y++)this.chars[y].setPenState(this.currPenState);this.setCursor(C)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(m){m>=144&&this.backSpace();var C=B(m);if(this.pos>=b){this.logger.log(s.ERROR,"Cannot insert "+m.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(m){var C;for(C=m;C<b;C++)this.chars[C].reset()},n.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},n.clearToEndOfRow=function(){this.clearFromPos(this.pos)},n.getTextString=function(){for(var m=[],C=!0,y=0;y<b;y++){var g=this.chars[y].uchar;g!==" "&&(C=!1),m.push(g)}return C?"":m.join("")},n.setPenStyles=function(m){this.currPenState.setStyles(m);var C=this.chars[this.pos];C.setPenState(this.currPenState)},p}(),u=function(){function p(d){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var m=0;m<R;m++)this.rows.push(new a(d));this.logger=d,this.currRow=R-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var n=p.prototype;return n.reset=function(){for(var m=0;m<R;m++)this.rows[m].clear();this.currRow=R-1},n.equals=function(m){for(var C=!0,y=0;y<R;y++)if(!this.rows[y].equals(m.rows[y])){C=!1;break}return C},n.copy=function(m){for(var C=0;C<R;C++)this.rows[C].copy(m.rows[C])},n.isEmpty=function(){for(var m=!0,C=0;C<R;C++)if(!this.rows[C].isEmpty()){m=!1;break}return m},n.backSpace=function(){var m=this.rows[this.currRow];m.backSpace()},n.clearToEndOfRow=function(){var m=this.rows[this.currRow];m.clearToEndOfRow()},n.insertChar=function(m){var C=this.rows[this.currRow];C.insertChar(m)},n.setPen=function(m){var C=this.rows[this.currRow];C.setPenStyles(m)},n.moveCursor=function(m){var C=this.rows[this.currRow];C.moveCursor(m)},n.setCursor=function(m){this.logger.log(s.INFO,"setCursor: "+m);var C=this.rows[this.currRow];C.setCursor(m)},n.setPAC=function(m){this.logger.log(s.INFO,"pacData = "+JSON.stringify(m));var C=m.row-1;if(this.nrRollUpRows&&C<this.nrRollUpRows-1&&(C=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==C){for(var y=0;y<R;y++)this.rows[y].clear();var g=this.currRow+1-this.nrRollUpRows,U=this.lastOutputScreen;if(U){var k=U.rows[g].cueStartTime,I=this.logger.time;if(k&&I!==null&&k<I)for(var V=0;V<this.nrRollUpRows;V++)this.rows[C-this.nrRollUpRows+V+1].copy(U.rows[g+V])}}this.currRow=C;var G=this.rows[this.currRow];if(m.indent!==null){var L=m.indent,$=Math.max(L-1,0);G.setCursor(m.indent),m.color=G.chars[$].penState.foreground}var Y={foreground:m.color,underline:m.underline,italics:m.italics,background:"black",flash:!1};this.setPen(Y)},n.setBkgData=function(m){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(m)),this.backSpace(),this.setPen(m),this.insertChar(32)},n.setRollUpRows=function(m){this.nrRollUpRows=m},n.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var m=this.currRow+1-this.nrRollUpRows,C=this.rows.splice(m,1)[0];C.clear(),this.rows.splice(this.currRow,0,C),this.logger.log(s.INFO,"Rolling up")},n.getDisplayText=function(m){m=m||!1;for(var C=[],y="",g=-1,U=0;U<R;U++){var k=this.rows[U].getTextString();k&&(g=U+1,m?C.push("Row "+g+": '"+k+"'"):C.push(k.trim()))}return C.length>0&&(m?y="["+C.join(" | ")+"]":y=C.join(`
`)),y},n.getTextAndFormat=function(){return this.rows},p}(),v=function(){function p(d,m,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=d,this.outputFilter=m,this.mode=null,this.verbose=0,this.displayedMemory=new u(C),this.nonDisplayedMemory=new u(C),this.lastOutputScreen=new u(C),this.currRollUpRow=this.displayedMemory.rows[R-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var n=p.prototype;return n.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[R-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},n.getHandler=function(){return this.outputFilter},n.setHandler=function(m){this.outputFilter=m},n.setPAC=function(m){this.writeScreen.setPAC(m)},n.setBkgData=function(m){this.writeScreen.setBkgData(m)},n.setMode=function(m){if(m===this.mode)return;this.mode=m,this.logger.log(s.INFO,"MODE="+m),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=m},n.insertChars=function(m){for(var C=0;C<m.length;C++)this.writeScreen.insertChar(m[C]);var y=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,y+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},n.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},n.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},n.ccAOF=function(){},n.ccAON=function(){},n.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},n.ccRU=function(m){this.logger.log(s.INFO,"RU("+m+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(m)},n.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},n.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},n.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},n.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},n.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},n.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},n.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},n.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var m=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=m,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},n.ccTO=function(m){this.logger.log(s.INFO,"TO("+m+") - Tab Offset"),this.writeScreen.moveCursor(m)},n.ccMIDROW=function(m){var C={flash:!1};if(C.underline=m%2===1,C.italics=m>=46,C.italics)C.foreground="white";else{var y=Math.floor(m/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=g[y]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},n.outputDataUpdate=function(m){m===void 0&&(m=!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),m&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(m){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,m,this.displayedMemory),this.cueStartTime=m))},p}(),T=function(){function p(d,m,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new o;this.channels=[null,new v(d,m,y),new v(d+1,C,y)],this.cmdHistory=w(),this.logger=y}var n=p.prototype;return n.getHandler=function(m){return this.channels[m].getHandler()},n.setHandler=function(m,C){this.channels[m].setHandler(C)},n.addData=function(m,C){var y,g,U,k=!1;this.logger.time=m;for(var I=0;I<C.length;I+=2){if(g=C[I]&127,U=C[I+1]&127,g===0&&U===0)continue;if(this.logger.log(s.DATA,"["+f([C[I],C[I+1]])+"] -> ("+f([g,U])+")"),y=this.parseCmd(g,U),y||(y=this.parseMidrow(g,U)),y||(y=this.parsePAC(g,U)),y||(y=this.parseBackgroundAttributes(g,U)),!y&&(k=this.parseChars(g,U),k)){var V=this.currentChannel;if(V&&V>0){var G=this.channels[V];G.insertChars(k)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!k&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+f([g,U])+" orig: "+f([C[I],C[I+1]]))}},n.parseCmd=function(m,C){var y=this.cmdHistory,g=(m===20||m===28||m===21||m===29)&&C>=32&&C<=47,U=(m===23||m===31)&&C>=33&&C<=35;if(!(g||U))return!1;if(D(m,C,y))return x(null,null,y),this.logger.log(s.DEBUG,"Repeated command ("+f([m,C])+") is dropped"),!0;var k=m===20||m===21||m===23?1:2,I=this.channels[k];return m===20||m===21||m===28||m===29?C===32?I.ccRCL():C===33?I.ccBS():C===34?I.ccAOF():C===35?I.ccAON():C===36?I.ccDER():C===37?I.ccRU(2):C===38?I.ccRU(3):C===39?I.ccRU(4):C===40?I.ccFON():C===41?I.ccRDC():C===42?I.ccTR():C===43?I.ccRTD():C===44?I.ccEDM():C===45?I.ccCR():C===46?I.ccENM():C===47&&I.ccEOC():I.ccTO(C-32),x(m,C,y),this.currentChannel=k,!0},n.parseMidrow=function(m,C){var y=0;if((m===17||m===25)&&C>=32&&C<=47){if(m===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[y];return g?(g.ccMIDROW(C),this.logger.log(s.DEBUG,"MIDROW ("+f([m,C])+")"),!0):!1}return!1},n.parsePAC=function(m,C){var y,g=this.cmdHistory,U=(m>=17&&m<=23||m>=25&&m<=31)&&C>=64&&C<=127,k=(m===16||m===24)&&C>=64&&C<=95;if(!(U||k))return!1;if(D(m,C,g))return x(null,null,g),!0;var I=m<=23?1:2;C>=64&&C<=95?y=I===1?t[m]:i[m]:y=I===1?E[m]:A[m];var V=this.channels[I];return V?(V.setPAC(this.interpretPAC(y,C)),x(m,C,g),this.currentChannel=I,!0):!1},n.interpretPAC=function(m,C){var y,g={color:null,italics:!1,indent:null,underline:!1,row:m};return C>95?y=C-96:y=C-64,g.underline=(y&1)===1,y<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((y-16)/2)*4,g},n.parseChars=function(m,C){var y,g=null,U=null;if(m>=25?(y=2,U=m-8):(y=1,U=m),U>=17&&U<=19){var k;U===17?k=C+80:U===18?k=C+112:k=C+144,this.logger.log(s.INFO,"Special char '"+B(k)+"' in channel "+y),g=[k]}else m>=32&&m<=127&&(g=C===0?[m]:[m,C]);if(g){var I=f(g);this.logger.log(s.DEBUG,"Char codes = "+I.join(",")),x(m,C,this.cmdHistory)}return g},n.parseBackgroundAttributes=function(m,C){var y=(m===16||m===24)&&C>=32&&C<=47,g=(m===23||m===31)&&C>=45&&C<=47;if(!(y||g))return!1;var U,k={};m===16||m===24?(U=Math.floor((C-32)/2),k.background=h[U],C%2===1&&(k.background=k.background+"_semi")):C===45?k.background="transparent":(k.foreground="black",C===47&&(k.underline=!0));var I=m<=23?1:2,V=this.channels[I];return V.setBkgData(k),x(m,C,this.cmdHistory),!0},n.reset=function(){for(var m=0;m<Object.keys(this.channels).length;m++){var C=this.channels[m];C&&C.reset()}this.cmdHistory=w()},n.cueSplitAtTime=function(m){for(var C=0;C<this.channels.length;C++){var y=this.channels[C];y&&y.cueSplitAtTime(m)}},p}();function x(p,n,d){d.a=p,d.b=n}function D(p,n,d){return d.a===p&&d.b===n}function w(){return{a:null,b:null}}Q.default=T},"./src/utils/codecs.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"isCodecType",function(){return M}),O.d(Q,"isCodecSupportedInMp4",function(){return B});var K={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 M(R,b){var t=K[b];return!!t&&t[R.slice(0,4)]===!0}function B(R,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+R+'"')}},"./src/utils/cues.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/utils/vttparser.ts"),M=O("./src/utils/webvtt-parser.ts"),B=O("./src/utils/texttrack-utils.ts"),R=/\s/,b={newCue:function(E,i,A,h){for(var s=[],o,f,l,c,a,u=self.VTTCue||self.TextTrackCue,v=0;v<h.rows.length;v++)if(o=h.rows[v],l=!0,c=0,a="",!o.isEmpty()){for(var T=0;T<o.chars.length;T++)R.test(o.chars[T].uchar)&&l?c++:(a+=o.chars[T].uchar,l=!1);o.cueStartTime=i,i===A&&(A+=1e-4),c>=16?c--:c++;var x=Object(K.fixLineBreaks)(a.trim()),D=Object(M.generateCueId)(i,A,x);(!E||!E.cues||!E.cues.getCueById(D))&&(f=new u(i,A,x),f.id=D,f.line=v+1,f.align="left",f.position=10+Math.min(80,Math.floor(c*8/32)*10),s.push(f))}return E&&s.length&&(s.sort(function(w,p){return w.line==="auto"||p.line==="auto"?0:w.line>8&&p.line>8?p.line-w.line:w.line-p.line}),s.forEach(function(w){return Object(B.addCueToTrack)(E,w)})),s}};Q.default=b},"./src/utils/discontinuities.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"findFirstFragWithCC",function(){return R}),O.d(Q,"shouldAlignOnDiscontinuities",function(){return b}),O.d(Q,"findDiscontinuousReferenceFrag",function(){return t}),O.d(Q,"adjustSlidingStart",function(){return i}),O.d(Q,"alignStream",function(){return A}),O.d(Q,"alignPDT",function(){return s}),O.d(Q,"alignFragmentByPDTDelta",function(){return o}),O.d(Q,"alignMediaPlaylistByPDT",function(){return f});var K=O("./src/polyfills/number.ts"),M=O("./src/utils/logger.ts"),B=O("./src/controller/level-helper.ts");function R(l,c){for(var a=null,u=0,v=l.length;u<v;u++){var T=l[u];if(T&&T.cc===c){a=T;break}}return a}function b(l,c,a){return!!(c.details&&(a.endCC>a.startCC||l&&l.cc<a.startCC))}function t(l,c){var a=l.fragments,u=c.fragments;if(!u.length||!a.length){M.logger.log("No fragments to align");return}var v=R(a,u[0].cc);if(!v||v&&!v.startPTS){M.logger.log("No frag in previous level to align on");return}return v}function E(l,c){if(l){var a=l.start+c;l.start=l.startPTS=a,l.endPTS=a+l.duration}}function i(l,c){for(var a=c.fragments,u=0,v=a.length;u<v;u++)E(a[u],l);c.fragmentHint&&E(c.fragmentHint,l),c.alignedSliding=!0}function A(l,c,a){if(!c)return;h(l,a,c),!a.alignedSliding&&c.details&&s(a,c.details),!a.alignedSliding&&c.details&&!a.skippedSegments&&Object(B.adjustSliding)(c.details,a)}function h(l,c,a){if(b(l,a,c)){var u=t(a.details,c);u&&Object(K.isFiniteNumber)(u.start)&&(M.logger.log("Adjusting PTS using last level due to CC increase within current level "+c.url),i(u.start,c))}}function s(l,c){if(!c.fragments.length||!l.hasProgramDateTime||!c.hasProgramDateTime)return;var a=c.fragments[0].programDateTime,u=l.fragments[0].programDateTime,v=(u-a)/1e3+c.fragments[0].start;v&&Object(K.isFiniteNumber)(v)&&(M.logger.log("Adjusting PTS using programDateTime delta "+(u-a)+"ms, sliding:"+v.toFixed(3)+" "+l.url+" "),i(v,l))}function o(l,c){var a=l.programDateTime;if(!a)return;var u=(a-c)/1e3;l.start=l.startPTS=u,l.endPTS=u+l.duration}function f(l,c){if(!c.fragments.length||!l.hasProgramDateTime||!c.hasProgramDateTime)return;var a=c.fragments[0].programDateTime,u=c.fragments[0].start,v=a-u*1e3;l.fragments.forEach(function(T){o(T,v)}),l.fragmentHint&&o(l.fragmentHint,v),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/utils/ewma.ts"),M=function(){function B(b,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 K.default(b),this.fast_=new K.default(t)}var R=B.prototype;return R.update=function(t,E){var i=this.slow_,A=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new K.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==E&&(this.fast_=new K.default(E,A.getEstimate(),A.getTotalWeight()))},R.sample=function(t,E){t=Math.max(t,this.minDelayMs_);var i=8*E,A=t/1e3,h=i/A;this.fast_.sample(A,h),this.slow_.sample(A,h)},R.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},R.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},R.destroy=function(){},B}();Q.default=M},"./src/utils/ewma.ts":function(Z,Q,O){"use strict";O.r(Q);var K=function(){function M(R,b,t){b===void 0&&(b=0),t===void 0&&(t=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=R,this.alpha_=R?Math.exp(Math.log(.5)/R):0,this.estimate_=b,this.totalWeight_=t}var B=M.prototype;return B.sample=function(b,t){var E=Math.pow(this.alpha_,b);this.estimate_=t*(1-E)+E*this.estimate_,this.totalWeight_+=b},B.getTotalWeight=function(){return this.totalWeight_},B.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},M}();Q.default=K},"./src/utils/fetch-loader.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"fetchSupported",function(){return o});var K=O("./src/polyfills/number.ts"),M=O("./src/loader/load-stats.ts"),B=O("./src/demux/chunk-cache.ts");function R(u,v){u.prototype=Object.create(v.prototype),u.prototype.constructor=u,A(u,v)}function b(u){var v=typeof Map=="function"?new Map:void 0;return b=function(x){if(x===null||!i(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof v!="undefined"){if(v.has(x))return v.get(x);v.set(x,D)}function D(){return t(x,arguments,h(this).constructor)}return D.prototype=Object.create(x.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),A(D,x)},b(u)}function t(u,v,T){return E()?t=Reflect.construct:t=function(D,w,p){var n=[null];n.push.apply(n,w);var d=Function.bind.apply(D,n),m=new d;return p&&A(m,p.prototype),m},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(u){return!1}}function i(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function A(u,v){return A=Object.setPrototypeOf||function(x,D){return x.__proto__=D,x},A(u,v)}function h(u){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},h(u)}function s(){return s=Object.assign||function(u){for(var v=1;v<arguments.length;v++){var T=arguments[v];for(var x in T)Object.prototype.hasOwnProperty.call(T,x)&&(u[x]=T[x])}return u},s.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var f=function(){function u(T){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=T.fetchSetup||c,this.controller=new self.AbortController,this.stats=new M.LoadStats}var v=u.prototype;return v.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},v.abortInternal=function(){var x=this.response;(!x||!x.ok)&&(this.stats.aborted=!0,this.controller.abort())},v.abort=function(){var x;this.abortInternal(),(x=this.callbacks)!==null&&x!==void 0&&x.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},v.load=function(x,D,w){var p=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var d=l(x,this.controller.signal),m=w.onProgress,C=x.responseType==="arraybuffer",y=C?"byteLength":"length";this.context=x,this.config=D,this.callbacks=w,this.request=this.fetchSetup(x,d),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){p.abortInternal(),w.onTimeout(n,x,p.response)},D.timeout),self.fetch(this.request).then(function(g){if(p.response=p.loader=g,!g.ok){var U=g.status,k=g.statusText;throw new a(k||"fetch, bad network response",U,g)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(g.headers.get("Content-Length")||"0"),m&&Object(K.isFiniteNumber)(D.highWaterMark)?p.loadProgressively(g,n,x,D.highWaterMark,m):C?g.arrayBuffer():g.text()}).then(function(g){var U=p.response;self.clearTimeout(p.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=g[y];var k={url:U.url,data:g};m&&!Object(K.isFiniteNumber)(D.highWaterMark)&&m(n,x,g,U),w.onSuccess(k,n,x,U)}).catch(function(g){if(self.clearTimeout(p.requestTimeout),n.aborted)return;var U=g.code||0;w.onError({code:U,text:g.message},x,g.details)})},v.getCacheAge=function(){var x=null;if(this.response){var D=this.response.headers.get("age");x=D?parseFloat(D):null}return x},v.loadProgressively=function(x,D,w,p,n){p===void 0&&(p=0);var d=new B.default,m=x.body.getReader(),C=function y(){return m.read().then(function(g){if(g.done)return d.dataLength&&n(D,w,d.flush(),x),Promise.resolve(new ArrayBuffer(0));var U=g.value,k=U.length;return D.loaded+=k,k<p||d.dataLength?(d.push(U),d.dataLength>=p&&n(D,w,d.flush(),x)):n(D,w,U,x),y()}).catch(function(){return Promise.reject()})};return C()},u}();function l(u,v){var T={method:"GET",mode:"cors",credentials:"same-origin",signal:v,headers:new self.Headers(s({},u.headers))};return u.rangeEnd&&T.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),T}function c(u,v){return new self.Request(u.url,v)}var a=function(u){R(v,u);function v(T,x,D){var w;return w=u.call(this,T)||this,w.code=void 0,w.details=void 0,w.code=x,w.details=D,w}return v}(b(Error));Q.default=f},"./src/utils/imsc1-ttml-parser.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"IMSC1_CODEC",function(){return i}),O.d(Q,"parseIMSC1",function(){return o});var K=O("./src/utils/mp4-tools.ts"),M=O("./src/utils/vttparser.ts"),B=O("./src/utils/vttcue.ts"),R=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),t=O("./src/utils/webvtt-parser.ts");function E(){return E=Object.assign||function(p){for(var n=1;n<arguments.length;n++){var d=arguments[n];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(p[m]=d[m])}return p},E.apply(this,arguments)}var i="stpp.ttml.im1t",A=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(p,n,d,m,C){var y=Object(K.findBox)(new Uint8Array(p),["mdat"]);if(y.length===0){C(new Error("Could not parse IMSC1 mdat"));return}var g=y[0],U=Object(R.utf8ArrayToStr)(new Uint8Array(p,g.start,g.end-g.start)),k=Object(b.toTimescaleFromScale)(n,1,d);try{m(f(U,k))}catch(I){C(I)}}function f(p,n){var d=new DOMParser,m=d.parseFromString(p,"text/xml"),C=m.getElementsByTagName("tt")[0];if(!C)throw new Error("Invalid ttml");var y={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(y).reduce(function(G,L){return G[L]=C.getAttribute("ttp:"+L)||y[L],G},{}),U=C.getAttribute("xml:space")!=="preserve",k=c(l(C,"styling","style")),I=c(l(C,"layout","region")),V=l(C,"body","[begin]");return[].map.call(V,function(G){var L=a(G,U);if(!L||!G.hasAttribute("begin"))return null;var $=x(G.getAttribute("begin"),g),Y=x(G.getAttribute("dur"),g),ne=x(G.getAttribute("end"),g);if($===null)throw T(G);if(ne===null){if(Y===null)throw T(G);ne=$+Y}var se=new B.default($-n,ne-n,L);se.id=Object(t.generateCueId)(se.startTime,se.endTime,se.text);var _e=I[G.getAttribute("region")],ve=k[G.getAttribute("style")];se.position=10,se.size=80;var Ce=u(_e,ve),De=Ce.textAlign;if(De){var Qe=s[De];Qe&&(se.lineAlign=Qe),se.align=De}return E(se,Ce),se}).filter(function(G){return G!==null})}function l(p,n,d){var m=p.getElementsByTagName(n)[0];return m?[].slice.call(m.querySelectorAll(d)):[]}function c(p){return p.reduce(function(n,d){var m=d.getAttribute("xml:id");return m&&(n[m]=d),n},{})}function a(p,n){return[].slice.call(p.childNodes).reduce(function(d,m,C){var y;return m.nodeName==="br"&&C?d+`
`:(y=m.childNodes)!==null&&y!==void 0&&y.length?a(m,n):n?d+m.textContent.trim().replace(/\s+/g," "):d+m.textContent},"")}function u(p,n){var d="http://www.w3.org/ns/ttml#styling",m=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return m.reduce(function(C,y){var g=v(n,d,y)||v(p,d,y);return g&&(C[y]=g),C},{})}function v(p,n,d){return p.hasAttributeNS(n,d)?p.getAttributeNS(n,d):null}function T(p){return new Error("Could not parse ttml timestamp "+p)}function x(p,n){if(!p)return null;var d=Object(M.parseTimeStamp)(p);return d===null&&(A.test(p)?d=D(p,n):h.test(p)&&(d=w(p,n))),d}function D(p,n){var d=A.exec(p),m=(d[4]|0)+(d[5]|0)/n.subFrameRate;return(d[1]|0)*3600+(d[2]|0)*60+(d[3]|0)+m/n.frameRate}function w(p,n){var d=h.exec(p),m=Number(d[1]),C=d[2];switch(C){case"h":return m*3600;case"m":return m*60;case"ms":return m*1e3;case"f":return m/n.frameRate;case"t":return m/n.tickRate}return m}},"./src/utils/logger.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"enableLogs",function(){return t}),O.d(Q,"logger",function(){return E});var K=function(){},M={trace:K,debug:K,log:K,warn:K,info:K,error:K},B=M;function R(i){var A=self.console[i];return A?A.bind(self.console,"["+i+"] >"):K}function b(i){for(var A=arguments.length,h=new Array(A>1?A-1:0),s=1;s<A;s++)h[s-1]=arguments[s];h.forEach(function(o){B[o]=i[o]?i[o].bind(i):R(o)})}function t(i){if(self.console&&i===!0||typeof i=="object"){b(i,"debug","log","info","warn","error");try{B.log()}catch(A){B=M}}else B=M}var E=B},"./src/utils/mediakeys-helper.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"KeySystems",function(){return K}),O.d(Q,"requestMediaKeySystemAccess",function(){return M});var K;(function(B){B.WIDEVINE="com.widevine.alpha",B.PLAYREADY="com.microsoft.playready"})(K||(K={}));var M=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"getMediaSource",function(){return K});function K(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"bin2str",function(){return b}),O.d(Q,"readUint16",function(){return t}),O.d(Q,"readUint32",function(){return E}),O.d(Q,"writeUint32",function(){return i}),O.d(Q,"findBox",function(){return A}),O.d(Q,"parseSegmentIndex",function(){return h}),O.d(Q,"parseInitSegment",function(){return s}),O.d(Q,"getStartDTS",function(){return o}),O.d(Q,"getDuration",function(){return f}),O.d(Q,"computeRawDurationFromSamples",function(){return l}),O.d(Q,"offsetStartDTS",function(){return c}),O.d(Q,"segmentValidRange",function(){return a}),O.d(Q,"appendUint8Array",function(){return u});var K=O("./src/utils/typed-array.ts"),M=O("./src/loader/fragment.ts"),B=Math.pow(2,32)-1,R=[].push;function b(v){return String.fromCharCode.apply(null,v)}function t(v,T){"data"in v&&(T+=v.start,v=v.data);var x=v[T]<<8|v[T+1];return x<0?65536+x:x}function E(v,T){"data"in v&&(T+=v.start,v=v.data);var x=v[T]<<24|v[T+1]<<16|v[T+2]<<8|v[T+3];return x<0?4294967296+x:x}function i(v,T,x){"data"in v&&(T+=v.start,v=v.data),v[T]=x>>24,v[T+1]=x>>16&255,v[T+2]=x>>8&255,v[T+3]=x&255}function A(v,T){var x=[];if(!T.length)return x;var D,w,p;"data"in v?(D=v.data,w=v.start,p=v.end):(D=v,w=0,p=D.byteLength);for(var n=w;n<p;){var d=E(D,n),m=b(D.subarray(n+4,n+8)),C=d>1?n+d:p;if(m===T[0])if(T.length===1)x.push({data:D,start:n+8,end:C});else{var y=A({data:D,start:n+8,end:C},T.slice(1));y.length&&R.apply(x,y)}n=C}return x}function h(v){var T=A(v,["moov"]),x=T[0],D=x?x.end:null,w=A(v,["sidx"]);if(!w||!w[0])return null;var p=[],n=w[0],d=n.data[0],m=d===0?8:16,C=E(n,m);m+=4;var y=0,g=0;d===0?m+=8:m+=16,m+=2;var U=n.end+g,k=t(n,m);m+=2;for(var I=0;I<k;I++){var V=m,G=E(n,V);V+=4;var L=G&2147483647,$=(G&2147483648)>>>31;if($===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Y=E(n,V);V+=4,p.push({referenceSize:L,subsegmentDuration:Y,info:{duration:Y/C,start:U,end:U+L-1}}),U+=L,V+=4,m=V}return{earliestPresentationTime:y,timescale:C,version:d,referencesCount:k,references:p,moovEndOffset:D}}function s(v){for(var T=[],x=A(v,["moov","trak"]),D=0;D<x.length;D++){var w=x[D],p=A(w,["tkhd"])[0];if(p){var n=p.data[p.start],d=n===0?12:20,m=E(p,d),C=A(w,["mdia","mdhd"])[0];if(C){n=C.data[C.start],d=n===0?12:20;var y=E(C,d),g=A(w,["mdia","hdlr"])[0];if(g){var U=b(g.data.subarray(g.start+8,g.start+12)),k={soun:M.ElementaryStreamTypes.AUDIO,vide:M.ElementaryStreamTypes.VIDEO}[U];if(k){var I=A(w,["mdia","minf","stbl","stsd"])[0],V=void 0;I&&(V=b(I.data.subarray(I.start+12,I.start+16))),T[m]={timescale:y,type:k},T[k]={timescale:y,id:m,codec:V}}}}}}var G=A(v,["moov","mvex","trex"]);return G.forEach(function(L){var $=E(L,4),Y=T[$];Y&&(Y.default={duration:E(L,12),flags:E(L,20)})}),T}function o(v,T){return A(T,["moof","traf"]).reduce(function(x,D){var w=A(D,["tfdt"])[0],p=w.data[w.start],n=A(D,["tfhd"]).reduce(function(d,m){var C=E(m,4),y=v[C];if(y){var g=E(w,4);p===1&&(g*=Math.pow(2,32),g+=E(w,8));var U=y.timescale||9e4,k=g/U;if(isFinite(k)&&(d===null||k<d))return k}return d},null);return n!==null&&isFinite(n)&&(x===null||n<x)?n:x},null)||0}function f(v,T){for(var x=0,D=0,w=0,p=A(v,["moof","traf"]),n=0;n<p.length;n++){var d=p[n],m=A(d,["tfhd"])[0],C=E(m,4),y=T[C];if(!y)continue;var g=y.default,U=E(m,0)|(g==null?void 0:g.flags),k=g==null?void 0:g.duration;U&8&&(U&2?k=E(m,12):k=E(m,8));for(var I=y.timescale||9e4,V=A(d,["trun"]),G=0;G<V.length;G++){if(k){var L=E(V[G],4);x=k*L}else x=l(V[G]);y.type===M.ElementaryStreamTypes.VIDEO?D+=x/I:y.type===M.ElementaryStreamTypes.AUDIO&&(w+=x/I)}}if(D===0&&w===0){var $=h(v);if($!=null&&$.references)return $.references.reduce(function(Y,ne){return Y+ne.info.duration||0},0)}return D||w}function l(v){var T=E(v,0),x=8;T&1&&(x+=4),T&4&&(x+=4);for(var D=0,w=E(v,4),p=0;p<w;p++){if(T&256){var n=E(v,x);D+=n,x+=4}T&512&&(x+=4),T&1024&&(x+=4),T&2048&&(x+=4)}return D}function c(v,T,x){A(T,["moof","traf"]).forEach(function(D){A(D,["tfhd"]).forEach(function(w){var p=E(w,4),n=v[p];if(!n)return;var d=n.timescale||9e4;A(D,["tfdt"]).forEach(function(m){var C=m.data[m.start],y=E(m,4);if(C===0)i(m,4,y-x*d);else{y*=Math.pow(2,32),y+=E(m,8),y-=x*d,y=Math.max(y,0);var g=Math.floor(y/(B+1)),U=Math.floor(y%(B+1));i(m,4,g),i(m,8,U)}})})})}function a(v){var T={valid:null,remainder:null},x=A(v,["moof"]);if(x){if(x.length<2)return T.remainder=v,T}else return T;var D=x[x.length-1];return T.valid=Object(K.sliceUint8)(v,0,D.start-8),T.remainder=Object(K.sliceUint8)(v,D.start-8),T}function u(v,T){var x=new Uint8Array(v.length+T.length);return x.set(v),x.set(T,v.length),x}},"./src/utils/output-filter.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"default",function(){return K});var K=function(){function M(R,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=R,this.trackName=b}var B=M.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(b,t,E){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=t,this.screen=E,this.timelineController.createCaptionsTrack(this.trackName)},B.reset=function(){this.cueRanges=[]},M}()},"./src/utils/texttrack-utils.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"sendAddTrackEvent",function(){return M}),O.d(Q,"addCueToTrack",function(){return B}),O.d(Q,"clearCurrentCues",function(){return R}),O.d(Q,"removeCuesInRange",function(){return b}),O.d(Q,"getCuesInRange",function(){return E});var K=O("./src/utils/logger.ts");function M(i,A){var h;try{h=new Event("addtrack")}catch(s){h=document.createEvent("Event"),h.initEvent("addtrack",!1,!1)}h.track=i,A.dispatchEvent(h)}function B(i,A){var h=i.mode;if(h==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(A.id))try{if(i.addCue(A),!i.cues.getCueById(A.id))throw new Error("addCue is failed for: "+A)}catch(o){K.logger.debug("[texttrack-utils]: "+o);var s=new self.TextTrackCue(A.startTime,A.endTime,A.text);s.id=A.id,i.addCue(s)}h==="disabled"&&(i.mode=h)}function R(i){var A=i.mode;if(A==="disabled"&&(i.mode="hidden"),i.cues)for(var h=i.cues.length;h--;)i.removeCue(i.cues[h]);A==="disabled"&&(i.mode=A)}function b(i,A,h){var s=i.mode;if(s==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var o=E(i.cues,A,h),f=0;f<o.length;f++)i.removeCue(o[f]);s==="disabled"&&(i.mode=s)}function t(i,A){if(A<i[0].startTime)return 0;var h=i.length-1;if(A>i[h].endTime)return-1;for(var s=0,o=h;s<=o;){var f=Math.floor((o+s)/2);if(A<i[f].startTime)o=f-1;else if(A>i[f].startTime&&s<h)s=f+1;else return f}return i[s].startTime-A<A-i[o].startTime?s:o}function E(i,A,h){var s=[],o=t(i,A);if(o>-1)for(var f=o,l=i.length;f<l;f++){var c=i[f];if(c.startTime>=A&&c.endTime<=h)s.push(c);else if(c.startTime>h)return s}return s}},"./src/utils/time-ranges.ts":function(Z,Q,O){"use strict";O.r(Q);var K={toString:function(B){for(var R="",b=B.length,t=0;t<b;t++)R+="["+B.start(t).toFixed(3)+","+B.end(t).toFixed(3)+"]";return R}};Q.default=K},"./src/utils/timescale-conversion.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"toTimescaleFromBase",function(){return M}),O.d(Q,"toTimescaleFromScale",function(){return B}),O.d(Q,"toMsFromMpegTsClock",function(){return R}),O.d(Q,"toMpegTsClockFromTimescale",function(){return b});var K=9e4;function M(t,E,i,A){i===void 0&&(i=1),A===void 0&&(A=!1);var h=t*E*i;return A?Math.round(h):h}function B(t,E,i,A){return i===void 0&&(i=1),A===void 0&&(A=!1),M(t,E,1/i,A)}function R(t,E){return E===void 0&&(E=!1),M(t,1e3,1/K,E)}function b(t,E){return E===void 0&&(E=1),M(t,K,1/E)}},"./src/utils/typed-array.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"sliceUint8",function(){return K});function K(M,B,R){return Uint8Array.prototype.slice?M.slice(B,R):new Uint8Array(Array.prototype.slice.call(M,B,R))}},"./src/utils/vttcue.ts":function(Z,Q,O){"use strict";O.r(Q),Q.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var K=["","lr","rl"],M=["start","middle","end","left","right"];function B(i,A){if(typeof A!="string")return!1;if(!Array.isArray(i))return!1;var h=A.toLowerCase();return~i.indexOf(h)?h:!1}function R(i){return B(K,i)}function b(i){return B(M,i)}function t(i){for(var A=arguments.length,h=new Array(A>1?A-1:0),s=1;s<A;s++)h[s-1]=arguments[s];for(var o=1;o<arguments.length;o++){var f=arguments[o];for(var l in f)i[l]=f[l]}return i}function E(i,A,h){var s=this,o={enumerable:!0};s.hasBeenReset=!1;var f="",l=!1,c=i,a=A,u=h,v=null,T="",x=!0,D="auto",w="start",p=50,n="middle",d=50,m="middle";Object.defineProperty(s,"id",t({},o,{get:function(){return f},set:function(y){f=""+y}})),Object.defineProperty(s,"pauseOnExit",t({},o,{get:function(){return l},set:function(y){l=!!y}})),Object.defineProperty(s,"startTime",t({},o,{get:function(){return c},set:function(y){if(typeof y!="number")throw new TypeError("Start time must be set to a number.");c=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",t({},o,{get:function(){return a},set:function(y){if(typeof y!="number")throw new TypeError("End time must be set to a number.");a=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",t({},o,{get:function(){return u},set:function(y){u=""+y,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",t({},o,{get:function(){return v},set:function(y){v=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",t({},o,{get:function(){return T},set:function(y){var g=R(y);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");T=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",t({},o,{get:function(){return x},set:function(y){x=!!y,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",t({},o,{get:function(){return D},set:function(y){if(typeof y!="number"&&y!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",t({},o,{get:function(){return w},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");w=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",t({},o,{get:function(){return p},set:function(y){if(y<0||y>100)throw new Error("Position must be between 0 and 100.");p=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",t({},o,{get:function(){return n},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");n=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",t({},o,{get:function(){return d},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");d=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",t({},o,{get:function(){return m},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");m=g,this.hasBeenReset=!0}})),s.displayState=void 0}return E.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},E}()},"./src/utils/vttparser.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"parseTimeStamp",function(){return B}),O.d(Q,"fixLineBreaks",function(){return A}),O.d(Q,"VTTParser",function(){return h});var K=O("./src/utils/vttcue.ts"),M=function(){function s(){}var o=s.prototype;return o.decode=function(l,c){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},s}();function B(s){function o(l,c,a,u){return(l|0)*3600+(c|0)*60+(a|0)+parseFloat(u||0)}var f=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?o(f[2],f[3],0,f[4]):o(f[1],f[2],f[3],f[4]):null}var R=function(){function s(){this.values=Object.create(null)}var o=s.prototype;return o.set=function(l,c){!this.get(l)&&c!==""&&(this.values[l]=c)},o.get=function(l,c,a){return a?this.has(l)?this.values[l]:c[a]:this.has(l)?this.values[l]:c},o.has=function(l){return l in this.values},o.alt=function(l,c,a){for(var u=0;u<a.length;++u)if(c===a[u]){this.set(l,c);break}},o.integer=function(l,c){/^-?\d+$/.test(c)&&this.set(l,parseInt(c,10))},o.percent=function(l,c){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(c)){var a=parseFloat(c);if(a>=0&&a<=100)return this.set(l,a),!0}return!1},s}();function b(s,o,f,l){var c=l?s.split(l):[s];for(var a in c){if(typeof c[a]!="string")continue;var u=c[a].split(f);if(u.length!==2)continue;var v=u[0],T=u[1];o(v,T)}}var t=new K.default(0,0,""),E=t.align==="middle"?"middle":"center";function i(s,o,f){var l=s;function c(){var v=B(s);if(v===null)throw new Error("Malformed timestamp: "+l);return s=s.replace(/^[^\sa-zA-Z-]+/,""),v}function a(v,T){var x=new R;b(v,function(p,n){var d;switch(p){case"region":for(var m=f.length-1;m>=0;m--)if(f[m].id===n){x.set(p,f[m].region);break}break;case"vertical":x.alt(p,n,["rl","lr"]);break;case"line":d=n.split(","),x.integer(p,d[0]),x.percent(p,d[0])&&x.set("snapToLines",!1),x.alt(p,d[0],["auto"]),d.length===2&&x.alt("lineAlign",d[1],["start",E,"end"]);break;case"position":d=n.split(","),x.percent(p,d[0]),d.length===2&&x.alt("positionAlign",d[1],["start",E,"end","line-left","line-right","auto"]);break;case"size":x.percent(p,n);break;case"align":x.alt(p,n,["start",E,"end","left","right"]);break}},/:/,/\s/),T.region=x.get("region",null),T.vertical=x.get("vertical","");var D=x.get("line","auto");D==="auto"&&t.line===-1&&(D=-1),T.line=D,T.lineAlign=x.get("lineAlign","start"),T.snapToLines=x.get("snapToLines",!0),T.size=x.get("size",100),T.align=x.get("align",E);var w=x.get("position","auto");w==="auto"&&t.position===50&&(w=T.align==="start"||T.align==="left"?0:T.align==="end"||T.align==="right"?100:50),T.position=w}function u(){s=s.replace(/^\s+/,"")}if(u(),o.startTime=c(),u(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);s=s.substr(3),u(),o.endTime=c(),u(),a(s,o)}function A(s){return s.replace(/<br(?: \/)?>/gi,`
`)}var h=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new M,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=s.prototype;return o.parse=function(l){var c=this;l&&(c.buffer+=c.decoder.decode(l,{stream:!0}));function a(){var w=c.buffer,p=0;for(w=A(w);p<w.length&&w[p]!=="\r"&&w[p]!==`
`;)++p;var n=w.substr(0,p);return w[p]==="\r"&&++p,w[p]===`
`&&++p,c.buffer=w.substr(p),n}function u(w){b(w,function(p,n){},/:/)}try{var v="";if(c.state==="INITIAL"){if(!/\r\n|\n/.test(c.buffer))return this;v=a();var T=v.match(/^()?WEBVTT([ \t].*)?$/);if(!T||!T[0])throw new Error("Malformed WebVTT signature.");c.state="HEADER"}for(var x=!1;c.buffer;){if(!/\r\n|\n/.test(c.buffer))return this;x?x=!1:v=a();switch(c.state){case"HEADER":/:/.test(v)?u(v):v||(c.state="ID");continue;case"NOTE":v||(c.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(v)){c.state="NOTE";break}if(!v)continue;if(c.cue=new K.default(0,0,""),c.state="CUE",v.indexOf("-->")===-1){c.cue.id=v;continue}case"CUE":if(!c.cue){c.state="BADCUE";continue}try{i(v,c.cue,c.regionList)}catch(w){c.cue=null,c.state="BADCUE";continue}c.state="CUETEXT";continue;case"CUETEXT":{var D=v.indexOf("-->")!==-1;if(!v||D&&(x=!0)){c.oncue&&c.cue&&c.oncue(c.cue),c.cue=null,c.state="ID";continue}if(c.cue===null)continue;c.cue.text&&(c.cue.text+=`
`),c.cue.text+=v}continue;case"BADCUE":v||(c.state="ID")}}}catch(w){c.state==="CUETEXT"&&c.cue&&c.oncue&&c.oncue(c.cue),c.cue=null,c.state=c.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=`
`,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(c){l.onparsingerror&&l.onparsingerror(c)}return l.onflush&&l.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(Z,Q,O){"use strict";O.r(Q),O.d(Q,"generateCueId",function(){return h}),O.d(Q,"parseWebVTT",function(){return o});var K=O("./src/polyfills/number.ts"),M=O("./src/utils/vttparser.ts"),B=O("./src/demux/id3.ts"),R=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,E=function(l,c,a){return a===void 0&&(a=0),l.substr(a,c.length)===c},i=function(l){var c=parseInt(l.substr(-3)),a=parseInt(l.substr(-6,2)),u=parseInt(l.substr(-9,2)),v=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(K.isFiniteNumber)(c)||!Object(K.isFiniteNumber)(a)||!Object(K.isFiniteNumber)(u)||!Object(K.isFiniteNumber)(v))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return c+=1e3*a,c+=60*1e3*u,c+=60*60*1e3*v,c},A=function(l){for(var c=5381,a=l.length;a;)c=c*33^l.charCodeAt(--a);return(c>>>0).toString()};function h(f,l,c){return A(f.toString())+A(l.toString())+A(c)}var s=function(l,c,a){var u=l[c],v=l[u.prevCC];if(!v||!v.new&&u.new){l.ccOffset=l.presentationOffset=u.start,u.new=!1;return}for(;(T=v)!==null&&T!==void 0&&T.new;){var T;l.ccOffset+=u.start-v.start,u.new=!1,u=v,v=l[u.prevCC]}l.presentationOffset=a};function o(f,l,c,a,u,v,T,x){var D=new M.VTTParser,w=Object(B.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(t,`
`).split(`
`),p=[],n=Object(R.toMpegTsClockFromTimescale)(l,c),d="00:00.000",m=0,C=0,y,g=!0,U=!1;D.oncue=function(k){var I=a[u],V=a.ccOffset,G=(m-n)/9e4;if(I!=null&&I.new&&(C!==void 0?V=a.ccOffset=I.start:s(a,u,G)),G&&(V=G-a.presentationOffset),U){var L=k.endTime-k.startTime,$=Object(b.normalizePts)((k.startTime+V-C)*9e4,v*9e4)/9e4;k.startTime=$,k.endTime=$+L}var Y=k.text.trim();k.text=decodeURIComponent(encodeURIComponent(Y)),k.id||(k.id=h(k.startTime,k.endTime,Y)),k.endTime>0&&p.push(k)},D.onparsingerror=function(k){y=k},D.onflush=function(){if(y){x(y);return}T(p)},w.forEach(function(k){if(g)if(E(k,"X-TIMESTAMP-MAP=")){g=!1,U=!0,k.substr(16).split(",").forEach(function(I){E(I,"LOCAL:")?d=I.substr(6):E(I,"MPEGTS:")&&(m=parseInt(I.substr(7)))});try{C=i(d)/1e3}catch(I){U=!1,y=I}return}else k===""&&(g=!1);D.parse(k+`
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(Z,Q,O){"use strict";O.r(Q);var K=O("./src/utils/logger.ts"),M=O("./src/loader/load-stats.ts"),B=/^age:\s*[\d.]+\s*$/m,R=function(){function b(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 M.LoadStats,this.retryDelay=0}var t=b.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},t.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(i,A,h){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=A,this.callbacks=h,this.retryDelay=A.retryDelay,this.loadInternal()},t.loadInternal=function(){var i=this.config,A=this.context;if(!i)return;var h=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var o=this.xhrSetup;try{if(o)try{o(h,A.url)}catch(c){h.open("GET",A.url,!0),o(h,A.url)}h.readyState||h.open("GET",A.url,!0);var f=this.context.headers;if(f)for(var l in f)h.setRequestHeader(l,f[l])}catch(c){this.callbacks.onError({code:h.status,text:c.message},A,h);return}A.rangeEnd&&h.setRequestHeader("Range","bytes="+A.rangeStart+"-"+(A.rangeEnd-1)),h.onreadystatechange=this.readystatechange.bind(this),h.onprogress=this.loadprogress.bind(this),h.responseType=A.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),h.send()},t.readystatechange=function(){var i=this.context,A=this.loader,h=this.stats;if(!i||!A)return;var s=A.readyState,o=this.config;if(h.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),h.loading.first===0&&(h.loading.first=Math.max(self.performance.now(),h.loading.start)),s===4){A.onreadystatechange=null,A.onprogress=null;var f=A.status;if(f>=200&&f<300){h.loading.end=Math.max(self.performance.now(),h.loading.first);var l,c;if(i.responseType==="arraybuffer"?(l=A.response,c=l.byteLength):(l=A.responseText,c=l.length),h.loaded=h.total=c,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(h,i,l,A),!this.callbacks)return;var u={url:A.responseURL,data:l};this.callbacks.onSuccess(u,h,i,A)}else h.retry>=o.maxRetry||f>=400&&f<499?(K.logger.error(f+" while loading "+i.url),this.callbacks.onError({code:f,text:A.statusText},i,A)):(K.logger.warn(f+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),h.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.loadtimeout=function(){K.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(i){var A=this.stats;A.loaded=i.loaded,i.lengthComputable&&(A.total=i.total)},t.getCacheAge=function(){var i=null;if(this.loader&&B.test(this.loader.getAllResponseHeaders())){var A=this.loader.getResponseHeader("age");i=A?parseFloat(A):null}return i},b}();Q.default=R}}).default})},vHTk:function(Xe,le,H){Xe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(Xe,le,H){var Z=H("SrGk"),Q=H("bYtY");function O(B,R){Z.call(this,B,R,["filter"],"__filter_in_use__","_shadowDom")}Q.inherits(O,Z),O.prototype.addWithoutUpdate=function(B,R){if(R&&K(R.style)){var b;if(R._shadowDom){b=R._shadowDom;var t=this.getDefs(!0);t.contains(R._shadowDom)||this.addDom(b)}else b=this.add(R);this.markUsed(R);var E=b.getAttribute("id");B.style.filter="url(#"+E+")"}},O.prototype.add=function(B){var R=this.createElement("filter");return B._shadowDomId=B._shadowDomId||this.nextId++,R.setAttribute("id","zr"+this._zrId+"-shadow-"+B._shadowDomId),this.updateDom(B,R),this.addDom(R),R},O.prototype.update=function(B,R){var b=R.style;if(K(b)){var t=this;Z.prototype.update.call(this,R,function(){t.updateDom(R,R._shadowDom)})}else this.remove(B,R)},O.prototype.remove=function(B,R){R._shadowDomId!=null&&(this.removeDom(B),B.style.filter="")},O.prototype.updateDom=function(B,R){var b=R.getElementsByTagName("feDropShadow");b.length===0?b=this.createElement("feDropShadow"):b=b[0];var t=B.style,E=B.scale&&B.scale[0]||1,i=B.scale&&B.scale[1]||1,A,h,s,o;if(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)A=t.shadowOffsetX||0,h=t.shadowOffsetY||0,s=t.shadowBlur,o=t.shadowColor;else if(t.textShadowBlur)A=t.textShadowOffsetX||0,h=t.textShadowOffsetY||0,s=t.textShadowBlur,o=t.textShadowColor;else{this.removeDom(R,t);return}b.setAttribute("dx",A/E),b.setAttribute("dy",h/i),b.setAttribute("flood-color",o);var f=s/2/E,l=s/2/i,c=f+" "+l;b.setAttribute("stdDeviation",c),R.setAttribute("x","-100%"),R.setAttribute("y","-100%"),R.setAttribute("width",Math.ceil(s/2*200)+"%"),R.setAttribute("height",Math.ceil(s/2*200)+"%"),R.appendChild(b),B._shadowDom=R},O.prototype.markUsed=function(B){B._shadowDom&&Z.prototype.markUsed.call(this,B._shadowDom)};function K(B){return B&&(B.shadowBlur||B.shadowOffsetX||B.shadowOffsetY||B.textShadowBlur||B.textShadowOffsetX||B.textShadowOffsetY)}var M=O;Xe.exports=M},vWvF:function(Xe,le,H){var Z=H("Bq2U"),Q=H("SUKs"),O=H("bYtY"),K=O.isString,M=O.isFunction,B=O.isObject,R=O.isArrayLike,b=O.indexOf,t=function(){this.animators=[]};t.prototype={constructor:t,animate:function(s,o){var f,l=!1,c=this,a=this.__zr;if(s){var u=s.split("."),v=c;l=u[0]==="shape";for(var T=0,x=u.length;T<x;T++){if(!v)continue;v=v[u[T]]}v&&(f=v)}else f=c;if(!f){Q('Property "'+s+'" is not existed in element '+c.id);return}var D=c.animators,w=new Z(f,o);return w.during(function(p){c.dirty(l)}).done(function(){D.splice(b(D,w),1)}),D.push(w),a&&a.animation.addAnimator(w),w},stopAnimation:function(s){for(var o=this.animators,f=o.length,l=0;l<f;l++)o[l].stop(s);return o.length=0,this},animateTo:function(s,o,f,l,c,a){E(this,s,o,f,l,c,a)},animateFrom:function(s,o,f,l,c,a){E(this,s,o,f,l,c,a,!0)}};function E(s,o,f,l,c,a,u,v){K(l)?(a=c,c=l,l=0):M(c)?(a=c,c="linear",l=0):M(l)?(a=l,l=0):M(f)?(a=f,f=500):f||(f=500),s.stopAnimation(),i(s,"",s,o,f,l,v);var T=s.animators.slice(),x=T.length;function D(){x--,x||a&&a()}x||a&&a();for(var w=0;w<T.length;w++)T[w].done(D).start(c,u)}function i(s,o,f,l,c,a,u){var v={},T=0;for(var x in l){if(!l.hasOwnProperty(x))continue;f[x]!=null?B(l[x])&&!R(l[x])?i(s,o?o+"."+x:x,f[x],l[x],c,a,u):(u?(v[x]=f[x],A(s,o,x,l[x])):v[x]=l[x],T++):l[x]!=null&&!u&&A(s,o,x,l[x])}T>0&&s.animate(o,!1).when(c==null?500:c,v).delay(a||0)}function A(s,o,f,l){if(!o)s.attr(f,l);else{var c={};c[o]={},c[o][f]=l,s.attr(c)}}var h=t;Xe.exports=h},wCXF:function(Xe,le,H){"use strict";H.d(le,"a",function(){return At});var Z=H("rePB"),Q=H("VTBJ"),O=H("KQm4"),K=H("U8pU"),M=H("ODXe"),B=H("q1tI"),R=H("TSYQ"),b=H.n(R),t=H("Gytx"),E=H.n(t),i=H("Kwbf"),A=H("t23M"),h=H("qx4F"),s=H("6eGT"),o=H("IBYe"),f=H("Ff2n"),l=H("c+Xe"),c=H("fyJ8"),a=H("biw7");function u(He,ke,ct,gt,Ze){var ot=ct[He]||{},Ke=ct[ke]||{},Me,Ue;ot.fixed==="left"?Me=gt.left[He]:Ke.fixed==="right"&&(Ue=gt.right[ke]);var ge=!1,xe=!1,Ee=!1,Oe=!1,Fe=ct[ke+1],$e=ct[He-1];if(Ze==="rtl"){if(Me!==void 0){var pt=$e&&$e.fixed==="left";Oe=!pt}else if(Ue!==void 0){var Ot=Fe&&Fe.fixed==="right";Ee=!Ot}}else if(Me!==void 0){var kt=Fe&&Fe.fixed==="left";ge=!kt}else if(Ue!==void 0){var Dt=$e&&$e.fixed==="right";xe=!Dt}return{fixLeft:Me,fixRight:Ue,lastFixLeft:ge,firstFixRight:xe,lastFixRight:Ee,firstFixLeft:Oe,isSticky:gt.isSticky}}var v=H("sR1s");function T(He){var ke=He.cells,ct=He.stickyOffsets,gt=He.flattenColumns,Ze=He.rowComponent,ot=He.cellComponent,Ke=He.onHeaderRow,Me=He.index,Ue=B.useContext(a.a),ge=Ue.prefixCls,xe=Ue.direction,Ee;Ke&&(Ee=Ke(ke.map(function(Fe){return Fe.column}),Me));var Oe=Object(v.a)(ke.map(function(Fe){return Fe.column}));return B.createElement(Ze,Object.assign({},Ee),ke.map(function(Fe,$e){var pt=Fe.column,Ot=u(Fe.colStart,Fe.colEnd,gt,ct,xe),kt;return pt&&pt.onHeaderCell&&(kt=Fe.column.onHeaderCell(pt)),B.createElement(c.a,Object.assign({},Fe,{ellipsis:pt.ellipsis,align:pt.align,component:ot,prefixCls:ge,key:Oe[$e]},Ot,{additionalProps:kt,rowType:"header"}))}))}T.displayName="HeaderRow";var x=T;function D(He){var ke=[];function ct(Ke,Me){var Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;ke[Ue]=ke[Ue]||[];var ge=Me,xe=Ke.filter(Boolean).map(function(Ee){var Oe={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:ge},Fe=1,$e=Ee.children;return $e&&$e.length>0&&(Fe=ct($e,ge,Ue+1).reduce(function(pt,Ot){return pt+Ot},0),Oe.hasSubColumns=!0),"colSpan"in Ee&&(Fe=Ee.colSpan),"rowSpan"in Ee&&(Oe.rowSpan=Ee.rowSpan),Oe.colSpan=Fe,Oe.colEnd=Oe.colStart+Fe-1,ke[Ue].push(Oe),ge+=Fe,Fe});return xe}ct(He,0);for(var gt=ke.length,Ze=function(Me){ke[Me].forEach(function(Ue){!("rowSpan"in Ue)&&!Ue.hasSubColumns&&(Ue.rowSpan=gt-Me)})},ot=0;ot<gt;ot+=1)Ze(ot);return ke}function w(He){var ke=He.stickyOffsets,ct=He.columns,gt=He.flattenColumns,Ze=He.onHeaderRow,ot=B.useContext(a.a),Ke=ot.prefixCls,Me=ot.getComponent,Ue=B.useMemo(function(){return D(ct)},[ct]),ge=Me(["header","wrapper"],"thead"),xe=Me(["header","row"],"tr"),Ee=Me(["header","cell"],"th");return B.createElement(ge,{className:"".concat(Ke,"-thead")},Ue.map(function(Oe,Fe){var $e=B.createElement(x,{key:Fe,flattenColumns:gt,cells:Oe,stickyOffsets:ke,rowComponent:xe,cellComponent:Ee,onHeaderRow:Ze,index:Fe});return $e}))}var p=w,n=H("hW8S");function d(He){for(var ke=He.colWidths,ct=He.columns,gt=He.columCount,Ze=[],ot=gt||ct.length,Ke=!1,Me=ot-1;Me>=0;Me-=1){var Ue=ke[Me],ge=ct&&ct[Me],xe=ge&&ge[n.a];(Ue||xe||Ke)&&(Ze.unshift(B.createElement("col",Object.assign({key:Me,style:{width:Ue,minWidth:Ue}},xe))),Ke=!0)}return B.createElement("colgroup",null,Ze)}var m=d;function C(He,ke){return Object(B.useMemo)(function(){for(var ct=[],gt=0;gt<ke;gt+=1){var Ze=He[gt];if(Ze!==void 0)ct[gt]=Ze;else return null}return ct},[He.join("_"),ke])}var y=B.forwardRef(function(He,ke){var ct=He.noData,gt=He.columns,Ze=He.flattenColumns,ot=He.colWidths,Ke=He.columCount,Me=He.stickyOffsets,Ue=He.direction,ge=He.fixHeader,xe=He.offsetHeader,Ee=He.stickyClassName,Oe=He.onScroll,Fe=Object(f.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),$e=B.useContext(a.a),pt=$e.prefixCls,Ot=$e.scrollbarSize,kt=$e.isSticky,Dt=kt&&!ge?0:Ot,Bt=B.useRef(null),ht=B.useCallback(function(Ct){Object(l.b)(ke,Ct),Object(l.b)(Bt,Ct)},[]);B.useEffect(function(){var Ct;function bt(tt){var St=tt.currentTarget,Lt=tt.deltaX;Lt&&(Oe({currentTarget:St,scrollLeft:St.scrollLeft+Lt}),tt.preventDefault())}return(Ct=Bt.current)===null||Ct===void 0||Ct.addEventListener("wheel",bt),function(){var tt;(tt=Bt.current)===null||tt===void 0||tt.removeEventListener("wheel",bt)}},[]);var it=Ze[Ze.length-1],et={fixed:it?it.fixed:null,onHeaderCell:function(){return{className:"".concat(pt,"-cell-scrollbar")}}},Te=Object(B.useMemo)(function(){return Dt?[].concat(Object(O.a)(gt),[et]):gt},[Dt,gt]),Ne=Object(B.useMemo)(function(){return Dt?[].concat(Object(O.a)(Ze),[et]):Ze},[Dt,Ze]),mt=Object(B.useMemo)(function(){var Ct=Me.right,bt=Me.left;return Object(Q.a)(Object(Q.a)({},Me),{},{left:Ue==="rtl"?[].concat(Object(O.a)(bt.map(function(tt){return tt+Dt})),[0]):bt,right:Ue==="rtl"?Ct:[].concat(Object(O.a)(Ct.map(function(tt){return tt+Dt})),[0]),isSticky:kt})},[Dt,Me,kt]),lt=C(ot,Ke);return B.createElement("div",{style:Object(Q.a)({overflow:"hidden"},kt?{top:xe}:{}),ref:ht,className:b()("".concat(pt,"-header"),Object(Z.a)({},Ee,!!Ee))},B.createElement("table",{style:{tableLayout:"fixed",visibility:ct||lt?null:"hidden"}},B.createElement(m,{colWidths:lt?[].concat(Object(O.a)(lt),[Dt]):[],columCount:Ke+1,columns:Ne}),B.createElement(p,Object.assign({},Fe,{stickyOffsets:mt,columns:Te,flattenColumns:Ne}))))});y.displayName="FixedHeader";var g=y,U=B.createContext(null),k=U;function I(He){var ke=He.prefixCls,ct=He.children,gt=He.component,Ze=He.cellComponent,ot=He.fixHeader,Ke=He.fixColumn,Me=He.horizonScroll,Ue=He.className,ge=He.expanded,xe=He.componentWidth,Ee=He.colSpan,Oe=B.useContext(a.a),Fe=Oe.scrollbarSize;return B.useMemo(function(){var $e=ct;return Ke&&($e=B.createElement("div",{style:{width:xe-(ot?Fe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(ke,"-expanded-row-fixed")},$e)),B.createElement(gt,{className:Ue,style:{display:ge?null:"none"}},B.createElement(c.a,{component:Ze,prefixCls:ke,colSpan:Ee},$e))},[ct,gt,ot,Me,Ue,ge,xe,Ee,Fe])}var V=I;function G(He){var ke=He.className,ct=He.style,gt=He.record,Ze=He.index,ot=He.rowKey,Ke=He.getRowKey,Me=He.rowExpandable,Ue=He.expandedKeys,ge=He.onRow,xe=He.indent,Ee=xe===void 0?0:xe,Oe=He.rowComponent,Fe=He.cellComponent,$e=He.childrenColumnName,pt=B.useContext(a.a),Ot=pt.prefixCls,kt=pt.fixedInfoList,Dt=B.useContext(k),Bt=Dt.fixHeader,ht=Dt.fixColumn,it=Dt.horizonScroll,et=Dt.componentWidth,Te=Dt.flattenColumns,Ne=Dt.expandableType,mt=Dt.expandRowByClick,lt=Dt.onTriggerExpand,Ct=Dt.rowClassName,bt=Dt.expandedRowClassName,tt=Dt.indentSize,St=Dt.expandIcon,Lt=Dt.expandedRowRender,Tt=Dt.expandIconColumnIndex,Ht=B.useState(!1),gr=Object(M.a)(Ht,2),Or=gr[0],vr=gr[1],jt=Ue&&Ue.has(He.recordKey);B.useEffect(function(){jt&&vr(!0)},[jt]);var Mr=Ne==="row"&&(!Me||Me(gt)),br=Ne==="nest",Tr=$e&&gt&&gt[$e],Ar=Mr||br,Sr;ge&&(Sr=ge(gt,Ze));var tn=function(P){if(mt&&Ar&&lt(gt,P),Sr&&Sr.onClick){for(var j,q=arguments.length,Ae=new Array(q>1?q-1:0),re=1;re<q;re++)Ae[re-1]=arguments[re];(j=Sr).onClick.apply(j,[P].concat(Ae))}},Zr;typeof Ct=="string"?Zr=Ct:typeof Ct=="function"&&(Zr=Ct(gt,Ze,Ee));var me=Object(v.a)(Te),be=B.createElement(Oe,Object.assign({},Sr,{"data-row-key":ot,className:b()(ke,"".concat(Ot,"-row"),"".concat(Ot,"-row-level-").concat(Ee),Zr,Sr&&Sr.className),style:Object(Q.a)(Object(Q.a)({},ct),Sr?Sr.style:null),onClick:tn}),Te.map(function(te,P){var j=te.render,q=te.dataIndex,Ae=te.className,re=me[P],We=kt[P],_t;P===(Tt||0)&&br&&(_t=B.createElement(B.Fragment,null,B.createElement("span",{style:{paddingLeft:"".concat(tt*Ee,"px")},className:"".concat(Ot,"-row-indent indent-level-").concat(Ee)}),St({prefixCls:Ot,expanded:jt,expandable:Tr,record:gt,onExpand:lt})));var Pt;return te.onCell&&(Pt=te.onCell(gt,Ze)),B.createElement(c.a,Object.assign({className:Ae,ellipsis:te.ellipsis,align:te.align,component:Fe,prefixCls:Ot,key:re,record:gt,index:Ze,dataIndex:q,render:j,shouldCellUpdate:te.shouldCellUpdate},We,{appendNode:_t,additionalProps:Pt}))})),Pe;if(Mr&&(Or||jt)){var rt=Lt(gt,Ze,Ee+1,jt),qe=bt&&bt(gt,Ze,Ee);Pe=B.createElement(V,{expanded:jt,className:b()("".concat(Ot,"-expanded-row"),"".concat(Ot,"-expanded-row-level-").concat(Ee+1),qe),prefixCls:Ot,fixHeader:Bt,fixColumn:ht,horizonScroll:it,component:Oe,componentWidth:et,cellComponent:Fe,colSpan:Te.length},rt)}var Ft;return Tr&&jt&&(Ft=(gt[$e]||[]).map(function(te,P){var j=Ke(te,P);return B.createElement(G,Object.assign({},He,{key:j,rowKey:j,record:te,recordKey:j,index:P,indent:Ee+1}))})),B.createElement(B.Fragment,null,be,Pe,Ft)}G.displayName="BodyRow";var L=G,$=B.createContext(null),Y=$;function ne(He){var ke=He.columnKey,ct=He.onColumnResize,gt=B.useRef();return B.useEffect(function(){gt.current&&ct(ke,gt.current.offsetWidth)},[]),B.createElement(A.a,{onResize:function(ot){var Ke=ot.offsetWidth;ct(ke,Ke)}},B.createElement("td",{ref:gt,style:{padding:0,border:0,height:0}},B.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function se(He){var ke=He.data,ct=He.getRowKey,gt=He.measureColumnWidth,Ze=He.expandedKeys,ot=He.onRow,Ke=He.rowExpandable,Me=He.emptyNode,Ue=He.childrenColumnName,ge=B.useContext(Y),xe=ge.onColumnResize,Ee=B.useContext(a.a),Oe=Ee.prefixCls,Fe=Ee.getComponent,$e=B.useContext(k),pt=$e.fixHeader,Ot=$e.horizonScroll,kt=$e.flattenColumns,Dt=$e.componentWidth;return B.useMemo(function(){var Bt=Fe(["body","wrapper"],"tbody"),ht=Fe(["body","row"],"tr"),it=Fe(["body","cell"],"td"),et;ke.length?et=ke.map(function(Ne,mt){var lt=ct(Ne,mt);return B.createElement(L,{key:lt,rowKey:lt,record:Ne,recordKey:lt,index:mt,rowComponent:ht,cellComponent:it,expandedKeys:Ze,onRow:ot,getRowKey:ct,rowExpandable:Ke,childrenColumnName:Ue})}):et=B.createElement(V,{expanded:!0,className:"".concat(Oe,"-placeholder"),prefixCls:Oe,fixHeader:pt,fixColumn:Ot,horizonScroll:Ot,component:ht,componentWidth:Dt,cellComponent:it,colSpan:kt.length},Me);var Te=Object(v.a)(kt);return B.createElement(Bt,{className:"".concat(Oe,"-tbody")},gt&&B.createElement("tr",{"aria-hidden":"true",className:"".concat(Oe,"-measure-row"),style:{height:0}},Te.map(function(Ne){return B.createElement(ne,{key:Ne,columnKey:Ne,onColumnResize:xe})})),et)},[ke,Oe,ot,gt,Ze,ct,Fe,Dt,Me,kt])}var _e=B.memo(se);_e.displayName="Body";var ve=_e,Ce=H("wRmb"),De=H("xEkU"),Qe=H.n(De);function Se(He){var ke=Object(B.useRef)(He),ct=Object(B.useState)({}),gt=Object(M.a)(ct,2),Ze=gt[1],ot=Object(B.useRef)(null),Ke=Object(B.useRef)([]);function Me(Ue){ot.current===null&&(Ke.current=[],ot.current=Qe()(function(){Ke.current.forEach(function(ge){ke.current=ge(ke.current)}),ot.current=null,Ze({})})),Ke.current.push(Ue)}return Object(B.useEffect)(function(){return function(){Qe.a.cancel(ot.current)}},[]),[ke.current,Me]}function Ie(He){var ke=Object(B.useRef)(He),ct=Object(B.useRef)(null);function gt(){window.clearTimeout(ct.current)}function Ze(Ke){ke.current=Ke,gt(),ct.current=window.setTimeout(function(){ke.current=null,ct.current=null},100)}function ot(){return ke.current}return Object(B.useEffect)(function(){return gt},[]),[Ze,ot]}function Je(He,ke,ct){var gt=Object(B.useMemo)(function(){for(var Ze=[],ot=[],Ke=0,Me=0,Ue=0;Ue<ke;Ue+=1)if(ct==="rtl"){ot[Ue]=Me,Me+=He[Ue]||0;var ge=ke-Ue-1;Ze[ge]=Ke,Ke+=He[ge]||0}else{Ze[Ue]=Ke,Ke+=He[Ue]||0;var xe=ke-Ue-1;ot[xe]=Me,Me+=He[xe]||0}return{left:Ze,right:ot}},[He,ke,ct]);return gt}var Et=Je;function Le(He){var ke=He.className,ct=He.children;return B.createElement("div",{className:ke},ct)}var je=Le,st=H("n6Qo");function he(He){var ke,ct=He.prefixCls,gt=He.record,Ze=He.onExpand,ot=He.expanded,Ke=He.expandable,Me="".concat(ct,"-row-expand-icon");if(!Ke)return B.createElement("span",{className:b()(Me,"".concat(ct,"-row-spaced"))});var Ue=function(xe){Ze(gt,xe),xe.stopPropagation()};return B.createElement("span",{className:b()(Me,(ke={},Object(Z.a)(ke,"".concat(ct,"-row-expanded"),ot),Object(Z.a)(ke,"".concat(ct,"-row-collapsed"),!ot),ke)),onClick:Ue})}function ie(He,ke,ct){var gt=[];function Ze(ot){(ot||[]).forEach(function(Ke,Me){gt.push(ke(Ke,Me)),Ze(Ke[ct])})}return Ze(He),gt}var oe=H("zT1h"),ee=H("y0+3"),de=function(ke,ct){var gt,Ze,ot=ke.scrollBodyRef,Ke=ke.onScroll,Me=ke.offsetScroll,Ue=B.useContext(a.a),ge=Ue.prefixCls,xe=((gt=ot.current)===null||gt===void 0?void 0:gt.scrollWidth)||0,Ee=((Ze=ot.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,Oe=xe&&Ee*(Ee/xe),Fe=B.useRef(),$e=Se({scrollLeft:0,isHiddenScrollBar:!1}),pt=Object(M.a)($e,2),Ot=pt[0],kt=pt[1],Dt=B.useRef({delta:0,x:0}),Bt=B.useState(!1),ht=Object(M.a)(Bt,2),it=ht[0],et=ht[1],Te=function(){et(!1)},Ne=function(tt){tt.persist(),Dt.current.delta=tt.pageX-Ot.scrollLeft,Dt.current.x=0,et(!0),tt.preventDefault()},mt=function(tt){var St,Lt=tt||((St=window)===null||St===void 0?void 0:St.event),Tt=Lt.buttons;if(!it||Tt===0){it&&et(!1);return}var Ht=Dt.current.x+tt.pageX-Dt.current.x-Dt.current.delta;Ht<=0&&(Ht=0),Ht+Oe>=Ee&&(Ht=Ee-Oe),Ke({scrollLeft:Ht/Ee*(xe+2)}),Dt.current.x=tt.pageX},lt=function(){var tt=Object(ee.b)(ot.current).top,St=tt+ot.current.offsetHeight,Lt=document.documentElement.scrollTop+window.innerHeight;St-Object(h.a)()<=Lt||tt>=Lt-Me?kt(function(Tt){return Object(Q.a)(Object(Q.a)({},Tt),{},{isHiddenScrollBar:!0})}):kt(function(Tt){return Object(Q.a)(Object(Q.a)({},Tt),{},{isHiddenScrollBar:!1})})},Ct=function(tt){kt(function(St){return Object(Q.a)(Object(Q.a)({},St),{},{scrollLeft:tt/xe*Ee||0})})};return B.useImperativeHandle(ct,function(){return{setScrollLeft:Ct}}),B.useEffect(function(){var bt=Object(oe.a)(document.body,"mouseup",Te,!1),tt=Object(oe.a)(document.body,"mousemove",mt,!1);return lt(),function(){bt.remove(),tt.remove()}},[Oe,it]),B.useEffect(function(){var bt=Object(oe.a)(window,"scroll",lt,!1),tt=Object(oe.a)(window,"resize",lt,!1);return function(){bt.remove(),tt.remove()}},[]),B.useEffect(function(){Ot.isHiddenScrollBar||kt(function(bt){var tt,St;return Object(Q.a)(Object(Q.a)({},bt),{},{scrollLeft:ot.current.scrollLeft/((tt=ot.current)===null||tt===void 0?void 0:tt.scrollWidth)*((St=ot.current)===null||St===void 0?void 0:St.clientWidth)})})},[Ot.isHiddenScrollBar]),xe<=Ee||!Oe||Ot.isHiddenScrollBar?null:B.createElement("div",{style:{height:Object(h.a)(),width:Ee,bottom:Me},className:"".concat(ge,"-sticky-scroll")},B.createElement("div",{onMouseDown:Ne,ref:Fe,className:b()("".concat(ge,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(ge,"-sticky-scroll-bar-active"),it)),style:{width:"".concat(Oe,"px"),transform:"translate3d(".concat(Ot.scrollLeft,"px, 0, 0)")}}))},we=B.forwardRef(de);function Be(He,ke){return B.useMemo(function(){var ct=!!He;return{isSticky:ct,stickyClassName:ct?"".concat(ke,"-sticky-header"):"",offsetHeader:Object(K.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(K.a)(He)==="object"&&He.offsetScroll||0}},[He,ke])}var nt=[],at={},At="rc-table-internal-hook",ft=B.memo(function(He){var ke=He.children;return ke},function(He,ke){return E()(He.props,ke.props)?He.pingLeft!==ke.pingLeft||He.pingRight!==ke.pingRight:!1});function xt(He){var ke,ct=He.prefixCls,gt=He.className,Ze=He.rowClassName,ot=He.style,Ke=He.data,Me=He.rowKey,Ue=He.scroll,ge=He.tableLayout,xe=He.direction,Ee=He.title,Oe=He.footer,Fe=He.summary,$e=He.id,pt=He.showHeader,Ot=He.components,kt=He.emptyText,Dt=He.onRow,Bt=He.onHeaderRow,ht=He.internalHooks,it=He.transformColumns,et=He.internalRefs,Te=He.sticky,Ne=Ke||nt,mt=!!Ne.length,lt=B.useState(0),Ct=Object(M.a)(lt,2),bt=Ct[0],tt=Ct[1];B.useEffect(function(){tt(Object(h.a)())});var St=B.useMemo(function(){return Object(v.c)(Ot,{})},[Ot]),Lt=B.useCallback(function($r,Qr){return Object(v.b)(St,$r)||Qr},[St]),Tt=B.useMemo(function(){return typeof Me=="function"?Me:function($r){var Qr=$r&&$r[Me];return Qr}},[Me]),Ht=Object(n.c)(He),gr=Ht.expandIcon,Or=Ht.expandedRowKeys,vr=Ht.defaultExpandedRowKeys,jt=Ht.defaultExpandAllRows,Mr=Ht.expandedRowRender,br=Ht.onExpand,Tr=Ht.onExpandedRowsChange,Ar=Ht.expandRowByClick,Sr=Ht.rowExpandable,tn=Ht.expandIconColumnIndex,Zr=Ht.expandedRowClassName,me=Ht.childrenColumnName,be=Ht.indentSize,Pe=gr||he,rt=me||"children",qe=B.useMemo(function(){return Mr?"row":He.expandable&&ht===At&&He.expandable.__PARENT_RENDER_ICON__||Ne.some(function($r){return $r&&Object(K.a)($r)==="object"&&$r[rt]})?"nest":!1},[!!Mr,Ne]),Ft=B.useState(function(){return vr||(jt?ie(Ne,Tt,rt):[])}),te=Object(M.a)(Ft,2),P=te[0],j=te[1],q=B.useMemo(function(){return new Set(Or||P||[])},[Or,P]),Ae=B.useCallback(function($r){var Qr=Tt($r,Ne.indexOf($r)),Yr,Ai=q.has(Qr);Ai?(q.delete(Qr),Yr=Object(O.a)(q)):Yr=[].concat(Object(O.a)(q),[Qr]),j(Yr),br&&br(!Ai,$r),Tr&&Tr(Yr)},[Tt,q,Ne,br,Tr]),re=B.useState(0),We=Object(M.a)(re,2),_t=We[0],Pt=We[1],Qt=Object(Ce.b)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},He),Ht),{},{expandable:!!Mr,expandedKeys:q,getRowKey:Tt,onTriggerExpand:Ae,expandIcon:Pe,expandIconColumnIndex:tn,direction:xe}),ht===At?it:null),wt=Object(M.a)(Qt,2),Yt=wt[0],Xt=wt[1],qt=B.useMemo(function(){return{columns:Yt,flattenColumns:Xt}},[Yt,Xt]),cr=B.useRef(),Dr=B.useRef(),wr=B.useRef(),Fr=B.useState(!1),hr=Object(M.a)(Fr,2),Ur=hr[0],Nr=hr[1],cn=B.useState(!1),Gr=Object(M.a)(cn,2),Jr=Gr[0],bn=Gr[1],qr=Se(new Map),rn=Object(M.a)(qr,2),sn=rn[0],hn=rn[1],mn=Object(v.a)(Xt),_r=mn.map(function($r){return sn.get($r)}),dr=B.useMemo(function(){return _r},[_r.join("_")]),tr=Et(dr,Xt.length,xe),nr=Ue&&Object(v.d)(Ue.y),Zt=Ue&&Object(v.d)(Ue.x),Er=Zt&&Xt.some(function($r){var Qr=$r.fixed;return Qr}),mr=B.useRef(),Ir=Be(Te,ct),xr=Ir.isSticky,On=Ir.offsetHeader,zr=Ir.offsetScroll,En=Ir.stickyClassName,Qn,_n,en;nr&&(_n={overflowY:"scroll",maxHeight:Ue.y}),Zt&&(Qn={overflowX:"auto"},nr||(_n={overflowY:"hidden"}),en={width:Ue.x===!0?"auto":Ue.x,minWidth:"100%"});var Ln=B.useCallback(function($r,Qr){hn(function(Yr){var Ai=new Map(Yr);return Ai.set($r,Qr),Ai})},[]),In=Ie(null),Jn=Object(M.a)(In,2),Fn=Jn[0],si=Jn[1];function Un($r,Qr){if(!Qr)return;typeof Qr=="function"?Qr($r):Qr.scrollLeft!==$r&&(Qr.scrollLeft=$r)}var gn=function(Qr){var Yr=Qr.currentTarget,Ai=Qr.scrollLeft,zi=typeof Ai=="number"?Ai:Yr.scrollLeft,Vi=Yr||at;if(!si()||si()===Vi){var Ja;Fn(Vi),Un(zi,Dr.current),Un(zi,wr.current),Un(zi,(Ja=mr.current)===null||Ja===void 0?void 0:Ja.setScrollLeft)}if(Yr){var Ro=Yr.scrollWidth,ds=Yr.clientWidth;Nr(zi>0),bn(zi<Ro-ds)}},Pn=function(){wr.current&&gn({currentTarget:wr.current})},er=function(Qr){var Yr=Qr.width;Pn(),Pt(cr.current?cr.current.offsetWidth:Yr)};B.useEffect(function(){return Pn},[]),B.useEffect(function(){Zt&&Pn()},[Zt]),B.useEffect(function(){ht===At&&et&&(et.body.current=wr.current)});var fr=Lt(["table"],"table"),Jt=B.useMemo(function(){return ge||(Er?Ue.x==="max-content"?"auto":"fixed":nr||Xt.some(function($r){var Qr=$r.ellipsis;return Qr})?"fixed":"auto")},[nr,Er,Xt,ge]),yr,Rr={colWidths:dr,columCount:Xt.length,stickyOffsets:tr,onHeaderRow:Bt,fixHeader:nr},Xr=B.useMemo(function(){return mt?null:typeof kt=="function"?kt():kt},[mt,kt]),Br=B.createElement(ve,{data:Ne,measureColumnWidth:nr||Zt||xr,expandedKeys:q,rowExpandable:Sr,getRowKey:Tt,onRow:Dt,emptyNode:Xr,childrenColumnName:rt}),ln=B.createElement(m,{colWidths:Xt.map(function($r){var Qr=$r.width;return Qr}),columns:Xt}),Dn=Fe&&B.createElement(st.b,null,Fe(Ne)),Pr=Lt(["body"]);if(nr||xr){var li;typeof Pr=="function"?(li=Pr(Ne,{scrollbarSize:bt,ref:wr,onScroll:gn}),Rr.colWidths=Xt.map(function($r,Qr){var Yr=$r.width,Ai=Qr===Yt.length-1?Yr-bt:Yr;return typeof Ai=="number"&&!Number.isNaN(Ai)?Ai:(Object(i.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),_n),onScroll:gn,ref:wr,className:b()("".concat(ct,"-body"))},B.createElement(fr,{style:Object(Q.a)(Object(Q.a)({},en),{},{tableLayout:Jt})},ln,Br,Dn),xr&&B.createElement(we,{ref:mr,offsetScroll:zr,scrollBodyRef:wr,onScroll:gn})),yr=B.createElement(B.Fragment,null,pt!==!1&&B.createElement(g,Object.assign({noData:!Ne.length},Rr,qt,{direction:xe,offsetHeader:On,stickyClassName:En,ref:Dr,onScroll:gn})),li)}else yr=B.createElement("div",{style:Object(Q.a)(Object(Q.a)({},Qn),_n),className:b()("".concat(ct,"-content")),onScroll:gn,ref:wr},B.createElement(fr,{style:Object(Q.a)(Object(Q.a)({},en),{},{tableLayout:Jt})},ln,pt!==!1&&B.createElement(p,Object.assign({},Rr,qt)),Br,Dn));var Hr=Object(n.b)(He),jn=B.createElement("div",Object.assign({className:b()(ct,gt,(ke={},Object(Z.a)(ke,"".concat(ct,"-rtl"),xe==="rtl"),Object(Z.a)(ke,"".concat(ct,"-ping-left"),Ur),Object(Z.a)(ke,"".concat(ct,"-ping-right"),Jr),Object(Z.a)(ke,"".concat(ct,"-layout-fixed"),ge==="fixed"),Object(Z.a)(ke,"".concat(ct,"-fixed-header"),nr),Object(Z.a)(ke,"".concat(ct,"-fixed-column"),Er),Object(Z.a)(ke,"".concat(ct,"-scroll-horizontal"),Zt),Object(Z.a)(ke,"".concat(ct,"-has-fix-left"),Xt[0]&&Xt[0].fixed),Object(Z.a)(ke,"".concat(ct,"-has-fix-right"),Xt[Xt.length-1]&&Xt[Xt.length-1].fixed==="right"),ke)),style:ot,id:$e,ref:cr},Hr),B.createElement(ft,{pingLeft:Ur,pingRight:Jr,props:Object(Q.a)(Object(Q.a)({},He),{},{stickyOffsets:tr,mergedExpandedKeys:q})},Ee&&B.createElement(je,{className:"".concat(ct,"-title")},Ee(Ne)),B.createElement("div",{className:"".concat(ct,"-container")},yr),Oe&&B.createElement(je,{className:"".concat(ct,"-footer")},Oe(Ne))));Zt&&(jn=B.createElement(A.a,{onResize:er},jn));var Kn=B.useMemo(function(){return{prefixCls:ct,getComponent:Lt,scrollbarSize:bt,direction:xe,fixedInfoList:Xt.map(function($r,Qr){return u(Qr,Qr,Xt,tr,xe)}),isSticky:xr}},[ct,Lt,bt,xe,Xt,tr,xe,xr]),ui=B.useMemo(function(){return Object(Q.a)(Object(Q.a)({},qt),{},{tableLayout:Jt,rowClassName:Ze,expandedRowClassName:Zr,componentWidth:_t,fixHeader:nr,fixColumn:Er,horizonScroll:Zt,expandIcon:Pe,expandableType:qe,expandRowByClick:Ar,expandedRowRender:Mr,onTriggerExpand:Ae,expandIconColumnIndex:tn,indentSize:be})},[qt,Jt,Ze,Zr,_t,nr,Er,Zt,Pe,qe,Ar,Mr,Ae,tn,be]),hs=B.useMemo(function(){return{onColumnResize:Ln}},[Ln]);return B.createElement(a.a.Provider,{value:Kn},B.createElement(k.Provider,{value:ui},B.createElement(Y.Provider,{value:hs},jn)))}xt.Column=o.a,xt.ColumnGroup=s.a,xt.Summary=st.a,xt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var It=le.b=xt},wOnQ:function(Xe,le,H){/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/(function(Z,Q){Xe.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 Z=function(W,N){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,z){X.__proto__=z}||function(X,z){for(var ue in z)Object.prototype.hasOwnProperty.call(z,ue)&&(X[ue]=z[ue])},Z(W,N)};function Q(W,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");Z(W,N);function X(){this.constructor=W}W.prototype=N===null?Object.create(N):(X.prototype=N.prototype,new X)}var O=function(){return O=Object.assign||function(N){for(var X,z=1,ue=arguments.length;z<ue;z++){X=arguments[z];for(var pe in X)Object.prototype.hasOwnProperty.call(X,pe)&&(N[pe]=X[pe])}return N},O.apply(this,arguments)};function K(W,N,X,z){function ue(pe){return pe instanceof X?pe:new X(function(Re){Re(pe)})}return new(X||(X=Promise))(function(pe,Re){function ze(yt){try{ut(z.next(yt))}catch(Rt){Re(Rt)}}function Ge(yt){try{ut(z.throw(yt))}catch(Rt){Re(Rt)}}function ut(yt){yt.done?pe(yt.value):ue(yt.value).then(ze,Ge)}ut((z=z.apply(W,N||[])).next())})}function M(W,N){var X={label:0,sent:function(){if(pe[0]&1)throw pe[1];return pe[1]},trys:[],ops:[]},z,ue,pe,Re;return Re={next:ze(0),throw:ze(1),return:ze(2)},typeof Symbol=="function"&&(Re[Symbol.iterator]=function(){return this}),Re;function ze(ut){return function(yt){return Ge([ut,yt])}}function Ge(ut){if(z)throw new TypeError("Generator is already executing.");for(;X;)try{if(z=1,ue&&(pe=ut[0]&2?ue.return:ut[0]?ue.throw||((pe=ue.return)&&pe.call(ue),0):ue.next)&&!(pe=pe.call(ue,ut[1])).done)return pe;(ue=0,pe)&&(ut=[ut[0]&2,pe.value]);switch(ut[0]){case 0:case 1:pe=ut;break;case 4:return X.label++,{value:ut[1],done:!1};case 5:X.label++,ue=ut[1],ut=[0];continue;case 7:ut=X.ops.pop(),X.trys.pop();continue;default:if(!(pe=X.trys,pe=pe.length>0&&pe[pe.length-1])&&(ut[0]===6||ut[0]===2)){X=0;continue}if(ut[0]===3&&(!pe||ut[1]>pe[0]&&ut[1]<pe[3])){X.label=ut[1];break}if(ut[0]===6&&X.label<pe[1]){X.label=pe[1],pe=ut;break}if(pe&&X.label<pe[2]){X.label=pe[2],X.ops.push(ut);break}pe[2]&&X.ops.pop(),X.trys.pop();continue}ut=N.call(W,X)}catch(yt){ut=[6,yt],ue=0}finally{z=pe=0}if(ut[0]&5)throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}}function B(W,N,X){if(X||arguments.length===2)for(var z=0,ue=N.length,pe;z<ue;z++)(pe||!(z in N))&&(pe||(pe=Array.prototype.slice.call(N,0,z)),pe[z]=N[z]);return W.concat(pe||N)}for(var R=function(){function W(N,X,z,ue){this.left=N,this.top=X,this.width=z,this.height=ue}return W.prototype.add=function(N,X,z,ue){return new W(this.left+N,this.top+X,this.width+z,this.height+ue)},W.fromClientRect=function(N,X){return new W(X.left+N.windowBounds.left,X.top+N.windowBounds.top,X.width,X.height)},W.fromDOMRectList=function(N,X){var z=Array.from(X).find(function(ue){return ue.width!==0});return z?new W(z.left+N.windowBounds.left,z.top+N.windowBounds.top,z.width,z.height):W.EMPTY},W.EMPTY=new W(0,0,0,0),W}(),b=function(W,N){return R.fromClientRect(W,N.getBoundingClientRect())},t=function(W){var N=W.body,X=W.documentElement;if(!N||!X)throw new Error("Unable to get document size");var z=Math.max(Math.max(N.scrollWidth,X.scrollWidth),Math.max(N.offsetWidth,X.offsetWidth),Math.max(N.clientWidth,X.clientWidth)),ue=Math.max(Math.max(N.scrollHeight,X.scrollHeight),Math.max(N.offsetHeight,X.offsetHeight),Math.max(N.clientHeight,X.clientHeight));return new R(0,0,z,ue)},E=function(W){for(var N=[],X=0,z=W.length;X<z;){var ue=W.charCodeAt(X++);if(ue>=55296&&ue<=56319&&X<z){var pe=W.charCodeAt(X++);(pe&64512)===56320?N.push(((ue&1023)<<10)+(pe&1023)+65536):(N.push(ue),X--)}else N.push(ue)}return N},i=function(){for(var W=[],N=0;N<arguments.length;N++)W[N]=arguments[N];if(String.fromCodePoint)return String.fromCodePoint.apply(String,W);var X=W.length;if(!X)return"";for(var z=[],ue=-1,pe="";++ue<X;){var Re=W[ue];Re<=65535?z.push(Re):(Re-=65536,z.push((Re>>10)+55296,Re%1024+56320)),(ue+1===X||z.length>16384)&&(pe+=String.fromCharCode.apply(String,z),z.length=0)}return pe},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<A.length;s++)h[A.charCodeAt(s)]=s;for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),l=0;l<o.length;l++)f[o.charCodeAt(l)]=l;for(var c=function(W){var N=W.length*.75,X=W.length,z,ue=0,pe,Re,ze,Ge;W[W.length-1]==="="&&(N--,W[W.length-2]==="="&&N--);var ut=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(N):new Array(N),yt=Array.isArray(ut)?ut:new Uint8Array(ut);for(z=0;z<X;z+=4)pe=f[W.charCodeAt(z)],Re=f[W.charCodeAt(z+1)],ze=f[W.charCodeAt(z+2)],Ge=f[W.charCodeAt(z+3)],yt[ue++]=pe<<2|Re>>4,yt[ue++]=(Re&15)<<4|ze>>2,yt[ue++]=(ze&3)<<6|Ge&63;return ut},a=function(W){for(var N=W.length,X=[],z=0;z<N;z+=2)X.push(W[z+1]<<8|W[z]);return X},u=function(W){for(var N=W.length,X=[],z=0;z<N;z+=4)X.push(W[z+3]<<24|W[z+2]<<16|W[z+1]<<8|W[z]);return X},v=5,T=6+5,x=2,D=T-v,w=65536>>v,p=1<<v,n=p-1,d=1024>>v,m=w+d,C=m,y=2048>>6,g=C+y,U=65536>>T,k=1<<D,I=k-1,V=function(W,N,X){return W.slice?W.slice(N,X):new Uint16Array(Array.prototype.slice.call(W,N,X))},G=function(W,N,X){return W.slice?W.slice(N,X):new Uint32Array(Array.prototype.slice.call(W,N,X))},L=function(W,N){var X=c(W),z=Array.isArray(X)?u(X):new Uint32Array(X),ue=Array.isArray(X)?a(X):new Uint16Array(X),pe=24,Re=V(ue,pe/2,z[4]/2),ze=z[5]===2?V(ue,(pe+z[4])/2):G(z,Math.ceil((pe+z[4])/4));return new $(z[0],z[1],z[2],z[3],Re,ze)},$=function(){function W(N,X,z,ue,pe,Re){this.initialValue=N,this.errorValue=X,this.highStart=z,this.highValueIndex=ue,this.index=pe,this.data=Re}return W.prototype.get=function(N){var X;if(N>=0){if(N<55296||N>56319&&N<=65535)return X=this.index[N>>v],X=(X<<x)+(N&n),this.data[X];if(N<=65535)return X=this.index[w+(N-55296>>v)],X=(X<<x)+(N&n),this.data[X];if(N<this.highStart)return X=g-U+(N>>T),X=this.index[X],X+=N>>v&I,X=this.index[X],X=(X<<x)+(N&n),this.data[X];if(N<=1114111)return this.data[this.highValueIndex]}return this.errorValue},W}(),Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),se=0;se<Y.length;se++)ne[Y.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==",ve=50,Ce=1,De=2,Qe=3,Se=4,Ie=5,Je=7,Et=8,Le=9,je=10,st=11,he=12,ie=13,oe=14,ee=15,de=16,we=17,Be=18,nt=19,at=20,At=21,ft=22,xt=23,It=24,He=25,ke=26,ct=27,gt=28,Ze=29,ot=30,Ke=31,Me=32,Ue=33,ge=34,xe=35,Ee=36,Oe=37,Fe=38,$e=39,pt=40,Ot=41,kt=42,Dt=43,Bt=[9001,65288],ht="!",it="\xD7",et="\xF7",Te=L(_e),Ne=[ot,Ee],mt=[Ce,De,Qe,Ie],lt=[je,Et],Ct=[ct,ke],bt=mt.concat(lt),tt=[Fe,$e,pt,ge,xe],St=[ee,ie],Lt=function(W,N){N===void 0&&(N="strict");var X=[],z=[],ue=[];return W.forEach(function(pe,Re){var ze=Te.get(pe);if(ze>ve?(ue.push(!0),ze-=ve):ue.push(!1),["normal","auto","loose"].indexOf(N)!==-1&&[8208,8211,12316,12448].indexOf(pe)!==-1)return z.push(Re),X.push(de);if(ze===Se||ze===st){if(Re===0)return z.push(Re),X.push(ot);var Ge=X[Re-1];return bt.indexOf(Ge)===-1?(z.push(z[Re-1]),X.push(Ge)):(z.push(Re),X.push(ot))}if(z.push(Re),ze===Ke)return X.push(N==="strict"?At:Oe);if(ze===kt)return X.push(ot);if(ze===Ze)return X.push(ot);if(ze===Dt)return pe>=131072&&pe<=196605||pe>=196608&&pe<=262141?X.push(Oe):X.push(ot);X.push(ze)}),[z,X,ue]},Tt=function(W,N,X,z){var ue=z[X];if(Array.isArray(W)?W.indexOf(ue)!==-1:W===ue)for(var pe=X;pe<=z.length;){pe++;var Re=z[pe];if(Re===N)return!0;if(Re!==je)break}if(ue===je)for(var pe=X;pe>0;){pe--;var ze=z[pe];if(Array.isArray(W)?W.indexOf(ze)!==-1:W===ze)for(var Ge=X;Ge<=z.length;){Ge++;var Re=z[Ge];if(Re===N)return!0;if(Re!==je)break}if(ze!==je)break}return!1},Ht=function(W,N){for(var X=W;X>=0;){var z=N[X];if(z===je)X--;else return z}return 0},gr=function(W,N,X,z,ue){if(X[z]===0)return it;var pe=z-1;if(Array.isArray(ue)&&ue[pe]===!0)return it;var Re=pe-1,ze=pe+1,Ge=N[pe],ut=Re>=0?N[Re]:0,yt=N[ze];if(Ge===De&&yt===Qe)return it;if(mt.indexOf(Ge)!==-1)return ht;if(mt.indexOf(yt)!==-1)return it;if(lt.indexOf(yt)!==-1)return it;if(Ht(pe,N)===Et)return et;if(Te.get(W[pe])===st)return it;if((Ge===Me||Ge===Ue)&&Te.get(W[ze])===st)return it;if(Ge===Je||yt===Je)return it;if(Ge===Le)return it;if([je,ie,ee].indexOf(Ge)===-1&&yt===Le)return it;if([we,Be,nt,It,gt].indexOf(yt)!==-1)return it;if(Ht(pe,N)===ft)return it;if(Tt(xt,ft,pe,N))return it;if(Tt([we,Be],At,pe,N))return it;if(Tt(he,he,pe,N))return it;if(Ge===je)return et;if(Ge===xt||yt===xt)return it;if(yt===de||Ge===de)return et;if([ie,ee,At].indexOf(yt)!==-1||Ge===oe)return it;if(ut===Ee&&St.indexOf(Ge)!==-1)return it;if(Ge===gt&&yt===Ee)return it;if(yt===at)return it;if(Ne.indexOf(yt)!==-1&&Ge===He||Ne.indexOf(Ge)!==-1&&yt===He)return it;if(Ge===ct&&[Oe,Me,Ue].indexOf(yt)!==-1||[Oe,Me,Ue].indexOf(Ge)!==-1&&yt===ke)return it;if(Ne.indexOf(Ge)!==-1&&Ct.indexOf(yt)!==-1||Ct.indexOf(Ge)!==-1&&Ne.indexOf(yt)!==-1)return it;if([ct,ke].indexOf(Ge)!==-1&&(yt===He||[ft,ee].indexOf(yt)!==-1&&N[ze+1]===He)||[ft,ee].indexOf(Ge)!==-1&&yt===He||Ge===He&&[He,gt,It].indexOf(yt)!==-1)return it;if([He,gt,It,we,Be].indexOf(yt)!==-1)for(var Rt=pe;Rt>=0;){var Mt=N[Rt];if(Mt===He)return it;if([gt,It].indexOf(Mt)!==-1)Rt--;else break}if([ct,ke].indexOf(yt)!==-1)for(var Rt=[we,Be].indexOf(Ge)!==-1?Re:pe;Rt>=0;){var Mt=N[Rt];if(Mt===He)return it;if([gt,It].indexOf(Mt)!==-1)Rt--;else break}if(Fe===Ge&&[Fe,$e,ge,xe].indexOf(yt)!==-1||[$e,ge].indexOf(Ge)!==-1&&[$e,pt].indexOf(yt)!==-1||[pt,xe].indexOf(Ge)!==-1&&yt===pt)return it;if(tt.indexOf(Ge)!==-1&&[at,ke].indexOf(yt)!==-1||tt.indexOf(yt)!==-1&&Ge===ct)return it;if(Ne.indexOf(Ge)!==-1&&Ne.indexOf(yt)!==-1)return it;if(Ge===It&&Ne.indexOf(yt)!==-1)return it;if(Ne.concat(He).indexOf(Ge)!==-1&&yt===ft&&Bt.indexOf(W[ze])===-1||Ne.concat(He).indexOf(yt)!==-1&&Ge===Be)return it;if(Ge===Ot&&yt===Ot){for(var sr=X[pe],Wt=1;sr>0&&(sr--,N[sr]===Ot);)Wt++;if(Wt%2!==0)return it}return Ge===Me&&yt===Ue?it:et},Or=function(W,N){N||(N={lineBreak:"normal",wordBreak:"normal"});var X=Lt(W,N.lineBreak),z=X[0],ue=X[1],pe=X[2];(N.wordBreak==="break-all"||N.wordBreak==="break-word")&&(ue=ue.map(function(ze){return[He,ot,kt].indexOf(ze)!==-1?Oe:ze}));var Re=N.wordBreak==="keep-all"?pe.map(function(ze,Ge){return ze&&W[Ge]>=19968&&W[Ge]<=40959}):void 0;return[z,ue,Re]},vr=function(){function W(N,X,z,ue){this.codePoints=N,this.required=X===ht,this.start=z,this.end=ue}return W.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},W}(),jt=function(W,N){var X=E(W),z=Or(X,N),ue=z[0],pe=z[1],Re=z[2],ze=X.length,Ge=0,ut=0;return{next:function(){if(ut>=ze)return{done:!0,value:null};for(var yt=it;ut<ze&&(yt=gr(X,pe,ue,++ut,Re))===it;);if(yt!==it||ut===ze){var Rt=new vr(X,yt,Ge,ut);return Ge=ut,{value:Rt,done:!1}}return{done:!0,value:null}}}},Mr=1<<0,br=1<<1,Tr=1<<2,Ar=1<<3,Sr=10,tn=47,Zr=92,me=9,be=32,Pe=34,rt=61,qe=35,Ft=36,te=37,P=39,j=40,q=41,Ae=95,re=45,We=33,_t=60,Pt=62,Qt=64,wt=91,Yt=93,Xt=61,qt=123,cr=63,Dr=125,wr=124,Fr=126,hr=128,Ur=65533,Nr=42,cn=43,Gr=44,Jr=58,bn=59,qr=46,rn=0,sn=8,hn=11,mn=14,_r=31,dr=127,tr=-1,nr=48,Zt=97,Er=101,mr=102,Ir=117,xr=122,On=65,zr=69,En=70,Qn=85,_n=90,en=function(W){return W>=nr&&W<=57},Ln=function(W){return W>=55296&&W<=57343},In=function(W){return en(W)||W>=On&&W<=En||W>=Zt&&W<=mr},Jn=function(W){return W>=Zt&&W<=xr},Fn=function(W){return W>=On&&W<=_n},si=function(W){return Jn(W)||Fn(W)},Un=function(W){return W>=hr},gn=function(W){return W===Sr||W===me||W===be},Pn=function(W){return si(W)||Un(W)||W===Ae},er=function(W){return Pn(W)||en(W)||W===re},fr=function(W){return W>=rn&&W<=sn||W===hn||W>=mn&&W<=_r||W===dr},Jt=function(W,N){return W!==Zr?!1:N!==Sr},yr=function(W,N,X){return W===re?Pn(N)||Jt(N,X):Pn(W)?!0:!!(W===Zr&&Jt(W,N))},Rr=function(W,N,X){return W===cn||W===re?en(N)?!0:N===qr&&en(X):W===qr?en(N):en(W)},Xr=function(W){var N=0,X=1;(W[N]===cn||W[N]===re)&&(W[N]===re&&(X=-1),N++);for(var z=[];en(W[N]);)z.push(W[N++]);var ue=z.length?parseInt(i.apply(void 0,z),10):0;W[N]===qr&&N++;for(var pe=[];en(W[N]);)pe.push(W[N++]);var Re=pe.length,ze=Re?parseInt(i.apply(void 0,pe),10):0;(W[N]===zr||W[N]===Er)&&N++;var Ge=1;(W[N]===cn||W[N]===re)&&(W[N]===re&&(Ge=-1),N++);for(var ut=[];en(W[N]);)ut.push(W[N++]);var yt=ut.length?parseInt(i.apply(void 0,ut),10):0;return X*(ue+ze*Math.pow(10,-Re))*Math.pow(10,Ge*yt)},Br={type:2},ln={type:3},Dn={type:4},Pr={type:13},li={type:8},Hr={type:21},jn={type:9},Kn={type:10},ui={type:11},hs={type:12},$r={type:14},Qr={type:23},Yr={type:1},Ai={type:25},zi={type:24},Vi={type:26},Ja={type:27},Ro={type:28},ds={type:29},fs={type:31},Lo={type:32},nl=function(){function W(){this._value=[]}return W.prototype.write=function(N){this._value=this._value.concat(E(N))},W.prototype.read=function(){for(var N=[],X=this.consumeToken();X!==Lo;)N.push(X),X=this.consumeToken();return N},W.prototype.consumeToken=function(){var N=this.consumeCodePoint();switch(N){case Pe:return this.consumeStringToken(Pe);case qe:var X=this.peekCodePoint(0),z=this.peekCodePoint(1),ue=this.peekCodePoint(2);if(er(X)||Jt(z,ue)){var pe=yr(X,z,ue)?br:Mr,Re=this.consumeName();return{type:5,value:Re,flags:pe}}break;case Ft:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),Pr;break;case P:return this.consumeStringToken(P);case j:return Br;case q:return ln;case Nr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),$r;break;case cn:if(Rr(N,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(N),this.consumeNumericToken();break;case Gr:return Dn;case re:var ze=N,Ge=this.peekCodePoint(0),ut=this.peekCodePoint(1);if(Rr(ze,Ge,ut))return this.reconsumeCodePoint(N),this.consumeNumericToken();if(yr(ze,Ge,ut))return this.reconsumeCodePoint(N),this.consumeIdentLikeToken();if(Ge===re&&ut===Pt)return this.consumeCodePoint(),this.consumeCodePoint(),zi;break;case qr:if(Rr(N,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(N),this.consumeNumericToken();break;case tn:if(this.peekCodePoint(0)===Nr)for(this.consumeCodePoint();;){var yt=this.consumeCodePoint();if(yt===Nr&&(yt=this.consumeCodePoint(),yt===tn))return this.consumeToken();if(yt===tr)return this.consumeToken()}break;case Jr:return Vi;case bn:return Ja;case _t:if(this.peekCodePoint(0)===We&&this.peekCodePoint(1)===re&&this.peekCodePoint(2)===re)return this.consumeCodePoint(),this.consumeCodePoint(),Ai;break;case Qt:var Rt=this.peekCodePoint(0),Mt=this.peekCodePoint(1),sr=this.peekCodePoint(2);if(yr(Rt,Mt,sr)){var Re=this.consumeName();return{type:7,value:Re}}break;case wt:return Ro;case Zr:if(Jt(N,this.peekCodePoint(0)))return this.reconsumeCodePoint(N),this.consumeIdentLikeToken();break;case Yt:return ds;case Xt:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),li;break;case qt:return ui;case Dr:return hs;case Ir:case Qn:var Wt=this.peekCodePoint(0),rr=this.peekCodePoint(1);return Wt===cn&&(In(rr)||rr===cr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(N),this.consumeIdentLikeToken();case wr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),jn;if(this.peekCodePoint(0)===wr)return this.consumeCodePoint(),Hr;break;case Fr:if(this.peekCodePoint(0)===rt)return this.consumeCodePoint(),Kn;break;case tr:return Lo}return gn(N)?(this.consumeWhiteSpace(),fs):en(N)?(this.reconsumeCodePoint(N),this.consumeNumericToken()):Pn(N)?(this.reconsumeCodePoint(N),this.consumeIdentLikeToken()):{type:6,value:i(N)}},W.prototype.consumeCodePoint=function(){var N=this._value.shift();return typeof N=="undefined"?-1:N},W.prototype.reconsumeCodePoint=function(N){this._value.unshift(N)},W.prototype.peekCodePoint=function(N){return N>=this._value.length?-1:this._value[N]},W.prototype.consumeUnicodeRangeToken=function(){for(var N=[],X=this.consumeCodePoint();In(X)&&N.length<6;)N.push(X),X=this.consumeCodePoint();for(var z=!1;X===cr&&N.length<6;)N.push(X),X=this.consumeCodePoint(),z=!0;if(z){var ue=parseInt(i.apply(void 0,N.map(function(Ge){return Ge===cr?nr:Ge})),16),pe=parseInt(i.apply(void 0,N.map(function(Ge){return Ge===cr?En:Ge})),16);return{type:30,start:ue,end:pe}}var Re=parseInt(i.apply(void 0,N),16);if(this.peekCodePoint(0)===re&&In(this.peekCodePoint(1))){this.consumeCodePoint(),X=this.consumeCodePoint();for(var ze=[];In(X)&&ze.length<6;)ze.push(X),X=this.consumeCodePoint();var pe=parseInt(i.apply(void 0,ze),16);return{type:30,start:Re,end:pe}}else return{type:30,start:Re,end:Re}},W.prototype.consumeIdentLikeToken=function(){var N=this.consumeName();return N.toLowerCase()==="url"&&this.peekCodePoint(0)===j?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===j?(this.consumeCodePoint(),{type:19,value:N}):{type:20,value:N}},W.prototype.consumeUrlToken=function(){var N=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===tr)return{type:22,value:""};var X=this.peekCodePoint(0);if(X===P||X===Pe){var z=this.consumeStringToken(this.consumeCodePoint());return z.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===tr||this.peekCodePoint(0)===q)?(this.consumeCodePoint(),{type:22,value:z.value}):(this.consumeBadUrlRemnants(),Qr)}for(;;){var ue=this.consumeCodePoint();if(ue===tr||ue===q)return{type:22,value:i.apply(void 0,N)};if(gn(ue))return this.consumeWhiteSpace(),this.peekCodePoint(0)===tr||this.peekCodePoint(0)===q?(this.consumeCodePoint(),{type:22,value:i.apply(void 0,N)}):(this.consumeBadUrlRemnants(),Qr);if(ue===Pe||ue===P||ue===j||fr(ue))return this.consumeBadUrlRemnants(),Qr;if(ue===Zr)if(Jt(ue,this.peekCodePoint(0)))N.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Qr;else N.push(ue)}},W.prototype.consumeWhiteSpace=function(){for(;gn(this.peekCodePoint(0));)this.consumeCodePoint()},W.prototype.consumeBadUrlRemnants=function(){for(;;){var N=this.consumeCodePoint();if(N===q||N===tr)return;Jt(N,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},W.prototype.consumeStringSlice=function(N){for(var X=5e4,z="";N>0;){var ue=Math.min(X,N);z+=i.apply(void 0,this._value.splice(0,ue)),N-=ue}return this._value.shift(),z},W.prototype.consumeStringToken=function(N){var X="",z=0;do{var ue=this._value[z];if(ue===tr||ue===void 0||ue===N)return X+=this.consumeStringSlice(z),{type:0,value:X};if(ue===Sr)return this._value.splice(0,z),Yr;if(ue===Zr){var pe=this._value[z+1];pe!==tr&&pe!==void 0&&(pe===Sr?(X+=this.consumeStringSlice(z),z=-1,this._value.shift()):Jt(ue,pe)&&(X+=this.consumeStringSlice(z),X+=i(this.consumeEscapedCodePoint()),z=-1))}z++}while(!0)},W.prototype.consumeNumber=function(){var N=[],X=Tr,z=this.peekCodePoint(0);for((z===cn||z===re)&&N.push(this.consumeCodePoint());en(this.peekCodePoint(0));)N.push(this.consumeCodePoint());z=this.peekCodePoint(0);var ue=this.peekCodePoint(1);if(z===qr&&en(ue))for(N.push(this.consumeCodePoint(),this.consumeCodePoint()),X=Ar;en(this.peekCodePoint(0));)N.push(this.consumeCodePoint());z=this.peekCodePoint(0),ue=this.peekCodePoint(1);var pe=this.peekCodePoint(2);if((z===zr||z===Er)&&((ue===cn||ue===re)&&en(pe)||en(ue)))for(N.push(this.consumeCodePoint(),this.consumeCodePoint()),X=Ar;en(this.peekCodePoint(0));)N.push(this.consumeCodePoint());return[Xr(N),X]},W.prototype.consumeNumericToken=function(){var N=this.consumeNumber(),X=N[0],z=N[1],ue=this.peekCodePoint(0),pe=this.peekCodePoint(1),Re=this.peekCodePoint(2);if(yr(ue,pe,Re)){var ze=this.consumeName();return{type:15,number:X,flags:z,unit:ze}}return ue===te?(this.consumeCodePoint(),{type:16,number:X,flags:z}):{type:17,number:X,flags:z}},W.prototype.consumeEscapedCodePoint=function(){var N=this.consumeCodePoint();if(In(N)){for(var X=i(N);In(this.peekCodePoint(0))&&X.length<6;)X+=i(this.consumeCodePoint());gn(this.peekCodePoint(0))&&this.consumeCodePoint();var z=parseInt(X,16);return z===0||Ln(z)||z>1114111?Ur:z}return N===tr?Ur:N},W.prototype.consumeName=function(){for(var N="";;){var X=this.consumeCodePoint();if(er(X))N+=i(X);else if(Jt(X,this.peekCodePoint(0)))N+=i(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(X),N}},W}(),il=function(){function W(N){this._tokens=N}return W.create=function(N){var X=new nl;return X.write(N),new W(X.read())},W.parseValue=function(N){return W.create(N).parseComponentValue()},W.parseValues=function(N){return W.create(N).parseComponentValues()},W.prototype.parseComponentValue=function(){for(var N=this.consumeToken();N.type===31;)N=this.consumeToken();if(N.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(N);var X=this.consumeComponentValue();do N=this.consumeToken();while(N.type===31);if(N.type===32)return X;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},W.prototype.parseComponentValues=function(){for(var N=[];;){var X=this.consumeComponentValue();if(X.type===32)return N;N.push(X),N.push()}},W.prototype.consumeComponentValue=function(){var N=this.consumeToken();switch(N.type){case 11:case 28:case 2:return this.consumeSimpleBlock(N.type);case 19:return this.consumeFunction(N)}return N},W.prototype.consumeSimpleBlock=function(N){for(var X={type:N,values:[]},z=this.consumeToken();;){if(z.type===32||Ii(z,N))return X;this.reconsumeToken(z),X.values.push(this.consumeComponentValue()),z=this.consumeToken()}},W.prototype.consumeFunction=function(N){for(var X={name:N.value,values:[],type:18};;){var z=this.consumeToken();if(z.type===32||z.type===3)return X;this.reconsumeToken(z),X.values.push(this.consumeComponentValue())}},W.prototype.consumeToken=function(){var N=this._tokens.shift();return typeof N=="undefined"?Lo:N},W.prototype.reconsumeToken=function(N){this._tokens.unshift(N)},W}(),Ba=function(W){return W.type===15},ua=function(W){return W.type===17},vn=function(W){return W.type===20},$a=function(W){return W.type===0},xi=function(W,N){return vn(W)&&W.value===N},Za=function(W){return W.type!==31},Xi=function(W){return W.type!==31&&W.type!==4},Ci=function(W){var N=[],X=[];return W.forEach(function(z){if(z.type===4){if(X.length===0)throw new Error("Error parsing function args, zero tokens for arg");N.push(X),X=[];return}z.type!==31&&X.push(z)}),X.length&&N.push(X),N},Ii=function(W,N){return N===11&&W.type===12||N===28&&W.type===29?!0:N===2&&W.type===3},ci=function(W){return W.type===17||W.type===15},Rn=function(W){return W.type===16||ci(W)},al=function(W){return W.length>1?[W[0],W[1]]:[W[0]]},Xn={type:17,number:0,flags:Tr},ps={type:16,number:50,flags:Tr},Ui={type:16,number:100,flags:Tr},Aa=function(W,N,X){var z=W[0],ue=W[1];return[on(z,N),on(typeof ue!="undefined"?ue:z,X)]},on=function(W,N){if(W.type===16)return W.number/100*N;if(Ba(W))switch(W.unit){case"rem":case"em":return 16*W.number;case"px":default:return W.number}return W.number},Ti="deg",ms="grad",gs="rad",ol="turn",Do={name:"angle",parse:function(W,N){if(N.type===15)switch(N.unit){case Ti:return Math.PI*N.number/180;case ms:return Math.PI/200*N.number;case gs:return N.number;case ol:return Math.PI*2*N.number}throw new Error("Unsupported angle type")}},sl=function(W){return W.type===15&&(W.unit===Ti||W.unit===ms||W.unit===gs||W.unit===ol)},vs=function(W){var N=W.filter(vn).map(function(X){return X.value}).join(" ");switch(N){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(W){return Math.PI*W/180},bi={name:"color",parse:function(W,N){if(N.type===18){var X=ll[N.name];if(typeof X=="undefined")throw new Error('Attempting to parse an unsupported color function "'+N.name+'"');return X(W,N.values)}if(N.type===5){if(N.value.length===3){var z=N.value.substring(0,1),ue=N.value.substring(1,2),pe=N.value.substring(2,3);return Ri(parseInt(z+z,16),parseInt(ue+ue,16),parseInt(pe+pe,16),1)}if(N.value.length===4){var z=N.value.substring(0,1),ue=N.value.substring(1,2),pe=N.value.substring(2,3),Re=N.value.substring(3,4);return Ri(parseInt(z+z,16),parseInt(ue+ue,16),parseInt(pe+pe,16),parseInt(Re+Re,16)/255)}if(N.value.length===6){var z=N.value.substring(0,2),ue=N.value.substring(2,4),pe=N.value.substring(4,6);return Ri(parseInt(z,16),parseInt(ue,16),parseInt(pe,16),1)}if(N.value.length===8){var z=N.value.substring(0,2),ue=N.value.substring(2,4),pe=N.value.substring(4,6),Re=N.value.substring(6,8);return Ri(parseInt(z,16),parseInt(ue,16),parseInt(pe,16),parseInt(Re,16)/255)}}if(N.type===20){var ze=Si[N.value.toUpperCase()];if(typeof ze!="undefined")return ze}return Si.TRANSPARENT}},Pi=function(W){return(255&W)===0},Wn=function(W){var N=255&W,X=255&W>>8,z=255&W>>16,ue=255&W>>24;return N<255?"rgba("+ue+","+z+","+X+","+N/255+")":"rgb("+ue+","+z+","+X+")"},Ri=function(W,N,X,z){return(W<<24|N<<16|X<<8|Math.round(z*255)<<0)>>>0},qa=function(W,N){if(W.type===17)return W.number;if(W.type===16){var X=N===3?1:255;return N===3?W.number/100*X:Math.round(W.number/100*X)}return 0},ys=function(W,N){var X=N.filter(Xi);if(X.length===3){var z=X.map(qa),ue=z[0],pe=z[1],Re=z[2];return Ri(ue,pe,Re,1)}if(X.length===4){var ze=X.map(qa),ue=ze[0],pe=ze[1],Re=ze[2],Ge=ze[3];return Ri(ue,pe,Re,Ge)}return 0};function eo(W,N,X){return X<0&&(X+=1),X>=1&&(X-=1),X<1/6?(N-W)*X*6+W:X<1/2?N:X<2/3?(N-W)*6*(2/3-X)+W:W}var Ei=function(W,N){var X=N.filter(Xi),z=X[0],ue=X[1],pe=X[2],Re=X[3],ze=(z.type===17?fi(z.number):Do.parse(W,z))/(Math.PI*2),Ge=Rn(ue)?ue.number/100:0,ut=Rn(pe)?pe.number/100:0,yt=typeof Re!="undefined"&&Rn(Re)?on(Re,1):1;if(Ge===0)return Ri(ut*255,ut*255,ut*255,1);var Rt=ut<=.5?ut*(Ge+1):ut+Ge-ut*Ge,Mt=ut*2-Rt,sr=eo(Mt,Rt,ze+1/3),Wt=eo(Mt,Rt,ze),rr=eo(Mt,Rt,ze-1/3);return Ri(sr*255,Wt*255,rr*255,yt)},ll={hsl:Ei,hsla:Ei,rgb:ys,rgba:ys},ca=function(W,N){return bi.parse(W,il.create(N).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(W,N){return N.map(function(X){if(vn(X))switch(X.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(W,N){var X=bi.parse(W,N[0]),z=N[1];return z&&Rn(z)?{color:X,stop:z}:{color:X,stop:null}},cl=function(W,N){var X=W[0],z=W[W.length-1];X.stop===null&&(X.stop=Xn),z.stop===null&&(z.stop=Ui);for(var ue=[],pe=0,Re=0;Re<W.length;Re++){var ze=W[Re].stop;if(ze!==null){var Ge=on(ze,N);Ge>pe?ue.push(Ge):ue.push(pe),pe=Ge}else ue.push(null)}for(var ut=null,Re=0;Re<ue.length;Re++){var yt=ue[Re];if(yt===null)ut===null&&(ut=Re);else if(ut!==null){for(var Rt=Re-ut,Mt=ue[ut-1],sr=(yt-Mt)/(Rt+1),Wt=1;Wt<=Rt;Wt++)ue[ut+Wt-1]=sr*Wt;ut=null}}return W.map(function(rr,Lr){var or=rr.color;return{color:or,stop:Math.max(Math.min(1,ue[Lr]/N),0)}})},vu=function(W,N,X){var z=N/2,ue=X/2,pe=on(W[0],N)-z,Re=ue-on(W[1],X);return(Math.atan2(Re,pe)+Math.PI*2)%(Math.PI*2)},yu=function(W,N,X){var z=typeof W=="number"?W:vu(W,N,X),ue=Math.abs(N*Math.sin(z))+Math.abs(X*Math.cos(z)),pe=N/2,Re=X/2,ze=ue/2,Ge=Math.sin(z-Math.PI/2)*ze,ut=Math.cos(z-Math.PI/2)*ze;return[ue,pe-ut,pe+ut,Re-Ge,Re+Ge]},$n=function(W,N){return Math.sqrt(W*W+N*N)},ha=function(W,N,X,z,ue){var pe=[[0,0],[0,N],[W,0],[W,N]];return pe.reduce(function(Re,ze){var Ge=ze[0],ut=ze[1],yt=$n(X-Ge,z-ut);return(ue?yt<Re.optimumDistance:yt>Re.optimumDistance)?{optimumCorner:ze,optimumDistance:yt}:Re},{optimumDistance:ue?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Ia=function(W,N,X,z,ue){var pe=0,Re=0;switch(W.size){case 0:W.shape===0?pe=Re=Math.min(Math.abs(N),Math.abs(N-z),Math.abs(X),Math.abs(X-ue)):W.shape===1&&(pe=Math.min(Math.abs(N),Math.abs(N-z)),Re=Math.min(Math.abs(X),Math.abs(X-ue)));break;case 2:if(W.shape===0)pe=Re=Math.min($n(N,X),$n(N,X-ue),$n(N-z,X),$n(N-z,X-ue));else if(W.shape===1){var ze=Math.min(Math.abs(X),Math.abs(X-ue))/Math.min(Math.abs(N),Math.abs(N-z)),Ge=ha(z,ue,N,X,!0),ut=Ge[0],yt=Ge[1];pe=$n(ut-N,(yt-X)/ze),Re=ze*pe}break;case 1:W.shape===0?pe=Re=Math.max(Math.abs(N),Math.abs(N-z),Math.abs(X),Math.abs(X-ue)):W.shape===1&&(pe=Math.max(Math.abs(N),Math.abs(N-z)),Re=Math.max(Math.abs(X),Math.abs(X-ue)));break;case 3:if(W.shape===0)pe=Re=Math.max($n(N,X),$n(N,X-ue),$n(N-z,X),$n(N-z,X-ue));else if(W.shape===1){var ze=Math.max(Math.abs(X),Math.abs(X-ue))/Math.max(Math.abs(N),Math.abs(N-z)),Rt=ha(z,ue,N,X,!1),ut=Rt[0],yt=Rt[1];pe=$n(ut-N,(yt-X)/ze),Re=ze*pe}break}return Array.isArray(W.size)&&(pe=on(W.size[0],z),Re=W.size.length===2?on(W.size[1],ue):pe),[pe,Re]},bs=function(W,N){var X=fi(180),z=[];return Ci(N).forEach(function(ue,pe){if(pe===0){var Re=ue[0];if(Re.type===20&&Re.value==="to"){X=vs(ue);return}else if(sl(Re)){X=Do.parse(W,Re);return}}var ze=Oa(W,ue);z.push(ze)}),{angle:X,stops:z,type:1}},Ra=function(W,N){var X=fi(180),z=[];return Ci(N).forEach(function(ue,pe){if(pe===0){var Re=ue[0];if(Re.type===20&&["top","left","right","bottom"].indexOf(Re.value)!==-1){X=vs(ue);return}else if(sl(Re)){X=(Do.parse(W,Re)+fi(270))%fi(360);return}}var ze=Oa(W,ue);z.push(ze)}),{angle:X,stops:z,type:1}},hl=function(W,N){var X=fi(180),z=[],ue=1,pe=0,Re=3,ze=[];return Ci(N).forEach(function(Ge,ut){var yt=Ge[0];if(ut===0){if(vn(yt)&&yt.value==="linear"){ue=1;return}else if(vn(yt)&&yt.value==="radial"){ue=2;return}}if(yt.type===18){if(yt.name==="from"){var Rt=bi.parse(W,yt.values[0]);z.push({stop:Xn,color:Rt})}else if(yt.name==="to"){var Rt=bi.parse(W,yt.values[0]);z.push({stop:Ui,color:Rt})}else if(yt.name==="color-stop"){var Mt=yt.values.filter(Xi);if(Mt.length===2){var Rt=bi.parse(W,Mt[1]),sr=Mt[0];ua(sr)&&z.push({stop:{type:16,number:sr.number*100,flags:sr.flags},color:Rt})}}}}),ue===1?{angle:(X+fi(180))%fi(360),stops:z,type:ue}:{size:Re,shape:pe,stops:z,position:ze,type:ue}},Mo="closest-side",Yi="farthest-side",Ji="closest-corner",ti="farthest-corner",ki="circle",Ni="ellipse",to="cover",dl="contain",fl=function(W,N){var X=0,z=3,ue=[],pe=[];return Ci(N).forEach(function(Re,ze){var Ge=!0;if(ze===0){var ut=!1;Ge=Re.reduce(function(Rt,Mt){if(ut)if(vn(Mt))switch(Mt.value){case"center":return pe.push(ps),Rt;case"top":case"left":return pe.push(Xn),Rt;case"right":case"bottom":return pe.push(Ui),Rt}else(Rn(Mt)||ci(Mt))&&pe.push(Mt);else if(vn(Mt))switch(Mt.value){case ki:return X=0,!1;case Ni:return X=1,!1;case"at":return ut=!0,!1;case Mo:return z=0,!1;case to:case Yi:return z=1,!1;case dl:case Ji:return z=2,!1;case ti:return z=3,!1}else if(ci(Mt)||Rn(Mt))return Array.isArray(z)||(z=[]),z.push(Mt),!1;return Rt},Ge)}if(Ge){var yt=Oa(W,Re);ue.push(yt)}}),{size:z,shape:X,stops:ue,position:pe,type:2}},$i=function(W,N){var X=0,z=3,ue=[],pe=[];return Ci(N).forEach(function(Re,ze){var Ge=!0;if(ze===0?Ge=Re.reduce(function(yt,Rt){if(vn(Rt))switch(Rt.value){case"center":return pe.push(ps),!1;case"top":case"left":return pe.push(Xn),!1;case"right":case"bottom":return pe.push(Ui),!1}else if(Rn(Rt)||ci(Rt))return pe.push(Rt),!1;return yt},Ge):ze===1&&(Ge=Re.reduce(function(yt,Rt){if(vn(Rt))switch(Rt.value){case ki:return X=0,!1;case Ni:return X=1,!1;case dl:case Mo:return z=0,!1;case Yi:return z=1,!1;case Ji:return z=2,!1;case to:case ti:return z=3,!1}else if(ci(Rt)||Rn(Rt))return Array.isArray(z)||(z=[]),z.push(Rt),!1;return yt},Ge)),Ge){var ut=Oa(W,Re);ue.push(ut)}}),{size:z,shape:X,stops:ue,position:pe,type:2}},pl=function(W){return W.type===1},ml=function(W){return W.type===2},La={name:"image",parse:function(W,N){if(N.type===22){var X={url:N.value,type:0};return W.cache.addImage(N.value),X}if(N.type===18){var z=Fo[N.name];if(typeof z=="undefined")throw new Error('Attempting to parse an unsupported image function "'+N.name+'"');return z(W,N.values)}throw new Error("Unsupported image type "+N.type)}};function bu(W){return!(W.type===20&&W.value==="none")&&(W.type!==18||!!Fo[W.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":$i,"-ms-radial-gradient":$i,"-o-radial-gradient":$i,"-webkit-radial-gradient":$i,"-webkit-gradient":hl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(W,N){if(N.length===0)return[];var X=N[0];return X.type===20&&X.value==="none"?[]:N.filter(function(z){return Xi(z)&&bu(z)}).map(function(z){return La.parse(W,z)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(W,N){return N.map(function(X){if(vn(X))switch(X.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(W,N){return Ci(N).map(function(X){return X.filter(Rn)}).map(al)}},Da={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(W,N){return Ci(N).map(function(X){return X.filter(vn).map(function(z){return z.value}).join(" ")}).map(Uo)}},Uo=function(W){switch(W){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}},da;(function(W){W.AUTO="auto",W.CONTAIN="contain",W.COVER="cover"})(da||(da={}));var Po={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(W,N){return Ci(N).map(function(X){return X.filter(Eu)})}},Eu=function(W){return vn(W)||Rn(W)},ko=function(W){return{name:"border-"+W+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},wu=ko("top"),ws=ko("right"),_s=ko("bottom"),Ma=ko("left"),Zi=function(W){return{name:"border-radius-"+W,initialValue:"0 0",prefix:!1,type:1,parse:function(N,X){return al(X.filter(Rn))}}},_u=Zi("top-left"),No=Zi("top-right"),yl=Zi("bottom-right"),ro=Zi("bottom-left"),no=function(W){return{name:"border-"+W+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(N,X){switch(X){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(W){return{name:"border-"+W+"-width",initialValue:"0",type:0,prefix:!1,parse:function(N,X){return Ba(X)?X.number:0}}},bl=Hi("top"),El=Hi("right"),wl=Hi("bottom"),xu=Hi("left"),ma={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ga={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(W,N){switch(N){case"rtl":return 1;case"ltr":default:return 0}}},Cu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(W,N){return N.filter(vn).reduce(function(X,z){return X|Tu(z.value)},0)}},Tu=function(W){switch(W){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(W,N){switch(N){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(W,N){return N.type===20&&N.value==="normal"?0:N.type===17||N.type===15?N.number:0}},Ho;(function(W){W.NORMAL="normal",W.STRICT="strict"})(Ho||(Ho={}));var Ou={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(W,N){switch(N){case"strict":return Ho.STRICT;case"normal":default:return Ho.NORMAL}}},hi={name:"line-height",initialValue:"normal",prefix:!1,type:4},kn=function(W,N){return vn(W)&&W.value==="normal"?1.2*N:W.type===17?N*W.number:Rn(W)?on(W,N):N},ri={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(W,N){return N.type===20&&N.value==="none"?null:La.parse(W,N)}},Gn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(W,N){switch(N){case"inside":return 0;case"outside":default:return 1}}},va={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(W,N){switch(N){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(W){return{name:"margin-"+W,initialValue:"0",prefix:!1,type:4}},jo=Qo("top"),Iu=Qo("right"),Ru=Qo("bottom"),Lu=Qo("left"),xs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(W,N){return N.filter(vn).map(function(X){switch(X.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},_l={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(W,N){switch(N){case"break-word":return"break-word";case"normal":default:return"normal"}}},Fa=function(W){return{name:"padding-"+W,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Du=Fa("top"),Cs=Fa("right"),Ts=Fa("bottom"),xl=Fa("left"),Cl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(W,N){switch(N){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(W,N){switch(N){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(W,N){return N.length===1&&xi(N[0],"none")?[]:Ci(N).map(function(X){for(var z={color:Si.TRANSPARENT,offsetX:Xn,offsetY:Xn,blur:Xn},ue=0,pe=0;pe<X.length;pe++){var Re=X[pe];ci(Re)?(ue===0?z.offsetX=Re:ue===1?z.offsetY=Re:z.blur=Re,ue++):z.color=bi.parse(W,Re)}return z})}},oo={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(W,N){switch(N){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(W,N){if(N.type===20&&N.value==="none")return null;if(N.type===18){var X=Sl[N.name];if(typeof X=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+N.name+'"');return X(N.values)}return null}},Ko=function(W){var N=W.filter(function(X){return X.type===17}).map(function(X){return X.number});return N.length===6?N:null},pi=function(W){var N=W.filter(function(Ge){return Ge.type===17}).map(function(Ge){return Ge.number}),X=N[0],z=N[1];N[2],N[3];var ue=N[4],pe=N[5];N[6],N[7],N[8],N[9],N[10],N[11];var Re=N[12],ze=N[13];return N[14],N[15],N.length===16?[X,z,ue,pe,Re,ze]:null},Sl={matrix:Ko,matrix3d:pi},Bl={type:16,number:50,flags:Tr},Ol=[Bl,Bl],mi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(W,N){var X=N.filter(Rn);return X.length!==2?Ol:[X[0],X[1]]}},nn={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(W,N){switch(N){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},oi;(function(W){W.NORMAL="normal",W.BREAK_ALL="break-all",W.KEEP_ALL="keep-all"})(oi||(oi={}));for(var qi={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(W,N){switch(N){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(W,N){if(N.type===20)return{auto:!0,order:0};if(ua(N))return{auto:!1,order:N.number};throw new Error("Invalid z-index number parsed")}},Bs={name:"time",parse:function(W,N){if(N.type===15)switch(N.unit.toLowerCase()){case"s":return 1e3*N.number;case"ms":return N.number}throw new Error("Unsupported time type")}},Os={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(W,N){return ua(N)?N.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(W,N){return N.filter(vn).map(function(X){switch(X.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(X){return X!==0})}},Is={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(W,N){var X=[],z=[];return N.forEach(function(ue){switch(ue.type){case 20:case 0:X.push(ue.value);break;case 17:X.push(ue.number.toString());break;case 4:z.push(X.join(" ")),X.length=0;break}}),X.length&&z.push(X.join(" ")),z.map(function(ue){return ue.indexOf(" ")===-1?ue:"'"+ue+"'"})}},so={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Rl={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(W,N){if(ua(N))return N.number;if(vn(N))switch(N.value){case"bold":return 700;case"normal":default:return 400}return 400}},Rs={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(W,N){return N.filter(vn).map(function(X){return X.value})}},ta={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(W,N){switch(N){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Nn=function(W,N){return(W&N)!==0},Ll={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(W,N){if(N.length===0)return[];var X=N[0];return X.type===20&&X.value==="none"?[]:N}},Uu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(W,N){if(N.length===0)return null;var X=N[0];if(X.type===20&&X.value==="none")return null;for(var z=[],ue=N.filter(Za),pe=0;pe<ue.length;pe++){var Re=ue[pe],ze=ue[pe+1];if(Re.type===20){var Ge=ze&&ua(ze)?ze.number:1;z.push({counter:Re.value,increment:Ge})}}return z}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(W,N){if(N.length===0)return[];for(var X=[],z=N.filter(Za),ue=0;ue<z.length;ue++){var pe=z[ue],Re=z[ue+1];if(vn(pe)&&pe.value!=="none"){var ze=Re&&ua(Re)?Re.number:0;X.push({counter:pe.value,reset:ze})}}return X}},Ls={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(W,N){return N.filter(Ba).map(function(X){return Bs.parse(W,X)})}},Dl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(W,N){if(N.length===0)return null;var X=N[0];if(X.type===20&&X.value==="none")return null;var z=[],ue=N.filter($a);if(ue.length%2!==0)return null;for(var pe=0;pe<ue.length;pe+=2){var Re=ue[pe].value,ze=ue[pe+1].value;z.push({open:Re,close:ze})}return z}},Ml=function(W,N,X){if(!W)return"";var z=W[Math.min(N,W.length-1)];return z?X?z.open:z.close:""},Fl={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(W,N){return N.length===1&&xi(N[0],"none")?[]:Ci(N).map(function(X){for(var z={color:255,offsetX:Xn,offsetY:Xn,blur:Xn,spread:Xn,inset:!1},ue=0,pe=0;pe<X.length;pe++){var Re=X[pe];xi(Re,"inset")?z.inset=!0:ci(Re)?(ue===0?z.offsetX=Re:ue===1?z.offsetY=Re:ue===2?z.blur=Re:z.spread=Re,ue++):z.color=bi.parse(W,Re)}return z})}},Pu={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(W,N){var X=[0,1,2],z=[];return N.filter(vn).forEach(function(ue){switch(ue.value){case"stroke":z.push(1);break;case"fill":z.push(0);break;case"markers":z.push(2);break}}),X.forEach(function(ue){z.indexOf(ue)===-1&&z.push(ue)}),z}},ku={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Go={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(W,N){return Ba(N)?N.number:0}},Ul=function(){function W(N,X){var z,ue;this.animationDuration=ar(N,Ls,X.animationDuration),this.backgroundClip=ar(N,ul,X.backgroundClip),this.backgroundColor=ar(N,Al,X.backgroundColor),this.backgroundImage=ar(N,gl,X.backgroundImage),this.backgroundOrigin=ar(N,vl,X.backgroundOrigin),this.backgroundPosition=ar(N,Es,X.backgroundPosition),this.backgroundRepeat=ar(N,Da,X.backgroundRepeat),this.backgroundSize=ar(N,Po,X.backgroundSize),this.borderTopColor=ar(N,wu,X.borderTopColor),this.borderRightColor=ar(N,ws,X.borderRightColor),this.borderBottomColor=ar(N,_s,X.borderBottomColor),this.borderLeftColor=ar(N,Ma,X.borderLeftColor),this.borderTopLeftRadius=ar(N,_u,X.borderTopLeftRadius),this.borderTopRightRadius=ar(N,No,X.borderTopRightRadius),this.borderBottomRightRadius=ar(N,yl,X.borderBottomRightRadius),this.borderBottomLeftRadius=ar(N,ro,X.borderBottomLeftRadius),this.borderTopStyle=ar(N,fa,X.borderTopStyle),this.borderRightStyle=ar(N,io,X.borderRightStyle),this.borderBottomStyle=ar(N,pa,X.borderBottomStyle),this.borderLeftStyle=ar(N,ao,X.borderLeftStyle),this.borderTopWidth=ar(N,bl,X.borderTopWidth),this.borderRightWidth=ar(N,El,X.borderRightWidth),this.borderBottomWidth=ar(N,wl,X.borderBottomWidth),this.borderLeftWidth=ar(N,xu,X.borderLeftWidth),this.boxShadow=ar(N,Fl,X.boxShadow),this.color=ar(N,ma,X.color),this.direction=ar(N,ga,X.direction),this.display=ar(N,Cu,X.display),this.float=ar(N,Su,X.cssFloat),this.fontFamily=ar(N,Is,X.fontFamily),this.fontSize=ar(N,so,X.fontSize),this.fontStyle=ar(N,ta,X.fontStyle),this.fontVariant=ar(N,Rs,X.fontVariant),this.fontWeight=ar(N,Rl,X.fontWeight),this.letterSpacing=ar(N,Bu,X.letterSpacing),this.lineBreak=ar(N,Ou,X.lineBreak),this.lineHeight=ar(N,hi,X.lineHeight),this.listStyleImage=ar(N,ri,X.listStyleImage),this.listStylePosition=ar(N,Gn,X.listStylePosition),this.listStyleType=ar(N,va,X.listStyleType),this.marginTop=ar(N,jo,X.marginTop),this.marginRight=ar(N,Iu,X.marginRight),this.marginBottom=ar(N,Ru,X.marginBottom),this.marginLeft=ar(N,Lu,X.marginLeft),this.opacity=ar(N,Os,X.opacity);var pe=ar(N,xs,X.overflow);this.overflowX=pe[0],this.overflowY=pe[pe.length>1?1:0],this.overflowWrap=ar(N,_l,X.overflowWrap),this.paddingTop=ar(N,Du,X.paddingTop),this.paddingRight=ar(N,Cs,X.paddingRight),this.paddingBottom=ar(N,Ts,X.paddingBottom),this.paddingLeft=ar(N,xl,X.paddingLeft),this.paintOrder=ar(N,Pu,X.paintOrder),this.position=ar(N,Ss,X.position),this.textAlign=ar(N,Cl,X.textAlign),this.textDecorationColor=ar(N,Il,(z=X.textDecorationColor)!==null&&z!==void 0?z:X.color),this.textDecorationLine=ar(N,Fu,(ue=X.textDecorationLine)!==null&&ue!==void 0?ue:X.textDecoration),this.textShadow=ar(N,Tl,X.textShadow),this.textTransform=ar(N,oo,X.textTransform),this.transform=ar(N,Mu,X.transform),this.transformOrigin=ar(N,mi,X.transformOrigin),this.visibility=ar(N,nn,X.visibility),this.webkitTextStrokeColor=ar(N,ku,X.webkitTextStrokeColor),this.webkitTextStrokeWidth=ar(N,Go,X.webkitTextStrokeWidth),this.wordBreak=ar(N,qi,X.wordBreak),this.zIndex=ar(N,ea,X.zIndex)}return W.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},W.prototype.isTransparent=function(){return Pi(this.backgroundColor)},W.prototype.isTransformed=function(){return this.transform!==null},W.prototype.isPositioned=function(){return this.position!==0},W.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},W.prototype.isFloating=function(){return this.float!==0},W.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)},W}(),Nu=function(){function W(N,X){this.content=ar(N,Ll,X.content),this.quotes=ar(N,Dl,X.quotes)}return W}(),Pl=function(){function W(N,X){this.counterIncrement=ar(N,Uu,X.counterIncrement),this.counterReset=ar(N,Wo,X.counterReset)}return W}(),ar=function(W,N,X){var z=new nl,ue=X!==null&&typeof X!="undefined"?X.toString():N.initialValue;z.write(ue);var pe=new il(z.read());switch(N.type){case 2:var Re=pe.parseComponentValue();return N.parse(W,vn(Re)?Re.value:N.initialValue);case 0:return N.parse(W,pe.parseComponentValue());case 1:return N.parse(W,pe.parseComponentValues());case 4:return pe.parseComponentValue();case 3:switch(N.format){case"angle":return Do.parse(W,pe.parseComponentValue());case"color":return bi.parse(W,pe.parseComponentValue());case"image":return La.parse(W,pe.parseComponentValue());case"length":var ze=pe.parseComponentValue();return ci(ze)?ze:Xn;case"length-percentage":var Ge=pe.parseComponentValue();return Rn(Ge)?Ge:Xn;case"time":return Bs.parse(W,pe.parseComponentValue())}break}},Ua="data-html2canvas-debug",Ds=function(W){var N=W.getAttribute(Ua);switch(N){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Pa=function(W,N){var X=Ds(W);return X===1||N===X},Bi=function(){function W(N,X){if(this.context=N,this.textNodes=[],this.elements=[],this.flags=0,Pa(X,3))debugger;this.styles=new Ul(N,window.getComputedStyle(X,null)),as(X)&&(this.styles.animationDuration.some(function(z){return z>0})&&(X.style.animationDuration="0s"),this.styles.transform!==null&&(X.style.transform="none")),this.bounds=b(this.context,X),Pa(X,4)&&(this.flags|=16)}return W}(),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 Zn=function(W){var N=W.length*.75,X=W.length,z,ue=0,pe,Re,ze,Ge;W[W.length-1]==="="&&(N--,W[W.length-2]==="="&&N--);var ut=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(N):new Array(N),yt=Array.isArray(ut)?ut:new Uint8Array(ut);for(z=0;z<X;z+=4)pe=lo[W.charCodeAt(z)],Re=lo[W.charCodeAt(z+1)],ze=lo[W.charCodeAt(z+2)],Ge=lo[W.charCodeAt(z+3)],yt[ue++]=pe<<2|Re>>4,yt[ue++]=(Re&15)<<4|ze>>2,yt[ue++]=(ze&3)<<6|Ge&63;return ut},zo=function(W){for(var N=W.length,X=[],z=0;z<N;z+=2)X.push(W[z+1]<<8|W[z]);return X},kl=function(W){for(var N=W.length,X=[],z=0;z<N;z+=4)X.push(W[z+3]<<24|W[z+2]<<16|W[z+1]<<8|W[z]);return X},ra=5,Vo=6+5,na=2,Xo=Vo-ra,Us=65536>>ra,Nl=1<<ra,Yo=Nl-1,ka=1024>>ra,Hl=Us+ka,Jo=Hl,Ql=2048>>6,Ao=Jo+Ql,Hu=65536>>Vo,Na=1<<Xo,jl=Na-1,Ps=function(W,N,X){return W.slice?W.slice(N,X):new Uint16Array(Array.prototype.slice.call(W,N,X))},Kl=function(W,N,X){return W.slice?W.slice(N,X):new Uint32Array(Array.prototype.slice.call(W,N,X))},co=function(W,N){var X=Zn(W),z=Array.isArray(X)?kl(X):new Uint32Array(X),ue=Array.isArray(X)?zo(X):new Uint16Array(X),pe=24,Re=Ps(ue,pe/2,z[4]/2),ze=z[5]===2?Ps(ue,(pe+z[4])/2):Kl(z,Math.ceil((pe+z[4])/4));return new ho(z[0],z[1],z[2],z[3],Re,ze)},ho=function(){function W(N,X,z,ue,pe,Re){this.initialValue=N,this.errorValue=X,this.highStart=z,this.highValueIndex=ue,this.index=pe,this.data=Re}return W.prototype.get=function(N){var X;if(N>=0){if(N<55296||N>56319&&N<=65535)return X=this.index[N>>ra],X=(X<<na)+(N&Yo),this.data[X];if(N<=65535)return X=this.index[Us+(N-55296>>ra)],X=(X<<na)+(N&Yo),this.data[X];if(N<this.highStart)return X=Ao-Hu+(N>>Vo),X=this.index[X],X+=N>>ra&jl,X=this.index[X],X=(X<<na)+(N&Yo),this.data[X];if(N<=1114111)return this.data[this.highValueIndex]}return this.errorValue},W}(),Ha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),po=0;po<Ha.length;po++)fo[Ha.charCodeAt(po)]=po;var Qu=1,$o=2,Li=3,ya=4,Qa=5,ju=7,ks=8,Ns=9,Hs=10,Wl=11,ni=12,Qs=13,Gl=14,js=15,Ku=function(W){for(var N=[],X=0,z=W.length;X<z;){var ue=W.charCodeAt(X++);if(ue>=55296&&ue<=56319&&X<z){var pe=W.charCodeAt(X++);(pe&64512)===56320?N.push(((ue&1023)<<10)+(pe&1023)+65536):(N.push(ue),X--)}else N.push(ue)}return N},zl=function(){for(var W=[],N=0;N<arguments.length;N++)W[N]=arguments[N];if(String.fromCodePoint)return String.fromCodePoint.apply(String,W);var X=W.length;if(!X)return"";for(var z=[],ue=-1,pe="";++ue<X;){var Re=W[ue];Re<=65535?z.push(Re):(Re-=65536,z.push((Re>>10)+55296,Re%1024+56320)),(ue+1===X||z.length>16384)&&(pe+=String.fromCharCode.apply(String,z),z.length=0)}return pe},Vl=co(Ms),gi="\xD7",Ks="\xF7",Wu=function(W){return Vl.get(W)},Gu=function(W,N,X){var z=X-2,ue=N[z],pe=N[X-1],Re=N[X];if(pe===$o&&Re===Li)return gi;if(pe===$o||pe===Li||pe===ya)return Ks;if(Re===$o||Re===Li||Re===ya)return Ks;if(pe===ks&&[ks,Ns,Wl,ni].indexOf(Re)!==-1)return gi;if((pe===Wl||pe===Ns)&&(Re===Ns||Re===Hs))return gi;if((pe===ni||pe===Hs)&&Re===Hs)return gi;if(Re===Qs||Re===Qa)return gi;if(Re===ju)return gi;if(pe===Qu)return gi;if(pe===Qs&&Re===Gl){for(;ue===Qa;)ue=N[--z];if(ue===Gl)return gi}if(pe===js&&Re===js){for(var ze=0;ue===js;)ze++,ue=N[--z];if(ze%2===0)return gi}return Ks},ia=function(W){var N=Ku(W),X=N.length,z=0,ue=0,pe=N.map(Wu);return{next:function(){if(z>=X)return{done:!0,value:null};for(var Re=gi;z<X&&(Re=Gu(N,pe,++z))===gi;);if(Re!==gi||z===X){var ze=zl.apply(null,N.slice(ue,z));return ue=z,{value:ze,done:!1}}return{done:!0,value:null}}}},mo=function(W){for(var N=ia(W),X=[],z;!(z=N.next()).done;)z.value&&X.push(z.value.slice());return X},Zo=function(W){var N=123;if(W.createRange){var X=W.createRange();if(X.getBoundingClientRect){var z=W.createElement("boundtest");z.style.height=N+"px",z.style.display="block",W.body.appendChild(z),X.selectNode(z);var ue=X.getBoundingClientRect(),pe=Math.round(ue.height);if(W.body.removeChild(z),pe===N)return!0}}return!1},go=function(W){var N=W.createElement("boundtest");N.style.width="50px",N.style.display="block",N.style.fontSize="12px",N.style.letterSpacing="0px",N.style.wordSpacing="0px",W.body.appendChild(N);var X=W.createRange();N.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var z=N.firstChild,ue=E(z.data).map(function(Ge){return i(Ge)}),pe=0,Re={},ze=ue.every(function(Ge,ut){X.setStart(z,pe),X.setEnd(z,pe+Ge.length);var yt=X.getBoundingClientRect();pe+=Ge.length;var Rt=yt.x>Re.x||yt.y>Re.y;return Re=yt,ut===0?!0:Rt});return W.body.removeChild(N),ze},Qi=function(){return typeof new Image().crossOrigin!="undefined"},zu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(W){var N=new Image,X=W.createElement("canvas"),z=X.getContext("2d");if(!z)return!1;N.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{z.drawImage(N,0,0),X.toDataURL()}catch(ue){return!1}return!0},ba=function(W){return W[0]===0&&W[1]===255&&W[2]===0&&W[3]===255},Xl=function(W){var N=W.createElement("canvas"),X=100;N.width=X,N.height=X;var z=N.getContext("2d");if(!z)return Promise.reject(!1);z.fillStyle="rgb(0, 255, 0)",z.fillRect(0,0,X,X);var ue=new Image,pe=N.toDataURL();ue.src=pe;var Re=qo(X,X,0,0,ue);return z.fillStyle="red",z.fillRect(0,0,X,X),Ws(Re).then(function(ze){z.drawImage(ze,0,0);var Ge=z.getImageData(0,0,X,X).data;z.fillStyle="red",z.fillRect(0,0,X,X);var ut=W.createElement("div");return ut.style.backgroundImage="url("+pe+")",ut.style.height=X+"px",ba(Ge)?Ws(qo(X,X,0,0,ut)):Promise.reject(!1)}).then(function(ze){return z.drawImage(ze,0,0),ba(z.getImageData(0,0,X,X).data)}).catch(function(){return!1})},qo=function(W,N,X,z,ue){var pe="http://www.w3.org/2000/svg",Re=document.createElementNS(pe,"svg"),ze=document.createElementNS(pe,"foreignObject");return Re.setAttributeNS(null,"width",W.toString()),Re.setAttributeNS(null,"height",N.toString()),ze.setAttributeNS(null,"width","100%"),ze.setAttributeNS(null,"height","100%"),ze.setAttributeNS(null,"x",X.toString()),ze.setAttributeNS(null,"y",z.toString()),ze.setAttributeNS(null,"externalResourcesRequired","true"),Re.appendChild(ze),ze.appendChild(ue),Re},Ws=function(W){return new Promise(function(N,X){var z=new Image;z.onload=function(){return N(z)},z.onerror=X,z.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(W))})},Hn={get SUPPORT_RANGE_BOUNDS(){var W=Zo(document);return Object.defineProperty(Hn,"SUPPORT_RANGE_BOUNDS",{value:W}),W},get SUPPORT_WORD_BREAKING(){var W=Hn.SUPPORT_RANGE_BOUNDS&&go(document);return Object.defineProperty(Hn,"SUPPORT_WORD_BREAKING",{value:W}),W},get SUPPORT_SVG_DRAWING(){var W=Vu(document);return Object.defineProperty(Hn,"SUPPORT_SVG_DRAWING",{value:W}),W},get SUPPORT_FOREIGNOBJECT_DRAWING(){var W=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(Hn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:W}),W},get SUPPORT_CORS_IMAGES(){var W=Qi();return Object.defineProperty(Hn,"SUPPORT_CORS_IMAGES",{value:W}),W},get SUPPORT_RESPONSE_TYPE(){var W=zu();return Object.defineProperty(Hn,"SUPPORT_RESPONSE_TYPE",{value:W}),W},get SUPPORT_CORS_XHR(){var W="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Hn,"SUPPORT_CORS_XHR",{value:W}),W},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var W=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Hn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:W}),W}},Di=function(){function W(N,X){this.text=N,this.bounds=X}return W}(),Gs=function(W,N,X,z){var ue=Yl(N,X),pe=[],Re=0;return ue.forEach(function(ze){if(X.textDecorationLine.length||ze.trim().length>0)if(Hn.SUPPORT_RANGE_BOUNDS){var Ge=es(z,Re,ze.length).getClientRects();if(Ge.length>1){var ut=Vs(ze),yt=0;ut.forEach(function(Mt){pe.push(new Di(Mt,R.fromDOMRectList(W,es(z,yt+Re,Mt.length).getClientRects()))),yt+=Mt.length})}else pe.push(new Di(ze,R.fromDOMRectList(W,Ge)))}else{var Rt=z.splitText(ze.length);pe.push(new Di(ze,zs(W,z))),z=Rt}else Hn.SUPPORT_RANGE_BOUNDS||(z=z.splitText(ze.length));Re+=ze.length}),pe},zs=function(W,N){var X=N.ownerDocument;if(X){var z=X.createElement("html2canvaswrapper");z.appendChild(N.cloneNode(!0));var ue=N.parentNode;if(ue){ue.replaceChild(z,N);var pe=b(W,z);return z.firstChild&&ue.replaceChild(z.firstChild,z),pe}}return R.EMPTY},es=function(W,N,X){var z=W.ownerDocument;if(!z)throw new Error("Node has no owner document");var ue=z.createRange();return ue.setStart(W,N),ue.setEnd(W,N+X),ue},Vs=function(W){if(Hn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var N=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(N.segment(W)).map(function(X){return X.segment})}return mo(W)},vo=function(W,N){if(Hn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var X=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(X.segment(W)).map(function(z){return z.segment})}return Jl(W,N)},Yl=function(W,N){return N.letterSpacing!==0?Vs(W):vo(W,N)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(W,N){for(var X=jt(W,{lineBreak:N.lineBreak,wordBreak:N.overflowWrap==="break-word"?"break-word":N.wordBreak}),z=[],ue,pe=function(){if(ue.value){var Re=ue.value.slice(),ze=E(Re),Ge="";ze.forEach(function(ut){Xu.indexOf(ut)===-1?Ge+=i(ut):(Ge.length&&z.push(Ge),z.push(i(ut)),Ge="")}),Ge.length&&z.push(Ge)}};!(ue=X.next()).done;)pe();return z},ts=function(){function W(N,X,z){this.text=Yu(X.data,z.textTransform),this.textBounds=Gs(N,this.text,z,X)}return W}(),Yu=function(W,N){switch(N){case 1:return W.toLowerCase();case 3:return W.replace(Ju,yo);case 2:return W.toUpperCase();default:return W}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,yo=function(W,N,X){return W.length>0?N+X.toUpperCase():W},Xs=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.src=z.currentSrc||z.src,ue.intrinsicWidth=z.naturalWidth,ue.intrinsicHeight=z.naturalHeight,ue.context.cache.addImage(ue.src),ue}return N}(Bi),Ys=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.canvas=z,ue.intrinsicWidth=z.width,ue.intrinsicHeight=z.height,ue}return N}(Bi),$l=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this,pe=new XMLSerializer,Re=b(X,z);return z.setAttribute("width",Re.width+"px"),z.setAttribute("height",Re.height+"px"),ue.svg="data:image/svg+xml,"+encodeURIComponent(pe.serializeToString(z)),ue.intrinsicWidth=z.width.baseVal.value,ue.intrinsicHeight=z.height.baseVal.value,ue.context.cache.addImage(ue.svg),ue}return N}(Bi),rs=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.value=z.value,ue}return N}(Bi),ns=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.start=z.start,ue.reversed=typeof z.reversed=="boolean"&&z.reversed===!0,ue}return N}(Bi),$u=[{type:15,flags:0,unit:"px",number:3}],Zl=[{type:16,flags:0,number:50}],ql=function(W){return W.width>W.height?new R(W.left+(W.width-W.height)/2,W.top,W.height,W.height):W.width<W.height?new R(W.left,W.top+(W.height-W.width)/2,W.width,W.width):W},Zu=function(W){var N=W.type===bo?new Array(W.value.length+1).join("\u2022"):W.value;return N.length===0?W.placeholder||"":N},ja="checkbox",aa="radio",bo="password",eu=707406591,is=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;ue.type=z.type.toLowerCase(),ue.checked=z.checked,ue.value=Zu(z),(ue.type===ja||ue.type===aa)&&(ue.styles.backgroundColor=3739148031,ue.styles.borderTopColor=ue.styles.borderRightColor=ue.styles.borderBottomColor=ue.styles.borderLeftColor=2779096575,ue.styles.borderTopWidth=ue.styles.borderRightWidth=ue.styles.borderBottomWidth=ue.styles.borderLeftWidth=1,ue.styles.borderTopStyle=ue.styles.borderRightStyle=ue.styles.borderBottomStyle=ue.styles.borderLeftStyle=1,ue.styles.backgroundClip=[0],ue.styles.backgroundOrigin=[0],ue.bounds=ql(ue.bounds));switch(ue.type){case ja:ue.styles.borderTopRightRadius=ue.styles.borderTopLeftRadius=ue.styles.borderBottomRightRadius=ue.styles.borderBottomLeftRadius=$u;break;case aa:ue.styles.borderTopRightRadius=ue.styles.borderTopLeftRadius=ue.styles.borderBottomRightRadius=ue.styles.borderBottomLeftRadius=Zl;break}return ue}return N}(Bi),tu=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this,pe=z.options[z.selectedIndex||0];return ue.value=pe&&pe.text||"",ue}return N}(Bi),ru=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.value=z.value,ue}return N}(Bi),nu=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;ue.src=z.src,ue.width=parseInt(z.width,10)||0,ue.height=parseInt(z.height,10)||0,ue.backgroundColor=ue.styles.backgroundColor;try{if(z.contentWindow&&z.contentWindow.document&&z.contentWindow.document.documentElement){ue.tree=au(X,z.contentWindow.document.documentElement);var pe=z.contentWindow.document.documentElement?ca(X,getComputedStyle(z.contentWindow.document.documentElement).backgroundColor):Si.TRANSPARENT,Re=z.contentWindow.document.body?ca(X,getComputedStyle(z.contentWindow.document.body).backgroundColor):Si.TRANSPARENT;ue.backgroundColor=Pi(pe)?Pi(Re)?ue.styles.backgroundColor:Re:pe}}catch(ze){}return ue}return N}(Bi),qu=["OL","UL","MENU"],Eo=function(W,N,X,z){for(var ue=N.firstChild,pe=void 0;ue;ue=pe)if(pe=ue.nextSibling,$s(ue)&&ue.data.trim().length>0)X.textNodes.push(new ts(W,ue,X.styles));else if(Ka(ue))if(qs(ue)&&ue.assignedNodes)ue.assignedNodes().forEach(function(ze){return Eo(W,ze,X,z)});else{var Re=iu(W,ue);Re.styles.isVisible()&&(ou(ue,Re,z)?Re.flags|=4:Js(Re.styles)&&(Re.flags|=2),qu.indexOf(ue.tagName)!==-1&&(Re.flags|=8),X.elements.push(Re),ue.slot,ue.shadowRoot?Eo(W,ue.shadowRoot,Re,z):!_o(ue)&&!lu(ue)&&!xo(ue)&&Eo(W,ue,Re,z))}},iu=function(W,N){return Ea(N)?new Xs(W,N):uu(N)?new Ys(W,N):lu(N)?new $l(W,N):su(N)?new rs(W,N):os(N)?new ns(W,N):eA(N)?new is(W,N):xo(N)?new tu(W,N):_o(N)?new ru(W,N):wi(N)?new nu(W,N):new Bi(W,N)},au=function(W,N){var X=iu(W,N);return X.flags|=4,Eo(W,N,X,X),X},ou=function(W,N,X){return N.styles.isPositionedWithZIndex()||N.styles.opacity<1||N.styles.isTransformed()||wn(W)&&X.styles.isTransparent()},Js=function(W){return W.isPositioned()||W.isFloating()},$s=function(W){return W.nodeType===Node.TEXT_NODE},Ka=function(W){return W.nodeType===Node.ELEMENT_NODE},as=function(W){return Ka(W)&&typeof W.style!="undefined"&&!ji(W)},ji=function(W){return typeof W.className=="object"},su=function(W){return W.tagName==="LI"},os=function(W){return W.tagName==="OL"},eA=function(W){return W.tagName==="INPUT"},tA=function(W){return W.tagName==="HTML"},lu=function(W){return W.tagName==="svg"},wn=function(W){return W.tagName==="BODY"},uu=function(W){return W.tagName==="CANVAS"},ss=function(W){return W.tagName==="VIDEO"},Ea=function(W){return W.tagName==="IMG"},wi=function(W){return W.tagName==="IFRAME"},wo=function(W){return W.tagName==="STYLE"},Zs=function(W){return W.tagName==="SCRIPT"},_o=function(W){return W.tagName==="TEXTAREA"},xo=function(W){return W.tagName==="SELECT"},qs=function(W){return W.tagName==="SLOT"},el=function(W){return W.tagName.indexOf("-")>0},Au=function(){function W(){this.counters={}}return W.prototype.getCounterValue=function(N){var X=this.counters[N];return X&&X.length?X[X.length-1]:1},W.prototype.getCounterValues=function(N){var X=this.counters[N];return X||[]},W.prototype.pop=function(N){var X=this;N.forEach(function(z){return X.counters[z].pop()})},W.prototype.parse=function(N){var X=this,z=N.counterIncrement,ue=N.counterReset,pe=!0;z!==null&&z.forEach(function(ze){var Ge=X.counters[ze.counter];Ge&&ze.increment!==0&&(pe=!1,Ge.length||Ge.push(1),Ge[Math.max(0,Ge.length-1)]+=ze.increment)});var Re=[];return pe&&ue.forEach(function(ze){var Ge=X.counters[ze.counter];Re.push(ze.counter),Ge||(Ge=X.counters[ze.counter]=[]),Ge.push(ze.reset)}),Re},W}(),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"]},hu={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"]},un={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"]},wa=function(W,N,X,z,ue,pe){return W<N||W>X?S(W,ue,pe.length>0):z.integers.reduce(function(Re,ze,Ge){for(;W>=ze;)W-=ze,Re+=z.values[Ge];return Re},"")+pe},du=function(W,N,X,z){var ue="";do X||W--,ue=z(W)+ue,W/=N;while(W*N>=N);return ue},xn=function(W,N,X,z,ue){var pe=X-N+1;return(W<0?"-":"")+(du(Math.abs(W),pe,z,function(Re){return i(Math.floor(Re%pe)+N)})+ue)},_a=function(W,N,X){X===void 0&&(X=". ");var z=N.length;return du(Math.abs(W),z,!1,function(ue){return N[Math.floor(ue%z)]})+X},Ki=1<<0,oa=1<<1,dn=1<<2,Co=1<<3,Wi=function(W,N,X,z,ue,pe){if(W<-9999||W>9999)return S(W,4,ue.length>0);var Re=Math.abs(W),ze=ue;if(Re===0)return N[0]+ze;for(var Ge=0;Re>0&&Ge<=4;Ge++){var ut=Re%10;ut===0&&Nn(pe,Ki)&&ze!==""?ze=N[ut]+ze:ut>1||ut===1&&Ge===0||ut===1&&Ge===1&&Nn(pe,oa)||ut===1&&Ge===1&&Nn(pe,dn)&&W>100||ut===1&&Ge>1&&Nn(pe,Co)?ze=N[ut]+(Ge>0?X[Ge-1]:"")+ze:ut===1&&Ge>0&&(ze=X[Ge-1]+ze),Re=Math.floor(Re/10)}return(W<0?z:"")+ze},fu="\u5341\u767E\u5343\u842C",To="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",r="\uB9C8\uC774\uB108\uC2A4",S=function(W,N,X){var z=X?". ":"",ue=X?"\u3001":"",pe=X?", ":"",Re=X?" ":"";switch(N){case 0:return"\u2022"+Re;case 1:return"\u25E6"+Re;case 2:return"\u25FE"+Re;case 5:var ze=xn(W,48,57,!0,z);return ze.length<4?"0"+ze:ze;case 4:return _a(W,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ue);case 6:return wa(W,1,3999,cu,3,z).toLowerCase();case 7:return wa(W,1,3999,cu,3,z);case 8:return xn(W,945,969,!1,z);case 9:return xn(W,97,122,!1,z);case 10:return xn(W,65,90,!1,z);case 11:return xn(W,1632,1641,!0,z);case 12:case 49:return wa(W,1,9999,ls,3,z);case 35:return wa(W,1,9999,ls,3,z).toLowerCase();case 13:return xn(W,2534,2543,!0,z);case 14:case 30:return xn(W,6112,6121,!0,z);case 15:return _a(W,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",ue);case 16:return _a(W,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",ue);case 17:case 48:return Wi(W,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",ue,oa|dn|Co);case 47:return Wi(W,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",To,"\u8CA0",ue,Ki|oa|dn|Co);case 42:return Wi(W,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",ue,oa|dn|Co);case 41:return Wi(W,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",To,"\u8D1F",ue,Ki|oa|dn|Co);case 26:return Wi(W,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,ue,0);case 25:return Wi(W,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,ue,Ki|oa|dn);case 31:return Wi(W,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",r,pe,Ki|oa|dn);case 33:return Wi(W,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",r,pe,0);case 32:return Wi(W,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",r,pe,Ki|oa|dn);case 18:return xn(W,2406,2415,!0,z);case 20:return wa(W,1,19999,un,3,z);case 21:return xn(W,2790,2799,!0,z);case 22:return xn(W,2662,2671,!0,z);case 22:return wa(W,1,10999,hu,3,z);case 23:return _a(W,"\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 _a(W,"\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 xn(W,3302,3311,!0,z);case 28:return _a(W,"\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",ue);case 29:return _a(W,"\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",ue);case 34:return xn(W,3792,3801,!0,z);case 37:return xn(W,6160,6169,!0,z);case 38:return xn(W,4160,4169,!0,z);case 39:return xn(W,2918,2927,!0,z);case 40:return xn(W,1776,1785,!0,z);case 43:return xn(W,3046,3055,!0,z);case 44:return xn(W,3174,3183,!0,z);case 45:return xn(W,3664,3673,!0,z);case 46:return xn(W,3872,3881,!0,z);case 3:default:return xn(W,48,57,!0,z)}},_="data-html2canvas-ignore",F=function(){function W(N,X,z){if(this.context=N,this.options=z,this.scrolledElements=[],this.referenceElement=X,this.counters=new Au,this.quoteDepth=0,!X.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(X.ownerDocument.documentElement,!1)}return W.prototype.toIFrame=function(N,X){var z=this,ue=ae(N,X);if(!ue.contentWindow)return Promise.reject("Unable to find iframe window");var pe=N.defaultView.pageXOffset,Re=N.defaultView.pageYOffset,ze=ue.contentWindow,Ge=ze.document,ut=ye(ue).then(function(){return K(z,void 0,void 0,function(){var yt,Rt;return M(this,function(Mt){switch(Mt.label){case 0:return this.scrolledElements.forEach(Ut),ze&&(ze.scrollTo(X.left,X.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(ze.scrollY!==X.top||ze.scrollX!==X.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(ze.scrollX-X.left,ze.scrollY-X.top,0,0))),yt=this.options.onclone,Rt=this.clonedReferenceElement,typeof Rt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ge.fonts&&Ge.fonts.ready?[4,Ge.fonts.ready]:[3,2];case 1:Mt.sent(),Mt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,fe(Ge)]:[3,4];case 3:Mt.sent(),Mt.label=4;case 4:return typeof yt=="function"?[2,Promise.resolve().then(function(){return yt(Ge,Rt)}).then(function(){return ue})]:[2,ue]}})})});return Ge.open(),Ge.write(vt(document.doctype)+"<html></html>"),dt(this.referenceElement.ownerDocument,pe,Re),Ge.replaceChild(Ge.adoptNode(this.documentElement),Ge.documentElement),Ge.close(),ut},W.prototype.createElementClone=function(N){if(Pa(N,2))debugger;if(uu(N))return this.createCanvasClone(N);if(ss(N))return this.createVideoClone(N);if(wo(N))return this.createStyleClone(N);var X=N.cloneNode(!1);return Ea(X)&&(Ea(N)&&N.currentSrc&&N.currentSrc!==N.src&&(X.src=N.currentSrc,X.srcset=""),X.loading==="lazy"&&(X.loading="eager")),el(X)?this.createCustomElementClone(X):X},W.prototype.createCustomElementClone=function(N){var X=document.createElement("html2canvascustomelement");return Ye(N.style,X),X},W.prototype.createStyleClone=function(N){try{var X=N.sheet;if(X&&X.cssRules){var z=[].slice.call(X.cssRules,0).reduce(function(pe,Re){return Re&&typeof Re.cssText=="string"?pe+Re.cssText:pe},""),ue=N.cloneNode(!1);return ue.textContent=z,ue}}catch(pe){if(this.context.logger.error("Unable to access cssRules property",pe),pe.name!=="SecurityError")throw pe}return N.cloneNode(!1)},W.prototype.createCanvasClone=function(N){var X;if(this.options.inlineImages&&N.ownerDocument){var z=N.ownerDocument.createElement("img");try{return z.src=N.toDataURL(),z}catch(ut){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",N)}}var ue=N.cloneNode(!1);try{ue.width=N.width,ue.height=N.height;var pe=N.getContext("2d"),Re=ue.getContext("2d");if(Re)if(!this.options.allowTaint&&pe)Re.putImageData(pe.getImageData(0,0,N.width,N.height),0,0);else{var ze=(X=N.getContext("webgl2"))!==null&&X!==void 0?X:N.getContext("webgl");if(ze){var Ge=ze.getContextAttributes();(Ge==null?void 0:Ge.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",N)}Re.drawImage(N,0,0)}return ue}catch(ut){this.context.logger.info("Unable to clone canvas as it is tainted",N)}return ue},W.prototype.createVideoClone=function(N){var X=N.ownerDocument.createElement("canvas");X.width=N.offsetWidth,X.height=N.offsetHeight;var z=X.getContext("2d");try{return z&&(z.drawImage(N,0,0,X.width,X.height),this.options.allowTaint||z.getImageData(0,0,X.width,X.height)),X}catch(pe){this.context.logger.info("Unable to clone video as it is tainted",N)}var ue=N.ownerDocument.createElement("canvas");return ue.width=N.offsetWidth,ue.height=N.offsetHeight,ue},W.prototype.appendChildNode=function(N,X,z){(!Ka(X)||!Zs(X)&&!X.hasAttribute(_)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(X)))&&((!this.options.copyStyles||!Ka(X)||!wo(X))&&N.appendChild(this.cloneNode(X,z)))},W.prototype.cloneChildNodes=function(N,X,z){for(var ue=this,pe=N.shadowRoot?N.shadowRoot.firstChild:N.firstChild;pe;pe=pe.nextSibling)if(Ka(pe)&&qs(pe)&&typeof pe.assignedNodes=="function"){var Re=pe.assignedNodes();Re.length&&Re.forEach(function(ze){return ue.appendChildNode(X,ze,z)})}else this.appendChildNode(X,pe,z)},W.prototype.cloneNode=function(N,X){if($s(N))return document.createTextNode(N.data);if(!N.ownerDocument)return N.cloneNode(!1);var z=N.ownerDocument.defaultView;if(z&&Ka(N)&&(as(N)||ji(N))){var ue=this.createElementClone(N);ue.style.transitionProperty="none";var pe=z.getComputedStyle(N),Re=z.getComputedStyle(N,":before"),ze=z.getComputedStyle(N,":after");this.referenceElement===N&&as(ue)&&(this.clonedReferenceElement=ue),wn(ue)&&ir(ue);var Ge=this.counters.parse(new Pl(this.context,pe)),ut=this.resolvePseudoContent(N,ue,Re,J.BEFORE);el(N)&&(X=!0),ss(N)||this.cloneChildNodes(N,ue,X),ut&&ue.insertBefore(ut,ue.firstChild);var yt=this.resolvePseudoContent(N,ue,ze,J.AFTER);return yt&&ue.appendChild(yt),this.counters.pop(Ge),(pe&&(this.options.copyStyles||ji(N))&&!wi(N)||X)&&Ye(pe,ue),(N.scrollTop!==0||N.scrollLeft!==0)&&this.scrolledElements.push([ue,N.scrollLeft,N.scrollTop]),(_o(N)||xo(N))&&(_o(ue)||xo(ue))&&(ue.value=N.value),ue}return N.cloneNode(!1)},W.prototype.resolvePseudoContent=function(N,X,z,ue){var pe=this;if(!z)return;var Re=z.content,ze=X.ownerDocument;if(!ze||!Re||Re==="none"||Re==="-moz-alt-content"||z.display==="none")return;this.counters.parse(new Pl(this.context,z));var Ge=new Nu(this.context,z),ut=ze.createElement("html2canvaspseudoelement");Ye(z,ut),Ge.content.forEach(function(Rt){if(Rt.type===0)ut.appendChild(ze.createTextNode(Rt.value));else if(Rt.type===22){var Mt=ze.createElement("img");Mt.src=Rt.value,Mt.style.opacity="1",ut.appendChild(Mt)}else if(Rt.type===18){if(Rt.name==="attr"){var sr=Rt.values.filter(vn);sr.length&&ut.appendChild(ze.createTextNode(N.getAttribute(sr[0].value)||""))}else if(Rt.name==="counter"){var Wt=Rt.values.filter(Xi),rr=Wt[0],Lr=Wt[1];if(rr&&vn(rr)){var or=pe.counters.getCounterValue(rr.value),ur=Lr&&vn(Lr)?va.parse(pe.context,Lr.value):3;ut.appendChild(ze.createTextNode(S(or,ur,!1)))}}else if(Rt.name==="counters"){var an=Rt.values.filter(Xi),rr=an[0],Wr=an[1],Lr=an[2];if(rr&&vn(rr)){var fn=pe.counters.getCounterValues(rr.value),lr=Lr&&vn(Lr)?va.parse(pe.context,Lr.value):3,An=Wr&&Wr.type===0?Wr.value:"",pn=fn.map(function(yi){return S(yi,lr,!1)}).join(An);ut.appendChild(ze.createTextNode(pn))}}}else if(Rt.type===20)switch(Rt.value){case"open-quote":ut.appendChild(ze.createTextNode(Ml(Ge.quotes,pe.quoteDepth++,!0)));break;case"close-quote":ut.appendChild(ze.createTextNode(Ml(Ge.quotes,--pe.quoteDepth,!1)));break;default:ut.appendChild(ze.createTextNode(Rt.value))}}),ut.className=zt+" "+$t;var yt=ue===J.BEFORE?" "+zt:" "+$t;return ji(X)?X.className.baseValue+=yt:X.className+=yt,ut},W.destroy=function(N){return N.parentNode?(N.parentNode.removeChild(N),!0):!1},W}(),J;(function(W){W[W.BEFORE=0]="BEFORE",W[W.AFTER=1]="AFTER"})(J||(J={}));var ae=function(W,N){var X=W.createElement("iframe");return X.className="html2canvas-container",X.style.visibility="hidden",X.style.position="fixed",X.style.left="-10000px",X.style.top="0px",X.style.border="0",X.width=N.width.toString(),X.height=N.height.toString(),X.scrolling="no",X.setAttribute(_,"true"),W.body.appendChild(X),X},ce=function(W){return new Promise(function(N){if(W.complete){N();return}if(!W.src){N();return}W.onload=N,W.onerror=N})},fe=function(W){return Promise.all([].slice.call(W.images,0).map(ce))},ye=function(W){return new Promise(function(N,X){var z=W.contentWindow;if(!z)return X("No window assigned for iframe");var ue=z.document;z.onload=W.onload=function(){z.onload=W.onload=null;var pe=setInterval(function(){ue.body.childNodes.length>0&&ue.readyState==="complete"&&(clearInterval(pe),N(W))},50)}})},Ve=["all","d","content"],Ye=function(W,N){for(var X=W.length-1;X>=0;X--){var z=W.item(X);Ve.indexOf(z)===-1&&N.style.setProperty(z,W.getPropertyValue(z))}return N},vt=function(W){var N="";return W&&(N+="<!DOCTYPE ",W.name&&(N+=W.name),W.internalSubset&&(N+=W.internalSubset),W.publicId&&(N+='"'+W.publicId+'"'),W.systemId&&(N+='"'+W.systemId+'"'),N+=">"),N},dt=function(W,N,X){W&&W.defaultView&&(N!==W.defaultView.pageXOffset||X!==W.defaultView.pageYOffset)&&W.defaultView.scrollTo(N,X)},Ut=function(W){var N=W[0],X=W[1],z=W[2];N.scrollLeft=X,N.scrollTop=z},Nt=":before",Kt=":after",zt="___html2canvas___pseudoelement_before",$t="___html2canvas___pseudoelement_after",Vt=`{
content: "" !important;
display: none !important;
}`,ir=function(W){Cr(W,"."+zt+Nt+Vt+`
.`+$t+Kt+Vt)},Cr=function(W,N){var X=W.ownerDocument;if(X){var z=X.createElement("style");z.textContent=N,W.appendChild(z)}},pr=function(){function W(){}return W.getOrigin=function(N){var X=W._link;return X?(X.href=N,X.href=X.href,X.protocol+X.hostname+X.port):"about:blank"},W.isSameOrigin=function(N){return W.getOrigin(N)===W._origin},W.setContext=function(N){W._link=N.document.createElement("a"),W._origin=W.getOrigin(N.location.href)},W._origin="about:blank",W}(),kr=function(){function W(N,X){this.context=N,this._options=X,this._cache={}}return W.prototype.addImage=function(N){var X=Promise.resolve();return this.has(N)||(ei(N)||di(N))&&(this._cache[N]=this.loadImage(N)).catch(function(){}),X},W.prototype.match=function(N){return this._cache[N]},W.prototype.loadImage=function(N){return K(this,void 0,void 0,function(){var X,z,ue,pe,Re=this;return M(this,function(ze){switch(ze.label){case 0:return X=pr.isSameOrigin(N),z=!qn(N)&&this._options.useCORS===!0&&Hn.SUPPORT_CORS_IMAGES&&!X,ue=!qn(N)&&!X&&!ei(N)&&typeof this._options.proxy=="string"&&Hn.SUPPORT_CORS_XHR&&!z,!X&&this._options.allowTaint===!1&&!qn(N)&&!ei(N)&&!ue&&!z?[2]:(pe=N,ue?[4,this.proxy(pe)]:[3,2]);case 1:pe=ze.sent(),ze.label=2;case 2:return this.context.logger.debug("Added image "+N.substring(0,256)),[4,new Promise(function(Ge,ut){var yt=new Image;yt.onload=function(){return Ge(yt)},yt.onerror=ut,(Mn(pe)||z)&&(yt.crossOrigin="anonymous"),yt.src=pe,yt.complete===!0&&setTimeout(function(){return Ge(yt)},500),Re._options.imageTimeout>0&&setTimeout(function(){return ut("Timed out ("+Re._options.imageTimeout+"ms) loading image")},Re._options.imageTimeout)})];case 3:return[2,ze.sent()]}})})},W.prototype.has=function(N){return typeof this._cache[N]!="undefined"},W.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},W.prototype.proxy=function(N){var X=this,z=this._options.proxy;if(!z)throw new Error("No proxy defined");var ue=N.substring(0,256);return new Promise(function(pe,Re){var ze=Hn.SUPPORT_RESPONSE_TYPE?"blob":"text",Ge=new XMLHttpRequest;Ge.onload=function(){if(Ge.status===200)if(ze==="text")pe(Ge.response);else{var Rt=new FileReader;Rt.addEventListener("load",function(){return pe(Rt.result)},!1),Rt.addEventListener("error",function(Mt){return Re(Mt)},!1),Rt.readAsDataURL(Ge.response)}else Re("Failed to proxy resource "+ue+" with status code "+Ge.status)},Ge.onerror=Re;var ut=z.indexOf("?")>-1?"&":"?";if(Ge.open("GET",""+z+ut+"url="+encodeURIComponent(N)+"&responseType="+ze),ze!=="text"&&Ge instanceof XMLHttpRequest&&(Ge.responseType=ze),X._options.imageTimeout){var yt=X._options.imageTimeout;Ge.timeout=yt,Ge.ontimeout=function(){return Re("Timed out ("+yt+"ms) proxying "+ue)}}Ge.send()})},W}(),yn=/^data:image\/svg\+xml/i,zn=/^data:image\/.*;base64,/i,Bn=/^data:image\/.*/i,di=function(W){return Hn.SUPPORT_SVG_DRAWING||!Yn(W)},qn=function(W){return Bn.test(W)},Mn=function(W){return zn.test(W)},ei=function(W){return W.substr(0,4)==="blob"},Yn=function(W){return W.substr(-3).toLowerCase()==="svg"||yn.test(W)},Gt=function(){function W(N,X){this.type=0,this.x=N,this.y=X}return W.prototype.add=function(N,X){return new W(this.x+N,this.y+X)},W}(),Cn=function(W,N,X){return new Gt(W.x+(N.x-W.x)*X,W.y+(N.y-W.y)*X)},Tn=function(){function W(N,X,z,ue){this.type=1,this.start=N,this.startControl=X,this.endControl=z,this.end=ue}return W.prototype.subdivide=function(N,X){var z=Cn(this.start,this.startControl,N),ue=Cn(this.startControl,this.endControl,N),pe=Cn(this.endControl,this.end,N),Re=Cn(z,ue,N),ze=Cn(ue,pe,N),Ge=Cn(Re,ze,N);return X?new W(this.start,z,Re,Ge):new W(Ge,ze,pe,this.end)},W.prototype.add=function(N,X){return new W(this.start.add(N,X),this.startControl.add(N,X),this.endControl.add(N,X),this.end.add(N,X))},W.prototype.reverse=function(){return new W(this.end,this.endControl,this.startControl,this.start)},W}(),Sn=function(W){return W.type===1},Wa=function(){function W(N){var X=N.styles,z=N.bounds,ue=Aa(X.borderTopLeftRadius,z.width,z.height),pe=ue[0],Re=ue[1],ze=Aa(X.borderTopRightRadius,z.width,z.height),Ge=ze[0],ut=ze[1],yt=Aa(X.borderBottomRightRadius,z.width,z.height),Rt=yt[0],Mt=yt[1],sr=Aa(X.borderBottomLeftRadius,z.width,z.height),Wt=sr[0],rr=sr[1],Lr=[];Lr.push((pe+Ge)/z.width),Lr.push((Wt+Rt)/z.width),Lr.push((Re+rr)/z.height),Lr.push((ut+Mt)/z.height);var or=Math.max.apply(Math,Lr);or>1&&(pe/=or,Re/=or,Ge/=or,ut/=or,Rt/=or,Mt/=or,Wt/=or,rr/=or);var ur=z.width-Ge,an=z.height-Mt,Wr=z.width-Rt,fn=z.height-rr,lr=X.borderTopWidth,An=X.borderRightWidth,pn=X.borderBottomWidth,Kr=X.borderLeftWidth,_i=on(X.paddingTop,N.bounds.width),yi=on(X.paddingRight,N.bounds.width),Oi=on(X.paddingBottom,N.bounds.width),ai=on(X.paddingLeft,N.bounds.width);this.topLeftBorderDoubleOuterBox=pe>0||Re>0?jr(z.left+Kr/3,z.top+lr/3,pe-Kr/3,Re-lr/3,Vr.TOP_LEFT):new Gt(z.left+Kr/3,z.top+lr/3),this.topRightBorderDoubleOuterBox=pe>0||Re>0?jr(z.left+ur,z.top+lr/3,Ge-An/3,ut-lr/3,Vr.TOP_RIGHT):new Gt(z.left+z.width-An/3,z.top+lr/3),this.bottomRightBorderDoubleOuterBox=Rt>0||Mt>0?jr(z.left+Wr,z.top+an,Rt-An/3,Mt-pn/3,Vr.BOTTOM_RIGHT):new Gt(z.left+z.width-An/3,z.top+z.height-pn/3),this.bottomLeftBorderDoubleOuterBox=Wt>0||rr>0?jr(z.left+Kr/3,z.top+fn,Wt-Kr/3,rr-pn/3,Vr.BOTTOM_LEFT):new Gt(z.left+Kr/3,z.top+z.height-pn/3),this.topLeftBorderDoubleInnerBox=pe>0||Re>0?jr(z.left+Kr*2/3,z.top+lr*2/3,pe-Kr*2/3,Re-lr*2/3,Vr.TOP_LEFT):new Gt(z.left+Kr*2/3,z.top+lr*2/3),this.topRightBorderDoubleInnerBox=pe>0||Re>0?jr(z.left+ur,z.top+lr*2/3,Ge-An*2/3,ut-lr*2/3,Vr.TOP_RIGHT):new Gt(z.left+z.width-An*2/3,z.top+lr*2/3),this.bottomRightBorderDoubleInnerBox=Rt>0||Mt>0?jr(z.left+Wr,z.top+an,Rt-An*2/3,Mt-pn*2/3,Vr.BOTTOM_RIGHT):new Gt(z.left+z.width-An*2/3,z.top+z.height-pn*2/3),this.bottomLeftBorderDoubleInnerBox=Wt>0||rr>0?jr(z.left+Kr*2/3,z.top+fn,Wt-Kr*2/3,rr-pn*2/3,Vr.BOTTOM_LEFT):new Gt(z.left+Kr*2/3,z.top+z.height-pn*2/3),this.topLeftBorderStroke=pe>0||Re>0?jr(z.left+Kr/2,z.top+lr/2,pe-Kr/2,Re-lr/2,Vr.TOP_LEFT):new Gt(z.left+Kr/2,z.top+lr/2),this.topRightBorderStroke=pe>0||Re>0?jr(z.left+ur,z.top+lr/2,Ge-An/2,ut-lr/2,Vr.TOP_RIGHT):new Gt(z.left+z.width-An/2,z.top+lr/2),this.bottomRightBorderStroke=Rt>0||Mt>0?jr(z.left+Wr,z.top+an,Rt-An/2,Mt-pn/2,Vr.BOTTOM_RIGHT):new Gt(z.left+z.width-An/2,z.top+z.height-pn/2),this.bottomLeftBorderStroke=Wt>0||rr>0?jr(z.left+Kr/2,z.top+fn,Wt-Kr/2,rr-pn/2,Vr.BOTTOM_LEFT):new Gt(z.left+Kr/2,z.top+z.height-pn/2),this.topLeftBorderBox=pe>0||Re>0?jr(z.left,z.top,pe,Re,Vr.TOP_LEFT):new Gt(z.left,z.top),this.topRightBorderBox=Ge>0||ut>0?jr(z.left+ur,z.top,Ge,ut,Vr.TOP_RIGHT):new Gt(z.left+z.width,z.top),this.bottomRightBorderBox=Rt>0||Mt>0?jr(z.left+Wr,z.top+an,Rt,Mt,Vr.BOTTOM_RIGHT):new Gt(z.left+z.width,z.top+z.height),this.bottomLeftBorderBox=Wt>0||rr>0?jr(z.left,z.top+fn,Wt,rr,Vr.BOTTOM_LEFT):new Gt(z.left,z.top+z.height),this.topLeftPaddingBox=pe>0||Re>0?jr(z.left+Kr,z.top+lr,Math.max(0,pe-Kr),Math.max(0,Re-lr),Vr.TOP_LEFT):new Gt(z.left+Kr,z.top+lr),this.topRightPaddingBox=Ge>0||ut>0?jr(z.left+Math.min(ur,z.width-An),z.top+lr,ur>z.width+An?0:Math.max(0,Ge-An),Math.max(0,ut-lr),Vr.TOP_RIGHT):new Gt(z.left+z.width-An,z.top+lr),this.bottomRightPaddingBox=Rt>0||Mt>0?jr(z.left+Math.min(Wr,z.width-Kr),z.top+Math.min(an,z.height-pn),Math.max(0,Rt-An),Math.max(0,Mt-pn),Vr.BOTTOM_RIGHT):new Gt(z.left+z.width-An,z.top+z.height-pn),this.bottomLeftPaddingBox=Wt>0||rr>0?jr(z.left+Kr,z.top+Math.min(fn,z.height-pn),Math.max(0,Wt-Kr),Math.max(0,rr-pn),Vr.BOTTOM_LEFT):new Gt(z.left+Kr,z.top+z.height-pn),this.topLeftContentBox=pe>0||Re>0?jr(z.left+Kr+ai,z.top+lr+_i,Math.max(0,pe-(Kr+ai)),Math.max(0,Re-(lr+_i)),Vr.TOP_LEFT):new Gt(z.left+Kr+ai,z.top+lr+_i),this.topRightContentBox=Ge>0||ut>0?jr(z.left+Math.min(ur,z.width+Kr+ai),z.top+lr+_i,ur>z.width+Kr+ai?0:Ge-Kr+ai,ut-(lr+_i),Vr.TOP_RIGHT):new Gt(z.left+z.width-(An+yi),z.top+lr+_i),this.bottomRightContentBox=Rt>0||Mt>0?jr(z.left+Math.min(Wr,z.width-(Kr+ai)),z.top+Math.min(an,z.height+lr+_i),Math.max(0,Rt-(An+yi)),Mt-(pn+Oi),Vr.BOTTOM_RIGHT):new Gt(z.left+z.width-(An+yi),z.top+z.height-(pn+Oi)),this.bottomLeftContentBox=Wt>0||rr>0?jr(z.left+Kr+ai,z.top+fn,Math.max(0,Wt-(Kr+ai)),rr-(pn+Oi),Vr.BOTTOM_LEFT):new Gt(z.left+Kr+ai,z.top+z.height-(pn+Oi))}return W}(),Vr;(function(W){W[W.TOP_LEFT=0]="TOP_LEFT",W[W.TOP_RIGHT=1]="TOP_RIGHT",W[W.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",W[W.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Vr||(Vr={}));var jr=function(W,N,X,z,ue){var pe=4*((Math.sqrt(2)-1)/3),Re=X*pe,ze=z*pe,Ge=W+X,ut=N+z;switch(ue){case Vr.TOP_LEFT:return new Tn(new Gt(W,ut),new Gt(W,ut-ze),new Gt(Ge-Re,N),new Gt(Ge,N));case Vr.TOP_RIGHT:return new Tn(new Gt(W,N),new Gt(W+Re,N),new Gt(Ge,ut-ze),new Gt(Ge,ut));case Vr.BOTTOM_RIGHT:return new Tn(new Gt(Ge,N),new Gt(Ge,N+ze),new Gt(W+Re,ut),new Gt(W,ut));case Vr.BOTTOM_LEFT:default:return new Tn(new Gt(Ge,ut),new Gt(Ge-Re,ut),new Gt(W,N+ze),new Gt(W,N))}},vi=function(W){return[W.topLeftBorderBox,W.topRightBorderBox,W.bottomRightBorderBox,W.bottomLeftBorderBox]},Vn=function(W){return[W.topLeftContentBox,W.topRightContentBox,W.bottomRightContentBox,W.bottomLeftContentBox]},Ga=function(W){return[W.topLeftPaddingBox,W.topRightPaddingBox,W.bottomRightPaddingBox,W.bottomLeftPaddingBox]},Gi=function(){function W(N,X,z){this.offsetX=N,this.offsetY=X,this.matrix=z,this.type=0,this.target=2|4}return W}(),Mi=function(){function W(N,X){this.path=N,this.target=X,this.type=1}return W}(),xa=function(){function W(N){this.opacity=N,this.type=2,this.target=2|4}return W}(),ii=function(W){return W.type===0},Ca=function(W){return W.type===1},tl=function(W){return W.type===2},iA=function(W,N){return W.length===N.length?W.some(function(X,z){return X===N[z]}):!1},hA=function(W,N,X,z,ue){return W.map(function(pe,Re){switch(Re){case 0:return pe.add(N,X);case 1:return pe.add(N+z,X);case 2:return pe.add(N+z,X+ue);case 3:return pe.add(N,X+ue)}return pe})},aA=function(){function W(N){this.element=N,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return W}(),oA=function(){function W(N,X){if(this.container=N,this.parent=X,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new xa(this.container.styles.opacity)),this.container.styles.transform!==null){var z=this.container.bounds.left+this.container.styles.transformOrigin[0].number,ue=this.container.bounds.top+this.container.styles.transformOrigin[1].number,pe=this.container.styles.transform;this.effects.push(new Gi(z,ue,pe))}if(this.container.styles.overflowX!==0){var Re=vi(this.curves),ze=Ga(this.curves);iA(Re,ze)?this.effects.push(new Mi(Re,2|4)):(this.effects.push(new Mi(Re,2)),this.effects.push(new Mi(ze,4)))}}return W.prototype.getEffects=function(N){for(var X=[2,3].indexOf(this.container.styles.position)===-1,z=this.parent,ue=this.effects.slice(0);z;){var pe=z.effects.filter(function(Ge){return!Ca(Ge)});if(X||z.container.styles.position!==0||!z.parent){if(ue.unshift.apply(ue,pe),X=[2,3].indexOf(z.container.styles.position)===-1,z.container.styles.overflowX!==0){var Re=vi(z.curves),ze=Ga(z.curves);iA(Re,ze)||ue.unshift(new Mi(ze,2|4))}}else ue.unshift.apply(ue,pe);z=z.parent}return ue.filter(function(Ge){return Nn(Ge.target,N)})},W}(),rA=function(W,N,X,z){W.container.elements.forEach(function(ue){var pe=Nn(ue.flags,4),Re=Nn(ue.flags,2),ze=new oA(ue,W);Nn(ue.styles.display,2048)&&z.push(ze);var Ge=Nn(ue.flags,8)?[]:z;if(pe||Re){var ut=pe||ue.styles.isPositioned()?X:N,yt=new aA(ze);if(ue.styles.isPositioned()||ue.styles.opacity<1||ue.styles.isTransformed()){var Rt=ue.styles.zIndex.order;if(Rt<0){var Mt=0;ut.negativeZIndex.some(function(Wt,rr){return Rt>Wt.element.container.styles.zIndex.order?(Mt=rr,!1):Mt>0}),ut.negativeZIndex.splice(Mt,0,yt)}else if(Rt>0){var sr=0;ut.positiveZIndex.some(function(Wt,rr){return Rt>=Wt.element.container.styles.zIndex.order?(sr=rr+1,!1):sr>0}),ut.positiveZIndex.splice(sr,0,yt)}else ut.zeroOrAutoZIndexOrTransformedOrOpacity.push(yt)}else ue.styles.isFloating()?ut.nonPositionedFloats.push(yt):ut.nonPositionedInlineLevel.push(yt);rA(ze,yt,pe?yt:X,Ge)}else ue.styles.isInlineLevel()?N.inlineLevel.push(ze):N.nonInlineLevel.push(ze),rA(ze,N,X,Ge);Nn(ue.flags,8)&&sA(ue,Ge)})},sA=function(W,N){for(var X=W instanceof ns?W.start:1,z=W instanceof ns?W.reversed:!1,ue=0;ue<N.length;ue++){var pe=N[ue];pe.container instanceof rs&&typeof pe.container.value=="number"&&pe.container.value!==0&&(X=pe.container.value),pe.listValue=S(X,pe.container.styles.listStyleType,!0),X+=z?-1:1}},dA=function(W){var N=new oA(W,null),X=new aA(N),z=[];return rA(N,X,X,z),sA(N.container,z),X},lA=function(W,N){switch(N){case 0:return Fi(W.topLeftBorderBox,W.topLeftPaddingBox,W.topRightBorderBox,W.topRightPaddingBox);case 1:return Fi(W.topRightBorderBox,W.topRightPaddingBox,W.bottomRightBorderBox,W.bottomRightPaddingBox);case 2:return Fi(W.bottomRightBorderBox,W.bottomRightPaddingBox,W.bottomLeftBorderBox,W.bottomLeftPaddingBox);case 3:default:return Fi(W.bottomLeftBorderBox,W.bottomLeftPaddingBox,W.topLeftBorderBox,W.topLeftPaddingBox)}},fA=function(W,N){switch(N){case 0:return Fi(W.topLeftBorderBox,W.topLeftBorderDoubleOuterBox,W.topRightBorderBox,W.topRightBorderDoubleOuterBox);case 1:return Fi(W.topRightBorderBox,W.topRightBorderDoubleOuterBox,W.bottomRightBorderBox,W.bottomRightBorderDoubleOuterBox);case 2:return Fi(W.bottomRightBorderBox,W.bottomRightBorderDoubleOuterBox,W.bottomLeftBorderBox,W.bottomLeftBorderDoubleOuterBox);case 3:default:return Fi(W.bottomLeftBorderBox,W.bottomLeftBorderDoubleOuterBox,W.topLeftBorderBox,W.topLeftBorderDoubleOuterBox)}},pA=function(W,N){switch(N){case 0:return Fi(W.topLeftBorderDoubleInnerBox,W.topLeftPaddingBox,W.topRightBorderDoubleInnerBox,W.topRightPaddingBox);case 1:return Fi(W.topRightBorderDoubleInnerBox,W.topRightPaddingBox,W.bottomRightBorderDoubleInnerBox,W.bottomRightPaddingBox);case 2:return Fi(W.bottomRightBorderDoubleInnerBox,W.bottomRightPaddingBox,W.bottomLeftBorderDoubleInnerBox,W.bottomLeftPaddingBox);case 3:default:return Fi(W.bottomLeftBorderDoubleInnerBox,W.bottomLeftPaddingBox,W.topLeftBorderDoubleInnerBox,W.topLeftPaddingBox)}},mA=function(W,N){switch(N){case 0:return pu(W.topLeftBorderStroke,W.topRightBorderStroke);case 1:return pu(W.topRightBorderStroke,W.bottomRightBorderStroke);case 2:return pu(W.bottomRightBorderStroke,W.bottomLeftBorderStroke);case 3:default:return pu(W.bottomLeftBorderStroke,W.topLeftBorderStroke)}},pu=function(W,N){var X=[];return Sn(W)?X.push(W.subdivide(.5,!1)):X.push(W),Sn(N)?X.push(N.subdivide(.5,!0)):X.push(N),X},Fi=function(W,N,X,z){var ue=[];return Sn(W)?ue.push(W.subdivide(.5,!1)):ue.push(W),Sn(X)?ue.push(X.subdivide(.5,!0)):ue.push(X),Sn(z)?ue.push(z.subdivide(.5,!0).reverse()):ue.push(z),Sn(N)?ue.push(N.subdivide(.5,!1).reverse()):ue.push(N),ue},uA=function(W){var N=W.bounds,X=W.styles;return N.add(X.borderLeftWidth,X.borderTopWidth,-(X.borderRightWidth+X.borderLeftWidth),-(X.borderTopWidth+X.borderBottomWidth))},mu=function(W){var N=W.styles,X=W.bounds,z=on(N.paddingLeft,X.width),ue=on(N.paddingRight,X.width),pe=on(N.paddingTop,X.width),Re=on(N.paddingBottom,X.width);return X.add(z+N.borderLeftWidth,pe+N.borderTopWidth,-(N.borderRightWidth+N.borderLeftWidth+z+ue),-(N.borderTopWidth+N.borderBottomWidth+pe+Re))},gA=function(W,N){return W===0?N.bounds:W===2?mu(N):uA(N)},vA=function(W,N){return W===0?N.bounds:W===2?mu(N):uA(N)},nA=function(W,N,X){var z=gA(As(W.styles.backgroundOrigin,N),W),ue=vA(As(W.styles.backgroundClip,N),W),pe=yA(As(W.styles.backgroundSize,N),X,z),Re=pe[0],ze=pe[1],Ge=Aa(As(W.styles.backgroundPosition,N),z.width-Re,z.height-ze),ut=bA(As(W.styles.backgroundRepeat,N),Ge,pe,z,ue),yt=Math.round(z.left+Ge[0]),Rt=Math.round(z.top+Ge[1]);return[ut,yt,Rt,Re,ze]},us=function(W){return vn(W)&&W.value===da.AUTO},gu=function(W){return typeof W=="number"},yA=function(W,N,X){var z=N[0],ue=N[1],pe=N[2],Re=W[0],ze=W[1];if(!Re)return[0,0];if(Rn(Re)&&ze&&Rn(ze))return[on(Re,X.width),on(ze,X.height)];var Ge=gu(pe);if(vn(Re)&&(Re.value===da.CONTAIN||Re.value===da.COVER)){if(gu(pe)){var ut=X.width/X.height;return ut<pe!==(Re.value===da.COVER)?[X.width,X.width/pe]:[X.height*pe,X.height]}return[X.width,X.height]}var yt=gu(z),Rt=gu(ue),Mt=yt||Rt;if(us(Re)&&(!ze||us(ze))){if(yt&&Rt)return[z,ue];if(!Ge&&!Mt)return[X.width,X.height];if(Mt&&Ge){var sr=yt?z:ue*pe,Wt=Rt?ue:z/pe;return[sr,Wt]}var rr=yt?z:X.width,Lr=Rt?ue:X.height;return[rr,Lr]}if(Ge){var or=0,ur=0;return Rn(Re)?or=on(Re,X.width):Rn(ze)&&(ur=on(ze,X.height)),us(Re)?or=ur*pe:(!ze||us(ze))&&(ur=or/pe),[or,ur]}var an=null,Wr=null;if(Rn(Re)?an=on(Re,X.width):ze&&Rn(ze)&&(Wr=on(ze,X.height)),an!==null&&(!ze||us(ze))&&(Wr=yt&&Rt?an/z*ue:X.height),Wr!==null&&us(Re)&&(an=yt&&Rt?Wr/ue*z:X.width),an!==null&&Wr!==null)return[an,Wr];throw new Error("Unable to calculate background-size for element")},As=function(W,N){var X=W[N];return typeof X=="undefined"?W[0]:X},bA=function(W,N,X,z,ue){var pe=N[0],Re=N[1],ze=X[0],Ge=X[1];switch(W){case 2:return[new Gt(Math.round(z.left),Math.round(z.top+Re)),new Gt(Math.round(z.left+z.width),Math.round(z.top+Re)),new Gt(Math.round(z.left+z.width),Math.round(Ge+z.top+Re)),new Gt(Math.round(z.left),Math.round(Ge+z.top+Re))];case 3:return[new Gt(Math.round(z.left+pe),Math.round(z.top)),new Gt(Math.round(z.left+pe+ze),Math.round(z.top)),new Gt(Math.round(z.left+pe+ze),Math.round(z.height+z.top)),new Gt(Math.round(z.left+pe),Math.round(z.height+z.top))];case 1:return[new Gt(Math.round(z.left+pe),Math.round(z.top+Re)),new Gt(Math.round(z.left+pe+ze),Math.round(z.top+Re)),new Gt(Math.round(z.left+pe+ze),Math.round(z.top+Re+Ge)),new Gt(Math.round(z.left+pe),Math.round(z.top+Re+Ge))];default:return[new Gt(Math.round(ue.left),Math.round(ue.top)),new Gt(Math.round(ue.left+ue.width),Math.round(ue.top)),new Gt(Math.round(ue.left+ue.width),Math.round(ue.height+ue.top)),new Gt(Math.round(ue.left),Math.round(ue.height+ue.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",wA=function(){function W(N){this._data={},this._document=N}return W.prototype.parseMetrics=function(N,X){var z=this._document.createElement("div"),ue=this._document.createElement("img"),pe=this._document.createElement("span"),Re=this._document.body;z.style.visibility="hidden",z.style.fontFamily=N,z.style.fontSize=X,z.style.margin="0",z.style.padding="0",z.style.whiteSpace="nowrap",Re.appendChild(z),ue.src=EA,ue.width=1,ue.height=1,ue.style.margin="0",ue.style.padding="0",ue.style.verticalAlign="baseline",pe.style.fontFamily=N,pe.style.fontSize=X,pe.style.margin="0",pe.style.padding="0",pe.appendChild(this._document.createTextNode(AA)),z.appendChild(pe),z.appendChild(ue);var ze=ue.offsetTop-pe.offsetTop+2;z.removeChild(pe),z.appendChild(this._document.createTextNode(AA)),z.style.lineHeight="normal",ue.style.verticalAlign="super";var Ge=ue.offsetTop-z.offsetTop+2;return Re.removeChild(z),{baseline:ze,middle:Ge}},W.prototype.getMetrics=function(N,X){var z=N+" "+X;return typeof this._data[z]=="undefined"&&(this._data[z]=this.parseMetrics(N,X)),this._data[z]},W}(),cA=function(){function W(N,X){this.context=N,this.options=X}return W}(),_A=1e4,xA=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue._activeEffects=[],ue.canvas=z.canvas?z.canvas:document.createElement("canvas"),ue.ctx=ue.canvas.getContext("2d"),z.canvas||(ue.canvas.width=Math.floor(z.width*z.scale),ue.canvas.height=Math.floor(z.height*z.scale),ue.canvas.style.width=z.width+"px",ue.canvas.style.height=z.height+"px"),ue.fontMetrics=new wA(document),ue.ctx.scale(ue.options.scale,ue.options.scale),ue.ctx.translate(-z.x,-z.y),ue.ctx.textBaseline="bottom",ue._activeEffects=[],ue.context.logger.debug("Canvas renderer initialized ("+z.width+"x"+z.height+") with scale "+z.scale),ue}return N.prototype.applyEffects=function(X){for(var z=this;this._activeEffects.length;)this.popEffect();X.forEach(function(ue){return z.applyEffect(ue)})},N.prototype.applyEffect=function(X){this.ctx.save(),tl(X)&&(this.ctx.globalAlpha=X.opacity),ii(X)&&(this.ctx.translate(X.offsetX,X.offsetY),this.ctx.transform(X.matrix[0],X.matrix[1],X.matrix[2],X.matrix[3],X.matrix[4],X.matrix[5]),this.ctx.translate(-X.offsetX,-X.offsetY)),Ca(X)&&(this.path(X.path),this.ctx.clip()),this._activeEffects.push(X)},N.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},N.prototype.renderStack=function(X){return K(this,void 0,void 0,function(){var z;return M(this,function(ue){switch(ue.label){case 0:return z=X.element.container.styles,z.isVisible()?[4,this.renderStackContent(X)]:[3,2];case 1:ue.sent(),ue.label=2;case 2:return[2]}})})},N.prototype.renderNode=function(X){return K(this,void 0,void 0,function(){return M(this,function(z){switch(z.label){case 0:if(Nn(X.container.flags,16))debugger;return X.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(X)]:[3,3];case 1:return z.sent(),[4,this.renderNodeContent(X)];case 2:z.sent(),z.label=3;case 3:return[2]}})})},N.prototype.renderTextWithLetterSpacing=function(X,z,ue){var pe=this;if(z===0)this.ctx.fillText(X.text,X.bounds.left,X.bounds.top+ue);else{var Re=Vs(X.text);Re.reduce(function(ze,Ge){return pe.ctx.fillText(Ge,ze,X.bounds.top+ue),ze+pe.ctx.measureText(Ge).width},X.bounds.left)}},N.prototype.createFontStyle=function(X){var z=X.fontVariant.filter(function(Re){return Re==="normal"||Re==="small-caps"}).join(""),ue=OA(X.fontFamily).join(", "),pe=Ba(X.fontSize)?""+X.fontSize.number+X.fontSize.unit:X.fontSize.number+"px";return[[X.fontStyle,z,X.fontWeight,pe,ue].join(" "),ue,pe]},N.prototype.renderTextNode=function(X,z){return K(this,void 0,void 0,function(){var ue,pe,Re,ze,Ge,ut,yt,Rt,Mt=this;return M(this,function(sr){return ue=this.createFontStyle(z),pe=ue[0],Re=ue[1],ze=ue[2],this.ctx.font=pe,this.ctx.direction=z.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ge=this.fontMetrics.getMetrics(Re,ze),ut=Ge.baseline,yt=Ge.middle,Rt=z.paintOrder,X.textBounds.forEach(function(Wt){Rt.forEach(function(rr){switch(rr){case 0:Mt.ctx.fillStyle=Wn(z.color),Mt.renderTextWithLetterSpacing(Wt,z.letterSpacing,ut);var Lr=z.textShadow;Lr.length&&Wt.text.trim().length&&(Lr.slice(0).reverse().forEach(function(or){Mt.ctx.shadowColor=Wn(or.color),Mt.ctx.shadowOffsetX=or.offsetX.number*Mt.options.scale,Mt.ctx.shadowOffsetY=or.offsetY.number*Mt.options.scale,Mt.ctx.shadowBlur=or.blur.number,Mt.renderTextWithLetterSpacing(Wt,z.letterSpacing,ut)}),Mt.ctx.shadowColor="",Mt.ctx.shadowOffsetX=0,Mt.ctx.shadowOffsetY=0,Mt.ctx.shadowBlur=0),z.textDecorationLine.length&&(Mt.ctx.fillStyle=Wn(z.textDecorationColor||z.color),z.textDecorationLine.forEach(function(or){switch(or){case 1:Mt.ctx.fillRect(Wt.bounds.left,Math.round(Wt.bounds.top+ut),Wt.bounds.width,1);break;case 2:Mt.ctx.fillRect(Wt.bounds.left,Math.round(Wt.bounds.top),Wt.bounds.width,1);break;case 3:Mt.ctx.fillRect(Wt.bounds.left,Math.ceil(Wt.bounds.top+yt),Wt.bounds.width,1);break}}));break;case 1:z.webkitTextStrokeWidth&&Wt.text.trim().length&&(Mt.ctx.strokeStyle=Wn(z.webkitTextStrokeColor),Mt.ctx.lineWidth=z.webkitTextStrokeWidth,Mt.ctx.lineJoin=window.chrome?"miter":"round",Mt.ctx.strokeText(Wt.text,Wt.bounds.left,Wt.bounds.top+ut)),Mt.ctx.strokeStyle="",Mt.ctx.lineWidth=0,Mt.ctx.lineJoin="miter";break}})}),[2]})})},N.prototype.renderReplacedElement=function(X,z,ue){if(ue&&X.intrinsicWidth>0&&X.intrinsicHeight>0){var pe=mu(X),Re=Ga(z);this.path(Re),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(ue,0,0,X.intrinsicWidth,X.intrinsicHeight,pe.left,pe.top,pe.width,pe.height),this.ctx.restore()}},N.prototype.renderNodeContent=function(X){return K(this,void 0,void 0,function(){var z,ue,pe,Re,ze,Ge,ut,ut,yt,Rt,Mt,sr,Wt,rr,Lr,or,ur,an,Wr,ut,fn,Wt,or;return M(this,function(lr){switch(lr.label){case 0:this.applyEffects(X.getEffects(4)),z=X.container,ue=X.curves,pe=z.styles,Re=0,ze=z.textNodes,lr.label=1;case 1:return Re<ze.length?(Ge=ze[Re],[4,this.renderTextNode(Ge,pe)]):[3,4];case 2:lr.sent(),lr.label=3;case 3:return Re++,[3,1];case 4:if(!(z instanceof Xs))return[3,8];lr.label=5;case 5:return lr.trys.push([5,7,,8]),[4,this.context.cache.match(z.src)];case 6:return ut=lr.sent(),this.renderReplacedElement(z,ue,ut),[3,8];case 7:return lr.sent(),this.context.logger.error("Error loading image "+z.src),[3,8];case 8:if(z instanceof Ys&&this.renderReplacedElement(z,ue,z.canvas),!(z instanceof $l))return[3,12];lr.label=9;case 9:return lr.trys.push([9,11,,12]),[4,this.context.cache.match(z.svg)];case 10:return ut=lr.sent(),this.renderReplacedElement(z,ue,ut),[3,12];case 11:return lr.sent(),this.context.logger.error("Error loading svg "+z.svg.substring(0,255)),[3,12];case 12:return z instanceof nu&&z.tree?(yt=new N(this.context,{scale:this.options.scale,backgroundColor:z.backgroundColor,x:0,y:0,width:z.width,height:z.height}),[4,yt.render(z.tree)]):[3,14];case 13:Rt=lr.sent(),z.width&&z.height&&this.ctx.drawImage(Rt,0,0,z.width,z.height,z.bounds.left,z.bounds.top,z.bounds.width,z.bounds.height),lr.label=14;case 14:if(z instanceof is&&(Mt=Math.min(z.bounds.width,z.bounds.height),z.type===ja?z.checked&&(this.ctx.save(),this.path([new Gt(z.bounds.left+Mt*.39363,z.bounds.top+Mt*.79),new Gt(z.bounds.left+Mt*.16,z.bounds.top+Mt*.5549),new Gt(z.bounds.left+Mt*.27347,z.bounds.top+Mt*.44071),new Gt(z.bounds.left+Mt*.39694,z.bounds.top+Mt*.5649),new Gt(z.bounds.left+Mt*.72983,z.bounds.top+Mt*.23),new Gt(z.bounds.left+Mt*.84,z.bounds.top+Mt*.34085),new Gt(z.bounds.left+Mt*.39363,z.bounds.top+Mt*.79)]),this.ctx.fillStyle=Wn(eu),this.ctx.fill(),this.ctx.restore()):z.type===aa&&(z.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(z.bounds.left+Mt/2,z.bounds.top+Mt/2,Mt/4,0,Math.PI*2,!0),this.ctx.fillStyle=Wn(eu),this.ctx.fill(),this.ctx.restore()))),CA(z)&&z.value.length){sr=this.createFontStyle(pe),Wt=sr[0],rr=sr[1],Lr=this.fontMetrics.getMetrics(Wt,rr).baseline,this.ctx.font=Wt,this.ctx.fillStyle=Wn(pe.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=SA(z.styles.textAlign),or=mu(z),ur=0;switch(z.styles.textAlign){case 1:ur+=or.width/2;break;case 2:ur+=or.width;break}an=or.add(ur,0,0,-or.height/2+1),this.ctx.save(),this.path([new Gt(or.left,or.top),new Gt(or.left+or.width,or.top),new Gt(or.left+or.width,or.top+or.height),new Gt(or.left,or.top+or.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Di(z.value,an),pe.letterSpacing,Lr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Nn(z.styles.display,2048))return[3,20];if(!(z.styles.listStyleImage!==null))return[3,19];if(Wr=z.styles.listStyleImage,!(Wr.type===0))return[3,18];ut=void 0,fn=Wr.url,lr.label=15;case 15:return lr.trys.push([15,17,,18]),[4,this.context.cache.match(fn)];case 16:return ut=lr.sent(),this.ctx.drawImage(ut,z.bounds.left-(ut.width+10),z.bounds.top),[3,18];case 17:return lr.sent(),this.context.logger.error("Error loading list-style-image "+fn),[3,18];case 18:return[3,20];case 19:X.listValue&&z.styles.listStyleType!==-1&&(Wt=this.createFontStyle(pe)[0],this.ctx.font=Wt,this.ctx.fillStyle=Wn(pe.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",or=new R(z.bounds.left,z.bounds.top+on(z.styles.paddingTop,z.bounds.width),z.bounds.width,kn(pe.lineHeight,pe.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Di(X.listValue,or),pe.letterSpacing,kn(pe.lineHeight,pe.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),lr.label=20;case 20:return[2]}})})},N.prototype.renderStackContent=function(X){return K(this,void 0,void 0,function(){var z,ue,pe,Re,ze,pe,Ge,ut,pe,yt,Rt,pe,Mt,sr,pe,Wt,rr,pe,Lr,or,pe;return M(this,function(ur){switch(ur.label){case 0:if(Nn(X.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(X.element)];case 1:ur.sent(),z=0,ue=X.negativeZIndex,ur.label=2;case 2:return z<ue.length?(pe=ue[z],[4,this.renderStack(pe)]):[3,5];case 3:ur.sent(),ur.label=4;case 4:return z++,[3,2];case 5:return[4,this.renderNodeContent(X.element)];case 6:ur.sent(),Re=0,ze=X.nonInlineLevel,ur.label=7;case 7:return Re<ze.length?(pe=ze[Re],[4,this.renderNode(pe)]):[3,10];case 8:ur.sent(),ur.label=9;case 9:return Re++,[3,7];case 10:Ge=0,ut=X.nonPositionedFloats,ur.label=11;case 11:return Ge<ut.length?(pe=ut[Ge],[4,this.renderStack(pe)]):[3,14];case 12:ur.sent(),ur.label=13;case 13:return Ge++,[3,11];case 14:yt=0,Rt=X.nonPositionedInlineLevel,ur.label=15;case 15:return yt<Rt.length?(pe=Rt[yt],[4,this.renderStack(pe)]):[3,18];case 16:ur.sent(),ur.label=17;case 17:return yt++,[3,15];case 18:Mt=0,sr=X.inlineLevel,ur.label=19;case 19:return Mt<sr.length?(pe=sr[Mt],[4,this.renderNode(pe)]):[3,22];case 20:ur.sent(),ur.label=21;case 21:return Mt++,[3,19];case 22:Wt=0,rr=X.zeroOrAutoZIndexOrTransformedOrOpacity,ur.label=23;case 23:return Wt<rr.length?(pe=rr[Wt],[4,this.renderStack(pe)]):[3,26];case 24:ur.sent(),ur.label=25;case 25:return Wt++,[3,23];case 26:Lr=0,or=X.positiveZIndex,ur.label=27;case 27:return Lr<or.length?(pe=or[Lr],[4,this.renderStack(pe)]):[3,30];case 28:ur.sent(),ur.label=29;case 29:return Lr++,[3,27];case 30:return[2]}})})},N.prototype.mask=function(X){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(X.slice(0).reverse()),this.ctx.closePath()},N.prototype.path=function(X){this.ctx.beginPath(),this.formatPath(X),this.ctx.closePath()},N.prototype.formatPath=function(X){var z=this;X.forEach(function(ue,pe){var Re=Sn(ue)?ue.start:ue;pe===0?z.ctx.moveTo(Re.x,Re.y):z.ctx.lineTo(Re.x,Re.y),Sn(ue)&&z.ctx.bezierCurveTo(ue.startControl.x,ue.startControl.y,ue.endControl.x,ue.endControl.y,ue.end.x,ue.end.y)})},N.prototype.renderRepeat=function(X,z,ue,pe){this.path(X),this.ctx.fillStyle=z,this.ctx.translate(ue,pe),this.ctx.fill(),this.ctx.translate(-ue,-pe)},N.prototype.resizeImage=function(X,z,ue){var pe;if(X.width===z&&X.height===ue)return X;var Re=(pe=this.canvas.ownerDocument)!==null&&pe!==void 0?pe:document,ze=Re.createElement("canvas");ze.width=Math.max(1,z),ze.height=Math.max(1,ue);var Ge=ze.getContext("2d");return Ge.drawImage(X,0,0,X.width,X.height,0,0,z,ue),ze},N.prototype.renderBackgroundImage=function(X){return K(this,void 0,void 0,function(){var z,ue,pe,Re,ze,Ge;return M(this,function(ut){switch(ut.label){case 0:z=X.styles.backgroundImage.length-1,ue=function(yt){var Rt,Mt,sr,Wt,rr,Lr,or,ur,an,Wr,Wt,rr,Lr,or,ur,fn,lr,An,pn,Kr,_i,yi,Oi,ai,an,sa,Wt,za,Va,or,ur,Xa,rr,Lr,So,la,Ya,Bo,Oo,Ta,Io,Sa;return M(this,function(cs){switch(cs.label){case 0:if(!(yt.type===0))return[3,5];Rt=void 0,Mt=yt.url,cs.label=1;case 1:return cs.trys.push([1,3,,4]),[4,pe.context.cache.match(Mt)];case 2:return Rt=cs.sent(),[3,4];case 3:return cs.sent(),pe.context.logger.error("Error loading background-image "+Mt),[3,4];case 4:return Rt&&(sr=nA(X,z,[Rt.width,Rt.height,Rt.width/Rt.height]),Wt=sr[0],rr=sr[1],Lr=sr[2],or=sr[3],ur=sr[4],an=pe.ctx.createPattern(pe.resizeImage(Rt,or,ur),"repeat"),pe.renderRepeat(Wt,an,rr,Lr)),[3,6];case 5:pl(yt)?(Wr=nA(X,z,[null,null,null]),Wt=Wr[0],rr=Wr[1],Lr=Wr[2],or=Wr[3],ur=Wr[4],fn=yu(yt.angle,or,ur),lr=fn[0],An=fn[1],pn=fn[2],Kr=fn[3],_i=fn[4],yi=document.createElement("canvas"),yi.width=or,yi.height=ur,Oi=yi.getContext("2d"),ai=Oi.createLinearGradient(An,Kr,pn,_i),cl(yt.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&&(an=pe.ctx.createPattern(yi,"repeat"),pe.renderRepeat(Wt,an,rr,Lr))):ml(yt)&&(sa=nA(X,z,[null,null,null]),Wt=sa[0],za=sa[1],Va=sa[2],or=sa[3],ur=sa[4],Xa=yt.position.length===0?[ps]:yt.position,rr=on(Xa[0],or),Lr=on(Xa[Xa.length-1],ur),So=Ia(yt,rr,Lr,or,ur),la=So[0],Ya=So[1],la>0&&Ya>0&&(Bo=pe.ctx.createRadialGradient(za+rr,Va+Lr,0,za+rr,Va+Lr,la),cl(yt.stops,la*2).forEach(function(rl){return Bo.addColorStop(rl.stop,Wn(rl.color))}),pe.path(Wt),pe.ctx.fillStyle=Bo,la!==Ya?(Oo=X.bounds.left+.5*X.bounds.width,Ta=X.bounds.top+.5*X.bounds.height,Io=Ya/la,Sa=1/Io,pe.ctx.save(),pe.ctx.translate(Oo,Ta),pe.ctx.transform(1,0,0,Io,0,0),pe.ctx.translate(-Oo,-Ta),pe.ctx.fillRect(za,Sa*(Va-Ta)+Ta,or,ur*Sa),pe.ctx.restore()):pe.ctx.fill())),cs.label=6;case 6:return z--,[2]}})},pe=this,Re=0,ze=X.styles.backgroundImage.slice(0).reverse(),ut.label=1;case 1:return Re<ze.length?(Ge=ze[Re],[5,ue(Ge)]):[3,4];case 2:ut.sent(),ut.label=3;case 3:return Re++,[3,1];case 4:return[2]}})})},N.prototype.renderSolidBorder=function(X,z,ue){return K(this,void 0,void 0,function(){return M(this,function(pe){return this.path(lA(ue,z)),this.ctx.fillStyle=Wn(X),this.ctx.fill(),[2]})})},N.prototype.renderDoubleBorder=function(X,z,ue,pe){return K(this,void 0,void 0,function(){var Re,ze;return M(this,function(Ge){switch(Ge.label){case 0:return z<3?[4,this.renderSolidBorder(X,ue,pe)]:[3,2];case 1:return Ge.sent(),[2];case 2:return Re=fA(pe,ue),this.path(Re),this.ctx.fillStyle=Wn(X),this.ctx.fill(),ze=pA(pe,ue),this.path(ze),this.ctx.fill(),[2]}})})},N.prototype.renderNodeBackgroundAndBorders=function(X){return K(this,void 0,void 0,function(){var z,ue,pe,Re,ze,Ge,ut,yt,Rt=this;return M(this,function(Mt){switch(Mt.label){case 0:return this.applyEffects(X.getEffects(2)),z=X.container.styles,ue=!Pi(z.backgroundColor)||z.backgroundImage.length,pe=[{style:z.borderTopStyle,color:z.borderTopColor,width:z.borderTopWidth},{style:z.borderRightStyle,color:z.borderRightColor,width:z.borderRightWidth},{style:z.borderBottomStyle,color:z.borderBottomColor,width:z.borderBottomWidth},{style:z.borderLeftStyle,color:z.borderLeftColor,width:z.borderLeftWidth}],Re=TA(As(z.backgroundClip,0),X.curves),ue||z.boxShadow.length?(this.ctx.save(),this.path(Re),this.ctx.clip(),Pi(z.backgroundColor)||(this.ctx.fillStyle=Wn(z.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(X.container)]):[3,2];case 1:Mt.sent(),this.ctx.restore(),z.boxShadow.slice(0).reverse().forEach(function(sr){Rt.ctx.save();var Wt=vi(X.curves),rr=sr.inset?0:_A,Lr=hA(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?(Rt.path(Wt),Rt.ctx.clip(),Rt.mask(Lr)):(Rt.mask(Wt),Rt.ctx.clip(),Rt.path(Lr)),Rt.ctx.shadowOffsetX=sr.offsetX.number+rr,Rt.ctx.shadowOffsetY=sr.offsetY.number,Rt.ctx.shadowColor=Wn(sr.color),Rt.ctx.shadowBlur=sr.blur.number,Rt.ctx.fillStyle=sr.inset?Wn(sr.color):"rgba(0,0,0,1)",Rt.ctx.fill(),Rt.ctx.restore()}),Mt.label=2;case 2:ze=0,Ge=0,ut=pe,Mt.label=3;case 3:return Ge<ut.length?(yt=ut[Ge],yt.style!==0&&!Pi(yt.color)&&yt.width>0?yt.style===2?[4,this.renderDashedDottedBorder(yt.color,yt.width,ze,X.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Mt.sent(),[3,11];case 5:return yt.style===3?[4,this.renderDashedDottedBorder(yt.color,yt.width,ze,X.curves,3)]:[3,7];case 6:return Mt.sent(),[3,11];case 7:return yt.style===4?[4,this.renderDoubleBorder(yt.color,yt.width,ze,X.curves)]:[3,9];case 8:return Mt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(yt.color,ze,X.curves)];case 10:Mt.sent(),Mt.label=11;case 11:ze++,Mt.label=12;case 12:return Ge++,[3,3];case 13:return[2]}})})},N.prototype.renderDashedDottedBorder=function(X,z,ue,pe,Re){return K(this,void 0,void 0,function(){var ze,Ge,ut,yt,Rt,Mt,sr,Wt,rr,Lr,or,ur,an,Wr,fn,lr,fn,lr;return M(this,function(An){return this.ctx.save(),ze=mA(pe,ue),Ge=lA(pe,ue),Re===2&&(this.path(Ge),this.ctx.clip()),Sn(Ge[0])?(ut=Ge[0].start.x,yt=Ge[0].start.y):(ut=Ge[0].x,yt=Ge[0].y),Sn(Ge[1])?(Rt=Ge[1].end.x,Mt=Ge[1].end.y):(Rt=Ge[1].x,Mt=Ge[1].y),ue===0||ue===2?sr=Math.abs(ut-Rt):sr=Math.abs(yt-Mt),this.ctx.beginPath(),Re===3?this.formatPath(ze):this.formatPath(Ge.slice(0,2)),Wt=z<3?z*3:z*2,rr=z<3?z*2:z,Re===3&&(Wt=z,rr=z),Lr=!0,sr<=Wt*2?Lr=!1:sr<=Wt*2+rr?(or=sr/(2*Wt+rr),Wt*=or,rr*=or):(ur=Math.floor((sr+rr)/(Wt+rr)),an=(sr-ur*Wt)/(ur-1),Wr=(sr-(ur+1)*Wt)/ur,rr=Wr<=0||Math.abs(rr-an)<Math.abs(rr-Wr)?an:Wr),Lr&&(Re===3?this.ctx.setLineDash([0,Wt+rr]):this.ctx.setLineDash([Wt,rr])),Re===3?(this.ctx.lineCap="round",this.ctx.lineWidth=z):this.ctx.lineWidth=z*2+1.1,this.ctx.strokeStyle=Wn(X),this.ctx.stroke(),this.ctx.setLineDash([]),Re===2&&(Sn(Ge[0])&&(fn=Ge[3],lr=Ge[0],this.ctx.beginPath(),this.formatPath([new Gt(fn.end.x,fn.end.y),new Gt(lr.start.x,lr.start.y)]),this.ctx.stroke()),Sn(Ge[1])&&(fn=Ge[1],lr=Ge[2],this.ctx.beginPath(),this.formatPath([new Gt(fn.end.x,fn.end.y),new Gt(lr.start.x,lr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},N.prototype.render=function(X){return K(this,void 0,void 0,function(){var z;return M(this,function(ue){switch(ue.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)),z=dA(X),[4,this.renderStack(z)];case 1:return ue.sent(),this.applyEffects([]),[2,this.canvas]}})})},N}(cA),CA=function(W){return W instanceof ru||W instanceof tu?!0:W instanceof is&&W.type!==aa&&W.type!==ja},TA=function(W,N){switch(W){case 0:return vi(N);case 2:return Vn(N);case 1:default:return Ga(N)}},SA=function(W){switch(W){case 1:return"center";case 2:return"right";case 0:default:return"left"}},BA=["-apple-system","system-ui"],OA=function(W){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?W.filter(function(N){return BA.indexOf(N)===-1}):W},IA=function(W){Q(N,W);function N(X,z){var ue=W.call(this,X,z)||this;return ue.canvas=z.canvas?z.canvas:document.createElement("canvas"),ue.ctx=ue.canvas.getContext("2d"),ue.options=z,ue.canvas.width=Math.floor(z.width*z.scale),ue.canvas.height=Math.floor(z.height*z.scale),ue.canvas.style.width=z.width+"px",ue.canvas.style.height=z.height+"px",ue.ctx.scale(ue.options.scale,ue.options.scale),ue.ctx.translate(-z.x,-z.y),ue.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+z.width+"x"+z.height+" at "+z.x+","+z.y+") with scale "+z.scale),ue}return N.prototype.render=function(X){return K(this,void 0,void 0,function(){var z,ue;return M(this,function(pe){switch(pe.label){case 0:return z=qo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,X),[4,RA(z)];case 1:return ue=pe.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(ue,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},N}(cA),RA=function(W){return new Promise(function(N,X){var z=new Image;z.onload=function(){N(z)},z.onerror=X,z.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(W))})},LA=function(){function W(N){var X=N.id,z=N.enabled;this.id=X,this.enabled=z,this.start=Date.now()}return W.prototype.debug=function(){for(var N=[],X=0;X<arguments.length;X++)N[X]=arguments[X];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,B([this.id,this.getTime()+"ms"],N)):this.info.apply(this,N))},W.prototype.getTime=function(){return Date.now()-this.start},W.prototype.info=function(){for(var N=[],X=0;X<arguments.length;X++)N[X]=arguments[X];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,B([this.id,this.getTime()+"ms"],N)))},W.prototype.warn=function(){for(var N=[],X=0;X<arguments.length;X++)N[X]=arguments[X];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,B([this.id,this.getTime()+"ms"],N)):this.info.apply(this,N))},W.prototype.error=function(){for(var N=[],X=0;X<arguments.length;X++)N[X]=arguments[X];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,B([this.id,this.getTime()+"ms"],N)):this.info.apply(this,N))},W.instances={},W}(),DA=function(){function W(N,X){var z;this.windowBounds=X,this.instanceName="#"+W.instanceCount++,this.logger=new LA({id:this.instanceName,enabled:N.logging}),this.cache=(z=N.cache)!==null&&z!==void 0?z:new kr(this,N)}return W.instanceCount=1,W}(),MA=function(W,N){return N===void 0&&(N={}),FA(W,N)};typeof window!="undefined"&&pr.setContext(window);var FA=function(W,N){return K(void 0,void 0,void 0,function(){var X,z,ue,pe,Re,ze,Ge,ut,yt,Rt,Mt,sr,Wt,rr,Lr,or,ur,an,Wr,fn,lr,An,lr,pn,Kr,_i,yi,Oi,ai,sa,za,Va,Xa,So,la,Ya,Bo,Oo,Ta,Io;return M(this,function(Sa){switch(Sa.label){case 0:if(!W||typeof W!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(X=W.ownerDocument,!X)throw new Error("Element is not attached to a Document");if(z=X.defaultView,!z)throw new Error("Document is not attached to a Window");return ue={allowTaint:(pn=N.allowTaint)!==null&&pn!==void 0?pn:!1,imageTimeout:(Kr=N.imageTimeout)!==null&&Kr!==void 0?Kr:15e3,proxy:N.proxy,useCORS:(_i=N.useCORS)!==null&&_i!==void 0?_i:!1},pe=O({logging:(yi=N.logging)!==null&&yi!==void 0?yi:!0,cache:N.cache},ue),Re={windowWidth:(Oi=N.windowWidth)!==null&&Oi!==void 0?Oi:z.innerWidth,windowHeight:(ai=N.windowHeight)!==null&&ai!==void 0?ai:z.innerHeight,scrollX:(sa=N.scrollX)!==null&&sa!==void 0?sa:z.pageXOffset,scrollY:(za=N.scrollY)!==null&&za!==void 0?za:z.pageYOffset},ze=new R(Re.scrollX,Re.scrollY,Re.windowWidth,Re.windowHeight),Ge=new DA(pe,ze),ut=(Va=N.foreignObjectRendering)!==null&&Va!==void 0?Va:!1,yt={allowTaint:(Xa=N.allowTaint)!==null&&Xa!==void 0?Xa:!1,onclone:N.onclone,ignoreElements:N.ignoreElements,inlineImages:ut,copyStyles:ut},Ge.logger.debug("Starting document clone with size "+ze.width+"x"+ze.height+" scrolled to "+-ze.left+","+-ze.top),Rt=new F(Ge,W,yt),Mt=Rt.clonedReferenceElement,Mt?[4,Rt.toIFrame(X,ze)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return sr=Sa.sent(),Wt=wn(Mt)||tA(Mt)?t(Mt.ownerDocument):b(Ge,Mt),rr=Wt.width,Lr=Wt.height,or=Wt.left,ur=Wt.top,an=UA(Ge,Mt,N.backgroundColor),Wr={canvas:N.canvas,backgroundColor:an,scale:(la=(So=N.scale)!==null&&So!==void 0?So:z.devicePixelRatio)!==null&&la!==void 0?la:1,x:((Ya=N.x)!==null&&Ya!==void 0?Ya:0)+or,y:((Bo=N.y)!==null&&Bo!==void 0?Bo:0)+ur,width:(Oo=N.width)!==null&&Oo!==void 0?Oo:Math.ceil(rr),height:(Ta=N.height)!==null&&Ta!==void 0?Ta:Math.ceil(Lr)},ut?(Ge.logger.debug("Document cloned, using foreign object rendering"),lr=new IA(Ge,Wr),[4,lr.render(Mt)]):[3,3];case 2:return fn=Sa.sent(),[3,5];case 3:return Ge.logger.debug("Document cloned, element located at "+or+","+ur+" with size "+rr+"x"+Lr+" using computed rendering"),Ge.logger.debug("Starting DOM parsing"),An=au(Ge,Mt),an===An.styles.backgroundColor&&(An.styles.backgroundColor=Si.TRANSPARENT),Ge.logger.debug("Starting renderer for element at "+Wr.x+","+Wr.y+" with size "+Wr.width+"x"+Wr.height),lr=new xA(Ge,Wr),[4,lr.render(An)];case 4:fn=Sa.sent(),Sa.label=5;case 5:return((Io=N.removeContainer)!==null&&Io!==void 0?Io:!0)&&(F.destroy(sr)||Ge.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ge.logger.debug("Finished rendering"),[2,fn]}})})},UA=function(W,N,X){var z=N.ownerDocument,ue=z.documentElement?ca(W,getComputedStyle(z.documentElement).backgroundColor):Si.TRANSPARENT,pe=z.body?ca(W,getComputedStyle(z.body).backgroundColor):Si.TRANSPARENT,Re=typeof X=="string"?ca(W,X):X===null?Si.TRANSPARENT:4294967295;return N===z.documentElement?Pi(ue)?Pi(pe)?Re:pe:ue:Re};return MA})},wRmb:function(Xe,le,H){"use strict";H.d(le,"a",function(){return E});var Z=H("rePB"),Q=H("KQm4"),O=H("VTBJ"),K=H("Ff2n"),M=H("q1tI"),B=H.n(M),R=H("Kwbf"),b=H("Zm9Q"),t=H("hW8S");function E(o){return Object(b.a)(o).filter(function(f){return M.isValidElement(f)}).map(function(f){var l=f.key,c=f.props,a=c.children,u=Object(K.a)(c,["children"]),v=Object(O.a)({key:l},u);return a&&(v.children=E(a)),v})}function i(o){return o.reduce(function(f,l){var c=l.fixed,a=c===!0?"left":c,u=l.children;return u&&u.length>0?[].concat(Object(Q.a)(f),Object(Q.a)(i(u).map(function(v){return Object(O.a)({fixed:a},v)}))):[].concat(Object(Q.a)(f),[Object(O.a)(Object(O.a)({},l),{},{fixed:a})])},[])}function A(o){for(var f=!0,l=0;l<o.length;l+=1){var c=o[l];if(f&&c.fixed!=="left")f=!1;else if(!f&&c.fixed==="left"){Object(R.a)(!1,"Index ".concat(l-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,u=o.length-1;u>=0;u-=1){var v=o[u];if(a&&v.fixed!=="right")a=!1;else if(!a&&v.fixed==="right"){Object(R.a)(!1,"Index ".concat(u+1," of `columns` missing `fixed='right'` prop."));break}}}function h(o){return o.map(function(f){var l=f.fixed,c=Object(K.a)(f,["fixed"]),a=l;return l==="left"?a="right":l==="right"&&(a="left"),Object(O.a)({fixed:a},c)})}function s(o,f){var l=o.prefixCls,c=o.columns,a=o.children,u=o.expandable,v=o.expandedKeys,T=o.getRowKey,x=o.onTriggerExpand,D=o.expandIcon,w=o.rowExpandable,p=o.expandIconColumnIndex,n=o.direction,d=o.expandRowByClick,m=M.useMemo(function(){return c||E(a)},[c,a]),C=M.useMemo(function(){if(u){var U,k=p||0,I=m[k],V=(U={},Object(Z.a)(U,t.a,{className:"".concat(l,"-expand-icon-col")}),Object(Z.a)(U,"title",""),Object(Z.a)(U,"fixed",I?I.fixed:null),Object(Z.a)(U,"className","".concat(l,"-row-expand-icon-cell")),Object(Z.a)(U,"render",function($,Y,ne){var se=T(Y,ne),_e=v.has(se),ve=w?w(Y):!0,Ce=D({prefixCls:l,expanded:_e,expandable:ve,record:Y,onExpand:x});return d?M.createElement("span",{onClick:function(Qe){return Qe.stopPropagation()}},Ce):Ce}),U),G=m.slice();return k>=0&&G.splice(k,0,V),G}return m},[u,m,T,v,D,n]),y=M.useMemo(function(){var U=C;return f&&(U=f(U)),U.length||(U=[{render:function(){return null}}]),U},[f,C,n]),g=M.useMemo(function(){return n==="rtl"?h(i(y)):i(y)},[y,n]);return[y,g]}le.b=s},x6Kt:function(Xe,le,H){var Z=H("y+Vt"),Q=H("VpOo"),O=H("nPnh"),K=O.subPixelOptimizeRect,M={},B=Z.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(R,b){var t,E,i,A;this.subPixelOptimize?(K(M,b,this.style),t=M.x,E=M.y,i=M.width,A=M.height,M.r=b.r,b=M):(t=b.x,E=b.y,i=b.width,A=b.height),b.r?Q.buildPath(R,b):R.rect(t,E,i,A),R.closePath();return}});Xe.exports=B},"y+Vt":function(Xe,le,H){var Z=H("Gev7"),Q=H("bYtY"),O=H("IMiH"),K=H("2DNl"),M=H("3C/r"),B=M.prototype.getCanvasPattern,R=Math.abs,b=new O(!0);function t(i){Z.call(this,i),this.path=null}t.prototype={constructor:t,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,A){var h=this.style,s=this.path||b,o=h.hasStroke(),f=h.hasFill(),l=h.fill,c=h.stroke,a=f&&!!l.colorStops,u=o&&!!c.colorStops,v=f&&!!l.image,T=o&&!!c.image;if(h.bind(i,this,A),this.setTransform(i),this.__dirty){var x;a&&(x=x||this.getBoundingRect(),this._fillGradient=h.getGradient(i,l,x)),u&&(x=x||this.getBoundingRect(),this._strokeGradient=h.getGradient(i,c,x))}a?i.fillStyle=this._fillGradient:v&&(i.fillStyle=B.call(l,i)),u?i.strokeStyle=this._strokeGradient:T&&(i.strokeStyle=B.call(c,i));var D=h.lineDash,w=h.lineDashOffset,p=!!i.setLineDash,n=this.getGlobalScale();if(s.setScale(n[0],n[1],this.segmentIgnoreThreshold),this.__dirtyPath||D&&!p&&o?(s.beginPath(i),D&&!p&&(s.setLineDash(D),s.setLineDashOffset(w)),this.buildPath(s,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),f)if(h.fillOpacity!=null){var d=i.globalAlpha;i.globalAlpha=h.fillOpacity*h.opacity,s.fill(i),i.globalAlpha=d}else s.fill(i);if(D&&p&&(i.setLineDash(D),i.lineDashOffset=w),o)if(h.strokeOpacity!=null){var d=i.globalAlpha;i.globalAlpha=h.strokeOpacity*h.opacity,s.stroke(i),i.globalAlpha=d}else s.stroke(i);D&&p&&i.setLineDash([]),h.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,A,h){},createPathProxy:function(){this.path=new O},getBoundingRect:function(){var i=this._rect,A=this.style,h=!i;if(h){var s=this.path;s||(s=this.path=new O),this.__dirtyPath&&(s.beginPath(),this.buildPath(s,this.shape,!1)),i=s.getBoundingRect()}if(this._rect=i,A.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||h){o.copy(i);var f=A.lineWidth,l=A.strokeNoScale?this.getLineScale():1;A.hasFill()||(f=Math.max(f,this.strokeContainThreshold||4)),l>1e-10&&(o.width+=f/l,o.height+=f/l,o.x-=f/l/2,o.y-=f/l/2)}return o}return i},contain:function(i,A){var h=this.transformCoordToLocal(i,A),s=this.getBoundingRect(),o=this.style;if(i=h[0],A=h[1],s.contain(i,A)){var f=this.path.data;if(o.hasStroke()){var l=o.lineWidth,c=o.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(o.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),K.containStroke(f,l/c,i,A)))return!0}if(o.hasFill())return K.contain(f,i,A)}return!1},dirty:function(i){i==null&&(i=!0),i&&(this.__dirtyPath=i,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(i){return this.animate("shape",i)},attrKV:function(i,A){i==="shape"?(this.setShape(A),this.__dirtyPath=!0,this._rect=null):Z.prototype.attrKV.call(this,i,A)},setShape:function(i,A){var h=this.shape;if(h){if(Q.isObject(i))for(var s in i)i.hasOwnProperty(s)&&(h[s]=i[s]);else h[i]=A;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&R(i[0]-1)>1e-10&&R(i[3]-1)>1e-10?Math.sqrt(R(i[0]*i[3]-i[2]*i[1])):1}},t.extend=function(i){var A=function(s){t.call(this,s),i.style&&this.style.extendFrom(i.style,!1);var o=i.shape;if(o){this.shape=this.shape||{};var f=this.shape;for(var l in o)!f.hasOwnProperty(l)&&o.hasOwnProperty(l)&&(f[l]=o[l])}i.init&&i.init.call(this,s)};Q.inherits(A,t);for(var h in i)h!=="style"&&h!=="shape"&&(A.prototype[h]=i[h]);return A},Q.inherits(t,Z);var E=t;Xe.exports=E},"y0+3":function(Xe,le,H){"use strict";H.d(le,"a",function(){return i}),H.d(le,"b",function(){return h});var Z=/margin|padding|width|height|max|min|offset/,Q={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function K(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function M(s,o,f){if(o=o.toLowerCase(),f==="auto"){if(o==="height")return s.offsetHeight;if(o==="width")return s.offsetWidth}return o in Q||(Q[o]=Z.test(o)),Q[o]?parseFloat(f)||0:f}function B(s,o){var f=arguments.length,l=K(s);return o=O[o]?"cssFloat"in s.style?"cssFloat":"styleFloat":o,f===1?l:M(s,o,l[o]||s.style[o])}function R(s,o,f){var l=arguments.length;if(o=O[o]?"cssFloat"in s.style?"cssFloat":"styleFloat":o,l===3)return typeof f=="number"&&Z.test(o)&&(f="".concat(f,"px")),s.style[o]=f,f;for(var c in o)o.hasOwnProperty(c)&&R(s,c,o[c]);return K(s)}function b(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function t(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function E(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:o}}function i(){var s=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:o}}function A(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function h(s){var o=s.getBoundingClientRect(),f=document.documentElement;return{left:o.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},y23F:function(Xe,le){function H(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}H.prototype={constructor:H,_dragStart:function(O){for(var K=O.target;K&&!K.draggable;)K=K.parent;K&&(this._draggingTarget=K,K.dragging=!0,this._x=O.offsetX,this._y=O.offsetY,this.dispatchToElement(Z(K,O),"dragstart",O.event))},_drag:function(O){var K=this._draggingTarget;if(K){var M=O.offsetX,B=O.offsetY,R=M-this._x,b=B-this._y;this._x=M,this._y=B,K.drift(R,b,O),this.dispatchToElement(Z(K,O),"drag",O.event);var t=this.findHover(M,B,K).target,E=this._dropTarget;this._dropTarget=t,K!==t&&(E&&t!==E&&this.dispatchToElement(Z(E,O),"dragleave",O.event),t&&t!==E&&this.dispatchToElement(Z(t,O),"dragenter",O.event))}},_dragEnd:function(O){var K=this._draggingTarget;K&&(K.dragging=!1),this.dispatchToElement(Z(K,O),"dragend",O.event),this._dropTarget&&this.dispatchToElement(Z(this._dropTarget,O),"drop",O.event),this._draggingTarget=null,this._dropTarget=null}};function Z(O,K){return{target:O,topTarget:K&&K.topTarget}}var Q=H;Xe.exports=Q},yxFR:function(Xe,le,H){var Z=H("y+Vt"),Q=H("nPnh"),O=Q.subPixelOptimizeLine,K={},M=Z.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(B,R){var b,t,E,i;this.subPixelOptimize?(O(K,R,this.style),b=K.x1,t=K.y1,E=K.x2,i=K.y2):(b=R.x1,t=R.y1,E=R.x2,i=R.y2);var A=R.percent;if(A===0)return;B.moveTo(b,t),A<1&&(E=b*(1-A)+E*A,i=t*(1-A)+i*A),B.lineTo(E,i)},pointAt:function(B){var R=this.shape;return[R.x1*(1-B)+R.x2*B,R.y1*(1-B)+R.y2*B]}});Xe.exports=M},z9Ch:function(Xe,le,H){Xe.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(Xe,le,H){var Z=H("YH21"),Q=Z.addEventListener,O=Z.removeEventListener,K=Z.normalizeEvent,M=Z.getNativeEvent,B=H("bYtY"),R=H("H6uX"),b=H("ItGF"),t=300,E=b.domSupported,i=function(){var g=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],U=["touchstart","touchend","touchmove"],k={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},I=B.map(g,function(V){var G=V.replace("mouse","pointer");return k.hasOwnProperty(G)?G:V});return{mouse:g,touch:U,pointer:I}}(),A={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function h(g){return g==="mousewheel"&&b.browser.firefox?"DOMMouseScroll":g}function s(g){var U=g.pointerType;return U==="pen"||U==="touch"}function o(g){g.touching=!0,g.touchTimer!=null&&(clearTimeout(g.touchTimer),g.touchTimer=null),g.touchTimer=setTimeout(function(){g.touching=!1,g.touchTimer=null},700)}function f(g){g&&(g.zrByTouch=!0)}function l(g,U){return K(g.dom,new a(g,U),!0)}function c(g,U){for(var k=U,I=!1;k&&k.nodeType!==9&&!(I=k.domBelongToZr||k!==U&&k===g.painterRoot);)k=k.parentNode;return I}function a(g,U){this.type=U.type,this.target=this.currentTarget=g.dom,this.pointerType=U.pointerType,this.clientX=U.clientX,this.clientY=U.clientY}var u=a.prototype;u.stopPropagation=u.stopImmediatePropagation=u.preventDefault=B.noop;var v={mousedown:function(g){g=K(this.dom,g),this._mayPointerCapture=[g.zrX,g.zrY],this.trigger("mousedown",g)},mousemove:function(g){g=K(this.dom,g);var U=this._mayPointerCapture;U&&(g.zrX!==U[0]||g.zrY!==U[1])&&n(this,!0),this.trigger("mousemove",g)},mouseup:function(g){g=K(this.dom,g),n(this,!1),this.trigger("mouseup",g)},mouseout:function(g){g=K(this.dom,g),this._pointerCapturing&&(g.zrEventControl="no_globalout");var U=g.toElement||g.relatedTarget;g.zrIsToLocalDOM=c(this,U),this.trigger("mouseout",g)},touchstart:function(g){g=K(this.dom,g),f(g),this._lastTouchMoment=new Date,this.handler.processGesture(g,"start"),v.mousemove.call(this,g),v.mousedown.call(this,g)},touchmove:function(g){g=K(this.dom,g),f(g),this.handler.processGesture(g,"change"),v.mousemove.call(this,g)},touchend:function(g){g=K(this.dom,g),f(g),this.handler.processGesture(g,"end"),v.mouseup.call(this,g),+new Date-this._lastTouchMoment<t&&v.click.call(this,g)},pointerdown:function(g){v.mousedown.call(this,g)},pointermove:function(g){s(g)||v.mousemove.call(this,g)},pointerup:function(g){v.mouseup.call(this,g)},pointerout:function(g){s(g)||v.mouseout.call(this,g)}};B.each(["click","mousewheel","dblclick","contextmenu"],function(g){v[g]=function(U){U=K(this.dom,U),this.trigger(g,U)}});var T={pointermove:function(g){s(g)||T.mousemove.call(this,g)},pointerup:function(g){T.mouseup.call(this,g)},mousemove:function(g){this.trigger("mousemove",g)},mouseup:function(g){var U=this._pointerCapturing;n(this,!1),this.trigger("mouseup",g),U&&(g.zrEventControl="only_globalout",this.trigger("mouseout",g))}};function x(g,U){var k=U.domHandlers;b.pointerEventsSupported?B.each(i.pointer,function(I){w(U,I,function(V){k[I].call(g,V)})}):(b.touchEventsSupported&&B.each(i.touch,function(I){w(U,I,function(V){k[I].call(g,V),o(U)})}),B.each(i.mouse,function(I){w(U,I,function(V){V=M(V),U.touching||k[I].call(g,V)})}))}function D(g,U){b.pointerEventsSupported?B.each(A.pointer,k):b.touchEventsSupported||B.each(A.mouse,k);function k(I){function V(G){G=M(G),c(g,G.target)||(G=l(g,G),U.domHandlers[I].call(g,G))}w(U,I,V,{capture:!0})}}function w(g,U,k,I){g.mounted[U]=k,g.listenerOpts[U]=I,Q(g.domTarget,h(U),k,I)}function p(g){var U=g.mounted;for(var k in U)U.hasOwnProperty(k)&&O(g.domTarget,h(k),U[k],g.listenerOpts[k]);g.mounted={}}function n(g,U){if(g._mayPointerCapture=null,E&&g._pointerCapturing^U){g._pointerCapturing=U;var k=g._globalHandlerScope;U?D(g,k):p(k)}}function d(g,U){this.domTarget=g,this.domHandlers=U,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function m(g,U){R.call(this),this.dom=g,this.painterRoot=U,this._localHandlerScope=new d(g,v),E&&(this._globalHandlerScope=new d(document,T)),this._pointerCapturing=!1,this._mayPointerCapture=null,x(this,this._localHandlerScope)}var C=m.prototype;C.dispose=function(){p(this._localHandlerScope),E&&p(this._globalHandlerScope)},C.setCursor=function(g){this.dom.style&&(this.dom.style.cursor=g||"default")},B.mixin(m,R);var y=m;Xe.exports=y}}]);