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...

457 lines
1.7 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[110,3,5,7,8,13],{"+NIl":function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";Y.defineMode("stex",function(B,I){"use strict";function F(a,i){a.cmdState.push(i)}function T(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function R(a){var i=a.cmdState.pop();i&&i.closeBracket()}function P(a){for(var i=a.cmdState,d=i.length-1;d>=0;d--){var s=i[d];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function m(a,i,d){return function(){this.name=a,this.bracketNo=0,this.style=i,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=m("importmodule","tag",["string","builtin"]),t.documentclass=m("documentclass","tag",["","atom"]),t.usepackage=m("usepackage","tag",["atom"]),t.begin=m("begin","tag",["atom"]),t.end=m("end","tag",["atom"]),t.label=m("label","tag",["atom"]),t.ref=m("ref","tag",["atom"]),t.eqref=m("eqref","tag",["atom"]),t.cite=m("cite","tag",["atom"]),t.bibitem=m("bibitem","tag",["atom"]),t.Bibitem=m("Bibitem","tag",["atom"]),t.RBibitem=m("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function b(a,i){a.f=i}function o(a,i){var d;if(a.match(/^\\[a-zA-Z@]+/)){var s=a.current().slice(1);return d=t.hasOwnProperty(s)?t[s]:t.DEFAULT,d=new d,F(i,d),b(i,f),d.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/\\]/))return"tag";if(a.match("\\["))return b(i,function(l,c){return u(l,c,"\\]")}),"keyword";if(a.match("\\("))return b(i,function(l,c){return u(l,c,"\\)")}),"keyword";if(a.match("$$"))return b(i,function(l,c){return u(l,c,"$$")}),"keyword";if(a.match("$"))return b(i,function(l,c){return u(l,c,"$")}),"keyword";var n=a.next();if(n=="%")return a.skipToEnd(),"comment";if(n=="}"||n=="]"){if(d=T(i),d)d.closeBracket(n),b(i,f);else return"error";return"bracket"}else return n=="{"||n=="["?(d=t.DEFAULT,d=new d,F(i,d),"bracket"):/\d/.test(n)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w\-_]/),d=P(i),d.name=="begin"&&(d.argument=a.current()),d.styleIdentifier())}function u(a,i,d){if(a.eatSpace())return null;if(d&&a.match(d))return b(i,o),"keyword";if(a.match(/^\\[a-zA-Z@]+/))return"tag";if(a.match(/^[a-zA-Z]+/))return"variable-2";if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";if(a.match(/^[\^_&]/))return"tag";if(a.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(a.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=a.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(a.skipToEnd(),"comment"):"error"}function f(a,i){var d=a.peek(),s;return d=="{"||d=="["?(s=T(i),s.openBracket(d),a.eat(d),b(i,o),"bracket"):/[ \t\r]/.test(d)?(a.eat(d),null):(b(i,o),R(i),o(a,i))}return{startState:function(){var a=I.inMathMode?function(i,d){return u(i,d)}:o;return{cmdState:[],f:a}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,i){return i.f(a,i)},blankLine:function(a){a.f=o,a.cmdState.length=0},lineComment:"%"}}),Y.defineMIME("text/x-stex","stex"),Y.defineMIME("text/x-latex","stex")})},"+ua5":function(Be,J,L){},"/cxE":function(Be,J,L){"use strict";L.d(J,"f",function(){return I}),L.d(J,"g",function(){return F}),L.d(J,"h",function(){return T}),L.d(J,"e",function(){return P}),L.d(J,"b",function(){return m}),L.d(J,"c",function(){return t}),L.d(J,"d",function(){return b}),L.d(J,"a",function(){return o});class Y{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(u){setTimeout(()=>{throw u.stack?new Error(u.message+`
`+u.stack):u},0)}}emit(u){this.listeners.forEach(f=>{f(u)})}onUnexpectedError(u){this.unexpectedErrorHandler(u),this.emit(u)}onUnexpectedExternalError(u){this.unexpectedErrorHandler(u)}}const B=new Y;function I(u){P(u)||B.onUnexpectedError(u);return}function F(u){P(u)||B.onUnexpectedExternalError(u);return}function T(u){if(u instanceof Error){let{name:f,message:a}=u;const i=u.stacktrace||u.stack;return{$isError:!0,name:f,message:a,stack:i}}return u}const R="Canceled";function P(u){return u instanceof Error&&u.name===R&&u.message===R}function m(){const u=new Error(R);return u.name=u.message,u}function t(u){return u?new Error(`Illegal argument: ${u}`):new Error("Illegal argument")}function b(u){return u?new Error(`Illegal state: ${u}`):new Error("Illegal state")}class o extends Error{constructor(u){super("NotSupported");u&&(this.message=u)}}},"06Qe":function(Be,J,L){var Y=L("ItGF"),B="urn:schemas-microsoft-com:vml",I=typeof window=="undefined"?null:window,F=!1,T=I&&I.document;function R(t){return P(t)}var P;if(T&&!Y.canvasSupported)try{!T.namespaces.zrvml&&T.namespaces.add("zrvml",B),P=function(t){return T.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){P=function(b){return T.createElement("<"+b+' xmlns="'+B+'" class="zrvml">')}}function m(){if(F||!T)return;F=!0;var t=T.styleSheets;t.length<31?T.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}J.doc=T,J.createNode=R,J.initVML=m},"0s+r":function(Be,J,L){var Y=L("bYtY"),B=L("QBsz"),I=L("y23F"),F=L("H6uX"),T=L("YH21"),R=L("C0SR"),P="silent";function m(d,s,n){return{type:d,event:n,target:s.target,topTarget:s.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:t}}function t(){T.stop(this.event)}function b(){}b.prototype.dispose=function(){};var o=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],u=function(d,s,n,l){F.call(this),this.storage=d,this.painter=s,this.painterRoot=l,n=n||new b,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,I.call(this),this.setHandlerProxy(n)};u.prototype={constructor:u,setHandlerProxy:function(d){this.proxy&&this.proxy.dispose(),d&&(Y.each(o,function(s){d.on&&d.on(s,this[s],this)},this),d.handler=this),this.proxy=d},mousemove:function(d){var s=d.zrX,n=d.zrY,l=a(this,s,n),c=this._hovered,x=c.target;x&&!x.__zr&&(c=this.findHover(c.x,c.y),x=c.target);var A=this._hovered=l?{x:s,y:n}:this.findHover(s,n),C=A.target,k=this.proxy;k.setCursor&&k.setCursor(C?C.cursor:"default"),x&&C!==x&&this.dispatchToElement(c,"mouseout",d),this.dispatchToElement(A,"mousemove",d),C&&C!==x&&this.dispatchToElement(A,"mouseover",d)},mouseout:function(d){var s=d.zrEventControl,n=d.zrIsToLocalDOM;s!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",d),s!=="no_globalout"&&(!n&&this.trigger("globalout",{type:"globalout",event:d}))},resize:function(d){this._hovered={}},dispatch:function(d,s){var n=this[d];n&&n.call(this,s)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(d){var s=this.proxy;s.setCursor&&s.setCursor(d)},dispatchToElement:function(d,s,n){d=d||{};var l=d.target;if(l&&l.silent)return;for(var c="on"+s,x=m(s,d,n);l&&!(l[c]&&(x.cancelBubble=l[c].call(l,x)),l.trigger(s,x),l=l.parent,x.cancelBubble););x.cancelBubble||(this.trigger(s,x),this.painter&&this.painter.eachOtherLayer(function(A){typeof A[c]=="function"&&A[c].call(A,x),A.trigger&&A.trigger(s,x)}))},findHover:function(d,s,n){for(var l=this.storage.getDisplayList(),c={x:d,y:s},x=l.length-1;x>=0;x--){var A;if(l[x]!==n&&!l[x].ignore&&(A=f(l[x],d,s))&&(!c.topTarget&&(c.topTarget=l[x]),A!==P)){c.target=l[x];break}}return c},processGesture:function(d,s){this._gestureMgr||(this._gestureMgr=new R);var n=this._gestureMgr;s==="start"&&n.clear();var l=n.recognize(d,this.findHover(d.zrX,d.zrY,null).target,this.proxy.dom);if(s==="end"&&n.clear(),l){var c=l.type;d.gestureEvent=c,this.dispatchToElement({target:l.target},c,l.event)}}},Y.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(d){u.prototype[d]=function(s){var n=s.zrX,l=s.zrY,c=a(this,n,l),x,A;if((d!=="mouseup"||!c)&&(x=this.findHover(n,l),A=x.target),d==="mousedown")this._downEl=A,this._downPoint=[s.zrX,s.zrY],this._upEl=A;else if(d==="mouseup")this._upEl=A;else if(d==="click"){if(this._downEl!==this._upEl||!this._downPoint||B.dist(this._downPoint,[s.zrX,s.zrY])>4)return;this._downPoint=null}this.dispatchToElement(x,d,s)}});function f(d,s,n){if(d[d.rectHover?"rectContain":"contain"](s,n)){for(var l=d,c;l;){if(l.clipPath&&!l.clipPath.contain(s,n))return!1;l.silent&&(c=!0),l=l.parent}return c?P:!0}return!1}function a(d,s,n){var l=d.painter;return s<0||s>l.getWidth()||n<0||n>l.getHeight()}Y.mixin(u,F),Y.mixin(u,I);var i=u;Be.exports=i},"19Vz":function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){Y.defineOption("placeholder","",function(m,t,b){var o=b&&b!=Y.Init;if(t&&!o)m.on("blur",T),m.on("change",R),m.on("swapDoc",R),Y.on(m.getInputField(),"compositionupdate",m.state.placeholderCompose=function(){F(m)}),R(m);else if(!t&&o){m.off("blur",T),m.off("change",R),m.off("swapDoc",R),Y.off(m.getInputField(),"compositionupdate",m.state.placeholderCompose),B(m);var u=m.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}t&&!m.hasFocus()&&T(m)});function B(m){m.state.placeholder&&(m.state.placeholder.parentNode.removeChild(m.state.placeholder),m.state.placeholder=null)}function I(m){B(m);var t=m.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=m.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var b=m.getOption("placeholder");typeof b=="string"&&(b=document.createTextNode(b)),t.appendChild(b),m.display.lineSpace.insertBefore(t,m.display.lineSpace.firstChild)}function F(m){setTimeout(function(){var t=!1,b=m.getInputField();b.nodeName=="TEXTAREA"?t=!b.value:m.lineCount()==1&&(t=!/[^\u200b]/.test(b.querySelector(".CodeMirror-line").textContent)),t?I(m):B(m)},20)}function T(m){P(m)&&I(m)}function R(m){var t=m.getWrapperElement(),b=P(m);t.className=t.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":""),b?I(m):B(m)}function P(m){return m.lineCount()===1&&m.getLine(0)===""}})},"1Jh7":function(Be,J,L){var Y=L("y+Vt"),B=L("T6xi"),I=Y.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(F,T){B.buildPath(F,T,!1)}});Be.exports=I},"1MYJ":function(Be,J,L){var Y=L("y+Vt"),B=Y.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var I=this.__dirtyPath,F=this.shape.paths,T=0;T<F.length;T++)I=I||F[T].__dirtyPath;this.__dirtyPath=I,this.__dirty=this.__dirty||I},beforeBrush:function(){this._updatePathDirty();for(var I=this.shape.paths||[],F=this.getGlobalScale(),T=0;T<I.length;T++)I[T].path||I[T].createPathProxy(),I[T].path.setScale(F[0],F[1],I[T].segmentIgnoreThreshold)},buildPath:function(I,F){for(var T=F.paths||[],R=0;R<T.length;R++)T[R].buildPath(I,T[R].shape,!0)},afterBrush:function(){for(var I=this.shape.paths||[],F=0;F<I.length;F++)I[F].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Y.prototype.getBoundingRect.call(this)}});Be.exports=B},"1RvN":function(Be,J){var L=function(){this.head=null,this.tail=null,this._len=0},Y=L.prototype;Y.insert=function(R){var P=new B(R);return this.insertEntry(P),P},Y.insertEntry=function(R){this.head?(this.tail.next=R,R.prev=this.tail,R.next=null,this.tail=R):this.head=this.tail=R,this._len++},Y.remove=function(R){var P=R.prev,m=R.next;P?P.next=m:this.head=m,m?m.prev=P:this.tail=P,R.next=R.prev=null,this._len--},Y.len=function(){return this._len},Y.clear=function(){this.head=this.tail=null,this._len=0};var B=function(R){this.value=R,this.next,this.prev},I=function(R){this._list=new L,this._map={},this._maxSize=R||10,this._lastRemovedEntry=null},F=I.prototype;F.put=function(R,P){var m=this._list,t=this._map,b=null;if(t[R]==null){var o=m.len(),u=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var f=m.head;m.remove(f),delete t[f.key],b=f.value,this._lastRemovedEntry=f}u?u.value=P:u=new B(P),u.key=R,m.insertEntry(u),t[R]=u}return b},F.get=function(R){var P=this._map[R],m=this._list;if(P!=null)return P!==m.tail&&(m.remove(P),m.insertEntry(P)),P.value},F.clear=function(){this._list.clear(),this._map={}};var T=I;Be.exports=T},"1ZF9":function(Be,J,L){Be.exports=L.p+"static/Authorize.cc9c212f.png"},"1bdT":function(Be,J,L){var Y=L("3gBT"),B=L("H6uX"),I=L("DN4a"),F=L("vWvF"),T=L("bYtY"),R=function(m){I.call(this,m),B.call(this,m),F.call(this,m),this.id=m.id||Y()};R.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(m,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":m=0;break}var b=this.transform;b||(b=this.transform=[1,0,0,1,0,0]),b[4]+=m,b[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(m,t){},attrKV:function(m,t){if(m==="position"||m==="scale"||m==="origin"){if(t){var b=this[m];b||(b=this[m]=[]),b[0]=t[0],b[1]=t[1]}}else this[m]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(m,t){if(typeof m=="string")this.attrKV(m,t);else if(T.isObject(m))for(var b in m)m.hasOwnProperty(b)&&this.attrKV(b,m[b]);return this.dirty(!1),this},setClipPath:function(m){var t=this.__zr;t&&m.addSelfToZr(t),this.clipPath&&this.clipPath!==m&&this.removeClipPath(),this.clipPath=m,m.__zr=t,m.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var m=this.clipPath;m&&(m.__zr&&m.removeSelfFromZr(m.__zr),m.__zr=null,m.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(m){this.__zr=m;var t=this.animators;if(t)for(var b=0;b<t.length;b++)m.animation.addAnimator(t[b]);this.clipPath&&this.clipPath.addSelfToZr(m)},removeSelfFromZr:function(m){this.__zr=null;var t=this.animators;if(t)for(var b=0;b<t.length;b++)m.animation.removeAnimator(t[b]);this.clipPath&&this.clipPath.removeSelfFromZr(m)}},T.mixin(R,F),T.mixin(R,I),T.mixin(R,B);var P=R;Be.exports=P},"1eCo":function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";var B={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},I={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Y.defineMode("xml",function(F,T){var R=F.indentUnit,P={},m=T.htmlMode?B:I;for(var t in m)P[t]=m[t];for(var t in T)P[t]=T[t];var b,o;function u(v,_){function E(U){return _.tokenize=U,U(v,_)}var g=v.next();if(g=="<")return v.eat("!")?v.eat("[")?v.match("CDATA[")?E(i("atom","]]>")):null:v.match("--")?E(i("comment","-->")):v.match("DOCTYPE",!0,!0)?(v.eatWhile(/[\w\._\-]/),E(d(1))):null:v.eat("?")?(v.eatWhile(/[\w\._\-]/),_.tokenize=i("meta","?>"),"meta"):(b=v.eat("/")?"closeTag":"openTag",_.tokenize=f,"tag bracket");if(g=="&"){var j;return v.eat("#")?v.eat("x")?j=v.eatWhile(/[a-fA-F\d]/)&&v.eat(";"):j=v.eatWhile(/[\d]/)&&v.eat(";"):j=v.eatWhile(/[\w\.\-:]/)&&v.eat(";"),j?"atom":"error"}else return v.eatWhile(/[^&<]/),null}u.isInText=!0;function f(v,_){var E=v.next();if(E==">"||E=="/"&&v.eat(">"))return _.tokenize=u,b=E==">"?"endTag":"selfcloseTag","tag bracket";if(E=="=")return b="equals",null;if(E=="<"){_.tokenize=u,_.state=c,_.tagName=_.tagStart=null;var g=_.tokenize(v,_);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(E)?(_.tokenize=a(E),_.stringStartCol=v.column(),_.tokenize(v,_)):(v.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(v){var _=function(E,g){for(;!E.eol();)if(E.next()==v){g.tokenize=f;break}return"string"};return _.isInAttribute=!0,_}function i(v,_){return function(E,g){for(;!E.eol();){if(E.match(_)){g.tokenize=u;break}E.next()}return v}}function d(v){return function(_,E){for(var g;(g=_.next())!=null;){if(g=="<")return E.tokenize=d(v+1),E.tokenize(_,E);if(g==">")if(v==1){E.tokenize=u;break}else return E.tokenize=d(v-1),E.tokenize(_,E)}return"meta"}}function s(v,_,E){this.prev=v.context,this.tagName=_,this.indent=v.indented,this.startOfLine=E,(P.doNotIndent.hasOwnProperty(_)||v.context&&v.context.noIndent)&&(this.noIndent=!0)}function n(v){v.context&&(v.context=v.context.prev)}function l(v,_){for(var E;;){if(!v.context)return;if(E=v.context.tagName,!P.contextGrabbers.hasOwnProperty(E)||!P.contextGrabbers[E].hasOwnProperty(_))return;n(v)}}function c(v,_,E){return v=="openTag"?(E.tagStart=_.column(),x):v=="closeTag"?A:c}function x(v,_,E){return v=="word"?(E.tagName=_.current(),o="tag",w):P.allowMissingTagName&&v=="endTag"?(o="tag bracket",w(v,_,E)):(o="error",x)}function A(v,_,E){if(v=="word"){var g=_.current();return E.context&&E.context.tagName!=g&&P.implicitlyClosed.hasOwnProperty(E.context.tagName)&&n(E),E.context&&E.context.tagName==g||P.matchClosing===!1?(o="tag",C):(o="tag error",k)}else return P.allowMissingTagName&&v=="endTag"?(o="tag bracket",C(v,_,E)):(o="error",k)}function C(v,_,E){return v!="endTag"?(o="error",C):(n(E),c)}function k(v,_,E){return o="error",C(v,_,E)}function w(v,_,E){if(v=="word")return o="attribute",y;if(v=="endTag"||v=="selfcloseTag"){var g=E.tagName,j=E.tagStart;return E.tagName=E.tagStart=null,v=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(g)?l(E,g):(l(E,g),E.context=new s(E,g,j==E.indented)),c}return o="error",w}function y(v,_,E){return v=="equals"?h:(P.allowMissing||(o="error"),w(v,_,E))}function h(v,_,E){return v=="string"?p:v=="word"&&P.allowUnquoted?(o="string",w):(o="error",w(v,_,E))}function p(v,_,E){return v=="string"?p:w(v,_,E)}return{startState:function(v){var _={tokenize:u,state:c,indented:v||0,tagName:null,tagStart:null,context:null};return v!=null&&(_.baseIndent=v),_},token:function(v,_){if(!_.tagName&&v.sol()&&(_.indented=v.indentation()),v.eatSpace())return null;b=null;var E=_.tokenize(v,_);return(E||b)&&E!="comment"&&(o=null,_.state=_.state(b||E,v,_),o&&(E=o=="error"?E+" error":o)),E},indent:function(v,_,E){var g=v.context;if(v.tokenize.isInAttribute)return v.tagStart==v.indented?v.stringStartCol+1:v.indented+R;if(g&&g.noIndent)return Y.Pass;if(v.tokenize!=f&&v.tokenize!=u)return E?E.match(/^(\s*)/)[0].length:0;if(v.tagName)return P.multilineTagIndentPastTag!==!1?v.tagStart+v.tagName.length+2:v.tagStart+R*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/<!\[CDATA\[/.test(_))return 0;var j=_&&/^<(\/)?([\w_:\.-]*)/.exec(_);if(j&&j[1])for(;g;)if(g.tagName==j[2]){g=g.prev;break}else if(P.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(j)for(;g;){var U=P.contextGrabbers[g.tagName];if(U&&U.hasOwnProperty(j[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+R:v.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(v){v.state==h&&(v.state=w)},xmlCurrentTag:function(v){return v.tagName?{name:v.tagName,close:v.type=="closeTag"}:null},xmlCurrentContext:function(v){for(var _=[],E=v.context;E;E=E.prev)E.tagName&&_.push(E.tagName);return _.reverse()}}}),Y.defineMIME("text/xml","xml"),Y.defineMIME("application/xml","xml"),Y.mimeModes.hasOwnProperty("text/html")||Y.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Be,J,L){"use strict";L.d(J,"d",function(){return ct}),L.d(J,"b",function(){return Se}),L.d(J,"c",function(){return xt}),L.d(J,"a",function(){return sn});var Y=L("VTBJ"),B=L("1OyB"),I=L("vuIU"),F=L("JX7q"),T=L("Ji7U"),R=L("LK+K"),P=L("q1tI"),m=L("I8Z2"),t=L("BGR+"),b=L("wx14"),o=L("rePB"),u=L("4IlW"),f=L("2GS6"),a=L("Gytx"),i=L.n(a),d=L("TSYQ"),s=L.n(d),n=L("U8pU"),l=L("ODXe"),c=/iPhone/i,x=/iPod/i,A=/iPad/i,C=/\bAndroid(?:.+)Mobile\b/i,k=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,y=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,h=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,v=/BlackBerry/i,_=/BB10/i,E=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function U(zt,Ot){return zt.test(Ot)}function S(zt){var Ot=zt||(typeof navigator!="undefined"?navigator.userAgent:""),At=Ot.split("[FBAN");if(typeof At[1]!="undefined"){var ft=At,be=Object(l.a)(ft,1);Ot=be[0]}if(At=Ot.split("Twitter"),typeof At[1]!="undefined"){var Fe=At,Nt=Object(l.a)(Fe,1);Ot=Nt[0]}var bt={apple:{phone:U(c,Ot)&&!U(h,Ot),ipod:U(x,Ot),tablet:!U(c,Ot)&&U(A,Ot)&&!U(h,Ot),device:(U(c,Ot)||U(x,Ot)||U(A,Ot))&&!U(h,Ot)},amazon:{phone:U(w,Ot),tablet:!U(w,Ot)&&U(y,Ot),device:U(w,Ot)||U(y,Ot)},android:{phone:!U(h,Ot)&&U(w,Ot)||!U(h,Ot)&&U(C,Ot),tablet:!U(h,Ot)&&!U(w,Ot)&&!U(C,Ot)&&(U(y,Ot)||U(k,Ot)),device:!U(h,Ot)&&(U(w,Ot)||U(y,Ot)||U(C,Ot)||U(k,Ot))||U(/\bokhttp\b/i,Ot)},windows:{phone:U(h,Ot),tablet:U(p,Ot),device:U(h,Ot)||U(p,Ot)},other:{blackberry:U(v,Ot),blackberry10:U(_,Ot),opera:U(E,Ot),firefox:U(j,Ot),chrome:U(g,Ot),device:U(v,Ot)||U(_,Ot)||U(E,Ot)||U(j,Ot)||U(g,Ot)},any:null,phone:null,tablet:null};return bt.any=bt.apple.device||bt.android.device||bt.windows.device||bt.other.device,bt.phone=bt.apple.phone||bt.android.phone||bt.windows.phone,bt.tablet=bt.apple.tablet||bt.android.tablet||bt.windows.tablet,bt}var z=Object(Y.a)(Object(Y.a)({},S()),{},{isMobile:S}),H=z;function M(){}function V(zt,Ot,At){var ft=Ot||"";return zt.key||"".concat(ft,"item_").concat(At)}function K(zt){return"".concat(zt,"-menu-")}function $(zt,Ot){var At=-1;P.Children.forEach(zt,function(ft){At+=1,ft&&ft.type&&ft.type.isMenuItemGroup?P.Children.forEach(ft.props.children,function(be){At+=1,Ot(be,At)}):Ot(ft,At)})}function Z(zt,Ot,At){if(!zt||At.find)return;P.Children.forEach(zt,function(ft){if(ft){var be=ft.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;Ot.indexOf(ft.key)!==-1?At.find=!0:ft.props.children&&Z(ft.props.children,Ot,At)}})}var me=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(Ot){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft=Ot&&typeof Ot.getBoundingClientRect=="function"&&Ot.getBoundingClientRect().width;if(ft){if(At){var be=getComputedStyle(Ot),Fe=be.marginLeft,Nt=be.marginRight;ft+=+Fe.replace("px","")+ +Nt.replace("px","")}ft=+ft.toFixed(6)}return ft||0},fe=function(Ot,At,ft){Ot&&Object(n.a)(Ot.style)==="object"&&(Ot.style[At]=ft)},ye=function(){return H.any},Ie=L("KQm4"),ve=L("Ff2n"),de=L("i8i4"),Je=L("bdgK"),Rt=L("uciX"),Ee=L("8XRh"),Me={adjustX:1,adjustY:1},rt={topLeft:{points:["bl","tl"],overflow:Me,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Me,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Me,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Me,offset:[4,0]}},He={topLeft:{points:["bl","tl"],overflow:Me,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Me,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Me,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Me,offset:[4,0]}},ke=rt,ht=0,ie={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},xe=function(Ot,At,ft){var be=K(At),Fe=Ot.getState();Ot.setState({defaultActiveFirst:Object(Y.a)(Object(Y.a)({},Fe.defaultActiveFirst),{},Object(o.a)({},be,ft))})},we=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(ft){var be;Object(B.a)(this,At),be=Ot.call(this,ft),be.onDestroy=function(Ge){be.props.onDestroy(Ge)},be.onKeyDown=function(Ge){var lt=Ge.keyCode,Lt=be.menuInstance,Wt=be.props,ln=Wt.isOpen,gn=Wt.store;if(lt===u.a.ENTER)return be.onTitleClick(Ge),xe(gn,be.props.eventKey,!0),!0;if(lt===u.a.RIGHT)return ln?Lt.onKeyDown(Ge):(be.triggerOpenChange(!0),xe(gn,be.props.eventKey,!0)),!0;if(lt===u.a.LEFT){var tr;if(ln)tr=Lt.onKeyDown(Ge);else return;return tr||(be.triggerOpenChange(!1),tr=!0),tr}return ln&&(lt===u.a.UP||lt===u.a.DOWN)?Lt.onKeyDown(Ge):void 0},be.onOpenChange=function(Ge){be.props.onOpenChange(Ge)},be.onPopupVisibleChange=function(Ge){be.triggerOpenChange(Ge,Ge?"mouseenter":"mouseleave")},be.onMouseEnter=function(Ge){var lt=be.props,Lt=lt.eventKey,Wt=lt.onMouseEnter,ln=lt.store;xe(ln,be.props.eventKey,!1),Wt({key:Lt,domEvent:Ge})},be.onMouseLeave=function(Ge){var lt=be.props,Lt=lt.parentMenu,Wt=lt.eventKey,ln=lt.onMouseLeave;Lt.subMenuInstance=Object(F.a)(be),ln({key:Wt,domEvent:Ge})},be.onTitleMouseEnter=function(Ge){var lt=be.props,Lt=lt.eventKey,Wt=lt.onItemHover,ln=lt.onTitleMouseEnter;Wt({key:Lt,hover:!0}),ln({key:Lt,domEvent:Ge})},be.onTitleMouseLeave=function(Ge){var lt=be.props,Lt=lt.parentMenu,Wt=lt.eventKey,ln=lt.onItemHover,gn=lt.onTitleMouseLeave;Lt.subMenuInstance=Object(F.a)(be),ln({key:Wt,hover:!1}),gn({key:Wt,domEvent:Ge})},be.onTitleClick=function(Ge){var lt=Object(F.a)(be),Lt=lt.props;if(Lt.onTitleClick({key:Lt.eventKey,domEvent:Ge}),Lt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!Lt.isOpen,"click"),xe(Lt.store,be.props.eventKey,!1)},be.onSubMenuClick=function(Ge){typeof be.props.onClick=="function"&&be.props.onClick(be.addKeyPath(Ge))},be.onSelect=function(Ge){be.props.onSelect(Ge)},be.onDeselect=function(Ge){be.props.onDeselect(Ge)},be.getPrefixCls=function(){return"".concat(be.props.rootPrefixCls,"-submenu")},be.getActiveClassName=function(){return"".concat(be.getPrefixCls(),"-active")},be.getDisabledClassName=function(){return"".concat(be.getPrefixCls(),"-disabled")},be.getSelectedClassName=function(){return"".concat(be.getPrefixCls(),"-selected")},be.getOpenClassName=function(){return"".concat(be.props.rootPrefixCls,"-submenu-open")},be.saveMenuInstance=function(Ge){be.menuInstance=Ge},be.addKeyPath=function(Ge){return Object(Y.a)(Object(Y.a)({},Ge),{},{keyPath:(Ge.keyPath||[]).concat(be.props.eventKey)})},be.triggerOpenChange=function(Ge,lt){var Lt=be.props.eventKey,Wt=function(){be.onOpenChange({key:Lt,item:Object(F.a)(be),trigger:lt,open:Ge})};lt==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){Wt()},0):Wt()},be.isChildrenSelected=function(){var Ge={find:!1};return Z(be.props.children,be.props.selectedKeys,Ge),Ge.find},be.isOpen=function(){return be.props.openKeys.indexOf(be.props.eventKey)!==-1},be.adjustWidth=function(){if(!be.subMenuTitle||!be.menuInstance)return;var Ge=de.findDOMNode(be.menuInstance);if(Ge.offsetWidth>=be.subMenuTitle.offsetWidth)return;Ge.style.minWidth="".concat(be.subMenuTitle.offsetWidth,"px")},be.saveSubMenuTitle=function(Ge){be.subMenuTitle=Ge},be.getBaseProps=function(){var Ge=Object(F.a)(be),lt=Ge.props;return{mode:lt.mode==="horizontal"?"vertical":lt.mode,visible:be.props.isOpen,level:lt.level+1,inlineIndent:lt.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:lt.selectedKeys,eventKey:"".concat(lt.eventKey,"-menu-"),openKeys:lt.openKeys,motion:lt.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:lt.subMenuOpenDelay,parentMenu:Object(F.a)(be),subMenuCloseDelay:lt.subMenuCloseDelay,forceSubMenuRender:lt.forceSubMenuRender,triggerSubMenuAction:lt.triggerSubMenuAction,builtinPlacements:lt.builtinPlacements,defaultActiveFirst:lt.store.getState().defaultActiveFirst[K(lt.eventKey)],multiple:lt.multiple,prefixCls:lt.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:lt.itemIcon,expandIcon:lt.expandIcon,direction:lt.direction}},be.getMotion=function(Ge,lt){var Lt=Object(F.a)(be),Wt=Lt.haveRendered,ln=be.props,gn=ln.motion,tr=ln.rootPrefixCls,Wn=Object(Y.a)(Object(Y.a)({},gn),{},{leavedClassName:"".concat(tr,"-hidden"),removeOnLeave:!1,motionAppear:Wt||!lt||Ge!=="inline"});return Wn};var Fe=ft.store,Nt=ft.eventKey,bt=Fe.getState(),Kt=bt.defaultActiveFirst;be.isRootMenu=!1;var Zt=!1;return Kt&&(Zt=Kt[Nt]),xe(Fe,Nt,Zt),be}return Object(I.a)(At,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,Fe=this.props,Nt=Fe.mode,bt=Fe.parentMenu,Kt=Fe.manualRef;if(Kt&&Kt(this),Nt!=="horizontal"||!bt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,Fe=be.onDestroy,Nt=be.eventKey;Fe&&Fe(Nt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(be){var Fe=this,Nt=this.getBaseProps(),bt=this.getMotion(Nt.mode,Nt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Nt.visible||Nt.forceSubMenuRender,!this.haveOpened)return P.createElement("div",null);var Kt=Nt.direction;return P.createElement(Ee.default,Object.assign({visible:Nt.visible},bt),function(Zt){var Ge=Zt.className,lt=Zt.style,Lt=s()("".concat(Nt.prefixCls,"-sub"),Ge,Object(o.a)({},"".concat(Nt.prefixCls,"-rtl"),Kt==="rtl"));return P.createElement(Ne,Object.assign({},Nt,{id:Fe.internalMenuId,className:Lt,style:lt}),be)})}},{key:"render",value:function(){var be,Fe=Object(Y.a)({},this.props),Nt=Fe.isOpen,bt=this.getPrefixCls(),Kt=Fe.mode==="inline",Zt=s()(bt,"".concat(bt,"-").concat(Fe.mode),(be={},Object(o.a)(be,Fe.className,!!Fe.className),Object(o.a)(be,this.getOpenClassName(),Nt),Object(o.a)(be,this.getActiveClassName(),Fe.active||Nt&&!Kt),Object(o.a)(be,this.getDisabledClassName(),Fe.disabled),Object(o.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(Fe.eventKey?this.internalMenuId="".concat(Fe.eventKey,"$Menu"):(ht+=1,this.internalMenuId="$__$".concat(ht,"$Menu")));var Ge={},lt={},Lt={};Fe.disabled||(Ge={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},lt={onClick:this.onTitleClick},Lt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},ln=Fe.direction;Kt&&(ln==="rtl"?Wt.paddingRight=Fe.inlineIndent*Fe.level:Wt.paddingLeft=Fe.inlineIndent*Fe.level);var gn={};this.props.isOpen&&(gn={"aria-owns":this.internalMenuId});var tr=null;Fe.mode!=="horizontal"&&(tr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(tr=P.createElement(this.props.expandIcon,Object(Y.a)({},this.props))));var Wn=P.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(bt,"-title"),role:"button"},Lt,lt,{"aria-expanded":Nt},gn,{"aria-haspopup":"true",title:typeof Fe.title=="string"?Fe.title:void 0}),Fe.title,tr||P.createElement("i",{className:"".concat(bt,"-arrow")})),En=this.renderChildren(Fe.children),xr=Fe.parentMenu.isRootMenu?Fe.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},Er=ie[Fe.mode],rr=Fe.popupOffset?{offset:Fe.popupOffset}:{},ur=Fe.mode==="inline"?"":Fe.popupClassName;ur+=ln==="rtl"?" ".concat(bt,"-rtl"):"";var Rr=Fe.disabled,Kr=Fe.triggerSubMenuAction,ra=Fe.subMenuOpenDelay,fn=Fe.forceSubMenuRender,or=Fe.subMenuCloseDelay,sa=Fe.builtinPlacements;me.forEach(function(Jr){return delete Fe[Jr]}),delete Fe.onClick;var ya=ln==="rtl"?Object.assign({},He,sa):Object.assign({},rt,sa);return delete Fe.direction,P.createElement("li",Object.assign({},Fe,Ge,{className:Zt,role:"menuitem"}),Kt&&Wn,Kt&&En,!Kt&&P.createElement(Rt.a,{prefixCls:bt,popupClassName:s()("".concat(bt,"-popup"),ur),getPopupContainer:xr,builtinPlacements:ya,popupPlacement:Er,popupVisible:Nt,popupAlign:rr,popup:En,action:Rr?[]:[Kr],mouseEnterDelay:ra,mouseLeaveDelay:or,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:fn},Wn))}}]),At}(P.Component);we.defaultProps={onMouseEnter:M,onMouseLeave:M,onTitleMouseEnter:M,onTitleMouseLeave:M,onTitleClick:M,manualRef:M,mode:"vertical",title:""};var $e=Object(m.b)(function(zt,Ot){var At=zt.openKeys,ft=zt.activeKey,be=zt.selectedKeys,Fe=Ot.eventKey,Nt=Ot.subMenuKey;return{isOpen:At.indexOf(Fe)>-1,active:ft[Nt]===Fe,selectedKeys:be}})(we);$e.isSubMenu=!0;var ct=$e,yt="menuitem-overflowed",Ut=.5,We=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(){var ft;return Object(B.a)(this,At),ft=Ot.apply(this,arguments),ft.resizeObserver=null,ft.mutationObserver=null,ft.originalTotalWidth=0,ft.overflowedItems=[],ft.menuItemSizes=[],ft.cancelFrameId=null,ft.state={lastVisibleIndex:void 0},ft.getMenuItemNodes=function(){var be=ft.props.prefixCls,Fe=de.findDOMNode(Object(F.a)(ft));return Fe?[].slice.call(Fe.children).filter(function(Nt){return Nt.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},ft.getOverflowedSubMenuItem=function(be,Fe,Nt){var bt=ft.props,Kt=bt.overflowedIndicator,Zt=bt.level,Ge=bt.mode,lt=bt.prefixCls,Lt=bt.theme;if(Zt!==1||Ge!=="horizontal")return null;var Wt=ft.props.children[0],ln=Wt.props,gn=ln.children,tr=ln.title,Wn=ln.style,En=Object(ve.a)(ln,["children","title","style"]),xr=Object(Y.a)({},Wn),Er="".concat(be,"-overflowed-indicator"),rr="".concat(be,"-overflowed-indicator");Fe.length===0&&Nt!==!0?xr=Object(Y.a)(Object(Y.a)({},xr),{},{display:"none"}):Nt&&(xr=Object(Y.a)(Object(Y.a)({},xr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),rr="".concat(rr,"-placeholder"));var ur=Lt?"".concat(lt,"-").concat(Lt):"",Rr={};return me.forEach(function(Kr){En[Kr]!==void 0&&(Rr[Kr]=En[Kr])}),P.createElement(ct,Object.assign({title:Kt,className:"".concat(lt,"-overflowed-submenu"),popupClassName:ur},Rr,{key:Er,eventKey:rr,disabled:!1,style:xr}),Fe)},ft.setChildrenWidthAndResize=function(){if(ft.props.mode!=="horizontal")return;var be=de.findDOMNode(Object(F.a)(ft));if(!be)return;var Fe=be.children;if(!Fe||Fe.length===0)return;var Nt=be.children[Fe.length-1];fe(Nt,"display","inline-block");var bt=ft.getMenuItemNodes(),Kt=bt.filter(function(Zt){return Zt.className.split(" ").indexOf(yt)>=0});Kt.forEach(function(Zt){fe(Zt,"display","inline-block")}),ft.menuItemSizes=bt.map(function(Zt){return oe(Zt,!0)}),Kt.forEach(function(Zt){fe(Zt,"display","none")}),ft.overflowedIndicatorWidth=oe(be.children[be.children.length-1],!0),ft.originalTotalWidth=ft.menuItemSizes.reduce(function(Zt,Ge){return Zt+Ge},0),ft.handleResize(),fe(Nt,"display","none")},ft.handleResize=function(){if(ft.props.mode!=="horizontal")return;var be=de.findDOMNode(Object(F.a)(ft));if(!be)return;var Fe=oe(be);ft.overflowedItems=[];var Nt=0,bt;ft.originalTotalWidth>Fe+Ut&&(bt=-1,ft.menuItemSizes.forEach(function(Kt){Nt+=Kt,Nt+ft.overflowedIndicatorWidth<=Fe&&(bt+=1)})),ft.setState({lastVisibleIndex:bt})},ft}return Object(I.a)(At,[{key:"componentDidMount",value:function(){var be=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Fe=de.findDOMNode(this);if(!Fe)return;this.resizeObserver=new Je.default(function(Nt){Nt.forEach(function(){var bt=be.cancelFrameId;cancelAnimationFrame(bt),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(Fe.children).concat(Fe).forEach(function(Nt){be.resizeObserver.observe(Nt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(Fe.children).concat(Fe).forEach(function(Nt){be.resizeObserver.observe(Nt)}),be.setChildrenWidthAndResize()}),this.mutationObserver.observe(Fe,{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(be){var Fe=this,Nt=this.state.lastVisibleIndex;return(be||[]).reduce(function(bt,Kt,Zt){var Ge=Kt;if(Fe.props.mode==="horizontal"){var lt=Fe.getOverflowedSubMenuItem(Kt.props.eventKey,[]);Nt!==void 0&&Fe.props.className.indexOf("".concat(Fe.props.prefixCls,"-root"))!==-1&&(Zt>Nt&&(Ge=P.cloneElement(Kt,{style:{display:"none"},eventKey:"".concat(Kt.props.eventKey,"-hidden"),className:"".concat(yt)})),Zt===Nt+1&&(Fe.overflowedItems=be.slice(Nt+1).map(function(Wt){return P.cloneElement(Wt,{key:Wt.props.eventKey,mode:"vertical-left"})}),lt=Fe.getOverflowedSubMenuItem(Kt.props.eventKey,Fe.overflowedItems)));var Lt=[].concat(Object(Ie.a)(bt),[lt,Ge]);return Zt===be.length-1&&Lt.push(Fe.getOverflowedSubMenuItem(Kt.props.eventKey,[],!0)),Lt}return[].concat(Object(Ie.a)(bt),[Ge])},[])}},{key:"render",value:function(){var be=this.props,Fe=be.visible,Nt=be.prefixCls,bt=be.overflowedIndicator,Kt=be.mode,Zt=be.level,Ge=be.tag,lt=be.children,Lt=be.theme,Wt=Object(ve.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ln=Ge;return P.createElement(ln,Object.assign({},Wt),this.renderChildren(lt))}}]),At}(P.Component);We.defaultProps={tag:"div",className:""};var kt=We;function qt(zt){return zt.length?zt.every(function(Ot){return!!Ot.props.disabled}):!0}function Pe(zt,Ot,At){var ft=zt.getState();zt.setState({activeKey:Object(Y.a)(Object(Y.a)({},ft.activeKey),{},Object(o.a)({},Ot,At))})}function Ae(zt){return zt.eventKey||"0-menu-"}function ut(zt,Ot){var At=Ot,ft=zt.children,be=zt.eventKey;if(At){var Fe;if($(ft,function(Nt,bt){Nt&&Nt.props&&!Nt.props.disabled&&At===V(Nt,be,bt)&&(Fe=!0)}),Fe)return At}return At=null,zt.defaultActiveFirst&&$(ft,function(Nt,bt){!At&&Nt&&!Nt.props.disabled&&(At=V(Nt,be,bt))}),At}function Et(zt){if(zt){var Ot=this.instanceArray.indexOf(zt);Ot!==-1?this.instanceArray[Ot]=zt:this.instanceArray.push(zt)}}var Ze=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(ft){var be;return Object(B.a)(this,At),be=Ot.call(this,ft),be.onKeyDown=function(Fe,Nt){var bt=Fe.keyCode,Kt;if(be.getFlatInstanceArray().forEach(function(Ge){Ge&&Ge.props.active&&Ge.onKeyDown&&(Kt=Ge.onKeyDown(Fe))}),Kt)return 1;var Zt=null;return(bt===u.a.UP||bt===u.a.DOWN)&&(Zt=be.step(bt===u.a.UP?-1:1)),Zt?(Fe.preventDefault(),Pe(be.props.store,Ae(be.props),Zt.props.eventKey),typeof Nt=="function"&&Nt(Zt),1):void 0},be.onItemHover=function(Fe){var Nt=Fe.key,bt=Fe.hover;Pe(be.props.store,Ae(be.props),bt?Nt:null)},be.onDeselect=function(Fe){be.props.onDeselect(Fe)},be.onSelect=function(Fe){be.props.onSelect(Fe)},be.onClick=function(Fe){be.props.onClick(Fe)},be.onOpenChange=function(Fe){be.props.onOpenChange(Fe)},be.onDestroy=function(Fe){be.props.onDestroy(Fe)},be.getFlatInstanceArray=function(){return be.instanceArray},be.step=function(Fe){var Nt=be.getFlatInstanceArray(),bt=be.props.store.getState().activeKey[Ae(be.props)],Kt=Nt.length;if(!Kt)return null;Fe<0&&(Nt=Nt.concat().reverse());var Zt=-1;if(Nt.every(function(Wt,ln){return Wt&&Wt.props.eventKey===bt?(Zt=ln,!1):!0}),!be.props.defaultActiveFirst&&Zt!==-1&&qt(Nt.slice(Zt,Kt-1)))return;var Ge=(Zt+1)%Kt,lt=Ge;do{var Lt=Nt[lt];if(!Lt||Lt.props.disabled)lt=(lt+1)%Kt;else return Lt}while(lt!==Ge);return null},be.renderCommonMenuItem=function(Fe,Nt,bt){var Kt=be.props.store.getState(),Zt=Object(F.a)(be),Ge=Zt.props,lt=V(Fe,Ge.eventKey,Nt),Lt=Fe.props;if(!Lt||typeof Fe.type=="string")return Fe;var Wt=lt===Kt.activeKey,ln=Object(Y.a)(Object(Y.a)({mode:Lt.mode||Ge.mode,level:Ge.level,inlineIndent:Ge.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:Ge.prefixCls,index:Nt,parentMenu:Ge.parentMenu,manualRef:Lt.disabled?void 0:Object(f.a)(Fe.ref,Et.bind(Object(F.a)(be))),eventKey:lt,active:!Lt.disabled&&Wt,multiple:Ge.multiple,onClick:function(tr){(Lt.onClick||M)(tr),be.onClick(tr)},onItemHover:be.onItemHover,motion:Ge.motion,subMenuOpenDelay:Ge.subMenuOpenDelay,subMenuCloseDelay:Ge.subMenuCloseDelay,forceSubMenuRender:Ge.forceSubMenuRender,onOpenChange:be.onOpenChange,onDeselect:be.onDeselect,onSelect:be.onSelect,builtinPlacements:Ge.builtinPlacements,itemIcon:Lt.itemIcon||be.props.itemIcon,expandIcon:Lt.expandIcon||be.props.expandIcon},bt),{},{direction:Ge.direction});return(Ge.mode==="inline"||ye())&&(ln.triggerSubMenuAction="click"),P.cloneElement(Fe,ln)},be.renderMenuItem=function(Fe,Nt,bt){if(!Fe)return null;var Kt=be.props.store.getState(),Zt={openKeys:Kt.openKeys,selectedKeys:Kt.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:bt};return be.renderCommonMenuItem(Fe,Nt,Zt)},ft.store.setState({activeKey:Object(Y.a)(Object(Y.a)({},ft.store.getState().activeKey),{},Object(o.a)({},ft.eventKey,ut(ft,ft.activeKey)))}),be.instanceArray=[],be}return Object(I.a)(At,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(be){return this.props.visible||be.visible||this.props.className!==be.className||!i()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var Fe=this.props,Nt="activeKey"in Fe?Fe.activeKey:Fe.store.getState().activeKey[Ae(Fe)],bt=ut(Fe,Nt);if(bt!==Nt)Pe(Fe.store,Ae(Fe),bt);else if("activeKey"in be){var Kt=ut(be,be.activeKey);bt!==Kt&&Pe(Fe.store,Ae(Fe),bt)}}},{key:"render",value:function(){var be=this,Fe=Object(b.a)({},this.props);this.instanceArray=[];var Nt=s()(Fe.prefixCls,Fe.className,"".concat(Fe.prefixCls,"-").concat(Fe.mode)),bt={className:Nt,role:Fe.role||"menu"};Fe.id&&(bt.id=Fe.id),Fe.focusable&&(bt.tabIndex=0,bt.onKeyDown=this.onKeyDown);var Kt=Fe.prefixCls,Zt=Fe.eventKey,Ge=Fe.visible,lt=Fe.level,Lt=Fe.mode,Wt=Fe.overflowedIndicator,ln=Fe.theme;return me.forEach(function(gn){return delete Fe[gn]}),delete Fe.onClick,P.createElement(kt,Object.assign({},Fe,{prefixCls:Kt,mode:Lt,tag:"ul",level:lt,theme:ln,visible:Ge,overflowedIndicator:Wt},bt),P.Children.map(Fe.children,function(gn,tr){return be.renderMenuItem(gn,tr,Zt||"0-menu-")}))}}]),At}(P.Component);Ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:M};var dt=Object(m.b)()(Ze),Ne=dt,Te=L("Kwbf");function Oe(zt,Ot,At){var ft=zt.prefixCls,be=zt.motion,Fe=zt.defaultMotions,Nt=Fe===void 0?{}:Fe,bt=zt.openAnimation,Kt=zt.openTransitionName,Zt=Ot.switchingModeFromInline;if(be)return be;if(Object(n.a)(bt)==="object"&&bt)Object(Te.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof bt=="string")return{motionName:"".concat(ft,"-open-").concat(bt)};if(Kt)return{motionName:Kt};var Ge=Nt[At];return Ge||(Zt?null:Nt.other)}var ae=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(ft){var be;Object(B.a)(this,At),be=Ot.call(this,ft),be.inlineOpenKeys=[],be.onSelect=function(bt){var Kt=Object(F.a)(be),Zt=Kt.props;if(Zt.selectable){var Ge=be.store.getState(),lt=Ge.selectedKeys,Lt=bt.key;Zt.multiple?lt=lt.concat([Lt]):lt=[Lt],"selectedKeys"in Zt||be.store.setState({selectedKeys:lt}),Zt.onSelect(Object(Y.a)(Object(Y.a)({},bt),{},{selectedKeys:lt}))}},be.onClick=function(bt){var Kt=be.getRealMenuMode(),Zt=Object(F.a)(be),Ge=Zt.store,lt=Zt.props.onOpenChange;Kt!=="inline"&&!("openKeys"in be.props)&&(Ge.setState({openKeys:[]}),lt([])),be.props.onClick(bt)},be.onKeyDown=function(bt,Kt){be.innerMenu.getWrappedInstance().onKeyDown(bt,Kt)},be.onOpenChange=function(bt){var Kt=Object(F.a)(be),Zt=Kt.props,Ge=be.store.getState().openKeys.concat(),lt=!1,Lt=function(ln){var gn=!1;if(ln.open)gn=Ge.indexOf(ln.key)===-1,gn&&Ge.push(ln.key);else{var tr=Ge.indexOf(ln.key);gn=tr!==-1,gn&&Ge.splice(tr,1)}lt=lt||gn};Array.isArray(bt)?bt.forEach(Lt):Lt(bt),lt&&("openKeys"in be.props||be.store.setState({openKeys:Ge}),Zt.onOpenChange(Ge))},be.onDeselect=function(bt){var Kt=Object(F.a)(be),Zt=Kt.props;if(Zt.selectable){var Ge=be.store.getState().selectedKeys.concat(),lt=bt.key,Lt=Ge.indexOf(lt);Lt!==-1&&Ge.splice(Lt,1),"selectedKeys"in Zt||be.store.setState({selectedKeys:Ge}),Zt.onDeselect(Object(Y.a)(Object(Y.a)({},bt),{},{selectedKeys:Ge}))}},be.onMouseEnter=function(bt){be.restoreModeVerticalFromInline();var Kt=be.props.onMouseEnter;Kt&&Kt(bt)},be.onTransitionEnd=function(bt){var Kt=bt.propertyName==="width"&&bt.target===bt.currentTarget,Zt=bt.target.className,Ge=Object.prototype.toString.call(Zt)==="[object SVGAnimatedString]"?Zt.animVal:Zt,lt=bt.propertyName==="font-size"&&Ge.indexOf("anticon")>=0;(Kt||lt)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(bt){be.innerMenu=bt},be.isRootMenu=!0;var Fe=ft.defaultSelectedKeys,Nt=ft.defaultOpenKeys;return"selectedKeys"in ft&&(Fe=ft.selectedKeys||[]),"openKeys"in ft&&(Nt=ft.openKeys||[]),be.store=Object(m.c)({selectedKeys:Fe,openKeys:Nt,activeKey:{"0-menu-":ut(ft,ft.activeKey)}}),be.state={switchingModeFromInline:!1},be}return Object(I.a)(At,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){this.updateOpentKeysWhenSwitchMode(be),this.updateMiniStore();var Fe=this.props,Nt=Fe.siderCollapsed,bt=Fe.inlineCollapsed,Kt=Fe.onOpenChange;(!be.inlineCollapsed&&bt||!be.siderCollapsed&&Nt)&&Kt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(be){var Fe=this.props,Nt=this.store,bt=this.inlineOpenKeys,Kt=Nt.getState(),Zt={};be.mode==="inline"&&Fe.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Fe||((Fe.inlineCollapsed&&!be.inlineCollapsed||Fe.siderCollapsed&&!be.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Kt.openKeys.concat(),Zt.openKeys=[]),(!Fe.inlineCollapsed&&be.inlineCollapsed||!Fe.siderCollapsed&&be.siderCollapsed)&&(Zt.openKeys=bt,this.inlineOpenKeys=[])),Object.keys(Zt).length&&Nt.setState(Zt)}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,Fe=this.store,Nt=this.prevOpenKeys,bt=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");bt?(this.prevOpenKeys=Fe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Nt&&(this.store.setState({openKeys:Nt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,Fe=this.state.switchingModeFromInline,Nt=this.getInlineCollapsed();return Fe&&Nt?"inline":Nt?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,Fe=be.inlineCollapsed,Nt=be.siderCollapsed;return Nt!==void 0?Nt:Fe}},{key:"restoreModeVerticalFromInline",value:function(){var be=this.state.switchingModeFromInline;be&&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 be=Object(Y.a)({},Object(t.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Fe=this.getRealMenuMode();return be.className+=" ".concat(be.prefixCls,"-root"),be.direction==="rtl"&&(be.className+=" ".concat(be.prefixCls,"-rtl")),be=Object(Y.a)(Object(Y.a)({},be),{},{mode:Fe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,Fe)}),delete be.openAnimation,delete be.openTransitionName,P.createElement(m.a,{store:this.store},P.createElement(Ne,Object.assign({},be,{ref:this.setInnerMenu}),this.props.children))}}]),At}(P.Component);ae.defaultProps={selectable:!0,onClick:M,onSelect:M,onOpenChange:M,onDeselect:M,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:P.createElement("span",null,"\xB7\xB7\xB7")};var le=ae,he=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(){var ft;return Object(B.a)(this,At),ft=Ot.apply(this,arguments),ft.onKeyDown=function(be){var Fe=be.keyCode;return Fe===u.a.ENTER?(ft.onClick(be),!0):void 0},ft.onMouseLeave=function(be){var Fe=ft.props,Nt=Fe.eventKey,bt=Fe.onItemHover,Kt=Fe.onMouseLeave;bt({key:Nt,hover:!1}),Kt({key:Nt,domEvent:be})},ft.onMouseEnter=function(be){var Fe=ft.props,Nt=Fe.eventKey,bt=Fe.onItemHover,Kt=Fe.onMouseEnter;bt({key:Nt,hover:!0}),Kt({key:Nt,domEvent:be})},ft.onClick=function(be){var Fe=ft.props,Nt=Fe.eventKey,bt=Fe.multiple,Kt=Fe.onClick,Zt=Fe.onSelect,Ge=Fe.onDeselect,lt=Fe.isSelected,Lt={key:Nt,keyPath:[Nt],item:Object(F.a)(ft),domEvent:be};Kt(Lt),bt?lt?Ge(Lt):Zt(Lt):lt||Zt(Lt)},ft.saveNode=function(be){ft.node=be},ft}return Object(I.a)(At,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var be=this.props;be.onDestroy&&be.onDestroy(be.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 be,Fe=Object(Y.a)({},this.props),Nt=s()(this.getPrefixCls(),Fe.className,(be={},Object(o.a)(be,this.getActiveClassName(),!Fe.disabled&&Fe.active),Object(o.a)(be,this.getSelectedClassName(),Fe.isSelected),Object(o.a)(be,this.getDisabledClassName(),Fe.disabled),be)),bt=Object(Y.a)(Object(Y.a)({},Fe.attribute),{},{title:typeof Fe.title=="string"?Fe.title:void 0,className:Nt,role:Fe.role||"menuitem","aria-disabled":Fe.disabled});Fe.role==="option"?bt=Object(Y.a)(Object(Y.a)({},bt),{},{role:"option","aria-selected":Fe.isSelected}):(Fe.role===null||Fe.role==="none")&&(bt.role="none");var Kt={onClick:Fe.disabled?null:this.onClick,onMouseLeave:Fe.disabled?null:this.onMouseLeave,onMouseEnter:Fe.disabled?null:this.onMouseEnter},Zt=Object(Y.a)({},Fe.style);Fe.mode==="inline"&&(Fe.direction==="rtl"?Zt.paddingRight=Fe.inlineIndent*Fe.level:Zt.paddingLeft=Fe.inlineIndent*Fe.level),me.forEach(function(lt){return delete Fe[lt]}),delete Fe.direction;var Ge=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ge=P.createElement(this.props.itemIcon,this.props)),P.createElement("li",Object.assign({},Object(t.default)(Fe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),bt,Kt,{style:Zt,ref:this.saveNode}),Fe.children,Ge)}}]),At}(P.Component);he.isMenuItem=!0,he.defaultProps={onSelect:M,onMouseEnter:M,onMouseLeave:M,manualRef:M};var _e=Object(m.b)(function(zt,Ot){var At=zt.activeKey,ft=zt.selectedKeys,be=Ot.eventKey,Fe=Ot.subMenuKey;return{active:At[Fe]===be,isSelected:ft.indexOf(be)!==-1}})(he),Se=_e,ze=function(zt){Object(T.a)(At,zt);var Ot=Object(R.a)(At);function At(){var ft;return Object(B.a)(this,At),ft=Ot.apply(this,arguments),ft.renderInnerMenuItem=function(be){var Fe=ft.props,Nt=Fe.renderMenuItem,bt=Fe.index;return Nt(be,bt,ft.props.subMenuKey)},ft}return Object(I.a)(At,[{key:"render",value:function(){var be=Object(b.a)({},this.props),Fe=be.className,Nt=Fe===void 0?"":Fe,bt=be.rootPrefixCls,Kt="".concat(bt,"-item-group-title"),Zt="".concat(bt,"-item-group-list"),Ge=be.title,lt=be.children;return me.forEach(function(Lt){return delete be[Lt]}),delete be.onClick,delete be.direction,P.createElement("li",Object.assign({},be,{className:"".concat(Nt," ").concat(bt,"-item-group")}),P.createElement("div",{className:Kt,title:typeof Ge=="string"?Ge:void 0},Ge),P.createElement("ul",{className:Zt},P.Children.map(lt,this.renderInnerMenuItem)))}}]),At}(P.Component);ze.isMenuItemGroup=!0,ze.defaultProps={disabled:!0};var xt=ze,Qt=function(Ot){var At=Ot.className,ft=Ot.rootPrefixCls,be=Ot.style;return P.createElement("li",{className:"".concat(At," ").concat(ft,"-item-divider"),style:be})};Qt.defaultProps={disabled:!0,className:"",style:{}};var sn=Qt,gt=J.e=le},"24YM":function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.SensorTabIndex=J.SensorClassName=J.SizeSensorId=void 0;var Y="size-sensor-id";J.SizeSensorId=Y;var B="size-sensor-object";J.SensorClassName=B;var I="-1";J.SensorTabIndex=I},"24hK":function(Be,J,L){"use strict";L.d(J,"a",function(){return B});class Y{constructor(I){this.element=I,this.next=Y.Undefined,this.prev=Y.Undefined}}Y.Undefined=new Y(void 0);class B{constructor(){this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Y.Undefined}clear(){let I=this._first;for(;I!==Y.Undefined;){const F=I.next;I.prev=Y.Undefined,I.next=Y.Undefined,I=F}this._first=Y.Undefined,this._last=Y.Undefined,this._size=0}unshift(I){return this._insert(I,!1)}push(I){return this._insert(I,!0)}_insert(I,F){const T=new Y(I);if(this._first===Y.Undefined)this._first=T,this._last=T;else if(F){const P=this._last;this._last=T,T.prev=P,P.next=T}else{const P=this._first;this._first=T,T.next=P,P.prev=T}this._size+=1;let R=!1;return()=>{R||(R=!0,this._remove(T))}}shift(){if(this._first===Y.Undefined)return;{const I=this._first.element;return this._remove(this._first),I}}pop(){if(this._last===Y.Undefined)return;{const I=this._last.element;return this._remove(this._last),I}}_remove(I){if(I.prev!==Y.Undefined&&I.next!==Y.Undefined){const F=I.prev;F.next=I.next,I.next.prev=F}else I.prev===Y.Undefined&&I.next===Y.Undefined?(this._first=Y.Undefined,this._last=Y.Undefined):I.next===Y.Undefined?(this._last=this._last.prev,this._last.next=Y.Undefined):I.prev===Y.Undefined&&(this._first=this._first.next,this._first.prev=Y.Undefined);this._size-=1}*[Symbol.iterator](){let I=this._first;for(;I!==Y.Undefined;)yield I.element,I=I.next}}},"2DNl":function(Be,J,L){var Y=L("IMiH"),B=L("loD1"),I=L("59Ip"),F=L("aKvl"),T=L("n1HI"),R=L("hX1E"),P=R.normalizeRadian,m=L("Sj9i"),t=L("hyiK"),b=Y.CMD,o=Math.PI*2,u=1e-4;function f(C,k){return Math.abs(C-k)<u}var a=[-1,-1,-1],i=[-1,-1];function d(){var C=i[0];i[0]=i[1],i[1]=C}function s(C,k,w,y,h,p,v,_,E,g){if(g>k&&g>y&&g>p&&g>_||g<k&&g<y&&g<p&&g<_)return 0;var j=m.cubicRootAt(k,y,p,_,g,a);if(j===0)return 0;for(var U=0,S=-1,z,H,M=0;M<j;M++){var V=a[M],K=V===0||V===1?.5:1,$=m.cubicAt(C,w,h,v,V);if($<E)continue;S<0&&(S=m.cubicExtrema(k,y,p,_,i),i[1]<i[0]&&S>1&&d(),z=m.cubicAt(k,y,p,_,i[0]),S>1&&(H=m.cubicAt(k,y,p,_,i[1]))),S===2?V<i[0]?U+=z<k?K:-K:V<i[1]?U+=H<z?K:-K:U+=_<H?K:-K:V<i[0]?U+=z<k?K:-K:U+=_<z?K:-K}return U}function n(C,k,w,y,h,p,v,_){if(_>k&&_>y&&_>p||_<k&&_<y&&_<p)return 0;var E=m.quadraticRootAt(k,y,p,_,a);if(E===0)return 0;var g=m.quadraticExtremum(k,y,p);if(g>=0&&g<=1){for(var j=0,U=m.quadraticAt(k,y,p,g),S=0;S<E;S++){var z=a[S]===0||a[S]===1?.5:1,H=m.quadraticAt(C,w,h,a[S]);if(H<v)continue;a[S]<g?j+=U<k?z:-z:j+=p<U?z:-z}return j}else{var z=a[0]===0||a[0]===1?.5:1,H=m.quadraticAt(C,w,h,a[0]);return H<v?0:p<k?z:-z}}function l(C,k,w,y,h,p,v,_){if(_-=k,_>w||_<-w)return 0;var E=Math.sqrt(w*w-_*_);a[0]=-E,a[1]=E;var g=Math.abs(y-h);if(g<1e-4)return 0;if(g%o<1e-4){y=0,h=o;var j=p?1:-1;return v>=a[0]+C&&v<=a[1]+C?j:0}if(p){var E=y;y=P(h),h=P(E)}else y=P(y),h=P(h);y>h&&(h+=o);for(var U=0,S=0;S<2;S++){var z=a[S];if(z+C>v){var H=Math.atan2(_,z),j=p?1:-1;H<0&&(H=o+H),(H>=y&&H<=h||H+o>=y&&H+o<=h)&&(H>Math.PI/2&&H<Math.PI*1.5&&(j=-j),U+=j)}}return U}function c(C,k,w,y,h){for(var p=0,v=0,_=0,E=0,g=0,j=0;j<C.length;){var U=C[j++];U===b.M&&j>1&&(w||(p+=t(v,_,E,g,y,h))),j===1&&(v=C[j],_=C[j+1],E=v,g=_);switch(U){case b.M:E=C[j++],g=C[j++],v=E,_=g;break;case b.L:if(w){if(B.containStroke(v,_,C[j],C[j+1],k,y,h))return!0}else p+=t(v,_,C[j],C[j+1],y,h)||0;v=C[j++],_=C[j++];break;case b.C:if(w){if(I.containStroke(v,_,C[j++],C[j++],C[j++],C[j++],C[j],C[j+1],k,y,h))return!0}else p+=s(v,_,C[j++],C[j++],C[j++],C[j++],C[j],C[j+1],y,h)||0;v=C[j++],_=C[j++];break;case b.Q:if(w){if(F.containStroke(v,_,C[j++],C[j++],C[j],C[j+1],k,y,h))return!0}else p+=n(v,_,C[j++],C[j++],C[j],C[j+1],y,h)||0;v=C[j++],_=C[j++];break;case b.A:var S=C[j++],z=C[j++],H=C[j++],M=C[j++],V=C[j++],K=C[j++];j+=1;var $=1-C[j++],Z=Math.cos(V)*H+S,me=Math.sin(V)*M+z;j>1?p+=t(v,_,Z,me,y,h):(E=Z,g=me);var oe=(y-S)*M/H+S;if(w){if(T.containStroke(S,z,M,V,V+K,$,k,oe,h))return!0}else p+=l(S,z,M,V,V+K,$,oe,h);v=Math.cos(V+K)*H+S,_=Math.sin(V+K)*M+z;break;case b.R:E=v=C[j++],g=_=C[j++];var fe=C[j++],ye=C[j++],Z=E+fe,me=g+ye;if(w){if(B.containStroke(E,g,Z,g,k,y,h)||B.containStroke(Z,g,Z,me,k,y,h)||B.containStroke(Z,me,E,me,k,y,h)||B.containStroke(E,me,E,g,k,y,h))return!0}else p+=t(Z,g,Z,me,y,h),p+=t(E,me,E,g,y,h);break;case b.Z:if(w){if(B.containStroke(v,_,E,g,k,y,h))return!0}else p+=t(v,_,E,g,y,h);v=E,_=g;break}}return!w&&!f(_,g)&&(p+=t(v,_,E,g,y,h)||0),p!==0}function x(C,k,w){return c(C,0,!1,k,w)}function A(C,k,w,y){return c(C,k,!0,w,y)}J.contain=x,J.containStroke=A},"2fw6":function(Be,J,L){var Y=L("y+Vt"),B=Y.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(I,F,T){T&&I.moveTo(F.cx+F.r,F.cy),I.arc(F.cx,F.cy,F.r,0,Math.PI*2,!0)}});Be.exports=B},"3/fG":function(Be,J,L){"use strict";L.d(J,"a",function(){return B});function Y(I,F){let T;return F.length===0?T=I:T=I.replace(/\{(\d+)\}/g,function(R,P){const m=P[0];return typeof F[m]!="undefined"?F[m]:R}),T}function B(I,F,...T){return Y(F,T)}},"3C/r":function(Be,J){var L=function(B,I){this.image=B,this.repeat=I,this.type="pattern"};L.prototype.getCanvasPattern=function(B){return B.createPattern(this.image,this.repeat||"repeat")};var Y=L;Be.exports=Y},"3CBa":function(Be,J,L){var Y=L("hydK"),B=Y.createElement,I=L("bYtY"),F=L("SUKs"),T=L("y+Vt"),R=L("Dagg"),P=L("dqUG"),m=L("DBLp"),t=L("sW+o"),b=L("n6Mw"),o=L("vKoX"),u=L("P47w"),f=u.path,a=u.image,i=u.text;function d(h){return parseInt(h,10)}function s(h){return h instanceof T?f:h instanceof R?a:h instanceof P?i:f}function n(h,p){return p&&h&&p.parentNode!==h}function l(h,p,v){if(n(h,p)&&v){var _=v.nextSibling;_?h.insertBefore(p,_):h.appendChild(p)}}function c(h,p){if(n(h,p)){var v=h.firstChild;v?h.insertBefore(p,v):h.appendChild(p)}}function x(h,p){p&&h&&p.parentNode===h&&h.removeChild(p)}function A(h){return h.__textSvgEl}function C(h){return h.__svgEl}var k=function(h,p,v,_){this.root=h,this.storage=p,this._opts=v=I.extend({},v||{});var E=B("svg");E.setAttribute("xmlns","http://www.w3.org/2000/svg"),E.setAttribute("version","1.1"),E.setAttribute("baseProfile","full"),E.style.cssText="user-select:none;position:absolute;left:0;top:0;";var g=B("g");E.appendChild(g);var j=B("g");E.appendChild(j),this.gradientManager=new t(_,j),this.clipPathManager=new b(_,j),this.shadowManager=new o(_,j);var U=document.createElement("div");U.style.cssText="overflow:hidden;position:relative",this._svgDom=E,this._svgRoot=j,this._backgroundRoot=g,this._viewport=U,h.appendChild(U),U.appendChild(E),this.resize(v.width,v.height),this._visibleList=[]};k.prototype={constructor:k,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var h=this.getViewportRoot();if(h)return{offsetLeft:h.offsetLeft||0,offsetTop:h.offsetTop||0}},refresh:function(){var h=this.storage.getDisplayList(!0);this._paintList(h)},setBackgroundColor:function(h){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var p=B("rect");p.setAttribute("width",this.getWidth()),p.setAttribute("height",this.getHeight()),p.setAttribute("x",0),p.setAttribute("y",0),p.setAttribute("id",0),p.style.fill=h,this._backgroundRoot.appendChild(p),this._backgroundNode=p},_paintList:function(h){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var p=this._svgRoot,v=this._visibleList,_=h.length,E=[],g;for(g=0;g<_;g++){var j=h[g],U=s(j),S=C(j)||A(j);j.invisible||(j.__dirty&&(U&&U.brush(j),this.clipPathManager.update(j),j.style&&(this.gradientManager.update(j.style.fill),this.gradientManager.update(j.style.stroke),this.shadowManager.update(S,j)),j.__dirty=!1),E.push(j))}var z=m(v,E),H;for(g=0;g<z.length;g++){var M=z[g];if(M.removed)for(var V=0;V<M.count;V++){var j=v[M.indices[V]],S=C(j),K=A(j);x(p,S),x(p,K)}}for(g=0;g<z.length;g++){var M=z[g];if(M.added)for(var V=0;V<M.count;V++){var j=E[M.indices[V]],S=C(j),K=A(j);H?l(p,S,H):c(p,S),S?l(p,K,S):H?l(p,K,H):c(p,K),l(p,K,S),H=K||S||H,this.gradientManager.addWithoutUpdate(S||K,j),this.shadowManager.addWithoutUpdate(S||K,j),this.clipPathManager.markUsed(j)}else if(!M.removed)for(var V=0;V<M.count;V++){var j=E[M.indices[V]],S=C(j),K=A(j),S=C(j),K=A(j);this.gradientManager.markUsed(j),this.gradientManager.addWithoutUpdate(S||K,j),this.shadowManager.markUsed(j),this.shadowManager.addWithoutUpdate(S||K,j),this.clipPathManager.markUsed(j),K&&l(p,K,S),H=S||K||H}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=E},_getDefs:function(h){var p=this._svgDom,v=p.getElementsByTagName("defs");if(v.length===0)if(h){var v=p.insertBefore(B("defs"),p.firstChild);return v.contains||(v.contains=function(E){var g=v.children;if(!g)return!1;for(var j=g.length-1;j>=0;--j)if(g[j]===E)return!0;return!1}),v}else return null;else return v[0]},resize:function(h,p){var v=this._viewport;v.style.display="none";var _=this._opts;if(h!=null&&(_.width=h),p!=null&&(_.height=p),h=this._getSize(0),p=this._getSize(1),v.style.display="",this._width!==h||this._height!==p){this._width=h,this._height=p;var E=v.style;E.width=h+"px",E.height=p+"px";var g=this._svgDom;g.setAttribute("width",h),g.setAttribute("height",p)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",h),this._backgroundNode.setAttribute("height",p))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(h){var p=this._opts,v=["width","height"][h],_=["clientWidth","clientHeight"][h],E=["paddingLeft","paddingTop"][h],g=["paddingRight","paddingBottom"][h];if(p[v]!=null&&p[v]!=="auto")return parseFloat(p[v]);var j=this.root,U=document.defaultView.getComputedStyle(j);return(j[_]||d(U[v])||d(j.style[v]))-(d(U[E])||0)-(d(U[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 h=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
\r<`));return"data:image/svg+xml;charset=UTF-8,"+h}};function w(h){return function(){F('In SVG mode painter not support method "'+h+'"')}}I.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(h){k.prototype[h]=w(h)});var y=k;Be.exports=y},"3e3G":function(Be,J,L){var Y=L("bYtY"),B=L("QuXc"),I=function(T,R,P,m,t){this.x=T==null?.5:T,this.y=R==null?.5:R,this.r=P==null?.5:P,this.type="radial",this.global=t||!1,B.call(this,m)};I.prototype={constructor:I},Y.inherits(I,B);var F=I;Be.exports=F},"3gBT":function(Be,J){var L=2311;function Y(){return L++}Be.exports=Y},"4fz+":function(Be,J,L){var Y=L("bYtY"),B=L("1bdT"),I=L("mFDi"),F=function(R){R=R||{},B.call(this,R);for(var P in R)R.hasOwnProperty(P)&&(this[P]=R[P]);this._children=[],this.__storage=null,this.__dirty=!0};F.prototype={constructor:F,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(R){return this._children[R]},childOfName:function(R){for(var P=this._children,m=0;m<P.length;m++)if(P[m].name===R)return P[m]},childCount:function(){return this._children.length},add:function(R){return R&&R!==this&&R.parent!==this&&(this._children.push(R),this._doAdd(R)),this},addBefore:function(R,P){if(R&&R!==this&&R.parent!==this&&P&&P.parent===this){var m=this._children,t=m.indexOf(P);t>=0&&(m.splice(t,0,R),this._doAdd(R))}return this},_doAdd:function(R){R.parent&&R.parent.remove(R),R.parent=this;var P=this.__storage,m=this.__zr;P&&P!==R.__storage&&(P.addToStorage(R),R instanceof F&&R.addChildrenToStorage(P)),m&&m.refresh()},remove:function(R){var P=this.__zr,m=this.__storage,t=this._children,b=Y.indexOf(t,R);return b<0?this:(t.splice(b,1),R.parent=null,m&&(m.delFromStorage(R),R instanceof F&&R.delChildrenFromStorage(m)),P&&P.refresh(),this)},removeAll:function(){var R=this._children,P=this.__storage,m,t;for(t=0;t<R.length;t++)m=R[t],P&&(P.delFromStorage(m),m instanceof F&&m.delChildrenFromStorage(P)),m.parent=null;return R.length=0,this},eachChild:function(R,P){for(var m=this._children,t=0;t<m.length;t++){var b=m[t];R.call(P,b,t)}return this},traverse:function(R,P){for(var m=0;m<this._children.length;m++){var t=this._children[m];R.call(P,t),t.type==="group"&&t.traverse(R,P)}return this},addChildrenToStorage:function(R){for(var P=0;P<this._children.length;P++){var m=this._children[P];R.addToStorage(m),m instanceof F&&m.addChildrenToStorage(R)}},delChildrenFromStorage:function(R){for(var P=0;P<this._children.length;P++){var m=this._children[P];R.delFromStorage(m),m instanceof F&&m.delChildrenFromStorage(R)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(R){for(var P=null,m=new I(0,0,0,0),t=R||this._children,b=[],o=0;o<t.length;o++){var u=t[o];if(u.ignore||u.invisible)continue;var f=u.getBoundingRect(),a=u.getLocalTransform(b);a?(m.copy(f),m.applyTransform(a),P=P||m.clone(),P.union(m)):(P=P||f.clone(),P.union(f))}return P||m}},Y.inherits(F,B);var T=F;Be.exports=T},"4mN7":function(Be,J,L){var Y=L("QBsz"),B=L("Sj9i"),I=Math.min,F=Math.max,T=Math.sin,R=Math.cos,P=Math.PI*2,m=Y.create(),t=Y.create(),b=Y.create();function o(n,l,c){if(n.length===0)return;var x=n[0],A=x[0],C=x[0],k=x[1],w=x[1],y;for(y=1;y<n.length;y++)x=n[y],A=I(A,x[0]),C=F(C,x[0]),k=I(k,x[1]),w=F(w,x[1]);l[0]=A,l[1]=k,c[0]=C,c[1]=w}function u(n,l,c,x,A,C){A[0]=I(n,c),A[1]=I(l,x),C[0]=F(n,c),C[1]=F(l,x)}var f=[],a=[];function i(n,l,c,x,A,C,k,w,y,h){var p=B.cubicExtrema,v=B.cubicAt,_,E=p(n,c,A,k,f);for(y[0]=Infinity,y[1]=Infinity,h[0]=-Infinity,h[1]=-Infinity,_=0;_<E;_++){var g=v(n,c,A,k,f[_]);y[0]=I(g,y[0]),h[0]=F(g,h[0])}for(E=p(l,x,C,w,a),_=0;_<E;_++){var j=v(l,x,C,w,a[_]);y[1]=I(j,y[1]),h[1]=F(j,h[1])}y[0]=I(n,y[0]),h[0]=F(n,h[0]),y[0]=I(k,y[0]),h[0]=F(k,h[0]),y[1]=I(l,y[1]),h[1]=F(l,h[1]),y[1]=I(w,y[1]),h[1]=F(w,h[1])}function d(n,l,c,x,A,C,k,w){var y=B.quadraticExtremum,h=B.quadraticAt,p=F(I(y(n,c,A),1),0),v=F(I(y(l,x,C),1),0),_=h(n,c,A,p),E=h(l,x,C,v);k[0]=I(n,A,_),k[1]=I(l,C,E),w[0]=F(n,A,_),w[1]=F(l,C,E)}function s(n,l,c,x,A,C,k,w,y){var h=Y.min,p=Y.max,v=Math.abs(A-C);if(v%P<1e-4&&v>1e-4){w[0]=n-c,w[1]=l-x,y[0]=n+c,y[1]=l+x;return}if(m[0]=R(A)*c+n,m[1]=T(A)*x+l,t[0]=R(C)*c+n,t[1]=T(C)*x+l,h(w,m,t),p(y,m,t),A=A%P,A<0&&(A=A+P),C=C%P,C<0&&(C=C+P),A>C&&!k?C+=P:A<C&&k&&(A+=P),k){var _=C;C=A,A=_}for(var E=0;E<C;E+=Math.PI/2)E>A&&(b[0]=R(E)*c+n,b[1]=T(E)*x+l,h(w,b,w),p(y,b,y))}J.fromPoints=o,J.fromLine=u,J.fromCubic=i,J.fromQuadratic=d,J.fromArc=s},"4wi7":function(Be,J,L){"use strict";var Y=L("14J3"),B=L("BMrR"),I=L("sRBo"),F=L("kaz8"),T=L("5NDa"),R=L("5rEg"),P=L("9og8"),m=L("tJVT"),t=L("WmNS"),b=L.n(t),o=L("q1tI"),u=L.n(o),f=L("oOBs"),a=L.n(f),i=L("xOL1"),d=L.n(i),s=L("BdwD"),n=function(c){var x=c.data,A=c.value,C=A===void 0?[]:A,k=c.handleChangePage,w=c.setSelectedRowKeys,y=c.selectedRowKeys,h=c.onChange,p=h===void 0?function(){}:h,v=Object(o.useState)([]),_=Object(m.a)(v,2),E=_[0],g=_[1],j=Object(o.useState)([]),U=Object(m.a)(j,2),S=U[0],z=U[1],H=Object(o.useState)([]),M=Object(m.a)(H,2),V=M[0],K=M[1],$=Object(o.useState)(1),Z=Object(m.a)($,2),me=Z[0],oe=Z[1],fe=Object(o.useState)(),ye=Object(m.a)(fe,2),Ie=ye[0],ve=ye[1];return Object(o.useEffect)(function(){g(x),z([]),K([])},[x]),Object(o.useEffect)(function(){w&&(z(y),K(y))},[y]),u.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},u.a.createElement("div",{className:a.a.leftdiv},u.a.createElement(R.a.Search,{size:"large",onChange:function(){var de=Object(P.a)(b.a.mark(function Je(Rt){return b.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:g(x.filter(function(rt){var He;return rt==null||((He=rt.name)===null||He===void 0)?void 0:He.includes(Rt.target.value)}));case 1:case"end":return Me.stop()}},Je)}));return function(Je){return de.apply(this,arguments)}}(),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),E.length===0&&u.a.createElement(s.a,{styles:{margin:"70px auto"},customText:"\u6682\u65E0\u5206\u73ED"}),u.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},u.a.createElement(F.a.Group,{value:S.map(function(de){return"".concat(de.id)}),onChange:function(Je){w(E.filter(function(Rt){return Je.includes("".concat(Rt.id))}))},style:{marginTop:"10px"}},E.map(function(de,Je){return u.a.createElement(B.a,{key:de.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},u.a.createElement(F.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:de.is_published,value:"".concat(de.id)},u.a.createElement("div",{className:a.a.listClass},u.a.createElement("span",{className:a.a.spantitle,style:{width:de.is_published?"108px":"170px"}},de.name),de.is_published&&u.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03"))))})))),u.a.createElement("div",{className:a.a.rightdiv},u.a.createElement(R.a.Search,{onChange:function(Je){K(S.filter(function(Rt){return Rt.name.includes(Je.target.value)}))},size:"large",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),V.length===0&&u.a.createElement(s.a,{styles:{margin:"70px auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),V.length>0&&u.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},u.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},V.map(function(de,Je){return u.a.createElement(B.a,{justify:"space-between",style:{marginTop:"10px"},key:de.id},u.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},de.name),u.a.createElement("img",{src:d.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){w(S.filter(function(Ee){return"".concat(Ee.id)!="".concat(de.id)}))}}))})))))};J.a=n},"55Ip":function(Be,J,L){"use strict";L.d(J,"a",function(){return l});var Y=L("Ty5D"),B=L("dI71"),I=L("q1tI"),F=L.n(I),T=L("YS25"),R=L("17x9"),P=L.n(R),m=L("wx14"),t=L("zLVn"),b=L("9R94"),o=function(h){Object(B.a)(p,h);function p(){for(var _,E=arguments.length,g=new Array(E),j=0;j<E;j++)g[j]=arguments[j];return _=h.call.apply(h,[this].concat(g))||this,_.history=Object(T.a)(_.props),_}var v=p.prototype;return v.render=function(){return F.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(F.a.Component),u=function(h){Object(B.a)(p,h);function p(){for(var _,E=arguments.length,g=new Array(E),j=0;j<E;j++)g[j]=arguments[j];return _=h.call.apply(h,[this].concat(g))||this,_.history=Object(T.b)(_.props),_}var v=p.prototype;return v.render=function(){return F.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(F.a.Component),f=function(p,v){return typeof p=="function"?p(v):p},a=function(p,v){return typeof p=="string"?Object(T.c)(p,null,null,v):p},i=function(p){return p},d=F.a.forwardRef;typeof d=="undefined"&&(d=i);function s(h){return!!(h.metaKey||h.altKey||h.ctrlKey||h.shiftKey)}var n=d(function(h,p){var v=h.innerRef,_=h.navigate,E=h.onClick,g=Object(t.a)(h,["innerRef","navigate","onClick"]),j=g.target,U=Object(m.a)({},g,{onClick:function(z){try{E&&E(z)}catch(H){throw z.preventDefault(),H}!z.defaultPrevented&&z.button===0&&(!j||j==="_self")&&!s(z)&&(z.preventDefault(),_())}});return i!==d?U.ref=p||v:U.ref=v,F.a.createElement("a",U)}),l=d(function(h,p){var v=h.component,_=v===void 0?n:v,E=h.replace,g=h.to,j=h.innerRef,U=Object(t.a)(h,["component","replace","to","innerRef"]);return F.a.createElement(Y.e.Consumer,null,function(S){S||Object(b.a)(!1);var z=S.history,H=a(f(g,S.location),S.location),M=H?z.createHref(H):"",V=Object(m.a)({},U,{href:M,navigate:function(){var $=f(g,S.location),Z=E?z.replace:z.push;Z($)}});return i!==d?V.ref=p||j:V.innerRef=j,F.a.createElement(_,V)})});if(!1)var c,x;var A=function(p){return p},C=F.a.forwardRef;typeof C=="undefined"&&(C=A);function k(){for(var h=arguments.length,p=new Array(h),v=0;v<h;v++)p[v]=arguments[v];return p.filter(function(_){return _}).join(" ")}var w=C(function(h,p){var v=h["aria-current"],_=v===void 0?"page":v,E=h.activeClassName,g=E===void 0?"active":E,j=h.activeStyle,U=h.className,S=h.exact,z=h.isActive,H=h.location,M=h.sensitive,V=h.strict,K=h.style,$=h.to,Z=h.innerRef,me=Object(t.a)(h,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return F.a.createElement(Y.e.Consumer,null,function(oe){oe||Object(b.a)(!1);var fe=H||oe.location,ye=a(f($,fe),fe),Ie=ye.pathname,ve=Ie&&Ie.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),de=ve?Object(Y.f)(fe.pathname,{path:ve,exact:S,sensitive:M,strict:V}):null,Je=!!(z?z(de,fe):de),Rt=Je?k(U,g):U,Ee=Je?Object(m.a)({},K,{},j):K,Me=Object(m.a)({"aria-current":Je&&_||null,className:Rt,style:Ee,to:ye},me);return A!==C?Me.ref=p||Z:Me.innerRef=Z,F.a.createElement(l,Me)})});if(!1)var y},"59Ip":function(Be,J,L){var Y=L("Sj9i");function B(I,F,T,R,P,m,t,b,o,u,f){if(o===0)return!1;var a=o;if(f>F+a&&f>R+a&&f>m+a&&f>b+a||f<F-a&&f<R-a&&f<m-a&&f<b-a||u>I+a&&u>T+a&&u>P+a&&u>t+a||u<I-a&&u<T-a&&u<P-a&&u<t-a)return!1;var i=Y.cubicProjectPoint(I,F,T,R,P,m,t,b,u,f,null);return i<=a/2}J.containStroke=B},"5VLF":function(Be,J,L){"use strict";var Y,B;function I(F,T,R){var P=function(m,t){return F.js_beautify(m,t)};return P.js=F.js_beautify,P.css=T.css_beautify,P.html=R.html_beautify,P.js_beautify=F.js_beautify,P.css_beautify=T.css_beautify,P.html_beautify=R.html_beautify,P}!(Y=[L("6UM0"),L("TXwP"),L("psGv")],B=function(F,T,R){return I(F,T,R)}.apply(J,Y),B!==void 0&&(Be.exports=B))},"5Y4S":function(Be,J,L){"use strict";L.d(J,"a",function(){return I});var Y=L("MNsG");const B=Y.b.performance&&typeof Y.b.performance.now=="function";class I{constructor(F){this._highResolution=B&&F,this._startTime=this._now(),this._stopTime=-1}static create(F=!0){return new I(F)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Y.b.performance.now():Date.now()}}},"6+eU":function(Be,J,L){"use strict";L.d(J,"a",function(){return C});var Y=L("wx14"),B=L("rePB"),I=L("VTBJ"),F=L("1OyB"),T=L("vuIU"),R=L("Ji7U"),P=L("LK+K"),m=L("q1tI"),t=L.n(m),b=L("TSYQ"),o=L.n(b),u=function(w){var y,h="".concat(w.rootPrefixCls,"-item"),p=o()(h,"".concat(h,"-").concat(w.page),(y={},Object(B.a)(y,"".concat(h,"-active"),w.active),Object(B.a)(y,w.className,!!w.className),Object(B.a)(y,"".concat(h,"-disabled"),!w.page),y)),v=function(){w.onClick(w.page)},_=function(g){w.onKeyPress(g,w.onClick,w.page)};return t.a.createElement("li",{title:w.showTitle?w.page:null,className:p,onClick:v,onKeyPress:_,tabIndex:"0"},w.itemRender(w.page,"page",t.a.createElement("a",{rel:"nofollow"},w.page)))},f=u,a={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(k){Object(R.a)(y,k);var w=Object(P.a)(y);function y(){var h;Object(F.a)(this,y);for(var p=arguments.length,v=new Array(p),_=0;_<p;_++)v[_]=arguments[_];return h=w.call.apply(w,[this].concat(v)),h.state={goInputText:""},h.buildOptionText=function(E){return"".concat(E," ").concat(h.props.locale.items_per_page)},h.changeSize=function(E){h.props.changeSize(Number(E))},h.handleChange=function(E){h.setState({goInputText:E.target.value})},h.handleBlur=function(E){var g=h.props,j=g.goButton,U=g.quickGo,S=g.rootPrefixCls,z=h.state.goInputText;if(j||z==="")return;if(E.relatedTarget&&(E.relatedTarget.className.indexOf("".concat(S,"-prev"))>=0||E.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;h.setState({goInputText:""}),U(h.getValidValue())},h.go=function(E){var g=h.state.goInputText;if(g==="")return;(E.keyCode===a.ENTER||E.type==="click")&&(h.setState({goInputText:""}),h.props.quickGo(h.getValidValue()))},h}return Object(T.a)(y,[{key:"getValidValue",value:function(){var p=this.state,v=p.goInputText,_=p.current;return!v||isNaN(v)?_:Number(v)}},{key:"getPageSizeOptions",value:function(){var p=this.props,v=p.pageSize,_=p.pageSizeOptions;return _.some(function(E){return E.toString()===v.toString()})?_:_.concat([v.toString()]).sort(function(E,g){var j=isNaN(Number(E))?0:Number(E),U=isNaN(Number(g))?0:Number(g);return j-U})}},{key:"render",value:function(){var p=this,v=this.props,_=v.pageSize,E=v.locale,g=v.rootPrefixCls,j=v.changeSize,U=v.quickGo,S=v.goButton,z=v.selectComponentClass,H=v.buildOptionText,M=v.selectPrefixCls,V=v.disabled,K=this.state.goInputText,$="".concat(g,"-options"),Z=z,me=null,oe=null,fe=null;if(!j&&!U)return null;var ye=this.getPageSizeOptions();if(j&&Z){var Ie=ye.map(function(ve,de){return t.a.createElement(Z.Option,{key:de,value:ve.toString()},(H||p.buildOptionText)(ve))});me=t.a.createElement(Z,{disabled:V,prefixCls:M,showSearch:!1,className:"".concat($,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(_||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(de){return de.parentNode}},Ie)}return U&&(S&&(fe=typeof S=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat($,"-quick-jumper-button")},E.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),oe=t.a.createElement("div",{className:"".concat($,"-quick-jumper")},E.jump_to,t.a.createElement("input",{disabled:V,type:"text",value:K,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,fe)),t.a.createElement("li",{className:"".concat($)},me,oe)}}]),y}(t.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=i,s=L("N2Kk");function n(){}function l(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function c(k,w,y){return y}function x(k,w,y){var h=typeof k=="undefined"?w.pageSize:k;return Math.floor((y.total-1)/h)+1}var A=function(k){Object(R.a)(y,k);var w=Object(P.a)(y);function y(h){var p;Object(F.a)(this,y),p=w.call(this,h),p.getJumpPrevPage=function(){return Math.max(1,p.state.current-(p.props.showLessItems?3:5))},p.getJumpNextPage=function(){return Math.min(x(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(j,U){var S=p.props.prefixCls,z=j||t.a.createElement("button",{type:"button","aria-label":U,className:"".concat(S,"-item-link")});return typeof j=="function"&&(z=t.a.createElement(j,Object(I.a)({},p.props))),z},p.savePaginationNode=function(j){p.paginationNode=j},p.isValid=function(j){return l(j)&&j!==p.state.current},p.shouldDisplayQuickJumper=function(){var j=p.props,U=j.showQuickJumper,S=j.pageSize,z=j.total;return z<=S?!1:U},p.handleKeyDown=function(j){(j.keyCode===a.ARROW_UP||j.keyCode===a.ARROW_DOWN)&&j.preventDefault()},p.handleKeyUp=function(j){var U=p.getValidValue(j),S=p.state.currentInputValue;U!==S&&p.setState({currentInputValue:U}),j.keyCode===a.ENTER?p.handleChange(U):j.keyCode===a.ARROW_UP?p.handleChange(U-1):j.keyCode===a.ARROW_DOWN&&p.handleChange(U+1)},p.changePageSize=function(j){var U=p.state.current,S=x(j,p.state,p.props);U=U>S?S:U,S===0&&(U=p.state.current),typeof j=="number"&&("pageSize"in p.props||p.setState({pageSize:j}),"current"in p.props||p.setState({current:U,currentInputValue:U})),p.props.onShowSizeChange(U,j),"onChange"in p.props&&p.props.onChange&&p.props.onChange(U,j)},p.handleChange=function(j){var U=p.props.disabled,S=j;if(p.isValid(S)&&!U){var z=x(void 0,p.state,p.props);S>z?S=z:S<1&&(S=1),"current"in p.props||p.setState({current:S,currentInputValue:S});var H=p.state.pageSize;return p.props.onChange(S,H),S}return p.state.current},p.prev=function(){p.hasPrev()&&p.handleChange(p.state.current-1)},p.next=function(){p.hasNext()&&p.handleChange(p.state.current+1)},p.jumpPrev=function(){p.handleChange(p.getJumpPrevPage())},p.jumpNext=function(){p.handleChange(p.getJumpNextPage())},p.hasPrev=function(){return p.state.current>1},p.hasNext=function(){return p.state.current<x(void 0,p.state,p.props)},p.runIfEnter=function(j,U){if(j.key==="Enter"||j.charCode===13){for(var S=arguments.length,z=new Array(S>2?S-2:0),H=2;H<S;H++)z[H-2]=arguments[H];U.apply(void 0,z)}},p.runIfEnterPrev=function(j){p.runIfEnter(j,p.prev)},p.runIfEnterNext=function(j){p.runIfEnter(j,p.next)},p.runIfEnterJumpPrev=function(j){p.runIfEnter(j,p.jumpPrev)},p.runIfEnterJumpNext=function(j){p.runIfEnter(j,p.jumpNext)},p.handleGoTO=function(j){(j.keyCode===a.ENTER||j.type==="click")&&p.handleChange(p.state.currentInputValue)};var v=h.onChange!==n,_="current"in h;_&&!v&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var E=h.defaultCurrent;"current"in h&&(E=h.current);var g=h.defaultPageSize;return"pageSize"in h&&(g=h.pageSize),E=Math.min(E,x(g,void 0,h)),p.state={current:E,currentInputValue:E,pageSize:g},p}return Object(T.a)(y,[{key:"componentDidUpdate",value:function(p,v){var _=this.props.prefixCls;if(v.current!==this.state.current&&this.paginationNode){var E=this.paginationNode.querySelector(".".concat(_,"-item-").concat(v.current));E&&document.activeElement===E&&E.blur()}}},{key:"getValidValue",value:function(p){var v=p.target.value,_=x(void 0,this.state,this.props),E=this.state.currentInputValue,g;return v===""?g=v:isNaN(Number(v))?g=E:v>=_?g=_:g=Number(v),g}},{key:"getShowSizeChanger",value:function(){var p=this.props,v=p.showSizeChanger,_=p.total,E=p.totalBoundaryShowSizeChanger;return typeof v!="undefined"?v:_>E}},{key:"renderPrev",value:function(p){var v=this.props,_=v.prevIcon,E=v.itemRender,g=E(p,"prev",this.getItemIcon(_,"prev page")),j=!this.hasPrev();return Object(m.isValidElement)(g)?Object(m.cloneElement)(g,{disabled:j}):g}},{key:"renderNext",value:function(p){var v=this.props,_=v.nextIcon,E=v.itemRender,g=E(p,"next",this.getItemIcon(_,"next page")),j=!this.hasNext();return Object(m.isValidElement)(g)?Object(m.cloneElement)(g,{disabled:j}):g}},{key:"render",value:function(){var p=this,v=this.props,_=v.prefixCls,E=v.className,g=v.style,j=v.disabled,U=v.hideOnSinglePage,S=v.total,z=v.locale,H=v.showQuickJumper,M=v.showLessItems,V=v.showTitle,K=v.showTotal,$=v.simple,Z=v.itemRender,me=v.showPrevNextJumpers,oe=v.jumpPrevIcon,fe=v.jumpNextIcon,ye=v.selectComponentClass,Ie=v.selectPrefixCls,ve=v.pageSizeOptions,de=this.state,Je=de.current,Rt=de.pageSize,Ee=de.currentInputValue;if(U===!0&&S<=Rt)return null;var Me=x(void 0,this.state,this.props),rt=[],He=null,ke=null,ht=null,ie=null,xe=null,we=H&&H.goButton,$e=M?1:2,ct=Je-1>0?Je-1:0,yt=Je+1<Me?Je+1:Me,Ut=Object.keys(this.props).reduce(function(ae,le){return(le.substr(0,5)==="data-"||le.substr(0,5)==="aria-"||le==="role")&&(ae[le]=p.props[le]),ae},{});if($)return we&&(typeof we=="boolean"?xe=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):xe=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},we),xe=t.a.createElement("li",{title:V?"".concat(z.jump_to).concat(Je,"/").concat(Me):null,className:"".concat(_,"-simple-pager")},xe)),t.a.createElement("ul",Object(Y.a)({className:o()(_,"".concat(_,"-simple"),Object(B.a)({},"".concat(_,"-disabled"),j),E),style:g,ref:this.savePaginationNode},Ut),t.a.createElement("li",{title:V?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:o()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ct)),t.a.createElement("li",{title:V?"".concat(Je,"/").concat(Me):null,className:"".concat(_,"-simple-pager")},t.a.createElement("input",{type:"text",value:Ee,disabled:j,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(_,"-slash")},"/"),Me),t.a.createElement("li",{title:V?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:o()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(yt)),xe);if(Me<=3+$e*2){var We={locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:V,itemRender:Z};Me||rt.push(t.a.createElement(f,Object(Y.a)({},We,{key:"noPager",page:Me,className:"".concat(_,"-disabled")})));for(var kt=1;kt<=Me;kt+=1){var qt=Je===kt;rt.push(t.a.createElement(f,Object(Y.a)({},We,{key:kt,page:kt,active:qt})))}}else{var Pe=M?z.prev_3:z.prev_5,Ae=M?z.next_3:z.next_5;me&&(He=t.a.createElement("li",{title:V?Pe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:o()("".concat(_,"-jump-prev"),Object(B.a)({},"".concat(_,"-jump-prev-custom-icon"),!!oe))},Z(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),ke=t.a.createElement("li",{title:V?Ae:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:o()("".concat(_,"-jump-next"),Object(B.a)({},"".concat(_,"-jump-next-custom-icon"),!!fe))},Z(this.getJumpNextPage(),"jump-next",this.getItemIcon(fe,"next page")))),ie=t.a.createElement(f,{locale:z,last:!0,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Me,page:Me,active:!1,showTitle:V,itemRender:Z}),ht=t.a.createElement(f,{locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:V,itemRender:Z});var ut=Math.max(1,Je-$e),Et=Math.min(Je+$e,Me);Je-1<=$e&&(Et=1+$e*2),Me-Je<=$e&&(ut=Me-$e*2);for(var Ze=ut;Ze<=Et;Ze+=1){var dt=Je===Ze;rt.push(t.a.createElement(f,{locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:dt,showTitle:V,itemRender:Z}))}Je-1>=$e*2&&Je!==1+2&&(rt[0]=Object(m.cloneElement)(rt[0],{className:"".concat(_,"-item-after-jump-prev")}),rt.unshift(He)),Me-Je>=$e*2&&Je!==Me-2&&(rt[rt.length-1]=Object(m.cloneElement)(rt[rt.length-1],{className:"".concat(_,"-item-before-jump-next")}),rt.push(ke)),ut!==1&&rt.unshift(ht),Et!==Me&&rt.push(ie)}var Ne=null;K&&(Ne=t.a.createElement("li",{className:"".concat(_,"-total-text")},K(S,[S===0?0:(Je-1)*Rt+1,Je*Rt>S?S:Je*Rt])));var Te=!this.hasPrev()||!Me,Oe=!this.hasNext()||!Me;return t.a.createElement("ul",Object(Y.a)({className:o()(_,E,Object(B.a)({},"".concat(_,"-disabled"),j)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},Ut),Ne,t.a.createElement("li",{title:V?z.prev_page:null,onClick:this.prev,tabIndex:Te?null:0,onKeyPress:this.runIfEnterPrev,className:o()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),Te)),"aria-disabled":Te},this.renderPrev(ct)),rt,t.a.createElement("li",{title:V?z.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:o()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(yt)),t.a.createElement(d,{disabled:j,locale:z,rootPrefixCls:_,selectComponentClass:ye,selectPrefixCls:Ie,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Je,pageSize:Rt,pageSizeOptions:ve,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(p,v){var _={};if("current"in p&&(_.current=p.current,p.current!==v.current&&(_.currentInputValue=_.current)),"pageSize"in p&&p.pageSize!==v.pageSize){var E=v.current,g=x(p.pageSize,v,p);E=E>g?g:E,"current"in p||(_.current=E,_.currentInputValue=E),_.pageSize=p.pageSize}return _}}]),y}(t.a.Component);A.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:s.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var C=A},"6GrX":function(Be,J,L){var Y=L("mFDi"),B=L("Xnb7"),I=L("bYtY"),F=I.getContext,T=I.extend,R=I.retrieve2,P=I.retrieve3,m=I.trim,t={},b=0,o=5e3,u=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,f="12px sans-serif",a={};function i(U,S){a[U]=S}function d(U,S){S=S||f;var z=U+":"+S;if(t[z])return t[z];for(var H=(U+"").split(`
`),M=0,V=0,K=H.length;V<K;V++)M=Math.max(v(H[V],S).width,M);return b>o&&(b=0,t={}),b++,t[z]=M,M}function s(U,S,z,H,M,V,K,$){return K?l(U,S,z,H,M,V,K,$):n(U,S,z,H,M,V,$)}function n(U,S,z,H,M,V,K){var $=_(U,S,M,V,K),Z=d(U,S);M&&(Z+=M[1]+M[3]);var me=$.outerHeight,oe=c(0,Z,z),fe=x(0,me,H),ye=new Y(oe,fe,Z,me);return ye.lineHeight=$.lineHeight,ye}function l(U,S,z,H,M,V,K,$){var Z=E(U,{rich:K,truncate:$,font:S,textAlign:z,textPadding:M,textLineHeight:V}),me=Z.outerWidth,oe=Z.outerHeight,fe=c(0,me,z),ye=x(0,oe,H);return new Y(fe,ye,me,oe)}function c(U,S,z){return z==="right"?U-=S:z==="center"&&(U-=S/2),U}function x(U,S,z){return z==="middle"?U-=S/2:z==="bottom"&&(U-=S),U}function A(U,S,z){var H=S.textPosition,M=S.textDistance,V=z.x,K=z.y;M=M||0;var $=z.height,Z=z.width,me=$/2,oe="left",fe="top";switch(H){case"left":V-=M,K+=me,oe="right",fe="middle";break;case"right":V+=M+Z,K+=me,fe="middle";break;case"top":V+=Z/2,K-=M,oe="center",fe="bottom";break;case"bottom":V+=Z/2,K+=$+M,oe="center";break;case"inside":V+=Z/2,K+=me,oe="center",fe="middle";break;case"insideLeft":V+=M,K+=me,fe="middle";break;case"insideRight":V+=Z-M,K+=me,oe="right",fe="middle";break;case"insideTop":V+=Z/2,K+=M,oe="center";break;case"insideBottom":V+=Z/2,K+=$-M,oe="center",fe="bottom";break;case"insideTopLeft":V+=M,K+=M;break;case"insideTopRight":V+=Z-M,K+=M,oe="right";break;case"insideBottomLeft":V+=M,K+=$-M,fe="bottom";break;case"insideBottomRight":V+=Z-M,K+=$-M,oe="right",fe="bottom";break}return U=U||{},U.x=V,U.y=K,U.textAlign=oe,U.textVerticalAlign=fe,U}function C(U,S,z){var H={textPosition:U,textDistance:z};return A({},H,S)}function k(U,S,z,H,M){if(!S)return"";var V=(U+"").split(`
`);M=w(S,z,H,M);for(var K=0,$=V.length;K<$;K++)V[K]=y(V[K],M);return V.join(`
`)}function w(U,S,z,H){H=T({},H),H.font=S;var z=R(z,"...");H.maxIterations=R(H.maxIterations,2);var M=H.minChar=R(H.minChar,0);H.cnCharWidth=d("\u56FD",S);var V=H.ascCharWidth=d("a",S);H.placeholder=R(H.placeholder,"");for(var K=U=Math.max(0,U-1),$=0;$<M&&K>=V;$++)K-=V;var Z=d(z,S);return Z>K&&(z="",Z=0),K=U-Z,H.ellipsis=z,H.ellipsisWidth=Z,H.contentWidth=K,H.containerWidth=U,H}function y(U,S){var z=S.containerWidth,H=S.font,M=S.contentWidth;if(!z)return"";var V=d(U,H);if(V<=z)return U;for(var K=0;;K++){if(V<=M||K>=S.maxIterations){U+=S.ellipsis;break}var $=K===0?h(U,M,S.ascCharWidth,S.cnCharWidth):V>0?Math.floor(U.length*M/V):0;U=U.substr(0,$),V=d(U,H)}return U===""&&(U=S.placeholder),U}function h(U,S,z,H){for(var M=0,V=0,K=U.length;V<K&&M<S;V++){var $=U.charCodeAt(V);M+=0<=$&&$<=127?z:H}return V}function p(U){return d("\u56FD",U)}function v(U,S){return a.measureText(U,S)}a.measureText=function(U,S){var z=F();return z.font=S||f,z.measureText(U)};function _(U,S,z,H,M){U!=null&&(U+="");var V=R(H,p(S)),K=U?U.split(`
`):[],$=K.length*V,Z=$,me=!0;if(z&&(Z+=z[0]+z[2]),U&&M){me=!1;var oe=M.outerHeight,fe=M.outerWidth;if(oe!=null&&Z>oe)U="",K=[];else if(fe!=null)for(var ye=w(fe-(z?z[1]+z[3]:0),S,M.ellipsis,{minChar:M.minChar,placeholder:M.placeholder}),Ie=0,ve=K.length;Ie<ve;Ie++)K[Ie]=y(K[Ie],ye)}return{lines:K,height:$,outerHeight:Z,lineHeight:V,canCacheByTextString:me}}function E(U,S){var z={lines:[],width:0,height:0};if(U!=null&&(U+=""),!U)return z;for(var H=u.lastIndex=0,M;(M=u.exec(U))!=null;){var V=M.index;V>H&&g(z,U.substring(H,V)),g(z,M[2],M[1]),H=u.lastIndex}H<U.length&&g(z,U.substring(H,U.length));var K=z.lines,$=0,Z=0,me=[],oe=S.textPadding,fe=S.truncate,ye=fe&&fe.outerWidth,Ie=fe&&fe.outerHeight;oe&&(ye!=null&&(ye-=oe[1]+oe[3]),Ie!=null&&(Ie-=oe[0]+oe[2]));for(var ve=0;ve<K.length;ve++){for(var de=K[ve],Je=0,Rt=0,Ee=0;Ee<de.tokens.length;Ee++){var Me=de.tokens[Ee],rt=Me.styleName&&S.rich[Me.styleName]||{},He=Me.textPadding=rt.textPadding,ke=Me.font=rt.font||S.font,ht=Me.textHeight=R(rt.textHeight,p(ke));if(He&&(ht+=He[0]+He[2]),Me.height=ht,Me.lineHeight=P(rt.textLineHeight,S.textLineHeight,ht),Me.textAlign=rt&&rt.textAlign||S.textAlign,Me.textVerticalAlign=rt&&rt.textVerticalAlign||"middle",Ie!=null&&$+Me.lineHeight>Ie)return{lines:[],width:0,height:0};Me.textWidth=d(Me.text,ke);var ie=rt.textWidth,xe=ie==null||ie==="auto";if(typeof ie=="string"&&ie.charAt(ie.length-1)==="%")Me.percentWidth=ie,me.push(Me),ie=0;else{if(xe){ie=Me.textWidth;var we=rt.textBackgroundColor,$e=we&&we.image;$e&&($e=B.findExistImage($e),B.isImageReady($e)&&(ie=Math.max(ie,$e.width*ht/$e.height)))}var ct=He?He[1]+He[3]:0;ie+=ct;var yt=ye!=null?ye-Rt:null;yt!=null&&yt<ie&&(!xe||yt<ct?(Me.text="",Me.textWidth=ie=0):(Me.text=k(Me.text,yt-ct,ke,fe.ellipsis,{minChar:fe.minChar}),Me.textWidth=d(Me.text,ke),ie=Me.textWidth+ct))}Rt+=Me.width=ie,rt&&(Je=Math.max(Je,Me.lineHeight))}de.width=Rt,de.lineHeight=Je,$+=Je,Z=Math.max(Z,Rt)}z.outerWidth=z.width=R(S.textWidth,Z),z.outerHeight=z.height=R(S.textHeight,$),oe&&(z.outerWidth+=oe[1]+oe[3],z.outerHeight+=oe[0]+oe[2]);for(var ve=0;ve<me.length;ve++){var Me=me[ve],Ut=Me.percentWidth;Me.width=parseInt(Ut,10)/100*Z}return z}function g(U,S,z){for(var H=S==="",M=S.split(`
`),V=U.lines,K=0;K<M.length;K++){var $=M[K],Z={styleName:z,text:$,isLineHolder:!$&&!H};if(K)V.push({tokens:[Z]});else{var me=(V[V.length-1]||(V[0]={tokens:[]})).tokens,oe=me.length;oe===1&&me[0].isLineHolder?me[0]=Z:($||!oe||H)&&me.push(Z)}}}function j(U){var S=(U.fontSize||U.fontFamily)&&[U.fontStyle,U.fontWeight,(U.fontSize||12)+"px",U.fontFamily||"sans-serif"].join(" ");return S&&m(S)||U.textFont||U.font}J.DEFAULT_FONT=f,J.$override=i,J.getWidth=d,J.getBoundingRect=s,J.adjustTextX=c,J.adjustTextY=x,J.calculateTextPosition=A,J.adjustTextPositionOnRect=C,J.truncateText=k,J.getLineHeight=p,J.measureText=v,J.parsePlainText=_,J.parseRichText=E,J.makeFont=j},"6RRn":function(Be,J,L){"use strict";var Y=L("wCXF"),B=L("n6Qo");L.d(J,"b",function(){return B.a});var I=L("IBYe"),F=L("6eGT"),T=L("hW8S");L.d(J,"a",function(){return T.a}),J.c=Y.b},"6UM0":function(Be,J,L){var Y,B;(function(){var I;(function(){"use strict";var T=[function(t,b,o){var u=o(1).Beautifier,f=o(5).Options;function a(i,d){var s=new u(i,d);return s.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new f}},function(t,b,o){var u=o(2).Output,f=o(3).Token,a=o(4),i=o(5).Options,d=o(7).Tokenizer,s=o(7).line_starters,n=o(7).positionable_operators,l=o(7).TOKEN;function c(M,V){return V.indexOf(M)!==-1}function x(M){return M.replace(/^\s+/g,"")}function A(M){for(var V={},K=0;K<M.length;K++)V[M[K].replace(/-/g,"_")]=M[K];return V}function C(M,V){return M&&M.type===l.RESERVED&&M.text===V}function k(M,V){return M&&M.type===l.RESERVED&&c(M.text,V)}var w=["case","return","do","if","throw","else","await","break","continue","async"],y=["before-newline","after-newline","preserve-newline"],h=A(y),p=[h.before_newline,h.preserve_newline],v={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _(M,V){if(V.multiline_frame||V.mode===v.ForInitializer||V.mode===v.Conditional)return;M.remove_indent(V.start_line_index)}function E(M){M=M.replace(a.allLineBreaks,`
`);for(var V=[],K=M.indexOf(`
`);K!==-1;)V.push(M.substring(0,K)),M=M.substring(K+1),K=M.indexOf(`
`);return M.length&&V.push(M),V}function g(M){return M===v.ArrayLiteral}function j(M){return c(M,[v.Expression,v.ForInitializer,v.Conditional])}function U(M,V){for(var K=0;K<M.length;K++){var $=M[K].trim();if($.charAt(0)!==V)return!1}return!0}function S(M,V){for(var K=0,$=M.length,Z;K<$;K++)if(Z=M[K],Z&&Z.indexOf(V)!==0)return!1;return!0}function z(M,V){V=V||{},this._source_text=M||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(V)}z.prototype.create_flags=function(M,V){var K=0;M&&(K=M.indentation_level,!this._output.just_added_newline()&&M.line_indent_level>K&&(K=M.line_indent_level));var $={mode:V,parent:M,last_token:M?M.last_token:new f(l.START_BLOCK,""),last_word:M?M.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:K,alignment:0,line_indent_level:M?M.line_indent_level:K,start_line_index:this._output.get_line_number(),ternary_depth:0};return $},z.prototype._reset=function(M){var V=M.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new u(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(v.BlockStatement);var K=new d(M,this._options);return this._tokens=K.tokenize(),M},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M,V=this._reset(this._source_text),K=this._options.eol;this._options.eol==="auto"&&(K=`
`,V&&a.lineBreak.test(V||"")&&(K=V.match(a.lineBreak)[0]));for(var $=this._tokens.next();$;)this.handle_token($),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$,$=this._tokens.next();return M=this._output.get_code(K),M},z.prototype.handle_token=function(M,V){M.type===l.START_EXPR?this.handle_start_expr(M):M.type===l.END_EXPR?this.handle_end_expr(M):M.type===l.START_BLOCK?this.handle_start_block(M):M.type===l.END_BLOCK?this.handle_end_block(M):M.type===l.WORD?this.handle_word(M):M.type===l.RESERVED?this.handle_word(M):M.type===l.SEMICOLON?this.handle_semicolon(M):M.type===l.STRING?this.handle_string(M):M.type===l.EQUALS?this.handle_equals(M):M.type===l.OPERATOR?this.handle_operator(M):M.type===l.COMMA?this.handle_comma(M):M.type===l.BLOCK_COMMENT?this.handle_block_comment(M,V):M.type===l.COMMENT?this.handle_comment(M,V):M.type===l.DOT?this.handle_dot(M):M.type===l.EOF?this.handle_eof(M):M.type===l.UNKNOWN?this.handle_unknown(M,V):this.handle_unknown(M,V)},z.prototype.handle_whitespace_and_comments=function(M,V){var K=M.newlines,$=this._options.keep_array_indentation&&g(this._flags.mode);if(M.comments_before)for(var Z=M.comments_before.next();Z;)this.handle_whitespace_and_comments(Z,V),this.handle_token(Z,V),Z=M.comments_before.next();if($)for(var me=0;me<K;me+=1)this.print_newline(me>0,V);else if(this._options.max_preserve_newlines&&K>this._options.max_preserve_newlines&&(K=this._options.max_preserve_newlines),this._options.preserve_newlines&&K>1){this.print_newline(!1,V);for(var oe=1;oe<K;oe+=1)this.print_newline(!0,V)}};var H=["async","break","continue","return","throw","yield"];z.prototype.allow_wrap_or_preserved_newline=function(M,V){if(V=V===void 0?!1:V,this._output.just_added_newline())return;var K=this._options.preserve_newlines&&M.newlines||V,$=c(this._flags.last_token.text,n)||c(M.text,n);if($){var Z=c(this._flags.last_token.text,n)&&c(this._options.operator_position,p)||c(M.text,n);K=K&&Z}if(K)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(k(this._flags.last_token,H))return;this._output.set_wrap_point()}},z.prototype.print_newline=function(M,V){if(!V&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var K=this._tokens.peek();this._flags.mode===v.Statement&&!(this._flags.if_block&&C(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(M)&&(this._flags.multiline_frame=!0)},z.prototype.print_token_line_indentation=function(M){this._output.just_added_newline()&&(this._options.keep_array_indentation&&M.newlines&&(M.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(M.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},z.prototype.print_token=function(M){if(this._output.raw){this._output.add_raw_token(M);return}if(this._options.comma_first&&M.previous&&M.previous.type===l.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var V=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(V),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(M),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(M),this._output.non_breaking_space=!0,this._output.add_token(M.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.set_mode=function(M){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,M),this._flags=this.create_flags(this._previous_flags,M),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===v.Statement&&_(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.start_of_object_property=function(){return this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||k(this._flags.last_token,["get","set"]))},z.prototype.start_of_statement=function(M){var V=!1;return V=V||k(this._flags.last_token,["var","let","const"])&&M.type===l.WORD,V=V||C(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement)&&k(this._flags.last_token,H)&&!M.newlines,V=V||C(this._flags.last_token,"else")&&!(C(M,"if")&&!M.comments_before),V=V||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===v.ForInitializer||this._previous_flags.mode===v.Conditional),V=V||this._flags.last_token.type===l.WORD&&this._flags.mode===v.BlockStatement&&!this._flags.in_case&&!(M.text==="--"||M.text==="++")&&this._last_last_text!=="function"&&M.type!==l.WORD&&M.type!==l.RESERVED,V=V||this._flags.mode===v.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||k(this._flags.last_token,["get","set"])),V?(this.set_mode(v.Statement),this.indent(),this.handle_whitespace_and_comments(M,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M,k(M,["do","for","if","while"])),!0):!1},z.prototype.handle_start_expr=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M);var V=v.Expression;if(M.text==="["){if(this._flags.last_token.type===l.WORD||this._flags.last_token.text===")"){k(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(M),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=v.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())),c(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=v.ForInitializer):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=v.Conditional):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&M.whitespace_before===""?this._output.space_before_token=!1:(c(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var K=this._tokens.peek(-3);if(this._options.space_after_named_function&&K){var $=this._tokens.peek(-4);k(K,["async","function"])||K.text==="*"&&k($,["async","function"])?this._output.space_before_token=!0:this._flags.mode===v.ObjectLiteral?(K.text==="{"||K.text===","||K.text==="*"&&($.text==="{"||$.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(M);(this._flags.last_token.type===l.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===l.START_BLOCK?this.print_newline():(this._flags.last_token.type===l.END_EXPR||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===l.COMMA)&&this.allow_wrap_or_preserved_newline(M,M.newlines),this.print_token(M),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},z.prototype.handle_end_expr=function(M){for(;this._flags.mode===v.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(M,M.text==="]"&&g(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===l.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(M),this.restore_mode(),_(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===v.Conditional&&(this._previous_flags.mode=v.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},z.prototype.handle_start_block=function(M){this.handle_whitespace_and_comments(M);var V=this._tokens.peek(),K=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(v.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(v.BlockStatement):K&&(c(K.text,[":",","])&&c(V.type,[l.STRING,l.WORD,l.RESERVED])||c(V.text,["get","set","..."])&&c(K.type,[l.WORD,l.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(K.text,[":",","])?this.set_mode(v.BlockStatement):this.set_mode(v.ObjectLiteral):this._flags.last_token.type===l.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(v.BlockStatement):c(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||k(this._flags.last_token,["return","throw","import","default"])?this.set_mode(v.ObjectLiteral):this.set_mode(v.BlockStatement),this._flags.last_token&&(k(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var $=!V.comments_before&&V.text==="}",Z=$&&this._flags.last_word==="function"&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var me=0,oe=null;this._flags.inline_frame=!0;do if(me+=1,oe=this._tokens.peek(me-1),oe.newlines){this._flags.inline_frame=!1;break}while(oe.type!==l.EOF&&!(oe.type===l.END_BLOCK&&oe.opened===M))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(Z||this._flags.last_token.type===l.EQUALS||k(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===l.START_EXPR||this._flags.last_token.type===l.COMMA)&&((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(M),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(this._flags.last_token.type===l.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(M),this.indent(),!$&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},z.prototype.handle_end_block=function(M){for(this.handle_whitespace_and_comments(M);this._flags.mode===v.Statement;)this.restore_mode();var V=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(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(M)},z.prototype.handle_word=function(M){if(M.type===l.RESERVED){if(c(M.text,["set","get"])&&this._flags.mode!==v.ObjectLiteral)M.type=l.WORD;else if(M.text==="import"&&c(this._tokens.peek().text,["(","."]))M.type=l.WORD;else if(c(M.text,["as","from"])&&!this._flags.import_block)M.type=l.WORD;else if(this._flags.mode===v.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(M.type=l.WORD)}}if(this.start_of_statement(M)?k(this._flags.last_token,["var","let","const"])&&M.type===l.WORD&&(this._flags.declaration_statement=!0):M.newlines&&!j(this._flags.mode)&&(this._flags.last_token.type!==l.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==l.EQUALS&&(this._options.preserve_newlines||!k(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(M),this.print_newline()):this.handle_whitespace_and_comments(M),this._flags.do_block&&!this._flags.do_while)if(C(M,"while")){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&C(M,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===v.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&k(M,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(M),this._flags.in_case=!0;return}if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M)),C(M,"function")){(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(c(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===l.OPERATOR))&&(!this._output.just_added_blankline()&&!M.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?k(this._flags.last_token,["get","set","new","export"])||k(this._flags.last_token,H)?this._output.space_before_token=!0:C(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(j(this._flags.mode)||g(this._flags.mode))||this.print_newline(),this.print_token(M),this._flags.last_word=M.text;return}var K="NONE";if(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?K="SPACE":k(M,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines?K="NEWLINE":(K="SPACE",this._output.space_before_token=!0):K="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===v.BlockStatement?K="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&j(this._flags.mode)?K="SPACE":this._flags.last_token.type===l.STRING?K="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.last_token.text==="*"&&(c(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&c(this._last_last_text,["{",","]))?K="SPACE":this._flags.last_token.type===l.START_BLOCK?this._flags.inline_frame?K="SPACE":K="NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,K="NEWLINE"),k(M,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?K="SPACE":K="NEWLINE"),k(M,["else","catch","finally"]))if((!(this._flags.last_token.type===l.END_BLOCK&&this._previous_flags.mode===v.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $=this._output.current_line;$.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else K==="NEWLINE"?k(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&k(M,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?(this._flags.last_token.type!==l.START_EXPR||!k(M,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(M,"if")&&C(M.previous,"else")?this._output.space_before_token=!0:this.print_newline()):k(M,s)&&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():K==="SPACE"&&(this._output.space_before_token=!0);M.previous&&(M.previous.type===l.WORD||M.previous.type===l.RESERVED)&&(this._output.space_before_token=!0),this.print_token(M),this._flags.last_word=M.text,M.type===l.RESERVED&&(M.text==="do"?this._flags.do_block=!0:M.text==="if"?this._flags.if_block=!0:M.text==="import"?this._flags.import_block=!0:this._flags.import_block&&C(M,"from")&&(this._flags.import_block=!1))},z.prototype.handle_semicolon=function(M){this.start_of_statement(M)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(M);for(var V=this._tokens.peek();this._flags.mode===v.Statement&&!(this._flags.if_block&&C(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(M)},z.prototype.handle_string=function(M){M.text.startsWith("`")&&M.newlines===0&&M.whitespace_before===""&&(M.previous.text===")"||this._flags.last_token.type===l.WORD)||(this.start_of_statement(M)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(M),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M):M.text.startsWith("`")&&this._flags.last_token.type===l.END_EXPR&&(M.previous.text==="]"||M.previous.text===")")&&M.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(M)},z.prototype.handle_equals=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0},z.prototype.handle_comma=function(M){this.handle_whitespace_and_comments(M,!0),this.print_token(M),this._output.space_before_token=!0,this._flags.declaration_statement?(j(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)):this._flags.mode===v.ObjectLiteral||this._flags.mode===v.Statement&&this._flags.parent.mode===v.ObjectLiteral?(this._flags.mode===v.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)},z.prototype.handle_operator=function(M){var V=M.text==="*"&&(k(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),K=c(M.text,["-","+"])&&(c(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||c(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(M)){var $=!V;this.handle_whitespace_and_comments(M,$)}if(M.text==="*"&&this._flags.last_token.type===l.DOT){this.print_token(M);return}if(M.text==="::"){this.print_token(M);return}if(this._flags.last_token.type===l.OPERATOR&&c(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(M),M.text===":"&&this._flags.in_case){this.print_token(M),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Z=!0,me=!0,oe=!1;if(M.text===":"?this._flags.ternary_depth===0?Z=!1:(this._flags.ternary_depth-=1,oe=!0):M.text==="?"&&(this._flags.ternary_depth+=1),!K&&!V&&this._options.preserve_newlines&&c(M.text,n)){var fe=M.text===":",ye=fe&&oe,Ie=fe&&!oe;switch(this._options.operator_position){case h.before_newline:this._output.space_before_token=!Ie,this.print_token(M),(!fe||ye)&&this.allow_wrap_or_preserved_newline(M),this._output.space_before_token=!0;return;case h.after_newline:this._output.space_before_token=!0,!fe||ye?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(M):this._output.space_before_token=!1,this.print_token(M),this._output.space_before_token=!0;return;case h.preserve_newline:Ie||this.allow_wrap_or_preserved_newline(M),Z=!(this._output.just_added_newline()||Ie),this._output.space_before_token=Z,this.print_token(M),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(M),Z=!1;var ve=this._tokens.peek();me=ve&&c(ve.type,[l.WORD,l.RESERVED])}else if(M.text==="...")this.allow_wrap_or_preserved_newline(M),Z=this._flags.last_token.type===l.START_BLOCK,me=!1;else if(c(M.text,["--","++","!","~"])||K){if((this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR)&&this.allow_wrap_or_preserved_newline(M),Z=!1,me=!1,M.newlines&&(M.text==="--"||M.text==="++"||M.text==="~")){var de=k(this._flags.last_token,w)&&M.newlines;de&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(de,!0)}this._flags.last_token.text===";"&&j(this._flags.mode)&&(Z=!0),this._flags.last_token.type===l.RESERVED?Z=!0:this._flags.last_token.type===l.END_EXPR?Z=!(this._flags.last_token.text==="]"&&(M.text==="--"||M.text==="++")):this._flags.last_token.type===l.OPERATOR&&(Z=c(M.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(M.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(me=!0)),(this._flags.mode===v.BlockStatement&&!this._flags.inline_frame||this._flags.mode===v.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Z,this.print_token(M),this._output.space_before_token=me},z.prototype.handle_block_comment=function(M,V){if(this._output.raw){this._output.add_raw_token(M),M.directives&&M.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(M.directives){this.print_newline(!1,V),this.print_token(M),M.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(M.text)&&!M.newlines){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0;return}else this.print_block_commment(M,V)},z.prototype.print_block_commment=function(M,V){var K=E(M.text),$,Z=!1,me=!1,oe=M.whitespace_before,fe=oe.length;if(this.print_newline(!1,V),this.print_token_line_indentation(M),this._output.add_token(K[0]),this.print_newline(!1,V),K.length>1){for(K=K.slice(1),Z=U(K,"*"),me=S(K,oe),Z&&(this._flags.alignment=1),$=0;$<K.length;$++)Z?(this.print_token_line_indentation(M),this._output.add_token(x(K[$]))):me&&K[$]?(this.print_token_line_indentation(M),this._output.add_token(K[$].substring(fe))):(this._output.current_line.set_indent(-1),this._output.add_token(K[$])),this.print_newline(!1,V);this._flags.alignment=0}},z.prototype.handle_comment=function(M,V){M.newlines?this.print_newline(!1,V):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(M),this.print_newline(!1,V)},z.prototype.handle_dot=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),k(this._flags.last_token,w)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(M,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(M)},z.prototype.handle_unknown=function(M,V){this.print_token(M),M.text[M.text.length-1]===`
`&&this.print_newline(!1,V)},z.prototype.handle_eof=function(M){for(;this._flags.mode===v.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M)},t.exports.Beautifier=z},function(t){function b(f){this.__parent=f,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=[]}b.prototype.clone_empty=function(){var f=new b(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},b.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},b.prototype.has_match=function(f){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(f))return!0;return!1},b.prototype.set_indent=function(f,a){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(f){this.__items.push(f);var a=f.lastIndexOf(`
`);a!==-1?this.__character_count=f.length-a:this.__character_count+=f.length},b.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function o(f,a){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),a=a||"",f.indent_level>0&&(a=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}o.prototype.get_indent_size=function(f,a){var i=this.__base_string_length;return a=a||0,f<0&&(i=0),i+=f*this.__indent_size,i+=a,i},o.prototype.get_indent_string=function(f,a){var i=this.__base_string;return a=a||0,f<0&&(f=0,i=""),a+=f*this.__indent_size,this.__ensure_cache(a),i+=this.__cache[a],i},o.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var f=this.__cache.length,a=0,i="";this.__indent_size&&f>=this.__indent_size&&(a=Math.floor(f/this.__indent_size),f-=a*this.__indent_size,i=new Array(a+1).join(this.__indent_string)),f&&(i+=new Array(f+1).join(" ")),this.__cache.push(i)};function u(f,a){this.__indent_cache=new o(f,a),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(f,a){return this.__indent_cache.get_indent_string(f,a)},u.prototype.get_indent_size=function(f,a){return this.__indent_cache.get_indent_size(f,a)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(f){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
`);return f!==`
`&&(i=i.replace(/[\n]/g,f)),i},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(f,a){return f=f||0,a=a||0,this.next_line.set_indent(f,a),this.__lines.length>1?(this.current_line.set_indent(f,a),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(f){for(var a=0;a<f.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(f){for(var a=this.__lines.length;f<a;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(f,a){for(var i=this.__lines.length-2;i>=0;){var d=this.__lines[i];if(d.is_empty())break;if(d.item(0).indexOf(f)!==0&&d.item(-1)!==a){this.__lines.splice(i+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=u},function(t){function b(o,u,f,a){this.type=o,this.text=u,this.comments_before=null,this.newlines=f||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=b},function(t,b){var o="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\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",a="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+o+f+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+u+f+a+"])*";b.identifier=new RegExp(i+d,"g"),b.identifierStart=new RegExp(i),b.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+u+f+a+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;b.newline=/[\n\r\u2028\u2029]/,b.lineBreak=new RegExp(`\r
|`+b.newline.source),b.allLineBreaks=new RegExp(b.lineBreak.source,"g")},function(t,b,o){var u=o(6).Options,f=["before-newline","after-newline","preserve-newline"];function a(i){u.call(this,i,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n<s.length;n++)s[n]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[n];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",f),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new u,t.exports.Options=a},function(t){function b(f,a){this.raw_options=o(f,a),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"])}b.prototype._get_array=function(f,a){var i=this.raw_options[f],d=a||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(d=i.concat()):typeof i=="string"&&(d=i.split(/[^a-zA-Z0-9_\/\-]+/)),d},b.prototype._get_boolean=function(f,a){var i=this.raw_options[f],d=i===void 0?!!a:!!i;return d},b.prototype._get_characters=function(f,a){var i=this.raw_options[f],d=a||"";return typeof i=="string"&&(d=i.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},b.prototype._get_number=function(f,a){var i=this.raw_options[f];a=parseInt(a,10),isNaN(a)&&(a=0);var d=parseInt(i,10);return isNaN(d)&&(d=a),d},b.prototype._get_selection=function(f,a,i){var d=this._get_selection_list(f,a,i);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[f]+"'");return d[0]},b.prototype._get_selection_list=function(f,a,i){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[a[0]],!this._is_valid_selection(i,a))throw new Error("Invalid Default Value!");var d=this._get_array(f,i);if(!this._is_valid_selection(d,a))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[f]+"'");return d},b.prototype._is_valid_selection=function(f,a){return f.length&&a.length&&!f.some(function(i){return a.indexOf(i)===-1})};function o(f,a){var i={};f=u(f);var d;for(d in f)d!==a&&(i[d]=f[d]);if(a&&f[a])for(d in f[a])i[d]=f[a][d];return i}function u(f){var a={},i;for(i in f){var d=i.replace(/-/g,"_");a[d]=f[i]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=o},function(t,b,o){var u=o(8).InputScanner,f=o(9).Tokenizer,a=o(9).TOKEN,i=o(13).Directives,d=o(4),s=o(12).Pattern,n=o(14).TemplatablePattern;function l(U,S){return S.indexOf(U)!==-1}var c={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:a.START,RAW:a.RAW,EOF:a.EOF},x=new i(/\/\*/,/\*\//),A=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,C=/[0-9]/,k=/[^\d\.]/,w=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";y=y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),y="\\?\\.(?!\\d) "+y,y=y.replace(/ /g,"|");var h=new RegExp(y),p="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=p.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_=new RegExp("^(?:"+v.join("|")+")$"),E,g=function(U,S){f.call(this,U,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var z=new s(this._input),H=new n(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(d.identifier).matching(d.identifierMatch),number:z.matching(A),punct:z.matching(h),comment:z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:z.matching(/<!--/),html_comment_end:z.matching(/-->/),include:z.starting_with(/#include/).until_after(d.lineBreak),shebang:z.starting_with(/#!/).until_after(d.lineBreak),xml:z.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:H.until(/['\\\n\r\u2028\u2029]/),double_quote:H.until(/["\\\n\r\u2028\u2029]/),template_text:H.until(/[`\\$]/),template_expression:H.until(/[`}\\]/)}};g.prototype=new f,g.prototype._is_comment=function(U){return U.type===c.COMMENT||U.type===c.BLOCK_COMMENT||U.type===c.UNKNOWN},g.prototype._is_opening=function(U){return U.type===c.START_BLOCK||U.type===c.START_EXPR},g.prototype._is_closing=function(U,S){return(U.type===c.END_BLOCK||U.type===c.END_EXPR)&&S&&(U.text==="]"&&S.text==="["||U.text===")"&&S.text==="("||U.text==="}"&&S.text==="{")},g.prototype._reset=function(){E=!1},g.prototype._get_next_token=function(U,S){var z=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(c.EOF,""):(z=z||this._read_non_javascript(H),z=z||this._read_string(H),z=z||this._read_word(U),z=z||this._read_singles(H),z=z||this._read_comment(H),z=z||this._read_regexp(H,U),z=z||this._read_xml(H,U),z=z||this._read_punctuation(),z=z||this._create_token(c.UNKNOWN,this._input.next()),z)},g.prototype._read_word=function(U){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(d.allLineBreaks,`
`),!(U.type===c.DOT||U.type===c.RESERVED&&(U.text==="set"||U.text==="get"))&&_.test(S)?(S==="in"||S==="of")&&(U.type===c.WORD||U.type===c.STRING)?this._create_token(c.OPERATOR,S):this._create_token(c.RESERVED,S):this._create_token(c.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(c.WORD,S)},g.prototype._read_singles=function(U){var S=null;return U==="("||U==="["?S=this._create_token(c.START_EXPR,U):U===")"||U==="]"?S=this._create_token(c.END_EXPR,U):U==="{"?S=this._create_token(c.START_BLOCK,U):U==="}"?S=this._create_token(c.END_BLOCK,U):U===";"?S=this._create_token(c.SEMICOLON,U):U==="."&&k.test(this._input.peek(1))?S=this._create_token(c.DOT,U):U===","&&(S=this._create_token(c.COMMA,U)),S&&this._input.next(),S},g.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(c.EQUALS,U):U==="?."?this._create_token(c.DOT,U):this._create_token(c.OPERATOR,U)},g.prototype._read_non_javascript=function(U){var S="";if(U==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(c.UNKNOWN,S.trim()+`
`);if(S=this.__patterns.include.read(),S)return this._create_token(c.UNKNOWN,S.trim()+`
`);U=this._input.next();var z="#";if(this._input.hasNext()&&this._input.testChar(C)){do U=this._input.next(),z+=U;while(this._input.hasNext()&&U!=="#"&&U!=="=");return U==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(z+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,z)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)S+=this._input.next();return E=!0,this._create_token(c.COMMENT,S)}}else if(E&&U==="-"&&(S=this.__patterns.html_comment_end.read(),S))return E=!1,this._create_token(c.COMMENT,S);return null},g.prototype._read_comment=function(U){var S=null;if(U==="/"){var z="";if(this._input.peek(1)==="*"){z=this.__patterns.block_comment.read();var H=x.get_directives(z);H&&H.ignore==="start"&&(z+=x.readIgnored(this._input)),z=z.replace(d.allLineBreaks,`
`),S=this._create_token(c.BLOCK_COMMENT,z),S.directives=H}else this._input.peek(1)==="/"&&(z=this.__patterns.comment.read(),S=this._create_token(c.COMMENT,z))}return S},g.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var S=this._input.next();return this.has_char_escapes=!1,U==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(S=j(S)),this._input.peek()===U&&(S+=this._input.next()),S=S.replace(d.allLineBreaks,`
`),this._create_token(c.STRING,S)}return null},g.prototype._allow_regexp_or_xml=function(U){return U.type===c.RESERVED&&l(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===c.END_EXPR&&U.text===")"&&U.opened.previous.type===c.RESERVED&&l(U.opened.previous.text,["if","while","for"])||l(U.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},g.prototype._read_regexp=function(U,S){if(U==="/"&&this._allow_regexp_or_xml(S)){for(var z=this._input.next(),H=!1,M=!1;this._input.hasNext()&&(H||M||this._input.peek()!==U)&&!this._input.testChar(d.newline);)z+=this._input.peek(),H?H=!1:(H=this._input.peek()==="\\",this._input.peek()==="["?M=!0:this._input.peek()==="]"&&(M=!1)),this._input.next();return this._input.peek()===U&&(z+=this._input.next(),z+=this._input.read(d.identifier)),this._create_token(c.STRING,z)}return null},g.prototype._read_xml=function(U,S){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(S)){var z="",H=this.__patterns.xml.read_match();if(H){for(var M=H[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=M.indexOf("{")===0,K=0;H;){var $=!!H[1],Z=H[2],me=!!H[H.length-1]||Z.slice(0,8)==="![CDATA[";if(!me&&(Z===M||V&&Z.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&($?--K:++K),z+=H[0],K<=0)break;H=this.__patterns.xml.read_match()}return H||(z+=this._input.match(/[\s\S]*/g)[0]),z=z.replace(d.allLineBreaks,`
`),this._create_token(c.STRING,z)}}return null};function j(U){for(var S="",z=0,H=new u(U),M=null;H.hasNext();)if(M=H.match(/([\s]|[^\\]|\\\\)+/g),M&&(S+=M[0]),H.peek()==="\\"){if(H.next(),H.peek()==="x")M=H.match(/x([0-9A-Fa-f]{2})/g);else if(H.peek()==="u")M=H.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",H.hasNext()&&(S+=H.next());continue}if(!M)return U;if(z=parseInt(M[1],16),z>126&&z<=255&&M[0].indexOf("x")===0)return U;if(z>=0&&z<32){S+="\\"+M[0];continue}else z===34||z===39||z===92?S+="\\"+String.fromCharCode(z):S+=String.fromCharCode(z)}return S}g.prototype._read_string_recursive=function(U,S,z){var H,M;U==="'"?M=this.__patterns.single_quote:U==='"'?M=this.__patterns.double_quote:U==="`"?M=this.__patterns.template_text:U==="}"&&(M=this.__patterns.template_expression);for(var V=M.read(),K="";this._input.hasNext();){if(K=this._input.next(),K===U||!S&&d.newline.test(K)){this._input.back();break}else K==="\\"&&this._input.hasNext()?(H=this._input.peek(),H==="x"||H==="u"?this.has_char_escapes=!0:H==="\r"&&this._input.peek(1)===`
`&&this._input.next(),K+=this._input.next()):z&&(z==="${"&&K==="$"&&this._input.peek()==="{"&&(K+=this._input.next()),z===K&&(U==="`"?K+=this._read_string_recursive("}",S,"`"):K+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(K+=this._input.next())));K+=M.read(),V+=K}return V},t.exports.Tokenizer=g,t.exports.TOKEN=c,t.exports.positionable_operators=w.slice(),t.exports.line_starters=p.slice()},function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function o(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},o.prototype.peek=function(u){var f=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(f=this.__input.charAt(u)),f},o.prototype.__match=function(u,f){u.lastIndex=f;var a=u.exec(this.__input);return a&&!(b&&u.sticky)&&(a.index!==f&&(a=null)),a},o.prototype.test=function(u,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(u,f):!1},o.prototype.testChar=function(u,f){var a=this.peek(f);return u.lastIndex=0,a!==null&&u.test(a)},o.prototype.match=function(u){var f=this.__match(u,this.__position);return f?this.__position+=f[0].length:f=null,f},o.prototype.read=function(u,f,a){var i="",d;return u&&(d=this.match(u),d&&(i+=d[0])),f&&(d||!u)&&(i+=this.readUntil(f,a)),i},o.prototype.readUntil=function(u,f){var a="",i=this.__position;u.lastIndex=this.__position;var d=u.exec(this.__input);return d?(i=d.index,f&&(i+=d[0].length)):i=this.__input_length,a=this.__input.substring(this.__position,i),this.__position=i,a},o.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},o.prototype.get_regexp=function(u,f){var a=null,i="g";return f&&b&&(i="y"),typeof u=="string"&&u!==""?a=new RegExp(u,i):u&&(a=new RegExp(u.source,i)),a},o.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(u){var f=this.__position,a=this.readUntilAfter(u);return this.__position=f,a},o.prototype.lookBack=function(u){var f=this.__position-1;return f>=u.length&&this.__input.substring(f-u.length,f).toLowerCase()===u},t.exports.InputScanner=o},function(t,b,o){var u=o(8).InputScanner,f=o(3).Token,a=o(10).TokenStream,i=o(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(n,l){this._input=new u(n),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var n,l=new f(d.START,""),c=null,x=[],A=new a;l.type!==d.EOF;){for(n=this._get_next_token(l,c);this._is_comment(n);)A.add(n),n=this._get_next_token(l,c);A.isEmpty()||(n.comments_before=A,A=new a),n.parent=c,this._is_opening(n)?(x.push(c),c=n):c&&this._is_closing(n,c)&&(n.opened=c,c.closed=n,c=x.pop(),n.parent=c),n.previous=l,l.next=n,this.__tokens.add(n),l=n}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(n,l){this._readWhitespace();var c=this._input.read(/.+/g);return c?this._create_token(d.RAW,c):this._create_token(d.EOF,"")},s.prototype._is_comment=function(n){return!1},s.prototype._is_opening=function(n){return!1},s.prototype._is_closing=function(n,l){return!1},s.prototype._create_token=function(n,l){var c=new f(n,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return c},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=s,t.exports.TOKEN=d},function(t){function b(o){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=o}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__tokens[this.__position],this.__position+=1),o},b.prototype.peek=function(o){var u=null;return o=o||0,o+=this.__position,o>=0&&o<this.__tokens_length&&(u=this.__tokens[o]),u},b.prototype.add=function(o){this.__parent_token&&(o.parent=this.__parent_token),this.__tokens.push(o),this.__tokens_length+=1},t.exports.TokenStream=b},function(t,b,o){var u=o(12).Pattern;function f(a,i){u.call(this,a,i),i?this._line_regexp=this._input.get_regexp(i._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}f.prototype=new u,f.prototype.__set_whitespace_patterns=function(a,i){a+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},f.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var i=this.__split(this._newline_regexp,a);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return a},f.prototype.matching=function(a,i){var d=this._create();return d.__set_whitespace_patterns(a,i),d._update(),d},f.prototype._create=function(){return new f(this._input,this)},f.prototype.__split=function(a,i){a.lastIndex=0;for(var d=0,s=[],n=a.exec(i);n;)s.push(i.substring(d,n.index)),d=n.index+n[0].length,n=a.exec(i);return d<i.length?s.push(i.substring(d,i.length)):s.push(""),s},t.exports.WhitespacePattern=f},function(t){function b(o,u){this._input=o,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,u&&(this._starting_pattern=this._input.get_regexp(u._starting_pattern,!0),this._match_pattern=this._input.get_regexp(u._match_pattern,!0),this._until_pattern=this._input.get_regexp(u._until_pattern),this._until_after=u._until_after)}b.prototype.read=function(){var o=this._input.read(this._starting_pattern);return(!this._starting_pattern||o)&&(o+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),o},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(o){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(o),u._update(),u},b.prototype.until=function(o){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(o),u._update(),u},b.prototype.starting_with=function(o){var u=this._create();return u._starting_pattern=this._input.get_regexp(o,!0),u._update(),u},b.prototype.matching=function(o){var u=this._create();return u._match_pattern=this._input.get_regexp(o,!0),u._update(),u},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},t.exports.Pattern=b},function(t){function b(o,u){o=typeof o=="string"?o:o.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(o);f;)u[f[1]]=f[2],f=this.__directive_pattern.exec(o);return u},b.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},function(t,b,o){var u=o(12).Pattern,f={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(i,d){u.call(this,i,d),this.__template_pattern=null,this._disabled=Object.assign({},f),this._excluded=Object.assign({},f),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var s=new u(i);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new u,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(i){var d=this._create();return d._disabled[i]=!0,d._update(),d},a.prototype.read_options=function(i){var d=this._create();for(var s in f)d._disabled[s]=i.templating.indexOf(s)===-1;return d._update(),d},a.prototype.exclude=function(i){var d=this._create();return d._excluded[i]=!0,d._update(),d},a.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),i+=d,d=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},a.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},a.prototype._read_template=function(){var i="",d=this._input.peek();if(d==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(i=i||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},t.exports.TemplatablePattern=a}],R={};function P(t){var b=R[t];if(b!==void 0)return b.exports;var o=R[t]={exports:{}};return T[t](o,o.exports,P),o.exports}var m=P(0);I=m})();var F=I;!(Y=[],B=function(){return{js_beautify:F}}.apply(J,Y),B!==void 0&&(Be.exports=B))})()},"6eGT":function(Be,J,L){"use strict";function Y(B){return null}J.a=Y},"6fms":function(Be,J,L){var Y=L("SUKs"),B=L("06Qe"),I=L("bYtY"),F=I.each;function T(t){return parseInt(t,10)}function R(t,b){B.initVML(),this.root=t,this.storage=b;var o=document.createElement("div"),u=document.createElement("div");o.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",u.style.cssText="position:absolute;left:0;top:0;",t.appendChild(o),this._vmlRoot=u,this._vmlViewport=o,this.resize();var f=b.delFromStorage,a=b.addToStorage;b.delFromStorage=function(i){f.call(b,i),i&&(i.onRemove&&i.onRemove(u))},b.addToStorage=function(i){i.onAdd&&i.onAdd(u),a.call(b,i)},this._firstPaint=!0}R.prototype={constructor:R,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 b=this._vmlRoot,o=0;o<t.length;o++){var u=t[o];u.invisible||u.ignore?(u.__alreadyNotVisible||u.onRemove(b),u.__alreadyNotVisible=!0):(u.__alreadyNotVisible&&u.onAdd(b),u.__alreadyNotVisible=!1,u.__dirty&&(u.beforeBrush&&u.beforeBrush(),(u.brushVML||u.brush).call(u,b),u.afterBrush&&u.afterBrush())),u.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(b),this._firstPaint=!1)},resize:function(t,b){var t=t==null?this._getWidth():t,b=b==null?this._getHeight():b;if(this._width!==t||this._height!==b){this._width=t,this._height=b;var o=this._vmlViewport.style;o.width=t+"px",o.height=b+"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,b=t.currentStyle;return(t.clientWidth||T(b.width))-T(b.paddingLeft)-T(b.paddingRight)|0},_getHeight:function(){var t=this.root,b=t.currentStyle;return(t.clientHeight||T(b.height))-T(b.paddingTop)-T(b.paddingBottom)|0}};function P(t){return function(){Y('In IE8.0 VML mode painter not support method "'+t+'"')}}F(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){R.prototype[t]=P(t)});var m=R;Be.exports=m},"746U":function(Be,J,L){"use strict";L.d(J,"f",function(){return Y}),L.d(J,"l",function(){return B}),L.d(J,"k",function(){return I}),L.d(J,"j",function(){return F}),L.d(J,"g",function(){return T}),L.d(J,"m",function(){return R}),L.d(J,"h",function(){return P}),L.d(J,"n",function(){return m}),L.d(J,"c",function(){return t}),L.d(J,"a",function(){return b}),L.d(J,"i",function(){return o}),L.d(J,"o",function(){return u}),L.d(J,"e",function(){return i}),L.d(J,"d",function(){return d}),L.d(J,"p",function(){return s}),L.d(J,"b",function(){return n});function Y(l){return Array.isArray(l)}function B(l){return typeof l=="string"}function I(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&!(l instanceof RegExp)&&!(l instanceof Date)}function F(l){return typeof l=="number"&&!isNaN(l)}function T(l){return l===!0||l===!1}function R(l){return typeof l=="undefined"}function P(l){return!m(l)}function m(l){return R(l)||l===null}function t(l,c){if(!l)throw new Error(c?`Unexpected type, expected '${c}'`:"Unexpected type")}function b(l){if(m(l))throw new Error("Assertion Failed: argument is undefined or null");return l}function o(l){return typeof l=="function"}function u(l,c){const x=Math.min(l.length,c.length);for(let A=0;A<x;A++)f(l[A],c[A])}function f(l,c){if(B(c)){if(typeof l!==c)throw new Error(`argument does not match constraint: typeof ${c}`)}else if(o(c)){try{if(l instanceof c)return}catch(x){}if(!m(l)&&l.constructor===c)return;if(c.length===1&&c.call(void 0,l)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(l){let c=[],x=Object.getPrototypeOf(l);for(;Object.prototype!==x;)c=c.concat(Object.getOwnPropertyNames(x)),x=Object.getPrototypeOf(x);return c}function i(l){const c=[];for(const x of a(l))typeof l[x]=="function"&&c.push(x);return c}function d(l,c){const x=C=>function(){const k=Array.prototype.slice.call(arguments,0);return c(C,k)};let A={};for(const C of l)A[C]=x(C);return A}function s(l){return l===null?void 0:l}function n(l,c="Unreachable"){throw new Error(c)}},"7Cbv":function(Be,J,L){"use strict";var Y=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),B=new Uint8Array(16);function I(){if(!Y)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Y(B)}var F=/^(?:[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 T(f){return typeof f=="string"&&F.test(f)}for(var R=T,P=[],m=0;m<256;++m)P.push((m+256).toString(16).substr(1));function t(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=(P[f[a+0]]+P[f[a+1]]+P[f[a+2]]+P[f[a+3]]+"-"+P[f[a+4]]+P[f[a+5]]+"-"+P[f[a+6]]+P[f[a+7]]+"-"+P[f[a+8]]+P[f[a+9]]+"-"+P[f[a+10]]+P[f[a+11]]+P[f[a+12]]+P[f[a+13]]+P[f[a+14]]+P[f[a+15]]).toLowerCase();if(!R(i))throw TypeError("Stringified UUID is invalid");return i}var b=t;function o(f,a,i){f=f||{};var d=f.random||(f.rng||I)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,a){i=i||0;for(var s=0;s<16;++s)a[i+s]=d[s];return a}return b(d)}var u=J.a=o},"7SHv":function(Be,J,L){var Y=L("LPTA"),B=Y.devicePixelRatio,I=L("bYtY"),F=L("SUKs"),T=L("mFDi"),R=L("BPZU"),P=L("Xmg4"),m=L("mLcG"),t=L("Dagg"),b=L("ItGF"),o=1e5,u=314159,f=.01,a=.001;function i(w){return parseInt(w,10)}function d(w){return w?w.__builtin__?!0:!(typeof w.resize!="function"||typeof w.refresh!="function"):!1}var s=new T(0,0,0,0),n=new T(0,0,0,0);function l(w,y,h){return s.copy(w.getBoundingRect()),w.transform&&s.applyTransform(w.transform),n.width=y,n.height=h,!s.intersect(n)}function c(w,y){if(w===y)return!1;if(!w||!y||w.length!==y.length)return!0;for(var h=0;h<w.length;h++)if(w[h]!==y[h])return!0;return!1}function x(w,y){for(var h=0;h<w.length;h++){var p=w[h];p.setTransform(y),y.beginPath(),p.buildPath(y,p.shape),y.clip(),p.restoreTransform(y)}}function A(w,y){var h=document.createElement("div");return h.style.cssText=["position:relative","width:"+w+"px","height:"+y+"px","padding:0","margin:0","border-width:0"].join(";")+";",h}var C=function(w,y,h){this.type="canvas";var p=!w.nodeName||w.nodeName.toUpperCase()==="CANVAS";this._opts=h=I.extend({},h||{}),this.dpr=h.devicePixelRatio||B,this._singleCanvas=p,this.root=w;var v=w.style;v&&(v["-webkit-tap-highlight-color"]="transparent",v["-webkit-user-select"]=v["user-select"]=v["-webkit-touch-callout"]="none",w.innerHTML=""),this.storage=y;var _=this._zlevelList=[],E=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,p){var j=w.width,U=w.height;h.width!=null&&(j=h.width),h.height!=null&&(U=h.height),this.dpr=h.devicePixelRatio||1,w.width=j*this.dpr,w.height=U*this.dpr,this._width=j,this._height=U;var S=new P(w,this,this.dpr);S.__builtin__=!0,S.initContext(),E[u]=S,S.zlevel=u,_.push(u),this._domRoot=w}else{this._width=this._getSize(0),this._height=this._getSize(1);var g=this._domRoot=A(this._width,this._height);w.appendChild(g)}this._hoverlayer=null,this._hoverElements=[]};C.prototype={constructor:C,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 y=this.storage.getDisplayList(!0),h=this._zlevelList;this._redrawId=Math.random(),this._paintList(y,w,this._redrawId);for(var p=0;p<h.length;p++){var v=h[p],_=this._layers[v];if(!_.__builtin__&&_.refresh){var E=p===0?this._backgroundColor:null;_.refresh(E)}}return this.refreshHover(),this},addHover:function(w,y){if(w.__hoverMir)return;var h=new w.constructor({style:w.style,shape:w.shape,z:w.z,z2:w.z2,silent:w.silent});return h.__from=w,w.__hoverMir=h,y&&h.setStyle(y),this._hoverElements.push(h),h},removeHover:function(w){var y=w.__hoverMir,h=this._hoverElements,p=I.indexOf(h,y);p>=0&&h.splice(p,1),w.__hoverMir=null},clearHover:function(w){for(var y=this._hoverElements,h=0;h<y.length;h++){var p=y[h].__from;p&&(p.__hoverMir=null)}y.length=0},refreshHover:function(){var w=this._hoverElements,y=w.length,h=this._hoverlayer;if(h&&h.clear(),!y)return;R(w,this.storage.displayableSortFunc),h||(h=this._hoverlayer=this.getLayer(o));var p={};h.ctx.save();for(var v=0;v<y;){var _=w[v],E=_.__from;if(!(E&&E.__zr)){w.splice(v,1),E.__hoverMir=null,y--;continue}v++,E.invisible||(_.transform=E.transform,_.invTransform=E.invTransform,_.__clipPaths=E.__clipPaths,this._doPaintEl(_,h,!0,p))}h.ctx.restore()},getHoverLayer:function(){return this.getLayer(o)},_paintList:function(w,y,h){if(this._redrawId!==h)return;y=y||!1,this._updateLayerStatus(w);var p=this._doPaintList(w,y);if(this._needsManuallyCompositing&&this._compositeManually(),!p){var v=this;m(function(){v._paintList(w,y,h)})}},_compositeManually:function(){var w=this.getLayer(u).ctx,y=this._domRoot.width,h=this._domRoot.height;w.clearRect(0,0,y,h),this.eachBuiltinLayer(function(p){p.virtual&&w.drawImage(p.dom,0,0,y,h)})},_doPaintList:function(w,y){for(var h=[],p=0;p<this._zlevelList.length;p++){var v=this._zlevelList[p],_=this._layers[v];_.__builtin__&&_!==this._hoverlayer&&(_.__dirty||y)&&h.push(_)}for(var E=!0,g=0;g<h.length;g++){var _=h[g],j=_.ctx,U={};j.save();var S=y?_.__startIndex:_.__drawIndex,z=!y&&_.incremental&&Date.now,H=z&&Date.now(),M=_.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(_.__startIndex===_.__endIndex)_.clear(!1,M);else if(S===_.__startIndex){var V=w[S];(!V.incremental||!V.notClear||y)&&_.clear(!1,M)}S===-1&&(console.error("For some unknown reason. drawIndex is -1"),S=_.__startIndex);for(var K=S;K<_.__endIndex;K++){var $=w[K];if(this._doPaintEl($,_,y,U),$.__dirty=$.__dirtyText=!1,z){var Z=Date.now()-H;if(Z>15)break}}_.__drawIndex=K,_.__drawIndex<_.__endIndex&&(E=!1),U.prevElClipPaths&&j.restore(),j.restore()}return b.wxa&&I.each(this._layers,function(me){me&&me.ctx&&me.ctx.draw&&me.ctx.draw()}),E},_doPaintEl:function(w,y,h,p){var v=y.ctx,_=w.transform;if((y.__dirty||h)&&!w.invisible&&w.style.opacity!==0&&!(_&&!_[0]&&!_[3])&&!(w.culling&&l(w,this._width,this._height))){var E=w.__clipPaths,g=p.prevElClipPaths;(!g||c(E,g))&&(g&&(v.restore(),p.prevElClipPaths=null,p.prevEl=null),E&&(v.save(),x(E,v),p.prevElClipPaths=E)),w.beforeBrush&&w.beforeBrush(v),w.brush(v,p.prevEl||null),p.prevEl=w,w.afterBrush&&w.afterBrush(v)}},getLayer:function(w,y){this._singleCanvas&&!this._needsManuallyCompositing&&(w=u);var h=this._layers[w];return h||(h=new P("zr_"+w,this,this.dpr),h.zlevel=w,h.__builtin__=!0,this._layerConfig[w]?I.merge(h,this._layerConfig[w],!0):this._layerConfig[w-f]&&I.merge(h,this._layerConfig[w-f],!0),y&&(h.virtual=y),this.insertLayer(w,h),h.initContext()),h},insertLayer:function(w,y){var h=this._layers,p=this._zlevelList,v=p.length,_=null,E=-1,g=this._domRoot;if(h[w]){F("ZLevel "+w+" has been used already");return}if(!d(y)){F("Layer of zlevel "+w+" is not valid");return}if(v>0&&w>p[0]){for(E=0;E<v-1&&!(p[E]<w&&p[E+1]>w);E++);_=h[p[E]]}if(p.splice(E+1,0,w),h[w]=y,!y.virtual)if(_){var j=_.dom;j.nextSibling?g.insertBefore(y.dom,j.nextSibling):g.appendChild(y.dom)}else g.firstChild?g.insertBefore(y.dom,g.firstChild):g.appendChild(y.dom)},eachLayer:function(w,y){var h=this._zlevelList,p,v;for(v=0;v<h.length;v++)p=h[v],w.call(y,this._layers[p],p)},eachBuiltinLayer:function(w,y){var h=this._zlevelList,p,v,_;for(_=0;_<h.length;_++)v=h[_],p=this._layers[v],p.__builtin__&&w.call(y,p,v)},eachOtherLayer:function(w,y){var h=this._zlevelList,p,v,_;for(_=0;_<h.length;_++)v=h[_],p=this._layers[v],p.__builtin__||w.call(y,p,v)},getLayers:function(){return this._layers},_updateLayerStatus:function(w){this.eachBuiltinLayer(function(U,S){U.__dirty=U.__used=!1});function y(U){v&&(v.__endIndex!==U&&(v.__dirty=!0),v.__endIndex=U)}if(this._singleCanvas)for(var h=1;h<w.length;h++){var p=w[h];if(p.zlevel!==w[h-1].zlevel||p.incremental){this._needsManuallyCompositing=!0;break}}for(var v=null,_=0,E,h=0;h<w.length;h++){var p=w[h],g=p.zlevel,j;E!==g&&(E=g,_=0),p.incremental?(j=this.getLayer(g+a,this._needsManuallyCompositing),j.incremental=!0,_=1):j=this.getLayer(g+(_>0?f:0),this._needsManuallyCompositing),j.__builtin__||F("ZLevel "+g+" has been used by unkown layer "+j.id),j!==v&&(j.__used=!0,j.__startIndex!==h&&(j.__dirty=!0),j.__startIndex=h,j.incremental?j.__drawIndex=-1:j.__drawIndex=h,y(h),v=j),p.__dirty&&(j.__dirty=!0,j.incremental&&j.__drawIndex<0&&(j.__drawIndex=h))}y(h),this.eachBuiltinLayer(function(U,S){!U.__used&&U.getElementCount()>0&&(U.__dirty=!0,U.__startIndex=U.__endIndex=U.__drawIndex=0),U.__dirty&&U.__drawIndex<0&&(U.__drawIndex=U.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(w){w.clear()},setBackgroundColor:function(w){this._backgroundColor=w},configLayer:function(w,y){if(y){var h=this._layerConfig;h[w]?I.merge(h[w],y,!0):h[w]=y;for(var p=0;p<this._zlevelList.length;p++){var v=this._zlevelList[p];if(v===w||v===w+f){var _=this._layers[v];I.merge(_,h[w],!0)}}}},delLayer:function(w){var y=this._layers,h=this._zlevelList,p=y[w];if(!p)return;p.dom.parentNode.removeChild(p.dom),delete y[w],h.splice(I.indexOf(h,w),1)},resize:function(w,y){if(this._domRoot.style){var h=this._domRoot;h.style.display="none";var p=this._opts;if(w!=null&&(p.width=w),y!=null&&(p.height=y),w=this._getSize(0),y=this._getSize(1),h.style.display="",this._width!==w||y!==this._height){h.style.width=w+"px",h.style.height=y+"px";for(var v in this._layers)this._layers.hasOwnProperty(v)&&this._layers[v].resize(w,y);I.each(this._progressiveLayers,function(_){_.resize(w,y)}),this.refresh(!0)}this._width=w,this._height=y}else{if(w==null||y==null)return;this._width=w,this._height=y,this.getLayer(u).resize(w,y)}return this},clearLayer:function(w){var y=this._layers[w];y&&y.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[u].dom;var y=new P("image",this,w.pixelRatio||this.dpr);if(y.initContext(),y.clear(!1,w.backgroundColor||this._backgroundColor),w.pixelRatio<=this.dpr){this.refresh();var h=y.dom.width,p=y.dom.height,v=y.ctx;this.eachLayer(function(U){U.__builtin__?v.drawImage(U.dom,0,0,h,p):U.renderToCanvas&&(y.ctx.save(),U.renderToCanvas(y.ctx),y.ctx.restore())})}else for(var _={},E=this.storage.getDisplayList(!0),g=0;g<E.length;g++){var j=E[g];this._doPaintEl(j,y,!0,_)}return y.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(w){var y=this._opts,h=["width","height"][w],p=["clientWidth","clientHeight"][w],v=["paddingLeft","paddingTop"][w],_=["paddingRight","paddingBottom"][w];if(y[h]!=null&&y[h]!=="auto")return parseFloat(y[h]);var E=this.root,g=document.defaultView.getComputedStyle(E);return(E[p]||i(g[h])||i(E.style[h]))-(i(g[v])||0)-(i(g[_])||0)|0},pathToImage:function(w,y){y=y||this.dpr;var h=document.createElement("canvas"),p=h.getContext("2d"),v=w.getBoundingRect(),_=w.style,E=_.shadowBlur*y,g=_.shadowOffsetX*y,j=_.shadowOffsetY*y,U=_.hasStroke()?_.lineWidth:0,S=Math.max(U/2,-g+E),z=Math.max(U/2,g+E),H=Math.max(U/2,-j+E),M=Math.max(U/2,j+E),V=v.width+S+z,K=v.height+H+M;h.width=V*y,h.height=K*y,p.scale(y,y),p.clearRect(0,0,V,K),p.dpr=y;var $={position:w.position,rotation:w.rotation,scale:w.scale};w.position=[S-v.x,H-v.y],w.rotation=0,w.scale=[1,1],w.updateTransform(),w&&w.brush(p);var Z=t,me=new Z({style:{x:0,y:0,image:h}});return $.position!=null&&(me.position=w.position=$.position),$.rotation!=null&&(me.rotation=w.rotation=$.rotation),$.scale!=null&&(me.scale=w.scale=$.scale),me}};var k=C;Be.exports=k},"7ahc":function(Be,J,L){"use strict";L.d(J,"a",function(){return x});var Y=L("k1fw"),B=L("0Owb"),I=L("+L6B"),F=L("2/Rp"),T=L("y8nQ"),R=L("Vl3Y"),P=L("tJVT"),m=L("OaEy"),t=L("2fM7"),b=L("q1tI"),o=L.n(b),u=L("VrN/"),f=L.n(u),a=L("p77/"),i=L.n(a),d=L("c5Ni"),s=L.n(d),n=t.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},c={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"]};J.b=function(A){var C=A.callback,k=A.onCancel,w=Object(b.useState)("python"),y=Object(P.a)(w,2),h=y[0],p=y[1];function v(E){p(c[E][1])}function _(E){C(E)}return o.a.createElement(R.a,Object(B.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_}),o.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},o.a.createElement(t.a,{onChange:v},Object.keys(c).map(function(E){return o.a.createElement(n,{key:E,value:E},c[E][0])}))),o.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},o.a.createElement(x,{mode:h})),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(F.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(F.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function x(A){var C=A.value,k=A.onChange,w=A.mode,y=A.options,h=y===void 0?{}:y,p=Object(b.useRef)(),v=Object(b.useState)(),_=Object(P.a)(v,2),E=_[0],g=_[1];return Object(b.useEffect)(function(){if(E){function j(U){var S=U.getValue();k&&k(S)}return E.on("change",j),function(){E.off("change",j)}}},[E,k]),Object(b.useEffect)(function(){E&&E.setOption("mode",w)},[E,w]),Object(b.useEffect)(function(){E&&((C!==E.getValue()||C==="")&&setTimeout(function(){E.setValue(C||" ")},300))},[E,C]),Object(b.useEffect)(function(){if(p.current&&!E){var j=f.a.fromTextArea(p.current,Object(Y.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},h));g(j)}},[p.current,E]),o.a.createElement("div",{className:"my-codemirror-container"},o.a.createElement("textarea",{ref:p}))}},"7ixt":function(Be,J,L){"use strict";L.d(J,"a",function(){return I});var Y={adjustX:1,adjustY:1},B=[0,0],I={left:{points:["cr","cl"],overflow:Y,offset:[-4,0],targetOffset:B},right:{points:["cl","cr"],overflow:Y,offset:[4,0],targetOffset:B},top:{points:["bc","tc"],overflow:Y,offset:[0,-4],targetOffset:B},bottom:{points:["tc","bc"],overflow:Y,offset:[0,4],targetOffset:B},topLeft:{points:["bl","tl"],overflow:Y,offset:[0,-4],targetOffset:B},leftTop:{points:["tr","tl"],overflow:Y,offset:[-4,0],targetOffset:B},topRight:{points:["br","tr"],overflow:Y,offset:[0,-4],targetOffset:B},rightTop:{points:["tl","tr"],overflow:Y,offset:[4,0],targetOffset:B},bottomRight:{points:["tr","br"],overflow:Y,offset:[0,4],targetOffset:B},rightBottom:{points:["bl","br"],overflow:Y,offset:[4,0],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:Y,offset:[0,4],targetOffset:B},leftBottom:{points:["br","bl"],overflow:Y,offset:[-4,0],targetOffset:B}},F=I},"7oTu":function(Be,J,L){var Y=L("IMiH"),B=L("QBsz"),I=B.applyTransform,F=Y.CMD,T=[[],[],[]],R=Math.sqrt,P=Math.atan2;function m(t,b){var o=t.data,u,f,a,i,d,s,n=F.M,l=F.C,c=F.L,x=F.R,A=F.A,C=F.Q;for(a=0,i=0;a<o.length;){u=o[a++],i=a,f=0;switch(u){case n:f=1;break;case c:f=1;break;case l:f=3;break;case C:f=2;break;case A:var k=b[4],w=b[5],y=R(b[0]*b[0]+b[1]*b[1]),h=R(b[2]*b[2]+b[3]*b[3]),p=P(-b[1]/h,b[0]/y);o[a]*=y,o[a++]+=k,o[a]*=h,o[a++]+=w,o[a++]*=y,o[a++]*=h,o[a++]+=p,o[a++]+=p,a+=2,i=a;break;case x:s[0]=o[a++],s[1]=o[a++],I(s,s,b),o[i++]=s[0],o[i++]=s[1],s[0]+=o[a++],s[1]+=o[a++],I(s,s,b),o[i++]=s[0],o[i++]=s[1]}for(d=0;d<f;d++){var s=T[d];s[0]=o[a++],s[1]=o[a++],I(s,s,b),o[i++]=s[0],o[i++]=s[1]}}}Be.exports=m},"815F":function(Be,J,L){"use strict";L.d(J,"e",function(){return P}),L.d(J,"c",function(){return t}),L.d(J,"d",function(){return b}),L.d(J,"a",function(){return u}),L.d(J,"f",function(){return f}),L.d(J,"b",function(){return a});var Y=L("KQm4"),B=L("VTBJ"),I=L("Ff2n"),F=L("Zm9Q"),T=L("Kwbf"),R=L("OZM5");function P(i,d){return i!=null?i:d}function m(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function s(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var x=c.key,A=c.children;Object(T.a)(x!=null,"Tree node must have a certain key: [".concat(l).concat(x,"]"));var C=String(x);Object(T.a)(!d.has(C)||x===null||x===void 0,"Same 'key' exist in the Tree: ".concat(C)),d.set(C,!0),s(A,"".concat(l).concat(C," > "))})}s(i)}function t(i){function d(s){var n=Object(F.a)(s);return n.map(function(l){if(!Object(R.i)(l))return Object(T.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var c=l.key,x=l.props,A=x.children,C=Object(I.a)(x,["children"]),k=Object(B.a)({key:c},C),w=d(A);return w.length&&(k.children=w),k}).filter(function(l){return l})}return d(i)}function b(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(d===!0?[]:d),n=[];function l(c){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(A,C){var k=Object(R.h)(x?x.pos:"0",C),w=P(A.key,k),y=Object(B.a)(Object(B.a)({},A),{},{parent:x,pos:k,children:null,data:A,isStart:[].concat(Object(Y.a)(x?x.isStart:[]),[C===0]),isEnd:[].concat(Object(Y.a)(x?x.isEnd:[]),[C===c.length-1])});return n.push(y),d===!0||s.has(w)?y.children=l(A.children||[],y):y.children=[],y})}return l(i),n}function o(i,d,s){var n;s?typeof s=="string"?n=function(x){return x[s]}:typeof s=="function"&&(n=function(x){return s(x)}):n=function(x,A){return P(x.key,A)};function l(c,x,A){var C=c?c.children:i,k=c?Object(R.h)(A.pos,x):"0";if(c){var w=n(c,k),y={node:c,index:x,pos:k,key:w,parentPos:A.node?A.pos:null,level:A.level+1};d(y)}C&&C.forEach(function(h,p){l(h,p,{node:c,pos:k,level:A?A.level+1:-1})})}l(null)}function u(i){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=d.initWrapper,n=d.processEntity,l=d.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,x={},A={},C={posEntities:x,keyEntities:A};return s&&(C=s(C)||C),o(i,function(k){var w=k.node,y=k.index,h=k.pos,p=k.key,v=k.parentPos,_=k.level,E={node:w,index:y,key:p,pos:h,level:_},g=P(p,h);x[h]=E,A[g]=E,E.parent=x[v],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),n&&n(E,C)},c),l&&l(C),C}function f(i,d){var s=d.expandedKeys,n=d.selectedKeys,l=d.loadedKeys,c=d.loadingKeys,x=d.checkedKeys,A=d.halfCheckedKeys,C=d.dragOverNodeKey,k=d.dropPosition,w=d.keyEntities,y=w[i],h={eventKey:i,expanded:s.indexOf(i)!==-1,selected:n.indexOf(i)!==-1,loaded:l.indexOf(i)!==-1,loading:c.indexOf(i)!==-1,checked:x.indexOf(i)!==-1,halfChecked:A.indexOf(i)!==-1,pos:String(y?y.pos:""),dragOver:C===i&&k===0,dragOverGapTop:C===i&&k===-1,dragOverGapBottom:C===i&&k===1};return h}function a(i){var d=i.data,s=i.expanded,n=i.selected,l=i.checked,c=i.loaded,x=i.loading,A=i.halfChecked,C=i.dragOver,k=i.dragOverGapTop,w=i.dragOverGapBottom,y=i.pos,h=i.active,p=Object(B.a)(Object(B.a)({},d),{},{expanded:s,selected:n,checked:l,loaded:c,loading:x,halfChecked:A,dragOver:C,dragOverGapTop:k,dragOverGapBottom:w,pos:y,active:h});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(T.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),p}},"8EBN":function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";Y.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 B=0;B<Y.modeInfo.length;B++){var I=Y.modeInfo[B];I.mimes&&(I.mime=I.mimes[0])}Y.findModeByMIME=function(F){F=F.toLowerCase();for(var T=0;T<Y.modeInfo.length;T++){var R=Y.modeInfo[T];if(R.mime==F)return R;if(R.mimes){for(var P=0;P<R.mimes.length;P++)if(R.mimes[P]==F)return R}}if(/\+xml$/.test(F))return Y.findModeByMIME("application/xml");if(/\+json$/.test(F))return Y.findModeByMIME("application/json")},Y.findModeByExtension=function(F){F=F.toLowerCase();for(var T=0;T<Y.modeInfo.length;T++){var R=Y.modeInfo[T];if(R.ext){for(var P=0;P<R.ext.length;P++)if(R.ext[P]==F)return R}}},Y.findModeByFileName=function(F){for(var T=0;T<Y.modeInfo.length;T++){var R=Y.modeInfo[T];if(R.file&&R.file.test(F))return R}var P=F.lastIndexOf("."),m=P>-1&&F.substring(P+1,F.length);if(m)return Y.findModeByExtension(m)},Y.findModeByName=function(F){F=F.toLowerCase();for(var T=0;T<Y.modeInfo.length;T++){var R=Y.modeInfo[T];if(R.name.toLowerCase()==F)return R;if(R.alias){for(var P=0;P<R.alias.length;P++)if(R.alias[P].toLowerCase()==F)return R}}}})},"8HAY":function(Be,J,L){"use strict";L.d(J,"a",function(){return T}),L.d(J,"b",function(){return R}),L.d(J,"d",function(){return P}),L.d(J,"e",function(){return m}),L.d(J,"c",function(){return t});var Y=L("MI8n"),B=L("pmY6"),I=L("3/fG"),F=function(b,o,u,f){function a(i){return i instanceof u?i:new u(function(d){d(i)})}return new(u||(u=Promise))(function(i,d){function s(c){try{l(f.next(c))}catch(x){d(x)}}function n(c){try{l(f.throw(c))}catch(x){d(x)}}function l(c){c.done?i(c.value):a(c.value).then(s,n)}l((f=f.apply(b,o||[])).next())})};class T extends B.a{constructor(b,o="",u="",f=!0,a){super();this._onDidChange=this._register(new Y.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=b,this._label=o,this._cssClass=u,this._enabled=f,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(b){this._setLabel(b)}_setLabel(b){this._label!==b&&(this._label=b,this._onDidChange.fire({label:b}))}get tooltip(){return this._tooltip||""}set tooltip(b){this._setTooltip(b)}_setTooltip(b){this._tooltip!==b&&(this._tooltip=b,this._onDidChange.fire({tooltip:b}))}get class(){return this._cssClass}set class(b){this._setClass(b)}_setClass(b){this._cssClass!==b&&(this._cssClass=b,this._onDidChange.fire({class:b}))}get enabled(){return this._enabled}set enabled(b){this._setEnabled(b)}_setEnabled(b){this._enabled!==b&&(this._enabled=b,this._onDidChange.fire({enabled:b}))}get checked(){return this._checked}set checked(b){this._setChecked(b)}_setChecked(b){this._checked!==b&&(this._checked=b,this._onDidChange.fire({checked:b}))}run(b,o){return F(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(b))})}}class R extends B.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Y.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Y.b),this.onDidRun=this._onDidRun.event}run(b,o){return F(this,void 0,void 0,function*(){if(!b.enabled)return;this._onBeforeRun.fire({action:b});let u;try{yield this.runAction(b,o)}catch(f){u=f}this._onDidRun.fire({action:b,error:u})})}runAction(b,o){return F(this,void 0,void 0,function*(){yield b.run(o)})}}class P extends T{constructor(b){super(P.ID,b,b?"separator text":"separator");this.checked=!1,this.enabled=!1}}P.ID="vs.actions.separator";class m{constructor(b,o,u,f){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=b,this.label=o,this.class=f,this._actions=u}get actions(){return this._actions}dispose(){}run(){return F(this,void 0,void 0,function*(){})}}class t extends T{constructor(){super(t.ID,I.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8XDt":function(Be,J,L){L("qH13");var Y=L("aX58"),B=Y.registerPainter,I=L("6fms");B("vml",I)},"8hTe":function(Be,J,L){Be.exports={button:"button___1wy9m"}},"942q":function(Be,J,L){Be.exports={flex_box_center:"flex_box_center___6uNR7",flex_space_between:"flex_space_between___1vpXN",flex_box_vertical_center:"flex_box_vertical_center___1P9h2",flex_box_center_end:"flex_box_center_end___2guA4",flex_box_column:"flex_box_column___1w5Zf",top:"top___2UvUE",desc:"desc___2mFum",liked:"liked___12VnN",likedActive:"likedActive___3ixY7",reply:"reply___29ShJ",replyList:"replyList___1F2kY",comment:"comment___2ZnmY"}},"9Bee":function(Be,J,L){"use strict";var Y=L("DYRE"),B=L("zeV3"),I=L("+L6B"),F=L("2/Rp"),T=L("k1fw"),R=L("9og8"),P=L("tJVT"),m=L("WmNS"),t=L.n(m),b=L("q1tI"),o=L.n(b),u=L("vg9a"),f=L("DlQD"),a=L.n(f),i=L("rUJ1");function d(te,W){var G=te.match(/^(\s+)(?:```)/);if(G===null)return W;var Q=G[1];return W.split(`
`).map(function(ue){var ee=ue.match(/^\s+/);if(ee===null)return ue;var qe=Object(P.a)(ee,1),tn=qe[0];return tn.length>=Q.length?ue.slice(Q.length):ue}).join(`
`)}var s=[],n=["<ul>"],l=new a.a.Renderer,c=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function x(){s.length=0,n=["<ul>"]}var A={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function C(te,W,G,Q){if(W>=te.length||te[W].level<=G)return W;var ue=te[W];Q.push("<li><a href='#"+ue.anchor+"'>"+ue.text+"</a>"),W++;var ee=[];return W=C(te,W,ue.level,ee),ee.length>0&&(Q.push("<ul>"),ee.forEach(function(qe){Q.push(qe)}),Q.push("</ul>")),Q.push("</li>"),W=C(te,W,G,Q),W}function k(){return C(s,0,0,n),n.push("</ul>"),n.join("")}var w={heading:function(W){var G=c.exec(W);if(G)return{type:"heading",raw:G[0],depth:G[1].length,text:G[2]}},fences:function(W){var G=this.rules.block.fences.exec(W);if(G){var Q=G[0],ue=d(Q,G[3]||""),ee=G[2]?G[2].trim():G[2];if(["latex","katex","math"].indexOf(ee)>=0){var qe=p(),tn=ue;ue=qe,v[qe]={type:"block",expression:tn}}return{type:"code",raw:Q,lang:ee,text:ue}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,h=0,p=function(){return"__special_katext_id_".concat(h++,"__")},v={};function _(){return v}function E(){h=0,v={}}function g(te){return te=te.replace(y,function(W,G){var Q=p();return v[Q]={type:"inline",expression:G},Q}),te}var j=l.listitem;l.listitem=function(te){return j(g(te))};var U=l.paragraph;l.paragraph=function(te){return U(g(te))};var S=l.tablecell;l.tablecell=function(te,W){return S(g(te),W)},l.code=function(te,W,G){var Q=(W||"").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(W,'">').concat(G?te:Object(i.escape)(te,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(G?te:Object(i.escape)(te,!0))+"</code></pre>"},l.heading=function(te,W,G){var Q=this.options.headerPrefix+G.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:Q,level:W,text:te}),"<h"+W+' id="'+Q+'">'+te+"</h"+W+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:w,renderer:l});var z=a.a,H=L("SJMd"),M=L("ulZh"),V=L.n(M),K=L("m3rI"),$=L("Oy/b"),Z=L("p5ED"),me=L("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var oe=function(te,W){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,Q){G.__proto__=Q}||function(G,Q){for(var ue in Q)Object.prototype.hasOwnProperty.call(Q,ue)&&(G[ue]=Q[ue])})(te,W)};function fe(te,W){function G(){this.constructor=te}oe(te,W),te.prototype=W===null?Object.create(W):(G.prototype=W.prototype,new G)}function ye(te,W,G,Q){return new(G||(G=Promise))(function(ue,ee){function qe(Vn){try{An(Q.next(Vn))}catch(un){ee(un)}}function tn(Vn){try{An(Q.throw(Vn))}catch(un){ee(un)}}function An(Vn){var un;Vn.done?ue(Vn.value):(un=Vn.value,un instanceof G?un:new G(function(nr){nr(un)})).then(qe,tn)}An((Q=Q.apply(te,W||[])).next())})}function Ie(te,W){var G,Q,ue,ee,qe={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ee={next:tn(0),throw:tn(1),return:tn(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function tn(An){return function(Vn){return function(un){if(G)throw new TypeError("Generator is already executing.");for(;qe;)try{if(G=1,Q&&(ue=2&un[0]?Q.return:un[0]?Q.throw||((ue=Q.return)&&ue.call(Q),0):Q.next)&&!(ue=ue.call(Q,un[1])).done)return ue;switch(Q=0,ue&&(un=[2&un[0],ue.value]),un[0]){case 0:case 1:ue=un;break;case 4:return qe.label++,{value:un[1],done:!1};case 5:qe.label++,Q=un[1],un=[0];continue;case 7:un=qe.ops.pop(),qe.trys.pop();continue;default:if(!(ue=qe.trys,(ue=ue.length>0&&ue[ue.length-1])||un[0]!==6&&un[0]!==2)){qe=0;continue}if(un[0]===3&&(!ue||un[1]>ue[0]&&un[1]<ue[3])){qe.label=un[1];break}if(un[0]===6&&qe.label<ue[1]){qe.label=ue[1],ue=un;break}if(ue&&qe.label<ue[2]){qe.label=ue[2],qe.ops.push(un);break}ue[2]&&qe.ops.pop(),qe.trys.pop();continue}un=W.call(te,qe)}catch(nr){un=[6,nr],Q=0}finally{G=ue=0}if(5&un[0])throw un[1];return{value:un[0]?un[1]:void 0,done:!0}}([An,Vn])}}}function ve(){for(var te=0,W=0,G=arguments.length;W<G;W++)te+=arguments[W].length;var Q=Array(te),ue=0;for(W=0;W<G;W++)for(var ee=arguments[W],qe=0,tn=ee.length;qe<tn;qe++,ue++)Q[ue]=ee[qe];return Q}var de=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(W,G){for(var Q=0,ue=G;Q<ue.length;Q++){var ee=ue[Q],qe=ee[0],tn=ee[1];W.setAttribute(qe,tn)}},te.createRect=function(W,G,Q){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",W.toString()),ue.setAttribute("height",G.toString()),Q&&te.setAttributes(ue,Q),ue},te.createLine=function(W,G,Q,ue,ee){var qe=document.createElementNS("http://www.w3.org/2000/svg","line");return qe.setAttribute("x1",W.toString()),qe.setAttribute("y1",G.toString()),qe.setAttribute("x2",Q.toString()),qe.setAttribute("y2",ue.toString()),ee&&te.setAttributes(qe,ee),qe},te.createPolygon=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Q.setAttribute("points",W),G&&te.setAttributes(Q,G),Q},te.createCircle=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","circle");return Q.setAttribute("cx",(W/2).toString()),Q.setAttribute("cy",(W/2).toString()),Q.setAttribute("r",W.toString()),G&&te.setAttributes(Q,G),Q},te.createEllipse=function(W,G,Q){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(W/2).toString()),ue.setAttribute("cy",(G/2).toString()),ue.setAttribute("rx",(W/2).toString()),ue.setAttribute("ry",(G/2).toString()),Q&&te.setAttributes(ue,Q),ue},te.createGroup=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&te.setAttributes(G,W),G},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(W,G,Q,ue,ee,qe,tn){var An=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(An,[["id",W],["orient",G],["markerWidth",Q.toString()],["markerHeight",ue.toString()],["refX",ee.toString()],["refY",qe.toString()]]),An.appendChild(tn),An},te.createText=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","text");return G.setAttribute("x","0"),G.setAttribute("y","0"),W&&te.setAttributes(G,W),G},te.createTSpan=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Q.textContent=W,G&&te.setAttributes(Q,G),Q},te.createImage=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&te.setAttributes(G,W),G},te.createPoint=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Q.x=W,Q.y=G,Q},te.createPath=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","path");return Q.setAttribute("d",W),G&&te.setAttributes(Q,G),Q},te}(),Je=function(){function te(){}return te.addKey=function(W){te.key=W},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}(),Rt=function(){function te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return te.prototype.rasterize=function(W,G,Q){var ue=this;return new Promise(function(ee){var qe=Q!==void 0?Q:document.createElement("canvas");W===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var tn=document.createElementNS("http://www.w3.org/2000/svg","svg");tn.setAttribute("xmlns","http://www.w3.org/2000/svg"),tn.setAttribute("width",G.width.baseVal.valueAsString),tn.setAttribute("height",G.height.baseVal.valueAsString),tn.setAttribute("viewBox","0 0 "+G.viewBox.baseVal.width.toString()+" "+G.viewBox.baseVal.height.toString()),tn.innerHTML=G.innerHTML,ue.naturalSize===!0?(tn.width.baseVal.value=W.naturalWidth,tn.height.baseVal.value=W.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(tn.width.baseVal.value=ue.width,tn.height.baseVal.value=ue.height),qe.width=tn.width.baseVal.value,qe.height=tn.height.baseVal.value;var An=tn.outerHTML,Vn=qe.getContext("2d");ue.markersOnly!==!0&&Vn.drawImage(W,0,0,qe.width,qe.height);var un=window.URL,nr=new Image(qe.width,qe.height);nr.setAttribute("crossOrigin","anonymous");var vn=new Blob([An],{type:"image/svg+xml"}),dn=un.createObjectURL(vn);nr.onload=function(){Vn.drawImage(nr,0,0),un.revokeObjectURL(dn);var xn=qe.toDataURL(ue.imageType,ue.imageQuality);ee(xn)},nr.src=dn})},te}(),Ee=function(){},Me=function(){function te(W){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}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(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},te.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).appendChild(this.styleSheet),this.addRule(new rt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new rt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new rt("@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 W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),rt=function(te,W){this.selector=te,this.style=W},He=function(te,W){this.localName=te,this.style=W},ke=function(){function te(W,G,Q,ue,ee){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=W,this.displayMode=G,this.markerItems=Q,this.uiStyleSettings=ue,this.styles=ee,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(W){var G=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,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(ee){var qe=document.createElement("div");qe.className=""+G.toolbarButtonStyleClass.name,qe.setAttribute("data-type-name",ee.typeName),qe.innerHTML=ee.icon,qe.addEventListener("click",function(){G.markerToolbarButtonClicked(qe,ee)}),G.buttons.push(qe),G.markerButtons.push(qe)}),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 ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<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(ue,'<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(W){this.buttonClickListeners.push(W)},te.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var G=0;G<this.markerButtons.length;G++)G<W||G===W&&this.markerButtons.length-1===W?this.markerButtonBlock.appendChild(this.markerButtons[G]):(G===W&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[G]))}},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 W=this;this.buttons.forEach(function(G){G.className=G.className.replace(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name,"").trim(),G.className=G.className.replace(W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:W.toolbarActiveButtonStyleColorsClass.name,"").trim(),G.className+=" "+(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name)})},te.prototype.addActionButton=function(W,G,Q){var ue=this,ee=document.createElement("div");switch(ee.className=""+this.toolbarButtonStyleClass.name,ee.innerHTML=G,ee.setAttribute("data-action",Q),ee.addEventListener("click",function(){ue.actionToolbarButtonClicked(ee,Q)}),Q){case"select":ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ee.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ee.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ee.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ee.style.fill=this.uiStyleSettings.closeButtonColor}W.appendChild(ee),this.buttons.push(ee)},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 W=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
padding: `+W+`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 rt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},te.prototype.markerToolbarButtonClicked=function(W,G){this.setActiveButton(W),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Q){return Q("marker",G)}),this.markerButtonOverflowBlock.style.display="none"},te.prototype.actionToolbarButtonClicked=function(W,G){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Q){return Q("action",G)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},te.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},te.prototype.setActiveMarkerButton=function(W){var G=this.markerButtons.find(function(Q){return Q.getAttribute("data-type-name")===W});G&&this.setActiveButton(G)},te.prototype.setCurrentMarker=function(W){var G=this;this.currentMarker=W,this.buttons.filter(function(Q){return/delete|notes/.test(Q.getAttribute("data-action"))}).forEach(function(Q){G.currentMarker===void 0?(Q.style.fillOpacity="0.4",Q.style.pointerEvents="none"):(Q.style.fillOpacity="1",Q.style.pointerEvents="all")})},te}(),ht=function(){function te(W,G,Q,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=G,this.uiStyleSettings=Q,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return te.prototype.addStyles=function(){var W;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 G=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: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new He("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*G)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*G)+`px;
padding: `+G+`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 rt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new rt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},te.prototype.show=function(W){var G;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+((G=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&G!==void 0?G:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},te.prototype.setPanelButtons=function(W){var G,Q,ue=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((G=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&G!==void 0?G: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(ee){var qe;ee.uiStyleSettings=ue.uiStyleSettings;var tn=document.createElement("div");tn.className=ue.toolboxButtonStyleClass.name+" "+((qe=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:ue.toolboxButtonStyleColorsClass.name),tn.innerHTML=ee.icon,tn.title=ee.title,tn.addEventListener("click",function(){ue.panelButtonClick(ee)}),ue.panelButtons.push(tn),ue.buttonRow.appendChild(tn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},te.prototype.panelButtonClick=function(W){var G=this,Q=-1;if(W!==this.activePanel){Q=this.panels.indexOf(W),this.panelRow.innerHTML="";var ue=W.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),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=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){G.displayMode==="inline"?G.panelRow.style.display="none":G.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ee,qe){var tn,An;ee.className=G.toolboxButtonStyleClass.name+" "+(qe===Q?""+((tn=G.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&tn!==void 0?tn:G.toolboxActiveButtonStyleColorsClass.name):""+((An=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&An!==void 0?An:G.toolboxButtonStyleColorsClass.name))})},te}(),ie=function(te,W){this.title=te,this.icon=W},xe=function(te){function W(G,Q,ue,ee){var qe=te.call(this,G,ee||'<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 qe.colors=[],qe.addTransparent=!1,qe.colorBoxes=[],qe.colors=Q,qe.currentColor=ue,qe.setCurrentColor=qe.setCurrentColor.bind(qe),qe.getColorBox=qe.getColorBox.bind(qe),qe}return fe(W,te),W.prototype.getUi=function(){var G=this,Q=document.createElement("div");return Q.style.overflow="hidden",Q.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ee=G.getColorBox(ue);Q.appendChild(ee),G.colorBoxes.push(ee)}),Q},W.prototype.getColorBox=function(G){var Q=this,ue=this.uiStyleSettings.toolbarHeight/4,ee=this.uiStyleSettings.toolbarHeight-ue,qe=document.createElement("div");qe.style.display="inline-block",qe.style.boxSizing="content-box",qe.style.width=ee-2+"px",qe.style.height=ee-2+"px",qe.style.padding="1px",qe.style.marginRight="2px",qe.style.marginBottom="2px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderRadius=(ee+2)/2+"px",qe.style.borderColor=G===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){Q.setCurrentColor(G,qe)});var tn=document.createElement("div");return tn.style.display="inline-block",tn.style.width=ee-2+"px",tn.style.height=ee-2+"px",tn.style.backgroundColor=G,tn.style.borderRadius=ee/2+"px",G==="transparent"&&(tn.style.fill=this.uiStyleSettings.toolboxAccentColor,tn.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>`),qe.appendChild(tn),qe},W.prototype.setCurrentColor=function(G,Q){var ue=this;this.currentColor=G,this.colorBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(G)},W}(ie),we=function(){function te(W,G,Q){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=G,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(W){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(W,G){},te.prototype.dblClick=function(W,G){},te.prototype.manipulate=function(W){},te.prototype.pointerUp=function(W){this.stateChanged()},te.prototype.dispose=function(){},te.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},te.prototype.getState=function(){return{typeName:te.typeName,state:this.state,notes:this.notes}},te.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},te.prototype.scale=function(W,G){},te.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},te.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},te.typeName="MarkerBase",te}(),$e=function(){function te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return te.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},te}(),ct=function(){function te(){this.GRIP_SIZE=10,this.visual=de.createGroup(),this.visual.appendChild(de.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(de.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},te}(),yt=function(){function te(){}return te.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},te.toSVGMatrix=function(W,G){return W.a=G.a,W.b=G.b,W.c=G.c,W.d=G.d,W.e=G.e,W.f=G.f,W},te}(),Ut=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.left=0,ee.top=0,ee.width=0,ee.height=0,ee.defaultSize={x:50,y:20},ee.offsetX=0,ee.offsetY=0,ee.rotationAngle=0,ee.CB_DISTANCE=10,ee._suppressMarkerCreateEvent=!1,ee.container.transform.baseVal.appendItem(de.createTransform()),ee.setupControlBox(),ee}return fe(W,te),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function(G){this._visual=G;var Q=de.createTransform();this._visual.transform.baseVal.appendItem(Q)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(G){return!!te.prototype.ownsTarget.call(this,G)||!!(this.controlGrips.findGripByVisual(G)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(G))},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="new"&&(this.left=G.x,this.top=G.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(G);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.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 ee=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ee.x-this.width/2,this.top=ee.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var qe=this.container.transform.baseVal.getItem(0);qe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(qe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function(G){var Q=this.state;te.prototype.pointerUp.call(this,G),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(G),this._state="select",Q==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function(G){this.visual.style.transform="translate("+G.x+"px, "+G.y+"px)"},W.prototype.manipulate=function(G){var Q=this.unrotatePoint(G);this.state==="creating"?this.resize(G):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(G)},W.prototype.resize=function(G){var Q=this.manipulationStartLeft,ue=this.manipulationStartWidth,ee=this.manipulationStartTop,qe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Q=this.manipulationStartLeft+G.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-Q;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+G.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ee=this.manipulationStartTop+G.y-this.manipulationStartY,qe=this.manipulationStartHeight+this.manipulationStartTop-ee;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:qe=this.manipulationStartHeight+G.y-this.manipulationStartY}ue>=0?(this.left=Q,this.width=ue):(this.left=Q+ue,this.width=-ue),qe>=0?(this.top=ee,this.height=qe):(this.top=ee+qe,this.height=-qe),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function(G){if(Math.abs(G.x-this.centerX)>.1){var Q=Math.sign(G.x-this.centerX);this.rotationAngle=180*Math.atan((G.y-this.centerY)/(G.x-this.centerX))/Math.PI+90*Q,this.applyRotation()}},W.prototype.applyRotation=function(){var G=this.container.transform.baseVal.getItem(0);G.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(G,0)},W.prototype.rotatePoint=function(G){if(this.rotationAngle===0)return G;var Q=this.container.getCTM(),ue=de.createPoint(G.x,G.y);return{x:(ue=ue.matrixTransform(Q)).x,y:ue.y}},W.prototype.unrotatePoint=function(G){if(this.rotationAngle===0)return G;var Q=this.container.getCTM();Q=Q.inverse();var ue=de.createPoint(G.x,G.y);return{x:(ue=ue.matrixTransform(Q)).x,y:ue.y}},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var G=de.createTransform();G.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(G),this.container.appendChild(this.controlBox),this.controlRect=de.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=de.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 $e,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var G=this.controlBox.transform.baseVal.getItem(0);G.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(G,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()},W.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()},W.prototype.createGrip=function(){var G=new ct;return G.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(G.visual),G},W.prototype.positionGrips=function(){var G=this.controlGrips.topLeft.GRIP_SIZE,Q=-G/2,ue=Q,ee=(this.width+this.CB_DISTANCE)/2-G/2,qe=(this.height+this.CB_DISTANCE)/2-G/2,tn=this.height+this.CB_DISTANCE-G/2,An=this.width+this.CB_DISTANCE-G/2;this.positionGrip(this.controlGrips.topLeft.visual,Q,ue),this.positionGrip(this.controlGrips.topCenter.visual,ee,ue),this.positionGrip(this.controlGrips.topRight.visual,An,ue),this.positionGrip(this.controlGrips.centerLeft.visual,Q,qe),this.positionGrip(this.controlGrips.centerRight.visual,An,qe),this.positionGrip(this.controlGrips.bottomLeft.visual,Q,tn),this.positionGrip(this.controlGrips.bottomCenter.visual,ee,tn),this.positionGrip(this.controlGrips.bottomRight.visual,An,tn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ee,ue-3*this.CB_DISTANCE)},W.prototype.positionGrip=function(G,Q,ue){var ee=G.transform.baseVal.getItem(0);ee.setTranslate(Q,ue),G.transform.baseVal.replaceItem(ee,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:yt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:yt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},te.prototype.getState.call(this))},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G);var Q=G;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(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Q.containerTransformMatrix))},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q);var ue=this.rotatePoint({x:this.left,y:this.top}),ee=this.unrotatePoint({x:ue.x*G,y:ue.y*Q});this.left=ee.x,this.top=ee.y,this.width=this.width*G,this.height=this.height*Q,this.adjustControlBox()},W}(we),We=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.fillColor="transparent",ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.opacity=1,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setFillColor=ee.setFillColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.createVisual=ee.createVisual.bind(ee),ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.visual)},W.prototype.createVisual=function(){this.visual=de.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)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},W.prototype.manipulate=function(G){te.prototype.manipulate.call(this,G)},W.prototype.resize=function(G){te.prototype.resize.call(this,G),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(G){te.prototype.pointerUp.call(this,G),this.setSize()},W.prototype.setStrokeColor=function(G){this.strokeColor=G,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(G),this.stateChanged()},W.prototype.setFillColor=function(G){this.fillColor=G,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.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))},W.prototype.restoreState=function(G){var Q=G;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,G),this.setSize()},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.setSize()},W.title="Rectangle marker",W}(Ut),kt=function(te){function W(G,Q,ue,ee){var qe=te.call(this,G,ee||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return qe.widths=[],qe.widthBoxes=[],qe.widths=Q,qe.currentWidth=ue,qe.setCurrentWidth=qe.setCurrentWidth.bind(qe),qe}return fe(W,te),W.prototype.getUi=function(){var G=this,Q=document.createElement("div");return Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2",this.widths.forEach(function(ue){var ee=document.createElement("div");ee.style.display="flex",ee.style.flexGrow="2",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=ue===G.currentWidth?G.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){G.setCurrentWidth(ue,ee)}),Q.appendChild(ee);var qe=document.createElement("div");qe.innerText=ue.toString(),qe.style.marginRight="5px",ee.appendChild(qe);var tn=document.createElement("div");tn.style.minHeight="20px",tn.style.flexGrow="2",tn.style.display="flex",tn.style.alignItems="center";var An=document.createElement("hr");An.style.minWidth="20px",An.style.border="0px",An.style.borderTop=ue+"px solid "+G.uiStyleSettings.toolboxColor,An.style.flexGrow="2",tn.appendChild(An),ee.appendChild(tn),G.widthBoxes.push(ee)}),Q},W.prototype.setCurrentWidth=function(G,Q){var ue=this;this.currentWidth=G,this.widthBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(ie),qt=function(te){function W(G,Q,ue,ee){var qe=te.call(this,G,ee||'<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 qe.styles=[],qe.styleBoxes=[],qe.styles=Q,qe.currentStyle=ue,qe.setCurrentStyle=qe.setCurrentStyle.bind(qe),qe}return fe(W,te),W.prototype.getUi=function(){var G=this,Q=document.createElement("div");return Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2",this.styles.forEach(function(ue){var ee=document.createElement("div");ee.style.display="flex",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.overflow="hidden",ee.style.maxWidth=100/G.styles.length-5+"%",ee.style.borderColor=ue===G.currentStyle?G.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){G.setCurrentStyle(ue,ee)}),Q.appendChild(ee);var qe=document.createElement("div");qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.overflow="hidden";var tn=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+G.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
</svg>`;qe.innerHTML=tn,ee.appendChild(qe),G.styleBoxes.push(ee)}),Q},W.prototype.setCurrentStyle=function(G,Q){var ue=this;this.currentStyle=G,this.styleBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(ie),Pe=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.strokeColor=ue.defaultColor,ee.strokeWidth=ue.defaultStrokeWidth,ee.strokeDasharray=ue.defaultStrokeDasharray,ee.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new kt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new qt("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return fe(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=te.prototype.getState.call(this);return G.typeName=W.typeName,G},W.typeName="FrameMarker",W.title="Frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',W}(We),Ae=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},ut=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.x1=0,ee.y1=0,ee.x2=0,ee.y2=0,ee.defaultLength=50,ee.manipulationStartX=0,ee.manipulationStartY=0,ee.manipulationStartX1=0,ee.manipulationStartY1=0,ee.manipulationStartX2=0,ee.manipulationStartY2=0,ee.setupControlBox(),ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!!te.prototype.ownsTarget.call(this,G)||!(!this.grip1.ownsTarget(G)&&!this.grip2.ownsTarget(G))},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.manipulationStartX=G.x,this.manipulationStartY=G.y,this.state==="new"&&(this.x1=G.x,this.y1=G.y,this.x2=G.x,this.y2=G.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")},W.prototype.pointerUp=function(G){var Q=this.state;te.prototype.pointerUp.call(this,G),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(G),this._state="select",Q==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function(G){this.state==="creating"?this.resize(G):this.state==="move"?(this.x1=this.manipulationStartX1+G.x-this.manipulationStartX,this.y1=this.manipulationStartY1+G.y-this.manipulationStartY,this.x2=this.manipulationStartX2+G.x-this.manipulationStartX,this.y2=this.manipulationStartY2+G.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(G)},W.prototype.resize=function(G){switch(this.activeGrip){case this.grip1:this.x1=G.x,this.y1=G.y;break;case this.grip2:case void 0:this.x2=G.x,this.y2=G.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=de.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var G=new ct;return G.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(G.visual),G},W.prototype.positionGrips=function(){var G=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-G/2,this.y1-G/2),this.positionGrip(this.grip2.visual,this.x2-G/2,this.y2-G/2)},W.prototype.positionGrip=function(G,Q,ue){var ee=G.transform.baseVal.getItem(0);ee.setTranslate(Q,ue),G.transform.baseVal.replaceItem(ee,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},te.prototype.getState.call(this))},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G);var Q=G;this.x1=Q.x1,this.y1=Q.y1,this.x2=Q.x2,this.y2=Q.y2},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.x1=this.x1*G,this.y1=this.y1*Q,this.x2=this.x2*G,this.y2=this.y2*Q,this.adjustVisual(),this.adjustControlBox()},W}(we),Et=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.strokeColor=ue.defaultColor,ee.strokeWidth=ue.defaultStrokeWidth,ee.strokeDasharray=ue.defaultStrokeDasharray,ee.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new kt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new qt("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.selectorLine&&G!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.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)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.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()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function(G){this.strokeColor=G,this.adjustVisual(),this.colorChanged(G)},W.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.adjustVisual()},W.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G);var Q=G;this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',W}(ut),Ze=function(te){function W(G,Q,ue,ee){var qe=te.call(this,G,ee||'<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 qe.fonts=[],qe.fontBoxes=[],qe.fonts=Q,qe.currentFont=ue,qe.setCurrentFont=qe.setCurrentFont.bind(qe),qe}return fe(W,te),W.prototype.getUi=function(){var G=this,Q=document.createElement("div");return Q.style.overflow="hidden",Q.style.flexGrow="2",this.fonts.forEach(function(ue){var ee=document.createElement("div");ee.style.display="inline-block",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.overflow="hidden",ee.style.maxWidth=100/G.fonts.length-5+"%",ee.style.borderColor=ue===G.currentFont?G.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){G.setCurrentFont(ue,ee)}),Q.appendChild(ee);var qe=document.createElement("div");qe.style.display="flex",qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.fontFamily=ue,qe.style.overflow="hidden";var tn=document.createElement("div");tn.style.whiteSpace="nowrap",tn.style.overflow="hidden",tn.style.textOverflow="ellipsis",tn.innerHTML="The quick brown fox jumps over the lazy dog",qe.appendChild(tn),ee.appendChild(qe),G.fontBoxes.push(ee)}),Q},W.prototype.setCurrentFont=function(G,Q){var ue=this;this.currentFont=G,this.fontBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(ie),dt=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.color="transparent",ee.padding=5,ee.DEFAULT_TEXT="your text here",ee.text=ee.DEFAULT_TEXT,ee.isMoved=!1,ee.color=ue.defaultColor,ee.fontFamily=ue.defaultFontFamily,ee.defaultSize={x:100,y:30},ee.setColor=ee.setColor.bind(ee),ee.setFont=ee.setFont.bind(ee),ee.renderText=ee.renderText.bind(ee),ee.sizeText=ee.sizeText.bind(ee),ee.textEditDivClicked=ee.textEditDivClicked.bind(ee),ee.showTextEditor=ee.showTextEditor.bind(ee),ee.setSize=ee.setSize.bind(ee),ee.positionTextEditor=ee.positionTextEditor.bind(ee),ee.colorPanel=new xe("Color",ue.defaultColorSet,ue.defaultColor),ee.colorPanel.onColorChanged=ee.setColor,ee.fontFamilyPanel=new Ze("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ee.fontFamilyPanel.onFontChanged=ee.setFont,ee}return fe(W,te),W.prototype.ownsTarget=function(G){if(te.prototype.ownsTarget.call(this,G)||G===this.visual||G===this.textElement||G===this.bgRectangle)return!0;var Q=!1;return this.textElement.childNodes.forEach(function(ue){ue===G&&(Q=!0)}),Q},W.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.isMoved=!1,this.pointerDownPoint=G,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},W.prototype.renderText=function(){var G=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){G.textElement.appendChild(de.createTSpan(Q.trim()===""?" ":Q.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var G=this.textElement.getBBox(),Q=1;if(G.width>0&&G.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/G.width,ee=(1*this.height-this.height*this.padding*2/100)/G.height;Q=Math.min(ue,ee)}return Q},W.prototype.getTextPosition=function(G){var Q=this.textElement.getBBox(),ue=0,ee=0;return Q.width>0&&Q.height>0&&(ue=(this.width-Q.width*G)/2,ee=this.height/2-Q.height*G/2),{x:ue,y:ee}},W.prototype.sizeText=function(){var G=this.textElement.getBBox(),Q=this.getTextScale(),ue=this.getTextPosition(Q);ue.y-=G.y*Q,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+Q+", "+Q+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(Q,Q))},W.prototype.manipulate=function(G){te.prototype.manipulate.call(this,G),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(G.x-this.pointerDownPoint.x)>5||Math.abs(G.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function(G){te.prototype.resize.call(this,G),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function(G){var Q=this.state;Q==="creating"&&(this._suppressMarkerCreateEvent=!0),te.prototype.pointerUp.call(this,G),this.setSize(),(Q==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var G=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(G.textEditor.style.fontSize);G.textEditor.clientWidth>=Number.parseInt(G.textEditor.style.maxWidth)&&Q>.9;)Q-=.1,G.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 ue=Q.clipboardData.getData("text"),ee=window.getSelection();if(!ee.rangeCount)return!1;ee.deleteFromDocument(),ee.getRangeAt(0).insertNode(document.createTextNode(ue)),Q.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){G.textEditDivClicked(G.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var G=this.getTextScale(),Q=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ee={x:ue.width*G,y:ue.height*G};Q.x-=ee.x/2,Q.y-=ee.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*G,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function(G){this.text=G.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),te.prototype.deselect.call(this)},W.prototype.dblClick=function(G,Q){te.prototype.dblClick.call(this,G,Q),this.showTextEditor()},W.prototype.setColor=function(G){this.textElement&&de.setAttributes(this.textElement,[["fill",G]]),this.color=G,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(G)},W.prototype.setFont=function(G){this.textElement&&de.setAttributes(this.textElement,[["font-family",G]]),this.fontFamily=G,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){var Q=G;this.color=Q.color,this.fontFamily=Q.fontFamily,this.padding=Q.padding,this.text=Q.text,this.createVisual(),te.prototype.restoreState.call(this,G),this.setSize()},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.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>',W}(Ut),Ne=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.color="transparent",ee.lineWidth=3,ee.drawing=!1,ee.pixelRatio=1,ee.color=ue.defaultColor,ee.lineWidth=ue.defaultStrokeWidth,ee.pixelRatio=ue.freehandPixelRatio,ee.setColor=ee.setColor.bind(ee),ee.addCanvas=ee.addCanvas.bind(ee),ee.finishCreation=ee.finishCreation.bind(ee),ee.setLineWidth=ee.setLineWidth.bind(ee),ee.colorPanel=new xe("Color",ue.defaultColorSet,ue.defaultColor),ee.colorPanel.onColorChanged=ee.setColor,ee.lineWidthPanel=new kt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.lineWidthPanel.onWidthChanged=ee.setLineWidth,ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var G=de.createTransform();this.visual.transform.baseVal.appendItem(G),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(G,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(G.x,G.y),this.drawing=!0):te.prototype.pointerDown.call(this,G,Q)},W.prototype.manipulate=function(G){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(G.x,G.y),this.canvasContext.stroke()):te.prototype.manipulate.call(this,G)},W.prototype.resize=function(G){te.prototype.resize.call(this,G),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(G){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):te.prototype.pointerUp.call(this,G)},W.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)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),te.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),te.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var G=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Q=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=Q[0],ee=Q[1],qe=Q[2],tn=Q[3],An=!1,Vn=0;Vn<this.canvasElement.height;Vn++)for(var un=0;un<this.canvasElement.width;un++)G.data[Vn*this.canvasElement.width*4+4*un+3]>0&&(An=!0,Vn<ee&&(ee=Vn),un<ue&&(ue=un),Vn>tn&&(tn=Vn),un>qe&&(qe=un));if(An){this.left=ue/this.pixelRatio,this.top=ee/this.pixelRatio,this.width=(qe-ue)/this.pixelRatio,this.height=(tn-ee)/this.pixelRatio;var nr=document.createElement("canvas");nr.width=qe-ue,nr.height=tn-ee,nr.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ee,qe-ue,tn-ee),0,0),this.drawingImgUrl=nr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function(G){this.color=G,this.colorChanged(G)},W.prototype.setLineWidth=function(G){this.lineWidth=G},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({drawingImgUrl:this.drawingImgUrl},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){this.createVisual(),te.prototype.restoreState.call(this,G),this.drawingImgUrl=G.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.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>',W}(Ut),Te=function(te){function W(G,Q,ue){var ee=te.call(this,G,ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ee.typeBoxes=[],ee.currentType=Q,ee.setCurrentType=ee.setCurrentType.bind(ee),ee}return fe(W,te),W.prototype.getUi=function(){var G=this,Q=document.createElement("div");Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2";for(var ue=function(tn){var An="both";switch(tn){case 0:An="both";break;case 1:An="start";break;case 2:An="end";break;case 3:An="none"}var Vn=document.createElement("div");if(Vn.style.display="flex",Vn.style.flexGrow="2",Vn.style.alignItems="center",Vn.style.justifyContent="space-between",Vn.style.padding="5px",Vn.style.borderWidth="2px",Vn.style.borderStyle="solid",Vn.style.borderColor=An===ee.currentType?ee.uiStyleSettings.toolboxAccentColor:"transparent",Vn.addEventListener("click",function(){G.setCurrentType(An,Vn)}),Q.appendChild(Vn),An==="both"||An==="start"){var un=document.createElement("div");un.style.display="flex",un.style.alignItems="center",un.style.minHeight="20px",un.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="`+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,un.style.marginLeft="5px",Vn.appendChild(un)}var nr=document.createElement("div");nr.style.display="flex",nr.style.alignItems="center",nr.style.minHeight="20px",nr.style.flexGrow="2";var vn=document.createElement("hr");if(vn.style.minWidth="20px",vn.style.border="0px",vn.style.borderTop="3px solid "+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee"),vn.style.flexGrow="2",nr.appendChild(vn),Vn.appendChild(nr),An==="both"||An==="end"){var dn=document.createElement("div");dn.style.display="flex",dn.style.alignItems="center",dn.style.minHeight="20px",dn.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="`+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,dn.style.marginRight="5px",Vn.appendChild(dn)}ee.typeBoxes.push(Vn)},ee=this,qe=0;qe<4;qe++)ue(qe);return Q},W.prototype.setCurrentType=function(G,Q){var ue=this;this.currentType=G,this.typeBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(ie),Oe=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.arrowType="end",ee.arrowBaseHeight=10,ee.arrowBaseWidth=10,ee.getArrowPoints=ee.getArrowPoints.bind(ee),ee.setArrowType=ee.setArrowType.bind(ee),ee.arrowTypePanel=new Te("Arrow type","end"),ee.arrowTypePanel.onArrowTypeChanged=ee.setArrowType,ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.arrow1&&G!==this.arrow2)},W.prototype.getArrowPoints=function(G,Q){var ue=this.arrowBaseWidth+2*this.strokeWidth,ee=this.arrowBaseHeight+2*this.strokeWidth;return G-ue/2+","+(Q+ee/2)+" "+G+","+(Q-ee/2)+" "+(G+ue/2)+","+(Q+ee/2)},W.prototype.createTips=function(){this.arrow1=de.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=de.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="creating"&&this.createTips()},W.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",de.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),de.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var G=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(G,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Q,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(G+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},W.prototype.setArrowType=function(G){this.arrowType=G,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({arrowType:this.arrowType},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G);var Q=G;this.arrowType=Q.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',W}(Et),ae=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.fillColor=ue.defaultFillColor,ee.strokeWidth=0,ee.fillPanel=new xe("Color",ue.defaultColorSet,ue.defaultFillColor),ee.fillPanel.onColorChanged=ee.setFillColor,ee}return fe(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=te.prototype.getState.call(this);return G.typeName=W.typeName,G},W.typeName="CoverMarker",W.title="Cover marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',W}(We),le=function(te){function W(G,Q,ue,ee){var qe=te.call(this,G,ee||'<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 qe.opacities=[],qe.opacityBoxes=[],qe.opacities=Q,qe.currentOpacity=ue,qe.setCurrentOpacity=qe.setCurrentOpacity.bind(qe),qe}return fe(W,te),W.prototype.getUi=function(){var G=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(ue){var ee=document.createElement("div");ee.style.display="flex",ee.style.alignItems="center",ee.style.justifyContent="center",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=ue===G.currentOpacity?G.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){G.setCurrentOpacity(ue,ee)}),Q.appendChild(ee);var qe=document.createElement("div");qe.innerText=100*ue+"%",ee.appendChild(qe),G.opacityBoxes.push(ee)}),Q},W.prototype.setCurrentOpacity=function(G,Q){var ue=this;this.currentOpacity=G,this.opacityBoxes.forEach(function(ee){ee.style.borderColor=ee===Q?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(ie),he=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.setOpacity=ee.setOpacity.bind(ee),ee.fillColor=ue.defaultHighlightColor,ee.strokeWidth=0,ee.opacity=ue.defaultHighlightOpacity,ee.fillPanel=new xe("Color",ue.defaultColorSet,ee.fillColor),ee.fillPanel.onColorChanged=ee.setFillColor,ee.opacityPanel=new le("Opacity",ue.defaultOpacitySteps,ee.opacity),ee.opacityPanel.onOpacityChanged=ee.setOpacity,ee}return fe(W,te),W.prototype.setOpacity=function(G){this.opacity=G,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=te.prototype.getState.call(this);return G.typeName=W.typeName,G},W.typeName="HighlightMarker",W.title="Highlight marker",W.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>',W}(ae),_e='<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>',Se=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.bgColor="transparent",ee.tipPosition={x:0,y:0},ee.tipBase1Position={x:0,y:0},ee.tipBase2Position={x:0,y:0},ee.tipMoving=!1,ee.color=ue.defaultStrokeColor,ee.bgColor=ue.defaultFillColor,ee.fontFamily=ue.defaultFontFamily,ee.defaultSize={x:100,y:30},ee.setBgColor=ee.setBgColor.bind(ee),ee.getTipPoints=ee.getTipPoints.bind(ee),ee.positionTip=ee.positionTip.bind(ee),ee.setTipPoints=ee.setTipPoints.bind(ee),ee.colorPanel=new xe("Text color",ue.defaultColorSet,ee.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>'),ee.colorPanel.onColorChanged=ee.setColor,ee.bgColorPanel=new xe("Fill color",ue.defaultColorSet,ee.bgColor,_e),ee.bgColorPanel.onColorChanged=ee.setBgColor,ee.fontFamilyPanel=new Ze("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ee.fontFamilyPanel.onFontChanged=ee.setFont,ee.tipGrip=new ct,ee.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),ee.controlBox.appendChild(ee.tipGrip.visual),ee}return fe(W,te),W.prototype.ownsTarget=function(G){return te.prototype.ownsTarget.call(this,G)||this.tipGrip.ownsTarget(G)||this.tip===G},W.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function(G,Q){this.state==="new"&&te.prototype.pointerDown.call(this,G,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,G,Q)},W.prototype.pointerUp=function(G){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,te.prototype.pointerUp.call(this,G);else{var Q=this.state==="creating";te.prototype.pointerUp.call(this,G),this.setTipPoints(Q),this.positionTip()}},W.prototype.manipulate=function(G){if(this.tipMoving){var Q=this.unrotatePoint(G);this.tipPosition={x:Q.x-this.manipulationStartLeft,y:Q.y-this.manipulationStartTop},this.positionTip()}else te.prototype.manipulate.call(this,G)},W.prototype.setBgColor=function(G){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",G]]),de.setAttributes(this.tip,[["fill",G]])),this.bgColor=G,this.fillColorChanged(G)},W.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},W.prototype.setTipPoints=function(G){G===void 0&&(G=!1);var Q=Math.min(this.height/2,15),ue=this.height/5;G&&(this.tipPosition={x:Q+ue/2,y:this.height+20});var ee=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ee<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:Q,y:0},this.tipBase2Position={x:Q+ue,y:0}):(this.tipBase1Position={x:0,y:Q},this.tipBase2Position={x:0,y:Q+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ee<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Q-ue,y:0},this.tipBase2Position={x:this.width-Q,y:0}):(this.tipBase1Position={x:this.width,y:Q},this.tipBase2Position={x:this.width,y:Q+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ee<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Q-ue,y:this.height},this.tipBase2Position={x:this.width-Q,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Q-ue},this.tipBase2Position={x:this.width,y:this.height-Q}):ee<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:Q,y:this.height},this.tipBase2Position={x:Q+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Q},this.tipBase2Position={x:0,y:this.height-Q-ue})},W.prototype.resize=function(G){te.prototype.resize.call(this,G),this.positionTip()},W.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var G=this.tipGrip.visual.transform.baseVal.getItem(0);G.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(G,0)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.select=function(){this.positionTip(),te.prototype.select.call(this)},W.prototype.getState=function(){var G=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){var Q=G;this.bgColor=Q.bgColor,this.tipPosition=Q.tipPosition,te.prototype.restoreState.call(this,G),this.createTip(),this.setTipPoints()},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.tipPosition={x:this.tipPosition.x*G,y:this.tipPosition.y*Q},this.positionTip()},W.typeName="CalloutMarker",W.title="Callout marker",W.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>',W}(dt),ze=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.fillColor="transparent",ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.opacity=1,ee.strokeColor=ue.defaultColor,ee.strokeWidth=ue.defaultStrokeWidth,ee.strokeDasharray=ue.defaultStrokeDasharray,ee.fillColor=ue.defaultFillColor,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setFillColor=ee.setFillColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.setOpacity=ee.setOpacity.bind(ee),ee.createVisual=ee.createVisual.bind(ee),ee.strokePanel=new xe("Line color",ve(ue.defaultColorSet,["transparent"]),ue.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.fillPanel=new xe("Fill color",ve(ue.defaultColorSet,["transparent"]),ee.fillColor,_e),ee.fillPanel.onColorChanged=ee.setFillColor,ee.strokeWidthPanel=new kt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new qt("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee.opacityPanel=new le("Opacity",ue.defaultOpacitySteps,ee.opacity),ee.opacityPanel.onOpacityChanged=ee.setOpacity,ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.visual)},W.prototype.createVisual=function(){this.visual=de.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)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="new"&&(this.createVisual(),this.moveVisual(G),this._state="creating")},W.prototype.manipulate=function(G){te.prototype.manipulate.call(this,G)},W.prototype.resize=function(G){te.prototype.resize.call(this,G),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),de.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},W.prototype.pointerUp=function(G){te.prototype.pointerUp.call(this,G),this.setSize()},W.prototype.setStrokeColor=function(G){this.strokeColor=G,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(G),this.stateChanged()},W.prototype.setFillColor=function(G){this.fillColor=G,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(G),this.stateChanged()},W.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.setOpacity=function(G){this.opacity=G,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){var Q=G;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,G),this.setSize()},W.prototype.scale=function(G,Q){te.prototype.scale.call(this,G,Q),this.setSize()},W.typeName="EllipseMarker",W.title="Ellipse marker",W.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>',W}(Ut),xt=function(te){function W(G,Q,ue){return te.call(this,G,Q,ue)||this}return fe(W,te),Object.defineProperty(W.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.tip1&&G!==this.tip2)},W.prototype.createTips=function(){this.tip1=de.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(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.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(de.createTransform()),this.visual.appendChild(this.tip2)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(de.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()]]),de.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 G=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(G,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Q,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(G+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=te.prototype.getState.call(this);return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.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>',W}(Et),Qt=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.strokePanel.colors=ue.defaultColorSet,ee.fillColor="transparent",ee}return fe(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=te.prototype.getState.call(this);return G.typeName=W.typeName,G},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.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>',W}(ze),sn=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(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},te.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},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 W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),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}(),gt=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q,ue)||this;return ee.strokeColor="transparent",ee.strokeWidth=0,ee.strokeDasharray="",ee.curveX=0,ee.curveY=0,ee.manipulationStartCurveX=0,ee.manipulationStartCurveY=0,ee.setStrokeColor=ee.setStrokeColor.bind(ee),ee.setStrokeWidth=ee.setStrokeWidth.bind(ee),ee.setStrokeDasharray=ee.setStrokeDasharray.bind(ee),ee.positionGrips=ee.positionGrips.bind(ee),ee.addControlGrips=ee.addControlGrips.bind(ee),ee.adjustVisual=ee.adjustVisual.bind(ee),ee.setupControlBox=ee.setupControlBox.bind(ee),ee.resize=ee.resize.bind(ee),ee.strokeColor=ue.defaultColor,ee.strokeWidth=ue.defaultStrokeWidth,ee.strokeDasharray=ue.defaultStrokeDasharray,ee.strokePanel=new xe("Line color",ue.defaultColorSet,ue.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.strokeWidthPanel=new kt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new qt("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ee.strokeStylePanel.onStyleChanged=ee.setStrokeDasharray,ee}return fe(W,te),W.prototype.ownsTarget=function(G){return!(!te.prototype.ownsTarget.call(this,G)&&G!==this.visual&&G!==this.selectorCurve&&G!==this.visibleCurve&&!this.curveGrip.ownsTarget(G))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.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)},W.prototype.pointerDown=function(G,Q){te.prototype.pointerDown.call(this,G,Q),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=G.x,this.curveY=G.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Q)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),de.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){te.prototype.setupControlBox.call(this),this.curveControlLine1=de.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=de.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)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,te.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){te.prototype.positionGrips.call(this);var G=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-G/2,this.curveY-G/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()))},W.prototype.manipulate=function(G){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+G.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+G.y-this.manipulationStartY),te.prototype.manipulate.call(this,G)},W.prototype.resize=function(G){this.activeGrip===this.curveGrip&&(this.curveX=G.x,this.curveY=G.y),te.prototype.resize.call(this,G),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function(G){this.strokeColor=G,this.adjustVisual(),this.colorChanged(G)},W.prototype.setStrokeWidth=function(G){this.strokeWidth=G,this.adjustVisual()},W.prototype.setStrokeDasharray=function(G){this.strokeDasharray=G,this.adjustVisual()},W.prototype.scale=function(G,Q){this.curveX=this.curveX*G,this.curveY=this.curveY*Q,te.prototype.scale.call(this,G,Q)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var G=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},te.prototype.getState.call(this));return G.typeName=W.typeName,G},W.prototype.restoreState=function(G){te.prototype.restoreState.call(this,G);var Q=G;this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.curveX=Q.curveX,this.curveY=Q.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.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>',W}(ut),zt=function(){function te(W,G){G===void 0&&(G=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=G}return Object.defineProperty(te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),te.prototype.preventDefault=function(){this._defaultPrevented=!0},te}(),Ot=function(te){function W(G,Q,ue){var ee=te.call(this,G,!1)||this;return ee.dataUrl=Q,ee.state=ue,ee}return fe(W,te),W}(zt),At=function(te){function W(G,Q,ue){ue===void 0&&(ue=!1);var ee=te.call(this,G,ue)||this;return ee.marker=Q,ee}return fe(W,te),W}(zt),ft=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(W,G){this[W].push(G)},te.prototype.removeEventListener=function(W,G){var Q=this[W].indexOf(G);Q>-1&&this[W].splice(Q,1)},te}(),be=function(){function te(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ae,this._isOpen=!1,this.undoRedoManager=new sn,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 ft,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=te.instanceCounter++,this.styles=new Me(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.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[Pe,Ne,Oe,dt,Qt,ze,he,Se,xt,ae,Et,gt]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Pe,Ne,Oe,dt,ze,he,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Pe,Ne,Oe,dt,he]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var G=this;this._availableMarkerTypes.splice(0),W.forEach(function(Q){if(typeof Q=="string"){var ue=G.ALL_MARKER_TYPES.find(function(ee){return ee.typeName===Q});ue!==void 0&&G._availableMarkerTypes.push(ue)}else G._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(W){this._zoomLevel=W,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 W=this;this.styles.styleSheetRoot===void 0&&Ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(G){return G(new zt(W))})},te.prototype.render=function(){return ye(this,void 0,void 0,function(){var W;return Ie(this,function(G){switch(G.label){case 0:return this.setCurrentMarker(),(W=new Rt).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return G.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,G.sent()]}})})},te.prototype.close=function(W){var G=this;if(W===void 0&&(W=!1),this.isOpen){var Q=!1;W||this.eventListeners.beforeclose.forEach(function(ue){var ee=new zt(G,!0);ue(ee),ee.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(ue){return ue(new zt(G))}),this.detachEvents(),this._isOpen=!1)}},te.prototype.addMarkersToToolbar=function(){for(var W,G=[],Q=0;Q<arguments.length;Q++)G[Q]=arguments[Q];(W=this._availableMarkerTypes).push.apply(W,G)},te.prototype.addRenderEventListener=function(W){this.addEventListener("render",function(G){W(G.dataUrl,G.state)})},te.prototype.removeRenderEventListener=function(W){},te.prototype.addCloseEventListener=function(W){this.addEventListener("close",function(){W()})},te.prototype.removeCloseEventListener=function(W){},te.prototype.setupResizeObserver=function(){var W=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return W.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},te.prototype.onPopupTargetResize=function(){var W=1*this.target.clientWidth/this.target.clientHeight,G=this.editorCanvas.clientWidth/W>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,Q=G<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/W;this.resize(G,Q)},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.prototype.resize=function(W,G){this._isResizing=!0;var Q=W/this.imageWidth,ue=G/this.imageHeight;this.imageWidth=Math.round(W),this.imageHeight=Math.round(G),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,ue),this._isResizing=!1},te.prototype.scaleMarkers=function(W,G){var Q,ue=this;this._currentMarker&&this._currentMarker instanceof dt?this._currentMarker.scale(W,G):(Q=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ee){ee!==ue._currentMarker&&ee.scale(W,G)}),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 W=this.editingTarget.getBoundingClientRect(),G=this.editorCanvas.getBoundingClientRect();this.left=W.left-G.left,this.top=W.top-G.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 W,G=[],Q=0;Q<arguments.length;Q++)G[Q]=arguments[Q];this.defs=de.createDefs(),this.addDefsToImage(),(W=this.defs).append.apply(W,G)},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 W=document.createElement("a");W.href="https://markerjs.com/",W.target="_blank",W.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>',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),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 W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"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 ke(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 ht(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(W){this.markerImage.removeChild(W.container),this.markers.indexOf(W)>-1&&this.markers.splice(this.markers.indexOf(W),1),W.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(W,G){if(W==="marker"&&G!==void 0)this.createNewMarker(G);else if(W==="action")switch(G){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 W=this;if(this._currentMarker!==void 0){var G=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ee=new At(W,W._currentMarker,!0);ue(ee),ee.defaultPrevented&&(G=!0)}),!G){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(ue){return ue(new At(W,Q))})}}},te.prototype.clear=function(){var W=this,G=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(qe){var tn=new At(W,void 0,!0);qe(tn),tn.defaultPrevented&&(G=!0)}),!G)){this.setCurrentMarker();for(var Q=function(qe){var tn=ue.markers[qe];ue.setCurrentMarker(ue.markers[qe]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(An){return An(new At(W,tn))})},ue=this,ee=this.markers.length-1;ee>=0;ee--)Q(ee);this.addUndoStep()}},Object.defineProperty(te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),te.prototype.showNotesEditor=function(){var W;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=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",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 W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var G=this.getState(),Q=this.undoRedoManager.getLastUndoStep();if(!Q||Q.width===G.width&&Q.height===G.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(G),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ee){return ee(new zt(W))})}else this.undoRedoManager.replaceLastUndoStep(G),this.eventListeners.statechange.forEach(function(ee){return ee(new zt(W))})}},te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},te.prototype.undoStep=function(){var W=this,G=this.undoRedoManager.undo();G!==void 0&&(this.restoreState(G),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Q){return Q(new zt(W))}))},te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},te.prototype.redoStep=function(){var W=this,G=this.undoRedoManager.redo();G!==void 0&&(this.restoreState(G),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Q){return Q(new zt(W))}))},te.prototype.stepZoom=function(){var W=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=W<this.zoomSteps.length-1?this.zoomSteps[W+1]:this.zoomSteps[0]},te.prototype.panTo=function(W){this.contentDiv.scrollBy({left:this.prevPanPoint.x-W.x,top:this.prevPanPoint.y-W.y}),this.prevPanPoint=W},te.prototype.startRenderAndClose=function(){return ye(this,void 0,void 0,function(){var W,G,Q=this;return Ie(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return W=ue.sent(),G=this.getState(),this.eventListeners.render.forEach(function(ee){return ee(new Ot(Q,W,G))}),this.close(!0),[2]}})})},te.prototype.getState=function(W){W===!0&&this.setCurrentMarker();var G={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Q){return G.markers.push(Q.getState())}),G},te.prototype.restoreState=function(W){var G=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);W.markers.forEach(function(Q){var ue=G._availableMarkerTypes.find(function(qe){return qe.typeName===Q.typeName});if(ue!==void 0){var ee=G.addNewMarker(ue);ee.restoreState(Q),G.markers.push(ee)}}),W.width&&W.height&&(W.width!==this.imageWidth||W.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/W.width,this.imageHeight/W.height),this.eventListeners.restorestate.forEach(function(Q){return Q(new zt(G))})},te.prototype.addNewMarker=function(W){var G=de.createGroup();return this.markerImage.appendChild(G),new W(G,this.overlayContainer,this.settings)},te.prototype.createNewMarker=function(W){var G,Q=this;(G=typeof W=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===W}):W)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(G),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(G.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new At(Q,Q._currentMarker))}))},te.prototype.markerCreated=function(W){var G=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(W),this.setCurrentMarker(W),W instanceof Ne&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ne):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Q){return Q(new At(G,G._currentMarker))})},te.prototype.colorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=W,this.settings.defaultStrokeColor=W)},te.prototype.fillColorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=W)},te.prototype.markerStateChanged=function(W){var G=this;this.eventListeners.markerchange.forEach(function(Q){return Q(new At(G,W))})},te.prototype.setCurrentMarker=function(W){var G=this;this._currentMarker!==W&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Q){return Q(new At(G,G._currentMarker))})),this._currentMarker=W,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 At(G,G._currentMarker))}))},te.prototype.onPointerDown=function(W){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||W.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var G=this.markers.find(function(Q){return Q.ownsTarget(W.target)});G!==void 0?(this.setCurrentMarker(G),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:W.clientX,y:W.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY))},te.prototype.onDblClick=function(W){if(this._isFocused||this.focus(),this.mode==="select"){var G=this.markers.find(function(Q){return Q.ownsTarget(W.target)});G!==void 0&&G!==this._currentMarker&&this.setCurrentMarker(G),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target):this.setCurrentMarker()}},te.prototype.onPointerMove=function(W){this.touchPoints!==1&&W.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||W.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(W.clientX,W.clientY)):this.zoomLevel>1&&this.panTo({x:W.clientX,y:W.clientY}))},te.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},te.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},te.prototype.clientToLocalCoordinates=function(W,G){var Q=this.markerImage.getBoundingClientRect();return{x:(W-Q.left)/this.zoomLevel,y:(G-Q.top)/this.zoomLevel}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"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(W){Je.addKey(W)},te.prototype.addEventListener=function(W,G){this.eventListeners.addEventListener(W,G)},te.prototype.removeEventListener=function(W,G){this.eventListeners.removeEventListener(W,G)},te.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),te.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(G){return G(new zt(W))}))},te.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(G){return G(new zt(W))}))},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 Fe=function(te,W){return(Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,Q){G.__proto__=Q}||function(G,Q){for(var ue in Q)Object.prototype.hasOwnProperty.call(Q,ue)&&(G[ue]=Q[ue])})(te,W)};function Nt(te,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function G(){this.constructor=te}Fe(te,W),te.prototype=W===null?Object.create(W):(G.prototype=W.prototype,new G)}function bt(te,W,G,Q){return new(G||(G=Promise))(function(ue,ee){function qe(Vn){try{An(Q.next(Vn))}catch(un){ee(un)}}function tn(Vn){try{An(Q.throw(Vn))}catch(un){ee(un)}}function An(Vn){var un;Vn.done?ue(Vn.value):(un=Vn.value,un instanceof G?un:new G(function(nr){nr(un)})).then(qe,tn)}An((Q=Q.apply(te,W||[])).next())})}function Kt(te,W){var G,Q,ue,ee,qe={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ee={next:tn(0),throw:tn(1),return:tn(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function tn(An){return function(Vn){return function(un){if(G)throw new TypeError("Generator is already executing.");for(;qe;)try{if(G=1,Q&&(ue=2&un[0]?Q.return:un[0]?Q.throw||((ue=Q.return)&&ue.call(Q),0):Q.next)&&!(ue=ue.call(Q,un[1])).done)return ue;switch(Q=0,ue&&(un=[2&un[0],ue.value]),un[0]){case 0:case 1:ue=un;break;case 4:return qe.label++,{value:un[1],done:!1};case 5:qe.label++,Q=un[1],un=[0];continue;case 7:un=qe.ops.pop(),qe.trys.pop();continue;default:if(!(ue=qe.trys,(ue=ue.length>0&&ue[ue.length-1])||un[0]!==6&&un[0]!==2)){qe=0;continue}if(un[0]===3&&(!ue||un[1]>ue[0]&&un[1]<ue[3])){qe.label=un[1];break}if(un[0]===6&&qe.label<ue[1]){qe.label=ue[1],ue=un;break}if(ue&&qe.label<ue[2]){qe.label=ue[2],qe.ops.push(un);break}ue[2]&&qe.ops.pop(),qe.trys.pop();continue}un=W.call(te,qe)}catch(nr){un=[6,nr],Q=0}finally{G=ue=0}if(5&un[0])throw un[1];return{value:un[0]?un[1]:void 0,done:!0}}([An,Vn])}}}var Zt=function(){function te(){}return te.addKey=function(W){te.key=W},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}(),Ge=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(W,G){for(var Q=0,ue=G;Q<ue.length;Q++){var ee=ue[Q],qe=ee[0],tn=ee[1];W.setAttribute(qe,tn)}},te.createRect=function(W,G,Q){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",W.toString()),ue.setAttribute("height",G.toString()),Q&&te.setAttributes(ue,Q),ue},te.createLine=function(W,G,Q,ue,ee){var qe=document.createElementNS("http://www.w3.org/2000/svg","line");return qe.setAttribute("x1",W.toString()),qe.setAttribute("y1",G.toString()),qe.setAttribute("x2",Q.toString()),qe.setAttribute("y2",ue.toString()),ee&&te.setAttributes(qe,ee),qe},te.createPolygon=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Q.setAttribute("points",W),G&&te.setAttributes(Q,G),Q},te.createCircle=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","circle");return Q.setAttribute("cx",(W/2).toString()),Q.setAttribute("cy",(W/2).toString()),Q.setAttribute("r",W.toString()),G&&te.setAttributes(Q,G),Q},te.createEllipse=function(W,G,Q){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(W/2).toString()),ue.setAttribute("cy",(G/2).toString()),ue.setAttribute("rx",(W/2).toString()),ue.setAttribute("ry",(G/2).toString()),Q&&te.setAttributes(ue,Q),ue},te.createGroup=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&te.setAttributes(G,W),G},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(W,G,Q,ue,ee,qe,tn){var An=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(An,[["id",W],["orient",G],["markerWidth",Q.toString()],["markerHeight",ue.toString()],["refX",ee.toString()],["refY",qe.toString()]]),An.appendChild(tn),An},te.createText=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","text");return G.setAttribute("x","0"),G.setAttribute("y","0"),W&&te.setAttributes(G,W),G},te.createTSpan=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Q.textContent=W,G&&te.setAttributes(Q,G),Q},te.createImage=function(W){var G=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&te.setAttributes(G,W),G},te.createPoint=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Q.x=W,Q.y=G,Q},te.createPath=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","path");return Q.setAttribute("d",W),G&&te.setAttributes(Q,G),Q},te.createElement=function(W,G){var Q=document.createElementNS("http://www.w3.org/2000/svg",W);return G&&te.setAttributes(Q,G),Q},te.getHollowRectanglePath=function(W,G,Q,ue,ee,qe,tn,An){return"M"+W+","+G+"V"+(G+ue)+"H"+(W+Q)+"V"+G+"H"+ee+"V"+qe+"H"+(ee+tn)+"V"+(qe+An)+"H"+ee+"V"+G+"Z"},te}(),lt=function(){function te(W){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}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(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},te.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W: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 Wt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Wt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},te.prototype.removeStyleSheet=function(){var W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),Lt=function(te,W){this.selector=te,this.style=W},Wt=function(te,W){this.localName=te,this.style=W},ln=function(){function te(){this.blocks=[],this.display=""}return te.prototype.addButtonBlock=function(W){W.className=this.blockClassName,W.buttonClassName=this.buttonClassName,W.buttonColorsClassName=this.buttonColorsClassName,W.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(W)},te.prototype.addElementBlock=function(W){W.className===void 0&&(W.className=this.blockClassName),this.blocks.push(W)},te.prototype.getUI=function(){var W=document.createElement("div");return W.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,W.style.display=this.display,this.blocks.forEach(function(G){return W.appendChild(G.getUI())}),W},te}(),gn=function(){function te(){}return te.prototype.getUI=function(){var W=document.createElement("div");if(W.className=this.className,this.minWidth!==void 0&&(W.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":W.style.justifyContent="flex-start";break;case"center":W.style.justifyContent="center";break;case"end":W.style.justifyContent="flex-end"}return W.style.whiteSpace="nowrap",W},te}(),tr=function(te){function W(){var G=te!==null&&te.apply(this,arguments)||this;return G.buttons=[],G}return Nt(W,te),W.prototype.addButton=function(G){G.className=this.buttonClassName,G.colorsClassName=this.buttonColorsClassName,G.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(G)},W.prototype.getUI=function(){var G=te.prototype.getUI.call(this);return this.buttons.forEach(function(Q){return G.appendChild(Q.getUI())}),G},W}(gn),Wn=function(){function te(W,G){this._isActive=!1,this._isHidden=!1,this._icon=W,this.title=G,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(te.prototype,"icon",{get:function(){return this._icon},set:function(W){this._icon=W,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isActive",{get:function(){return this._isActive},set:function(W){this._isActive=W,this.adjustClassName()},enumerable:!1,configurable:!0}),te.prototype.getUI=function(){var W=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 W.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}(),En=function(te){function W(){var G=te!==null&&te.apply(this,arguments)||this;return G.elements=[],G}return Nt(W,te),W.prototype.addElement=function(G){this.elements.push(G)},W.prototype.getUI=function(){var G=te.prototype.getUI.call(this);return this.elements.forEach(function(Q){return G.appendChild(Q)}),G},W}(gn),xr=function(){function te(W,G){this.horizontal=W,this.vertical=G}return Object.defineProperty(te.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),te.prototype.getVerticalLength=function(W){return W/this.ratio},te.prototype.getHorizontalLength=function(W){return W*this.ratio},te}(),Er=function(){function te(){}return te.getIcon=function(W,G){if(W>0&&G>0){var Q=new xr(W,G),ue=Q.ratio>=1?20:Q.getHorizontalLength(20),ee=Q.ratio<1?20:Q.getVerticalLength(20),qe=document.createElementNS("http://www.w3.org/2000/svg","svg");qe.setAttribute("xmlns","http://www.w3.org/2000/svg"),qe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(qe);var tn=Ge.createDefs();qe.appendChild(tn);var An=Ge.createElement("clipPath",[["id","text-bg-clip"]]);tn.appendChild(An);var Vn=Ge.createPath(Ge.getHollowRectanglePath((24-ue)/2,(24-ee)/2,ue,ee,(24-ue)/2+2,(24-ee)/2+2,ue-4,ee-4));qe.appendChild(Vn);var un=Ge.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);un.appendChild(Ge.createTSpan(W+":"+G)),qe.appendChild(un);var nr=un.getBBox();Ge.setAttributes(un,[["x",((24-nr.width)/2).toString()],["y",((24-nr.height)/2-nr.y).toString()]]);var vn=Ge.createPath(Ge.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(nr.width))/2,(24-Math.ceil(nr.height))/2,Math.ceil(nr.width),Math.ceil(nr.height)));return An.appendChild(vn),Ge.setAttributes(Vn,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(qe),qe.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}(),rr=function(te){function W(G,Q,ue){var ee=te.call(this,G,Q)||this;return ee.isDropdownOpen=!1,ee.onClick=ee.dropdownButtonClicked,ee.dropdownButtons=ue,ee}return Nt(W,te),W.prototype.setupDropdown=function(){var G=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=G.className,Q.colorsClassName=G.colorsClassName,G.dropdownBlock.appendChild(Q.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},W.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},W.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},W.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},W.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},W.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},W}(Wn),ur=function(){function te(W,G){this.GRIP_SIZE=10,this.color=W,this.fillColor=G,this.visual=Ge.createGroup(),this.visual.appendChild(Ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ge.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(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},te.prototype.setCenter=function(W,G){this.visual.childNodes.forEach(function(Q){return Ge.setAttributes(Q,[["cx",W.toString()],["cy",G.toString()]])})},te}(),Rr=function(){function te(W,G,Q,ue){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=W,this.canvasHeight=G,this.margin=Q,this.container=ue,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(W){this._aspectRatio=W,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.gridContainer&&Ge.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(W){this._zoomFactor=W,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),te.prototype.open=function(){var W=this;this.cropShadeElement=Ge.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ge.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var G=0;G<this.numberOfGridLines;G++)this.horizontalGridLines.push(Ge.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Ge.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(Q){return W.gridContainer.appendChild(Q)}),this.verticalGridLines.forEach(function(Q){return W.gridContainer.appendChild(Q)}),this.cropRectElement=Ge.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new ur(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new ur(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new ur(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new ur(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},te.prototype.setCropRectangle=function(W){this.cropRect=W;var G=Object.assign({},this.cropRect);this.zoomFactor!==1&&(G.width=this.cropRect.width*this.zoomFactor,G.height=this.cropRect.height*this.zoomFactor,G.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-G.width/2,G.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-G.height/2),Ge.setAttributes(this.cropRectElement,[["x",G.x.toString()],["y",G.y.toString()],["width",G.width.toString()],["height",G.height.toString()]]);var Q=G.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ee,qe){var tn=G.y+Q*(qe+1);Ge.setAttributes(ee,[["x1",""+G.x],["y1",""+tn],["x2",""+(G.x+G.width)],["y2",""+tn]])});var ue=G.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ee,qe){var tn=G.x+ue*(qe+1);Ge.setAttributes(ee,[["x1",""+tn],["y1",""+G.y],["x2",""+tn],["y2",""+(G.y+G.height)]])}),Ge.setAttributes(this.cropShadeElement,[["d",Ge.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,G.x,G.y,G.width,G.height)]]),this.topLeftGrip.setCenter(G.x,G.y),this.topRightGrip.setCenter(G.x+G.width,G.y),this.bottomLeftGrip.setCenter(G.x,G.y+G.height),this.bottomRightGrip.setCenter(G.x+G.width,G.y+G.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(W,G){var Q=this.container.getBoundingClientRect();return{x:W-Q.left+this.margin,y:G-Q.top+this.margin}},te.prototype.onPointerDown=function(W){this.container.setPointerCapture(W.pointerId),this.previousPoint=this.clientToLocalCoordinates(W.clientX,W.clientY),this.cropRectElement===W.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(W.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(W.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(W.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(W.target)&&(this.activeGrip=this.bottomRightGrip)},te.prototype.onPointerMove=function(W){if(this.isMoving)this.move(this.clientToLocalCoordinates(W.clientX,W.clientY));else if(this.activeGrip){var G=this.clientToLocalCoordinates(W.clientX,W.clientY);this.resize(G)}W.preventDefault()},te.prototype.onPointerUp=function(W){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(W.pointerId)},te.prototype.move=function(W){var G=W.x-this.previousPoint.x,Q=W.y-this.previousPoint.y;this.zoomFactor!==1&&(G=-G/this.zoomFactor,Q=-Q/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+G),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=W},te.prototype.resize=function(W){var G=Object.assign({},this.cropRect),Q=W.x-this.previousPoint.x,ue=W.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:G.x+Q<this.margin&&(Q=this.margin-G.x),G.x+=Q,G.width=this.cropRect.x+this.cropRect.width-G.x;break;case this.bottomRightGrip:case this.topRightGrip:G.width+Q>this.canvasWidth*this.zoomFactor&&(Q=this.canvasWidth*this.zoomFactor-G.width),G.width+=Q}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(G.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(Q),G.height=this.aspectRatio.getVerticalLength(G.width)):(G.y+=ue,G.height=this.cropRect.y+this.cropRect.height-G.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?G.height=this.aspectRatio.getVerticalLength(G.width):G.height+=ue}G.width<10&&(G.x=this.cropRect.x,G.width=10),G.height<10&&(G.y=this.cropRect.y,G.height=10),this.previousPoint=W,G.x>=this.margin&&G.y>=this.margin&&G.x-this.margin+G.width<=this.canvasWidth&&G.y-this.margin+G.height<=this.canvasHeight&&(this.cropRect=G,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 W=this.cropRect.x+this.cropRect.width/2,G=this.cropRect.y+this.cropRect.height/2,Q=this.aspectRatio.getHorizontalLength(this.cropRect.height),ue=this.aspectRatio.getVerticalLength(this.cropRect.width);Q/this.canvasWidth<ue/this.canvasHeight?this.cropRect.width=Q:this.cropRect.height=ue,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=W-this.cropRect.width/2,this.cropRect.y=G-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(W,G,Q,ue,ee,qe){var tn=Q/W,An=ue/G;return{x:(ee.x-qe)*tn+qe,y:(ee.y-qe)*An+qe,width:ee.width*tn,height:ee.height*An}},te.prototype.scaleCanvas=function(W,G){var Q=this.getRescaledRect(this.canvasWidth,this.canvasHeight,W,G,this.cropRect,this.margin);this.canvasWidth=W,this.canvasHeight=G,this.onCropChange&&this.onCropChange(Q),this.setCropRectangle(Q)},te}(),Kr=function(){function te(W){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=W,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(W){this._angle=W,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(W){this.controlContainer.setPointerCapture(W.pointerId),this.isDragging=!0,this.previousPoint={x:W.clientX,y:W.clientY}},te.prototype.onPointerMove=function(W){this.isDragging&&(this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.previousPoint.x=W.clientX)},te.prototype.onPointerUp=function(W){this.isDragging&&this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(W.pointerId)},te.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var W=this.angleLabelText.getBBox();Ge.setAttributes(this.angleLabelElement,[["x",((this.width-W.width)/2).toString()],["y",(this.height/2).toString()]])}},te.prototype.positionScaleShape=function(){if(this.scaleShape){var W=this.scaleShape.transform.baseVal.getItem(0);W.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(W,0)}},te.prototype.getVisual=function(){var W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("xmlns","http://www.w3.org/2000/svg"),W.setAttribute("width",this.width+"px"),W.setAttribute("height",this.height+"px"),W.setAttribute("viewBox","0 0 "+this.width+" "+this.height),W.style.flexShrink="0",document.body.appendChild(W);for(var G="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,Q=1;Q<=this.width/5+10;Q++){var ue=Q%5==0?this.height/3:this.height/6;G+="h4v"+-ue+"h1v"+ue}G+="v1H0Z",this.scaleShape=Ge.createPath(G);var ee=Ge.createTransform();this.scaleShape.transform.baseVal.appendItem(ee),W.appendChild(this.scaleShape),this.angleLabelElement=Ge.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ge.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var qe=Ge.createTSpan("");return qe.innerHTML="&deg;",this.angleLabelElement.appendChild(qe),W.appendChild(this.angleLabelElement),document.body.removeChild(W),W},te}(),ra=function(){function te(){this.naturalSize=!1,this.imageType="image/png"}return te.prototype.rasterize=function(W,G,Q,ue,ee,qe,tn){var An=this;return new Promise(function(Vn){var un=document.createElement("canvas");un.width=W.width.baseVal.value-2*ue,un.height=W.height.baseVal.value-2*ue;var nr=1,vn=1;An.naturalSize===!0?(nr=G.naturalWidth/(W.width.baseVal.value-2*ue)/qe,vn=G.naturalHeight/(W.height.baseVal.value-2*ue)/tn,un.width=G.naturalWidth/qe,un.height=G.naturalHeight/tn):An.width!==void 0&&An.height!==void 0&&(nr=An.width/Q.width,vn=An.height/Q.height,un.width*=nr,un.height*=vn);var dn=un.getContext("2d");dn.translate(un.width/2,un.height/2),dn.rotate(ee*Math.PI/180),dn.scale(qe,tn),dn.translate(-un.width/2,-un.height/2),dn.drawImage(G,0,0,un.width,un.height);var xn=document.createElement("canvas");xn.width=Q.width*nr,xn.height=Q.height*vn,xn.getContext("2d").putImageData(dn.getImageData((Q.x-ue)*nr,(Q.y-ue)*vn,Q.width*nr,Q.height*vn),0,0),Vn(xn.toDataURL(An.imageType,An.imageQuality))})},te}(),fn=function(){function te(W){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 lt(this.instanceNo),this.target=W,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(W){this._zoomToCropEnabled=W,W?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"gridLines",{get:function(){return this._gridLines},set:function(W){this._gridLines=W,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(W){this._rotationAngle=W,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 W;return(W=this._aspectRatio)!==null&&W!==void 0?W:this.aspectRatios[0]},set:function(W){this._aspectRatio=W},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(W){W===void 0&&(W=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),W||this.closeEventListeners.forEach(function(G){return G()}),this._isOpen=!1)},te.prototype.addRenderEventListener=function(W){this.renderEventListeners.push(W)},te.prototype.removeRenderEventListener=function(W){this.renderEventListeners.indexOf(W)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(W),1)},te.prototype.addCloseEventListener=function(W){this.closeEventListeners.push(W)},te.prototype.removeCloseEventListener=function(W){this.closeEventListeners.indexOf(W)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(W),1)},te.prototype.setupResizeObserver=function(){var W=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.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 W=1*this.target.clientWidth/this.target.clientHeight,G=this.contentDiv.clientWidth/W>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*W:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,Q=G+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/W;this.resize(G,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",Ge.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(W,G){this.imageWidth=Math.round(W),this.imageHeight=Math.round(G),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 W=document.createElement("canvas");W.width=this.target.naturalWidth,W.height=this.target.naturalHeight,W.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var G=W.toDataURL();Ge.setAttributes(this.editingTarget,[["href",G]]),this.setEditingTargetSize()},te.prototype.setTopLeft=function(){var W=this.target.getBoundingClientRect(),G=this.editorCanvas.getBoundingClientRect();this.left=W.left-G.left-this.CANVAS_MARGIN,this.top=W.top-G.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=Ge.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Ge.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Ge.createGroup(),this.editingTargetRotationScaleContainer=Ge.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var W=Ge.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(W);var G=Ge.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(G),this.editingTargetContainer=Ge.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=Ge.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Rr(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 W=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,G=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=W+"px "+G+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-W+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-G+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(W){this.cropRect=W,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 W=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,G=this.target.offsetTop>W+this.CANVAS_MARGIN?this.target.offsetTop-(W+this.CANVAS_MARGIN):0;this.coverDiv.style.top=G+"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 W=this;this.topToolbar=new ln,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 G=new tr;G.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(G);var Q=[];this.aspectRatios.forEach(function(vn){var dn=new Wn(Er.getIcon(vn.horizontal,vn.vertical),vn.horizontal===0&&vn.vertical===0?"FREE":vn.horizontal+":"+vn.vertical);dn.onClick=function(){return W.ratioButtonClicked(vn)},Q.push(dn)}),this.aspectRatioButton=new rr(Er.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,G.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ue=new Wn('<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");ue.isActive=this.isGridVisible,ue.onClick=function(){W.isGridVisible=!W.isGridVisible,ue.isActive=W.isGridVisible},G.addButton(ue);var ee=new Wn('<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(ee.isActive=this.zoomToCropEnabled,ee.onClick=function(){W.zoomToCropEnabled=!W.zoomToCropEnabled,ee.isActive=W.zoomToCropEnabled},G.addButton(ee),!Zt.isLicensed){var qe=new En;this.topToolbar.addElementBlock(qe);var tn=document.createElement("div");tn.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var An=document.createElement("a");An.style.color="currentColor",An.href="https://markerjs.com/products/cropro",An.target="_blank",An.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>',tn.appendChild(An),qe.addElement(tn)}var Vn=new tr;Vn.minWidth=3*this.toolbarHeight+"px",Vn.contentAlign="end",this.topToolbar.addButtonBlock(Vn);var un=new Wn('<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");un.onClick=this.startRenderAndClose,Vn.addButton(un),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(un.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var nr=new Wn('<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");nr.onClick=this.close,Vn.addButton(nr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(nr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},te.prototype.addBottomToolbar=function(){var W=this;this.bottomToolbar=new ln,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 G=new tr;G.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(G);var Q=new Wn('<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,G.addButton(Q);var ue=new Wn('<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");ue.onClick=this.rotateRightButtonClicked,G.addButton(ue);var ee=new En;ee.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ee),this.straightener=new Kr("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(Vn){W.rotateBy(Vn),W.straightener.angle=W.rotationAngle},ee.addElement(this.straightener.getUI());var qe=new tr;qe.minWidth=2*this.toolbarHeight+"px",qe.contentAlign="end",this.bottomToolbar.addButtonBlock(qe);var tn=new Wn('<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");tn.onClick=this.flipHorizontallyButtonClicked,qe.addButton(tn);var An=new Wn('<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");An.onClick=this.flipVerticallyButtonClicked,qe.addButton(An)},te.prototype.ratioButtonClicked=function(W){this.aspectRatio=W,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},te.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Er.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 xr(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(W){if(W){var G=this.cropLayer.getRescaledRect(W.width,W.height,this.imageWidth,this.imageHeight,W.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(G),this.cropRectChanged(G),this.flippedHorizontally=W.flippedHorizontally,this.flippedVertically=W.flippedVertically,this.applyFlip(),this.rotationAngle=W.rotationAngle,this.applyRotation()}},te.prototype.clientToLocalCoordinates=function(W,G){var Q=this.cropImage.getBoundingClientRect();return{x:W-Q.left,y:G-Q.top}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var W=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=W+"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 W=this.rotationAngle-90;this.rotationAngle%90!=0&&(W+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(W)},te.prototype.rotateRightButtonClicked=function(){var W=this.rotationAngle+90;this.rotationAngle%90!=0&&(W-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(W)},te.prototype.rotateTo=function(W){W=(W=W>180?W-360:W)<=-180?W+360:W,this.rotationAngle=W,this.applyRotation()},te.prototype.rotateBy=function(W){this.rotateTo((this.rotationAngle+W)%360)},te.prototype.applyRotation=function(){var W=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var G=this.editingTargetRotationContainer.transform.baseVal.getItem(0);G.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(G,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=W},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 bt(this,void 0,void 0,function(){var W,G;return Kt(this,function(Q){switch(Q.label){case 0:return[4,this.render()];case 1:return W=Q.sent(),G=this.getState(),this.renderEventListeners.forEach(function(ue){return ue(W,G)}),this.close(!0),[2]}})})},te.prototype.render=function(){return bt(this,void 0,void 0,function(){var W;return Kt(this,function(G){switch(G.label){case 0:return(W=new ra).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.width=this.renderWidth,W.height=this.renderHeight,this.unzoomFromCrop(),Ge.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,W.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 G.sent(),[4,W.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,G.sent()]}})})},te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Wt("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 Wt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Wt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var W=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Wt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*W)+`px;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Wt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Wt("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 Wt("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 Wt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Wt("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 Wt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Wt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},te.instanceCounter=0,te}(),or=L("8hTe"),sa=L.n(or),ya=/<pre[^>]*>/g;function Jr(te){var W=document.createElement("div");return W.innerHTML=te,W.childNodes.length===0?"":W.childNodes[0].nodeValue}var na=J.a=function(te){var W=te.value,G=W===void 0?"":W,Q=te.edit,ue=Q===void 0?!1:Q,ee=te.className,qe=te.showTextOnly,tn=te.showLines,An=te.replaces,Vn=te.zoomImg,un=te.hasMask,nr=te.style,vn=nr===void 0?{}:nr,dn=te.stylesPrev,xn=dn===void 0?{}:dn,Nn=String(G),dr=Object(b.useRef)(),$n=Object(b.useRef)(),Zn=Object(b.useState)(""),kn=Object(P.a)(Zn,2),gr=kn[0],Bn=kn[1],ar=Object(b.useState)("office"),sr=Object(P.a)(ar,2),Pn=sr[0],Tr=sr[1],Mr=function(){var et=new fn($n.current);et.displayMode="popup",et.addRenderEventListener(function(){var pt=Object(R.a)(t.a.mark(function mt(it){var Mt;return t.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return dr.current.style.display="none",Vt.next=3,Object(me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:it}});case 3:Mt=Vt.sent,Mt!=null&&Mt.id&&An($n.current.getAttribute("src").replace(K.a.API_SERVER,""),"/api/attachments/".concat(Mt==null?void 0:Mt.id,"?type=").concat(Mt.content_type));case 5:case"end":return Vt.stop()}},mt)}));return function(mt){return pt.apply(this,arguments)}}()),et.show()},Sr=function(){var et=new be($n.current);et.settings.displayMode="popup",et.addEventListener("render",function(){var pt=Object(R.a)(t.a.mark(function mt(it){var Mt;return t.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(dr.current.style.display="none",!$n.current){Vt.next=6;break}return Vt.next=4,Object(me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:it.dataUrl}});case 4:Mt=Vt.sent,Mt!=null&&Mt.id&&An($n.current.getAttribute("src").replace(K.a.API_SERVER,""),"/api/attachments/".concat(Mt==null?void 0:Mt.id,"?type=").concat(Mt.content_type));case 6:case"end":return Vt.stop()}},mt)}));return function(mt){return pt.apply(this,arguments)}}()),et.show(),window.markerArea=et},hr=Object(b.useMemo)(function(){dr.current&&(dr.current.style.zIndex=-1);try{var st=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,et=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Nn=Nn.replace(st,"("+K.a.API_SERVER+"/api/attachments/").replace(et,'"'+K.a.API_SERVER+"/api/attachments/").replace(pt,'"'+K.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(Xt){}var mt=z(Nn),it=_();if(Nn.match(/\[TOC\]/)&&(mt=mt.replace("<p>[TOC]</p>",k()),x()),mt=mt.replace(/(__special_katext_id_\d+__)/g,function(Xt,Vt){var St=it[Vt],nn=St.type,Qe=St.expression;return Object($.renderToString)(Jr(Qe)||"",{displayMode:nn==="block",throwOnError:!1,output:"html"})}),mt=mt.replace(/▁/g,"\u2581\u2581\u2581"),E(),qe){var Mt=document.createElement("div");return Mt.innerHTML=mt,Mt.innerText}return setTimeout(function(){return Xe()},500),mt},[Nn]),ne=Object(b.useRef)();A.WebkitLineClamp=tn,tn&&(vn=Object(T.a)(Object(T.a)({},vn),A));function Re(st){var et=st.target;if(et.tagName.toUpperCase()==="IMG"){if(Vn){var pt=et.getAttribute("src");Bn(pt),Tr("image")}}else if(et.tagName.toUpperCase()==="A"){var mt=et.getAttribute("href");if(mt.indexOf("office")>-1)st.preventDefault(),Bn(mt),Tr("office");else if(mt.indexOf("application/pdf")>-1)st.preventDefault(),Bn(mt),Tr("pdf");else if(mt.indexOf("text/html")>-1)st.preventDefault(),Bn(mt),Tr("html");else if(mt.startsWith("#")){st.preventDefault();var it=document.getElementById(mt.replace("#",""));it&&it.scrollIntoView(!0)}}}var Xe=function(){var et,pt=(et=ne.current)===null||et===void 0?void 0:et.querySelectorAll("video");pt==null||pt.forEach(function(mt){if(mt.oncontextmenu=function(){return!1},mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var it=new V.a;it.loadSource(mt.src),it.attachMedia(mt)}}})};Object(b.useEffect)(function(){if(ne.current&&hr&&(hr.match(ya)&&window.PR.prettyPrint()),ne.current)return ne.current.addEventListener("click",Re),function(){ne.current.removeEventListener("click",Re),E(),x()}},[hr,ne.current,Re]);var Le=function(et){if(!ue)return;et.target.nodeName==="IMG"?(dr.current.style.zIndex=1,dr.current.style.display="flex",dr.current.style.width=et.target.clientWidth+"px",dr.current.style.height=et.target.clientHeight+"px",dr.current.style.top=et.target.offsetTop+"px",dr.current.style.left=et.target.offsetLeft+"px",$n.current.src=et.target.getAttribute("src")):dr.current.style.display="none"};return o.a.createElement("div",{style:{position:"relative"}},o.a.createElement("div",{ref:ne,style:Object(T.a)({},vn),className:"".concat(ee||""," markdown-body ").concat(sa.a.mdBody),onMouseOver:Le,dangerouslySetInnerHTML:{__html:hr}}),o.a.createElement("div",{ref:dr,className:sa.a.button},o.a.createElement(B.a,null,o.a.createElement(F.a,{onClick:function(){return Mr()}},"\u88C1\u526A"),o.a.createElement(F.a,{onClick:function(){return Sr()}},"\u7F16\u8F91"))),o.a.createElement("img",{ref:$n,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),o.a.createElement(Z.a,{close:!0,data:gr,type:gr!=null&&gr.length?Pn:"",style:Object(T.a)({},xn),onClose:function(){return Bn("")}}))}},"9VGf":function(Be,J,L){"use strict";L.d(J,"a",function(){return I});var Y=L("q1tI"),B=L.n(Y);function I(F,T){var R=Object(Y.useRef)();Object(Y.useEffect)(function(){R.current=F}),Object(Y.useEffect)(function(){function P(){R.current()}if(T!==null){var m=setInterval(P,T);return function(){return clearInterval(m)}}},[T])}},AHFd:function(Be,J,L){"use strict";L.d(J,"a",function(){return m});var Y=L("giR+"),B=L("fyUT"),I=L("OaEy"),F=L("2fM7"),T=L("tJVT"),R=L("q1tI"),P=L.n(R),m;(function(b){b[b.Number=1]="Number",b[b.Percent=2]="Percent"})(m||(m={}));var t=function(o){var u=o.value,f=o.onChange,a=o.disabled,i=o.hidePercentOption,d=i===void 0?!1:i,s=Object(R.useMemo)(function(){return d?m.Number:m.Percent},[d]),n=Object(R.useState)(s),l=Object(T.a)(n,2),c=l[0],x=l[1],A=Object(R.useCallback)(function(k){return c===m.Number?"".concat(k,"\u5206"):"".concat(k,"%")},[c]),C=Object(R.useCallback)(function(k){if(c===m.Number){var w=k.replace("\u5206","");return isNaN(parseInt(w,10))?0:w}else{var y=k.replace("%","");return y}},[c]);return Object(R.useEffect)(function(){x(u.type)},[u]),P.a.createElement("div",{style:{display:"inline-block"}},P.a.createElement(F.a,{onChange:function(w){x(w),f({type:w,inputValue:w===m.Number?5:20})},value:c||s,style:{width:100},options:d?[{label:"\u5206\u503C",value:m.Number}]:[{label:"\u767E\u5206\u6BD4",value:m.Percent},{label:"\u5206\u503C",value:m.Number}],disabled:a}),P.a.createElement(B.a,{disabled:a,value:u.inputValue,formatter:A,parser:C,max:c===m.Percent?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:function(w){f({type:c,inputValue:w})}}))};J.b=t},Aocz:function(Be,J,L){Be.exports={flex_box_center:"flex_box_center___7n5J9",flex_space_between:"flex_space_between___1vC-V",flex_box_vertical_center:"flex_box_vertical_center___3gkLb",flex_box_center_end:"flex_box_center_end___26SUk",flex_box_column:"flex_box_column___2iv36",title:"title___ooa1w",menuTabs:"menuTabs___3mPq2",rightMenu:"rightMenu___2Vjbz",shixunDetail:"shixunDetail___2EXcB"}},BPZU:function(Be,J){var L=32,Y=7,B=256;function I(o){for(var u=0;o>=L;)u|=o&1,o>>=1;return o+u}function F(o,u,f,a){var i=u+1;if(i===f)return 1;if(a(o[i++],o[u])<0){for(;i<f&&a(o[i],o[i-1])<0;)i++;T(o,u,i)}else for(;i<f&&a(o[i],o[i-1])>=0;)i++;return i-u}function T(o,u,f){for(f--;u<f;){var a=o[u];o[u++]=o[f],o[f--]=a}}function R(o,u,f,a,i){for(a===u&&a++;a<f;a++){for(var d=o[a],s=u,n=a,l;s<n;)l=s+n>>>1,i(d,o[l])<0?n=l:s=l+1;var c=a-s;switch(c){case 3:o[s+3]=o[s+2];case 2:o[s+2]=o[s+1];case 1:o[s+1]=o[s];break;default:for(;c>0;)o[s+c]=o[s+c-1],c--}o[s]=d}}function P(o,u,f,a,i,d){var s=0,n=0,l=1;if(d(o,u[f+i])>0){for(n=a-i;l<n&&d(o,u[f+i+l])>0;)s=l,l=(l<<1)+1,l<=0&&(l=n);l>n&&(l=n),s+=i,l+=i}else{for(n=i+1;l<n&&d(o,u[f+i-l])<=0;)s=l,l=(l<<1)+1,l<=0&&(l=n);l>n&&(l=n);var c=s;s=i-l,l=i-c}for(s++;s<l;){var x=s+(l-s>>>1);d(o,u[f+x])>0?s=x+1:l=x}return l}function m(o,u,f,a,i,d){var s=0,n=0,l=1;if(d(o,u[f+i])<0){for(n=i+1;l<n&&d(o,u[f+i-l])<0;)s=l,l=(l<<1)+1,l<=0&&(l=n);l>n&&(l=n);var c=s;s=i-l,l=i-c}else{for(n=a-i;l<n&&d(o,u[f+i+l])>=0;)s=l,l=(l<<1)+1,l<=0&&(l=n);l>n&&(l=n),s+=i,l+=i}for(s++;s<l;){var x=s+(l-s>>>1);d(o,u[f+x])<0?l=x:s=x+1}return l}function t(o,u){var f=Y,a=0,i=B,d=0,s,n,l=0;a=o.length,a<2*B&&(i=a>>>1);var c=[];d=a<120?5:a<1542?10:a<119151?19:40,s=[],n=[];function x(h,p){s[l]=h,n[l]=p,l+=1}function A(){for(;l>1;){var h=l-2;if(h>=1&&n[h-1]<=n[h]+n[h+1]||h>=2&&n[h-2]<=n[h]+n[h-1])n[h-1]<n[h+1]&&h--;else if(n[h]>n[h+1])break;k(h)}}function C(){for(;l>1;){var h=l-2;h>0&&n[h-1]<n[h+1]&&h--,k(h)}}function k(h){var p=s[h],v=n[h],_=s[h+1],E=n[h+1];n[h]=v+E,h===l-3&&(s[h+1]=s[h+2],n[h+1]=n[h+2]),l--;var g=m(o[_],o,p,v,0,u);if(p+=g,v-=g,v===0)return;if(E=P(o[p+v-1],o,_,E,E-1,u),E===0)return;v<=E?w(p,v,_,E):y(p,v,_,E)}function w(h,p,v,_){var E=0;for(E=0;E<p;E++)c[E]=o[h+E];var g=0,j=v,U=h;if(o[U++]=o[j++],--_===0){for(E=0;E<p;E++)o[U+E]=c[g+E];return}if(p===1){for(E=0;E<_;E++)o[U+E]=o[j+E];o[U+_]=c[g];return}for(var S=f,z,H,M;;){z=0,H=0,M=!1;do if(u(o[j],c[g])<0){if(o[U++]=o[j++],H++,z=0,--_===0){M=!0;break}}else if(o[U++]=c[g++],z++,H=0,--p===1){M=!0;break}while((z|H)<S);if(M)break;do{if(z=m(o[j],c,g,p,0,u),z!==0){for(E=0;E<z;E++)o[U+E]=c[g+E];if(U+=z,g+=z,p-=z,p<=1){M=!0;break}}if(o[U++]=o[j++],--_===0){M=!0;break}if(H=P(c[g],o,j,_,0,u),H!==0){for(E=0;E<H;E++)o[U+E]=o[j+E];if(U+=H,j+=H,_-=H,_===0){M=!0;break}}if(o[U++]=c[g++],--p===1){M=!0;break}S--}while(z>=Y||H>=Y);if(M)break;S<0&&(S=0),S+=2}if(f=S,f<1&&(f=1),p===1){for(E=0;E<_;E++)o[U+E]=o[j+E];o[U+_]=c[g]}else{if(p===0)throw new Error;for(E=0;E<p;E++)o[U+E]=c[g+E]}}function y(h,p,v,_){var E=0;for(E=0;E<_;E++)c[E]=o[v+E];var g=h+p-1,j=_-1,U=v+_-1,S=0,z=0;if(o[U--]=o[g--],--p===0){for(S=U-(_-1),E=0;E<_;E++)o[S+E]=c[E];return}if(_===1){for(U-=p,g-=p,z=U+1,S=g+1,E=p-1;E>=0;E--)o[z+E]=o[S+E];o[U]=c[j];return}for(var H=f;;){var M=0,V=0,K=!1;do if(u(c[j],o[g])<0){if(o[U--]=o[g--],M++,V=0,--p===0){K=!0;break}}else if(o[U--]=c[j--],V++,M=0,--_===1){K=!0;break}while((M|V)<H);if(K)break;do{if(M=p-m(c[j],o,h,p,p-1,u),M!==0){for(U-=M,g-=M,p-=M,z=U+1,S=g+1,E=M-1;E>=0;E--)o[z+E]=o[S+E];if(p===0){K=!0;break}}if(o[U--]=c[j--],--_===1){K=!0;break}if(V=_-P(o[g],c,0,_,_-1,u),V!==0){for(U-=V,j-=V,_-=V,z=U+1,S=j+1,E=0;E<V;E++)o[z+E]=c[S+E];if(_<=1){K=!0;break}}if(o[U--]=o[g--],--p===0){K=!0;break}H--}while(M>=Y||V>=Y);if(K)break;H<0&&(H=0),H+=2}if(f=H,f<1&&(f=1),_===1){for(U-=p,g-=p,z=U+1,S=g+1,E=p-1;E>=0;E--)o[z+E]=o[S+E];o[U]=c[j]}else{if(_===0)throw new Error;for(S=U-(_-1),E=0;E<_;E++)o[S+E]=c[E]}}this.mergeRuns=A,this.forceMergeRuns=C,this.pushRun=x}function b(o,u,f,a){f||(f=0),a||(a=o.length);var i=a-f;if(i<2)return;var d=0;if(i<L){d=F(o,f,a,u),R(o,f,a,f+d,u);return}var s=new t(o,u),n=I(i);do{if(d=F(o,f,a,u),d<n){var l=i;l>n&&(l=n),R(o,f,f+l,f+d,u),d=l}s.pushRun(f,d),s.mergeRuns(),i-=d,f+=d}while(i!==0);s.forceMergeRuns()}Be.exports=b},BU3w:function(Be,J,L){"use strict";L.d(J,"a",function(){return R});var Y=L("MNnm"),B="rc-util-key";function I(P){if(P.attachTo)return P.attachTo;var m=document.querySelector("head");return m||document.body}function F(P){var m,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Y.a)())return null;var b=document.createElement("style");if((m=t.csp)===null||m===void 0?void 0:m.nonce){var o;b.nonce=(o=t.csp)===null||o===void 0?void 0:o.nonce}b.innerHTML=P;var u=I(t),f=u.firstChild;return t.prepend&&u.prepend?u.prepend(b):t.prepend&&f?u.insertBefore(b,f):u.appendChild(b),b}var T=new Map;function R(P,m){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=I(t);if(!T.has(b)){var o=F("",t),u=o.parentNode;T.set(b,u),u.removeChild(o)}var f=Array.from(T.get(b).children).find(function(n){return n.tagName==="STYLE"&&n[B]===m});if(f){var a,i;if(((a=t.csp)===null||a===void 0?void 0:a.nonce)&&f.nonce!==((i=t.csp)===null||i===void 0?void 0:i.nonce)){var d;f.nonce=(d=t.csp)===null||d===void 0?void 0:d.nonce}return f.innerHTML!==P&&(f.innerHTML=P),f}var s=F(P,t);return s[B]=m,s}},Bd2K:function(Be,J,L){(function(Y){Y(L("VrN/"),L("osHv"))})(function(Y){Y.defineOption("autoCloseTags",!1,function(t,b,o){if(o!=Y.Init&&o&&t.removeKeyMap("autoCloseTags"),!b)return;var u={name:"autoCloseTags"};(typeof b!="object"||b.whenClosing!==!1)&&(u["'/'"]=function(f){return R(f)}),(typeof b!="object"||b.whenOpening!==!1)&&(u["'>'"]=function(f){return F(f)}),t.addKeyMap(u)});var B=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],I=["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 F(t){if(t.getOption("disableInput"))return Y.Pass;for(var b=t.listSelections(),o=[],u=t.getOption("autoCloseTags"),f=0;f<b.length;f++){if(!b[f].empty())return Y.Pass;var a=b[f].head,i=t.getTokenAt(a),d=Y.innerMode(t.getMode(),i.state),s=d.state,n=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(s),l=n&&n.name;if(!l)return Y.Pass;var c=d.mode.configuration=="html",x=typeof u=="object"&&u.dontCloseTags||c&&B,A=typeof u=="object"&&u.indentTags||c&&I;i.end>a.ch&&(l=l.slice(0,l.length-i.end+a.ch));var C=l.toLowerCase();if(!l||i.type=="string"&&(i.end!=a.ch||!/[\"\']/.test(i.string.charAt(i.string.length-1))||i.string.length==1)||i.type=="tag"&&n.close||i.string.indexOf("/")==a.ch-i.start-1||x&&P(x,C)>-1||m(t,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(s)||[],l,a,!0))return Y.Pass;var k=typeof u=="object"&&u.emptyTags;if(k&&P(k,l)>-1){o[f]={text:"/>",newPos:Y.Pos(a.line,a.ch+2)};continue}var w=A&&P(A,C)>-1;o[f]={indent:w,text:">"+(w?`
`:"")+"</"+l+">",newPos:w?Y.Pos(a.line+1,0):Y.Pos(a.line,a.ch+1)}}for(var y=typeof u=="object"&&u.dontIndentOnAutoClose,f=b.length-1;f>=0;f--){var h=o[f];t.replaceRange(h.text,b[f].head,b[f].anchor,"+insert");var p=t.listSelections().slice(0);p[f]={head:h.newPos,anchor:h.newPos},t.setSelections(p),!y&&h.indent&&(t.indentLine(h.newPos.line,null,!0),t.indentLine(h.newPos.line+1,null,!0))}}function T(t,b){for(var o=t.listSelections(),u=[],f=b?"/":"</",a=t.getOption("autoCloseTags"),i=typeof a=="object"&&a.dontIndentOnSlash,d=0;d<o.length;d++){if(!o[d].empty())return Y.Pass;var s=o[d].head,n=t.getTokenAt(s),l=Y.innerMode(t.getMode(),n.state),c=l.state;if(b&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=s.ch-1))return Y.Pass;var x,A=l.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(A&&l.mode.name=="javascript")x=f+"script";else if(A&&l.mode.name=="css")x=f+"style";else{var C=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(c);if(!C||C.length&&m(t,C,C[C.length-1],s))return Y.Pass;x=f+C[C.length-1]}t.getLine(s.line).charAt(n.end)!=">"&&(x+=">"),u[d]=x}if(t.replaceSelections(u),o=t.listSelections(),!i)for(var d=0;d<o.length;d++)(d==o.length-1||o[d].head.line<o[d+1].head.line)&&t.indentLine(o[d].head.line)}function R(t){return t.getOption("disableInput")?Y.Pass:T(t,!0)}Y.commands.closeTag=function(t){return T(t)};function P(t,b){if(t.indexOf)return t.indexOf(b);for(var o=0,u=t.length;o<u;++o)if(t[o]==b)return o;return-1}function m(t,b,o,u,f){if(!Y.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,u.line+500),i=Y.scanForClosingTag(t,u,null,a);if(!i||i.tag!=o)return!1;for(var d=f?1:0,s=b.length-1;s>=0&&b[s]==o;s--)++d;u=i.to;for(var s=1;s<d;s++){var n=Y.scanForClosingTag(t,u,null,a);if(!n||n.tag!=o)return!1;u=n.to}return!0}})},BdwD:function(Be,J,L){"use strict";var Y=L("+L6B"),B=L("2/Rp"),I=L("0Owb"),F=L("k1fw"),T=L("q1tI"),R=L.n(T),P=L("FOrL"),m=L.n(P),t=function(o){var u=o.buttonProps,f=u===void 0?{}:u,a=o.styles,i=a===void 0?{}:a,d=o.customText,s=o.ButtonText,n=o.ButtonClick,l=o.Buttonclass,c=o.ButtonTwo;return R.a.createElement("section",{className:"tc animated fadeIn",style:Object(F.a)(Object(F.a)({},{color:"#999",margin:"200px auto"}),i)},R.a.createElement("img",{src:m.a}),R.a.createElement("p",{className:"mt20 font14"},d||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&R.a.createElement(B.a,Object(I.a)({className:l,onClick:n},f),s),c&&c)};J.a=t},BjJ7:function(Be,J,L){"use strict";L.d(J,"d",function(){return B}),L.d(J,"c",function(){return I}),L.d(J,"e",function(){return F}),L.d(J,"b",function(){return T}),L.d(J,"a",function(){return P});var Y=L("m3rI");function B(m){var t=!0;if(m.length>0){for(var b=0;b<m.length;b++)if(m[b].compile_success==0||!m[b].compile_success){t=!1;break}}else t=!1;return t}function I(m){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",b=[],o=0;o<m.length;o++){var u=m[o],f=t?"".concat(t,"/").concat(u.name):"".concat(u.name);b.push({title:u.name,isLeaf:!(u.type==="tree"),key:f})}return b}function F(m,t,b){for(var o=0;o<m.length;o++){var u=m[o];if(u.key===t){u.children=b;break}u.children&&F(u.children,t,b)}return m}function T(m,t,b){var o;return function(){var u=this,f=arguments,a=function(){o=null,b||m.apply(u,f)},i=b&&!o;clearTimeout(o),o=setTimeout(a,t),i&&m.apply(u,f)}}var R=!0,P=Y.a.API_SERVER},BlVb:function(Be,J,L){var Y=L("hyiK"),B=1e-8;function I(T,R){return Math.abs(T-R)<B}function F(T,R,P){var m=0,t=T[0];if(!t)return!1;for(var b=1;b<T.length;b++){var o=T[b];m+=Y(t[0],t[1],o[0],o[1],R,P),t=o}var u=T[0];return(!I(t[0],u[0])||!I(t[1],u[1]))&&(m+=Y(t[0],t[1],u[0],u[1],R,P)),m!==0}J.contain=F},BoW6:function(Be,J,L){Be.exports={wrap:"wrap___1GPjg",maxWidth70:"maxWidth70___1Dk6g",maxWidth80:"maxWidth80___3b9PP",maxWidth100:"maxWidth100___3VHJ2",maxWidth110:"maxWidth110___35RUD",maxWidth120:"maxWidth120___1rOLr",reviewStatusTooltip:"reviewStatusTooltip___3i2cP",color32C:"color32C___2YC8o",MdEditor:"MdEditor___241c9",tr1:"tr1___3HOPl"}},Bq2U:function(Be,J,L){var Y=L("RDYZ"),B=L("Qe9p"),I=L("bYtY"),F=I.isArrayLike,T=Array.prototype.slice;function R(x,A){return x[A]}function P(x,A,C){x[A]=C}function m(x,A,C){return(A-x)*C+x}function t(x,A,C){return C>.5?A:x}function b(x,A,C,k,w){var y=x.length;if(w===1)for(var h=0;h<y;h++)k[h]=m(x[h],A[h],C);else for(var p=y&&x[0].length,h=0;h<y;h++)for(var v=0;v<p;v++)k[h][v]=m(x[h][v],A[h][v],C)}function o(x,A,C){var k=x.length,w=A.length;if(k!==w){var y=k>w;if(y)x.length=w;else for(var h=k;h<w;h++)x.push(C===1?A[h]:T.call(A[h]))}for(var p=x[0]&&x[0].length,h=0;h<x.length;h++)if(C===1)isNaN(x[h])&&(x[h]=A[h]);else for(var v=0;v<p;v++)isNaN(x[h][v])&&(x[h][v]=A[h][v])}function u(x,A,C){if(x===A)return!0;var k=x.length;if(k!==A.length)return!1;if(C===1){for(var w=0;w<k;w++)if(x[w]!==A[w])return!1}else for(var y=x[0].length,w=0;w<k;w++)for(var h=0;h<y;h++)if(x[w][h]!==A[w][h])return!1;return!0}function f(x,A,C,k,w,y,h,p,v){var _=x.length;if(v===1)for(var E=0;E<_;E++)p[E]=a(x[E],A[E],C[E],k[E],w,y,h);else for(var g=x[0].length,E=0;E<_;E++)for(var j=0;j<g;j++)p[E][j]=a(x[E][j],A[E][j],C[E][j],k[E][j],w,y,h)}function a(x,A,C,k,w,y,h){var p=(C-x)*.5,v=(k-A)*.5;return(2*(A-C)+p+v)*h+(-3*(A-C)-2*p-v)*y+p*w+A}function i(x){if(F(x)){var A=x.length;if(F(x[0])){for(var C=[],k=0;k<A;k++)C.push(T.call(x[k]));return C}return T.call(x)}return x}function d(x){return x[0]=Math.floor(x[0]),x[1]=Math.floor(x[1]),x[2]=Math.floor(x[2]),"rgba("+x.join(",")+")"}function s(x){var A=x[x.length-1].value;return F(A&&A[0])?2:1}function n(x,A,C,k,w,y){var h=x._getter,p=x._setter,v=A==="spline",_=k.length;if(!_)return;var E=k[0].value,g=F(E),j=!1,U=!1,S=g?s(k):0,z;k.sort(function(ke,ht){return ke.time-ht.time}),z=k[_-1].time;for(var H=[],M=[],V=k[0].value,K=!0,$=0;$<_;$++){H.push(k[$].time/z);var Z=k[$].value;if(g&&u(Z,V,S)||!g&&Z===V||(K=!1),V=Z,typeof Z=="string"){var me=B.parse(Z);me?(Z=me,j=!0):U=!0}M.push(Z)}if(!y&&K)return;for(var oe=M[_-1],$=0;$<_-1;$++)g?o(M[$],oe,S):isNaN(M[$])&&!isNaN(oe)&&!U&&!j&&(M[$]=oe);g&&o(h(x._target,w),oe,S);var fe=0,ye=0,Ie,ve,de,Je,Rt,Ee;if(j)var Me=[0,0,0,0];var rt=function(ke,ht){var ie;if(ht<0)ie=0;else if(ht<ye){for(Ie=Math.min(fe+1,_-1),ie=Ie;ie>=0&&!(H[ie]<=ht);ie--);ie=Math.min(ie,_-2)}else{for(ie=fe;ie<_&&!(H[ie]>ht);ie++);ie=Math.min(ie-1,_-2)}fe=ie,ye=ht;var xe=H[ie+1]-H[ie];if(xe===0)return;if(ve=(ht-H[ie])/xe,v)if(Je=M[ie],de=M[ie===0?ie:ie-1],Rt=M[ie>_-2?_-1:ie+1],Ee=M[ie>_-3?_-1:ie+2],g)f(de,Je,Rt,Ee,ve,ve*ve,ve*ve*ve,h(ke,w),S);else{var we;if(j)we=f(de,Je,Rt,Ee,ve,ve*ve,ve*ve*ve,Me,1),we=d(Me);else{if(U)return t(Je,Rt,ve);we=a(de,Je,Rt,Ee,ve,ve*ve,ve*ve*ve)}p(ke,w,we)}else if(g)b(M[ie],M[ie+1],ve,h(ke,w),S);else{var we;if(j)b(M[ie],M[ie+1],ve,Me,1),we=d(Me);else{if(U)return t(M[ie],M[ie+1],ve);we=m(M[ie],M[ie+1],ve)}p(ke,w,we)}},He=new Y({target:x._target,life:z,loop:x._loop,delay:x._delay,onframe:rt,ondestroy:C});return A&&A!=="spline"&&(He.easing=A),He}var l=function(x,A,C,k){this._tracks={},this._target=x,this._loop=A||!1,this._getter=C||R,this._setter=k||P,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};l.prototype={when:function(x,A){var C=this._tracks;for(var k in A){if(!A.hasOwnProperty(k))continue;if(!C[k]){C[k]=[];var w=this._getter(this._target,k);if(w==null)continue;x!==0&&C[k].push({time:0,value:i(w)})}C[k].push({time:x,value:A[k]})}return this},during:function(x){return this._onframeList.push(x),this},pause:function(){for(var x=0;x<this._clipList.length;x++)this._clipList[x].pause();this._paused=!0},resume:function(){for(var x=0;x<this._clipList.length;x++)this._clipList[x].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var x=this._doneList,A=x.length,C=0;C<A;C++)x[C].call(this)},start:function(x,A){var C=this,k=0,w=function(){k--,k||C._doneCallback()},y;for(var h in this._tracks){if(!this._tracks.hasOwnProperty(h))continue;var p=n(this,x,w,this._tracks[h],h,A);p&&(this._clipList.push(p),k++,this.animation&&this.animation.addClip(p),y=p)}if(y){var v=y.onframe;y.onframe=function(_,E){v(_,E);for(var g=0;g<C._onframeList.length;g++)C._onframeList[g](_,E)}}return k||this._doneCallback(),this},stop:function(x){for(var A=this._clipList,C=this.animation,k=0;k<A.length;k++){var w=A[k];x&&w.onframe(this._target,1),C&&C.removeClip(w)}A.length=0},delay:function(x){return this._delay=x,this},done:function(x){return x&&this._doneList.push(x),this},getClips:function(){return this._clipList}};var c=l;Be.exports=c},"C+DQ":function(Be,J,L){},"C/vA":function(Be,J,L){"use strict";L.d(J,"a",function(){return Y});function Y(B){const I=this;let F=!1,T;return function(){return F||(F=!0,T=B.apply(I,arguments)),T}}},C0SR:function(Be,J,L){var Y=L("YH21"),B=function(){this._track=[]};B.prototype={constructor:B,recognize:function(P,m,t){return this._doTrack(P,m,t),this._recognize(P)},clear:function(){return this._track.length=0,this},_doTrack:function(P,m,t){var b=P.touches;if(!b)return;for(var o={points:[],touches:[],target:m,event:P},u=0,f=b.length;u<f;u++){var a=b[u],i=Y.clientToLocal(t,a,{});o.points.push([i.zrX,i.zrY]),o.touches.push(a)}this._track.push(o)},_recognize:function(P){for(var m in T)if(T.hasOwnProperty(m)){var t=T[m](this._track,P);if(t)return t}}};function I(P){var m=P[1][0]-P[0][0],t=P[1][1]-P[0][1];return Math.sqrt(m*m+t*t)}function F(P){return[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2]}var T={pinch:function(P,m){var t=P.length;if(!t)return;var b=(P[t-1]||{}).points,o=(P[t-2]||{}).points||b;if(o&&o.length>1&&b&&b.length>1){var u=I(b)/I(o);!isFinite(u)&&(u=1),m.pinchScale=u;var f=F(b);return m.pinchX=f[0],m.pinchY=f[1],{type:"pinch",target:P[0].target,event:m}}}},R=B;Be.exports=R},"Cg/j":function(Be,J,L){"use strict";L.d(J,"b",function(){return Y}),L.d(J,"a",function(){return B}),L.d(J,"c",function(){return F}),L.d(J,"d",function(){return T});var Y;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function P(m){return m[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=P})(Y||(Y={}));const B=F("instantiationService");function I(R,P,m,t){P[Y.DI_TARGET]===P?P[Y.DI_DEPENDENCIES].push({id:R,index:m,optional:t}):(P[Y.DI_DEPENDENCIES]=[{id:R,index:m,optional:t}],P[Y.DI_TARGET]=P)}function F(R){if(Y.serviceIds.has(R))return Y.serviceIds.get(R);const P=function(m,t,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(P,m,b,!1)};return P.toString=()=>R,Y.serviceIds.set(R,P),P}function T(R){return function(P,m,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");I(R,P,t,!0)}}},DBLp:function(Be,J){function L(){}L.prototype={diff:function(T,R,P){P||(P=function(l,c){return l===c}),this.equals=P;var m=this;T=T.slice(),R=R.slice();var t=R.length,b=T.length,o=1,u=t+b,f=[{newPos:-1,components:[]}],a=this.extractCommon(f[0],R,T,0);if(f[0].newPos+1>=t&&a+1>=b){for(var i=[],d=0;d<R.length;d++)i.push(d);return[{indices:i,count:R.length}]}function s(){for(var l=-1*o;l<=o;l+=2){var c,x=f[l-1],A=f[l+1],C=(A?A.newPos:0)-l;x&&(f[l-1]=void 0);var k=x&&x.newPos+1<t,w=A&&0<=C&&C<b;if(!k&&!w){f[l]=void 0;continue}if(!k||w&&x.newPos<A.newPos?(c=B(A),m.pushComponent(c.components,void 0,!0)):(c=x,c.newPos++,m.pushComponent(c.components,!0,void 0)),C=m.extractCommon(c,R,T,l),c.newPos+1>=t&&C+1>=b)return Y(m,c.components,R,T);f[l]=c}o++}for(;o<=u;){var n=s();if(n)return n}},pushComponent:function(T,R,P){var m=T[T.length-1];m&&m.added===R&&m.removed===P?T[T.length-1]={count:m.count+1,added:R,removed:P}:T.push({count:1,added:R,removed:P})},extractCommon:function(T,R,P,m){for(var t=R.length,b=P.length,o=T.newPos,u=o-m,f=0;o+1<t&&u+1<b&&this.equals(R[o+1],P[u+1]);)o++,u++,f++;return f&&T.components.push({count:f}),T.newPos=o,u},tokenize:function(T){return T.slice()},join:function(T){return T.slice()}};function Y(T,R,P,m){for(var t=0,b=R.length,o=0,u=0;t<b;t++){var f=R[t];if(f.removed){for(var a=[],i=u;i<u+f.count;i++)a.push(i);f.indices=a,u+=f.count}else{for(var a=[],i=o;i<o+f.count;i++)a.push(i);f.indices=a,o+=f.count,f.added||(u+=f.count)}}return R}function B(T){return{newPos:T.newPos,components:T.components.slice(0)}}var I=new L;function F(T,R,P){return I.diff(T,R,P)}Be.exports=F},DN4a:function(Be,J,L){var Y=L("Fofx"),B=L("QBsz"),I=Y.identity,F=5e-5;function T(u){return u>F||u<-F}var R=function(u){u=u||{},u.position||(this.position=[0,0]),u.rotation==null&&(this.rotation=0),u.scale||(this.scale=[1,1]),this.origin=this.origin||null},P=R.prototype;P.transform=null,P.needLocalTransform=function(){return T(this.rotation)||T(this.position[0])||T(this.position[1])||T(this.scale[0]-1)||T(this.scale[1]-1)};var m=[];P.updateTransform=function(){var u=this.parent,f=u&&u.transform,a=this.needLocalTransform(),i=this.transform;if(!(a||f)){i&&I(i);return}i=i||Y.create(),a?this.getLocalTransform(i):I(i),f&&(a?Y.mul(i,u.transform,i):Y.copy(i,u.transform)),this.transform=i;var d=this.globalScaleRatio;if(d!=null&&d!==1){this.getGlobalScale(m);var s=m[0]<0?-1:1,n=m[1]<0?-1:1,l=((m[0]-s)*d+s)/m[0]||0,c=((m[1]-n)*d+n)/m[1]||0;i[0]*=l,i[1]*=l,i[2]*=c,i[3]*=c}this.invTransform=this.invTransform||Y.create(),Y.invert(this.invTransform,i)},P.getLocalTransform=function(u){return R.getLocalTransform(this,u)},P.setTransform=function(u){var f=this.transform,a=u.dpr||1;f?u.setTransform(a*f[0],a*f[1],a*f[2],a*f[3],a*f[4],a*f[5]):u.setTransform(a,0,0,a,0,0)},P.restoreTransform=function(u){var f=u.dpr||1;u.setTransform(f,0,0,f,0,0)};var t=[],b=Y.create();P.setLocalTransform=function(u){if(!u)return;var f=u[0]*u[0]+u[1]*u[1],a=u[2]*u[2]+u[3]*u[3],i=this.position,d=this.scale;T(f-1)&&(f=Math.sqrt(f)),T(a-1)&&(a=Math.sqrt(a)),u[0]<0&&(f=-f),u[3]<0&&(a=-a),i[0]=u[4],i[1]=u[5],d[0]=f,d[1]=a,this.rotation=Math.atan2(-u[1]/a,u[0]/f)},P.decomposeTransform=function(){if(!this.transform)return;var u=this.parent,f=this.transform;u&&u.transform&&(Y.mul(t,u.invTransform,f),f=t);var a=this.origin;a&&(a[0]||a[1])&&(b[4]=a[0],b[5]=a[1],Y.mul(t,f,b),t[4]-=a[0],t[5]-=a[1],f=t),this.setLocalTransform(f)},P.getGlobalScale=function(u){var f=this.transform;return u=u||[],f?(u[0]=Math.sqrt(f[0]*f[0]+f[1]*f[1]),u[1]=Math.sqrt(f[2]*f[2]+f[3]*f[3]),f[0]<0&&(u[0]=-u[0]),f[3]<0&&(u[1]=-u[1]),u):(u[0]=1,u[1]=1,u)},P.transformCoordToLocal=function(u,f){var a=[u,f],i=this.invTransform;return i&&B.applyTransform(a,a,i),a},P.transformCoordToGlobal=function(u,f){var a=[u,f],i=this.transform;return i&&B.applyTransform(a,a,i),a},R.getLocalTransform=function(u,f){f=f||[],I(f);var a=u.origin,i=u.scale||[1,1],d=u.rotation||0,s=u.position||[0,0];return a&&(f[4]-=a[0],f[5]-=a[1]),Y.scale(f,f,i),d&&Y.rotate(f,f,d),a&&(f[4]+=a[0],f[5]+=a[1]),f[4]+=s[0],f[5]+=s[1],f};var o=R;Be.exports=o},Dagg:function(Be,J,L){var Y=L("Gev7"),B=L("mFDi"),I=L("bYtY"),F=L("Xnb7");function T(P){Y.call(this,P)}T.prototype={constructor:T,type:"image",brush:function(P,m){var t=this.style,b=t.image;t.bind(P,this,m);var o=this._image=F.createOrUpdateImage(b,this._image,this,this.onload);if(!o||!F.isImageReady(o))return;var u=t.x||0,f=t.y||0,a=t.width,i=t.height,d=o.width/o.height;if(a==null&&i!=null?a=i*d:i==null&&a!=null?i=a/d:a==null&&i==null&&(a=o.width,i=o.height),this.setTransform(P),t.sWidth&&t.sHeight){var s=t.sx||0,n=t.sy||0;P.drawImage(o,s,n,t.sWidth,t.sHeight,u,f,a,i)}else if(t.sx&&t.sy){var s=t.sx,n=t.sy,l=a-s,c=i-n;P.drawImage(o,s,n,l,c,u,f,a,i)}else P.drawImage(o,u,f,a,i);t.text!=null&&(this.restoreTransform(P),this.drawRectText(P,this.getBoundingRect()))},getBoundingRect:function(){var P=this.style;return this._rect||(this._rect=new B(P.x||0,P.y||0,P.width||0,P.height||0)),this._rect}},I.inherits(T,Y);var R=T;Be.exports=R},DlQD:function(Be,J,L){(function(Y,B){Be.exports=B()})(this,function(){"use strict";function Y(Ne,Te){for(var Oe=0;Oe<Te.length;Oe++){var ae=Te[Oe];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Ne,ae.key,ae)}}function B(Ne,Te,Oe){return Te&&Y(Ne.prototype,Te),Oe&&Y(Ne,Oe),Ne}function I(Ne,Te){if(!Ne)return;if(typeof Ne=="string")return F(Ne,Te);var Oe=Object.prototype.toString.call(Ne).slice(8,-1);if(Oe==="Object"&&Ne.constructor&&(Oe=Ne.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(Ne);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return F(Ne,Te)}function F(Ne,Te){(Te==null||Te>Ne.length)&&(Te=Ne.length);for(var Oe=0,ae=new Array(Te);Oe<Te;Oe++)ae[Oe]=Ne[Oe];return ae}function T(Ne,Te){var Oe;if(typeof Symbol=="undefined"||Ne[Symbol.iterator]==null){if(Array.isArray(Ne)||(Oe=I(Ne))||Te&&Ne&&typeof Ne.length=="number"){Oe&&(Ne=Oe);var ae=0;return function(){return ae>=Ne.length?{done:!0}:{done:!1,value:Ne[ae++]}}}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 Oe=Ne[Symbol.iterator](),Oe.next.bind(Oe)}function R(Ne,Te){return Te={exports:{}},Ne(Te,Te.exports),Te.exports}var P=R(function(Ne){function Te(){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 Oe(ae){Ne.exports.defaults=ae}Ne.exports={defaults:Te(),getDefaults:Te,changeDefaults:Oe}}),m=P.defaults,t=P.getDefaults,b=P.changeDefaults,o=/[&<>"']/,u=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(Te){return i[Te]};function s(Ne,Te){if(Te){if(o.test(Ne))return Ne.replace(u,d)}else if(f.test(Ne))return Ne.replace(a,d);return Ne}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Ne){return Ne.replace(n,function(Te,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function x(Ne,Te){Ne=Ne.source||Ne,Te=Te||"";var Oe={replace:function(le,he){return he=he.source||he,he=he.replace(c,"$1"),Ne=Ne.replace(le,he),Oe},getRegex:function(){return new RegExp(Ne,Te)}};return Oe}var A=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ne,Te,Oe){if(Ne){var ae;try{ae=decodeURIComponent(l(Oe)).replace(A,"").toLowerCase()}catch(le){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}Te&&!C.test(Oe)&&(Oe=v(Te,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(le){return null}return Oe}var w={},y=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(Ne,Te){w[" "+Ne]||(y.test(Ne)?w[" "+Ne]=Ne+"/":w[" "+Ne]=j(Ne,"/",!0)),Ne=w[" "+Ne];var Oe=Ne.indexOf(":")===-1;return Te.substring(0,2)==="//"?Oe?Te:Ne.replace(h,"$1")+Te:Te.charAt(0)==="/"?Oe?Te:Ne.replace(p,"$1")+Te:Ne+Te}var _={exec:function(){}};function E(Ne){for(var Te=1,Oe,ae;Te<arguments.length;Te++){Oe=arguments[Te];for(ae in Oe)Object.prototype.hasOwnProperty.call(Oe,ae)&&(Ne[ae]=Oe[ae])}return Ne}function g(Ne,Te){var Oe=Ne.replace(/\|/g,function(he,_e,Se){for(var ze=!1,xt=_e;--xt>=0&&Se[xt]==="\\";)ze=!ze;return ze?"|":" |"}),ae=Oe.split(/ \|/),le=0;if(ae.length>Te)ae.splice(Te);else for(;ae.length<Te;)ae.push("");for(;le<ae.length;le++)ae[le]=ae[le].trim().replace(/\\\|/g,"|");return ae}function j(Ne,Te,Oe){var ae=Ne.length;if(ae===0)return"";for(var le=0;le<ae;){var he=Ne.charAt(ae-le-1);if(he===Te&&!Oe)le++;else if(he!==Te&&Oe)le++;else break}return Ne.substr(0,ae-le)}function U(Ne,Te){if(Ne.indexOf(Te[1])===-1)return-1;for(var Oe=Ne.length,ae=0,le=0;le<Oe;le++)if(Ne[le]==="\\")le++;else if(Ne[le]===Te[0])ae++;else if(Ne[le]===Te[1]&&(ae--,ae<0))return le;return-1}function S(Ne){Ne&&Ne.sanitize&&!Ne.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var z={escape:s,unescape:l,edit:x,cleanUrl:k,resolveUrl:v,noopTest:_,merge:E,splitCells:g,rtrim:j,findClosingBracket:U,checkSanitizeDeprecation:S},H=P.defaults,M=z.rtrim,V=z.splitCells,K=z.escape,$=z.findClosingBracket;function Z(Ne,Te,Oe){var ae=Te.href,le=Te.title?K(Te.title):null,he=Ne[1].replace(/\\([\[\]])/g,"$1");return Ne[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:ae,title:le,text:he}:{type:"image",raw:Oe,href:ae,title:le,text:K(he)}}function me(Ne,Te){var Oe=Ne.match(/^(\s+)(?:```)/);if(Oe===null)return Te;var ae=Oe[1];return Te.split(`
`).map(function(le){var he=le.match(/^\s+/);if(he===null)return le;var _e=he[0];return _e.length>=ae.length?le.slice(ae.length):le}).join(`
`)}var oe=function(){function Ne(Oe){this.options=Oe||H}var Te=Ne.prototype;return Te.space=function(ae){var le=this.rules.block.newline.exec(ae);if(le)return le[0].length>1?{type:"space",raw:le[0]}:{raw:`
`}},Te.code=function(ae,le){var he=this.rules.block.code.exec(ae);if(he){var _e=le[le.length-1];if(_e&&_e.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var Se=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?Se:M(Se,`
`)}}},Te.fences=function(ae){var le=this.rules.block.fences.exec(ae);if(le){var he=le[0],_e=me(he,le[3]||"");return{type:"code",raw:he,lang:le[2]?le[2].trim():le[2],text:_e}}},Te.heading=function(ae){var le=this.rules.block.heading.exec(ae);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},Te.nptable=function(ae){var le=this.rules.block.nptable.exec(ae);if(le){var he={type:"table",header:V(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[],raw:le[0]};if(he.header.length===he.align.length){var _e=he.align.length,Se;for(Se=0;Se<_e;Se++)/^ *-+: *$/.test(he.align[Se])?he.align[Se]="right":/^ *:-+: *$/.test(he.align[Se])?he.align[Se]="center":/^ *:-+ *$/.test(he.align[Se])?he.align[Se]="left":he.align[Se]=null;for(_e=he.cells.length,Se=0;Se<_e;Se++)he.cells[Se]=V(he.cells[Se],he.header.length);return he}}},Te.hr=function(ae){var le=this.rules.block.hr.exec(ae);if(le)return{type:"hr",raw:le[0]}},Te.blockquote=function(ae){var le=this.rules.block.blockquote.exec(ae);if(le){var he=le[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:le[0],text:he}}},Te.list=function(ae){var le=this.rules.block.list.exec(ae);if(le){for(var he=le[0],_e=le[2],Se=_e.length>1,ze=_e[_e.length-1]===")",xt={type:"list",raw:he,ordered:Se,start:Se?+_e.slice(0,-1):"",loose:!1,items:[]},Qt=le[0].match(this.rules.block.item),sn=!1,gt,zt,Ot,At,ft,be,Fe,Nt=Qt.length,bt=0;bt<Nt;bt++)gt=Qt[bt],he=gt,zt=gt.length,gt=gt.replace(/^ *([*+-]|\d+[.)]) */,""),~gt.indexOf(`
`)&&(zt-=gt.length,gt=this.options.pedantic?gt.replace(/^ {1,4}/gm,""):gt.replace(new RegExp("^ {1,"+zt+"}","gm"),"")),bt!==Nt-1&&(Ot=this.rules.block.bullet.exec(Qt[bt+1])[0],(Se?Ot.length===1||!ze&&Ot[Ot.length-1]===")":Ot.length>1||this.options.smartLists&&Ot!==_e)&&(At=Qt.slice(bt+1).join(`
`),xt.raw=xt.raw.substring(0,xt.raw.length-At.length),bt=Nt-1)),ft=sn||/\n\n(?!\s*$)/.test(gt),bt!==Nt-1&&(sn=gt.charAt(gt.length-1)===`
`,ft||(ft=sn)),ft&&(xt.loose=!0),be=/^\[[ xX]\] /.test(gt),Fe=void 0,be&&(Fe=gt[1]!==" ",gt=gt.replace(/^\[[ xX]\] +/,"")),xt.items.push({type:"list_item",raw:he,task:be,checked:Fe,loose:ft,text:gt});return xt}},Te.html=function(ae){var le=this.rules.block.html.exec(ae);if(le)return{type:this.options.sanitize?"paragraph":"html",raw:le[0],pre:!this.options.sanitizer&&(le[1]==="pre"||le[1]==="script"||le[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):K(le[0]):le[0]}},Te.def=function(ae){var le=this.rules.block.def.exec(ae);if(le){le[3]&&(le[3]=le[3].substring(1,le[3].length-1));var he=le[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:le[0],href:le[2],title:le[3]}}},Te.table=function(ae){var le=this.rules.block.table.exec(ae);if(le){var he={type:"table",header:V(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=le[0];var _e=he.align.length,Se;for(Se=0;Se<_e;Se++)/^ *-+: *$/.test(he.align[Se])?he.align[Se]="right":/^ *:-+: *$/.test(he.align[Se])?he.align[Se]="center":/^ *:-+ *$/.test(he.align[Se])?he.align[Se]="left":he.align[Se]=null;for(_e=he.cells.length,Se=0;Se<_e;Se++)he.cells[Se]=V(he.cells[Se].replace(/^ *\| *| *\| *$/g,""),he.header.length);return he}}},Te.lheading=function(ae){var le=this.rules.block.lheading.exec(ae);if(le)return{type:"heading",raw:le[0],depth:le[2].charAt(0)==="="?1:2,text:le[1]}},Te.paragraph=function(ae){var le=this.rules.block.paragraph.exec(ae);if(le)return{type:"paragraph",raw:le[0],text:le[1].charAt(le[1].length-1)===`
`?le[1].slice(0,-1):le[1]}},Te.text=function(ae,le){var he=this.rules.block.text.exec(ae);if(he){var _e=le[le.length-1];return _e&&_e.type==="text"?{raw:he[0],text:he[0]}:{type:"text",raw:he[0],text:he[0]}}},Te.escape=function(ae){var le=this.rules.inline.escape.exec(ae);if(le)return{type:"escape",raw:le[0],text:K(le[1])}},Te.tag=function(ae,le,he){var _e=this.rules.inline.tag.exec(ae);if(_e)return!le&&/^<a /i.test(_e[0])?le=!0:le&&/^<\/a>/i.test(_e[0])&&(le=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(_e[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(_e[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:_e[0],inLink:le,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):K(_e[0]):_e[0]}},Te.link=function(ae){var le=this.rules.inline.link.exec(ae);if(le){var he=$(le[2],"()");if(he>-1){var _e=le[0].indexOf("!")===0?5:4,Se=_e+le[1].length+he;le[2]=le[2].substring(0,he),le[0]=le[0].substring(0,Se).trim(),le[3]=""}var ze=le[2],xt="";if(this.options.pedantic){var Qt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ze);Qt?(ze=Qt[1],xt=Qt[3]):xt=""}else xt=le[3]?le[3].slice(1,-1):"";ze=ze.trim().replace(/^<([\s\S]*)>$/,"$1");var sn=Z(le,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:xt&&xt.replace(this.rules.inline._escapes,"$1")},le[0]);return sn}},Te.reflink=function(ae,le){var he;if((he=this.rules.inline.reflink.exec(ae))||(he=this.rules.inline.nolink.exec(ae))){var _e=(he[2]||he[1]).replace(/\s+/g," ");if(_e=le[_e.toLowerCase()],!_e||!_e.href){var Se=he[0].charAt(0);return{type:"text",raw:Se,text:Se}}var ze=Z(he,_e,he[0]);return ze}},Te.strong=function(ae,le,he){he===void 0&&(he="");var _e=this.rules.inline.strong.start.exec(ae);if(_e&&(!_e[1]||_e[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){le=le.slice(-1*ae.length);var Se=_e[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Se.lastIndex=0;for(var ze;(_e=Se.exec(le))!=null;)if(ze=this.rules.inline.strong.middle.exec(le.slice(0,_e.index+3)),ze)return{type:"strong",raw:ae.slice(0,ze[0].length),text:ae.slice(2,ze[0].length-2)}}},Te.em=function(ae,le,he){he===void 0&&(he="");var _e=this.rules.inline.em.start.exec(ae);if(_e&&(!_e[1]||_e[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){le=le.slice(-1*ae.length);var Se=_e[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Se.lastIndex=0;for(var ze;(_e=Se.exec(le))!=null;)if(ze=this.rules.inline.em.middle.exec(le.slice(0,_e.index+2)),ze)return{type:"em",raw:ae.slice(0,ze[0].length),text:ae.slice(1,ze[0].length-1)}}},Te.codespan=function(ae){var le=this.rules.inline.code.exec(ae);if(le){var he=le[2].replace(/\n/g," "),_e=/[^ ]/.test(he),Se=he.startsWith(" ")&&he.endsWith(" ");return _e&&Se&&(he=he.substring(1,he.length-1)),he=K(he,!0),{type:"codespan",raw:le[0],text:he}}},Te.br=function(ae){var le=this.rules.inline.br.exec(ae);if(le)return{type:"br",raw:le[0]}},Te.del=function(ae){var le=this.rules.inline.del.exec(ae);if(le)return{type:"del",raw:le[0],text:le[1]}},Te.autolink=function(ae,le){var he=this.rules.inline.autolink.exec(ae);if(he){var _e,Se;return he[2]==="@"?(_e=K(this.options.mangle?le(he[1]):he[1]),Se="mailto:"+_e):(_e=K(he[1]),Se=_e),{type:"link",raw:he[0],text:_e,href:Se,tokens:[{type:"text",raw:_e,text:_e}]}}},Te.url=function(ae,le){var he;if(he=this.rules.inline.url.exec(ae)){var _e,Se;if(he[2]==="@")_e=K(this.options.mangle?le(he[0]):he[0]),Se="mailto:"+_e;else{var ze;do ze=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(ze!==he[0]);_e=K(he[0]),he[1]==="www."?Se="http://"+_e:Se=_e}return{type:"link",raw:he[0],text:_e,href:Se,tokens:[{type:"text",raw:_e,text:_e}]}}},Te.inlineText=function(ae,le,he){var _e=this.rules.inline.text.exec(ae);if(_e){var Se;return le?Se=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):K(_e[0]):_e[0]:Se=K(this.options.smartypants?he(_e[0]):_e[0]),{type:"text",raw:_e[0],text:Se}}},Ne}(),fe=z.noopTest,ye=z.edit,Ie=z.merge,ve={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:fe,table:fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ve._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ve._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ve.def=ye(ve.def).replace("label",ve._label).replace("title",ve._title).getRegex(),ve.bullet=/(?:[*+-]|\d{1,9}[.)])/,ve.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ve.item=ye(ve.item,"gm").replace(/bull/g,ve.bullet).getRegex(),ve.list=ye(ve.list).replace(/bull/g,ve.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ve.def.source+")").getRegex(),ve._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",ve._comment=/<!--(?!-?>)[\s\S]*?-->/,ve.html=ye(ve.html,"i").replace("comment",ve._comment).replace("tag",ve._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ve.paragraph=ye(ve._paragraph).replace("hr",ve.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",ve._tag).getRegex(),ve.blockquote=ye(ve.blockquote).replace("paragraph",ve.paragraph).getRegex(),ve.normal=Ie({},ve),ve.gfm=Ie({},ve.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*|$)"}),ve.gfm.nptable=ye(ve.gfm.nptable).replace("hr",ve.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",ve._tag).getRegex(),ve.gfm.table=ye(ve.gfm.table).replace("hr",ve.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",ve._tag).getRegex(),ve.pedantic=Ie({},ve.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve._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:fe,paragraph:ye(ve.normal._paragraph).replace("hr",ve.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ve.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var de={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fe,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:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};de._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",de.punctuation=ye(de.punctuation).replace(/punctuation/g,de._punctuation).getRegex(),de._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",de._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",de.em.start=ye(de.em.start).replace(/punctuation/g,de._punctuation).getRegex(),de.em.middle=ye(de.em.middle).replace(/punctuation/g,de._punctuation).replace(/overlapSkip/g,de._overlapSkip).getRegex(),de.em.endAst=ye(de.em.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.em.endUnd=ye(de.em.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.start=ye(de.strong.start).replace(/punctuation/g,de._punctuation).getRegex(),de.strong.middle=ye(de.strong.middle).replace(/punctuation/g,de._punctuation).replace(/blockSkip/g,de._blockSkip).getRegex(),de.strong.endAst=ye(de.strong.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.endUnd=ye(de.strong.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.blockSkip=ye(de._blockSkip,"g").getRegex(),de.overlapSkip=ye(de._overlapSkip,"g").getRegex(),de._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,de._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,de._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])?)+(?![-_])/,de.autolink=ye(de.autolink).replace("scheme",de._scheme).replace("email",de._email).getRegex(),de._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,de.tag=ye(de.tag).replace("comment",ve._comment).replace("attribute",de._attribute).getRegex(),de._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,de._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,de._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,de.link=ye(de.link).replace("label",de._label).replace("href",de._href).replace("title",de._title).getRegex(),de.reflink=ye(de.reflink).replace("label",de._label).getRegex(),de.reflinkSearch=ye(de.reflinkSearch,"g").replace("reflink",de.reflink).replace("nolink",de.nolink).getRegex(),de.normal=Ie({},de),de.pedantic=Ie({},de.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:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",de._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",de._label).getRegex()}),de.gfm=Ie({},de.normal,{escape:ye(de.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),de.gfm.url=ye(de.gfm.url,"i").replace("email",de.gfm._extended_email).getRegex(),de.breaks=Ie({},de.gfm,{br:ye(de.br).replace("{2,}","*").getRegex(),text:ye(de.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Je={block:ve,inline:de},Rt=P.defaults,Ee=Je.block,Me=Je.inline;function rt(Ne){return Ne.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(Ne){var Te="",Oe,ae,le=Ne.length;for(Oe=0;Oe<le;Oe++)ae=Ne.charCodeAt(Oe),Math.random()>.5&&(ae="x"+ae.toString(16)),Te+="&#"+ae+";";return Te}var ke=function(){function Ne(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Rt,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:Ee.normal,inline:Me.normal};this.options.pedantic?(ae.block=Ee.pedantic,ae.inline=Me.pedantic):this.options.gfm&&(ae.block=Ee.gfm,this.options.breaks?ae.inline=Me.breaks:ae.inline=Me.gfm),this.tokenizer.rules=ae}Ne.lex=function(ae,le){var he=new Ne(le);return he.lex(ae)};var Te=Ne.prototype;return Te.lex=function(ae){return ae=ae.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ae,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(ae,le,he){le===void 0&&(le=[]),he===void 0&&(he=!0),ae=ae.replace(/^ +$/gm,"");for(var _e,Se,ze,xt;ae;){if(_e=this.tokenizer.space(ae)){ae=ae.substring(_e.raw.length),_e.type&&le.push(_e);continue}if(_e=this.tokenizer.code(ae,le)){ae=ae.substring(_e.raw.length),_e.type?le.push(_e):(xt=le[le.length-1],xt.raw+=`
`+_e.raw,xt.text+=`
`+_e.text);continue}if(_e=this.tokenizer.fences(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.heading(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.nptable(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.hr(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.blockquote(ae)){ae=ae.substring(_e.raw.length),_e.tokens=this.blockTokens(_e.text,[],he),le.push(_e);continue}if(_e=this.tokenizer.list(ae)){for(ae=ae.substring(_e.raw.length),ze=_e.items.length,Se=0;Se<ze;Se++)_e.items[Se].tokens=this.blockTokens(_e.items[Se].text,[],!1);le.push(_e);continue}if(_e=this.tokenizer.html(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(he&&(_e=this.tokenizer.def(ae))){ae=ae.substring(_e.raw.length),this.tokens.links[_e.tag]||(this.tokens.links[_e.tag]={href:_e.href,title:_e.title});continue}if(_e=this.tokenizer.table(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.lheading(ae)){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(he&&(_e=this.tokenizer.paragraph(ae))){ae=ae.substring(_e.raw.length),le.push(_e);continue}if(_e=this.tokenizer.text(ae,le)){ae=ae.substring(_e.raw.length),_e.type?le.push(_e):(xt=le[le.length-1],xt.raw+=`
`+_e.raw,xt.text+=`
`+_e.text);continue}if(ae){var Qt="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(Qt);break}else throw new Error(Qt)}}return le},Te.inline=function(ae){var le,he,_e,Se,ze,xt,Qt=ae.length;for(le=0;le<Qt;le++){xt=ae[le];switch(xt.type){case"paragraph":case"text":case"heading":{xt.tokens=[],this.inlineTokens(xt.text,xt.tokens);break}case"table":{for(xt.tokens={header:[],cells:[]},Se=xt.header.length,he=0;he<Se;he++)xt.tokens.header[he]=[],this.inlineTokens(xt.header[he],xt.tokens.header[he]);for(Se=xt.cells.length,he=0;he<Se;he++)for(ze=xt.cells[he],xt.tokens.cells[he]=[],_e=0;_e<ze.length;_e++)xt.tokens.cells[he][_e]=[],this.inlineTokens(ze[_e],xt.tokens.cells[he][_e]);break}case"blockquote":{this.inline(xt.tokens);break}case"list":{for(Se=xt.items.length,he=0;he<Se;he++)this.inline(xt.items[he].tokens);break}}}return ae},Te.inlineTokens=function(ae,le,he,_e,Se){le===void 0&&(le=[]),he===void 0&&(he=!1),_e===void 0&&(_e=!1),Se===void 0&&(Se="");var ze,xt=ae,Qt;if(this.tokens.links){var sn=Object.keys(this.tokens.links);if(sn.length>0)for(;(Qt=this.tokenizer.rules.inline.reflinkSearch.exec(xt))!=null;)sn.includes(Qt[0].slice(Qt[0].lastIndexOf("[")+1,-1))&&(xt=xt.slice(0,Qt.index)+"["+"a".repeat(Qt[0].length-2)+"]"+xt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Qt=this.tokenizer.rules.inline.blockSkip.exec(xt))!=null;)xt=xt.slice(0,Qt.index)+"["+"a".repeat(Qt[0].length-2)+"]"+xt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ae;){if(ze=this.tokenizer.escape(ae)){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(ze=this.tokenizer.tag(ae,he,_e)){ae=ae.substring(ze.raw.length),he=ze.inLink,_e=ze.inRawBlock,le.push(ze);continue}if(ze=this.tokenizer.link(ae)){ae=ae.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,_e)),le.push(ze);continue}if(ze=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,_e)),le.push(ze);continue}if(ze=this.tokenizer.strong(ae,xt,Se)){ae=ae.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],he,_e),le.push(ze);continue}if(ze=this.tokenizer.em(ae,xt,Se)){ae=ae.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],he,_e),le.push(ze);continue}if(ze=this.tokenizer.codespan(ae)){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(ze=this.tokenizer.br(ae)){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(ze=this.tokenizer.del(ae)){ae=ae.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],he,_e),le.push(ze);continue}if(ze=this.tokenizer.autolink(ae,He)){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(!he&&(ze=this.tokenizer.url(ae,He))){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(ze=this.tokenizer.inlineText(ae,_e,rt)){ae=ae.substring(ze.raw.length),Se=ze.raw.slice(-1),le.push(ze);continue}if(ae){var gt="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return le},B(Ne,null,[{key:"rules",get:function(){return{block:Ee,inline:Me}}}]),Ne}(),ht=P.defaults,ie=z.cleanUrl,xe=z.escape,we=function(){function Ne(Oe){this.options=Oe||ht}var Te=Ne.prototype;return Te.code=function(ae,le,he){var _e=(le||"").match(/\S*/)[0];if(this.options.highlight){var Se=this.options.highlight(ae,_e);Se!=null&&Se!==ae&&(he=!0,ae=Se)}return _e?'<pre><code class="'+this.options.langPrefix+xe(_e,!0)+'">'+(he?ae:xe(ae,!0))+`</code></pre>
`:"<pre><code>"+(he?ae:xe(ae,!0))+`</code></pre>
`},Te.blockquote=function(ae){return`<blockquote>
`+ae+`</blockquote>
`},Te.html=function(ae){return ae},Te.heading=function(ae,le,he,_e){return this.options.headerIds?"<h"+le+' id="'+this.options.headerPrefix+_e.slug(he)+'">'+ae+"</h"+le+`>
`:"<h"+le+">"+ae+"</h"+le+`>
`},Te.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Te.list=function(ae,le,he){var _e=le?"ol":"ul",Se=le&&he!==1?' start="'+he+'"':"";return"<"+_e+Se+`>
`+ae+"</"+_e+`>
`},Te.listitem=function(ae){return"<li>"+ae+`</li>
`},Te.checkbox=function(ae){return"<input "+(ae?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(ae){return"<p>"+ae+`</p>
`},Te.table=function(ae,le){return le&&(le="<tbody>"+le+"</tbody>"),`<table>
<thead>
`+ae+`</thead>
`+le+`</table>
`},Te.tablerow=function(ae){return`<tr>
`+ae+`</tr>
`},Te.tablecell=function(ae,le){var he=le.header?"th":"td",_e=le.align?"<"+he+' align="'+le.align+'">':"<"+he+">";return _e+ae+"</"+he+`>
`},Te.strong=function(ae){return"<strong>"+ae+"</strong>"},Te.em=function(ae){return"<em>"+ae+"</em>"},Te.codespan=function(ae){return"<code>"+ae+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(ae){return"<del>"+ae+"</del>"},Te.link=function(ae,le,he){if(ae=ie(this.options.sanitize,this.options.baseUrl,ae),ae===null)return he;var _e='<a href="'+xe(ae)+'"';return le&&(_e+=' title="'+le+'"'),_e+=">"+he+"</a>",_e},Te.image=function(ae,le,he){if(ae=ie(this.options.sanitize,this.options.baseUrl,ae),ae===null)return he;var _e='<img src="'+ae+'" alt="'+he+'"';return le&&(_e+=' title="'+le+'"'),_e+=this.options.xhtml?"/>":">",_e},Te.text=function(ae){return ae},Ne}(),$e=function(){function Ne(){}var Te=Ne.prototype;return Te.strong=function(ae){return ae},Te.em=function(ae){return ae},Te.codespan=function(ae){return ae},Te.del=function(ae){return ae},Te.html=function(ae){return ae},Te.text=function(ae){return ae},Te.link=function(ae,le,he){return""+he},Te.image=function(ae,le,he){return""+he},Te.br=function(){return""},Ne}(),ct=function(){function Ne(){this.seen={}}var Te=Ne.prototype;return Te.slug=function(ae){var le=ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(le)){var he=le;do this.seen[he]++,le=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(le))}return this.seen[le]=0,le},Ne}(),yt=P.defaults,Ut=z.unescape,We=function(){function Ne(Oe){this.options=Oe||yt,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new $e,this.slugger=new ct}Ne.parse=function(ae,le){var he=new Ne(le);return he.parse(ae)};var Te=Ne.prototype;return Te.parse=function(ae,le){le===void 0&&(le=!0);var he="",_e,Se,ze,xt,Qt,sn,gt,zt,Ot,At,ft,be,Fe,Nt,bt,Kt,Zt,Ge,lt=ae.length;for(_e=0;_e<lt;_e++){At=ae[_e];switch(At.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(At.tokens),At.depth,Ut(this.parseInline(At.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(At.text,At.lang,At.escaped);continue}case"table":{for(zt="",gt="",xt=At.header.length,Se=0;Se<xt;Se++)gt+=this.renderer.tablecell(this.parseInline(At.tokens.header[Se]),{header:!0,align:At.align[Se]});for(zt+=this.renderer.tablerow(gt),Ot="",xt=At.cells.length,Se=0;Se<xt;Se++){for(sn=At.tokens.cells[Se],gt="",Qt=sn.length,ze=0;ze<Qt;ze++)gt+=this.renderer.tablecell(this.parseInline(sn[ze]),{header:!1,align:At.align[ze]});Ot+=this.renderer.tablerow(gt)}he+=this.renderer.table(zt,Ot);continue}case"blockquote":{Ot=this.parse(At.tokens),he+=this.renderer.blockquote(Ot);continue}case"list":{for(ft=At.ordered,be=At.start,Fe=At.loose,xt=At.items.length,Ot="",Se=0;Se<xt;Se++)bt=At.items[Se],Kt=bt.checked,Zt=bt.task,Nt="",bt.task&&(Ge=this.renderer.checkbox(Kt),Fe?bt.tokens.length>0&&bt.tokens[0].type==="text"?(bt.tokens[0].text=Ge+" "+bt.tokens[0].text,bt.tokens[0].tokens&&bt.tokens[0].tokens.length>0&&bt.tokens[0].tokens[0].type==="text"&&(bt.tokens[0].tokens[0].text=Ge+" "+bt.tokens[0].tokens[0].text)):bt.tokens.unshift({type:"text",text:Ge}):Nt+=Ge),Nt+=this.parse(bt.tokens,Fe),Ot+=this.renderer.listitem(Nt,Zt,Kt);he+=this.renderer.list(Ot,ft,be);continue}case"html":{he+=this.renderer.html(At.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(At.tokens));continue}case"text":{for(Ot=At.tokens?this.parseInline(At.tokens):At.text;_e+1<lt&&ae[_e+1].type==="text";)At=ae[++_e],Ot+=`
`+(At.tokens?this.parseInline(At.tokens):At.text);he+=le?this.renderer.paragraph(Ot):Ot;continue}default:{var Lt='Token with "'+At.type+'" type was not found.';if(this.options.silent){console.error(Lt);return}else throw new Error(Lt)}}}return he},Te.parseInline=function(ae,le){le=le||this.renderer;var he="",_e,Se,ze=ae.length;for(_e=0;_e<ze;_e++){Se=ae[_e];switch(Se.type){case"escape":{he+=le.text(Se.text);break}case"html":{he+=le.html(Se.text);break}case"link":{he+=le.link(Se.href,Se.title,this.parseInline(Se.tokens,le));break}case"image":{he+=le.image(Se.href,Se.title,Se.text);break}case"strong":{he+=le.strong(this.parseInline(Se.tokens,le));break}case"em":{he+=le.em(this.parseInline(Se.tokens,le));break}case"codespan":{he+=le.codespan(Se.text);break}case"br":{he+=le.br();break}case"del":{he+=le.del(this.parseInline(Se.tokens,le));break}case"text":{he+=le.text(Se.text);break}default:{var xt='Token with "'+Se.type+'" type was not found.';if(this.options.silent){console.error(xt);return}else throw new Error(xt)}}}return he},Ne}(),kt=z.merge,qt=z.checkSanitizeDeprecation,Pe=z.escape,Ae=P.getDefaults,ut=P.changeDefaults,Et=P.defaults;function Ze(Ne,Te,Oe){if(typeof Ne=="undefined"||Ne===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ne!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ne)+", string expected");if(typeof Te=="function"&&(Oe=Te,Te=null),Te=kt({},Ze.defaults,Te||{}),qt(Te),Oe){var ae=Te.highlight,le;try{le=ke.lex(Ne,Te)}catch(ze){return Oe(ze)}var he=function(xt){var Qt;if(!xt)try{Qt=We.parse(le,Te)}catch(sn){xt=sn}return Te.highlight=ae,xt?Oe(xt):Oe(null,Qt)};if(!ae||ae.length<3)return he();if(delete Te.highlight,!le.length)return he();var _e=0;Ze.walkTokens(le,function(ze){ze.type==="code"&&(_e++,setTimeout(function(){ae(ze.text,ze.lang,function(xt,Qt){if(xt)return he(xt);Qt!=null&&Qt!==ze.text&&(ze.text=Qt,ze.escaped=!0),_e--,_e===0&&he()})},0))}),_e===0&&he();return}try{var Se=ke.lex(Ne,Te);return Te.walkTokens&&Ze.walkTokens(Se,Te.walkTokens),We.parse(Se,Te)}catch(ze){if(ze.message+=`
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+Pe(ze.message+"",!0)+"</pre>";throw ze}}Ze.options=Ze.setOptions=function(Ne){return kt(Ze.defaults,Ne),ut(Ze.defaults),Ze},Ze.getDefaults=Ae,Ze.defaults=Et,Ze.use=function(Ne){var Te=kt({},Ne);if(Ne.renderer&&function(){var ae=Ze.defaults.renderer||new we,le=function(Se){var ze=ae[Se];ae[Se]=function(){for(var xt=arguments.length,Qt=new Array(xt),sn=0;sn<xt;sn++)Qt[sn]=arguments[sn];var gt=Ne.renderer[Se].apply(ae,Qt);return gt===!1&&(gt=ze.apply(ae,Qt)),gt}};for(var he in Ne.renderer)le(he);Te.renderer=ae}(),Ne.tokenizer&&function(){var ae=Ze.defaults.tokenizer||new oe,le=function(Se){var ze=ae[Se];ae[Se]=function(){for(var xt=arguments.length,Qt=new Array(xt),sn=0;sn<xt;sn++)Qt[sn]=arguments[sn];var gt=Ne.tokenizer[Se].apply(ae,Qt);return gt===!1&&(gt=ze.apply(ae,Qt)),gt}};for(var he in Ne.tokenizer)le(he);Te.tokenizer=ae}(),Ne.walkTokens){var Oe=Ze.defaults.walkTokens;Te.walkTokens=function(ae){Ne.walkTokens(ae),Oe&&Oe(ae)}}Ze.setOptions(Te)},Ze.walkTokens=function(Ne,Te){for(var Oe=T(Ne),ae;!(ae=Oe()).done;){var le=ae.value;Te(le);switch(le.type){case"table":{for(var he=T(le.tokens.header),_e;!(_e=he()).done;){var Se=_e.value;Ze.walkTokens(Se,Te)}for(var ze=T(le.tokens.cells),xt;!(xt=ze()).done;)for(var Qt=xt.value,sn=T(Qt),gt;!(gt=sn()).done;){var zt=gt.value;Ze.walkTokens(zt,Te)}break}case"list":{Ze.walkTokens(le.items,Te);break}default:le.tokens&&Ze.walkTokens(le.tokens,Te)}}},Ze.Parser=We,Ze.parser=We.parse,Ze.Renderer=we,Ze.TextRenderer=$e,Ze.Lexer=ke,Ze.lexer=ke.lex,Ze.Tokenizer=oe,Ze.Slugger=ct,Ze.parse=Ze;var dt=Ze;return dt})},ELLl:function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){var B={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},I=Y.Pos;Y.defineOption("autoCloseBrackets",!1,function(i,d,s){s&&s!=Y.Init&&(i.removeKeyMap(T),i.state.closeBrackets=null),d&&(R(F(d,"pairs")),i.state.closeBrackets=d,i.addKeyMap(T))});function F(i,d){return d=="pairs"&&typeof i=="string"?i:typeof i=="object"&&i[d]!=null?i[d]:B[d]}var T={Backspace:t,Enter:b};function R(i){for(var d=0;d<i.length;d++){var s=i.charAt(d),n="'"+s+"'";T[n]||(T[n]=P(s))}}R(B.pairs+"`");function P(i){return function(d){return u(d,i)}}function m(i){var d=i.state.closeBrackets;if(!d||d.override)return d;var s=i.getModeAt(i.getCursor());return s.closeBrackets||d}function t(i){var d=m(i);if(!d||i.getOption("disableInput"))return Y.Pass;for(var s=F(d,"pairs"),n=i.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return Y.Pass;var c=f(i,n[l].head);if(!c||s.indexOf(c)%2!=0)return Y.Pass}for(var l=n.length-1;l>=0;l--){var x=n[l].head;i.replaceRange("",I(x.line,x.ch-1),I(x.line,x.ch+1),"+delete")}}function b(i){var d=m(i),s=d&&F(d,"explode");if(!s||i.getOption("disableInput"))return Y.Pass;for(var n=i.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return Y.Pass;var c=f(i,n[l].head);if(!c||s.indexOf(c)%2!=0)return Y.Pass}i.operation(function(){var x=i.lineSeparator()||`
`;i.replaceSelection(x+x,null),i.execCommand("goCharLeft"),n=i.listSelections();for(var A=0;A<n.length;A++){var C=n[A].head.line;i.indentLine(C,null,!0),i.indentLine(C+1,null,!0)}})}function o(i){var d=Y.cmpPos(i.anchor,i.head)>0;return{anchor:new I(i.anchor.line,i.anchor.ch+(d?-1:1)),head:new I(i.head.line,i.head.ch+(d?1:-1))}}function u(i,d){var s=m(i);if(!s||i.getOption("disableInput"))return Y.Pass;var n=F(s,"pairs"),l=n.indexOf(d);if(l==-1)return Y.Pass;for(var c=F(s,"closeBefore"),x=F(s,"triples"),A=n.charAt(l+1)==d,C=i.listSelections(),k=l%2==0,w,y=0;y<C.length;y++){var h=C[y],p=h.head,v,_=i.getRange(p,I(p.line,p.ch+1));if(k&&!h.empty())v="surround";else if((A||!k)&&_==d)A&&a(i,p)?v="both":x.indexOf(d)>=0&&i.getRange(p,I(p.line,p.ch+3))==d+d+d?v="skipThree":v="skip";else if(A&&p.ch>1&&x.indexOf(d)>=0&&i.getRange(I(p.line,p.ch-2),p)==d+d){if(p.ch>2&&/\bstring/.test(i.getTokenTypeAt(I(p.line,p.ch-2))))return Y.Pass;v="addFour"}else if(A){var E=p.ch==0?" ":i.getRange(I(p.line,p.ch-1),p);if(!Y.isWordChar(_)&&E!=d&&!Y.isWordChar(E))v="both";else return Y.Pass}else if(k&&(_.length===0||/\s/.test(_)||c.indexOf(_)>-1))v="both";else return Y.Pass;if(!w)w=v;else if(w!=v)return Y.Pass}var g=l%2?n.charAt(l-1):d,j=l%2?d:n.charAt(l+1);i.operation(function(){if(w=="skip")i.execCommand("goCharRight");else if(w=="skipThree")for(var U=0;U<3;U++)i.execCommand("goCharRight");else if(w=="surround"){for(var S=i.getSelections(),U=0;U<S.length;U++)S[U]=g+S[U]+j;i.replaceSelections(S,"around"),S=i.listSelections().slice();for(var U=0;U<S.length;U++)S[U]=o(S[U]);i.setSelections(S)}else w=="both"?(i.replaceSelection(g+j,null),i.triggerElectric(g+j),i.execCommand("goCharLeft")):w=="addFour"&&(i.replaceSelection(g+g+g+g,"before"),i.execCommand("goCharRight"))})}function f(i,d){var s=i.getRange(I(d.line,d.ch-1),I(d.line,d.ch+1));return s.length==2?s:null}function a(i,d){var s=i.getTokenAt(I(d.line,d.ch+1));return/\bstring/.test(s.type)&&s.start==d.ch&&(d.ch==0||!/\bstring/.test(i.getTokenTypeAt(d)))}})},FOrL:function(Be,J,L){Be.exports=L.p+"static/nodata.a6b3f948.png"},FWmy:function(Be,J,L){"use strict";L.d(J,"a",function(){return Y});function Y(B,I){if(!B)throw new Error(I?`Assertion failed (${I})`:"Assertion Failed")}},Fofx:function(Be,J){var L=typeof Float32Array=="undefined"?Array:Float32Array;function Y(){var b=new L(6);return B(b),b}function B(b){return b[0]=1,b[1]=0,b[2]=0,b[3]=1,b[4]=0,b[5]=0,b}function I(b,o){return b[0]=o[0],b[1]=o[1],b[2]=o[2],b[3]=o[3],b[4]=o[4],b[5]=o[5],b}function F(b,o,u){var f=o[0]*u[0]+o[2]*u[1],a=o[1]*u[0]+o[3]*u[1],i=o[0]*u[2]+o[2]*u[3],d=o[1]*u[2]+o[3]*u[3],s=o[0]*u[4]+o[2]*u[5]+o[4],n=o[1]*u[4]+o[3]*u[5]+o[5];return b[0]=f,b[1]=a,b[2]=i,b[3]=d,b[4]=s,b[5]=n,b}function T(b,o,u){return b[0]=o[0],b[1]=o[1],b[2]=o[2],b[3]=o[3],b[4]=o[4]+u[0],b[5]=o[5]+u[1],b}function R(b,o,u){var f=o[0],a=o[2],i=o[4],d=o[1],s=o[3],n=o[5],l=Math.sin(u),c=Math.cos(u);return b[0]=f*c+d*l,b[1]=-f*l+d*c,b[2]=a*c+s*l,b[3]=-a*l+c*s,b[4]=c*i+l*n,b[5]=c*n-l*i,b}function P(b,o,u){var f=u[0],a=u[1];return b[0]=o[0]*f,b[1]=o[1]*a,b[2]=o[2]*f,b[3]=o[3]*a,b[4]=o[4]*f,b[5]=o[5]*a,b}function m(b,o){var u=o[0],f=o[2],a=o[4],i=o[1],d=o[3],s=o[5],n=u*d-i*f;return n?(n=1/n,b[0]=d*n,b[1]=-i*n,b[2]=-f*n,b[3]=u*n,b[4]=(f*s-d*a)*n,b[5]=(i*a-u*s)*n,b):null}function t(b){var o=Y();return I(o,b),o}J.create=Y,J.identity=B,J.copy=I,J.mul=F,J.translate=T,J.rotate=R,J.scale=P,J.invert=m,J.clone=t},FxDU:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.createSensor=void 0;var Y=L("QO+J"),B=L("j5sG"),I=typeof ResizeObserver!="undefined"?B.createSensor:Y.createSensor;J.createSensor=I},Gev7:function(Be,J,L){var Y=L("bYtY"),B=L("K2GJ"),I=L("1bdT"),F=L("ni6a");function T(P){P=P||{},I.call(this,P);for(var m in P)P.hasOwnProperty(m)&&m!=="style"&&(this[m]=P[m]);this.style=new B(P.style,this),this._rect=null,this.__clipPaths=null}T.prototype={constructor:T,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(P){},afterBrush:function(P){},brush:function(P,m){},getBoundingRect:function(){},contain:function(P,m){return this.rectContain(P,m)},traverse:function(P,m){P.call(m,this)},rectContain:function(P,m){var t=this.transformCoordToLocal(P,m),b=this.getBoundingRect();return b.contain(t[0],t[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(P){return this.animate("style",P)},attrKV:function(P,m){P!=="style"?I.prototype.attrKV.call(this,P,m):this.style.set(m)},setStyle:function(P,m){return this.style.set(P,m),this.dirty(!1),this},useStyle:function(P){return this.style=new B(P,this),this.dirty(!1),this},calculateTextPosition:null},Y.inherits(T,I),Y.mixin(T,F);var R=T;Be.exports=R},Gytx:function(Be,J){Be.exports=function(Y,B,I,F){var T=I?I.call(F,Y,B):void 0;if(T!==void 0)return!!T;if(Y===B)return!0;if(typeof Y!="object"||!Y||typeof B!="object"||!B)return!1;var R=Object.keys(Y),P=Object.keys(B);if(R.length!==P.length)return!1;for(var m=Object.prototype.hasOwnProperty.bind(B),t=0;t<R.length;t++){var b=R[t];if(!m(b))return!1;var o=Y[b],u=B[b];if(T=I?I.call(F,o,u,b):void 0,T===!1||T===void 0&&o!==u)return!1}return!0}},H6uX:function(Be,J){var L=Array.prototype.slice,Y=function(T){this._$handlers={},this._$eventProcessor=T};Y.prototype={constructor:Y,one:function(T,R,P,m){return I(this,T,R,P,m,!0)},on:function(T,R,P,m){return I(this,T,R,P,m,!1)},isSilent:function(T){var R=this._$handlers;return!R[T]||!R[T].length},off:function(T,R){var P=this._$handlers;if(!T)return this._$handlers={},this;if(R){if(P[T]){for(var m=[],t=0,b=P[T].length;t<b;t++)P[T][t].h!==R&&m.push(P[T][t]);P[T]=m}P[T]&&P[T].length===0&&delete P[T]}else delete P[T];return this},trigger:function(T){var R=this._$handlers[T],P=this._$eventProcessor;if(R){var m=arguments,t=m.length;t>3&&(m=L.call(m,1));for(var b=R.length,o=0;o<b;){var u=R[o];if(P&&P.filter&&u.query!=null&&!P.filter(T,u.query)){o++;continue}switch(t){case 1:u.h.call(u.ctx);break;case 2:u.h.call(u.ctx,m[1]);break;case 3:u.h.call(u.ctx,m[1],m[2]);break;default:u.h.apply(u.ctx,m);break}u.one?(R.splice(o,1),b--):o++}}return P&&P.afterTrigger&&P.afterTrigger(T),this},triggerWithContext:function(T){var R=this._$handlers[T],P=this._$eventProcessor;if(R){var m=arguments,t=m.length;t>4&&(m=L.call(m,1,m.length-1));for(var b=m[m.length-1],o=R.length,u=0;u<o;){var f=R[u];if(P&&P.filter&&f.query!=null&&!P.filter(T,f.query)){u++;continue}switch(t){case 1:f.h.call(b);break;case 2:f.h.call(b,m[1]);break;case 3:f.h.call(b,m[1],m[2]);break;default:f.h.apply(b,m);break}f.one?(R.splice(u,1),o--):u++}}return P&&P.afterTrigger&&P.afterTrigger(T),this}};function B(T,R){var P=T._$eventProcessor;return R!=null&&P&&P.normalizeQuery&&(R=P.normalizeQuery(R)),R}function I(T,R,P,m,t,b){var o=T._$handlers;if(typeof P=="function"&&(t=m,m=P,P=null),!m||!R)return T;P=B(T,P),o[R]||(o[R]=[]);for(var u=0;u<o[R].length;u++)if(o[R][u].h===m)return T;var f={h:m,one:b,query:P,ctx:t||T,callAtLast:m.zrEventfulCallAtLast},a=o[R].length-1,i=o[R][a];return i&&i.callAtLast?o[R].splice(a,0,f):o[R].push(f),T}var F=Y;Be.exports=F},HmJG:function(Be,J,L){},I8Z2:function(Be,J,L){"use strict";L.d(J,"a",function(){return F}),L.d(J,"b",function(){return f}),L.d(J,"c",function(){return i});var Y=L("q1tI"),B=function(){var d=function(s,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var x in c)c.hasOwnProperty(x)&&(l[x]=c[x])},d(s,n)};return function(s,n){d(s,n);function l(){this.constructor=s}s.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}}(),I=Y.createContext(null),F=function(d){B(s,d);function s(){return d!==null&&d.apply(this,arguments)||this}return s.prototype.render=function(){return Y.createElement(I.Provider,{value:this.props.store},this.props.children)},s}(Y.Component),T=L("Gytx"),R=L.n(T),P=L("2mql"),m=L.n(P),t=function(){var d=function(s,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var x in c)c.hasOwnProperty(x)&&(l[x]=c[x])},d(s,n)};return function(s,n){d(s,n);function l(){this.constructor=s}s.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}}(),b=function(){return b=Object.assign||function(d){for(var s,n=1,l=arguments.length;n<l;n++){s=arguments[n];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(d[c]=s[c])}return d},b.apply(this,arguments)};function o(d){return d.displayName||d.name||"Component"}var u=function(){return{}};function f(d,s){s===void 0&&(s={});var n=!!d,l=d||u;return function(x){var A=function(k){t(w,k);function w(y,h){var p=k.call(this,y,h)||this;return p.unsubscribe=null,p.handleChange=function(){if(!p.unsubscribe)return;var v=l(p.store.getState(),p.props);p.setState({subscribed:v})},p.store=p.context,p.state={subscribed:l(p.store.getState(),y),store:p.store,props:y},p}return w.getDerivedStateFromProps=function(y,h){return d&&d.length===2&&y!==h.props?{subscribed:l(h.store.getState(),y),props:y}:{props:y}},w.prototype.componentDidMount=function(){this.trySubscribe()},w.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},w.prototype.shouldComponentUpdate=function(y,h){return!R()(this.props,y)||!R()(this.state.subscribed,h.subscribed)},w.prototype.trySubscribe=function(){n&&(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 y=b(b(b({},this.props),this.state.subscribed),{store:this.store});return Y.createElement(x,b({},y,{ref:this.props.miniStoreForwardedRef}))},w.displayName="Connect("+o(x)+")",w.contextType=I,w}(Y.Component);if(s.forwardRef){var C=Y.forwardRef(function(k,w){return Y.createElement(A,b({},k,{miniStoreForwardedRef:w}))});return m()(C,x)}return m()(A,x)}}var a=function(){return a=Object.assign||function(d){for(var s,n=1,l=arguments.length;n<l;n++){s=arguments[n];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(d[c]=s[c])}return d},a.apply(this,arguments)};function i(d){var s=d,n=[];function l(A){s=a(a({},s),A);for(var C=0;C<n.length;C++)n[C]()}function c(){return s}function x(A){return n.push(A),function(){var k=n.indexOf(A);n.splice(k,1)}}return{setState:l,getState:c,subscribe:x}}},IBYe:function(Be,J,L){"use strict";function Y(B){return null}J.a=Y},IMiH:function(Be,J,L){var Y=L("Sj9i"),B=L("QBsz"),I=L("4mN7"),F=L("mFDi"),T=L("LPTA"),R=T.devicePixelRatio,P={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},m=[],t=[],b=[],o=[],u=Math.min,f=Math.max,a=Math.cos,i=Math.sin,d=Math.sqrt,s=Math.abs,n=typeof Float32Array!="undefined",l=function(x){this._saveData=!(x||!1),this._saveData&&(this.data=[]),this._ctx=null};l.prototype={constructor:l,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(x,A,C){C=C||0,this._ux=s(C/R/x)||0,this._uy=s(C/R/A)||0},getContext:function(){return this._ctx},beginPath:function(x){return this._ctx=x,x&&x.beginPath(),x&&(this.dpr=x.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(x,A){return this.addData(P.M,x,A),this._ctx&&this._ctx.moveTo(x,A),this._x0=x,this._y0=A,this._xi=x,this._yi=A,this},lineTo:function(x,A){var C=s(x-this._xi)>this._ux||s(A-this._yi)>this._uy||this._len<5;return this.addData(P.L,x,A),this._ctx&&C&&(this._needsDash()?this._dashedLineTo(x,A):this._ctx.lineTo(x,A)),C&&(this._xi=x,this._yi=A),this},bezierCurveTo:function(x,A,C,k,w,y){return this.addData(P.C,x,A,C,k,w,y),this._ctx&&(this._needsDash()?this._dashedBezierTo(x,A,C,k,w,y):this._ctx.bezierCurveTo(x,A,C,k,w,y)),this._xi=w,this._yi=y,this},quadraticCurveTo:function(x,A,C,k){return this.addData(P.Q,x,A,C,k),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(x,A,C,k):this._ctx.quadraticCurveTo(x,A,C,k)),this._xi=C,this._yi=k,this},arc:function(x,A,C,k,w,y){return this.addData(P.A,x,A,C,C,k,w-k,0,y?0:1),this._ctx&&this._ctx.arc(x,A,C,k,w,y),this._xi=a(w)*C+x,this._yi=i(w)*C+A,this},arcTo:function(x,A,C,k,w){return this._ctx&&this._ctx.arcTo(x,A,C,k,w),this},rect:function(x,A,C,k){return this._ctx&&this._ctx.rect(x,A,C,k),this.addData(P.R,x,A,C,k),this},closePath:function(){this.addData(P.Z);var x=this._ctx,A=this._x0,C=this._y0;return x&&(this._needsDash()&&this._dashedLineTo(A,C),x.closePath()),this._xi=A,this._yi=C,this},fill:function(x){x&&x.fill(),this.toStatic()},stroke:function(x){x&&x.stroke(),this.toStatic()},setLineDash:function(x){if(x instanceof Array){this._lineDash=x,this._dashIdx=0;for(var A=0,C=0;C<x.length;C++)A+=x[C];this._dashSum=A}return this},setLineDashOffset:function(x){return this._dashOffset=x,this},len:function(){return this._len},setData:function(x){var A=x.length;!(this.data&&this.data.length===A)&&n&&(this.data=new Float32Array(A));for(var C=0;C<A;C++)this.data[C]=x[C];this._len=A},appendPath:function(x){x instanceof Array||(x=[x]);for(var A=x.length,C=0,k=this._len,w=0;w<A;w++)C+=x[w].len();n&&this.data instanceof Float32Array&&(this.data=new Float32Array(k+C));for(var w=0;w<A;w++)for(var y=x[w].data,h=0;h<y.length;h++)this.data[k++]=y[h];this._len=k},addData:function(x){if(!this._saveData)return;var A=this.data;this._len+arguments.length>A.length&&(this._expandData(),A=this.data);for(var C=0;C<arguments.length;C++)A[this._len++]=arguments[C];this._prevCmd=x},_expandData:function(){if(!(this.data instanceof Array)){for(var x=[],A=0;A<this._len;A++)x[A]=this.data[A];this.data=x}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(x,A){var C=this._dashSum,k=this._dashOffset,w=this._lineDash,y=this._ctx,h=this._xi,p=this._yi,v=x-h,_=A-p,E=d(v*v+_*_),g=h,j=p,U,S=w.length,z;for(v/=E,_/=E,k<0&&(k=C+k),k%=C,g-=k*v,j-=k*_;v>0&&g<=x||v<0&&g>=x||v===0&&(_>0&&j<=A||_<0&&j>=A);){if(z=this._dashIdx,U=w[z],g+=v*U,j+=_*U,this._dashIdx=(z+1)%S,v>0&&g<h||v<0&&g>h||_>0&&j<p||_<0&&j>p)continue;y[z%2?"moveTo":"lineTo"](v>=0?u(g,x):f(g,x),_>=0?u(j,A):f(j,A))}v=g-x,_=j-A,this._dashOffset=-d(v*v+_*_)},_dashedBezierTo:function(x,A,C,k,w,y){var h=this._dashSum,p=this._dashOffset,v=this._lineDash,_=this._ctx,E=this._xi,g=this._yi,j,U,S,z=Y.cubicAt,H=0,M=this._dashIdx,V=v.length,K,$,Z=0;for(p<0&&(p=h+p),p%=h,j=0;j<1;j+=.1)U=z(E,x,C,w,j+.1)-z(E,x,C,w,j),S=z(g,A,k,y,j+.1)-z(g,A,k,y,j),H+=d(U*U+S*S);for(;M<V&&!(Z+=v[M],Z>p);M++);for(j=(Z-p)/H;j<=1;)K=z(E,x,C,w,j),$=z(g,A,k,y,j),M%2?_.moveTo(K,$):_.lineTo(K,$),j+=v[M]/H,M=(M+1)%V;M%2!==0&&_.lineTo(w,y),U=w-K,S=y-$,this._dashOffset=-d(U*U+S*S)},_dashedQuadraticTo:function(x,A,C,k){var w=C,y=k;C=(C+2*x)/3,k=(k+2*A)/3,x=(this._xi+2*x)/3,A=(this._yi+2*A)/3,this._dashedBezierTo(x,A,C,k,w,y)},toStatic:function(){var x=this.data;x instanceof Array&&(x.length=this._len,n&&(this.data=new Float32Array(x)))},getBoundingRect:function(){m[0]=m[1]=b[0]=b[1]=Number.MAX_VALUE,t[0]=t[1]=o[0]=o[1]=-Number.MAX_VALUE;for(var x=this.data,A=0,C=0,k=0,w=0,y=0;y<x.length;){var h=x[y++];y===1&&(A=x[y],C=x[y+1],k=A,w=C);switch(h){case P.M:k=x[y++],w=x[y++],A=k,C=w,b[0]=k,b[1]=w,o[0]=k,o[1]=w;break;case P.L:I.fromLine(A,C,x[y],x[y+1],b,o),A=x[y++],C=x[y++];break;case P.C:I.fromCubic(A,C,x[y++],x[y++],x[y++],x[y++],x[y],x[y+1],b,o),A=x[y++],C=x[y++];break;case P.Q:I.fromQuadratic(A,C,x[y++],x[y++],x[y],x[y+1],b,o),A=x[y++],C=x[y++];break;case P.A:var p=x[y++],v=x[y++],_=x[y++],E=x[y++],g=x[y++],j=x[y++]+g;y+=1;var U=1-x[y++];y===1&&(k=a(g)*_+p,w=i(g)*E+v),I.fromArc(p,v,_,E,g,j,U,b,o),A=a(j)*_+p,C=i(j)*E+v;break;case P.R:k=A=x[y++],w=C=x[y++];var S=x[y++],z=x[y++];I.fromLine(k,w,k+S,w+z,b,o);break;case P.Z:A=k,C=w;break}B.min(m,m,b),B.max(t,t,o)}return y===0&&(m[0]=m[1]=t[0]=t[1]=0),new F(m[0],m[1],t[0]-m[0],t[1]-m[1])},rebuildPath:function(x){for(var A=this.data,C,k,w,y,h,p,v=this._ux,_=this._uy,E=this._len,g=0;g<E;){var j=A[g++];g===1&&(w=A[g],y=A[g+1],C=w,k=y);switch(j){case P.M:C=w=A[g++],k=y=A[g++],x.moveTo(w,y);break;case P.L:h=A[g++],p=A[g++],(s(h-w)>v||s(p-y)>_||g===E-1)&&(x.lineTo(h,p),w=h,y=p);break;case P.C:x.bezierCurveTo(A[g++],A[g++],A[g++],A[g++],A[g++],A[g++]),w=A[g-2],y=A[g-1];break;case P.Q:x.quadraticCurveTo(A[g++],A[g++],A[g++],A[g++]),w=A[g-2],y=A[g-1];break;case P.A:var U=A[g++],S=A[g++],z=A[g++],H=A[g++],M=A[g++],V=A[g++],K=A[g++],$=A[g++],Z=z>H?z:H,me=z>H?1:z/H,oe=z>H?H/z:1,fe=Math.abs(z-H)>.001,ye=M+V;fe?(x.translate(U,S),x.rotate(K),x.scale(me,oe),x.arc(0,0,Z,M,ye,1-$),x.scale(1/me,1/oe),x.rotate(-K),x.translate(-U,-S)):x.arc(U,S,Z,M,ye,1-$),g===1&&(C=a(M)*z+U,k=i(M)*H+S),w=a(ye)*z+U,y=i(ye)*H+S;break;case P.R:C=w=A[g],k=y=A[g+1],x.rect(A[g++],A[g++],A[g++],A[g++]);break;case P.Z:x.closePath(),w=C,y=k}}}},l.CMD=P;var c=l;Be.exports=c},ItGF:function(Be,J){var L={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?L={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?L={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?L={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:L=B(navigator.userAgent);var Y=L;function B(I){var F={},T={},R=I.match(/Firefox\/([\d.]+)/),P=I.match(/MSIE\s([\d.]+)/)||I.match(/Trident\/.+?rv:(([\d.]+))/),m=I.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(I);return R&&(T.firefox=!0,T.version=R[1]),P&&(T.ie=!0,T.version=P[1]),m&&(T.edge=!0,T.version=m[1]),t&&(T.weChat=!0),{browser:T,os:F,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!T.ie&&!T.edge,pointerEventsSupported:"onpointerdown"in window&&(T.edge||T.ie&&T.version>=11),domSupported:typeof document!="undefined"}}Be.exports=Y},JYp7:function(Be,J,L){"use strict";L.d(J,"a",function(){return Y});var Y;(function(B){function I(c){return c&&typeof c=="object"&&typeof c[Symbol.iterator]=="function"}B.is=I;const F=Object.freeze([]);function T(){return F}B.empty=T;function*R(c){yield c}B.single=R;function P(c){return c||F}B.from=P;function m(c){return!c||c[Symbol.iterator]().next().done===!0}B.isEmpty=m;function t(c){return c[Symbol.iterator]().next().value}B.first=t;function b(c,x){for(const A of c)if(x(A))return!0;return!1}B.some=b;function o(c,x){for(const A of c)if(x(A))return A;return}B.find=o;function*u(c,x){for(const A of c)x(A)&&(yield A)}B.filter=u;function*f(c,x){let A=0;for(const C of c)yield x(C,A++)}B.map=f;function*a(...c){for(const x of c)for(const A of x)yield A}B.concat=a;function*i(c){for(const x of c)for(const A of x)yield A}B.concatNested=i;function d(c,x,A){let C=A;for(const k of c)C=x(C,k);return C}B.reduce=d;function*s(c,x,A=c.length){for(x<0&&(x+=c.length),A<0?A+=c.length:A>c.length&&(A=c.length);x<A;x++)yield c[x]}B.slice=s;function n(c,x=Number.POSITIVE_INFINITY){const A=[];if(x===0)return[A,c];const C=c[Symbol.iterator]();for(let k=0;k<x;k++){const w=C.next();if(w.done)return[A,B.empty()];A.push(w.value)}return[A,{[Symbol.iterator](){return C}}]}B.consume=n;function l(c,x,A=(C,k)=>C===k){const C=c[Symbol.iterator](),k=x[Symbol.iterator]();for(;;){const w=C.next(),y=k.next();if(w.done!==y.done)return!1;if(w.done)return!0;if(!A(w.value,y.value))return!1}}B.equals=l})(Y||(Y={}))},K2GJ:function(Be,J,L){var Y=L("fW2E"),B=L("gut8"),I=B.ContextCachedBy,F=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],T=function(u){this.extendFrom(u,!1)};function R(u,f,a){var i=f.x==null?0:f.x,d=f.x2==null?1:f.x2,s=f.y==null?0:f.y,n=f.y2==null?0:f.y2;f.global||(i=i*a.width+a.x,d=d*a.width+a.x,s=s*a.height+a.y,n=n*a.height+a.y),i=isNaN(i)?0:i,d=isNaN(d)?1:d,s=isNaN(s)?0:s,n=isNaN(n)?0:n;var l=u.createLinearGradient(i,s,d,n);return l}function P(u,f,a){var i=a.width,d=a.height,s=Math.min(i,d),n=f.x==null?.5:f.x,l=f.y==null?.5:f.y,c=f.r==null?.5:f.r;f.global||(n=n*i+a.x,l=l*d+a.y,c=c*s);var x=u.createRadialGradient(n,l,0,n,l,c);return x}T.prototype={constructor:T,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(u,f,a){var i=this,d=a&&a.style,s=!d||u.__attrCachedBy!==I.STYLE_BIND;u.__attrCachedBy=I.STYLE_BIND;for(var n=0;n<F.length;n++){var l=F[n],c=l[0];(s||i[c]!==d[c])&&(u[c]=Y(u,c,i[c]||l[1]))}if((s||i.fill!==d.fill)&&(u.fillStyle=i.fill),(s||i.stroke!==d.stroke)&&(u.strokeStyle=i.stroke),(s||i.opacity!==d.opacity)&&(u.globalAlpha=i.opacity==null?1:i.opacity),(s||i.blend!==d.blend)&&(u.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var x=i.lineWidth;u.lineWidth=x/(this.strokeNoScale&&f&&f.getLineScale?f.getLineScale():1)}},hasFill:function(){var u=this.fill;return u!=null&&u!=="none"},hasStroke:function(){var u=this.stroke;return u!=null&&u!=="none"&&this.lineWidth>0},extendFrom:function(u,f){if(u)for(var a in u)u.hasOwnProperty(a)&&(f===!0||(f===!1?!this.hasOwnProperty(a):u[a]!=null))&&(this[a]=u[a])},set:function(u,f){typeof u=="string"?this[u]=f:this.extendFrom(u,!0)},clone:function(){var u=new this.constructor;return u.extendFrom(this,!0),u},getGradient:function(u,f,a){for(var i=f.type==="radial"?P:R,d=i(u,f,a),s=f.colorStops,n=0;n<s.length;n++)d.addColorStop(s[n].offset,s[n].color);return d}};for(var m=T.prototype,t=0;t<F.length;t++){var b=F[t];b[0]in m||(m[b[0]]=b[1])}T.getGradient=m.getGradient;var o=T;Be.exports=o},LPTA:function(Be,J){var L=1;typeof window!="undefined"&&(L=Math.max(window.devicePixelRatio||1,1));var Y=0,B=L;J.debugMode=Y,J.devicePixelRatio=B},LSTS:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var Y=function(){function u(f,a){for(var i=0;i<a.length;i++){var d=a[i];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(f,d.key,d)}}return function(f,a,i){return a&&u(f.prototype,a),i&&u(f,i),f}}(),B=L("q1tI"),I=R(B),F=L("17x9"),T=R(F);function R(u){return u&&u.__esModule?u:{default:u}}function P(u,f){var a={};for(var i in u){if(f.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(u,i))continue;a[i]=u[i]}return a}function m(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}function t(u,f){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:u}function b(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(u,f):u.__proto__=f)}var o=function(u){b(f,u);function f(a){m(this,f);var i=t(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,a));return i.scrollListener=i.scrollListener.bind(i),i.eventListenerOptions=i.eventListenerOptions.bind(i),i.mousewheelListener=i.mousewheelListener.bind(i),i}return Y(f,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var i=this.getParentElement(this.scrollComponent);i.scrollTop=i.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var i=!1,d={get passive(){i=!0}};try{document.addEventListener("test",null,d),document.removeEventListener("test",null,d)}catch(s){}return i}},{key:"eventListenerOptions",value:function(){var i=this.props.useCapture;return this.isPassiveSupported()&&(i={useCapture:this.props.useCapture,passive:!0}),i}},{key:"setDefaultLoader",value:function(i){this.defaultLoader=i}},{key:"detachMousewheelListener",value:function(){var i=window;this.props.useWindow===!1&&(i=this.scrollComponent.parentNode),i.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var i=window;this.props.useWindow===!1&&(i=this.getParentElement(this.scrollComponent)),i.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),i.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(i){var d=this.props.getScrollParent&&this.props.getScrollParent();return d!=null?d:i&&i.parentNode}},{key:"filterProps",value:function(i){return i}},{key:"attachScrollListener",value:function(){var i=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!i)return;var d=window;this.props.useWindow===!1&&(d=i),d.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),d.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),d.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}},{key:"mousewheelListener",value:function(i){i.deltaY===1&&!this.isPassiveSupported()&&i.preventDefault()}},{key:"scrollListener",value:function(){var i=this.scrollComponent,d=window,s=this.getParentElement(i),n=void 0;if(this.props.useWindow){var l=document.documentElement||document.body.parentNode||document.body,c=d.pageYOffset!==void 0?d.pageYOffset:l.scrollTop;this.props.isReverse?n=c:n=this.calculateOffset(i,c)}else this.props.isReverse?n=s.scrollTop:n=i.scrollHeight-s.scrollTop-s.clientHeight;n<Number(this.props.threshold)&&i&&i.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=s.scrollHeight,this.beforeScrollTop=s.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(i,d){return i?this.calculateTopPosition(i)+(i.offsetHeight-d-window.innerHeight):0}},{key:"calculateTopPosition",value:function(i){return i?i.offsetTop+this.calculateTopPosition(i.offsetParent):0}},{key:"render",value:function(){var i=this,d=this.filterProps(this.props),s=d.children,n=d.element,l=d.hasMore,c=d.initialLoad,x=d.isReverse,A=d.loader,C=d.loadMore,k=d.pageStart,w=d.ref,y=d.threshold,h=d.useCapture,p=d.useWindow,v=d.getScrollParent,_=P(d,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);_.ref=function(g){i.scrollComponent=g,w&&w(g)};var E=[s];return l&&(A?x?E.unshift(A):E.push(A):this.defaultLoader&&(x?E.unshift(this.defaultLoader):E.push(this.defaultLoader))),I.default.createElement(n,_,E)}}]),f}(B.Component);o.propTypes={children:T.default.node.isRequired,element:T.default.node,hasMore:T.default.bool,initialLoad:T.default.bool,isReverse:T.default.bool,loader:T.default.node,loadMore:T.default.func.isRequired,pageStart:T.default.number,ref:T.default.func,getScrollParent:T.default.func,threshold:T.default.number,useCapture:T.default.bool,useWindow:T.default.bool},o.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},J.default=o,Be.exports=J.default},LdHM:function(Be,J,L){"use strict";L.d(J,"b",function(){return c}),L.d(J,"a",function(){return A});var Y=L("1OyB"),B=L("vuIU"),I=L("Ji7U"),F=L("LK+K"),T=L("q1tI"),R=L("rePB"),P=L("Ff2n"),m=L("ODXe"),t=L("4IlW"),b=L("bX4T"),o=L("YrtM"),u=L("TSYQ"),f=L.n(u),a=L("+nKL"),i=L("8OUc"),d=function(V,K){var $=V.prefixCls,Z=V.id,me=V.flattenOptions,oe=V.childrenAsData,fe=V.values,ye=V.searchValue,Ie=V.multiple,ve=V.defaultActiveFirstOption,de=V.height,Je=V.itemHeight,Rt=V.notFoundContent,Ee=V.open,Me=V.menuItemSelectedIcon,rt=V.virtual,He=V.onSelect,ke=V.onToggleOpen,ht=V.onActiveValue,ie=V.onScroll,xe=V.onMouseEnter,we="".concat($,"-item"),$e=Object(o.a)(function(){return me},[Ee,me],function(dt,Ne){return Ne[0]&&dt[1]!==Ne[1]}),ct=T.useRef(null),yt=function(Ne){Ne.preventDefault()},Ut=function(Ne){ct.current&&ct.current.scrollTo({index:Ne})},We=function(Ne){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=$e.length,ae=0;ae<Oe;ae+=1){var le=(Ne+ae*Te+Oe)%Oe,he=$e[le],_e=he.group,Se=he.data;if(!_e&&!Se.disabled)return le}return-1},kt=T.useState(function(){return We(0)}),qt=Object(m.a)(kt,2),Pe=qt[0],Ae=qt[1],ut=function(Ne){Ae(Ne);var Te=$e[Ne];if(!Te){ht(null,-1);return}ht(Te.data.value,Ne)};T.useEffect(function(){ut(ve!==!1?We(0):-1)},[$e.length,ye]),T.useEffect(function(){var dt=setTimeout(function(){if(!Ie&&Ee&&fe.size===1){var Ne=Array.from(fe)[0],Te=$e.findIndex(function(Oe){var ae=Oe.data;return ae.value===Ne});ut(Te),Ut(Te)}});return function(){return clearTimeout(dt)}},[Ee]);var Et=function(Ne){Ne!==void 0&&He(Ne,{selected:!fe.has(Ne)}),Ie||ke(!1)};if(T.useImperativeHandle(K,function(){return{onKeyDown:function(Ne){var Te=Ne.which;switch(Te){case t.a.UP:case t.a.DOWN:{var Oe=0;if(Te===t.a.UP?Oe=-1:Te===t.a.DOWN&&(Oe=1),Oe!==0){var ae=We(Pe+Oe,Oe);Ut(ae),ut(ae)}break}case t.a.ENTER:{var le=$e[Pe];le&&!le.data.disabled?Et(le.data.value):Et(void 0),Ee&&Ne.preventDefault();break}case t.a.ESC:ke(!1)}},onKeyUp:function(){},scrollTo:function(Ne){Ut(Ne)}}}),$e.length===0)return T.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),className:"".concat(we,"-empty"),onMouseDown:yt},Rt);function Ze(dt){var Ne=$e[dt];if(!Ne)return null;var Te=Ne.data||{},Oe=Te.value,ae=Te.label,le=Te.children,he=Object(b.a)(Te,!0),_e=oe?le:ae;return Ne?T.createElement("div",Object.assign({"aria-label":typeof _e=="string"?_e:null},he,{key:dt,role:"option",id:"".concat(Z,"_list_").concat(dt),"aria-selected":fe.has(Oe)}),Oe):null}return T.createElement(T.Fragment,null,T.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(Pe-1),Ze(Pe),Ze(Pe+1)),T.createElement(a.a,{itemKey:"key",ref:ct,data:$e,height:de,itemHeight:Je,fullHeight:!1,onMouseDown:yt,onScroll:ie,virtual:rt,onMouseEnter:xe},function(dt,Ne){var Te,Oe=dt.group,ae=dt.groupOption,le=dt.data,he=le.label,_e=le.key;if(Oe)return T.createElement("div",{className:f()(we,"".concat(we,"-group"))},he!==void 0?he:_e);var Se=le.disabled,ze=le.value,xt=le.title,Qt=le.children,sn=le.style,gt=le.className,zt=Object(P.a)(le,["disabled","value","title","children","style","className"]),Ot=fe.has(ze),At="".concat(we,"-option"),ft=f()(we,At,gt,(Te={},Object(R.a)(Te,"".concat(At,"-grouped"),ae),Object(R.a)(Te,"".concat(At,"-active"),Pe===Ne&&!Se),Object(R.a)(Te,"".concat(At,"-disabled"),Se),Object(R.a)(Te,"".concat(At,"-selected"),Ot),Te)),be=oe?Qt:he,Fe=!Me||typeof Me=="function"||Ot;return T.createElement("div",Object.assign({},zt,{"aria-selected":Ot,className:ft,title:xt,onMouseMove:function(){if(Pe===Ne||Se)return;ut(Ne)},onClick:function(){Se||Et(ze)},style:sn}),T.createElement("div",{className:"".concat(At,"-content")},be||ze),T.isValidElement(Me)||Ot,Fe&&T.createElement(i.a,{className:"".concat(we,"-option-state"),customizeIcon:Me,customizeIconProps:{isSelected:Ot}},Ot?"\u2713":null))}))},s=T.forwardRef(d);s.displayName="OptionList";var n=s,l=function(){return null};l.isSelectOption=!0;var c=l,x=function(){return null};x.isSelectOptGroup=!0;var A=x,C=L("VTBJ"),k=L("Zm9Q");function w(M){var V=M.key,K=M.props,$=K.children,Z=K.value,me=Object(P.a)(K,["children","value"]);return Object(C.a)({key:V,value:Z!==void 0?Z:V,children:$},me)}function y(M){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(M).map(function(K,$){if(!T.isValidElement(K)||!K.type)return null;var Z=K.type.isSelectOptGroup,me=K.key,oe=K.props,fe=oe.children,ye=Object(P.a)(oe,["children"]);return V||!Z?w(K):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(me===null?$:me,"__"),label:me},ye),{},{options:y(fe)})}).filter(function(K){return K})}var h=L("2Qr1"),p=L("qNPg"),v=L("U8pU"),_=L("Kwbf"),E=L("WKfj");function g(M){var V=M.mode,K=M.options,$=M.children,Z=M.backfill,me=M.allowClear,oe=M.placeholder,fe=M.getInputElement,ye=M.showSearch,Ie=M.onSearch,ve=M.defaultOpen,de=M.autoFocus,Je=M.labelInValue,Rt=M.value,Ee=M.inputValue,Me=M.optionLabelProp,rt=V==="multiple"||V==="tags",He=ye!==void 0?ye:rt||V==="combobox",ke=K||y($);if(Object(_.a)(V!=="tags"||ke.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var ht=ke.some(function(we){return we.options?we.options.some(function($e){return typeof("value"in $e?$e.value:$e.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(_.a)(!ht,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(_.a)(V!=="combobox"||!Me,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(_.a)(V==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(_.a)(V==="combobox"||!fe,"`getInputElement` only work with `combobox` mode."),Object(_.b)(V!=="combobox"||!fe||!me||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ie&&!He&&V!=="combobox"&&V!=="tags"&&Object(_.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(_.b)(!ve||de,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Rt!=null){var ie=Object(E.d)(Rt);Object(_.a)(!Je||ie.every(function(we){return Object(v.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(_.a)(!rt||Array.isArray(Rt),"`value` should be array when `mode` is `multiple` or `tags`")}if($){var xe=null;Object(k.a)($).some(function(we){if(!T.isValidElement(we)||!we.type)return!1;var $e=we.type;if($e.isSelectOption)return!1;if($e.isSelectOptGroup){var ct=Object(k.a)(we.props.children).every(function(yt){return!T.isValidElement(yt)||!we.type||yt.type.isSelectOption?!0:(xe=yt.type,!1)});return!ct}return xe=$e,!0}),xe&&Object(_.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(_.a)(Ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var j=g,U=Object(p.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:y,flattenOptions:h.d,getLabeledValue:h.e,filterOptions:h.b,isValueDisabled:h.g,findValueOption:h.c,warningProps:j,fillOptionsWithMissingValue:h.a}),S=function(M){Object(I.a)(K,M);var V=Object(F.a)(K);function K(){var $;return Object(Y.a)(this,K),$=V.apply(this,arguments),$.selectRef=T.createRef(),$.focus=function(){$.selectRef.current.focus()},$.blur=function(){$.selectRef.current.blur()},$}return Object(B.a)(K,[{key:"render",value:function(){return T.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),K}(T.Component);S.Option=c,S.OptGroup=A;var z=S,H=J.c=z},M8RZ:function(Be,J,L){"use strict";L.d(J,"a",function(){return t});var Y=L("fWQN"),B=L("mtLc"),I=L("yKVA"),F=L("879j"),T=L("q1tI"),R=L.n(T),P=L("i8i4"),m=L.n(P),t=function(b){Object(I.a)(u,b);var o=Object(F.a)(u);function u(f){var a;Object(Y.a)(this,u),a=o.call(this,f);var i=window.document;return a.node=i.createElement("div"),i.body.appendChild(a.node),a}return Object(B.a)(u,[{key:"render",value:function(){var a=this.props.children;return Object(P.createPortal)(a,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),u}(R.a.Component)},MEGo:function(Be,J,L){var Y=L("4fz+"),B=L("Dagg"),I=L("dqUG"),F=L("2fw6"),T=L("x6Kt"),R=L("rmlV"),P=L("yxFR"),m=L("y+Vt"),t=L("h7HQ"),b=L("1Jh7"),o=L("SKnc"),u=L("K2GJ"),f=L("Fofx"),a=L("NC18"),i=a.createFromString,d=L("bYtY"),s=d.isString,n=d.extend,l=d.defaults,c=d.trim,x=d.each,A=/[\s,]+/;function C(K){if(s(K)){var $=new DOMParser;K=$.parseFromString(K,"text/xml")}for(K.nodeType===9&&(K=K.firstChild);K.nodeName.toLowerCase()!=="svg"||K.nodeType!==1;)K=K.nextSibling;return K}function k(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}k.prototype.parse=function(K,$){$=$||{};var Z=C(K);if(!Z)throw new Error("Illegal svg");var me=new Y;this._root=me;var oe=Z.getAttribute("viewBox")||"",fe=parseFloat(Z.getAttribute("width")||$.width),ye=parseFloat(Z.getAttribute("height")||$.height);isNaN(fe)&&(fe=null),isNaN(ye)&&(ye=null),E(Z,me,null,!0);for(var Ie=Z.firstChild;Ie;)this._parseNode(Ie,me),Ie=Ie.nextSibling;var ve,de;if(oe){var Je=c(oe).split(A);Je.length>=4&&(ve={x:parseFloat(Je[0]||0),y:parseFloat(Je[1]||0),width:parseFloat(Je[2]),height:parseFloat(Je[3])})}if(ve&&fe!=null&&ye!=null&&(de=M(ve,fe,ye),!$.ignoreViewBox)){var Rt=me;me=new Y,me.add(Rt),Rt.scale=de.scale.slice(),Rt.position=de.position.slice()}return!$.ignoreRootClip&&fe!=null&&ye!=null&&me.setClipPath(new T({shape:{x:0,y:0,width:fe,height:ye}})),{root:me,width:fe,height:ye,viewBoxRect:ve,viewBoxTransform:de}},k.prototype._parseNode=function(K,$){var Z=K.nodeName.toLowerCase();Z==="defs"?this._isDefine=!0:Z==="text"&&(this._isText=!0);var me;if(this._isDefine){var oe=y[Z];if(oe){var fe=oe.call(this,K),ye=K.getAttribute("id");ye&&(this._defs[ye]=fe)}}else{var oe=w[Z];oe&&(me=oe.call(this,K,$),$.add(me))}for(var Ie=K.firstChild;Ie;)Ie.nodeType===1&&this._parseNode(Ie,me),Ie.nodeType===3&&this._isText&&this._parseText(Ie,me),Ie=Ie.nextSibling;Z==="defs"?this._isDefine=!1:Z==="text"&&(this._isText=!1)},k.prototype._parseText=function(K,$){if(K.nodeType===1){var Z=K.getAttribute("dx")||0,me=K.getAttribute("dy")||0;this._textX+=parseFloat(Z),this._textY+=parseFloat(me)}var oe=new I({style:{text:K.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});p($,oe),E(K,oe,this._defs);var fe=oe.style.fontSize;fe&&fe<9&&(oe.style.fontSize=9,oe.scale=oe.scale||[1,1],oe.scale[0]*=fe/9,oe.scale[1]*=fe/9);var ye=oe.getBoundingRect();return this._textX+=ye.width,$.add(oe),oe};var w={g:function(K,$){var Z=new Y;return p($,Z),E(K,Z,this._defs),Z},rect:function(K,$){var Z=new T;return p($,Z),E(K,Z,this._defs),Z.setShape({x:parseFloat(K.getAttribute("x")||0),y:parseFloat(K.getAttribute("y")||0),width:parseFloat(K.getAttribute("width")||0),height:parseFloat(K.getAttribute("height")||0)}),Z},circle:function(K,$){var Z=new F;return p($,Z),E(K,Z,this._defs),Z.setShape({cx:parseFloat(K.getAttribute("cx")||0),cy:parseFloat(K.getAttribute("cy")||0),r:parseFloat(K.getAttribute("r")||0)}),Z},line:function(K,$){var Z=new P;return p($,Z),E(K,Z,this._defs),Z.setShape({x1:parseFloat(K.getAttribute("x1")||0),y1:parseFloat(K.getAttribute("y1")||0),x2:parseFloat(K.getAttribute("x2")||0),y2:parseFloat(K.getAttribute("y2")||0)}),Z},ellipse:function(K,$){var Z=new R;return p($,Z),E(K,Z,this._defs),Z.setShape({cx:parseFloat(K.getAttribute("cx")||0),cy:parseFloat(K.getAttribute("cy")||0),rx:parseFloat(K.getAttribute("rx")||0),ry:parseFloat(K.getAttribute("ry")||0)}),Z},polygon:function(K,$){var Z=K.getAttribute("points");Z&&(Z=v(Z));var me=new t({shape:{points:Z||[]}});return p($,me),E(K,me,this._defs),me},polyline:function(K,$){var Z=new m;p($,Z),E(K,Z,this._defs);var me=K.getAttribute("points");me&&(me=v(me));var oe=new b({shape:{points:me||[]}});return oe},image:function(K,$){var Z=new B;return p($,Z),E(K,Z,this._defs),Z.setStyle({image:K.getAttribute("xlink:href"),x:K.getAttribute("x"),y:K.getAttribute("y"),width:K.getAttribute("width"),height:K.getAttribute("height")}),Z},text:function(K,$){var Z=K.getAttribute("x")||0,me=K.getAttribute("y")||0,oe=K.getAttribute("dx")||0,fe=K.getAttribute("dy")||0;this._textX=parseFloat(Z)+parseFloat(oe),this._textY=parseFloat(me)+parseFloat(fe);var ye=new Y;return p($,ye),E(K,ye,this._defs),ye},tspan:function(K,$){var Z=K.getAttribute("x"),me=K.getAttribute("y");Z!=null&&(this._textX=parseFloat(Z)),me!=null&&(this._textY=parseFloat(me));var oe=K.getAttribute("dx")||0,fe=K.getAttribute("dy")||0,ye=new Y;return p($,ye),E(K,ye,this._defs),this._textX+=oe,this._textY+=fe,ye},path:function(K,$){var Z=K.getAttribute("d")||"",me=i(Z);return p($,me),E(K,me,this._defs),me}},y={lineargradient:function(K){var $=parseInt(K.getAttribute("x1")||0,10),Z=parseInt(K.getAttribute("y1")||0,10),me=parseInt(K.getAttribute("x2")||10,10),oe=parseInt(K.getAttribute("y2")||0,10),fe=new o($,Z,me,oe);return h(K,fe),fe},radialgradient:function(K){}};function h(K,$){for(var Z=K.firstChild;Z;){if(Z.nodeType===1){var me=Z.getAttribute("offset");me.indexOf("%")>0?me=parseInt(me,10)/100:me?me=parseFloat(me):me=0;var oe=Z.getAttribute("stop-color")||"#000000";$.addColorStop(me,oe)}Z=Z.nextSibling}}function p(K,$){K&&K.__inheritedStyle&&($.__inheritedStyle||($.__inheritedStyle={}),l($.__inheritedStyle,K.__inheritedStyle))}function v(K){for(var $=c(K).split(A),Z=[],me=0;me<$.length;me+=2){var oe=parseFloat($[me]),fe=parseFloat($[me+1]);Z.push([oe,fe])}return Z}var _={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 E(K,$,Z,me){var oe=$.__inheritedStyle||{},fe=$.type==="text";if(K.nodeType===1&&(S(K,$),n(oe,H(K)),!me)){for(var ye in _)if(_.hasOwnProperty(ye)){var Ie=K.getAttribute(ye);Ie!=null&&(oe[_[ye]]=Ie)}}var ve=fe?"textFill":"fill",de=fe?"textStroke":"stroke";$.style=$.style||new u;var Je=$.style;oe.fill!=null&&Je.set(ve,j(oe.fill,Z)),oe.stroke!=null&&Je.set(de,j(oe.stroke,Z)),x(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Rt){var Ee=Rt==="lineWidth"&&fe?"textStrokeWidth":Rt;oe[Rt]!=null&&Je.set(Ee,parseFloat(oe[Rt]))}),(!oe.textBaseline||oe.textBaseline==="auto")&&(oe.textBaseline="alphabetic"),oe.textBaseline==="alphabetic"&&(oe.textBaseline="bottom"),oe.textAlign==="start"&&(oe.textAlign="left"),oe.textAlign==="end"&&(oe.textAlign="right"),x(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Rt){oe[Rt]!=null&&Je.set(Rt,oe[Rt])}),oe.lineDash&&($.style.lineDash=c(oe.lineDash).split(A)),Je[de]&&Je[de]!=="none"&&($[de]=!0),$.__inheritedStyle=oe}var g=/url\(\s*#(.*?)\)/;function j(K,$){var Z=$&&K&&K.match(g);if(Z){var me=c(Z[1]),oe=$[me];return oe}return K}var U=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function S(K,$){var Z=K.getAttribute("transform");if(Z){Z=Z.replace(/,/g," ");var me=null,oe=[];Z.replace(U,function(ve,de,Je){oe.push(de,Je)});for(var fe=oe.length-1;fe>0;fe-=2){var ye=oe[fe],Ie=oe[fe-1];me=me||f.create();switch(Ie){case"translate":ye=c(ye).split(A),f.translate(me,me,[parseFloat(ye[0]),parseFloat(ye[1]||0)]);break;case"scale":ye=c(ye).split(A),f.scale(me,me,[parseFloat(ye[0]),parseFloat(ye[1]||ye[0])]);break;case"rotate":ye=c(ye).split(A),f.rotate(me,me,parseFloat(ye[0]));break;case"skew":ye=c(ye).split(A),console.warn("Skew transform is not supported yet");break;case"matrix":var ye=c(ye).split(A);me[0]=parseFloat(ye[0]),me[1]=parseFloat(ye[1]),me[2]=parseFloat(ye[2]),me[3]=parseFloat(ye[3]),me[4]=parseFloat(ye[4]),me[5]=parseFloat(ye[5]);break}}$.setLocalTransform(me)}}var z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function H(K){var $=K.getAttribute("style"),Z={};if(!$)return Z;var me={};z.lastIndex=0;for(var oe;(oe=z.exec($))!=null;)me[oe[1]]=oe[2];for(var fe in _)_.hasOwnProperty(fe)&&me[fe]!=null&&(Z[_[fe]]=me[fe]);return Z}function M(K,$,Z){var me=$/K.width,oe=Z/K.height,fe=Math.min(me,oe),ye=[fe,fe],Ie=[-(K.x+K.width/2)*fe+$/2,-(K.y+K.height/2)*fe+Z/2];return{scale:ye,position:Ie}}function V(K,$){var Z=new k;return Z.parse(K,$)}J.parseXML=C,J.makeViewBoxTransform=M,J.parseSVG=V},MI8n:function(Be,J,L){"use strict";L.d(J,"c",function(){return T}),L.d(J,"b",function(){return t}),L.d(J,"e",function(){return b}),L.d(J,"a",function(){return o}),L.d(J,"d",function(){return u}),L.d(J,"f",function(){return f});var Y=L("/cxE"),B=L("pmY6"),I=L("24hK"),F=L("5Y4S"),T;(function(a){a.None=()=>B.a.None;function i(g){return(j,U=null,S)=>{let z=!1,H;return H=g(M=>z?void 0:(H?H.dispose():z=!0,j.call(U,M)),null,S),z&&H.dispose(),H}}a.once=i;function d(g,j){return A((U,S=null,z)=>g(H=>U.call(S,j(H)),null,z))}a.map=d;function s(g,j){return A((U,S=null,z)=>g(H=>{j(H),U.call(S,H)},null,z))}a.forEach=s;function n(g,j){return A((U,S=null,z)=>g(H=>j(H)&&U.call(S,H),null,z))}a.filter=n;function l(g){return g}a.signal=l;function c(...g){return(j,U=null,S)=>Object(B.e)(...g.map(z=>z(H=>j.call(U,H),null,S)))}a.any=c;function x(g,j,U){let S=U;return d(g,z=>(S=j(S,z),S))}a.reduce=x;function A(g){let j;const U=new t({onFirstListenerAdd(){j=g(U.fire,U)},onLastListenerRemove(){j.dispose()}});return U.event}function C(g,j,U=100,S=!1,z){let H,M,V,K=0;const $=new t({leakWarningThreshold:z,onFirstListenerAdd(){H=g(Z=>{K++,M=j(M,Z),S&&!V&&($.fire(M),M=void 0),clearTimeout(V),V=setTimeout(()=>{const me=M;M=void 0,V=void 0,(!S||K>1)&&$.fire(me),K=0},U)})},onLastListenerRemove(){H.dispose()}});return $.event}a.debounce=C;function k(g,j=(U,S)=>U===S){let U=!0,S;return n(g,z=>{const H=U||!j(z,S);return U=!1,S=z,H})}a.latch=k;function w(g,j){return[a.filter(g,j),a.filter(g,U=>!j(U))]}a.split=w;function y(g,j=!1,U=[]){let S=U.slice(),z=g(V=>{S?S.push(V):M.fire(V)});const H=()=>{S&&S.forEach(V=>M.fire(V)),S=null},M=new t({onFirstListenerAdd(){z||(z=g(V=>M.fire(V)))},onFirstListenerDidAdd(){S&&(j?setTimeout(H):H())},onLastListenerRemove(){z&&z.dispose(),z=null}});return M.event}a.buffer=y;class h{constructor(g){this.event=g}map(g){return new h(d(this.event,g))}forEach(g){return new h(s(this.event,g))}filter(g){return new h(n(this.event,g))}reduce(g,j){return new h(x(this.event,g,j))}latch(){return new h(k(this.event))}debounce(g,j=100,U=!1,S){return new h(C(this.event,g,j,U,S))}on(g,j,U){return this.event(g,j,U)}once(g,j,U){return i(this.event)(g,j,U)}}function p(g){return new h(g)}a.chain=p;function v(g,j,U=S=>S){const S=(...V)=>M.fire(U(...V)),z=()=>g.on(j,S),H=()=>g.removeListener(j,S),M=new t({onFirstListenerAdd:z,onLastListenerRemove:H});return M.event}a.fromNodeEventEmitter=v;function _(g,j,U=S=>S){const S=(...V)=>M.fire(U(...V)),z=()=>g.addEventListener(j,S),H=()=>g.removeEventListener(j,S),M=new t({onFirstListenerAdd:z,onLastListenerRemove:H});return M.event}a.fromDOMEventEmitter=_;function E(g){return new Promise(j=>i(g)(j))}a.toPromise=E})(T||(T={}));class R{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${R._idPool++}`}start(a){this._stopWatch=new F.a(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}R._idPool=0;let P=-1;class m{constructor(a,i=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let i=P;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||a<i)return;this._stacks||(this._stacks=new Map);const d=new Error().stack.split(`
`).slice(3).join(`
`),s=this._stacks.get(d)||0;if(this._stacks.set(d,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;let n,l=0;for(const[c,x]of this._stacks)(!n||l<x)&&(n=c,l=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${l}):`),console.warn(n)}return()=>{const n=this._stacks.get(d)||0;this._stacks.set(d,n-1)}}}class t{constructor(a){var i;this._disposed=!1,this._options=a,this._leakageMon=P>0?new m(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(a,i,d)=>{var s;this._listeners||(this._listeners=new I.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(i?[a,i]:a);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,i);const c=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),x=Object(B.i)(()=>{if(c&&c(),!this._disposed&&(l(),this._options&&this._options.onLastListenerRemove)){const A=this._listeners&&!this._listeners.isEmpty();A||this._options.onLastListenerRemove(this)}});return d instanceof B.b?d.add(x):Array.isArray(d)&&d.push(x),x}),this._event}fire(a){var i,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new I.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,n]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,n):s[0].call(s[1],n)}catch(l){Object(Y.f)(l)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var a,i,d,s,n;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(s=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||s===void 0||s.call(d),(n=this._leakageMon)===null||n===void 0||n.dispose())}}class b extends t{constructor(a){super(a);this._isPaused=0,this._eventQueue=new I.a,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}class o extends b{constructor(a){var i;super(a);this._delay=(i=a.delay)!==null&&i!==void 0?i:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class u{constructor(){this.buffers=[]}wrapEvent(a){return(i,d,s)=>a(n=>{const l=this.buffers[this.buffers.length-1];l?l.push(()=>i.call(d,n)):i.call(d,n)},void 0,s)}bufferEvents(a){const i=[];this.buffers.push(i);const d=a();return this.buffers.pop(),i.forEach(s=>s()),d}}class f{constructor(){this.listening=!1,this.inputEvent=T.None,this.inputEventListener=B.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(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MKOG:function(Be,J,L){var Y=L("bYtY"),B=L("YH21"),I=B.Dispatcher,F=L("mLcG"),T=L("Bq2U"),R=function(m){m=m||{},this.stage=m.stage||{},this.onframe=m.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,I.call(this)};R.prototype={constructor:R,addClip:function(m){this._clips.push(m)},addAnimator:function(m){m.animation=this;for(var t=m.getClips(),b=0;b<t.length;b++)this.addClip(t[b])},removeClip:function(m){var t=Y.indexOf(this._clips,m);t>=0&&this._clips.splice(t,1)},removeAnimator:function(m){for(var t=m.getClips(),b=0;b<t.length;b++)this.removeClip(t[b]);m.animation=null},_update:function(){for(var m=new Date().getTime()-this._pausedTime,t=m-this._time,b=this._clips,o=b.length,u=[],f=[],a=0;a<o;a++){var i=b[a],d=i.step(m,t);d&&(u.push(d),f.push(i))}for(var a=0;a<o;)b[a]._needsRemove?(b[a]=b[o-1],b.pop(),o--):a++;o=u.length;for(var a=0;a<o;a++)f[a].fire(u[a]);this._time=m,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var m=this;this._running=!0;function t(){m._running&&(F(t),!m._paused&&m._update())}F(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(m,t){t=t||{};var b=new T(m,t.loop,t.getter,t.setter);return this.addAnimator(b),b}},Y.mixin(R,I);var P=R;Be.exports=P},MNsG:function(Be,J,L){"use strict";(function(Y,B){L.d(J,"b",function(){return d}),L.d(J,"i",function(){return c}),L.d(J,"f",function(){return x}),L.d(J,"d",function(){return A}),L.d(J,"g",function(){return C}),L.d(J,"h",function(){return k}),L.d(J,"c",function(){return w}),L.d(J,"k",function(){return y}),L.d(J,"j",function(){return h}),L.d(J,"a",function(){return p}),L.d(J,"e",function(){return E});var I;const F="en";let T=!1,R=!1,P=!1,m=!1,t=!1,b=!1,o=!1,u,f=F,a,i;const d=typeof self=="object"?self:typeof Y=="object"?Y:{};let s;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?s=d.vscode.process:typeof B!="undefined"&&(s=B);const n=typeof((I=s==null?void 0:s.versions)===null||I===void 0?void 0:I.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!n)i=navigator.userAgent,T=i.indexOf("Windows")>=0,R=i.indexOf("Macintosh")>=0,o=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,P=i.indexOf("Linux")>=0,b=!0,u=navigator.language,f=u;else if(typeof s=="object"){T=s.platform==="win32",R=s.platform==="darwin",P=s.platform==="linux",m=P&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,u=F,f=F;const g=s.env.VSCODE_NLS_CONFIG;if(g)try{const j=JSON.parse(g),U=j.availableLanguages["*"];u=j.locale,f=U||F,a=j._translationsConfigFile}catch(j){}t=!0}else console.error("Unable to resolve platform.");let l=0;R?l=1:T?l=3:P&&(l=2);const c=T,x=R,A=P,C=t,k=b,w=o,y=i,h=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let U=[];d.addEventListener("message",z=>{if(z.data&&z.data.vscodeSetImmediateId)for(let H=0,M=U.length;H<M;H++){const V=U[H];if(V.id===z.data.vscodeSetImmediateId){U.splice(H,1),V.callback();return}}});let S=0;return z=>{const H=++S;U.push({id:H,callback:z}),d.postMessage({vscodeSetImmediateId:H},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const j=Promise.resolve();return U=>j.then(U)}(),p=R||o?2:T?1:3;let v=!0,_=!1;function E(){if(!_){_=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const j=new Uint16Array(g.buffer);v=j[0]===(2<<8)+1}return v}}).call(this,L("IyRk"),L("Q2Ig"))},N0LK:function(Be,J,L){"use strict";L.d(J,"C",function(){return Y}),L.d(J,"v",function(){return I}),L.d(J,"s",function(){return F}),L.d(J,"t",function(){return T}),L.d(J,"U",function(){return R}),L.d(J,"J",function(){return P}),L.d(J,"O",function(){return m}),L.d(J,"p",function(){return t}),L.d(J,"T",function(){return b}),L.d(J,"q",function(){return o}),L.d(J,"N",function(){return u}),L.d(J,"M",function(){return f}),L.d(J,"Q",function(){return a}),L.d(J,"u",function(){return i}),L.d(J,"x",function(){return d}),L.d(J,"I",function(){return s}),L.d(J,"f",function(){return n}),L.d(J,"h",function(){return l}),L.d(J,"g",function(){return c}),L.d(J,"i",function(){return x}),L.d(J,"G",function(){return A}),L.d(J,"H",function(){return C}),L.d(J,"r",function(){return k}),L.d(J,"R",function(){return w}),L.d(J,"d",function(){return y}),L.d(J,"e",function(){return h}),L.d(J,"E",function(){return p}),L.d(J,"F",function(){return v}),L.d(J,"j",function(){return _}),L.d(J,"z",function(){return E}),L.d(J,"K",function(){return j}),L.d(J,"L",function(){return U}),L.d(J,"m",function(){return z}),L.d(J,"k",function(){return M}),L.d(J,"A",function(){return K}),L.d(J,"a",function(){return $}),L.d(J,"n",function(){return Z}),L.d(J,"l",function(){return me}),L.d(J,"D",function(){return oe}),L.d(J,"B",function(){return fe}),L.d(J,"b",function(){return ye}),L.d(J,"S",function(){return Ie}),L.d(J,"o",function(){return ve}),L.d(J,"P",function(){return de}),L.d(J,"w",function(){return Je}),L.d(J,"c",function(){return Rt}),L.d(J,"y",function(){return rt});function Y(ie){return!ie||typeof ie!="string"?!0:ie.trim().length===0}const B=/{(\d+)}/g;function I(ie,...xe){return xe.length===0?ie:ie.replace(B,function(we,$e){const ct=parseInt($e,10);return isNaN(ct)||ct<0||ct>=xe.length?we:xe[ct]})}function F(ie){return ie.replace(/[<>&]/g,function(xe){switch(xe){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return xe}})}function T(ie){return ie.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R(ie,xe=" "){const we=P(ie,xe);return m(we,xe)}function P(ie,xe){if(!ie||!xe)return ie;const we=xe.length;if(we===0||ie.length===0)return ie;let $e=0;for(;ie.indexOf(xe,$e)===$e;)$e=$e+we;return ie.substring($e)}function m(ie,xe){if(!ie||!xe)return ie;const we=xe.length,$e=ie.length;if(we===0||$e===0)return ie;let ct=$e,yt=-1;for(;!(yt=ie.lastIndexOf(xe,ct-1),yt===-1||yt+we!==ct);){if(yt===0)return"";ct=yt}return ie.substring(0,ct)}function t(ie){return ie.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function b(ie){return ie.replace(/\*/g,"")}function o(ie,xe,we={}){if(!ie)throw new Error("Cannot create regex from empty string");xe||(ie=T(ie)),we.wholeWord&&(/\B/.test(ie.charAt(0))||(ie="\\b"+ie),/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"));let $e="";return we.global&&($e+="g"),we.matchCase||($e+="i"),we.multiline&&($e+="m"),we.unicode&&($e+="u"),new RegExp(ie,$e)}function u(ie){if(ie.source==="^"||ie.source==="^$"||ie.source==="$"||ie.source==="^\\s*$")return!1;const xe=ie.exec("");return!!(xe&&ie.lastIndex===0)}function f(ie){return(ie.global?"g":"")+(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")}function a(ie){return ie.split(/\r\n|\r|\n/)}function i(ie){for(let xe=0,we=ie.length;xe<we;xe++){const $e=ie.charCodeAt(xe);if($e!==32&&$e!==9)return xe}return-1}function d(ie,xe=0,we=ie.length){for(let $e=xe;$e<we;$e++){const ct=ie.charCodeAt($e);if(ct!==32&&ct!==9)return ie.substring(xe,$e)}return ie.substring(xe,we)}function s(ie,xe=ie.length-1){for(let we=xe;we>=0;we--){const $e=ie.charCodeAt(we);if($e!==32&&$e!==9)return we}return-1}function n(ie,xe){return ie<xe?-1:ie>xe?1:0}function l(ie,xe,we=0,$e=ie.length,ct=0,yt=xe.length){for(;we<$e&&ct<yt;we++,ct++){let kt=ie.charCodeAt(we),qt=xe.charCodeAt(ct);if(kt<qt)return-1;if(kt>qt)return 1}const Ut=$e-we,We=yt-ct;return Ut<We?-1:Ut>We?1:0}function c(ie,xe){return x(ie,xe,0,ie.length,0,xe.length)}function x(ie,xe,we=0,$e=ie.length,ct=0,yt=xe.length){for(;we<$e&&ct<yt;we++,ct++){let kt=ie.charCodeAt(we),qt=xe.charCodeAt(ct);if(kt===qt)continue;if(kt>=128||qt>=128)return l(ie.toLowerCase(),xe.toLowerCase(),we,$e,ct,yt);A(kt)&&(kt-=32),A(qt)&&(qt-=32);const Pe=kt-qt;if(Pe===0)continue;return Pe}const Ut=$e-we,We=yt-ct;return Ut<We?-1:Ut>We?1:0}function A(ie){return ie>=97&&ie<=122}function C(ie){return ie>=65&&ie<=90}function k(ie,xe){return ie.length===xe.length&&x(ie,xe)===0}function w(ie,xe){const we=xe.length;return xe.length>ie.length?!1:x(ie,xe,0,we)===0}function y(ie,xe){let we,$e=Math.min(ie.length,xe.length);for(we=0;we<$e;we++)if(ie.charCodeAt(we)!==xe.charCodeAt(we))return we;return $e}function h(ie,xe){let we,$e=Math.min(ie.length,xe.length);const ct=ie.length-1,yt=xe.length-1;for(we=0;we<$e;we++)if(ie.charCodeAt(ct-we)!==xe.charCodeAt(yt-we))return we;return $e}function p(ie){return 55296<=ie&&ie<=56319}function v(ie){return 56320<=ie&&ie<=57343}function _(ie,xe){return(ie-55296<<10)+(xe-56320)+65536}function E(ie,xe,we){const $e=ie.charCodeAt(we);if(p($e)&&we+1<xe){const ct=ie.charCodeAt(we+1);if(v(ct))return _($e,ct)}return $e}function g(ie,xe){const we=ie.charCodeAt(xe-1);if(v(we)&&xe>1){const $e=ie.charCodeAt(xe-2);if(p($e))return _($e,we)}return we}function j(ie,xe){const we=Ee.getInstance(),$e=xe,ct=ie.length,yt=E(ie,ct,xe);xe+=yt>=65536?2:1;let Ut=we.getGraphemeBreakType(yt);for(;xe<ct;){const We=E(ie,ct,xe),kt=we.getGraphemeBreakType(We);if(Rt(Ut,kt))break;xe+=We>=65536?2:1,Ut=kt}return xe-$e}function U(ie,xe){const we=Ee.getInstance(),$e=xe,ct=g(ie,xe);xe-=ct>=65536?2:1;let yt=we.getGraphemeBreakType(ct);for(;xe>0;){const Ut=g(ie,xe),We=we.getGraphemeBreakType(Ut);if(Rt(We,yt))break;xe-=Ut>=65536?2:1,yt=We}return $e-xe}const S=/(?:[\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 z(ie){return S.test(ie)}const H=/(?:[\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 M(ie){return H.test(ie)}const V=/^[\t\n\r\x20-\x7E]*$/;function K(ie){return V.test(ie)}const $=/[\u2028\u2029]/;function Z(ie){return $.test(ie)}function me(ie){for(let xe=0,we=ie.length;xe<we;xe++)if(oe(ie.charCodeAt(xe)))return!0;return!1}function oe(ie){return ie=+ie,ie>=11904&&ie<=55215||ie>=63744&&ie<=64255||ie>=65281&&ie<=65374}function fe(ie){return ie>=127462&&ie<=127487||ie===8986||ie===8987||ie===9200||ie===9203||ie>=9728&&ie<=10175||ie===11088||ie===11093||ie>=127744&&ie<=128591||ie>=128640&&ie<=128764||ie>=128992&&ie<=129003||ie>=129280&&ie<=129535||ie>=129648&&ie<=129750}const ye=String.fromCharCode(65279);function Ie(ie){return!!(ie&&ie.length>0&&ie.charCodeAt(0)===65279)}function ve(ie,xe=!1){return ie?(xe&&(ie=ie.replace(/\\./g,"")),ie.toLowerCase()!==ie):!1}function de(ie){const xe=90-65+1;return ie=ie%(2*xe),ie<xe?String.fromCharCode(97+ie):String.fromCharCode(65+ie-xe)}function Je(ie){const xe=Ee.getInstance();return xe.getGraphemeBreakType(ie)}function Rt(ie,xe){return ie===0?xe!==5&&xe!==7:ie===2&&xe===3?!1:ie===4||ie===2||ie===3||(xe===4||xe===2||xe===3)?!0:ie===8&&(xe===8||xe===9||xe===11||xe===12)||((ie===11||ie===9)&&(xe===9||xe===10)||((ie===12||ie===10)&&xe===10||(xe===5||xe===13||(xe===7||(ie===1||ie===13&&xe===14)))))?!1:!(ie===6&&xe===6)}class Ee{constructor(){this._data=Me()}static getInstance(){return Ee._INSTANCE||(Ee._INSTANCE=new Ee),Ee._INSTANCE}getGraphemeBreakType(ie){if(ie<32)return ie===10?3:ie===13?2:4;if(ie<127)return 0;const xe=this._data,we=xe.length/3;let $e=1;for(;$e<=we;)if(ie<xe[3*$e])$e=2*$e;else if(ie>xe[3*$e+1])$e=2*$e+1;else return xe[3*$e+2];return 0}}Ee._INSTANCE=null;function Me(){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 rt(ie,xe){if(ie===0)return 0;const we=He(ie,xe);if(we!==void 0)return we;const $e=g(xe,ie);return ie-=ke($e),ie}function He(ie,xe){let we=g(xe,ie);for(ie-=ke(we);ht(we)||we===65039||we===8419;){if(ie===0)return;we=g(xe,ie),ie-=ke(we)}if(!fe(we))return;if(ie>=0){const $e=g(xe,ie);$e===8205&&(ie-=ke($e))}return ie}function ke(ie){return ie>=65536?2:1}function ht(ie){return 127995<=ie&&ie<=127999}},NC18:function(Be,J,L){var Y=L("y+Vt"),B=L("IMiH"),I=L("7oTu"),F=Math.sqrt,T=Math.sin,R=Math.cos,P=Math.PI,m=function(l){return Math.sqrt(l[0]*l[0]+l[1]*l[1])},t=function(l,c){return(l[0]*c[0]+l[1]*c[1])/(m(l)*m(c))},b=function(l,c){return(l[0]*c[1]<l[1]*c[0]?-1:1)*Math.acos(t(l,c))};function o(l,c,x,A,C,k,w,y,h,p,v){var _=h*(P/180),E=R(_)*(l-x)/2+T(_)*(c-A)/2,g=-1*T(_)*(l-x)/2+R(_)*(c-A)/2,j=E*E/(w*w)+g*g/(y*y);j>1&&(w*=F(j),y*=F(j));var U=(C===k?-1:1)*F((w*w*(y*y)-w*w*(g*g)-y*y*(E*E))/(w*w*(g*g)+y*y*(E*E)))||0,S=U*w*g/y,z=U*-y*E/w,H=(l+x)/2+R(_)*S-T(_)*z,M=(c+A)/2+T(_)*S+R(_)*z,V=b([1,0],[(E-S)/w,(g-z)/y]),K=[(E-S)/w,(g-z)/y],$=[(-1*E-S)/w,(-1*g-z)/y],Z=b(K,$);t(K,$)<=-1&&(Z=P),t(K,$)>=1&&(Z=0),k===0&&Z>0&&(Z=Z-2*P),k===1&&Z<0&&(Z=Z+2*P),v.addData(p,H,M,w,y,V,Z,_,k)}var u=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,f=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function a(l){if(!l)return new B;for(var c=0,x=0,A=c,C=x,k,w=new B,y=B.CMD,h=l.match(u),p=0;p<h.length;p++){for(var v=h[p],_=v.charAt(0),E,g=v.match(f)||[],j=g.length,U=0;U<j;U++)g[U]=parseFloat(g[U]);for(var S=0;S<j;){var z,H,M,V,K,$,Z,me=c,oe=x;switch(_){case"l":c+=g[S++],x+=g[S++],E=y.L,w.addData(E,c,x);break;case"L":c=g[S++],x=g[S++],E=y.L,w.addData(E,c,x);break;case"m":c+=g[S++],x+=g[S++],E=y.M,w.addData(E,c,x),A=c,C=x,_="l";break;case"M":c=g[S++],x=g[S++],E=y.M,w.addData(E,c,x),A=c,C=x,_="L";break;case"h":c+=g[S++],E=y.L,w.addData(E,c,x);break;case"H":c=g[S++],E=y.L,w.addData(E,c,x);break;case"v":x+=g[S++],E=y.L,w.addData(E,c,x);break;case"V":x=g[S++],E=y.L,w.addData(E,c,x);break;case"C":E=y.C,w.addData(E,g[S++],g[S++],g[S++],g[S++],g[S++],g[S++]),c=g[S-2],x=g[S-1];break;case"c":E=y.C,w.addData(E,g[S++]+c,g[S++]+x,g[S++]+c,g[S++]+x,g[S++]+c,g[S++]+x),c+=g[S-2],x+=g[S-1];break;case"S":z=c,H=x;var fe=w.len(),ye=w.data;k===y.C&&(z+=c-ye[fe-4],H+=x-ye[fe-3]),E=y.C,me=g[S++],oe=g[S++],c=g[S++],x=g[S++],w.addData(E,z,H,me,oe,c,x);break;case"s":z=c,H=x;var fe=w.len(),ye=w.data;k===y.C&&(z+=c-ye[fe-4],H+=x-ye[fe-3]),E=y.C,me=c+g[S++],oe=x+g[S++],c+=g[S++],x+=g[S++],w.addData(E,z,H,me,oe,c,x);break;case"Q":me=g[S++],oe=g[S++],c=g[S++],x=g[S++],E=y.Q,w.addData(E,me,oe,c,x);break;case"q":me=g[S++]+c,oe=g[S++]+x,c+=g[S++],x+=g[S++],E=y.Q,w.addData(E,me,oe,c,x);break;case"T":z=c,H=x;var fe=w.len(),ye=w.data;k===y.Q&&(z+=c-ye[fe-4],H+=x-ye[fe-3]),c=g[S++],x=g[S++],E=y.Q,w.addData(E,z,H,c,x);break;case"t":z=c,H=x;var fe=w.len(),ye=w.data;k===y.Q&&(z+=c-ye[fe-4],H+=x-ye[fe-3]),c+=g[S++],x+=g[S++],E=y.Q,w.addData(E,z,H,c,x);break;case"A":M=g[S++],V=g[S++],K=g[S++],$=g[S++],Z=g[S++],me=c,oe=x,c=g[S++],x=g[S++],E=y.A,o(me,oe,c,x,$,Z,M,V,K,E,w);break;case"a":M=g[S++],V=g[S++],K=g[S++],$=g[S++],Z=g[S++],me=c,oe=x,c+=g[S++],x+=g[S++],E=y.A,o(me,oe,c,x,$,Z,M,V,K,E,w);break}}(_==="z"||_==="Z")&&(E=y.Z,w.addData(E),c=A,x=C),k=E}return w.toStatic(),w}function i(l,c){var x=a(l);return c=c||{},c.buildPath=function(A){if(A.setData){A.setData(x.data);var C=A.getContext();C&&A.rebuildPath(C)}else{var C=A;x.rebuildPath(C)}},c.applyTransform=function(A){I(x,A),this.dirty(!0)},c}function d(l,c){return new Y(i(l,c))}function s(l,c){return Y.extend(i(l,c))}function n(l,c){for(var x=[],A=l.length,C=0;C<A;C++){var k=l[C];k.path||k.createPathProxy(),k.__dirtyPath&&k.buildPath(k.path,k.shape,!0),x.push(k.path)}var w=new Y(c);return w.createPathProxy(),w.buildPath=function(y){y.appendPath(x);var h=y.getContext();h&&y.rebuildPath(h)},w}J.createFromString=d,J.extendFromString=s,J.mergePath=n},NLgs:function(Be,J,L){"use strict";L.d(J,"e",function(){return c}),L.d(J,"f",function(){return x}),L.d(J,"d",function(){return C}),L.d(J,"c",function(){return k}),L.d(J,"a",function(){return w}),L.d(J,"b",function(){return y});var Y=L("miYZ"),B=L("tsqr"),I=L("9og8"),F=L("2qtc"),T=L("kLXV"),R=L("WmNS"),P=L.n(R),m=L("q1tI"),t=L.n(m),b=L("9kvl"),o=L("xKgJ"),u=L("1vsH"),f=L("RCxd"),a=L("yTi+"),i=L.n(a),d=L("1ZF9"),s=L.n(d),n=L("NoGO"),l=L.n(n),c=function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(p)&&A(v))},x=function(p){return Object(o.p)()?!0:(p({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},A=function(){var p,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=Object(b.c)()._store.getState(),E=_.user;return(p=E.userInfo)!==null&&p!==void 0&&p.profile_completed?!0:(T.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:v?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){b.d.push("/account/profile/edit")}}),!1)},C=function(){var p,v=Object(b.c)()._store.getState(),_=v.user;return(p=_.userInfo)!==null&&p!==void 0&&p.professional_certification?!0:(T.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(u.S)("/account/certification")}}),!1)},k=function(){return Object(o.a)()?!0:(T.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:l.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},w=function(p,v){return p?!0:(T.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,v||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:s.a,width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(u.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},y=function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",_=Object(b.c)()._store.getState(),E=_.shixunsDetail.detail;return(E==null?void 0:E.public)===2||(E==null?void 0:E.public)===1||(E==null?void 0:E.shixun_status)===3?(T.a.info({centered:!0,icon:t.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(E==null?void 0:E.public)===2?"\u5DF2\u516C\u5F00":(E==null?void 0:E.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",v,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:i.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(E==null?void 0:E.shixun_status)===2?(T.a.confirm({centered:!0,icon:t.a.createElement(f.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",v,"\u3002"),t.a.createElement("br",null),t.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){T.a.confirm({width:440,centered:!0,icon:t.a.createElement(f.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var j=Object(I.a)(P.a.mark(function S(){var z;return P.a.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,p({type:"shixunsDetail/cancelRelease",payload:{id:E==null?void 0:E.identifier}});case 2:z=M.sent,z.status!==401&&(B.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),p({type:"shixunsDetail/getShixunsDetail",payload:{id:E==null?void 0:E.identifier}}),p({type:"practiceSetting/getCommonData",payload:{id:E==null?void 0:E.identifier}}));case 4:case"end":return M.stop()}},S)}));function U(){return j.apply(this,arguments)}return U}()})}}),!0):!1}},NoGO:function(Be,J,L){Be.exports=L.p+"static/newqrcode.d852fdfc.png"},NohK:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.default=void 0;var Y=function(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,T=null;return function(){for(var R=this,P=arguments.length,m=new Array(P),t=0;t<P;t++)m[t]=arguments[t];clearTimeout(T),T=setTimeout(function(){I.apply(R,m)},F)}};J.default=Y},NvD2:function(Be,J,L){"use strict";L.d(J,"a",function(){return R});var Y=L("Kwbf");function B(P,m){var t=new Set;return P.forEach(function(b){m.has(b)||t.add(b)}),t}function I(P){var m=P||{},t=m.disabled,b=m.disableCheckbox,o=m.checkable;return!!(t||b)||o===!1}function F(P,m,t,b){for(var o=new Set(P),u=new Set,f=0;f<=t;f+=1){var a=m.get(f)||new Set;a.forEach(function(n){var l=n.key,c=n.node,x=n.children,A=x===void 0?[]:x;o.has(l)&&!b(c)&&A.filter(function(C){return!b(C.node)}).forEach(function(C){o.add(C.key)})})}for(var i=new Set,d=t;d>=0;d-=1){var s=m.get(d)||new Set;s.forEach(function(n){var l=n.parent,c=n.node;if(b(c)||!n.parent||i.has(n.parent.key))return;if(b(n.parent.node)){i.add(l.key);return}var x=!0,A=!1;(l.children||[]).filter(function(C){return!b(C.node)}).forEach(function(C){var k=C.key,w=o.has(k);x&&!w&&(x=!1),!A&&(w||u.has(k))&&(A=!0)}),x&&o.add(l.key),A&&u.add(l.key),i.add(l.key)})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(B(u,o))}}function T(P,m,t,b,o){for(var u=new Set(P),f=new Set(m),a=0;a<=b;a+=1){var i=t.get(a)||new Set;i.forEach(function(l){var c=l.key,x=l.node,A=l.children,C=A===void 0?[]:A;!u.has(c)&&!f.has(c)&&!o(x)&&C.filter(function(k){return!o(k.node)}).forEach(function(k){u.delete(k.key)})})}f=new Set;for(var d=new Set,s=b;s>=0;s-=1){var n=t.get(s)||new Set;n.forEach(function(l){var c=l.parent,x=l.node;if(o(x)||!l.parent||d.has(l.parent.key))return;if(o(l.parent.node)){d.add(c.key);return}var A=!0,C=!1;(c.children||[]).filter(function(k){return!o(k.node)}).forEach(function(k){var w=k.key,y=u.has(w);A&&!y&&(A=!1),!C&&(y||f.has(w))&&(C=!0)}),A||u.delete(c.key),C&&f.add(c.key),d.add(c.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(B(f,u))}}function R(P,m,t,b){var o=[],u;b?u=b:u=I;var f=new Set(P.filter(function(s){var n=!!t[s];return n||o.push(s),n})),a=new Map,i=0;Object.keys(t).forEach(function(s){var n=t[s],l=n.level,c=a.get(l);c||(c=new Set,a.set(l,c)),c.add(n),i=Math.max(i,l)}),Object(Y.a)(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var d;return m===!0?d=F(f,a,i,u):d=T(f,m.halfCheckedKeys,a,i,u),d}},OLES:function(Be,J,L){"use strict";var Y=L("U8pU"),B=L("VTBJ"),I=L("Ff2n"),F=L("q1tI"),T=L("uciX"),R=L("7ixt"),P=function(f){var a=f.overlay,i=f.prefixCls,d=f.id,s=f.overlayInnerStyle;return F.createElement("div",{className:"".concat(i,"-inner"),id:d,role:"tooltip",style:s},typeof a=="function"?a():a)},m=P,t=function(f,a){var i=f.overlayClassName,d=f.trigger,s=d===void 0?["hover"]:d,n=f.mouseEnterDelay,l=n===void 0?0:n,c=f.mouseLeaveDelay,x=c===void 0?.1:c,A=f.overlayStyle,C=f.prefixCls,k=C===void 0?"rc-tooltip":C,w=f.children,y=f.onVisibleChange,h=f.afterVisibleChange,p=f.transitionName,v=f.animation,_=f.placement,E=_===void 0?"right":_,g=f.align,j=g===void 0?{}:g,U=f.destroyTooltipOnHide,S=U===void 0?!1:U,z=f.defaultVisible,H=f.getTooltipContainer,M=f.overlayInnerStyle,V=Object(I.a)(f,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),K=Object(F.useRef)(null);Object(F.useImperativeHandle)(a,function(){return K.current});var $=Object(B.a)({},V);"visible"in f&&($.popupVisible=f.visible);var Z=function(){var Ie=f.arrowContent,ve=Ie===void 0?null:Ie,de=f.overlay,Je=f.id;return[F.createElement("div",{className:"".concat(k,"-arrow"),key:"arrow"},ve),F.createElement(m,{key:"content",prefixCls:k,id:Je,overlay:de,overlayInnerStyle:M})]},me=!1,oe=!1;if(typeof S=="boolean")me=S;else if(S&&Object(Y.a)(S)==="object"){var fe=S.keepParent;me=fe===!0,oe=fe===!1}return F.createElement(T.a,Object.assign({popupClassName:i,prefixCls:k,popup:Z,action:s,builtinPlacements:R.a,popupPlacement:E,ref:K,popupAlign:j,getPopupContainer:H,onPopupVisibleChange:y,afterPopupVisibleChange:h,popupTransitionName:p,popupAnimation:v,defaultPopupVisible:z,destroyPopupOnHide:me,autoDestroy:oe,mouseLeaveDelay:x,popupStyle:A,mouseEnterDelay:l},$),w)},b=Object(F.forwardRef)(t),o=J.a=b},OS9S:function(Be,J,L){var Y=L("bYtY"),B=Y.inherits,I=L("Gev7"),F=L("mFDi");function T(m){I.call(this,m),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}T.prototype.incremental=!0,T.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},T.prototype.addDisplayable=function(m,t){t?this._temporaryDisplayables.push(m):this._displayables.push(m),this.dirty()},T.prototype.addDisplayables=function(m,t){t=t||!1;for(var b=0;b<m.length;b++)this.addDisplayable(m[b],t)},T.prototype.eachPendingDisplayable=function(m){for(var t=this._cursor;t<this._displayables.length;t++)m&&m(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)m&&m(this._temporaryDisplayables[t])},T.prototype.update=function(){this.updateTransform();for(var m=this._cursor;m<this._displayables.length;m++){var t=this._displayables[m];t.parent=this,t.update(),t.parent=null}for(var m=0;m<this._temporaryDisplayables.length;m++){var t=this._temporaryDisplayables[m];t.parent=this,t.update(),t.parent=null}},T.prototype.brush=function(m,t){for(var b=this._cursor;b<this._displayables.length;b++){var o=this._displayables[b];o.beforeBrush&&o.beforeBrush(m),o.brush(m,b===this._cursor?null:this._displayables[b-1]),o.afterBrush&&o.afterBrush(m)}this._cursor=b;for(var b=0;b<this._temporaryDisplayables.length;b++){var o=this._temporaryDisplayables[b];o.beforeBrush&&o.beforeBrush(m),o.brush(m,b===0?null:this._temporaryDisplayables[b-1]),o.afterBrush&&o.afterBrush(m)}this._temporaryDisplayables=[],this.notClear=!0};var R=[];T.prototype.getBoundingRect=function(){if(!this._rect){for(var m=new F(Infinity,Infinity,-Infinity,-Infinity),t=0;t<this._displayables.length;t++){var b=this._displayables[t],o=b.getBoundingRect().clone();b.needLocalTransform()&&o.applyTransform(b.getLocalTransform(R)),m.union(o)}this._rect=m}return this._rect},T.prototype.contain=function(m,t){var b=this.transformCoordToLocal(m,t),o=this.getBoundingRect();if(o.contain(b[0],b[1]))for(var u=0;u<this._displayables.length;u++){var f=this._displayables[u];if(f.contain(m,t))return!0}return!1},B(T,I);var P=T;Be.exports=P},OZM5:function(Be,J,L){"use strict";L.d(J,"b",function(){return b}),L.d(J,"a",function(){return o}),L.d(J,"k",function(){return u}),L.d(J,"h",function(){return f}),L.d(J,"i",function(){return a}),L.d(J,"g",function(){return i}),L.d(J,"c",function(){return d}),L.d(J,"d",function(){return s}),L.d(J,"j",function(){return c}),L.d(J,"e",function(){return x}),L.d(J,"f",function(){return A});var Y=L("KQm4"),B=L("U8pU"),I=L("Ff2n"),F=L("q1tI"),T=L.n(F),R=L("Kwbf"),P=L("WaYH"),m=.25,t=2;function b(C,k){var w=C.slice(),y=w.indexOf(k);return y>=0&&w.splice(y,1),w}function o(C,k){var w=C.slice();return w.indexOf(k)===-1&&w.push(k),w}function u(C){return C.split("-")}function f(C,k){return"".concat(C,"-").concat(k)}function a(C){return C&&C.type&&C.type.isTreeNode}function i(C,k){var w=[C],y=k[C];function h(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(v){var _=v.key,E=v.children;w.push(_),h(E)})}return h(y.children),w}function d(C,k){var w=C.clientY,y=k.selectHandle.getBoundingClientRect(),h=y.top,p=y.bottom,v=y.height,_=Math.max(v*m,t);return w<=h+_?-1:w>=p-_?1:0}function s(C,k){if(!C)return;var w=k.multiple;return w?C.slice():C.length?[C[0]]:C}var n=function(k){return k};function l(C,k){if(!C)return[];var w=k||{},y=w.processProps,h=y===void 0?n:y,p=Array.isArray(C)?C:[C];return p.map(function(v){var _=v.children,E=Object(I.a)(v,["children"]),g=l(_,k);return T.a.createElement(P.a,Object.assign({},h(E)),g)})}function c(C){if(!C)return null;var k;if(Array.isArray(C))k={checkedKeys:C,halfCheckedKeys:void 0};else if(Object(B.a)(C)==="object")k={checkedKeys:C.checked||void 0,halfCheckedKeys:C.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function x(C,k){var w=new Set;function y(h){if(w.has(h))return;var p=k[h];if(!p)return;w.add(h);var v=p.parent,_=p.node;if(_.disabled)return;v&&y(v.key)}return(C||[]).forEach(function(h){y(h)}),Object(Y.a)(w)}function A(C){var k={};return Object.keys(C).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(k[w]=C[w])}),k}},Ot1p:function(Be,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("rAM+"),F=L("miYZ"),T=L("tsqr"),R=L("9og8"),P=L("tJVT"),m=L("jrin"),t=L("WmNS"),b=L.n(t),o=L("q1tI"),u=L.n(o),f=L("VrN/"),a=L.n(f),i=L("bdgK"),d=L("p77/"),s=L("Bd2K"),n=L("ELLl"),l=L("19Vz"),c=L("lZu9"),x=L("+NIl"),A=L("kSUc"),C=L("9Bee"),k=function(Se){var ze=Se.value,xt=ze===void 0?"":ze,Qt=Se.className,sn=Se.showTextOnly,gt=Se.showLines,zt=Se.style,Ot=zt===void 0?{}:zt,At=Object(o.useMemo)(function(){return""},[xt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},w=L("0Owb"),y=L("dejd"),h=L("C+DQ"),p=L("1vsH"),v=L("m3rI"),_=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function E(Se){var ze=Se.onActionCallback,xt=Se.title,Qt=Se.icon,sn=Se.actionName,gt=Se.className,zt=gt===void 0?"":gt,Ot=Se.children;function At(){ze(sn)}return u.a.createElement("a",{title:xt,className:zt,onClick:At},u.a.createElement("i",{className:"md-iconfont ".concat(Qt)}),Ot)}var g=function(Se){var ze=Se.watch,xt=Se.showNullButton,Qt=Se.onActionCallback,sn=Se.fullScreen,gt=Se.insertTemp,zt=Se.hidetoolBar,Ot=Se.uuid,At=Se.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(p.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(p.F)("_educoder_session"),"&key=").concat(Ot,"&api=").concat(encodeURIComponent(v.a.PROXY_SERVER)));var ft=[].concat(_,[{title:"".concat(ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return u.a.createElement("ul",{className:"markdown-toolbar-container"},!zt&&ft.map(function(be,Fe){return u.a.createElement("li",{key:Fe},be.actionName?u.a.createElement(E,Object(w.a)({},be,{onActionCallback:Qt})):u.a.createElement("span",{className:"v-line"}))}),xt?u.a.createElement("li",null,u.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Qt},u.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,gt&&u.a.createElement("li",null,u.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(gt),onActionCallback:Qt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(E,{icon:"".concat(sn?"icon-shrink":"icon-enlarge"),title:sn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Qt})))},j=L("M8RZ"),U=L("+L6B"),S=L("2/Rp"),z=L("y8nQ"),H=L("Vl3Y"),M=L("5NDa"),V=L("5rEg"),K={labelCol:{span:4},wrapperCol:{span:20}},$=function(Se){var ze=Se.callback,xt=Se.onCancel;function Qt(sn){ze(sn)}return u.a.createElement(H.a,Object(w.a)({},K,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Qt}),u.a.createElement(H.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},u.a.createElement(V.a,null)),u.a.createElement(H.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},u.a.createElement(V.a,null)),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(S.a,{type:"ghost",onClick:xt},"\u53D6\u6D88")))},Z=L("7ahc"),me=L("HmJG"),oe=L("BjJ7"),fe=H.a.useForm,ye={width:280,marginRight:10},Ie={labelCol:{span:5},wrapperCol:{span:19}},ve=function(Se){var ze=Se.callback,xt=Se.onCancel,Qt=fe(),sn=Object(P.a)(Qt,1),gt=sn[0];function zt(ft){ze(ft)}function Ot(ft,be){if(ft.status===-1){T.b.error(ft.message);return}gt.setFieldsValue({src:"/api/attachments/".concat(ft.id),type:be.type})}function At(ft){var be=ft.target.files[0];Je(be,Ot)}return u.a.createElement(H.a,Object(w.a)({form:gt},Ie,{className:"upload-image-panel",onFinish:zt}),u.a.createElement(H.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},u.a.createElement("div",{className:"flex-container"},u.a.createElement(H.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},u.a.createElement(V.a,{style:ye})),u.a.createElement(de,{onFileChange:At}))),u.a.createElement(H.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},u.a.createElement(V.a,{style:{width:264}})),u.a.createElement(H.a.Item,{style:{textAlign:"right"}},u.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(S.a,{type:"ghost",onClick:xt},"\u53D6\u6D88")))};function de(Se){var ze=Se.onFileChange;return u.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",u.a.createElement("input",{type:"file",onChange:ze}))}function Je(Se,ze){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");var xt=new FormData;xt.append("editormd-image-file",Se),xt.append("file_param_name","editormd-image-file"),xt.append("byxhr","true");var Qt=new window.XMLHttpRequest;Qt.withCredentials=!0,Qt.addEventListener("load",function(sn){ze(JSON.parse(sn.target.responseText),Se)},!1),Qt.addEventListener("error",function(sn){console.error(sn)},!1),Qt.open("POST","".concat(oe.a,"/api/attachments.json")),Qt.send(xt)}var Rt=L("giR+"),Ee=L("fyUT"),Me=L("7Kak"),rt=L("9yH6"),He=rt.a.Group,ke={margin:"0 8px"},ht=function(Se){var ze=Se.callback,xt=Se.onCancel;function Qt(sn){ze(sn)}return u.a.createElement(H.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Qt},u.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},u.a.createElement("span",{style:ke},"\u5355\u5143\u683C\u6570\uFF1A"),u.a.createElement("span",{style:ke},"\u884C\u6570"),u.a.createElement(H.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},u.a.createElement(Ee.a,null)),u.a.createElement("span",{style:ke},"\u5217\u6570"),u.a.createElement(H.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},u.a.createElement(Ee.a,null))),u.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},u.a.createElement("span",{style:ke},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),u.a.createElement(H.a.Item,{name:"align"},u.a.createElement(He,null,u.a.createElement(rt.a,{value:"default"},u.a.createElement("i",{className:"fa fa-align-justify"})),u.a.createElement(rt.a,{value:"left"},u.a.createElement("i",{className:"fa fa-align-left"})),u.a.createElement(rt.a,{value:"center"},u.a.createElement("i",{className:"fa fa-align-center"})),u.a.createElement(rt.a,{value:"right"},u.a.createElement("i",{className:"fa fa-align-right"}))))),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(S.a,{type:"ghost",onClick:xt},"\u53D6\u6D88")))},ie=L("ErOA"),xe=L("7Cbv"),we="link",$e="upload-image",ct="code-block",yt="add-table",Ut="------------",We={default:Ut,left:":".concat(Ut),center:":".concat(Ut,":"),right:"".concat(Ut,":")},kt=L("9VGf"),qt,Pe;function Ae(){}var ut=0,Et=1e4,Ze="\u2581",dt=`
**\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 Ne(Se){return/^\d+$/.test(Se)?"".concat(Se,"px"):Se}var Te=navigator.platform.toUpperCase().indexOf("MAC")>=0,Oe=Te?"Cmd":"Ctrl",ae=["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"],le=(qt={},Object(m.a)(qt,Oe+"-B","bold"),Object(m.a)(qt,Oe+"-I","italic"),qt),he=(Pe={},Object(m.a)(Pe,we,"\u6DFB\u52A0\u94FE\u63A5"),Object(m.a)(Pe,ct,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(m.a)(Pe,$e,"\u6DFB\u52A0\u6587\u4EF6"),Object(m.a)(Pe,yt,"\u6DFB\u52A0\u8868\u683C"),Pe),_e=J.a=function(Se){var ze=Se.defaultValue,xt=ze===void 0?"":ze,Qt=Se.onChange,sn=Se.width,gt=sn===void 0?"100%":sn,zt=Se.height,Ot=zt===void 0?400:zt,At=Se.miniToolbar,ft=At===void 0?!1:At,be=Se.isFocus,Fe=be===void 0?!1:be,Nt=Se.watch,bt=Se.insertTemp,Kt=Se.mode,Zt=Kt===void 0?"markdown":Kt,Ge=Se.id,lt=Ge===void 0?"markdown-editor-id":Ge,Lt=Se.showResizeBar,Wt=Lt===void 0?!1:Lt,ln=Se.noStorage,gn=ln===void 0?!1:ln,tr=Se.showNullButton,Wn=tr===void 0?!1:tr,En=Se.hidetoolBar,xr=En===void 0?!1:En,Er=Se.fullScreen,rr=Er===void 0?!1:Er,ur=Se.onBlur,Rr=Se.onCMBeforeChange,Kr=Se.onFullScreen,ra=Se.className,fn=ra===void 0?"":ra,or=Se.disablePaste,sa=or===void 0?!1:or,ya=Se.placeholder,Jr=ya===void 0?"":ya,na=Se.values,te=na===void 0?"":na,W=Object(o.useState)(null),G=Object(P.a)(W,2),Q=G[0],ue=G[1],ee=Object(o.useState)(xt),qe=Object(P.a)(ee,2),tn=qe[0],An=qe[1],Vn=Object(o.useState)(Nt),un=Object(P.a)(Vn,2),nr=un[0],vn=un[1],dn=Object(o.useState)(rr),xn=Object(P.a)(dn,2),Nn=xn[0],dr=xn[1],$n=Object(o.useState)(""),Zn=Object(P.a)($n,2),kn=Zn[0],gr=Zn[1],Bn=Object(o.useState)(0),ar=Object(P.a)(Bn,2),sr=ar[0],Pn=ar[1],Tr=Object(o.useState)(Ot),Mr=Object(P.a)(Tr,2),Sr=Mr[0],hr=Mr[1],ne=Object(o.useState)(!1),Re=Object(P.a)(ne,2),Xe=Re[0],Le=Re[1],st=Object(o.useRef)(Object(xe.a)()),et=Object(o.useRef)(!1),pt=Object(o.useRef)(),mt=Object(o.useRef)(),it=Object(o.useRef)(),Mt=Object(o.useRef)(),Xt=Object(o.useRef)(),Vt=function(){var wt=Object(R.a)(b.a.mark(function It(){var Pt,Ct;return b.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,Object(ie.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:st.current}});case 2:Ct=Dn.sent,Ct!=null&&(Pt=Ct.attachments)!==null&&Pt!==void 0&&Pt.length&&(console.log("cm:",Q,mt),Ct.attachments.map(function($t){$t.content_type.indexOf("image")>-1?Q.replaceSelection("![,](/api/attachments/".concat($t.id,"?type=").concat($t.content_type,")")):$t.content_type.indexOf("video")>-1?Q.replaceSelection('<video width="100%" controls src="'.concat(v.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):$t.content_type.indexOf("pdf")>-1?Q.replaceSelection('<a href="'.concat(v.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat($t.content_type,'&disposition=inline" target="_blank">').concat($t.name,"</a>")):Q.replaceSelection("[".concat($t.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat($t.content_type,")"))}));case 4:case"end":return Dn.stop()}},It)}));return function(){return wt.apply(this,arguments)}}();Object(o.useEffect)(function(){An(te),Q==null||Q.setValue(te)},[te]),Object(o.useEffect)(function(){Kr==null||Kr(Nn)},[Nn]),Object(o.useEffect)(function(){if(mt.current){var wt=a.a.fromTextArea(mt.current,{mode:Zt,lineNumbers:!ft,lineWrapping:!0,value:xt,autoCloseTags:!0,autoCloseBrackets:!0});Fe&&wt.focus();function It(Pt,Ct){if(sa){Ct.preventDefault();return}var vt=Ct.clipboardData;if(vt){var Dn=vt.types.toString(),$t=vt.items;if(Dn==="Files"||vt.types.indexOf("Files")>-1){if(Ct.preventDefault(),Zt=="stex")return;try{var Cn,pn=$t[1];((Cn=$t[0])===null||Cn===void 0?void 0:Cn.kind)==="file"&&(pn=$t[0]);var Yt=pn.getAsFile(),Tn=Yt.name.split(".").pop();Je(Yt,function(zn){if(zn.id){var fr,Gn,Lr;(Yt==null||((fr=Yt.type)===null||fr===void 0)?void 0:fr.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(zn.id,"?type=").concat(zn.content_type,")")):(Yt==null||((Gn=Yt.type)===null||Gn===void 0)?void 0:Gn.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,'"></video>')):(Yt==null||((Lr=Yt.type)===null||Lr===void 0)?void 0:Lr.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,"?type=").concat(Yt.type,'&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):ae.includes(Tn)?wt.replaceSelection('<a href="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,'?type=office&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):wt.replaceSelection("[".concat(Yt.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,"?type=").concat(zn.content_type,")"))}else(zn==null?void 0:zn.status)===401&&(document.location.href="/user/login")})}catch(zn){T.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return wt.on("paste",It),wt.on("dragleave",function(Pt,Ct){it.current.classList.remove("mouse-hover-md")}),wt.on("dragover",function(Pt,Ct){it.current.classList.add("mouse-hover-md")}),wt.on("drop",function(Pt,Ct){it.current.classList.add("mouse-hover-md");var vt;if(vt=Ct.dataTransfer.files,vt.length>0){Ct.preventDefault(),Ct.stopPropagation();for(var Dn=function(pn){var Yt=vt[pn],Tn=Yt.name.split(".").pop();Je(Yt,function(zn){if(zn.id){var fr,Gn,Lr;(Yt==null||((fr=Yt.type)===null||fr===void 0)?void 0:fr.indexOf("image"))>-1?wt.replaceSelection("![,](/api/attachments/".concat(zn.id,"?type=").concat(zn.content_type,")")):(Yt==null||((Gn=Yt.type)===null||Gn===void 0)?void 0:Gn.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,'"></video>')):(Yt==null||((Lr=Yt.type)===null||Lr===void 0)?void 0:Lr.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,"?type=").concat(Yt.type,'&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):ae.includes(Tn)?wt.replaceSelection('<a href="'.concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,'?type=office&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):wt.replaceSelection("[".concat(Yt.name,"](").concat(v.a.API_SERVER,"/api/attachments/").concat(zn.id,"?type=").concat(zn.content_type,")"))}else(zn==null?void 0:zn.status)===401&&(document.location.href="/user/login")})},$t=0;$t<vt.length;$t++)Dn($t)}}),ue(wt),function(){wt.off("paste",It)}}},[]);var St=Object(o.useCallback)(function(){if(it.current)try{}catch(wt){console.log(wt,"---- to set md editor body height")}},[Sr,it,Nn]);Object(o.useEffect)(function(){function wt(){var Pt=new i.default(function(Ct){var vt=Object(I.a)(Ct),Dn;try{for(vt.s();!(Dn=vt.n()).done;){var $t=Dn.value;($t.target.offsetHeight>0||$t.target.offsetWidth>0)&&(St(),Q.setSize("100%","100%"),Q.refresh())}}catch(Cn){vt.e(Cn)}finally{vt.f()}});return Pt.observe(mt.current.parentElement),Pt}if(Q){var It=wt();return function(){It.unobserve(mt.current.parentElement)}}},[Q,St]),Object(o.useEffect)(function(){if(Q){for(var wt=[],It=function(){var $t=Ct[Pt];vt=Object(P.a)($t,2);var Cn=vt[0],pn=vt[1],Yt=Object(m.a)({},Cn,function(){nn(pn)});wt.push(Yt),Q.addKeyMap(Yt)},Pt=0,Ct=Object.entries(le);Pt<Ct.length;Pt++){var vt;It()}return pt.current=setInterval(function(){et.current&&Vt()},4e3),function(){clearInterval(pt.current);var Dn=Object(I.a)(wt),$t;try{for(Dn.s();!($t=Dn.n()).done;){var Cn=$t.value;Q.removeKeyMap(Cn)}}catch(pn){Dn.e(pn)}finally{Dn.f()}}}},[Q]),Object(o.useEffect)(function(){rr!==Nn&&dr(rr)},[rr]),Object(kt.a)(function(){if(!gn&&sr>0){var wt=new Date().getTime(),It=window.sessionStorage.getItem(lt);wt>=sr+Et&&(!It||It!==tn)&&(window.sessionStorage.setItem(lt,tn),Le(!0))}},Et),Object(o.useEffect)(function(){vn(Nt)},[Q,Nt]),Object(o.useEffect)(function(){Q&&(Fe&&Q.focus())},[Q,Fe]),Object(o.useEffect)(function(){if(nr&&Q){var wt=Q.getScrollerElement();function It(Pt){var Ct=Pt.target;if(Xt.current){var vt=Ct.scrollTop/Ct.scrollHeight;Xt.current.scrollTop=Xt.current.scrollHeight*vt}}return wt.addEventListener("scroll",It),function(){wt.removeEventListener("scroll",It)}}},[Q,nr]),Object(o.useEffect)(function(){if(Q&&Rr){function wt(It,Pt){Rr(It,Pt)}return Q.on("beforeChange",wt),function(){Q.off("beforeChange",wt)}}},[Q,Rr]),Object(o.useEffect)(function(){if(Q&&ur){function wt(){ur(Q.getValue())}return Q.on("blur",wt),function(){Q.off("blur",wt)}}},[Q,ur]),Object(o.useEffect)(function(){if(Q){function wt(It){var Pt=It.getValue();An(Pt),Pn(new Date().getTime()),It.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qt&&Qt(Pt)}return Q.on("change",wt),function(){Q.off("change",wt)}}},[Q,Qt]),Object(o.useEffect)(function(){Q&&(xt==null?(Q.setValue(""),An("")):xt!==Q.getValue()&&(Q.setValue(xt),An(xt),Q.setCursor(Q.lineCount(),0)))},[Q,xt]);var nn=Object(o.useCallback)(function(wt){var It=Q.getCursor(),Pt=Q.getSelection(),Ct=Pt.split(`
`);switch(wt){case"bold":return Q.replaceSelection("**"+Pt+"**"),Pt===""&&Q.setCursor(It.line,It.ch+2),Q.focus();case"italic":return Q.replaceSelection("*"+Pt+"*"),Pt===""&&Q.setCursor(It.line,It.ch+1),Q.focus();case"code":return Q.replaceSelection("`"+Pt+"`"),Pt===""&&Q.setCursor(It.line,It.ch+1),Q.focus();case"inline-latex":return Q.replaceSelection("`$$"+Pt+"$$`"),Pt===""&&Q.setCursor(It.line,It.ch+3),Q.focus();case"latex":return Q.replaceSelection("```latex\n"+Pt+"\n```"),Q.setCursor(It.line+1,Pt.length+1),Q.focus();case"line-break":return Q.replaceSelection(`<br/>
`),Q.focus();case"list-ul":return Pt===""?Q.replaceSelection("- "+Pt):Q.replaceSelection(Ct.map(function(vt){return vt===""?"":"- ".concat(vt)}).join(`
`)),Q.focus();case"list-ol":return Pt===""?Q.replaceSelection("1. "+Pt):Q.replaceSelection(Ct.map(function(vt,Dn){return vt===""?"":"".concat(Dn+1,". ").concat(vt)}).join(`
`)),Q.focus();case"add-null-ch":return Pt===""&&Q.setCursor(It.line,It.ch+1),Q.replaceSelection(Ze),Q.focus();case"inster-template-1":return Pt===""&&Q.setCursor(It.line,It.ch),Q.replaceSelection(dt),Q.focus();case"eraser":return Q.setValue(""),Q.focus();case"trigger-watch":return vn(!nr),Q.focus();case"trigger-full-screen":return dr(!Nn),Q.focus();case we:gr(we);return;case ct:gr(ct);return;case $e:gr($e);return;case yt:gr(yt);return;default:throw new Error}},[Q,nr,Nn]),Qe=Object(o.useCallback)(function(wt){gr("");switch(kn){case we:var It=wt.title,Pt=wt.link;return Q.replaceSelection("[".concat(It,"](").concat(Pt,")")),Q.focus();case ct:var Ct=wt.language,vt=wt.content;return Q.replaceSelection(["```"+Ct,vt,"```"].join(`
`)),Q.focus();case $e:var Dn=wt.src,$t=wt.alt;return $t?Q.replaceSelection("![ ".concat($t," ]( ").concat(Dn,' "').concat($t,'" )')):Q.replaceSelection("![,](".concat(Dn,")")),Q.focus();case yt:for(var Cn=wt.row,pn=wt.col,Yt=wt.align,Tn=`
`,zn=0;zn<Cn;zn++){for(var fr=[],Gn=[],Lr=0;Lr<pn;Lr++)zn===1&&Gn.push(We[Yt]),fr.push(" ");zn===1&&(Tn+="| ".concat(Gn.join(" | "),` |
`)),Tn+="| ".concat(fr.join(pn===1?"":" | "),` |
`)}return Q.replaceSelection(Tn+`
`),Q.focus();default:throw new Error}},[Q,kn]),en=Object(o.useMemo)(function(){switch(kn){case we:return u.a.createElement($,{callback:Qe,onCancel:Bt});case ct:return u.a.createElement(Z.b,{callback:Qe,onCancel:Bt});case $e:return u.a.createElement(ve,{callback:Qe,onCancel:Bt});case yt:return u.a.createElement(ht,{callback:Qe,onCancel:Bt});default:return null}},[kn]);function Bt(){gr("")}Object(o.useEffect)(function(){if(Mt.current){var wt=Mt.current,It=!1,Pt=0;function Ct($t){It=!0,Pt=$t.pageY}function vt(){It=!1}function Dn($t){if(It){var Cn=$t.pageY-Pt;Cn<0&&(Cn=0),Cn>300&&(Cn=300);var pn=Ot+Cn+"px";hr(pn)}}return wt.addEventListener("mousedown",Ct),document.addEventListener("mousemove",Dn),document.addEventListener("mouseup",vt),function(){wt.removeEventListener("mousedown",Ct),document.removeEventListener("mousemove",Dn),document.removeEventListener("mouseup",vt)}}},[Q,Mt]),Object(o.useEffect)(function(){hr(Ot)},[Ot]);var bn=Ne(gt),On=Ne(Sr),Gt={width:bn,height:On},cn=Object(o.useMemo)(function(){if(sr){var wt=new Date(sr),It=wt.getHours(),Pt=wt.getMinutes(),Ct=wt.getSeconds();return It=It<10?"0"+It:It,Pt=Pt<10?"0"+Pt:Pt,Ct=Ct<10?"0"+Ct:Ct,"".concat(It,":").concat(Pt,":").concat(Ct)}return 0},[sr]);function Ht(){window.sessionStorage.removeItem(lt),Le(!1),Pn(0)}function Sn(){Le(!1),Pn(0),Q.setValue(window.sessionStorage.getItem(lt))}function wn(wt,It){var Pt=Q.getValue();Pt=Pt.replace(wt,It),An(Pt),Q==null||Q.setValue(Pt)}return u.a.createElement(o.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:it},u.a.createElement("div",{className:"markdown-editor-container ".concat(fn," ").concat(nr?"on-preview":""," ").concat(ft?"mini":""," ").concat(Nn?"full-screen":""),style:Gt},u.a.createElement(g,{insertTemp:bt,watch:nr,fullScreen:Nn,showNullButton:Wn,onActionCallback:nn,hidetoolBar:xr,uuid:st.current,setOpenPhones:function(){et.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:mt,placeholder:Jr})),nr?u.a.createElement("div",{ref:Xt,className:"preview-container"},Zt==="stex"&&u.a.createElement(k,{value:tn}),Zt!=="stex"&&u.a.createElement(C.a,{edit:!0,value:tn,replaces:wn})):null))),Wt?u.a.createElement("a",{ref:Mt,className:"editor-resize"}):null,u.a.createElement(j.a,null,he[kn]?u.a.createElement(B.a,{centered:!0,title:he[kn],visible:!0,onCancel:Bt,footer:null,className:"markdown-popup-form"},en):null))}},P47w:function(Be,J,L){var Y=L("hydK"),B=Y.createElement,I=L("IMiH"),F=L("mFDi"),T=L("Fofx"),R=L("6GrX"),P=L("pzxd"),m=L("dqUG"),t=I.CMD,b=Array.prototype.join,o="none",u=Math.round,f=Math.sin,a=Math.cos,i=Math.PI,d=Math.PI*2,s=180/i,n=1e-4;function l(K){return u(K*1e4)/1e4}function c(K){return K<n&&K>-n}function x(K,$){var Z=$?K.textFill:K.fill;return Z!=null&&Z!==o}function A(K,$){var Z=$?K.textStroke:K.stroke;return Z!=null&&Z!==o}function C(K,$){$&&k(K,"transform","matrix("+b.call($,",")+")")}function k(K,$,Z){(!Z||Z.type!=="linear"&&Z.type!=="radial")&&K.setAttribute($,Z)}function w(K,$,Z){K.setAttributeNS("http://www.w3.org/1999/xlink",$,Z)}function y(K,$,Z,me){if(x($,Z)){var oe=Z?$.textFill:$.fill;oe=oe==="transparent"?o:oe,k(K,"fill",oe),k(K,"fill-opacity",$.fillOpacity!=null?$.fillOpacity*$.opacity:$.opacity)}else k(K,"fill",o);if(A($,Z)){var fe=Z?$.textStroke:$.stroke;fe=fe==="transparent"?o:fe,k(K,"stroke",fe);var ye=Z?$.textStrokeWidth:$.lineWidth,Ie=!Z&&$.strokeNoScale?me.getLineScale():1;k(K,"stroke-width",ye/Ie),k(K,"paint-order",Z?"stroke":"fill"),k(K,"stroke-opacity",$.strokeOpacity!=null?$.strokeOpacity:$.opacity);var ve=$.lineDash;ve?(k(K,"stroke-dasharray",$.lineDash.join(",")),k(K,"stroke-dashoffset",u($.lineDashOffset||0))):k(K,"stroke-dasharray",""),$.lineCap&&k(K,"stroke-linecap",$.lineCap),$.lineJoin&&k(K,"stroke-linejoin",$.lineJoin),$.miterLimit&&k(K,"stroke-miterlimit",$.miterLimit)}else k(K,"stroke",o)}function h(K){for(var $=[],Z=K.data,me=K.len(),oe=0;oe<me;){var fe=Z[oe++],ye="",Ie=0;switch(fe){case t.M:ye="M",Ie=2;break;case t.L:ye="L",Ie=2;break;case t.Q:ye="Q",Ie=4;break;case t.C:ye="C",Ie=6;break;case t.A:var ve=Z[oe++],de=Z[oe++],Je=Z[oe++],Rt=Z[oe++],Ee=Z[oe++],Me=Z[oe++],rt=Z[oe++],He=Z[oe++],ke=Math.abs(Me),ht=c(ke-d)||(He?Me>=d:-Me>=d),ie=Me>0?Me%d:Me%d+d,xe=!1;ht?xe=!0:c(ke)?xe=!1:xe=ie>=i===!!He;var we=l(ve+Je*a(Ee)),$e=l(de+Rt*f(Ee));ht&&(He?Me=d-1e-4:Me=-d+1e-4,xe=!0,oe===9&&$.push("M",we,$e));var ct=l(ve+Je*a(Ee+Me)),yt=l(de+Rt*f(Ee+Me));$.push("A",l(Je),l(Rt),u(rt*s),+xe,+He,ct,yt);break;case t.Z:ye="Z";break;case t.R:var ct=l(Z[oe++]),yt=l(Z[oe++]),Ut=l(Z[oe++]),We=l(Z[oe++]);$.push("M",ct,yt,"L",ct+Ut,yt,"L",ct+Ut,yt+We,"L",ct,yt+We,"L",ct,yt);break}ye&&$.push(ye);for(var kt=0;kt<Ie;kt++)$.push(l(Z[oe++]))}return $.join(" ")}var p={};p.brush=function(K){var $=K.style,Z=K.__svgEl;Z||(Z=B("path"),K.__svgEl=Z),K.path||K.createPathProxy();var me=K.path;if(K.__dirtyPath){me.beginPath(),me.subPixelOptimize=!1,K.buildPath(me,K.shape),K.__dirtyPath=!1;var oe=h(me);oe.indexOf("NaN")<0&&k(Z,"d",oe)}y(Z,$,!1,K),C(Z,K.transform),$.text!=null?S(K,K.getBoundingRect()):V(K)};var v={};v.brush=function(K){var $=K.style,Z=$.image;if(Z instanceof HTMLImageElement){var me=Z.src;Z=me}if(!Z)return;var oe=$.x||0,fe=$.y||0,ye=$.width,Ie=$.height,ve=K.__svgEl;ve||(ve=B("image"),K.__svgEl=ve),Z!==K.__imageSrc&&(w(ve,"href",Z),K.__imageSrc=Z),k(ve,"width",ye),k(ve,"height",Ie),k(ve,"x",oe),k(ve,"y",fe),C(ve,K.transform),$.text!=null?S(K,K.getBoundingRect()):V(K)};var _={},E=new F,g={},j=[],U={left:"start",right:"end",center:"middle",middle:"middle"},S=function(K,$){var Z=K.style,me=K.transform,oe=K instanceof m||Z.transformText;K.__dirty&&P.normalizeTextStyle(Z,!0);var fe=Z.text;if(fe!=null&&(fe+=""),!P.needDrawText(fe,Z))return;fe==null&&(fe=""),!oe&&me&&(E.copy($),E.applyTransform(me),$=E);var ye=K.__textSvgEl;ye||(ye=B("text"),K.__textSvgEl=ye);var Ie=ye.style,ve=Z.font||R.DEFAULT_FONT,de=ye.__computedFont;ve!==ye.__styleFont&&(Ie.font=ye.__styleFont=ve,de=ye.__computedFont=Ie.font);var Je=Z.textPadding,Rt=Z.textLineHeight,Ee=K.__textCotentBlock;(!Ee||K.__dirtyText)&&(Ee=K.__textCotentBlock=R.parsePlainText(fe,de,Je,Rt,Z.truncate));var Me=Ee.outerHeight,rt=Ee.lineHeight;P.getBoxPosition(g,K,Z,$);var He=g.baseX,ke=g.baseY,ht=g.textAlign||"left",ie=g.textVerticalAlign;z(ye,oe,me,Z,$,He,ke);var xe=R.adjustTextY(ke,Me,ie),we=He,$e=xe;Je&&(we=H(He,ht,Je),$e+=Je[0]),$e+=rt/2,y(ye,Z,!0,K);var ct=Ee.canCacheByTextString,yt=K.__tspanList||(K.__tspanList=[]),Ut=yt.length;if(ct&&K.__canCacheByTextString&&K.__text===fe){if(K.__dirtyText&&Ut)for(var We=0;We<Ut;++We)M(yt[We],ht,we,$e+We*rt)}else{K.__text=fe,K.__canCacheByTextString=ct;for(var kt=Ee.lines,qt=kt.length,We=0;We<qt;We++){var Pe=yt[We],Ae=kt[We];Pe?Pe.__zrText!==Ae&&(Pe.innerHTML="",Pe.appendChild(document.createTextNode(Ae))):(Pe=yt[We]=B("tspan"),ye.appendChild(Pe),Pe.appendChild(document.createTextNode(Ae))),M(Pe,ht,we,$e+We*rt)}if(Ut>qt){for(;We<Ut;We++)ye.removeChild(yt[We]);yt.length=qt}}};function z(K,$,Z,me,oe,fe,ye){T.identity(j),$&&Z&&T.copy(j,Z);var Ie=me.textRotation;if(oe&&Ie){var ve=me.textOrigin;ve==="center"?(fe=oe.width/2+oe.x,ye=oe.height/2+oe.y):ve&&(fe=ve[0]+oe.x,ye=ve[1]+oe.y),j[4]-=fe,j[5]-=ye,T.rotate(j,j,Ie),j[4]+=fe,j[5]+=ye}C(K,j)}function H(K,$,Z){return $==="right"?K-Z[1]:$==="center"?K+Z[3]/2-Z[1]/2:K+Z[3]}function M(K,$,Z,me){k(K,"dominant-baseline","middle"),k(K,"text-anchor",U[$]),k(K,"x",Z),k(K,"y",me)}function V(K){K&&K.__textSvgEl&&(K.__textSvgEl.parentNode&&K.__textSvgEl.parentNode.removeChild(K.__textSvgEl),K.__textSvgEl=null,K.__tspanList=[],K.__text=null)}_.drawRectText=S,_.brush=function(K){var $=K.style;$.text!=null?S(K,!1):V(K)},J.path=p,J.image=v,J.text=_},P4Qj:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.removeSensor=J.getSensor=void 0;var Y=F(L("chpo")),B=L("FxDU"),I=L("24YM");function F(m){return m&&m.__esModule?m:{default:m}}var T={},R=function(t){var b=t.getAttribute(I.SizeSensorId);if(b&&T[b])return T[b];var o=(0,Y.default)();t.setAttribute(I.SizeSensorId,o);var u=(0,B.createSensor)(t);return T[o]=u,u};J.getSensor=R;var P=function(t){var b=t.element.getAttribute(I.SizeSensorId);t.element.removeAttribute(I.SizeSensorId),t.destroy(),b&&T[b]&&delete T[b]};J.removeSensor=P},QBsz:function(Be,J){var L=typeof Float32Array=="undefined"?Array:Float32Array;function Y(y,h){var p=new L(2);return y==null&&(y=0),h==null&&(h=0),p[0]=y,p[1]=h,p}function B(y,h){return y[0]=h[0],y[1]=h[1],y}function I(y){var h=new L(2);return h[0]=y[0],h[1]=y[1],h}function F(y,h,p){return y[0]=h,y[1]=p,y}function T(y,h,p){return y[0]=h[0]+p[0],y[1]=h[1]+p[1],y}function R(y,h,p,v){return y[0]=h[0]+p[0]*v,y[1]=h[1]+p[1]*v,y}function P(y,h,p){return y[0]=h[0]-p[0],y[1]=h[1]-p[1],y}function m(y){return Math.sqrt(b(y))}var t=m;function b(y){return y[0]*y[0]+y[1]*y[1]}var o=b;function u(y,h,p){return y[0]=h[0]*p[0],y[1]=h[1]*p[1],y}function f(y,h,p){return y[0]=h[0]/p[0],y[1]=h[1]/p[1],y}function a(y,h){return y[0]*h[0]+y[1]*h[1]}function i(y,h,p){return y[0]=h[0]*p,y[1]=h[1]*p,y}function d(y,h){var p=m(h);return p===0?(y[0]=0,y[1]=0):(y[0]=h[0]/p,y[1]=h[1]/p),y}function s(y,h){return Math.sqrt((y[0]-h[0])*(y[0]-h[0])+(y[1]-h[1])*(y[1]-h[1]))}var n=s;function l(y,h){return(y[0]-h[0])*(y[0]-h[0])+(y[1]-h[1])*(y[1]-h[1])}var c=l;function x(y,h){return y[0]=-h[0],y[1]=-h[1],y}function A(y,h,p,v){return y[0]=h[0]+v*(p[0]-h[0]),y[1]=h[1]+v*(p[1]-h[1]),y}function C(y,h,p){var v=h[0],_=h[1];return y[0]=p[0]*v+p[2]*_+p[4],y[1]=p[1]*v+p[3]*_+p[5],y}function k(y,h,p){return y[0]=Math.min(h[0],p[0]),y[1]=Math.min(h[1],p[1]),y}function w(y,h,p){return y[0]=Math.max(h[0],p[0]),y[1]=Math.max(h[1],p[1]),y}J.create=Y,J.copy=B,J.clone=I,J.set=F,J.add=T,J.scaleAndAdd=R,J.sub=P,J.len=m,J.length=t,J.lenSquare=b,J.lengthSquare=o,J.mul=u,J.div=f,J.dot=a,J.scale=i,J.normalize=d,J.distance=s,J.dist=n,J.distanceSquare=l,J.distSquare=c,J.negate=x,J.lerp=A,J.applyTransform=C,J.min=k,J.max=w},"QO+J":function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.createSensor=void 0;var Y=I(L("NohK")),B=L("24YM");function I(T){return T&&T.__esModule?T:{default:T}}var F=function(R){var P=void 0,m=[],t=function(){getComputedStyle(R).position==="static"&&(R.style.position="relative");var i=document.createElement("object");return i.onload=function(){i.contentDocument.defaultView.addEventListener("resize",b),b()},i.style.display="block",i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.height="100%",i.style.width="100%",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.opacity="0",i.setAttribute("class",B.SensorClassName),i.setAttribute("tabindex",B.SensorTabIndex),i.type="text/html",R.appendChild(i),i.data="about:blank",i},b=(0,Y.default)(function(){m.forEach(function(a){a(R)})}),o=function(i){P||(P=t()),m.indexOf(i)===-1&&m.push(i)},u=function(){P&&P.parentNode&&(P.contentDocument&&P.contentDocument.defaultView.removeEventListener("resize",b),P.parentNode.removeChild(P),P=void 0,m=[])},f=function(i){var d=m.indexOf(i);d!==-1&&m.splice(d,1),m.length===0&&P&&u()};return{element:R,bind:o,destroy:u,unbind:f}};J.createSensor=F},Qe9p:function(Be,J,L){var Y=L("1RvN"),B={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 I(h){return h=Math.round(h),h<0?0:h>255?255:h}function F(h){return h=Math.round(h),h<0?0:h>360?360:h}function T(h){return h<0?0:h>1?1:h}function R(h){return h.length&&h.charAt(h.length-1)==="%"?I(parseFloat(h)/100*255):I(parseInt(h,10))}function P(h){return h.length&&h.charAt(h.length-1)==="%"?T(parseFloat(h)/100):T(parseFloat(h))}function m(h,p,v){return v<0?v+=1:v>1&&(v-=1),v*6<1?h+(p-h)*v*6:v*2<1?p:v*3<2?h+(p-h)*(2/3-v)*6:h}function t(h,p,v){return h+(p-h)*v}function b(h,p,v,_,E){return h[0]=p,h[1]=v,h[2]=_,h[3]=E,h}function o(h,p){return h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3],h}var u=new Y(20),f=null;function a(h,p){f&&o(f,p),f=u.put(h,f||p.slice())}function i(h,p){if(!h)return;p=p||[];var v=u.get(h);if(v)return o(p,v);h=h+"";var _=h.replace(/ /g,"").toLowerCase();if(_ in B)return o(p,B[_]),a(h,p),p;if(_.charAt(0)==="#"){if(_.length===4){var E=parseInt(_.substr(1),16);if(!(E>=0&&E<=4095)){b(p,0,0,0,1);return}return b(p,(E&3840)>>4|(E&3840)>>8,E&240|(E&240)>>4,E&15|(E&15)<<4,1),a(h,p),p}else if(_.length===7){var E=parseInt(_.substr(1),16);if(!(E>=0&&E<=16777215)){b(p,0,0,0,1);return}return b(p,(E&16711680)>>16,(E&65280)>>8,E&255,1),a(h,p),p}return}var g=_.indexOf("("),j=_.indexOf(")");if(g!==-1&&j+1===_.length){var U=_.substr(0,g),S=_.substr(g+1,j-(g+1)).split(","),z=1;switch(U){case"rgba":if(S.length!==4){b(p,0,0,0,1);return}z=P(S.pop());case"rgb":if(S.length!==3){b(p,0,0,0,1);return}return b(p,R(S[0]),R(S[1]),R(S[2]),z),a(h,p),p;case"hsla":if(S.length!==4){b(p,0,0,0,1);return}return S[3]=P(S[3]),d(S,p),a(h,p),p;case"hsl":if(S.length!==3){b(p,0,0,0,1);return}return d(S,p),a(h,p),p;default:return}}b(p,0,0,0,1);return}function d(h,p){var v=(parseFloat(h[0])%360+360)%360/360,_=P(h[1]),E=P(h[2]),g=E<=.5?E*(_+1):E+_-E*_,j=E*2-g;return p=p||[],b(p,I(m(j,g,v+1/3)*255),I(m(j,g,v)*255),I(m(j,g,v-1/3)*255),1),h.length===4&&(p[3]=h[3]),p}function s(h){if(!h)return;var p=h[0]/255,v=h[1]/255,_=h[2]/255,E=Math.min(p,v,_),g=Math.max(p,v,_),j=g-E,U=(g+E)/2,S,z;if(j===0)S=0,z=0;else{U<.5?z=j/(g+E):z=j/(2-g-E);var H=((g-p)/6+j/2)/j,M=((g-v)/6+j/2)/j,V=((g-_)/6+j/2)/j;p===g?S=V-M:v===g?S=1/3+H-V:_===g&&(S=2/3+M-H),S<0&&(S+=1),S>1&&(S-=1)}var K=[S*360,z,U];return h[3]!=null&&K.push(h[3]),K}function n(h,p){var v=i(h);if(v){for(var _=0;_<3;_++)p<0?v[_]=v[_]*(1-p)|0:v[_]=(255-v[_])*p+v[_]|0,v[_]>255?v[_]=255:h[_]<0&&(v[_]=0);return y(v,v.length===4?"rgba":"rgb")}}function l(h){var p=i(h);if(p)return((1<<24)+(p[0]<<16)+(p[1]<<8)+ +p[2]).toString(16).slice(1)}function c(h,p,v){if(!(p&&p.length)||!(h>=0&&h<=1))return;v=v||[];var _=h*(p.length-1),E=Math.floor(_),g=Math.ceil(_),j=p[E],U=p[g],S=_-E;return v[0]=I(t(j[0],U[0],S)),v[1]=I(t(j[1],U[1],S)),v[2]=I(t(j[2],U[2],S)),v[3]=T(t(j[3],U[3],S)),v}var x=c;function A(h,p,v){if(!(p&&p.length)||!(h>=0&&h<=1))return;var _=h*(p.length-1),E=Math.floor(_),g=Math.ceil(_),j=i(p[E]),U=i(p[g]),S=_-E,z=y([I(t(j[0],U[0],S)),I(t(j[1],U[1],S)),I(t(j[2],U[2],S)),T(t(j[3],U[3],S))],"rgba");return v?{color:z,leftIndex:E,rightIndex:g,value:_}:z}var C=A;function k(h,p,v,_){if(h=i(h),h)return h=s(h),p!=null&&(h[0]=F(p)),v!=null&&(h[1]=P(v)),_!=null&&(h[2]=P(_)),y(d(h),"rgba")}function w(h,p){if(h=i(h),h&&p!=null)return h[3]=T(p),y(h,"rgba")}function y(h,p){if(!h||!h.length)return;var v=h[0]+","+h[1]+","+h[2];return(p==="rgba"||p==="hsva"||p==="hsla")&&(v+=","+h[3]),p+"("+v+")"}J.parse=i,J.lift=n,J.toHex=l,J.fastLerp=c,J.fastMapToColor=x,J.lerp=A,J.mapToColor=C,J.modifyHSL=k,J.modifyAlpha=w,J.stringify=y},QuXc:function(Be,J){var L=function(B){this.colorStops=B||[]};L.prototype={constructor:L,addColorStop:function(B,I){this.colorStops.push({offset:B,color:I})}};var Y=L;Be.exports=Y},R5GN:function(Be,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("g9YV"),F=L("wCAj"),T=L("5NDa"),R=L("5rEg"),P=L("14J3"),m=L("BMrR"),t=L("iQDF"),b=L("+eQT"),o=L("miYZ"),u=L("tsqr"),f=L("jrin"),a=L("oBTY"),i=L("k1fw"),d=L("9og8"),s=L("y8nQ"),n=L("Vl3Y"),l=L("tJVT"),c=L("WmNS"),x=L.n(c),A=L("q1tI"),C=L.n(A),k=L("wd/R"),w=L.n(k),y=L("ErOA"),h=L("1vsH"),p=L("Ty5D"),v=L("9kvl"),_=L("eozf"),E=L("oUNq"),g=L("xKgJ"),j=function(S){var z=S.classroomList,H=S.dispatch,M=S.courseEndTime,V=Object(p.i)(),K=n.a.useForm(),$=Object(l.a)(K,1),Z=$[0],me=Object(A.useState)(1),oe=Object(l.a)(me,2),fe=oe[0],ye=oe[1],Ie=Object(A.useState)([]),ve=Object(l.a)(Ie,2),de=ve[0],Je=ve[1],Rt=Object(A.useState)(0),Ee=Object(l.a)(Rt,2),Me=Ee[0],rt=Ee[1],He=Object(A.useState)(2e4),ke=Object(l.a)(He,2),ht=ke[0],ie=ke[1],xe=Object(A.useState)(!0),we=Object(l.a)(xe,2),$e=we[0],ct=we[1],yt=Object(A.useState)([]),Ut=Object(l.a)(yt,2),We=Ut[0],kt=Ut[1],qt=Object(A.useState)(),Pe=Object(l.a)(qt,2),Ae=Pe[0],ut=Pe[1];Object(A.useEffect)(function(){z.actionTabs.key==="\u7ACB\u5373\u622A\u6B62"?Et():(kt([]),Je([]))},[z.actionTabs.key]);var Et=function(){var ae=Object(d.a)(x.a.mark(function le(he){var _e,Se,ze;return x.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return ct(!0),Qt.next=3,Object(E.D)(Object(i.a)(Object(i.a)({},V),{},{page:he||fe,limit:ht,homework_id:z.actionTabs.type===1?"":z.actionTabs.selectArrs[0],end_homework_action:!0}));case 3:_e=Qt.sent,_e==null||_e.course_groups.map(function(sn,gt){sn.key=sn.id}),_e&&(Je([].concat(Object(a.a)(de),Object(a.a)(_e==null?void 0:_e.course_groups))),rt(_e==null?void 0:_e.course_groups_count),ut(_e==null?void 0:_e.course_groups),ct(!1),he||Z.setFieldsValue((ze={},Object(f.a)(ze,"group_ids",_e==null||((Se=_e.course_groups)===null||Se===void 0)?void 0:Se.map(function(sn){return String(sn.id)})),Object(f.a)(ze,"end_time",w()(w()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),ze)));case 6:case"end":return Qt.stop()}},le)}));return function(he){return ae.apply(this,arguments)}}(),Ze=function(le){ye(le),Et(le)},dt=function(){var ae=Object(d.a)(x.a.mark(function le(){var he,_e;return x.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(he=Object(i.a)({},Z.getFieldsValue()),!(Ae!=null&&Ae.length&&!(We!=null&&We.length))){ze.next=4;break}return u.b.warning("\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u73ED\u7EA7"),ze.abrupt("return");case 4:return ze.next=6,Object(y.a)("/api/courses/".concat(V.coursesId,"/homework_commons/end_with_homework_list_position.json"),{method:"post",body:{homework_ids:Object(a.a)(z.actionTabs.selectArrs),group_ids:(We==null?void 0:We.length)>0?We:[],unified_setting:!(de!=null&&de.length),end_time:w()(he.end_time).format("YYYY-MM-DD HH:mm")}});case 6:_e=ze.sent,_e.status===0&&(Ne(),Object(h.cb)(["\u6559\u5B66\u8BFE\u5802","\u8BFE\u7A0B\u5B9E\u9A8C","\u7ACB\u5373\u622A\u6B62"]),u.b.success("\u64CD\u4F5C\u6210\u529F"),H({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}),Object(g.c)()?z.actionTabs.detail?(H({type:"classroomList/setActionTabs",payload:{}}),H({type:"shixunHomeworks/getWorkList",payload:Object(i.a)({},V)}),H({type:"shixunHomeworks/getWorkSetting",payload:Object(i.a)({},V)})):H({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(i.a)(Object(i.a)({},z.actionTabs.params),{},{type:4})}):H({type:"classroomList/getClassroomShixunsList",payload:Object(i.a)({},z.actionTabs.params)}));case 8:case"end":return ze.stop()}},le)}));return function(){return ae.apply(this,arguments)}}(),Ne=function(){ye(1),Je([])},Te=Me>fe*ht,Oe=z.detailShixunsList;return C.a.createElement(B.a,{centered:!0,title:"\u622A\u6B62\u4F5C\u4E1A",visible:z.actionTabs.key==="\u7ACB\u5373\u622A\u6B62",okText:"\u622A\u6B62\u4F5C\u4E1A",cancelText:"\u6682\u4E0D\u622A\u6B62",onOk:dt,onCancel:function(){Ne(),H({type:"classroomList/setActionTabs",payload:{}})}},C.a.createElement("p",{className:"tc"},"\u5B66\u751F\u5C06\u4E0D\u80FD\u518D\u63D0\u4EA4\u4F5C\u4E1A",C.a.createElement("br",null),'\u672C\u64CD\u4F5C\u53EA\u5BF9"\u63D0\u4EA4\u4E2D" \u201C\u8865\u4EA4\u4E2D\u201D\u7684\u4F5C\u4E1A\u6709\u6548'),de&&C.a.createElement(n.a,{form:Z},C.a.createElement(m.a,null,C.a.createElement("span",{className:"mr5"},"\u622A\u6B62\u65F6\u95F4:"),C.a.createElement(n.a.Item,{name:"end_time"},C.a.createElement(b.a,{style:{width:170},getPopupContainer:function(le){return le.parentNode},disabledDate:function(le){return Object(_.b)(le,M)},disabledTime:function(le){return Object(_.c)(le)},placeholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:w()(Object(h.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),(Ae==null?void 0:Ae.length)>0&&C.a.createElement(m.a,null,C.a.createElement("span",{className:"mr5"},"\u9009\u62E9\u73ED\u7EA7:"),C.a.createElement(R.a.Search,{style:{width:"300px"},onChange:function(le){Je(Ae.filter(function(he){return he.name.indexOf(le.target.value)>-1}))}})),(de==null?void 0:de.length)>0&&z.actionTabs.type===1&&C.a.createElement(F.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(le,he){kt(le)}},pagination:!1,dataSource:de,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"}]}),(de==null?void 0:de.length)>0&&z.actionTabs.type===2&&C.a.createElement(F.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(le,he){kt(le)}},pagination:!1,dataSource:de,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time",key:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time",key:"end_time"}]})))};J.a=Object(v.a)(function(U){var S=U.classroomList;return{classroomList:S}})(j)},RDYZ:function(Be,J,L){var Y=L("dMvE");function B(F){this._target=F.target,this._life=F.life||1e3,this._delay=F.delay||0,this._initialized=!1,this.loop=F.loop==null?!1:F.loop,this.gap=F.gap||0,this.easing=F.easing||"Linear",this.onframe=F.onframe,this.ondestroy=F.ondestroy,this.onrestart=F.onrestart,this._pausedTime=0,this._paused=!1}B.prototype={constructor:B,step:function(F,T){if(this._initialized||(this._startTime=F+this._delay,this._initialized=!0),this._paused){this._pausedTime+=T;return}var R=(F-this._startTime-this._pausedTime)/this._life;if(R<0)return;R=Math.min(R,1);var P=this.easing,m=typeof P=="string"?Y[P]:P,t=typeof m=="function"?m(R):R;return this.fire("frame",t),R===1?this.loop?(this.restart(F),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(F){var T=(F-this._startTime-this._pausedTime)%this._life;this._startTime=F-T+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(F,T){F="on"+F,this[F]&&this[F](this._target,T)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var I=B;Be.exports=I},RXMa:function(Be,J,L){var Y=L("y+Vt"),B=Y.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(I,F){var T=F.cx,R=F.cy,P=Math.PI*2;I.moveTo(T+F.r,R),I.arc(T,R,F.r,0,P,!1),I.moveTo(T+F.r0,R),I.arc(T,R,F.r0,0,P,!0)}});Be.exports=B},RotF:function(Be,J,L){Be.exports=L("LSTS")},"SA+Z":function(Be,J,L){var Y=L("wTVA"),B=L("EbDI"),I=L("ZhPi"),F=L("wkBT");function T(R){return Y(R)||B(R)||I(R)||F()}Be.exports=T,Be.exports.__esModule=!0,Be.exports.default=Be.exports},SJMd:function(Be,J){/**
* @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 L,Y,B,I=!1,F,T;window.PR_SHOULD_USE_CONTINUATION=!0;var R,P;(function(){var m=window,t=["break,continue,do,else,for,if,return,while"],b=[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"],o=[b,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[o,"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"],f=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",d=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[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"],l=[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"],c=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],x=[u,a,f,d,s,n,l,c],A=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,C="str",k="kwd",w="com",y="typ",h="lit",p="pun",v="pln",_="tag",E="dec",g="src",j="atn",U="atv",S="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(He){for(var ke=0,ht=!1,ie=!1,xe=0,we=He.length;xe<we;++xe){var $e=He[xe];if($e.ignoreCase)ie=!0;else if(/[a-z]/i.test($e.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ht=!0,ie=!1;break}}var ct={b:8,t:9,n:10,v:11,f:12,r:13};function yt(Pe){var Ae=Pe.charCodeAt(0);if(Ae!==92)return Ae;var ut=Pe.charAt(1);return Ae=ct[ut],Ae||("0"<=ut&&ut<="7"?parseInt(Pe.substring(1),8):ut==="u"||ut==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function Ut(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ae=String.fromCharCode(Pe);return Ae==="\\"||Ae==="-"||Ae==="]"||Ae==="^"?"\\"+Ae:Ae}function We(Pe){var Ae=Pe.substring(1,Pe.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")),ut=[],Et=Ae[0]==="^",Ze=["["];Et&&Ze.push("^");for(var dt=Et?1:0,Ne=Ae.length;dt<Ne;++dt){var Te=Ae[dt];if(/\\[bdsw]/i.test(Te))Ze.push(Te);else{var Oe=yt(Te),ae;dt+2<Ne&&Ae[dt+1]==="-"?(ae=yt(Ae[dt+2]),dt+=2):ae=Oe,ut.push([Oe,ae]),ae<65||Oe>122||(ae<65||Oe>90||ut.push([Math.max(65,Oe)|32,Math.min(ae,90)|32]),ae<97||Oe>122||ut.push([Math.max(97,Oe)&~32,Math.min(ae,122)&~32]))}}ut.sort(function(Se,ze){return Se[0]-ze[0]||ze[1]-Se[1]});for(var le=[],he=[],dt=0;dt<ut.length;++dt){var _e=ut[dt];_e[0]<=he[1]+1?he[1]=Math.max(he[1],_e[1]):le.push(he=_e)}for(var dt=0;dt<le.length;++dt){var _e=le[dt];Ze.push(Ut(_e[0])),_e[1]>_e[0]&&(_e[1]+1>_e[0]&&Ze.push("-"),Ze.push(Ut(_e[1])))}return Ze.push("]"),Ze.join("")}function kt(Pe){for(var Ae=Pe.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")),ut=Ae.length,Et=[],Ze=0,dt=0;Ze<ut;++Ze){var Ne=Ae[Ze];if(Ne==="(")++dt;else if(Ne.charAt(0)==="\\"){var Te=+Ne.substring(1);Te&&(Te<=dt?Et[Te]=-1:Ae[Ze]=Ut(Te))}}for(var Ze=1;Ze<Et.length;++Ze)Et[Ze]===-1&&(Et[Ze]=++ke);for(var Ze=0,dt=0;Ze<ut;++Ze){var Ne=Ae[Ze];if(Ne==="(")++dt,Et[dt]||(Ae[Ze]="(?:");else if(Ne.charAt(0)==="\\"){var Te=+Ne.substring(1);Te&&Te<=dt&&(Ae[Ze]="\\"+Et[Te])}}for(var Ze=0;Ze<ut;++Ze)Ae[Ze]==="^"&&Ae[Ze+1]!=="^"&&(Ae[Ze]="");if(Pe.ignoreCase&&ht)for(var Ze=0;Ze<ut;++Ze){var Ne=Ae[Ze],Oe=Ne.charAt(0);Ne.length>=2&&Oe==="["?Ae[Ze]=We(Ne):Oe!=="\\"&&(Ae[Ze]=Ne.replace(/[a-zA-Z]/g,function(he){var _e=he.charCodeAt(0);return"["+String.fromCharCode(_e&~32,_e|32)+"]"}))}return Ae.join("")}for(var qt=[],xe=0,we=He.length;xe<we;++xe){var $e=He[xe];if($e.global||$e.multiline)throw new Error(""+$e);qt.push("(?:"+kt($e)+")")}return new RegExp(qt.join("|"),ie?"gi":"g")}function M(He,ke){var ht=/(?:^|\s)nocode(?:\s|$)/,ie=[],xe=0,we=[],$e=0;function ct(yt){var Ut=yt.nodeType;if(Ut==1){if(ht.test(yt.className))return;for(var We=yt.firstChild;We;We=We.nextSibling)ct(We);var kt=yt.nodeName.toLowerCase();(kt==="br"||kt==="li")&&(ie[$e]=`
`,we[$e<<1]=xe++,we[$e++<<1|1]=yt)}else if(Ut==3||Ut==4){var qt=yt.nodeValue;qt.length&&(ke?qt=qt.replace(/\r\n?/g,`
`):qt=qt.replace(/[ \t\r\n]+/g," "),ie[$e]=qt,we[$e<<1]=xe,xe+=qt.length,we[$e++<<1|1]=yt)}}return ct(He),{sourceCode:ie.join("").replace(/\n$/,""),spans:we}}function V(He,ke,ht,ie,xe){if(!ht)return;var we={sourceNode:He,pre:1,langExtension:null,numberLines:null,sourceCode:ht,spans:null,basePos:ke,decorations:null};ie(we),xe.push.apply(xe,we.decorations)}var K=/\S/;function $(He){for(var ke=void 0,ht=He.firstChild;ht;ht=ht.nextSibling){var ie=ht.nodeType;ke=ie===1?ke?He:ht:ie===3&&K.test(ht.nodeValue)?He:ke}return ke===He?void 0:ke}function Z(He,ke){var ht={},ie;(function(){for(var $e=He.concat(ke),ct=[],yt={},Ut=0,We=$e.length;Ut<We;++Ut){var kt=$e[Ut],qt=kt[3];if(qt)for(var Pe=qt.length;--Pe>=0;)ht[qt.charAt(Pe)]=kt;var Ae=kt[1],ut=""+Ae;yt.hasOwnProperty(ut)||(ct.push(Ae),yt[ut]=null)}ct.push(/[\0-\uffff]/),ie=H(ct)})();var xe=ke.length,we=function($e){for(var ct=$e.sourceCode,yt=$e.basePos,Ut=$e.sourceNode,We=[yt,v],kt=0,qt=ct.match(ie)||[],Pe={},Ae=0,ut=qt.length;Ae<ut;++Ae){var Et=qt[Ae],Ze=Pe[Et],dt=void 0,Ne;if(typeof Ze=="string")Ne=!1;else{var Te=ht[Et.charAt(0)];if(Te)dt=Et.match(Te[1]),Ze=Te[0];else{for(var Oe=0;Oe<xe;++Oe)if(Te=ke[Oe],dt=Et.match(Te[1]),dt){Ze=Te[0];break}dt||(Ze=v)}Ne=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ne&&!(dt&&typeof dt[1]=="string")&&(Ne=!1,Ze=g),Ne||(Pe[Et]=Ze)}var ae=kt;if(kt+=Et.length,!Ne)We.push(yt+ae,Ze);else{var le=dt[1],he=Et.indexOf(le),_e=he+le.length;dt[2]&&(_e=Et.length-dt[2].length,he=_e-le.length);var Se=Ze.substring(5);V(Ut,yt+ae,Et.substring(0,he),we,We),V(Ut,yt+ae+he,le,de(Se,le),We),V(Ut,yt+ae+_e,Et.substring(_e),we,We)}}$e.decorations=We};return we}function me(He){var ke=[],ht=[];He.tripleQuotedStrings?ke.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):He.multiLineStrings?ke.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ke.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),He.verbatimStrings&&ht.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ie=He.hashComments;ie&&(He.cStyleComments?(ie>1?ke.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ke.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ht.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ke.push([w,/^#[^\r\n]*/,null,"#"])),He.cStyleComments&&(ht.push([w,/^\/\/[^\r\n]*/,null]),ht.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=He.regexLiterals;if(xe){var we=xe>1?"":`
\r`,$e=we?".":"[\\S\\s]",ct="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+$e+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+$e+")*(?:\\x5D|$))+/";ht.push(["lang-regex",RegExp("^"+z+"("+ct+")")])}var yt=He.types;yt&&ht.push([y,yt]);var Ut=(""+He.keywords).replace(/^ | $/g,"");Ut.length&&ht.push([k,new RegExp("^(?:"+Ut.replace(/[\s,]+/g,"|")+")\\b"),null]),ke.push([v,/^\s+/,null,` \r
\xA0`]);var We="^.[^\\s\\w.$@'\"`/\\\\]*";return He.regexLiterals&&(We+="(?!s*/)"),ht.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[v,/^[a-z_$][a-z_$@0-9]*/i,null],[h,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[v,/^\\[\s\S]?/,null],[p,new RegExp(We),null]),Z(ke,ht)}var oe=me({keywords:x,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(He,ke,ht){for(var ie=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,we=He.ownerDocument,$e=we.createElement("li");He.firstChild;)$e.appendChild(He.firstChild);var ct=[$e];function yt(Ae){var ut=Ae.nodeType;if(ut==1&&!ie.test(Ae.className))if(Ae.nodeName==="br")Ut(Ae),Ae.parentNode&&Ae.parentNode.removeChild(Ae);else for(var Et=Ae.firstChild;Et;Et=Et.nextSibling)yt(Et);else if((ut==3||ut==4)&&ht){var Ze=Ae.nodeValue,dt=Ze.match(xe);if(dt){var Ne=Ze.substring(0,dt.index);Ae.nodeValue=Ne;var Te=Ze.substring(dt.index+dt[0].length);if(Te){var Oe=Ae.parentNode;Oe.insertBefore(we.createTextNode(Te),Ae.nextSibling)}Ut(Ae),Ne||Ae.parentNode.removeChild(Ae)}}}function Ut(Ae){for(;!Ae.nextSibling;)if(Ae=Ae.parentNode,!Ae)return;function ut(dt,Ne){var Te=Ne?dt.cloneNode(!1):dt,Oe=dt.parentNode;if(Oe){var ae=ut(Oe,1),le=dt.nextSibling;ae.appendChild(Te);for(var he=le;he;he=le)le=he.nextSibling,ae.appendChild(he)}return Te}for(var Et=ut(Ae.nextSibling,0),Ze;(Ze=Et.parentNode)&&Ze.nodeType===1;)Et=Ze;ct.push(Et)}for(var We=0;We<ct.length;++We)yt(ct[We]);ke===(ke|0)&&ct[0].setAttribute("value",ke);var kt=we.createElement("ol");kt.className="linenums";for(var qt=Math.max(0,ke-1|0)||0,We=0,Pe=ct.length;We<Pe;++We)$e=ct[We],$e.className="L"+(We+qt)%10,$e.firstChild||$e.appendChild(we.createTextNode("\xA0")),kt.appendChild($e);He.appendChild(kt)}function ye(He){var ke=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ke=ke&&+ke[1]<=8;var ht=/\n/g,ie=He.sourceCode,xe=ie.length,we=0,$e=He.spans,ct=$e.length,yt=0,Ut=He.decorations,We=Ut.length,kt=0;Ut[We]=xe;var qt,Pe;for(Pe=qt=0;Pe<We;)Ut[Pe]!==Ut[Pe+2]?(Ut[qt++]=Ut[Pe++],Ut[qt++]=Ut[Pe++]):Pe+=2;for(We=qt,Pe=qt=0;Pe<We;){for(var Ae=Ut[Pe],ut=Ut[Pe+1],Et=Pe+2;Et+2<=We&&Ut[Et+1]===ut;)Et+=2;Ut[qt++]=Ae,Ut[qt++]=ut,Pe=Et}We=Ut.length=qt;var Ze=He.sourceNode,dt="";Ze&&(dt=Ze.style.display,Ze.style.display="none");try{for(var Ne=null;yt<ct;){var Te=$e[yt],Oe=$e[yt+2]||xe,ae=Ut[kt+2]||xe,Et=Math.min(Oe,ae),le=$e[yt+1],he;if(le.nodeType!==1&&(he=ie.substring(we,Et))){ke&&(he=he.replace(ht,"\r")),le.nodeValue=he;var _e=le.ownerDocument,Se=_e.createElement("span");Se.className=Ut[kt+1];var ze=le.parentNode;ze.replaceChild(Se,le),Se.appendChild(le),we<Oe&&($e[yt+1]=le=_e.createTextNode(ie.substring(Et,Oe)),ze.insertBefore(le,Se.nextSibling))}we=Et,we>=Oe&&(yt+=2),we>=ae&&(kt+=2)}}finally{Ze&&(Ze.style.display=dt)}}var Ie={};function ve(He,ke){for(var ht=ke.length;--ht>=0;){var ie=ke[ht];Ie.hasOwnProperty(ie)?m.console&&console.warn("cannot override language handler %s",ie):Ie[ie]=He}}function de(He,ke){return He&&Ie.hasOwnProperty(He)||(He=/^\s*</.test(ke)?"default-markup":"default-code"),Ie[He]}ve(oe,["default-code"]),ve(Z([],[[v,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["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"]),ve(Z([[v,/^[\s]+/,null,` \r
`],[U,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[_,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[j,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["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"]),ve(Z([],[[U,/^[\s\S]+/]]),["uq.val"]),ve(me({keywords:u,hashComments:!0,cStyleComments:!0,types:A}),["c","cc","cpp","cxx","cyc","m"]),ve(me({keywords:"null,true,false"}),["json"]),ve(me({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:A}),["cs"]),ve(me({keywords:f,cStyleComments:!0}),["java"]),ve(me({keywords:c,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ve(me({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ve(me({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ve(me({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ve(me({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ve(me({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ve(Z([],[[C,/^[\s\S]+/]]),["regex"]);function Je(He){var ke=He.langExtension;try{var ht=M(He.sourceNode,He.pre),ie=ht.sourceCode;He.sourceCode=ie,He.spans=ht.spans,He.basePos=0,de(ke,ie)(He),ye(He)}catch(xe){m.console&&console.log(xe&&xe.stack||xe)}}function Rt(He,ke,ht){var ie=ht||!1,xe=ke||null,we=document.createElement("div");we.innerHTML="<pre>"+He+"</pre>",we=we.firstChild,ie&&fe(we,ie,!0);var $e={langExtension:xe,numberLines:ie,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Je($e),we.innerHTML}function Ee(He,ke){var ht=ke||document.body,ie=ht.ownerDocument||document;function xe(Te){return ht.getElementsByTagName(Te)}for(var we=[xe("pre"),xe("code"),xe("xmp")],$e=[],ct=0;ct<we.length;++ct)for(var yt=0,Ut=we[ct].length;yt<Ut;++yt)$e.push(we[ct][yt]);we=null;var We=Date;We.now||(We={now:function(){return+new Date}});var kt=0,qt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ae=/\bprettyprinted\b/,ut=/pre|xmp/i,Et=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,dt={};function Ne(){for(var Te=m.PR_SHOULD_USE_CONTINUATION?We.now()+250:Infinity;kt<$e.length&&We.now()<Te;kt++){for(var Oe=$e[kt],ae=dt,le=Oe;le=le.previousSibling;){var he=le.nodeType,_e=(he===7||he===8)&&le.nodeValue;if(_e?!/^\??prettify\b/.test(_e):he!==3||/\S/.test(le.nodeValue))break;if(_e){ae={},_e.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Nt,bt,Kt){ae[bt]=Kt});break}}var Se=Oe.className;if((ae!==dt||Pe.test(Se))&&!Ae.test(Se)){for(var ze=!1,xt=Oe.parentNode;xt;xt=xt.parentNode){var Qt=xt.tagName;if(Ze.test(Qt)&&xt.className&&Pe.test(xt.className)){ze=!0;break}}if(!ze){Oe.className+=" prettyprinted";var sn=ae.lang;if(!sn){sn=Se.match(qt);var gt;!sn&&(gt=$(Oe))&&Et.test(gt.tagName)&&(sn=gt.className.match(qt)),sn&&(sn=sn[1])}var zt;if(ut.test(Oe.tagName))zt=1;else{var Ot=Oe.currentStyle,At=ie.defaultView,ft=Ot?Ot.whiteSpace:At&&At.getComputedStyle?At.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;zt=ft&&ft.substring(0,3)==="pre"}var be=ae.linenums;(be=be==="true"||+be)||(be=Se.match(/\blinenums\b(?::(\d+))?/),be=be?be[1]&&be[1].length?+be[1]:!0:!1),be&&fe(Oe,be,zt);var Fe={langExtension:sn,sourceNode:Oe,numberLines:be,pre:zt,sourceCode:null,basePos:null,spans:null,decorations:null};Je(Fe)}}}kt<$e.length?m.setTimeout(Ne,250):typeof He=="function"&&He()}Ne()}var Me=m.PR={createSimpleLexer:Z,registerLangHandler:ve,sourceDecorator:me,PR_ATTRIB_NAME:j,PR_ATTRIB_VALUE:U,PR_COMMENT:w,PR_DECLARATION:E,PR_KEYWORD:k,PR_LITERAL:h,PR_NOCODE:S,PR_PLAIN:v,PR_PUNCTUATION:p,PR_SOURCE:g,PR_STRING:C,PR_TAG:_,PR_TYPE:y,prettyPrintOne:I?m.prettyPrintOne=Rt:R=Rt,prettyPrint:P=I?m.prettyPrint=Ee:P=Ee},rt=m.define;typeof rt=="function"&&rt.amd&&rt("google-code-prettify",[],function(){return Me})})()},SKnc:function(Be,J,L){var Y=L("bYtY"),B=L("QuXc"),I=function(T,R,P,m,t,b){this.x=T==null?0:T,this.y=R==null?0:R,this.x2=P==null?1:P,this.y2=m==null?0:m,this.type="linear",this.global=b||!1,B.call(this,t)};I.prototype={constructor:I},Y.inherits(I,B);var F=I;Be.exports=F},SUKs:function(Be,J,L){var Y=L("LPTA"),B=Y.debugMode,I=function(){};B===1&&(I=console.error);var F=I;Be.exports=F},Sj9i:function(Be,J,L){var Y=L("QBsz"),B=Y.create,I=Y.distSquare,F=Math.pow,T=Math.sqrt,R=1e-8,P=1e-4,m=T(3),t=1/3,b=B(),o=B(),u=B();function f(h){return h>-R&&h<R}function a(h){return h>R||h<-R}function i(h,p,v,_,E){var g=1-E;return g*g*(g*h+3*E*p)+E*E*(E*_+3*g*v)}function d(h,p,v,_,E){var g=1-E;return 3*(((p-h)*g+2*(v-p)*E)*g+(_-v)*E*E)}function s(h,p,v,_,E,g){var j=_+3*(p-v)-h,U=3*(v-p*2+h),S=3*(p-h),z=h-E,H=U*U-3*j*S,M=U*S-9*j*z,V=S*S-3*U*z,K=0;if(f(H)&&f(M))if(f(U))g[0]=0;else{var $=-S/U;$>=0&&$<=1&&(g[K++]=$)}else{var Z=M*M-4*H*V;if(f(Z)){var me=M/H,$=-U/j+me,oe=-me/2;$>=0&&$<=1&&(g[K++]=$),oe>=0&&oe<=1&&(g[K++]=oe)}else if(Z>0){var fe=T(Z),ye=H*U+1.5*j*(-M+fe),Ie=H*U+1.5*j*(-M-fe);ye<0?ye=-F(-ye,t):ye=F(ye,t),Ie<0?Ie=-F(-Ie,t):Ie=F(Ie,t);var $=(-U-(ye+Ie))/(3*j);$>=0&&$<=1&&(g[K++]=$)}else{var ve=(2*H*U-3*j*M)/(2*T(H*H*H)),de=Math.acos(ve)/3,Je=T(H),Rt=Math.cos(de),$=(-U-2*Je*Rt)/(3*j),oe=(-U+Je*(Rt+m*Math.sin(de)))/(3*j),Ee=(-U+Je*(Rt-m*Math.sin(de)))/(3*j);$>=0&&$<=1&&(g[K++]=$),oe>=0&&oe<=1&&(g[K++]=oe),Ee>=0&&Ee<=1&&(g[K++]=Ee)}}return K}function n(h,p,v,_,E){var g=6*v-12*p+6*h,j=9*p+3*_-3*h-9*v,U=3*p-3*h,S=0;if(f(j)){if(a(g)){var z=-U/g;z>=0&&z<=1&&(E[S++]=z)}}else{var H=g*g-4*j*U;if(f(H))E[0]=-g/(2*j);else if(H>0){var M=T(H),z=(-g+M)/(2*j),V=(-g-M)/(2*j);z>=0&&z<=1&&(E[S++]=z),V>=0&&V<=1&&(E[S++]=V)}}return S}function l(h,p,v,_,E,g){var j=(p-h)*E+h,U=(v-p)*E+p,S=(_-v)*E+v,z=(U-j)*E+j,H=(S-U)*E+U,M=(H-z)*E+z;g[0]=h,g[1]=j,g[2]=z,g[3]=M,g[4]=M,g[5]=H,g[6]=S,g[7]=_}function c(h,p,v,_,E,g,j,U,S,z,H){var M,V=.005,K=Infinity,$,Z,me,oe;b[0]=S,b[1]=z;for(var fe=0;fe<1;fe+=.05)o[0]=i(h,v,E,j,fe),o[1]=i(p,_,g,U,fe),me=I(b,o),me<K&&(M=fe,K=me);K=Infinity;for(var ye=0;ye<32&&!(V<P);ye++)$=M-V,Z=M+V,o[0]=i(h,v,E,j,$),o[1]=i(p,_,g,U,$),me=I(o,b),$>=0&&me<K?(M=$,K=me):(u[0]=i(h,v,E,j,Z),u[1]=i(p,_,g,U,Z),oe=I(u,b),Z<=1&&oe<K?(M=Z,K=oe):V*=.5);return H&&(H[0]=i(h,v,E,j,M),H[1]=i(p,_,g,U,M)),T(K)}function x(h,p,v,_){var E=1-_;return E*(E*h+2*_*p)+_*_*v}function A(h,p,v,_){return 2*((1-_)*(p-h)+_*(v-p))}function C(h,p,v,_,E){var g=h-2*p+v,j=2*(p-h),U=h-_,S=0;if(f(g)){if(a(j)){var z=-U/j;z>=0&&z<=1&&(E[S++]=z)}}else{var H=j*j-4*g*U;if(f(H)){var z=-j/(2*g);z>=0&&z<=1&&(E[S++]=z)}else if(H>0){var M=T(H),z=(-j+M)/(2*g),V=(-j-M)/(2*g);z>=0&&z<=1&&(E[S++]=z),V>=0&&V<=1&&(E[S++]=V)}}return S}function k(h,p,v){var _=h+v-2*p;return _===0?.5:(h-p)/_}function w(h,p,v,_,E){var g=(p-h)*_+h,j=(v-p)*_+p,U=(j-g)*_+g;E[0]=h,E[1]=g,E[2]=U,E[3]=U,E[4]=j,E[5]=v}function y(h,p,v,_,E,g,j,U,S){var z,H=.005,M=Infinity;b[0]=j,b[1]=U;for(var V=0;V<1;V+=.05){o[0]=x(h,v,E,V),o[1]=x(p,_,g,V);var K=I(b,o);K<M&&(z=V,M=K)}M=Infinity;for(var $=0;$<32&&!(H<P);$++){var Z=z-H,me=z+H;o[0]=x(h,v,E,Z),o[1]=x(p,_,g,Z);var K=I(o,b);if(Z>=0&&K<M)z=Z,M=K;else{u[0]=x(h,v,E,me),u[1]=x(p,_,g,me);var oe=I(u,b);me<=1&&oe<M?(z=me,M=oe):H*=.5}}return S&&(S[0]=x(h,v,E,z),S[1]=x(p,_,g,z)),T(M)}J.cubicAt=i,J.cubicDerivativeAt=d,J.cubicRootAt=s,J.cubicExtrema=n,J.cubicSubdivide=l,J.cubicProjectPoint=c,J.quadraticAt=x,J.quadraticDerivativeAt=A,J.quadraticRootAt=C,J.quadraticExtremum=k,J.quadraticSubdivide=w,J.quadraticProjectPoint=y},SqI9:function(Be,J,L){var Y=L("y+Vt"),B=L("iXp4"),I=Y.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:B(Y.prototype.brush),buildPath:function(F,T){var R=T.cx,P=T.cy,m=Math.max(T.r0||0,0),t=Math.max(T.r,0),b=T.startAngle,o=T.endAngle,u=T.clockwise,f=Math.cos(b),a=Math.sin(b);F.moveTo(f*m+R,a*m+P),F.lineTo(f*t+R,a*t+P),F.arc(R,P,t,b,o,!u),F.lineTo(Math.cos(o)*m+R,Math.sin(o)*m+P),m!==0&&F.arc(R,P,m,o,b,u),F.closePath()}});Be.exports=I},SrGk:function(Be,J,L){var Y=L("hydK"),B=Y.createElement,I=L("bYtY"),F=L("y+Vt"),T=L("Dagg"),R=L("dqUG"),P=L("P47w"),m=P.path,t=P.image,b=P.text,o="0",u="1";function f(i,d,s,n,l){this._zrId=i,this._svgRoot=d,this._tagNames=typeof s=="string"?[s]:s,this._markLabel=n,this._domName=l||"_dom",this.nextId=0}f.prototype.createElement=B,f.prototype.getDefs=function(i){var d=this._svgRoot,s=this._svgRoot.getElementsByTagName("defs");return s.length===0?i?(s=d.insertBefore(this.createElement("defs"),d.firstChild),s.contains||(s.contains=function(n){var l=s.children;if(!l)return!1;for(var c=l.length-1;c>=0;--c)if(l[c]===n)return!0;return!1}),s):null:s[0]},f.prototype.update=function(i,d){if(!i)return;var s=this.getDefs(!1);if(i[this._domName]&&s.contains(i[this._domName]))typeof d=="function"&&d(i);else{var n=this.add(i);n&&(i[this._domName]=n)}},f.prototype.addDom=function(i){var d=this.getDefs(!0);d.appendChild(i)},f.prototype.removeDom=function(i){var d=this.getDefs(!1);d&&i[this._domName]&&(d.removeChild(i[this._domName]),i[this._domName]=null)},f.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var d=[];return I.each(this._tagNames,function(s){var n=i.getElementsByTagName(s);d=d.concat([].slice.call(n))}),d},f.prototype.markAllUnused=function(){var i=this.getDoms(),d=this;I.each(i,function(s){s[d._markLabel]=o})},f.prototype.markUsed=function(i){i&&(i[this._markLabel]=u)},f.prototype.removeUnused=function(){var i=this.getDefs(!1);if(!i)return;var d=this.getDoms(),s=this;I.each(d,function(n){n[s._markLabel]!==u&&i.removeChild(n)})},f.prototype.getSvgProxy=function(i){return i instanceof F?m:i instanceof T?t:i instanceof R?b:m},f.prototype.getTextSvgElement=function(i){return i.__textSvgEl},f.prototype.getSvgElement=function(i){return i.__svgEl};var a=f;Be.exports=a},T6xi:function(Be,J,L){var Y=L("YgsL"),B=L("nCxF");function I(F,T,R){var P=T.points,m=T.smooth;if(P&&P.length>=2){if(m&&m!=="spline"){var t=B(P,m,R,T.smoothConstraint);F.moveTo(P[0][0],P[0][1]);for(var b=P.length,o=0;o<(R?b:b-1);o++){var u=t[o*2],f=t[o*2+1],a=P[(o+1)%b];F.bezierCurveTo(u[0],u[1],f[0],f[1],a[0],a[1])}}else{m==="spline"&&(P=Y(P,R)),F.moveTo(P[0][0],P[0][1]);for(var o=1,i=P.length;o<i;o++)F.lineTo(P[o][0],P[o][1])}R&&F.closePath()}}J.buildPath=I},T8No:function(Be,J,L){"use strict";L.d(J,"a",function(){return P}),L.d(J,"e",function(){return m}),L.d(J,"c",function(){return p}),L.d(J,"b",function(){return v}),L.d(J,"d",function(){return _}),L.d(J,"f",function(){return j});var Y=L("MNsG"),B=L("N0LK"),I=L("Cg/j");let F=Y.k||"";const T=new Map;T.set("false",!1),T.set("true",!0),T.set("isMac",Y.f),T.set("isLinux",Y.d),T.set("isWindows",Y.i),T.set("isWeb",Y.h),T.set("isMacNative",Y.f&&!Y.h),T.set("isEdge",F.indexOf("Edg/")>=0),T.set("isFirefox",F.indexOf("Firefox")>=0),T.set("isChrome",F.indexOf("Chrome")>=0),T.set("isSafari",F.indexOf("Safari")>=0);const R=Object.prototype.hasOwnProperty;class P{static has(S){return u.create(S)}static equals(S,z){return f.create(S,z)}static regex(S,z){return C.create(S,z)}static not(S){return s.create(S)}static and(...S){return y.create(S,null)}static or(...S){return h.create(S,null,!0)}static deserialize(S,z=!1){return S?this._deserializeOrExpression(S,z):void 0}static _deserializeOrExpression(S,z){let H=S.split("||");return h.create(H.map(M=>this._deserializeAndExpression(M,z)),null,!0)}static _deserializeAndExpression(S,z){let H=S.split("&&");return y.create(H.map(M=>this._deserializeOne(M,z)),null)}static _deserializeOne(S,z){if(S=S.trim(),S.indexOf("!=")>=0){let H=S.split("!=");return d.create(H[0].trim(),this._deserializeValue(H[1],z))}if(S.indexOf("==")>=0){let H=S.split("==");return f.create(H[0].trim(),this._deserializeValue(H[1],z))}if(S.indexOf("=~")>=0){let H=S.split("=~");return C.create(H[0].trim(),this._deserializeRegexValue(H[1],z))}if(S.indexOf(" in ")>=0){let H=S.split(" in ");return a.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const H=S.split(">=");return c.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const H=S.split(">");return l.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const H=S.split("<=");return A.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const H=S.split("<");return x.create(H[0].trim(),H[1].trim())}return/^\!\s*/.test(S)?s.create(S.substr(1).trim()):u.create(S)}static _deserializeValue(S,z){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let H=/^'([^']*)'$/.exec(S);return H?H[1].trim():S}static _deserializeRegexValue(S,z){if(Object(B.C)(S)){if(z)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let H=S.indexOf("/"),M=S.lastIndexOf("/");if(H===M||H<0){if(z)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let V=S.slice(H+1,M),K=S[M+1]==="i"?"i":"";try{return new RegExp(V,K)}catch($){if(z)throw new Error(`bad regexp-value '${S}', parse error: ${$}`);return console.warn(`bad regexp-value '${S}', parse error: ${$}`),null}}}function m(S,z){const H=S?S.substituteConstants():void 0,M=z?z.substituteConstants():void 0;return!H&&!M?!0:!H||!M?!1:H.equals(M)}function t(S,z){return S.cmp(z)}class b{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return o.INSTANCE}}b.INSTANCE=new b;class o{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return b.INSTANCE}}o.INSTANCE=new o;class u{constructor(S,z){this.key=S,this.negated=z,this.type=2}static create(S,z=null){const H=T.get(S);return typeof H=="boolean"?H?o.INSTANCE:b.INSTANCE:new u(S,z)}cmp(S){return S.type!==this.type?this.type-S.type:E(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=T.get(this.key);return typeof S=="boolean"?S?o.INSTANCE:b.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}class f{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=4}static create(S,z,H=null){if(typeof z=="boolean")return z?u.create(S,H):s.create(S,H);const M=T.get(S);if(typeof M=="boolean"){const V=M?"true":"false";return z===V?o.INSTANCE:b.INSTANCE}return new f(S,z,H)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=T.get(this.key);if(typeof S=="boolean"){const z=S?"true":"false";return this.value===z?o.INSTANCE:b.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class a{constructor(S,z){this.key=S,this.valueKey=z,this.type=10,this.negated=null}static create(S,z){return new a(S,z)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const z=S.getValue(this.valueKey),H=S.getValue(this.key);return Array.isArray(z)?z.indexOf(H)>=0:typeof H=="string"&&typeof z=="object"&&z!==null?R.call(z,H):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}class i{constructor(S){this._actual=S,this.type=11}static create(S){return new i(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class d{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=5}static create(S,z,H=null){if(typeof z=="boolean")return z?s.create(S,H):u.create(S,H);const M=T.get(S);if(typeof M=="boolean"){const V=M?"true":"false";return z===V?b.INSTANCE:o.INSTANCE}return new d(S,z,H)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=T.get(this.key);if(typeof S=="boolean"){const z=S?"true":"false";return this.value===z?b.INSTANCE:o.INSTANCE}return this}evaluate(S){return S.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(S,z){this.key=S,this.negated=z,this.type=3}static create(S,z=null){const H=T.get(S);return typeof H=="boolean"?H?b.INSTANCE:o.INSTANCE:new s(S,z)}cmp(S){return S.type!==this.type?this.type-S.type:E(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=T.get(this.key);return typeof S=="boolean"?S?b.INSTANCE:o.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this)),this.negated}}function n(S,z){if(typeof S=="string"){const H=parseFloat(S);isNaN(H)||(S=H)}return typeof S=="string"||typeof S=="number"?z(S):b.INSTANCE}class l{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=12}static create(S,z,H=null){return n(z,M=>new l(S,M,H))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.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 c{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=13}static create(S,z,H=null){return n(z,M=>new c(S,M,H))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class x{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=14}static create(S,z,H=null){return n(z,M=>new x(S,M,H))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this.value,this)),this.negated}}class A{constructor(S,z,H){this.key=S,this.value=z,this.negated=H,this.type=15}static create(S,z,H=null){return n(z,M=>new A(S,M,H))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}class C{constructor(S,z){this.key=S,this.regexp=z,this.type=7,this.negated=null}static create(S,z){return new C(S,z)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const z=this.regexp?this.regexp.source:"",H=S.regexp?S.regexp.source:"";return z<H?-1:z>H?1:0}equals(S){if(S.type===this.type){const z=this.regexp?this.regexp.source:"",H=S.regexp?S.regexp.source:"";return this.key===S.key&&z===H}return!1}substituteConstants(){return this}evaluate(S){let z=S.getValue(this.key);return this.regexp?this.regexp.test(z):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(S){this._actual=S,this.type=8}static create(S){return new k(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function w(S){let z=null;for(let H=0,M=S.length;H<M;H++){const V=S[H].substituteConstants();if(S[H]!==V&&z===null){z=[];for(let K=0;K<H;K++)z[K]=S[K]}z!==null&&(z[H]=V)}return z===null?S:z}class y{constructor(S,z){this.expr=S,this.negated=z,this.type=6}static create(S,z){return y._normalizeArr(S,z)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let z=0,H=this.expr.length;z<H;z++){const M=t(this.expr[z],S.expr[z]);if(M!==0)return M}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].equals(S.expr[z]))return!1;return!0}return!1}substituteConstants(){const S=w(this.expr);return S===this.expr?this:y.create(S,this.negated)}evaluate(S){for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].evaluate(S))return!1;return!0}static _normalizeArr(S,z){const H=[];let M=!1;for(const V of S){if(!V)continue;if(V.type===1){M=!0;continue}if(V.type===0)return b.INSTANCE;if(V.type===6){H.push(...V.expr);continue}H.push(V)}if(H.length===0&&M)return o.INSTANCE;if(H.length===0)return;if(H.length===1)return H[0];H.sort(t);for(let V=1;V<H.length;V++)H[V-1].equals(H[V])&&(H.splice(V,1),V--);if(H.length===1)return H[0];for(;H.length>1;){const V=H[H.length-1];if(V.type!==9)break;H.pop();const K=H.pop(),$=H.length===0,Z=h.create(V.expr.map(me=>y.create([me,K],null)),null,$);Z&&(H.push(Z),H.sort(t))}return H.length===1?H[0]:new y(H,z)}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let z of this.expr)S.push(...z.keys());return S}negate(){if(!this.negated){const S=[];for(let z of this.expr)S.push(z.negate());this.negated=h.create(S,this,!0)}return this.negated}}class h{constructor(S,z){this.expr=S,this.negated=z,this.type=9}static create(S,z,H){return h._normalizeArr(S,z,H)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let z=0,H=this.expr.length;z<H;z++){const M=t(this.expr[z],S.expr[z]);if(M!==0)return M}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].equals(S.expr[z]))return!1;return!0}return!1}substituteConstants(){const S=w(this.expr);return S===this.expr?this:h.create(S,this.negated,!1)}evaluate(S){for(let z=0,H=this.expr.length;z<H;z++)if(this.expr[z].evaluate(S))return!0;return!1}static _normalizeArr(S,z,H){let M=[],V=!1;if(S){for(let K=0,$=S.length;K<$;K++){const Z=S[K];if(!Z)continue;if(Z.type===0){V=!0;continue}if(Z.type===1)return o.INSTANCE;if(Z.type===9){M=M.concat(Z.expr);continue}M.push(Z)}if(M.length===0&&V)return b.INSTANCE;M.sort(t)}if(M.length===0)return;if(M.length===1)return M[0];for(let K=1;K<M.length;K++)M[K-1].equals(M[K])&&(M.splice(K,1),K--);if(M.length===1)return M[0];if(H){for(let K=0;K<M.length;K++)for(let $=K+1;$<M.length;$++)j(M[K],M[$])&&(M.splice($,1),$--);if(M.length===1)return M[0]}return new h(M,z)}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let z of this.expr)S.push(...z.keys());return S}negate(){if(!this.negated){let S=[];for(let z of this.expr)S.push(z.negate());for(;S.length>1;){const z=S.shift(),H=S.shift(),M=[];for(const K of U(z))for(const $ of U(H))M.push(y.create([K,$],null));const V=S.length===0;S.unshift(h.create(M,null,V))}this.negated=S[0]}return this.negated}}class p extends u{constructor(S,z,H){super(S,null);this._defaultValue=z,typeof H=="object"?p._info.push(Object.assign(Object.assign({},H),{key:S})):H!==!0&&p._info.push({key:S,description:H,type:z!=null?typeof z:void 0})}static all(){return p._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return f.create(this.key,S)}}p._info=[];const v=Object(I.c)("contextKeyService"),_="setContext";function E(S,z){return S<z?-1:S>z?1:0}function g(S,z,H,M){return S<H?-1:S>H?1:z<M?-1:z>M?1:0}function j(S,z){if(z.type===6&&S.type!==9&&S.type!==6){for(const V of z.expr)if(S.equals(V))return!0}const H=S.negate(),M=U(H).concat(U(z));M.sort(t);for(let V=0;V<M.length;V++){const K=M[V],$=K.negate();for(let Z=V+1;Z<M.length;Z++){const me=M[Z];if($.equals(me))return!0}}return!1}function U(S){return S.type===9?S.expr:[S]}},"TS7/":function(Be,J,L){"use strict";L.r(J);var Y=L("g9YV"),B=L("wCAj"),I=L("Znn+"),F=L("ZTPi"),T=L("5Dmo"),R=L("3S7+"),P=L("sPJy"),m=L("bE4q"),t=L("miYZ"),b=L("tsqr"),o=L("9og8"),u=L("2qtc"),f=L("kLXV"),a=L("tJVT"),i=L("WmNS"),d=L.n(i),s=L("q1tI"),n=L.n(s),l=L("Ty5D"),c=L("55Ip"),x=L("9kvl"),A=L("jhfD"),C=L("1vsH"),k=L("DjyN"),w=L("NUBc"),y=L("oBTY"),h=L("5NDa"),p=L("5rEg"),v=L("14J3"),_=L("BMrR"),E=L("jCWc"),g=L("kPKH"),j=L("+L6B"),U=L("2/Rp"),S=L("k1fw"),z=L("ErOA"),H=L("Ot1p"),M=L("m3rI"),V=L("9Bee"),K=function(dn){var xn=dn.shixunHomeworks,Nn=dn.dispatch,dr=Object(l.i)();return n.a.createElement(f.a,{centered:!0,title:"\u63D0\u793A",visible:xn.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(o.a)(d.a.mark(function $n(){var Zn;return d.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return gr.next=2,Nn({type:"shixunHomeworks/deleteReply",payload:{object_id:xn.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:Zn=gr.sent,Zn.status===0&&(b.b.success("\u5220\u9664\u6210\u529F"),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Nn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},xn.actionTabs.params)}));case 4:case"end":return gr.stop()}},$n)})),onCancel:function(){Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))},$=Object(x.a)(function(vn){var dn=vn.shixunHomeworks;return{shixunHomeworks:dn}})(K),Z=L("XYT7"),me=L("wd/R"),oe=L.n(me),fe=L("/MfK"),ye=L("BtR2"),Ie=L("942q"),ve=L.n(Ie),de=L("xKgJ"),Je=L("gMzb");oe.a.lang("ZH-cn");var Rt=function(dn){var xn=dn.shixunHomeworks,Nn=dn.classroomList,dr=dn.globalSetting,$n=dn.user,Zn=dn.loading,kn=dn.dispatch,gr=Object(s.useState)(Object(S.a)(Object(S.a)({},Object(l.i)()),{},{limit:10})),Bn=Object(a.a)(gr,2),ar=Bn[0],sr=Bn[1],Pn=Object(s.useState)(!1),Tr=Object(a.a)(Pn,2),Mr=Tr[0],Sr=Tr[1],hr=Object(s.useState)(-1),ne=Object(a.a)(hr,2),Re=ne[0],Xe=ne[1],Le=Object(s.useState)(""),st=Object(a.a)(Le,2),et=st[0],pt=st[1],mt=Object(s.useState)(""),it=Object(a.a)(mt,2),Mt=it[0],Xt=it[1],Vt=Nn.detailLeftMenus,St=Object(s.useState)({}),nn=Object(a.a)(St,2),Qe=nn[0],en=nn[1],Bt=xn.workDetail,bn=xn.workList,On=Object(s.useState)({}),Gt=Object(a.a)(On,2),cn=Gt[0],Ht=Gt[1];ar.page_size=10,Object(s.useEffect)(function(){kn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},ar)}),kn({type:"shixunHomeworks/getWorkDetail",payload:Object(S.a)({},ar)}),Vt.course_modules||kn({type:"classroomList/getClassroomLeftMenus",payload:Object(S.a)({},ar)})},[ar.categoryId]),Object(s.useEffect)(function(){xn!=null&&xn.replyList&&en(xn.replyList)},[xn]);function Sn(wt){return wn.apply(this,arguments)}function wn(){return wn=Object(o.a)(d.a.mark(function wt(It){var Pt;return d.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(cn!=null&&cn.ec_point_ids){vt.next=2;break}return vt.abrupt("return");case 2:return vt.next=4,Object(z.a)("/api/ec_courses/".concat(cn==null?void 0:cn.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:Object(S.a)({homework_common_id:It},cn)});case 4:Pt=vt.sent;case 5:case"end":return vt.stop()}},wt)})),wn.apply(this,arguments)}return n.a.createElement("section",{className:ve.a.bg},n.a.createElement("section",{className:" edu-container"},n.a.createElement("aside",{className:[ve.a.desc,"c-black","font14","bg-white"].join(" ")},xn.actionTabs.key!=="\u7F16\u8F91\u4F5C\u4E1A"&&n.a.createElement(V.a,{value:(Bt==null?void 0:Bt.explanation)||"\u6682\u65E0\uFF5E"}),xn.actionTabs.key==="\u7F16\u8F91\u4F5C\u4E1A"&&n.a.createElement("aside",{className:["bg-white"].join(" ")},n.a.createElement(H.a,{onChange:function(It){pt(It)},defaultValue:(Bt==null?void 0:Bt.explanation)||"",height:200,isFocus:!0,watch:!0}),n.a.createElement(Je.a,{setitem:function(It){return Ht(Object(S.a)({},It))},homework_common_id:ar.categoryId}),n.a.createElement(_.a,null,n.a.createElement(g.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"default",size:"large",onClick:Object(o.a)(d.a.mark(function wt(){return d.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:kn({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return Pt.stop()}},wt)}))},"\u53D6\u6D88"),n.a.createElement(U.a,{type:"primary",size:"large",className:"ml20",onClick:Object(o.a)(d.a.mark(function wt(){var It;return d.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!(et==="")){Ct.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Ct.next=9;break;case 4:return Ct.next=6,kn({type:"shixunHomeworks/updateWork",payload:{explanation:et,categoryId:ar.categoryId}});case 6:It=Ct.sent,Sn(ar.categoryId),It.status===0&&(b.b.success("\u64CD\u4F5C\u6210\u529F"),kn({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),kn({type:"shixunHomeworks/getWorkDetail",payload:Object(S.a)({},ar)}));case 9:case"end":return Ct.stop()}},wt)}))},"\u4FDD\u5B58"))))),n.a.createElement("aside",{className:[ve.a.reply,"bg-white","mt20"].join(" ")},Mr&&n.a.createElement(H.a,{onChange:function(It){pt(It)},height:200,isFocus:!0,watch:!0}),n.a.createElement(_.a,{onClick:function(){Sr(!0)}},n.a.createElement(g.a,{flex:"1"},!Mr&&n.a.createElement(p.a,{size:"large",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),n.a.createElement(g.a,null,n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(o.a)(d.a.mark(function wt(){var It;return d.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!(et==="")){Ct.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Ct.next=8;break;case 4:return Ct.next=6,kn({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:ar.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:et}}});case 6:It=Ct.sent,It.status===0&&(b.b.success("\u53D1\u5E03\u6210\u529F"),kn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},ar)}),Sr(!1),pt(""));case 8:case"end":return Ct.stop()}},wt)}))},"\u53D1\u8868")))),(Qe==null?void 0:Qe.comments)&&Qe.comments!=""&&n.a.createElement("aside",{className:[ve.a.replyList,"bg-white"].join(" ")},Qe==null?void 0:Qe.comments.map(function(wt,It){var Pt,Ct,vt,Dn;return n.a.createElement(_.a,{gutter:[12,12],key:It},n.a.createElement(g.a,{flex:"40px"},n.a.createElement("img",{width:"40",src:"".concat(M.a.IMG_SERVER,"/images/").concat(wt==null||((Pt=wt.author)===null||Pt===void 0)?void 0:Pt.image_url)})),n.a.createElement(g.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,{span:20},n.a.createElement("span",{className:"c-light-black"},wt==null||((Ct=wt.author)===null||Ct===void 0)?void 0:Ct.name),n.a.createElement("span",{className:"c-light-black ml10"},wt.time," \u53D1\u5E03")),n.a.createElement(g.a,{span:4},n.a.createElement("div",{className:"tr"},(Object(de.c)()||($n==null||((vt=$n.userInfo)===null||vt===void 0)?void 0:vt.login)===(wt==null||((Dn=wt.author)===null||Dn===void 0)?void 0:Dn.login))&&n.a.createElement(fe.a,{className:"current",onClick:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5220\u9664",params:ar,selectArr:wt,object_type:"message"}})}}))),n.a.createElement(g.a,{span:24},n.a.createElement(V.a,{value:wt.content})),wt.children&&n.a.createElement("aside",{className:ve.a.comment},wt.children.map(function($t,Cn){var pn,Yt;return n.a.createElement(_.a,{key:Cn},n.a.createElement(g.a,{span:24},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},$t.author.name,n.a.createElement("span",{className:"c-light-black ml10"},oe()($t==null?void 0:$t.created_on).fromNow())),n.a.createElement(g.a,null,(Object(de.c)()||($n==null||((pn=$n.userInfo)===null||pn===void 0)?void 0:pn.login)===($t==null||((Yt=$t.author)===null||Yt===void 0)?void 0:Yt.login))&&n.a.createElement(R.a,{title:"\u5220\u9664"},n.a.createElement(fe.a,{className:"current",onClick:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5220\u9664",params:ar,selectArr:$t}})}}))))),n.a.createElement(g.a,null,n.a.createElement(V.a,{value:$t.content})))})),n.a.createElement("div",{className:"tc w100 mt10"},n.a.createElement(w.a,{defaultCurrent:1,total:wt==null?void 0:wt.child_message_count,hideOnSinglePage:!0,pageSize:5,current:wt.page||1,onChange:function(){var $t=Object(o.a)(d.a.mark(function Cn(pn){var Yt,Tn;return d.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,Object(Z.H)(Object(S.a)(Object(S.a)({},ar),{},{parent_id:wt.id,page:pn,limit:5}));case 2:Tn=fr.sent,Tn!=null&&(Yt=Tn.comments)!==null&&Yt!==void 0&&Yt.length&&(Qe.comments[It].page=pn,Qe.comments[It].children=Object(y.a)(Tn==null?void 0:Tn.comments),en(Object(S.a)({},Qe)));case 4:case"end":return fr.stop()}},Cn)}));return function(Cn){return $t.apply(this,arguments)}}()})),n.a.createElement(g.a,{span:24,className:"mt5 c-light-black"},Re===It&&n.a.createElement("aside",null,n.a.createElement(H.a,{onChange:function(Cn){Xt(Cn)},height:150,isFocus:!0}),n.a.createElement(_.a,null,n.a.createElement(g.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(o.a)(d.a.mark(function $t(){var Cn,pn;return d.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(!(Mt==="")){Tn.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Tn.next=12;break;case 4:return Tn.next=6,kn({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:ar.categoryId,jour_type:"HomeworkCommon",m_parent_id:wt.id,reply_id:1,notes:Mt}}});case 6:return Tn.next=8,Object(Z.H)(Object(S.a)(Object(S.a)({},ar),{},{parent_id:wt.id,limit:5}));case 8:pn=Tn.sent,pn!=null&&(Cn=pn.comments)!==null&&Cn!==void 0&&Cn.length&&(++Qe.comments[It].child_message_count,Qe.comments[It].children=Object(y.a)(pn==null?void 0:pn.comments),Qe.comments[It].page=1,en(Qe)),b.b.success("\u53D1\u5E03\u6210\u529F"),Xe(-1);case 12:case"end":return Tn.stop()}},$t)}))},"\u53D1\u8868")))),Re!==It&&n.a.createElement("div",{className:"tr"},n.a.createElement("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return Xe(It)}}),wt.child_message_count||0,!!(wt!=null&&wt.user_praise)&&n.a.createElement("span",{className:"c-orange"},n.a.createElement(ye.a,{className:"mr5 ml30",onClick:Object(o.a)(d.a.mark(function $t(){return d.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,kn({type:"shixunHomeworks/replyUnLike",payload:{object_id:wt.id,object_type:"journals_for_message"}});case 2:kn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},ar)});case 3:case"end":return pn.stop()}},$t)}))}),wt==null?void 0:wt.praise_count),!wt.user_praise&&n.a.createElement("span",null,n.a.createElement(ye.a,{className:"mr5 ml30",onClick:Object(o.a)(d.a.mark(function $t(){return d.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,kn({type:"shixunHomeworks/replyLike",payload:{object_id:wt.id,object_type:"journals_for_message"}});case 2:kn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},ar)});case 3:case"end":return pn.stop()}},$t)}))}),wt.praise_count))))))}))),n.a.createElement("aside",{className:"tc mt30 pb30"},n.a.createElement(w.a,{defaultCurrent:1,total:Qe==null?void 0:Qe.parent_messages_count,hideOnSinglePage:!0,current:ar.page||1,pageSize:10,onChange:function(It){ar.page=It,kn({type:"shixunHomeworks/getReplyList",payload:Object(S.a)({},ar)})}})),n.a.createElement($,null))},Ee=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.classroomList,Nn=vn.loading,dr=vn.user,$n=vn.globalSetting;return{shixunHomeworks:dn,globalSetting:$n,classroomList:xn,user:dr,loading:Nn.effects}})(Rt),Me=L("giR+"),rt=L("fyUT"),He=L("7Kak"),ke=L("9yH6"),ht=L("qVdP"),ie=L("jsC+"),xe=L("sRBo"),we=L("kaz8"),$e=L("lUTK"),ct=L("BvKs"),yt=L("jrin"),Ut=L("y8nQ"),We=L("Vl3Y"),kt=L("8Skl"),qt=L("y3Kf"),Pe=L("CTES"),Ae=L("Llu2"),ut=L("0NbB"),Et=L("BdwD"),Ze=L("Xm8N"),dt=L("PpiC"),Ne=L("IMoZ"),Te=function(dn){var xn=dn.shixunHomeworks,Nn=dn.dispatch,dr=Object(dt.a)(dn,["shixunHomeworks","dispatch"]),$n=Object(l.i)(),Zn=Object(s.useState)(!0),kn=Object(a.a)(Zn,2),gr=kn[0],Bn=kn[1],ar=Object(s.useState)(!1),sr=Object(a.a)(ar,2),Pn=sr[0],Tr=sr[1],Mr=We.a.useForm(),Sr=Object(a.a)(Mr,1),hr=Sr[0],ne=function(){var Re=Object(o.a)(d.a.mark(function Xe(){var Le,st;return d.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return Le=hr.getFieldValue(),pt.next=3,Object(z.a)("/api/homework_commons/".concat($n.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:Object(y.a)(xn.actionTabs.selectArrs),cover_all:gr,hidden_comment:Le.hidden_comment,comment:Le.comment}});case 3:st=pt.sent,st.status===0&&(b.b.success("\u8BC4\u9605\u6210\u529F"),hr.resetFields(),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Nn({type:"shixunHomeworks/getWorkList",payload:Object(S.a)({},xn.actionTabs.params)}));case 5:case"end":return pt.stop()}},Xe)}));return function(){return Re.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(f.a,{centered:!0,title:"\u4E00\u952E\u70B9\u8BC4",visible:xn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(o.a)(d.a.mark(function Re(){var Xe;return d.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:Xe=hr.getFieldValue(),JSON.stringify(Xe)==="{}"||Xe.hidden_comment===""&&Xe.comment===""?Tr(!0):xn.workList.partial_comment?Nn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",selectArrs:xn.actionTabs.selectArrs,params:xn.actionTabs.params}}):ne();case 2:case"end":return st.stop()}},Re)})),onCancel:function(){Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(We.a,{form:hr,onChange:function(){Pn&&Tr(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"comment"},n.a.createElement(p.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(We.a.Item,{name:"hidden_comment"},n.a.createElement(p.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Pn&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")),n.a.createElement(f.a,{centered:!0,title:n.a.createElement("span",null,n.a.createElement(Ne.a,{className:"c-orange mr20"}),"\u63D0\u793A"),visible:xn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",okText:"\u786E\u5B9A\u70B9\u8BC4",cancelText:"\u653E\u5F03\u70B9\u8BC4",onOk:function(){ne()},onCancel:function(){Nn({type:"shixunHomeworks/setActionTabs",payload:{}})},width:400},n.a.createElement("div",{className:"tc"},n.a.createElement("p",null,"\u90E8\u5206\u5B66\u751F\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF0C\u662F\u5426\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF1F"),n.a.createElement("p",null,n.a.createElement(ke.a.Group,{onChange:function(Xe){Bn(Xe.target.value)},value:gr},n.a.createElement(ke.a,{value:!0},"\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4"),n.a.createElement(ke.a,{value:!1},"\u8DF3\u8FC7\u5DF2\u6709\u70B9\u8BC4"))))))},Oe=Object(x.a)(function(vn){var dn=vn.shixunHomeworks;return{shixunHomeworks:dn}})(Te),ae=L("BoW6"),le=L.n(ae),he=function(dn){var xn,Nn,dr,$n,Zn=dn.shixunHomeworks,kn=dn.dispatch,gr=Object(dt.a)(dn,["shixunHomeworks","dispatch"]),Bn=Object(l.i)(),ar=Object(s.useState)(!1),sr=Object(a.a)(ar,2),Pn=sr[0],Tr=sr[1],Mr=Object(s.useState)((xn=Zn.actionTabs.selectArrs)===null||xn===void 0||((Nn=xn.data)===null||Nn===void 0)?void 0:Nn.name),Sr=Object(a.a)(Mr,2),hr=Sr[0],ne=Sr[1],Re=We.a.useForm(),Xe=Object(a.a)(Re,1),Le=Xe[0];Object(s.useEffect)(function(){var et,pt,mt,it,Mt,Xt;Zn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Le.setFieldsValue({comment:(et=Zn.actionTabs.selectArrs)===null||et===void 0||((pt=et.data)===null||pt===void 0)?void 0:pt.work_comment,hidden_comment:(mt=Zn.actionTabs.selectArrs)===null||mt===void 0||((it=mt.data)===null||it===void 0)?void 0:it.work_comment_hidden}),ne((Mt=Zn.actionTabs.selectArrs)===null||Mt===void 0||((Xt=Mt.data)===null||Xt===void 0)?void 0:Xt.name)},[Zn.actionTabs.key]);var st=function(){var et=Object(o.a)(d.a.mark(function pt(){var mt,it,Mt,Xt;return d.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return Mt=Le.getFieldValue(),St.next=3,Object(z.a)("/api/student_works/".concat((mt=Zn.actionTabs.selectArrs)===null||mt===void 0||((it=mt.data)===null||it===void 0)?void 0:it.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:Mt.hidden_comment,comment:Mt.comment}});case 3:if(Xt=St.sent,!(Xt.status===0)){St.next=9;break}return b.b.success("\u8BC4\u9605\u6210\u529F"),Le.resetFields(),kn({type:"shixunHomeworks/setActionTabs",payload:{}}),St.abrupt("return",kn({type:"shixunHomeworks/getWorkList",payload:Bn}));case 9:case"end":return St.stop()}},pt)}));return function(){return et.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(f.a,{centered:!0,title:(dr=Zn.actionTabs.selectArrs)!==null&&dr!==void 0&&($n=dr.data)!==null&&$n!==void 0&&$n.work_comment_hidden?"\u66F4\u6539"+hr+"\u70B9\u8BC4":hr+"\u70B9\u8BC4",visible:Zn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(o.a)(d.a.mark(function et(){var pt;return d.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:pt=Le.getFieldValue(),JSON.stringify(pt)==="{}"||pt.hidden_comment===""&&pt.comment===""?Tr(!0):st();case 2:case"end":return it.stop()}},et)})),onCancel:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(We.a,{form:Le,onChange:function(){Pn&&Tr(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(We.a.Item,{name:"comment"},n.a.createElement(p.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(We.a.Item,{name:"hidden_comment"},n.a.createElement(p.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Pn&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},_e=Object(x.a)(function(vn){var dn=vn.shixunHomeworks;return{shixunHomeworks:dn}})(he),Se=function(dn){var xn=dn.shixunHomeworks,Nn=dn.dispatch,dr=Object(dt.a)(dn,["shixunHomeworks","dispatch"]),$n=Object(l.i)(),Zn=Object(s.useState)([]),kn=Object(a.a)(Zn,2),gr=kn[0],Bn=kn[1],ar=Object(s.useState)([]),sr=Object(a.a)(ar,2),Pn=sr[0],Tr=sr[1];Object(s.useEffect)(function(){xn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B"&&Mr()},[xn.actionTabs.key]);function Mr(){return Sr.apply(this,arguments)}function Sr(){return Sr=Object(o.a)(d.a.mark(function ne(){var Re;return d.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,Object(z.a)("/api/homework_commons/".concat($n.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:Re=Le.sent,Bn(Re);case 4:case"end":return Le.stop()}},ne)})),Sr.apply(this,arguments)}var hr=[{title:"\u5206\u73ED\u60C5\u51B5",dataIndex:"name"},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u68C0\u6D4B\u8FDB\u5EA6",dataIndex:"status"},{title:"\u4E0A\u6B21\u8BC4\u5206\u65F6\u95F4",dataIndex:"last_analysis_time"}];return n.a.createElement(n.a.Fragment,null,n.a.createElement(f.a,{centered:!0,title:"\u4EE3\u7801\u8D28\u91CF\u8BC4\u5206",visible:xn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B",width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(o.a)(d.a.mark(function ne(){var Re;return d.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,Object(z.a)("/api/homework_commons/".concat($n.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:Pn}});case 2:Re=Le.sent,(Re==null?void 0:Re.status)===0&&(x.d.replace("/classrooms/".concat($n.coursesId,"/shixun_homework/").concat($n.categoryId,"/detail?tabs=4")),window.location.reload(),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Tr([]));case 4:case"end":return Le.stop()}},ne)})),onCancel:function(){Tr([]),Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(B.a,{rowSelection:{type:"checkbox",onChange:function(Re,Xe){Tr(Object(y.a)(Re))},selectedRowKeys:Pn,getCheckboxProps:function(Re){return{disabled:Re.status==="\u8FDB\u884C\u4E2D"||Re.works_count===0}}},rowKey:function(Re){return Re.key||Re.id},scroll:{y:300},pagination:!1,columns:hr,dataSource:gr==null?void 0:gr.group_list})))},ze=Object(x.a)(function(vn){var dn=vn.shixunHomeworks;return{shixunHomeworks:dn}})(Se),xt=L("mgmH"),Qt=function(dn){var xn,Nn,dr,$n,Zn,kn,gr,Bn,ar,sr,Pn,Tr,Mr,Sr,hr,ne=dn.shixunHomeworks,Re=dn.loading,Xe=dn.dispatch,Le=dn.setExportParams,st=dn.user,et=Object(l.i)(),pt=Object(s.useState)(Object(S.a)(Object(S.a)({},{page:1,limit:20,order:"work_score",b_order:"desc"}),et)),mt=Object(a.a)(pt,2),it=mt[0],Mt=mt[1],Xt=We.a.useForm(),Vt=Object(a.a)(Xt,1),St=Vt[0],nn=Object(s.useState)(),Qe=Object(a.a)(nn,2),en=Qe[0],Bt=Qe[1],bn=Object(s.useState)({}),On=Object(a.a)(bn,2),Gt=On[0],cn=On[1],Ht=Object(s.useState)([]),Sn=Object(a.a)(Ht,2),wn=Sn[0],wt=Sn[1],It=Object(s.useState)(!1),Pt=Object(a.a)(It,2),Ct=Pt[0],vt=Pt[1],Dn=Object(s.useState)([]),$t=Object(a.a)(Dn,2),Cn=$t[0],pn=$t[1],Yt=Object(s.useState)(!1),Tn=Object(a.a)(Yt,2),zn=Tn[0],fr=Tn[1],Gn=Object(s.useState)(),Lr=Object(a.a)(Gn,2),Gr=Lr[0],Hn=Lr[1],Yn=Object(s.useState)(1),Jn=Object(a.a)(Yn,2),wr=Jn[0],Wr=Jn[1],Zr=Object(s.useState)(),ua=Object(a.a)(Zr,2),xa=ua[0],ma=ua[1],Ya=Object(s.useState)(),Oa=Object(a.a)(Ya,2),Pa=Oa[0],ga=Oa[1],Na=Object(s.useState)(),ai=Object(a.a)(Na,2),da=ai[0],ca=ai[1],Ra=Object(s.useState)(),wa=Object(a.a)(Ra,2),De=wa[0],tt=wa[1],at=Object(s.useState)(),je=Object(a.a)(at,2),ce=je[0],Ce=je[1],ge=Object(s.useState)(!1),Ue=Object(a.a)(ge,2),Ye=Ue[0],ot=Ue[1];Object(s.useEffect)(function(){return Ke(!0),function(){cn([]),wt([])}},[it.coursesId]),Object(s.useEffect)(function(){var on,jt=JSON.parse(JSON.stringify(ne.workList));!(jt!=null&&(on=jt.student_works)!==null&&on!==void 0&&on.length)&&jt!==null&&jt!==void 0&&jt.id?(jt.student_works=[Object(S.a)({},jt)],cn(jt)):(jt!=null&&jt.id&&wt([Object(S.a)(Object(S.a)({},jt),{number:"\u6211"})]),cn(Object(S.a)({},jt)))},[ne.workList]);var Ke=function(jt){Le(Object(S.a)({},it));var Jt=Xe({type:"shixunHomeworks/getWorkList",payload:it});return jt&&Jt.then(function(In){var _n,yr,qn;(In!=null&&(_n=In.homework_status)!==null&&_n!==void 0&&_n.includes("\u8FDB\u884C\u4E2D")||In!=null&&(yr=In.homework_status)!==null&&yr!==void 0&&yr.includes("\u8865\u4EA4\u4E2D")||In!=null&&(qn=In.homework_status)!==null&&qn!==void 0&&qn.includes("\u63D0\u4EA4\u4E2D"))&&!Object(de.s)()&&Ft()}),Jt};Object(s.useEffect)(function(){_t()},[]);var _t=function(){var on=Object(o.a)(d.a.mark(function jt(){var Jt;return d.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(Z.I)({categoryId:et.categoryId});case 2:Jt=_n.sent,Bt(Jt==null?void 0:Jt.update_score);case 4:case"end":return _n.stop()}},jt)}));return function(){return on.apply(this,arguments)}}(),Ft=function(){var on=Object(o.a)(d.a.mark(function jt(){var Jt;return d.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return Xe({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6210\u7EE9\u8BA1\u7B97\u4E2D\uFF0C\u8BF7\u7A0D\u5019..."}}),_n.next=3,Object(Z.Z)({categoryId:et.categoryId});case 3:Jt=_n.sent,Xe({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),(Jt==null?void 0:Jt.status)===0&&(b.b.success(Jt==null?void 0:Jt.message),Ke());case 6:case"end":return _n.stop()}},jt)}));return function(){return on.apply(this,arguments)}}(),rn=function(){it.page=1;var jt=Object.assign({},St.getFieldValue());delete it.course_group,delete it.teacher_comment,Object.keys(jt).map(function(Jt){switch(Jt){case"task_status":jt[Jt].includes("all")||!jt[Jt].length?(delete it.work_status,St.setFieldsValue(Object(yt.a)({},"task_status","all"))):(it.work_status=jt[Jt],St.setFieldsValue(Object(yt.a)({},"task_status",it.work_status)));break;case"course_group_info":jt[Jt].includes("all")||!jt[Jt].length?(delete it.course_group,St.setFieldsValue(Object(yt.a)({},"course_group_info","all"))):(it.course_group=jt[Jt],St.setFieldsValue(Object(yt.a)({},"course_group_info",it.course_group)));break;case"teacher_comment":if(jt[Jt].includes("all")||!jt[Jt].length)delete it.teacher_comment,St.setFieldsValue(Object(yt.a)({},"teacher_comment","all"));else{var In;it.teacher_comment=((In=jt[Jt])===null||In===void 0?void 0:In.length)===1?Number(jt[Jt][0]):"",St.setFieldsValue(Object(yt.a)({},"teacher_comment",jt[Jt]))}break}}),Ke()};Object(s.useEffect)(function(){if(document.getElementById("divhe")){var on=document.getElementById("divhe").scrollHeight;on>47&&(Ce(47),ot(!0))}},[document.getElementById("divhe")]);var hn=function(jt,Jt){it.page=jt,it.limit=20,Ke()};function Rn(){Wr(1),ma(""),ga(""),ca(""),tt(""),pn([])}var Kn=[{title:"\u5E8F\u53F7",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:{showTitle:!1},render:function(jt,Jt,In){return it.limit*(it.page-1)+In+1}},{title:"\u59D3\u540D",dataIndex:"user_name",align:"center",width:110,fixed:"left",ellipsis:{showTitle:!1},render:function(jt){return n.a.createElement(R.a,{placement:"bottomLeft",title:jt},n.a.createElement("span",{className:"current"},jt))}},!(Gt!=null&&Gt.is_excellent)&&!Object(de.r)()&&{title:"\u5B66\u53F7",dataIndex:"student_id",align:"center",sorter:!0,width:110,showSorterTooltip:!1,ellipsis:{showTitle:!1},sortOrder:it.order==="student_id"?it.b_order==="desc"?"descend":"ascend":null,render:function(jt){return n.a.createElement(R.a,{placement:"bottomLeft",title:jt||"--"},n.a.createElement("span",{className:"current"},jt||"--"))}},{title:"\u5206\u73ED",dataIndex:"group_name",align:"center",width:180,ellipsis:{showTitle:!1},render:function(jt,Jt){return jt?n.a.createElement(R.a,{placement:"bottom",title:jt},n.a.createElement("span",{className:"current"},jt)):"--"}},{title:"\u4F5C\u4E1A\u72B6\u6001",dataIndex:"work_status",align:"center",width:80,sorter:!0,ellipsis:{showTitle:!1},showSorterTooltip:!1,sortOrder:it.order==="work_status"?it.b_order==="desc"?"descend":"ascend":null,render:function(jt){return n.a.createElement(C.h,{status:jt})}},{title:n.a.createElement("span",null,"\u5B8C\u6210\u65F6\u95F4"),dataIndex:"finished_time",align:"center",width:130,ellipsis:{showTitle:!1},showSorterTooltip:!1,sorter:!0,sortOrder:it.order==="finished_time"?it.b_order==="desc"?"descend":"ascend":null,render:function(jt,Jt){return jt?n.a.createElement(R.a,{placement:"bottomLeft",title:jt},jt):"--"}},{title:n.a.createElement("span",null,"\u5B9E\u8BAD\u603B\u8017\u65F6"),dataIndex:"cost_time",align:"center",width:130,ellipsis:{showTitle:!1},showSorterTooltip:!1,sorter:!0,sortOrder:it.order==="cost_time"?it.b_order==="desc"?"descend":"ascend":null,render:function(jt,Jt){return jt?n.a.createElement(R.a,{placement:"bottomLeft",title:jt},jt):"--"}},{title:"\u901A\u5173\u60C5\u51B5",align:"center",dataIndex:"complete_count",ellipsis:{showTitle:!1},render:function(jt,Jt){return n.a.createElement("span",null,jt||0,"/",Gt.challenges_count)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"sum_evaluate_count",align:"center",ellipsis:{showTitle:!1},sorter:!0,sortOrder:it.order==="sum_evaluate_count"?it.b_order==="desc"?"descend":"ascend":null,render:function(jt,Jt){return jt&&jt!="--"?n.a.createElement(R.a,{placement:"bottom",title:jt},n.a.createElement("span",{className:"current"},jt)):"--"}},!Object(de.r)()&&{title:n.a.createElement("span",null,"\u6700\u7EC8\u6210\u7EE9",n.a.createElement(R.a,{placement:"top",title:n.a.createElement("pre",null,"\u9F20\u6807\u505C\u7559\u5177\u4F53\u5206\u503C\u4E0A\u53EF\u67E5",n.a.createElement("br",null),"\u770B\u5F97\u5206\u660E\u7EC6",n.a.createElement("br",null))},n.a.createElement("img",{src:"".concat(M.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),dataIndex:"work_score",sorter:!0,align:"center",showSorterTooltip:!1,sortOrder:it.order==="work_score"?it.b_order==="desc"?"descend":"ascend":null,ellipsis:{showTitle:!1},render:function(jt,Jt){var In,_n;return jt>=0&&jt<=60?_n=n.a.createElement("span",{className:"c-red"},jt):jt===100?_n=n.a.createElement("span",{className:"c-green"},jt):jt>60?_n=n.a.createElement("span",{className:"c-orange"},jt):_n="--",n.a.createElement(R.a,{placement:"bottom",title:Jt.ultimate_score?n.a.createElement("div",null,_n==="--"?"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A0\u5206":"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A".concat(Jt.work_score,"\u5206")):n.a.createElement("div",null,n.a.createElement("div",null,Jt.final_score?"\u5173\u5361\u5F97\u5206\uFF1A".concat(Jt.final_score,"\u5206"):"\u5173\u5361\u5F97\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Jt.eff_score?"\u6548\u7387\u8BC4\u5206\uFF1A".concat(Jt.eff_score,"\u5206"):"\u6548\u7387\u8BC4\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Jt.late_penalty?"\u8FDF\u4EA4\u6263\u5206\uFF1A".concat(Jt.late_penalty,"\u5206"):"\u8FDF\u4EA4\u6263\u5206\uFF1A0\u5206"),!((In=ne.workList)!==null&&In!==void 0&&In.answer_open_evaluation)&&n.a.createElement("div",null,"\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF1A",Jt.view_answer_count,"\u5173"),n.a.createElement("div",null,Jt.work_score?"\u6700\u7EC8\u6210\u7EE9\uFF1A".concat(Jt.work_score,"\u5206"):"\u6700\u7EC8\u6210\u7EE9\uFF1A0\u5206"))},_n)}},{title:"\u6253\u56DE\u6B21\u6570",dataIndex:"redo_count",align:"center",render:function(jt){return jt||"- -"}},{title:n.a.createElement("span",null,"\u8BC4\u9605\u72B6\u6001",n.a.createElement(R.a,{overlayClassName:le.a.reviewStatusTooltip,placement:"top",title:n.a.createElement("pre",null,"\u4EE5\u4E0B\u60C5\u5F62\u51FA\u73B0\u4E00\u79CD\uFF0C\u8BC4\u9605\u72B6\u6001\u81EA\u52A8\u53D8\u4E3A\u5DF2\u8BC4\u9605\uFF1A",n.a.createElement("br",null),"1.\u5B66\u751F\u5F00\u542F\u4F5C\u4E1A\uFF0C\u7CFB\u7EDF\u5BF9\u5B66\u751F\u8FDB\u884C\u4E86\u81EA\u52A8\u6253\u5206\uFF1B",n.a.createElement("br",null),"2.\u8001\u5E08\u5BF9\u5B66\u751F\u4F5C\u4E1A\u8FDB\u884C\u5173\u5361\u8C03\u5206\u6216\u8005\u8FFD\u52A0\u70B9\u8BC4\uFF1B",n.a.createElement("br",null),"3.\u6574\u4E2A\u4F5C\u4E1A\u622A\u6B62/\u8865\u4EA4\u7ED3\u675F\u540E\uFF0C\u6240\u6709\u5B66\u751F\u4F5C\u4E1A\u72B6\u6001\u5C06\u81EA\u52A8\u53D8\u4E3A\u5DF2\u8BC4\u9605\u3002",n.a.createElement("br",null))},n.a.createElement("img",{src:"".concat(M.a.IMG_SERVER,"/images/educoder/problem.png"),className:"ml2 current"}))),align:"center",dataIndex:"has_comment",width:90,ellipsis:!0,render:function(jt){return jt?"\u5DF2\u8BC4\u9605":"\u672A\u8BC4\u9605"}},{title:"\u64CD\u4F5C",dataInex:"action",align:"center",width:70,fixed:"right",ellipsis:!0,className:"workListTable",render:function(jt,Jt){var In,_n,yr;return Object(de.s)()?n.a.createElement("div",null,Object(C.B)(Jt==null?void 0:Jt.work_status)==="\u672A\u5F00\u542F"?n.a.createElement("span",null,"--"):n.a.createElement(c.a,{target:"_blank",onClick:function(Cr){Cr.stopPropagation()},to:"/classrooms/".concat(it.coursesId,"/shixun_homework/").concat(it.categoryId,"/").concat(Jt.id,"/comment")},"\u67E5\u770B")):n.a.createElement("div",null,n.a.createElement("span",{style:{color:"#0152d9"},onClick:function(Cr){Cr.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:"",data:{name:Jt==null?void 0:Jt.user_name,homeworkId:Jt==null?void 0:Jt.id,work_comment:Jt==null?void 0:Jt.work_comment,work_comment_hidden:Jt==null?void 0:Jt.work_comment_hidden}}}})}},Jt.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u8FFD\u52A0\u70B9\u8BC4"),(Jt==null||((In=Jt.shixun_detail)===null||In===void 0||((_n=In[0])===null||_n===void 0))?void 0:_n.game_identifier)&&[1,2,3,4].includes(Jt==null?void 0:Jt.work_status)&&[n.a.createElement("br",null),n.a.createElement("a",{target:"_blank",onClick:function(Cr){var ir;if(Cr.stopPropagation(),Object(de.v)()){var mn,Mn;Object(C.S)("/tasks/".concat(Jt==null||((mn=Jt.shixun_detail)===null||mn===void 0||((Mn=mn[0])===null||Mn===void 0))?void 0:Mn.game_identifier,"?homework_common_id=").concat(et.categoryId));return}if((ir=st.userInfo)!==null&&ir!==void 0&&ir.professional_certification){var vr,Or;Object(C.S)("/tasks/".concat(Jt==null||((vr=Jt.shixun_detail)===null||vr===void 0||((Or=vr[0])===null||Or===void 0))?void 0:Or.game_identifier,"?homework_common_id=").concat(et.categoryId))}else return f.a.confirm({title:"\u63D0\u793A",centered:!0,content:n.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(C.S)("/account/certification")}}),!1}},"\u67E5\u770B\u5B9E\u8BAD")],(Gt==null||((yr=Gt.homework_status)===null||yr===void 0)?void 0:yr[0])!=="\u5DF2\u622A\u6B62"&&!!Jt.myshixun_id&&[n.a.createElement("br",null),n.a.createElement("span",{className:le.a.color32C,onClick:function(Cr){Cr.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:Jt,params:it}})}},"\u6253\u56DE\u91CD\u505A")])}}].filter(function(on){return!!on}),cr=function(){var jt,Jt;return n.a.createElement(ct.a,null,n.a.createElement(ct.a.Item,{onClick:function(){Object(xt.h)(JSON.parse(sessionStorage.all_student_works_params),"shixun_work_list")},key:"1"},"\u5B66\u751F\u6210\u7EE9"),Object(de.c)()&&(Gt==null?void 0:Gt.student_works.length)>0&&n.a.createElement(ct.a.Item,{key:"3"},n.a.createElement(c.a,{onClick:function(_n){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A",type:2}})},to:"/classrooms/".concat(it.coursesId,"/shixun_homework/").concat(it.categoryId,"/").concat(Gt==null||((jt=Gt.student_works)===null||jt===void 0||((Jt=jt[0])===null||Jt===void 0))?void 0:Jt.id,"/comment")},"\u5B9E\u8BAD\u62A5\u544A")),n.a.createElement(ct.a.Item,{key:"2"},n.a.createElement(c.a,{to:"/classrooms/".concat(it.coursesId,"/exportlist/shixun_work_list")},"\u5386\u53F2\u5BFC\u51FA")))};return n.a.createElement(n.a.Fragment,null,n.a.createElement("section",{className:"".concat(le.a.wrap," minH500 bg-white pl30 pr30 pt30")},((xn=Gt.homework_status)===null||xn===void 0?void 0:xn.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(Et.a,null),!!wn.length&&n.a.createElement(B.a,{className:"mb10",dataSource:wn,columns:Kn,pagination:!1,showHeader:!1,loading:!1}),!((Nn=Gt.homework_status)!==null&&Nn!==void 0&&Nn.includes("\u672A\u53D1\u5E03"))&&n.a.createElement("aside",null,!Object(de.c)()&&n.a.createElement("div",{className:"c-light-black font12"},n.a.createElement("span",null,"\u5DF2\u5F00\u59CB\u505A\u9898 ",(Gt==null?void 0:Gt.commit_count)||0," \u4EBA"),n.a.createElement("span",{className:"ml5"},"\u672A\u5F00\u59CB\u505A\u9898 ",(Gt==null?void 0:Gt.uncommit_count)||0," \u4EBA"),(Gt==null?void 0:Gt.left_time)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("span",{className:"ml20 c-black"},Gt==null||((dr=Gt.left_time)===null||dr===void 0)?void 0:dr.status),n.a.createElement("span",{className:"ml20 c-orange-ff9"},Gt==null||(($n=Gt.left_time)===null||$n===void 0)?void 0:$n.time))),Object(de.c)()&&n.a.createElement(n.a.Fragment,null,n.a.createElement(We.a,{form:St,onChange:rn,initialValues:(Zn={},Object(yt.a)(Zn,"task_status","all"),Object(yt.a)(Zn,"course_group_info","all"),Object(yt.a)(Zn,"teacher_comment","all"),Zn)},((kn=Gt.task_status)===null||kn===void 0?void 0:kn.length)>0&&n.a.createElement(We.a.Item,{name:"task_status"},n.a.createElement(we.a.Group,{value:[],style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u4F5C\u4E1A\u72B6\u6001:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},Gt.task_status&&Gt.task_status.map(function(on,jt){return n.a.createElement(we.a,{name:"task_status",value:on.id},on.name,"(",on.count,")",on.name==="\u622A\u6B62\u540E\u901A\u5173"?n.a.createElement(R.a,{title:"\u5728\u89C4\u5B9A\u65F6\u95F4\u5916\u5B8C\u6210\u7684\u4F5C\u4E1A"},n.a.createElement("i",{className:"font13 ml5 iconfont icon-tishixiaowenhao"})):null)}))))),((gr=Gt.course_group_info)===null||gr===void 0?void 0:gr.length)>0&&n.a.createElement(We.a.Item,{name:"course_group_info"},n.a.createElement(we.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1",id:"divhe",style:{height:ce+"px",overflow:"hidden"}},(Bn=Gt.course_group_info)===null||Bn===void 0?void 0:Bn.map(function(on,jt){return n.a.createElement(we.a,{value:on.course_group_id},on.group_group_name,"(",on.count,")")})),Ye&&n.a.createElement("span",{onClick:function(){var jt=document.getElementById("divhe").scrollHeight;ce>47?Ce(47):Ce(jt)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},ce===47?"\u5C55\u5F00":"\u6536\u8D77",ce===47?n.a.createElement(kt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):n.a.createElement(qt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}))))),((ar=Gt.teacher_comment)===null||ar===void 0?void 0:ar.length)>0&&n.a.createElement(We.a.Item,{name:"teacher_comment"},n.a.createElement(we.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"font14",flex:"80px"},"\u8FFD\u52A0\u70B9\u8BC4:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},Gt.teacher_comment&&Gt.teacher_comment.map(function(on,jt){return n.a.createElement(we.a,{value:String(on.id)},on.name,"(",on.count,")")})))))),n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(g.a,null,n.a.createElement(p.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(jt){it.search=jt,it.page=1,Ke()},style:{width:240}})),n.a.createElement(g.a,null,n.a.createElement("span",{className:"ml5"},n.a.createElement("span",{className:"c-red"},Gt.work_count),"\u4E2A\u68C0\u7D22\u7ED3\u679C\uFF08",Gt.work_count,"\u4E2A\u5B66\u751F\uFF09")))),n.a.createElement(g.a,null,Object(de.c)()&&Gt.code_review&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",selectArrs:Gt.student_works.map(function(jt){return jt.id}),params:it}})}},n.a.createElement("span",{className:"".concat(le.a.tr1," iconfont icon-daimachazhong")}),"\u4EE3\u7801\u67E5\u91CD"),Object(de.c)()&&en&&n.a.createElement(U.a,{className:"ml10",onClick:Ft},n.a.createElement("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"\u66F4\u65B0\u6210\u7EE9"),(Gt==null||((sr=Gt.homework_status)===null||sr===void 0)?void 0:sr.includes("\u5DF2\u622A\u6B62"))&&Object(de.c)()&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8D28\u91CF\u68C0\u6D4B",selectArrs:Gt.student_works.map(function(jt){return jt.id}),params:it}})}},n.a.createElement("i",{className:"iconfont icon-a-08zhiliang-xianxing font14 pr5"}),"\u8D28\u91CF\u8BC4\u5206"),n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4",selectArrs:Gt.student_works.map(function(jt){return jt.id}),params:it}})}},n.a.createElement(Pe.a,{className:"mr5"}),"\u4E00\u952E\u70B9\u8BC4"),((Gt==null||((Pn=Gt.homework_status)===null||Pn===void 0)?void 0:Pn.includes("\u63D0\u4EA4\u4E2D"))||(Gt==null||((Tr=Gt.homework_status)===null||Tr===void 0)?void 0:Tr.includes("\u8865\u4EA4\u4E2D"))||(Gt==null||((Mr=Gt.homework_status)===null||Mr===void 0)?void 0:Mr.includes("\u8FDB\u884C\u4E2D")))&&n.a.createElement(U.a,{className:"ml10",onClick:function(){vt(!0)}},"\u4E00\u952E\u6253\u56DE"),Object(de.c)()&&n.a.createElement(ie.a,{overlay:cr,className:"ml10"},n.a.createElement(U.a,null,n.a.createElement(Ae.a,null),"\u5BFC\u51FA",n.a.createElement(ut.a,null)))))),n.a.createElement(_.a,{style:{justifyContent:"end",marginTop:"5px"}},Object(de.c)()&&en&&n.a.createElement("span",null,n.a.createElement("span",{style:{color:"red"}},"*"),"\u5217\u8868\u4E2D\u4F5C\u4E1A\u8BB0\u5F55\u5B58\u5728\u5DEE\u5F02\uFF0C\u8BF7\u70B9\u51FB\u201C\u66F4\u65B0\u6210\u7EE9\u201D\u6309\u94AE")),n.a.createElement(B.a,{className:"mt30",loading:Re["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(jt){return{onClick:function(In){window.open("/classrooms/".concat(it.coursesId,"/shixun_homework/").concat(it.categoryId,"/").concat(jt.id,"/comment"),"_blank")}}},scroll:{x:1500},dataSource:Gt.student_works,columns:Kn,onChange:function(jt,Jt,In){In.field&&(it.order=In.field),In.order||(it.b_order="asc"),In.order==="ascend"&&(it.b_order="asc"),In.order==="descend"&&(it.b_order="desc"),In.order||(it.b_order="asc"),Ke()}}),n.a.createElement(Oe,null),n.a.createElement(_e,null),n.a.createElement(Ze.a,null)),n.a.createElement(f.a,{title:"\u4E00\u952E\u6253\u56DE\u91CD\u505A",visible:Ct,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(o.a)(d.a.mark(function on(){var jt,Jt;return d.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(!(wr===2)){_n.next=13;break}if(!(Cn.length<=0)){_n.next=4;break}return b.b.info("\u8BF7\u9009\u62E9\u4F5C\u4E1A\u72B6\u6001"),_n.abrupt("return");case 4:if(De){_n.next=7;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),_n.abrupt("return");case 7:return _n.next=9,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:De,status:Cn}});case 9:jt=_n.sent,jt.status===0&&(Hn(jt),vt(!1),fr(!0)),_n.next=32;break;case 13:if(!(da===0||Pa===0)){_n.next=16;break}_n.next=22;break;case 16:if(da){_n.next=19;break}return b.b.info("\u6700\u4F4E\u5206\u4E0D\u80FD\u4E3A\u7A7A"),_n.abrupt("return");case 19:if(Pa){_n.next=22;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u4E3A\u7A7A"),_n.abrupt("return");case 22:if(!(da>Pa)){_n.next=25;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u5927\u4E8E\u6700\u4F4E\u5206"),_n.abrupt("return");case 25:if(De){_n.next=28;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),_n.abrupt("return");case 28:return _n.next=30,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:De,min_score:da,max_score:Pa}});case 30:Jt=_n.sent,Jt.status===0&&(Hn(Jt),vt(!1),fr(!0));case 32:case"end":return _n.stop()}},on)})),onCancel:function(){vt(!1),Rn()}},n.a.createElement("div",{style:{padding:"32px"}},n.a.createElement("div",null,n.a.createElement("div",null,n.a.createElement("span",{style:{width:"80px"}},"\u6253\u56DE\u65B9\u5F0F\uFF1A"),n.a.createElement(ke.a.Group,{value:wr,onChange:function(jt){Wr(jt.target.value)}},n.a.createElement(ke.a,{value:1},"\u6309\u6210\u7EE9\u6253\u56DE"),n.a.createElement(ke.a,{value:2},"\u6309\u4F5C\u4E1A\u72B6\u6001\u6253\u56DE"))),wr===1&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u4F4E\u5206\uFF1A"),n.a.createElement(rt.a,{min:0,max:100,value:da,onChange:function(jt){return ca(jt)},style:{width:"100px"}}),n.a.createElement("span",{style:{width:"80px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u9AD8\u5206\uFF1A"),n.a.createElement(rt.a,{min:0,max:100,value:Pa,onChange:function(jt){return ga(jt)},style:{width:"100px"}})),wr===2&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"80px"}},"\u4F5C\u4E1A\u72B6\u6001\uFF1A"),n.a.createElement(we.a.Group,{onChange:function(jt){pn(Object(y.a)(jt))},style:{width:"100%"}},(Sr=Gt.task_status)===null||Sr===void 0?void 0:Sr.map(function(on,jt){return n.a.createElement(we.a,{name:"task_status",value:on.id},on.name,"(",on.count,")")}))),n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*")," \u8BC4\u8BED\uFF1A"),n.a.createElement(H.a,{className:le.a.MdEditor,onChange:function(jt){return tt(jt)},placeholder:"\u8BF7\u586B\u5199\u8BC4\u8BED"}))))),n.a.createElement(f.a,{visible:zn,title:"\u6253\u56DE\u786E\u8BA4",onOk:Object(o.a)(d.a.mark(function on(){var jt,Jt;return d.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(!(wr===2)){_n.next=7;break}return _n.next=3,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:De,status:Cn}});case 3:jt=_n.sent,jt.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),Rn(),Ke(),fr(!1)),_n.next=11;break;case 7:return _n.next=9,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:De,min_score:da,max_score:Pa}});case 9:Jt=_n.sent,Jt.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),Rn(),Ke(),fr(!1));case 11:case"end":return _n.stop()}},on)})),onCancel:function(){Rn(),fr(!1)}},n.a.createElement("div",{style:{padding:"32px"}},wr===1&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u6210\u7EE9\u5728",da,"-",Pa,"\u7684\u5B66\u751F\u8FDB\u884C\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),wr===2&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u4F5C\u4E1A\u72B6\u6001\u4E3A",((hr=Gt.task_status)===null||hr===void 0?void 0:hr.filter(function(on){return Cn==null?void 0:Cn.includes(on.id)}).map(function(on){return on.name}).toString())+",","\u7684\u5B66\u751F\u8FDB\u884C\u4F5C\u4E1A\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u8BE5\u6761\u4EF6\u4E0B\u5171\u6709",Gr==null?void 0:Gr.count,"\u540D\u5B66\u751F")))),n.a.createElement(ze,null),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(w.a,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:hn,current:it.page||1,defaultPageSize:20,total:Gt.work_count})))},sn=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading,Nn=vn.user;return{shixunHomeworks:dn,loading:xn.effects,user:Nn}})(Qt),gt=L("fOrg"),zt=L("+KLJ"),Ot=function(dn){var xn,Nn=dn.shixunHomeworks,dr=dn.loading,$n=dn.dispatch,Zn=Object(l.i)(),kn=Object(s.useState)(Object(S.a)(Object(S.a)({},{page:1,limit:20,group_ids:[]}),Zn)),gr=Object(a.a)(kn,2),Bn=gr[0],ar=gr[1],sr=Object(l.h)(),Pn=Nn.codeReview,Tr=Object(s.useState)({}),Mr=Object(a.a)(Tr,2),Sr=Mr[0],hr=Mr[1],ne=We.a.useForm(),Re=Object(a.a)(ne,1),Xe=Re[0];Bn.order="code_rate",Bn.sort="desc",Bn.category=Bn.categoryId,Object(s.useEffect)(function(){Le(),console.log("params",Bn)},[Bn]),Object(s.useEffect)(function(){Nn.actionTabs.key==="\u6267\u884C\u4EE3\u7801\u67E5\u91CD"&&Le()},[Nn.actionTabs.key]);var Le=function(){var mt=Object(o.a)(d.a.mark(function it(){var Mt;return d.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,$n({type:"shixunHomeworks/getCodeReview",payload:Object(S.a)({},Bn)});case 2:Mt=Vt.sent,Mt.status===-2&&setTimeout(function(){return Le()},1500);case 4:case"end":return Vt.stop()}},it)}));return function(){return mt.apply(this,arguments)}}(),st=function(){},et=function(it,Mt){Bn.page=it,Bn.limit=20,$n({type:"shixunHomeworks/getCodeReview",payload:Object(S.a)({},Bn)})},pt=[{title:"\u5E8F\u53F7",dataIndex:"number",render:function(it,Mt,Xt){return Bn.limit*(Bn.page-1)+Xt+1}},{title:"\u59D3\u540D",dataIndex:"username"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u76F8\u4F3C\u5EA6",dataIndex:"code_rate",render:function(it){return n.a.createElement("span",{className:"c-orange"},it)}},{title:"\u64CD\u4F5C",dataInex:"action",render:function(it,Mt){return n.a.createElement("div",null,n.a.createElement(c.a,{target:"_blank",to:"/classrooms/".concat(Bn.coursesId,"/shixun_homework/").concat(Bn.categoryId,"/review_detail/").concat(Mt.user_id)},"\u67E5\u770B"),n.a.createElement("br",null))}}];return n.a.createElement("section",{className:"minH500 bg-white pl30 pr30 pt10"},(Pn==null?void 0:Pn.status)===-2&&n.a.createElement(zt.a,{message:"\u67E5\u91CD\u8FDB\u884C\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u2026\u2026",className:"mb10 font14",type:"error"}),n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("p",{className:"mt10"},"\u67E5\u91CD\u65F6\u95F4\uFF1A",Pn.last_review_time,n.a.createElement(U.a,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){$n({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",params:Bn}})}},"\u4EE3\u7801\u67E5\u91CD"))),n.a.createElement(g.a,null,n.a.createElement(p.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(it){Bn.search=it,$n({type:"shixunHomeworks/getCodeReview",payload:Bn})},style:{width:200}}),n.a.createElement("span",{className:"ml5 c-red"}))),((xn=Pn.group_info)===null||xn===void 0?void 0:xn.length)>0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"80px",className:"font14"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(we.a,{checked:Bn.group_ids=="",value:"all",onChange:function(it){delete Bn.group_ids,Bn.group_ids=[],Bn.page=1,ar(Object(S.a)({},Bn))}},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},Pn.group_info&&Pn.group_info.map(function(mt,it){return n.a.createElement(we.a,{value:mt.id,checked:Bn.group_ids.includes(mt.id),onChange:function(Xt){Xt.target.checked?Bn.group_ids.push(mt.id):Bn.group_ids.splice(Bn.group_ids.indexOf(mt.id),1),Bn.page=1,ar(Object(S.a)({},Bn))}},mt.name,"(",mt.members_count,")")}))),n.a.createElement(_.a,{className:"font14 c-red mt5"},n.a.createElement(g.a,null,"\u672C\u9875\u4EC5\u663E\u793A\u5168\u90E8\u5DF2\u67E5\u91CD\u5206\u73ED"))),n.a.createElement("p",{className:"mt10"},n.a.createElement("span",{className:"c-red"},Pn.copy_reviews_count),"\u4E2A\u7591\u4F3C\u6284\u88AD\u4F5C\u54C1\uFF08",Pn.all_reviews_count,"\u4F5C\u54C1\uFF09"),n.a.createElement(B.a,{className:"mt30",loading:dr["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:Pn.users_reviews,columns:pt,onChange:function(it,Mt,Xt){Xt.order==="ascend"&&(Bn.b_order="asc"),Xt.order==="descend"&&(Bn.b_order="desc"),Xt.order||delete Bn.b_order,$n({type:"shixunHomeworks/getCodeReview",payload:Object(S.a)({},Bn)})}}),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(w.a,{showSizeChanger:!1,onChange:et,defaultCurrent:Bn.page||1,current:Bn.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:Pn.copy_reviews_count})))},At=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(Ot),ft=L("OaEy"),be=L("2fM7"),Fe=L("iQDF"),Nt=L("+eQT"),bt=L("zetH"),Kt=L.n(bt),Zt=L("eozf"),Ge=L("LvDl"),lt=Nt.a.RangePicker,Lt=be.a.Option,Wt=function(dn){var xn=dn.shixunHomeworks,Nn=dn.loading,dr=dn.dispatch,$n=Object(l.i)(),Zn=Object(l.h)(),kn=xn.workSetting,gr=xn.workList,Bn=xn.changeData,ar=Object(s.useState)(!0),sr=Object(a.a)(ar,2),Pn=sr[0],Tr=sr[1],Mr=Object(s.useState)({}),Sr=Object(a.a)(Mr,2),hr=Sr[0],ne=Sr[1],Re=Object(s.useState)(!1),Xe=Object(a.a)(Re,2),Le=Xe[0],st=Xe[1],et=We.a.useForm(),pt=Object(a.a)(et,1),mt=pt[0],it=Object(s.useState)([]),Mt=Object(a.a)(it,2),Xt=Mt[0],Vt=Mt[1],St=Object(s.useState)([]),nn=Object(a.a)(St,2),Qe=nn[0],en=nn[1],Bt=Object(s.useState)(!1),bn=Object(a.a)(Bt,2),On=bn[0],Gt=bn[1],cn=Object(s.useState)([]),Ht=Object(a.a)(cn,2),Sn=Ht[0],wn=Ht[1],wt=Object(s.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,forbid_copy_answers:!1,public_after_abort:!1,public_after_over:!1}),It=Object(a.a)(wt,2),Pt=It[0],Ct=It[1];Object(s.useEffect)(function(){return vt(),function(){Vt([].concat())}},[]);var vt=function(){dr({type:"shixunHomeworks/getWorkSetting",payload:Object(S.a)({},$n)})};Object(s.useEffect)(function(){if(!(kn!=null&&kn.course_id))return;Object.keys(Pt).map(function(pn){Pt[pn]=kn[pn]}),(!Pt.allow_late||!Pt.unified_late)&&(Pt.late_penalty=5),Xt=JSON.parse(JSON.stringify(kn.group_settings.map(function(pn){return Object(S.a)(Object(S.a)({},pn),{},{group_name:[pn.group_name]})}).filter(function(pn){return pn.publish_time!==null}))),Qe=JSON.parse(JSON.stringify(kn.allow_late_settings.map(function(pn){return Object(S.a)(Object(S.a)({},pn),{},{group_name:[pn.group_name]})}).filter(function(pn){return pn.late_time!==null}))),Ct(Object(S.a)({},Pt)),Vt(Object(y.a)(Xt)),en(Object(y.a)(Qe))},[kn]);var Dn=function(){var Yt,Tn,zn=JSON.parse(JSON.stringify(Pt));if(zn.challenge_settings.filter(function(Gn){return!Gn.hide}),zn.categoryId=$n.categoryId,(Yt=zn.challenge_settings)!==null&&Yt!==void 0&&Yt.every(function(Gn){return!Gn.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(Pt.unified_setting||(Xt=(Tn=Xt)===null||Tn===void 0?void 0:Tn.map(function(Gn){var Lr;if(!Gn.publish_time||!Gn.end_time)throw b.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Gn.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Gn.group_name=typeof(Gn==null?void 0:Gn.group_name)=="string"?[Gn==null?void 0:Gn.group_name]:Gn==null?void 0:Gn.group_name,Gn.group_id=(Lr=kn.group_settings)===null||Lr===void 0?void 0:Lr.filter(function(Gr){var Hn;return Gn==null||((Hn=Gn.group_name)===null||Hn===void 0)?void 0:Hn.includes(Gr.group_name)}).map(function(Gr){return Gr.group_id||Gr.id}).toString().split(","),Gn})),zn.group_settings=Xt,Pt.allow_late)if(Pt.unified_late){if(Pt.late_penalty===null||Pt.late_penalty===void 0||Pt.late_penalty<0||Pt.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Pt.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var fr;Qe=(fr=Qe)===null||fr===void 0?void 0:fr.map(function(Gn){var Lr,Gr;if(Gn.late_penalty===null||Gn.late_penalty===void 0||Gn.late_penalty<0||Gn.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Gn.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Gn.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Gn.group_name=typeof(Gn==null?void 0:Gn.group_name)=="string"?[Gn==null?void 0:Gn.group_name]:Gn==null?void 0:Gn.group_name,Gn.group_id=Gn==null||((Lr=Gn.group_name)===null||Lr===void 0||((Gr=Lr.map(function(Hn){var Yn,Jn,wr=(Yn=kn.group_settings)===null||Yn===void 0||((Jn=Yn.filter(function(Wr){return(Wr==null?void 0:Wr.group_name)===Hn}))===null||Jn===void 0)?void 0:Jn[0];return wr==null?void 0:wr.group_id}))===null||Gr===void 0))?void 0:Gr.toString().split(","),Gn}),zn.allow_late_settings=Qe}$t(zn)},$t=function(Yt){var Tn,zn;if(console.log(Yt.total_score,Yt.eff_score),Yt.total_score===null){b.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Yt!=null&&Yt.work_efficiency&&Yt.eff_score===null){b.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var fr=Yt.challenge_settings.reduce(function(Gr,Hn){return Gr+Number(Hn.challenge_score)},0);if((fr==null?void 0:fr.toFixed(10))!==((Tn=Yt.total_score-Yt.eff_score)===null||Tn===void 0?void 0:Tn.toFixed(10))){b.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(Yt.total_score,"\u5206"));return}var Gn={shixun_evaluation:Yt.shixun_evaluation,challenge_settings:Yt.challenge_settings},Lr=function(){var Gr=Object(o.a)(d.a.mark(function Hn(){var Yn;return d.a.wrap(function(wr){for(;;)switch(wr.prev=wr.next){case 0:return st(!0),wr.next=3,Object(z.a)("/api/homework_commons/".concat($n.categoryId,"/public_setting.json"),{method:"post",body:Object(S.a)({},Yt)});case 3:Yn=wr.sent,Yn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),Tr(!0),vt(),dr({type:"shixunHomeworks/getWorkList",payload:Object(S.a)({},$n)})),st(!1);case 6:case"end":return wr.stop()}},Hn)}));return function(){return Gr.apply(this,arguments)}}();!Object(Ge.isEqual)(Bn,Gn)&&!(gr!=null&&(zn=gr.homework_status)!==null&&zn!==void 0&&zn.includes("\u672A\u53D1\u5E03"))?f.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Lr}):Lr()},Cn=Object(s.useMemo)(function(){return Pt.public_after_abort?"public_after_abort":Pt.public_after_over?"public_after_over":"immediately"},[Pt]);return n.a.createElement("section",{className:[Kt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u516C\u5F00\u8BBE\u7F6E")),n.a.createElement(g.a,null,(kn==null?void 0:kn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Tr(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:Pt.score_open,disabled:Pn,onChange:function(Yt){Pt.score_open=Yt.target.checked,Ct(Object.assign({},Pt))}},n.a.createElement("strong",null,"\u516C\u5F00\u6210\u7EE9")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5728\u4F5C\u4E1A\u622A\u6B62/\u8865\u4EA4\u7ED3\u675F\u65F6\u95F4\u4E4B\u540E\uFF0C\u5DF2\u63D0\u4EA4\u4F5C\u54C1\u7684\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u5176\u5B83\u5B66\u751F\u7684\u6210\u7EE9\uFF0C\u5426\u5219\u53EA\u80FD\u67E5\u770B\u81EA\u5DF1\u7684\u6210\u7EE9)")),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:Pt.answer_public,disabled:Pn,onChange:function(Yt){Yt.target.checked?Ct(function(Tn){return Object(S.a)(Object(S.a)({},Tn),{},{answer_public:Yt.target.checked})}):Ct(function(Tn){return Object(S.a)(Object(S.a)({},Tn),{},{answer_public:Yt.target.checked,public_after_abort:!1,public_after_over:!1})})}},n.a.createElement("strong",null,"\u516C\u5F00\u7B54\u6848")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u5B9E\u8BAD\u53C2\u8003\u7B54\u6848\uFF0C\u5426\u5219\u7981\u6B62\u67E5\u770B\u7B54\u6848)")),Pt.answer_public&&n.a.createElement(g.a,{span:24,className:"mt10 pl30"},n.a.createElement(ke.a.Group,{style:{marginLeft:22},onChange:function(Yt){Yt.target.value==="public_after_abort"?Ct(function(Tn){return Object(S.a)(Object(S.a)({},Tn),{},{public_after_abort:!0,public_after_over:!1})}):Yt.target.value==="public_after_over"?Ct(function(Tn){return Object(S.a)(Object(S.a)({},Tn),{},{public_after_abort:!1,public_after_over:!0})}):Ct(function(Tn){return Object(S.a)(Object(S.a)({},Tn),{},{public_after_abort:!1,public_after_over:!1})})},value:Cn,disabled:Pn},n.a.createElement(ke.a,{value:"immediately"},"\u7ACB\u5373\u516C\u5F00"),n.a.createElement(ke.a,{value:"public_after_abort"},"\u4F5C\u4E1A\u622A\u6B62\u540E\u516C\u5F00"),n.a.createElement(ke.a,{value:"public_after_over"},"\u8BFE\u5802\u7ED3\u675F\u540E\u516C\u5F00"))),n.a.createElement(g.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:Pt.forbid_copy_answers,disabled:Pn,onChange:function(Yt){Pt.forbid_copy_answers=Yt.target.checked,Ct(Object.assign({},Pt))}},n.a.createElement("strong",null,"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u7981\u6B62\u5B66\u751F\u590D\u5236\u53C2\u8003\u7B54\u6848\uFF0C\u5426\u5219\u5B66\u751F\u53EF\u4EE5\u590D\u5236\u53C2\u8003\u7B54\u6848)")),n.a.createElement(g.a,{span:24,className:"mt15 pl30 pb40"},n.a.createElement(we.a,{checked:Pt.comment_public,disabled:Pn,onChange:function(Yt){Pt.comment_public=Yt.target.checked,Ct(Object.assign({},Pt))}},n.a.createElement("strong",null,"\u516C\u5F00\u8BC4\u8BBA")),n.a.createElement("span",{className:"c-grey-c font12"},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u8BFE\u7A0B\u5B9E\u9A8C\u7684\u8BC4\u8BBA\uFF0C\u5426\u5219\u7981\u6B62\u67E5\u770B)")),!Pn&&n.a.createElement(g.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",loading:Le,onClick:function(){return Dn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Tr(!0),vt()}},"\u53D6\u6D88"))),n.a.createElement(f.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:On,onCancel:function(){return Gt(!1)}},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(p.a.Search,{onChange:function(Yt){}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Yt,Tn){wn(Yt)}},pagination:!1,dataSource:[{name:"1"}],columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time",key:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time",key:"end_time"}]}))))},ln=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(Wt),gn=function(dn){var xn=dn.shixunHomeworks,Nn=dn.loading,dr=dn.dispatch,$n=Object(l.i)(),Zn=xn.workSetting,kn=xn.workList,gr=xn.changeData,Bn=Object(s.useState)(!0),ar=Object(a.a)(Bn,2),sr=ar[0],Pn=ar[1],Tr=Object(s.useState)(!1),Mr=Object(a.a)(Tr,2),Sr=Mr[0],hr=Mr[1],ne=Object(s.useState)(!1),Re=Object(a.a)(ne,2),Xe=Re[0],Le=Re[1],st=Object(s.useState)([]),et=Object(a.a)(st,2),pt=et[0],mt=et[1],it=Object(s.useState)([]),Mt=Object(a.a)(it,2),Xt=Mt[0],Vt=Mt[1],St=Object(s.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1,difficulty_level_sort:"asc"}),nn=Object(a.a)(St,2),Qe=nn[0],en=nn[1];Object(s.useEffect)(function(){return Bt(),function(){mt([].concat())}},[]);var Bt=function(){dr({type:"shixunHomeworks/getWorkSetting",payload:Object(S.a)({},$n)})};Object(s.useEffect)(function(){if(!(Zn!=null&&Zn.course_id))return;Object.keys(Qe).map(function(cn){Qe[cn]=Zn[cn]}),(!Qe.allow_late||!Qe.unified_late)&&(Qe.late_penalty=5),pt=JSON.parse(JSON.stringify(Zn.group_settings.map(function(cn){return Object(S.a)(Object(S.a)({},cn),{},{group_name:[cn.group_name]})}).filter(function(cn){return cn.publish_time!==null}))),Xt=JSON.parse(JSON.stringify(Zn.allow_late_settings.map(function(cn){return Object(S.a)(Object(S.a)({},cn),{},{group_name:[cn.group_name]})}).filter(function(cn){return cn.late_time!==null}))),en(Object(S.a)(Object(S.a)({},Qe),{},{difficulty_level_sort:Qe.difficulty_level_sort||"asc"})),mt(Object(y.a)(pt)),Vt(Object(y.a)(Xt))},[Zn]);var bn=function(){var Ht,Sn,wn=JSON.parse(JSON.stringify(Qe));if(wn.challenge_settings.filter(function(It){return!It.hide}),wn.categoryId=$n.categoryId,(Ht=wn.challenge_settings)!==null&&Ht!==void 0&&Ht.every(function(It){return!It.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(Qe.unified_setting||(pt=(Sn=pt)===null||Sn===void 0?void 0:Sn.map(function(It){var Pt;if(!It.publish_time||!It.end_time)throw b.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!It.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return It.group_name=typeof(It==null?void 0:It.group_name)=="string"?[It==null?void 0:It.group_name]:It==null?void 0:It.group_name,It.group_id=(Pt=Zn.group_settings)===null||Pt===void 0?void 0:Pt.filter(function(Ct){var vt;return It==null||((vt=It.group_name)===null||vt===void 0)?void 0:vt.includes(Ct.group_name)}).map(function(Ct){return Ct.group_id||Ct.id}).toString().split(","),It})),wn.group_settings=pt,Qe.allow_late)if(Qe.unified_late){if(Qe.late_penalty===null||Qe.late_penalty===void 0||Qe.late_penalty<0||Qe.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Qe.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var wt;Xt=(wt=Xt)===null||wt===void 0?void 0:wt.map(function(It){var Pt,Ct;if(It.late_penalty===null||It.late_penalty===void 0||It.late_penalty<0||It.late_penalty>100)throw b.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!It.late_time)throw b.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!It.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return It.group_name=typeof(It==null?void 0:It.group_name)=="string"?[It==null?void 0:It.group_name]:It==null?void 0:It.group_name,It.group_id=It==null||((Pt=It.group_name)===null||Pt===void 0||((Ct=Pt.map(function(vt){var Dn,$t,Cn=(Dn=Zn.group_settings)===null||Dn===void 0||(($t=Dn.filter(function(pn){return(pn==null?void 0:pn.group_name)===vt}))===null||$t===void 0)?void 0:$t[0];return Cn==null?void 0:Cn.group_id}))===null||Ct===void 0))?void 0:Ct.toString().split(","),It}),wn.allow_late_settings=Xt}On(wn)},On=function(Ht){var Sn,wn;if(Ht.total_score===null){b.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Ht!=null&&Ht.work_efficiency&&Ht.eff_score===null){b.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var wt=Ht.challenge_settings.reduce(function(Ct,vt){return Ct+Number(vt.challenge_score)},0);if((wt==null?void 0:wt.toFixed(10))!==((Sn=Ht.total_score-Ht.eff_score)===null||Sn===void 0?void 0:Sn.toFixed(10))){b.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(Ht.total_score,"\u5206"));return}var It={shixun_evaluation:Ht.shixun_evaluation,challenge_settings:Ht.challenge_settings},Pt=function(){var Ct=Object(o.a)(d.a.mark(function vt(){var Dn;return d.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return hr(!0),Cn.next=3,Object(z.a)("/api/homework_commons/".concat($n.categoryId,"/score_setting.json"),{method:"post",body:Object(S.a)({},Ht)});case 3:Dn=Cn.sent,Dn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),Pn(!0),Bt(),dr({type:"shixunHomeworks/getWorkList",payload:Object(S.a)({},$n)})),hr(!1);case 6:case"end":return Cn.stop()}},vt)}));return function(){return Ct.apply(this,arguments)}}();!Object(Ge.isEqual)(gr,It)&&!(kn!=null&&(wn=kn.homework_status)!==null&&wn!==void 0&&wn.includes("\u672A\u53D1\u5E03"))?f.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:Pt}):Pt()},Gt=function(){var Ht,Sn=Qe.eff_score,wn=Qe.total_score,wt=Qe.difficulty_level_sort,It=wn-Sn,Pt=(Ht=Qe.challenge_settings)===null||Ht===void 0?void 0:Ht.filter(function(Tn){return Tn.checked}).length;if(!Pt){Qe.challenge_settings.map(function(Tn,zn){Tn.challenge_score=0});return}var Ct=Qe.challenge_settings.filter(function(Tn){return Tn.checked}).map(function(Tn){return wt==="desc"?Tn.challenge_exp_desc:Tn.challenge_exp}).reduce(function(Tn,zn){return Tn+zn}),vt=It/Ct,Dn=0,$t=0,Cn;switch(Qe.shixun_evaluation){case 0:var pn=parseFloat((It/Pt).toFixed(1));Qe.challenge_settings.map(function(Tn,zn){Tn.checked?(Dn=zn,Tn.challenge_score=pn>0?pn:0):Tn.challenge_score=0}),Cn=(It-pn*(Pt-1)).toFixed(1),Qe.challenge_settings[Dn].challenge_score=Cn>0?Cn:0;break;case 1:Qe.challenge_settings.map(function(Tn,zn){Tn.checked?(Dn=zn,$t+=Number((Math.round((wt==="desc"?Tn.challenge_exp_desc:Tn.challenge_exp)*vt*10)/10).toFixed(1)),Tn.challenge_score=(Math.round((wt==="desc"?Tn.challenge_exp_desc:Tn.challenge_exp)*vt*10)/10).toFixed(1)):Tn.challenge_score=0});var Yt=Qe.challenge_settings[Dn].challenge_score;Cn=(It-$t+Number(Yt)).toFixed(1),Qe.challenge_settings[Dn].challenge_score=Cn>0?Cn:0;break}};return n.a.createElement("section",{className:[Kt.a.form," bg-white pl30 pr30 pt10 mb20 pb10"].join(" ")},n.a.createElement(_.a,{className:"mt25"},n.a.createElement(g.a,{flex:"1"}),n.a.createElement(g.a,null,(Zn==null?void 0:Zn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Pn(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(g.a,{span:24,className:"pl30 mt10"},n.a.createElement("strong",null,"\u603B\u5206\u503C\uFF1A"),n.a.createElement(rt.a,{min:0,value:Qe.total_score,disabled:sr,onChange:function(Ht){Qe.total_score=Ht,en(Object.assign({},Qe)),Gt()}}),"\xA0\u5206"),n.a.createElement(g.a,{span:24,style:{paddingLeft:60,marginTop:20}},n.a.createElement("strong",null,"\u5173\u5361\u4EFB\u52A1\u7684\u9009\u62E9\u548C\u5206\u503C\u8BBE\u7F6E"),n.a.createElement("span",{className:"c-orange"},"\xA0(\u603B\u5206\u503C = \u6548\u7387\u5206+ \u5173\u5361\u4EFB\u52A1\u603B\u5206)"))),n.a.createElement(_.a,{style:{paddingLeft:85,marginTop:30}},n.a.createElement(g.a,{flex:"1"},n.a.createElement(we.a,{disabled:sr,checked:Qe.work_efficiency,onChange:function(Ht){Qe.work_efficiency=Ht.target.checked,Qe.work_efficiency?Qe.eff_score=20:Qe.eff_score=0,en(Object.assign({},Qe)),Gt()}},n.a.createElement("strong",null,"\u6548\u7387\u5206")),n.a.createElement("span",{className:"c-orange font12",style:{marginLeft:-4}},"(\u9009\u4E2D\uFF0C\u5219\u5B66\u751F\u6700\u7EC8\u6210\u7EE9\u5305\u542B\u6548\u7387\u5206\u3002\u6548\u7387\u5206\u5728\u4F5C\u4E1A\u622A\u6B62\u6216\u8005\u8865\u4EA4\u7ED3\u675F\u540E\u7531\u7CFB\u7EDF\u81EA\u52A8\u751F\u6210)")),n.a.createElement(g.a,{className:Kt.a.efficiency},"\uFF08\u5B66\u751F\u5B66\u4E60\u6548\u7387= log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)",n.a.createElement("br",null),"\uFF08\u5B66\u751F\u6548\u7387\u5206 = \u5B66\u751F\u5B66\u4E60\u6548\u7387 / \u8BFE\u5802\u5B66\u751F\u6700\u9AD8\u5B66\u4E60\u6548\u7387 * \u5206\u503C\uFF09",n.a.createElement("br",null),n.a.createElement("span",{style:{marginLeft:10}},"\u53E6\uFF1A\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B66\u751F\u6548\u7387\u5206\u8BB0 0 \u5206"))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:105}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"mr5"},"\u6548\u7387\u5206"),n.a.createElement(rt.a,{min:0,disabled:sr||!Qe.work_efficiency,value:Qe.eff_score,step:.1,onChange:function(Ht){Qe.eff_score=Ht,en(Object.assign({},Qe)),Gt()}}),n.a.createElement("span",null,"\xA0\u5206"))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:105,marginTop:"20px"}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"mr5"},"\u5B9E\u8BAD\u8017\u65F6\u89C4\u5219\uFF1A"),n.a.createElement(ke.a.Group,{disabled:sr,value:Qe.training_time_rules,onChange:function(Ht){Qe.training_time_rules=Ht.target.value,en(Object.assign({},Qe)),Gt()}},n.a.createElement(ke.a,{value:1},"\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement(ke.a,{value:2},"\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement(ke.a,{value:3},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F",n.a.createElement("i",{onClick:function(Ht){Ht.stopPropagation(),Ht.preventDefault(),Le(!0)},style:{marginLeft:10,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"}))))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:85,marginTop:35}},n.a.createElement(g.a,null,n.a.createElement("strong",null,"\u5173\u5361\u4EFB\u52A1\u5206\u503C\u8BBE\u7F6E\u89C4\u5219")),n.a.createElement(g.a,{flex:"1"},n.a.createElement("div",{className:"ml5"},n.a.createElement(ke.a.Group,{disabled:sr,value:Qe.shixun_evaluation,onChange:function(Ht){Qe.shixun_evaluation=Ht.target.value,Ht.target.value!==1&&(Qe.difficulty_level_sort="asc"),en(Object.assign({},Qe)),Gt()}},n.a.createElement(ke.a,{value:0},"\u5747\u5206\u6BD4\u4F8B"),n.a.createElement(ke.a,{value:1},"\u96BE\u6613\u5EA6"),n.a.createElement(ke.a,{value:2},"\u81EA\u5B9A\u4E49\u5206\u503C"))))),n.a.createElement(_.a,{style:{paddingLeft:343,marginTop:5,display:Qe.shixun_evaluation===1?"flex":"none"}},n.a.createElement(ke.a.Group,{disabled:sr,value:Qe.difficulty_level_sort||"asc",onChange:function(Ht){Qe.difficulty_level_sort=Ht.target.value,en(Object.assign({},Qe)),Gt()}},n.a.createElement(ke.a,{value:"asc"},"\u6B63\u5E8F\u8D4B\u5206"),n.a.createElement(ke.a,{value:"desc"},"\u53CD\u5E8F\u8D4B\u5206"))),n.a.createElement(_.a,null,n.a.createElement(g.a,{style:{marginLeft:145,marginTop:15}},n.a.createElement("span",{className:"font16"},"\u5173\u5361\u540D\u79F0"),n.a.createElement("span",{className:"font14 ml5 c-orange"},Zn!=null&&Zn.task_pass?"(\u8BF7\u9009\u4E2D\u9700\u8981\u5B66\u751F\u5B8C\u6210\u7684\u5173\u5361\uFF0C\u8BE5\u5B9E\u8BAD\u652F\u6301\u8DF3\u5173\u5B66\u4E60)":"(\u8BE5\u5B9E\u8BAD\u4E0D\u652F\u6301\u8DF3\u5173\u5B66\u4E60)"))),Qe.challenge_settings&&Qe.challenge_settings.map(function(cn,Ht){return n.a.createElement(_.a,{key:Ht,align:"middle",style:{paddingLeft:275,marginTop:20}},n.a.createElement(g.a,{flex:"1"},n.a.createElement(we.a,{disabled:sr||!(Zn!=null&&Zn.task_pass),checked:cn.checked,onChange:function(wn){var wt=Object(Ge.cloneDeep)(Qe.challenge_settings);if(wt[Ht].checked=wn.target.checked,wt!=null&&wt.every(function(It){return!It.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}Qe.challenge_settings[Ht].checked=wn.target.checked,Qe.challenge_settings[Ht].hide=wn.target.checked,Qe.shixun_evaluation===2&&!wn.target.checked&&(Qe.challenge_settings[Ht].challenge_score=0),en(Object(S.a)({},Qe)),Gt()}},n.a.createElement("strong",null,cn.challenge_name))),n.a.createElement(g.a,null,!cn.checked&&n.a.createElement("span",{className:"tag-style-border-small bg-orange border-raduis-50 c-white mr10"},"\u53EF\u4E0D\u505A")),n.a.createElement(g.a,{flex:"150px"},n.a.createElement(rt.a,{min:0,step:.1,value:cn.challenge_score,disabled:sr||Qe.shixun_evaluation!==2||!cn.checked,onChange:function(wn){Qe.challenge_settings[Ht].challenge_score=wn,en(Object(S.a)({},Qe))}}),n.a.createElement("span",{className:"ml10"},"\u5206")),n.a.createElement(g.a,{flex:"300px"},n.a.createElement("span",{className:"tag-style-border-small bg-green c-white mr10"},cn.difficulty),"\u91D1\u5E01\u5956\u52B1\u6570\uFF1A ",cn.challenge_exp))}),n.a.createElement(_.a,{className:"mt30",style:{paddingLeft:65}},n.a.createElement(g.a,null,n.a.createElement("span",{className:"font16 c-black"},"\u67E5\u770B\u53C2\u8003\u7B54\u6848\u624D\u901A\u8FC7\u8BC4\u6D4B\u7684\u5173\u5361\u6263\u5206\u89C4\u5219"),n.a.createElement("span",{className:"font12 c-grey-c"},"\xA0(\u5B66\u751F\u901A\u8FC7\u8BC4\u6D4B\u540E\u518D\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF0C\u4E0D\u5BF9\u6210\u7EE9\u4EA7\u751F\u5F71\u54CD)"))),n.a.createElement(_.a,{style:{paddingLeft:65}},n.a.createElement(ke.a.Group,{disabled:sr,value:Qe.answer_open_evaluation,onChange:function(Ht){Qe.answer_open_evaluation=Ht.target.value,en(Object(S.a)({},Qe))}},n.a.createElement(ke.a,{value:!1,style:{marginTop:15}},n.a.createElement("strong",null,"\u6309\u67E5\u770B\u7B54\u6848\u7EA7\u522B\u6263\u5206"),n.a.createElement("span",{className:"c-grey-c"},"(\u6839\u636E\u5B66\u5458\u9009\u62E9\u67E5\u770B\u7684\u5B9E\u8BAD\u7B54\u6848\u7EA7\u522B(\u89E3\u9898\u601D\u8DEF\u3001\u5B8C\u6574\u7B54\u6848)\uFF0C\u6263\u51CF\u76F8\u5E94\u7684\u5206\u503C)")),n.a.createElement("br",null),n.a.createElement(ke.a,{value:!0,style:{marginTop:15}},n.a.createElement("strong",null,"\u4E0D\u6263\u5206")))),!sr&&n.a.createElement(g.a,{className:"mb50",style:{marginTop:"10px"}},n.a.createElement(U.a,{type:"primary",size:"large",loading:Sr,onClick:function(){return bn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Pn(!0),Bt()}},"\u53D6\u6D88")),n.a.createElement(f.a,{visible:Xe,width:860,onCancel:function(){Le(!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"))))},tr=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(gn),Wn=function(dn){var xn,Nn,dr=dn.shixunHomeworks,$n=dn.loading,Zn=dn.dispatch,kn=Object(s.useState)(!0),gr=Object(a.a)(kn,2),Bn=gr[0],ar=gr[1],sr=Object(s.useState)(!1),Pn=Object(a.a)(sr,2),Tr=Pn[0],Mr=Pn[1],Sr=Object(s.useState)([]),hr=Object(a.a)(Sr,2),ne=hr[0],Re=hr[1],Xe=Object(s.useState)([]),Le=Object(a.a)(Xe,2),st=Le[0],et=Le[1],pt=Object(s.useState)([]),mt=Object(a.a)(pt,2),it=mt[0],Mt=mt[1],Xt=Object(s.useState)([]),Vt=Object(a.a)(Xt,2),St=Vt[0],nn=Vt[1],Qe=Object(l.i)();function en(){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(o.a)(d.a.mark(function cn(){var Ht;return d.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.next=2,Object(z.a)("/api/homework_commons/".concat(Qe.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:Ht=wn.sent,et(Ht);case 4:case"end":return wn.stop()}},cn)})),Bt.apply(this,arguments)}function bn(){return On.apply(this,arguments)}function On(){return On=Object(o.a)(d.a.mark(function cn(){var Ht;return d.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.next=2,Object(z.a)("/api/courses/".concat(Qe==null?void 0:Qe.coursesId,"/teachers"),{method:"get",params:{homework_id:Qe.categoryId}});case 2:Ht=wn.sent,Ht==null||Ht.teacher_list.map(function(wt){wt.key=wt.user_id}),Mt(Ht==null?void 0:Ht.teacher_list),nn(Ht==null?void 0:Ht.teacher_list);case 6:case"end":return wn.stop()}},cn)})),On.apply(this,arguments)}Object(s.useEffect)(function(){en(),bn()},[Qe]);var Gt=function(){};return n.a.createElement("section",{className:[Kt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(g.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u534F\u4F5C\u8BBE\u7F6E"),(st==null?void 0:st.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){Mr(!0)}},"+\u6DFB\u52A0\u534F\u4F5C\u8005"))),n.a.createElement(_.a,{style:{marginTop:"20px",marginBottom:"20px"}},(st==null||((xn=st.data)===null||xn===void 0)?void 0:xn.length)<=0&&n.a.createElement(Et.a,{customText:"\u8BE5\u4F5C\u4E1A\u6682\u65E0\u534F\u4F5C\u8005"}),st==null||((Nn=st.data)===null||Nn===void 0)?void 0:Nn.map(function(cn){return n.a.createElement("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"}},n.a.createElement("span",{style:{flex:"1"}},cn==null?void 0:cn.real_name),(st==null?void 0:st.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(o.a)(d.a.mark(function Ht(){var Sn;return d.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(z.a)("/api/homework_commons/".concat(Qe.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:cn.id}});case 2:Sn=wt.sent,Sn.status===0&&(b.b.info("\u5220\u9664\u6210\u529F"),en(),bn());case 4:case"end":return wt.stop()}},Ht)}))},"X"))})),n.a.createElement(_.a,null,!Bn&&n.a.createElement(g.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:function(){return Gt()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){ar(!0)}},"\u53D6\u6D88"))),n.a.createElement(f.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:Tr,onCancel:function(){return Mr(!1)},onOk:Object(o.a)(d.a.mark(function cn(){var Ht;return d.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(!(ne.length===0)){wn.next=3;break}return b.b.info("\u8BF7\u9009\u62E9\u534F\u4F5C\u8001\u5E08"),wn.abrupt("return");case 3:return wn.next=5,Object(z.a)("/api/homework_commons/".concat(Qe.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:ne}});case 5:Ht=wn.sent,Ht.status===0&&(b.b.info("\u6DFB\u52A0\u6210\u529F"),Re([]),en(),bn(),Mr(!1));case 7:case"end":return wn.stop()}},cn)}))},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(p.a.Search,{onChange:function(Ht){Mt(St.filter(function(Sn){return Sn.name.indexOf(Ht.target.value)>-1}))}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Ht,Sn){Re(Ht)},selectedRowKeys:ne,getCheckboxProps:function(Ht){return{disabled:Ht.is_collaborator}}},pagination:!1,dataSource:it,columns:[{title:"\u59D3\u540D",dataIndex:"name",key:"name"},{title:"\u89D2\u8272",dataIndex:"role",key:"role"}]}))))},En=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(Wn),xr=Nt.a.RangePicker,Er=be.a.Option,rr=function(dn){var xn=dn.shixunHomeworks,Nn=dn.loading,dr=dn.dispatch;return n.a.createElement("section",{className:[Kt.a.form," bg-white pl30 pt10"].join(" ")},n.a.createElement(F.a,null,n.a.createElement(F.a.TabPane,{tab:"\u53D1\u5E03\u8BBE\u7F6E",key:1},n.a.createElement(Zt.a,null)),n.a.createElement(F.a.TabPane,{tab:"\u8BC4\u5206\u8BBE\u7F6E",key:2},n.a.createElement(tr,null)),n.a.createElement(F.a.TabPane,{tab:"\u516C\u5F00\u8BBE\u7F6E",key:3},n.a.createElement(ln,null)),n.a.createElement(F.a.TabPane,{tab:"\u534F\u4F5C\u8BBE\u7F6E",key:4},n.a.createElement(En,null))))},ur=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(rr),Rr=L("lO7E"),Kr=L.n(Rr),ra=L("cVA7"),fn=L.n(ra),or=function(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return console.log("---",dn,xn,Nn),{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:["\u7B49\u7EA7A","\u7B49\u7EA7B","\u7B49\u7EA7C","\u7B49\u7EA7D","\u7B49\u7EA7E"]}],yAxis:[{type:"value"}],series:[{name:"\u7F3A\u9677",type:"bar",stack:"Ad",color:["#5c9ef7"],emphasis:{focus:"series"},data:Nn},{name:"\u6F0F\u6D1E",type:"bar",stack:"Ad",color:["#75c87c"],emphasis:{focus:"series"},data:xn},{name:"\u4EE3\u7801\u89C4\u8303\u6027",type:"bar",stack:"Ad",color:["#f3d460"],emphasis:{focus:"series"},data:dn}]}},sa=function(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{dataset:[{source:dn}],tooltip:{show:!0,formatter:function(Nn){return Nn.value[2]+":"+Nn.value[1]+"\u5206"}},xAxis:{splitLine:{lineStyle:{type:"dashed"}},show:!1},yAxis:{splitLine:{lineStyle:{type:"dashed"}}},series:[{name:"scatter",type:"scatter",datasetIndex:0},{name:"line",type:"line",smooth:!0,datasetIndex:1,symbolSize:.1,symbol:"circle",label:{show:!0,fontSize:16},labelLayout:{dx:-20},encode:{label:2,tooltip:1}}]}},ya=function(dn){var xn,Nn,dr,$n,Zn=dn.shixunHomeworks,kn=dn.loading,gr=dn.dispatch,Bn=Object(l.i)(),ar=Object(s.useState)(Object(S.a)(Object(S.a)({},{sort_by:"student_id",sort_direction:"desc"}),Bn)),sr=Object(a.a)(ar,2),Pn=sr[0],Tr=sr[1],Mr=Object(s.useState)(),Sr=Object(a.a)(Mr,2),hr=Sr[0],ne=Sr[1],Re=Object(s.useState)([]),Xe=Object(a.a)(Re,2),Le=Xe[0],st=Xe[1],et=Object(s.useRef)(),pt=Object(s.useState)(1),mt=Object(a.a)(pt,2),it=mt[0],Mt=mt[1],Xt=Object(s.useState)(!1),Vt=Object(a.a)(Xt,2),St=Vt[0],nn=Vt[1],Qe=Object(s.useState)(10),en=Object(a.a)(Qe,2),Bt=en[0],bn=en[1],On=Object(s.useState)([]),Gt=Object(a.a)(On,2),cn=Gt[0],Ht=Gt[1];Object(s.useEffect)(function(){wn()},[]);var Sn=[{title:"\u5B66\u53F7",dataIndex:"student_number",sorter:!0,showSorterTooltip:!1,sortOrder:Pn.sort_by==="student_number"?Pn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u5206\u73ED",dataIndex:"group_course_name"},{title:"\u59D3\u540D",dataIndex:"user_name"},{title:"\u7F3A\u9677",children:[{title:"\u963B\u65AD",dataIndex:"bug",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"bug",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.critical)}},{title:"\u4E3B\u8981",dataIndex:"bug",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.major)}},{title:"\u6B21\u8981",dataIndex:"bug",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"bug",sorter:!1,showSorterTooltip:!1,sortOrder:Pn.sort_by==="bug"?Pn.sort_direction==="desc"?"descend":"ascend":null,render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.grade)}}]},{title:"\u6F0F\u6D1E",children:[{title:"\u963B\u65AD",dataIndex:"vulnerability",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"vulnerability",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.critical)}},{title:"\u4E3B\u8981",dataIndex:"vulnerability",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.major)}},{title:"\u6B21\u8981",dataIndex:"vulnerability",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"vulnerability",sorter:!1,showSorterTooltip:!1,sortOrder:Pn.sort_by==="vulnerability"?Pn.sort_direction==="desc"?"descend":"ascend":null,render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.grade)}}]},{title:"\u4EE3\u7801\u89C4\u8303\u6027",children:[{title:"\u963B\u65AD",dataIndex:"specification",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"specification",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.critical)}},{title:"\u4E3B\u8981",dataIndex:"specification",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.major)}},{title:"\u6B21\u8981",dataIndex:"specification",render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"specification",sorter:!1,showSorterTooltip:!1,sortOrder:Pn.sort_by==="specification"?Pn.sort_direction==="desc"?"descend":"ascend":null,render:function(vt){return n.a.createElement("span",{className:"current"},vt==null?void 0:vt.grade)}}]},{title:"\u590D\u6742\u4EE3\u7801",dataIndex:"complexity",sorter:!0,showSorterTooltip:!1,sortOrder:Pn.sort_by==="complexity"?Pn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u4EE3\u7801\u884C\u6570",dataIndex:"total_row_number",sorter:!0,showSorterTooltip:!1,sortOrder:Pn.sort_by==="total_row_number"?Pn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u8D28\u91CF\u8BC4\u5206",dataIndex:"quality_score",sorter:!0,showSorterTooltip:!1,sortOrder:Pn.sort_by==="quality_score"?Pn.sort_direction==="desc"?"descend":"ascend":null},{title:"\u64CD\u4F5C",dataIndex:"action",align:"center",render:function(vt,Dn){return n.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(Bn.coursesId,"/shixun_homework/").concat(Bn.categoryId,"/analysis/").concat(Dn.id),className:"current c-light-primary"},"\u8BE6\u7EC6\u5206\u6790")}}];Object(s.useEffect)(function(){return hr===2&&(et.current=setInterval(function(){wn()},6e4)),function(){clearTimeout(et.current)}},[hr]);function wn(){return wt.apply(this,arguments)}function wt(){return wt=Object(o.a)(d.a.mark(function Ct(){var vt;return d.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,Object(z.a)("/api/homework_commons/".concat(Pn.categoryId,"/code_quality_analyses/check_status.json"),{method:"GET"});case 2:vt=$t.sent,ne(vt.status),vt.status!=2&&vt.status!=-1&&(It({page:1,limit:10}),clearTimeout(et.current));case 5:case"end":return $t.stop()}},Ct)})),wt.apply(this,arguments)}function It(Ct){return Pt.apply(this,arguments)}function Pt(){return Pt=Object(o.a)(d.a.mark(function Ct(vt){var Dn;return d.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Mt(vt==null?void 0:vt.page),bn(vt==null?void 0:vt.limit),Cn.next=4,Object(z.a)("/api/homework_commons/".concat(Pn.categoryId,"/code_quality_analyses.json"),{method:"GET",params:Object(S.a)({},vt)});case 4:Dn=Cn.sent,st(Dn);case 6:case"end":return Cn.stop()}},Ct)})),Pt.apply(this,arguments)}return console.log("-------",hr),n.a.createElement("section",{style:{paddingBottom:"10px"},className:"minH500 bg-white pl30 pr30 pt10"},(hr===0||hr===1)&&n.a.createElement("div",null,n.a.createElement("p",{style:{display:"flex"}},n.a.createElement("span",{style:{flex:"1"}},n.a.createElement("label",null,"\u68C0\u6D4B\u65F6\u95F4\uFF1A",Le==null?void 0:Le.created_at)),n.a.createElement(U.a,{onClick:function(){gr({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8D28\u91CF\u68C0\u6D4B"}})}},"\u91CD\u65B0\u68C0\u6D4B")),n.a.createElement("p",{style:{display:"flex"}},n.a.createElement(_.a,{style:{width:"100%"}},n.a.createElement(g.a,{flex:"80px"},n.a.createElement("label",null,"\u5206\u73ED\u60C5\u51B5:")),n.a.createElement(g.a,{flex:"80px"},n.a.createElement(we.a,{checked:(cn==null?void 0:cn.length)===0,onChange:function(vt){vt.target.checked&&(Ht([]),It({page:it,limit:Bt}))},style:{fontSize:"14px"},value:"all"},"\u5168\u90E8")),n.a.createElement(g.a,{flex:"1"},n.a.createElement(we.a.Group,{value:cn,onChange:function(){var Ct=Object(o.a)(d.a.mark(function vt(Dn){return d.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:Ht(Object(y.a)(Dn)),It({page:it,limit:Bt,group_course_ids:Dn});case 2:case"end":return Cn.stop()}},vt)}));return function(vt){return Ct.apply(this,arguments)}}(),style:{width:"100%",fontSize:"14px"}},Le==null||((xn=Le.course_groups)===null||xn===void 0)?void 0:xn.map(function(Ct,vt){return n.a.createElement(we.a,{style:{fontSize:"14px"},value:Ct==null?void 0:Ct.id},Ct==null?void 0:Ct.name,"(",Ct==null?void 0:Ct.count,")")}))))),n.a.createElement("p",{style:{display:"flex"}},n.a.createElement("span",null,n.a.createElement("label",{style:{color:"red"}},"\u6CE8\u610F\uFF1A")),"\u672C\u9875\u4EC5\u663E\u793A\u5168\u90E8\u5DF2\u5B8C\u6210\u68C0\u6D4B\u7684\u5206\u73ED"),n.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},n.a.createElement("div",null,n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"\u4EE3\u7801\u7B49\u7EA7\u5206\u6790"),(Le==null?void 0:Le.grade_statistics)&&n.a.createElement(fn.a,{option:or(Le==null||((Nn=Le.grade_statistics)===null||Nn===void 0)?void 0:Nn.map(function(Ct){return Ct.specification_count}),Le==null||((dr=Le.grade_statistics)===null||dr===void 0)?void 0:dr.map(function(Ct){return Ct.vulnerability_count}),Le==null||(($n=Le.grade_statistics)===null||$n===void 0)?void 0:$n.map(function(Ct){return Ct.bug_count})),style:{height:400,width:600},opts:{renderer:"svg"}})),n.a.createElement("div",null,n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500}},"\u4EE3\u7801\u8D28\u91CF\u5206\u5E03"),(Le==null?void 0:Le.quality_scores)&&n.a.createElement(fn.a,{option:sa(Le==null?void 0:Le.quality_scores.map(function(Ct,vt){return[vt+1,Ct==null?void 0:Ct.quality_score,Ct==null?void 0:Ct.user_name]})),style:{height:400,width:600},opts:{renderer:"svg"}}))),n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("p",{style:{marginLeft:"20px",fontSize:"20px",fontWeight:500,flex:"1"}},"\u8BE6\u7EC6\u5217\u8868"),n.a.createElement(p.a.Search,{size:"large",onSearch:function(vt){It({page:1,limit:Bt,search:vt})},style:{width:"300px"},enterButton:"\u641C\u7D22"})),n.a.createElement(B.a,{columns:Sn,dataSource:Le==null?void 0:Le.analysis,bordered:!0,scroll:{x:"calc(800px + 50%)"},pagination:!1,onChange:function(vt,Dn,$t){$t.field&&(Pn.sort_by=$t.field),$t.order||(Pn.sort_direction="asc"),$t.order==="ascend"&&(Pn.sort_direction="asc"),$t.order==="descend"&&(Pn.sort_direction="desc"),$t.order||(Pn.sort_direction="asc"),It(Object(S.a)({page:1,limit:Bt},Pn))}}),n.a.createElement(w.a,{current:it,total:Le==null?void 0:Le.total_count,pageSizeOptions:["10","20","50","100","200"],pageSize:Bt,style:{textAlign:"center",marginTop:"20px",marginBottom:"20px"},onChange:function(vt,Dn){Mt(vt),bn(Dn),It({page:vt,limit:Dn,group_course_ids:cn})}}))),hr===2&&n.a.createElement("div",{style:{textAlign:"center",margin:"100px 0px",paddingBottom:"100px"}},n.a.createElement("img",{src:Kr.a}),n.a.createElement("br",null),n.a.createElement(U.a,{type:"primary",style:{width:"120px",height:"40px"},onClick:function(){wn()}},"\u5237\u65B0\u9875\u9762")),n.a.createElement(ze,null),n.a.createElement(f.a,{centered:!0,width:1200,title:"\u8BE6\u7EC6\u5206\u6790",destroyOnClose:!0,visible:!!St,footer:null,onCancel:function(){return nn(!1)}},n.a.createElement("div",{style:{height:500,overflow:"hidden"}},!!St&&n.a.createElement("iframe",{style:{height:"100%",width:"100%"},src:"https://sonar.educoder.net/project/issues?id=".concat(Bn==null?void 0:Bn.categoryId,"-").concat(St==null?void 0:St.student_number,"&resolved=false"),frameBorder:"0"}))))},Jr=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn.effects}})(ya),na=L("RotF"),te=L.n(na),W=function(dn){var xn,Nn=dn.shixunHomeworks,dr=dn.loading,$n=dn.dispatch,Zn=Object(l.i)(),kn=Object(l.h)(),gr=Object(s.useState)([]),Bn=Object(a.a)(gr,2),ar=Bn[0],sr=Bn[1],Pn=Object(s.useState)([]),Tr=Object(a.a)(Pn,2),Mr=Tr[0],Sr=Tr[1],hr=Object(s.useState)(!0),ne=Object(a.a)(hr,2),Re=ne[0],Xe=ne[1],Le=Object(s.useState)(!1),st=Object(a.a)(Le,2),et=st[0],pt=st[1],mt=Object(s.useState)(1),it=Object(a.a)(mt,2),Mt=it[0],Xt=it[1],Vt=Object(s.useState)([]),St=Object(a.a)(Vt,2),nn=St[0],Qe=St[1],en=Object(s.useState)(!1),Bt=Object(a.a)(en,2),bn=Bt[0],On=Bt[1],Gt=Object(s.useState)(!1),cn=Object(a.a)(Gt,2),Ht=cn[0],Sn=cn[1];Object(s.useEffect)(function(){Nn.actionTabs.key==="\u4EE3\u7801\u67E5\u91CD"?(It.resetFields(),sr([]),On(!0),Ct()):On(!1)},[Nn.actionTabs.key]);var wn=We.a.useForm(),wt=Object(a.a)(wn,1),It=wt[0],Pt=[],Ct=function(){var $t=Object(o.a)(d.a.mark(function Cn(){var pn,Yt,Tn;return d.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(!(Re&&!et)){fr.next=11;break}return pt(!0),Xt(Mt+1),fr.next=5,Object(Z.x)(Object(S.a)(Object(S.a)({},Zn),{},{page:Mt}));case 5:Yt=fr.sent,Tn=Object(y.a)(Yt.group_list),Yt!=null&&Yt.ungroup_list&&Tn.push({id:Yt==null?void 0:Yt.ungroup_list.id,name:Yt==null?void 0:Yt.ungroup_list.name,works_count:Yt==null?void 0:Yt.ungroup_list.work_count,last_review_time:Yt==null?void 0:Yt.ungroup_list.last_review_time}),sr([].concat(Object(y.a)(ar),Object(y.a)(Tn))),pt(!1),((pn=Yt.group_list)===null||pn===void 0?void 0:pn.length)<10&&Xe(!1);case 11:case"end":return fr.stop()}},Cn)}));return function(){return $t.apply(this,arguments)}}(),vt=function(){$n({type:"shixunHomeworks/setActionTabs",payload:{}}),Sn(!1),Xe(!0),pt(!1),Xt(1),sr([]),It.resetFields()},Dn=[{title:"",dataIndex:"id",width:280,render:function(Cn,pn){return n.a.createElement(we.a,{disabled:!(pn.works_count>1),value:String(pn.id)},pn.name)}},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u4E0A\u6B21\u67E5\u91CD\u65F6\u95F4",dataIndex:"last_review_time",width:130}];return n.a.createElement(f.a,{centered:!0,title:"\u4EE3\u7801\u67E5\u91CD",keyboard:!1,maskClosable:!1,visible:bn,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",width:820,bodyStyle:{minHeight:200},onOk:Object(o.a)(d.a.mark(function $t(){var Cn,pn;return d.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Cn=It.getFieldValue(),Tn.next=3,Object(z.a)("/api/homework_commons/".concat(Zn.categoryId,"/homework_code_repeat.json"),{method:"post",body:{group_ids:Object(y.a)(Cn.group_ids)}});case 3:if(pn=Tn.sent,!(pn.status===0)){Tn.next=11;break}return vt(),b.b.success("\u64CD\u4F5C\u6210\u529F"),Tn.next=9,$n({type:"shixunHomeworks/getWorkList",payload:Nn.actionTabs.params});case 9:x.d.push("/classrooms/".concat(Zn.coursesId,"/shixun_homework/").concat(Zn.categoryId,"/detail?tabs=2")),$n({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6267\u884C\u4EE3\u7801\u67E5\u91CD"}});case 11:case"end":return Tn.stop()}},$t)})),onCancel:vt},Nn.codeReviewCourse&&n.a.createElement(We.a,{form:It,onChange:function(Cn){Qe(Object(S.a)({},It.getFieldValue()))},initialValues:(xn={},Object(yt.a)(xn,"group_ids",Pt),Object(yt.a)(xn,"end_time",oe()(oe()().add(7,"days").format("YYYY-MM-DD HH:mm"))),xn)},n.a.createElement("div",{className:"flexd-table-header mt20"},n.a.createElement(B.a,{pagination:!1,dataSource:[],columns:Dn})),n.a.createElement(We.a.Item,{name:"group_ids"},n.a.createElement(we.a.Group,{className:"w100"},n.a.createElement("div",{style:{width:"100%",maxHeight:260,overflow:"auto"}},n.a.createElement(te.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(Cn){Ct()},hasMore:Re,useWindow:!1},n.a.createElement(B.a,{loading:dr.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:Dn,dataSource:ar,pagination:!1})))))),n.a.createElement(_.a,null,n.a.createElement(g.a,{className:"ml10"},n.a.createElement(we.a,{checked:Ht,onChange:function(Cn){Sn(Cn.target.checked);var pn=[];Cn.target.checked&&(pn=ar.filter(function(Yt){return Yt.works_count>1}).map(function(Yt){return Yt.id+""})),It.setFieldsValue(Object(yt.a)({},"group_ids",pn))}},"\u5168\u9009"))))},G=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading;return{shixunHomeworks:dn,loading:xn}})(W),Q=L("R5GN"),ue=L("rhHp"),ee=L("Aocz"),qe=L.n(ee),tn=L("HBuW"),An=L("NLgs"),Vn=[{live:"A",gz:"0\u4E2A\u9519\u8BEF",ld:"0\u4E2A\u6F0F\u6D1E",gf:"0 - 5%"},{live:"B",gz:"\u81F3\u5C111\u4E2A\u6B21\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u6B21\u8981\u6F0F\u6D1E",gf:"6% - 10%"},{live:"C",gz:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u6F0F\u6D1E",gf:"11% - 20%"},{live:"D",gz:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u6F0F\u6D1E",gf:"21% - 50%"},{live:"E",gz:"\u81F3\u5C111\u4E2A\u963B\u65AD\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u963B\u65AD\u6F0F\u6D1E",gf:"\u8D85\u8FC750%"}],un=function(dn){var xn,Nn,dr,$n,Zn,kn,gr,Bn,ar,sr,Pn=dn.shixunHomeworks,Tr=dn.globalSetting,Mr=dn.loading,Sr=dn.dispatch,hr=Object(l.i)(),ne=Object(l.h)(),Re=Object(l.g)(),Xe=Object(s.useState)([]),Le=Object(a.a)(Xe,2),st=Le[0],et=Le[1],pt=Object(s.useState)(ne.query.tabs||"0"),mt=Object(a.a)(pt,2),it=mt[0],Mt=mt[1],Xt=Object(s.useState)({}),Vt=Object(a.a)(Xt,2),St=Vt[0],nn=Vt[1],Qe=Pn.workList,en=Object(s.useState)(!1),Bt=Object(a.a)(en,2),bn=Bt[0],On=Bt[1],Gt;hr.category=ne.query.category_id,hr.order="work_score",hr.b_order="desc";var cn=function(Ct){Mt(Ct),Ct==="0"&&Sr({type:"shixunHomeworks/getWorkList",payload:St})},Ht=function(){f.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u4F60\u5728\u8BE5\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A\uFF0C\u65E0\u6CD5\u6062\u590D",n.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u91CD\u505A\uFF1F"),onOk:function(){var Ct=Object(o.a)(d.a.mark(function Dn(){var $t,Cn,pn;return d.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Cn=($t=Pn.workList)===null||$t===void 0?void 0:$t.myshixun_identifier,Tn.next=3,Object(Z.X)({id:Cn});case 3:pn=Tn.sent,pn&&(b.b.info(`\u5DF2\u6E05\u7A7A\u672C\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55
\u8BF7\u70B9\u51FB\u201C\u5F00\u542F\u6311\u6218\u201D\u91CD\u505A\u8BFE\u7A0B\u5B9E\u9A8C`),Sr({type:"shixunHomeworks/getWorkList",payload:St}));case 5:case"end":return Tn.stop()}},Dn)}));function vt(){return Ct.apply(this,arguments)}return vt}()})},Sn=function Pt(Ct){var vt;Ct=(vt=Ct)!==null&&vt!==void 0&&vt.includes(".json")?Ct:"".concat(Ct,".json"),f.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Dn=Object(o.a)(d.a.mark(function Cn(){var pn,Yt;return d.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:return zn.next=2,Object(tn.Bb)({url:Ct});case 2:if(pn=zn.sent,pn){zn.next=5;break}return zn.abrupt("return");case 5:return b.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),zn.next=8,Object(tn.E)({id:pn.shixun_identifier});case 8:if(Yt=zn.sent,!(Yt!=null&&Yt.game_identifier)){zn.next=12;break}return Object(C.S)("/tasks/".concat(Yt.game_identifier,"?coursesId=").concat(hr.coursesId)),zn.abrupt("return");case 12:(Yt==null?void 0:Yt.status)===2?Pt(Yt==null?void 0:Yt.message):(Yt==null?void 0:Yt.status)===3&&wn(Yt==null?void 0:Yt.message);case 13:case"end":return zn.stop()}},Cn)}));function $t(){return Dn.apply(this,arguments)}return $t}()})},wn=function(Ct){f.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Ct,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},wt=function(){var Pt=Object(o.a)(d.a.mark(function Ct(vt){var Dn,$t;return d.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return vt=(Dn=vt)!==null&&Dn!==void 0&&Dn.includes(".json")?vt:"".concat(vt,".json"),pn.next=3,Object(tn.Bb)({url:vt});case 3:if($t=pn.sent,console.log($t,"execRes"),!($t!=null&&$t.game_identifier)){pn.next=8;break}return Object(C.S)("/tasks/".concat($t.game_identifier,"?coursesId=").concat(hr.coursesId)),pn.abrupt("return");case 8:($t==null?void 0:$t.status)===-3?Object(C.q)():($t==null?void 0:$t.status)===2?Sn($t==null?void 0:$t.message):($t==null?void 0:$t.status)===3&&wn($t==null?void 0:$t.message);case 9:case"end":return pn.stop()}},Ct)}));return function(vt){return Pt.apply(this,arguments)}}(),It=[{name:"\u4F5C\u4E1A\u5217\u8868",id:"0",compontent:n.a.createElement(sn,{setExportParams:nn}),forceRender:!0},{name:"\u4F5C\u4E1A\u63CF\u8FF0",id:"1",compontent:n.a.createElement(Ee,null)},{name:"\u4EE3\u7801\u67E5\u91CD",id:"2",compontent:n.a.createElement(At,null)},{name:"\u8D28\u91CF\u68C0\u6D4B",id:"4",compontent:n.a.createElement(Jr,null)},{name:Object(de.c)()?"\u8BBE\u7F6E":"\u5F97\u5206\u89C4\u5219",id:"3",compontent:n.a.createElement(ur,null)}].filter(function(Pt){var Ct;if(Object(de.s)())return Pt.name!=="\u4EE3\u7801\u67E5\u91CD";if(Object(de.s)()||(Qe==null||((Ct=Qe.homework_status)===null||Ct===void 0)?void 0:Ct[0])!=="\u5DF2\u622A\u6B62")return Pt.name!=="\u8D28\u91CF\u68C0\u6D4B";var vt;return!Qe.code_review&&(Qe==null||((vt=Qe.homework_status)===null||vt===void 0)?void 0:vt[0])!=="\u672A\u53D1\u5E03"?!0:Pt.name!=="\u4EE3\u7801\u67E5\u91CD"}).filter(function(Pt){return Qe.open_code_quality_analysis?!0:Pt.name!=="\u8D28\u91CF\u68C0\u6D4B"});return n.a.createElement("section",null,n.a.createElement("div",{className:"edu-container"},Qe.homework_name&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},Qe.category&&n.a.createElement(m.a,{separator:">"},n.a.createElement(m.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(Qe.course_id,"/shixun_homework")},Qe.course_name)),n.a.createElement(m.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(Qe.course_id,"/shixun_homework/").concat(Qe.category.main?"":Qe.category.category_id)},Qe.category.category_name)),n.a.createElement(m.a.Item,null,"\u4F5C\u4E1A\u8BE6\u60C5"))),n.a.createElement("aside",{className:[qe.a.title,"mt20"].join(" ")},n.a.createElement(c.a,{to:"/classrooms/".concat(Qe.course_id,"/shixun_homework/").concat(Qe.category.main?"":Qe.category.category_id)},n.a.createElement(A.a,{className:"font16 c-black"})),n.a.createElement(R.a,{title:Qe.homework_name,placement:"bottom"},n.a.createElement("strong",{className:"font20 ml5"},Qe.homework_name)),n.a.createElement(C.m,{temporary:!0,status:Qe.homework_status}),it==="4"&&n.a.createElement("span",{className:"iconfont icon-a-wenhaobeifen2",onClick:function(){On(!0)},style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"}},"\u89C4\u5219\u8BF4\u660E"))),n.a.createElement("aside",{className:"mt30 relative"},n.a.createElement("aside",{className:qe.a.rightMenu},Object(de.s)()&&((xn=Pn.workList)===null||xn===void 0?void 0:xn.redo_work)&&n.a.createElement("p",{onClick:Ht},n.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x"}),"\u91CD\u505A"),((Nn=Pn.workList)===null||Nn===void 0?void 0:Nn.shixun_status)>1&&((dr=Pn.workList)===null||dr===void 0?void 0:dr.time_status)<5&&Object(de.s)()&&n.a.createElement("p",{onClick:function(){var Ct,vt,Dn,$t,Cn,pn,Yt;if(!Object(An.e)(Sr,!0))return;(Ct=Pn.workList)!==null&&Ct!==void 0&&(vt=Ct.task_operation)!==null&&vt!==void 0&&(Dn=vt[1])!==null&&Dn!==void 0&&Dn.includes("/")?wt(($t=Pn.workList)===null||$t===void 0||((Cn=$t.task_operation)===null||Cn===void 0)?void 0:Cn[1]):Object(C.S)("/tasks/".concat((pn=Pn.workList)===null||pn===void 0||((Yt=pn.task_operation)===null||Yt===void 0)?void 0:Yt[1]))}},n.a.createElement("span",{className:"iconfont icon-kaiqizhong"}),($n=Pn.workList)===null||$n===void 0||((Zn=$n.task_operation)===null||Zn===void 0)?void 0:Zn[0]),((kn=Pn.workList)===null||kn===void 0?void 0:kn.commit_des)&&n.a.createElement("p",{onClick:function(){var Ct;Object(C.S)("/classrooms/".concat(hr.coursesId,"/shixun_homework/").concat(hr.categoryId,"/").concat((Ct=Pn.workList)===null||Ct===void 0?void 0:Ct.id,"/commitsummary"))}},n.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),(gr=Pn.workList)===null||gr===void 0?void 0:gr.commit_des),it=="1"&&Object(de.c)()&&n.a.createElement("p",{onClick:function(){Sr({type:"shixunHomeworks/setActionTabs",payload:{key:"\u7F16\u8F91\u4F5C\u4E1A"}})}},n.a.createElement("span",{className:"iconfont icon-bianjishijuan3x translateY1"}),"\u7F16\u8F91\u4F5C\u4E1A"),Object(de.c)()&&Qe.publish_immediately&&n.a.createElement("p",{onClick:function(){Sr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u53D1\u5E03",selectArrs:[hr.categoryId],selectArrsAll:[Qe],params:hr,detail:!0,type:2}})}},n.a.createElement("span",{className:"iconfont icon-yishezhifabushijian1 translateY1"}),"\u7ACB\u5373\u53D1\u5E03"),!((Bn=Tr.setting)!==null&&Bn!==void 0&&Bn.hide_quality_analysis)&&((ar=Pn.workList)===null||ar===void 0?void 0:ar.show_analysis_detail)&&n.a.createElement("p",{onClick:function(){var Ct;Object(C.S)("/classrooms/".concat(hr.coursesId,"/shixun_homework/").concat(hr.categoryId,"/analysis/").concat((Ct=Pn.workList)===null||Ct===void 0?void 0:Ct.analysis_id))}},n.a.createElement("span",{className:"iconfont icon-a-08zhiliang-xianxing font14 pr5"}),"\u8D28\u91CF\u8BC4\u5206"),((sr=Pn.workList)===null||sr===void 0?void 0:sr.is_enter_shixun)&&n.a.createElement("p",{onClick:function(){Object(C.S)("/shixuns/".concat(Qe.shixun_identifier,"/challenges"))}},n.a.createElement("span",{className:"iconfont icon-shixun3 translateY1"}),"\u8FDB\u5165\u5B9E\u8BAD"),Object(de.c)()&&Qe.end_immediately&&n.a.createElement("p",{style:{background:"#0152d9",color:"#fff"},onClick:function(){Sr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u622A\u6B62",params:hr,type:2,detail:!0,selectArrs:[hr.categoryId]}})}},n.a.createElement("span",{style:{color:"#fff"},className:"iconfont icon-jiezhishiyan"}),"\u7ACB\u5373\u622A\u6B62")),n.a.createElement(F.a,{defaultActiveKey:it,activeKey:it,onChange:cn,className:qe.a.menuTabs},It.map(function(Pt,Ct){return n.a.createElement(F.a.TabPane,{tab:Pt.name,key:Pt.id,forceRender:Pt.forceRender},Pt.compontent)})))),n.a.createElement(G,null),n.a.createElement(Q.a,{courseEndTime:Qe==null?void 0:Qe.course_end_date}),n.a.createElement(ue.a,{courseEndTime:Qe==null?void 0:Qe.course_end_date}),n.a.createElement(f.a,{visible:bn,title:"\u89C4\u5219\u8BF4\u660E",width:800,footer:null,onCancel:function(){On(!1)}},n.a.createElement("p",null,"\u4E00\u3001\u7B49\u7EA7\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"1. \u7F3A\u9677\u7B49\u7EA7"),n.a.createElement("p",{style:{marginLeft:"10px"}},n.a.createElement(B.a,{dataSource:Vn,columns:[{title:"\u7B49\u7EA7",dataIndex:"live"},{title:"\u7F3A\u9677\u8BC4\u4F30\u89C4\u5219",dataIndex:"gz"},{title:"\u6F0F\u6D1E\u8BC4\u4F30\u89C4\u5219",dataIndex:"ld"},{title:"\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219",dataIndex:"gf"}],pagination:!1})),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219\u4E2D\u6570\u503C\u6765\u6E90\u4E3A\u8BA1\u7B97\u6280\u672F\u503A\u52A1\u65F6\u95F4\u5360\u5F00\u53D1\u6240\u6709\u4EE3\u7801\u6240\u9700\u8981\u7684\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF08Technical Debt Ratio\uFF09"),n.a.createElement("p",{style:{marginLeft:"20px"}},"Technical Debt Ratio = \u6280\u672F\u503A\u52A1\u65F6\u95F4 / \u5F00\u53D1\u65F6\u95F4"),n.a.createElement("p",{style:{marginLeft:"20px"}},"\u6280\u672F\u503A\u52A1\u65F6\u95F4\u4E3A\u4FEE\u590D\u6240\u6709\u95EE\u9898\u6240\u9700\u8981\u7684\u65F6\u95F4\u3002"),n.a.createElement("p",null,"\u4E8C\u3001\u590D\u6742\u5EA6\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6839\u636E\u4EE3\u7801\u8DEF\u5F84\u6570\u8BA1\u7B97\u7684\u6570\u503C\uFF0C\u6BCF\u5F53\u4E00\u4E2A\u51FD\u6570\u7684\u63A7\u5236\u6D41\u5206\u53C9\u65F6\uFF0C\u590D\u6742\u5EA6\u8BA1\u6570\u5668\u5C31\u4F1A\u81EA\u589E\u4E00\u3002"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6BCF\u4E2A\u7A0B\u5E8F\u8BED\u8A00\u7684\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u590D\u6742\u5EA6\u6570\u636E\u4E0D\u540C\uFF0C\u4F46\u6BCF\u4E2A\u51FD\u6570\u7684\u6700\u5C0F\u590D\u6742\u5EA6\u4E3A1\u3002\uFF08\u7279\u5B9A\u8BED\u8A00\u7684\u8BE6\u7EC6\u6570\u636E\u7565\uFF09"),n.a.createElement("p",null,"\u4E09\u3001\u4EE3\u7801\u8D28\u91CF\u5206\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u4EE3\u7801\u8D28\u91CF\u5206 = 0.5*\u7F3A\u9677\u5206\u6570 + 0.3*\u6F0F\u6D1E\u5206\u6570 + 0.2*\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u5176\u4E2D\uFF1A"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u7F3A\u9677/\u6F0F\u6D1E/\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570\u8BA1\u7B97\u89C4\u5219\u4E3A\uFF1A100 - 100 *((100*\u963B\u65AD\u6570 + 5*\u4E25\u91CD\u6570 + 3*\u4E3B\u8981\u6570 + 1*\u6B21\u6570\uFF09/ \u4EE3\u7801\u884C\u6570\uFF09"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u5206\u6570\u4E3A\u7A7A\u7684\u4EE3\u8868\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F\u3002")))},nr=J.default=Object(x.a)(function(vn){var dn=vn.shixunHomeworks,xn=vn.loading,Nn=vn.globalSetting;return{shixunHomeworks:dn,globalSetting:Nn,loading:xn.effects}})(un)},TXwP:function(Be,J,L){var Y,B;(function(){var I;(function(){"use strict";var T=[,,function(t){function b(f){this.__parent=f,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=[]}b.prototype.clone_empty=function(){var f=new b(this.__parent);return f.set_indent(this.__indent_count,this.__alignment_count),f},b.prototype.item=function(f){return f<0?this.__items[this.__items.length+f]:this.__items[f]},b.prototype.has_match=function(f){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(f))return!0;return!1},b.prototype.set_indent=function(f,a){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(f){this.__items.push(f);var a=f.lastIndexOf(`
`);a!==-1?this.__character_count=f.length-a:this.__character_count+=f.length},b.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function o(f,a){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),a=a||"",f.indent_level>0&&(a=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}o.prototype.get_indent_size=function(f,a){var i=this.__base_string_length;return a=a||0,f<0&&(i=0),i+=f*this.__indent_size,i+=a,i},o.prototype.get_indent_string=function(f,a){var i=this.__base_string;return a=a||0,f<0&&(f=0,i=""),a+=f*this.__indent_size,this.__ensure_cache(a),i+=this.__cache[a],i},o.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var f=this.__cache.length,a=0,i="";this.__indent_size&&f>=this.__indent_size&&(a=Math.floor(f/this.__indent_size),f-=a*this.__indent_size,i=new Array(a+1).join(this.__indent_string)),f&&(i+=new Array(f+1).join(" ")),this.__cache.push(i)};function u(f,a){this.__indent_cache=new o(f,a),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(f,a){return this.__indent_cache.get_indent_string(f,a)},u.prototype.get_indent_size=function(f,a){return this.__indent_cache.get_indent_size(f,a)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(f){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
`);return f!==`
`&&(i=i.replace(/[\n]/g,f)),i},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(f,a){return f=f||0,a=a||0,this.next_line.set_indent(f,a),this.__lines.length>1?(this.current_line.set_indent(f,a),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(f){for(var a=0;a<f.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(f.whitespace_before),this.current_line.push(f.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(f){this.__add_space_before_token(),this.current_line.push(f),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(f){for(var a=this.__lines.length;f<a;)this.__lines[f]._remove_indent(),f++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(f){for(f=f===void 0?!1:f,this.current_line.trim();f&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(f,a){for(var i=this.__lines.length-2;i>=0;){var d=this.__lines[i];if(d.is_empty())break;if(d.item(0).indexOf(f)!==0&&d.item(-1)!==a){this.__lines.splice(i+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},t.exports.Output=u},,,,function(t){function b(f,a){this.raw_options=o(f,a),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"])}b.prototype._get_array=function(f,a){var i=this.raw_options[f],d=a||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(d=i.concat()):typeof i=="string"&&(d=i.split(/[^a-zA-Z0-9_\/\-]+/)),d},b.prototype._get_boolean=function(f,a){var i=this.raw_options[f],d=i===void 0?!!a:!!i;return d},b.prototype._get_characters=function(f,a){var i=this.raw_options[f],d=a||"";return typeof i=="string"&&(d=i.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},b.prototype._get_number=function(f,a){var i=this.raw_options[f];a=parseInt(a,10),isNaN(a)&&(a=0);var d=parseInt(i,10);return isNaN(d)&&(d=a),d},b.prototype._get_selection=function(f,a,i){var d=this._get_selection_list(f,a,i);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+f+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[f]+"'");return d[0]},b.prototype._get_selection_list=function(f,a,i){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[a[0]],!this._is_valid_selection(i,a))throw new Error("Invalid Default Value!");var d=this._get_array(f,i);if(!this._is_valid_selection(d,a))throw new Error("Invalid Option Value: The option '"+f+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[f]+"'");return d},b.prototype._is_valid_selection=function(f,a){return f.length&&a.length&&!f.some(function(i){return a.indexOf(i)===-1})};function o(f,a){var i={};f=u(f);var d;for(d in f)d!==a&&(i[d]=f[d]);if(a&&f[a])for(d in f[a])i[d]=f[a][d];return i}function u(f){var a={},i;for(i in f){var d=i.replace(/-/g,"_");a[d]=f[i]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=o},,function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function o(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},o.prototype.peek=function(u){var f=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(f=this.__input.charAt(u)),f},o.prototype.__match=function(u,f){u.lastIndex=f;var a=u.exec(this.__input);return a&&!(b&&u.sticky)&&(a.index!==f&&(a=null)),a},o.prototype.test=function(u,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(u,f):!1},o.prototype.testChar=function(u,f){var a=this.peek(f);return u.lastIndex=0,a!==null&&u.test(a)},o.prototype.match=function(u){var f=this.__match(u,this.__position);return f?this.__position+=f[0].length:f=null,f},o.prototype.read=function(u,f,a){var i="",d;return u&&(d=this.match(u),d&&(i+=d[0])),f&&(d||!u)&&(i+=this.readUntil(f,a)),i},o.prototype.readUntil=function(u,f){var a="",i=this.__position;u.lastIndex=this.__position;var d=u.exec(this.__input);return d?(i=d.index,f&&(i+=d[0].length)):i=this.__input_length,a=this.__input.substring(this.__position,i),this.__position=i,a},o.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},o.prototype.get_regexp=function(u,f){var a=null,i="g";return f&&b&&(i="y"),typeof u=="string"&&u!==""?a=new RegExp(u,i):u&&(a=new RegExp(u.source,i)),a},o.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(u){var f=this.__position,a=this.readUntilAfter(u);return this.__position=f,a},o.prototype.lookBack=function(u){var f=this.__position-1;return f>=u.length&&this.__input.substring(f-u.length,f).toLowerCase()===u},t.exports.InputScanner=o},,,,,function(t){function b(o,u){o=typeof o=="string"?o:o.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(o);f;)u[f[1]]=f[2],f=this.__directive_pattern.exec(o);return u},b.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},,function(t,b,o){var u=o(16).Beautifier,f=o(17).Options;function a(i,d){var s=new u(i,d);return s.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new f}},function(t,b,o){var u=o(17).Options,f=o(2).Output,a=o(8).InputScanner,i=o(13).Directives,d=new i(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,l=/\s/,c=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,A=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function C(k,w){this._source_text=k||"",this._options=new u(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"]}C.prototype.eatString=function(k){var w="";for(this._ch=this._input.next();this._ch;){if(w+=this._ch,this._ch==="\\")w+=this._input.next();else if(k.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return w},C.prototype.eatWhitespace=function(k){for(var w=l.test(this._input.peek()),y=0;l.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===`
`&&((y===0||y<this._options.max_preserve_newlines)&&(y++,this._output.add_new_line(!0)));return w},C.prototype.foundNestedPseudoClass=function(){for(var k=0,w=1,y=this._input.peek(w);y;){if(y==="{")return!0;if(y==="(")k+=1;else if(y===")"){if(k===0)return!1;k-=1}else if(y===";"||y==="}")return!1;w++,y=this._input.peek(w)}return!1},C.prototype.print_string=function(k){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(k)},C.prototype.preserveSingleSpace=function(k){k&&(this._output.space_before_token=!0)},C.prototype.indent=function(){this._indentLevel++},C.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,w=this._options.eol;w==="auto"&&(w=`
`,k&&s.test(k||"")&&(w=k.match(s)[0])),k=k.replace(n,`
`);var y=k.match(/^[\t ]*/)[0];this._output=new f(this._options,y),this._input=new a(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var h=0,p=!1,v=!1,_=!1,E=!1,g=!1,j=!1,U=this._ch,S=!1,z,H,M;z=this._input.read(c),H=z!=="",M=U,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),U=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var V=this._input.read(x),K=d.get_directives(V);K&&K.ignore==="start"&&(V+=d.readIgnored(this._input)),this.print_string(V),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(A)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(H),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$.match(/[ :]$/)&&($=this.eatString(": ").replace(/\s$/,""),this.print_string($),this._output.space_before_token=!0),$=$.replace(/\s$/,""),$==="extend"?E=!0:$==="import"&&(g=!0),$ in this.NESTED_AT_RULE?(this._nestedLevel+=1,$ in this.CONDITIONAL_GROUP_RULE&&(_=!0)):!p&&h===0&&$.indexOf(":")!==-1&&(v=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")v&&(v=!1,this.outdent()),_?(_=!1,p=this._indentLevel>=this._nestedLevel):p=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&p&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(M==="("?this._output.space_before_token=!1:M!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),M==="{"&&this._output.trim(!0),g=!1,E=!1,v&&(this.outdent(),v=!1),this.print_string(this._ch),p=!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 Z=0;Z<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Z++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Z])){S=!0;break}(p||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!E&&h===0?(this.print_string(":"),v||(v=!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 me=M==='"'||M==="'";this.preserveSingleSpace(me||H),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")S=!1,h===0?(v&&(this.outdent(),v=!1),E=!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(),h++,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(")")),h&&(h--,this.outdent()));else{var oe=!1;this._input.lookBack("with")&&(oe=!0),this.preserveSingleSpace(H||oe),this.print_string(this._ch),v&&M==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),j=!0):(this.eatWhitespace(),h++,this.indent())}else if(this._ch===")")h&&(h--,this.outdent()),j&&this._input.peek()===";"&&this._options.selector_separator_newline&&(j=!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&&(!v||j)&&h===0&&!g&&!E?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!v&&h===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&l.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(H),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),l.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var fe=M==='"'||M==="'";this.preserveSingleSpace(fe||H),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&S&&this._output.add_new_line()}var ye=this._output.get_code(w);return ye},t.exports.Beautifier=C},function(t,b,o){var u=o(6).Options;function f(a){u.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<d.length;s++)d[s]!=="expand"?this.brace_style="collapse":this.brace_style=d[s]}f.prototype=new u,t.exports.Options=f}],R={};function P(t){var b=R[t];if(b!==void 0)return b.exports;var o=R[t]={exports:{}};return T[t](o,o.exports,P),o.exports}var m=P(15);I=m})();var F=I;!(Y=[],B=function(){return{css_beautify:F}}.apply(J,Y),B!==void 0&&(Be.exports=B))})()},Vhoy:function(Be,J,L){"use strict";L.d(J,"d",function(){return F}),L.d(J,"e",function(){return T}),L.d(J,"c",function(){return R}),L.d(J,"b",function(){return P}),L.d(J,"a",function(){return m});var Y=L("MI8n");class B{constructor(){this._icons=new Map,this._onDidRegister=new Y.b}add(t){const b=this._icons.get(t.id);b?t.description?b.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 I=new B,F=I;function T(t,b){return new P(t,b)}function R(t){return t?t.replace(/\$\((.*?)\)/g,(b,o)=>` ${o} `).trim():""}class P{constructor(t,b,o){this.id=t,this.definition=b,this.description=o,I.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var m;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const b=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function o(a){if(a instanceof P)return["codicon","codicon-"+a.id];const i=b.exec(a.id);if(!i)return o(P.error);let[,d,s]=i;const n=["codicon","codicon-"+d];return s&&n.push("codicon-modifier-"+s.substr(1)),n}t.asClassNameArray=o;function u(a){return o(a).join(" ")}t.asClassName=u;function f(a){return"."+o(a).join(".")}t.asCSSSelector=f})(m||(m={})),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"})}(P||(P={}))},VpOo:function(Be,J){function L(Y,B){var I=B.x,F=B.y,T=B.width,R=B.height,P=B.r,m,t,b,o;T<0&&(I=I+T,T=-T),R<0&&(F=F+R,R=-R),typeof P=="number"?m=t=b=o=P:P instanceof Array?P.length===1?m=t=b=o=P[0]:P.length===2?(m=b=P[0],t=o=P[1]):P.length===3?(m=P[0],t=o=P[1],b=P[2]):(m=P[0],t=P[1],b=P[2],o=P[3]):m=t=b=o=0;var u;m+t>T&&(u=m+t,m*=T/u,t*=T/u),b+o>T&&(u=b+o,b*=T/u,o*=T/u),t+b>R&&(u=t+b,t*=R/u,b*=R/u),m+o>R&&(u=m+o,m*=R/u,o*=R/u),Y.moveTo(I+m,F),Y.lineTo(I+T-t,F),t!==0&&Y.arc(I+T-t,F+t,t,-Math.PI/2,0),Y.lineTo(I+T,F+R-b),b!==0&&Y.arc(I+T-b,F+R-b,b,0,Math.PI/2),Y.lineTo(I+o,F+R),o!==0&&Y.arc(I+o,F+R-o,o,Math.PI/2,Math.PI),Y.lineTo(I,F+m),m!==0&&Y.arc(I+m,F+m,m,Math.PI,Math.PI*1.5)}J.buildPath=L},"VrN/":function(Be,J,L){(function(Y,B){Be.exports=B()})(this,function(){"use strict";var Y=navigator.userAgent,B=navigator.platform,I=/gecko\/\d/i.test(Y),F=/MSIE \d/.test(Y),T=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Y),R=/Edge\/(\d+)/.exec(Y),P=F||T||R,m=P&&(F?document.documentMode||6:+(R||T)[1]),t=!R&&/WebKit\//.test(Y),b=t&&/Qt\/\d+\.\d+/.test(Y),o=!R&&/Chrome\//.test(Y),u=/Opera\//.test(Y),f=/Apple Computer/.test(navigator.vendor),a=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Y),i=/PhantomJS/.test(Y),d=!R&&/AppleWebKit/.test(Y)&&/Mobile\/\w+/.test(Y),s=/Android/.test(Y),n=d||s||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Y),l=d||/Mac/.test(B),c=/\bCrOS\b/.test(Y),x=/win/i.test(B),A=u&&Y.match(/Version\/(\d*\.\d*)/);A&&(A=Number(A[1])),A&&A>=15&&(u=!1,t=!0);var C=l&&(b||u&&(A==null||A<12.11)),k=I||P&&m>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,r){var D=e.className,O=w(r).exec(D);if(O){var N=D.slice(O.index+O[0].length);e.className=D.slice(0,O.index)+(N?O[1]+N:"")}};function h(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function p(e,r){return h(e).appendChild(r)}function v(e,r,D,O){var N=document.createElement(e);if(D&&(N.className=D),O&&(N.style.cssText=O),typeof r=="string")N.appendChild(document.createTextNode(r));else if(r)for(var X=0;X<r.length;++X)N.appendChild(r[X]);return N}function _(e,r,D,O){var N=v(e,r,D,O);return N.setAttribute("role","presentation"),N}var E;document.createRange?E=function(e,r,D,O){var N=document.createRange();return N.setEnd(O||e,D),N.setStart(e,r),N}:E=function(e,r,D){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(N){return O}return O.collapse(!0),O.moveEnd("character",D),O.moveStart("character",r),O};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 j(){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 U(e,r){var D=e.className;w(r).test(D)||(e.className+=(D?" ":"")+r)}function S(e,r){for(var D=e.split(" "),O=0;O<D.length;O++)D[O]&&!w(D[O]).test(r)&&(r+=" "+D[O]);return r}var z=function(e){e.select()};d?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:P&&(z=function(e){try{e.select()}catch(r){}});function H(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function M(e,r,D){r||(r={});for(var O in e)e.hasOwnProperty(O)&&(D!==!1||!r.hasOwnProperty(O))&&(r[O]=e[O]);return r}function V(e,r,D,O,N){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var X=O||0,q=N||0;;){var re=e.indexOf(" ",X);if(re<0||re>=r)return q+(r-X);q+=re-X,q+=D-q%D,X=re+1}}var K=function(){this.id=null,this.f=null,this.time=0,this.handler=H(this.onTimeout,this)};K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,r){this.f=r;var D=+new Date+e;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function $(e,r){for(var D=0;D<e.length;++D)if(e[D]==r)return D;return-1}var Z=50,me={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},fe={origin:"*mouse"},ye={origin:"+move"};function Ie(e,r,D){for(var O=0,N=0;;){var X=e.indexOf(" ",O);X==-1&&(X=e.length);var q=X-O;if(X==e.length||N+q>=r)return O+Math.min(q,r-N);if(N+=X-O,N+=D-N%D,O=X+1,N>=r)return O}}var ve=[""];function de(e){for(;ve.length<=e;)ve.push(Je(ve)+" ");return ve[e]}function Je(e){return e[e.length-1]}function Rt(e,r){for(var D=[],O=0;O<e.length;O++)D[O]=r(e[O],O);return D}function Ee(e,r,D){for(var O=0,N=D(r);O<e.length&&D(e[O])<=N;)O++;e.splice(O,0,r)}function Me(){}function rt(e,r){var D;return Object.create?D=Object.create(e):(Me.prototype=e,D=new Me),r&&M(r,D),D}var He=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ke(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||He.test(e))}function ht(e,r){return r?r.source.indexOf("\\w")>-1&&ke(e)?!0:r.test(e):ke(e)}function ie(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function we(e){return e.charCodeAt(0)>=768&&xe.test(e)}function $e(e,r,D){for(;(D<0?r>0:r<e.length)&&we(e.charAt(r));)r+=D;return r}function ct(e,r,D){for(var O=r>D?-1:1;;){if(r==D)return r;var N=(r+D)/2,X=O<0?Math.ceil(N):Math.floor(N);if(X==r)return e(X)?r:D;e(X)?D=X:r=X+O}}function yt(e,r,D,O){if(!e)return O(r,D,"ltr",0);for(var N=!1,X=0;X<e.length;++X){var q=e[X];(q.from<D&&q.to>r||r==D&&q.to==r)&&(O(Math.max(q.from,r),Math.min(q.to,D),q.level==1?"rtl":"ltr",X),N=!0)}N||O(r,D,"ltr")}var Ut=null;function We(e,r,D){var O;Ut=null;for(var N=0;N<e.length;++N){var X=e[N];if(X.from<r&&X.to>r)return N;X.to==r&&(X.from!=X.to&&D=="before"?O=N:Ut=N),X.from==r&&(X.from!=X.to&&D!="before"?O=N:Ut=N)}return O!=null?O:Ut}var kt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(pe){return pe<=247?e.charAt(pe):1424<=pe&&pe<=1524?"R":1536<=pe&&pe<=1785?r.charAt(pe-1536):1774<=pe&&pe<=2220?"r":8192<=pe&&pe<=8203?"w":pe==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,N=/[stwN]/,X=/[LRr]/,q=/[Lb1n]/,re=/[1n]/;function se(pe,Ve,nt){this.level=pe,this.from=Ve,this.to=nt}return function(pe,Ve){var nt=Ve=="ltr"?"L":"R";if(pe.length==0||Ve=="ltr"&&!O.test(pe))return!1;for(var Dt=pe.length,Tt=[],an=0;an<Dt;++an)Tt.push(D(pe.charCodeAt(an)));for(var yn=0,Ln=nt;yn<Dt;++yn){var jn=Tt[yn];jn=="m"?Tt[yn]=Ln:Ln=jn}for(var Xn=0,Un=nt;Xn<Dt;++Xn){var er=Tt[Xn];er=="1"&&Un=="r"?Tt[Xn]="n":X.test(er)&&(Un=er,er=="r"&&(Tt[Xn]="R"))}for(var br=1,mr=Tt[0];br<Dt-1;++br){var kr=Tt[br];kr=="+"&&mr=="1"&&Tt[br+1]=="1"?Tt[br]="1":kr==","&&mr==Tt[br+1]&&(mr=="1"||mr=="n")&&(Tt[br]=mr),mr=kr}for(var ia=0;ia<Dt;++ia){var Ba=Tt[ia];if(Ba==",")Tt[ia]="N";else if(Ba=="%"){var va=void 0;for(va=ia+1;va<Dt&&Tt[va]=="%";++va);for(var oi=ia&&Tt[ia-1]=="!"||va<Dt&&Tt[va]=="1"?"1":"N",ti=ia;ti<va;++ti)Tt[ti]=oi;ia=va-1}}for(var Ma=0,ni=nt;Ma<Dt;++Ma){var Ka=Tt[Ma];ni=="L"&&Ka=="1"?Tt[Ma]="L":X.test(Ka)&&(ni=Ka)}for(var ka=0;ka<Dt;++ka)if(N.test(Tt[ka])){var La=void 0;for(La=ka+1;La<Dt&&N.test(Tt[La]);++La);for(var Ea=(ka?Tt[ka-1]:nt)=="L",ri=(La<Dt?Tt[La]:nt)=="L",So=Ea==ri?Ea?"L":"R":nt,to=ka;to<La;++to)Tt[to]=So;ka=La-1}for(var Va=[],Li,Ha=0;Ha<Dt;)if(q.test(Tt[Ha])){var ms=Ha;for(++Ha;Ha<Dt&&q.test(Tt[Ha]);++Ha);Va.push(new se(0,ms,Ha))}else{var Ki=Ha,lo=Va.length,uo=Ve=="rtl"?1:0;for(++Ha;Ha<Dt&&Tt[Ha]!="L";++Ha);for(var $a=Ki;$a<Ha;)if(re.test(Tt[$a])){Ki<$a&&(Va.splice(lo,0,new se(1,Ki,$a)),lo+=uo);var Oo=$a;for(++$a;$a<Ha&&re.test(Tt[$a]);++$a);Va.splice(lo,0,new se(2,Oo,$a)),lo+=uo,Ki=$a}else++$a;Ki<Ha&&Va.splice(lo,0,new se(1,Ki,Ha))}return Ve=="ltr"&&(Va[0].level==1&&(Li=pe.match(/^\s+/))&&(Va[0].from=Li[0].length,Va.unshift(new se(0,0,Li[0].length))),Je(Va).level==1&&(Li=pe.match(/\s+$/))&&(Je(Va).to-=Li[0].length,Va.push(new se(0,Dt-Li[0].length,Dt)))),Ve=="rtl"?Va.reverse():Va}}();function qt(e,r){var D=e.order;return D==null&&(D=e.order=kt(e.text,r)),D}var Pe=[],Ae=function(e,r,D){if(e.addEventListener)e.addEventListener(r,D,!1);else if(e.attachEvent)e.attachEvent("on"+r,D);else{var O=e._handlers||(e._handlers={});O[r]=(O[r]||Pe).concat(D)}};function ut(e,r){return e._handlers&&e._handlers[r]||Pe}function Et(e,r,D){if(e.removeEventListener)e.removeEventListener(r,D,!1);else if(e.detachEvent)e.detachEvent("on"+r,D);else{var O=e._handlers,N=O&&O[r];if(N){var X=$(N,D);X>-1&&(O[r]=N.slice(0,X).concat(N.slice(X+1)))}}}function Ze(e,r){var D=ut(e,r);if(!D.length)return;for(var O=Array.prototype.slice.call(arguments,2),N=0;N<D.length;++N)D[N].apply(null,O)}function dt(e,r,D){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,D||r.type,e,r),he(r)||r.codemirrorIgnore}function Ne(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<r.length;++O)$(D,r[O])==-1&&D.push(r[O])}function Te(e,r){return ut(e,r).length>0}function Oe(e){e.prototype.on=function(r,D){Ae(this,r,D)},e.prototype.off=function(r,D){Et(this,r,D)}}function ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function le(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function he(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function _e(e){ae(e),le(e)}function Se(e){return e.target||e.srcElement}function ze(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),l&&e.ctrlKey&&r==1&&(r=3),r}var xt=function(){if(P&&m<9)return!1;var e=v("div");return"draggable"in e||"dragDrop"in e}(),Qt;function sn(e){if(Qt==null){var r=v("span","\u200B");p(e,v("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Qt=r.offsetWidth<=1&&r.offsetHeight>2&&!(P&&m<8))}var D=Qt?v("span","\u200B"):v("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var gt;function zt(e){if(gt!=null)return gt;var r=p(e,document.createTextNode("A\u062EA")),D=E(r,0,1).getBoundingClientRect(),O=E(r,1,2).getBoundingClientRect();return h(e),!D||D.left==D.right?!1:gt=O.right-D.right<3}var Ot=`
b`.split(/\n/).length!=3?function(e){for(var r=0,D=[],O=e.length;r<=O;){var N=e.indexOf(`
`,r);N==-1&&(N=e.length);var X=e.slice(r,e.charAt(N-1)=="\r"?N-1:N),q=X.indexOf("\r");q!=-1?(D.push(X.slice(0,q)),r+=q+1):(D.push(X),r=N+1)}return D}:function(e){return e.split(/\r\n?|\n/)},At=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(D){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},ft=function(){var e=v("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),be=null;function Fe(e){if(be!=null)return be;var r=p(e,v("span","x")),D=r.getBoundingClientRect(),O=E(r,0,1).getBoundingClientRect();return be=Math.abs(D.left-O.left)>1}var Nt={},bt={};function Kt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),Nt[e]=r}function Zt(e,r){bt[e]=r}function Ge(e){if(typeof e=="string"&&bt.hasOwnProperty(e))e=bt[e];else if(e&&typeof e.name=="string"&&bt.hasOwnProperty(e.name)){var r=bt[e.name];typeof r=="string"&&(r={name:r}),e=rt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ge("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ge("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function lt(e,r){r=Ge(r);var D=Nt[r.name];if(!D)return lt(e,"text/plain");var O=D(e,r);if(Lt.hasOwnProperty(r.name)){var N=Lt[r.name];for(var X in N){if(!N.hasOwnProperty(X))continue;O.hasOwnProperty(X)&&(O["_"+X]=O[X]),O[X]=N[X]}}if(O.name=r.name,r.helperType&&(O.helperType=r.helperType),r.modeProps)for(var q in r.modeProps)O[q]=r.modeProps[q];return O}var Lt={};function Wt(e,r){var D=Lt.hasOwnProperty(e)?Lt[e]:Lt[e]={};M(r,D)}function ln(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var D={};for(var O in r){var N=r[O];N instanceof Array&&(N=N.concat([])),D[O]=N}return D}function gn(e,r){for(var D;e.innerMode&&!(D=e.innerMode(r),!D||D.mode==e);)r=D.state,e=D.mode;return D||{mode:e,state:r}}function tr(e,r,D){return e.startState?e.startState(r,D):!0}var Wn=function(e,r,D){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};Wn.prototype.eol=function(){return this.pos>=this.string.length},Wn.prototype.sol=function(){return this.pos==this.lineStart},Wn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Wn.prototype.eat=function(e){var r=this.string.charAt(this.pos),D;if(typeof e=="string"?D=r==e:D=r&&(e.test?e.test(r):e(r)),D)return++this.pos,r},Wn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},Wn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Wn.prototype.skipToEnd=function(){this.pos=this.string.length},Wn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},Wn.prototype.backUp=function(e){this.pos-=e},Wn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},Wn.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},Wn.prototype.match=function(e,r,D){if(typeof e=="string"){var O=function(q){return D?q.toLowerCase():q},N=this.string.substr(this.pos,e.length);if(O(N)==O(e))return r!==!1&&(this.pos+=e.length),!0}else{var X=this.string.slice(this.pos).match(e);return X&&X.index>0?null:(X&&r!==!1&&(this.pos+=X[0].length),X)}},Wn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},Wn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},Wn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function En(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 D=e;!D.lines;)for(var O=0;;++O){var N=D.children[O],X=N.chunkSize();if(r<X){D=N;break}r-=X}return D.lines[r]}function xr(e,r,D){var O=[],N=r.line;return e.iter(r.line,D.line+1,function(X){var q=X.text;N==D.line&&(q=q.slice(0,D.ch)),N==r.line&&(q=q.slice(r.ch)),O.push(q),++N}),O}function Er(e,r,D){var O=[];return e.iter(r,D,function(N){O.push(N.text)}),O}function rr(e,r){var D=r-e.height;if(D)for(var O=e;O;O=O.parent)O.height+=D}function ur(e){if(e.parent==null)return null;for(var r=e.parent,D=$(r.lines,e),O=r.parent;O;r=O,O=O.parent)for(var N=0;!(O.children[N]==r);++N)D+=O.children[N].chunkSize();return D+r.first}function Rr(e,r){var D=e.first;e:do{for(var O=0;O<e.children.length;++O){var N=e.children[O],X=N.height;if(r<X){e=N;continue e}r-=X,D+=N.chunkSize()}return D}while(!e.lines);for(var q=0;q<e.lines.length;++q){var re=e.lines[q],se=re.height;if(r<se)break;r-=se}return D+q}function Kr(e,r){return r>=e.first&&r<e.first+e.size}function ra(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function fn(e,r,D){if(D===void 0&&(D=null),!(this instanceof fn))return new fn(e,r,D);this.line=e,this.ch=r,this.sticky=D}function or(e,r){return e.line-r.line||e.ch-r.ch}function sa(e,r){return e.sticky==r.sticky&&or(e,r)==0}function ya(e){return fn(e.line,e.ch)}function Jr(e,r){return or(e,r)<0?r:e}function na(e,r){return or(e,r)<0?e:r}function te(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function W(e,r){if(r.line<e.first)return fn(e.first,0);var D=e.first+e.size-1;return r.line>D?fn(D,En(e,D).text.length):G(r,En(e,r.line).text.length)}function G(e,r){var D=e.ch;return D==null||D>r?fn(e.line,r):D<0?fn(e.line,0):e}function Q(e,r){for(var D=[],O=0;O<r.length;O++)D[O]=W(e,r[O]);return D}var ue=function(e,r){this.state=e,this.lookAhead=r},ee=function(e,r,D,O){this.state=r,this.doc=e,this.line=D,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};ee.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},ee.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}},ee.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ee.fromSaved=function(e,r,D){return r instanceof ue?new ee(e,ln(e.mode,r.state),D,r.lookAhead):new ee(e,ln(e.mode,r),D)},ee.prototype.save=function(e){var r=e!==!1?ln(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(r,this.maxLookAhead):r};function qe(e,r,D,O){var N=[e.state.modeGen],X={};Nn(e,r.text,e.doc.mode,D,function(pe,Ve){return N.push(pe,Ve)},X,O);for(var q=D.state,re=function(pe){D.baseTokens=N;var Ve=e.state.overlays[pe],nt=1,Dt=0;D.state=!0,Nn(e,r.text,Ve.mode,D,function(Tt,an){for(var yn=nt;Dt<Tt;){var Ln=N[nt];Ln>Tt&&N.splice(nt,1,Tt,N[nt+1],Ln),nt+=2,Dt=Math.min(Tt,Ln)}if(!an)return;if(Ve.opaque)N.splice(yn,nt-yn,Tt,"overlay "+an),nt=yn+2;else for(;yn<nt;yn+=2){var jn=N[yn+1];N[yn+1]=(jn?jn+" ":"")+"overlay "+an}},X),D.state=q,D.baseTokens=null,D.baseTokenPos=1},se=0;se<e.state.overlays.length;++se)re(se);return{styles:N,classes:X.bgClass||X.textClass?X:null}}function tn(e,r,D){if(!r.styles||r.styles[0]!=e.state.modeGen){var O=An(e,ur(r)),N=r.text.length>e.options.maxHighlightLength&&ln(e.doc.mode,O.state),X=qe(e,r,O);N&&(O.state=N),r.stateAfter=O.save(!N),r.styles=X.styles,X.classes?r.styleClasses=X.classes:r.styleClasses&&(r.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function An(e,r,D){var O=e.doc,N=e.display;if(!O.mode.startState)return new ee(O,!0,r);var X=dr(e,r,D),q=X>O.first&&En(O,X-1).stateAfter,re=q?ee.fromSaved(O,q,X):new ee(O,tr(O.mode),X);return O.iter(X,r,function(se){Vn(e,se.text,re);var pe=re.line;se.stateAfter=pe==r-1||pe%5==0||pe>=N.viewFrom&&pe<N.viewTo?re.save():null,re.nextLine()}),D&&(O.modeFrontier=re.line),re}function Vn(e,r,D,O){var N=e.doc.mode,X=new Wn(r,e.options.tabSize,D);for(X.start=X.pos=O||0,r==""&&un(N,D.state);!X.eol();)nr(N,X,D.state),X.start=X.pos}function un(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var D=gn(e,r);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function nr(e,r,D,O){for(var N=0;N<10;N++){O&&(O[0]=gn(e,D).mode);var X=e.token(r,D);if(r.pos>r.start)return X}throw new Error("Mode "+e.name+" failed to advance stream.")}var vn=function(e,r,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=D};function dn(e,r,D,O){var N=e.doc,X=N.mode,q;r=W(N,r);var re=En(N,r.line),se=An(e,r.line,D),pe=new Wn(re.text,e.options.tabSize,se),Ve;for(O&&(Ve=[]);(O||pe.pos<r.ch)&&!pe.eol();)pe.start=pe.pos,q=nr(X,pe,se.state),O&&Ve.push(new vn(pe,q,ln(N.mode,se.state)));return O?Ve:new vn(pe,q,se.state)}function xn(e,r){if(e)for(;;){var D=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;e=e.slice(0,D.index)+e.slice(D.index+D[0].length);var O=D[1]?"bgClass":"textClass";r[O]==null?r[O]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(r[O])||(r[O]+=" "+D[2])}return e}function Nn(e,r,D,O,N,X,q){var re=D.flattenSpans;re==null&&(re=e.options.flattenSpans);var se=0,pe=null,Ve=new Wn(r,e.options.tabSize,O),nt,Dt=e.options.addModeClass&&[null];for(r==""&&xn(un(D,O.state),X);!Ve.eol();){if(Ve.pos>e.options.maxHighlightLength?(re=!1,q&&Vn(e,r,O,Ve.pos),Ve.pos=r.length,nt=null):nt=xn(nr(D,Ve,O.state,Dt),X),Dt){var Tt=Dt[0].name;Tt&&(nt="m-"+(nt?Tt+" "+nt:Tt))}if(!re||pe!=nt){for(;se<Ve.start;)se=Math.min(Ve.start,se+5e3),N(se,pe);pe=nt}Ve.start=Ve.pos}for(;se<Ve.pos;){var an=Math.min(Ve.pos,se+5e3);N(an,pe),se=an}}function dr(e,r,D){for(var O,N,X=e.doc,q=D?-1:r-(e.doc.mode.innerMode?1e3:100),re=r;re>q;--re){if(re<=X.first)return X.first;var se=En(X,re-1),pe=se.stateAfter;if(pe&&(!D||re+(pe instanceof ue?pe.lookAhead:0)<=X.modeFrontier))return re;var Ve=V(se.text,null,e.options.tabSize);(N==null||O>Ve)&&(N=re-1,O=Ve)}return N}function $n(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var D=e.first,O=r-1;O>D;O--){var N=En(e,O).stateAfter;if(N&&(!(N instanceof ue)||O+N.lookAhead<r)){D=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var Zn=!1,kn=!1;function gr(){Zn=!0}function Bn(){kn=!0}function ar(e,r,D){this.marker=e,this.from=r,this.to=D}function sr(e,r){if(e)for(var D=0;D<e.length;++D){var O=e[D];if(O.marker==r)return O}}function Pn(e,r){for(var D,O=0;O<e.length;++O)e[O]!=r&&(D||(D=[])).push(e[O]);return D}function Tr(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Mr(e,r,D){var O;if(e)for(var N=0;N<e.length;++N){var X=e[N],q=X.marker,re=X.from==null||(q.inclusiveLeft?X.from<=r:X.from<r);if(re||X.from==r&&q.type=="bookmark"&&(!D||!X.marker.insertLeft)){var se=X.to==null||(q.inclusiveRight?X.to>=r:X.to>r);(O||(O=[])).push(new ar(q,X.from,se?null:X.to))}}return O}function Sr(e,r,D){var O;if(e)for(var N=0;N<e.length;++N){var X=e[N],q=X.marker,re=X.to==null||(q.inclusiveRight?X.to>=r:X.to>r);if(re||X.from==r&&q.type=="bookmark"&&(!D||X.marker.insertLeft)){var se=X.from==null||(q.inclusiveLeft?X.from<=r:X.from<r);(O||(O=[])).push(new ar(q,se?null:X.from-r,X.to==null?null:X.to-r))}}return O}function hr(e,r){if(r.full)return null;var D=Kr(e,r.from.line)&&En(e,r.from.line).markedSpans,O=Kr(e,r.to.line)&&En(e,r.to.line).markedSpans;if(!D&&!O)return null;var N=r.from.ch,X=r.to.ch,q=or(r.from,r.to)==0,re=Mr(D,N,q),se=Sr(O,X,q),pe=r.text.length==1,Ve=Je(r.text).length+(pe?N:0);if(re)for(var nt=0;nt<re.length;++nt){var Dt=re[nt];if(Dt.to==null){var Tt=sr(se,Dt.marker);Tt?pe&&(Dt.to=Tt.to==null?null:Tt.to+Ve):Dt.to=N}}if(se)for(var an=0;an<se.length;++an){var yn=se[an];if(yn.to!=null&&(yn.to+=Ve),yn.from==null){var Ln=sr(re,yn.marker);Ln||(yn.from=Ve,pe&&(re||(re=[])).push(yn))}else yn.from+=Ve,pe&&(re||(re=[])).push(yn)}re&&(re=ne(re)),se&&se!=re&&(se=ne(se));var jn=[re];if(!pe){var Xn=r.text.length-2,Un;if(Xn>0&&re)for(var er=0;er<re.length;++er)re[er].to==null&&(Un||(Un=[])).push(new ar(re[er].marker,null,null));for(var br=0;br<Xn;++br)jn.push(Un);jn.push(se)}return jn}function ne(e){for(var r=0;r<e.length;++r){var D=e[r];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Re(e,r,D){var O=null;if(e.iter(r.line,D.line+1,function(Tt){if(Tt.markedSpans)for(var an=0;an<Tt.markedSpans.length;++an){var yn=Tt.markedSpans[an].marker;yn.readOnly&&(!O||$(O,yn)==-1)&&(O||(O=[])).push(yn)}}),!O)return null;for(var N=[{from:r,to:D}],X=0;X<O.length;++X)for(var q=O[X],re=q.find(0),se=0;se<N.length;++se){var pe=N[se];if(or(pe.to,re.from)<0||or(pe.from,re.to)>0)continue;var Ve=[se,1],nt=or(pe.from,re.from),Dt=or(pe.to,re.to);(nt<0||!q.inclusiveLeft&&!nt)&&Ve.push({from:pe.from,to:re.from}),(Dt>0||!q.inclusiveRight&&!Dt)&&Ve.push({from:re.to,to:pe.to}),N.splice.apply(N,Ve),se+=Ve.length-3}return N}function Xe(e){var r=e.markedSpans;if(!r)return;for(var D=0;D<r.length;++D)r[D].marker.detachLine(e);e.markedSpans=null}function Le(e,r){if(!r)return;for(var D=0;D<r.length;++D)r[D].marker.attachLine(e);e.markedSpans=r}function st(e){return e.inclusiveLeft?-1:0}function et(e){return e.inclusiveRight?1:0}function pt(e,r){var D=e.lines.length-r.lines.length;if(D!=0)return D;var O=e.find(),N=r.find(),X=or(O.from,N.from)||st(e)-st(r);if(X)return-X;var q=or(O.to,N.to)||et(e)-et(r);return q||r.id-e.id}function mt(e,r){var D=kn&&e.markedSpans,O;if(D)for(var N=void 0,X=0;X<D.length;++X)N=D[X],N.marker.collapsed&&(r?N.from:N.to)==null&&(!O||pt(O,N.marker)<0)&&(O=N.marker);return O}function it(e){return mt(e,!0)}function Mt(e){return mt(e,!1)}function Xt(e,r){var D=kn&&e.markedSpans,O;if(D)for(var N=0;N<D.length;++N){var X=D[N];X.marker.collapsed&&(X.from==null||X.from<r)&&(X.to==null||X.to>r)&&(!O||pt(O,X.marker)<0)&&(O=X.marker)}return O}function Vt(e,r,D,O,N){var X=En(e,r),q=kn&&X.markedSpans;if(q)for(var re=0;re<q.length;++re){var se=q[re];if(!se.marker.collapsed)continue;var pe=se.marker.find(0),Ve=or(pe.from,D)||st(se.marker)-st(N),nt=or(pe.to,O)||et(se.marker)-et(N);if(Ve>=0&&nt<=0||Ve<=0&&nt>=0)continue;if(Ve<=0&&(se.marker.inclusiveRight&&N.inclusiveLeft?or(pe.to,D)>=0:or(pe.to,D)>0)||Ve>=0&&(se.marker.inclusiveRight&&N.inclusiveLeft?or(pe.from,O)<=0:or(pe.from,O)<0))return!0}}function St(e){for(var r;r=it(e);)e=r.find(-1,!0).line;return e}function nn(e){for(var r;r=Mt(e);)e=r.find(1,!0).line;return e}function Qe(e){for(var r,D;r=Mt(e);)e=r.find(1,!0).line,(D||(D=[])).push(e);return D}function en(e,r){var D=En(e,r),O=St(D);return D==O?r:ur(O)}function Bt(e,r){if(r>e.lastLine())return r;var D=En(e,r),O;if(!bn(e,D))return r;for(;O=Mt(D);)D=O.find(1,!0).line;return ur(D)+1}function bn(e,r){var D=kn&&r.markedSpans;if(D)for(var O=void 0,N=0;N<D.length;++N){if(O=D[N],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&On(e,r,O))return!0}}function On(e,r,D){if(D.to==null){var O=D.marker.find(1,!0);return On(e,O.line,sr(O.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==r.text.length)return!0;for(var N=void 0,X=0;X<r.markedSpans.length;++X)if(N=r.markedSpans[X],N.marker.collapsed&&!N.marker.widgetNode&&N.from==D.to&&(N.to==null||N.to!=D.from)&&(N.marker.inclusiveLeft||D.marker.inclusiveRight)&&On(e,r,N))return!0}function Gt(e){e=St(e);for(var r=0,D=e.parent,O=0;O<D.lines.length;++O){var N=D.lines[O];if(N==e)break;r+=N.height}for(var X=D.parent;X;D=X,X=D.parent)for(var q=0;q<X.children.length;++q){var re=X.children[q];if(re==D)break;r+=re.height}return r}function cn(e){if(e.height==0)return 0;for(var r=e.text.length,D,O=e;D=it(O);){var N=D.find(0,!0);O=N.from.line,r+=N.from.ch-N.to.ch}for(O=e;D=Mt(O);){var X=D.find(0,!0);r-=O.text.length-X.from.ch,O=X.to.line,r+=O.text.length-X.to.ch}return r}function Ht(e){var r=e.display,D=e.doc;r.maxLine=En(D,D.first),r.maxLineLength=cn(r.maxLine),r.maxLineChanged=!0,D.iter(function(O){var N=cn(O);N>r.maxLineLength&&(r.maxLineLength=N,r.maxLine=O)})}var Sn=function(e,r,D){this.text=e,Le(this,r),this.height=D?D(this):1};Sn.prototype.lineNo=function(){return ur(this)},Oe(Sn);function wn(e,r,D,O){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xe(e),Le(e,D);var N=O?O(e):1;N!=e.height&&rr(e,N)}function wt(e){e.parent=null,Xe(e)}var It={},Pt={};function Ct(e,r){if(!e||/^\s*$/.test(e))return null;var D=r.addModeClass?Pt:It;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function vt(e,r){var D=_("span",null,null,t?"padding-right: .1px":null),O={pre:_("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var N=0;N<=(r.rest?r.rest.length:0);N++){var X=N?r.rest[N-1]:r.line,q=void 0;O.pos=0,O.addToken=$t,zt(e.display.measure)&&(q=qt(X,e.doc.direction))&&(O.addToken=pn(O.addToken,q)),O.map=[];var re=r!=e.display.externalMeasured&&ur(X);Tn(X,O,tn(e,X,re)),X.styleClasses&&(X.styleClasses.bgClass&&(O.bgClass=S(X.styleClasses.bgClass,O.bgClass||"")),X.styleClasses.textClass&&(O.textClass=S(X.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(sn(e.display.measure))),N==0?(r.measure.map=O.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(O.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(t){var se=O.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,r.line,O.pre),O.pre.className&&(O.textClass=S(O.pre.className,O.textClass||"")),O}function Dn(e){var r=v("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function $t(e,r,D,O,N,X,q){if(!r)return;var re=e.splitSpaces?Cn(r,e.trailingSpace):r,se=e.cm.state.specialChars,pe=!1,Ve;if(!se.test(r))e.col+=r.length,Ve=document.createTextNode(re),e.map.push(e.pos,e.pos+r.length,Ve),P&&m<9&&(pe=!0),e.pos+=r.length;else{Ve=document.createDocumentFragment();for(var nt=0;;){se.lastIndex=nt;var Dt=se.exec(r),Tt=Dt?Dt.index-nt:r.length-nt;if(Tt){var an=document.createTextNode(re.slice(nt,nt+Tt));P&&m<9?Ve.appendChild(v("span",[an])):Ve.appendChild(an),e.map.push(e.pos,e.pos+Tt,an),e.col+=Tt,e.pos+=Tt}if(!Dt)break;nt+=Tt+1;var yn=void 0;if(Dt[0]==" "){var Ln=e.cm.options.tabSize,jn=Ln-e.col%Ln;yn=Ve.appendChild(v("span",de(jn),"cm-tab")),yn.setAttribute("role","presentation"),yn.setAttribute("cm-text"," "),e.col+=jn}else Dt[0]=="\r"||Dt[0]==`
`?(yn=Ve.appendChild(v("span",Dt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yn.setAttribute("cm-text",Dt[0]),e.col+=1):(yn=e.cm.options.specialCharPlaceholder(Dt[0]),yn.setAttribute("cm-text",Dt[0]),P&&m<9?Ve.appendChild(v("span",[yn])):Ve.appendChild(yn),e.col+=1);e.map.push(e.pos,e.pos+1,yn),e.pos++}}if(e.trailingSpace=re.charCodeAt(r.length-1)==32,D||O||N||pe||X||q){var Xn=D||"";O&&(Xn+=O),N&&(Xn+=N);var Un=v("span",[Ve],Xn,X);if(q)for(var er in q)q.hasOwnProperty(er)&&er!="style"&&er!="class"&&Un.setAttribute(er,q[er]);return e.content.appendChild(Un)}e.content.appendChild(Ve)}function Cn(e,r){if(e.length>1&&!/ /.test(e))return e;for(var D=r,O="",N=0;N<e.length;N++){var X=e.charAt(N);X==" "&&D&&(N==e.length-1||e.charCodeAt(N+1)==32)&&(X="\xA0"),O+=X,D=X==" "}return O}function pn(e,r){return function(D,O,N,X,q,re,se){N=N?N+" cm-force-border":"cm-force-border";for(var pe=D.pos,Ve=pe+O.length;;){for(var nt=void 0,Dt=0;Dt<r.length&&!(nt=r[Dt],nt.to>pe&&nt.from<=pe);Dt++);if(nt.to>=Ve)return e(D,O,N,X,q,re,se);e(D,O.slice(0,nt.to-pe),N,X,null,re,se),X=null,O=O.slice(nt.to-pe),pe=nt.to}}}function Yt(e,r,D,O){var N=!O&&D.widgetNode;N&&e.map.push(e.pos,e.pos+r,N),!O&&e.cm.display.input.needsContentAttribute&&(N||(N=e.content.appendChild(document.createElement("span"))),N.setAttribute("cm-marker",D.id)),N&&(e.cm.display.input.setUneditable(N),e.content.appendChild(N)),e.pos+=r,e.trailingSpace=!1}function Tn(e,r,D){var O=e.markedSpans,N=e.text,X=0;if(!O){for(var q=1;q<D.length;q+=2)r.addToken(r,N.slice(X,X=D[q]),Ct(D[q+1],r.cm.options));return}for(var re=N.length,se=0,pe=1,Ve="",nt,Dt,Tt=0,an,yn,Ln,jn,Xn;;){if(Tt==se){an=yn=Ln=Dt="",Xn=null,jn=null,Tt=Infinity;for(var Un=[],er=void 0,br=0;br<O.length;++br){var mr=O[br],kr=mr.marker;if(kr.type=="bookmark"&&mr.from==se&&kr.widgetNode)Un.push(kr);else if(mr.from<=se&&(mr.to==null||mr.to>se||kr.collapsed&&mr.to==se&&mr.from==se)){if(mr.to!=null&&mr.to!=se&&Tt>mr.to&&(Tt=mr.to,yn=""),kr.className&&(an+=" "+kr.className),kr.css&&(Dt=(Dt?Dt+";":"")+kr.css),kr.startStyle&&mr.from==se&&(Ln+=" "+kr.startStyle),kr.endStyle&&mr.to==Tt&&(er||(er=[])).push(kr.endStyle,mr.to),kr.title&&((Xn||(Xn={})).title=kr.title),kr.attributes)for(var ia in kr.attributes)(Xn||(Xn={}))[ia]=kr.attributes[ia];kr.collapsed&&(!jn||pt(jn.marker,kr)<0)&&(jn=mr)}else mr.from>se&&Tt>mr.from&&(Tt=mr.from)}if(er)for(var Ba=0;Ba<er.length;Ba+=2)er[Ba+1]==Tt&&(yn+=" "+er[Ba]);if(!jn||jn.from==se)for(var va=0;va<Un.length;++va)Yt(r,0,Un[va]);if(jn&&(jn.from||0)==se){if(Yt(r,(jn.to==null?re+1:jn.to)-se,jn.marker,jn.from==null),jn.to==null)return;jn.to==se&&(jn=!1)}}if(se>=re)break;for(var oi=Math.min(re,Tt);;){if(Ve){var ti=se+Ve.length;if(!jn){var Ma=ti>oi?Ve.slice(0,oi-se):Ve;r.addToken(r,Ma,nt?nt+an:an,Ln,se+Ma.length==Tt?yn:"",Dt,Xn)}if(ti>=oi){Ve=Ve.slice(oi-se),se=oi;break}se=ti,Ln=""}Ve=N.slice(X,X=D[pe++]),nt=Ct(D[pe++],r.cm.options)}}}function zn(e,r,D){this.line=r,this.rest=Qe(r),this.size=this.rest?ur(Je(this.rest))-D+1:1,this.node=this.text=null,this.hidden=bn(e,r)}function fr(e,r,D){for(var O=[],N,X=r;X<D;X=N){var q=new zn(e.doc,En(e.doc,X),X);N=X+q.size,O.push(q)}return O}var Gn=null;function Lr(e){Gn?Gn.ops.push(e):e.ownsGroup=Gn={ops:[e],delayedCallbacks:[]}}function Gr(e){var r=e.delayedCallbacks,D=0;do{for(;D<r.length;D++)r[D].call(null);for(var O=0;O<e.ops.length;O++){var N=e.ops[O];if(N.cursorActivityHandlers)for(;N.cursorActivityCalled<N.cursorActivityHandlers.length;)N.cursorActivityHandlers[N.cursorActivityCalled++].call(null,N.cm)}}while(D<r.length)}function Hn(e,r){var D=e.ownsGroup;if(!D)return;try{Gr(D)}finally{Gn=null,r(D)}}var Yn=null;function Jn(e,r){var D=ut(e,r);if(!D.length)return;var O=Array.prototype.slice.call(arguments,2),N;Gn?N=Gn.delayedCallbacks:Yn?N=Yn:(N=Yn=[],setTimeout(wr,0));for(var X=function(re){N.push(function(){return D[re].apply(null,O)})},q=0;q<D.length;++q)X(q)}function wr(){var e=Yn;Yn=null;for(var r=0;r<e.length;++r)e[r]()}function Wr(e,r,D,O){for(var N=0;N<r.changes.length;N++){var X=r.changes[N];X=="text"?ma(e,r):X=="gutter"?Oa(e,r,D,O):X=="class"?Ya(e,r):X=="widget"&&Pa(e,r,O)}r.changes=null}function Zr(e){return e.node==e.text&&(e.node=v("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),P&&m<8&&(e.node.style.zIndex=2)),e.node}function ua(e,r){var D=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),r.background)D?r.background.className=D:(r.background.parentNode.removeChild(r.background),r.background=null);else if(D){var O=Zr(r);r.background=O.insertBefore(v("div",null,D),O.firstChild),e.display.input.setUneditable(r.background)}}function xa(e,r){var D=e.display.externalMeasured;return D&&D.line==r.line?(e.display.externalMeasured=null,r.measure=D.measure,D.built):vt(e,r)}function ma(e,r){var D=r.text.className,O=xa(e,r);r.text==r.node&&(r.node=O.pre),r.text.parentNode.replaceChild(O.pre,r.text),r.text=O.pre,O.bgClass!=r.bgClass||O.textClass!=r.textClass?(r.bgClass=O.bgClass,r.textClass=O.textClass,Ya(e,r)):D&&(r.text.className=D)}function Ya(e,r){ua(e,r),r.line.wrapClass?Zr(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var D=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=D||""}function Oa(e,r,D,O){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 N=Zr(r);r.gutterBackground=v("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px; width: "+O.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),N.insertBefore(r.gutterBackground,r.text)}var X=r.line.gutterMarkers;if(e.options.lineNumbers||X){var q=Zr(r),re=r.gutter=v("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(re),q.insertBefore(re,r.text),r.line.gutterClass&&(re.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!X||!X["CodeMirror-linenumbers"])&&(r.lineNumber=re.appendChild(v("div",ra(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),X)for(var se=0;se<e.display.gutterSpecs.length;++se){var pe=e.display.gutterSpecs[se].className,Ve=X.hasOwnProperty(pe)&&X[pe];Ve&&re.appendChild(v("div",[Ve],"CodeMirror-gutter-elt","left: "+O.gutterLeft[pe]+"px; width: "+O.gutterWidth[pe]+"px"))}}}function Pa(e,r,D){r.alignable&&(r.alignable=null);for(var O=w("CodeMirror-linewidget"),N=r.node.firstChild,X=void 0;N;N=X)X=N.nextSibling,O.test(N.className)&&r.node.removeChild(N);Na(e,r,D)}function ga(e,r,D,O){var N=xa(e,r);return r.text=r.node=N.pre,N.bgClass&&(r.bgClass=N.bgClass),N.textClass&&(r.textClass=N.textClass),Ya(e,r),Oa(e,r,D,O),Na(e,r,O),r.node}function Na(e,r,D){if(ai(e,r.line,r,D,!0),r.rest)for(var O=0;O<r.rest.length;O++)ai(e,r.rest[O],r,D,!1)}function ai(e,r,D,O,N){if(!r.widgets)return;for(var X=Zr(D),q=0,re=r.widgets;q<re.length;++q){var se=re[q],pe=v("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),da(se,pe,D,O),e.display.input.setUneditable(pe),N&&se.above?X.insertBefore(pe,D.gutter||D.text):X.appendChild(pe),Jn(se,"redraw")}}function da(e,r,D,O){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(r);var N=O.wrapperWidth;r.style.left=O.fixedPos+"px",e.coverGutter||(N-=O.gutterTotalWidth,r.style.paddingLeft=O.gutterTotalWidth+"px"),r.style.width=N+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-O.gutterTotalWidth+"px"))}function ca(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!g(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+r.display.wrapper.clientWidth+"px;"),p(r.display.measure,v("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function Ra(e,r){for(var D=Se(r);D!=e.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==e.sizer&&D!=e.mover)return!0}function wa(e){return e.lineSpace.offsetTop}function De(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function tt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=p(e.measure,v("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,O={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function at(e){return Z-e.display.nativeBarWidth}function je(e){return e.display.scroller.clientWidth-at(e)-e.display.barWidth}function ce(e){return e.display.scroller.clientHeight-at(e)-e.display.barHeight}function Ce(e,r,D){var O=e.options.lineWrapping,N=O&&je(e);if(!r.measure.heights||O&&r.measure.width!=N){var X=r.measure.heights=[];if(O){r.measure.width=N;for(var q=r.text.firstChild.getClientRects(),re=0;re<q.length-1;re++){var se=q[re],pe=q[re+1];Math.abs(se.bottom-pe.bottom)>2&&X.push((se.bottom+pe.top)/2-D.top)}}X.push(D.bottom-D.top)}}function ge(e,r,D){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var O=0;O<e.rest.length;O++)if(e.rest[O]==r)return{map:e.measure.maps[O],cache:e.measure.caches[O]};for(var N=0;N<e.rest.length;N++)if(ur(e.rest[N])>D)return{map:e.measure.maps[N],cache:e.measure.caches[N],before:!0}}function Ue(e,r){r=St(r);var D=ur(r),O=e.display.externalMeasured=new zn(e.doc,r,D);O.lineN=D;var N=O.built=vt(e,O);return O.text=N.pre,p(e.display.lineMeasure,N.pre),O}function Ye(e,r,D,O){return _t(e,Ke(e,r),D,O)}function ot(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[qr(e,r)];var D=e.display.externalMeasured;if(D&&r>=D.lineN&&r<D.lineN+D.size)return D}function Ke(e,r){var D=ur(r),O=ot(e,D);O&&!O.text?O=null:O&&O.changes&&(Wr(e,O,D,pr(e)),e.curOp.forceUpdate=!0),O||(O=Ue(e,r));var N=ge(O,r,D);return{line:r,view:O,rect:null,map:N.map,cache:N.cache,before:N.before,hasHeights:!1}}function _t(e,r,D,O,N){r.before&&(D=-1);var X=D+(O||""),q;return r.cache.hasOwnProperty(X)?q=r.cache[X]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Ce(e,r.view,r.rect),r.hasHeights=!0),q=Rn(e,r,D,O),q.bogus||(r.cache[X]=q)),{left:q.left,right:q.right,top:N?q.rtop:q.top,bottom:N?q.rbottom:q.bottom}}var Ft={left:0,right:0,top:0,bottom:0};function rn(e,r,D){for(var O,N,X,q,re,se,pe=0;pe<e.length;pe+=3)if(re=e[pe],se=e[pe+1],r<re?(N=0,X=1,q="left"):r<se?(N=r-re,X=N+1):(pe==e.length-3||r==se&&e[pe+3]>r)&&(X=se-re,N=X-1,r>=se&&(q="right")),N!=null){if(O=e[pe+2],re==se&&D==(O.insertLeft?"left":"right")&&(q=D),D=="left"&&N==0)for(;pe&&e[pe-2]==e[pe-3]&&e[pe-1].insertLeft;)O=e[(pe-=3)+2],q="left";if(D=="right"&&N==se-re)for(;pe<e.length-3&&e[pe+3]==e[pe+4]&&!e[pe+5].insertLeft;)O=e[(pe+=3)+2],q="right";break}return{node:O,start:N,end:X,collapse:q,coverStart:re,coverEnd:se}}function hn(e,r){var D=Ft;if(r=="left")for(var O=0;O<e.length&&!((D=e[O]).left!=D.right);O++);else for(var N=e.length-1;N>=0&&!((D=e[N]).left!=D.right);N--);return D}function Rn(e,r,D,O){var N=rn(r.map,D,O),X=N.node,q=N.start,re=N.end,se=N.collapse,pe;if(X.nodeType==3){for(var Ve=0;Ve<4;Ve++){for(;q&&we(r.line.text.charAt(N.coverStart+q));)--q;for(;N.coverStart+re<N.coverEnd&&we(r.line.text.charAt(N.coverStart+re));)++re;if(P&&m<9&&q==0&&re==N.coverEnd-N.coverStart?pe=X.parentNode.getBoundingClientRect():pe=hn(E(X,q,re).getClientRects(),O),pe.left||pe.right||q==0)break;re=q,q=q-1,se="right"}P&&m<11&&(pe=Kn(e.display.measure,pe))}else{q>0&&(se=O="right");var nt;e.options.lineWrapping&&(nt=X.getClientRects()).length>1?pe=nt[O=="right"?nt.length-1:0]:pe=X.getBoundingClientRect()}if(P&&m<9&&!q&&(!pe||!pe.left&&!pe.right)){var Dt=X.parentNode.getClientRects()[0];Dt?pe={left:Dt.left,right:Dt.left+Nr(e.display),top:Dt.top,bottom:Dt.bottom}:pe=Ft}for(var Tt=pe.top-r.rect.top,an=pe.bottom-r.rect.top,yn=(Tt+an)/2,Ln=r.view.measure.heights,jn=0;jn<Ln.length-1&&!(yn<Ln[jn]);jn++);var Xn=jn?Ln[jn-1]:0,Un=Ln[jn],er={left:(se=="right"?pe.right:pe.left)-r.rect.left,right:(se=="left"?pe.left:pe.right)-r.rect.left,top:Xn,bottom:Un};return!pe.left&&!pe.right&&(er.bogus=!0),e.options.singleCursorHeightPerLine||(er.rtop=Tt,er.rbottom=an),er}function Kn(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return r;var D=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*D,right:r.right*D,top:r.top*O,bottom:r.bottom*O}}function cr(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 on(e){e.display.externalMeasure=null,h(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)cr(e.display.view[r])}function jt(e){on(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Jt(){return o&&s?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function In(){return o&&s?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function _n(e){var r=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(r+=ca(e.widgets[D]));return r}function yr(e,r,D,O,N){if(!N){var X=_n(r);D.top+=X,D.bottom+=X}if(O=="line")return D;O||(O="local");var q=Gt(r);if(O=="local"?q+=wa(e.display):q-=e.display.viewOffset,O=="page"||O=="window"){var re=e.display.lineSpace.getBoundingClientRect();q+=re.top+(O=="window"?0:In());var se=re.left+(O=="window"?0:Jt());D.left+=se,D.right+=se}return D.top+=q,D.bottom+=q,D}function qn(e,r,D){if(D=="div")return r;var O=r.left,N=r.top;if(D=="page")O-=Jt(),N-=In();else if(D=="local"||!D){var X=e.display.sizer.getBoundingClientRect();O+=X.left,N+=X.top}var q=e.display.lineSpace.getBoundingClientRect();return{left:O-q.left,top:N-q.top}}function Cr(e,r,D,O,N){return O||(O=En(e.doc,r.line)),yr(e,O,Ye(e,O,r.ch,N),D)}function ir(e,r,D,O,N,X){O=O||En(e.doc,r.line),N||(N=Ke(e,O));function q(an,yn){var Ln=_t(e,N,an,yn?"right":"left",X);return yn?Ln.left=Ln.right:Ln.right=Ln.left,yr(e,O,Ln,D)}var re=qt(O,e.doc.direction),se=r.ch,pe=r.sticky;if(se>=O.text.length?(se=O.text.length,pe="before"):se<=0&&(se=0,pe="after"),!re)return q(pe=="before"?se-1:se,pe=="before");function Ve(an,yn,Ln){var jn=re[yn],Xn=jn.level==1;return q(Ln?an-1:an,Xn!=Ln)}var nt=We(re,se,pe),Dt=Ut,Tt=Ve(se,nt,pe=="before");return Dt!=null&&(Tt.other=Ve(se,Dt,pe!="before")),Tt}function mn(e,r){var D=0;r=W(e.doc,r),e.options.lineWrapping||(D=Nr(e.display)*r.ch);var O=En(e.doc,r.line),N=Gt(O)+wa(e.display);return{left:D,right:D,top:N,bottom:N+O.height}}function Mn(e,r,D,O,N){var X=fn(e,r,D);return X.xRel=N,O&&(X.outside=O),X}function vr(e,r,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return Mn(O.first,0,null,-1,-1);var N=Rr(O,D),X=O.first+O.size-1;if(N>X)return Mn(O.first+O.size-1,En(O,X).text.length,null,1,1);r<0&&(r=0);for(var q=En(O,N);;){var re=$r(e,q,N,r,D),se=Xt(q,re.ch+(re.xRel>0||re.outside>0?1:0));if(!se)return re;var pe=se.find(1);if(pe.line==N)return pe;q=En(O,N=pe.line)}}function Or(e,r,D,O){O-=_n(r);var N=r.text.length,X=ct(function(q){return _t(e,D,q-1).bottom<=O},N,0);return N=ct(function(q){return _t(e,D,q).top>O},X,N),{begin:X,end:N}}function Qn(e,r,D,O){D||(D=Ke(e,r));var N=yr(e,r,_t(e,D,O),"line").top;return Or(e,r,D,N)}function Pr(e,r,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>r}function $r(e,r,D,O,N){N-=Gt(r);var X=Ke(e,r),q=_n(r),re=0,se=r.text.length,pe=!0,Ve=qt(r,e.doc.direction);if(Ve){var nt=(e.options.lineWrapping?Br:Ir)(e,r,D,X,Ve,O,N);pe=nt.level!=1,re=pe?nt.from:nt.to-1,se=pe?nt.to:nt.from-1}var Dt=null,Tt=null,an=ct(function(br){var mr=_t(e,X,br);return mr.top+=q,mr.bottom+=q,Pr(mr,O,N,!1)?(mr.top<=N&&mr.left<=O&&(Dt=br,Tt=mr),!0):!1},re,se),yn,Ln,jn=!1;if(Tt){var Xn=O-Tt.left<Tt.right-O,Un=Xn==pe;an=Dt+(Un?0:1),Ln=Un?"after":"before",yn=Xn?Tt.left:Tt.right}else{!pe&&(an==se||an==re)&&an++,Ln=an==0?"after":an==r.text.length?"before":_t(e,X,an-(pe?1:0)).bottom+q<=N==pe?"after":"before";var er=ir(e,fn(D,an,Ln),"line",r,X);yn=er.left,jn=N<er.top?-1:N>=er.bottom?1:0}return an=$e(r.text,an,1),Mn(D,an,Ln,jn,O-yn)}function Ir(e,r,D,O,N,X,q){var re=ct(function(nt){var Dt=N[nt],Tt=Dt.level!=1;return Pr(ir(e,fn(D,Tt?Dt.to:Dt.from,Tt?"before":"after"),"line",r,O),X,q,!0)},0,N.length-1),se=N[re];if(re>0){var pe=se.level!=1,Ve=ir(e,fn(D,pe?se.from:se.to,pe?"after":"before"),"line",r,O);Pr(Ve,X,q,!0)&&Ve.top>q&&(se=N[re-1])}return se}function Br(e,r,D,O,N,X,q){var re=Or(e,r,O,q),se=re.begin,pe=re.end;/\s/.test(r.text.charAt(pe-1))&&pe--;for(var Ve=null,nt=null,Dt=0;Dt<N.length;Dt++){var Tt=N[Dt];if(Tt.from>=pe||Tt.to<=se)continue;var an=Tt.level!=1,yn=_t(e,O,an?Math.min(pe,Tt.to)-1:Math.max(se,Tt.from)).right,Ln=yn<X?X-yn+1e9:yn-X;(!Ve||nt>Ln)&&(Ve=Tt,nt=Ln)}return Ve||(Ve=N[N.length-1]),Ve.from<se&&(Ve={from:se,to:Ve.to,level:Ve.level}),Ve.to>pe&&(Ve={from:Ve.from,to:pe,level:Ve.level}),Ve}var Ur;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ur==null){Ur=v("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Ur.appendChild(document.createTextNode("x")),Ur.appendChild(v("br"));Ur.appendChild(document.createTextNode("x"))}p(e.measure,Ur);var D=Ur.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),h(e.measure),D||1}function Nr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=v("span","xxxxxxxxxx"),D=v("pre",[r],"CodeMirror-line-like");p(e.measure,D);var O=r.getBoundingClientRect(),N=(O.right-O.left)/10;return N>2&&(e.cachedCharWidth=N),N||10}function pr(e){for(var r=e.display,D={},O={},N=r.gutters.clientLeft,X=r.gutters.firstChild,q=0;X;X=X.nextSibling,++q){var re=e.display.gutterSpecs[q].className;D[re]=X.offsetLeft+X.clientLeft+N,O[re]=X.clientWidth}return{fixedPos:la(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:r.wrapper.clientWidth}}function la(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Qa(e){var r=jr(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(N){if(bn(e.doc,N))return 0;var X=0;if(N.widgets)for(var q=0;q<N.widgets.length;q++)N.widgets[q].height&&(X+=N.widgets[q].height);return D?X+(Math.ceil(N.text.length/O)||1)*r:X+r}}function ja(e){var r=e.doc,D=Qa(e);r.iter(function(O){var N=D(O);N!=O.height&&rr(O,N)})}function Ca(e,r,D,O){var N=e.display;if(!D&&Se(r).getAttribute("cm-not-content")=="true")return null;var X,q,re=N.lineSpace.getBoundingClientRect();try{X=r.clientX-re.left,q=r.clientY-re.top}catch(nt){return null}var se=vr(e,X,q),pe;if(O&&se.xRel>0&&(pe=En(e.doc,se.line).text).length==se.ch){var Ve=V(pe,pe.length,e.options.tabSize)-pe.length;se=fn(se.line,Math.max(0,Math.round((X-tt(e.display).left)/Nr(e.display))-Ve))}return se}function qr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var D=e.display.view,O=0;O<D.length;O++)if(r-=D[O].size,r<0)return O}function Vr(e,r,D,O){r==null&&(r=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),O||(O=0);var N=e.display;if(O&&D<N.viewTo&&(N.updateLineNumbers==null||N.updateLineNumbers>r)&&(N.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=N.viewTo)kn&&en(e.doc,r)<N.viewTo&&ea(e);else if(D<=N.viewFrom)kn&&Bt(e.doc,D+O)>N.viewFrom?ea(e):(N.viewFrom+=O,N.viewTo+=O);else if(r<=N.viewFrom&&D>=N.viewTo)ea(e);else if(r<=N.viewFrom){var X=Ua(e,D,D+O,1);X?(N.view=N.view.slice(X.index),N.viewFrom=X.lineN,N.viewTo+=O):ea(e)}else if(D>=N.viewTo){var q=Ua(e,r,r,-1);q?(N.view=N.view.slice(0,q.index),N.viewTo=q.lineN):ea(e)}else{var re=Ua(e,r,r,-1),se=Ua(e,D,D+O,1);re&&se?(N.view=N.view.slice(0,re.index).concat(fr(e,re.lineN,se.lineN)).concat(N.view.slice(se.index)),N.viewTo+=O):ea(e)}var pe=N.externalMeasured;pe&&(D<pe.lineN?pe.lineN+=O:r<pe.lineN+pe.size&&(N.externalMeasured=null))}function Xr(e,r,D){e.curOp.viewChanged=!0;var O=e.display,N=e.display.externalMeasured;if(N&&r>=N.lineN&&r<N.lineN+N.size&&(O.externalMeasured=null),r<O.viewFrom||r>=O.viewTo)return;var X=O.view[qr(e,r)];if(X.node==null)return;var q=X.changes||(X.changes=[]);$(q,D)==-1&&q.push(D)}function ea(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ua(e,r,D,O){var N=qr(e,r),X,q=e.display.view;if(!kn||D==e.doc.first+e.doc.size)return{index:N,lineN:D};for(var re=e.display.viewFrom,se=0;se<N;se++)re+=q[se].size;if(re!=r){if(O>0){if(N==q.length-1)return null;X=re+q[N].size-r,N++}else X=re-r;r+=X,D+=X}for(;en(e.doc,D)!=D;){if(N==(O<0?0:q.length-1))return null;D+=O*q[N-(O<0?1:0)].size,N+=O}return{index:N,lineN:D}}function hi(e,r,D){var O=e.display,N=O.view;N.length==0||r>=O.viewTo||D<=O.viewFrom?(O.view=fr(e,r,D),O.viewFrom=r):(O.viewFrom>r?O.view=fr(e,r,O.viewFrom).concat(O.view):O.viewFrom<r&&(O.view=O.view.slice(qr(e,r))),O.viewFrom=r,O.viewTo<D?O.view=O.view.concat(fr(e,O.viewTo,D)):O.viewTo>D&&(O.view=O.view.slice(0,qr(e,D)))),O.viewTo=D}function si(e){for(var r=e.display.view,D=0,O=0;O<r.length;O++){var N=r[O];!N.hidden&&(!N.node||N.changes)&&++D}return D}function Yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ja(e,r){r===void 0&&(r=!0);for(var D=e.doc,O={},N=O.cursors=document.createDocumentFragment(),X=O.selection=document.createDocumentFragment(),q=0;q<D.sel.ranges.length;q++){if(!r&&q==D.sel.primIndex)continue;var re=D.sel.ranges[q];if(re.from().line>=e.display.viewTo||re.to().line<e.display.viewFrom)continue;var se=re.empty();(se||e.options.showCursorWhenSelecting)&&Za(e,re.head,N),se||zr(e,re,X)}return O}function Za(e,r,D){var O=ir(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),N=D.appendChild(v("div","\xA0","CodeMirror-cursor"));if(N.style.left=O.left+"px",N.style.top=O.top+"px",N.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var X=D.appendChild(v("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));X.style.display="",X.style.left=O.other.left+"px",X.style.top=O.other.top+"px",X.style.height=(O.other.bottom-O.other.top)*.85+"px"}}function Qr(e,r){return e.top-r.top||e.left-r.left}function zr(e,r,D){var O=e.display,N=e.doc,X=document.createDocumentFragment(),q=tt(e.display),re=q.left,se=Math.max(O.sizerWidth,je(e)-O.sizer.offsetLeft)-q.right,pe=N.direction=="ltr";function Ve(Un,er,br,mr){er<0&&(er=0),er=Math.round(er),mr=Math.round(mr),X.appendChild(v("div",null,"CodeMirror-selected","position: absolute; left: "+Un+`px;
top: `+er+"px; width: "+(br==null?se-Un:br)+`px;
height: `+(mr-er)+"px"))}function nt(Un,er,br){var mr=En(N,Un),kr=mr.text.length,ia,Ba;function va(Ma,ni){return Cr(e,fn(Un,Ma),"div",mr,ni)}function oi(Ma,ni,Ka){var ka=Qn(e,mr,null,Ma),La=ni=="ltr"==(Ka=="after")?"left":"right",Ea=Ka=="after"?ka.begin:ka.end-(/\s/.test(mr.text.charAt(ka.end-1))?2:1);return va(Ea,La)[La]}var ti=qt(mr,N.direction);return yt(ti,er||0,br==null?kr:br,function(Ma,ni,Ka,ka){var La=Ka=="ltr",Ea=va(Ma,La?"left":"right"),ri=va(ni-1,La?"right":"left"),So=er==null&&Ma==0,to=br==null&&ni==kr,Va=ka==0,Li=!ti||ka==ti.length-1;if(ri.top-Ea.top<=3){var Ha=(pe?So:to)&&Va,ms=(pe?to:So)&&Li,Ki=Ha?re:(La?Ea:ri).left,lo=ms?se:(La?ri:Ea).right;Ve(Ki,Ea.top,lo-Ki,Ea.bottom)}else{var uo,$a,Oo,gs;La?(uo=pe&&So&&Va?re:Ea.left,$a=pe?se:oi(Ma,Ka,"before"),Oo=pe?re:oi(ni,Ka,"after"),gs=pe&&to&&Li?se:ri.right):(uo=pe?oi(Ma,Ka,"before"):re,$a=!pe&&So&&Va?se:Ea.right,Oo=!pe&&to&&Li?re:ri.left,gs=pe?oi(ni,Ka,"after"):se),Ve(uo,Ea.top,$a-uo,Ea.bottom),Ea.bottom<ri.top&&Ve(re,Ea.bottom,null,ri.top),Ve(Oo,ri.top,gs-Oo,ri.bottom)}(!ia||Qr(Ea,ia)<0)&&(ia=Ea),Qr(ri,ia)<0&&(ia=ri),(!Ba||Qr(Ea,Ba)<0)&&(Ba=Ea),Qr(ri,Ba)<0&&(Ba=ri)}),{start:ia,end:Ba}}var Dt=r.from(),Tt=r.to();if(Dt.line==Tt.line)nt(Dt.line,Dt.ch,Tt.ch);else{var an=En(N,Dt.line),yn=En(N,Tt.line),Ln=St(an)==St(yn),jn=nt(Dt.line,Dt.ch,Ln?an.text.length+1:null).end,Xn=nt(Tt.line,Ln?0:null,Tt.ch).start;Ln&&(jn.top<Xn.top-2?(Ve(jn.right,jn.top,null,jn.bottom),Ve(re,Xn.top,Xn.left,Xn.bottom)):Ve(jn.right,jn.top,Xn.left-jn.right,jn.bottom)),jn.bottom<Xn.top&&Ve(re,jn.bottom,null,Xn.top)}D.appendChild(X)}function ba(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var D=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Ci(e),r.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Pi(e){e.state.focused||(e.display.input.focus(),li(e))}function no(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ci(e))},100)}function li(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,U(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()),ba(e)}function Ci(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,r),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ti(e){for(var r=e.display,D=r.lineDiv.offsetTop,O=0;O<r.view.length;O++){var N=r.view[O],X=e.options.lineWrapping,q=void 0,re=0;if(N.hidden)continue;if(P&&m<8){var se=N.node.offsetTop+N.node.offsetHeight;q=se-D,D=se}else{var pe=N.node.getBoundingClientRect();q=pe.bottom-pe.top,!X&&N.text.firstChild&&(re=N.text.firstChild.getBoundingClientRect().right-pe.left-1)}var Ve=N.line.height-q;if((Ve>.005||Ve<-.005)&&(rr(N.line,q),Si(N.line),N.rest))for(var nt=0;nt<N.rest.length;nt++)Si(N.rest[nt]);if(re>e.display.sizerWidth){var Dt=Math.ceil(re/Nr(e.display));Dt>e.display.maxLineLength&&(e.display.maxLineLength=Dt,e.display.maxLine=N.line,e.display.maxLineChanged=!0)}}}function Si(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var D=e.widgets[r],O=D.node.parentNode;O&&(D.height=O.offsetHeight)}}function Ii(e,r,D){var O=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;O=Math.floor(O-wa(e));var N=D&&D.bottom!=null?D.bottom:O+e.wrapper.clientHeight,X=Rr(r,O),q=Rr(r,N);if(D&&D.ensure){var re=D.ensure.from.line,se=D.ensure.to.line;re<X?(X=re,q=Rr(r,Gt(En(r,re))+e.wrapper.clientHeight)):Math.min(se,r.lastLine())>=q&&(X=Rr(r,Gt(En(r,se))-e.wrapper.clientHeight),q=se)}return{from:X,to:Math.max(q,X+1)}}function co(e,r){if(dt(e,"scrollCursorIntoView"))return;var D=e.display,O=D.sizer.getBoundingClientRect(),N=null;if(r.top+O.top<0?N=!0:r.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(N=!1),N!=null&&!i){var X=v("div","\u200B",null,`position: absolute;
top: `+(r.top-D.viewOffset-wa(e.display))+`px;
height: `+(r.bottom-r.top+at(e)+D.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(X),X.scrollIntoView(N),e.display.lineSpace.removeChild(X)}}function Ro(e,r,D,O){O==null&&(O=0);var N;!e.options.lineWrapping&&r==D&&(r=r.ch?fn(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,D=r.sticky=="before"?fn(r.line,r.ch+1,"before"):r);for(var X=0;X<5;X++){var q=!1,re=ir(e,r),se=!D||D==r?re:ir(e,D);N={left:Math.min(re.left,se.left),top:Math.min(re.top,se.top)-O,right:Math.max(re.left,se.left),bottom:Math.max(re.bottom,se.bottom)+O};var pe=Oi(e,N),Ve=e.doc.scrollTop,nt=e.doc.scrollLeft;if(pe.scrollTop!=null&&(Di(e,pe.scrollTop),Math.abs(e.doc.scrollTop-Ve)>1&&(q=!0)),pe.scrollLeft!=null&&(Ia(e,pe.scrollLeft),Math.abs(e.doc.scrollLeft-nt)>1&&(q=!0)),!q)break}return N}function Gi(e,r){var D=Oi(e,r);D.scrollTop!=null&&Di(e,D.scrollTop),D.scrollLeft!=null&&Ia(e,D.scrollLeft)}function Oi(e,r){var D=e.display,O=jr(e.display);r.top<0&&(r.top=0);var N=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,X=ce(e),q={};r.bottom-r.top>X&&(r.bottom=r.top+X);var re=e.doc.height+De(D),se=r.top<O,pe=r.bottom>re-O;if(r.top<N)q.scrollTop=se?0:r.top;else if(r.bottom>N+X){var Ve=Math.min(r.top,(pe?re:r.bottom)-X);Ve!=N&&(q.scrollTop=Ve)}var nt=e.options.fixedGutter?0:D.gutters.offsetWidth,Dt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-nt,Tt=je(e)-D.gutters.offsetWidth,an=r.right-r.left>Tt;return an&&(r.right=r.left+Tt),r.left<10?q.scrollLeft=0:r.left<Dt?q.scrollLeft=Math.max(0,r.left+nt-(an?0:10)):r.right>Tt+Dt-3&&(q.scrollLeft=r.right+(an?0:10)-Tt),q}function Vi(e,r){if(r==null)return;Yi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function yi(e){Yi(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ri(e,r,D){(r!=null||D!=null)&&Yi(e),r!=null&&(e.curOp.scrollLeft=r),D!=null&&(e.curOp.scrollTop=D)}function ho(e,r){Yi(e),e.curOp.scrollToPos=r}function Yi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var D=mn(e,r.from),O=mn(e,r.to);Ai(e,D,O,r.margin)}}function Ai(e,r,D,O){var N=Oi(e,{left:Math.min(r.left,D.left),top:Math.min(r.top,D.top)-O,right:Math.max(r.right,D.right),bottom:Math.max(r.bottom,D.bottom)+O});Ri(e,N.scrollLeft,N.scrollTop)}function Di(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;I||ji(e,{top:r}),bi(e,r,!0),I&&ji(e),Ni(e,100)}function bi(e,r,D){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!D)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function Ia(e,r,D,O){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!O)return;e.doc.scrollLeft=r,Dr(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function fi(e){var r=e.display,D=r.gutters.offsetWidth,O=Math.round(e.doc.height+De(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?D:0,docHeight:O,scrollHeight:O+at(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:D}}var pi=function(e,r,D){this.cm=D;var O=this.vert=v("div",[v("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),N=this.horiz=v("div",[v("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=N.tabIndex=-1,e(O),e(N),Ae(O,"scroll",function(){O.clientHeight&&r(O.scrollTop,"vertical")}),Ae(N,"scroll",function(){N.clientWidth&&r(N.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,P&&m<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=r?O+"px":"0";var N=e.viewHeight-(r?O:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+N)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=D?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var X=e.viewWidth-e.barLeft-(D?O:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+X)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(O==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?O:0,bottom:r?O:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=l&&!a?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new K,this.disableVert=new K},pi.prototype.enableZeroWidthBar=function(e,r,D){e.style.pointerEvents="auto";function O(){var N=e.getBoundingClientRect(),X=D=="vert"?document.elementFromPoint(N.right-1,(N.top+N.bottom)/2):document.elementFromPoint((N.right+N.left)/2,N.bottom-1);X!=e?e.style.pointerEvents="none":r.set(1e3,O)}r.set(1e3,O)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _i=function(){};_i.prototype.update=function(){return{bottom:0,right:0}},_i.prototype.setScrollLeft=function(){},_i.prototype.setScrollTop=function(){},_i.prototype.clear=function(){};function mi(e,r){r||(r=fi(e));var D=e.display.barWidth,O=e.display.barHeight;Xi(e,r);for(var N=0;N<4&&D!=e.display.barWidth||O!=e.display.barHeight;N++)D!=e.display.barWidth&&e.options.lineWrapping&&Ti(e),Xi(e,fi(e)),D=e.display.barWidth,O=e.display.barHeight}function Xi(e,r){var D=e.display,O=D.scrollbars.update(r);D.sizer.style.paddingRight=(D.barWidth=O.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=O.bottom)+"px",D.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=O.bottom+"px",D.scrollbarFiller.style.width=O.right+"px"):D.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=O.bottom+"px",D.gutterFiller.style.width=r.gutterWidth+"px"):D.gutterFiller.style.display=""}var $i={native:pi,null:_i};function Qi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $i[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Ae(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,D){D=="horizontal"?Ia(e,r):Di(e,r)},e),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)}var ki=0;function ui(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:++ki},Lr(e.curOp)}function Ei(e){var r=e.curOp;r&&Hn(r,function(D){for(var O=0;O<D.ops.length;O++)D.ops[O].cm.curOp=null;ro(D)})}function ro(e){for(var r=e.ops,D=0;D<r.length;D++)Ao(r[D]);for(var O=0;O<r.length;O++)Do(r[O]);for(var N=0;N<r.length;N++)fo(r[N]);for(var X=0;X<r.length;X++)ao(r[X]);for(var q=0;q<r.length;q++)po(r[q])}function Ao(e){var r=e.cm,D=r.display;io(r),e.updateMaxLine&&Ht(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<D.viewFrom||e.scrollToPos.to.line>=D.viewTo)||D.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new qa(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Do(e){e.updatedDisplay=e.mustUpdate&&xi(e.cm,e.update)}function fo(e){var r=e.cm,D=r.display;e.updatedDisplay&&Ti(r),e.barMeasure=fi(r),D.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ye(r,D.maxLine,D.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+at(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-je(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function ao(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&Ia(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var D=e.focus&&e.focus==j();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=r.doc.height)&&mi(r,e.barMeasure),e.updatedDisplay&&Hr(r,e.barMeasure),e.selectionChanged&&ba(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),D&&Pi(e.cm)}function po(e){var r=e.cm,D=r.display,O=r.doc;if(e.updatedDisplay&&Ji(r,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&bi(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ia(r,e.scrollLeft,!0,!0),e.scrollToPos){var N=Ro(r,W(O,e.scrollToPos.from),W(O,e.scrollToPos.to),e.scrollToPos.margin);co(r,N)}var X=e.maybeHiddenMarkers,q=e.maybeUnhiddenMarkers;if(X)for(var re=0;re<X.length;++re)X[re].lines.length||Ze(X[re],"hide");if(q)for(var se=0;se<q.length;++se)q[se].lines.length&&Ze(q[se],"unhide");D.wrapper.offsetHeight&&(O.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Wa(e,r){if(e.curOp)return r();ui(e);try{return r()}finally{Ei(e)}}function ha(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ui(e);try{return r.apply(e,arguments)}finally{Ei(e)}}}function Aa(e){return function(){if(this.curOp)return e.apply(this,arguments);ui(this);try{return e.apply(this,arguments)}finally{Ei(this)}}}function fa(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ui(r);try{return e.apply(this,arguments)}finally{Ei(r)}}}function Ni(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,H(mo,e))}function mo(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var D=+new Date+e.options.workTime,O=An(e,r.highlightFrontier),N=[];r.iter(O.line,Math.min(r.first+r.size,e.display.viewTo+500),function(X){if(O.line>=e.display.viewFrom){var q=X.styles,re=X.text.length>e.options.maxHighlightLength?ln(r.mode,O.state):null,se=qe(e,X,O,!0);re&&(O.state=re),X.styles=se.styles;var pe=X.styleClasses,Ve=se.classes;Ve?X.styleClasses=Ve:pe&&(X.styleClasses=null);for(var nt=!q||q.length!=X.styles.length||pe!=Ve&&(!pe||!Ve||pe.bgClass!=Ve.bgClass||pe.textClass!=Ve.textClass),Dt=0;!nt&&Dt<q.length;++Dt)nt=q[Dt]!=X.styles[Dt];nt&&N.push(O.line),X.stateAfter=O.save(),O.nextLine()}else X.text.length<=e.options.maxHighlightLength&&Vn(e,X.text,O),X.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>D)return Ni(e,e.options.workDelay),!0}),r.highlightFrontier=O.line,r.modeFrontier=Math.max(r.modeFrontier,O.line),N.length&&Wa(e,function(){for(var X=0;X<N.length;X++)Xr(e,N[X],"text")})}var qa=function(e,r,D){var O=e.display;this.viewport=r,this.visible=Ii(O,e.doc,r),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=je(e),this.force=D,this.dims=pr(e),this.events=[]};qa.prototype.signal=function(e,r){Te(e,r)&&this.events.push(arguments)},qa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function io(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=at(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=at(e)+"px",r.scrollbarsClipped=!0)}function oo(e){if(e.hasFocus())return null;var r=j();if(!r||!g(e.display.lineDiv,r))return null;var D={activeElt:r};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&g(e.display.lineDiv,O.anchorNode)&&(D.anchorNode=O.anchorNode,D.anchorOffset=O.anchorOffset,D.focusNode=O.focusNode,D.focusOffset=O.focusOffset)}return D}function so(e){if(!e||!e.activeElt||e.activeElt==j())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(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),r.removeAllRanges(),r.addRange(D),r.extend(e.focusNode,e.focusOffset)}}function xi(e,r){var D=e.display,O=e.doc;if(r.editorIsHidden)return ea(e),!1;if(!r.force&&r.visible.from>=D.viewFrom&&r.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&si(e)==0)return!1;oa(e)&&(ea(e),r.dims=pr(e));var N=O.first+O.size,X=Math.max(r.visible.from-e.options.viewportMargin,O.first),q=Math.min(N,r.visible.to+e.options.viewportMargin);D.viewFrom<X&&X-D.viewFrom<20&&(X=Math.max(O.first,D.viewFrom)),D.viewTo>q&&D.viewTo-q<20&&(q=Math.min(N,D.viewTo)),kn&&(X=en(e.doc,X),q=Bt(e.doc,q));var re=X!=D.viewFrom||q!=D.viewTo||D.lastWrapHeight!=r.wrapperHeight||D.lastWrapWidth!=r.wrapperWidth;hi(e,X,q),D.viewOffset=Gt(En(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var se=si(e);if(!re&&se==0&&!r.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var pe=oo(e);return se>4&&(D.lineDiv.style.display="none"),go(e,D.updateLineNumbers,r.dims),se>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,so(pe),h(D.cursorDiv),h(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,re&&(D.lastWrapHeight=r.wrapperHeight,D.lastWrapWidth=r.wrapperWidth,Ni(e,400)),D.updateLineNumbers=null,!0}function Ji(e,r){for(var D=r.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||r.oldDisplayWidth==je(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+De(e.display)-ce(e),D.top)}),r.visible=Ii(e.display,e.doc,D),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else O&&(r.visible=Ii(e.display,e.doc,D));if(!xi(e,r))break;Ti(e);var N=fi(e);Yr(e),mi(e,N),Hr(e,N),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 ji(e,r){var D=new qa(e,r);if(xi(e,D)){Ti(e),Ji(e,D);var O=fi(e);Yr(e),mi(e,O),Hr(e,O),D.finish()}}function go(e,r,D){var O=e.display,N=e.options.lineNumbers,X=O.lineDiv,q=X.firstChild;function re(an){var yn=an.nextSibling;return t&&l&&e.display.currentWheelTarget==an?an.style.display="none":an.parentNode.removeChild(an),yn}for(var se=O.view,pe=O.viewFrom,Ve=0;Ve<se.length;Ve++){var nt=se[Ve];if(!nt.hidden)if(!nt.node||nt.node.parentNode!=X){var Dt=ga(e,nt,pe,D);X.insertBefore(Dt,q)}else{for(;q!=nt.node;)q=re(q);var Tt=N&&r!=null&&r<=pe&&nt.lineNumber;nt.changes&&($(nt.changes,"gutter")>-1&&(Tt=!1),Wr(e,nt,pe,D)),Tt&&(h(nt.lineNumber),nt.lineNumber.appendChild(document.createTextNode(ra(e.options,pe)))),q=nt.node.nextSibling}pe+=nt.size}for(;q;)q=re(q)}function Zi(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Hr(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+at(e)+"px"}function Dr(e){var r=e.display,D=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var O=la(r)-r.scroller.scrollLeft+e.doc.scrollLeft,N=r.gutters.offsetWidth,X=O+"px",q=0;q<D.length;q++)if(!D[q].hidden){e.options.fixedGutter&&(D[q].gutter&&(D[q].gutter.style.left=X),D[q].gutterBackground&&(D[q].gutterBackground.style.left=X));var re=D[q].alignable;if(re)for(var se=0;se<re.length;se++)re[se].style.left=X}e.options.fixedGutter&&(r.gutters.style.left=O+N+"px")}function oa(e){if(!e.options.lineNumbers)return!1;var r=e.doc,D=ra(e.options,r.first+r.size-1),O=e.display;if(D.length!=O.lineNumChars){var N=O.measure.appendChild(v("div",[v("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),X=N.firstChild.offsetWidth,q=N.offsetWidth-X;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(X,O.lineGutter.offsetWidth-q)+1,O.lineNumWidth=O.lineNumInnerWidth+q,O.lineNumChars=O.lineNumInnerWidth?D.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",Zi(e.display),!0}return!1}function Fa(e,r){for(var D=[],O=!1,N=0;N<e.length;N++){var X=e[N],q=null;if(typeof X!="string"&&(q=X.style,X=X.className),X=="CodeMirror-linenumbers")if(r)O=!0;else continue;D.push({className:X,style:q})}return r&&!O&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function Mi(e){var r=e.gutters,D=e.gutterSpecs;h(r),e.lineGutter=null;for(var O=0;O<D.length;++O){var N=D[O],X=N.className,q=N.style,re=r.appendChild(v("div",null,"CodeMirror-gutter "+X));q&&(re.style.cssText=q),X=="CodeMirror-linenumbers"&&(e.lineGutter=re,re.style.width=(e.lineNumWidth||1)+"px")}r.style.display=D.length?"":"none",Zi(e)}function di(e){Mi(e.display),Vr(e),Dr(e)}function Ui(e,r,D,O){var N=this;this.input=D,N.scrollbarFiller=v("div",null,"CodeMirror-scrollbar-filler"),N.scrollbarFiller.setAttribute("cm-not-content","true"),N.gutterFiller=v("div",null,"CodeMirror-gutter-filler"),N.gutterFiller.setAttribute("cm-not-content","true"),N.lineDiv=_("div",null,"CodeMirror-code"),N.selectionDiv=v("div",null,null,"position: relative; z-index: 1"),N.cursorDiv=v("div",null,"CodeMirror-cursors"),N.measure=v("div",null,"CodeMirror-measure"),N.lineMeasure=v("div",null,"CodeMirror-measure"),N.lineSpace=_("div",[N.measure,N.lineMeasure,N.selectionDiv,N.cursorDiv,N.lineDiv],null,"position: relative; outline: none");var X=_("div",[N.lineSpace],"CodeMirror-lines");N.mover=v("div",[X],null,"position: relative"),N.sizer=v("div",[N.mover],"CodeMirror-sizer"),N.sizerWidth=null,N.heightForcer=v("div",null,null,"position: absolute; height: "+Z+"px; width: 1px;"),N.gutters=v("div",null,"CodeMirror-gutters"),N.lineGutter=null,N.scroller=v("div",[N.sizer,N.heightForcer,N.gutters],"CodeMirror-scroll"),N.scroller.setAttribute("tabIndex","-1"),N.wrapper=v("div",[N.scrollbarFiller,N.gutterFiller,N.scroller],"CodeMirror"),P&&m<8&&(N.gutters.style.zIndex=-1,N.scroller.style.paddingRight=0),!t&&!(I&&n)&&(N.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(N.wrapper):e(N.wrapper)),N.viewFrom=N.viewTo=r.first,N.reportedViewFrom=N.reportedViewTo=r.first,N.view=[],N.renderedView=null,N.externalMeasured=null,N.viewOffset=0,N.lastWrapHeight=N.lastWrapWidth=0,N.updateLineNumbers=null,N.nativeBarWidth=N.barHeight=N.barWidth=0,N.scrollbarsClipped=!1,N.lineNumWidth=N.lineNumInnerWidth=N.lineNumChars=null,N.alignWidgets=!1,N.cachedCharWidth=N.cachedTextHeight=N.cachedPaddingH=null,N.maxLine=null,N.maxLineLength=0,N.maxLineChanged=!1,N.wheelDX=N.wheelDY=N.wheelStartX=N.wheelStartY=null,N.shift=!1,N.selForContextMenu=null,N.activeTouch=null,N.gutterSpecs=Fa(O.gutters,O.lineNumbers),Mi(N),D.init(N)}var ci=0,_a=null;P?_a=-.53:I?_a=15:o?_a=-.7:f&&(_a=-1/3);function Fi(e){var r=e.wheelDeltaX,D=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:r,y:D}}function Bi(e){var r=Fi(e);return r.x*=_a,r.y*=_a,r}function Hi(e,r){var D=Fi(r),O=D.x,N=D.y,X=e.display,q=X.scroller,re=q.scrollWidth>q.clientWidth,se=q.scrollHeight>q.clientHeight;if(!(O&&re||N&&se))return;if(N&&l&&t){e:for(var pe=r.target,Ve=X.view;pe!=q;pe=pe.parentNode)for(var nt=0;nt<Ve.length;nt++)if(Ve[nt].node==pe){e.display.currentWheelTarget=pe;break e}}if(O&&!I&&!u&&_a!=null){N&&se&&Di(e,Math.max(0,q.scrollTop+N*_a)),Ia(e,Math.max(0,q.scrollLeft+O*_a)),(!N||N&&se)&&ae(r),X.wheelStartX=null;return}if(N&&_a!=null){var Dt=N*_a,Tt=e.doc.scrollTop,an=Tt+X.wrapper.clientHeight;Dt<0?Tt=Math.max(0,Tt+Dt-50):an=Math.min(e.doc.height,an+Dt+50),ji(e,{top:Tt,bottom:an})}ci<20&&(X.wheelStartX==null?(X.wheelStartX=q.scrollLeft,X.wheelStartY=q.scrollTop,X.wheelDX=O,X.wheelDY=N,setTimeout(function(){if(X.wheelStartX==null)return;var yn=q.scrollLeft-X.wheelStartX,Ln=q.scrollTop-X.wheelStartY,jn=Ln&&X.wheelDY&&Ln/X.wheelDY||yn&&X.wheelDX&&yn/X.wheelDX;if(X.wheelStartX=X.wheelStartY=null,!jn)return;_a=(_a*ci+jn)/(ci+1),++ci},200)):(X.wheelDX+=O,X.wheelDY+=N))}var za=function(e,r){this.ranges=e,this.primIndex=r};za.prototype.primary=function(){return this.ranges[this.primIndex]},za.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 D=this.ranges[r],O=e.ranges[r];if(!sa(D.anchor,O.anchor)||!sa(D.head,O.head))return!1}return!0},za.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Fr(ya(this.ranges[r].anchor),ya(this.ranges[r].head));return new za(e,this.primIndex)},za.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},za.prototype.contains=function(e,r){r||(r=e);for(var D=0;D<this.ranges.length;D++){var O=this.ranges[D];if(or(r,O.from())>=0&&or(e,O.to())<=0)return D}return-1};var Fr=function(e,r){this.anchor=e,this.head=r};Fr.prototype.from=function(){return na(this.anchor,this.head)},Fr.prototype.to=function(){return Jr(this.anchor,this.head)},Fr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function _r(e,r,D){var O=e&&e.options.selectionsMayTouch,N=r[D];r.sort(function(Dt,Tt){return or(Dt.from(),Tt.from())}),D=$(r,N);for(var X=1;X<r.length;X++){var q=r[X],re=r[X-1],se=or(re.to(),q.from());if(O&&!q.empty()?se>0:se>=0){var pe=na(re.from(),q.from()),Ve=Jr(re.to(),q.to()),nt=re.empty()?q.from()==q.head:re.from()==re.head;X<=D&&--D,r.splice(--X,2,new Fr(nt?Ve:pe,nt?pe:Ve))}}return new za(r,D)}function Fn(e,r){return new za([new Fr(e,r||e)],0)}function lr(e){return e.text?fn(e.from.line+e.text.length-1,Je(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ar(e,r){if(or(e,r.from)<0)return e;if(or(e,r.to)<=0)return lr(r);var D=e.line+r.text.length-(r.to.line-r.from.line)-1,O=e.ch;return e.line==r.to.line&&(O+=lr(r).ch-r.to.ch),fn(D,O)}function aa(e,r){for(var D=[],O=0;O<e.sel.ranges.length;O++){var N=e.sel.ranges[O];D.push(new Fr(Ar(N.anchor,r),Ar(N.head,r)))}return _r(e.cm,D,e.sel.primIndex)}function gi(e,r,D){return e.line==r.line?fn(D.line,e.ch-r.ch+D.ch):fn(D.line+(e.line-r.line),e.ch)}function ii(e,r,D){for(var O=[],N=fn(e.first,0),X=N,q=0;q<r.length;q++){var re=r[q],se=gi(re.from,N,X),pe=gi(lr(re),N,X);if(N=re.to,X=pe,D=="around"){var Ve=e.sel.ranges[q],nt=or(Ve.head,Ve.anchor)<0;O[q]=new Fr(nt?pe:se,nt?se:pe)}else O[q]=new Fr(se,se)}return new za(O,e.sel.primIndex)}function Da(e){e.doc.mode=lt(e.options,e.doc.modeOption),Xa(e)}function Xa(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,Ni(e,100),e.state.modeGen++,e.curOp&&Vr(e)}function vi(e,r){return r.from.ch==0&&r.to.ch==0&&Je(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wi(e,r,D,O){function N(Xn){return D?D[Xn]:null}function X(Xn,Un,er){wn(Xn,Un,er,O),Jn(Xn,"change",Xn,r)}function q(Xn,Un){for(var er=[],br=Xn;br<Un;++br)er.push(new Sn(pe[br],N(br),O));return er}var re=r.from,se=r.to,pe=r.text,Ve=En(e,re.line),nt=En(e,se.line),Dt=Je(pe),Tt=N(pe.length-1),an=se.line-re.line;if(r.full)e.insert(0,q(0,pe.length)),e.remove(pe.length,e.size-pe.length);else if(vi(e,r)){var yn=q(0,pe.length-1);X(nt,nt.text,Tt),an&&e.remove(re.line,an),yn.length&&e.insert(re.line,yn)}else if(Ve==nt)if(pe.length==1)X(Ve,Ve.text.slice(0,re.ch)+Dt+Ve.text.slice(se.ch),Tt);else{var Ln=q(1,pe.length-1);Ln.push(new Sn(Dt+Ve.text.slice(se.ch),Tt,O)),X(Ve,Ve.text.slice(0,re.ch)+pe[0],N(0)),e.insert(re.line+1,Ln)}else if(pe.length==1)X(Ve,Ve.text.slice(0,re.ch)+pe[0]+nt.text.slice(se.ch),N(0)),e.remove(re.line+1,an);else{X(Ve,Ve.text.slice(0,re.ch)+pe[0],N(0)),X(nt,Dt+nt.text.slice(se.ch),Tt);var jn=q(1,pe.length-1);an>1&&e.remove(re.line+1,an-1),e.insert(re.line+1,jn)}Jn(e,"change",e,r)}function Ta(e,r,D){function O(N,X,q){if(N.linked)for(var re=0;re<N.linked.length;++re){var se=N.linked[re];if(se.doc==X)continue;var pe=q&&se.sharedHist;if(D&&!pe)continue;r(se.doc,pe),O(se.doc,N,pe)}}O(e,null,!0)}function vs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,ja(e),Da(e),ys(e),e.options.lineWrapping||Ht(e),e.options.mode=r.modeOption,Vr(e)}function ys(e){(e.doc.direction=="rtl"?U:y)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Wa(e,function(){ys(e),Vr(e)})}function Ko(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 rs(e,r){var D={from:ya(r.from),to:lr(r),text:xr(e,r.from,r.to)};return Es(e,D,r.from.line,r.to.line+1),Ta(e,function(O){return Es(O,D,r.from.line,r.to.line+1)},!0),D}function bs(e){for(;e.length;){var r=Je(e);if(r.ranges)e.pop();else break}}function pl(e,r){if(r)return bs(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 _s(e,r,D,O){var N=e.history;N.undone.length=0;var X=+new Date,q,re;if((N.lastOp==O||N.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&N.lastModTime>X-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(q=pl(N,N.lastOp==O)))re=Je(q.changes),or(r.from,r.to)==0&&or(r.from,re.to)==0?re.to=lr(r):q.changes.push(rs(e,r));else{var se=Je(N.done);for((!se||!se.ranges)&&Go(e.sel,N.done),q={changes:[rs(e,r)],generation:N.generation},N.done.push(q);N.done.length>N.undoDepth;)N.done.shift(),N.done[0].ranges||N.done.shift()}N.done.push(D),N.generation=++N.maxGeneration,N.lastModTime=N.lastSelTime=X,N.lastOp=N.lastSelOp=O,N.lastOrigin=N.lastSelOrigin=r.origin,re||Ze(e,"historyAdded")}function ml(e,r,D,O){var N=r.charAt(0);return N=="*"||N=="+"&&D.ranges.length==O.ranges.length&&D.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,D,O){var N=e.history,X=O&&O.origin;D==N.lastSelOp||X&&N.lastSelOrigin==X&&(N.lastModTime==N.lastSelTime&&N.lastOrigin==X||ml(e,X,Je(N.done),r))?N.done[N.done.length-1]=r:Go(r,N.done),N.lastSelTime=+new Date,N.lastSelOrigin=X,N.lastSelOp=D,O&&O.clearRedo!==!1&&bs(N.undone)}function Go(e,r){var D=Je(r);D&&D.ranges&&D.equals(e)||r.push(e)}function Es(e,r,D,O){var N=r["spans_"+e.id],X=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,O),function(q){q.markedSpans&&((N||(N=r["spans_"+e.id]={}))[X]=q.markedSpans),++X})}function vl(e){if(!e)return null;for(var r,D=0;D<e.length;++D)e[D].marker.explicitlyCleared?r||(r=e.slice(0,D)):r&&r.push(e[D]);return r?r.length?r:null:e}function yl(e,r){var D=r["spans_"+e.id];if(!D)return null;for(var O=[],N=0;N<r.text.length;++N)O.push(vl(D[N]));return O}function xs(e,r){var D=yl(e,r),O=hr(e,r);if(!D)return O;if(!O)return D;for(var N=0;N<D.length;++N){var X=D[N],q=O[N];if(X&&q){e:for(var re=0;re<q.length;++re){for(var se=q[re],pe=0;pe<X.length;++pe)if(X[pe].marker==se.marker)continue e;X.push(se)}}else q&&(D[N]=q)}return D}function vo(e,r,D){for(var O=[],N=0;N<e.length;++N){var X=e[N];if(X.ranges){O.push(D?za.prototype.deepCopy.call(X):X);continue}var q=X.changes,re=[];O.push({changes:re});for(var se=0;se<q.length;++se){var pe=q[se],Ve=void 0;if(re.push({from:pe.from,to:pe.to,text:pe.text}),r)for(var nt in pe)(Ve=nt.match(/^spans_(\d+)$/))&&($(r,Number(Ve[1]))>-1&&(Je(re)[nt]=pe[nt],delete pe[nt]))}}return O}function as(e,r,D,O){if(O){var N=e.anchor;if(D){var X=or(r,N)<0;X!=or(D,N)<0?(N=r,r=D):X!=or(r,D)<0&&(r=D)}return new Fr(N,r)}else return new Fr(D||r,r)}function Vo(e,r,D,O,N){N==null&&(N=e.cm&&(e.cm.display.shift||e.extend)),Ga(e,new za([as(e.sel.primary(),r,D,N)],0),O)}function ws(e,r,D){for(var O=[],N=e.cm&&(e.cm.display.shift||e.extend),X=0;X<e.sel.ranges.length;X++)O[X]=as(e.sel.ranges[X],r[X],null,N);var q=_r(e.cm,O,e.sel.primIndex);Ga(e,q,D)}function is(e,r,D,O){var N=e.sel.ranges.slice(0);N[r]=D,Ga(e,_r(e.cm,N,e.sel.primIndex),O)}function Cs(e,r,D,O){Ga(e,Fn(r,D),O)}function bl(e,r,D){var O={ranges:r.ranges,update:function(N){this.ranges=[];for(var X=0;X<N.length;X++)this.ranges[X]=new Fr(W(e,N[X].anchor),W(e,N[X].head))},origin:D&&D.origin};return Ze(e,"beforeSelectionChange",e,O),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=r.ranges?_r(e.cm,O.ranges,O.ranges.length-1):r}function Ts(e,r,D){var O=e.history.done,N=Je(O);N&&N.ranges?(O[O.length-1]=r,Yo(e,r,D)):Ga(e,r,D)}function Ga(e,r,D){Yo(e,r,D),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function Yo(e,r,D){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(r=bl(e,r,D));var O=D&&D.bias||(or(r.primary().head,e.sel.primary().head)<0?-1:1);Ss(e,Rs(e,r,O,!0)),!(D&&D.scroll===!1)&&e.cm&&yi(e.cm)}function Ss(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ne(e.cm)),Jn(e,"cursorActivity",e)}function Os(e){Ss(e,Rs(e,e.sel,null,!1))}function Rs(e,r,D,O){for(var N,X=0;X<r.ranges.length;X++){var q=r.ranges[X],re=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[X],se=Xo(e,q.anchor,re&&re.anchor,D,O),pe=Xo(e,q.head,re&&re.head,D,O);(N||se!=q.anchor||pe!=q.head)&&(N||(N=r.ranges.slice(0,X)),N[X]=new Fr(se,pe))}return N?_r(e.cm,N,r.primIndex):r}function yo(e,r,D,O,N){var X=En(e,r.line);if(X.markedSpans)for(var q=0;q<X.markedSpans.length;++q){var re=X.markedSpans[q],se=re.marker,pe="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,Ve="selectRight"in se?!se.selectRight:se.inclusiveRight;if((re.from==null||(pe?re.from<=r.ch:re.from<r.ch))&&(re.to==null||(Ve?re.to>=r.ch:re.to>r.ch))){if(N&&(Ze(se,"beforeCursorEnter"),se.explicitlyCleared))if(X.markedSpans){--q;continue}else break;if(!se.atomic)continue;if(D){var nt=se.find(O<0?1:-1),Dt=void 0;if((O<0?Ve:pe)&&(nt=As(e,nt,-O,nt&&nt.line==r.line?X:null)),nt&&nt.line==r.line&&(Dt=or(nt,D))&&(O<0?Dt<0:Dt>0))return yo(e,nt,r,O,N)}var Tt=se.find(O<0?-1:1);return(O<0?pe:Ve)&&(Tt=As(e,Tt,O,Tt.line==r.line?X:null)),Tt?yo(e,Tt,r,O,N):null}}return r}function Xo(e,r,D,O,N){var X=O||1,q=yo(e,r,D,X,N)||!N&&yo(e,r,D,X,!0)||yo(e,r,D,-X,N)||!N&&yo(e,r,D,-X,!0);return q||(e.cantEdit=!0,fn(e.first,0))}function As(e,r,D,O){return D<0&&r.ch==0?r.line>e.first?W(e,fn(r.line-1)):null:D>0&&r.ch==(O||En(e,r.line)).text.length?r.line<e.first+e.size-1?fn(r.line+1,0):null:new fn(r.line,r.ch+D)}function Ds(e){e.setSelection(fn(e.firstLine(),0),fn(e.lastLine()),oe)}function Ms(e,r,D){var O={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return O.canceled=!0}};return D&&(O.update=function(N,X,q,re){N&&(O.from=W(e,N)),X&&(O.to=W(e,X)),q&&(O.text=q),re!==void 0&&(O.origin=re)}),Ze(e,"beforeChange",e,O),e.cm&&Ze(e.cm,"beforeChange",e.cm,O),O.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:O.from,to:O.to,text:O.text,origin:O.origin}}function bo(e,r,D){if(e.cm){if(!e.cm.curOp)return ha(e.cm,bo)(e,r,D);if(e.cm.state.suppressEdits)return}if((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(r=Ms(e,r,!0),!r))return;var O=Zn&&!D&&Re(e,r.from,r.to);if(O)for(var N=O.length-1;N>=0;--N)Ls(e,{from:O[N].from,to:O[N].to,text:N?[""]:r.text,origin:r.origin});else Ls(e,r)}function Ls(e,r){if(r.text.length==1&&r.text[0]==""&&or(r.from,r.to)==0)return;var D=aa(e,r);_s(e,r,D,e.cm?e.cm.curOp.id:NaN),Mo(e,r,D,hr(e,r));var O=[];Ta(e,function(N,X){!X&&$(O,N.history)==-1&&(Ns(N.history,r),O.push(N.history)),Mo(N,r,null,hr(N,r))})}function $o(e,r,D){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!D)return;for(var N=e.history,X,q=e.sel,re=r=="undo"?N.done:N.undone,se=r=="undo"?N.undone:N.done,pe=0;pe<re.length&&!(X=re[pe],D?X.ranges&&!X.equals(e.sel):!X.ranges);pe++);if(pe==re.length)return;for(N.lastOrigin=N.lastSelOrigin=null;;)if(X=re.pop(),X.ranges){if(Go(X,se),D&&!X.equals(e.sel)){Ga(e,X,{clearRedo:!1});return}q=X}else if(O){re.push(X);return}else break;var Ve=[];Go(q,se),se.push({changes:Ve,generation:N.generation}),N.generation=X.generation||++N.maxGeneration;for(var nt=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),Dt=function(yn){var Ln=X.changes[yn];if(Ln.origin=r,nt&&!Ms(e,Ln,!1))return re.length=0,{};Ve.push(rs(e,Ln));var jn=yn?aa(e,Ln):Je(re);Mo(e,Ln,jn,xs(e,Ln)),!yn&&e.cm&&e.cm.scrollIntoView({from:Ln.from,to:lr(Ln)});var Xn=[];Ta(e,function(Un,er){!er&&$(Xn,Un.history)==-1&&(Ns(Un.history,Ln),Xn.push(Un.history)),Mo(Un,Ln,null,xs(Un,Ln))})},Tt=X.changes.length-1;Tt>=0;--Tt){var an=Dt(Tt);if(an)return an.v}}function Ps(e,r){if(r==0)return;if(e.first+=r,e.sel=new za(Rt(e.sel.ranges,function(N){return new Fr(fn(N.anchor.line+r,N.anchor.ch),fn(N.head.line+r,N.head.ch))}),e.sel.primIndex),e.cm){Vr(e.cm,e.first,e.first-r,r);for(var D=e.cm.display,O=D.viewFrom;O<D.viewTo;O++)Xr(e.cm,O,"gutter")}}function Mo(e,r,D,O){if(e.cm&&!e.cm.curOp)return ha(e.cm,Mo)(e,r,D,O);if(r.to.line<e.first){Ps(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 N=r.text.length-1-(e.first-r.from.line);Ps(e,N),r={from:fn(e.first,0),to:fn(r.to.line+N,r.to.ch),text:[Je(r.text)],origin:r.origin}}var X=e.lastLine();r.to.line>X&&(r={from:r.from,to:fn(X,En(e,X).text.length),text:[r.text[0]],origin:r.origin}),r.removed=xr(e,r.from,r.to),D||(D=aa(e,r)),e.cm?_l(e.cm,r,O):Wi(e,r,O),Yo(e,D,oe),e.cantEdit&&Xo(e,fn(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,r,D){var O=e.doc,N=e.display,X=r.from,q=r.to,re=!1,se=X.line;e.options.lineWrapping||(se=ur(St(En(O,X.line))),O.iter(se,q.line+1,function(Tt){if(Tt==N.maxLine)return re=!0,!0})),O.sel.contains(r.from,r.to)>-1&&Ne(e),Wi(O,r,D,Qa(e)),e.options.lineWrapping||(O.iter(se,X.line+r.text.length,function(Tt){var an=cn(Tt);an>N.maxLineLength&&(N.maxLine=Tt,N.maxLineLength=an,N.maxLineChanged=!0,re=!1)}),re&&(e.curOp.updateMaxLine=!0)),$n(O,X.line),Ni(e,400);var pe=r.text.length-(q.line-X.line)-1;r.full?Vr(e):X.line==q.line&&r.text.length==1&&!vi(e.doc,r)?Xr(e,X.line,"text"):Vr(e,X.line,q.line+1,pe);var Ve=Te(e,"changes"),nt=Te(e,"change");if(nt||Ve){var Dt={from:X,to:q,text:r.text,removed:r.removed,origin:r.origin};nt&&Jn(e,"change",e,Dt),Ve&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Dt)}e.display.selForContextMenu=null}function _o(e,r,D,O,N){var X;O||(O=D),or(O,D)<0&&(X=[O,D],D=X[0],O=X[1]),typeof r=="string"&&(r=e.splitLines(r)),bo(e,{from:D,to:O,text:r,origin:N})}function Is(e,r,D,O){D<e.line?e.line+=O:r<e.line&&(e.line=r,e.ch=0)}function ks(e,r,D,O){for(var N=0;N<e.length;++N){var X=e[N],q=!0;if(X.ranges){X.copied||(X=e[N]=X.deepCopy(),X.copied=!0);for(var re=0;re<X.ranges.length;re++)Is(X.ranges[re].anchor,r,D,O),Is(X.ranges[re].head,r,D,O);continue}for(var se=0;se<X.changes.length;++se){var pe=X.changes[se];if(D<pe.from.line)pe.from=fn(pe.from.line+O,pe.from.ch),pe.to=fn(pe.to.line+O,pe.to.ch);else if(r<=pe.to.line){q=!1;break}}q||(e.splice(0,N+1),N=0)}}function Ns(e,r){var D=r.from.line,O=r.to.line,N=r.text.length-(O-D)-1;ks(e.done,D,O,N),ks(e.undone,D,O,N)}function Lo(e,r,D,O){var N=r,X=r;return typeof r=="number"?X=En(e,te(e,r)):N=ur(r),N==null?null:(O(X,N)&&e.cm&&Xr(e.cm,N,D),X)}function Po(e){this.lines=e,this.parent=null;for(var r=0,D=0;D<e.length;++D)e[D].parent=this,r+=e[D].height;this.height=r}Po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var D=e,O=e+r;D<O;++D){var N=this.lines[D];this.height-=N.height,wt(N),Jn(N,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var O=0;O<r.length;++O)r[O].parent=this},iterN:function(e,r,D){for(var O=e+r;e<O;++e)if(D(this.lines[e]))return!0}};function Io(e){this.children=e;for(var r=0,D=0,O=0;O<e.length;++O){var N=e[O];r+=N.chunkSize(),D+=N.height,N.parent=this}this.size=r,this.height=D,this.parent=null}Io.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var D=0;D<this.children.length;++D){var O=this.children[D],N=O.chunkSize();if(e<N){var X=Math.min(r,N-e),q=O.height;if(O.removeInner(e,X),this.height-=q-O.height,N==X&&(this.children.splice(D--,1),O.parent=null),(r-=X)==0)break;e=0}else e-=N}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Po))){var re=[];this.collapse(re),this.children=[new Po(re)],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,D){this.size+=r.length,this.height+=D;for(var O=0;O<this.children.length;++O){var N=this.children[O],X=N.chunkSize();if(e<=X){if(N.insertInner(e,r,D),N.lines&&N.lines.length>50){for(var q=N.lines.length%25+25,re=q;re<N.lines.length;){var se=new Po(N.lines.slice(re,re+=25));N.height-=se.height,this.children.splice(++O,0,se),se.parent=this}N.lines=N.lines.slice(0,q),this.maybeSpill()}break}e-=X}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),D=new Io(r);if(e.parent){e.size-=D.size,e.height-=D.height;var N=$(e.parent.children,e);e.parent.children.splice(N+1,0,D)}else{var O=new Io(e.children);O.parent=e,e.children=[O,D],e=O}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,D){for(var O=0;O<this.children.length;++O){var N=this.children[O],X=N.chunkSize();if(e<X){var q=Math.min(r,X-e);if(N.iterN(e,q,D))return!0;if((r-=q)==0)break;e=0}else e-=X}}};var ko=function(e,r,D){if(D)for(var O in D)D.hasOwnProperty(O)&&(this[O]=D[O]);this.doc=e,this.node=r};ko.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,D=this.line,O=ur(D);if(O==null||!r)return;for(var N=0;N<r.length;++N)r[N]==this&&r.splice(N--,1);r.length||(D.widgets=null);var X=ca(this);rr(D,Math.max(0,D.height-X)),e&&(Wa(e,function(){js(e,D,-X),Xr(e,O,"widget")}),Jn(e,"lineWidgetCleared",e,this,O))},ko.prototype.changed=function(){var e=this,r=this.height,D=this.doc.cm,O=this.line;this.height=null;var N=ca(this)-r;if(!N)return;bn(this.doc,O)||rr(O,O.height+N),D&&Wa(D,function(){D.curOp.forceUpdate=!0,js(D,O,N),Jn(D,"lineWidgetChanged",D,e,ur(O))})},Oe(ko);function js(e,r,D){Gt(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Vi(e,D)}function El(e,r,D,O){var N=new ko(e,D,O),X=e.cm;return X&&N.noHScroll&&(X.display.alignWidgets=!0),Lo(e,r,"widget",function(q){var re=q.widgets||(q.widgets=[]);if(N.insertAt==null?re.push(N):re.splice(Math.min(re.length-1,Math.max(0,N.insertAt)),0,N),N.line=q,X&&!bn(e,q)){var se=Gt(q)<e.scrollTop;rr(q,q.height+ca(N)),se&&Vi(X,N.height),X.curOp.forceUpdate=!0}return!0}),X&&Jn(X,"lineWidgetAdded",X,N,typeof r=="number"?r:ur(r)),N}var Us=0,qi=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Us};qi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ui(e),Te(this,"clear")){var D=this.find();D&&Jn(this,"clear",D.from,D.to)}for(var O=null,N=null,X=0;X<this.lines.length;++X){var q=this.lines[X],re=sr(q.markedSpans,this);e&&!this.collapsed?Xr(e,ur(q),"text"):e&&(re.to!=null&&(N=ur(q)),re.from!=null&&(O=ur(q))),q.markedSpans=Pn(q.markedSpans,re),re.from==null&&this.collapsed&&!bn(this.doc,q)&&e&&rr(q,jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var pe=St(this.lines[se]),Ve=cn(pe);Ve>e.display.maxLineLength&&(e.display.maxLine=pe,e.display.maxLineLength=Ve,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Vr(e,O,N+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Jn(e,"markerCleared",e,this,O,N),r&&Ei(e),this.parent&&this.parent.clear()},qi.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var D,O,N=0;N<this.lines.length;++N){var X=this.lines[N],q=sr(X.markedSpans,this);if(q.from!=null&&(D=fn(r?X:ur(X),q.from),e==-1))return D;if(q.to!=null&&(O=fn(r?X:ur(X),q.to),e==1))return O}return D&&{from:D,to:O}},qi.prototype.changed=function(){var e=this,r=this.find(-1,!0),D=this,O=this.doc.cm;if(!r||!O)return;Wa(O,function(){var N=r.line,X=ur(r.line),q=ot(O,X);if(q&&(cr(q),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!bn(D.doc,N)&&D.height!=null){var re=D.height;D.height=null;var se=ca(D)-re;se&&rr(N,N.height+se)}Jn(O,"markerChanged",O,e)})},qi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||$(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},qi.prototype.detachLine=function(e){if(this.lines.splice($(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Oe(qi);function Eo(e,r,D,O,N){if(O&&O.shared)return xl(e,r,D,O,N);if(e.cm&&!e.cm.curOp)return ha(e.cm,Eo)(e,r,D,O,N);var X=new qi(e,N),q=or(r,D);if(O&&M(O,X,!1),q>0||q==0&&X.clearWhenEmpty!==!1)return X;if(X.replacedWith&&(X.collapsed=!0,X.widgetNode=_("span",[X.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||X.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(X.widgetNode.insertLeft=!0)),X.collapsed){if(Vt(e,r.line,r,D,X)||r.line!=D.line&&Vt(e,D.line,r,D,X))throw new Error("Inserting collapsed marker partially overlapping an existing one");Bn()}X.addToHistory&&_s(e,{from:r,to:D,origin:"markText"},e.sel,NaN);var re=r.line,se=e.cm,pe;if(e.iter(re,D.line+1,function(nt){se&&X.collapsed&&!se.options.lineWrapping&&St(nt)==se.display.maxLine&&(pe=!0),X.collapsed&&re!=r.line&&rr(nt,0),Tr(nt,new ar(X,re==r.line?r.ch:null,re==D.line?D.ch:null)),++re}),X.collapsed&&e.iter(r.line,D.line+1,function(nt){bn(e,nt)&&rr(nt,0)}),X.clearOnEnter&&Ae(X,"beforeCursorEnter",function(){return X.clear()}),X.readOnly&&(gr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),X.collapsed&&(X.id=++Us,X.atomic=!0),se){if(pe&&(se.curOp.updateMaxLine=!0),X.collapsed)Vr(se,r.line,D.line+1);else if(X.className||X.startStyle||X.endStyle||X.css||X.attributes||X.title)for(var Ve=r.line;Ve<=D.line;Ve++)Xr(se,Ve,"text");X.atomic&&Os(se.doc),Jn(se,"markerAdded",se,X)}return X}var No=function(e,r){this.markers=e,this.primary=r;for(var D=0;D<e.length;++D)e[D].parent=this};No.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Jn(this,"clear")},No.prototype.find=function(e,r){return this.primary.find(e,r)},Oe(No);function xl(e,r,D,O,N){O=M(O),O.shared=!1;var X=[Eo(e,r,D,O,N)],q=X[0],re=O.widgetNode;return Ta(e,function(se){re&&(O.widgetNode=re.cloneNode(!0)),X.push(Eo(se,W(se,r),W(se,D),O,N));for(var pe=0;pe<se.linked.length;++pe)if(se.linked[pe].isParent)return;q=Je(X)}),new No(X,q)}function Fs(e){return e.findMarks(fn(e.first,0),e.clipPos(fn(e.lastLine())),function(r){return r.parent})}function wl(e,r){for(var D=0;D<r.length;D++){var O=r[D],N=O.find(),X=e.clipPos(N.from),q=e.clipPos(N.to);if(or(X,q)){var re=Eo(e,X,q,O.primary,O.primary.type);O.markers.push(re),re.parent=O}}}function Cl(e){for(var r=function(O){var N=e[O],X=[N.primary.doc];Ta(N.primary.doc,function(se){return X.push(se)});for(var q=0;q<N.markers.length;q++){var re=N.markers[q];$(X,re.doc)==-1&&(re.parent=null,N.markers.splice(q--,1))}},D=0;D<e.length;D++)r(D)}var Tl=0,ei=function(e,r,D,O,N){if(!(this instanceof ei))return new ei(e,r,D,O,N);D==null&&(D=0),Io.call(this,[new Po([new Sn("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var X=fn(D,0);this.sel=Fn(X),this.history=new Ko(null),this.id=++Tl,this.modeOption=r,this.lineSep=O,this.direction=N=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Wi(this,{from:X,to:X,text:e}),Ga(this,Fn(X),oe)};ei.prototype=rt(Io.prototype,{constructor:ei,iter:function(e,r,D){D?this.iterN(e-this.first,r-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var D=0,O=0;O<r.length;++O)D+=r[O].height;this.insertInner(e-this.first,r,D)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=Er(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:fa(function(e){var r=fn(this.first,0),D=this.first+this.size-1;bo(this,{from:r,to:fn(D,En(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ri(this.cm,0,0),Ga(this,Fn(r),oe)}),replaceRange:function(e,r,D,O){r=W(this,r),D=D?W(this,D):r,_o(this,e,r,D,O)},getRange:function(e,r,D){var O=xr(this,W(this,e),W(this,r));return D===!1?O:O.join(D||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(Kr(this,e))return En(this,e)},getLineNumber:function(e){return ur(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=En(this,e)),St(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return W(this,e)},getCursor:function(e){var r=this.sel.primary(),D;return e==null||e=="head"?D=r.head:e=="anchor"?D=r.anchor:e=="end"||e=="to"||e===!1?D=r.to():D=r.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:fa(function(e,r,D){Cs(this,W(this,typeof e=="number"?fn(e,r||0):e),null,D)}),setSelection:fa(function(e,r,D){Cs(this,W(this,e),W(this,r||e),D)}),extendSelection:fa(function(e,r,D){Vo(this,W(this,e),r&&W(this,r),D)}),extendSelections:fa(function(e,r){ws(this,Q(this,e),r)}),extendSelectionsBy:fa(function(e,r){var D=Rt(this.sel.ranges,e);ws(this,Q(this,D),r)}),setSelections:fa(function(e,r,D){if(!e.length)return;for(var O=[],N=0;N<e.length;N++)O[N]=new Fr(W(this,e[N].anchor),W(this,e[N].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ga(this,_r(this.cm,O,r),D)}),addSelection:fa(function(e,r,D){var O=this.sel.ranges.slice(0);O.push(new Fr(W(this,e),W(this,r||e))),Ga(this,_r(this.cm,O,O.length-1),D)}),getSelection:function(e){for(var r=this.sel.ranges,D,O=0;O<r.length;O++){var N=xr(this,r[O].from(),r[O].to());D=D?D.concat(N):N}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],D=this.sel.ranges,O=0;O<D.length;O++){var N=xr(this,D[O].from(),D[O].to());e!==!1&&(N=N.join(e||this.lineSeparator())),r[O]=N}return r},replaceSelection:function(e,r,D){for(var O=[],N=0;N<this.sel.ranges.length;N++)O[N]=e;this.replaceSelections(O,r,D||"+input")},replaceSelections:fa(function(e,r,D){for(var O=[],N=this.sel,X=0;X<N.ranges.length;X++){var q=N.ranges[X];O[X]={from:q.from(),to:q.to(),text:this.splitLines(e[X]),origin:D}}for(var re=r&&r!="end"&&ii(this,O,r),se=O.length-1;se>=0;se--)bo(this,O[se]);re?Ts(this,re):this.cm&&yi(this.cm)}),undo:fa(function(){$o(this,"undo")}),redo:fa(function(){$o(this,"redo")}),undoSelection:fa(function(){$o(this,"undo",!0)}),redoSelection:fa(function(){$o(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,D=0,O=0;O<e.done.length;O++)e.done[O].ranges||++r;for(var N=0;N<e.undone.length;N++)e.undone[N].ranges||++D;return{undo:r,redo:D}},clearHistory:function(){var e=this;this.history=new Ko(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:vo(this.history.done),undone:vo(this.history.undone)}},setHistory:function(e){var r=this.history=new Ko(this.history.maxGeneration);r.done=vo(e.done.slice(0),null,!0),r.undone=vo(e.undone.slice(0),null,!0)},setGutterMarker:fa(function(e,r,D){return Lo(this,e,"gutter",function(O){var N=O.gutterMarkers||(O.gutterMarkers={});return N[r]=D,!D&&ie(N)&&(O.gutterMarkers=null),!0})}),clearGutter:fa(function(e){var r=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&Lo(r,D,"gutter",function(){return D.gutterMarkers[e]=null,ie(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!Kr(this,e))return null;if(r=e,e=En(this,e),!e)return null}else if(r=ur(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:fa(function(e,r,D){return Lo(this,e,r=="gutter"?"gutter":"class",function(O){var N=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!O[N])O[N]=D;else{if(w(D).test(O[N]))return!1;O[N]+=" "+D}return!0})}),removeLineClass:fa(function(e,r,D){return Lo(this,e,r=="gutter"?"gutter":"class",function(O){var N=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",X=O[N];if(X)if(D==null)O[N]=null;else{var q=X.match(w(D));if(!q)return!1;var re=q.index+q[0].length;O[N]=X.slice(0,q.index)+(!q.index||re==X.length?"":" ")+X.slice(re)||null}else return!1;return!0})}),addLineWidget:fa(function(e,r,D){return El(this,e,r,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,D){return Eo(this,W(this,e),W(this,r),D,D&&D.type||"range")},setBookmark:function(e,r){var D={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=W(this,e),Eo(this,e,e,D,"bookmark")},findMarksAt:function(e){e=W(this,e);var r=[],D=En(this,e.line).markedSpans;if(D)for(var O=0;O<D.length;++O){var N=D[O];(N.from==null||N.from<=e.ch)&&(N.to==null||N.to>=e.ch)&&r.push(N.marker.parent||N.marker)}return r},findMarks:function(e,r,D){e=W(this,e),r=W(this,r);var O=[],N=e.line;return this.iter(e.line,r.line+1,function(X){var q=X.markedSpans;if(q)for(var re=0;re<q.length;re++){var se=q[re];!(se.to!=null&&N==e.line&&e.ch>=se.to||se.from==null&&N!=e.line||se.from!=null&&N==r.line&&se.from>=r.ch)&&(!D||D(se.marker))&&O.push(se.marker.parent||se.marker)}++N}),O},getAllMarks:function(){var e=[];return this.iter(function(r){var D=r.markedSpans;if(D)for(var O=0;O<D.length;++O)D[O].from!=null&&e.push(D[O].marker)}),e},posFromIndex:function(e){var r,D=this.first,O=this.lineSeparator().length;return this.iter(function(N){var X=N.text.length+O;if(X>e)return r=e,!0;e-=X,++D}),W(this,fn(D,r))},indexFromPos:function(e){e=W(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){r+=O.text.length+D}),r},copy:function(e){var r=new ei(Er(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,D=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<D&&(D=e.to);var O=new ei(Er(this,r,D),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(O.history=this.history),(this.linked||(this.linked=[])).push({doc:O,sharedHist:e.sharedHist}),O.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(O,Fs(this)),O},unlinkDoc:function(e){if(e instanceof pa&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var D=this.linked[r];if(D.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var O=[e.id];Ta(e,function(N){return O.push(N.id)},!0),e.history=new Ko(null),e.history.done=vo(this.history.done,O),e.history.undone=vo(this.history.undone,O)}},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):Ot(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:fa(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&fl(this.cm)})}),ei.prototype.eachLine=ei.prototype.iter;var Bs=0;function Sl(e){var r=this;if(Hs(r),dt(r,e)||Ra(r.display,e))return;ae(e),P&&(Bs=+new Date);var D=Ca(r,e,!0),O=e.dataTransfer.files;if(!D||r.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var N=O.length,X=Array(N),q=0,re=function(){++q==N&&ha(r,function(){D=W(r.doc,D);var Tt={from:D,to:D,text:r.doc.splitLines(X.filter(function(an){return an!=null}).join(r.doc.lineSeparator())),origin:"paste"};bo(r.doc,Tt),Ts(r.doc,Fn(W(r.doc,D),W(r.doc,lr(Tt))))})()},se=function(Tt,an){if(r.options.allowDropFileTypes&&$(r.options.allowDropFileTypes,Tt.type)==-1){re();return}var yn=new FileReader;yn.onerror=function(){return re()},yn.onload=function(){var Ln=yn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ln)){re();return}X[an]=Ln,re()},yn.readAsText(Tt)},pe=0;pe<O.length;pe++)se(O[pe],pe);else{if(r.state.draggingText&&r.doc.sel.contains(D)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Ve=e.dataTransfer.getData("Text");if(Ve){var nt;if(r.state.draggingText&&!r.state.draggingText.copy&&(nt=r.listSelections()),Yo(r.doc,Fn(D,D)),nt)for(var Dt=0;Dt<nt.length;++Dt)_o(r.doc,"",nt[Dt].anchor,nt[Dt].head,"drag");r.replaceSelection(Ve,"around","paste"),r.display.input.focus()}}catch(Tt){}}}function Ol(e,r){if(P&&(!e.state.draggingText||+new Date-Bs<100)){_e(r);return}if(dt(e,r)||Ra(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!f){var D=v("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",u&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),r.dataTransfer.setDragImage(D,0,0),u&&D.parentNode.removeChild(D)}}function Rl(e,r){var D=Ca(e,r);if(!D)return;var O=document.createDocumentFragment();Za(e,D,O),e.display.dragCursor||(e.display.dragCursor=v("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),p(e.display.dragCursor,O)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),D=[],O=0;O<r.length;O++){var N=r[O].CodeMirror;N&&D.push(N)}D.length&&D[0].operation(function(){for(var X=0;X<D.length;X++)e(D[X])})}var zs=!1;function Al(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Ae(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ml)},100))}),Ae(window,"blur",function(){return Ws(Ci)})}function Ml(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var eo={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"},jo=0;jo<10;jo++)eo[jo+48]=eo[jo+96]=String(jo);for(var Qo=65;Qo<=90;Qo++)eo[Qo]=String.fromCharCode(Qo);for(var Uo=1;Uo<=12;Uo++)eo[Uo+111]=eo[Uo+63235]="F"+Uo;var zi={};zi.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"},zi.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"},zi.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"},zi.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"]},zi.default=l?zi.macDefault:zi.pcDefault;function Ll(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var D,O,N,X,q=0;q<r.length-1;q++){var re=r[q];if(/^(cmd|meta|m)$/i.test(re))X=!0;else if(/^a(lt)?$/i.test(re))D=!0;else if(/^(c|ctrl|control)$/i.test(re))O=!0;else if(/^s(hift)?$/i.test(re))N=!0;else throw new Error("Unrecognized modifier name: "+re)}return D&&(e="Alt-"+e),O&&(e="Ctrl-"+e),X&&(e="Cmd-"+e),N&&(e="Shift-"+e),e}function Pl(e){var r={};for(var D in e)if(e.hasOwnProperty(D)){var O=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(O=="..."){delete e[D];continue}for(var N=Rt(D.split(" "),Ll),X=0;X<N.length;X++){var q=void 0,re=void 0;X==N.length-1?(re=N.join(" "),q=O):(re=N.slice(0,X+1).join(" "),q="...");var se=r[re];if(!se)r[re]=q;else if(se!=q)throw new Error("Inconsistent bindings for "+re)}delete e[D]}for(var pe in r)e[pe]=r[pe];return e}function xo(e,r,D,O){r=Jo(r);var N=r.call?r.call(e,O):r[e];if(N===!1)return"nothing";if(N==="...")return"multi";if(N!=null&&D(N))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return xo(e,r.fallthrough,D,O);for(var X=0;X<r.fallthrough.length;X++){var q=xo(e,r.fallthrough[X],D,O);if(q)return q}}}function Ks(e){var r=typeof e=="string"?e:eo[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Gs(e,r,D){var O=e;return r.altKey&&O!="Alt"&&(e="Alt-"+e),(C?r.metaKey:r.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(C?r.ctrlKey:r.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!D&&r.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function Vs(e,r){if(u&&e.keyCode==34&&e.char)return!1;var D=eo[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Gs(D,e,r))}function Jo(e){return typeof e=="string"?zi[e]:e}function wo(e,r){for(var D=e.doc.sel.ranges,O=[],N=0;N<D.length;N++){for(var X=r(D[N]);O.length&&or(X.from,Je(O).to)<=0;){var q=O.pop();if(or(q.from,X.from)<0){X.from=q.from;break}}O.push(X)}Wa(e,function(){for(var re=O.length-1;re>=0;re--)_o(e.doc,"",O[re].from,O[re].to,"+delete");yi(e)})}function os(e,r,D){var O=$e(e.text,r+D,D);return O<0||O>e.text.length?null:O}function ss(e,r,D){var O=os(e,r.ch,D);return O==null?null:new fn(r.line,O,D<0?"after":"before")}function ls(e,r,D,O,N){if(e){r.doc.direction=="rtl"&&(N=-N);var X=qt(D,r.doc.direction);if(X){var q=N<0?Je(X):X[0],re=N<0==(q.level==1),se=re?"after":"before",pe;if(q.level>0||r.doc.direction=="rtl"){var Ve=Ke(r,D);pe=N<0?D.text.length-1:0;var nt=_t(r,Ve,pe).top;pe=ct(function(Dt){return _t(r,Ve,Dt).top==nt},N<0==(q.level==1)?q.from:q.to-1,pe),se=="before"&&(pe=os(D,pe,1))}else pe=N<0?q.to:q.from;return new fn(O,pe,se)}}return new fn(O,N<0?D.text.length:0,N<0?"before":"after")}function Il(e,r,D,O){var N=qt(r,e.doc.direction);if(!N)return ss(r,D,O);D.ch>=r.text.length?(D.ch=r.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var X=We(N,D.ch,D.sticky),q=N[X];if(e.doc.direction=="ltr"&&q.level%2==0&&(O>0?q.to>D.ch:q.from<D.ch))return ss(r,D,O);var re=function(jn,Xn){return os(r,jn instanceof fn?jn.ch:jn,Xn)},se,pe=function(jn){return e.options.lineWrapping?(se=se||Ke(e,r),Qn(e,r,se,jn)):{begin:0,end:r.text.length}},Ve=pe(D.sticky=="before"?re(D,-1):D.ch);if(e.doc.direction=="rtl"||q.level==1){var nt=q.level==1==O<0,Dt=re(D,nt?1:-1);if(Dt!=null&&(nt?Dt<=q.to&&Dt<=Ve.end:Dt>=q.from&&Dt>=Ve.begin)){var Tt=nt?"before":"after";return new fn(D.line,Dt,Tt)}}var an=function(jn,Xn,Un){for(var er=function(ia,Ba){return Ba?new fn(D.line,re(ia,1),"before"):new fn(D.line,ia,"after")};jn>=0&&jn<N.length;jn+=Xn){var br=N[jn],mr=Xn>0==(br.level!=1),kr=mr?Un.begin:re(Un.end,-1);if(br.from<=kr&&kr<br.to)return er(kr,mr);if(kr=mr?br.from:re(br.to,-1),Un.begin<=kr&&kr<Un.end)return er(kr,mr)}},yn=an(X+O,O,Ve);if(yn)return yn;var Ln=O>0?Ve.end:re(Ve.begin,-1);return Ln!=null&&!(O>0&&Ln==r.text.length)&&(yn=an(O>0?0:N.length-1,O,pe(Ln)),yn)?yn:null}var Fo={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return wo(e,function(r){if(r.empty()){var D=En(e.doc,r.head.line).text.length;return r.head.ch==D&&r.head.line<e.lastLine()?{from:r.head,to:fn(r.head.line+1,0)}:{from:r.head,to:fn(r.head.line,D)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return wo(e,function(r){return{from:fn(r.from().line,0),to:W(e.doc,fn(r.to().line+1,0))}})},delLineLeft:function(e){return wo(e,function(r){return{from:fn(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return wo(e,function(r){var D=e.charCoords(r.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return{from:O,to:r.from()}})},delWrappedLineRight:function(e){return wo(e,function(r){var D=e.charCoords(r.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:r.from(),to:O}})},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(fn(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(fn(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Ys(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Xs(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return kl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var D=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},ye)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var D=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},ye)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var D=e.cursorCoords(r.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return O.ch<e.getLine(O.line).search(/\S/)?Xs(e,r.head):O},ye)},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=[],D=e.listSelections(),O=e.options.tabSize,N=0;N<D.length;N++){var X=D[N].from(),q=V(e.getLine(X.line),X.ch,O);r.push(de(O-q%O))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Wa(e,function(){for(var r=e.listSelections(),D=[],O=0;O<r.length;O++){if(!r[O].empty())continue;var N=r[O].head,X=En(e.doc,N.line).text;if(X){if(N.ch==X.length&&(N=new fn(N.line,N.ch-1)),N.ch>0)N=new fn(N.line,N.ch+1),e.replaceRange(X.charAt(N.ch-1)+X.charAt(N.ch-2),fn(N.line,N.ch-2),N,"+transpose");else if(N.line>e.doc.first){var q=En(e.doc,N.line-1).text;q&&(N=new fn(N.line,1),e.replaceRange(X.charAt(0)+e.doc.lineSeparator()+q.charAt(q.length-1),fn(N.line-1,q.length-1),N,"+transpose"))}}D.push(new Fr(N,N))}e.setSelections(D)})},newlineAndIndent:function(e){return Wa(e,function(){for(var r=e.listSelections(),D=r.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),r[D].anchor,r[D].head,"+input");r=e.listSelections();for(var O=0;O<r.length;O++)e.indentLine(r[O].from().line,null,!0);yi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ys(e,r){var D=En(e.doc,r),O=St(D);return O!=D&&(r=ur(O)),ls(!0,e,O,r,1)}function kl(e,r){var D=En(e.doc,r),O=nn(D);return O!=D&&(r=ur(O)),ls(!0,e,D,r,-1)}function Xs(e,r){var D=Ys(e,r.line),O=En(e.doc,D.line),N=qt(O,e.doc.direction);if(!N||N[0].level==0){var X=Math.max(D.ch,O.text.search(/\S/)),q=r.line==D.line&&r.ch<=X&&r.ch;return fn(D.line,q?0:X,D.sticky)}return D}function Zo(e,r,D){if(typeof r=="string"&&(r=Fo[r],!r))return!1;e.display.input.ensurePolled();var O=e.display.shift,N=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),N=r(e)!=me}finally{e.display.shift=O,e.state.suppressEdits=!1}return N}function Nl(e,r,D){for(var O=0;O<e.state.keyMaps.length;O++){var N=xo(r,e.state.keyMaps[O],D,e);if(N)return N}return e.options.extraKeys&&xo(r,e.options.extraKeys,D,e)||xo(r,e.options.keyMap,D,e)}var jl=new K;function Bo(e,r,D,O){var N=e.state.keySeq;if(N){if(Ks(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==N&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,N+" "+r,D,O))return!0}return $s(e,r,D,O)}function $s(e,r,D,O){var N=Nl(e,r,O);return N=="multi"&&(e.state.keySeq=r),N=="handled"&&Jn(e,"keyHandled",e,r,D),(N=="handled"||N=="multi")&&(ae(D),ba(e)),!!N}function Qs(e,r){var D=Vs(r,!0);return D?r.shiftKey&&!e.state.keySeq?Bo(e,"Shift-"+D,r,function(O){return Zo(e,O,!0)})||Bo(e,D,r,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return Zo(e,O)}):Bo(e,D,r,function(O){return Zo(e,O)}):!1}function Ul(e,r,D){return Bo(e,"'"+D+"'",r,function(O){return Zo(e,O,!0)})}var us=null;function Js(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=j(),dt(r,e))return;P&&m<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;r.display.shift=D==16||e.shiftKey;var O=Qs(r,e);u&&(us=O?D:null,!O&&D==88&&!ft&&(l?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),I&&!l&&!O&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Fl(r)}function Fl(e){var r=e.display.lineDiv;U(r,"CodeMirror-crosshair");function D(O){(O.keyCode==18||!O.altKey)&&(y(r,"CodeMirror-crosshair"),Et(document,"keyup",D),Et(document,"mouseover",D))}Ae(document,"keyup",D),Ae(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),dt(this,e)}function qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Ra(r.display,e)||dt(r,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var D=e.keyCode,O=e.charCode;if(u&&D==us){us=null,ae(e);return}if(u&&(!e.which||e.which<10)&&Qs(r,e))return;var N=String.fromCharCode(O==null?D:O);if(N=="\b")return;if(Ul(r,e,N))return;r.display.input.onKeyPress(e)}var Bl=400,ds=function(e,r,D){this.time=e,this.pos=r,this.button=D};ds.prototype.compare=function(e,r,D){return this.time+Bl>e&&or(r,this.pos)==0&&D==this.button};var Ho,Wo;function Hl(e,r){var D=+new Date;return Wo&&Wo.compare(D,e,r)?(Ho=Wo=null,"triple"):Ho&&Ho.compare(D,e,r)?(Wo=new ds(D,e,r),Ho=null,"double"):(Ho=new ds(D,e,r),Wo=null,"single")}function el(e){var r=this,D=r.display;if(dt(r,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Ra(D,e)){t||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(r,e))return;var O=Ca(r,e),N=ze(e),X=O?Hl(O,N):"single";if(window.focus(),N==1&&r.state.selectingText&&r.state.selectingText(e),O&&Wl(r,N,O,X,e))return;N==1?O?Kl(r,O,X,e):Se(e)==D.scroller&&ae(e):N==2?(O&&Vo(r.doc,O),setTimeout(function(){return D.input.focus()},20)):N==3&&(k?r.display.input.onContextMenu(e):no(r))}function Wl(e,r,D,O,N){var X="Click";return O=="double"?X="Double"+X:O=="triple"&&(X="Triple"+X),X=(r==1?"Left":r==2?"Middle":"Right")+X,Bo(e,Gs(X,N),N,function(q){if(typeof q=="string"&&(q=Fo[q]),!q)return!1;var re=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),re=q(e,D)!=me}finally{e.state.suppressEdits=!1}return re})}function zl(e,r,D){var O=e.getOption("configureMouse"),N=O?O(e,r,D):{};if(N.unit==null){var X=c?D.shiftKey&&D.metaKey:D.altKey;N.unit=X?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(N.extend==null||e.doc.extend)&&(N.extend=e.doc.extend||D.shiftKey),N.addNew==null&&(N.addNew=l?D.metaKey:D.ctrlKey),N.moveOnDrag==null&&(N.moveOnDrag=!(l?D.altKey:D.ctrlKey)),N}function Kl(e,r,D,O){P?setTimeout(H(Pi,e),0):e.curOp.focus=j();var N=zl(e,D,O),X=e.doc.sel,q;e.options.dragDrop&&xt&&!e.isReadOnly()&&D=="single"&&(q=X.contains(r))>-1&&(or((q=X.ranges[q]).from(),r)<0||r.xRel>0)&&(or(q.to(),r)>0||r.xRel<0)?Gl(e,O,r,N):Vl(e,O,r,N)}function Gl(e,r,D,O){var N=e.display,X=!1,q=ha(e,function(pe){t&&(N.scroller.draggable=!1),e.state.draggingText=!1,Et(N.wrapper.ownerDocument,"mouseup",q),Et(N.wrapper.ownerDocument,"mousemove",re),Et(N.scroller,"dragstart",se),Et(N.scroller,"drop",q),X||(ae(pe),O.addNew||Vo(e.doc,D,null,null,O.extend),t&&!f||P&&m==9?setTimeout(function(){N.wrapper.ownerDocument.body.focus({preventScroll:!0}),N.input.focus()},20):N.input.focus())}),re=function(pe){X=X||Math.abs(r.clientX-pe.clientX)+Math.abs(r.clientY-pe.clientY)>=10},se=function(){return X=!0};t&&(N.scroller.draggable=!0),e.state.draggingText=q,q.copy=!O.moveOnDrag,N.scroller.dragDrop&&N.scroller.dragDrop(),Ae(N.wrapper.ownerDocument,"mouseup",q),Ae(N.wrapper.ownerDocument,"mousemove",re),Ae(N.scroller,"dragstart",se),Ae(N.scroller,"drop",q),no(e),setTimeout(function(){return N.input.focus()},20)}function tl(e,r,D){if(D=="char")return new Fr(r,r);if(D=="word")return e.findWordAt(r);if(D=="line")return new Fr(fn(r.line,0),W(e.doc,fn(r.line+1,0)));var O=D(e,r);return new Fr(O.from,O.to)}function Vl(e,r,D,O){var N=e.display,X=e.doc;ae(r);var q,re,se=X.sel,pe=se.ranges;if(O.addNew&&!O.extend?(re=X.sel.contains(D),re>-1?q=pe[re]:q=new Fr(D,D)):(q=X.sel.primary(),re=X.sel.primIndex),O.unit=="rectangle")O.addNew||(q=new Fr(D,D)),D=Ca(e,r,!0,!0),re=-1;else{var Ve=tl(e,D,O.unit);O.extend?q=as(q,Ve.anchor,Ve.head,O.extend):q=Ve}O.addNew?re==-1?(re=pe.length,Ga(X,_r(e,pe.concat([q]),re),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[re].empty()&&O.unit=="char"&&!O.extend?(Ga(X,_r(e,pe.slice(0,re).concat(pe.slice(re+1)),0),{scroll:!1,origin:"*mouse"}),se=X.sel):is(X,re,q,fe):(re=0,Ga(X,new za([q],0),fe),se=X.sel);var nt=D;function Dt(Un){if(or(nt,Un)==0)return;if(nt=Un,O.unit=="rectangle"){for(var er=[],br=e.options.tabSize,mr=V(En(X,D.line).text,D.ch,br),kr=V(En(X,Un.line).text,Un.ch,br),ia=Math.min(mr,kr),Ba=Math.max(mr,kr),va=Math.min(D.line,Un.line),oi=Math.min(e.lastLine(),Math.max(D.line,Un.line));va<=oi;va++){var ti=En(X,va).text,Ma=Ie(ti,ia,br);ia==Ba?er.push(new Fr(fn(va,Ma),fn(va,Ma))):ti.length>Ma&&er.push(new Fr(fn(va,Ma),fn(va,Ie(ti,Ba,br))))}er.length||er.push(new Fr(D,D)),Ga(X,_r(e,se.ranges.slice(0,re).concat(er),re),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Un)}else{var ni=q,Ka=tl(e,Un,O.unit),ka=ni.anchor,La;or(Ka.anchor,ka)>0?(La=Ka.head,ka=na(ni.from(),Ka.anchor)):(La=Ka.anchor,ka=Jr(ni.to(),Ka.head));var Ea=se.ranges.slice(0);Ea[re]=Yl(e,new Fr(W(X,ka),La)),Ga(X,_r(e,Ea,re),fe)}}var Tt=N.wrapper.getBoundingClientRect(),an=0;function yn(Un){var er=++an,br=Ca(e,Un,!0,O.unit=="rectangle");if(!br)return;if(or(br,nt)!=0){e.curOp.focus=j(),Dt(br);var mr=Ii(N,X);(br.line>=mr.to||br.line<mr.from)&&setTimeout(ha(e,function(){an==er&&yn(Un)}),150)}else{var kr=Un.clientY<Tt.top?-20:Un.clientY>Tt.bottom?20:0;kr&&setTimeout(ha(e,function(){if(an!=er)return;N.scroller.scrollTop+=kr,yn(Un)}),50)}}function Ln(Un){e.state.selectingText=!1,an=Infinity,Un&&(ae(Un),N.input.focus()),Et(N.wrapper.ownerDocument,"mousemove",jn),Et(N.wrapper.ownerDocument,"mouseup",Xn),X.history.lastSelOrigin=null}var jn=ha(e,function(Un){Un.buttons===0||!ze(Un)?Ln(Un):yn(Un)}),Xn=ha(e,Ln);e.state.selectingText=Xn,Ae(N.wrapper.ownerDocument,"mousemove",jn),Ae(N.wrapper.ownerDocument,"mouseup",Xn)}function Yl(e,r){var D=r.anchor,O=r.head,N=En(e.doc,D.line);if(or(D,O)==0&&D.sticky==O.sticky)return r;var X=qt(N);if(!X)return r;var q=We(X,D.ch,D.sticky),re=X[q];if(re.from!=D.ch&&re.to!=D.ch)return r;var se=q+(re.from==D.ch==(re.level!=1)?0:1);if(se==0||se==X.length)return r;var pe;if(O.line!=D.line)pe=(O.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ve=We(X,O.ch,O.sticky),nt=Ve-q||(O.ch-D.ch)*(re.level==1?-1:1);Ve==se-1||Ve==se?pe=nt<0:pe=nt>0}var Dt=X[se+(pe?-1:0)],Tt=pe==(Dt.level==1),an=Tt?Dt.from:Dt.to,yn=Tt?"after":"before";return D.ch==an&&D.sticky==yn?r:new Fr(new fn(D.line,an,yn),O)}function nl(e,r,D,O){var N,X;if(r.touches)N=r.touches[0].clientX,X=r.touches[0].clientY;else try{N=r.clientX,X=r.clientY}catch(Dt){return!1}if(N>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&ae(r);var q=e.display,re=q.lineDiv.getBoundingClientRect();if(X>re.bottom||!Te(e,D))return he(r);X-=re.top-q.viewOffset;for(var se=0;se<e.display.gutterSpecs.length;++se){var pe=q.gutters.childNodes[se];if(pe&&pe.getBoundingClientRect().right>=N){var Ve=Rr(e.doc,X),nt=e.display.gutterSpecs[se];return Ze(e,D,e,Ve,nt.className,r),he(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function rl(e,r){if(Ra(e.display,r)||Xl(e,r))return;if(dt(e,r,"contextmenu"))return;k||e.display.input.onContextMenu(r)}function Xl(e,r){return Te(e,"gutterContextMenu")?nl(e,r,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jt(e)}var Co={toString:function(){return"CodeMirror.Init"}},il={},qo={};function $l(e){var r=e.optionHandlers;function D(O,N,X,q){e.defaults[O]=N,X&&(r[O]=q?function(re,se,pe){pe!=Co&&X(re,se,pe)}:X)}e.defineOption=D,e.Init=Co,D("value","",function(O,N){return O.setValue(N)},!0),D("mode",null,function(O,N){O.doc.modeOption=N,Da(O)},!0),D("indentUnit",2,Da,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(O){Xa(O),jt(O),Vr(O)},!0),D("lineSeparator",null,function(O,N){if(O.doc.lineSep=N,!N)return;var X=[],q=O.doc.first;O.doc.iter(function(se){for(var pe=0;;){var Ve=se.text.indexOf(N,pe);if(Ve==-1)break;pe=Ve+N.length,X.push(fn(q,Ve))}q++});for(var re=X.length-1;re>=0;re--)_o(O.doc,N,X[re],fn(X[re].line,X[re].ch+N.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,N,X){O.state.specialChars=new RegExp(N.source+(N.test(" ")?"":"| "),"g"),X!=Co&&O.refresh()}),D("specialCharPlaceholder",Dn,function(O){return O.refresh()},!0),D("electricChars",!0),D("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(O,N){return O.getInputField().spellcheck=N},!0),D("autocorrect",!1,function(O,N){return O.getInputField().autocorrect=N},!0),D("autocapitalize",!1,function(O,N){return O.getInputField().autocapitalize=N},!0),D("rtlMoveVisually",!x),D("wholeLineUpdateBefore",!0),D("theme","default",function(O){al(O),di(O)},!0),D("keyMap","default",function(O,N,X){var q=Jo(N),re=X!=Co&&Jo(X);re&&re.detach&&re.detach(O,q),q.attach&&q.attach(O,re||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Jl,!0),D("gutters",[],function(O,N){O.display.gutterSpecs=Fa(N,O.options.lineNumbers),di(O)},!0),D("fixedGutter",!0,function(O,N){O.display.gutters.style.left=N?la(O.display)+"px":"0",O.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(O){return mi(O)},!0),D("scrollbarStyle","native",function(O){Qi(O),mi(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),D("lineNumbers",!1,function(O,N){O.display.gutterSpecs=Fa(O.options.gutters,N),di(O)},!0),D("firstLineNumber",1,di,!0),D("lineNumberFormatter",function(O){return O},di,!0),D("showCursorWhenSelecting",!1,Yr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(O,N){N=="nocursor"&&(Ci(O),O.display.input.blur()),O.display.input.readOnlyChanged(N)}),D("screenReaderLabel",null,function(O,N){N=N===""?null:N,O.display.input.screenReaderLabelChanged(N)}),D("disableInput",!1,function(O,N){N||O.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,Yr,!0),D("singleCursorHeightPerLine",!0,Yr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,Xa,!0),D("addModeClass",!1,Xa,!0),D("pollInterval",100),D("undoDepth",200,function(O,N){return O.doc.history.undoDepth=N}),D("historyEventDelay",1250),D("viewportMargin",10,function(O){return O.refresh()},!0),D("maxHighlightLength",1e4,Xa,!0),D("moveInputWithCursor",!0,function(O,N){N||O.display.input.resetPosition()}),D("tabindex",null,function(O,N){return O.display.input.getField().tabIndex=N||""}),D("autofocus",null),D("direction","ltr",function(O,N){return O.doc.setDirection(N)},!0),D("phrases",null)}function Ql(e,r,D){var O=D&&D!=Co;if(!r!=!O){var N=e.display.dragFunctions,X=r?Ae:Et;X(e.display.scroller,"dragstart",N.start),X(e.display.scroller,"dragenter",N.enter),X(e.display.scroller,"dragover",N.over),X(e.display.scroller,"dragleave",N.leave),X(e.display.scroller,"drop",N.drop)}}function Jl(e){e.options.lineWrapping?(U(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),Ht(e)),ja(e),Vr(e),jt(e),setTimeout(function(){return mi(e)},100)}function pa(e,r){var D=this;if(!(this instanceof pa))return new pa(e,r);this.options=r=r?M(r):{},M(il,r,!1);var O=r.value;typeof O=="string"?O=new ei(O,r.mode,null,r.lineSeparator,r.direction):r.mode&&(O.modeOption=r.mode),this.doc=O;var N=new pa.inputStyles[r.inputStyle](this),X=this.display=new Ui(e,O,N,r);X.wrapper.CodeMirror=this,al(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Qi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new K,keySeq:null,specialChars:null},r.autofocus&&!n&&X.input.focus(),P&&m<11&&setTimeout(function(){return D.display.input.reset(!0)},20),Zl(this),Al(),ui(this),this.curOp.forceUpdate=!0,vs(this,O),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&li(D)},20):Ci(this);for(var q in qo)qo.hasOwnProperty(q)&&qo[q](this,r[q],Co);oa(this),r.finishInit&&r.finishInit(this);for(var re=0;re<hs.length;++re)hs[re](this);Ei(this),t&&r.lineWrapping&&getComputedStyle(X.lineDiv).textRendering=="optimizelegibility"&&(X.lineDiv.style.textRendering="auto")}pa.defaults=il,pa.optionHandlers=qo;function Zl(e){var r=e.display;Ae(r.scroller,"mousedown",ha(e,el)),P&&m<11?Ae(r.scroller,"dblclick",ha(e,function(se){if(dt(e,se))return;var pe=Ca(e,se);if(!pe||cs(e,se)||Ra(e.display,se))return;ae(se);var Ve=e.findWordAt(pe);Vo(e.doc,Ve.anchor,Ve.head)})):Ae(r.scroller,"dblclick",function(se){return dt(e,se)||ae(se)}),Ae(r.scroller,"contextmenu",function(se){return rl(e,se)}),Ae(r.input.getField(),"contextmenu",function(se){r.scroller.contains(se.target)||rl(e,se)});var D,O={end:0};function N(){r.activeTouch&&(D=setTimeout(function(){return r.activeTouch=null},1e3),O=r.activeTouch,O.end=+new Date)}function X(se){if(se.touches.length!=1)return!1;var pe=se.touches[0];return pe.radiusX<=1&&pe.radiusY<=1}function q(se,pe){if(pe.left==null)return!0;var Ve=pe.left-se.left,nt=pe.top-se.top;return Ve*Ve+nt*nt>20*20}Ae(r.scroller,"touchstart",function(se){if(!dt(e,se)&&!X(se)&&!cs(e,se)){r.input.ensurePolled(),clearTimeout(D);var pe=+new Date;r.activeTouch={start:pe,moved:!1,prev:pe-O.end<=300?O:null},se.touches.length==1&&(r.activeTouch.left=se.touches[0].pageX,r.activeTouch.top=se.touches[0].pageY)}}),Ae(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ae(r.scroller,"touchend",function(se){var pe=r.activeTouch;if(pe&&!Ra(r,se)&&pe.left!=null&&!pe.moved&&new Date-pe.start<300){var Ve=e.coordsChar(r.activeTouch,"page"),nt;!pe.prev||q(pe,pe.prev)?nt=new Fr(Ve,Ve):!pe.prev.prev||q(pe,pe.prev.prev)?nt=e.findWordAt(Ve):nt=new Fr(fn(Ve.line,0),W(e.doc,fn(Ve.line+1,0))),e.setSelection(nt.anchor,nt.head),e.focus(),ae(se)}N()}),Ae(r.scroller,"touchcancel",N),Ae(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Di(e,r.scroller.scrollTop),Ia(e,r.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),Ae(r.scroller,"mousewheel",function(se){return Hi(e,se)}),Ae(r.scroller,"DOMMouseScroll",function(se){return Hi(e,se)}),Ae(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(se){dt(e,se)||_e(se)},over:function(se){dt(e,se)||(Rl(e,se),_e(se))},start:function(se){return Ol(e,se)},drop:ha(e,Sl),leave:function(se){dt(e,se)||Hs(e)}};var re=r.input.getField();Ae(re,"keyup",function(se){return Zs.call(e,se)}),Ae(re,"keydown",ha(e,Js)),Ae(re,"keypress",ha(e,qs)),Ae(re,"focus",function(se){return li(e,se)}),Ae(re,"blur",function(se){return Ci(e,se)})}var hs=[];pa.defineInitHook=function(e){return hs.push(e)};function zo(e,r,D,O){var N=e.doc,X;D==null&&(D="add"),D=="smart"&&(N.mode.indent?X=An(e,r).state:D="prev");var q=e.options.tabSize,re=En(N,r),se=V(re.text,null,q);re.stateAfter&&(re.stateAfter=null);var pe=re.text.match(/^\s*/)[0],Ve;if(!O&&!/\S/.test(re.text))Ve=0,D="not";else if(D=="smart"&&(Ve=N.mode.indent(X,re.text.slice(pe.length),re.text),Ve==me||Ve>150)){if(!O)return;D="prev"}D=="prev"?r>N.first?Ve=V(En(N,r-1).text,null,q):Ve=0:D=="add"?Ve=se+e.options.indentUnit:D=="subtract"?Ve=se-e.options.indentUnit:typeof D=="number"&&(Ve=se+D),Ve=Math.max(0,Ve);var nt="",Dt=0;if(e.options.indentWithTabs)for(var Tt=Math.floor(Ve/q);Tt;--Tt)Dt+=q,nt+=" ";if(Dt<Ve&&(nt+=de(Ve-Dt)),nt!=pe)return _o(N,nt,fn(r,0),fn(r,pe.length),"+input"),re.stateAfter=null,!0;for(var an=0;an<N.sel.ranges.length;an++){var yn=N.sel.ranges[an];if(yn.head.line==r&&yn.head.ch<pe.length){var Ln=fn(r,pe.length);is(N,an,new Fr(Ln,Ln));break}}}var wi=null;function es(e){wi=e}function fs(e,r,D,O,N){var X=e.doc;e.display.shift=!1,O||(O=X.sel);var q=+new Date-200,re=N=="paste"||e.state.pasteIncoming>q,se=Ot(r),pe=null;if(re&&O.ranges.length>1)if(wi&&wi.text.join(`
`)==r){if(O.ranges.length%wi.text.length==0){pe=[];for(var Ve=0;Ve<wi.text.length;Ve++)pe.push(X.splitLines(wi.text[Ve]))}}else se.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(pe=Rt(se,function(jn){return[jn]}));for(var nt=e.curOp.updateInput,Dt=O.ranges.length-1;Dt>=0;Dt--){var Tt=O.ranges[Dt],an=Tt.from(),yn=Tt.to();Tt.empty()&&(D&&D>0?an=fn(an.line,an.ch-D):e.state.overwrite&&!re?yn=fn(yn.line,Math.min(En(X,yn.line).text.length,yn.ch+Je(se).length)):re&&wi&&wi.lineWise&&wi.text.join(`
`)==se.join(`
`)&&(an=yn=fn(an.line,0)));var Ln={from:an,to:yn,text:pe?pe[Dt%pe.length]:se,origin:N||(re?"paste":e.state.cutIncoming>q?"cut":"+input")};bo(e.doc,Ln),Jn(e,"inputRead",e,Ln)}r&&!re&&sl(e,r),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=nt),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ol(e,r){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Wa(r,function(){return fs(r,D,0,null,"paste")}),!0}function sl(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,O=D.ranges.length-1;O>=0;O--){var N=D.ranges[O];if(N.head.ch>100||O&&D.ranges[O-1].head.line==N.head.line)continue;var X=e.getModeAt(N.head),q=!1;if(X.electricChars){for(var re=0;re<X.electricChars.length;re++)if(r.indexOf(X.electricChars.charAt(re))>-1){q=zo(e,N.head.line,"smart");break}}else X.electricInput&&(X.electricInput.test(En(e.doc,N.head.line).text.slice(0,N.head.ch))&&(q=zo(e,N.head.line,"smart")));q&&Jn(e,"electricInput",e,N.head.line)}}function ll(e){for(var r=[],D=[],O=0;O<e.doc.sel.ranges.length;O++){var N=e.doc.sel.ranges[O].head.line,X={anchor:fn(N,0),head:fn(N+1,0)};D.push(X),r.push(e.getRange(X.anchor,X.head))}return{text:r,ranges:D}}function ul(e,r,D,O){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=v("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=v("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(e.style.border="1px solid black"),ul(e),r}function ql(e){var r=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,N){var X=this.options,q=X[O];if(X[O]==N&&O!="mode")return;X[O]=N,r.hasOwnProperty(O)&&ha(this,r[O])(this,N,q),Ze(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,N){this.state.keyMaps[N?"push":"unshift"](Jo(O))},removeKeyMap:function(O){for(var N=this.state.keyMaps,X=0;X<N.length;++X)if(N[X]==O||N[X].name==O)return N.splice(X,1),!0},addOverlay:Aa(function(O,N){var X=O.token?O:e.getMode(this.options,O);if(X.startState)throw new Error("Overlays may not be stateful.");Ee(this.state.overlays,{mode:X,modeSpec:O,opaque:N&&N.opaque,priority:N&&N.priority||0},function(q){return q.priority}),this.state.modeGen++,Vr(this)}),removeOverlay:Aa(function(O){for(var N=this.state.overlays,X=0;X<N.length;++X){var q=N[X].modeSpec;if(q==O||typeof O=="string"&&q.name==O){N.splice(X,1),this.state.modeGen++,Vr(this);return}}}),indentLine:Aa(function(O,N,X){typeof N!="string"&&typeof N!="number"&&(N==null?N=this.options.smartIndent?"smart":"prev":N=N?"add":"subtract"),Kr(this.doc,O)&&zo(this,O,N,X)}),indentSelection:Aa(function(O){for(var N=this.doc.sel.ranges,X=-1,q=0;q<N.length;q++){var re=N[q];if(re.empty())re.head.line>X&&(zo(this,re.head.line,O,!0),X=re.head.line,q==this.doc.sel.primIndex&&yi(this));else{var se=re.from(),pe=re.to(),Ve=Math.max(X,se.line);X=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var nt=Ve;nt<X;++nt)zo(this,nt,O);var Dt=this.doc.sel.ranges;se.ch==0&&N.length==Dt.length&&Dt[q].from().ch>0&&is(this.doc,q,new Fr(se,Dt[q].to()),oe)}}}),getTokenAt:function(O,N){return dn(this,O,N)},getLineTokens:function(O,N){return dn(this,fn(O),N,!0)},getTokenTypeAt:function(O){O=W(this.doc,O);var N=tn(this,En(this.doc,O.line)),X=0,q=(N.length-1)/2,re=O.ch,se;if(re==0)se=N[2];else for(;;){var pe=X+q>>1;if((pe?N[pe*2-1]:0)>=re)q=pe;else if(N[pe*2+1]<re)X=pe+1;else{se=N[pe*2+2];break}}var Ve=se?se.indexOf("overlay "):-1;return Ve<0?se:Ve==0?null:se.slice(0,Ve-1)},getModeAt:function(O){var N=this.doc.mode;return N.innerMode?e.innerMode(N,this.getTokenAt(O).state).mode:N},getHelper:function(O,N){return this.getHelpers(O,N)[0]},getHelpers:function(O,N){var X=[];if(!D.hasOwnProperty(N))return X;var q=D[N],re=this.getModeAt(O);if(typeof re[N]=="string")q[re[N]]&&X.push(q[re[N]]);else if(re[N])for(var se=0;se<re[N].length;se++){var pe=q[re[N][se]];pe&&X.push(pe)}else re.helperType&&q[re.helperType]?X.push(q[re.helperType]):q[re.name]&&X.push(q[re.name]);for(var Ve=0;Ve<q._global.length;Ve++){var nt=q._global[Ve];nt.pred(re,this)&&$(X,nt.val)==-1&&X.push(nt.val)}return X},getStateAfter:function(O,N){var X=this.doc;return O=te(X,O==null?X.first+X.size-1:O),An(this,O+1,N).state},cursorCoords:function(O,N){var X,q=this.doc.sel.primary();return O==null?X=q.head:typeof O=="object"?X=W(this.doc,O):X=O?q.from():q.to(),ir(this,X,N||"page")},charCoords:function(O,N){return Cr(this,W(this.doc,O),N||"page")},coordsChar:function(O,N){return O=qn(this,O,N||"page"),vr(this,O.left,O.top)},lineAtHeight:function(O,N){return O=qn(this,{top:O,left:0},N||"page").top,Rr(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,N,X){var q=!1,re;if(typeof O=="number"){var se=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>se&&(O=se,q=!0),re=En(this.doc,O)}else re=O;return yr(this,re,{top:0,left:0},N||"page",X||q).top+(q?this.doc.height-Gt(re):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,N,X,q,re){var se=this.display;O=ir(this,W(this.doc,O));var pe=O.bottom,Ve=O.left;if(N.style.position="absolute",N.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(N),se.sizer.appendChild(N),q=="over")pe=O.top;else if(q=="above"||q=="near"){var nt=Math.max(se.wrapper.clientHeight,this.doc.height),Dt=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(q=="above"||O.bottom+N.offsetHeight>nt)&&O.top>N.offsetHeight?pe=O.top-N.offsetHeight:O.bottom+N.offsetHeight<=nt&&(pe=O.bottom),Ve+N.offsetWidth>Dt&&(Ve=Dt-N.offsetWidth)}N.style.top=pe+"px",N.style.left=N.style.right="",re=="right"?(Ve=se.sizer.clientWidth-N.offsetWidth,N.style.right="0px"):(re=="left"?Ve=0:re=="middle"&&(Ve=(se.sizer.clientWidth-N.offsetWidth)/2),N.style.left=Ve+"px"),X&&Gi(this,{left:Ve,top:pe,right:Ve+N.offsetWidth,bottom:pe+N.offsetHeight})},triggerOnKeyDown:Aa(Js),triggerOnKeyPress:Aa(qs),triggerOnKeyUp:Zs,triggerOnMouseDown:Aa(el),execCommand:function(O){if(Fo.hasOwnProperty(O))return Fo[O].call(null,this)},triggerElectric:Aa(function(O){sl(this,O)}),findPosH:function(O,N,X,q){var re=1;N<0&&(re=-1,N=-N);for(var se=W(this.doc,O),pe=0;pe<N&&!(se=ps(this.doc,se,re,X,q),se.hitSide);++pe);return se},moveH:Aa(function(O,N){var X=this;this.extendSelectionsBy(function(q){return X.display.shift||X.doc.extend||q.empty()?ps(X.doc,q.head,O,N,X.options.rtlMoveVisually):O<0?q.from():q.to()},ye)}),deleteH:Aa(function(O,N){var X=this.doc.sel,q=this.doc;X.somethingSelected()?q.replaceSelection("",null,"+delete"):wo(this,function(re){var se=ps(q,re.head,O,N,!1);return O<0?{from:se,to:re.head}:{from:re.head,to:se}})}),findPosV:function(O,N,X,q){var re=1,se=q;N<0&&(re=-1,N=-N);for(var pe=W(this.doc,O),Ve=0;Ve<N;++Ve){var nt=ir(this,pe,"div");if(se==null?se=nt.left:nt.left=se,pe=cl(this,nt,re,X),pe.hitSide)break}return pe},moveV:Aa(function(O,N){var X=this,q=this.doc,re=[],se=!this.display.shift&&!q.extend&&q.sel.somethingSelected();if(q.extendSelectionsBy(function(Ve){if(se)return O<0?Ve.from():Ve.to();var nt=ir(X,Ve.head,"div");Ve.goalColumn!=null&&(nt.left=Ve.goalColumn),re.push(nt.left);var Dt=cl(X,nt,O,N);return N=="page"&&Ve==q.sel.primary()&&Vi(X,Cr(X,Dt,"div").top-nt.top),Dt},ye),re.length)for(var pe=0;pe<q.sel.ranges.length;pe++)q.sel.ranges[pe].goalColumn=re[pe]}),findWordAt:function(O){var N=this.doc,X=En(N,O.line).text,q=O.ch,re=O.ch;if(X){var se=this.getHelper(O,"wordChars");(O.sticky=="before"||re==X.length)&&q?--q:++re;for(var pe=X.charAt(q),Ve=ht(pe,se)?function(nt){return ht(nt,se)}:/\s/.test(pe)?function(nt){return/\s/.test(nt)}:function(nt){return!/\s/.test(nt)&&!ht(nt)};q>0&&Ve(X.charAt(q-1));)--q;for(;re<X.length&&Ve(X.charAt(re));)++re}return new Fr(fn(O.line,q),fn(O.line,re))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?U(this.display.cursorDiv,"CodeMirror-overwrite"):y(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==j()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Aa(function(O,N){Ri(this,O,N)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-at(this)-this.display.barHeight,width:O.scrollWidth-at(this)-this.display.barWidth,clientHeight:ce(this),clientWidth:je(this)}},scrollIntoView:Aa(function(O,N){O==null?(O={from:this.doc.sel.primary().head,to:null},N==null&&(N=this.options.cursorScrollMargin)):typeof O=="number"?O={from:fn(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=N||0,O.from.line!=null?ho(this,O):Ai(this,O.from,O.to,O.margin)}),setSize:Aa(function(O,N){var X=this,q=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};O!=null&&(this.display.wrapper.style.width=q(O)),N!=null&&(this.display.wrapper.style.height=q(N)),this.options.lineWrapping&&on(this);var re=this.display.viewFrom;this.doc.iter(re,this.display.viewTo,function(se){if(se.widgets){for(var pe=0;pe<se.widgets.length;pe++)if(se.widgets[pe].noHScroll){Xr(X,re,"widget");break}}++re}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(O){return Wa(this,O)},startOperation:function(){return ui(this)},endOperation:function(){return Ei(this)},refresh:Aa(function(){var O=this.display.cachedTextHeight;Vr(this),this.curOp.forceUpdate=!0,jt(this),Ri(this,this.doc.scrollLeft,this.doc.scrollTop),Zi(this.display),(O==null||Math.abs(O-jr(this.display))>.5||this.options.lineWrapping)&&ja(this),Ze(this,"refresh",this)}),swapDoc:Aa(function(O){var N=this.doc;return N.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),jt(this),this.display.input.reset(),Ri(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,Jn(this,"swapDoc",this,N),N}),phrase:function(O){var N=this.options.phrases;return N&&Object.prototype.hasOwnProperty.call(N,O)?N[O]:O},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}},Oe(e),e.registerHelper=function(O,N,X){D.hasOwnProperty(O)||(D[O]=e[O]={_global:[]}),D[O][N]=X},e.registerGlobalHelper=function(O,N,X,q){e.registerHelper(O,N,q),D[O]._global.push({pred:X,val:q})}}function ps(e,r,D,O,N){var X=r,q=D,re=En(e,r.line),se=N&&e.direction=="rtl"?-D:D;function pe(){var Xn=r.line+se;return Xn<e.first||Xn>=e.first+e.size?!1:(r=new fn(Xn,r.ch,r.sticky),re=En(e,Xn))}function Ve(Xn){var Un;if(O=="codepoint"){var er=re.text.charCodeAt(r.ch+(O>0?0:-1));isNaN(er)?Un=null:Un=new fn(r.line,Math.max(0,Math.min(re.text.length,r.ch+D*(er>=55296&&er<56320?2:1))),-D)}else N?Un=Il(e.cm,re,r,D):Un=ss(re,r,D);if(Un==null)if(!Xn&&pe())r=ls(N,e.cm,re,r.line,se);else return!1;else r=Un;return!0}if(O=="char"||O=="codepoint")Ve();else if(O=="column")Ve(!0);else if(O=="word"||O=="group")for(var nt=null,Dt=O=="group",Tt=e.cm&&e.cm.getHelper(r,"wordChars"),an=!0;!(D<0&&!Ve(!an));an=!1){var yn=re.text.charAt(r.ch)||`
`,Ln=ht(yn,Tt)?"w":Dt&&yn==`
`?"n":!Dt||/\s/.test(yn)?null:"p";if(Dt&&!an&&!Ln&&(Ln="s"),nt&&nt!=Ln){D<0&&(D=1,Ve(),r.sticky="after");break}if(Ln&&(nt=Ln),D>0&&!Ve(!an))break}var jn=Xo(e,r,X,q,!0);return sa(X,jn)&&(jn.hitSide=!0),jn}function cl(e,r,D,O){var N=e.doc,X=r.left,q;if(O=="page"){var re=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(re-.5*jr(e.display),3);q=(D>0?r.bottom:r.top)+D*se}else O=="line"&&(q=D>0?r.bottom+3:r.top-3);for(var pe;!(pe=vr(e,X,q),!pe.outside);){if(D<0?q<=0:q>=N.height){pe.hitSide=!0;break}q+=D*5}return pe}var ta=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ta.prototype.init=function(e){var r=this,D=this,O=D.cm,N=D.div=e.lineDiv;ul(N,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function X(re){for(var se=re.target;se;se=se.parentNode){if(se==N)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}Ae(N,"paste",function(re){if(!X(re)||dt(O,re)||ol(re,O))return;m<=11&&setTimeout(ha(O,function(){return r.updateFromDOM()}),20)}),Ae(N,"compositionstart",function(re){r.composing={data:re.data,done:!1}}),Ae(N,"compositionupdate",function(re){r.composing||(r.composing={data:re.data,done:!1})}),Ae(N,"compositionend",function(re){r.composing&&(re.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ae(N,"touchstart",function(){return D.forceCompositionEnd()}),Ae(N,"input",function(){r.composing||r.readFromDOMSoon()});function q(re){if(!X(re)||dt(O,re))return;if(O.somethingSelected())es({lineWise:!1,text:O.getSelections()}),re.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var se=ll(O);es({lineWise:!0,text:se.text}),re.type=="cut"&&O.operation(function(){O.setSelections(se.ranges,0,oe),O.replaceSelection("",null,"cut")})}else return;if(re.clipboardData){re.clipboardData.clearData();var pe=wi.text.join(`
`);if(re.clipboardData.setData("Text",pe),re.clipboardData.getData("Text")==pe){re.preventDefault();return}}var Ve=dl(),nt=Ve.firstChild;O.display.lineSpace.insertBefore(Ve,O.display.lineSpace.firstChild),nt.value=wi.text.join(`
`);var Dt=document.activeElement;z(nt),setTimeout(function(){O.display.lineSpace.removeChild(Ve),Dt.focus(),Dt==N&&D.showPrimarySelection()},50)}Ae(N,"copy",q),Ae(N,"cut",q)},ta.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ta.prototype.prepareSelection=function(){var e=Ja(this.cm,!1);return e.focus=document.activeElement==this.div,e},ta.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},ta.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ta.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,D=r.doc.sel.primary(),O=D.from(),N=D.to();if(r.display.viewTo==r.display.viewFrom||O.line>=r.display.viewTo||N.line<r.display.viewFrom){e.removeAllRanges();return}var X=ts(r,e.anchorNode,e.anchorOffset),q=ts(r,e.focusNode,e.focusOffset);if(X&&!X.bad&&q&&!q.bad&&or(na(X,q),O)==0&&or(Jr(X,q),N)==0)return;var re=r.display.view,se=O.line>=r.display.viewFrom&&hl(r,O)||{node:re[0].measure.map[2],offset:0},pe=N.line<r.display.viewTo&&hl(r,N);if(!pe){var Ve=re[re.length-1].measure,nt=Ve.maps?Ve.maps[Ve.maps.length-1]:Ve.map;pe={node:nt[nt.length-1],offset:nt[nt.length-2]-nt[nt.length-3]}}if(!se||!pe){e.removeAllRanges();return}var Dt=e.rangeCount&&e.getRangeAt(0),Tt;try{Tt=E(se.node,se.offset,pe.offset,pe.node)}catch(an){}Tt&&(!I&&r.state.focused?(e.collapse(se.node,se.offset),Tt.collapsed||(e.removeAllRanges(),e.addRange(Tt))):(e.removeAllRanges(),e.addRange(Tt)),Dt&&e.anchorNode==null?e.addRange(Dt):I&&this.startGracePeriod()),this.rememberSelection()},ta.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)},ta.prototype.showMultipleSelections=function(e){p(this.cm.display.cursorDiv,e.cursors),p(this.cm.display.selectionDiv,e.selection)},ta.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ta.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return g(this.div,r)},ta.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ta.prototype.blur=function(){this.div.blur()},ta.prototype.getField=function(){return this.div},ta.prototype.supportsTouch=function(){return!0},ta.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Wa(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)},ta.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ta.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(s&&o&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var D=ts(r,e.anchorNode,e.anchorOffset),O=ts(r,e.focusNode,e.focusOffset);D&&O&&Wa(r,function(){Ga(r.doc,Fn(D,O),oe),(D.bad||O.bad)&&(r.curOp.selectionChanged=!0)})},ta.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,D=e.doc.sel.primary(),O=D.from(),N=D.to();if(O.ch==0&&O.line>e.firstLine()&&(O=fn(O.line-1,En(e.doc,O.line-1).length)),N.ch==En(e.doc,N.line).text.length&&N.line<e.lastLine()&&(N=fn(N.line+1,0)),O.line<r.viewFrom||N.line>r.viewTo-1)return!1;var X,q,re;O.line==r.viewFrom||(X=qr(e,O.line))==0?(q=ur(r.view[0].line),re=r.view[0].node):(q=ur(r.view[X].line),re=r.view[X-1].node.nextSibling);var se=qr(e,N.line),pe,Ve;if(se==r.view.length-1?(pe=r.viewTo-1,Ve=r.lineDiv.lastChild):(pe=ur(r.view[se+1].line)-1,Ve=r.view[se+1].node.previousSibling),!re)return!1;for(var nt=e.doc.splitLines(tu(e,re,Ve,q,pe)),Dt=xr(e.doc,fn(q,0),fn(pe,En(e.doc,pe).text.length));nt.length>1&&Dt.length>1;)if(Je(nt)==Je(Dt))nt.pop(),Dt.pop(),pe--;else if(nt[0]==Dt[0])nt.shift(),Dt.shift(),q++;else break;for(var Tt=0,an=0,yn=nt[0],Ln=Dt[0],jn=Math.min(yn.length,Ln.length);Tt<jn&&yn.charCodeAt(Tt)==Ln.charCodeAt(Tt);)++Tt;for(var Xn=Je(nt),Un=Je(Dt),er=Math.min(Xn.length-(nt.length==1?Tt:0),Un.length-(Dt.length==1?Tt:0));an<er&&Xn.charCodeAt(Xn.length-an-1)==Un.charCodeAt(Un.length-an-1);)++an;if(nt.length==1&&Dt.length==1&&q==O.line)for(;Tt&&Tt>O.ch&&Xn.charCodeAt(Xn.length-an-1)==Un.charCodeAt(Un.length-an-1);)Tt--,an++;nt[nt.length-1]=Xn.slice(0,Xn.length-an).replace(/^\u200b+/,""),nt[0]=nt[0].slice(Tt).replace(/\u200b+$/,"");var br=fn(q,Tt),mr=fn(pe,Dt.length?Je(Dt).length-an:0);if(nt.length>1||nt[0]||or(br,mr))return _o(e.doc,nt,br,mr,"+input"),!0},ta.prototype.ensurePolled=function(){this.forceCompositionEnd()},ta.prototype.reset=function(){this.forceCompositionEnd()},ta.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ta.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)},ta.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wa(this.cm,function(){return Vr(e.cm)})},ta.prototype.setUneditable=function(e){e.contentEditable="false"},ta.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ha(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},ta.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},ta.prototype.onContextMenu=function(){},ta.prototype.resetPosition=function(){},ta.prototype.needsContentAttribute=!0;function hl(e,r){var D=ot(e,r.line);if(!D||D.hidden)return null;var O=En(e.doc,r.line),N=ge(D,O,r.line),X=qt(O,e.doc.direction),q="left";if(X){var re=We(X,r.ch);q=re%2?"right":"left"}var se=rn(N.map,r.ch,q);return se.offset=se.collapse=="right"?se.end:se.start,se}function eu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function To(e,r){return r&&(e.bad=!0),e}function tu(e,r,D,O,N){var X="",q=!1,re=e.doc.lineSeparator(),se=!1;function pe(Tt){return function(an){return an.id==Tt}}function Ve(){q&&(X+=re,se&&(X+=re),q=se=!1)}function nt(Tt){Tt&&(Ve(),X+=Tt)}function Dt(Tt){if(Tt.nodeType==1){var an=Tt.getAttribute("cm-text");if(an){nt(an);return}var yn=Tt.getAttribute("cm-marker"),Ln;if(yn){var jn=e.findMarks(fn(O,0),fn(N+1,0),pe(+yn));jn.length&&(Ln=jn[0].find(0))&&nt(xr(e.doc,Ln.from,Ln.to).join(re));return}if(Tt.getAttribute("contenteditable")=="false")return;var Xn=/^(pre|div|p|li|table|br)$/i.test(Tt.nodeName);if(!/^br$/i.test(Tt.nodeName)&&Tt.textContent.length==0)return;Xn&&Ve();for(var Un=0;Un<Tt.childNodes.length;Un++)Dt(Tt.childNodes[Un]);/^(pre|p)$/i.test(Tt.nodeName)&&(se=!0),Xn&&(q=!0)}else Tt.nodeType==3&&nt(Tt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Dt(r),r==D);)r=r.nextSibling,se=!1;return X}function ts(e,r,D){var O;if(r==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[D],!O)return To(e.clipPos(fn(e.display.viewTo-1)),!0);r=null,D=0}else for(O=r;;O=O.parentNode){if(!O||O==e.display.lineDiv)return null;if(O.parentNode&&O.parentNode==e.display.lineDiv)break}for(var N=0;N<e.display.view.length;N++){var X=e.display.view[N];if(X.node==O)return nu(X,r,D)}}function nu(e,r,D){var O=e.text.firstChild,N=!1;if(!r||!g(O,r))return To(fn(ur(e.line),0),!0);if(r==O&&(N=!0,r=O.childNodes[D],D=0,!r)){var X=e.rest?Je(e.rest):e.line;return To(fn(ur(X),X.text.length),N)}var q=r.nodeType==3?r:null,re=r;for(!q&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(q=r.firstChild,D&&(D=q.nodeValue.length));re.parentNode!=O;)re=re.parentNode;var se=e.measure,pe=se.maps;function Ve(Ln,jn,Xn){for(var Un=-1;Un<(pe?pe.length:0);Un++)for(var er=Un<0?se.map:pe[Un],br=0;br<er.length;br+=3){var mr=er[br+2];if(mr==Ln||mr==jn){var kr=ur(Un<0?e.line:e.rest[Un]),ia=er[br]+Xn;return(Xn<0||mr!=Ln)&&(ia=er[br+(Xn?1:0)]),fn(kr,ia)}}}var nt=Ve(q,re,D);if(nt)return To(nt,N);for(var Dt=re.nextSibling,Tt=q?q.nodeValue.length-D:0;Dt;Dt=Dt.nextSibling){if(nt=Ve(Dt,Dt.firstChild,0),nt)return To(fn(nt.line,nt.ch-Tt),N);Tt+=Dt.textContent.length}for(var an=re.previousSibling,yn=D;an;an=an.previousSibling){if(nt=Ve(an,an.firstChild,-1),nt)return To(fn(nt.line,nt.ch+yn),N);yn+=an.textContent.length}}var Sa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null};Sa.prototype.init=function(e){var r=this,D=this,O=this.cm;this.createField(e);var N=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(N.style.width="0px"),Ae(N,"input",function(){P&&m>=9&&r.hasSelection&&(r.hasSelection=null),D.poll()}),Ae(N,"paste",function(q){if(dt(O,q)||ol(q,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function X(q){if(dt(O,q))return;if(O.somethingSelected())es({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var re=ll(O);es({lineWise:!0,text:re.text}),q.type=="cut"?O.setSelections(re.ranges,null,oe):(D.prevInput="",N.value=re.text.join(`
`),z(N))}else return;q.type=="cut"&&(O.state.cutIncoming=+new Date)}Ae(N,"cut",X),Ae(N,"copy",X),Ae(e.scroller,"paste",function(q){if(Ra(e,q)||dt(O,q))return;if(!N.dispatchEvent){O.state.pasteIncoming=+new Date,D.focus();return}var re=new Event("paste");re.clipboardData=q.clipboardData,N.dispatchEvent(re)}),Ae(e.lineSpace,"selectstart",function(q){Ra(e,q)||ae(q)}),Ae(N,"compositionstart",function(){var q=O.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:q,range:O.markText(q,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Ae(N,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Sa.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Sa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Sa.prototype.prepareSelection=function(){var e=this.cm,r=e.display,D=e.doc,O=Ja(e);if(e.options.moveInputWithCursor){var N=ir(e,D.sel.primary().head,"div"),X=r.wrapper.getBoundingClientRect(),q=r.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,N.top+q.top-X.top)),O.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,N.left+q.left-X.left))}return O},Sa.prototype.showSelection=function(e){var r=this.cm,D=r.display;p(D.cursorDiv,e.cursors),p(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Sa.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var D=r.getSelection();this.textarea.value=D,r.state.focused&&z(this.textarea),P&&m>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",P&&m>=9&&(this.hasSelection=null))},Sa.prototype.getField=function(){return this.textarea},Sa.prototype.supportsTouch=function(){return!1},Sa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},Sa.prototype.blur=function(){this.textarea.blur()},Sa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Sa.prototype.receivedFocus=function(){this.slowPoll()},Sa.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()})},Sa.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function D(){var O=r.poll();!O&&!e?(e=!0,r.polling.set(60,D)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,D)},Sa.prototype.poll=function(){var e=this,r=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!r.state.focused||At(D)&&!O&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var N=D.value;if(N==O&&!r.somethingSelected())return!1;if(P&&m>=9&&this.hasSelection===N||l&&/[\uf700-\uf7ff]/.test(N))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var X=N.charCodeAt(0);if(X==8203&&!O&&(O="\u200B"),X==8666)return this.reset(),this.cm.execCommand("undo")}for(var q=0,re=Math.min(O.length,N.length);q<re&&O.charCodeAt(q)==N.charCodeAt(q);)++q;return Wa(r,function(){fs(r,N.slice(q),O.length-q,null,e.composing?"*compose":null),N.length>1e3||N.indexOf(`
`)>-1?D.value=e.prevInput="":e.prevInput=N,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Sa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Sa.prototype.onKeyPress=function(){P&&m>=9&&(this.hasSelection=null),this.fastPoll()},Sa.prototype.onContextMenu=function(e){var r=this,D=r.cm,O=D.display,N=r.textarea;r.contextMenuPending&&r.contextMenuPending();var X=Ca(D,e),q=O.scroller.scrollTop;if(!X||u)return;var re=D.options.resetSelectionOnContextMenu;re&&D.doc.sel.contains(X)==-1&&ha(D,Ga)(D.doc,Fn(X),oe);var se=N.style.cssText,pe=r.wrapper.style.cssText,Ve=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",N.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: `+(P?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var nt;t&&(nt=window.scrollY),O.input.focus(),t&&window.scrollTo(null,nt),O.input.reset(),D.somethingSelected()||(N.value=r.prevInput=" "),r.contextMenuPending=Tt,O.selForContextMenu=D.doc.sel,clearTimeout(O.detectingSelectAll);function Dt(){if(N.selectionStart!=null){var yn=D.somethingSelected(),Ln="\u200B"+(yn?N.value:"");N.value="\u21DA",N.value=Ln,r.prevInput=yn?"":"\u200B",N.selectionStart=1,N.selectionEnd=Ln.length,O.selForContextMenu=D.doc.sel}}function Tt(){if(r.contextMenuPending!=Tt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=pe,N.style.cssText=se,P&&m<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=q),N.selectionStart!=null){(!P||P&&m<9)&&Dt();var yn=0,Ln=function(){O.selForContextMenu==D.doc.sel&&N.selectionStart==0&&N.selectionEnd>0&&r.prevInput=="\u200B"?ha(D,Ds)(D):yn++<10?O.detectingSelectAll=setTimeout(Ln,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(Ln,200)}}if(P&&m>=9&&Dt(),k){_e(e);var an=function(){Et(window,"mouseup",an),setTimeout(Tt,20)};Ae(window,"mouseup",an)}else setTimeout(Tt,50)},Sa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Sa.prototype.setUneditable=function(){},Sa.prototype.needsContentAttribute=!1;function ru(e,r){if(r=r?M(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 D=j();r.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function O(){e.value=re.getValue()}var N;if(e.form&&(Ae(e.form,"submit",O),!r.leaveSubmitMethodAlone)){var X=e.form;N=X.submit;try{var q=X.submit=function(){O(),X.submit=N,X.submit(),X.submit=q}}catch(se){}}r.finishInit=function(se){se.save=O,se.getTextArea=function(){return e},se.toTextArea=function(){se.toTextArea=isNaN,O(),e.parentNode.removeChild(se.getWrapperElement()),e.style.display="",e.form&&(Et(e.form,"submit",O),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=N))}},e.style.display="none";var re=pa(function(se){return e.parentNode.insertBefore(se,e.nextSibling)},r);return re}function au(e){e.off=Et,e.on=Ae,e.wheelEventPixels=Bi,e.Doc=ei,e.splitLines=Ot,e.countColumn=V,e.findColumn=Ie,e.isWordChar=ke,e.Pass=me,e.signal=Ze,e.Line=Sn,e.changeEnd=lr,e.scrollbarModel=$i,e.Pos=fn,e.cmpPos=or,e.modes=Nt,e.mimeModes=bt,e.resolveMode=Ge,e.getMode=lt,e.modeExtensions=Lt,e.extendMode=Wt,e.copyState=ln,e.startState=tr,e.innerMode=gn,e.commands=Fo,e.keyMap=zi,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=xo,e.normalizeKeyMap=Pl,e.StringStream=Wn,e.SharedTextMarker=No,e.TextMarker=qi,e.LineWidget=ko,e.e_preventDefault=ae,e.e_stopPropagation=le,e.e_stop=_e,e.addClass=U,e.contains=g,e.rmClass=y,e.keyNames=eo}$l(pa),ql(pa);var iu="iter insert remove copy getEditor constructor".split(" ");for(var ns in ei.prototype)ei.prototype.hasOwnProperty(ns)&&$(iu,ns)<0&&(pa.prototype[ns]=function(e){return function(){return e.apply(this.doc,arguments)}}(ei.prototype[ns]));return Oe(ei),pa.inputStyles={textarea:Sa,contenteditable:ta},pa.defineMode=function(e){!pa.defaults.mode&&e!="null"&&(pa.defaults.mode=e),Kt.apply(this,arguments)},pa.defineMIME=Zt,pa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),pa.defineMIME("text/plain","null"),pa.defineExtension=function(e,r){pa.prototype[e]=r},pa.defineDocExtension=function(e,r){ei.prototype[e]=r},pa.fromTextArea=ru,au(pa),pa.version="5.58.2",pa})},WaYH:function(Be,J,L){"use strict";var Y=L("rePB"),B=L("Ff2n"),I=L("VTBJ"),F=L("1OyB"),T=L("vuIU"),R=L("JX7q"),P=L("Ji7U"),m=L("LK+K"),t=L("q1tI"),b=L("TSYQ"),o=L.n(b),u=L("sboe"),f=L("OZM5"),a=function(k){var w=k.prefixCls,y=k.level,h=k.isStart,p=k.isEnd;if(!y)return null;for(var v="".concat(w,"-indent-unit"),_=[],E=0;E<y;E+=1){var g;_.push(t.createElement("span",{key:E,className:o()(v,(g={},Object(Y.a)(g,"".concat(v,"-start"),h[E+1]),Object(Y.a)(g,"".concat(v,"-end"),p[E+1]),Object(Y.a)(g,"".concat(v,"-end-first-level"),!E&&p[0]),g))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(w,"-indent")},_)},i=a,d=L("815F"),s="open",n="close",l="---",c=function(C){Object(P.a)(w,C);var k=Object(m.a)(w);function w(){var y;return Object(F.a)(this,w),y=k.apply(this,arguments),y.state={dragNodeHighlight:!1},y.onSelectorClick=function(h){var p=y.props.context.onNodeClick;p(h,Object(d.b)(y.props)),y.isSelectable()?y.onSelect(h):y.onCheck(h)},y.onSelectorDoubleClick=function(h){var p=y.props.context.onNodeDoubleClick;p(h,Object(d.b)(y.props))},y.onSelect=function(h){if(y.isDisabled())return;var p=y.props.context.onNodeSelect;h.preventDefault(),p(h,Object(d.b)(y.props))},y.onCheck=function(h){if(y.isDisabled())return;var p=y.props,v=p.disableCheckbox,_=p.checked,E=y.props.context.onNodeCheck;if(!y.isCheckable()||v)return;h.preventDefault();var g=!_;E(h,Object(d.b)(y.props),g)},y.onMouseEnter=function(h){var p=y.props.context.onNodeMouseEnter;p(h,Object(d.b)(y.props))},y.onMouseLeave=function(h){var p=y.props.context.onNodeMouseLeave;p(h,Object(d.b)(y.props))},y.onContextMenu=function(h){var p=y.props.context.onNodeContextMenu;p(h,Object(d.b)(y.props))},y.onDragStart=function(h){var p=y.props.context.onNodeDragStart;h.stopPropagation(),y.setState({dragNodeHighlight:!0}),p(h,Object(R.a)(y));try{h.dataTransfer.setData("text/plain","")}catch(v){}},y.onDragEnter=function(h){var p=y.props.context.onNodeDragEnter;h.preventDefault(),h.stopPropagation(),p(h,Object(R.a)(y))},y.onDragOver=function(h){var p=y.props.context.onNodeDragOver;h.preventDefault(),h.stopPropagation(),p(h,Object(R.a)(y))},y.onDragLeave=function(h){var p=y.props.context.onNodeDragLeave;h.stopPropagation(),p(h,Object(R.a)(y))},y.onDragEnd=function(h){var p=y.props.context.onNodeDragEnd;h.stopPropagation(),y.setState({dragNodeHighlight:!1}),p(h,Object(R.a)(y))},y.onDrop=function(h){var p=y.props.context.onNodeDrop;h.preventDefault(),h.stopPropagation(),y.setState({dragNodeHighlight:!1}),p(h,Object(R.a)(y))},y.onExpand=function(h){var p=y.props.context.onNodeExpand;p(h,Object(d.b)(y.props))},y.setSelectHandle=function(h){y.selectHandle=h},y.getNodeState=function(){var h=y.props.expanded;return y.isLeaf()?null:h?s:n},y.hasChildren=function(){var h=y.props.eventKey,p=y.props.context.keyEntities,v=p[h]||{},_=v.children;return!!(_||[]).length},y.isLeaf=function(){var h=y.props,p=h.isLeaf,v=h.loaded,_=y.props.context.loadData,E=y.hasChildren();return p===!1?!1:p||!_&&!E||_&&v&&!E},y.isDisabled=function(){var h=y.props.disabled,p=y.props.context.disabled;return!!(p||h)},y.isCheckable=function(){var h=y.props.checkable,p=y.props.context.checkable;return!p||h===!1?!1:p},y.syncLoadData=function(h){var p=h.expanded,v=h.loading,_=h.loaded,E=y.props.context,g=E.loadData,j=E.onNodeLoad;if(v)return;g&&p&&!y.isLeaf()&&(!y.hasChildren()&&!_&&j(Object(d.b)(y.props)))},y.renderSwitcher=function(){var h=y.props,p=h.expanded,v=h.switcherIcon,_=y.props.context,E=_.prefixCls,g=_.switcherIcon,j=v||g;if(y.isLeaf())return t.createElement("span",{className:o()("".concat(E,"-switcher"),"".concat(E,"-switcher-noop"))},typeof j=="function"?j(Object(I.a)(Object(I.a)({},y.props),{},{isLeaf:!0})):j);var U=o()("".concat(E,"-switcher"),"".concat(E,"-switcher_").concat(p?s:n));return t.createElement("span",{onClick:y.onExpand,className:U},typeof j=="function"?j(Object(I.a)(Object(I.a)({},y.props),{},{isLeaf:!1})):j)},y.renderCheckbox=function(){var h=y.props,p=h.checked,v=h.halfChecked,_=h.disableCheckbox,E=y.props.context.prefixCls,g=y.isDisabled(),j=y.isCheckable();if(!j)return null;var U=typeof j!="boolean"?j:null;return t.createElement("span",{className:o()("".concat(E,"-checkbox"),p&&"".concat(E,"-checkbox-checked"),!p&&v&&"".concat(E,"-checkbox-indeterminate"),(g||_)&&"".concat(E,"-checkbox-disabled")),onClick:y.onCheck},U)},y.renderIcon=function(){var h=y.props.loading,p=y.props.context.prefixCls;return t.createElement("span",{className:o()("".concat(p,"-iconEle"),"".concat(p,"-icon__").concat(y.getNodeState()||"docu"),h&&"".concat(p,"-icon_loading"))})},y.renderSelector=function(){var h=y.state.dragNodeHighlight,p=y.props,v=p.title,_=p.selected,E=p.icon,g=p.loading,j=p.data,U=y.props.context,S=U.prefixCls,z=U.showIcon,H=U.icon,M=U.draggable,V=U.loadData,K=U.titleRender,$=y.isDisabled(),Z="".concat(S,"-node-content-wrapper"),me;if(z){var oe=E||H;me=oe?t.createElement("span",{className:o()("".concat(S,"-iconEle"),"".concat(S,"-icon__customize"))},typeof oe=="function"?oe(y.props):oe):y.renderIcon()}else V&&g&&(me=y.renderIcon());var fe;typeof v=="function"?fe=v(j):K?fe=K(j):fe=v;var ye=t.createElement("span",{className:"".concat(S,"-title")},fe);return t.createElement("span",{ref:y.setSelectHandle,title:typeof v=="string"?v:"",className:o()("".concat(Z),"".concat(Z,"-").concat(y.getNodeState()||"normal"),!$&&(_||h)&&"".concat(S,"-node-selected"),!$&&M&&"draggable"),draggable:!$&&M||void 0,"aria-grabbed":!$&&M||void 0,onMouseEnter:y.onMouseEnter,onMouseLeave:y.onMouseLeave,onContextMenu:y.onContextMenu,onClick:y.onSelectorClick,onDoubleClick:y.onSelectorDoubleClick,onDragStart:M?y.onDragStart:void 0},me,ye)},y}return Object(T.a)(w,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var h=this.props.selectable,p=this.props.context.selectable;return typeof h=="boolean"?h:p}},{key:"render",value:function(){var h,p=this.props,v=p.eventKey,_=p.className,E=p.style,g=p.dragOver,j=p.dragOverGapTop,U=p.dragOverGapBottom,S=p.isLeaf,z=p.isStart,H=p.isEnd,M=p.expanded,V=p.selected,K=p.checked,$=p.halfChecked,Z=p.loading,me=p.domRef,oe=p.active,fe=p.onMouseMove,ye=Object(B.a)(p,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ie=this.props.context,ve=Ie.prefixCls,de=Ie.filterTreeNode,Je=Ie.draggable,Rt=Ie.keyEntities,Ee=this.isDisabled(),Me=Object(f.f)(ye),rt=Rt[v]||{},He=rt.level,ke=H[H.length-1];return t.createElement("div",Object.assign({ref:me,className:o()(_,"".concat(ve,"-treenode"),(h={},Object(Y.a)(h,"".concat(ve,"-treenode-disabled"),Ee),Object(Y.a)(h,"".concat(ve,"-treenode-switcher-").concat(M?"open":"close"),!S),Object(Y.a)(h,"".concat(ve,"-treenode-checkbox-checked"),K),Object(Y.a)(h,"".concat(ve,"-treenode-checkbox-indeterminate"),$),Object(Y.a)(h,"".concat(ve,"-treenode-selected"),V),Object(Y.a)(h,"".concat(ve,"-treenode-loading"),Z),Object(Y.a)(h,"".concat(ve,"-treenode-active"),oe),Object(Y.a)(h,"".concat(ve,"-treenode-leaf-last"),ke),Object(Y.a)(h,"drag-over",!Ee&&g),Object(Y.a)(h,"drag-over-gap-top",!Ee&&j),Object(Y.a)(h,"drag-over-gap-bottom",!Ee&&U),Object(Y.a)(h,"filter-node",de&&de(Object(d.b)(this.props))),h)),style:E,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:fe},Me),t.createElement(i,{prefixCls:ve,level:He,isStart:z,isEnd:H}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),w}(t.Component),x=function(k){return t.createElement(u.a.Consumer,null,function(w){return t.createElement(c,Object.assign({},k,{context:w}))})};x.displayName="TreeNode",x.defaultProps={title:l},x.isTreeNode=1;var A=J.a=x},Xm8N:function(Be,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("miYZ"),F=L("tsqr"),T=L("9og8"),R=L("WmNS"),P=L.n(R),m=L("q1tI"),t=L.n(m),b=L("ErOA"),o=L("Ty5D"),u=L("9kvl"),f=function(i){var d=i.shixunHomeworks,s=i.dispatch,n=Object(o.i)();return t.a.createElement(B.a,{centered:!0,title:"\u63D0\u793A",visible:d.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(T.a)(P.a.mark(function l(){var c,x,A,C;return P.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(b.a)("/api/myshixuns/".concat(d.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:n.coursesId}});case 2:c=w.sent,c.shixun_identifier&&(F.b.success("\u64CD\u4F5C\u6210\u529F"),s({type:"shixunHomeworks/setActionTabs",payload:{}}),C=c==null||((x=c.new_works)===null||x===void 0||((A=x.find(function(y){return"".concat(y.homework_common_id)===n.categoryId}))===null||A===void 0))?void 0:A.id,u.d.replace("/classrooms/".concat(n.coursesId,"/shixun_homework/").concat(n.categoryId,"/").concat(C,"/comment")));case 4:case"end":return w.stop()}},l)})),onCancel:function(){s({type:"shixunHomeworks/setActionTabs",payload:{}})}},t.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),t.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};J.a=Object(u.a)(function(a){var i=a.shixunHomeworks;return{shixunHomeworks:i}})(f)},Xmg4:function(Be,J,L){var Y=L("bYtY"),B=L("LPTA"),I=B.devicePixelRatio,F=L("K2GJ"),T=L("3C/r");function R(){return!1}function P(b,o,u){var f=Y.createCanvas(),a=o.getWidth(),i=o.getHeight(),d=f.style;return d&&(d.position="absolute",d.left=0,d.top=0,d.width=a+"px",d.height=i+"px",f.setAttribute("data-zr-dom-id",b)),f.width=a*u,f.height=i*u,f}var m=function(b,o,u){var f;u=u||I,typeof b=="string"?f=P(b,o,u):Y.isObject(b)&&(f=b,b=f.id),this.id=b,this.dom=f;var a=f.style;a&&(f.onselectstart=R,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=o,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=u};m.prototype={constructor:m,__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 b=this.dpr;this.domBack=P("back-"+this.id,this.painter,b),this.ctxBack=this.domBack.getContext("2d"),b!==1&&this.ctxBack.scale(b,b)},resize:function(b,o){var u=this.dpr,f=this.dom,a=f.style,i=this.domBack;a&&(a.width=b+"px",a.height=o+"px"),f.width=b*u,f.height=o*u,i&&(i.width=b*u,i.height=o*u,u!==1&&this.ctxBack.scale(u,u))},clear:function(b,o){var u=this.dom,f=this.ctx,a=u.width,i=u.height,o=o||this.clearColor,d=this.motionBlur&&!b,s=this.lastFrameAlpha,n=this.dpr;if(d&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(u,0,0,a/n,i/n)),f.clearRect(0,0,a,i),o&&o!=="transparent"){var l;o.colorStops?(l=o.__canvasGradient||F.getGradient(f,o,{x:0,y:0,width:a,height:i}),o.__canvasGradient=l):o.image&&(l=T.prototype.getCanvasPattern.call(o,f)),f.save(),f.fillStyle=l||o,f.fillRect(0,0,a,i),f.restore()}if(d){var c=this.domBack;f.save(),f.globalAlpha=s,f.drawImage(c,0,0,a,i),f.restore()}}};var t=m;Be.exports=t},Xnb7:function(Be,J,L){var Y=L("1RvN"),B=new Y(50);function I(P){if(typeof P=="string"){var m=B.get(P);return m&&m.image}else return P}function F(P,m,t,b,o){if(P)if(typeof P=="string"){if(m&&m.__zrImageSrc===P||!t)return m;var u=B.get(P),f={hostEl:t,cb:b,cbPayload:o};return u?(m=u.image,!R(m)&&u.pending.push(f)):(m=new Image,m.onload=m.onerror=T,B.put(P,m.__cachedImgObj={image:m,pending:[f]}),m.src=m.__zrImageSrc=P),m}else return P;else return m}function T(){var P=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var m=0;m<P.pending.length;m++){var t=P.pending[m],b=t.cb;b&&b(this,t.cbPayload),t.hostEl.dirty()}P.pending.length=0}function R(P){return P&&P.width&&P.height}J.findExistImage=I,J.createOrUpdateImage=F,J.isImageReady=R},Y1PL:function(Be,J,L){"use strict";L.r(J),L.d(J,"ResizableTextArea",function(){return $});var Y=L("wx14"),B=L("1OyB"),I=L("vuIU"),F=L("Ji7U"),T=L("LK+K"),R=L("q1tI"),P=L("VTBJ"),m=L("rePB"),t=L("Zm9Q"),b=L("Kwbf"),o=L("c+Xe"),u=L("m+aA"),f=L("bdgK"),a=new Map;function i(oe){oe.forEach(function(fe){var ye,Ie=fe.target;(ye=a.get(Ie))===null||ye===void 0||ye.forEach(function(ve){return ve(Ie)})})}var d=new f.default(i),s=null,n=null;function l(oe,fe){a.has(oe)||(a.set(oe,new Set),d.observe(oe)),a.get(oe).add(fe)}function c(oe,fe){a.has(oe)&&(a.get(oe).delete(fe),a.get(oe).size||(d.unobserve(oe),a.delete(oe)))}var x=function(oe){Object(F.a)(ye,oe);var fe=Object(T.a)(ye);function ye(){return Object(B.a)(this,ye),fe.apply(this,arguments)}return Object(I.a)(ye,[{key:"render",value:function(){return this.props.children}}]),ye}(R.Component),A=R.createContext(null);function C(oe){var fe=oe.children,ye=oe.onBatchResize,Ie=R.useRef(0),ve=R.useRef([]),de=R.useContext(A),Je=R.useCallback(function(Rt,Ee,Me){Ie.current+=1;var rt=Ie.current;ve.current.push({size:Rt,element:Ee,data:Me}),Promise.resolve().then(function(){rt===Ie.current&&(ye==null||ye(ve.current),ve.current=[])}),de==null||de(Rt,Ee,Me)},[ye,de]);return R.createElement(A.Provider,{value:Je},fe)}function k(oe){var fe=oe.children,ye=oe.disabled,Ie=R.useRef(null),ve=R.useRef(null),de=R.useContext(A),Je=R.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Rt=R.isValidElement(fe)&&Object(o.c)(fe),Ee=Rt?fe.ref:null,Me=R.useMemo(function(){return Object(o.a)(Ee,Ie)},[Ee,Ie]),rt=R.useRef(oe);rt.current=oe;var He=R.useCallback(function(ke){var ht=rt.current,ie=ht.onResize,xe=ht.data,we=ke.getBoundingClientRect(),$e=we.width,ct=we.height,yt=ke.offsetWidth,Ut=ke.offsetHeight,We=Math.floor($e),kt=Math.floor(ct);if(Je.current.width!==We||Je.current.height!==kt||Je.current.offsetWidth!==yt||Je.current.offsetHeight!==Ut){var qt={width:We,height:kt,offsetWidth:yt,offsetHeight:Ut};Je.current=qt;var Pe=yt===Math.round($e)?$e:yt,Ae=Ut===Math.round(ct)?ct:Ut,ut=Object(P.a)(Object(P.a)({},qt),{},{offsetWidth:Pe,offsetHeight:Ae});de==null||de(ut,ke,xe),ie&&Promise.resolve().then(function(){ie(ut,ke)})}},[]);return R.useEffect(function(){var ke=Object(u.a)(Ie.current)||Object(u.a)(ve.current);return ke&&!ye&&l(ke,He),function(){return c(ke,He)}},[Ie.current,ye]),R.createElement(x,{ref:ve},Rt?R.cloneElement(fe,{ref:Me}):fe)}var w="rc-observer-key";function y(oe){var fe=oe.children,ye=Object(t.a)(fe);return ye.map(function(Ie,ve){var de=(Ie==null?void 0:Ie.key)||"".concat(w,"-").concat(ve);return R.createElement(k,Object(Y.a)({},oe,{key:de}),Ie)})}y.Collection=C;var h=y,p=L("bT9E"),v=L("TSYQ"),_=L.n(v),E=`
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"],j={},U;function S(oe){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(fe&&j[ye])return j[ye];var Ie=window.getComputedStyle(oe),ve=Ie.getPropertyValue("box-sizing")||Ie.getPropertyValue("-moz-box-sizing")||Ie.getPropertyValue("-webkit-box-sizing"),de=parseFloat(Ie.getPropertyValue("padding-bottom"))+parseFloat(Ie.getPropertyValue("padding-top")),Je=parseFloat(Ie.getPropertyValue("border-bottom-width"))+parseFloat(Ie.getPropertyValue("border-top-width")),Rt=g.map(function(Me){return"".concat(Me,":").concat(Ie.getPropertyValue(Me))}).join(";"),Ee={sizingStyle:Rt,paddingSize:de,borderSize:Je,boxSizing:ve};return fe&&ye&&(j[ye]=Ee),Ee}function z(oe){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ie=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;U||(U=document.createElement("textarea"),U.setAttribute("tab-index","-1"),U.setAttribute("aria-hidden","true"),document.body.appendChild(U)),oe.getAttribute("wrap")?U.setAttribute("wrap",oe.getAttribute("wrap")):U.removeAttribute("wrap");var ve=S(oe,fe),de=ve.paddingSize,Je=ve.borderSize,Rt=ve.boxSizing,Ee=ve.sizingStyle;U.setAttribute("style","".concat(Ee,";").concat(E)),U.value=oe.value||oe.placeholder||"";var Me=Number.MIN_SAFE_INTEGER,rt=Number.MAX_SAFE_INTEGER,He=U.scrollHeight,ke;if(Rt==="border-box"?He+=Je:Rt==="content-box"&&(He-=de),ye!==null||Ie!==null){U.value=" ";var ht=U.scrollHeight-de;ye!==null&&(Me=ht*ye,Rt==="border-box"&&(Me=Me+de+Je),He=Math.max(Me,He)),Ie!==null&&(rt=ht*Ie,Rt==="border-box"&&(rt=rt+de+Je),ke=He>rt?"":"hidden",He=Math.min(rt,He))}return{height:He,minHeight:Me,maxHeight:rt,overflowY:ke,resize:"none"}}var H=L("Gytx"),M=L.n(H),V;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(V||(V={}));var K=function(oe){Object(F.a)(ye,oe);var fe=Object(T.a)(ye);function ye(Ie){var ve;return Object(B.a)(this,ye),ve=fe.call(this,Ie),ve.nextFrameActionId=void 0,ve.resizeFrameId=void 0,ve.textArea=void 0,ve.saveTextArea=function(de){ve.textArea=de},ve.handleResize=function(de){var Je=ve.state.resizeStatus,Rt=ve.props,Ee=Rt.autoSize,Me=Rt.onResize;if(Je!==V.NONE)return;typeof Me=="function"&&Me(de),Ee&&ve.resizeOnNextFrame()},ve.resizeOnNextFrame=function(){cancelAnimationFrame(ve.nextFrameActionId),ve.nextFrameActionId=requestAnimationFrame(ve.resizeTextarea)},ve.resizeTextarea=function(){var de=ve.props.autoSize;if(!de||!ve.textArea)return;var Je=de.minRows,Rt=de.maxRows,Ee=z(ve.textArea,!1,Je,Rt);ve.setState({textareaStyles:Ee,resizeStatus:V.RESIZING},function(){cancelAnimationFrame(ve.resizeFrameId),ve.resizeFrameId=requestAnimationFrame(function(){ve.setState({resizeStatus:V.RESIZED},function(){ve.resizeFrameId=requestAnimationFrame(function(){ve.setState({resizeStatus:V.NONE}),ve.fixFirefoxAutoScroll()})})})})},ve.renderTextArea=function(){var de=ve.props,Je=de.prefixCls,Rt=Je===void 0?"rc-textarea":Je,Ee=de.autoSize,Me=de.onResize,rt=de.className,He=de.disabled,ke=ve.state,ht=ke.textareaStyles,ie=ke.resizeStatus,xe=Object(p.a)(ve.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=_()(Rt,rt,Object(m.a)({},"".concat(Rt,"-disabled"),He));"value"in xe&&(xe.value=xe.value||"");var $e=Object(P.a)(Object(P.a)(Object(P.a)({},ve.props.style),ht),ie===V.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return R.createElement(h,{onResize:ve.handleResize,disabled:!(Ee||Me)},R.createElement("textarea",Object(Y.a)({},xe,{className:we,style:$e,ref:ve.saveTextArea})))},ve.state={textareaStyles:{},resizeStatus:V.NONE},ve}return Object(I.a)(ye,[{key:"componentDidUpdate",value:function(ve){(ve.value!==this.props.value||!M()(ve.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 ve=this.textArea.selectionStart,de=this.textArea.selectionEnd;this.textArea.setSelectionRange(ve,de)}}catch(Je){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(R.Component),$=K,Z=function(oe){Object(F.a)(ye,oe);var fe=Object(T.a)(ye);function ye(Ie){var ve;Object(B.a)(this,ye),ve=fe.call(this,Ie),ve.resizableTextArea=void 0,ve.focus=function(){ve.resizableTextArea.textArea.focus()},ve.saveTextArea=function(Je){ve.resizableTextArea=Je},ve.handleChange=function(Je){var Rt=ve.props.onChange;ve.setValue(Je.target.value,function(){ve.resizableTextArea.resizeTextarea()}),Rt&&Rt(Je)},ve.handleKeyDown=function(Je){var Rt=ve.props,Ee=Rt.onPressEnter,Me=Rt.onKeyDown;Je.keyCode===13&&Ee&&Ee(Je),Me&&Me(Je)};var de=typeof Ie.value=="undefined"||Ie.value===null?Ie.defaultValue:Ie.value;return ve.state={value:de},ve}return Object(I.a)(ye,[{key:"setValue",value:function(ve,de){"value"in this.props||this.setState({value:ve},de)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return R.createElement($,Object(Y.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ve){return"value"in ve?{value:ve.value}:null}}]),ye}(R.Component),me=J.default=Z},YH21:function(Be,J,L){var Y=L("H6uX");J.Dispatcher=Y;var B=L("ItGF"),I=L("Ze12"),F=I.isCanvasEl,T=I.transformCoordWithViewport,R=typeof window!="undefined"&&!!window.addEventListener,P=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,m=[];function t(n,l,c,x){return c=c||{},x||!B.canvasSupported?b(n,l,c):B.browser.firefox&&l.layerX!=null&&l.layerX!==l.offsetX?(c.zrX=l.layerX,c.zrY=l.layerY):l.offsetX!=null?(c.zrX=l.offsetX,c.zrY=l.offsetY):b(n,l,c),c}function b(n,l,c){if(B.domSupported&&n.getBoundingClientRect){var x=l.clientX,A=l.clientY;if(F(n)){var C=n.getBoundingClientRect();c.zrX=x-C.left,c.zrY=A-C.top;return}else if(T(m,n,x,A)){c.zrX=m[0],c.zrY=m[1];return}}c.zrX=c.zrY=0}function o(n){return n||window.event}function u(n,l,c){if(l=o(l),l.zrX!=null)return l;var x=l.type,A=x&&x.indexOf("touch")>=0;if(!A)t(n,l,l,c),l.zrDelta=l.wheelDelta?l.wheelDelta/120:-(l.detail||0)/3;else{var C=x!=="touchend"?l.targetTouches[0]:l.changedTouches[0];C&&t(n,C,l,c)}var k=l.button;return l.which==null&&k!==void 0&&P.test(l.type)&&(l.which=k&1?1:k&2?3:k&4?2:0),l}function f(n,l,c,x){R?n.addEventListener(l,c,x):n.attachEvent("on"+l,c)}function a(n,l,c,x){R?n.removeEventListener(l,c,x):n.detachEvent("on"+l,c)}var i=R?function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0}:function(n){n.returnValue=!1,n.cancelBubble=!0};function d(n){return n.which===2||n.which===3}function s(n){return n.which>1}J.clientToLocal=t,J.getNativeEvent=o,J.normalizeEvent=u,J.addEventListener=f,J.removeEventListener=a,J.stop=i,J.isMiddleOrRightButtonOnMouseUpDown=d,J.notLeftMouse=s},YgsL:function(Be,J,L){var Y=L("QBsz"),B=Y.distance;function I(T,R,P,m,t,b,o){var u=(P-T)*.5,f=(m-R)*.5;return(2*(R-P)+u+f)*o+(-3*(R-P)-2*u-f)*b+u*t+R}function F(T,R){for(var P=T.length,m=[],t=0,b=1;b<P;b++)t+=B(T[b-1],T[b]);var o=t/2;o=o<P?P:o;for(var b=0;b<o;b++){var u=b/(o-1)*(R?P:P-1),f=Math.floor(u),a=u-f,i,d=T[f%P],s,n;R?(i=T[(f-1+P)%P],s=T[(f+1)%P],n=T[(f+2)%P]):(i=T[f===0?f:f-1],s=T[f>P-2?P-1:f+1],n=T[f>P-3?P-1:f+2]);var l=a*a,c=a*l;m.push([I(i[0],d[0],s[0],n[0],a,l,c),I(i[1],d[1],s[1],n[1],a,l,c)])}return m}Be.exports=F},ZW9T:function(Be,J,L){"use strict";L.d(J,"a",function(){return H});var Y=L("k1fw"),B=L("oBTY"),I=L("miYZ"),F=L("tsqr"),T=L("rAM+"),R=L("tJVT"),P=L("PpiC"),m=L("q1tI"),t=L.n(m),b=L("bdgK"),o=L("9og8"),u=L("WmNS"),f=L.n(u),a={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},i={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},d={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","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(`
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},n=L("5VLF"),l=L.n(n),c={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"]}},x=function(V,K){return K.map(function($){return{label:$,kind:V.languages.CompletionItemKind.Keyword,insertText:$}})},A=function(V){return Object.keys(c.tables).map(function(K){return{label:K,kind:V.languages.CompletionItemKind.Variable,insertText:K}})},C=function(V,K){var $=c.tables[V];return $?$.map(function(Z){return{label:Z,kind:K.languages.CompletionItemKind.Field,insertText:Z}}):[]};function k(M,V,K,$,Z){var me=V.getWordUntilPosition(K),oe={startLineNumber:K.lineNumber,endLineNumber:K.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},fe=$.map(function(ye){return{label:ye,kind:M.languages.CompletionItemKind.Keyword,insertText:ye,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:oe}});return Z.map(function(ye){fe.push(Object(Y.a)(Object(Y.a)({},ye),{},{range:oe}))}),fe}var w=function(M){c.languages.map(function(Z){return M.languages.registerDocumentFormattingEditProvider(Z,{provideDocumentFormattingEdits:function(oe,fe,ye){return Object(o.a)(f.a.mark(function Ie(){var ve;return f.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return ve=l()(oe.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:oe.getFullModelRange(),text:ve}]);case 2:case"end":return Je.stop()}},Ie)}))()}}),Z});var V=d.quickKey.map(function(Z){return{label:Z.label,kind:M.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),K=s.quickKey.map(function(Z){return{label:Z.label,kind:M.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=i.quickKey.map(function(Z){return{label:Z.label,kind:M.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}});M.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(me,oe){var fe=me.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ie=me.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(d.keywords.map(function(ve){return{label:ve,kind:M.languages.CompletionItemKind.Function,documentation:ve,insertText:ve,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(d.quickKey.map(function(ve){return{label:ve.label,kind:M.languages.CompletionItemKind.Function,documentation:ve.content,insertText:Ie.startsWith("#")?ve.content.replace(/#/,""):ve.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}}),M.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(me,oe){var fe=me.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn};return{suggestions:Object(B.a)(a.keywords.map(function(Ie){return{label:Ie,kind:M.languages.CompletionItemKind.Function,documentation:Ie,insertText:Ie,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}}))}}}),M.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(me,oe){var fe=me.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ie=me.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(i.keywords.map(function(ve){return{label:ve,kind:M.languages.CompletionItemKind.Function,documentation:ve,insertText:ve,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(i.quickKey.map(function(ve){return{label:ve.label,kind:M.languages.CompletionItemKind.Function,documentation:ve.content,insertText:Ie.startsWith("#")?ve.content.replace(/#/,""):ve.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}}),M.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(me,oe){var fe=me.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ie=me.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(s.keywords.map(function(ve){return{label:ve,kind:M.languages.CompletionItemKind.Function,documentation:ve,insertText:ve,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(s.quickKey.map(function(ve){return{label:ve.label,kind:M.languages.CompletionItemKind.Function,documentation:ve.content,insertText:Ie.startsWith("#")?ve.content.replace(/#/,""):ve.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}})},y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",h=L("fjLI"),p=L("LvDl"),v=L("+ua5");function _(M){return/^\d+$/.test(M)?"".concat(M,"px"):M}function E(){}var g=!1,j={"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 U(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],V=M;if(Array.isArray(M)){for(var K=0;K<M.length;K++){var $=j[M[K]];if($)return $}return V[0]}return j[V]||V}var S=null,z=J.b=function(M){var V=M.width,K=V===void 0?"100%":V,$=M.height,Z=$===void 0?"100%":$,me=M.value,oe=M.language,fe=oe===void 0?"javascript":oe,ye=M.style,Ie=ye===void 0?{}:ye,ve=M.options,de=ve===void 0?{}:ve,Je=M.overrideServices,Rt=Je===void 0?{}:Je,Ee=M.theme,Me=Ee===void 0?"vs-dark":Ee,rt=M.onEditBlur,He=M.onSave,ke=M.autoHeight,ht=ke===void 0?!1:ke,ie=M.forbidCopy,xe=ie===void 0?!1:ie,we=M.onChange,$e=we===void 0?E:we,ct=M.editorDidMount,yt=ct===void 0?E:ct,Ut=M.onFocus,We=Ut===void 0?E:Ut,kt=M.filename,qt=kt===void 0?"educoder.txt":kt,Pe=M.errorLine,Ae=M.errorContent,ut=Ae===void 0?"":Ae,Et=Object(P.a)(M,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ze=Object(m.useRef)(),dt=Object(m.useRef)({}),Ne=Object(m.useRef)(),Te=Object(m.useRef)(),Oe=Object(m.useRef)(!1),ae=Object(m.useRef)(),le=Object(m.useState)(!1),he=Object(R.a)(le,2),_e=he[0],Se=he[1];function ze(){var Lt;return Ze.current&&(Lt=new b.default(function(Wt){var ln=Object(T.a)(Wt),gn;try{for(ln.s();!(gn=ln.n()).done;){var tr=gn.value;(tr.target.offsetHeight>0||tr.target.offsetWidth>0)&&dt.current.instance.layout()}}catch(Wn){ln.e(Wn)}finally{ln.f()}}),Lt.observe(Ze.current)),Lt}function xt(){F.b.warn(decodeURIComponent(y))}var Qt=function(){var Wt=dt.current.instance;if(me!=null&&Wt&&_e){var ln=Wt.getModel();ln&&me!==ln.getValue()&&(g=!0,ln.setValue(me),Wt.layout(),g=!1)}};Object(m.useEffect)(function(){Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Qt()},500)},[me,_e,dt.current]),Object(m.useEffect)(function(){if(Pe&&dt.current&&dt.current.instance){var Lt=dt.current.instance;Lt.changeViewZones(function(ln){var gn=document.createElement("div");gn.style.padding="10px 20px",gn.style.width="calc(100% - 20px)",gn.className="my-error-line-wrp",gn.innerHTML=ut,ln.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:gn})});var Wt={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(Wt),Lt.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,dt.current,_e]);function sn(){var Lt=dt.current.instance;if(Lt){var Wt=Lt.getSelection(),ln=dt.current.pastePos||{},gn=new S.Range(ln.startLineNumber||Wt.endLineNumber,ln.startColumn||Wt.endColumn,ln.endLineNumber||Wt.endLineNumber,ln.endColumn||Wt.endColumn);setTimeout(function(){Lt.executeEdits("",[{range:gn,text:""}])},300)}}function gt(Lt){(window.navigator.platform.match("Mac")?Lt.metaKey:Lt.ctrlKey)&&Lt.keyCode==83&&(Lt.preventDefault(),He())}var zt=function(){if(ht&&dt.current.instance){var Wt=dt.current.instance.getContentHeight();Ge(Wt<Z?Z:Wt)}else Ge(Z)};function Ot(Lt){var Wt=document.createEvent("MouseEvents");Wt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Lt.dispatchEvent(Wt)}function At(Lt,Wt){var ln=window.URL||window.webkitURL||window,gn=new Blob([Wt]),tr=document.createElementNS("http://www.w3.org/1999/xhtml","a");tr.href=ln.createObjectURL(gn),tr.download=Lt,Ot(tr)}Object(m.useEffect)(function(){zt()},[zt]),Object(m.useEffect)(function(){Ze.current&&!_e&&Promise.all([L.e(15),L.e(27)]).then(L.t.bind(null,"M/lh",7)).then(function(Lt){try{S=Lt,dt.current.instance=S.editor.create(Ze.current,{value:me,language:U(fe),theme:Me,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Rt);var Wt=dt.current.instance,ln=h.d._menuItems,gn=Object(B.a)(ln).find(function(Er){return Er[0]._debugName=="EditorContext"}),tr=gn[1],Wn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],En=function(rr,ur){var Rr=rr._first;do{var Kr,ra,fn=ur.includes((Kr=Rr.element)===null||Kr===void 0||((ra=Kr.command)===null||ra===void 0)?void 0:ra.id);fn&&rr._remove(Rr)}while(Rr=Rr.next)};if(yt(Wt,S),setTimeout(function(){zt(),dt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){At(qt||"educoder.txt",Wt.getValue())}}),Wt.getDomNode().addEventListener("input",function(){Ne.current.autoFormat&&Wt.getAction("editor.action.formatDocument").run()})},500),dt.current.subscription=Wt.onDidChangeModelContent(function(Er){Oe.current?clearTimeout(ae.current):(zt(),$e(Wt.getValue(),Er)),ae.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||w(S,U(fe)),xe&&(En(tr,Wn),Ze.current.classList.add("noCopyPaste"),Wt.onKeyDown(function(Er){var rr=Er.keyCode,ur=Er.ctrlKey,Rr=Er.metaKey;(rr===33||rr===52)&&(Rr||ur)&&(xt(),Er.preventDefault())})),window.Monaco=S,rt&&Wt.onDidBlurEditorWidget(function(){rt(Wt.getValue())}),We&&Wt.onDidFocusEditorText(function(){We(Wt.getValue())}),xe){Wt.addCommand(S.KeyMod.CtrlCmd|S.KeyCode.KEY_V,function(){return xt(),null}),Wt.onDidPaste(function(Er){dt.current.pastePos=Er});try{window.addEventListener("paste",sn)}catch(Er){}}var xr=ze();return Se(!0),function(){var Er=dt.current.instance;Er.dispose();var rr=Er.getModel();rr&&rr.dispose(),dt.current.subscription&&dt.current.subscription.dispose(),xe&&window.removeEventListener("paste",sn),xr.unobserve(Ze.current)}}catch(Er){}})},[]),Object(m.useEffect)(function(){var Lt=dt.current.instance;if(Lt&&_e)return document.addEventListener("keydown",gt,!1),function(){document.removeEventListener("keydown",gt)}},[He,_e]),Object(m.useEffect)(function(){var Lt=dt.current.instance;if(Lt&&_e){var Wt=U(fe);S.editor.setModelLanguage(Lt.getModel(),Wt),console.log("language:",fe,Lt.getModel(),Wt)}},[fe,_e]),Object(m.useEffect)(function(){var Lt=dt.current.instance;Lt&&_e&&S.editor.setTheme(Me)},[Me,_e]),Object(m.useEffect)(function(){var Lt=dt.current.instance;Ne.current=de,Lt&&_e&&(Lt.updateOptions(Object(Y.a)({},de)),setTimeout(function(){Lt.getModel().updateOptions(Object(Y.a)({},de))},200))},[JSON.stringify(de),_e]),Object(m.useEffect)(function(){var Lt=dt.current.instance;Lt&&_e&&Lt.layout()},[K,Z,_e]);var ft=Object(m.useState)(_(K)),be=Object(R.a)(ft,2),Fe=be[0],Nt=be[1],bt=Object(m.useState)(_(Z)),Kt=Object(R.a)(bt,2),Zt=Kt[0],Ge=Kt[1],lt=Object(Y.a)(Object(Y.a)({},Ie),{},{width:Fe,height:Zt});return t.a.createElement("div",{className:"my-monaco-editor",ref:Ze,style:lt})};function H(M){var V=M.width,K=V===void 0?"100%":V,$=M.height,Z=$===void 0?"100%":$,me=M.original,oe=M.modified,fe=M.language,ye=M.options,Ie=ye===void 0?{}:ye,ve=Object(m.useRef)(),de=Object(m.useState)(null),Je=Object(R.a)(de,2),Rt=Je[0],Ee=Je[1];function Me(ht){var ie;return ve.current&&(ie=new b.default(function(xe){var we=Object(T.a)(xe),$e;try{for(we.s();!($e=we.n()).done;){var ct=$e.value;(ct.target.offsetHeight>0||ct.target.offsetWidth>0)&&ht.layout()}}catch(yt){we.e(yt)}finally{we.f()}}),ie.observe(ve.current)),ie}Object(m.useEffect)(function(){ve.current&&Promise.all([L.e(15),L.e(27)]).then(L.t.bind(null,"M/lh",7)).then(function(ht){S=ht;var ie=S.editor.createDiffEditor(ve.current,Object(Y.a)(Object(Y.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},Ie),{},{wordWrap:!0}));Ee(ie);var xe=Me(ie);return function(){ie.dispose();var we=ie.getModel();we&&we.dispose(),xe.unobserve(ve.current)}})},[]),Object(m.useEffect)(function(){Rt&&Rt.setModel({original:S.editor.createModel(me,fe),modified:S.editor.createModel(oe,fe)})},[me,oe,fe,Rt]);var rt=_(K),He=_(Z),ke={width:rt,height:He};return t.a.createElement("div",{className:"my-diff-editor",ref:ve,style:ke})}},Ze12:function(Be,J,L){var Y=L("ItGF"),B=L("hOwI"),I=B.buildTransformer,F="___zrEVENTSAVED",T=[];function R(o,u,f,a,i){return P(T,u,a,i,!0)&&P(o,f,T[0],T[1])}function P(o,u,f,a,i){if(u.getBoundingClientRect&&Y.domSupported&&!b(u)){var d=u[F]||(u[F]={}),s=m(u,d),n=t(s,d,i);if(n)return n(o,f,a),!0}return!1}function m(o,u){var f=u.markers;if(f)return f;f=u.markers=[];for(var a=["left","right"],i=["top","bottom"],d=0;d<4;d++){var s=document.createElement("div"),n=s.style,l=d%2,c=(d>>1)%2;n.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[c]+":0",a[1-l]+":auto",i[1-c]+":auto",""].join("!important;"),o.appendChild(s),f.push(s)}return f}function t(o,u,f){for(var a=f?"invTrans":"trans",i=u[a],d=u.srcCoords,s=!0,n=[],l=[],c=0;c<4;c++){var x=o[c].getBoundingClientRect(),A=2*c,C=x.left,k=x.top;n.push(C,k),s=s&&d&&C===d[A]&&k===d[A+1],l.push(o[c].offsetLeft,o[c].offsetTop)}return s&&i?i:(u.srcCoords=n,u[a]=f?I(l,n):I(n,l))}function b(o){return o.nodeName.toUpperCase()==="CANVAS"}J.transformLocalCoord=R,J.transformCoordWithViewport=P,J.isCanvasEl=b},ZpRC:function(Be,J,L){"use strict";function Y(o){return typeof o=="object"&&o!=null&&o.nodeType===1}function B(o,u){return(!u||o!=="hidden")&&o!=="visible"&&o!=="clip"}function I(o,u){if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){var f=getComputedStyle(o,null);return B(f.overflowY,u)||B(f.overflowX,u)||function(a){var i=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(s){return null}}(a);return!!i&&(i.clientHeight<a.scrollHeight||i.clientWidth<a.scrollWidth)}(o)}return!1}function F(o,u,f,a,i,d,s,n){return d<o&&s>u||d>o&&s<u?0:d<=o&&n<=f||s>=u&&n>=f?d-o-a:s>u&&n<f||d<o&&n>f?s-u+i:0}var T=function(o,u){var f=window,a=u.scrollMode,i=u.block,d=u.inline,s=u.boundary,n=u.skipOverflowHiddenElements,l=typeof s=="function"?s:function(ht){return ht!==s};if(!Y(o))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,x=[],A=o;Y(A)&&l(A);){if((A=A.parentElement)===c){x.push(A);break}A!=null&&A===document.body&&I(A)&&!I(document.documentElement)||A!=null&&I(A,n)&&x.push(A)}for(var C=f.visualViewport?f.visualViewport.width:innerWidth,k=f.visualViewport?f.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,h=o.getBoundingClientRect(),p=h.height,v=h.width,_=h.top,E=h.right,g=h.bottom,j=h.left,U=i==="start"||i==="nearest"?_:i==="end"?g:_+p/2,S=d==="center"?j+v/2:d==="end"?E:j,z=[],H=0;H<x.length;H++){var M=x[H],V=M.getBoundingClientRect(),K=V.height,$=V.width,Z=V.top,me=V.right,oe=V.bottom,fe=V.left;if(a==="if-needed"&&_>=0&&j>=0&&g<=k&&E<=C&&_>=Z&&g<=oe&&j>=fe&&E<=me)return z;var ye=getComputedStyle(M),Ie=parseInt(ye.borderLeftWidth,10),ve=parseInt(ye.borderTopWidth,10),de=parseInt(ye.borderRightWidth,10),Je=parseInt(ye.borderBottomWidth,10),Rt=0,Ee=0,Me="offsetWidth"in M?M.offsetWidth-M.clientWidth-Ie-de:0,rt="offsetHeight"in M?M.offsetHeight-M.clientHeight-ve-Je:0;if(c===M)Rt=i==="start"?U:i==="end"?U-k:i==="nearest"?F(y,y+k,k,ve,Je,y+U,y+U+p,p):U-k/2,Ee=d==="start"?S:d==="center"?S-C/2:d==="end"?S-C:F(w,w+C,C,Ie,de,w+S,w+S+v,v),Rt=Math.max(0,Rt+y),Ee=Math.max(0,Ee+w);else{Rt=i==="start"?U-Z-ve:i==="end"?U-oe+Je+rt:i==="nearest"?F(Z,oe,K,ve,Je+rt,U,U+p,p):U-(Z+K/2)+rt/2,Ee=d==="start"?S-fe-Ie:d==="center"?S-(fe+$/2)+Me/2:d==="end"?S-me+de+Me:F(fe,me,$,Ie,de+Me,S,S+v,v);var He=M.scrollLeft,ke=M.scrollTop;U+=ke-(Rt=Math.max(0,Math.min(ke+Rt,M.scrollHeight-K+rt))),S+=He-(Ee=Math.max(0,Math.min(He+Ee,M.scrollWidth-$+Me)))}z.push({el:M,top:Rt,left:Ee})}return z};function R(o){return o===Object(o)&&Object.keys(o).length!==0}function P(o,u){u===void 0&&(u="auto");var f="scrollBehavior"in document.body.style;o.forEach(function(a){var i=a.el,d=a.top,s=a.left;i.scroll&&f?i.scroll({top:d,left:s,behavior:u}):(i.scrollTop=d,i.scrollLeft=s)})}function m(o){return o===!1?{block:"end",inline:"nearest"}:R(o)?o:{block:"start",inline:"nearest"}}function t(o,u){var f=!o.ownerDocument.documentElement.contains(o);if(R(u)&&typeof u.behavior=="function")return u.behavior(f?[]:T(o,u));if(f)return;var a=m(u);return P(T(o,a),a.behavior)}var b=J.a=t},aKvl:function(Be,J,L){var Y=L("Sj9i"),B=Y.quadraticProjectPoint;function I(F,T,R,P,m,t,b,o,u){if(b===0)return!1;var f=b;if(u>T+f&&u>P+f&&u>t+f||u<T-f&&u<P-f&&u<t-f||o>F+f&&o>R+f&&o>m+f||o<F-f&&o<R-f&&o<m-f)return!1;var a=B(F,T,R,P,m,t,o,u,null);return a<=f/2}J.containStroke=I},aX58:function(Be,J,L){var Y=L("3gBT"),B=L("ItGF"),I=L("bYtY"),F=L("0s+r"),T=L("r6Bn"),R=L("7SHv"),P=L("MKOG"),m=L("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=!B.canvasSupported,b={canvas:R},o={},u="4.3.1";function f(l,c){var x=new n(Y(),l,c);return o[x.id]=x,x}function a(l){if(l)l.dispose();else{for(var c in o)o.hasOwnProperty(c)&&o[c].dispose();o={}}return this}function i(l){return o[l]}function d(l,c){b[l]=c}function s(l){delete o[l]}var n=function(l,c,x){x=x||{},this.dom=c,this.id=l;var A=this,C=new T,k=x.renderer;if(t){if(!b.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");k="vml"}else(!k||!b[k])&&(k="canvas");var w=new b[k](c,C,x,l);this.storage=C,this.painter=w;var y=!B.node&&!B.worker?new m(w.getViewportRoot(),w.root):null;this.handler=new F(C,w,y,w.root),this.animation=new P({stage:{update:I.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var h=C.delFromStorage,p=C.addToStorage;C.delFromStorage=function(v){h.call(C,v),v&&v.removeSelfFromZr(A)},C.addToStorage=function(v){p.call(C,v),v.addSelfToZr(A)}};n.prototype={constructor:n,getId:function(){return this.id},add:function(l){this.storage.addRoot(l),this._needsRefresh=!0},remove:function(l){this.storage.delRoot(l),this._needsRefresh=!0},configLayer:function(l,c){this.painter.configLayer&&this.painter.configLayer(l,c),this._needsRefresh=!0},setBackgroundColor:function(l){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(l),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 l;this._needsRefresh&&(l=!0,this.refreshImmediately()),this._needsRefreshHover&&(l=!0,this.refreshHoverImmediately()),l&&this.trigger("rendered")},addHover:function(l,c){if(this.painter.addHover){var x=this.painter.addHover(l,c);return this.refreshHover(),x}},removeHover:function(l){this.painter.removeHover&&(this.painter.removeHover(l),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(l){l=l||{},this.painter.resize(l.width,l.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(l,c){return this.painter.pathToImage(l,c)},setCursorStyle:function(l){this.handler.setCursorStyle(l)},findHover:function(l,c){return this.handler.findHover(l,c)},on:function(l,c,x){this.handler.on(l,c,x)},off:function(l,c){this.handler.off(l,c)},trigger:function(l,c){this.handler.trigger(l,c)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,s(this.id)}},J.version=u,J.init=f,J.dispose=a,J.getInstance=i,J.registerPainter=d},bT9E:function(Be,J,L){"use strict";L.d(J,"a",function(){return B});var Y=L("VTBJ");function B(I,F){var T=Object(Y.a)({},I);return Array.isArray(F)&&F.forEach(function(R){delete T[R]}),T}},bYtY:function(Be,J){var L={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Y={"[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},B=Object.prototype.toString,I=Array.prototype,F=I.forEach,T=I.filter,R=I.slice,P=I.map,m=I.reduce,t={};function b(Ee,Me){Ee==="createCanvas"&&(s=null),t[Ee]=Me}function o(Ee){if(Ee==null||typeof Ee!="object")return Ee;var Me=Ee,rt=B.call(Ee);if(rt==="[object Array]"){if(!Ie(Ee)){Me=[];for(var He=0,ke=Ee.length;He<ke;He++)Me[He]=o(Ee[He])}}else if(Y[rt]){if(!Ie(Ee)){var ht=Ee.constructor;if(Ee.constructor.from)Me=ht.from(Ee);else{Me=new ht(Ee.length);for(var He=0,ke=Ee.length;He<ke;He++)Me[He]=o(Ee[He])}}}else if(!L[rt]&&!Ie(Ee)&&!z(Ee)){Me={};for(var ie in Ee)Ee.hasOwnProperty(ie)&&(Me[ie]=o(Ee[ie]))}return Me}function u(Ee,Me,rt){if(!j(Me)||!j(Ee))return rt?o(Me):Ee;for(var He in Me)if(Me.hasOwnProperty(He)){var ke=Ee[He],ht=Me[He];j(ht)&&j(ke)&&!_(ht)&&!_(ke)&&!z(ht)&&!z(ke)&&!U(ht)&&!U(ke)&&!Ie(ht)&&!Ie(ke)?u(ke,ht,rt):(rt||!(He in Ee))&&(Ee[He]=o(Me[He],!0))}return Ee}function f(Ee,Me){for(var rt=Ee[0],He=1,ke=Ee.length;He<ke;He++)rt=u(rt,Ee[He],Me);return rt}function a(Ee,Me){for(var rt in Me)Me.hasOwnProperty(rt)&&(Ee[rt]=Me[rt]);return Ee}function i(Ee,Me,rt){for(var He in Me)Me.hasOwnProperty(He)&&(rt?Me[He]!=null:Ee[He]==null)&&(Ee[He]=Me[He]);return Ee}var d=function(){return t.createCanvas()};t.createCanvas=function(){return document.createElement("canvas")};var s;function n(){return s||(s=d().getContext("2d")),s}function l(Ee,Me){if(Ee){if(Ee.indexOf)return Ee.indexOf(Me);for(var rt=0,He=Ee.length;rt<He;rt++)if(Ee[rt]===Me)return rt}return-1}function c(Ee,Me){var rt=Ee.prototype;function He(){}He.prototype=Me.prototype,Ee.prototype=new He;for(var ke in rt)rt.hasOwnProperty(ke)&&(Ee.prototype[ke]=rt[ke]);Ee.prototype.constructor=Ee,Ee.superClass=Me}function x(Ee,Me,rt){Ee="prototype"in Ee?Ee.prototype:Ee,Me="prototype"in Me?Me.prototype:Me,i(Ee,Me,rt)}function A(Ee){return Ee?typeof Ee=="string"?!1:typeof Ee.length=="number":void 0}function C(Ee,Me,rt){if(!(Ee&&Me))return;if(Ee.forEach&&Ee.forEach===F)Ee.forEach(Me,rt);else if(Ee.length===+Ee.length)for(var He=0,ke=Ee.length;He<ke;He++)Me.call(rt,Ee[He],He,Ee);else for(var ht in Ee)Ee.hasOwnProperty(ht)&&Me.call(rt,Ee[ht],ht,Ee)}function k(Ee,Me,rt){if(!(Ee&&Me))return;if(Ee.map&&Ee.map===P)return Ee.map(Me,rt);for(var He=[],ke=0,ht=Ee.length;ke<ht;ke++)He.push(Me.call(rt,Ee[ke],ke,Ee));return He}function w(Ee,Me,rt,He){if(!(Ee&&Me))return;if(Ee.reduce&&Ee.reduce===m)return Ee.reduce(Me,rt,He);for(var ke=0,ht=Ee.length;ke<ht;ke++)rt=Me.call(He,rt,Ee[ke],ke,Ee);return rt}function y(Ee,Me,rt){if(!(Ee&&Me))return;if(Ee.filter&&Ee.filter===T)return Ee.filter(Me,rt);for(var He=[],ke=0,ht=Ee.length;ke<ht;ke++)Me.call(rt,Ee[ke],ke,Ee)&&He.push(Ee[ke]);return He}function h(Ee,Me,rt){if(!(Ee&&Me))return;for(var He=0,ke=Ee.length;He<ke;He++)if(Me.call(rt,Ee[He],He,Ee))return Ee[He]}function p(Ee,Me){var rt=R.call(arguments,2);return function(){return Ee.apply(Me,rt.concat(R.call(arguments)))}}function v(Ee){var Me=R.call(arguments,1);return function(){return Ee.apply(this,Me.concat(R.call(arguments)))}}function _(Ee){return B.call(Ee)==="[object Array]"}function E(Ee){return typeof Ee=="function"}function g(Ee){return B.call(Ee)==="[object String]"}function j(Ee){var Me=typeof Ee;return Me==="function"||!!Ee&&Me==="object"}function U(Ee){return!!L[B.call(Ee)]}function S(Ee){return!!Y[B.call(Ee)]}function z(Ee){return typeof Ee=="object"&&typeof Ee.nodeType=="number"&&typeof Ee.ownerDocument=="object"}function H(Ee){return Ee!==Ee}function M(Ee){for(var Me=0,rt=arguments.length;Me<rt;Me++)if(arguments[Me]!=null)return arguments[Me]}function V(Ee,Me){return Ee!=null?Ee:Me}function K(Ee,Me,rt){return Ee!=null?Ee:Me!=null?Me:rt}function $(){return Function.call.apply(R,arguments)}function Z(Ee){if(typeof Ee=="number")return[Ee,Ee,Ee,Ee];var Me=Ee.length;return Me===2?[Ee[0],Ee[1],Ee[0],Ee[1]]:Me===3?[Ee[0],Ee[1],Ee[2],Ee[1]]:Ee}function me(Ee,Me){if(!Ee)throw new Error(Me)}function oe(Ee){return Ee==null?null:typeof Ee.trim=="function"?Ee.trim():Ee.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var fe="__ec_primitive__";function ye(Ee){Ee[fe]=!0}function Ie(Ee){return Ee[fe]}function ve(Ee){var Me=_(Ee);this.data={};var rt=this;Ee instanceof ve?Ee.each(He):Ee&&C(Ee,He);function He(ke,ht){Me?rt.set(ke,ht):rt.set(ht,ke)}}ve.prototype={constructor:ve,get:function(Ee){return this.data.hasOwnProperty(Ee)?this.data[Ee]:null},set:function(Ee,Me){return this.data[Ee]=Me},each:function(Ee,Me){Me!==void 0&&(Ee=p(Ee,Me));for(var rt in this.data)this.data.hasOwnProperty(rt)&&Ee(this.data[rt],rt)},removeKey:function(Ee){delete this.data[Ee]}};function de(Ee){return new ve(Ee)}function Je(Ee,Me){for(var rt=new Ee.constructor(Ee.length+Me.length),He=0;He<Ee.length;He++)rt[He]=Ee[He];var ke=Ee.length;for(He=0;He<Me.length;He++)rt[He+ke]=Me[He];return rt}function Rt(){}J.$override=b,J.clone=o,J.merge=u,J.mergeAll=f,J.extend=a,J.defaults=i,J.createCanvas=d,J.getContext=n,J.indexOf=l,J.inherits=c,J.mixin=x,J.isArrayLike=A,J.each=C,J.map=k,J.reduce=w,J.filter=y,J.find=h,J.bind=p,J.curry=v,J.isArray=_,J.isFunction=E,J.isString=g,J.isObject=j,J.isBuiltInObject=U,J.isTypedArray=S,J.isDom=z,J.eqNaN=H,J.retrieve=M,J.retrieve2=V,J.retrieve3=K,J.slice=$,J.normalizeCssArray=Z,J.assert=me,J.trim=oe,J.setAsPrimitive=ye,J.isPrimitive=Ie,J.createHashMap=de,J.concatArray=Je,J.noop=Rt},biw7:function(Be,J,L){"use strict";var Y=L("q1tI"),B=L.n(Y),I=Y.createContext(null);J.a=I},c5Ni:function(Be,J,L){},chpo:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.default=void 0;var Y=1,B=function(){return"".concat(Y++)};J.default=B},dMvE:function(Be,J){var L={linear:function(B){return B},quadraticIn:function(B){return B*B},quadraticOut:function(B){return B*(2-B)},quadraticInOut:function(B){return(B*=2)<1?.5*B*B:-.5*(--B*(B-2)-1)},cubicIn:function(B){return B*B*B},cubicOut:function(B){return--B*B*B+1},cubicInOut:function(B){return(B*=2)<1?.5*B*B*B:.5*((B-=2)*B*B+2)},quarticIn:function(B){return B*B*B*B},quarticOut:function(B){return 1- --B*B*B*B},quarticInOut:function(B){return(B*=2)<1?.5*B*B*B*B:-.5*((B-=2)*B*B*B-2)},quinticIn:function(B){return B*B*B*B*B},quinticOut:function(B){return--B*B*B*B*B+1},quinticInOut:function(B){return(B*=2)<1?.5*B*B*B*B*B:.5*((B-=2)*B*B*B*B+2)},sinusoidalIn:function(B){return 1-Math.cos(B*Math.PI/2)},sinusoidalOut:function(B){return Math.sin(B*Math.PI/2)},sinusoidalInOut:function(B){return .5*(1-Math.cos(Math.PI*B))},exponentialIn:function(B){return B===0?0:Math.pow(1024,B-1)},exponentialOut:function(B){return B===1?1:1-Math.pow(2,-10*B)},exponentialInOut:function(B){return B===0?0:B===1?1:(B*=2)<1?.5*Math.pow(1024,B-1):.5*(-Math.pow(2,-10*(B-1))+2)},circularIn:function(B){return 1-Math.sqrt(1-B*B)},circularOut:function(B){return Math.sqrt(1- --B*B)},circularInOut:function(B){return(B*=2)<1?-.5*(Math.sqrt(1-B*B)-1):.5*(Math.sqrt(1-(B-=2)*B)+1)},elasticIn:function(B){var I,F=.1,T=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=T/4):I=T*Math.asin(1/F)/(2*Math.PI),-(F*Math.pow(2,10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/T)))},elasticOut:function(B){var I,F=.1,T=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=T/4):I=T*Math.asin(1/F)/(2*Math.PI),F*Math.pow(2,-10*B)*Math.sin((B-I)*(2*Math.PI)/T)+1)},elasticInOut:function(B){var I,F=.1,T=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=T/4):I=T*Math.asin(1/F)/(2*Math.PI),(B*=2)<1?-.5*(F*Math.pow(2,10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/T)):F*Math.pow(2,-10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/T)*.5+1)},backIn:function(B){var I=1.70158;return B*B*((I+1)*B-I)},backOut:function(B){var I=1.70158;return--B*B*((I+1)*B+I)+1},backInOut:function(B){var I=1.70158*1.525;return(B*=2)<1?.5*(B*B*((I+1)*B-I)):.5*((B-=2)*B*((I+1)*B+I)+2)},bounceIn:function(B){return 1-L.bounceOut(1-B)},bounceOut:function(B){return B<1/2.75?7.5625*B*B:B<2/2.75?7.5625*(B-=1.5/2.75)*B+.75:B<2.5/2.75?7.5625*(B-=2.25/2.75)*B+.9375:7.5625*(B-=2.625/2.75)*B+.984375},bounceInOut:function(B){return B<.5?L.bounceIn(B*2)*.5:L.bounceOut(B*2-1)*.5+.5}},Y=L;Be.exports=Y},dejd:function(Be,J,L){},dmUQ:function(Be,J,L){"use strict";var Y=L("Ff2n"),B=L("rePB"),I=L("1OyB"),F=L("vuIU"),T=L("Ji7U"),R=L("md7G"),P=L("foSv"),m=L("q1tI"),t=L.n(m),b=L("TSYQ"),o=L.n(b),u=L("4IlW");function f(p,v){var _=Object.keys(p);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(p);v&&(E=E.filter(function(g){return Object.getOwnPropertyDescriptor(p,g).enumerable})),_.push.apply(_,E)}return _}function a(p){for(var v=1;v<arguments.length;v++){var _=arguments[v]!=null?arguments[v]:{};v%2?f(Object(_),!0).forEach(function(E){Object(B.a)(p,E,_[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(_)):f(Object(_)).forEach(function(E){Object.defineProperty(p,E,Object.getOwnPropertyDescriptor(_,E))})}return p}function i(p){var v=d();return function(){var E=Object(P.a)(p),g;if(v){var j=Object(P.a)(this).constructor;g=Reflect.construct(E,arguments,j)}else g=E.apply(this,arguments);return Object(R.a)(this,g)}}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(p){return!1}}function s(){}function n(p){p.preventDefault()}var l=function(v){return v.replace(/[^\w.-]+/g,"")},c=200,x=600,A=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,C=function(v){return v!=null},k=function(v,_){return _===v||typeof _=="number"&&typeof v=="number"&&isNaN(_)&&isNaN(v)},w=function(p){Object(T.a)(_,p);var v=i(_);function _(E){var g;Object(I.a)(this,_),g=v.call(this,E),g.onKeyDown=function(S){var z=g.props,H=z.onKeyDown,M=z.onPressEnter;if(S.keyCode===u.a.UP){var V=g.getRatio(S);g.up(S,V,null),g.stop()}else if(S.keyCode===u.a.DOWN){var K=g.getRatio(S);g.down(S,K,null),g.stop()}else S.keyCode===u.a.ENTER&&M&&M(S);if(g.recordCursorPosition(),g.lastKeyCode=S.keyCode,H){for(var $=arguments.length,Z=new Array($>1?$-1:0),me=1;me<$;me++)Z[me-1]=arguments[me];H.apply(void 0,[S].concat(Z))}},g.onKeyUp=function(S){var z=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),z){for(var H=arguments.length,M=new Array(H>1?H-1:0),V=1;V<H;V++)M[V-1]=arguments[V];z.apply(void 0,[S].concat(M))}},g.onChange=function(S){var z=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(S)),g.setState({inputValue:g.rawInput}),z(g.toNumber(g.rawInput))},g.onMouseUp=function(){var S=g.props.onMouseUp;g.recordCursorPosition(),S&&S.apply(void 0,arguments)},g.onFocus=function(){var S;g.setState({focused:!0}),(S=g.props).onFocus.apply(S,arguments)},g.onBlur=function(){var S=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var z=g.getCurrentValidValue(g.state.inputValue),H=g.setValue(z,s);if(S){var M=g.input.value,V=g.getInputDisplayValue({focus:!1,value:H});g.input.value=V&&Number(V),S.apply(void 0,arguments),g.input.value=M}},g.getRatio=function(S){var z=1;return S.metaKey||S.ctrlKey?z=.1:S.shiftKey&&(z=10),z},g.getFullNum=function(S){return isNaN(S)?S:/e/i.test(String(S))?Number(S).toFixed(18).replace(/\.?0+$/,""):S},g.getPrecision=function(S){if(C(g.props.precision))return g.props.precision;var z=String(S);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var H=0;return z.indexOf(".")>=0&&(H=z.length-z.indexOf(".")-1),H},g.getInputDisplayValue=function(S){var z=S||g.state,H=z.focused,M=z.inputValue,V=z.value,K;H?K=M:K=g.toPrecisionAsStep(V),K==null&&(K="");var $=g.formatWrapper(K);return C(g.props.decimalSeparator)&&($=$.toString().replace(".",g.props.decimalSeparator)),$},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(S){}},g.restoreByAfter=function(S){if(S===void 0)return!1;var z=g.input.value,H=z.lastIndexOf(S);if(H===-1)return!1;var M=g.cursorBefore.length;return g.lastKeyCode===u.a.DELETE&&g.cursorBefore.charAt(M-1)===S[0]?(g.fixCaret(M,M),!0):H+S.length===z.length?(g.fixCaret(H,H),!0):!1},g.partRestoreByAfter=function(S){return S===void 0?!1:Array.prototype.some.call(S,function(z,H){var M=S.substring(H);return g.restoreByAfter(M)})},g.isNotCompleteNumber=function(S){return isNaN(S)||S===""||S===null||S&&S.toString().indexOf(".")===S.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(S,z,H){g.pressingUpOrDown=!0,g.step("down",S,z,H)},g.up=function(S,z,H){g.pressingUpOrDown=!0,g.step("up",S,z,H)},g.saveInput=function(S){g.input=S};var j=E.value;j===void 0&&(j=E.defaultValue),g.state={focused:E.autoFocus};var U=g.getValidValue(g.toNumber(j));return g.state=a(a({},g.state),{},{inputValue:g.toPrecisionAsStep(U),value:U}),g}return Object(F.a)(_,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var j=this.props,U=j.value,S=j.onChange,z=j.max,H=j.min,M=this.state.focused;if(g){if(!k(g.value,U)||!k(g.max,z)||!k(g.min,H)){var V=M?U:this.getValidValue(U),K;this.pressingUpOrDown?K=V:this.inputting?K=this.rawInput:K=this.toPrecisionAsStep(V),this.setState({value:V,inputValue:K})}var $="value"in this.props?U:this.state.value;"max"in this.props&&g.max!==z&&typeof $=="number"&&$>z&&S&&S(z),"min"in this.props&&g.min!==H&&typeof $=="number"&&$<H&&S&&S(H)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Z=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===u.a.BACKSPACE?Z=this.cursorStart-1:this.lastKeyCode===u.a.DELETE&&(Z=this.cursorStart):Z=this.input.value.length,this.fixCaret(Z,Z)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case u.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case u.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(me){}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 j=g;return j===""?j="":this.isNotCompleteNumber(parseFloat(j))?j=this.state.value:j=this.getValidValue(j),this.toNumber(j)}},{key:"getValueFromEvent",value:function(g){var j=g.target.value.trim().replace(/。/g,".");return C(this.props.decimalSeparator)&&(j=j.replace(this.props.decimalSeparator,".")),j}},{key:"getValidValue",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,S=parseFloat(g);return isNaN(S)?g:(S<j&&(S=j),S>U&&(S=U),S)}},{key:"setValue",value:function(g,j){var U=this.props.precision,S=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),z=this.state.value,H=z===void 0?null:z,M=this.state.inputValue,V=M===void 0?null:M,K=typeof S=="number"?S.toFixed(U):"".concat(S),$=S!==H||K!=="".concat(V);return"value"in this.props?(V=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:V},j)):this.setState({value:S,inputValue:this.toPrecisionAsStep(g)},j),$&&this.props.onChange(S),S}},{key:"getMaxPrecision",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.props,S=U.precision,z=U.step;if(C(S))return S;var H=this.getPrecision(j),M=this.getPrecision(z),V=this.getPrecision(g);return g?Math.max(V,H+M):H+M}},{key:"getPrecisionFactor",value:function(g){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.getMaxPrecision(g,j);return Math.pow(10,U)}},{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 j=Math.abs(this.getMaxPrecision(g));return isNaN(j)?g.toString():Number(g).toFixed(j)}},{key:"toNumber",value:function(g){var j=this.props.precision,U=this.state.focused,S=g&&g.length>16&&U;return this.isNotCompleteNumber(g)||S?g:C(j)?Math.round(g*Math.pow(10,j))/Math.pow(10,j):Number(g)}},{key:"upStep",value:function(g,j){var U=this.props.step,S=this.getPrecisionFactor(g,j),z=Math.abs(this.getMaxPrecision(g,j)),H=((S*g+S*U*j)/S).toFixed(z);return this.toNumber(H)}},{key:"downStep",value:function(g,j){var U=this.props.step,S=this.getPrecisionFactor(g,j),z=Math.abs(this.getMaxPrecision(g,j)),H=((S*g-S*U*j)/S).toFixed(z);return this.toNumber(H)}},{key:"step",value:function(g,j){var U=this,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),j&&(j.persist(),j.preventDefault());var H=this.props;if(H.disabled)return;var M=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(M))return;var V=this["".concat(g,"Step")](M,S),K=V>H.max||V<H.min;if(V>H.max?V=H.max:V<H.min&&(V=H.min),this.setValue(V,null),this.setState({focused:!0},function(){U.pressingUpOrDown=!1}),K)return;this.autoStepTimer=setTimeout(function(){U[g](j,S,!0)},z?c:x)}},{key:"fixCaret",value:function(g,j){if(g===void 0||j===void 0||!this.input||!this.input.value)return;try{var U=this.input.selectionStart,S=this.input.selectionEnd;(g!==U||j!==S)&&this.input.setSelectionRange(g,j)}catch(z){}}},{key:"render",value:function(){var g,j=this.props,U=j.prefixCls,S=j.disabled,z=j.readOnly,H=j.useTouch,M=j.autoComplete,V=j.upHandler,K=j.downHandler,$=j.className,Z=j.max,me=j.min,oe=j.style,fe=j.title,ye=j.onMouseEnter,Ie=j.onMouseLeave,ve=j.onMouseOver,de=j.onMouseOut,Je=j.required,Rt=j.onClick,Ee=j.tabIndex,Me=j.type,rt=j.placeholder,He=j.id,ke=j.inputMode,ht=j.pattern,ie=j.step,xe=j.maxLength,we=j.autoFocus,$e=j.name,ct=j.onPaste,yt=j.onInput,Ut=Object(Y.a)(j,["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"]),We=this.state,kt=We.value,qt=We.focused,Pe=o()(U,(g={},Object(B.a)(g,$,!!$),Object(B.a)(g,"".concat(U,"-disabled"),S),Object(B.a)(g,"".concat(U,"-focused"),qt),g)),Ae={};Object.keys(Ut).forEach(function(_e){(_e.substr(0,5)==="data-"||_e.substr(0,5)==="aria-"||_e==="role")&&(Ae[_e]=Ut[_e])});var ut=!z&&!S,Et=this.getInputDisplayValue(null),Ze=(kt||kt===0)&&(isNaN(kt)||Number(kt)>=Z),dt=(kt||kt===0)&&(isNaN(kt)||Number(kt)<=me),Ne=Ze||S||z,Te=dt||S||z,Oe=o()("".concat(U,"-handler"),"".concat(U,"-handler-up"),Object(B.a)({},"".concat(U,"-handler-up-disabled"),Ne)),ae=o()("".concat(U,"-handler"),"".concat(U,"-handler-down"),Object(B.a)({},"".concat(U,"-handler-down-disabled"),Te)),le=H?{onTouchStart:Ne?s:this.up,onTouchEnd:this.stop}:{onMouseDown:Ne?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=H?{onTouchStart:Te?s:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Pe,style:oe,title:fe,onMouseEnter:ye,onMouseLeave:Ie,onMouseOver:ve,onMouseOut:de,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(U,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Increase Value","aria-disabled":Ne,className:Oe}),V||t.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-up-inner"),onClick:n})),t.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Decrease Value","aria-disabled":Te,className:ae}),K||t.a.createElement("span",{unselectable:"on",className:"".concat(U,"-handler-down-inner"),onClick:n}))),t.a.createElement("div",{className:"".concat(U,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":me,"aria-valuemax":Z,"aria-valuenow":kt,required:Je,type:Me,placeholder:rt,onPaste:ct,onClick:Rt,onMouseUp:this.onMouseUp,className:"".concat(U,"-input"),tabIndex:Ee,autoComplete:M,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ut?this.onKeyDown:s,onKeyUp:ut?this.onKeyUp:s,autoFocus:we,maxLength:xe,readOnly:z,disabled:S,max:Z,min:me,step:ie,name:$e,title:fe,id:He,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Et),pattern:ht,inputMode:ke,onInput:yt},Ae))))}}]),_}(t.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:A,min:-A,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:l,required:!1,autoComplete:"off"};var y=w,h=J.a=y},dqUG:function(Be,J,L){var Y=L("Gev7"),B=L("bYtY"),I=L("6GrX"),F=L("pzxd"),T=L("gut8"),R=T.ContextCachedBy,P=function(t){Y.call(this,t)};P.prototype={constructor:P,type:"text",brush:function(t,b){var o=this.style;this.__dirty&&F.normalizeTextStyle(o,!0),o.fill=o.stroke=o.shadowBlur=o.shadowColor=o.shadowOffsetX=o.shadowOffsetY=null;var u=o.text;if(u!=null&&(u+=""),!F.needDrawText(u,o)){t.__attrCachedBy=R.NONE;return}this.setTransform(t),F.renderText(this,t,u,o,null,b),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&F.normalizeTextStyle(t,!0),!this._rect){var b=t.text;b!=null?b+="":b="";var o=I.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(o.x+=t.x||0,o.y+=t.y||0,F.getStroke(t.textStroke,t.textStrokeWidth)){var u=t.textStrokeWidth;o.x-=u/2,o.y-=u/2,o.width+=u,o.height+=u}this._rect=o}return this._rect}},B.inherits(P,Y);var m=P;Be.exports=m},eozf:function(Be,J,L){"use strict";L.d(J,"b",function(){return Ie}),L.d(J,"c",function(){return ve});var Y=L("sRBo"),B=L("kaz8"),I=L("5Dmo"),F=L("3S7+"),T=L("/zsF"),R=L("PArb"),P=L("7Kak"),m=L("9yH6"),t=L("14J3"),b=L("BMrR"),o=L("+L6B"),u=L("2/Rp"),f=L("jCWc"),a=L("kPKH"),i=L("2qtc"),d=L("kLXV"),s=L("9og8"),n=L("miYZ"),l=L("tsqr"),c=L("oBTY"),x=L("k1fw"),A=L("tJVT"),C=L("OaEy"),k=L("2fM7"),w=L("iQDF"),y=L("+eQT"),h=L("WmNS"),p=L.n(h),v=L("q1tI"),_=L.n(v),E=L("/MfK"),g=L("w5pM"),j=L("Lyp1"),U=L("wd/R"),S=L.n(U),z=L("xKgJ"),H=L("ErOA"),M=L("LvDl"),V=L.n(M),K=L("1vsH"),$=L("zetH"),Z=L.n($),me=L("Ty5D"),oe=L("9kvl"),fe=L("AHFd");function ye(Ee,Me){for(var rt=[],He=Ee;He<Me;He++)rt.push(He);return rt}var Ie=function(Me,rt,He){var ke=Me<S()().startOf("day"),ht=Me>S()(rt).endOf("day"),ie=Me<S()(He).startOf("day");return rt?He?S()()<=S()(He)?ie||ht:ke||ht:Me&&ke||ht:He&&S()()<=S()(He)?ie:ke},ve=function(Me,rt){var He=parseInt(S()(Me).format("HH")),ke=parseInt(S()().format("HH")),ht=parseInt(S()().format("mm"));if(!Me)return{disabledHours:function(){return ye(0,ke)},disabledMinutes:function(){return ye(0,ht)}};if(rt){var ie=parseInt(S()(rt).format("HH")),xe=parseInt(S()(rt).format("mm"));return S()(Me).isSame(S()(rt),"day")?{disabledHours:function(){return ye(0,ie)},disabledMinutes:function(){return He<=ie?ye(0,xe):[]}}:void 0}return S()(Me).isSame(S()(),"day")?{disabledHours:function(){return ye(0,ke)},disabledMinutes:function(){return S()(Me).isSame(S()(),"hour")&&He<=ke?ye(0,ht):[]}}:void 0},de=y.a.RangePicker,Je=k.a.Option,Rt=function(Me){var rt,He,ke,ht,ie,xe,we,$e=Me.shixunHomeworks,ct=Me.loading,yt=Me.dispatch,Ut=Object(me.i)(),We=$e.workSetting,kt=$e.workList,qt=$e.changeData,Pe=Object(v.useState)(!0),Ae=Object(A.a)(Pe,2),ut=Ae[0],Et=Ae[1],Ze=Object(v.useState)(!1),dt=Object(A.a)(Ze,2),Ne=dt[0],Te=dt[1],Oe=Object(v.useState)([]),ae=Object(A.a)(Oe,2),le=ae[0],he=ae[1],_e=Object(v.useState)([]),Se=Object(A.a)(_e,2),ze=Se[0],xt=Se[1],Qt=Object(v.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:fe.a.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0}),sn=Object(A.a)(Qt,2),gt=sn[0],zt=sn[1];Object(v.useEffect)(function(){return Ot(),function(){he([].concat())}},[]);var Ot=function(){yt({type:"shixunHomeworks/getWorkSetting",payload:Object(x.a)({},Ut)})};Object(v.useEffect)(function(){var Ge;if(!(We!=null&&We.course_id))return;Object.keys(gt).map(function(lt){gt[lt]=We[lt]}),(!gt.allow_late||!gt.unified_late)&&(gt.late_penalty=20,gt.penalty_type=fe.a.Percent),gt.unified_setting||(gt.unified_late=!1,gt.unified_anonymous_comment=!1,gt.unified_anonymous_appeal=!1),le=JSON.parse(JSON.stringify(We.group_settings.map(function(lt){return Object(x.a)(Object(x.a)({},lt),{},{group_name:[lt.group_name]})}).filter(function(lt){return lt.publish_time!==null}))),ze=JSON.parse(JSON.stringify(We.allow_late_settings.map(function(lt){return Object(x.a)(Object(x.a)({},lt),{},{group_name:[lt.group_name]})}).filter(function(lt){return lt.late_time!==null}))),zt(Object(x.a)({},gt)),he(Object(c.a)(le)),((Ge=ze)===null||Ge===void 0?void 0:Ge.length)<=0?xt([{penalty_type:fe.a.Percent,late_penalty:20}]):xt(Object(c.a)(ze))},[We]);var At=function(){var lt,Lt,Wt=JSON.parse(JSON.stringify(gt));if(Wt.challenge_settings.filter(function(gn){return!gn.hide}),Wt.categoryId=Ut.categoryId,(lt=Wt.challenge_settings)!==null&&lt!==void 0&&lt.every(function(gn){return!gn.checked})){l.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(gt.unified_setting||(le=(Lt=le)===null||Lt===void 0?void 0:Lt.map(function(gn){var tr;if(!gn.publish_time||!gn.end_time)throw l.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!gn.group_name)throw l.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return gn.group_name=typeof(gn==null?void 0:gn.group_name)=="string"?[gn==null?void 0:gn.group_name]:gn==null?void 0:gn.group_name,gn.group_id=(tr=We.group_settings)===null||tr===void 0?void 0:tr.filter(function(Wn){var En;return gn==null||((En=gn.group_name)===null||En===void 0)?void 0:En.includes(Wn.group_name)}).map(function(Wn){return Wn.group_id||Wn.id}).toString().split(","),gn})),Wt.group_settings=le,gt.allow_late)if(gt.unified_late){if(gt.late_penalty===null||gt.late_penalty===void 0||gt.late_penalty<0||gt.late_penalty>100)throw l.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!gt.late_time)throw l.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var ln;ze=(ln=ze)===null||ln===void 0?void 0:ln.map(function(gn){var tr,Wn;if(gn.late_penalty===null||gn.late_penalty===void 0||gn.late_penalty<0||gn.late_penalty>100)throw l.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!gn.late_time)throw l.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!gn.group_name)throw l.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return gn.group_name=typeof(gn==null?void 0:gn.group_name)=="string"?[gn==null?void 0:gn.group_name]:gn==null?void 0:gn.group_name,gn.group_id=gn==null||((tr=gn.group_name)===null||tr===void 0||((Wn=tr.map(function(En){var xr,Er,rr=(xr=We.group_settings)===null||xr===void 0||((Er=xr.filter(function(ur){return(ur==null?void 0:ur.group_name)===En}))===null||Er===void 0)?void 0:Er[0];return rr==null?void 0:rr.group_id}))===null||Wn===void 0))?void 0:Wn.toString().split(","),gn}),Wt.allow_late_settings=ze}ft(Wt)},ft=function(lt){var Lt,Wt;if(lt.total_score===null){l.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(lt!=null&&lt.work_efficiency&&lt.eff_score===null){l.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var ln=lt.challenge_settings.reduce(function(Wn,En){return Wn+Number(En.challenge_score)},0);if((ln==null?void 0:ln.toFixed(10))!==((Lt=lt.total_score-lt.eff_score)===null||Lt===void 0?void 0:Lt.toFixed(10))){l.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(lt.total_score,"\u5206"));return}var gn={shixun_evaluation:lt.shixun_evaluation,challenge_settings:lt.challenge_settings},tr=function(){var Wn=Object(s.a)(p.a.mark(function En(){var xr;return p.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return Te(!0),rr.next=3,Object(H.a)("/api/homework_commons/".concat(Ut.categoryId,"/publish_setting.json"),{method:"post",body:Object(x.a)({},lt)});case 3:xr=rr.sent,xr.status===0&&(l.b.success("\u66F4\u65B0\u6210\u529F"),Et(!0),Ot(),yt({type:"shixunHomeworks/getWorkList",payload:Object(x.a)({},Ut)})),Te(!1);case 6:case"end":return rr.stop()}},En)}));return function(){return Wn.apply(this,arguments)}}();!Object(M.isEqual)(qt,gn)&&!(kt!=null&&(Wt=kt.homework_status)!==null&&Wt!==void 0&&Wt.includes("\u672A\u53D1\u5E03"))?d.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:tr}):tr()},be=function(lt,Lt){var Wt,ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"group_id";return Lt?Lt.find(function(gn){return gn[ln]===lt}):We==null||((Wt=We.group_settings)===null||Wt===void 0)?void 0:Wt.find(function(gn){return gn.group_id[0]===lt})},Fe=(We==null?void 0:We.allow_late)||(We==null?void 0:We.anonymous_comment),Nt=function(lt){var Lt=be(lt,We==null?void 0:We.allow_late_settings,"id"),Wt=be(lt,We==null?void 0:We.anonymous_comment_settings);return(We==null?void 0:We.allow_late)&&Lt&&(Lt==null?void 0:Lt.late_time)!==null||(We==null?void 0:We.anonymous_comment)&&Wt&&(Wt==null?void 0:Wt.evaluation_start)!==null},bt=Object(v.useMemo)(function(){var Ge;if(We!=null&&We.unified_setting){var lt;return!(kt!=null&&(lt=kt.homework_status)!==null&&lt!==void 0&&lt.includes("\u5DF2\u622A\u6B62"))||(We==null?void 0:We.allow_late)||(We==null?void 0:We.anonymous_comment)}var Lt=We==null||((Ge=We.group_settings)===null||Ge===void 0)?void 0:Ge.some(function(Wt){return S()(Wt.end_time)<=S()()});return!Lt||(We==null?void 0:We.allow_late)||(We==null?void 0:We.all_group_late)},[We,kt]),Kt=We==null?void 0:We.anonymous_comment,Zt=function(lt){if(!lt)return!1;var Lt=be(lt,We==null?void 0:We.anonymous_comment_settings);return(We==null?void 0:We.anonymous_comment)&&Lt&&(Lt==null?void 0:Lt.evaluation_start)!==null};return _.a.createElement("section",{className:[Z.a.form," bg-white pl30 pr30 pt10"].join(" ")},_.a.createElement(b.a,null,_.a.createElement(a.a,{span:24},_.a.createElement(b.a,{align:"middle"},_.a.createElement(a.a,{flex:"1"}),_.a.createElement(a.a,null,Object(z.c)()&&ut&&_.a.createElement(u.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Et(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")))),_.a.createElement("div",null,_.a.createElement("label",null,"\u53D1\u5E03\u65B9\u5F0F\uFF1A")," ",_.a.createElement(m.a.Group,{disabled:ut||!(kt!=null&&(rt=kt.homework_status)!==null&&rt!==void 0&&rt.includes("\u672A\u53D1\u5E03")),value:gt.unified_setting,onChange:function(lt){var Lt;if(!(kt!=null&&(Lt=kt.homework_status)!==null&&Lt!==void 0&&Lt.includes("\u672A\u53D1\u5E03"))){l.b.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(gt.unified_setting=!gt.unified_setting,gt.unified_setting||(gt.unified_late=!1),zt(Object.assign({},gt)),gt.unified_setting===!1&&le==""){he(le.concat({}));return}gt.unified_setting&&(he([]),xt([{late_penalty:5}]))}},_.a.createElement(m.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),_.a.createElement(m.a,{disabled:(We==null||((He=We.group_settings)===null||He===void 0)?void 0:He.length)===0,value:!1},"\u5206\u73ED\u53D1\u5E03")),(We==null||((ke=We.group_settings)===null||ke===void 0)?void 0:ke.length)===0&&_.a.createElement("p",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09"))),gt.unified_setting&&_.a.createElement("div",null,_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u53D1\u5E03\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(y.a,{disabled:ut||!(kt!=null&&(ht=kt.homework_status)!==null&&ht!==void 0&&ht.includes("\u672A\u53D1\u5E03")||kt!=null&&(ie=kt.homework_status)!==null&&ie!==void 0&&ie.includes("\u672A\u5F00\u59CB")),style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:function(lt){return Ie(lt,We==null?void 0:We.course_end_date)},disabledTime:function(lt){return ve(lt)},value:gt.publish_time?S()(gt.publish_time):"",onChange:function(lt,Lt){gt.publish_time=Lt,(gt.end_time==""||!gt.end_time)&&gt.unified_setting&&(gt.end_time=S()(lt).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),zt(Object.assign({},gt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u7684\u65F6\u95F4)"))),_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u622A\u6B62\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(y.a,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:S()(Object(K.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:ut||Fe,disabledDate:function(lt){return Ie(lt,We==null?void 0:We.course_end_date,gt.publish_time)},disabledTime:function(lt){return ve(lt,gt.publish_time)},value:gt.end_time?S()(gt.end_time):"",onChange:function(lt,Lt){gt.end_time=Lt,zt(Object.assign({},gt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))),!gt.unified_setting&&((xe=le)===null||xe===void 0?void 0:xe.length)>0&&_.a.createElement(b.a,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"}},_.a.createElement(a.a,{span:24},_.a.createElement(b.a,null,_.a.createElement(a.a,{span:10}),_.a.createElement(a.a,{span:10},_.a.createElement(b.a,{className:"c-grey-c ml30"},_.a.createElement(a.a,{flex:"1"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4)"),_.a.createElement(a.a,{flex:"1"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9)"))),_.a.createElement(a.a,{span:4}))),le&&le.map(function(Ge,lt){var Lt,Wt,ln,gn,tr;return _.a.createElement(a.a,{span:24,key:lt},_.a.createElement(b.a,{gutter:[8,16]},_.a.createElement(a.a,{span:10},_.a.createElement(b.a,{gutter:[8,16]},_.a.createElement(a.a,null,"\u53D1\u5E03\u89C4\u5219 ",lt+1),_.a.createElement(a.a,{flex:"1",style:{maxWidth:300}},_.a.createElement(k.a,{disabled:ut||!(kt!=null&&(Lt=kt.homework_status)!==null&&Lt!==void 0&&Lt.includes("\u672A\u53D1\u5E03"))&&Ge.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:Ge.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(En){le[lt].group_name=En,le[lt].group_id=Ge.group_id;var xr=Object(M.flattenDeep)(le.map(function(rr){return rr.group_name})),Er=ze.map(function(rr){var ur=(rr==null?void 0:rr.group_name)||[];return Object(x.a)(Object(x.a)({},rr),{},{group_name:Object(M.remove)(ur,function(Rr){return xr.includes(Rr)})})});xt(Er),he(le.slice())}},We.group_settings&&We.group_settings.map(function(Wn){var En=le.map(function(xr){return xr.group_name}).flat();if(!En.includes(Wn.group_name))return _.a.createElement(Je,{value:Wn.group_name,key:Wn.id},Wn.group_name)}))))),_.a.createElement(a.a,{span:10},_.a.createElement("div",{className:"ml30"},_.a.createElement(de,{ranges:{\u6B64\u523B:[Ge.publish_time?S()(Ge.publish_time):S()(),S()()]},allowClear:!1,disabled:ut||(S()()<=S()((Wt=be((ln=Ge.group_id)===null||ln===void 0?void 0:ln[0]))===null||Wt===void 0?void 0:Wt.publish_time)?!1:[!0,Nt((gn=Ge.group_id)===null||gn===void 0?void 0:gn[0])]),style:{width:400},placeholder:["\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4","\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4"],disabledDate:function(En){return Ie(En,We==null?void 0:We.course_end_date)},disabledTime:function(En){return ve(En)},showTime:{showNow:!0,format:"HH:mm",defaultValue:[S()(Object(K.d)(),"HH:mm"),S()(Object(K.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:Ge.publish_time&&[S()(Ge.publish_time),Ge.end_time?S()(Ge.end_time):void 0],onChange:function(En,xr){le[lt].publish_time=xr[0],le[lt].end_time=xr[1],he(Object(c.a)(le))}}))),!ut&&_.a.createElement(a.a,{span:4},lt>0&&!Ge.id&&_.a.createElement(E.a,{onClick:function(){le=le.filter(function(En,xr){return lt!==xr}),he(le.slice()),setTimeout(function(){return he(le.slice())},10)}}),le.length<(We==null||((tr=We.group_settings)===null||tr===void 0)?void 0:tr.length)&&_.a.createElement(g.a,{className:"c-green ml20",onClick:function(){he(le.concat({}))}}))))})),_.a.createElement(R.a,null),_.a.createElement(b.a,null,_.a.createElement(a.a,null,_.a.createElement("strong",null,"\u8865\u4EA4\u8BBE\u7F6E"),_.a.createElement(F.a,{placement:"right",title:"\u4F5C\u4E1A\u622A\u6B62\u540E\u624D\u53EF\u5F00\u542F\u8865\u4EA4\uFF0C\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"},_.a.createElement(j.a,{style:{marginLeft:4,cursor:"pointer"}}))),_.a.createElement(a.a,{span:24,className:"mt15 pl30"},_.a.createElement(B.a,{checked:gt.allow_late,disabled:ut||bt,onChange:function(){gt.allow_late=!gt.allow_late,ze==""&&xt([{late_penalty:5}]),zt(Object.assign({},gt))}},_.a.createElement("strong",null,"\u5F00\u542F\u8865\u4EA4")),_.a.createElement(F.a,{overlayStyle:{width:380,maxWidth:380},title:_.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},_.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219\u8BF4\u660E"),_.a.createElement("span",null,"\u5F00\u542F\u8865\u4EA4\uFF0C\u5B66\u751F\u53EA\u5728\u8865\u4EA4\u65F6\u95F4\u5185\u624D\u901A\u5173\u5219\u6263\u9664\u5206\u503C\uFF0C\u672A\u901A\u5173\u4E0D\u6263\u5206\uFF1B"),_.a.createElement("span",null,"\u5B66\u751F\u5728\u6B63\u5E38\u4F5C\u4E1A\u89C4\u5B9A\u65F6\u95F4\u5185\u901A\u5173\uFF0C\u5728\u8865\u4EA4\u9636\u6BB5\u518D\u6B21\u901A\u5173\u4E0D\u6263\u5206\u3002"))},_.a.createElement(j.a,null)))),(gt==null?void 0:gt.allow_late)&&_.a.createElement("div",{style:{marginLeft:22}},_.a.createElement("div",{className:"ml30 mt20"},_.a.createElement("span",null,"\u8865\u4EA4\u65B9\u5F0F\uFF1A"),_.a.createElement(m.a.Group,{disabled:ut||(We==null?void 0:We.anonymous_comment)||(We==null?void 0:We.allow_late),value:gt.unified_late,onChange:function(lt){gt.unified_late=lt.target.value,ze==""&&!lt.target.value&&xt([{penalty_type:fe.a.Percent,late_penalty:20}]),zt(Object(x.a)({},gt))}},(gt==null?void 0:gt.unified_setting)&&_.a.createElement(m.a,{value:!0}," \u7EDF\u4E00\u8865\u4EA4 "),(We==null||((we=We.group_settings)===null||we===void 0)?void 0:we.length)>0&&_.a.createElement(m.a,{value:!1}," \u5206\u73ED\u8865\u4EA4 "))),gt!=null&&gt.unified_late?_.a.createElement(_.a.Fragment,null,_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u8865\u4EA4\u6263\u5206:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(fe.b,{disabled:ut||Kt,value:{type:gt.penalty_type,inputValue:gt.late_penalty},onChange:function(lt){zt(Object(x.a)(Object(x.a)({},gt),{},{late_penalty:lt.inputValue,penalty_type:lt.type}))}})),_.a.createElement(a.a,{flex:"1",className:"ml5"},_.a.createElement("span",{className:"c-grey-c ml10"},gt.penalty_type===fe.a.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6210\u7EE9\u5C06\u6263\u9664\u8865\u4EA4\u5173\u5361\u5206\u503C\u7684\u767E\u5206\u6BD4)"))),_.a.createElement(b.a,{align:"middle",className:"mt25 pl30"},_.a.createElement(a.a,null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4:"),_.a.createElement(a.a,{className:"ml5"},_.a.createElement(y.a,{allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:S()(Object(K.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:ut||Kt,value:gt.late_time?S()(gt.late_time):"",disabledDate:function(lt){return Ie(lt,We==null?void 0:We.course_end_date)},onChange:function(lt,Lt){gt.late_time=Lt,zt(Object.assign({},gt))}})),_.a.createElement(a.a,null,_.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u5EF6\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))):ze.map(function(Ge,lt){var Lt;return _.a.createElement(a.a,{span:24,key:lt},_.a.createElement(b.a,{className:"mt25"},_.a.createElement(a.a,{style:{marginLeft:30}},_.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219",lt+1,"\uFF1A"),_.a.createElement(k.a,{disabled:ut||!(kt!=null&&(Lt=kt.homework_status)!==null&&Lt!==void 0&&Lt.includes("\u672A\u53D1\u5E03"))&&Ge.id||(We==null?void 0:We.anonymous_comment),mode:"multiple",style:{width:306},value:typeof Ge.group_name=="string"?[Ge.group_name]:Ge.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(ln){ze[lt].group_name=ln,ze[lt].group_id=Ge.group_id,xt(ze.slice())}},We.group_settings&&We.group_settings.map(function(Wt){var ln=ze.map(function(tr){return tr.group_name}).flat(),gn=le.map(function(tr){return tr.group_name}).flat();if(gt!=null&&gt.unified_setting){if(!ln.includes(Wt.group_name))return _.a.createElement(Je,{value:Wt.group_name,key:Wt.id},Wt.group_name)}else if(gn.includes(Wt.group_name)&&(!ln.includes(Wt.group_name)&&S()(Wt.end_time)<=S()()))return _.a.createElement(Je,{value:Wt.group_name,key:Wt.id},Wt.group_name)}))),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u6263\u5206\uFF1A"),_.a.createElement(fe.b,{disabled:ut||Zt(Ge.id),value:{type:Ge.penalty_type,inputValue:Ge.late_penalty},onChange:function(ln){ze[lt].late_penalty=ln.inputValue,ze[lt].penalty_type=ln.type,xt(Object(c.a)(ze))}})),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\uFF1A"),_.a.createElement(y.a,{disabled:ut||Zt(Ge.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:S()(Object(K.d)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:function(ln){return Ie(ln,We==null?void 0:We.course_end_date)},format:"YYYY-MM-DD HH:mm",value:Ge!=null&&Ge.late_time?S()(Ge.late_time):void 0,onChange:function(ln,gn){ze[lt].late_time=gn,xt(Object(c.a)(ze))}})),!ut&&_.a.createElement(a.a,{className:"ml20"},lt>0&&!Ge.id&&_.a.createElement(E.a,{onClick:function(){ze=ze.filter(function(ln,gn){return lt!==gn}),xt(ze.slice()),setTimeout(function(){return xt(ze.slice())},10)}}),_.a.createElement(g.a,{className:"c-green ml20",onClick:function(){xt(ze.concat({penalty_type:fe.a.Percent,late_minus_score:20}))}}))))})),_.a.createElement(R.a,null),!ut&&_.a.createElement(a.a,{className:"mb50"},_.a.createElement(u.a,{type:"primary",size:"large",style:{marginTop:"40px"},loading:Ne,onClick:function(){return At()}},"\u63D0\u4EA4"),_.a.createElement(u.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Et(!0),Ot()}},"\u53D6\u6D88")))};J.a=Object(oe.a)(function(Ee){var Me=Ee.shixunHomeworks,rt=Ee.loading;return{shixunHomeworks:Me,loading:rt.effects}})(Rt)},fW2E:function(Be,J){var L={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function Y(B,I,F){return L.hasOwnProperty(I)?F*=B.dpr:F}Be.exports=Y},fjLI:function(Be,J,L){"use strict";L.d(J,"f",function(){return f}),L.d(J,"b",function(){return a}),L.d(J,"a",function(){return i}),L.d(J,"d",function(){return d}),L.d(J,"e",function(){return s}),L.d(J,"c",function(){return n});var Y=L("8HAY"),B=L("Vhoy"),I=L("MI8n"),F=L("JYp7"),T=L("pmY6"),R=L("24hK"),P=L("nnTU"),m=L("T8No"),t=L("Cg/j"),b=L("t9D7"),o=function(l,c,x,A){var C=arguments.length,k=C<3?c:A===null?A=Object.getOwnPropertyDescriptor(c,x):A,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,c,x,A);else for(var y=l.length-1;y>=0;y--)(w=l[y])&&(k=(C<3?w(k):C>3?w(c,x,k):w(c,x))||k);return C>3&&k&&Object.defineProperty(c,x,k),k},u=function(l,c){return function(x,A){c(x,A,l)}};function f(l){return l.command!==void 0}class a{constructor(l){this.id=a._idPool++,this._debugName=l}}a._idPool=0,a.CommandPalette=new a("CommandPalette"),a.EditorContext=new a("EditorContext"),a.SimpleEditorContext=new a("SimpleEditorContext"),a.EditorContextCopy=new a("EditorContextCopy"),a.EditorContextPeek=new a("EditorContextPeek"),a.MenubarEditMenu=new a("MenubarEditMenu"),a.MenubarCopy=new a("MenubarCopy"),a.MenubarGoMenu=new a("MenubarGoMenu"),a.MenubarSelectionMenu=new a("MenubarSelectionMenu"),a.InlineCompletionsActions=new a("InlineCompletionsActions");const i=Object(t.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new I.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:l=>l===a.CommandPalette}}addCommand(l){return this.addCommands(F.a.single(l))}addCommands(l){for(const c of l)this._commands.set(c.id,c);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(T.i)(()=>{let c=!1;for(const x of l)c=this._commands.delete(x.id)||c;c&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(l){return this._commands.get(l)}getCommands(){const l=new Map;return this._commands.forEach((c,x)=>l.set(x,c)),l}appendMenuItem(l,c){return this.appendMenuItems(F.a.single({id:l,item:c}))}appendMenuItems(l){const c=new Set,x=new R.a;for(const{id:A,item:C}of l){let k=this._menuItems.get(A);k||(k=new R.a,this._menuItems.set(A,k)),x.push(k.push(C)),c.add(A)}return this._onDidChangeMenu.fire(c),Object(T.i)(()=>{if(x.size>0){for(let A of x)A();this._onDidChangeMenu.fire(c),x.clear()}})}getMenuItems(l){let c;return this._menuItems.has(l)?c=[...this._menuItems.get(l)]:c=[],l===a.CommandPalette&&this._appendImplicitItems(c),c}_appendImplicitItems(l){const c=new Set;for(const x of l)f(x)&&(c.add(x.command.id),x.alt&&c.add(x.alt.id));this._commands.forEach((x,A)=>{c.has(A)||l.push({command:x})})}};class s extends Y.e{constructor(l,c,x,A){super(`submenuitem.${l.submenu.id}`,typeof l.title=="string"?l.title:l.title.value,[],"submenu");this.item=l,this._menuService=c,this._contextKeyService=x,this._options=A}get actions(){const l=[],c=this._menuService.createMenu(this.item.submenu,this._contextKeyService),x=c.getActions(this._options);c.dispose();for(const[,A]of x)A.length>0&&(l.push(...A),l.push(new Y.d));return l.length&&l.pop(),l}}let n=class l{constructor(c,x,A,C,k){var w,y;if(this._commandService=k,this.id=c.id,this.label=(A==null?void 0:A.renderShortTitle)&&c.shortTitle?typeof c.shortTitle=="string"?c.shortTitle:c.shortTitle.value:typeof c.title=="string"?c.title:c.title.value,this.tooltip=(y=typeof c.tooltip=="string"?c.tooltip:(w=c.tooltip)===null||w===void 0?void 0:w.value)!==null&&y!==void 0?y:"",this.enabled=!c.precondition||C.contextMatchesRules(c.precondition),this.checked=void 0,c.toggled){const h=c.toggled.condition?c.toggled:{condition:c.toggled};this.checked=C.contextMatchesRules(h.condition),this.checked&&h.tooltip&&(this.tooltip=typeof h.tooltip=="string"?h.tooltip:h.tooltip.value),h.title&&(this.label=typeof h.title=="string"?h.title:h.title.value)}this.item=c,this.alt=x?new l(x,void 0,A,C,k):void 0,this._options=A,b.d.isThemeIcon(c.icon)&&(this.class=B.a.asClassName(c.icon))}dispose(){}run(...c){var x,A;let C=[];return((x=this._options)===null||x===void 0?void 0:x.arg)&&(C=[...C,this._options.arg]),((A=this._options)===null||A===void 0?void 0:A.shouldForwardArgs)&&(C=[...C,...c]),this._commandService.executeCommand(this.id,...C)}};n=o([u(3,m.b),u(4,P.b)],n)},fyJ8:function(Be,J,L){"use strict";var Y=L("rePB"),B=L("VTBJ"),I=L("Ff2n"),F=L("U8pU"),T=L("q1tI"),R=L.n(T),P=L("TSYQ"),m=L.n(P),t=L("c+Xe"),b=L("sR1s");function o(d){return d&&Object(F.a)(d)==="object"&&!Array.isArray(d)&&!T.isValidElement(d)}function u(d){return typeof d=="string"?!0:Object(t.c)(d)}function f(d,s){var n,l=d.prefixCls,c=d.className,x=d.record,A=d.index,C=d.dataIndex,k=d.render,w=d.children,y=d.component,h=y===void 0?"td":y,p=d.colSpan,v=d.rowSpan,_=d.fixLeft,E=d.fixRight,g=d.firstFixLeft,j=d.lastFixLeft,U=d.firstFixRight,S=d.lastFixRight,z=d.appendNode,H=d.additionalProps,M=H===void 0?{}:H,V=d.ellipsis,K=d.align,$=d.rowType,Z=d.isSticky,me="".concat(l,"-cell"),oe,fe;if(w)fe=w;else{var ye=Object(b.b)(x,C);if(fe=ye,k){var Ie=k(ye,x,A);o(Ie)?(fe=Ie.children,oe=Ie.props):fe=Ie}}Object(F.a)(fe)==="object"&&!Array.isArray(fe)&&!T.isValidElement(fe)&&(fe=null),V&&(j||U)&&(fe=T.createElement("span",{className:"".concat(me,"-content")},fe));var ve=oe||{},de=ve.colSpan,Je=ve.rowSpan,Rt=ve.style,Ee=ve.className,Me=Object(I.a)(ve,["colSpan","rowSpan","style","className"]),rt=de!==void 0?de:p,He=Je!==void 0?Je:v;if(rt===0||He===0)return null;var ke={},ht=typeof _=="number",ie=typeof E=="number";ht&&(ke.position="sticky",ke.left=_),ie&&(ke.position="sticky",ke.right=E);var xe={};K&&(xe.textAlign=K);var we,$e=V===!0?{showTitle:!0}:V;$e&&($e.showTitle||$==="header")&&(typeof fe=="string"||typeof fe=="number"?we=fe.toString():T.isValidElement(fe)&&typeof fe.props.children=="string"&&(we=fe.props.children));var ct=Object(B.a)(Object(B.a)(Object(B.a)({title:we},Me),M),{},{colSpan:rt&&rt!==1?rt:null,rowSpan:He&&He!==1?He:null,className:m()(me,c,(n={},Object(Y.a)(n,"".concat(me,"-fix-left"),ht),Object(Y.a)(n,"".concat(me,"-fix-left-first"),g),Object(Y.a)(n,"".concat(me,"-fix-left-last"),j),Object(Y.a)(n,"".concat(me,"-fix-right"),ie),Object(Y.a)(n,"".concat(me,"-fix-right-first"),U),Object(Y.a)(n,"".concat(me,"-fix-right-last"),S),Object(Y.a)(n,"".concat(me,"-ellipsis"),V),Object(Y.a)(n,"".concat(me,"-with-append"),z),Object(Y.a)(n,"".concat(me,"-fix-sticky"),(ht||ie)&&Z),n),M.className,Ee),style:Object(B.a)(Object(B.a)(Object(B.a)(Object(B.a)({},M.style),xe),ke),Rt),ref:u(h)?s:null});return T.createElement(h,Object.assign({},ct),z,fe)}var a=T.forwardRef(f);a.displayName="Cell";var i=T.memo(a,function(d,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,d.record):!1});J.a=i},gMzb:function(Be,J,L){"use strict";var Y=L("k1fw"),B=L("oBTY"),I=L("9og8"),F=L("tJVT"),T=L("sRBo"),R=L("kaz8"),P=L("WmNS"),m=L.n(P),t=L("q1tI"),b=L.n(t),o=L("9kvl"),u=L("wlus"),f=L("w5pM"),a=L("ErOA"),i=L("OaEy"),d=L("2fM7"),s=L("y8nQ"),n=L("Vl3Y"),l=L("Ty5D"),c=L("yQHh"),x=L.n(c),A=R.a.Group,C=function(v){var _,E,g,j,U,S,z,H,M=v.classroomList,V=v.loading,K=v.user,$=v.exercise_id,Z=$===void 0?null:$,me=v.homework_common_id,oe=me===void 0?null:me,fe=v.setitem,ye=v.item,Ie=v.type,ve=v.rz,de=v.dispatch,Je=Object(t.useState)([]),Rt=Object(F.a)(Je,2),Ee=Rt[0],Me=Rt[1],rt=Object(t.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20}),He=Object(F.a)(rt,2),ke=He[0],ht=He[1],ie=Object(l.i)(),xe=Object(t.useState)(!1),we=Object(F.a)(xe,2),$e=we[0],ct=we[1],yt=Object(t.useState)(!1),Ut=Object(F.a)(yt,2),We=Ut[0],kt=Ut[1],qt=n.a.useForm(),Pe=Object(F.a)(qt,1),Ae=Pe[0];Object(t.useEffect)(function(){ve&&(ke.zydatas=ve,ht(Object(Y.a)({},ke)),ye!=null&&ye.ec_course_id&&ut())},[ye,ve]);function ut(){return Et.apply(this,arguments)}function Et(){return Et=Object(I.a)(m.a.mark(function ae(){return m.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return console.log("----",ye),he.next=3,Ze(ye==null?void 0:ye.ec_major_school_id);case 3:return he.next=5,Ne(ye==null?void 0:ye.ec_year_id);case 5:return he.next=7,Oe(ye==null?void 0:ye.ec_course_id);case 7:Ae.setFieldsValue({ec_course_id:ye==null?void 0:ye.ec_course_id,ec_major_school_id:ye==null?void 0:ye.ec_major_school_id,ec_point_ids:ye==null?void 0:ye.ec_point_ids,ec_year_id:ye==null?void 0:ye.ec_year_id});case 8:case"end":return he.stop()}},ae)})),Et.apply(this,arguments)}function Ze(ae){return dt.apply(this,arguments)}function dt(){return dt=Object(I.a)(m.a.mark(function ae(le){var he;return m.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.next=2,Object(a.a)("/api/ec_major_schools/".concat(le,"/ec_years/get_year_list.json"),{method:"get"});case 2:he=Se.sent,ke.jbdatas=he==null?void 0:he.data,ht(Object(Y.a)({},ke)),Ae.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]});case 6:case"end":return Se.stop()}},ae)})),dt.apply(this,arguments)}function Ne(ae){return Te.apply(this,arguments)}function Te(){return Te=Object(I.a)(m.a.mark(function ae(le){var he;return m.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.next=2,Object(a.a)("/api/ec_years/".concat(le,"/ec_courses/get_courses.json"),{method:"get"});case 2:he=Se.sent,ke.kcdatas=he==null?void 0:he.data,ht(Object(Y.a)({},ke)),Ae.setFieldsValue({ec_course_id:"",ec_point_ids:[]});case 6:case"end":return Se.stop()}},ae)})),Te.apply(this,arguments)}var Oe=function(){var ae=Object(I.a)(m.a.mark(function le(he){var _e;return m.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ze.next=2,Object(a.a)("/api/ec_courses/".concat(he,"/ec_points.json"),{method:"get",params:{ec_course_id:he}});case 2:_e=ze.sent,ke.zsdatas=_e==null?void 0:_e.data,ht(Object(Y.a)({},ke));case 5:case"end":return ze.stop()}},le)}));return function(he){return ae.apply(this,arguments)}}();return b.a.createElement("div",{className:x.a.from},b.a.createElement(n.a,{form:Ae,layout:"inline",onValuesChange:function(le){console.log("----",le),le.ec_major_school_id&&(ke.jbdatas=[],ke.kcdatas=[],ke.zsdatas=[],ht(Object(Y.a)({},ke)),Ze(le.ec_major_school_id)),le.ec_year_id&&(ke.kcdatas=[],ke.zsdatas=[],ht(Object(Y.a)({},ke)),Ne(le.ec_year_id)),le.ec_course_id&&(ke.zsdatas=[],ht(Object(Y.a)({},ke)),Oe(le.ec_course_id))},onFinish:function(){var ae=Object(I.a)(m.a.mark(function le(he){return m.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:fe(he);case 1:case"end":return Se.stop()}},le)}));return function(le){return ae.apply(this,arguments)}}()},b.a.createElement(n.a.Item,{label:"\u8BA4\u8BC1\u4E13\u4E1A",name:"ec_major_school_id"},b.a.createElement(d.a,{style:{width:150},disabled:((_=ke.zydatas)===null||_===void 0?void 0:_.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},ke==null||((E=ke.zydatas)===null||E===void 0)?void 0:E.map(function(ae,le){return b.a.createElement(d.a.Option,{key:le,value:ae==null?void 0:ae.ec_major_school_id},ae==null?void 0:ae.name)}))),b.a.createElement(n.a.Item,{label:"\u8BA4\u8BC1\u5C4A\u522B",name:"ec_year_id"},b.a.createElement(d.a,{style:{width:150},disabled:((g=ke.jbdatas)===null||g===void 0?void 0:g.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B"},ke==null||((j=ke.jbdatas)===null||j===void 0)?void 0:j.map(function(ae,le){return b.a.createElement(d.a.Option,{key:le,value:ae==null?void 0:ae.ec_year_id},ae==null?void 0:ae.year)}))),b.a.createElement(n.a.Item,{label:"\u8BFE\u7A0B",name:"ec_course_id"},b.a.createElement(d.a,{style:{width:150},disabled:((U=ke.kcdatas)===null||U===void 0?void 0:U.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"},ke==null||((S=ke.kcdatas)===null||S===void 0)?void 0:S.map(function(ae,le){return b.a.createElement(d.a.Option,{key:le,value:ae==null?void 0:ae.id},ae==null?void 0:ae.name)}))),b.a.createElement(n.a.Item,{label:"\u77E5\u8BC6\u70B9",name:"ec_point_ids"},b.a.createElement(d.a,{onChange:function(){Ae.submit()},style:{width:150},mode:"multiple",disabled:((z=ke.zsdatas)===null||z===void 0?void 0:z.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"},ke==null||((H=ke.zsdatas)===null||H===void 0)?void 0:H.map(function(ae,le){return b.a.createElement(d.a.Option,{key:le,value:ae==null?void 0:ae.id},ae==null?void 0:ae.name)})))))},k=Object(o.a)(function(p){var v=p.classroomList,_=p.loading,E=p.globalSetting,g=p.user;return{classroomList:v,globalSetting:E,loading:_.effects,user:g}})(C),w=R.a.Group,y=function(v){var _,E,g,j=v.classroomList,U=v.loading,S=v.user,z=v.exercise_id,H=z===void 0?null:z,M=v.homework_common_id,V=M===void 0?null:M,K=v.setitem,$=v.type,Z=v.dispatch,me=Object(t.useState)([{}]),oe=Object(F.a)(me,2),fe=oe[0],ye=oe[1],Ie=Object(t.useState)([]),ve=Object(F.a)(Ie,2),de=ve[0],Je=ve[1];function Rt(){return Ee.apply(this,arguments)}function Ee(){return Ee=Object(I.a)(m.a.mark(function He(){var ke,ht,ie,xe,we;return m.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.next=2,Object(a.a)("/api/ec_courses/".concat(0,"/ec_points/get_work_points.json"),{method:"get",params:{exercise_id:H,homework_common_id:V}});case 2:ht=ct.sent,(ht==null||((ke=ht.data)===null||ke===void 0)?void 0:ke.length)>0&&(we=[],ht==null||((ie=ht.data)===null||ie===void 0)||ie.map(function(yt){var Ut;yt==null||((Ut=yt.ec_point_ids)===null||Ut===void 0)||Ut.map(function(We){we.push(We)})}),K(Object(Y.a)(Object(Y.a)({},ht==null||((xe=ht.data)===null||xe===void 0)?void 0:xe[0]),{},{ec_point_ids:we})),ye(ht==null?void 0:ht.data));case 4:case"end":return ct.stop()}},He)})),Ee.apply(this,arguments)}Object(t.useEffect)(function(){var He,ke;S!=null&&(He=S.userInfo)!==null&&He!==void 0&&(ke=He.course)!==null&&ke!==void 0&&ke.course_school_id&&Me()},[S==null||((_=S.userInfo)===null||_===void 0||((E=_.course)===null||E===void 0))?void 0:E.course_school_id]);function Me(){return rt.apply(this,arguments)}function rt(){return rt=Object(I.a)(m.a.mark(function He(){var ke,ht,ie;return m.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return we.next=2,Object(a.a)("/api/schools/".concat(S==null||((ke=S.userInfo)===null||ke===void 0||((ht=ke.course)===null||ht===void 0))?void 0:ht.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:ie=we.sent,Je(ie==null?void 0:ie.data),(V||H)&&Rt();case 5:case"end":return we.stop()}},He)})),rt.apply(this,arguments)}return console.log(fe),b.a.createElement("div",{style:{display:(g=S.userInfo.course)!==null&&g!==void 0&&g.is_openengineering?"":"none"}},b.a.createElement("p",{style:{fontSize:"16px",fontWeight:400}},"\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"),fe==null?void 0:fe.map(function(He,ke){return b.a.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"}},b.a.createElement(k,{rz:de,item:He,type:ke,setitem:function(ie){fe.splice(ke,1,ie),ye(Object(B.a)(fe));var xe=[];fe==null||fe.map(function(we){var $e;we==null||(($e=we.ec_point_ids)===null||$e===void 0)||$e.map(function(ct){xe.push(ct)})}),K(Object(Y.a)(Object(Y.a)({},ie),{},{ec_point_ids:xe}))}}),ke!=0&&b.a.createElement(u.a,{onClick:function(){fe.splice(ke,1),ye(Object(B.a)(fe))},style:{marginLeft:10,fontSize:"20px"}}),b.a.createElement(f.a,{onClick:function(){fe.push({}),ye(Object(B.a)(fe))},style:{marginLeft:10,fontSize:"20px"}}))}))},h=J.a=Object(o.a)(function(p){var v=p.classroomList,_=p.loading,E=p.globalSetting,g=p.user;return{classroomList:v,globalSetting:E,loading:_.effects,user:g}})(y)},gut8:function(Be,J){var L={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Y=9;J.ContextCachedBy=L,J.WILL_BE_RESTORED=Y},h7HQ:function(Be,J,L){var Y=L("y+Vt"),B=L("T6xi"),I=Y.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(F,T){B.buildPath(F,T,!0)}});Be.exports=I},hOwI:function(Be,J){var L=Math.log(2);function Y(I,F,T,R,P,m){var t=R+"-"+P,b=I.length;if(m.hasOwnProperty(t))return m[t];if(F===1){var o=Math.round(Math.log((1<<b)-1&~P)/L);return I[T][o]}for(var u=R|1<<T,f=T+1;R&1<<f;)f++;for(var a=0,i=0,d=0;i<b;i++){var s=1<<i;s&P||(a+=(d%2?-1:1)*I[T][i]*Y(I,F-1,f,u,P|s,m),d++)}return m[t]=a,a}function B(I,F){var T=[[I[0],I[1],1,0,0,0,-F[0]*I[0],-F[0]*I[1]],[0,0,0,I[0],I[1],1,-F[1]*I[0],-F[1]*I[1]],[I[2],I[3],1,0,0,0,-F[2]*I[2],-F[2]*I[3]],[0,0,0,I[2],I[3],1,-F[3]*I[2],-F[3]*I[3]],[I[4],I[5],1,0,0,0,-F[4]*I[4],-F[4]*I[5]],[0,0,0,I[4],I[5],1,-F[5]*I[4],-F[5]*I[5]],[I[6],I[7],1,0,0,0,-F[6]*I[6],-F[6]*I[7]],[0,0,0,I[6],I[7],1,-F[7]*I[6],-F[7]*I[7]]],R={},P=Y(T,8,0,0,0,R);if(P===0)return;for(var m=[],t=0;t<8;t++)for(var b=0;b<8;b++)m[b]==null&&(m[b]=0),m[b]+=((t+b)%2?-1:1)*Y(T,7,t===0?1:0,1<<t,1<<b,R)/P*F[t];return function(o,u,f){var a=u*m[6]+f*m[7]+1;o[0]=(u*m[0]+f*m[1]+m[2])/a,o[1]=(u*m[3]+f*m[4]+m[5])/a}}J.buildTransformer=B},hW8S:function(Be,J,L){"use strict";L.d(J,"a",function(){return F}),L.d(J,"c",function(){return T}),L.d(J,"b",function(){return R});var Y=L("VTBJ"),B=L("Ff2n"),I=L("Kwbf"),F="RC_TABLE_INTERNAL_COL_DEFINE";function T(P){var m=P.expandable,t=Object(B.a)(P,["expandable"]);return"expandable"in P?Object(Y.a)(Object(Y.a)({},t),m):t}function R(P){return Object.keys(P).reduce(function(m,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(m[t]=P[t]),m},{})}},hX1E:function(Be,J){var L=Math.PI*2;function Y(B){return B%=L,B<0&&(B+=L),B}J.normalizeRadian=Y},hydK:function(Be,J){var L="http://www.w3.org/2000/svg";function Y(B){return document.createElementNS(L,B)}J.createElement=Y},hyiK:function(Be,J){function L(Y,B,I,F,T,R){if(R>B&&R>F||R<B&&R<F)return 0;if(F===B)return 0;var P=F<B?1:-1,m=(R-B)/(F-B);(m===1||m===0)&&(P=F<B?.5:-.5);var t=m*(I-Y)+Y;return t===T?Infinity:t>T?P:0}Be.exports=L},iXp4:function(Be,J,L){var Y=L("ItGF"),B=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function I(F){return Y.browser.ie&&Y.browser.version>=11?function(){var T=this.__clipPaths,R=this.style,P;if(T)for(var m=0;m<T.length;m++){var t=T[m],b=t&&t.shape,o=t&&t.type;if(b&&(o==="sector"&&b.startAngle===b.endAngle||o==="rect"&&(!b.width||!b.height))){for(var u=0;u<B.length;u++)B[u][2]=R[B[u][0]],R[B[u][0]]=B[u][1];P=!0;break}}if(F.apply(this,arguments),P)for(var u=0;u<B.length;u++)R[B[u][0]]=B[u][2]}:F}Be.exports=I},ic2d:function(Be,J,L){"use strict";L.d(J,"a",function(){return F});var Y=L("FWmy"),B=L("746U");class I{constructor(){this.data=new Map}add(T,R){Y.a(B.l(T)),Y.a(B.k(R)),Y.a(!this.data.has(T),"There is already an extension with this id"),this.data.set(T,R)}as(T){return this.data.get(T)||null}}const F=new I},j5sG:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.createSensor=void 0;var Y=B(L("NohK"));function B(F){return F&&F.__esModule?F:{default:F}}var I=function(T){var R=void 0,P=[],m=(0,Y.default)(function(){P.forEach(function(f){f(T)})}),t=function(){var a=new ResizeObserver(m);return a.observe(T),m(),a},b=function(a){R||(R=t()),P.indexOf(a)===-1&&P.push(a)},o=function(){R.disconnect(),P=[],R=void 0},u=function(a){var i=P.indexOf(a);i!==-1&&P.splice(i,1),P.length===0&&R&&o()};return{element:T,bind:b,destroy:o,unbind:u}};J.createSensor=I},jTL6:function(Be,J,L){var Y=L("y+Vt"),B=Y.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(I,F){var T=F.cx,R=F.cy,P=Math.max(F.r,0),m=F.startAngle,t=F.endAngle,b=F.clockwise,o=Math.cos(m),u=Math.sin(m);I.moveTo(o*P+T,u*P+R),I.arc(T,R,P,m,t,!b)}});Be.exports=B},juDX:function(Be,J,L){L("P47w");var Y=L("aX58"),B=Y.registerPainter,I=L("3CBa");B("svg",I)},k3GJ:function(Be,J,L){"use strict";L.d(J,"a",function(){return ga});var Y=L("rePB"),B=L("ODXe"),I=L("Ff2n"),F=L("VTBJ"),T=L("q1tI"),R=L("TSYQ"),P=L.n(R),m=L("Zm9Q"),t=L("6cGi"),b=L("KQm4"),o=L("xEkU"),u=L.n(o),f=L("t23M");function a(De){var tt=Object(T.useRef)(),at=Object(T.useRef)(!1);function je(){for(var ce=arguments.length,Ce=new Array(ce),ge=0;ge<ce;ge++)Ce[ge]=arguments[ge];at.current||(u.a.cancel(tt.current),tt.current=u()(function(){De.apply(void 0,Ce)}))}return Object(T.useEffect)(function(){return function(){at.current=!0,u.a.cancel(tt.current)}},[]),je}function i(De){var tt=Object(T.useRef)([]),at=Object(T.useState)({}),je=Object(B.a)(at,2),ce=je[1],Ce=Object(T.useRef)(typeof De=="function"?De():De),ge=a(function(){var Ye=Ce.current;tt.current.forEach(function(ot){Ye=ot(Ye)}),tt.current=[],Ce.current=Ye,ce({})});function Ue(Ye){tt.current.push(Ye),ge()}return[Ce.current,Ue]}var d=L("4IlW");function s(De,tt){var at,je=De.prefixCls,ce=De.id,Ce=De.active,ge=De.rtl,Ue=De.tab,Ye=Ue.key,ot=Ue.tab,Ke=Ue.disabled,_t=Ue.closeIcon,Ft=De.tabBarGutter,rn=De.tabPosition,hn=De.closable,Rn=De.renderWrapper,Kn=De.removeAriaLabel,cr=De.editable,on=De.onClick,jt=De.onRemove,Jt=De.onFocus,In="".concat(je,"-tab");T.useEffect(function(){return jt},[]);var _n={};rn==="top"||rn==="bottom"?_n[ge?"marginLeft":"marginRight"]=Ft:_n.marginBottom=Ft;var yr=cr&&hn!==!1&&!Ke;function qn(mn){if(Ke)return;on(mn)}function Cr(mn){mn.preventDefault(),mn.stopPropagation(),cr.onEdit("remove",{key:Ye,event:mn})}var ir=T.createElement("div",{key:Ye,ref:tt,className:P()(In,(at={},Object(Y.a)(at,"".concat(In,"-with-remove"),yr),Object(Y.a)(at,"".concat(In,"-active"),Ce),Object(Y.a)(at,"".concat(In,"-disabled"),Ke),at)),style:_n,onClick:qn},T.createElement("div",{role:"tab","aria-selected":Ce,id:ce&&"".concat(ce,"-tab-").concat(Ye),className:"".concat(In,"-btn"),"aria-controls":ce&&"".concat(ce,"-panel-").concat(Ye),"aria-disabled":Ke,tabIndex:Ke?null:0,onClick:function(Mn){Mn.stopPropagation(),qn(Mn)},onKeyDown:function(Mn){[d.a.SPACE,d.a.ENTER].includes(Mn.which)&&(Mn.preventDefault(),qn(Mn))},onFocus:Jt},ot),yr&&T.createElement("button",{type:"button","aria-label":Kn||"remove",tabIndex:0,className:"".concat(In,"-remove"),onClick:function(Mn){Mn.stopPropagation(),Cr(Mn)}},_t||cr.removeIcon||"\xD7"));return Rn&&(ir=Rn(ir)),ir}var n=T.forwardRef(s),l={width:0,height:0,left:0,top:0};function c(De,tt,at){return Object(T.useMemo)(function(){for(var je,ce=new Map,Ce=tt.get((je=De[0])===null||je===void 0?void 0:je.key)||l,ge=Ce.left+Ce.width,Ue=0;Ue<De.length;Ue+=1){var Ye=De[Ue].key,ot=tt.get(Ye);if(!ot){var Ke;ot=tt.get((Ke=De[Ue-1])===null||Ke===void 0?void 0:Ke.key)||l}var _t=ce.get(Ye)||Object(F.a)({},ot);_t.right=ge-_t.left-_t.width,ce.set(Ye,_t)}return ce},[De.map(function(je){return je.key}).join("_"),tt,at])}var x={width:0,height:0,left:0,top:0,right:0};function A(De,tt,at,je,ce){var Ce=ce.tabs,ge=ce.tabPosition,Ue=ce.rtl,Ye,ot,Ke;["top","bottom"].includes(ge)?(Ye="width",ot=Ue?"right":"left",Ke=Math.abs(tt.left)):(Ye="height",ot="top",Ke=-tt.top);var _t=tt[Ye],Ft=at[Ye],rn=je[Ye],hn=_t;return Ft+rn>_t&&(hn=_t-rn),Object(T.useMemo)(function(){if(!Ce.length)return[0,0];for(var Rn=Ce.length,Kn=Rn,cr=0;cr<Rn;cr+=1){var on=De.get(Ce[cr].key)||x;if(on[ot]+on[Ye]>Ke+hn){Kn=cr-1;break}}for(var jt=0,Jt=Rn-1;Jt>=0;Jt-=1){var In=De.get(Ce[Jt].key)||x;if(In[ot]<Ke){jt=Jt+1;break}}return[jt,Kn]},[De,Ke,hn,ge,Ce.map(function(Rn){return Rn.key}).join("_"),Ue])}var C=L("wx14"),k=L("1OyB"),w=L("vuIU"),y=L("JX7q"),h=L("Ji7U"),p=L("LK+K"),v=L("I8Z2"),_=L("bT9E"),E=L("2GS6"),g=L("Gytx"),j=L.n(g),U=L("U8pU"),S=/iPhone/i,z=/iPod/i,H=/iPad/i,M=/\bAndroid(?:.+)Mobile\b/i,V=/Android/i,K=/\bAndroid(?:.+)SD4930UR\b/i,$=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Z=/Windows Phone/i,me=/\bWindows(?:.+)ARM\b/i,oe=/BlackBerry/i,fe=/BB10/i,ye=/Opera Mini/i,Ie=/\b(CriOS|Chrome)(?:.+)Mobile/i,ve=/Mobile(?:.+)Firefox\b/i;function de(De,tt){return De.test(tt)}function Je(De){var tt=De||(typeof navigator!="undefined"?navigator.userAgent:""),at=(tt||"").split("[FBAN");if(typeof at[1]!="undefined"){var je=at,ce=Object(B.a)(je,1);tt=ce[0]}if(at=tt.split("Twitter"),typeof at[1]!="undefined"){var Ce=at,ge=Object(B.a)(Ce,1);tt=ge[0]}var Ue={apple:{phone:de(S,tt)&&!de(Z,tt),ipod:de(z,tt),tablet:!de(S,tt)&&de(H,tt)&&!de(Z,tt),device:(de(S,tt)||de(z,tt)||de(H,tt))&&!de(Z,tt)},amazon:{phone:de(K,tt),tablet:!de(K,tt)&&de($,tt),device:de(K,tt)||de($,tt)},android:{phone:!de(Z,tt)&&de(K,tt)||!de(Z,tt)&&de(M,tt),tablet:!de(Z,tt)&&!de(K,tt)&&!de(M,tt)&&(de($,tt)||de(V,tt)),device:!de(Z,tt)&&(de(K,tt)||de($,tt)||de(M,tt)||de(V,tt))||de(/\bokhttp\b/i,tt)},windows:{phone:de(Z,tt),tablet:de(me,tt),device:de(Z,tt)||de(me,tt)},other:{blackberry:de(oe,tt),blackberry10:de(fe,tt),opera:de(ye,tt),firefox:de(ve,tt),chrome:de(Ie,tt),device:de(oe,tt)||de(fe,tt)||de(ye,tt)||de(ve,tt)||de(Ie,tt)},any:null,phone:null,tablet:null};return Ue.any=Ue.apple.device||Ue.android.device||Ue.windows.device||Ue.other.device,Ue.phone=Ue.apple.phone||Ue.android.phone||Ue.windows.phone,Ue.tablet=Ue.apple.tablet||Ue.android.tablet||Ue.windows.tablet,Ue}var Rt=Object(F.a)(Object(F.a)({},Je()),{},{isMobile:Je}),Ee=Rt;function Me(){}function rt(De,tt,at){var je=tt||"";return De.key||"".concat(je,"item_").concat(at)}function He(De){return"".concat(De,"-menu-")}function ke(De,tt){var at=-1;T.Children.forEach(De,function(je){at+=1,je&&je.type&&je.type.isMenuItemGroup?T.Children.forEach(je.props.children,function(ce){at+=1,tt(ce,at)}):tt(je,at)})}function ht(De,tt,at){if(!De||at.find)return;T.Children.forEach(De,function(je){if(je){var ce=je.type;if(!ce||!(ce.isSubMenu||ce.isMenuItem||ce.isMenuItemGroup))return;tt.indexOf(je.key)!==-1?at.find=!0:je.props.children&&ht(je.props.children,tt,at)}})}var ie=["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"],xe=function(tt){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,je=tt&&typeof tt.getBoundingClientRect=="function"&&tt.getBoundingClientRect().width;if(je){if(at){var ce=getComputedStyle(tt),Ce=ce.marginLeft,ge=ce.marginRight;je+=+Ce.replace("px","")+ +ge.replace("px","")}je=+je.toFixed(6)}return je||0},we=function(tt,at,je){tt&&Object(U.a)(tt.style)==="object"&&(tt.style[at]=je)},$e=function(){return Ee.any},ct=L("bdgK"),yt=L("i8i4"),Ut=L.n(yt),We=L("wgJM"),kt=L("l4aY"),qt=L("m+aA"),Pe=L("c+Xe"),Ae=L("zT1h"),ut=L("QC+M");function Et(De,tt,at){return at?De[0]===tt[0]:De[0]===tt[0]&&De[1]===tt[1]}function Ze(De,tt,at){var je=De[tt]||{};return Object(F.a)(Object(F.a)({},je),at)}function dt(De,tt,at,je){for(var ce=at.points,Ce=Object.keys(De),ge=0;ge<Ce.length;ge+=1){var Ue=Ce[ge];if(Et(De[Ue].points,ce,je))return"".concat(tt,"-placement-").concat(Ue)}return""}var Ne=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var De=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(De)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(De==null?void 0:De.substr(0,4)))},Te=L("MNnm");function Oe(De,tt){var at={};return at[De.toLowerCase()]=tt.toLowerCase(),at["Webkit".concat(De)]="webkit".concat(tt),at["Moz".concat(De)]="moz".concat(tt),at["ms".concat(De)]="MS".concat(tt),at["O".concat(De)]="o".concat(tt.toLowerCase()),at}function ae(De,tt){var at={animationend:Oe("Animation","AnimationEnd"),transitionend:Oe("Transition","TransitionEnd")};return De&&("AnimationEvent"in tt||delete at.animationend.animation,"TransitionEvent"in tt||delete at.transitionend.transition),at}var le=ae(Object(Te.a)(),typeof window!="undefined"?window:{}),he={};if(Object(Te.a)()){var _e=document.createElement("div");he=_e.style}var Se={};function ze(De){if(Se[De])return Se[De];var tt=le[De];if(tt)for(var at=Object.keys(tt),je=at.length,ce=0;ce<je;ce+=1){var Ce=at[ce];if(Object.prototype.hasOwnProperty.call(tt,Ce)&&Ce in he)return Se[De]=tt[Ce],Se[De]}return""}var xt=ze("animationend"),Qt=ze("transitionend"),sn=!!(xt&&Qt),gt=xt||"animationend",zt=Qt||"transitionend";function Ot(De,tt){if(!De)return null;if(Object(U.a)(De)==="object"){var at=tt.replace(/-\w/g,function(je){return je[1].toUpperCase()});return De[at]}return"".concat(De,"-").concat(tt)}var At="none",ft="appear",be="enter",Fe="leave",Nt="none",bt="prepare",Kt="start",Zt="active",Ge="end";function lt(De){var tt=Object(T.useRef)(!1),at=Object(T.useState)(De),je=Object(B.a)(at,2),ce=je[0],Ce=je[1];function ge(Ue){tt.current||Ce(Ue)}return Object(T.useEffect)(function(){return function(){tt.current=!0}},[]),[ce,ge]}var Lt=Object(Te.a)()?T.useLayoutEffect:T.useEffect,Wt=Lt,ln=function(){var De=T.useRef(null);function tt(){We.a.cancel(De.current)}function at(je){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;tt();var Ce=Object(We.a)(function(){ce<=1?je({isCanceled:function(){return Ce!==De.current}}):at(je,ce-1)});De.current=Ce}return T.useEffect(function(){return function(){tt()}},[]),[at,tt]},gn=[bt,Kt,Zt,Ge],tr=!1,Wn=!0;function En(De){return De===Zt||De===Ge}var xr=function(De,tt){var at=T.useState(Nt),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],ge=ln(),Ue=Object(B.a)(ge,2),Ye=Ue[0],ot=Ue[1];function Ke(){Ce(bt)}return Wt(function(){if(ce!==Nt&&ce!==Ge){var _t=gn.indexOf(ce),Ft=gn[_t+1],rn=tt(ce);rn===tr?Ce(Ft):Ye(function(hn){function Rn(){if(hn.isCanceled())return;Ce(Ft)}rn===!0?Rn():Promise.resolve(rn).then(Rn)})}},[De,ce]),T.useEffect(function(){return function(){ot()}},[]),[Ke,ce]},Er=function(De){var tt=Object(T.useRef)(),at=Object(T.useRef)(De);at.current=De;var je=T.useCallback(function(ge){at.current(ge)},[]);function ce(ge){ge&&(ge.removeEventListener(zt,je),ge.removeEventListener(gt,je))}function Ce(ge){tt.current&&tt.current!==ge&&ce(tt.current),ge&&ge!==tt.current&&(ge.addEventListener(zt,je),ge.addEventListener(gt,je),tt.current=ge)}return T.useEffect(function(){return function(){ce(tt.current)}},[]),[Ce,ce]};function rr(De,tt,at,je){var ce=je.motionEnter,Ce=ce===void 0?!0:ce,ge=je.motionAppear,Ue=ge===void 0?!0:ge,Ye=je.motionLeave,ot=Ye===void 0?!0:Ye,Ke=je.motionDeadline,_t=je.motionLeaveImmediately,Ft=je.onAppearPrepare,rn=je.onEnterPrepare,hn=je.onLeavePrepare,Rn=je.onAppearStart,Kn=je.onEnterStart,cr=je.onLeaveStart,on=je.onAppearActive,jt=je.onEnterActive,Jt=je.onLeaveActive,In=je.onAppearEnd,_n=je.onEnterEnd,yr=je.onLeaveEnd,qn=je.onVisibleChanged,Cr=lt(),ir=Object(B.a)(Cr,2),mn=ir[0],Mn=ir[1],vr=lt(At),Or=Object(B.a)(vr,2),Qn=Or[0],Pr=Or[1],$r=lt(null),Ir=Object(B.a)($r,2),Br=Ir[0],Ur=Ir[1],jr=Object(T.useRef)(!1),Nr=Object(T.useRef)(null),pr=Object(T.useRef)(!1),la=Object(T.useRef)(null);function Qa(){var Qr=at();return Qr||la.current}var ja=Object(T.useRef)(!1);function Ca(Qr){var zr=Qa();if(Qr&&!Qr.deadline&&Qr.target!==zr)return;var ba;Qn===ft&&ja.current?ba=In==null?void 0:In(zr,Qr):Qn===be&&ja.current?ba=_n==null?void 0:_n(zr,Qr):Qn===Fe&&ja.current&&(ba=yr==null?void 0:yr(zr,Qr)),ba!==!1&&!pr.current&&(Pr(At),Ur(null))}var qr=Er(Ca),Vr=Object(B.a)(qr,1),Xr=Vr[0],ea=T.useMemo(function(){var Qr,zr,ba;switch(Qn){case"appear":return Qr={},Object(Y.a)(Qr,bt,Ft),Object(Y.a)(Qr,Kt,Rn),Object(Y.a)(Qr,Zt,on),Qr;case"enter":return zr={},Object(Y.a)(zr,bt,rn),Object(Y.a)(zr,Kt,Kn),Object(Y.a)(zr,Zt,jt),zr;case"leave":return ba={},Object(Y.a)(ba,bt,hn),Object(Y.a)(ba,Kt,cr),Object(Y.a)(ba,Zt,Jt),ba;default:return{}}},[Qn]),Ua=xr(Qn,function(Qr){if(Qr===bt){var zr=ea[bt];return zr?zr(Qa()):tr}if(Yr in ea){var ba;Ur(((ba=ea[Yr])===null||ba===void 0?void 0:ba.call(ea,Qa(),null))||null)}return Yr===Zt&&(Xr(Qa()),Ke>0&&(clearTimeout(Nr.current),Nr.current=setTimeout(function(){Ca({deadline:!0})},Ke))),Wn}),hi=Object(B.a)(Ua,2),si=hi[0],Yr=hi[1],Ja=En(Yr);ja.current=Ja,Wt(function(){Mn(tt);var Qr=jr.current;if(jr.current=!0,!De)return;var zr;!Qr&&tt&&Ue&&(zr=ft),Qr&&tt&&Ce&&(zr=be),(Qr&&!tt&&ot||!Qr&&_t&&!tt&&ot)&&(zr=Fe),zr&&(Pr(zr),si())},[tt]),Object(T.useEffect)(function(){(Qn===ft&&!Ue||Qn===be&&!Ce||Qn===Fe&&!ot)&&Pr(At)},[Ue,Ce,ot]),Object(T.useEffect)(function(){return function(){clearTimeout(Nr.current),pr.current=!0}},[]),Object(T.useEffect)(function(){mn!==void 0&&Qn===At&&(qn==null||qn(mn))},[mn,Qn]);var Za=Br;return ea[bt]&&Yr===Kt&&(Za=Object(F.a)({transition:"none"},Za)),[Qn,Yr,Za,mn!=null?mn:tt]}var ur=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(){return Object(k.a)(this,at),tt.apply(this,arguments)}return Object(w.a)(at,[{key:"render",value:function(){return this.props.children}}]),at}(T.Component),Rr=ur;function Kr(De){var tt=De;Object(U.a)(De)==="object"&&(tt=De.transitionSupport);function at(ce){return!!(ce.motionName&&tt)}var je=T.forwardRef(function(ce,Ce){var ge=ce.visible,Ue=ge===void 0?!0:ge,Ye=ce.removeOnLeave,ot=Ye===void 0?!0:Ye,Ke=ce.forceRender,_t=ce.children,Ft=ce.motionName,rn=ce.leavedClassName,hn=ce.eventProps,Rn=at(ce),Kn=Object(T.useRef)(),cr=Object(T.useRef)();function on(){try{return Object(qt.a)(Kn.current||cr.current)}catch(Pr){return null}}var jt=rr(Rn,Ue,on,ce),Jt=Object(B.a)(jt,4),In=Jt[0],_n=Jt[1],yr=Jt[2],qn=Jt[3],Cr=T.useRef(qn);qn&&(Cr.current=!0);var ir=Object(T.useRef)(Ce);ir.current=Ce;var mn=T.useCallback(function(Pr){Kn.current=Pr,Object(Pe.b)(ir.current,Pr)},[]),Mn,vr=Object(F.a)(Object(F.a)({},hn),{},{visible:Ue});if(!_t)Mn=null;else if(In===At||!at(ce))qn?Mn=_t(Object(F.a)({},vr),mn):!ot&&Cr.current?Mn=_t(Object(F.a)(Object(F.a)({},vr),{},{className:rn}),mn):Ke?Mn=_t(Object(F.a)(Object(F.a)({},vr),{},{style:{display:"none"}}),mn):Mn=null;else{var Or,Qn;_n===bt?Qn="prepare":En(_n)?Qn="active":_n===Kt&&(Qn="start"),Mn=_t(Object(F.a)(Object(F.a)({},vr),{},{className:P()(Ot(Ft,In),(Or={},Object(Y.a)(Or,Ot(Ft,"".concat(In,"-").concat(Qn)),Qn),Object(Y.a)(Or,Ft,typeof Ft=="string"),Or)),style:yr}),mn)}return T.createElement(Rr,{ref:cr},Mn)});return je.displayName="CSSMotion",je}var ra=Kr(sn),fn="add",or="keep",sa="remove",ya="removed";function Jr(De){var tt;return De&&Object(U.a)(De)==="object"&&"key"in De?tt=De:tt={key:De},Object(F.a)(Object(F.a)({},tt),{},{key:String(tt.key)})}function na(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return De.map(Jr)}function te(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],at=[],je=0,ce=tt.length,Ce=na(De),ge=na(tt);Ce.forEach(function(ot){for(var Ke=!1,_t=je;_t<ce;_t+=1){var Ft=ge[_t];if(Ft.key===ot.key){je<_t&&(at=at.concat(ge.slice(je,_t).map(function(rn){return Object(F.a)(Object(F.a)({},rn),{},{status:fn})})),je=_t),at.push(Object(F.a)(Object(F.a)({},Ft),{},{status:or})),je+=1,Ke=!0;break}}Ke||at.push(Object(F.a)(Object(F.a)({},ot),{},{status:sa}))}),je<ce&&(at=at.concat(ge.slice(je).map(function(ot){return Object(F.a)(Object(F.a)({},ot),{},{status:fn})})));var Ue={};at.forEach(function(ot){var Ke=ot.key;Ue[Ke]=(Ue[Ke]||0)+1});var Ye=Object.keys(Ue).filter(function(ot){return Ue[ot]>1});return Ye.forEach(function(ot){at=at.filter(function(Ke){var _t=Ke.key,Ft=Ke.status;return _t!==ot||Ft!==sa}),at.forEach(function(Ke){Ke.key===ot&&(Ke.status=or)})}),at}var W=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function G(De){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ra,at=function(je){Object(h.a)(Ce,je);var ce=Object(p.a)(Ce);function Ce(){var ge;return Object(k.a)(this,Ce),ge=ce.apply(this,arguments),ge.state={keyEntities:[]},ge.removeKey=function(Ue){ge.setState(function(Ye){var ot=Ye.keyEntities;return{keyEntities:ot.map(function(Ke){return Ke.key!==Ue?Ke:Object(F.a)(Object(F.a)({},Ke),{},{status:ya})})}})},ge}return Object(w.a)(Ce,[{key:"render",value:function(){var Ue=this,Ye=this.state.keyEntities,ot=this.props,Ke=ot.component,_t=ot.children,Ft=ot.onVisibleChanged,rn=Object(I.a)(ot,["component","children","onVisibleChanged"]),hn=Ke||T.Fragment,Rn={};return W.forEach(function(Kn){Rn[Kn]=rn[Kn],delete rn[Kn]}),delete rn.keys,T.createElement(hn,rn,Ye.map(function(Kn){var cr=Kn.status,on=Object(I.a)(Kn,["status"]),jt=cr===fn||cr===or;return T.createElement(tt,Object(C.a)({},Rn,{key:on.key,visible:jt,eventProps:on,onVisibleChanged:function(In){Ft==null||Ft(In,{key:on.key}),In||Ue.removeKey(on.key)}}),_t)}))}}],[{key:"getDerivedStateFromProps",value:function(Ue,Ye){var ot=Ue.keys,Ke=Ye.keyEntities,_t=na(ot),Ft=te(Ke,_t);return{keyEntities:Ft.filter(function(rn){var hn=Ke.find(function(Rn){var Kn=Rn.key;return rn.key===Kn});return!(hn&&hn.status===ya&&rn.status===sa)})}}}]),Ce}(T.Component);return at.defaultProps={component:"div"},at}var Q=G(sn),ue=ra;function ee(De){var tt=De.prefixCls,at=De.motion,je=De.animation,ce=De.transitionName;return at||(je?{motionName:"".concat(tt,"-").concat(je)}:ce?{motionName:ce}:null)}function qe(De){var tt=De.prefixCls,at=De.visible,je=De.zIndex,ce=De.mask,Ce=De.maskMotion,ge=De.maskAnimation,Ue=De.maskTransitionName;if(!ce)return null;var Ye={};return(Ce||Ue||ge)&&(Ye=Object(F.a)({motionAppear:!0},ee({motion:Ce,prefixCls:tt,transitionName:Ue,animation:ge}))),T.createElement(ue,Object(C.a)({},Ye,{visible:at,removeOnLeave:!0}),function(ot){var Ke=ot.className;return T.createElement("div",{style:{zIndex:je},className:P()("".concat(tt,"-mask"),Ke)})})}var tn=L("9mu1"),An=L("o0o1"),Vn=L.n(An),un=L("HaE+"),nr=["measure","align",null,"motion"],vn=function(De,tt){var at=Object(T.useState)(null),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],ge=Object(T.useRef)(),Ue=Object(T.useRef)(!1);function Ye(_t){Ue.current||Ce(_t)}function ot(){We.a.cancel(ge.current)}function Ke(_t){ot(),ge.current=Object(We.a)(function(){Ye(function(Ft){switch(ce){case"align":return"motion";case"motion":return"stable";default:}return Ft}),_t==null||_t()})}return Object(T.useEffect)(function(){Ye("measure")},[De]),Object(T.useEffect)(function(){switch(ce){case"measure":tt();break;default:}ce&&(ge.current=Object(We.a)(Object(un.a)(Vn.a.mark(function _t(){var Ft,rn;return Vn.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:Ft=nr.indexOf(ce),rn=nr[Ft+1],rn&&Ft!==-1&&Ye(rn);case 3:case"end":return Rn.stop()}},_t)}))))},[ce]),Object(T.useEffect)(function(){return function(){Ue.current=!0,ot()}},[]),[ce,Ke]},dn=function(De){var tt=T.useState({width:0,height:0}),at=Object(B.a)(tt,2),je=at[0],ce=at[1];function Ce(Ue){ce({width:Ue.offsetWidth,height:Ue.offsetHeight})}var ge=T.useMemo(function(){var Ue={};if(De){var Ye=je.width,ot=je.height;De.indexOf("height")!==-1&&ot?Ue.height=ot:De.indexOf("minHeight")!==-1&&ot&&(Ue.minHeight=ot),De.indexOf("width")!==-1&&Ye?Ue.width=Ye:De.indexOf("minWidth")!==-1&&Ye&&(Ue.minWidth=Ye)}return Ue},[De,je]);return[ge,Ce]},xn=T.forwardRef(function(De,tt){var at=De.visible,je=De.prefixCls,ce=De.className,Ce=De.style,ge=De.children,Ue=De.zIndex,Ye=De.stretch,ot=De.destroyPopupOnHide,Ke=De.forceRender,_t=De.align,Ft=De.point,rn=De.getRootDomNode,hn=De.getClassNameFromAlign,Rn=De.onAlign,Kn=De.onMouseEnter,cr=De.onMouseLeave,on=De.onMouseDown,jt=De.onTouchStart,Jt=Object(T.useRef)(),In=Object(T.useRef)(),_n=Object(T.useState)(),yr=Object(B.a)(_n,2),qn=yr[0],Cr=yr[1],ir=dn(Ye),mn=Object(B.a)(ir,2),Mn=mn[0],vr=mn[1];function Or(){Ye&&vr(rn())}var Qn=vn(at,Or),Pr=Object(B.a)(Qn,2),$r=Pr[0],Ir=Pr[1],Br=Object(T.useRef)();function Ur(){return Ft||rn}function jr(){var qr;(qr=Jt.current)===null||qr===void 0||qr.forceAlign()}function Nr(qr,Vr){var Xr=hn(Vr);qn!==Xr&&Cr(Xr),$r==="align"&&(qn!==Xr?Promise.resolve().then(function(){jr()}):Ir(function(){var ea;(ea=Br.current)===null||ea===void 0||ea.call(Br)}),Rn==null||Rn(qr,Vr))}var pr=Object(F.a)({},ee(De));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(qr){var Vr=pr[qr];pr[qr]=function(Xr,ea){return Ir(),Vr==null?void 0:Vr(Xr,ea)}});function la(){return new Promise(function(qr){Br.current=qr})}T.useEffect(function(){!pr.motionName&&$r==="motion"&&Ir()},[pr.motionName,$r]),T.useImperativeHandle(tt,function(){return{forceAlign:jr,getElement:function(){return In.current}}});var Qa=Object(F.a)(Object(F.a)({},Mn),{},{zIndex:Ue,opacity:$r==="motion"||$r==="stable"||!at?void 0:0,pointerEvents:$r==="stable"?void 0:"none"},Ce),ja=!0;(_t==null?void 0:_t.points)&&($r==="align"||$r==="stable")&&(ja=!1);var Ca=ge;return T.Children.count(ge)>1&&(Ca=T.createElement("div",{className:"".concat(je,"-content")},ge)),T.createElement(ue,Object(C.a)({visible:at,ref:In,leavedClassName:"".concat(je,"-hidden")},pr,{onAppearPrepare:la,onEnterPrepare:la,removeOnLeave:ot,forceRender:Ke}),function(qr,Vr){var Xr=qr.className,ea=qr.style,Ua=P()(je,ce,qn,Xr);return T.createElement(tn.a,{target:Ur(),key:"popup",ref:Jt,monitorWindowResize:!0,disabled:ja,align:_t,onAlign:Nr},T.createElement("div",{ref:Vr,className:Ua,onMouseEnter:Kn,onMouseLeave:cr,onMouseDownCapture:on,onTouchStartCapture:jt,style:Object(F.a)(Object(F.a)({},ea),Qa)},Ca))})});xn.displayName="PopupInner";var Nn=xn,dr=T.forwardRef(function(De,tt){var at=De.prefixCls,je=De.visible,ce=De.zIndex,Ce=De.children,ge=De.mobile;ge=ge===void 0?{}:ge;var Ue=ge.popupClassName,Ye=ge.popupStyle,ot=ge.popupMotion,Ke=ot===void 0?{}:ot,_t=ge.popupRender,Ft=T.useRef();T.useImperativeHandle(tt,function(){return{forceAlign:function(){},getElement:function(){return Ft.current}}});var rn=Object(F.a)({zIndex:ce},Ye),hn=Ce;return T.Children.count(Ce)>1&&(hn=T.createElement("div",{className:"".concat(at,"-content")},Ce)),_t&&(hn=_t(hn)),T.createElement(ue,Object(C.a)({visible:je,ref:Ft,removeOnLeave:!0},Ke),function(Rn,Kn){var cr=Rn.className,on=Rn.style,jt=P()(at,Ue,cr);return T.createElement("div",{ref:Kn,className:jt,style:Object(F.a)(Object(F.a)({},on),rn)},hn)})});dr.displayName="MobilePopupInner";var $n=dr,Zn=["visible","mobile"],kn=T.forwardRef(function(De,tt){var at=De.visible,je=De.mobile,ce=Object(I.a)(De,Zn),Ce=Object(T.useState)(at),ge=Object(B.a)(Ce,2),Ue=ge[0],Ye=ge[1],ot=Object(T.useState)(!1),Ke=Object(B.a)(ot,2),_t=Ke[0],Ft=Ke[1],rn=Object(F.a)(Object(F.a)({},ce),{},{visible:Ue});Object(T.useEffect)(function(){Ye(at),at&&je&&Ft(Ne())},[at,je]);var hn=_t?T.createElement($n,Object(C.a)({},rn,{mobile:je,ref:tt})):T.createElement(Nn,Object(C.a)({},rn,{ref:tt}));return T.createElement("div",null,T.createElement(qe,rn),hn)});kn.displayName="Popup";var gr=kn,Bn=T.createContext(null),ar=Bn;function sr(){}function Pn(){return""}function Tr(De){return De?De.ownerDocument:window.document}var Mr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Sr(De){var tt=function(at){Object(h.a)(ce,at);var je=Object(p.a)(ce);function ce(Ce){var ge;Object(k.a)(this,ce),ge=je.call(this,Ce),ge.popupRef=T.createRef(),ge.triggerRef=T.createRef(),ge.attachId=void 0,ge.clickOutsideHandler=void 0,ge.touchOutsideHandler=void 0,ge.contextMenuOutsideHandler1=void 0,ge.contextMenuOutsideHandler2=void 0,ge.mouseDownTimeout=void 0,ge.focusTime=void 0,ge.preClickTime=void 0,ge.preTouchTime=void 0,ge.delayTimer=void 0,ge.hasPopupMouseDown=void 0,ge.onMouseEnter=function(Ye){var ot=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",Ye),ge.delaySetPopupVisible(!0,ot,ot?null:Ye)},ge.onMouseMove=function(Ye){ge.fireEvents("onMouseMove",Ye),ge.setPoint(Ye)},ge.onMouseLeave=function(Ye){ge.fireEvents("onMouseLeave",Ye),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onPopupMouseEnter=function(){ge.clearDelayTimer()},ge.onPopupMouseLeave=function(Ye){var ot;if(Ye.relatedTarget&&!Ye.relatedTarget.setTimeout&&Object(kt.a)((ot=ge.popupRef.current)===null||ot===void 0?void 0:ot.getElement(),Ye.relatedTarget))return;ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onFocus=function(Ye){ge.fireEvents("onFocus",Ye),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))},ge.onMouseDown=function(Ye){ge.fireEvents("onMouseDown",Ye),ge.preClickTime=Date.now()},ge.onTouchStart=function(Ye){ge.fireEvents("onTouchStart",Ye),ge.preTouchTime=Date.now()},ge.onBlur=function(Ye){ge.fireEvents("onBlur",Ye),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)},ge.onContextMenu=function(Ye){Ye.preventDefault(),ge.fireEvents("onContextMenu",Ye),ge.setPopupVisible(!0,Ye)},ge.onContextMenuClose=function(){ge.isContextMenuToShow()&&ge.close()},ge.onClick=function(Ye){if(ge.fireEvents("onClick",Ye),ge.focusTime){var ot;if(ge.preClickTime&&ge.preTouchTime?ot=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?ot=ge.preClickTime:ge.preTouchTime&&(ot=ge.preTouchTime),Math.abs(ot-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&Ye&&Ye.preventDefault&&Ye.preventDefault();var Ke=!ge.state.popupVisible;(ge.isClickToHide()&&!Ke||Ke&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,Ye)},ge.onPopupMouseDown=function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var Ye;(Ye=ge.context).onPopupMouseDown.apply(Ye,arguments)}},ge.onDocumentClick=function(Ye){if(ge.props.mask&&!ge.props.maskClosable)return;var ot=Ye.target,Ke=ge.getRootDomNode(),_t=ge.getPopupDomNode();(!Object(kt.a)(Ke,ot)||ge.isContextMenuOnly())&&!Object(kt.a)(_t,ot)&&!ge.hasPopupMouseDown&&ge.close()},ge.getRootDomNode=function(){var Ye=ge.props.getTriggerDOMNode;if(Ye)return Ye(ge.triggerRef.current);try{var ot=Object(qt.a)(ge.triggerRef.current);if(ot)return ot}catch(Ke){}return Ut.a.findDOMNode(Object(y.a)(ge))},ge.getPopupClassNameFromAlign=function(Ye){var ot=[],Ke=ge.props,_t=Ke.popupPlacement,Ft=Ke.builtinPlacements,rn=Ke.prefixCls,hn=Ke.alignPoint,Rn=Ke.getPopupClassNameFromAlign;return _t&&Ft&&ot.push(dt(Ft,rn,Ye,hn)),Rn&&ot.push(Rn(Ye)),ot.join(" ")},ge.getComponent=function(){var Ye=ge.props,ot=Ye.prefixCls,Ke=Ye.destroyPopupOnHide,_t=Ye.popupClassName,Ft=Ye.onPopupAlign,rn=Ye.popupMotion,hn=Ye.popupAnimation,Rn=Ye.popupTransitionName,Kn=Ye.popupStyle,cr=Ye.mask,on=Ye.maskAnimation,jt=Ye.maskTransitionName,Jt=Ye.maskMotion,In=Ye.zIndex,_n=Ye.popup,yr=Ye.stretch,qn=Ye.alignPoint,Cr=Ye.mobile,ir=Ye.forceRender,mn=ge.state,Mn=mn.popupVisible,vr=mn.point,Or=ge.getPopupAlign(),Qn={};return ge.isMouseEnterToShow()&&(Qn.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(Qn.onMouseLeave=ge.onPopupMouseLeave),Qn.onMouseDown=ge.onPopupMouseDown,Qn.onTouchStart=ge.onPopupMouseDown,T.createElement(gr,Object(C.a)({prefixCls:ot,destroyPopupOnHide:Ke,visible:Mn,point:qn&&vr,className:_t,align:Or,onAlign:Ft,animation:hn,getClassNameFromAlign:ge.getPopupClassNameFromAlign},Qn,{stretch:yr,getRootDomNode:ge.getRootDomNode,style:Kn,mask:cr,zIndex:In,transitionName:Rn,maskAnimation:on,maskTransitionName:jt,maskMotion:Jt,ref:ge.popupRef,motion:rn,mobile:Cr,forceRender:ir}),typeof _n=="function"?_n():_n)},ge.attachParent=function(Ye){We.a.cancel(ge.attachId);var ot=ge.props,Ke=ot.getPopupContainer,_t=ot.getDocument,Ft=ge.getRootDomNode(),rn;Ke?(Ft||Ke.length===0)&&(rn=Ke(Ft)):rn=_t(ge.getRootDomNode()).body,rn?rn.appendChild(Ye):ge.attachId=Object(We.a)(function(){ge.attachParent(Ye)})},ge.getContainer=function(){var Ye=ge.props.getDocument,ot=Ye(ge.getRootDomNode()).createElement("div");return ot.style.position="absolute",ot.style.top="0",ot.style.left="0",ot.style.width="100%",ge.attachParent(ot),ot},ge.setPoint=function(Ye){var ot=ge.props.alignPoint;if(!ot||!Ye)return;ge.setState({point:{pageX:Ye.pageX,pageY:Ye.pageY}})},ge.handlePortalUpdate=function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)},ge.triggerContextValue={onPopupMouseDown:ge.onPopupMouseDown};var Ue;return"popupVisible"in Ce?Ue=!!Ce.popupVisible:Ue=!!Ce.defaultPopupVisible,ge.state={prevPopupVisible:Ue,popupVisible:Ue},Mr.forEach(function(Ye){ge["fire".concat(Ye)]=function(ot){ge.fireEvents(Ye,ot)}}),ge}return Object(w.a)(ce,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,Ue=this.state;if(Ue.popupVisible){var Ye;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ye=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ae.a)(Ye,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ye=Ye||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ae.a)(Ye,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ye=Ye||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ae.a)(Ye,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ae.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),We.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,Ue=ge.popupPlacement,Ye=ge.popupAlign,ot=ge.builtinPlacements;return Ue&&ot?Ze(ot,Ue,Ye):Ye}},{key:"setPopupVisible",value:function(ge,Ue){var Ye=this.props.alignPoint,ot=this.state.popupVisible;this.clearDelayTimer(),ot!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:ot}),this.props.onPopupVisibleChange(ge)),Ye&&Ue&&ge&&this.setPoint(Ue)}},{key:"delaySetPopupVisible",value:function(ge,Ue,Ye){var ot=this,Ke=Ue*1e3;if(this.clearDelayTimer(),Ke){var _t=Ye?{pageX:Ye.pageX,pageY:Ye.pageY}:null;this.delayTimer=window.setTimeout(function(){ot.setPopupVisible(ge,_t),ot.clearDelayTimer()},Ke)}else this.setPopupVisible(ge,Ye)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ge){var Ue=this.props.children.props,Ye=this.props;return Ue[ge]&&Ye[ge]?this["fire".concat(ge)]:Ue[ge]||Ye[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.showAction;return Ue.indexOf("click")!==-1||Ye.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.showAction;return Ue.indexOf("contextMenu")!==-1||Ye.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.hideAction;return Ue.indexOf("click")!==-1||Ye.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.showAction;return Ue.indexOf("hover")!==-1||Ye.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.hideAction;return Ue.indexOf("hover")!==-1||Ye.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.showAction;return Ue.indexOf("focus")!==-1||Ye.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,Ue=ge.action,Ye=ge.hideAction;return Ue.indexOf("focus")!==-1||Ye.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,Ue){var Ye=this.props.children.props[ge];Ye&&Ye(Ue);var ot=this.props[ge];ot&&ot(Ue)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,Ue=this.props,Ye=Ue.children,ot=Ue.forceRender,Ke=Ue.alignPoint,_t=Ue.className,Ft=Ue.autoDestroy,rn=T.Children.only(Ye),hn={key:"trigger"};this.isContextMenuToShow()?hn.onContextMenu=this.onContextMenu:hn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(hn.onClick=this.onClick,hn.onMouseDown=this.onMouseDown,hn.onTouchStart=this.onTouchStart):(hn.onClick=this.createTwoChains("onClick"),hn.onMouseDown=this.createTwoChains("onMouseDown"),hn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(hn.onMouseEnter=this.onMouseEnter,Ke&&(hn.onMouseMove=this.onMouseMove)):hn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?hn.onMouseLeave=this.onMouseLeave:hn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(hn.onFocus=this.onFocus,hn.onBlur=this.onBlur):(hn.onFocus=this.createTwoChains("onFocus"),hn.onBlur=this.createTwoChains("onBlur"));var Rn=P()(rn&&rn.props&&rn.props.className,_t);Rn&&(hn.className=Rn);var Kn=Object(F.a)({},hn);Object(Pe.c)(rn)&&(Kn.ref=Object(Pe.a)(this.triggerRef,rn.ref));var cr=T.cloneElement(rn,Kn),on;return(ge||this.popupRef.current||ot)&&(on=T.createElement(De,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&Ft&&(on=null),T.createElement(ar.Provider,{value:this.triggerContextValue},cr,on)}}],[{key:"getDerivedStateFromProps",value:function(ge,Ue){var Ye=ge.popupVisible,ot={};return Ye!==void 0&&Ue.popupVisible!==Ye&&(ot.popupVisible=Ye,ot.prevPopupVisible=Ue.popupVisible),ot}}]),ce}(T.Component);return tt.contextType=ar,tt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Pn,getDocument:Tr,onPopupVisibleChange:sr,afterPopupVisibleChange:sr,onPopupAlign:sr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},tt}var hr=Sr(ut.a),ne={adjustX:1,adjustY:1},Re={topLeft:{points:["bl","tl"],overflow:ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ne,offset:[4,0]}},Xe={topLeft:{points:["bl","tl"],overflow:ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ne,offset:[4,0]}},Le=Re,st=0,et={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},pt=function(tt,at,je){var ce=He(at),Ce=tt.getState();tt.setState({defaultActiveFirst:Object(F.a)(Object(F.a)({},Ce.defaultActiveFirst),{},Object(Y.a)({},ce,je))})},mt=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(je){var ce;Object(k.a)(this,at),ce=tt.call(this,je),ce.onDestroy=function(Ke){ce.props.onDestroy(Ke)},ce.onKeyDown=function(Ke){var _t=Ke.keyCode,Ft=ce.menuInstance,rn=ce.props.store,hn=ce.getVisible();if(_t===d.a.ENTER)return ce.onTitleClick(Ke),pt(rn,ce.props.eventKey,!0),!0;if(_t===d.a.RIGHT)return hn?Ft.onKeyDown(Ke):(ce.triggerOpenChange(!0),pt(rn,ce.props.eventKey,!0)),!0;if(_t===d.a.LEFT){var Rn;if(hn)Rn=Ft.onKeyDown(Ke);else return;return Rn||(ce.triggerOpenChange(!1),Rn=!0),Rn}return hn&&(_t===d.a.UP||_t===d.a.DOWN)?Ft.onKeyDown(Ke):void 0},ce.onOpenChange=function(Ke){ce.props.onOpenChange(Ke)},ce.onPopupVisibleChange=function(Ke){ce.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},ce.onMouseEnter=function(Ke){var _t=ce.props,Ft=_t.eventKey,rn=_t.onMouseEnter,hn=_t.store;pt(hn,ce.props.eventKey,!1),rn({key:Ft,domEvent:Ke})},ce.onMouseLeave=function(Ke){var _t=ce.props,Ft=_t.parentMenu,rn=_t.eventKey,hn=_t.onMouseLeave;Ft.subMenuInstance=Object(y.a)(ce),hn({key:rn,domEvent:Ke})},ce.onTitleMouseEnter=function(Ke){var _t=ce.props,Ft=_t.eventKey,rn=_t.onItemHover,hn=_t.onTitleMouseEnter;rn({key:Ft,hover:!0}),hn({key:Ft,domEvent:Ke})},ce.onTitleMouseLeave=function(Ke){var _t=ce.props,Ft=_t.parentMenu,rn=_t.eventKey,hn=_t.onItemHover,Rn=_t.onTitleMouseLeave;Ft.subMenuInstance=Object(y.a)(ce),hn({key:rn,hover:!1}),Rn({key:rn,domEvent:Ke})},ce.onTitleClick=function(Ke){var _t=Object(y.a)(ce),Ft=_t.props;if(Ft.onTitleClick({key:Ft.eventKey,domEvent:Ke}),Ft.triggerSubMenuAction==="hover")return;ce.triggerOpenChange(!ce.getVisible(),"click"),pt(Ft.store,ce.props.eventKey,!1)},ce.onSubMenuClick=function(Ke){typeof ce.props.onClick=="function"&&ce.props.onClick(ce.addKeyPath(Ke))},ce.onSelect=function(Ke){ce.props.onSelect(Ke)},ce.onDeselect=function(Ke){ce.props.onDeselect(Ke)},ce.getPrefixCls=function(){return"".concat(ce.props.rootPrefixCls,"-submenu")},ce.getActiveClassName=function(){return"".concat(ce.getPrefixCls(),"-active")},ce.getDisabledClassName=function(){return"".concat(ce.getPrefixCls(),"-disabled")},ce.getSelectedClassName=function(){return"".concat(ce.getPrefixCls(),"-selected")},ce.getOpenClassName=function(){return"".concat(ce.props.rootPrefixCls,"-submenu-open")},ce.getVisible=function(){return ce.state.isOpen},ce.getMode=function(){return ce.state.mode},ce.saveMenuInstance=function(Ke){ce.menuInstance=Ke},ce.addKeyPath=function(Ke){return Object(F.a)(Object(F.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(ce.props.eventKey)})},ce.triggerOpenChange=function(Ke,_t){var Ft=ce.props.eventKey,rn=function(){ce.onOpenChange({key:Ft,item:Object(y.a)(ce),trigger:_t,open:Ke})};_t==="mouseenter"?ce.mouseenterTimeout=setTimeout(function(){rn()},0):rn()},ce.isChildrenSelected=function(){var Ke={find:!1};return ht(ce.props.children,ce.props.selectedKeys,Ke),Ke.find},ce.isInlineMode=function(){return ce.getMode()==="inline"},ce.adjustWidth=function(){if(!ce.subMenuTitle||!ce.menuInstance)return;var Ke=yt.findDOMNode(ce.menuInstance);if(Ke.offsetWidth>=ce.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(ce.subMenuTitle.offsetWidth,"px")},ce.saveSubMenuTitle=function(Ke){ce.subMenuTitle=Ke},ce.getBaseProps=function(){var Ke=Object(y.a)(ce),_t=Ke.props,Ft=ce.getMode();return{mode:Ft==="horizontal"?"vertical":Ft,visible:ce.getVisible(),level:_t.level+1,inlineIndent:_t.inlineIndent,focusable:!1,onClick:ce.onSubMenuClick,onSelect:ce.onSelect,onDeselect:ce.onDeselect,onDestroy:ce.onDestroy,selectedKeys:_t.selectedKeys,eventKey:"".concat(_t.eventKey,"-menu-"),openKeys:_t.openKeys,motion:_t.motion,onOpenChange:ce.onOpenChange,subMenuOpenDelay:_t.subMenuOpenDelay,parentMenu:Object(y.a)(ce),subMenuCloseDelay:_t.subMenuCloseDelay,forceSubMenuRender:_t.forceSubMenuRender,triggerSubMenuAction:_t.triggerSubMenuAction,builtinPlacements:_t.builtinPlacements,defaultActiveFirst:_t.store.getState().defaultActiveFirst[He(_t.eventKey)],multiple:_t.multiple,prefixCls:_t.rootPrefixCls,id:ce.internalMenuId,manualRef:ce.saveMenuInstance,itemIcon:_t.itemIcon,expandIcon:_t.expandIcon,direction:_t.direction}},ce.getMotion=function(Ke,_t){var Ft=Object(y.a)(ce),rn=Ft.haveRendered,hn=ce.props,Rn=hn.motion,Kn=hn.rootPrefixCls,cr=Object(F.a)(Object(F.a)({},Rn),{},{leavedClassName:"".concat(Kn,"-hidden"),removeOnLeave:!1,motionAppear:rn||!_t||Ke!=="inline"});return cr};var Ce=je.store,ge=je.eventKey,Ue=Ce.getState(),Ye=Ue.defaultActiveFirst;ce.isRootMenu=!1;var ot=!1;return Ye&&(ot=Ye[ge]),pt(Ce,ge,ot),ce.state={mode:je.mode,isOpen:je.isOpen},ce}return Object(w.a)(at,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ce=this,Ce=this.props,ge=Ce.mode,Ue=Ce.parentMenu,Ye=Ce.manualRef,ot=Ce.isOpen,Ke=function(){ce.setState({mode:ge,isOpen:ot})},_t=ot!==this.state.isOpen,Ft=ge!==this.state.mode;if((Ft||_t)&&(We.a.cancel(this.updateStateRaf),Ft?this.updateStateRaf=Object(We.a)(Ke):Ke()),Ye&&Ye(this),ge!=="horizontal"||!(Ue==null?void 0:Ue.isRootMenu)||!ot)return;this.minWidthTimeout=setTimeout(function(){return ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ce=this.props,Ce=ce.onDestroy,ge=ce.eventKey;Ce&&Ce(ge),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),We.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ce,Ce){var ge=this.getBaseProps();return T.createElement(Ht,Object(C.a)({},ge,{id:this.internalMenuId,className:ce,style:Ce}),this.props.children)}},{key:"renderChildren",value:function(){var ce=this,Ce=this.getBaseProps(),ge=Ce.mode,Ue=Ce.visible,Ye=Ce.forceSubMenuRender,ot=Ce.direction,Ke=this.getMotion(ge,Ue);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ue||Ye,!this.haveOpened)return T.createElement("div",null);var _t=P()("".concat(Ce.prefixCls,"-sub"),Object(Y.a)({},"".concat(Ce.prefixCls,"-rtl"),ot==="rtl"));return this.isInlineMode()?T.createElement(ue,Object(C.a)({visible:Ce.visible,forceRender:Ye},Ke),function(Ft){var rn=Ft.className,hn=Ft.style,Rn=P()(_t,rn);return ce.renderPopupMenu(Rn,hn)}):this.renderPopupMenu(_t)}},{key:"render",value:function(){var ce,Ce,ge,Ue=Object(F.a)({},this.props),Ye=this.getVisible(),ot=this.getPrefixCls(),Ke=this.isInlineMode(),_t=this.getMode(),Ft=P()(ot,"".concat(ot,"-").concat(_t),(ce={},Object(Y.a)(ce,Ue.className,!!Ue.className),Object(Y.a)(ce,this.getOpenClassName(),Ye),Object(Y.a)(ce,this.getActiveClassName(),Ue.active||Ye&&!Ke),Object(Y.a)(ce,this.getDisabledClassName(),Ue.disabled),Object(Y.a)(ce,this.getSelectedClassName(),this.isChildrenSelected()),ce));this.internalMenuId||(Ue.eventKey?this.internalMenuId="".concat(Ue.eventKey,"$Menu"):(st+=1,this.internalMenuId="$__$".concat(st,"$Menu")));var rn={},hn={},Rn={};Ue.disabled||(rn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},hn={onClick:this.onTitleClick},Rn={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Kn={},cr=Ue.direction,on=cr==="rtl";Ke&&(on?Kn.paddingRight=Ue.inlineIndent*Ue.level:Kn.paddingLeft=Ue.inlineIndent*Ue.level);var jt={};this.getVisible()&&(jt={"aria-owns":this.internalMenuId});var Jt=null;_t!=="horizontal"&&(Jt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Jt=T.createElement(this.props.expandIcon,Object(F.a)({},this.props))));var In=T.createElement("div",Object(C.a)({ref:this.saveSubMenuTitle,style:Kn,className:"".concat(ot,"-title"),role:"button"},Rn,hn,{"aria-expanded":Ye},jt,{"aria-haspopup":"true",title:typeof Ue.title=="string"?Ue.title:void 0}),Ue.title,Jt||T.createElement("i",{className:"".concat(ot,"-arrow")})),_n=this.renderChildren(),yr=((Ce=Ue.parentMenu)===null||Ce===void 0?void 0:Ce.isRootMenu)?Ue.parentMenu.props.getPopupContainer:function(Ur){return Ur.parentNode},qn=et[_t],Cr=Ue.popupOffset?{offset:Ue.popupOffset}:{},ir=P()((ge={},Object(Y.a)(ge,Ue.popupClassName,Ue.popupClassName&&!Ke),Object(Y.a)(ge,"".concat(ot,"-rtl"),on),ge)),mn=Ue.disabled,Mn=Ue.triggerSubMenuAction,vr=Ue.subMenuOpenDelay,Or=Ue.forceSubMenuRender,Qn=Ue.subMenuCloseDelay,Pr=Ue.builtinPlacements;ie.forEach(function(Ur){return delete Ue[Ur]}),delete Ue.onClick;var $r=on?Object(F.a)(Object(F.a)({},Xe),Pr):Object(F.a)(Object(F.a)({},Re),Pr);delete Ue.direction;var Ir=this.getBaseProps(),Br=Ke?null:this.getMotion(Ir.mode,Ir.visible);return T.createElement("li",Object(C.a)({},Ue,rn,{className:Ft,role:"menuitem"}),T.createElement(hr,{prefixCls:ot,popupClassName:P()("".concat(ot,"-popup"),ir),getPopupContainer:yr,builtinPlacements:$r,popupPlacement:qn,popupVisible:Ke?!1:Ye,popupAlign:Cr,popup:Ke?null:_n,action:mn||Ke?[]:[Mn],mouseEnterDelay:vr,mouseLeaveDelay:Qn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Or,popupMotion:Br},In),Ke?_n:null)}}]),at}(T.Component);mt.defaultProps={onMouseEnter:Me,onMouseLeave:Me,onTitleMouseEnter:Me,onTitleMouseLeave:Me,onTitleClick:Me,manualRef:Me,mode:"vertical",title:""};var it=Object(v.b)(function(De,tt){var at=De.openKeys,je=De.activeKey,ce=De.selectedKeys,Ce=tt.eventKey,ge=tt.subMenuKey;return{isOpen:at.indexOf(Ce)>-1,active:je[ge]===Ce,selectedKeys:ce}})(mt);it.isSubMenu=!0;var Mt=it,Xt="menuitem-overflowed",Vt=.5,St=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=tt.apply(this,arguments),je.resizeObserver=null,je.mutationObserver=null,je.originalTotalWidth=0,je.overflowedItems=[],je.menuItemSizes=[],je.cancelFrameId=null,je.state={lastVisibleIndex:void 0},je.childRef=T.createRef(),je.getMenuItemNodes=function(){var ce=je.props.prefixCls,Ce=je.childRef.current;return Ce?[].slice.call(Ce.children).filter(function(ge){return ge.className.split(" ").indexOf("".concat(ce,"-overflowed-submenu"))<0}):[]},je.getOverflowedSubMenuItem=function(ce,Ce,ge){var Ue=je.props,Ye=Ue.overflowedIndicator,ot=Ue.level,Ke=Ue.mode,_t=Ue.prefixCls,Ft=Ue.theme;if(ot!==1||Ke!=="horizontal")return null;var rn=je.props.children[0],hn=rn.props,Rn=hn.children,Kn=hn.title,cr=hn.style,on=Object(I.a)(hn,["children","title","style"]),jt=Object(F.a)({},cr),Jt="".concat(ce,"-overflowed-indicator"),In="".concat(ce,"-overflowed-indicator");Ce.length===0&&ge!==!0?jt=Object(F.a)(Object(F.a)({},jt),{},{display:"none"}):ge&&(jt=Object(F.a)(Object(F.a)({},jt),{},{visibility:"hidden",position:"absolute"}),Jt="".concat(Jt,"-placeholder"),In="".concat(In,"-placeholder"));var _n=Ft?"".concat(_t,"-").concat(Ft):"",yr={};return ie.forEach(function(qn){on[qn]!==void 0&&(yr[qn]=on[qn])}),T.createElement(Mt,Object(C.a)({title:Ye,className:"".concat(_t,"-overflowed-submenu"),popupClassName:_n},yr,{key:Jt,eventKey:In,disabled:!1,style:jt}),Ce)},je.setChildrenWidthAndResize=function(){if(je.props.mode!=="horizontal")return;var ce=je.childRef.current;if(!ce)return;var Ce=ce.children;if(!Ce||Ce.length===0)return;var ge=ce.children[Ce.length-1];we(ge,"display","inline-block");var Ue=je.getMenuItemNodes(),Ye=Ue.filter(function(ot){return ot.className.split(" ").indexOf(Xt)>=0});Ye.forEach(function(ot){we(ot,"display","inline-block")}),je.menuItemSizes=Ue.map(function(ot){return xe(ot,!0)}),Ye.forEach(function(ot){we(ot,"display","none")}),je.overflowedIndicatorWidth=xe(ce.children[ce.children.length-1],!0),je.originalTotalWidth=je.menuItemSizes.reduce(function(ot,Ke){return ot+Ke},0),je.handleResize(),we(ge,"display","none")},je.handleResize=function(){if(je.props.mode!=="horizontal")return;var ce=je.childRef.current;if(!ce)return;var Ce=xe(ce);je.overflowedItems=[];var ge=0,Ue;je.originalTotalWidth>Ce+Vt&&(Ue=-1,je.menuItemSizes.forEach(function(Ye){ge+=Ye,ge+je.overflowedIndicatorWidth<=Ce&&(Ue+=1)})),je.setState({lastVisibleIndex:Ue})},je}return Object(w.a)(at,[{key:"componentDidMount",value:function(){var ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ce=this.childRef.current;if(!Ce)return;this.resizeObserver=new ct.default(function(ge){ge.forEach(function(){var Ue=ce.cancelFrameId;cancelAnimationFrame(Ue),ce.cancelFrameId=requestAnimationFrame(ce.setChildrenWidthAndResize)})}),[].slice.call(Ce.children).concat(Ce).forEach(function(ge){ce.resizeObserver.observe(ge)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ce.resizeObserver.disconnect(),[].slice.call(Ce.children).concat(Ce).forEach(function(ge){ce.resizeObserver.observe(ge)}),ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ce,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(ce){var Ce=this,ge=this.state.lastVisibleIndex;return(ce||[]).reduce(function(Ue,Ye,ot){var Ke=Ye;if(Ce.props.mode==="horizontal"){var _t=Ce.getOverflowedSubMenuItem(Ye.props.eventKey,[]);ge!==void 0&&Ce.props.className.indexOf("".concat(Ce.props.prefixCls,"-root"))!==-1&&(ot>ge&&(Ke=T.cloneElement(Ye,{style:{display:"none"},eventKey:"".concat(Ye.props.eventKey,"-hidden"),className:"".concat(Xt)})),ot===ge+1&&(Ce.overflowedItems=ce.slice(ge+1).map(function(rn){return T.cloneElement(rn,{key:rn.props.eventKey,mode:"vertical-left"})}),_t=Ce.getOverflowedSubMenuItem(Ye.props.eventKey,Ce.overflowedItems)));var Ft=[].concat(Object(b.a)(Ue),[_t,Ke]);return ot===ce.length-1&&Ft.push(Ce.getOverflowedSubMenuItem(Ye.props.eventKey,[],!0)),Ft}return[].concat(Object(b.a)(Ue),[Ke])},[])}},{key:"render",value:function(){var ce=this.props,Ce=ce.visible,ge=ce.prefixCls,Ue=ce.overflowedIndicator,Ye=ce.mode,ot=ce.level,Ke=ce.tag,_t=ce.children,Ft=ce.theme,rn=Object(I.a)(ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),hn=Ke;return T.createElement(hn,Object(C.a)({ref:this.childRef},rn),this.renderChildren(_t))}}]),at}(T.Component);St.defaultProps={tag:"div",className:""};var nn=St;function Qe(De){return De.length?De.every(function(tt){return!!tt.props.disabled}):!0}function en(De,tt,at){var je=De.getState();De.setState({activeKey:Object(F.a)(Object(F.a)({},je.activeKey),{},Object(Y.a)({},tt,at))})}function Bt(De){return De.eventKey||"0-menu-"}function bn(De,tt){var at=tt,je=De.children,ce=De.eventKey;if(at){var Ce;if(ke(je,function(ge,Ue){ge&&ge.props&&!ge.props.disabled&&at===rt(ge,ce,Ue)&&(Ce=!0)}),Ce)return at}return at=null,De.defaultActiveFirst&&ke(je,function(ge,Ue){!at&&ge&&!ge.props.disabled&&(at=rt(ge,ce,Ue))}),at}function On(De){if(!De)return;var tt=this.instanceArray.indexOf(De);tt!==-1?this.instanceArray[tt]=De:this.instanceArray.push(De)}var Gt=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(je){var ce;return Object(k.a)(this,at),ce=tt.call(this,je),ce.onKeyDown=function(Ce,ge){var Ue=Ce.keyCode,Ye;if(ce.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Ye=Ke.onKeyDown(Ce))}),Ye)return 1;var ot=null;return(Ue===d.a.UP||Ue===d.a.DOWN)&&(ot=ce.step(Ue===d.a.UP?-1:1)),ot?(Ce.preventDefault(),en(ce.props.store,Bt(ce.props),ot.props.eventKey),typeof ge=="function"&&ge(ot),1):void 0},ce.onItemHover=function(Ce){var ge=Ce.key,Ue=Ce.hover;en(ce.props.store,Bt(ce.props),Ue?ge:null)},ce.onDeselect=function(Ce){ce.props.onDeselect(Ce)},ce.onSelect=function(Ce){ce.props.onSelect(Ce)},ce.onClick=function(Ce){ce.props.onClick(Ce)},ce.onOpenChange=function(Ce){ce.props.onOpenChange(Ce)},ce.onDestroy=function(Ce){ce.props.onDestroy(Ce)},ce.getFlatInstanceArray=function(){return ce.instanceArray},ce.step=function(Ce){var ge=ce.getFlatInstanceArray(),Ue=ce.props.store.getState().activeKey[Bt(ce.props)],Ye=ge.length;if(!Ye)return null;Ce<0&&(ge=ge.concat().reverse());var ot=-1;if(ge.every(function(rn,hn){return rn&&rn.props.eventKey===Ue?(ot=hn,!1):!0}),!ce.props.defaultActiveFirst&&ot!==-1&&Qe(ge.slice(ot,Ye-1)))return;var Ke=(ot+1)%Ye,_t=Ke;do{var Ft=ge[_t];if(!Ft||Ft.props.disabled)_t=(_t+1)%Ye;else return Ft}while(_t!==Ke);return null},ce.renderCommonMenuItem=function(Ce,ge,Ue){var Ye=ce.props.store.getState(),ot=Object(y.a)(ce),Ke=ot.props,_t=rt(Ce,Ke.eventKey,ge),Ft=Ce.props;if(!Ft||typeof Ce.type=="string")return Ce;var rn=_t===Ye.activeKey,hn=Object(F.a)(Object(F.a)({mode:Ft.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:ce.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:ge,parentMenu:Ke.parentMenu,manualRef:Ft.disabled?void 0:Object(E.a)(Ce.ref,On.bind(Object(y.a)(ce))),eventKey:_t,active:!Ft.disabled&&rn,multiple:Ke.multiple,onClick:function(Kn){(Ft.onClick||Me)(Kn),ce.onClick(Kn)},onItemHover:ce.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:ce.onOpenChange,onDeselect:ce.onDeselect,onSelect:ce.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:Ft.itemIcon||ce.props.itemIcon,expandIcon:Ft.expandIcon||ce.props.expandIcon},Ue),{},{direction:Ke.direction});return(Ke.mode==="inline"||$e())&&(hn.triggerSubMenuAction="click"),T.cloneElement(Ce,Object(F.a)(Object(F.a)({},hn),{},{key:_t||ge}))},ce.renderMenuItem=function(Ce,ge,Ue){if(!Ce)return null;var Ye=ce.props.store.getState(),ot={openKeys:Ye.openKeys,selectedKeys:Ye.selectedKeys,triggerSubMenuAction:ce.props.triggerSubMenuAction,subMenuKey:Ue};return ce.renderCommonMenuItem(Ce,ge,ot)},je.store.setState({activeKey:Object(F.a)(Object(F.a)({},je.store.getState().activeKey),{},Object(Y.a)({},je.eventKey,bn(je,je.activeKey)))}),ce.instanceArray=[],ce}return Object(w.a)(at,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ce){return this.props.visible||ce.visible||this.props.className!==ce.className||!j()(this.props.style,ce.style)}},{key:"componentDidUpdate",value:function(ce){var Ce=this.props,ge="activeKey"in Ce?Ce.activeKey:Ce.store.getState().activeKey[Bt(Ce)],Ue=bn(Ce,ge);if(Ue!==ge)en(Ce.store,Bt(Ce),Ue);else if("activeKey"in ce){var Ye=bn(ce,ce.activeKey);Ue!==Ye&&en(Ce.store,Bt(Ce),Ue)}}},{key:"render",value:function(){var ce=this,Ce=Object(C.a)({},this.props);this.instanceArray=[];var ge=P()(Ce.prefixCls,Ce.className,"".concat(Ce.prefixCls,"-").concat(Ce.mode)),Ue={className:ge,role:Ce.role||"menu"};Ce.id&&(Ue.id=Ce.id),Ce.focusable&&(Ue.tabIndex=0,Ue.onKeyDown=this.onKeyDown);var Ye=Ce.prefixCls,ot=Ce.eventKey,Ke=Ce.visible,_t=Ce.level,Ft=Ce.mode,rn=Ce.overflowedIndicator,hn=Ce.theme;return ie.forEach(function(Rn){return delete Ce[Rn]}),delete Ce.onClick,T.createElement(nn,Object(C.a)({},Ce,{prefixCls:Ye,mode:Ft,tag:"ul",level:_t,theme:hn,visible:Ke,overflowedIndicator:rn},Ue),Object(m.a)(Ce.children).map(function(Rn,Kn){return ce.renderMenuItem(Rn,Kn,ot||"0-menu-")}))}}]),at}(T.Component);Gt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Me};var cn=Object(v.b)()(Gt),Ht=cn,Sn=L("Kwbf");function wn(De,tt,at){var je=De.prefixCls,ce=De.motion,Ce=De.defaultMotions,ge=Ce===void 0?{}:Ce,Ue=De.openAnimation,Ye=De.openTransitionName,ot=tt.switchingModeFromInline;if(ce)return ce;if(Object(U.a)(Ue)==="object"&&Ue)Object(Sn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ue=="string")return{motionName:"".concat(je,"-open-").concat(Ue)};if(Ye)return{motionName:Ye};var Ke=ge[at];return Ke||(ot?null:ge.other)}var wt=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(je){var ce;Object(k.a)(this,at),ce=tt.call(this,je),ce.onSelect=function(Ue){var Ye=Object(y.a)(ce),ot=Ye.props;if(ot.selectable){var Ke=ce.store.getState(),_t=Ke.selectedKeys,Ft=Ue.key;ot.multiple?_t=_t.concat([Ft]):_t=[Ft],"selectedKeys"in ot||ce.store.setState({selectedKeys:_t}),ot.onSelect(Object(F.a)(Object(F.a)({},Ue),{},{selectedKeys:_t}))}},ce.onClick=function(Ue){var Ye=ce.getRealMenuMode(),ot=Object(y.a)(ce),Ke=ot.store,_t=ot.props.onOpenChange;Ye!=="inline"&&!("openKeys"in ce.props)&&(Ke.setState({openKeys:[]}),_t([])),ce.props.onClick(Ue)},ce.onKeyDown=function(Ue,Ye){ce.innerMenu.getWrappedInstance().onKeyDown(Ue,Ye)},ce.onOpenChange=function(Ue){var Ye=Object(y.a)(ce),ot=Ye.props,Ke=ce.store.getState().openKeys.concat(),_t=!1,Ft=function(hn){var Rn=!1;if(hn.open)Rn=Ke.indexOf(hn.key)===-1,Rn&&Ke.push(hn.key);else{var Kn=Ke.indexOf(hn.key);Rn=Kn!==-1,Rn&&Ke.splice(Kn,1)}_t=_t||Rn};Array.isArray(Ue)?Ue.forEach(Ft):Ft(Ue),_t&&("openKeys"in ce.props||ce.store.setState({openKeys:Ke}),ot.onOpenChange(Ke))},ce.onDeselect=function(Ue){var Ye=Object(y.a)(ce),ot=Ye.props;if(ot.selectable){var Ke=ce.store.getState().selectedKeys.concat(),_t=Ue.key,Ft=Ke.indexOf(_t);Ft!==-1&&Ke.splice(Ft,1),"selectedKeys"in ot||ce.store.setState({selectedKeys:Ke}),ot.onDeselect(Object(F.a)(Object(F.a)({},Ue),{},{selectedKeys:Ke}))}},ce.onMouseEnter=function(Ue){ce.restoreModeVerticalFromInline();var Ye=ce.props.onMouseEnter;Ye&&Ye(Ue)},ce.onTransitionEnd=function(Ue){var Ye=Ue.propertyName==="width"&&Ue.target===Ue.currentTarget,ot=Ue.target.className,Ke=Object.prototype.toString.call(ot)==="[object SVGAnimatedString]"?ot.animVal:ot,_t=Ue.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Ye||_t)&&ce.restoreModeVerticalFromInline()},ce.setInnerMenu=function(Ue){ce.innerMenu=Ue},ce.isRootMenu=!0;var Ce=je.defaultSelectedKeys,ge=je.defaultOpenKeys;return"selectedKeys"in je&&(Ce=je.selectedKeys||[]),"openKeys"in je&&(ge=je.openKeys||[]),ce.store=Object(v.c)({selectedKeys:Ce,openKeys:ge,activeKey:{"0-menu-":bn(je,je.activeKey)}}),ce.state={switchingModeFromInline:!1,prevProps:je,inlineOpenKeys:[],store:ce.store},ce}return Object(w.a)(at,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ce){var Ce=this.props,ge=Ce.siderCollapsed,Ue=Ce.inlineCollapsed,Ye=Ce.onOpenChange;(!ce.inlineCollapsed&&Ue||!ce.siderCollapsed&&ge)&&Ye([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ce=this.props.collapsedWidth,Ce=this.store,ge=this.prevOpenKeys,Ue=this.getInlineCollapsed()&&(ce===0||ce==="0"||ce==="0px");Ue?(this.prevOpenKeys=Ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ge&&(this.store.setState({openKeys:ge}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ce=this.props.mode,Ce=this.state.switchingModeFromInline,ge=this.getInlineCollapsed();return Ce&&ge?"inline":ge?"vertical":ce}},{key:"getInlineCollapsed",value:function(){var ce=this.props,Ce=ce.inlineCollapsed,ge=ce.siderCollapsed;return ge!==void 0?ge:Ce}},{key:"restoreModeVerticalFromInline",value:function(){var ce=this.state.switchingModeFromInline;ce&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var ce=Object(F.a)({},Object(_.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ce=this.getRealMenuMode();return ce.className+=" ".concat(ce.prefixCls,"-root"),ce.direction==="rtl"&&(ce.className+=" ".concat(ce.prefixCls,"-rtl")),ce=Object(F.a)(Object(F.a)({},ce),{},{mode:Ce,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:wn(this.props,this.state,Ce)}),delete ce.openAnimation,delete ce.openTransitionName,T.createElement(v.a,{store:this.store},T.createElement(Ht,Object(C.a)({},ce,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ce,Ce){var ge=Ce.prevProps,Ue=Ce.store,Ye=Ue.getState(),ot={},Ke={prevProps:ce};return ge.mode==="inline"&&ce.mode!=="inline"&&(Ke.switchingModeFromInline=!0),"openKeys"in ce?ot.openKeys=ce.openKeys||[]:((ce.inlineCollapsed&&!ge.inlineCollapsed||ce.siderCollapsed&&!ge.siderCollapsed)&&(Ke.switchingModeFromInline=!0,Ke.inlineOpenKeys=Ye.openKeys,ot.openKeys=[]),(!ce.inlineCollapsed&&ge.inlineCollapsed||!ce.siderCollapsed&&ge.siderCollapsed)&&(ot.openKeys=Ce.inlineOpenKeys,Ke.inlineOpenKeys=[])),Object.keys(ot).length&&Ue.setState(ot),Ke}}]),at}(T.Component);wt.defaultProps={selectable:!0,onClick:Me,onSelect:Me,onOpenChange:Me,onDeselect:Me,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:T.createElement("span",null,"\xB7\xB7\xB7")};var It=wt,Pt=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=tt.apply(this,arguments),je.onKeyDown=function(ce){var Ce=ce.keyCode;return Ce===d.a.ENTER?(je.onClick(ce),!0):void 0},je.onMouseLeave=function(ce){var Ce=je.props,ge=Ce.eventKey,Ue=Ce.onItemHover,Ye=Ce.onMouseLeave;Ue({key:ge,hover:!1}),Ye({key:ge,domEvent:ce})},je.onMouseEnter=function(ce){var Ce=je.props,ge=Ce.eventKey,Ue=Ce.onItemHover,Ye=Ce.onMouseEnter;Ue({key:ge,hover:!0}),Ye({key:ge,domEvent:ce})},je.onClick=function(ce){var Ce=je.props,ge=Ce.eventKey,Ue=Ce.multiple,Ye=Ce.onClick,ot=Ce.onSelect,Ke=Ce.onDeselect,_t=Ce.isSelected,Ft={key:ge,keyPath:[ge],item:Object(y.a)(je),domEvent:ce};Ye(Ft),Ue?_t?Ke(Ft):ot(Ft):_t||ot(Ft)},je.saveNode=function(ce){je.node=ce},je}return Object(w.a)(at,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ce=this.props;ce.onDestroy&&ce.onDestroy(ce.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var ce,Ce=Object(F.a)({},this.props),ge=P()(this.getPrefixCls(),Ce.className,(ce={},Object(Y.a)(ce,this.getActiveClassName(),!Ce.disabled&&Ce.active),Object(Y.a)(ce,this.getSelectedClassName(),Ce.isSelected),Object(Y.a)(ce,this.getDisabledClassName(),Ce.disabled),ce)),Ue=Object(F.a)(Object(F.a)({},Ce.attribute),{},{title:typeof Ce.title=="string"?Ce.title:void 0,className:ge,role:Ce.role||"menuitem","aria-disabled":Ce.disabled});Ce.role==="option"?Ue=Object(F.a)(Object(F.a)({},Ue),{},{role:"option","aria-selected":Ce.isSelected}):(Ce.role===null||Ce.role==="none")&&(Ue.role="none");var Ye={onClick:Ce.disabled?null:this.onClick,onMouseLeave:Ce.disabled?null:this.onMouseLeave,onMouseEnter:Ce.disabled?null:this.onMouseEnter},ot=Object(F.a)({},Ce.style);Ce.mode==="inline"&&(Ce.direction==="rtl"?ot.paddingRight=Ce.inlineIndent*Ce.level:ot.paddingLeft=Ce.inlineIndent*Ce.level),ie.forEach(function(_t){return delete Ce[_t]}),delete Ce.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=T.createElement(this.props.itemIcon,this.props)),T.createElement("li",Object(C.a)({},Object(_.a)(Ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ue,Ye,{style:ot,ref:this.saveNode}),Ce.children,Ke)}}]),at}(T.Component);Pt.isMenuItem=!0,Pt.defaultProps={onSelect:Me,onMouseEnter:Me,onMouseLeave:Me,manualRef:Me};var Ct=Object(v.b)(function(De,tt){var at=De.activeKey,je=De.selectedKeys,ce=tt.eventKey,Ce=tt.subMenuKey;return{active:at[Ce]===ce,isSelected:Array.isArray(je)?je.indexOf(ce)!==-1:je===ce}})(Pt),vt=Ct,Dn=function(De){Object(h.a)(at,De);var tt=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=tt.apply(this,arguments),je.renderInnerMenuItem=function(ce){var Ce=je.props,ge=Ce.renderMenuItem,Ue=Ce.index;return ge(ce,Ue,je.props.subMenuKey)},je}return Object(w.a)(at,[{key:"render",value:function(){var ce=Object(C.a)({},this.props),Ce=ce.className,ge=Ce===void 0?"":Ce,Ue=ce.rootPrefixCls,Ye="".concat(Ue,"-item-group-title"),ot="".concat(Ue,"-item-group-list"),Ke=ce.title,_t=ce.children;return ie.forEach(function(Ft){return delete ce[Ft]}),delete ce.direction,T.createElement("li",Object(C.a)({},ce,{onClick:function(rn){return rn.stopPropagation()},className:"".concat(ge," ").concat(Ue,"-item-group")}),T.createElement("div",{className:Ye,title:typeof Ke=="string"?Ke:void 0},Ke),T.createElement("ul",{className:ot},T.Children.map(_t,this.renderInnerMenuItem)))}}]),at}(T.Component);Dn.isMenuItemGroup=!0,Dn.defaultProps={disabled:!0};var $t=Dn,Cn=function(tt){var at=tt.className,je=tt.rootPrefixCls,ce=tt.style;return T.createElement("li",{className:"".concat(at," ").concat(je,"-item-divider"),style:ce})};Cn.defaultProps={disabled:!0,className:"",style:{}};var pn=Cn,Yt=It,Tn=L("eDIo");function zn(De,tt){var at=De.prefixCls,je=De.editable,ce=De.locale,Ce=De.style;return!je||je.showAdd===!1?null:T.createElement("button",{ref:tt,type:"button",className:"".concat(at,"-nav-add"),style:Ce,"aria-label":(ce==null?void 0:ce.addAriaLabel)||"Add tab",onClick:function(Ue){je.onEdit("add",{event:Ue})}},je.addIcon||"+")}var fr=T.forwardRef(zn);function Gn(De,tt){var at=De.prefixCls,je=De.id,ce=De.tabs,Ce=De.locale,ge=De.mobile,Ue=De.moreIcon,Ye=Ue===void 0?"More":Ue,ot=De.moreTransitionName,Ke=De.style,_t=De.className,Ft=De.editable,rn=De.tabBarGutter,hn=De.rtl,Rn=De.onTabClick,Kn=Object(T.useState)(!1),cr=Object(B.a)(Kn,2),on=cr[0],jt=cr[1],Jt=Object(T.useState)(null),In=Object(B.a)(Jt,2),_n=In[0],yr=In[1],qn="".concat(je,"-more-popup"),Cr="".concat(at,"-dropdown"),ir=_n!==null?"".concat(qn,"-").concat(_n):null,mn=Ce==null?void 0:Ce.dropdownAriaLabel,Mn=T.createElement(Yt,{onClick:function(Br){var Ur=Br.key,jr=Br.domEvent;Rn(Ur,jr),jt(!1)},id:qn,tabIndex:-1,role:"listbox","aria-activedescendant":ir,selectedKeys:[_n],"aria-label":mn!==void 0?mn:"expanded dropdown"},ce.map(function(Ir){return T.createElement(vt,{key:Ir.key,id:"".concat(qn,"-").concat(Ir.key),role:"option","aria-controls":je&&"".concat(je,"-panel-").concat(Ir.key),disabled:Ir.disabled},Ir.tab)}));function vr(Ir){for(var Br=ce.filter(function(la){return!la.disabled}),Ur=Br.findIndex(function(la){return la.key===_n})||0,jr=Br.length,Nr=0;Nr<jr;Nr+=1){Ur=(Ur+Ir+jr)%jr;var pr=Br[Ur];if(!pr.disabled){yr(pr.key);return}}}function Or(Ir){var Br=Ir.which;if(!on){[d.a.DOWN,d.a.SPACE,d.a.ENTER].includes(Br)&&(jt(!0),Ir.preventDefault());return}switch(Br){case d.a.UP:vr(-1),Ir.preventDefault();break;case d.a.DOWN:vr(1),Ir.preventDefault();break;case d.a.ESC:jt(!1);break;case d.a.SPACE:case d.a.ENTER:_n!==null&&Rn(_n,Ir);break}}Object(T.useEffect)(function(){var Ir=document.getElementById(ir);Ir&&Ir.scrollIntoView&&Ir.scrollIntoView(!1)},[_n]),Object(T.useEffect)(function(){on||yr(null)},[on]);var Qn=Object(Y.a)({},hn?"marginLeft":"marginRight",rn);ce.length||(Qn.visibility="hidden",Qn.order=1);var Pr=P()(Object(Y.a)({},"".concat(Cr,"-rtl"),hn)),$r=ge?null:T.createElement(Tn.a,{prefixCls:Cr,overlay:Mn,trigger:["hover"],visible:on,transitionName:ot,onVisibleChange:jt,overlayClassName:Pr,mouseEnterDelay:.1,mouseLeaveDelay:.1},T.createElement("button",{type:"button",className:"".concat(at,"-nav-more"),style:Qn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":qn,id:"".concat(je,"-more"),"aria-expanded":on,onKeyDown:Or},Ye));return T.createElement("div",{className:P()("".concat(at,"-nav-operations"),_t),style:Ke,ref:tt},$r,T.createElement(fr,{prefixCls:at,locale:Ce,editable:Ft}))}var Lr=T.forwardRef(Gn),Gr=Object(T.createContext)(null),Hn=.1,Yn=.01,Jn=20,wr=Math.pow(.995,Jn);function Wr(){var De=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(De)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(De.substr(0,4)))}function Zr(De,tt){var at=Object(T.useState)(),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],ge=Object(T.useState)(0),Ue=Object(B.a)(ge,2),Ye=Ue[0],ot=Ue[1],Ke=Object(T.useState)(0),_t=Object(B.a)(Ke,2),Ft=_t[0],rn=_t[1],hn=Object(T.useState)(),Rn=Object(B.a)(hn,2),Kn=Rn[0],cr=Rn[1],on=Object(T.useRef)();function jt(mn){var Mn=mn.touches[0],vr=Mn.screenX,Or=Mn.screenY;Ce({x:vr,y:Or}),window.clearInterval(on.current)}function Jt(mn){if(!ce)return;mn.preventDefault();var Mn=mn.touches[0],vr=Mn.screenX,Or=Mn.screenY;Ce({x:vr,y:Or});var Qn=vr-ce.x,Pr=Or-ce.y;tt(Qn,Pr);var $r=Date.now();ot($r),rn($r-Ye),cr({x:Qn,y:Pr})}function In(){if(!ce)return;if(Ce(null),cr(null),Kn){var mn=Kn.x/Ft,Mn=Kn.y/Ft,vr=Math.abs(mn),Or=Math.abs(Mn);if(Math.max(vr,Or)<Hn)return;var Qn=mn,Pr=Mn;on.current=window.setInterval(function(){if(Math.abs(Qn)<Yn&&Math.abs(Pr)<Yn){window.clearInterval(on.current);return}Qn*=wr,Pr*=wr,tt(Qn*Jn,Pr*Jn)},Jn)}}var _n=Object(T.useRef)(0),yr=Object(T.useRef)(!1),qn=Object(T.useRef)();function Cr(mn){var Mn=mn.deltaX,vr=mn.deltaY,Or=0,Qn=Math.abs(Mn),Pr=Math.abs(vr);Qn===Pr?Or=qn.current==="x"?Mn:vr:Qn>Pr?(Or=Mn,qn.current="x"):(Or=vr,qn.current="y");var $r=Date.now();$r-_n.current>100&&(yr.current=!1),(tt(-Or,-Or)||yr.current)&&(mn.preventDefault(),yr.current=!0),_n.current=$r}var ir=Object(T.useRef)(null);ir.current={onTouchStart:jt,onTouchMove:Jt,onTouchEnd:In,onWheel:Cr},T.useEffect(function(){function mn(Qn){ir.current.onTouchStart(Qn)}function Mn(Qn){ir.current.onTouchMove(Qn)}function vr(Qn){ir.current.onTouchEnd(Qn)}function Or(Qn){ir.current.onWheel(Qn)}return document.addEventListener("touchmove",Mn,{passive:!1}),document.addEventListener("touchend",vr,{passive:!1}),De.current.addEventListener("touchstart",mn,{passive:!1}),De.current.addEventListener("wheel",Or),function(){document.removeEventListener("touchmove",Mn),document.removeEventListener("touchend",vr)}},[])}function ua(){var De=Object(T.useRef)(new Map);function tt(je){return De.current.has(je)||De.current.set(je,T.createRef()),De.current.get(je)}function at(je){De.current.delete(je)}return[tt,at]}function xa(De,tt){var at=T.useRef(De),je=T.useState({}),ce=Object(B.a)(je,2),Ce=ce[1];function ge(Ue){var Ye=typeof Ue=="function"?Ue(at.current):Ue;Ye!==at.current&&tt(Ye,at.current),at.current=Ye,Ce({})}return[at.current,ge]}var ma=function(tt){var at=tt.position,je=tt.prefixCls,ce=tt.extra;if(!ce)return null;var Ce,ge=ce;return at==="right"&&(Ce=ge.right||!ge.left&&ge||null),at==="left"&&(Ce=ge.left||null),Ce?T.createElement("div",{className:"".concat(je,"-extra-content")},Ce):null};function Ya(De,tt){var at,je=T.useContext(Gr),ce=je.prefixCls,Ce=je.tabs,ge=De.className,Ue=De.style,Ye=De.id,ot=De.animated,Ke=De.activeKey,_t=De.rtl,Ft=De.extra,rn=De.editable,hn=De.locale,Rn=De.tabPosition,Kn=De.tabBarGutter,cr=De.children,on=De.onTabClick,jt=De.onTabScroll,Jt=Object(T.useRef)(),In=Object(T.useRef)(),_n=Object(T.useRef)(),yr=Object(T.useRef)(),qn=ua(),Cr=Object(B.a)(qn,2),ir=Cr[0],mn=Cr[1],Mn=Rn==="top"||Rn==="bottom",vr=xa(0,function(Hr,Dr){Mn&&jt&&jt({direction:Hr>Dr?"left":"right"})}),Or=Object(B.a)(vr,2),Qn=Or[0],Pr=Or[1],$r=xa(0,function(Hr,Dr){!Mn&&jt&&jt({direction:Hr>Dr?"top":"bottom"})}),Ir=Object(B.a)($r,2),Br=Ir[0],Ur=Ir[1],jr=Object(T.useState)(0),Nr=Object(B.a)(jr,2),pr=Nr[0],la=Nr[1],Qa=Object(T.useState)(0),ja=Object(B.a)(Qa,2),Ca=ja[0],qr=ja[1],Vr=Object(T.useState)(0),Xr=Object(B.a)(Vr,2),ea=Xr[0],Ua=Xr[1],hi=Object(T.useState)(0),si=Object(B.a)(hi,2),Yr=si[0],Ja=si[1],Za=Object(T.useState)(null),Qr=Object(B.a)(Za,2),zr=Qr[0],ba=Qr[1],Pi=Object(T.useState)(null),no=Object(B.a)(Pi,2),li=no[0],Ci=no[1],Ti=Object(T.useState)(0),Si=Object(B.a)(Ti,2),Ii=Si[0],co=Si[1],Ro=Object(T.useState)(0),Gi=Object(B.a)(Ro,2),Oi=Gi[0],Vi=Gi[1],yi=i(new Map),Ri=Object(B.a)(yi,2),ho=Ri[0],Yi=Ri[1],Ai=c(Ce,ho,pr),Di="".concat(ce,"-nav-operations-hidden"),bi=0,Ia=0;Mn?_t?(bi=0,Ia=Math.max(0,pr-zr)):(bi=Math.min(0,zr-pr),Ia=0):(bi=Math.min(0,li-Ca),Ia=0);function fi(Hr){return Hr<bi?[bi,!1]:Hr>Ia?[Ia,!1]:[Hr,!0]}var pi=Object(T.useRef)(),_i=Object(T.useState)(),mi=Object(B.a)(_i,2),Xi=mi[0],$i=mi[1];function Qi(){$i(Date.now())}function ki(){window.clearTimeout(pi.current)}Zr(Jt,function(Hr,Dr){var oa=!1;function Fa(Mi,di){Mi(function(Ui){var ci=fi(Ui+di),_a=Object(B.a)(ci,2),Fi=_a[0],Bi=_a[1];return oa=Bi,Fi})}if(Mn){if(zr>=pr)return oa;Fa(Pr,Hr)}else{if(li>=Ca)return oa;Fa(Ur,Dr)}return ki(),Qi(),oa}),Object(T.useEffect)(function(){return ki(),Xi&&(pi.current=window.setTimeout(function(){$i(0)},100)),ki},[Xi]);function ui(){var Hr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ke,Dr=Ai.get(Hr);if(!Dr)return;if(Mn){var oa=Qn;_t?Dr.right<Qn?oa=Dr.right:Dr.right+Dr.width>Qn+zr&&(oa=Dr.right+Dr.width-zr):Dr.left<-Qn?oa=-Dr.left:Dr.left+Dr.width>-Qn+zr&&(oa=-(Dr.left+Dr.width-zr)),Ur(0),Pr(fi(oa)[0])}else{var Fa=Br;Dr.top<-Br?Fa=-Dr.top:Dr.top+Dr.height>-Br+li&&(Fa=-(Dr.top+Dr.height-li)),Pr(0),Ur(fi(Fa)[0])}}var Ei=A(Ai,{width:zr,height:li,left:Qn,top:Br},{width:ea,height:Yr},{width:Ii,height:Oi},Object(F.a)(Object(F.a)({},De),{},{tabs:Ce})),ro=Object(B.a)(Ei,2),Ao=ro[0],Do=ro[1],fo=Ce.map(function(Hr){var Dr=Hr.key;return T.createElement(n,{id:Ye,prefixCls:ce,key:Dr,rtl:_t,tab:Hr,closable:Hr.closable,editable:rn,active:Dr===Ke,tabPosition:Rn,tabBarGutter:Kn,renderWrapper:cr,removeAriaLabel:hn==null?void 0:hn.removeAriaLabel,ref:ir(Dr),onClick:function(Fa){on(Dr,Fa)},onRemove:function(){mn(Dr)},onFocus:function(){ui(Dr),Qi(),_t||(Jt.current.scrollLeft=0),Jt.current.scrollTop=0}})}),ao=a(function(){var Hr,Dr,oa,Fa,Mi,di,Ui,ci,_a,Fi=((Hr=Jt.current)===null||Hr===void 0?void 0:Hr.offsetWidth)||0,Bi=((Dr=Jt.current)===null||Dr===void 0?void 0:Dr.offsetHeight)||0,Hi=((oa=yr.current)===null||oa===void 0?void 0:oa.offsetWidth)||0,za=((Fa=yr.current)===null||Fa===void 0?void 0:Fa.offsetHeight)||0,Fr=((Mi=_n.current)===null||Mi===void 0?void 0:Mi.offsetWidth)||0,_r=((di=_n.current)===null||di===void 0?void 0:di.offsetHeight)||0;ba(Fi),Ci(Bi),co(Hi),Vi(za);var Fn=(((Ui=In.current)===null||Ui===void 0?void 0:Ui.offsetWidth)||0)-Hi,lr=(((ci=In.current)===null||ci===void 0?void 0:ci.offsetHeight)||0)-za;la(Fn),qr(lr);var Ar=(_a=_n.current)===null||_a===void 0?void 0:_a.className.includes(Di);Ua(Fn-(Ar?0:Fr)),Ja(lr-(Ar?0:_r)),Yi(function(){var aa=new Map;return Ce.forEach(function(gi){var ii=gi.key,Da=ir(ii).current;Da&&aa.set(ii,{width:Da.offsetWidth,height:Da.offsetHeight,left:Da.offsetLeft,top:Da.offsetTop})}),aa})}),po=Ce.slice(0,Ao),Wa=Ce.slice(Do+1),ha=[].concat(Object(b.a)(po),Object(b.a)(Wa)),Aa=Object(T.useState)(),fa=Object(B.a)(Aa,2),Ni=fa[0],mo=fa[1],qa=Ai.get(Ke),io=Object(T.useRef)();function oo(){u.a.cancel(io.current)}Object(T.useEffect)(function(){var Hr={};return qa&&(Mn?(_t?Hr.right=qa.right:Hr.left=qa.left,Hr.width=qa.width):(Hr.top=qa.top,Hr.height=qa.height)),oo(),io.current=u()(function(){mo(Hr)}),oo},[qa,Mn,_t]),Object(T.useEffect)(function(){ui()},[Ke,qa,Ai,Mn]),Object(T.useEffect)(function(){ao()},[_t,Kn,Ke,Ce.map(function(Hr){return Hr.key}).join("_")]);var so=!!ha.length,xi="".concat(ce,"-nav-wrap"),Ji,ji,go,Zi;return Mn?_t?(ji=Qn>0,Ji=Qn+zr<pr):(Ji=Qn<0,ji=-Qn+zr<pr):(go=Br<0,Zi=-Br+li<Ca),T.createElement("div",{ref:tt,role:"tablist",className:P()("".concat(ce,"-nav"),ge),style:Ue,onKeyDown:function(){Qi()}},T.createElement(ma,{position:"left",extra:Ft,prefixCls:ce}),T.createElement(f.a,{onResize:ao},T.createElement("div",{className:P()(xi,(at={},Object(Y.a)(at,"".concat(xi,"-ping-left"),Ji),Object(Y.a)(at,"".concat(xi,"-ping-right"),ji),Object(Y.a)(at,"".concat(xi,"-ping-top"),go),Object(Y.a)(at,"".concat(xi,"-ping-bottom"),Zi),at)),ref:Jt},T.createElement(f.a,{onResize:ao},T.createElement("div",{ref:In,className:"".concat(ce,"-nav-list"),style:{transform:"translate(".concat(Qn,"px, ").concat(Br,"px)"),transition:Xi?"none":void 0}},fo,T.createElement(fr,{ref:yr,prefixCls:ce,locale:hn,editable:rn,style:{visibility:so?"hidden":null}}),T.createElement("div",{className:P()("".concat(ce,"-ink-bar"),Object(Y.a)({},"".concat(ce,"-ink-bar-animated"),ot.inkBar)),style:Ni}))))),T.createElement(Lr,Object.assign({},De,{ref:_n,prefixCls:ce,tabs:ha,className:!so&&Di})),T.createElement(ma,{position:"right",extra:Ft,prefixCls:ce}))}var Oa=T.forwardRef(Ya);function Pa(De){var tt=De.id,at=De.activeKey,je=De.animated,ce=De.tabPosition,Ce=De.rtl,ge=De.destroyInactiveTabPane,Ue=T.useContext(Gr),Ye=Ue.prefixCls,ot=Ue.tabs,Ke=je.tabPane,_t=ot.findIndex(function(Ft){return Ft.key===at});return T.createElement("div",{className:P()("".concat(Ye,"-content-holder"))},T.createElement("div",{className:P()("".concat(Ye,"-content"),"".concat(Ye,"-content-").concat(ce),Object(Y.a)({},"".concat(Ye,"-content-animated"),Ke)),style:_t&&Ke?Object(Y.a)({},Ce?"marginRight":"marginLeft","-".concat(_t,"00%")):null},ot.map(function(Ft){return T.cloneElement(Ft.node,{key:Ft.key,prefixCls:Ye,tabKey:Ft.key,id:tt,animated:Ke,active:Ft.key===at,destroyInactiveTabPane:ge})})))}function ga(De){var tt=De.prefixCls,at=De.forceRender,je=De.className,ce=De.style,Ce=De.id,ge=De.active,Ue=De.animated,Ye=De.destroyInactiveTabPane,ot=De.tabKey,Ke=De.children,_t=T.useState(at),Ft=Object(B.a)(_t,2),rn=Ft[0],hn=Ft[1];T.useEffect(function(){ge?hn(!0):Ye&&hn(!1)},[ge,Ye]);var Rn={};return ge||(Ue?(Rn.visibility="hidden",Rn.height=0,Rn.overflowY="hidden"):Rn.display="none"),T.createElement("div",{id:Ce&&"".concat(Ce,"-panel-").concat(ot),role:"tabpanel",tabIndex:ge?0:-1,"aria-labelledby":Ce&&"".concat(Ce,"-tab-").concat(ot),"aria-hidden":!ge,style:Object(F.a)(Object(F.a)({},Rn),ce),className:P()("".concat(tt,"-tabpane"),ge&&"".concat(tt,"-tabpane-active"),je)},(ge||rn||at)&&Ke)}var Na=0;function ai(De){return Object(m.a)(De).map(function(tt){if(T.isValidElement(tt)){var at=tt.key!==void 0?String(tt.key):void 0;return Object(F.a)(Object(F.a)({key:at},tt.props),{},{node:tt})}return null}).filter(function(tt){return tt})}function da(De,tt){var at,je=De.id,ce=De.prefixCls,Ce=ce===void 0?"rc-tabs":ce,ge=De.className,Ue=De.children,Ye=De.direction,ot=De.activeKey,Ke=De.defaultActiveKey,_t=De.editable,Ft=De.animated,rn=De.tabPosition,hn=rn===void 0?"top":rn,Rn=De.tabBarGutter,Kn=De.tabBarStyle,cr=De.tabBarExtraContent,on=De.locale,jt=De.moreIcon,Jt=De.moreTransitionName,In=De.destroyInactiveTabPane,_n=De.renderTabBar,yr=De.onChange,qn=De.onTabClick,Cr=De.onTabScroll,ir=Object(I.a)(De,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),mn=ai(Ue),Mn=Ye==="rtl",vr;Ft===!1?vr={inkBar:!1,tabPane:!1}:vr=Object(F.a)({inkBar:!0,tabPane:!1},Ft!==!0?Ft:null);var Or=Object(T.useState)(!1),Qn=Object(B.a)(Or,2),Pr=Qn[0],$r=Qn[1];Object(T.useEffect)(function(){$r(Wr())},[]);var Ir=Object(t.a)(function(){var Yr;return(Yr=mn[0])===null||Yr===void 0?void 0:Yr.key},{value:ot,defaultValue:Ke}),Br=Object(B.a)(Ir,2),Ur=Br[0],jr=Br[1],Nr=Object(T.useState)(function(){return mn.findIndex(function(Yr){return Yr.key===Ur})}),pr=Object(B.a)(Nr,2),la=pr[0],Qa=pr[1];Object(T.useEffect)(function(){var Yr=mn.findIndex(function(Za){return Za.key===Ur});if(Yr===-1){var Ja;Yr=Math.max(0,Math.min(la,mn.length-1)),jr((Ja=mn[Yr])===null||Ja===void 0?void 0:Ja.key)}Qa(Yr)},[mn.map(function(Yr){return Yr.key}).join("_"),Ur,la]);var ja=Object(t.a)(null,{value:je}),Ca=Object(B.a)(ja,2),qr=Ca[0],Vr=Ca[1],Xr=hn;Pr&&!["left","right"].includes(hn)&&(Xr="top"),Object(T.useEffect)(function(){je||(Vr("rc-tabs-".concat(Na)),Na+=1)},[]);function ea(Yr,Ja){qn==null||qn(Yr,Ja),jr(Yr),yr==null||yr(Yr)}var Ua={id:qr,activeKey:Ur,animated:vr,tabPosition:Xr,rtl:Mn,mobile:Pr},hi,si=Object(F.a)(Object(F.a)({},Ua),{},{editable:_t,locale:on,moreIcon:jt,moreTransitionName:Jt,tabBarGutter:Rn,onTabClick:ea,onTabScroll:Cr,extra:cr,style:Kn,panes:Ue});return _n?hi=_n(si,Oa):hi=T.createElement(Oa,Object.assign({},si)),T.createElement(Gr.Provider,{value:{tabs:mn,prefixCls:Ce}},T.createElement("div",Object.assign({ref:tt,id:je,className:P()(Ce,"".concat(Ce,"-").concat(Xr),(at={},Object(Y.a)(at,"".concat(Ce,"-mobile"),Pr),Object(Y.a)(at,"".concat(Ce,"-editable"),_t),Object(Y.a)(at,"".concat(Ce,"-rtl"),Mn),at),ge)},ir),hi,T.createElement(Pa,Object.assign({destroyInactiveTabPane:In},Ua,{animated:vr}))))}var ca=T.forwardRef(da);ca.TabPane=ga;var Ra=ca,wa=J.b=Ra},kSUc:function(Be,J,L){},lO7E:function(Be,J,L){Be.exports=L.p+"static/zwt.3af2a320.png"},lZu9:function(Be,J,L){(function(Y){Y(L("VrN/"),L("1eCo"),L("8EBN"))})(function(Y){"use strict";Y.defineMode("markdown",function(B,I){var F=Y.getMode(B,"text/html"),T=F.name=="null";function R(H){if(Y.findModeByName){var M=Y.findModeByName(H);M&&(H=M.mime||M.mimes[0])}var V=Y.getMode(B,H);return V.name=="null"?null:V}I.highlightFormatting===void 0&&(I.highlightFormatting=!1),I.maxBlockquoteDepth===void 0&&(I.maxBlockquoteDepth=0),I.taskLists===void 0&&(I.taskLists=!1),I.strikethrough===void 0&&(I.strikethrough=!1),I.emoji===void 0&&(I.emoji=!1),I.fencedCodeBlockHighlighting===void 0&&(I.fencedCodeBlockHighlighting=!0),I.fencedCodeBlockDefaultMode===void 0&&(I.fencedCodeBlockDefaultMode="text/plain"),I.xml===void 0&&(I.xml=!0),I.tokenTypeOverrides===void 0&&(I.tokenTypeOverrides={});var P={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 m in P)P.hasOwnProperty(m)&&I.tokenTypeOverrides[m]&&(P[m]=I.tokenTypeOverrides[m]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,b=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,o=/^\[(x| )\](?=\s)/i,u=I.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,a=/^[^#!\[\]*_\\<>` "'(~:]+/,i=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,s=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function l(H,M,V){return M.f=M.inline=V,V(H,M)}function c(H,M,V){return M.f=M.block=V,V(H,M)}function x(H){return!H||!/\S/.test(H.string)}function A(H){if(H.linkTitle=!1,H.linkHref=!1,H.linkText=!1,H.em=!1,H.strong=!1,H.strikethrough=!1,H.quote=0,H.indentedCode=!1,H.f==k){var M=T;if(!M){var V=Y.innerMode(F,H.htmlState);M=V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText}M&&(H.f=p,H.block=C,H.htmlState=null)}return H.trailingSpace=0,H.trailingSpaceNewLine=!1,H.prevLine=H.thisLine,H.thisLine={stream:null},null}function C(H,M){var V=H.column()===M.indentation,K=x(M.prevLine.stream),$=M.indentedCode,Z=M.prevLine.hr,me=M.list!==!1,oe=(M.listStack[M.listStack.length-1]||0)+3;M.indentedCode=!1;var fe=M.indentation;if(M.indentationDiff===null&&(M.indentationDiff=M.indentation,me)){for(M.list=null;fe<M.listStack[M.listStack.length-1];)M.listStack.pop(),M.listStack.length?M.indentation=M.listStack[M.listStack.length-1]:M.list=!1;M.list!==!1&&(M.indentationDiff=fe-M.listStack[M.listStack.length-1])}var ye=!K&&!Z&&!M.prevLine.header&&(!me||!$)&&!M.prevLine.fencedCodeEnd,Ie=(M.list===!1||Z||K)&&M.indentation<=oe&&H.match(t),ve=null;if(M.indentationDiff>=4&&($||M.prevLine.fencedCodeEnd||M.prevLine.header||K))return H.skipToEnd(),M.indentedCode=!0,P.code;if(H.eatSpace())return null;if(V&&M.indentation<=oe&&(ve=H.match(u))&&ve[1].length<=6)return M.quote=0,M.header=ve[1].length,M.thisLine.header=!0,I.highlightFormatting&&(M.formatting="header"),M.f=M.inline,y(M);if(M.indentation<=oe&&H.eat(">"))return M.quote=V?1:M.quote+1,I.highlightFormatting&&(M.formatting="quote"),H.eatSpace(),y(M);if(!Ie&&!M.setext&&V&&M.indentation<=oe&&(ve=H.match(b))){var de=ve[1]?"ol":"ul";return M.indentation=fe+H.current().length,M.list=!0,M.quote=0,M.listStack.push(M.indentation),M.em=!1,M.strong=!1,M.code=!1,M.strikethrough=!1,I.taskLists&&H.match(o,!1)&&(M.taskList=!0),M.f=M.inline,I.highlightFormatting&&(M.formatting=["list","list-"+de]),y(M)}else{if(V&&M.indentation<=oe&&(ve=H.match(i,!0)))return M.quote=0,M.fencedEndRE=new RegExp(ve[1]+"+ *$"),M.localMode=I.fencedCodeBlockHighlighting&&R(ve[2]||I.fencedCodeBlockDefaultMode),M.localMode&&(M.localState=Y.startState(M.localMode)),M.f=M.block=w,I.highlightFormatting&&(M.formatting="code-block"),M.code=-1,y(M);if(M.setext||(!ye||!me)&&!M.quote&&M.list===!1&&!M.code&&!Ie&&!d.test(H.string)&&(ve=H.lookAhead(1))&&(ve=ve.match(f)))return M.setext?(M.header=M.setext,M.setext=0,H.skipToEnd(),I.highlightFormatting&&(M.formatting="header")):(M.header=ve[0].charAt(0)=="="?1:2,M.setext=M.header),M.thisLine.header=!0,M.f=M.inline,y(M);if(Ie)return H.skipToEnd(),M.hr=!0,M.thisLine.hr=!0,P.hr;if(H.peek()==="[")return l(H,M,j)}return l(H,M,M.inline)}function k(H,M){var V=F.token(H,M.htmlState);if(!T){var K=Y.innerMode(F,M.htmlState);(K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText||M.md_inside&&H.current().indexOf(">")>-1)&&(M.f=p,M.block=C,M.htmlState=null)}return V}function w(H,M){var V=M.listStack[M.listStack.length-1]||0,K=M.indentation<V,$=V+3;if(M.fencedEndRE&&M.indentation<=$&&(K||H.match(M.fencedEndRE))){I.highlightFormatting&&(M.formatting="code-block");var Z;return K||(Z=y(M)),M.localMode=M.localState=null,M.block=C,M.f=p,M.fencedEndRE=null,M.code=0,M.thisLine.fencedCodeEnd=!0,K?c(H,M,M.block):Z}else return M.localMode?M.localMode.token(H,M.localState):(H.skipToEnd(),P.code)}function y(H){var M=[];if(H.formatting){M.push(P.formatting),typeof H.formatting=="string"&&(H.formatting=[H.formatting]);for(var V=0;V<H.formatting.length;V++)M.push(P.formatting+"-"+H.formatting[V]),H.formatting[V]==="header"&&M.push(P.formatting+"-"+H.formatting[V]+"-"+H.header),H.formatting[V]==="quote"&&(!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=H.quote?M.push(P.formatting+"-"+H.formatting[V]+"-"+H.quote):M.push("error"))}if(H.taskOpen)return M.push("meta"),M.length?M.join(" "):null;if(H.taskClosed)return M.push("property"),M.length?M.join(" "):null;if(H.linkHref?M.push(P.linkHref,"url"):(H.strong&&M.push(P.strong),H.em&&M.push(P.em),H.strikethrough&&M.push(P.strikethrough),H.emoji&&M.push(P.emoji),H.linkText&&M.push(P.linkText),H.code&&M.push(P.code),H.image&&M.push(P.image),H.imageAltText&&M.push(P.imageAltText,"link"),H.imageMarker&&M.push(P.imageMarker)),H.header&&M.push(P.header,P.header+"-"+H.header),H.quote&&(M.push(P.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=H.quote?M.push(P.quote+"-"+H.quote):M.push(P.quote+"-"+I.maxBlockquoteDepth)),H.list!==!1){var K=(H.listStack.length-1)%3;K?K===1?M.push(P.list2):M.push(P.list3):M.push(P.list1)}return H.trailingSpaceNewLine?M.push("trailing-space-new-line"):H.trailingSpace&&M.push("trailing-space-"+(H.trailingSpace%2?"a":"b")),M.length?M.join(" "):null}function h(H,M){return H.match(a,!0)?y(M):void 0}function p(H,M){var V=M.text(H,M);if(typeof V!="undefined")return V;if(M.list)return M.list=null,y(M);if(M.taskList){var K=H.match(o,!0)[1]===" ";return K?M.taskOpen=!0:M.taskClosed=!0,I.highlightFormatting&&(M.formatting="task"),M.taskList=!1,y(M)}if(M.taskOpen=!1,M.taskClosed=!1,M.header&&H.match(/^#+$/,!0))return I.highlightFormatting&&(M.formatting="header"),y(M);var $=H.next();if(M.linkTitle){M.linkTitle=!1;var Z=$;$==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var me="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(H.match(new RegExp(me),!0))return P.linkHref}if($==="`"){var oe=M.formatting;I.highlightFormatting&&(M.formatting="code"),H.eatWhile("`");var fe=H.current().length;if(M.code==0&&(!M.quote||fe==1))return M.code=fe,y(M);if(fe==M.code){var ye=y(M);return M.code=0,ye}else return M.formatting=oe,y(M)}else if(M.code)return y(M);if($==="\\"&&(H.next(),I.highlightFormatting)){var Ie=y(M),ve=P.formatting+"-escape";return Ie?Ie+" "+ve:ve}if($==="!"&&H.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return M.imageMarker=!0,M.image=!0,I.highlightFormatting&&(M.formatting="image"),y(M);if($==="["&&M.imageMarker&&H.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return M.imageMarker=!1,M.imageAltText=!0,I.highlightFormatting&&(M.formatting="image"),y(M);if($==="]"&&M.imageAltText){I.highlightFormatting&&(M.formatting="image");var Ie=y(M);return M.imageAltText=!1,M.image=!1,M.inline=M.f=_,Ie}if($==="["&&!M.image)return M.linkText&&H.match(/^.*?\]/)||(M.linkText=!0,I.highlightFormatting&&(M.formatting="link")),y(M);if($==="]"&&M.linkText){I.highlightFormatting&&(M.formatting="link");var Ie=y(M);return M.linkText=!1,M.inline=M.f=H.match(/\(.*?\)| ?\[.*?\]/,!1)?_:p,Ie}if($==="<"&&H.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=v,I.highlightFormatting&&(M.formatting="link");var Ie=y(M);return Ie?Ie+=" ":Ie="",Ie+P.linkInline}if($==="<"&&H.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=v,I.highlightFormatting&&(M.formatting="link");var Ie=y(M);return Ie?Ie+=" ":Ie="",Ie+P.linkEmail}if(I.xml&&$==="<"&&H.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var de=H.string.indexOf(">",H.pos);if(de!=-1){var Je=H.string.substring(H.start,de);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Je)&&(M.md_inside=!0)}return H.backUp(1),M.htmlState=Y.startState(F),c(H,M,k)}if(I.xml&&$==="<"&&H.match(/^\/\w*?>/))return M.md_inside=!1,"tag";if($==="*"||$==="_"){for(var Rt=1,Ee=H.pos==1?" ":H.string.charAt(H.pos-2);Rt<3&&H.eat($);)Rt++;var Me=H.peek()||" ",rt=!/\s/.test(Me)&&(!s.test(Me)||/\s/.test(Ee)||s.test(Ee)),He=!/\s/.test(Ee)&&(!s.test(Ee)||/\s/.test(Me)||s.test(Me)),ke=null,ht=null;if(Rt%2&&(!M.em&&rt&&($==="*"||!He||s.test(Ee))?ke=!0:M.em==$&&He&&($==="*"||!rt||s.test(Me))&&(ke=!1)),Rt>1&&(!M.strong&&rt&&($==="*"||!He||s.test(Ee))?ht=!0:M.strong==$&&He&&($==="*"||!rt||s.test(Me))&&(ht=!1)),ht!=null||ke!=null){I.highlightFormatting&&(M.formatting=ke==null?"strong":ht==null?"em":"strong em"),ke===!0&&(M.em=$),ht===!0&&(M.strong=$);var ye=y(M);return ke===!1&&(M.em=!1),ht===!1&&(M.strong=!1),ye}}else if($===" "&&(H.eat("*")||H.eat("_"))){if(H.peek()===" ")return y(M);H.backUp(1)}if(I.strikethrough){if($==="~"&&H.eatWhile($)){if(M.strikethrough){I.highlightFormatting&&(M.formatting="strikethrough");var ye=y(M);return M.strikethrough=!1,ye}else if(H.match(/^[^\s]/,!1))return M.strikethrough=!0,I.highlightFormatting&&(M.formatting="strikethrough"),y(M)}else if($===" "&&H.match(/^~~/,!0)){if(H.peek()===" ")return y(M);H.backUp(2)}}if(I.emoji&&$===":"&&H.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){M.emoji=!0,I.highlightFormatting&&(M.formatting="emoji");var ie=y(M);return M.emoji=!1,ie}return $===" "&&(H.match(/^ +$/,!1)?M.trailingSpace++:M.trailingSpace&&(M.trailingSpaceNewLine=!0)),y(M)}function v(H,M){var V=H.next();if(V===">"){M.f=M.inline=p,I.highlightFormatting&&(M.formatting="link");var K=y(M);return K?K+=" ":K="",K+P.linkInline}return H.match(/^[^>]+/,!0),P.linkInline}function _(H,M){if(H.eatSpace())return null;var V=H.next();return V==="("||V==="["?(M.f=M.inline=g(V==="("?")":"]"),I.highlightFormatting&&(M.formatting="link-string"),M.linkHref=!0,y(M)):"error"}var E={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(H){return function(M,V){var K=M.next();if(K===H){V.f=V.inline=p,I.highlightFormatting&&(V.formatting="link-string");var $=y(V);return V.linkHref=!1,$}return M.match(E[H]),V.linkHref=!0,y(V)}}function j(H,M){return H.match(/^([^\]\\]|\\.)*\]:/,!1)?(M.f=U,H.next(),I.highlightFormatting&&(M.formatting="link"),M.linkText=!0,y(M)):l(H,M,p)}function U(H,M){if(H.match(/^\]:/,!0)){M.f=M.inline=S,I.highlightFormatting&&(M.formatting="link");var V=y(M);return M.linkText=!1,V}return H.match(/^([^\]\\]|\\.)+/,!0),P.linkText}function S(H,M){return H.eatSpace()?null:(H.match(/^[^\s]+/,!0),H.peek()===void 0?M.linkTitle=!0:H.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),M.f=M.inline=p,P.linkHref+" url")}var z={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:p,text:h,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(H){return{f:H.f,prevLine:H.prevLine,thisLine:H.thisLine,block:H.block,htmlState:H.htmlState&&Y.copyState(F,H.htmlState),indentation:H.indentation,localMode:H.localMode,localState:H.localMode?Y.copyState(H.localMode,H.localState):null,inline:H.inline,text:H.text,formatting:!1,linkText:H.linkText,linkTitle:H.linkTitle,linkHref:H.linkHref,code:H.code,em:H.em,strong:H.strong,strikethrough:H.strikethrough,emoji:H.emoji,header:H.header,setext:H.setext,hr:H.hr,taskList:H.taskList,list:H.list,listStack:H.listStack.slice(0),quote:H.quote,indentedCode:H.indentedCode,trailingSpace:H.trailingSpace,trailingSpaceNewLine:H.trailingSpaceNewLine,md_inside:H.md_inside,fencedEndRE:H.fencedEndRE}},token:function(H,M){if(M.formatting=!1,H!=M.thisLine.stream){if(M.header=0,M.hr=!1,H.match(/^\s*$/,!0))return A(M),null;if(M.prevLine=M.thisLine,M.thisLine={stream:H},M.taskList=!1,M.trailingSpace=0,M.trailingSpaceNewLine=!1,!M.localState&&(M.f=M.block,M.f!=k)){var V=H.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(M.indentation=V,M.indentationDiff=null,V>0)return null}}return M.f(H,M)},innerMode:function(H){return H.block==k?{state:H.htmlState,mode:F}:H.localState?{state:H.localState,mode:H.localMode}:{state:H,mode:z}},indent:function(H,M,V){return H.block==k&&F.indent?F.indent(H.htmlState,M,V):H.localState&&H.localMode.indent?H.localMode.indent(H.localState,M,V):Y.Pass},blankLine:A,getType:y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),Y.defineMIME("text/markdown","markdown"),Y.defineMIME("text/x-markdown","markdown")})},loD1:function(Be,J){function L(Y,B,I,F,T,R,P){if(T===0)return!1;var m=T,t=0,b=Y;if(P>B+m&&P>F+m||P<B-m&&P<F-m||R>Y+m&&R>I+m||R<Y-m&&R<I-m)return!1;if(Y!==I)t=(B-F)/(Y-I),b=(Y*F-I*B)/(Y-I);else return Math.abs(R-Y)<=m/2;var o=t*R-P+b,u=o*o/(t*t+1);return u<=m/2*m/2}J.containStroke=L},mFDi:function(Be,J,L){var Y=L("QBsz"),B=L("Fofx"),I=Y.applyTransform,F=Math.min,T=Math.max;function R(m,t,b,o){b<0&&(m=m+b,b=-b),o<0&&(t=t+o,o=-o),this.x=m,this.y=t,this.width=b,this.height=o}R.prototype={constructor:R,union:function(m){var t=F(m.x,this.x),b=F(m.y,this.y);this.width=T(m.x+m.width,this.x+this.width)-t,this.height=T(m.y+m.height,this.y+this.height)-b,this.x=t,this.y=b},applyTransform:function(){var m=[],t=[],b=[],o=[];return function(u){if(!u)return;m[0]=b[0]=this.x,m[1]=o[1]=this.y,t[0]=o[0]=this.x+this.width,t[1]=b[1]=this.y+this.height,I(m,m,u),I(t,t,u),I(b,b,u),I(o,o,u),this.x=F(m[0],t[0],b[0],o[0]),this.y=F(m[1],t[1],b[1],o[1]);var f=T(m[0],t[0],b[0],o[0]),a=T(m[1],t[1],b[1],o[1]);this.width=f-this.x,this.height=a-this.y}}(),calculateTransform:function(m){var t=this,b=m.width/t.width,o=m.height/t.height,u=B.create();return B.translate(u,u,[-t.x,-t.y]),B.scale(u,u,[b,o]),B.translate(u,u,[m.x,m.y]),u},intersect:function(m){if(!m)return!1;m instanceof R||(m=R.create(m));var t=this,b=t.x,o=t.x+t.width,u=t.y,f=t.y+t.height,a=m.x,i=m.x+m.width,d=m.y,s=m.y+m.height;return!(o<a||i<b||f<d||s<u)},contain:function(m,t){var b=this;return m>=b.x&&m<=b.x+b.width&&t>=b.y&&t<=b.y+b.height},clone:function(){return new R(this.x,this.y,this.width,this.height)},copy:function(m){this.x=m.x,this.y=m.y,this.width=m.width,this.height=m.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},R.create=function(m){return new R(m.x,m.y,m.width,m.height)};var P=R;Be.exports=P},mLcG:function(Be,J){var L=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(Y){setTimeout(Y,16)};Be.exports=L},mgmH:function(Be,J,L){"use strict";L.d(J,"d",function(){return f}),L.d(J,"b",function(){return a}),L.d(J,"e",function(){return i}),L.d(J,"c",function(){return d}),L.d(J,"n",function(){return s}),L.d(J,"g",function(){return n}),L.d(J,"h",function(){return l}),L.d(J,"j",function(){return x}),L.d(J,"a",function(){return A}),L.d(J,"l",function(){return C}),L.d(J,"f",function(){return k}),L.d(J,"k",function(){return w}),L.d(J,"m",function(){return y}),L.d(J,"i",function(){return h}),L.d(J,"o",function(){return p}),L.d(J,"t",function(){return v}),L.d(J,"s",function(){return _}),L.d(J,"p",function(){return E}),L.d(J,"q",function(){return g}),L.d(J,"r",function(){return j}),L.d(J,"v",function(){return U}),L.d(J,"u",function(){return S});var Y=L("miYZ"),B=L("tsqr"),I=L("k1fw"),F=L("9og8"),T=L("WmNS"),R=L.n(T),P=L("oUNq"),m=L("9kvl"),t=L("1vsH"),b=L("m3rI"),o=function(){Object(m.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},u=function(){Object(m.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},f=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return o(),$.next=3,Object(P.t)(Object(I.a)({},M));case 3:if(V=$.sent,!(V.status===0)){$.next=7;break}return $.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(M.coursesId,"/export_couser_info.json"),query:M}));case 7:u();case 8:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),a=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.r)(Object(I.a)({},M));case 2:if(V=$.sent,!(V.status===0)){$.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_member_act_score")),$.next=13;break;case 8:if(!(V.status===-2)){$.next=12;break}return $.abrupt("return",V);case 12:V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),i=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.u)(Object(I.a)({},M));case 2:if(V=$.sent,!(V.status===0)){$.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_score")),$.next=13;break;case 8:if(!(V.status===-2)){$.next=12;break}return $.abrupt("return",V);case 12:V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_score")));case 13:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),d=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.s)(Object(I.a)({},M));case 2:if(V=$.sent,!(V.status===0)){$.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_exercise_and_other")),$.next=13;break;case 8:if(!(V.status===-2)){$.next=12;break}return $.abrupt("return",V);case 12:V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),s=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.z)(Object(I.a)({},M));case 2:if(V=$.sent,!(V.status===0)){$.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_exercise_and_other")),$.next=13;break;case 8:if(!(V.status===-2)){$.next=12;break}return $.abrupt("return",V);case 12:V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),n=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.v)(Object(I.a)({},M));case 2:if(V=$.sent,!(V.status===0)){$.next=8;break}B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_homework")),$.next=13;break;case 8:if(!(V.status===-2)){$.next=12;break}return $.abrupt("return",V);case 12:V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),l=function(){var z=Object(F.a)(R.a.mark(function H(M,V){var K;return R.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,Object(P.x)(Object(I.a)({},M));case 2:K=Z.sent,K.status===0?(B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/").concat(V))):K.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/").concat(V)));case 4:case"end":return Z.stop()}},H)}));return function(M,V){return z.apply(this,arguments)}}(),c=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return o(),$.next=3,Object(P.w)(Object(I.a)({},M));case 3:if(V=$.sent,!(V.status===0)){$.next=7;break}return $.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/homework_commons/".concat(M.categoryId,"/works_list.zip"),query:M}));case 7:u();case 8:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),x=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return o(),$.next=3,Object(P.A)(Object(I.a)({},M));case 3:if(V=$.sent,!(V.status===0)){$.next=7;break}return $.next=7,Object(t.w)("",Object(t.Y)({url:b.a.API_SERVER+"/api/polls/".concat(M.categoryId,"/commit_result.xlsx"),query:M}));case 7:u();case 8:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),A=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(M.coursesId,"/attendances/export_xlsx_data.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),C=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(M.coursesId,"/video_study_statics.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),k=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/".concat(M.coursesId,"/export_course_students_info.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),w=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/item_banks/export.xlsx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),y=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/competitions/region_reports.xlsx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),h=function(){var z=Object(F.a)(R.a.mark(function H(M){var V;return R.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(P.y)(Object(I.a)({},M));case 2:V=$.sent,V.status===0?(B.b.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/exercise_score"))):V.status===-3&&(Object(m.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),m.d.push("/classrooms/".concat(M.coursesId,"/exportlist/exercise_score")));case 4:case"end":return $.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),p=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),K.next=3,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/export_records/".concat(M.id,".xlsx"),query:M}));case 3:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),v=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),_=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(M==null?void 0:M.ec_year_id,"/ec_training_objectives.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),E=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)(M==null?void 0:M.name,Object(t.Y)({url:b.a.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),g=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(M==null?void 0:M.ec_year_id,"/ec_courses.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),j=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/ec_years/".concat(M==null?void 0:M.ec_year_id,"/ec_graduation_requirements.xlsx"),query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),U=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/rank_list.xlsx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}(),S=function(){var z=Object(F.a)(R.a.mark(function H(M){return R.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(t.v)("",Object(t.Y)({url:b.a.API_SERVER+"/api/courses/question_rank_list.xlsx",query:M}));case 2:case"end":return K.stop()}},H)}));return function(M){return z.apply(this,arguments)}}()},n1HI:function(Be,J,L){var Y=L("hX1E"),B=Y.normalizeRadian,I=Math.PI*2;function F(T,R,P,m,t,b,o,u,f){if(o===0)return!1;var a=o;u-=T,f-=R;var i=Math.sqrt(u*u+f*f);if(i-a>P||i+a<P)return!1;if(Math.abs(m-t)%I<1e-4)return!0;if(b){var d=m;m=B(t),t=B(d)}else m=B(m),t=B(t);m>t&&(t+=I);var s=Math.atan2(f,u);return s<0&&(s+=I),s>=m&&s<=t||s+I>=m&&s+I<=t}J.containStroke=F},n6Mw:function(Be,J,L){var Y=L("SrGk"),B=L("bYtY"),I=L("Fofx");function F(R,P){Y.call(this,R,P,"clipPath","__clippath_in_use__")}B.inherits(F,Y),F.prototype.update=function(R){var P=this.getSvgElement(R);P&&this.updateDom(P,R.__clipPaths,!1);var m=this.getTextSvgElement(R);m&&this.updateDom(m,R.__clipPaths,!0),this.markUsed(R)},F.prototype.updateDom=function(R,P,m){if(P&&P.length>0){var t=this.getDefs(!0),b=P[0],o,u,f=m?"_textDom":"_dom";b[f]?(u=b[f].getAttribute("id"),o=b[f],t.contains(o)||t.appendChild(o)):(u="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,o=this.createElement("clipPath"),o.setAttribute("id",u),t.appendChild(o),b[f]=o);var a=this.getSvgProxy(b);if(b.transform&&b.parent.invTransform&&!m){var i=Array.prototype.slice.call(b.transform);I.mul(b.transform,b.parent.invTransform,b.transform),a.brush(b),b.transform=i}else a.brush(b);var d=this.getSvgElement(b);o.innerHTML="",o.appendChild(d.cloneNode()),R.setAttribute("clip-path","url(#"+u+")"),P.length>1&&this.updateDom(o,P.slice(1),m)}else R&&R.setAttribute("clip-path","none")},F.prototype.markUsed=function(R){var P=this;R.__clipPaths&&B.each(R.__clipPaths,function(m){m._dom&&Y.prototype.markUsed.call(P,m._dom),m._textDom&&Y.prototype.markUsed.call(P,m._textDom)})};var T=F;Be.exports=T},n6Qo:function(Be,J,L){"use strict";L.d(J,"a",function(){return m});var Y=L("q1tI"),B=L("biw7"),I=L("fyJ8");function F(t){var b=t.className,o=t.index,u=t.children,f=t.colSpan,a=t.rowSpan,i=Y.useContext(B.a),d=i.prefixCls,s=i.fixedInfoList,n=s[o];return Y.createElement(I.a,Object.assign({className:b,index:o,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:f,rowSpan:a}}}},n))}function T(t){return Y.createElement("tr",Object.assign({},t))}function R(t){var b=t.children,o=Y.useContext(B.a),u=o.prefixCls;return Y.createElement("tfoot",{className:"".concat(u,"-summary")},b)}var P=J.b=R,m={Cell:F,Row:T}},nCxF:function(Be,J,L){var Y=L("QBsz"),B=Y.min,I=Y.max,F=Y.scale,T=Y.distance,R=Y.add,P=Y.clone,m=Y.sub;function t(b,o,u,f){var a=[],i=[],d=[],s=[],n,l,c,x;if(f){c=[Infinity,Infinity],x=[-Infinity,-Infinity];for(var A=0,C=b.length;A<C;A++)B(c,c,b[A]),I(x,x,b[A]);B(c,c,f[0]),I(x,x,f[1])}for(var A=0,C=b.length;A<C;A++){var k=b[A];if(u)n=b[A?A-1:C-1],l=b[(A+1)%C];else if(A===0||A===C-1){a.push(P(b[A]));continue}else n=b[A-1],l=b[A+1];m(i,l,n),F(i,i,o);var w=T(k,n),y=T(k,l),h=w+y;h!==0&&(w/=h,y/=h),F(d,i,-w),F(s,i,y);var p=R([],k,d),v=R([],k,s);f&&(I(p,p,c),B(p,p,x),I(v,v,c),B(v,v,x)),a.push(p),a.push(v)}return u&&a.push(a.shift()),a}Be.exports=t},nEHx:function(Be,J,L){"use strict";L.d(J,"a",function(){return Y});var Y;(function(B){B.DARK="dark",B.LIGHT="light",B.HIGH_CONTRAST="hc"})(Y||(Y={}))},nPnh:function(Be,J){var L=Math.round;function Y(F,T,R){if(!T)return;var P=T.x1,m=T.x2,t=T.y1,b=T.y2;F.x1=P,F.x2=m,F.y1=t,F.y2=b;var o=R&&R.lineWidth;if(!o)return;L(P*2)===L(m*2)&&(F.x1=F.x2=I(P,o,!0)),L(t*2)===L(b*2)&&(F.y1=F.y2=I(t,o,!0))}function B(F,T,R){if(!T)return;var P=T.x,m=T.y,t=T.width,b=T.height;F.x=P,F.y=m,F.width=t,F.height=b;var o=R&&R.lineWidth;if(!o)return;F.x=I(P,o,!0),F.y=I(m,o,!0),F.width=Math.max(I(P+t,o,!1)-F.x,t===0?0:1),F.height=Math.max(I(m+b,o,!1)-F.y,b===0?0:1)}function I(F,T,R){if(!T)return F;var P=L(F*2);return(P+L(T))%2===0?P/2:(P+(R?1:-1))/2}J.subPixelOptimizeLine=Y,J.subPixelOptimizeRect=B,J.subPixelOptimize=I},ni6a:function(Be,J,L){var Y=L("pzxd"),B=L("mFDi"),I=L("gut8"),F=I.WILL_BE_RESTORED,T=new B,R=function(){};R.prototype={constructor:R,drawRectText:function(m,t){var b=this.style;t=b.textRect||t,this.__dirty&&Y.normalizeTextStyle(b,!0);var o=b.text;if(o!=null&&(o+=""),!Y.needDrawText(o,b))return;m.save();var u=this.transform;b.transformText?this.setTransform(m):u&&(T.copy(t),T.applyTransform(u),t=T),Y.renderText(this,m,o,b,t,F),m.restore()}};var P=R;Be.exports=P},nnTU:function(Be,J,L){"use strict";L.d(J,"b",function(){return P}),L.d(J,"a",function(){return m});var Y=L("MI8n"),B=L("JYp7"),I=L("pmY6"),F=L("24hK"),T=L("746U"),R=L("Cg/j");const P=Object(R.c)("commandService"),m=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Y.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,b){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!b)throw new Error("invalid command");return this.registerCommand({id:t,handler:b})}if(t.description){const i=[];for(let s of t.description.args)i.push(s.constraint);const d=t.handler;t.handler=function(s,...n){return Object(T.o)(n,i),d(s,...n)}}const{id:o}=t;let u=this._commands.get(o);u||(u=new F.a,this._commands.set(o,u));let f=u.unshift(t),a=Object(I.i)(()=>{f();const i=this._commands.get(o);(i==null?void 0:i.isEmpty())&&this._commands.delete(o)});return this._onDidRegisterCommand.fire(o),a}registerCommandAlias(t,b){return m.registerCommand(t,(o,...u)=>o.get(P).executeCommand(b,...u))}getCommand(t){const b=this._commands.get(t);return!b||b.isEmpty()?void 0:B.a.first(b)}getCommands(){const t=new Map;for(const b of this._commands.keys()){const o=this.getCommand(b);o&&t.set(b,o)}return t}};m.registerCommand("noop",()=>{})},oOBs:function(Be,J,L){Be.exports={leftdiv:"leftdiv___1FhsT",listClass:"listClass___1Y2ac",spantitle:"spantitle___1pL39",rightdiv:"rightdiv___3ZICD"}},ogmK:function(Be,J,L){"use strict";L.d(J,"a",function(){return Sr});var Y=L("1OyB"),B=L("vuIU"),I=L("Ji7U"),F=L("LK+K"),T=L("rePB"),R=L("VTBJ"),P=L("ODXe"),m=L("q1tI"),t=L("TSYQ"),b=L.n(t),o=L("Kwbf"),u=L("6cGi"),f=L("U8pU"),a=L("4IlW"),i=m.createContext({}),d=i,s={visibility:"hidden"};function n(ne){var Re=ne.prefixCls,Xe=ne.prevIcon,Le=Xe===void 0?"\u2039":Xe,st=ne.nextIcon,et=st===void 0?"\u203A":st,pt=ne.superPrevIcon,mt=pt===void 0?"\xAB":pt,it=ne.superNextIcon,Mt=it===void 0?"\xBB":it,Xt=ne.onSuperPrev,Vt=ne.onSuperNext,St=ne.onPrev,nn=ne.onNext,Qe=ne.children,en=m.useContext(d),Bt=en.hideNextBtn,bn=en.hidePrevBtn;return m.createElement("div",{className:Re},Xt&&m.createElement("button",{type:"button",onClick:Xt,tabIndex:-1,className:"".concat(Re,"-super-prev-btn"),style:bn?s:{}},mt),St&&m.createElement("button",{type:"button",onClick:St,tabIndex:-1,className:"".concat(Re,"-prev-btn"),style:bn?s:{}},Le),m.createElement("div",{className:"".concat(Re,"-view")},Qe),nn&&m.createElement("button",{type:"button",onClick:nn,tabIndex:-1,className:"".concat(Re,"-next-btn"),style:Bt?s:{}},et),Vt&&m.createElement("button",{type:"button",onClick:Vt,tabIndex:-1,className:"".concat(Re,"-super-next-btn"),style:Bt?s:{}},Mt))}var l=n;function c(ne){var Re=m.useContext(d),Xe=Re.hideHeader;if(Xe)return null;var Le=ne.prefixCls,st=ne.generateConfig,et=ne.locale,pt=ne.value,mt=ne.format,it="".concat(Le,"-header");return m.createElement(l,{prefixCls:it},pt?st.locale.format(et.locale,pt,mt):"\xA0")}var x=c,A=L("YrtM"),C=L("KQm4"),k=new Map;function w(ne,Re,Xe){if(k.get(ne)&&cancelAnimationFrame(k.get(ne)),Xe<=0){k.set(ne,requestAnimationFrame(function(){ne.scrollTop=Re}));return}var Le=Re-ne.scrollTop,st=Le/Xe*10;k.set(ne,requestAnimationFrame(function(){ne.scrollTop+=st,ne.scrollTop!==Re&&w(ne,Re,Xe-10)}))}function y(ne,Re){var Xe=Re.onLeftRight,Le=Re.onCtrlLeftRight,st=Re.onUpDown,et=Re.onPageUpDown,pt=Re.onEnter,mt=ne.which,it=ne.ctrlKey,Mt=ne.metaKey;switch(mt){case a.a.LEFT:if(it||Mt){if(Le)return Le(-1),!0}else if(Xe)return Xe(-1),!0;break;case a.a.RIGHT:if(it||Mt){if(Le)return Le(1),!0}else if(Xe)return Xe(1),!0;break;case a.a.UP:if(st)return st(-1),!0;break;case a.a.DOWN:if(st)return st(1),!0;break;case a.a.PAGE_UP:if(et)return et(-1),!0;break;case a.a.PAGE_DOWN:if(et)return et(1),!0;break;case a.a.ENTER:if(pt)return pt(),!0;break}return!1}function h(ne,Re,Xe,Le){var st=ne;if(!st)switch(Re){case"time":st=Le?"hh:mm:ss a":"HH:mm:ss";break;case"week":st="gggg-wo";break;case"month":st="YYYY-MM";break;case"quarter":st="YYYY-[Q]Q";break;case"year":st="YYYY";break;default:st=Xe?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return st}function p(ne,Re){var Xe=ne==="time"?8:10;return Math.max(Xe,Re.length)+2}var v=null,_=new Set;function E(ne){return!v&&typeof window!="undefined"&&window.addEventListener&&(v=function(Xe){Object(C.a)(_).forEach(function(Le){Le(Xe)})},window.addEventListener("mousedown",v)),_.add(ne),function(){_.delete(ne),_.size===0&&(window.removeEventListener("mousedown",v),v=null)}}var g=function(Re){return Re==="month"||Re==="date"?"year":Re},j=function(Re){return Re==="date"?"month":Re},U=function(Re){return Re==="month"||Re==="date"?"quarter":Re},S=function(Re){return Re==="date"?"week":Re},z={year:g,month:j,quarter:U,week:S,time:null,date:null};function H(ne,Re){return ne.some(function(Xe){return Xe&&Xe.contains(Re)})}function M(ne){var Re=ne.prefixCls,Xe=ne.units,Le=ne.onSelect,st=ne.value,et=ne.active,pt=ne.hideDisabledOptions,mt="".concat(Re,"-cell"),it=m.useContext(d),Mt=it.open,Xt=m.useRef(null),Vt=m.useRef(new Map);return m.useLayoutEffect(function(){var St=Vt.current.get(st);St&&Mt!==!1&&w(Xt.current,St.offsetTop,120)},[st]),m.useLayoutEffect(function(){if(Mt){var St=Vt.current.get(st);St&&w(Xt.current,St.offsetTop,0)}},[Mt]),m.createElement("ul",{className:b()("".concat(Re,"-column"),Object(T.a)({},"".concat(Re,"-column-active"),et)),ref:Xt,style:{position:"relative"}},Xe.map(function(St){var nn;return pt&&St.disabled?null:m.createElement("li",{key:St.value,ref:function(en){Vt.current.set(St.value,en)},className:b()(mt,(nn={},Object(T.a)(nn,"".concat(mt,"-disabled"),St.disabled),Object(T.a)(nn,"".concat(mt,"-selected"),st===St.value),nn)),onClick:function(){if(St.disabled)return;Le(St.value)}},m.createElement("div",{className:"".concat(mt,"-inner")},St.label))}))}var V=M;function K(ne,Re){for(var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",Le=String(ne);Le.length<Re;)Le="".concat(Xe).concat(ne);return Le}var $=function(){for(var Re=arguments.length,Xe=new Array(Re),Le=0;Le<Re;Le++)Xe[Le]=arguments[Le];return Xe};function Z(ne){return ne==null?[]:Array.isArray(ne)?ne:[ne]}function me(ne){var Re={};return Object.keys(ne).forEach(function(Xe){(Xe.substr(0,5)==="data-"||Xe.substr(0,5)==="aria-"||Xe==="role"||Xe==="name")&&Xe.substr(0,7)!=="data-__"&&(Re[Xe]=ne[Xe])}),Re}function oe(ne,Re){return ne?ne[Re]:null}function fe(ne,Re,Xe){var Le=[oe(ne,0),oe(ne,1)];return Le[Xe]=typeof Re=="function"?Re(Le[Xe]):Re,!Le[0]&&!Le[1]?null:Le}function ye(ne,Re,Xe,Le,st){var et=ne.setHour(Re,Xe);return et=ne.setMinute(et,Le),et=ne.setSecond(et,st),et}function Ie(ne,Re,Xe,Le,st,et){var pt=Math.floor(ne/Le)*Le;if(pt<ne)return[pt,60-st,60-et];var mt=Math.floor(Re/st)*st;if(mt<Re)return[pt,mt,60-et];var it=Math.floor(Xe/et)*et;return[pt,mt,it]}function ve(ne,Re){if(ne.length!==Re.length)return!0;for(var Xe=0;Xe<ne.length;Xe+=1)if(ne[Xe].disabled!==Re[Xe].disabled)return!0;return!1}function de(ne,Re,Xe,Le){for(var st=[],et=ne;et<=Re;et+=Xe)st.push({label:K(et,2),value:et,disabled:(Le||[]).includes(et)});return st}function Je(ne){var Re=ne.generateConfig,Xe=ne.prefixCls,Le=ne.operationRef,st=ne.activeColumnIndex,et=ne.value,pt=ne.showHour,mt=ne.showMinute,it=ne.showSecond,Mt=ne.use12Hours,Xt=ne.hourStep,Vt=Xt===void 0?1:Xt,St=ne.minuteStep,nn=St===void 0?1:St,Qe=ne.secondStep,en=Qe===void 0?1:Qe,Bt=ne.disabledHours,bn=ne.disabledMinutes,On=ne.disabledSeconds,Gt=ne.hideDisabledOptions,cn=ne.onSelect,Ht=[],Sn="".concat(Xe,"-content"),wn="".concat(Xe,"-time-panel"),wt,It=et?Re.getHour(et):-1,Pt=et?Re.getMinute(et):-1,Ct=et?Re.getSecond(et):-1,vt=function(Yn,Jn,wr,Wr){var Zr=et||Re.getNow(),ua=Math.max(0,Jn),xa=Math.max(0,wr),ma=Math.max(0,Wr);return Zr=ye(Re,Zr,!Mt||!Yn?ua:ua+12,xa,ma),Zr},Dn=de(0,23,Vt,Bt&&Bt()),$t=Object(A.a)(function(){return Dn},Dn,ve);Mt&&(wt=It>=12,It%=12);var Cn=m.useMemo(function(){if(!Mt)return[!1,!1];var Hn=[!0,!0];return $t.forEach(function(Yn){var Jn=Yn.disabled,wr=Yn.value;if(Jn)return;wr>=12?Hn[1]=!1:Hn[0]=!1}),Hn},[Mt,$t]),pn=Object(P.a)(Cn,2),Yt=pn[0],Tn=pn[1],zn=m.useMemo(function(){return Mt?$t.filter(wt?function(Hn){return Hn.value>=12}:function(Hn){return Hn.value<12}).map(function(Hn){var Yn=Hn.value%12,Jn=Yn===0?"12":K(Yn,2);return Object(R.a)(Object(R.a)({},Hn),{},{label:Jn,value:Yn})}):$t},[Mt,$t]),fr=de(0,59,nn,bn&&bn(It)),Gn=de(0,59,en,On&&On(It,Pt));Le.current={onUpDown:function(Yn){var Jn=Ht[st];if(Jn)for(var wr=Jn.units.findIndex(function(xa){return xa.value===Jn.value}),Wr=Jn.units.length,Zr=1;Zr<Wr;Zr+=1){var ua=Jn.units[(wr+Yn*Zr+Wr)%Wr];if(ua.disabled!==!0){Jn.onSelect(ua.value);break}}}};function Lr(Hn,Yn,Jn,wr,Wr){Hn!==!1&&Ht.push({node:m.cloneElement(Yn,{prefixCls:wn,value:Jn,active:st===Ht.length,onSelect:Wr,units:wr,hideDisabledOptions:Gt}),onSelect:Wr,value:Jn,units:wr})}Lr(pt,m.createElement(V,{key:"hour"}),It,zn,function(Hn){cn(vt(wt,Hn,Pt,Ct),"mouse")}),Lr(mt,m.createElement(V,{key:"minute"}),Pt,fr,function(Hn){cn(vt(wt,It,Hn,Ct),"mouse")}),Lr(it,m.createElement(V,{key:"second"}),Ct,Gn,function(Hn){cn(vt(wt,It,Pt,Hn),"mouse")});var Gr=-1;return typeof wt=="boolean"&&(Gr=wt?1:0),Lr(Mt===!0,m.createElement(V,{key:"12hours"}),Gr,[{label:"AM",value:0,disabled:Yt},{label:"PM",value:1,disabled:Tn}],function(Hn){cn(vt(!!Hn,It,Pt,Ct),"mouse")}),m.createElement("div",{className:Sn},Ht.map(function(Hn){var Yn=Hn.node;return Yn}))}var Rt=Je,Ee=function(Re){return Re.filter(function(Xe){return Xe!==!1}).length};function Me(ne){var Re=ne.generateConfig,Xe=ne.format,Le=Xe===void 0?"HH:mm:ss":Xe,st=ne.prefixCls,et=ne.active,pt=ne.operationRef,mt=ne.showHour,it=ne.showMinute,Mt=ne.showSecond,Xt=ne.use12Hours,Vt=Xt===void 0?!1:Xt,St=ne.onSelect,nn=ne.value,Qe="".concat(st,"-time-panel"),en=m.useRef(),Bt=m.useState(-1),bn=Object(P.a)(Bt,2),On=bn[0],Gt=bn[1],cn=Ee([mt,it,Mt,Vt]);return pt.current={onKeyDown:function(Sn){return y(Sn,{onLeftRight:function(wt){Gt((On+wt+cn)%cn)},onUpDown:function(wt){On===-1?Gt(0):en.current&&en.current.onUpDown(wt)},onEnter:function(){St(nn||Re.getNow(),"key"),Gt(-1)}})},onBlur:function(){Gt(-1)}},m.createElement("div",{className:b()(Qe,Object(T.a)({},"".concat(Qe,"-active"),et))},m.createElement(x,Object.assign({},ne,{format:Le,prefixCls:st})),m.createElement(Rt,Object.assign({},ne,{prefixCls:st,activeColumnIndex:On,operationRef:en})))}var rt=Me,He=7;function ke(ne,Re){return!ne&&!Re?!0:!ne||!Re?!1:void 0}function ht(ne,Re,Xe){var Le=ke(Re,Xe);if(typeof Le=="boolean")return Le;var st=Math.floor(ne.getYear(Re)/10),et=Math.floor(ne.getYear(Xe)/10);return st===et}function ie(ne,Re,Xe){var Le=ke(Re,Xe);return typeof Le=="boolean"?Le:ne.getYear(Re)===ne.getYear(Xe)}function xe(ne,Re){var Xe=Math.floor(ne.getMonth(Re)/3);return Xe+1}function we(ne,Re,Xe){var Le=ke(Re,Xe);return typeof Le=="boolean"?Le:ie(ne,Re,Xe)&&xe(ne,Re)===xe(ne,Xe)}function $e(ne,Re,Xe){var Le=ke(Re,Xe);return typeof Le=="boolean"?Le:ie(ne,Re,Xe)&&ne.getMonth(Re)===ne.getMonth(Xe)}function ct(ne,Re,Xe){var Le=ke(Re,Xe);return typeof Le=="boolean"?Le:ne.getYear(Re)===ne.getYear(Xe)&&ne.getMonth(Re)===ne.getMonth(Xe)&&ne.getDate(Re)===ne.getDate(Xe)}function yt(ne,Re,Xe){var Le=ke(Re,Xe);return typeof Le=="boolean"?Le:ne.getHour(Re)===ne.getHour(Xe)&&ne.getMinute(Re)===ne.getMinute(Xe)&&ne.getSecond(Re)===ne.getSecond(Xe)}function Ut(ne,Re,Xe,Le){var st=ke(Xe,Le);return typeof st=="boolean"?st:ne.locale.getWeek(Re,Xe)===ne.locale.getWeek(Re,Le)}function We(ne,Re,Xe){return ct(ne,Re,Xe)&&yt(ne,Re,Xe)}function kt(ne,Re,Xe,Le){return!Re||!Xe||!Le?!1:!ct(ne,Re,Le)&&!ct(ne,Xe,Le)&&ne.isAfter(Le,Re)&&ne.isAfter(Xe,Le)}function qt(ne,Re,Xe){var Le=Re.locale.getWeekFirstDay(ne),st=Re.setDate(Xe,1),et=Re.getWeekDay(st),pt=Re.addDate(st,Le-et);return Re.getMonth(pt)===Re.getMonth(Xe)&&Re.getDate(pt)>1&&(pt=Re.addDate(pt,-7)),pt}function Pe(ne,Re,Xe){var Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(Re){case"year":return Xe.addYear(ne,Le*10);case"quarter":case"month":return Xe.addYear(ne,Le);default:return Xe.addMonth(ne,Le)}}var Ae=m.createContext({}),ut=Ae;function Et(ne){var Re=ne.cellPrefixCls,Xe=ne.generateConfig,Le=ne.rangedValue,st=ne.hoverRangedValue,et=ne.isInView,pt=ne.isSameCell,mt=ne.offsetCell,it=ne.today,Mt=ne.value;function Xt(Vt){var St,nn=mt(Vt,-1),Qe=mt(Vt,1),en=oe(Le,0),Bt=oe(Le,1),bn=oe(st,0),On=oe(st,1),Gt=kt(Xe,bn,On,Vt);function cn(Pt){return pt(en,Pt)}function Ht(Pt){return pt(Bt,Pt)}var Sn=pt(bn,Vt),wn=pt(On,Vt),wt=(Gt||wn)&&(!et(nn)||Ht(nn)),It=(Gt||Sn)&&(!et(Qe)||cn(Qe));return St={},Object(T.a)(St,"".concat(Re,"-in-view"),et(Vt)),Object(T.a)(St,"".concat(Re,"-in-range"),kt(Xe,en,Bt,Vt)),Object(T.a)(St,"".concat(Re,"-range-start"),cn(Vt)),Object(T.a)(St,"".concat(Re,"-range-end"),Ht(Vt)),Object(T.a)(St,"".concat(Re,"-range-start-single"),cn(Vt)&&!Bt),Object(T.a)(St,"".concat(Re,"-range-end-single"),Ht(Vt)&&!en),Object(T.a)(St,"".concat(Re,"-range-start-near-hover"),cn(Vt)&&(pt(nn,bn)||kt(Xe,bn,On,nn))),Object(T.a)(St,"".concat(Re,"-range-end-near-hover"),Ht(Vt)&&(pt(Qe,On)||kt(Xe,bn,On,Qe))),Object(T.a)(St,"".concat(Re,"-range-hover"),Gt),Object(T.a)(St,"".concat(Re,"-range-hover-start"),Sn),Object(T.a)(St,"".concat(Re,"-range-hover-end"),wn),Object(T.a)(St,"".concat(Re,"-range-hover-edge-start"),wt),Object(T.a)(St,"".concat(Re,"-range-hover-edge-end"),It),Object(T.a)(St,"".concat(Re,"-range-hover-edge-start-near-range"),wt&&pt(nn,Bt)),Object(T.a)(St,"".concat(Re,"-range-hover-edge-end-near-range"),It&&pt(Qe,en)),Object(T.a)(St,"".concat(Re,"-today"),pt(it,Vt)),Object(T.a)(St,"".concat(Re,"-selected"),pt(Mt,Vt)),St}return Xt}function Ze(ne){for(var Re=ne.prefixCls,Xe=ne.disabledDate,Le=ne.onSelect,st=ne.rowNum,et=ne.colNum,pt=ne.prefixColumn,mt=ne.rowClassName,it=ne.baseDate,Mt=ne.getCellClassName,Xt=ne.getCellText,Vt=ne.getCellNode,St=ne.getCellDate,nn=ne.titleCell,Qe=ne.headerCells,en=m.useContext(d),Bt=en.onDateMouseEnter,bn=en.onDateMouseLeave,On="".concat(Re,"-cell"),Gt=[],cn=0;cn<st;cn+=1){for(var Ht=[],Sn=void 0,wn=function(Pt){var Ct=cn*et+Pt,vt=St(it,Ct),Dn=Xe&&Xe(vt);Pt===0&&(Sn=vt,pt&&Ht.push(pt(Sn))),Ht.push(m.createElement("td",{key:Pt,title:nn&&nn(vt),className:b()(On,Object(R.a)(Object(T.a)({},"".concat(On,"-disabled"),Dn),Mt(vt))),onClick:function(){Dn||Le(vt)},onMouseEnter:function(){!Dn&&Bt&&Bt(vt)},onMouseLeave:function(){!Dn&&bn&&bn(vt)}},Vt?Vt(vt):m.createElement("div",{className:"".concat(On,"-inner")},Xt(vt))))},wt=0;wt<et;wt+=1)wn(wt);Gt.push(m.createElement("tr",{key:cn,className:mt&&mt(Sn)},Ht))}return m.createElement("div",{className:"".concat(Re,"-body")},m.createElement("table",{className:"".concat(Re,"-content")},Qe&&m.createElement("thead",null,m.createElement("tr",null,Qe)),m.createElement("tbody",null,Gt)))}function dt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.prefixColumn,st=ne.locale,et=ne.rowCount,pt=ne.viewDate,mt=ne.value,it=ne.dateRender,Mt=m.useContext(ut),Xt=Mt.rangedValue,Vt=Mt.hoverRangedValue,St=qt(st.locale,Xe,pt),nn="".concat(Re,"-cell"),Qe=Xe.locale.getWeekFirstDay(st.locale),en=Xe.getNow(),Bt=[],bn=st.shortWeekDays||(Xe.locale.getShortWeekDays?Xe.locale.getShortWeekDays(st.locale):[]);Le&&Bt.push(m.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var On=0;On<He;On+=1)Bt.push(m.createElement("th",{key:On},bn[(On+Qe)%He]));var Gt=Et({cellPrefixCls:nn,today:en,value:mt,generateConfig:Xe,rangedValue:Le?null:Xt,hoverRangedValue:Le?null:Vt,isSameCell:function(Sn,wn){return ct(Xe,Sn,wn)},isInView:function(Sn){return $e(Xe,Sn,pt)},offsetCell:function(Sn,wn){return Xe.addDate(Sn,wn)}}),cn=it?function(Ht){return it(Ht,en)}:void 0;return m.createElement(Ze,Object.assign({},ne,{rowNum:et,colNum:He,baseDate:St,getCellNode:cn,getCellText:Xe.getDate,getCellClassName:Gt,getCellDate:Xe.addDate,titleCell:function(Sn){return Xe.locale.format(st.locale,Sn,"YYYY-MM-DD")},headerCells:Bt}))}var Ne=dt;function Te(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.locale,st=ne.viewDate,et=ne.onNextMonth,pt=ne.onPrevMonth,mt=ne.onNextYear,it=ne.onPrevYear,Mt=ne.onYearClick,Xt=ne.onMonthClick,Vt=m.useContext(d),St=Vt.hideHeader;if(St)return null;var nn="".concat(Re,"-header"),Qe=Le.shortMonths||(Xe.locale.getShortMonths?Xe.locale.getShortMonths(Le.locale):[]),en=Xe.getMonth(st),Bt=m.createElement("button",{type:"button",key:"year",onClick:Mt,tabIndex:-1,className:"".concat(Re,"-year-btn")},Xe.locale.format(Le.locale,st,Le.yearFormat)),bn=m.createElement("button",{type:"button",key:"month",onClick:Xt,tabIndex:-1,className:"".concat(Re,"-month-btn")},Le.monthFormat?Xe.locale.format(Le.locale,st,Le.monthFormat):Qe[en]),On=Le.monthBeforeYear?[bn,Bt]:[Bt,bn];return m.createElement(l,Object.assign({},ne,{prefixCls:nn,onSuperPrev:it,onPrev:pt,onNext:et,onSuperNext:mt}),On)}var Oe=Te,ae=6;function le(ne){var Re=ne.prefixCls,Xe=ne.panelName,Le=Xe===void 0?"date":Xe,st=ne.keyboardConfig,et=ne.active,pt=ne.operationRef,mt=ne.generateConfig,it=ne.value,Mt=ne.viewDate,Xt=ne.onViewDateChange,Vt=ne.onPanelChange,St=ne.onSelect,nn="".concat(Re,"-").concat(Le,"-panel");pt.current={onKeyDown:function(bn){return y(bn,Object(R.a)({onLeftRight:function(Gt){St(mt.addDate(it||Mt,Gt),"key")},onCtrlLeftRight:function(Gt){St(mt.addYear(it||Mt,Gt),"key")},onUpDown:function(Gt){St(mt.addDate(it||Mt,Gt*He),"key")},onPageUpDown:function(Gt){St(mt.addMonth(it||Mt,Gt),"key")}},st))}};var Qe=function(bn){var On=mt.addYear(Mt,bn);Xt(On),Vt(null,On)},en=function(bn){var On=mt.addMonth(Mt,bn);Xt(On),Vt(null,On)};return m.createElement("div",{className:b()(nn,Object(T.a)({},"".concat(nn,"-active"),et))},m.createElement(Oe,Object.assign({},ne,{prefixCls:Re,value:it,viewDate:Mt,onPrevYear:function(){Qe(-1)},onNextYear:function(){Qe(1)},onPrevMonth:function(){en(-1)},onNextMonth:function(){en(1)},onMonthClick:function(){Vt("month",Mt)},onYearClick:function(){Vt("year",Mt)}})),m.createElement(Ne,Object.assign({},ne,{onSelect:function(bn){return St(bn,"mouse")},prefixCls:Re,value:it,viewDate:Mt,rowCount:ae})))}var he=le;function _e(ne,Re,Xe){if(!Xe)return Re;var Le=Re;return Le=ne.setHour(Le,ne.getHour(Xe)),Le=ne.setMinute(Le,ne.getMinute(Xe)),Le=ne.setSecond(Le,ne.getSecond(Xe)),Le}var Se=$("date","time");function ze(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Le=ne.generateConfig,st=ne.value,et=ne.defaultValue,pt=ne.disabledTime,mt=ne.showTime,it=ne.onSelect,Mt="".concat(Re,"-datetime-panel"),Xt=m.useState(null),Vt=Object(P.a)(Xt,2),St=Vt[0],nn=Vt[1],Qe=m.useRef({}),en=m.useRef({}),Bt=Object(f.a)(mt)==="object"?Object(R.a)({},mt):{};function bn(Ht){var Sn=Se.indexOf(St)+Ht,wn=Se[Sn]||null;return wn}var On=function(Sn){en.current.onBlur&&en.current.onBlur(Sn),nn(null)};Xe.current={onKeyDown:function(Sn){if(Sn.which===a.a.TAB){var wn=bn(Sn.shiftKey?-1:1);return nn(wn),wn&&Sn.preventDefault(),!0}if(St){var wt=St==="date"?Qe:en;return wt.current&&wt.current.onKeyDown&&wt.current.onKeyDown(Sn),!0}return[a.a.LEFT,a.a.RIGHT,a.a.UP,a.a.DOWN].includes(Sn.which)?(nn("date"),!0):!1},onBlur:On,onClose:On};var Gt=function(Sn,wn){var wt=Sn;wn==="date"&&!st&&Bt.defaultValue?(wt=Le.setHour(wt,Le.getHour(Bt.defaultValue)),wt=Le.setMinute(wt,Le.getMinute(Bt.defaultValue)),wt=Le.setSecond(wt,Le.getSecond(Bt.defaultValue))):wn==="time"&&!st&&et&&(wt=Le.setYear(wt,Le.getYear(et)),wt=Le.setMonth(wt,Le.getMonth(et)),wt=Le.setDate(wt,Le.getDate(et))),it&&it(wt,"mouse")},cn=pt?pt(st||null):{};return m.createElement("div",{className:b()(Mt,Object(T.a)({},"".concat(Mt,"-active"),St))},m.createElement(he,Object.assign({},ne,{operationRef:Qe,active:St==="date",onSelect:function(Sn){Gt(_e(Le,Sn,mt&&Object(f.a)(mt)==="object"?mt.defaultValue:null),"date")}})),m.createElement(rt,Object.assign({},ne,{format:void 0},Bt,cn,{defaultValue:void 0,operationRef:en,active:St==="time",onSelect:function(Sn){Gt(Sn,"time")}})))}var xt=ze;function Qt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.locale,st=ne.value,et="".concat(Re,"-cell"),pt=function(Xt){return m.createElement("td",{key:"week",className:b()(et,"".concat(et,"-week"))},Xe.locale.getWeek(Le.locale,Xt))},mt="".concat(Re,"-week-panel-row"),it=function(Xt){return b()(mt,Object(T.a)({},"".concat(mt,"-selected"),Ut(Xe,Le.locale,st,Xt)))};return m.createElement(he,Object.assign({},ne,{panelName:"week",prefixColumn:pt,rowClassName:it,keyboardConfig:{onLeftRight:null}}))}var sn=Qt;function gt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.locale,st=ne.viewDate,et=ne.onNextYear,pt=ne.onPrevYear,mt=ne.onYearClick,it=m.useContext(d),Mt=it.hideHeader;if(Mt)return null;var Xt="".concat(Re,"-header");return m.createElement(l,Object.assign({},ne,{prefixCls:Xt,onSuperPrev:pt,onSuperNext:et}),m.createElement("button",{type:"button",onClick:mt,className:"".concat(Re,"-year-btn")},Xe.locale.format(Le.locale,st,Le.yearFormat)))}var zt=gt,Ot=3,At=4;function ft(ne){var Re=ne.prefixCls,Xe=ne.locale,Le=ne.value,st=ne.viewDate,et=ne.generateConfig,pt=ne.monthCellRender,mt=m.useContext(ut),it=mt.rangedValue,Mt=mt.hoverRangedValue,Xt="".concat(Re,"-cell"),Vt=Et({cellPrefixCls:Xt,value:Le,generateConfig:et,rangedValue:it,hoverRangedValue:Mt,isSameCell:function(Bt,bn){return $e(et,Bt,bn)},isInView:function(){return!0},offsetCell:function(Bt,bn){return et.addMonth(Bt,bn)}}),St=Xe.shortMonths||(et.locale.getShortMonths?et.locale.getShortMonths(Xe.locale):[]),nn=et.setMonth(st,0),Qe=pt?function(en){return pt(en,Xe)}:void 0;return m.createElement(Ze,Object.assign({},ne,{rowNum:At,colNum:Ot,baseDate:nn,getCellNode:Qe,getCellText:function(Bt){return Xe.monthFormat?et.locale.format(Xe.locale,Bt,Xe.monthFormat):St[et.getMonth(Bt)]},getCellClassName:Vt,getCellDate:et.addMonth,titleCell:function(Bt){return et.locale.format(Xe.locale,Bt,"YYYY-MM")}}))}var be=ft;function Fe(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Le=ne.onViewDateChange,st=ne.generateConfig,et=ne.value,pt=ne.viewDate,mt=ne.onPanelChange,it=ne.onSelect,Mt="".concat(Re,"-month-panel");Xe.current={onKeyDown:function(St){return y(St,{onLeftRight:function(Qe){it(st.addMonth(et||pt,Qe),"key")},onCtrlLeftRight:function(Qe){it(st.addYear(et||pt,Qe),"key")},onUpDown:function(Qe){it(st.addMonth(et||pt,Qe*Ot),"key")},onEnter:function(){mt("date",et||pt)}})}};var Xt=function(St){var nn=st.addYear(pt,St);Le(nn),mt(null,nn)};return m.createElement("div",{className:Mt},m.createElement(zt,Object.assign({},ne,{prefixCls:Re,onPrevYear:function(){Xt(-1)},onNextYear:function(){Xt(1)},onYearClick:function(){mt("year",pt)}})),m.createElement(be,Object.assign({},ne,{prefixCls:Re,onSelect:function(St){it(St,"mouse"),mt("date",St)}})))}var Nt=Fe;function bt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.locale,st=ne.viewDate,et=ne.onNextYear,pt=ne.onPrevYear,mt=ne.onYearClick,it=m.useContext(d),Mt=it.hideHeader;if(Mt)return null;var Xt="".concat(Re,"-header");return m.createElement(l,Object.assign({},ne,{prefixCls:Xt,onSuperPrev:pt,onSuperNext:et}),m.createElement("button",{type:"button",onClick:mt,className:"".concat(Re,"-year-btn")},Xe.locale.format(Le.locale,st,Le.yearFormat)))}var Kt=bt,Zt=4,Ge=1;function lt(ne){var Re=ne.prefixCls,Xe=ne.locale,Le=ne.value,st=ne.viewDate,et=ne.generateConfig,pt=m.useContext(ut),mt=pt.rangedValue,it=pt.hoverRangedValue,Mt="".concat(Re,"-cell"),Xt=Et({cellPrefixCls:Mt,value:Le,generateConfig:et,rangedValue:mt,hoverRangedValue:it,isSameCell:function(nn,Qe){return we(et,nn,Qe)},isInView:function(){return!0},offsetCell:function(nn,Qe){return et.addMonth(nn,Qe*3)}}),Vt=et.setDate(et.setMonth(st,0),1);return m.createElement(Ze,Object.assign({},ne,{rowNum:Ge,colNum:Zt,baseDate:Vt,getCellText:function(nn){return et.locale.format(Xe.locale,nn,Xe.quarterFormat||"[Q]Q")},getCellClassName:Xt,getCellDate:function(nn,Qe){return et.addMonth(nn,Qe*3)},titleCell:function(nn){return et.locale.format(Xe.locale,nn,"YYYY-[Q]Q")}}))}var Lt=lt;function Wt(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Le=ne.onViewDateChange,st=ne.generateConfig,et=ne.value,pt=ne.viewDate,mt=ne.onPanelChange,it=ne.onSelect,Mt="".concat(Re,"-quarter-panel");Xe.current={onKeyDown:function(St){return y(St,{onLeftRight:function(Qe){it(st.addMonth(et||pt,Qe*3),"key")},onCtrlLeftRight:function(Qe){it(st.addYear(et||pt,Qe),"key")},onUpDown:function(Qe){it(st.addYear(et||pt,Qe),"key")}})}};var Xt=function(St){var nn=st.addYear(pt,St);Le(nn),mt(null,nn)};return m.createElement("div",{className:Mt},m.createElement(Kt,Object.assign({},ne,{prefixCls:Re,onPrevYear:function(){Xt(-1)},onNextYear:function(){Xt(1)},onYearClick:function(){mt("year",pt)}})),m.createElement(Lt,Object.assign({},ne,{prefixCls:Re,onSelect:function(St){it(St,"mouse")}})))}var ln=Wt;function gn(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.viewDate,st=ne.onPrevDecade,et=ne.onNextDecade,pt=ne.onDecadeClick,mt=m.useContext(d),it=mt.hideHeader;if(it)return null;var Mt="".concat(Re,"-header"),Xt=Xe.getYear(Le),Vt=Math.floor(Xt/rr)*rr,St=Vt+rr-1;return m.createElement(l,Object.assign({},ne,{prefixCls:Mt,onSuperPrev:st,onSuperNext:et}),m.createElement("button",{type:"button",onClick:pt,className:"".concat(Re,"-decade-btn")},Vt,"-",St))}var tr=gn,Wn=3,En=4;function xr(ne){var Re=ne.prefixCls,Xe=ne.value,Le=ne.viewDate,st=ne.locale,et=ne.generateConfig,pt=m.useContext(ut),mt=pt.rangedValue,it=pt.hoverRangedValue,Mt="".concat(Re,"-cell"),Xt=et.getYear(Le),Vt=Math.floor(Xt/rr)*rr,St=Vt+rr-1,nn=et.setYear(Le,Vt-Math.ceil((Wn*En-rr)/2)),Qe=function(bn){var On=et.getYear(bn);return Vt<=On&&On<=St},en=Et({cellPrefixCls:Mt,value:Xe,generateConfig:et,rangedValue:mt,hoverRangedValue:it,isSameCell:function(bn,On){return ie(et,bn,On)},isInView:Qe,offsetCell:function(bn,On){return et.addYear(bn,On)}});return m.createElement(Ze,Object.assign({},ne,{rowNum:En,colNum:Wn,baseDate:nn,getCellText:et.getYear,getCellClassName:en,getCellDate:et.addYear,titleCell:function(bn){return et.locale.format(st.locale,bn,"YYYY")}}))}var Er=xr,rr=10;function ur(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Le=ne.onViewDateChange,st=ne.generateConfig,et=ne.value,pt=ne.viewDate,mt=ne.sourceMode,it=ne.onSelect,Mt=ne.onPanelChange,Xt="".concat(Re,"-year-panel");Xe.current={onKeyDown:function(nn){return y(nn,{onLeftRight:function(en){it(st.addYear(et||pt,en),"key")},onCtrlLeftRight:function(en){it(st.addYear(et||pt,en*rr),"key")},onUpDown:function(en){it(st.addYear(et||pt,en*Wn),"key")},onEnter:function(){Mt(mt==="date"?"date":"month",et||pt)}})}};var Vt=function(nn){var Qe=st.addYear(pt,nn*10);Le(Qe),Mt(null,Qe)};return m.createElement("div",{className:Xt},m.createElement(tr,Object.assign({},ne,{prefixCls:Re,onPrevDecade:function(){Vt(-1)},onNextDecade:function(){Vt(1)},onDecadeClick:function(){Mt("decade",pt)}})),m.createElement(Er,Object.assign({},ne,{prefixCls:Re,onSelect:function(nn){Mt(mt==="date"?"date":"month",nn),it(nn,"mouse")}})))}var Rr=ur;function Kr(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Le=ne.viewDate,st=ne.onPrevDecades,et=ne.onNextDecades,pt=m.useContext(d),mt=pt.hideHeader;if(mt)return null;var it="".concat(Re,"-header"),Mt=Xe.getYear(Le),Xt=Math.floor(Mt/na)*na,Vt=Xt+na-1;return m.createElement(l,Object.assign({},ne,{prefixCls:it,onSuperPrev:st,onSuperNext:et}),Xt,"-",Vt)}var ra=Kr,fn=3,or=4;function sa(ne){var Re=Jr-1,Xe=ne.prefixCls,Le=ne.viewDate,st=ne.generateConfig,et=ne.disabledDate,pt="".concat(Xe,"-cell"),mt=st.getYear(Le),it=Math.floor(mt/Jr)*Jr,Mt=Math.floor(mt/na)*na,Xt=Mt+na-1,Vt=st.setYear(Le,Mt-Math.ceil((fn*or*Jr-na)/2)),St=function(Qe){var en,Bt=et&&et(Qe),bn=st.getYear(Qe),On=bn+Re;return en={},Object(T.a)(en,"".concat(pt,"-disabled"),Bt),Object(T.a)(en,"".concat(pt,"-in-view"),Mt<=bn&&On<=Xt),Object(T.a)(en,"".concat(pt,"-selected"),bn===it),en};return m.createElement(Ze,Object.assign({},ne,{rowNum:or,colNum:fn,baseDate:Vt,getCellText:function(Qe){var en=st.getYear(Qe);return"".concat(en,"-").concat(en+Re)},getCellClassName:St,getCellDate:function(Qe,en){return st.addYear(Qe,en*Jr)}}))}var ya=sa,Jr=10,na=Jr*10;function te(ne){var Re=ne.prefixCls,Xe=ne.onViewDateChange,Le=ne.generateConfig,st=ne.viewDate,et=ne.operationRef,pt=ne.onSelect,mt=ne.onPanelChange,it="".concat(Re,"-decade-panel");et.current={onKeyDown:function(St){return y(St,{onLeftRight:function(Qe){pt(Le.addYear(st,Qe*Jr),"key")},onCtrlLeftRight:function(Qe){pt(Le.addYear(st,Qe*na),"key")},onUpDown:function(Qe){pt(Le.addYear(st,Qe*Jr*fn),"key")},onEnter:function(){mt("year",st)}})}};var Mt=function(St){var nn=Le.addYear(st,St*na);Xe(nn),mt(null,nn)},Xt=function(St){pt(St,"mouse"),mt("year",St)};return m.createElement("div",{className:it},m.createElement(ra,Object.assign({},ne,{prefixCls:Re,onPrevDecades:function(){Mt(-1)},onNextDecades:function(){Mt(1)}})),m.createElement(ya,Object.assign({},ne,{prefixCls:Re,onSelect:Xt})))}var W=te;function G(ne,Re,Xe){return Xe?m.createElement("div",{className:"".concat(ne,"-footer-extra")},Xe(Re)):null}function Q(ne){var Re=ne.prefixCls,Xe=ne.rangeList,Le=Xe===void 0?[]:Xe,st=ne.components,et=st===void 0?{}:st,pt=ne.needConfirmButton,mt=ne.onNow,it=ne.onOk,Mt=ne.okDisabled,Xt=ne.showNow,Vt=ne.locale,St,nn;if(Le.length){var Qe=et.rangeItem||"span";St=m.createElement(m.Fragment,null,Le.map(function(Bt){var bn=Bt.label,On=Bt.onClick,Gt=Bt.onMouseEnter,cn=Bt.onMouseLeave;return m.createElement("li",{key:bn,className:"".concat(Re,"-preset")},m.createElement(Qe,{onClick:On,onMouseEnter:Gt,onMouseLeave:cn},bn))}))}if(pt){var en=et.button||"button";mt&&!St&&Xt!==!1&&(St=m.createElement("li",{className:"".concat(Re,"-now")},m.createElement("a",{className:"".concat(Re,"-now-btn"),onClick:mt},Vt.now))),nn=pt&&m.createElement("li",{className:"".concat(Re,"-ok")},m.createElement(en,{disabled:Mt,onClick:it},Vt.ok))}return!St&&!nn?null:m.createElement("ul",{className:"".concat(Re,"-ranges")},St,nn)}function ue(ne){var Re,Xe=ne.prefixCls,Le=Xe===void 0?"rc-picker":Xe,st=ne.className,et=ne.style,pt=ne.locale,mt=ne.generateConfig,it=ne.value,Mt=ne.defaultValue,Xt=ne.pickerValue,Vt=ne.defaultPickerValue,St=ne.disabledDate,nn=ne.mode,Qe=ne.picker,en=Qe===void 0?"date":Qe,Bt=ne.tabIndex,bn=Bt===void 0?0:Bt,On=ne.showNow,Gt=ne.showTime,cn=ne.showToday,Ht=ne.renderExtraFooter,Sn=ne.hideHeader,wn=ne.onSelect,wt=ne.onChange,It=ne.onPanelChange,Pt=ne.onMouseDown,Ct=ne.onPickerValueChange,vt=ne.onOk,Dn=ne.components,$t=ne.direction,Cn=ne.hourStep,pn=Cn===void 0?1:Cn,Yt=ne.minuteStep,Tn=Yt===void 0?1:Yt,zn=ne.secondStep,fr=zn===void 0?1:zn,Gn=en==="date"&&!!Gt||en==="time",Lr=24%pn===0,Gr=60%Tn===0,Hn=60%fr===0,Yn=m.useContext(d),Jn=Yn.operationRef,wr=Yn.panelRef,Wr=Yn.onSelect,Zr=Yn.hideRanges,ua=Yn.defaultOpenValue,xa=m.useContext(ut),ma=xa.inRange,Ya=xa.panelPosition,Oa=xa.rangedValue,Pa=xa.hoverRangedValue,ga=m.useRef({}),Na=m.useRef(!0),ai=Object(u.a)(null,{value:it,defaultValue:Mt,postState:function(mn){return!mn&&ua&&en==="time"?ua:mn}}),da=Object(P.a)(ai,2),ca=da[0],Ra=da[1],wa=Object(u.a)(null,{value:Xt,defaultValue:Vt||ca,postState:function(mn){return mn||mt.getNow()}}),De=Object(P.a)(wa,2),tt=De[0],at=De[1],je=function(mn){at(mn),Ct&&Ct(mn)},ce=function(mn){var Mn=z[en];return Mn?Mn(mn):mn},Ce=Object(u.a)(function(){return en==="time"?"time":ce("date")},{value:nn}),ge=Object(P.a)(Ce,2),Ue=ge[0],Ye=ge[1];m.useEffect(function(){Ye(en)},[en]);var ot=m.useState(function(){return Ue}),Ke=Object(P.a)(ot,2),_t=Ke[0],Ft=Ke[1],rn=function(mn,Mn){var vr=ce(mn||Ue);Ft(Ue),Ye(vr),It&&(Ue!==vr||We(mt,tt,tt))&&It(Mn,vr)},hn=function(mn,Mn){var vr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(Ue===en||vr)&&(Ra(mn),wn&&wn(mn),Wr&&Wr(mn,Mn),wt&&!We(mt,mn,ca)&&wt(mn))},Rn=function(mn){return ga.current&&ga.current.onKeyDown?([a.a.LEFT,a.a.RIGHT,a.a.UP,a.a.DOWN,a.a.PAGE_UP,a.a.PAGE_DOWN,a.a.ENTER].includes(mn.which)&&mn.preventDefault(),ga.current.onKeyDown(mn)):(Object(o.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)},Kn=function(mn){ga.current&&ga.current.onBlur&&ga.current.onBlur(mn)};Jn&&Ya!=="right"&&(Jn.current={onKeyDown:Rn,onClose:function(){ga.current&&ga.current.onClose&&ga.current.onClose()}}),m.useEffect(function(){it&&!Na.current&&at(it)},[it]),m.useEffect(function(){Na.current=!1},[]);var cr,on=Object(R.a)(Object(R.a)({},ne),{},{operationRef:ga,prefixCls:Le,viewDate:tt,value:ca,onViewDateChange:je,sourceMode:_t,onPanelChange:rn,disabledDate:Ue!=="decade"?St:void 0});delete on.onChange,delete on.onSelect;switch(Ue){case"decade":cr=m.createElement(W,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;case"year":cr=m.createElement(Rr,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;case"month":cr=m.createElement(Nt,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;case"quarter":cr=m.createElement(ln,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;case"week":cr=m.createElement(sn,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;case"time":delete on.showTime,cr=m.createElement(rt,Object.assign({},on,Object(f.a)(Gt)==="object"?Gt:null,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}));break;default:Gt?cr=m.createElement(xt,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}})):cr=m.createElement(he,Object.assign({},on,{onSelect:function(mn,Mn){je(mn),hn(mn,Mn)}}))}var jt,Jt,In=function(){var mn=mt.getNow(),Mn=Ie(mt.getHour(mn),mt.getMinute(mn),mt.getSecond(mn),Lr?pn:1,Gr?Tn:1,Hn?fr:1),vr=ye(mt,mn,Mn[0],Mn[1],Mn[2]);hn(vr,"submit")};Zr||(jt=G(Le,Ue,Ht),Jt=Q({prefixCls:Le,components:Dn,needConfirmButton:Gn,okDisabled:!ca||St&&St(ca),locale:pt,showNow:On,onNow:Gn&&In,onOk:function(){ca&&(hn(ca,"submit",!0),vt&&vt(ca))}}));var _n;if(cn&&Ue==="date"&&en==="date"&&!Gt){var yr=mt.getNow(),qn="".concat(Le,"-today-btn"),Cr=St&&St(yr);_n=m.createElement("a",{className:b()(qn,Cr&&"".concat(qn,"-disabled")),"aria-disabled":Cr,onClick:function(){Cr||hn(yr,"mouse",!0)}},pt.today)}return m.createElement(d.Provider,{value:Object(R.a)(Object(R.a)({},Yn),{},{hideHeader:"hideHeader"in ne?Sn:Yn.hideHeader,hidePrevBtn:ma&&Ya==="right",hideNextBtn:ma&&Ya==="left"})},m.createElement("div",{tabIndex:bn,className:b()("".concat(Le,"-panel"),st,(Re={},Object(T.a)(Re,"".concat(Le,"-panel-has-range"),Oa&&Oa[0]&&Oa[1]),Object(T.a)(Re,"".concat(Le,"-panel-has-range-hover"),Pa&&Pa[0]&&Pa[1]),Object(T.a)(Re,"".concat(Le,"-panel-rtl"),$t==="rtl"),Re)),style:et,onKeyDown:Rn,onBlur:Kn,onMouseDown:Pt,ref:wr},cr,jt||Jt||_n?m.createElement("div",{className:"".concat(Le,"-footer")},jt,Jt,_n):null))}var ee=ue,qe=L("uciX"),tn={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function An(ne){var Re,Xe=ne.prefixCls,Le=ne.popupElement,st=ne.popupStyle,et=ne.visible,pt=ne.dropdownClassName,mt=ne.dropdownAlign,it=ne.transitionName,Mt=ne.getPopupContainer,Xt=ne.children,Vt=ne.range,St=ne.popupPlacement,nn=ne.direction,Qe="".concat(Xe,"-dropdown"),en=function(){return St!==void 0?St:nn==="rtl"?"bottomRight":"bottomLeft"};return m.createElement(qe.a,{showAction:[],hideAction:[],popupPlacement:en(),builtinPlacements:tn,prefixCls:Qe,popupTransitionName:it,popup:Le,popupAlign:mt,popupVisible:et,popupClassName:b()(pt,(Re={},Object(T.a)(Re,"".concat(Qe,"-range"),Vt),Object(T.a)(Re,"".concat(Qe,"-rtl"),nn==="rtl"),Re)),popupStyle:st,getPopupContainer:Mt},Xt)}var Vn=An;function un(ne){var Re=ne.open,Xe=ne.value,Le=ne.isClickOutside,st=ne.triggerOpen,et=ne.forwardKeyDown,pt=ne.blurToCancel,mt=ne.onSubmit,it=ne.onCancel,Mt=ne.onFocus,Xt=ne.onBlur,Vt=Object(m.useState)(!1),St=Object(P.a)(Vt,2),nn=St[0],Qe=St[1],en=Object(m.useState)(!1),Bt=Object(P.a)(en,2),bn=Bt[0],On=Bt[1],Gt=Object(m.useRef)(!1),cn=Object(m.useRef)(!1),Ht={onMouseDown:function(){Qe(!0),st(!0)},onKeyDown:function(wn){switch(wn.which){case a.a.ENTER:{Re?mt()!==!1&&Qe(!0):st(!0),wn.preventDefault();return}case a.a.TAB:{nn&&Re&&!wn.shiftKey?(Qe(!1),wn.preventDefault()):!nn&&Re&&(!et(wn)&&wn.shiftKey&&(Qe(!0),wn.preventDefault()));return}case a.a.ESC:{Qe(!0),it();return}}!Re&&![a.a.SHIFT].includes(wn.which)?st(!0):nn||et(wn)},onFocus:function(wn){Qe(!0),On(!0),Mt&&Mt(wn)},onBlur:function(wn){if(Gt.current||!Le(document.activeElement)){Gt.current=!1;return}pt?setTimeout(function(){Le(document.activeElement)&&it()},0):Re&&(st(!1),cn.current&&mt()),On(!1),Xt&&Xt(wn)}};return Object(m.useEffect)(function(){cn.current=!1},[Re]),Object(m.useEffect)(function(){cn.current=!0},[Xe]),Object(m.useEffect)(function(){return E(function(Sn){var wn=Sn.target;Re&&(Le(wn)?bn||st(!1):(Gt.current=!0,requestAnimationFrame(function(){Gt.current=!1})))})}),[Ht,{focused:bn,typing:nn}]}function nr(ne){var Re=ne.valueTexts,Xe=ne.onTextChange,Le=m.useState(""),st=Object(P.a)(Le,2),et=st[0],pt=st[1],mt=m.useRef([]);mt.current=Re;function it(Xt){pt(Xt),Xe(Xt)}function Mt(){pt(mt.current[0])}return m.useEffect(function(){Re.every(function(Xt){return Xt!==et})&&Mt()},[Re.join("||")]),[et,it,Mt]}var vn=L("Gytx"),dn=L.n(vn);function xn(ne,Re){var Xe=Re.formatList,Le=Re.generateConfig,st=Re.locale;return Object(A.a)(function(){if(!ne)return[[""],""];for(var et="",pt=[],mt=0;mt<Xe.length;mt+=1){var it=Xe[mt],Mt=Le.locale.format(st.locale,ne,it);pt.push(Mt),mt===0&&(et=Mt)}return[pt,et]},[ne,Xe],function(et,pt){return et[0]!==pt[0]||!dn()(et[1],pt[1])})}function Nn(ne,Re){var Xe=Re.formatList,Le=Re.generateConfig,st=Re.locale,et=Object(m.useState)(null),pt=Object(P.a)(et,2),mt=pt[0],it=pt[1],Mt=Object(m.useRef)(null);function Xt(Bt){var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(Mt.current),bn){it(Bt);return}Mt.current=requestAnimationFrame(function(){it(Bt)})}var Vt=xn(mt,{formatList:Xe,generateConfig:Le,locale:st}),St=Object(P.a)(Vt,2),nn=St[1];function Qe(Bt){Xt(Bt)}function en(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Xt(null,Bt)}return Object(m.useEffect)(function(){en(!0)},[ne]),Object(m.useEffect)(function(){return function(){return cancelAnimationFrame(Mt.current)}},[]),[nn,Qe,en]}function dr(ne){var Re,Xe=ne.prefixCls,Le=Xe===void 0?"rc-picker":Xe,st=ne.id,et=ne.tabIndex,pt=ne.style,mt=ne.className,it=ne.dropdownClassName,Mt=ne.dropdownAlign,Xt=ne.popupStyle,Vt=ne.transitionName,St=ne.generateConfig,nn=ne.locale,Qe=ne.inputReadOnly,en=ne.allowClear,Bt=ne.autoFocus,bn=ne.showTime,On=ne.picker,Gt=On===void 0?"date":On,cn=ne.format,Ht=ne.use12Hours,Sn=ne.value,wn=ne.defaultValue,wt=ne.open,It=ne.defaultOpen,Pt=ne.defaultOpenValue,Ct=ne.suffixIcon,vt=ne.clearIcon,Dn=ne.disabled,$t=ne.disabledDate,Cn=ne.placeholder,pn=ne.getPopupContainer,Yt=ne.pickerRef,Tn=ne.panelRender,zn=ne.onChange,fr=ne.onOpenChange,Gn=ne.onFocus,Lr=ne.onBlur,Gr=ne.onMouseDown,Hn=ne.onMouseUp,Yn=ne.onMouseEnter,Jn=ne.onMouseLeave,wr=ne.onContextMenu,Wr=ne.onClick,Zr=ne.direction,ua=ne.autoComplete,xa=ua===void 0?"off":ua,ma=m.useRef(null),Ya=Gt==="date"&&!!bn||Gt==="time",Oa=Z(h(cn,Gt,bn,Ht)),Pa=m.useRef(null),ga=m.useRef(null),Na=Object(u.a)(null,{value:Sn,defaultValue:wn}),ai=Object(P.a)(Na,2),da=ai[0],ca=ai[1],Ra=m.useState(da),wa=Object(P.a)(Ra,2),De=wa[0],tt=wa[1],at=m.useRef(null),je=Object(u.a)(!1,{value:wt,defaultValue:It,postState:function(pr){return Dn?!1:pr},onChange:function(pr){fr&&fr(pr),!pr&&at.current&&at.current.onClose&&at.current.onClose()}}),ce=Object(P.a)(je,2),Ce=ce[0],ge=ce[1],Ue=xn(De,{formatList:Oa,generateConfig:St,locale:nn}),Ye=Object(P.a)(Ue,2),ot=Ye[0],Ke=Ye[1],_t=nr({valueTexts:ot,onTextChange:function(pr){var la=St.locale.parse(nn.locale,pr,Oa);la&&(!$t||!$t(la))&&tt(la)}}),Ft=Object(P.a)(_t,3),rn=Ft[0],hn=Ft[1],Rn=Ft[2],Kn=function(pr){tt(pr),ca(pr),zn&&!We(St,da,pr)&&zn(pr,pr?St.locale.format(nn.locale,pr,Oa[0]):"")},cr=function(pr){if(Dn&&pr)return;ge(pr)},on=function(pr){return Ce&&at.current&&at.current.onKeyDown?at.current.onKeyDown(pr):(Object(o.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},jt=function(){Hn&&Hn.apply(void 0,arguments),ma.current&&(ma.current.focus(),cr(!0))},Jt=un({blurToCancel:Ya,open:Ce,value:rn,triggerOpen:cr,forwardKeyDown:on,isClickOutside:function(pr){return!H([Pa.current,ga.current],pr)},onSubmit:function(){return $t&&$t(De)?!1:(Kn(De),cr(!1),Rn(),!0)},onCancel:function(){cr(!1),tt(da),Rn()},onFocus:Gn,onBlur:Lr}),In=Object(P.a)(Jt,2),_n=In[0],yr=In[1],qn=yr.focused,Cr=yr.typing;m.useEffect(function(){Ce||(tt(da),!ot.length||ot[0]===""?hn(""):Ke!==rn&&Rn())},[Ce,ot]),m.useEffect(function(){Ce||Rn()},[Gt]),m.useEffect(function(){tt(da)},[da]),Yt&&(Yt.current={focus:function(){ma.current&&ma.current.focus()},blur:function(){ma.current&&ma.current.blur()}});var ir=Object(R.a)(Object(R.a)({},ne),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),mn=m.createElement(ee,Object.assign({},ir,{generateConfig:St,className:b()(Object(T.a)({},"".concat(Le,"-panel-focused"),!Cr)),value:De,locale:nn,tabIndex:-1,onChange:tt,direction:Zr}));Tn&&(mn=Tn(mn));var Mn=m.createElement("div",{className:"".concat(Le,"-panel-container"),onMouseDown:function(pr){pr.preventDefault()}},mn),vr;Ct&&(vr=m.createElement("span",{className:"".concat(Le,"-suffix")},Ct));var Or;en&&da&&!Dn&&(Or=m.createElement("span",{onMouseDown:function(pr){pr.preventDefault(),pr.stopPropagation()},onMouseUp:function(pr){pr.preventDefault(),pr.stopPropagation(),Kn(null),cr(!1)},className:"".concat(Le,"-clear")},vt||m.createElement("span",{className:"".concat(Le,"-clear-btn")})));var Qn=function(pr,la){(la==="submit"||la!=="key"&&!Ya)&&(Kn(pr),cr(!1))},Pr=Zr==="rtl"?"bottomRight":"bottomLeft",$r=Nn(rn,{formatList:Oa,generateConfig:St,locale:nn}),Ir=Object(P.a)($r,3),Br=Ir[0],Ur=Ir[1],jr=Ir[2];return m.createElement(d.Provider,{value:{operationRef:at,hideHeader:Gt==="time",panelRef:Pa,onSelect:Qn,open:Ce,defaultOpenValue:Pt,onDateMouseEnter:Ur,onDateMouseLeave:jr}},m.createElement(Vn,{visible:Ce,popupElement:Mn,popupStyle:Xt,prefixCls:Le,dropdownClassName:it,dropdownAlign:Mt,getPopupContainer:pn,transitionName:Vt,popupPlacement:Pr,direction:Zr},m.createElement("div",{className:b()(Le,mt,(Re={},Object(T.a)(Re,"".concat(Le,"-disabled"),Dn),Object(T.a)(Re,"".concat(Le,"-focused"),qn),Object(T.a)(Re,"".concat(Le,"-rtl"),Zr==="rtl"),Re)),style:pt,onMouseDown:Gr,onMouseUp:jt,onMouseEnter:Yn,onMouseLeave:Jn,onContextMenu:wr,onClick:Wr},m.createElement("div",{className:b()("".concat(Le,"-input"),Object(T.a)({},"".concat(Le,"-input-placeholder"),!!Br)),ref:ga},m.createElement("input",Object.assign({id:st,tabIndex:et,disabled:Dn,readOnly:Qe||!Cr,value:Br||rn,onChange:function(pr){hn(pr.target.value)},autoFocus:Bt,placeholder:Cn,ref:ma,title:rn},_n,{size:p(Gt,Oa[0])},me(ne),{autoComplete:xa})),vr,Or))))}var $n=function(ne){Object(I.a)(Xe,ne);var Re=Object(F.a)(Xe);function Xe(){var Le;return Object(Y.a)(this,Xe),Le=Re.apply(this,arguments),Le.pickerRef=m.createRef(),Le.focus=function(){Le.pickerRef.current&&Le.pickerRef.current.focus()},Le.blur=function(){Le.pickerRef.current&&Le.pickerRef.current.blur()},Le}return Object(B.a)(Xe,[{key:"render",value:function(){return m.createElement(dr,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(m.Component),Zn=$n;function kn(ne,Re,Xe){var Le=ne.picker,st=ne.locale,et=ne.selectedValue,pt=ne.disabledDate,mt=ne.disabled,it=ne.generateConfig,Mt=oe(et,0),Xt=oe(et,1);function Vt(Bt){var bn=it.getYear(Bt),On=it.locale.getWeek(st.locale,Bt);return bn*100+On}function St(Bt){var bn=it.getYear(Bt),On=it.getMonth(Bt);return bn*100+On}function nn(Bt){var bn=it.getYear(Bt),On=xe(it,Bt);return bn*10+On}var Qe=m.useCallback(function(Bt){if(pt&&pt(Bt))return!0;if(mt[1]&&Xt)return!ct(it,Bt,Xt)&&it.isAfter(Bt,Xt);if(Re&&Xt)switch(Le){case"quarter":return nn(Bt)>nn(Xt);case"month":return St(Bt)>St(Xt);case"week":return Vt(Bt)>Vt(Xt);default:return!ct(it,Bt,Xt)&&it.isAfter(Bt,Xt)}return!1},[pt,mt[1],Xt,Re]),en=m.useCallback(function(Bt){if(pt&&pt(Bt))return!0;if(mt[0]&&Mt)return!ct(it,Bt,Xt)&&it.isAfter(Mt,Bt);if(Xe&&Mt)switch(Le){case"quarter":return nn(Bt)<nn(Mt);case"month":return St(Bt)<St(Mt);case"week":return Vt(Bt)<Vt(Mt);default:return!ct(it,Bt,Mt)&&it.isAfter(Mt,Bt)}return!1},[pt,mt[0],Mt,Xe]);return[Qe,en]}function gr(ne,Re,Xe,Le){var st=Pe(ne,Xe,Le,1);function et(pt){return pt(ne,Re)?"same":pt(st,Re)?"closing":"far"}switch(Xe){case"year":return et(function(pt,mt){return ht(Le,pt,mt)});case"quarter":case"month":return et(function(pt,mt){return ie(Le,pt,mt)});default:return et(function(pt,mt){return $e(Le,pt,mt)})}}function Bn(ne,Re,Xe,Le){var st=oe(ne,0),et=oe(ne,1);if(Re===0)return st;if(st&&et){var pt=gr(st,et,Xe,Le);switch(pt){case"same":return st;case"closing":return st;default:return Pe(et,Xe,Le,-1)}}return st}function ar(ne){var Re=ne.values,Xe=ne.picker,Le=ne.defaultDates,st=ne.generateConfig,et=m.useState(function(){return[oe(Le,0),oe(Le,1)]}),pt=Object(P.a)(et,2),mt=pt[0],it=pt[1],Mt=m.useState(null),Xt=Object(P.a)(Mt,2),Vt=Xt[0],St=Xt[1],nn=oe(Re,0),Qe=oe(Re,1);function en(bn){return mt[bn]?mt[bn]:oe(Vt,bn)||Bn(Re,bn,Xe,st)||nn||Qe||st.getNow()}function Bt(bn,On){if(bn){var Gt=fe(Vt,bn,On);it(fe(mt,null,On)||[null,null]);var cn=(On+1)%2;oe(Re,cn)||(Gt=fe(Gt,bn,cn)),St(Gt)}else(nn||Qe)&&St(null)}return[en,Bt]}function sr(ne,Re){return ne&&ne[0]&&ne[1]&&Re.isAfter(ne[0],ne[1])?[ne[1],ne[0]]:ne}function Pn(ne,Re,Xe,Le){return ne||Le&&Le[Re]?!0:!!Xe[(Re+1)%2]}function Tr(ne){var Re,Xe,Le,st=ne.prefixCls,et=st===void 0?"rc-picker":st,pt=ne.id,mt=ne.style,it=ne.className,Mt=ne.popupStyle,Xt=ne.dropdownClassName,Vt=ne.transitionName,St=ne.dropdownAlign,nn=ne.getPopupContainer,Qe=ne.generateConfig,en=ne.locale,Bt=ne.placeholder,bn=ne.autoFocus,On=ne.disabled,Gt=ne.format,cn=ne.picker,Ht=cn===void 0?"date":cn,Sn=ne.showTime,wn=ne.use12Hours,wt=ne.separator,It=wt===void 0?"~":wt,Pt=ne.value,Ct=ne.defaultValue,vt=ne.defaultPickerValue,Dn=ne.open,$t=ne.defaultOpen,Cn=ne.disabledDate,pn=ne.disabledTime,Yt=ne.dateRender,Tn=ne.panelRender,zn=ne.ranges,fr=ne.allowEmpty,Gn=ne.allowClear,Lr=ne.suffixIcon,Gr=ne.clearIcon,Hn=ne.pickerRef,Yn=ne.inputReadOnly,Jn=ne.mode,wr=ne.renderExtraFooter,Wr=ne.onChange,Zr=ne.onOpenChange,ua=ne.onPanelChange,xa=ne.onCalendarChange,ma=ne.onFocus,Ya=ne.onBlur,Oa=ne.onOk,Pa=ne.components,ga=ne.order,Na=ne.direction,ai=ne.activePickerIndex,da=ne.autoComplete,ca=da===void 0?"off":da,Ra=Ht==="date"&&!!Sn||Ht==="time",wa=Object(m.useRef)({}),De=Object(m.useRef)(null),tt=Object(m.useRef)(null),at=Object(m.useRef)(null),je=Object(m.useRef)(null),ce=Object(m.useRef)(null),Ce=Object(m.useRef)(null),ge=Object(m.useRef)(null),Ue=Z(h(Gt,Ht,Sn,wn)),Ye=Object(u.a)(0,{value:ai}),ot=Object(P.a)(Ye,2),Ke=ot[0],_t=ot[1],Ft=Object(m.useRef)(null),rn=m.useMemo(function(){return Array.isArray(On)?On:[On||!1,On||!1]},[On]),hn=Object(u.a)(null,{value:Pt,defaultValue:Ct,postState:function(Fn){return Ht==="time"&&!ga?Fn:sr(Fn,Qe)}}),Rn=Object(P.a)(hn,2),Kn=Rn[0],cr=Rn[1],on=ar({values:Kn,picker:Ht,defaultDates:vt,generateConfig:Qe}),jt=Object(P.a)(on,2),Jt=jt[0],In=jt[1],_n=Object(u.a)(Kn,{postState:function(Fn){var lr=Fn;if(rn[0]&&rn[1])return lr;for(var Ar=0;Ar<2;Ar+=1)rn[Ar]&&!oe(lr,Ar)&&!oe(fr,Ar)&&(lr=fe(lr,Qe.getNow(),Ar));return lr}}),yr=Object(P.a)(_n,2),qn=yr[0],Cr=yr[1],ir=Object(u.a)([Ht,Ht],{value:Jn}),mn=Object(P.a)(ir,2),Mn=mn[0],vr=mn[1];Object(m.useEffect)(function(){vr([Ht,Ht])},[Ht]);var Or=function(Fn,lr){vr(Fn),ua&&ua(lr,Fn)},Qn=kn({picker:Ht,selectedValue:qn,locale:en,disabled:rn,disabledDate:Cn,generateConfig:Qe},wa.current[1],wa.current[0]),Pr=Object(P.a)(Qn,2),$r=Pr[0],Ir=Pr[1],Br=Object(u.a)(!1,{value:Dn,defaultValue:$t,postState:function(Fn){return rn[Ke]?!1:Fn},onChange:function(Fn){Zr&&Zr(Fn),!Fn&&Ft.current&&Ft.current.onClose&&Ft.current.onClose()}}),Ur=Object(P.a)(Br,2),jr=Ur[0],Nr=Ur[1],pr=jr&&Ke===0,la=jr&&Ke===1,Qa=Object(m.useState)(0),ja=Object(P.a)(Qa,2),Ca=ja[0],qr=ja[1];Object(m.useEffect)(function(){!jr&&De.current&&qr(De.current.offsetWidth)},[jr]);var Vr=m.useRef();function Xr(_r,Fn){if(_r)clearTimeout(Vr.current),wa.current[Fn]=!0,_t(Fn),Nr(_r),jr||In(null,Fn);else if(Ke===Fn){Nr(_r);var lr=wa.current;Vr.current=setTimeout(function(){lr===wa.current&&(wa.current={})})}}function ea(_r){Xr(!0,_r),setTimeout(function(){var Fn=[Ce,ge][_r];Fn.current&&Fn.current.focus()},0)}function Ua(_r,Fn){var lr=_r,Ar=oe(lr,0),aa=oe(lr,1);Ar&&aa&&Qe.isAfter(Ar,aa)&&(Ht==="week"&&!Ut(Qe,en.locale,Ar,aa)||Ht==="quarter"&&!we(Qe,Ar,aa)||Ht!=="week"&&Ht!=="quarter"&&Ht!=="time"&&!ct(Qe,Ar,aa)?(Fn===0?(lr=[Ar,null],aa=null):(Ar=null,lr=[null,aa]),wa.current=Object(T.a)({},Fn,!0)):(Ht!=="time"||ga!==!1)&&(lr=sr(lr,Qe))),Cr(lr);var gi=lr&&lr[0]?Qe.locale.format(en.locale,lr[0],Ue[0]):"",ii=lr&&lr[1]?Qe.locale.format(en.locale,lr[1],Ue[0]):"";if(xa){var Da={range:Fn===0?"start":"end"};xa(lr,[gi,ii],Da)}var Xa=Pn(Ar,0,rn,fr),vi=Pn(aa,1,rn,fr),Wi=lr===null||Xa&&vi;Wi&&(cr(lr),Wr&&(!We(Qe,oe(Kn,0),Ar)||!We(Qe,oe(Kn,1),aa))&&Wr(lr,[gi,ii]));var Ta=null;Fn===0&&!rn[1]?Ta=1:Fn===1&&!rn[0]&&(Ta=0),Ta!==null&&Ta!==Ke&&(!wa.current[Ta]||!oe(lr,Ta))&&oe(lr,Fn)?ea(Ta):Xr(!1,Fn)}var hi=function(Fn){return jr&&Ft.current&&Ft.current.onKeyDown?Ft.current.onKeyDown(Fn):(Object(o.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},si={formatList:Ue,generateConfig:Qe,locale:en},Yr=xn(oe(qn,0),si),Ja=Object(P.a)(Yr,2),Za=Ja[0],Qr=Ja[1],zr=xn(oe(qn,1),si),ba=Object(P.a)(zr,2),Pi=ba[0],no=ba[1],li=function(Fn,lr){var Ar=Qe.locale.parse(en.locale,Fn,Ue),aa=lr===0?$r:Ir;Ar&&!aa(Ar)&&(Cr(fe(qn,Ar,lr)),In(Ar,lr))},Ci=nr({valueTexts:Za,onTextChange:function(Fn){return li(Fn,0)}}),Ti=Object(P.a)(Ci,3),Si=Ti[0],Ii=Ti[1],co=Ti[2],Ro=nr({valueTexts:Pi,onTextChange:function(Fn){return li(Fn,1)}}),Gi=Object(P.a)(Ro,3),Oi=Gi[0],Vi=Gi[1],yi=Gi[2],Ri=Object(m.useState)(null),ho=Object(P.a)(Ri,2),Yi=ho[0],Ai=ho[1],Di=Object(m.useState)(null),bi=Object(P.a)(Di,2),Ia=bi[0],fi=bi[1],pi=Nn(Si,{formatList:Ue,generateConfig:Qe,locale:en}),_i=Object(P.a)(pi,3),mi=_i[0],Xi=_i[1],$i=_i[2],Qi=Nn(Oi,{formatList:Ue,generateConfig:Qe,locale:en}),ki=Object(P.a)(Qi,3),ui=ki[0],Ei=ki[1],ro=ki[2],Ao=function(Fn){fi(fe(qn,Fn,Ke)),Ke===0?Xi(Fn):Ei(Fn)},Do=function(){fi(fe(qn,null,Ke)),Ke===0?$i():ro()},fo=function(Fn,lr){return{blurToCancel:Ra,forwardKeyDown:hi,onBlur:Ya,isClickOutside:function(aa){return!H([tt.current,at.current,je.current],aa)},onFocus:function(aa){_t(Fn),ma&&ma(aa)},triggerOpen:function(aa){Xr(aa,Fn)},onSubmit:function(){Ua(qn,Fn),lr()},onCancel:function(){Xr(!1,Fn),Cr(Kn),lr()}}},ao=un(Object(R.a)(Object(R.a)({},fo(0,co)),{},{open:pr,value:Si})),po=Object(P.a)(ao,2),Wa=po[0],ha=po[1],Aa=ha.focused,fa=ha.typing,Ni=un(Object(R.a)(Object(R.a)({},fo(1,yi)),{},{open:la,value:Oi})),mo=Object(P.a)(Ni,2),qa=mo[0],io=mo[1],oo=io.focused,so=io.typing,xi=function(Fn){!jr&&!Ce.current.contains(Fn.target)&&!ge.current.contains(Fn.target)&&(rn[0]?rn[1]||ea(1):ea(0))},Ji=function(Fn){jr&&(Aa||oo)&&!Ce.current.contains(Fn.target)&&!ge.current.contains(Fn.target)&&Fn.preventDefault()},ji=Kn&&Kn[0]?Qe.locale.format(en.locale,Kn[0],"YYYYMMDDHHmmss"):"",go=Kn&&Kn[1]?Qe.locale.format(en.locale,Kn[1],"YYYYMMDDHHmmss"):"";Object(m.useEffect)(function(){jr||(Cr(Kn),!Za.length||Za[0]===""?Ii(""):Qr!==Si&&co(),!Pi.length||Pi[0]===""?Vi(""):no!==Oi&&yi())},[jr,Za,Pi]),Object(m.useEffect)(function(){Cr(Kn)},[ji,go]),Hn&&(Hn.current={focus:function(){Ce.current&&Ce.current.focus()},blur:function(){Ce.current&&Ce.current.blur(),ge.current&&ge.current.blur()}});var Zi=Object.keys(zn||{}),Hr=Zi.map(function(_r){var Fn=zn[_r],lr=typeof Fn=="function"?Fn():Fn;return{label:_r,onClick:function(){Ua(lr,null),Xr(!1,Ke)},onMouseEnter:function(){Ai(lr)},onMouseLeave:function(){Ai(null)}}});function Dr(){var _r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lr=null;jr&&Ia&&Ia[0]&&Ia[1]&&Qe.isAfter(Ia[1],Ia[0])&&(lr=Ia);var Ar=Sn;if(Sn&&Object(f.a)(Sn)==="object"&&Sn.defaultValue){var aa=Sn.defaultValue;Ar=Object(R.a)(Object(R.a)({},Sn),{},{defaultValue:oe(aa,Ke)||void 0})}var gi=null;return Yt&&(gi=function(Da,Xa){return Yt(Da,Xa,{range:Ke?"end":"start"})}),m.createElement(ut.Provider,{value:{inRange:!0,panelPosition:_r,rangedValue:Yi||qn,hoverRangedValue:lr}},m.createElement(ee,Object.assign({},ne,Fn,{dateRender:gi,showTime:Ar,mode:Mn[Ke],generateConfig:Qe,style:void 0,direction:Na,disabledDate:Ke===0?$r:Ir,disabledTime:function(Da){return pn?pn(Da,Ke===0?"start":"end"):!1},className:b()(Object(T.a)({},"".concat(et,"-panel-focused"),Ke===0?!fa:!so)),value:oe(qn,Ke),locale:en,tabIndex:-1,onPanelChange:function(Da,Xa){Or(fe(Mn,Xa,Ke),fe(qn,Da,Ke));var vi=Da;_r==="right"&&Mn[Ke]===Xa&&(vi=Pe(vi,Xa,Qe,-1)),In(vi,Ke)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var oa=0,Fa=0;Ke&&at.current&&ce.current&&tt.current&&(oa=at.current.offsetWidth+ce.current.offsetWidth,tt.current.offsetWidth&&oa>tt.current.offsetWidth&&(Fa=oa));var Mi=Na==="rtl"?{right:oa}:{left:oa};function di(){var _r,Fn=G(et,Mn[Ke],wr),lr=Q({prefixCls:et,components:Pa,needConfirmButton:Ra,okDisabled:!oe(qn,Ke)||Cn&&Cn(qn[Ke]),locale:en,rangeList:Hr,onOk:function(){oe(qn,Ke)&&(Ua(qn,Ke),Oa&&Oa(qn))}});if(Ht!=="time"&&!Sn){var Ar=Jt(Ke),aa=Pe(Ar,Ht,Qe),gi=Mn[Ke],ii=gi===Ht,Da=Dr(ii?"left":!1,{pickerValue:Ar,onPickerValueChange:function(Ta){In(Ta,Ke)}}),Xa=Dr("right",{pickerValue:aa,onPickerValueChange:function(Ta){In(Pe(Ta,Ht,Qe,-1),Ke)}});Na==="rtl"?_r=m.createElement(m.Fragment,null,Xa,ii&&Da):_r=m.createElement(m.Fragment,null,Da,ii&&Xa)}else _r=Dr();var vi=m.createElement(m.Fragment,null,m.createElement("div",{className:"".concat(et,"-panels")},_r),(Fn||lr)&&m.createElement("div",{className:"".concat(et,"-footer")},Fn,lr));return Tn&&(vi=Tn(vi)),m.createElement("div",{className:"".concat(et,"-panel-container"),style:{marginLeft:Fa},ref:tt,onMouseDown:function(Ta){Ta.preventDefault()}},vi)}var Ui=m.createElement("div",{className:b()("".concat(et,"-range-wrapper"),"".concat(et,"-").concat(Ht,"-range-wrapper")),style:{minWidth:Ca}},m.createElement("div",{className:"".concat(et,"-range-arrow"),style:Mi}),di()),ci;Lr&&(ci=m.createElement("span",{className:"".concat(et,"-suffix")},Lr));var _a;Gn&&(oe(Kn,0)&&!rn[0]||oe(Kn,1)&&!rn[1])&&(_a=m.createElement("span",{onMouseDown:function(Fn){Fn.preventDefault(),Fn.stopPropagation()},onMouseUp:function(Fn){Fn.preventDefault(),Fn.stopPropagation();var lr=Kn;rn[0]||(lr=fe(lr,null,0)),rn[1]||(lr=fe(lr,null,1)),Ua(lr,null),Xr(!1,Ke)},className:"".concat(et,"-clear")},Gr||m.createElement("span",{className:"".concat(et,"-clear-btn")})));var Fi={size:p(Ht,Ue[0])},Bi=0,Hi=0;at.current&&je.current&&ce.current&&(Ke===0?Hi=at.current.offsetWidth:(Bi=oa,Hi=je.current.offsetWidth));var za=Na==="rtl"?{right:Bi}:{left:Bi},Fr=function(Fn,lr){var Ar=fe(qn,Fn,Ke);lr==="submit"||lr!=="key"&&!Ra?(Ua(Ar,Ke),Ke===0?$i():ro()):Cr(Ar)};return m.createElement(d.Provider,{value:{operationRef:Ft,hideHeader:Ht==="time",onDateMouseEnter:Ao,onDateMouseLeave:Do,hideRanges:!0,onSelect:Fr,open:jr}},m.createElement(Vn,{visible:jr,popupElement:Ui,popupStyle:Mt,prefixCls:et,dropdownClassName:Xt,dropdownAlign:St,getPopupContainer:nn,transitionName:Vt,range:!0,direction:Na},m.createElement("div",Object.assign({ref:De,className:b()(et,"".concat(et,"-range"),it,(Re={},Object(T.a)(Re,"".concat(et,"-disabled"),rn[0]&&rn[1]),Object(T.a)(Re,"".concat(et,"-focused"),Ke===0?Aa:oo),Object(T.a)(Re,"".concat(et,"-rtl"),Na==="rtl"),Re)),style:mt,onClick:xi,onMouseDown:Ji},me(ne)),m.createElement("div",{className:b()("".concat(et,"-input"),(Xe={},Object(T.a)(Xe,"".concat(et,"-input-active"),Ke===0),Object(T.a)(Xe,"".concat(et,"-input-placeholder"),!!mi),Xe)),ref:at},m.createElement("input",Object.assign({id:pt,disabled:rn[0],readOnly:Yn||!fa,value:mi||Si,onChange:function(Fn){Ii(Fn.target.value)},autoFocus:bn,placeholder:oe(Bt,0)||"",ref:Ce},Wa,Fi,{autoComplete:ca}))),m.createElement("div",{className:"".concat(et,"-range-separator"),ref:ce},It),m.createElement("div",{className:b()("".concat(et,"-input"),(Le={},Object(T.a)(Le,"".concat(et,"-input-active"),Ke===1),Object(T.a)(Le,"".concat(et,"-input-placeholder"),!!ui),Le)),ref:je},m.createElement("input",Object.assign({disabled:rn[1],readOnly:Yn||!so,value:ui||Oi,onChange:function(Fn){Vi(Fn.target.value)},placeholder:oe(Bt,1)||"",ref:ge},qa,Fi,{autoComplete:ca}))),m.createElement("div",{className:"".concat(et,"-active-bar"),style:Object(R.a)(Object(R.a)({},za),{},{width:Hi,position:"absolute"})}),ci,_a)))}var Mr=function(ne){Object(I.a)(Xe,ne);var Re=Object(F.a)(Xe);function Xe(){var Le;return Object(Y.a)(this,Xe),Le=Re.apply(this,arguments),Le.pickerRef=m.createRef(),Le.focus=function(){Le.pickerRef.current&&Le.pickerRef.current.focus()},Le.blur=function(){Le.pickerRef.current&&Le.pickerRef.current.blur()},Le}return Object(B.a)(Xe,[{key:"render",value:function(){return m.createElement(Tr,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(m.Component),Sr=Mr,hr=J.b=Zn},osHv:function(Be,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";var B=Y.Pos;function I(s,n){return s.line-n.line||s.ch-n.ch}var F="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",T=F+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",R=new RegExp("<(/?)(["+F+"]["+T+"]*)","g");function P(s,n,l,c){this.line=n,this.ch=l,this.cm=s,this.text=s.getLine(n),this.min=c?Math.max(c.from,s.firstLine()):s.firstLine(),this.max=c?Math.min(c.to-1,s.lastLine()):s.lastLine()}function m(s,n){var l=s.cm.getTokenTypeAt(B(s.line,n));return l&&/\btag\b/.test(l)}function t(s){return s.line>=s.max?void 0:(s.ch=0,s.text=s.cm.getLine(++s.line),!0)}function b(s){return s.line<=s.min?void 0:(s.text=s.cm.getLine(--s.line),s.ch=s.text.length,!0)}function o(s){for(;;){var n=s.text.indexOf(">",s.ch);if(n==-1){if(t(s))continue;return}if(!m(s,n+1)){s.ch=n+1;continue}var l=s.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(s.text.slice(l+1,n));return s.ch=n+1,c?"selfClose":"regular"}}function u(s){for(;;){var n=s.ch?s.text.lastIndexOf("<",s.ch-1):-1;if(n==-1){if(b(s))continue;return}if(!m(s,n+1)){s.ch=n;continue}R.lastIndex=n,s.ch=n;var l=R.exec(s.text);if(l&&l.index==n)return l}}function f(s){for(;;){R.lastIndex=s.ch;var n=R.exec(s.text);if(!n){if(t(s))continue;return}if(!m(s,n.index+1)){s.ch=n.index+1;continue}return s.ch=n.index+n[0].length,n}}function a(s){for(;;){var n=s.ch?s.text.lastIndexOf(">",s.ch-1):-1;if(n==-1){if(b(s))continue;return}if(!m(s,n+1)){s.ch=n;continue}var l=s.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(s.text.slice(l+1,n));return s.ch=n+1,c?"selfClose":"regular"}}function i(s,n){for(var l=[];;){var c=f(s),x,A=s.line,C=s.ch-(c?c[0].length:0);if(!c||!(x=o(s)))return;if(x=="selfClose")continue;if(c[1]){for(var k=l.length-1;k>=0;--k)if(l[k]==c[2]){l.length=k;break}if(k<0&&(!n||n==c[2]))return{tag:c[2],from:B(A,C),to:B(s.line,s.ch)}}else l.push(c[2])}}function d(s,n){for(var l=[];;){var c=a(s);if(!c)return;if(c=="selfClose"){u(s);continue}var x=s.line,A=s.ch,C=u(s);if(!C)return;if(C[1])l.push(C[2]);else{for(var k=l.length-1;k>=0;--k)if(l[k]==C[2]){l.length=k;break}if(k<0&&(!n||n==C[2]))return{tag:C[2],from:B(s.line,s.ch),to:B(x,A)}}}}Y.registerHelper("fold","xml",function(s,n){for(var l=new P(s,n.line,0);;){var c=f(l);if(!c||l.line!=n.line)return;var x=o(l);if(!x)return;if(!c[1]&&x!="selfClose"){var A=B(l.line,l.ch),C=i(l,c[2]);return C&&I(C.from,A)>0?{from:A,to:C.from}:null}}}),Y.findMatchingTag=function(s,n,l){var c=new P(s,n.line,n.ch,l);if(c.text.indexOf(">")==-1&&c.text.indexOf("<")==-1)return;var x=o(c),A=x&&B(c.line,c.ch),C=x&&u(c);if(!x||!C||I(c,n)>0)return;var k={from:B(c.line,c.ch),to:A,tag:C[2]};return x=="selfClose"?{open:k,close:null,at:"open"}:C[1]?{open:d(c,C[2]),close:k,at:"close"}:(c=new P(s,A.line,A.ch,l),{open:k,close:i(c,C[2]),at:"open"})},Y.findEnclosingTag=function(s,n,l,c){for(var x=new P(s,n.line,n.ch,l);;){var A=d(x,c);if(!A)break;var C=new P(s,n.line,n.ch,l),k=i(C,A.tag);if(k)return{open:A,close:k}}},Y.scanForClosingTag=function(s,n,l,c){var x=new P(s,n.line,n.ch,c?{from:0,to:c}:null);return i(x,l)}})},p5ED:function(Be,J,L){"use strict";var Y=L("+L6B"),B=L("2/Rp"),I=L("5Dmo"),F=L("3S7+"),T=L("k1fw"),R=L("tJVT"),P=L("q1tI"),m=L.n(P),t=L("vHTk"),b=L.n(t),o=L("yEEn"),u=L("ZW9T"),f=L("1vsH");J.a=function(a){var i=a.name,d=a.data,s=a.theme,n=a.type,l=a.filename,c=a.monacoEditor,x=a.className,A=a.style,C=a.close,k=a.onClose,w=a.hasMask,y=Object(P.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),h=Object(R.a)(y,2),p=h[0],v=h[1],_=Object(P.useState)(""),E=Object(R.a)(_,2),g=E[0],j=E[1],U,S=1024*1024,z=10*S,H=Object(P.useRef)();n==="office"&&(U=Object(f.T)(d).filesize,U>z&&(n="other")),l&&(c.filename=l),Object(P.useEffect)(function(){var K,$,Z=(K=document.cookie)===null||K===void 0||(($=K.replace(/\s/g,""))===null||$===void 0)?void 0:$.split(";");Z==null||Z.map(function(me){var oe=me.split("=");oe[0]==="_educoder_session"&&j(oe[1])})},[]);var M=function(){if(d.startsWith("http")||d.startsWith("/")){V();return}Object(f.z)(l||"educoder",d,l)},V=function(){Object(f.x)(l||i,d)};return console.log("data:",d,"fileanme:",l," name:",i),m.a.createElement("div",{style:Object(T.a)({},A||{}),className:"".concat(w&&b.a.bgBlack," ").concat(n?b.a.wrp:"hide")},C&&m.a.createElement("div",{className:b.a.close,ref:H},m.a.createElement(F.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return H.current}},m.a.createElement("span",{onClick:V},m.a.createElement("i",{className:"icon-quxiaozhiding"}))),m.a.createElement(F.a,{title:"\u5173\u95ED",getPopupContainer:function(){return H.current}},m.a.createElement("span",{className:"",onClick:k},m.a.createElement("i",{className:"icon-guanbi1"})))),m.a.createElement("div",{className:"".concat(b.a[x]," ").concat(x," ").concat(b.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&m.a.createElement(u.b,c)),n==="audio"&&m.a.createElement("audio",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?d:"data:audio/mp3;base64,").concat(d),autoPlay:!0}),n==="video"&&m.a.createElement(m.a.Fragment,null,d!=null&&d.startsWith("/")?m.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):m.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),n==="html"&&m.a.createElement("iframe",{src:d+"&disposition=inline"}),n==="pdf"&&m.a.createElement("embed",{className:b.a.embed,src:d}),n==="image"&&m.a.createElement(m.a.Fragment,null,m.a.createElement("img",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(d)})),n==="other"&&m.a.createElement("div",null,m.a.createElement(B.a,{type:"primary",size:"large",onClick:M},m.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&m.a.createElement(B.a,{type:"primary",size:"large",onClick:M},m.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Be,J,L){},pmY6:function(Be,J,L){"use strict";L.d(J,"h",function(){return b}),L.d(J,"g",function(){return u}),L.d(J,"f",function(){return f}),L.d(J,"e",function(){return a}),L.d(J,"i",function(){return i}),L.d(J,"b",function(){return d}),L.d(J,"a",function(){return s}),L.d(J,"d",function(){return n}),L.d(J,"c",function(){return l});var Y=L("C/vA"),B=L("JYp7");const I=!1;let F=null;function T(c){F=c}if(I){const c="__is_disposable_tracked__";T(new class{trackDisposable(x){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{x[c]||console.log(A)},3e3)}setParent(x,A){if(x&&x!==s.None)try{x[c]=!0}catch(C){}}markAsDisposed(x){if(x&&x!==s.None)try{x[c]=!0}catch(A){}}markAsSingleton(x){}})}function R(c){return F==null||F.trackDisposable(c),c}function P(c){F==null||F.markAsDisposed(c)}function m(c,x){F==null||F.setParent(c,x)}function t(c,x){if(!F)return;for(const A of c)F.setParent(A,x)}function b(c){return F==null||F.markAsSingleton(c),c}class o extends Error{constructor(c){super(`Encountered errors while disposing of store. Errors: [${c.join(", ")}]`);this.errors=c}}function u(c){return typeof c.dispose=="function"&&c.dispose.length===0}function f(c){if(B.a.is(c)){let x=[];for(const A of c)if(A)try{A.dispose()}catch(C){x.push(C)}if(x.length===1)throw x[0];if(x.length>1)throw new o(x);return Array.isArray(c)?[]:c}else if(c)return c.dispose(),c}function a(...c){const x=i(()=>f(c));return t(c,x),x}function i(c){const x=R({dispose:Object(Y.a)(()=>{P(x),c()})});return x}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,R(this)}dispose(){if(this._isDisposed)return;P(this),this._isDisposed=!0,this.clear()}clear(){try{f(this._toDispose.values())}finally{this._toDispose.clear()}}add(c){if(!c)return c;if(c===this)throw new Error("Cannot register a disposable on itself!");return m(c,this),this._isDisposed?d.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(c),c}}d.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new d,R(this),m(this._store,this)}dispose(){P(this),this._store.dispose()}_register(c){if(c===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(c)}}s.None=Object.freeze({dispose(){}});class n{constructor(){this._isDisposed=!1,R(this)}get value(){return this._isDisposed?void 0:this._value}set value(c){var x;if(this._isDisposed||c===this._value)return;(x=this._value)===null||x===void 0||x.dispose(),c&&m(c,this),this._value=c}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,P(this),(c=this._value)===null||c===void 0||c.dispose(),this._value=void 0}clearAndLeak(){const c=this._value;return this._value=void 0,c&&m(c,null),c}}class l{constructor(c){this.object=c}dispose(){}}},psGv:function(Be,J,L){var Y,B;(function(){var I;(function(){"use strict";var P=[,,function(o){function u(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}u.prototype.clone_empty=function(){var i=new u(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},u.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},u.prototype.has_match=function(i){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(i))return!0;return!1},u.prototype.set_indent=function(i,d){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},u.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},u.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},u.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},u.prototype.is_empty=function(){return this.__items.length===0},u.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},u.prototype.push=function(i){this.__items.push(i);var d=i.lastIndexOf(`
`);d!==-1?this.__character_count=i.length-d:this.__character_count+=i.length},u.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},u.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},u.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},u.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},u.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function f(i,d){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),d=d||"",i.indent_level>0&&(d=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}f.prototype.get_indent_size=function(i,d){var s=this.__base_string_length;return d=d||0,i<0&&(s=0),s+=i*this.__indent_size,s+=d,s},f.prototype.get_indent_string=function(i,d){var s=this.__base_string;return d=d||0,i<0&&(i=0,s=""),d+=i*this.__indent_size,this.__ensure_cache(d),s+=this.__cache[d],s},f.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var i=this.__cache.length,d=0,s="";this.__indent_size&&i>=this.__indent_size&&(d=Math.floor(i/this.__indent_size),i-=d*this.__indent_size,s=new Array(d+1).join(this.__indent_string)),i&&(s+=new Array(i+1).join(" ")),this.__cache.push(s)};function a(i,d){this.__indent_cache=new f(i,d),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new u(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}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(i,d){return this.__indent_cache.get_indent_string(i,d)},a.prototype.get_indent_size=function(i,d){return this.__indent_cache.get_indent_size(i,d)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(i){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return i!==`
`&&(s=s.replace(/[\n]/g,i)),s},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(i,d){return i=i||0,d=d||0,this.next_line.set_indent(i,d),this.__lines.length>1?(this.current_line.set_indent(i,d),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(i){for(var d=0;d<i.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},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(i){for(var d=this.__lines.length;i<d;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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(i,d){for(var s=this.__lines.length-2;s>=0;){var n=this.__lines[s];if(n.is_empty())break;if(n.item(0).indexOf(i)!==0&&n.item(-1)!==d){this.__lines.splice(s+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},o.exports.Output=a},function(o){function u(f,a,i,d){this.type=f,this.text=a,this.comments_before=null,this.newlines=i||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}o.exports.Token=u},,,function(o){function u(i,d){this.raw_options=f(i,d),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}u.prototype._get_array=function(i,d){var s=this.raw_options[i],n=d||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(n=s.concat()):typeof s=="string"&&(n=s.split(/[^a-zA-Z0-9_\/\-]+/)),n},u.prototype._get_boolean=function(i,d){var s=this.raw_options[i],n=s===void 0?!!d:!!s;return n},u.prototype._get_characters=function(i,d){var s=this.raw_options[i],n=d||"";return typeof s=="string"&&(n=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),n},u.prototype._get_number=function(i,d){var s=this.raw_options[i];d=parseInt(d,10),isNaN(d)&&(d=0);var n=parseInt(s,10);return isNaN(n)&&(n=d),n},u.prototype._get_selection=function(i,d,s){var n=this._get_selection_list(i,d,s);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[i]+"'");return n[0]},u.prototype._get_selection_list=function(i,d,s){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[d[0]],!this._is_valid_selection(s,d))throw new Error("Invalid Default Value!");var n=this._get_array(i,s);if(!this._is_valid_selection(n,d))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[i]+"'");return n},u.prototype._is_valid_selection=function(i,d){return i.length&&d.length&&!i.some(function(s){return d.indexOf(s)===-1})};function f(i,d){var s={};i=a(i);var n;for(n in i)n!==d&&(s[n]=i[n]);if(d&&i[d])for(n in i[d])s[n]=i[d][n];return s}function a(i){var d={},s;for(s in i){var n=s.replace(/-/g,"_");d[n]=i[s]}return d}o.exports.Options=u,o.exports.normalizeOpts=a,o.exports.mergeOpts=f},,function(o){var u=RegExp.prototype.hasOwnProperty("sticky");function f(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},f.prototype.peek=function(a){var i=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(i=this.__input.charAt(a)),i},f.prototype.__match=function(a,i){a.lastIndex=i;var d=a.exec(this.__input);return d&&!(u&&a.sticky)&&(d.index!==i&&(d=null)),d},f.prototype.test=function(a,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(a,i):!1},f.prototype.testChar=function(a,i){var d=this.peek(i);return a.lastIndex=0,d!==null&&a.test(d)},f.prototype.match=function(a){var i=this.__match(a,this.__position);return i?this.__position+=i[0].length:i=null,i},f.prototype.read=function(a,i,d){var s="",n;return a&&(n=this.match(a),n&&(s+=n[0])),i&&(n||!a)&&(s+=this.readUntil(i,d)),s},f.prototype.readUntil=function(a,i){var d="",s=this.__position;a.lastIndex=this.__position;var n=a.exec(this.__input);return n?(s=n.index,i&&(s+=n[0].length)):s=this.__input_length,d=this.__input.substring(this.__position,s),this.__position=s,d},f.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},f.prototype.get_regexp=function(a,i){var d=null,s="g";return i&&u&&(s="y"),typeof a=="string"&&a!==""?d=new RegExp(a,s):a&&(d=new RegExp(a.source,s)),d},f.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(a){var i=this.__position,d=this.readUntilAfter(a);return this.__position=i,d},f.prototype.lookBack=function(a){var i=this.__position-1;return i>=a.length&&this.__input.substring(i-a.length,i).toLowerCase()===a},o.exports.InputScanner=f},function(o,u,f){var a=f(8).InputScanner,i=f(3).Token,d=f(10).TokenStream,s=f(11).WhitespacePattern,n={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(c,x){this._input=new a(c),this._options=x||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var c,x=new i(n.START,""),A=null,C=[],k=new d;x.type!==n.EOF;){for(c=this._get_next_token(x,A);this._is_comment(c);)k.add(c),c=this._get_next_token(x,A);k.isEmpty()||(c.comments_before=k,k=new d),c.parent=A,this._is_opening(c)?(C.push(A),A=c):A&&this._is_closing(c,A)&&(c.opened=A,A.closed=c,A=C.pop(),c.parent=A),c.previous=x,x.next=c,this.__tokens.add(c),x=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,x){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(n.RAW,A):this._create_token(n.EOF,"")},l.prototype._is_comment=function(c){return!1},l.prototype._is_opening=function(c){return!1},l.prototype._is_closing=function(c,x){return!1},l.prototype._create_token=function(c,x){var A=new i(c,x,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},o.exports.Tokenizer=l,o.exports.TOKEN=n},function(o){function u(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}u.prototype.restart=function(){this.__position=0},u.prototype.isEmpty=function(){return this.__tokens_length===0},u.prototype.hasNext=function(){return this.__position<this.__tokens_length},u.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__tokens[this.__position],this.__position+=1),f},u.prototype.peek=function(f){var a=null;return f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length&&(a=this.__tokens[f]),a},u.prototype.add=function(f){this.__parent_token&&(f.parent=this.__parent_token),this.__tokens.push(f),this.__tokens_length+=1},o.exports.TokenStream=u},function(o,u,f){var a=f(12).Pattern;function i(d,s){a.call(this,d,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new a,i.prototype.__set_whitespace_patterns=function(d,s){d+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var s=this.__split(this._newline_regexp,d);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return d},i.prototype.matching=function(d,s){var n=this._create();return n.__set_whitespace_patterns(d,s),n._update(),n},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(d,s){d.lastIndex=0;for(var n=0,l=[],c=d.exec(s);c;)l.push(s.substring(n,c.index)),n=c.index+c[0].length,c=d.exec(s);return n<s.length?l.push(s.substring(n,s.length)):l.push(""),l},o.exports.WhitespacePattern=i},function(o){function u(f,a){this._input=f,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)}u.prototype.read=function(){var f=this._input.read(this._starting_pattern);return(!this._starting_pattern||f)&&(f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),f},u.prototype.read_match=function(){return this._input.match(this._match_pattern)},u.prototype.until_after=function(f){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(f),a._update(),a},u.prototype.until=function(f){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(f),a._update(),a},u.prototype.starting_with=function(f){var a=this._create();return a._starting_pattern=this._input.get_regexp(f,!0),a._update(),a},u.prototype.matching=function(f){var a=this._create();return a._match_pattern=this._input.get_regexp(f,!0),a._update(),a},u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){},o.exports.Pattern=u},function(o){function u(f,a){f=typeof f=="string"?f:f.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+a,"g")}u.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(f);i;)a[i[1]]=i[2],i=this.__directive_pattern.exec(f);return a},u.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},o.exports.Directives=u},function(o,u,f){var a=f(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(s,n){a.call(this,s,n),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),n&&(this.__template_pattern=this._input.get_regexp(n.__template_pattern),this._excluded=Object.assign(this._excluded,n._excluded),this._disabled=Object.assign(this._disabled,n._disabled));var l=new a(s);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new a,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(s){var n=this._create();return n._disabled[s]=!0,n._update(),n},d.prototype.read_options=function(s){var n=this._create();for(var l in i)n._disabled[l]=s.templating.indexOf(l)===-1;return n._update(),n},d.prototype.exclude=function(s){var n=this._create();return n._excluded[s]=!0,n._update(),n},d.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var n=this._read_template();n;)this._match_pattern?n+=this._input.read(this._match_pattern):n+=this._input.readUntil(this.__template_pattern),s+=n,n=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},d.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},d.prototype._read_template=function(){var s="",n=this._input.peek();if(n==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(s=s||this.__patterns.erb.read())}else n==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},o.exports.TemplatablePattern=d},,,,function(o,u,f){var a=f(19).Beautifier,i=f(20).Options;function d(s,n,l,c){var x=new a(s,n,l,c);return x.beautify()}o.exports=d,o.exports.defaultOptions=function(){return new i}},function(o,u,f){var a=f(20).Options,i=f(2).Output,d=f(21).Tokenizer,s=f(21).TOKEN,n=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=function(_,E){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=_.max_preserve_newlines,this.preserve_newlines=_.preserve_newlines,this._output=new i(_,E)};c.prototype.current_line_has_match=function(_){return this._output.current_line.has_match(_)},c.prototype.set_space_before_token=function(_,E){this._output.space_before_token=_,this._output.non_breaking_space=E},c.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},c.prototype.add_raw_token=function(_){this._output.add_raw_token(_)},c.prototype.print_preserved_newlines=function(_){var E=0;_.type!==s.TEXT&&_.previous.type!==s.TEXT&&(E=_.newlines?1:0),this.preserve_newlines&&(E=_.newlines<this.max_preserve_newlines+1?_.newlines:this.max_preserve_newlines+1);for(var g=0;g<E;g++)this.print_newline(g>0);return E!==0},c.prototype.traverse_whitespace=function(_){return _.whitespace_before||_.newlines?(this.print_preserved_newlines(_)||(this._output.space_before_token=!0),!0):!1},c.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},c.prototype.print_newline=function(_){this._output.add_new_line(_)},c.prototype.print_token=function(_){_.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(_.text))},c.prototype.indent=function(){this.indent_level++},c.prototype.get_full_indent=function(_){return _=this.indent_level+(_||0),_<1?"":this._output.get_indent_string(_)};var x=function(_){for(var E=null,g=_.next;g.type!==s.EOF&&_.closed!==g;){if(g.type===s.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===s.EQUALS&&g.next.next&&g.next.next.type===s.VALUE&&(E=g.next.next.text);break}g=g.next}return E},A=function(_,E){var g=null,j=null;return E.closed?(_==="script"?g="text/javascript":_==="style"&&(g="text/css"),g=x(E)||g,g.search("text/css")>-1?j="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?j="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?j="html":g.search(/test\/null/)>-1&&(j="null"),j):null};function C(_,E){return E.indexOf(_)!==-1}function k(_,E,g){this.parent=_||null,this.tag=E?E.tag_name:"",this.indent_level=g||0,this.parser_token=E||null}function w(_){this._printer=_,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(_){var E=new k(this._current_frame,_,this._printer.indent_level);this._current_frame=E},w.prototype._try_pop_frame=function(_){var E=null;return _&&(E=_.parser_token,this._printer.indent_level=_.indent_level,this._current_frame=_.parent),E},w.prototype._get_frame=function(_,E){for(var g=this._current_frame;g&&!(_.indexOf(g.tag)!==-1);){if(E&&E.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},w.prototype.try_pop=function(_,E){var g=this._get_frame([_],E);return this._try_pop_frame(g)},w.prototype.indent_to_tag=function(_){var E=this._get_frame(_);E&&(this._printer.indent_level=E.indent_level)};function y(_,E,g,j){this._source_text=_||"",E=E||{},this._js_beautify=g,this._css_beautify=j,this._tag_stack=null;var U=new a(E,"html");this._options=U,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"}y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,E=this._options.eol;this._options.eol==="auto"&&(E=`
`,_&&n.test(_)&&(E=_.match(n)[0])),_=_.replace(l,`
`);var g=_.match(/^[\t ]*/)[0],j={text:"",type:""},U=new h,S=new c(this._options,g),z=new d(_,this._options).tokenize();this._tag_stack=new w(S);for(var H=null,M=z.next();M.type!==s.EOF;)M.type===s.TAG_OPEN||M.type===s.COMMENT?(H=this._handle_tag_open(S,M,U,j),U=H):M.type===s.ATTRIBUTE||M.type===s.EQUALS||M.type===s.VALUE||M.type===s.TEXT&&!U.tag_complete?H=this._handle_inside_tag(S,M,U,z):M.type===s.TAG_CLOSE?H=this._handle_tag_close(S,M,U):M.type===s.TEXT?H=this._handle_text(S,M,U):S.add_raw_token(M),j=H,M=z.next();var V=S._output.get_code(E);return V},y.prototype._handle_tag_close=function(_,E,g){var j={text:E.text,type:E.type};return _.alignment_size=0,g.tag_complete=!0,_.set_space_before_token(E.newlines||E.whitespace_before!=="",!0),g.is_unformatted?_.add_raw_token(E):(g.tag_start_char==="<"&&(_.set_space_before_token(E.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&_.print_newline(!1)),_.print_token(E)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(_.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&_.set_wrap_point(),j},y.prototype._handle_inside_tag=function(_,E,g,j){var U=g.has_wrapped_attrs,S={text:E.text,type:E.type};if(_.set_space_before_token(E.newlines||E.whitespace_before!=="",!0),g.is_unformatted)_.add_raw_token(E);else if(g.tag_start_char==="{"&&E.type===s.TEXT)_.print_preserved_newlines(E)?(E.newlines=0,_.add_raw_token(E)):_.print_token(E);else{if(E.type===s.ATTRIBUTE?(_.set_space_before_token(!0),g.attr_count+=1):(E.type===s.EQUALS||E.type===s.VALUE&&E.previous.type===s.EQUALS)&&_.set_space_before_token(!1),E.type===s.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(_.traverse_whitespace(E),U=U||E.newlines!==0),this._is_wrap_attributes_force)){var z=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var H=!0,M=0,V;do{if(V=j.peek(M),V.type===s.ATTRIBUTE){H=!1;break}M+=1}while(M<4&&V.type!==s.EOF&&V.type!==s.TAG_CLOSE);z=!H}z&&(_.print_newline(!1),U=!0)}_.print_token(E),U=U||_.previous_token_wrapped(),g.has_wrapped_attrs=U}return S},y.prototype._handle_text=function(_,E,g){var j={text:E.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(_,E,g):g.is_unformatted||g.is_content_unformatted?_.add_raw_token(E):(_.traverse_whitespace(E),_.print_token(E)),j},y.prototype._print_custom_beatifier_text=function(_,E,g){var j=this;if(E.text!==""){var U=E.text,S,z=1,H="",M="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?S=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?S=this._css_beautify:g.custom_beautifier_name==="html"&&(S=function(oe,fe){var ye=new y(oe,fe,j._js_beautify,j._css_beautify);return ye.beautify()}),this._options.indent_scripts==="keep"?z=0:this._options.indent_scripts==="separate"&&(z=-_.indent_level);var V=_.get_full_indent(z);if(U=U.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&U[0]==="<"&&U.match(/^(<!--|<!\[CDATA\[)/)){var K=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(U);if(!K){_.add_raw_token(E);return}H=V+K[1]+`
`,U=K[4],K[5]&&(M=V+K[5]),U=U.replace(/\n[ \t]*$/,""),(K[2]||K[3].indexOf(`
`)!==-1)&&(K=K[3].match(/[ \t]+$/),K&&(E.whitespace_before=K[0]))}if(U)if(S){var $=function(){this.eol=`
`};$.prototype=this._options.raw_options;var Z=new $;U=S(V+U,Z)}else{var me=E.whitespace_before;me&&(U=U.replace(new RegExp(`
(`+me+")?","g"),`
`)),U=V+U.replace(/\n/g,`
`+V)}H&&(U?U=H+U+`
`+M:U=H+M),_.print_newline(!1),U&&(E.text=U,E.whitespace_before="",E.newlines=0,_.add_raw_token(E),_.print_newline(!0))}},y.prototype._handle_tag_open=function(_,E,g,j){var U=this._get_tag_open_token(E);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&E.type===s.TAG_OPEN&&E.text.indexOf("</")===0?(_.add_raw_token(E),U.start_tag_token=this._tag_stack.try_pop(U.tag_name)):(_.traverse_whitespace(E),this._set_tag_position(_,E,U,g,j),U.is_inline_element||_.set_wrap_point(),_.print_token(E)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(U.alignment_size=E.text.length+1),!U.tag_complete&&!U.is_unformatted&&(_.alignment_size=U.alignment_size),U};var h=function(_,E){if(this.parent=_||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="",!E)this.tag_complete=!0;else{var g;this.tag_start_char=E.text[0],this.text=E.text,this.tag_start_char==="<"?(g=E.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=E.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[1]:"",(E.text.startsWith("{{#>")||E.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&E.next!==null?this.tag_check=E.next.text.split(" ")[0]:this.tag_check=E.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),E.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||E.closed&&E.closed.text==="/>";var j=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(j=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(j)))}};y.prototype._get_tag_open_token=function(_){var E=new h(this._tag_stack.get_parser_token(),_);return E.alignment_size=this._options.wrap_attributes_indent_size,E.is_end_tag=E.is_end_tag||C(E.tag_check,this._options.void_elements),E.is_empty_element=E.tag_complete||E.is_start_tag&&E.is_end_tag,E.is_unformatted=!E.tag_complete&&C(E.tag_check,this._options.unformatted),E.is_content_unformatted=!E.is_empty_element&&C(E.tag_check,this._options.content_unformatted),E.is_inline_element=C(E.tag_name,this._options.inline)||E.tag_name.includes("-")||E.tag_start_char==="{",E},y.prototype._set_tag_position=function(_,E,g,j,U){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||_.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=A(g.tag_check,E)))),C(g.tag_check,this._options.extra_liners)&&(_.print_newline(!1),_._output.just_added_blankline()||_.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 S=_.current_line_has_match(/{{#if/);S||_.print_newline(!1)}g.tag_name==="!--"&&U.type===s.TAG_CLOSE&&j.is_end_tag&&g.text.indexOf(`
`)===-1||(g.is_inline_element||g.is_unformatted||_.print_newline(!1),this._calcluate_parent_multiline(_,g))}else if(g.is_end_tag){var z=!1;z=g.start_tag_token&&g.start_tag_token.multiline_content,z=z||!g.is_inline_element&&!(j.is_inline_element||j.is_unformatted)&&!(U.type===s.TAG_CLOSE&&g.start_tag_token===j)&&U.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(z=!1),z&&_.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)&&(U.type!=="TK_CONTENT"||g.is_content_unformatted)&&_.print_newline(!1),this._calcluate_parent_multiline(_,g)},y.prototype._calcluate_parent_multiline=function(_,E){E.parent&&_._output.just_added_newline()&&!((E.is_inline_element||E.is_unformatted)&&E.parent.is_inline_element)&&(E.parent.multiline_content=!0)};var p=["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"],v=["a","audio","del","ins","map","noscript","video"];y.prototype._do_optional_end_element=function(_){var E=null;if(_.is_empty_element||!_.is_start_tag||!_.parent)return;if(_.tag_name==="body")E=E||this._tag_stack.try_pop("head");else if(_.tag_name==="li")E=E||this._tag_stack.try_pop("li",["ol","ul"]);else if(_.tag_name==="dd"||_.tag_name==="dt")E=E||this._tag_stack.try_pop("dt",["dl"]),E=E||this._tag_stack.try_pop("dd",["dl"]);else if(_.parent.tag_name==="p"&&p.indexOf(_.tag_name)!==-1){var g=_.parent.parent;(!g||v.indexOf(g.tag_name)===-1)&&(E=E||this._tag_stack.try_pop("p"))}else _.tag_name==="rp"||_.tag_name==="rt"?(E=E||this._tag_stack.try_pop("rt",["ruby","rtc"]),E=E||this._tag_stack.try_pop("rp",["ruby","rtc"])):_.tag_name==="optgroup"?E=E||this._tag_stack.try_pop("optgroup",["select"]):_.tag_name==="option"?E=E||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):_.tag_name==="colgroup"?E=E||this._tag_stack.try_pop("caption",["table"]):_.tag_name==="thead"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"])):_.tag_name==="tbody"||_.tag_name==="tfoot"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"]),E=E||this._tag_stack.try_pop("thead",["table"]),E=E||this._tag_stack.try_pop("tbody",["table"])):_.tag_name==="tr"?(E=E||this._tag_stack.try_pop("caption",["table"]),E=E||this._tag_stack.try_pop("colgroup",["table"]),E=E||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(_.tag_name==="th"||_.tag_name==="td")&&(E=E||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),E=E||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return _.parent=this._tag_stack.get_parser_token(),E},o.exports.Beautifier=y},function(o,u,f){var a=f(6).Options;function i(d){a.call(this,d,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}i.prototype=new a,o.exports.Options=i},function(o,u,f){var a=f(9).Tokenizer,i=f(9).TOKEN,d=f(13).Directives,s=f(14).TemplatablePattern,n=f(12).Pattern,l={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},c=new d(/<\!--/,/-->/),x=function(A,C){a.call(this,A,C),this._current_tag_name="";var k=new s(this._input).read_options(this._options),w=new n(this._input);if(this.__patterns={word:k.until(/[\n\r\t <]/),single_quote:k.until_after(/'/),double_quote:k.until_after(/"/),attribute:k.until(/[\n\r\t =>]|\/>/),element_name:k.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 y=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=w.matching(y).until_after(y)}};x.prototype=new a,x.prototype._is_comment=function(A){return!1},x.prototype._is_opening=function(A){return A.type===l.TAG_OPEN},x.prototype._is_closing=function(A,C){return A.type===l.TAG_CLOSE&&C&&((A.text===">"||A.text==="/>")&&C.text[0]==="<"||A.text==="}}"&&C.text[0]==="{"&&C.text[1]==="{")},x.prototype._reset=function(){this._current_tag_name=""},x.prototype._get_next_token=function(A,C){var k=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(l.EOF,""):(k=k||this._read_open_handlebars(w,C),k=k||this._read_attribute(w,A,C),k=k||this._read_close(w,C),k=k||this._read_raw_content(w,A,C),k=k||this._read_content_word(w),k=k||this._read_comment_or_cdata(w),k=k||this._read_processing(w),k=k||this._read_open(w,C),k=k||this._create_token(l.UNKNOWN,this._input.next()),k)},x.prototype._read_comment_or_cdata=function(A){var C=null,k=null,w=null;if(A==="<"){var y=this._input.peek(1);y==="!"&&(k=this.__patterns.comment.read(),k?(w=c.get_directives(k),w&&w.ignore==="start"&&(k+=c.readIgnored(this._input))):k=this.__patterns.cdata.read()),k&&(C=this._create_token(l.COMMENT,k),C.directives=w)}return C},x.prototype._read_processing=function(A){var C=null,k=null,w=null;if(A==="<"){var y=this._input.peek(1);(y==="!"||y==="?")&&(k=this.__patterns.conditional_comment.read(),k=k||this.__patterns.processing.read()),k&&(C=this._create_token(l.COMMENT,k),C.directives=w)}return C},x.prototype._read_open=function(A,C){var k=null,w=null;return C||A==="<"&&(k=this._input.next(),this._input.peek()==="/"&&(k+=this._input.next()),k+=this.__patterns.element_name.read(),w=this._create_token(l.TAG_OPEN,k)),w},x.prototype._read_open_handlebars=function(A,C){var k=null,w=null;return C||this._options.indent_handlebars&&A==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(k=this.__patterns.handlebars_comment.read(),k=k||this.__patterns.handlebars.read(),w=this._create_token(l.COMMENT,k)):(k=this.__patterns.handlebars_open.read(),w=this._create_token(l.TAG_OPEN,k))),w},x.prototype._read_close=function(A,C){var k=null,w=null;return C&&(C.text[0]==="<"&&(A===">"||A==="/"&&this._input.peek(1)===">")?(k=this._input.next(),A==="/"&&(k+=this._input.next()),w=this._create_token(l.TAG_CLOSE,k)):C.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),w=this._create_token(l.TAG_CLOSE,"}}"))),w},x.prototype._read_attribute=function(A,C,k){var w=null,y="";if(k&&k.text[0]==="<")if(A==="=")w=this._create_token(l.EQUALS,this._input.next());else if(A==='"'||A==="'"){var h=this._input.next();A==='"'?h+=this.__patterns.double_quote.read():h+=this.__patterns.single_quote.read(),w=this._create_token(l.VALUE,h)}else y=this.__patterns.attribute.read(),y&&(C.type===l.EQUALS?w=this._create_token(l.VALUE,y):w=this._create_token(l.ATTRIBUTE,y));return w},x.prototype._is_content_unformatted=function(A){return this._options.void_elements.indexOf(A)===-1&&(this._options.content_unformatted.indexOf(A)!==-1||this._options.unformatted.indexOf(A)!==-1)},x.prototype._read_raw_content=function(A,C,k){var w="";if(k&&k.text[0]==="{")w=this.__patterns.handlebars_raw_close.read();else if(C.type===l.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var y=C.opened.text.substr(1).toLowerCase();if(y==="script"||y==="style"){var h=this._read_comment_or_cdata(A);if(h)return h.type=l.TEXT,h;w=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(y)&&(w=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig")))}return w?this._create_token(l.TEXT,w):null},x.prototype._read_content_word=function(A){var C="";if(this._options.unformatted_content_delimiter&&(A===this._options.unformatted_content_delimiter[0]&&(C=this.__patterns.unformatted_content_delimiter.read())),C||(C=this.__patterns.word.read()),C)return this._create_token(l.TEXT,C)},o.exports.Tokenizer=x,o.exports.TOKEN=l}],m={};function t(o){var u=m[o];if(u!==void 0)return u.exports;var f=m[o]={exports:{}};return P[o](f,f.exports,t),f.exports}var b=t(18);I=b})();var F=I;if(!0)!(Y=[L,L("6UM0"),L("TXwP")],B=function(P){var m=L("6UM0"),t=L("TXwP");return{html_beautify:function(b,o){return F(b,o,m.js_beautify,t.css_beautify)}}}.apply(J,Y),B!==void 0&&(Be.exports=B));else var T,R})()},pzxd:function(Be,J,L){var Y=L("bYtY"),B=Y.retrieve2,I=Y.retrieve3,F=Y.each,T=Y.normalizeCssArray,R=Y.isString,P=Y.isObject,m=L("6GrX"),t=L("VpOo"),b=L("Xnb7"),o=L("fW2E"),u=L("gut8"),f=u.ContextCachedBy,a=u.WILL_BE_RESTORED,i=m.DEFAULT_FONT,d={left:1,right:1,center:1},s={top:1,bottom:1,middle:1},n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],l={},c={};function x(V){return A(V),F(V.rich,A),V}function A(V){if(V){V.font=m.makeFont(V);var K=V.textAlign;K==="middle"&&(K="center"),V.textAlign=K==null||d[K]?K:"left";var $=V.textVerticalAlign||V.textBaseline;$==="center"&&($="middle"),V.textVerticalAlign=$==null||s[$]?$:"top";var Z=V.textPadding;Z&&(V.textPadding=T(V.textPadding))}}function C(V,K,$,Z,me,oe){Z.rich?w(V,K,$,Z,me,oe):k(V,K,$,Z,me,oe)}function k(V,K,$,Z,me,oe){"use strict";var fe=v(Z),ye,Ie=!1,ve=K.__attrCachedBy===f.PLAIN_TEXT;oe!==a?(oe&&(ye=oe.style,Ie=!fe&&ve&&ye),K.__attrCachedBy=fe?f.NONE:f.PLAIN_TEXT):ve&&(K.__attrCachedBy=f.NONE);var de=Z.font||i;(!Ie||de!==(ye.font||i))&&(K.font=de);var Je=V.__computedFont;V.__styleFont!==de&&(V.__styleFont=de,Je=V.__computedFont=K.font);var Rt=Z.textPadding,Ee=Z.textLineHeight,Me=V.__textCotentBlock;(!Me||V.__dirtyText)&&(Me=V.__textCotentBlock=m.parsePlainText($,Je,Rt,Ee,Z.truncate));var rt=Me.outerHeight,He=Me.lines,ke=Me.lineHeight,ht=g(c,V,Z,me),ie=ht.baseX,xe=ht.baseY,we=ht.textAlign||"left",$e=ht.textVerticalAlign;h(K,Z,me,ie,xe);var ct=m.adjustTextY(xe,rt,$e),yt=ie,Ut=ct;if(fe||Rt){var We=m.getWidth($,Je),kt=We;Rt&&(kt+=Rt[1]+Rt[3]);var qt=m.adjustTextX(ie,kt,we);fe&&_(V,K,Z,qt,ct,kt,rt),Rt&&(yt=H(ie,we,Rt),Ut+=Rt[0])}K.textAlign=we,K.textBaseline="middle",K.globalAlpha=Z.opacity||1;for(var Pe=0;Pe<n.length;Pe++){var Ae=n[Pe],ut=Ae[0],Et=Ae[1],Ze=Z[ut];(!Ie||Ze!==ye[ut])&&(K[Et]=o(K,Et,Ze||Ae[2]))}Ut+=ke/2;var dt=Z.textStrokeWidth,Ne=Ie?ye.textStrokeWidth:null,Te=!Ie||dt!==Ne,Oe=!Ie||Te||Z.textStroke!==ye.textStroke,ae=U(Z.textStroke,dt),le=S(Z.textFill);if(ae&&(Te&&(K.lineWidth=dt),Oe&&(K.strokeStyle=ae)),le&&((!Ie||Z.textFill!==ye.textFill)&&(K.fillStyle=le)),He.length===1)ae&&K.strokeText(He[0],yt,Ut),le&&K.fillText(He[0],yt,Ut);else for(var Pe=0;Pe<He.length;Pe++)ae&&K.strokeText(He[Pe],yt,Ut),le&&K.fillText(He[Pe],yt,Ut),Ut+=ke}function w(V,K,$,Z,me,oe){oe!==a&&(K.__attrCachedBy=f.NONE);var fe=V.__textCotentBlock;(!fe||V.__dirtyText)&&(fe=V.__textCotentBlock=m.parseRichText($,Z)),y(V,K,fe,Z,me)}function y(V,K,$,Z,me){var oe=$.width,fe=$.outerWidth,ye=$.outerHeight,Ie=Z.textPadding,ve=g(c,V,Z,me),de=ve.baseX,Je=ve.baseY,Rt=ve.textAlign,Ee=ve.textVerticalAlign;h(K,Z,me,de,Je);var Me=m.adjustTextX(de,fe,Rt),rt=m.adjustTextY(Je,ye,Ee),He=Me,ke=rt;Ie&&(He+=Ie[3],ke+=Ie[0]);var ht=He+oe;v(Z)&&_(V,K,Z,Me,rt,fe,ye);for(var ie=0;ie<$.lines.length;ie++){for(var xe=$.lines[ie],we=xe.tokens,$e=we.length,ct=xe.lineHeight,yt=xe.width,Ut=0,We=He,kt=ht,qt=$e-1,Pe;Ut<$e&&(Pe=we[Ut],!Pe.textAlign||Pe.textAlign==="left");)p(V,K,Pe,Z,ct,ke,We,"left"),yt-=Pe.width,We+=Pe.width,Ut++;for(;qt>=0&&(Pe=we[qt],Pe.textAlign==="right");)p(V,K,Pe,Z,ct,ke,kt,"right"),yt-=Pe.width,kt-=Pe.width,qt--;for(We+=(oe-(We-He)-(ht-kt)-yt)/2;Ut<=qt;)Pe=we[Ut],p(V,K,Pe,Z,ct,ke,We+Pe.width/2,"center"),We+=Pe.width,Ut++;ke+=ct}}function h(V,K,$,Z,me){if($&&K.textRotation){var oe=K.textOrigin;oe==="center"?(Z=$.width/2+$.x,me=$.height/2+$.y):oe&&(Z=oe[0]+$.x,me=oe[1]+$.y),V.translate(Z,me),V.rotate(-K.textRotation),V.translate(-Z,-me)}}function p(V,K,$,Z,me,oe,fe,ye){var Ie=Z.rich[$.styleName]||{};Ie.text=$.text;var ve=$.textVerticalAlign,de=oe+me/2;ve==="top"?de=oe+$.height/2:ve==="bottom"&&(de=oe+me-$.height/2),!$.isLineHolder&&v(Ie)&&_(V,K,Ie,ye==="right"?fe-$.width:ye==="center"?fe-$.width/2:fe,de-$.height/2,$.width,$.height);var Je=$.textPadding;Je&&(fe=H(fe,ye,Je),de-=$.height/2-Je[2]-$.textHeight/2),j(K,"shadowBlur",I(Ie.textShadowBlur,Z.textShadowBlur,0)),j(K,"shadowColor",Ie.textShadowColor||Z.textShadowColor||"transparent"),j(K,"shadowOffsetX",I(Ie.textShadowOffsetX,Z.textShadowOffsetX,0)),j(K,"shadowOffsetY",I(Ie.textShadowOffsetY,Z.textShadowOffsetY,0)),j(K,"textAlign",ye),j(K,"textBaseline","middle"),j(K,"font",$.font||i);var Rt=U(Ie.textStroke||Z.textStroke,Me),Ee=S(Ie.textFill||Z.textFill),Me=B(Ie.textStrokeWidth,Z.textStrokeWidth);Rt&&(j(K,"lineWidth",Me),j(K,"strokeStyle",Rt),K.strokeText($.text,fe,de)),Ee&&(j(K,"fillStyle",Ee),K.fillText($.text,fe,de))}function v(V){return!!(V.textBackgroundColor||V.textBorderWidth&&V.textBorderColor)}function _(V,K,$,Z,me,oe,fe){var ye=$.textBackgroundColor,Ie=$.textBorderWidth,ve=$.textBorderColor,de=R(ye);if(j(K,"shadowBlur",$.textBoxShadowBlur||0),j(K,"shadowColor",$.textBoxShadowColor||"transparent"),j(K,"shadowOffsetX",$.textBoxShadowOffsetX||0),j(K,"shadowOffsetY",$.textBoxShadowOffsetY||0),de||Ie&&ve){K.beginPath();var Je=$.textBorderRadius;Je?t.buildPath(K,{x:Z,y:me,width:oe,height:fe,r:Je}):K.rect(Z,me,oe,fe),K.closePath()}if(de)if(j(K,"fillStyle",ye),$.fillOpacity!=null){var Rt=K.globalAlpha;K.globalAlpha=$.fillOpacity*$.opacity,K.fill(),K.globalAlpha=Rt}else K.fill();else if(P(ye)){var Ee=ye.image;Ee=b.createOrUpdateImage(Ee,null,V,E,ye),Ee&&b.isImageReady(Ee)&&K.drawImage(Ee,Z,me,oe,fe)}if(Ie&&ve)if(j(K,"lineWidth",Ie),j(K,"strokeStyle",ve),$.strokeOpacity!=null){var Rt=K.globalAlpha;K.globalAlpha=$.strokeOpacity*$.opacity,K.stroke(),K.globalAlpha=Rt}else K.stroke()}function E(V,K){K.image=V}function g(V,K,$,Z){var me=$.x||0,oe=$.y||0,fe=$.textAlign,ye=$.textVerticalAlign;if(Z){var Ie=$.textPosition;if(Ie instanceof Array)me=Z.x+z(Ie[0],Z.width),oe=Z.y+z(Ie[1],Z.height);else{var ve=K&&K.calculateTextPosition?K.calculateTextPosition(l,$,Z):m.calculateTextPosition(l,$,Z);me=ve.x,oe=ve.y,fe=fe||ve.textAlign,ye=ye||ve.textVerticalAlign}var de=$.textOffset;de&&(me+=de[0],oe+=de[1])}return V=V||{},V.baseX=me,V.baseY=oe,V.textAlign=fe,V.textVerticalAlign=ye,V}function j(V,K,$){return V[K]=o(V,K,$),V[K]}function U(V,K){return V==null||K<=0||V==="transparent"||V==="none"?null:V.image||V.colorStops?"#000":V}function S(V){return V==null||V==="none"?null:V.image||V.colorStops?"#000":V}function z(V,K){return typeof V=="string"?V.lastIndexOf("%")>=0?parseFloat(V)/100*K:parseFloat(V):V}function H(V,K,$){return K==="right"?V-$[1]:K==="center"?V+$[3]/2-$[1]/2:V+$[3]}function M(V,K){return V!=null&&(V||K.textBackgroundColor||K.textBorderWidth&&K.textBorderColor||K.textPadding)}J.normalizeTextStyle=x,J.renderText=C,J.getBoxPosition=g,J.getStroke=U,J.getFill=S,J.parsePercent=z,J.needDrawText=M},qH13:function(Be,J,L){var Y=L("ItGF"),B=L("QBsz"),I=B.applyTransform,F=L("mFDi"),T=L("Qe9p"),R=L("6GrX"),P=L("pzxd"),m=L("ni6a"),t=L("Gev7"),b=L("Dagg"),o=L("dqUG"),u=L("y+Vt"),f=L("IMiH"),a=L("QuXc"),i=L("06Qe"),d=f.CMD,s=Math.round,n=Math.sqrt,l=Math.abs,c=Math.cos,x=Math.sin,A=Math.max;if(!Y.canvasSupported){var C=",",k="progid:DXImageTransform.Microsoft",w=21600,y=w/2,h=1e5,p=1e3,v=function(ie){ie.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ie.coordsize=w+","+w,ie.coordorigin="0,0"},_=function(ie){return String(ie).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},E=function(ie,xe,we){return"rgb("+[ie,xe,we].join(",")+")"},g=function(ie,xe){xe&&ie&&xe.parentNode!==ie&&ie.appendChild(xe)},j=function(ie,xe){xe&&ie&&xe.parentNode===ie&&ie.removeChild(xe)},U=function(ie,xe,we){return(parseFloat(ie)||0)*h+(parseFloat(xe)||0)*p+we},S=P.parsePercent,z=function(ie,xe,we){var $e=T.parse(xe);we=+we,isNaN(we)&&(we=1),$e&&(ie.color=E($e[0],$e[1],$e[2]),ie.opacity=we*$e[3])},H=function(ie){var xe=T.parse(ie);return[E(xe[0],xe[1],xe[2]),xe[3]]},M=function(ie,xe,we){var $e=xe.fill;if($e!=null)if($e instanceof a){var ct,yt=0,Ut=[0,0],We=0,kt=1,qt=we.getBoundingRect(),Pe=qt.width,Ae=qt.height;if($e.type==="linear"){ct="gradient";var ut=we.transform,Et=[$e.x*Pe,$e.y*Ae],Ze=[$e.x2*Pe,$e.y2*Ae];ut&&(I(Et,Et,ut),I(Ze,Ze,ut));var dt=Ze[0]-Et[0],Ne=Ze[1]-Et[1];yt=Math.atan2(dt,Ne)*180/Math.PI,yt<0&&(yt+=360),yt<1e-6&&(yt=0)}else{ct="gradientradial";var Et=[$e.x*Pe,$e.y*Ae],ut=we.transform,Te=we.scale,Oe=Pe,ae=Ae;Ut=[(Et[0]-qt.x)/Oe,(Et[1]-qt.y)/ae],ut&&I(Et,Et,ut),Oe/=Te[0]*w,ae/=Te[1]*w;var le=A(Oe,ae);We=2*0/le,kt=2*$e.r/le-We}var he=$e.colorStops.slice();he.sort(function(ft,be){return ft.offset-be.offset});for(var _e=he.length,Se=[],ze=[],xt=0;xt<_e;xt++){var Qt=he[xt],sn=H(Qt.color);ze.push(Qt.offset*kt+We+" "+sn[0]),(xt===0||xt===_e-1)&&Se.push(sn)}if(_e>=2){var gt=Se[0][0],zt=Se[1][0],Ot=Se[0][1]*xe.opacity,At=Se[1][1]*xe.opacity;ie.type=ct,ie.method="none",ie.focus="100%",ie.angle=yt,ie.color=gt,ie.color2=zt,ie.colors=ze.join(","),ie.opacity=At,ie.opacity2=Ot}ct==="radial"&&(ie.focusposition=Ut.join(","))}else z(ie,$e,xe.opacity)},V=function(ie,xe){xe.lineDash&&(ie.dashstyle=xe.lineDash.join(" ")),xe.stroke!=null&&!(xe.stroke instanceof a)&&z(ie,xe.stroke,xe.opacity)},K=function(ie,xe,we,$e){var ct=xe==="fill",yt=ie.getElementsByTagName(xe)[0];we[xe]!=null&&we[xe]!=="none"&&(ct||!ct&&we.lineWidth)?(ie[ct?"filled":"stroked"]="true",we[xe]instanceof a&&j(ie,yt),yt||(yt=i.createNode(xe)),ct?M(yt,we,$e):V(yt,we),g(ie,yt)):(ie[ct?"filled":"stroked"]="false",j(ie,yt))},$=[[],[],[]],Z=function(ie,xe){var we=d.M,$e=d.C,ct=d.L,yt=d.A,Ut=d.Q,We=[],kt,qt,Pe,Ae,ut,Et,Ze=ie.data,dt=ie.len();for(Ae=0;Ae<dt;){Pe=Ze[Ae++],qt="",kt=0;switch(Pe){case we:qt=" m ",kt=1,ut=Ze[Ae++],Et=Ze[Ae++],$[0][0]=ut,$[0][1]=Et;break;case ct:qt=" l ",kt=1,ut=Ze[Ae++],Et=Ze[Ae++],$[0][0]=ut,$[0][1]=Et;break;case Ut:case $e:qt=" c ",kt=3;var Ne=Ze[Ae++],Te=Ze[Ae++],Oe=Ze[Ae++],ae=Ze[Ae++],le,he;Pe===Ut?(le=Oe,he=ae,Oe=(Oe+2*Ne)/3,ae=(ae+2*Te)/3,Ne=(ut+2*Ne)/3,Te=(Et+2*Te)/3):(le=Ze[Ae++],he=Ze[Ae++]),$[0][0]=Ne,$[0][1]=Te,$[1][0]=Oe,$[1][1]=ae,$[2][0]=le,$[2][1]=he,ut=le,Et=he;break;case yt:var _e=0,Se=0,ze=1,xt=1,Qt=0;xe&&(_e=xe[4],Se=xe[5],ze=n(xe[0]*xe[0]+xe[1]*xe[1]),xt=n(xe[2]*xe[2]+xe[3]*xe[3]),Qt=Math.atan2(-xe[1]/xt,xe[0]/ze));var sn=Ze[Ae++],gt=Ze[Ae++],zt=Ze[Ae++],Ot=Ze[Ae++],At=Ze[Ae++]+Qt,ft=Ze[Ae++]+At+Qt;Ae++;var be=Ze[Ae++],Fe=sn+c(At)*zt,Nt=gt+x(At)*Ot,Ne=sn+c(ft)*zt,Te=gt+x(ft)*Ot,bt=be?" wa ":" at ";Math.abs(Fe-Ne)<1e-4&&(Math.abs(ft-At)>.01?be&&(Fe+=270/w):Math.abs(Nt-gt)<1e-4?be&&Fe<sn||!be&&Fe>sn?Te-=270/w:Te+=270/w:be&&Nt<gt||!be&&Nt>gt?Ne+=270/w:Ne-=270/w),We.push(bt,s(((sn-zt)*ze+_e)*w-y),C,s(((gt-Ot)*xt+Se)*w-y),C,s(((sn+zt)*ze+_e)*w-y),C,s(((gt+Ot)*xt+Se)*w-y),C,s((Fe*ze+_e)*w-y),C,s((Nt*xt+Se)*w-y),C,s((Ne*ze+_e)*w-y),C,s((Te*xt+Se)*w-y)),ut=Ne,Et=Te;break;case d.R:var Kt=$[0],Zt=$[1];Kt[0]=Ze[Ae++],Kt[1]=Ze[Ae++],Zt[0]=Kt[0]+Ze[Ae++],Zt[1]=Kt[1]+Ze[Ae++],xe&&(I(Kt,Kt,xe),I(Zt,Zt,xe)),Kt[0]=s(Kt[0]*w-y),Zt[0]=s(Zt[0]*w-y),Kt[1]=s(Kt[1]*w-y),Zt[1]=s(Zt[1]*w-y),We.push(" m ",Kt[0],C,Kt[1]," l ",Zt[0],C,Kt[1]," l ",Zt[0],C,Zt[1]," l ",Kt[0],C,Zt[1]);break;case d.Z:We.push(" x ")}if(kt>0){We.push(qt);for(var Ge=0;Ge<kt;Ge++){var lt=$[Ge];xe&&I(lt,lt,xe),We.push(s(lt[0]*w-y),C,s(lt[1]*w-y),Ge<kt-1?C:"")}}}return We.join("")};u.prototype.brushVML=function(ie){var xe=this.style,we=this._vmlEl;we||(we=i.createNode("shape"),v(we),this._vmlEl=we),K(we,"fill",xe,this),K(we,"stroke",xe,this);var $e=this.transform,ct=$e!=null,yt=we.getElementsByTagName("stroke")[0];if(yt){var Ut=xe.lineWidth;if(ct&&!xe.strokeNoScale){var We=$e[0]*$e[3]-$e[1]*$e[2];Ut*=n(l(We))}yt.weight=Ut+"px"}var kt=this.path||(this.path=new f);this.__dirtyPath&&(kt.beginPath(),kt.subPixelOptimize=!1,this.buildPath(kt,this.shape),kt.toStatic(),this.__dirtyPath=!1),we.path=Z(kt,this.transform),we.style.zIndex=U(this.zlevel,this.z,this.z2),g(ie,we),xe.text!=null?this.drawRectText(ie,this.getBoundingRect()):this.removeRectText(ie)},u.prototype.onRemove=function(ie){j(ie,this._vmlEl),this.removeRectText(ie)},u.prototype.onAdd=function(ie){g(ie,this._vmlEl),this.appendRectText(ie)};var me=function(ie){return typeof ie=="object"&&ie.tagName&&ie.tagName.toUpperCase()==="IMG"};b.prototype.brushVML=function(ie){var xe=this.style,we=xe.image,$e,ct;if(me(we)){var yt=we.src;if(yt===this._imageSrc)$e=this._imageWidth,ct=this._imageHeight;else{var Ut=we.runtimeStyle,We=Ut.width,kt=Ut.height;Ut.width="auto",Ut.height="auto",$e=we.width,ct=we.height,Ut.width=We,Ut.height=kt,this._imageSrc=yt,this._imageWidth=$e,this._imageHeight=ct}we=yt}else we===this._imageSrc&&($e=this._imageWidth,ct=this._imageHeight);if(!we)return;var qt=xe.x||0,Pe=xe.y||0,Ae=xe.width,ut=xe.height,Et=xe.sWidth,Ze=xe.sHeight,dt=xe.sx||0,Ne=xe.sy||0,Te=Et&&Ze,Oe=this._vmlEl;Oe||(Oe=i.doc.createElement("div"),v(Oe),this._vmlEl=Oe);var ae=Oe.style,le=!1,he,_e=1,Se=1;if(this.transform&&(he=this.transform,_e=n(he[0]*he[0]+he[1]*he[1]),Se=n(he[2]*he[2]+he[3]*he[3]),le=he[1]||he[2]),le){var ze=[qt,Pe],xt=[qt+Ae,Pe],Qt=[qt,Pe+ut],sn=[qt+Ae,Pe+ut];I(ze,ze,he),I(xt,xt,he),I(Qt,Qt,he),I(sn,sn,he);var gt=A(ze[0],xt[0],Qt[0],sn[0]),zt=A(ze[1],xt[1],Qt[1],sn[1]),Ot=[];Ot.push("M11=",he[0]/_e,C,"M12=",he[2]/Se,C,"M21=",he[1]/_e,C,"M22=",he[3]/Se,C,"Dx=",s(qt*_e+he[4]),C,"Dy=",s(Pe*Se+he[5])),ae.padding="0 "+s(gt)+"px "+s(zt)+"px 0",ae.filter=k+".Matrix("+Ot.join("")+", SizingMethod=clip)"}else he&&(qt=qt*_e+he[4],Pe=Pe*Se+he[5]),ae.filter="",ae.left=s(qt)+"px",ae.top=s(Pe)+"px";var At=this._imageEl,ft=this._cropEl;At||(At=i.doc.createElement("div"),this._imageEl=At);var be=At.style;if(Te){if($e&&ct)be.width=s(_e*$e*Ae/Et)+"px",be.height=s(Se*ct*ut/Ze)+"px";else{var Fe=new Image,Nt=this;Fe.onload=function(){Fe.onload=null,$e=Fe.width,ct=Fe.height,be.width=s(_e*$e*Ae/Et)+"px",be.height=s(Se*ct*ut/Ze)+"px",Nt._imageWidth=$e,Nt._imageHeight=ct,Nt._imageSrc=we},Fe.src=we}ft||(ft=i.doc.createElement("div"),ft.style.overflow="hidden",this._cropEl=ft);var bt=ft.style;bt.width=s((Ae+dt*Ae/Et)*_e),bt.height=s((ut+Ne*ut/Ze)*Se),bt.filter=k+".Matrix(Dx="+-dt*Ae/Et*_e+",Dy="+-Ne*ut/Ze*Se+")",ft.parentNode||Oe.appendChild(ft),At.parentNode!==ft&&ft.appendChild(At)}else be.width=s(_e*Ae)+"px",be.height=s(Se*ut)+"px",Oe.appendChild(At),ft&&ft.parentNode&&(Oe.removeChild(ft),this._cropEl=null);var Kt="",Zt=xe.opacity;Zt<1&&(Kt+=".Alpha(opacity="+s(Zt*100)+") "),Kt+=k+".AlphaImageLoader(src="+we+", SizingMethod=scale)",be.filter=Kt,Oe.style.zIndex=U(this.zlevel,this.z,this.z2),g(ie,Oe),xe.text!=null&&this.drawRectText(ie,this.getBoundingRect())},b.prototype.onRemove=function(ie){j(ie,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ie)},b.prototype.onAdd=function(ie){g(ie,this._vmlEl),this.appendRectText(ie)};var oe="normal",fe={},ye=0,Ie=100,ve=document.createElement("div"),de=function(ie){var xe=fe[ie];if(!xe){ye>Ie&&(ye=0,fe={});var we=ve.style,$e;try{we.font=ie,$e=we.fontFamily.split(",")[0]}catch(ct){}xe={style:we.fontStyle||oe,variant:we.fontVariant||oe,weight:we.fontWeight||oe,size:parseFloat(we.fontSize||12)|0,family:$e||"Microsoft YaHei"},fe[ie]=xe,ye++}return xe},Je;R.$override("measureText",function(ie,xe){var we=i.doc;Je||(Je=we.createElement("div"),Je.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",i.doc.body.appendChild(Je));try{Je.style.font=xe}catch($e){}return Je.innerHTML="",Je.appendChild(we.createTextNode(ie)),{width:Je.offsetWidth}});for(var Rt=new F,Ee=function(ie,xe,we,$e){var ct=this.style;this.__dirty&&P.normalizeTextStyle(ct,!0);var yt=ct.text;if(yt!=null&&(yt+=""),!yt)return;if(ct.rich){var Ut=R.parseRichText(yt,ct);yt=[];for(var We=0;We<Ut.lines.length;We++){for(var kt=Ut.lines[We].tokens,qt=[],Pe=0;Pe<kt.length;Pe++)qt.push(kt[Pe].text);yt.push(qt.join(""))}yt=yt.join(`
`)}var Ae,ut,Et=ct.textAlign,Ze=ct.textVerticalAlign,dt=de(ct.font),Ne=dt.style+" "+dt.variant+" "+dt.weight+" "+dt.size+'px "'+dt.family+'"';we=we||R.getBoundingRect(yt,Ne,Et,Ze,ct.textPadding,ct.textLineHeight);var Te=this.transform;if(Te&&!$e&&(Rt.copy(xe),Rt.applyTransform(Te),xe=Rt),$e)Ae=xe.x,ut=xe.y;else{var Oe=ct.textPosition;if(Oe instanceof Array)Ae=xe.x+S(Oe[0],xe.width),ut=xe.y+S(Oe[1],xe.height),Et=Et||"left";else{var ae=this.calculateTextPosition?this.calculateTextPosition({},ct,xe):R.calculateTextPosition({},ct,xe);Ae=ae.x,ut=ae.y,Et=Et||ae.textAlign,Ze=Ze||ae.textVerticalAlign}}Ae=R.adjustTextX(Ae,we.width,Et),ut=R.adjustTextY(ut,we.height,Ze),ut+=we.height/2;var le=i.createNode,he=this._textVmlEl,_e,Se,ze;he?(ze=he.firstChild,_e=ze.nextSibling,Se=_e.nextSibling):(he=le("line"),_e=le("path"),Se=le("textpath"),ze=le("skew"),Se.style["v-text-align"]="left",v(he),_e.textpathok=!0,Se.on=!0,he.from="0 0",he.to="1000 0.05",g(he,ze),g(he,_e),g(he,Se),this._textVmlEl=he);var xt=[Ae,ut],Qt=he.style;Te&&$e?(I(xt,xt,Te),ze.on=!0,ze.matrix=Te[0].toFixed(3)+C+Te[2].toFixed(3)+C+Te[1].toFixed(3)+C+Te[3].toFixed(3)+",0,0",ze.offset=(s(xt[0])||0)+","+(s(xt[1])||0),ze.origin="0 0",Qt.left="0px",Qt.top="0px"):(ze.on=!1,Qt.left=s(Ae)+"px",Qt.top=s(ut)+"px"),Se.string=_(yt);try{Se.style.font=Ne}catch(sn){}K(he,"fill",{fill:ct.textFill,opacity:ct.opacity},this),K(he,"stroke",{stroke:ct.textStroke,opacity:ct.opacity,lineDash:ct.lineDash||null},this),he.style.zIndex=U(this.zlevel,this.z,this.z2),g(ie,he)},Me=function(ie){j(ie,this._textVmlEl),this._textVmlEl=null},rt=function(ie){g(ie,this._textVmlEl)},He=[m,t,b,u,o],ke=0;ke<He.length;ke++){var ht=He[ke].prototype;ht.drawRectText=Ee,ht.removeRectText=Me,ht.appendRectText=rt}o.prototype.brushVML=function(ie){var xe=this.style;xe.text!=null?this.drawRectText(ie,{x:xe.x||0,y:xe.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ie)},o.prototype.onRemove=function(ie){this.removeRectText(ie)},o.prototype.onAdd=function(ie){this.appendRectText(ie)}}},r6Bn:function(Be,J,L){var Y=L("bYtY"),B=L("ItGF"),I=L("4fz+"),F=L("BPZU");function T(m,t){return m.zlevel===t.zlevel?m.z===t.z?m.z2-t.z2:m.z-t.z:m.zlevel-t.zlevel}var R=function(){this._roots=[],this._displayList=[],this._displayListLen=0};R.prototype={constructor:R,traverse:function(m,t){for(var b=0;b<this._roots.length;b++)this._roots[b].traverse(m,t)},getDisplayList:function(m,t){return t=t||!1,m&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(m){this._displayListLen=0;for(var t=this._roots,b=this._displayList,o=0,u=t.length;o<u;o++)this._updateAndAddDisplayable(t[o],null,m);b.length=this._displayListLen,B.canvasSupported&&F(b,T)},_updateAndAddDisplayable:function(m,t,b){if(m.ignore&&!b)return;m.beforeUpdate(),m.__dirty&&m.update(),m.afterUpdate();var o=m.clipPath;if(o){t?t=t.slice():t=[];for(var u=o,f=m;u;)u.parent=f,u.updateTransform(),t.push(u),f=u,u=u.clipPath}if(m.isGroup){for(var a=m._children,i=0;i<a.length;i++){var d=a[i];m.__dirty&&(d.__dirty=!0),this._updateAndAddDisplayable(d,t,b)}m.__dirty=!1}else m.__clipPaths=t,this._displayList[this._displayListLen++]=m},addRoot:function(m){if(m.__storage===this)return;m instanceof I&&m.addChildrenToStorage(this),this.addToStorage(m),this._roots.push(m)},delRoot:function(m){if(m==null){for(var t=0;t<this._roots.length;t++){var b=this._roots[t];b instanceof I&&b.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(m instanceof Array){for(var t=0,o=m.length;t<o;t++)this.delRoot(m[t]);return}var u=Y.indexOf(this._roots,m);u>=0&&(this.delFromStorage(m),this._roots.splice(u,1),m instanceof I&&m.delChildrenFromStorage(this))},addToStorage:function(m){return m&&(m.__storage=this,m.dirty(!1)),this},delFromStorage:function(m){return m&&(m.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:T};var P=R;Be.exports=P},rA99:function(Be,J,L){var Y=L("y+Vt"),B=L("QBsz"),I=L("Sj9i"),F=I.quadraticSubdivide,T=I.cubicSubdivide,R=I.quadraticAt,P=I.cubicAt,m=I.quadraticDerivativeAt,t=I.cubicDerivativeAt,b=[];function o(f,a,i){var d=f.cpx2,s=f.cpy2;return d===null||s===null?[(i?t:P)(f.x1,f.cpx1,f.cpx2,f.x2,a),(i?t:P)(f.y1,f.cpy1,f.cpy2,f.y2,a)]:[(i?m:R)(f.x1,f.cpx1,f.x2,a),(i?m:R)(f.y1,f.cpy1,f.y2,a)]}var u=Y.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(f,a){var i=a.x1,d=a.y1,s=a.x2,n=a.y2,l=a.cpx1,c=a.cpy1,x=a.cpx2,A=a.cpy2,C=a.percent;if(C===0)return;f.moveTo(i,d),x==null||A==null?(C<1&&(F(i,l,s,C,b),l=b[1],s=b[2],F(d,c,n,C,b),c=b[1],n=b[2]),f.quadraticCurveTo(l,c,s,n)):(C<1&&(T(i,l,x,s,C,b),l=b[1],x=b[2],s=b[3],T(d,c,A,n,C,b),c=b[1],A=b[2],n=b[3]),f.bezierCurveTo(l,c,x,A,s,n))},pointAt:function(f){return o(this.shape,f,!1)},tangentAt:function(f){var a=o(this.shape,f,!0);return B.normalize(a,a)}});Be.exports=u},"rAM+":function(Be,J,L){"use strict";L.d(J,"a",function(){return B});var Y=L("Qw5x");function B(I,F){var T;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(T=Object(Y.a)(I))||F&&I&&typeof I.length=="number"){T&&(I=T);var R=0,P=function(){};return{s:P,n:function(){return R>=I.length?{done:!0}:{done:!1,value:I[R++]}},e:function(u){throw u},f:P}}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 m=!0,t=!1,b;return{s:function(){T=I[Symbol.iterator]()},n:function(){var u=T.next();return m=u.done,u},e:function(u){t=!0,b=u},f:function(){try{!m&&T.return!=null&&T.return()}finally{if(t)throw b}}}}},rUJ1:function(Be,J){const L=/[&<>"']/,Y=/[&<>"']/g,B=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},T=w=>F[w];function R(w,y){if(y){if(L.test(w))return w.replace(Y,T)}else if(B.test(w))return w.replace(I,T);return w}const P=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function m(w){return w.replace(P,(y,h)=>(h=h.toLowerCase(),h==="colon"?":":h.charAt(0)==="#"?h.charAt(1)==="x"?String.fromCharCode(parseInt(h.substring(2),16)):String.fromCharCode(+h.substring(1)):""))}const t=/(^|[^\[])\^/g;function b(w,y){w=w.source||w,y=y||"";const h={replace:(p,v)=>(v=v.source||v,v=v.replace(t,"$1"),w=w.replace(p,v),h),getRegex:()=>new RegExp(w,y)};return h}const o=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(w,y,h){if(w){let p;try{p=decodeURIComponent(m(h)).replace(o,"").toLowerCase()}catch(v){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}y&&!u.test(h)&&(h=n(y,h));try{h=encodeURI(h).replace(/%25/g,"%")}catch(p){return null}return h}const a={},i=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(w,y){a[" "+w]||(i.test(w)?a[" "+w]=w+"/":a[" "+w]=A(w,"/",!0)),w=a[" "+w];const h=w.indexOf(":")===-1;return y.substring(0,2)==="//"?h?y:w.replace(d,"$1")+y:y.charAt(0)==="/"?h?y:w.replace(s,"$1")+y:w+y}const l={exec:function(){}};function c(w){let y=1,h,p;for(;y<arguments.length;y++){h=arguments[y];for(p in h)Object.prototype.hasOwnProperty.call(h,p)&&(w[p]=h[p])}return w}function x(w,y){const h=w.replace(/\|/g,(_,E,g)=>{let j=!1,U=E;for(;--U>=0&&g[U]==="\\";)j=!j;return j?"|":" |"}),p=h.split(/ \|/);let v=0;if(p.length>y)p.splice(y);else for(;p.length<y;)p.push("");for(;v<p.length;v++)p[v]=p[v].trim().replace(/\\\|/g,"|");return p}function A(w,y,h){const p=w.length;if(p===0)return"";let v=0;for(;v<p;){const _=w.charAt(p-v-1);if(_===y&&!h)v++;else if(_!==y&&h)v++;else break}return w.substr(0,p-v)}function C(w,y){if(w.indexOf(y[1])===-1)return-1;const h=w.length;let p=0,v=0;for(;v<h;v++)if(w[v]==="\\")v++;else if(w[v]===y[0])p++;else if(w[v]===y[1]&&(p--,p<0))return v;return-1}function k(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")}Be.exports={escape:R,unescape:m,edit:b,cleanUrl:f,resolveUrl:n,noopTest:l,merge:c,splitCells:x,rtrim:A,findClosingBracket:C,checkSanitizeDeprecation:k}},rhHp:function(Be,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("sRBo"),F=L("kaz8"),T=L("7Kak"),R=L("9yH6"),P=L("14J3"),m=L("BMrR"),t=L("jCWc"),b=L("kPKH"),o=L("iQDF"),u=L("+eQT"),f=L("miYZ"),a=L("tsqr"),i=L("jrin"),d=L("oBTY"),s=L("k1fw"),n=L("9og8"),l=L("y8nQ"),c=L("Vl3Y"),x=L("tJVT"),A=L("WmNS"),C=L.n(A),k=L("q1tI"),w=L.n(k),y=L("wd/R"),h=L.n(y),p=L("ErOA"),v=L("1vsH"),_=L("Ty5D"),E=L("9kvl"),g=L("xKgJ"),j=L("oUNq"),U=L("4wi7"),S=L("eozf"),z=function(M){var V=M.classroomList,K=M.dispatch,$=M.courseEndTime,Z=Object(_.i)(),me=c.a.useForm(),oe=Object(x.a)(me,1),fe=oe[0],ye=Object(k.useState)(1),Ie=Object(x.a)(ye,2),ve=Ie[0],de=Ie[1],Je=Object(k.useState)([]),Rt=Object(x.a)(Je,2),Ee=Rt[0],Me=Rt[1],rt=Object(k.useState)(0),He=Object(x.a)(rt,2),ke=He[0],ht=He[1],ie=Object(k.useState)(20),xe=Object(x.a)(ie,2),we=xe[0],$e=xe[1],ct=Object(k.useState)(!0),yt=Object(x.a)(ct,2),Ut=yt[0],We=yt[1],kt=Object(k.useState)([]),qt=Object(x.a)(kt,2),Pe=qt[0],Ae=qt[1],ut=Object(k.useState)(!0),Et=Object(x.a)(ut,2),Ze=Et[0],dt=Et[1];Object(k.useEffect)(function(){if(V.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03"&&(Ne(),V.actionTabs.type===2)){var he=V.actionTabs.selectArrsAll[0];dt(he.unified_setting)}},[V.actionTabs]);var Ne=function(){var he=Object(n.a)(C.a.mark(function _e(Se){var ze,xt;return C.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return We(!0),sn.next=3,Object(j.D)(Object(s.a)(Object(s.a)({},Z),{},{page:Se||ve,limit:2e4,homework_id:V.actionTabs.type===1?"":V.actionTabs.selectArrs[0]}));case 3:ze=sn.sent,ze==null||ze.course_groups.map(function(gt,zt){gt.key=gt.id,gt.title=gt.name,gt.disabled=gt.is_published}),ze&&(Me(Object(d.a)(ze==null?void 0:ze.course_groups)),ht(ze==null?void 0:ze.course_groups_count),We(!1),Se||fe.setFieldsValue((xt={},Object(i.a)(xt,"publish_time",h()(h()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),Object(i.a)(xt,"end_time",h()(h()(new Date(Object(v.b)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))),xt)));case 6:case"end":return sn.stop()}},_e)}));return function(Se){return he.apply(this,arguments)}}(),Te=function(){var he=Object(n.a)(C.a.mark(function _e(){var Se,ze,xt,Qt;return C.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(ze=Object(s.a)({},fe.getFieldsValue()),!(ze.end_time<=ze.publish_time)){gt.next=4;break}return a.b.info("\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u6216\u7B49\u4E8E\u53D1\u5E03\u65F6\u95F4"),gt.abrupt("return");case 4:if(!((Pe==null?void 0:Pe.length)<=0&&!Ze&&Ee.length>0)){gt.next=7;break}return a.b.info("\u53D1\u5E03\u73ED\u7EA7\u4E0D\u80FD\u4E3A\u7A7A"),gt.abrupt("return");case 7:return xt={homework_ids:Object(d.a)(V.actionTabs.selectArrs),group_ids:Pe.length>0?Pe.map(function(zt){return zt.id}):(Se=V.detailShixunsList)===null||Se===void 0?void 0:Se.course_groups,end_time:h()(ze.end_time).format("YYYY-MM-DD HH:mm"),publish_time:h()(ze.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:!Pe.length},gt.next=10,Object(p.a)("/api/courses/".concat(Z.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(s.a)({},xt)});case 10:Qt=gt.sent,Qt.status===0&&(Oe(),Object(v.cb)(["\u6559\u5B66\u8BFE\u5802","\u8BFE\u7A0B\u5B9E\u9A8C","\u7ACB\u5373\u53D1\u5E03"]),a.b.success("\u53D1\u5E03\u6210\u529F"),K({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}),Object(g.c)()?V.actionTabs.detail?(K({type:"shixunHomeworks/setActionTabs",payload:{}}),K({type:"shixunHomeworks/getWorkList",payload:Object(s.a)({},Z)}),K({type:"shixunHomeworks/getWorkSetting",payload:Object(s.a)({},Z)})):K({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(s.a)(Object(s.a)({},V.actionTabs.params),{},{type:4})}):K({type:"classroomList/getClassroomShixunsList",payload:Object(s.a)({},V.actionTabs.params)}),localStorage.getItem("Noviceguide")==="0"||K({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5E95\u90E8\u5F39\u7A97",type:13,text:w.a.createElement("div",null,"\u6700\u540E\uFF0C\u54B1\u4EEC\u7ED9\u6559\u5B66\u8BFE\u5802\u6DFB\u52A0\u4E00\u540D\u5B66\u751F~\u70B9\u51FB\u201C\u6DFB\u52A0\u5B66\u751F\u201D\uFF0C\u5728\u5F39\u7A97\u9875\u9762\u4E2D\u8F93\u5165\u5E76\u641C\u7D22\u5B66\u751F\u59D3\u540D\uFF0C\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u5C31\u53EF\u4EE5\u4E3A\u60A8\u7684\u8BFE\u5802\u6DFB\u52A0\u7B2C\u4E00\u4F4D\u5B66\u751F\u5566~")}}));case 12:case"end":return gt.stop()}},_e)}));return function(){return he.apply(this,arguments)}}(),Oe=function(){de(1),Me([]),Ae([])},ae=ke>ve*we,le=V.detailShixunsList;return w.a.createElement(B.a,{width:600,centered:!0,title:"\u53D1\u5E03\u4F5C\u4E1A",visible:V.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03",okText:"\u53D1\u5E03\u4F5C\u4E1A",cancelText:"\u6682\u4E0D\u53D1\u5E03",onOk:Te,onCancel:function(){Oe(),K({type:"classroomList/setActionTabs",payload:{}})}},w.a.createElement("p",{className:"tc"},"\u5B66\u751F\u5C06\u7ACB\u5373\u6536\u5230\u4F5C\u4E1A",w.a.createElement("br",null),'\u672C\u64CD\u4F5C\u53EA\u5BF9"\u672A\u53D1\u5E03"\u7684\u4F5C\u4E1A\u6709\u6548'),w.a.createElement(c.a,{form:fe},w.a.createElement("div",{style:{paddingLeft:0}},w.a.createElement(m.a,{className:"mt30",align:"middle"},w.a.createElement(b.a,null,w.a.createElement(c.a.Item,{name:"publish_time",label:"\u53D1\u5E03\u65F6\u95F4"},w.a.createElement(u.a,{style:{width:155,marginRight:"25px"},getPopupContainer:function(_e){return _e.parentNode},disabledDate:function(_e){return Object(S.b)(_e,$)},disabledTime:function(_e){return Object(S.c)(_e)},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:h()(Object(v.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),w.a.createElement(b.a,{className:"ml20"},w.a.createElement(c.a.Item,{name:"end_time",label:"\u622A\u6B62\u65F6\u95F4:"},w.a.createElement(u.a,{style:{width:170},getPopupContainer:function(_e){return _e.parentNode},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:h()(Object(v.d)(),"HH:mm")},disabledDate:function(_e){return Object(S.b)(_e,$,fe.getFieldValue("publish_time"))},disabledTime:function(_e){return Object(S.c)(_e,fe.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})))),V.actionTabs.type===2&&w.a.createElement(m.a,{style:{marginBottom:"10px"}},w.a.createElement("span",{className:"mr5"},"\u53D1\u5E03\u8BBE\u7F6E:"),w.a.createElement(R.a.Group,{value:Ze,onChange:function(_e){dt(_e.target.value),Ae([])}},w.a.createElement(R.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),w.a.createElement(R.a,{className:"ml20",disabled:Ee.length<=0,value:!1},"\u5206\u73ED\u53D1\u5E03"))),Ee.length<=0&&V.actionTabs.type===2&&w.a.createElement("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},'\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03"')),(V.actionTabs.type===1||!Ze)&&Ee.length>0&&w.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},w.a.createElement("span",{style:{flex:1}},w.a.createElement(F.a,{checked:Pe.length===Ee.length,onChange:function(_e){Pe.length===Ee.length?Ae([]):Ae(Ee)}},"\u5168\u9009")),w.a.createElement("span",{style:{width:16}}),w.a.createElement("span",{style:{flex:1}},"\u5DF2\u9009\u62E9",Pe.length||0,"\u4E2A\u5206\u73ED")),(V.actionTabs.type===1||!Ze)&&Ee.length>0&&w.a.createElement(U.a,{data:Ee,selectedRowKeys:Pe,setSelectedRowKeys:Ae})))};J.a=Object(E.a)(function(H){var M=H.classroomList;return{classroomList:M}})(z)},rmlV:function(Be,J,L){var Y=L("y+Vt"),B=Y.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(I,F){var T=.5522848,R=F.cx,P=F.cy,m=F.rx,t=F.ry,b=m*T,o=t*T;I.moveTo(R-m,P),I.bezierCurveTo(R-m,P-o,R-b,P-t,R,P-t),I.bezierCurveTo(R+b,P-t,R+m,P-o,R+m,P),I.bezierCurveTo(R+m,P+o,R+b,P+t,R,P+t),I.bezierCurveTo(R-b,P+t,R-m,P+o,R-m,P),I.closePath()}});Be.exports=B},sR1s:function(Be,J,L){"use strict";L.d(J,"b",function(){return F}),L.d(J,"a",function(){return T}),L.d(J,"c",function(){return R}),L.d(J,"d",function(){return P});var Y=L("U8pU"),B="RC_TABLE_KEY";function I(m){return m==null?[]:Array.isArray(m)?m:[m]}function F(m,t){if(!t&&typeof t!="number")return m;for(var b=I(t),o=m,u=0;u<b.length;u+=1){if(!o)return null;var f=b[u];o=o[f]}return o}function T(m){var t=[],b={};return m.forEach(function(o){for(var u=o||{},f=u.key,a=u.dataIndex,i=f||I(a).join("-")||B;b[i];)i="".concat(i,"_next");b[i]=!0,t.push(i)}),t}function R(){var m={};function t(f,a){a&&Object.keys(a).forEach(function(i){var d=a[i];d&&Object(Y.a)(d)==="object"?(f[i]=f[i]||{},t(f[i],d)):f[i]=d})}for(var b=arguments.length,o=new Array(b),u=0;u<b;u++)o[u]=arguments[u];return o.forEach(function(f){t(m,f)}),m}function P(m){return m!=null}},"sW+o":function(Be,J,L){var Y=L("SrGk"),B=L("bYtY"),I=L("SUKs"),F=L("Qe9p");function T(P,m){Y.call(this,P,m,["linearGradient","radialGradient"],"__gradient_in_use__")}B.inherits(T,Y),T.prototype.addWithoutUpdate=function(P,m){if(m&&m.style){var t=this;B.each(["fill","stroke"],function(b){if(m.style[b]&&(m.style[b].type==="linear"||m.style[b].type==="radial")){var o=m.style[b],u=t.getDefs(!0),f;o._dom?(f=o._dom,u.contains(o._dom)||t.addDom(f)):f=t.add(o),t.markUsed(m);var a=f.getAttribute("id");P.setAttribute(b,"url(#"+a+")")}})}},T.prototype.add=function(P){var m;if(P.type==="linear")m=this.createElement("linearGradient");else if(P.type==="radial")m=this.createElement("radialGradient");else return I("Illegal gradient type."),null;return P.id=P.id||this.nextId++,m.setAttribute("id","zr"+this._zrId+"-gradient-"+P.id),this.updateDom(P,m),this.addDom(m),m},T.prototype.update=function(P){var m=this;Y.prototype.update.call(this,P,function(){var t=P.type,b=P._dom.tagName;t==="linear"&&b==="linearGradient"||t==="radial"&&b==="radialGradient"?m.updateDom(P,P._dom):(m.removeDom(P),m.add(P))})},T.prototype.updateDom=function(P,m){if(P.type==="linear")m.setAttribute("x1",P.x),m.setAttribute("y1",P.y),m.setAttribute("x2",P.x2),m.setAttribute("y2",P.y2);else if(P.type==="radial")m.setAttribute("cx",P.x),m.setAttribute("cy",P.y),m.setAttribute("r",P.r);else{I("Illegal gradient type.");return}P.global?m.setAttribute("gradientUnits","userSpaceOnUse"):m.setAttribute("gradientUnits","objectBoundingBox"),m.innerHTML="";for(var t=P.colorStops,b=0,o=t.length;b<o;++b){var u=this.createElement("stop");u.setAttribute("offset",t[b].offset*100+"%");var f=t[b].color;if(f.indexOf("rgba">-1)){var a=F.parse(f)[3],i=F.toHex(f);u.setAttribute("stop-color","#"+i),u.setAttribute("stop-opacity",a)}else u.setAttribute("stop-color",t[b].color);m.appendChild(u)}P._dom=m},T.prototype.markUsed=function(P){if(P.style){var m=P.style.fill;m&&m._dom&&Y.prototype.markUsed.call(this,m._dom),m=P.style.stroke,m&&m._dom&&Y.prototype.markUsed.call(this,m._dom)}};var R=T;Be.exports=R},sboe:function(Be,J,L){"use strict";L.d(J,"a",function(){return I});var Y=L("q1tI"),B=L.n(Y),I=Y.createContext(null)},t23M:function(Be,J,L){"use strict";var Y=L("VTBJ"),B=L("1OyB"),I=L("vuIU"),F=L("Ji7U"),T=L("LK+K"),R=L("q1tI"),P=L.n(R),m=L("m+aA"),t=L("Zm9Q"),b=L("Kwbf"),o=L("c+Xe"),u=L("bdgK"),f="rc-observer-key",a=function(i){Object(F.a)(s,i);var d=Object(T.a)(s);function s(){var n;return Object(B.a)(this,s),n=d.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(l){var c=n.props.onResize,x=l[0].target,A=x.getBoundingClientRect(),C=A.width,k=A.height,w=x.offsetWidth,y=x.offsetHeight,h=Math.floor(C),p=Math.floor(k);if(n.state.width!==h||n.state.height!==p||n.state.offsetWidth!==w||n.state.offsetHeight!==y){var v={width:h,height:p,offsetWidth:w,offsetHeight:y};n.setState(v),c&&Promise.resolve().then(function(){c(Object(Y.a)(Object(Y.a)({},v),{},{offsetWidth:w,offsetHeight:y}))})}},n.setChildNode=function(l){n.childNode=l},n}return Object(I.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var c=Object(m.a)(this.childNode||this),x=c!==this.currentElement;x&&(this.destroyObserver(),this.currentElement=c),!this.resizeObserver&&c&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(c))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,c=Object(t.a)(l);if(c.length>1)Object(b.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(c.length===0)return Object(b.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var x=c[0];if(R.isValidElement(x)&&Object(o.c)(x)){var A=x.ref;c[0]=R.cloneElement(x,{ref:Object(o.a)(A,this.setChildNode)})}return c.length===1?c[0]:c.map(function(C,k){return!R.isValidElement(C)||"key"in C&&C.key!==null?C:R.cloneElement(C,{key:"".concat(f,"-").concat(k)})})}}]),s}(R.Component);a.displayName="ResizeObserver",J.a=a},t9D7:function(Be,J,L){"use strict";L.d(J,"b",function(){return P}),L.d(J,"g",function(){return t}),L.d(J,"d",function(){return b}),L.d(J,"e",function(){return o}),L.d(J,"a",function(){return u}),L.d(J,"f",function(){return i}),L.d(J,"c",function(){return d});var Y=L("Vhoy"),B=L("MI8n"),I=L("pmY6"),F=L("Cg/j"),T=L("ic2d"),R=L("nEHx");const P=Object(F.c)("themeService");var m;(function(s){function n(l){return l&&typeof l=="object"&&typeof l.id=="string"}s.isThemeColor=n})(m||(m={}));function t(s){return{id:s}}var b;(function(s){function n(k){return k&&typeof k=="object"&&typeof k.id=="string"&&(typeof k.color=="undefined"||m.isThemeColor(k.color))}s.isThemeIcon=n;const l=new RegExp(`^\\$\\((${Y.a.iconNameExpression}(?:${Y.a.iconModifierExpression})?)\\)$`);function c(k){const w=l.exec(k);if(!w)return;let[,y]=w;return{id:y}}s.fromString=c;function x(k,w){let y=k.id;const h=y.lastIndexOf("~");return h!==-1&&(y=y.substring(0,h)),w&&(y=`${y}~${w}`),{id:y}}s.modify=x;function A(k,w){var y,h;return k.id===w.id&&((y=k.color)===null||y===void 0?void 0:y.id)===((h=w.color)===null||h===void 0?void 0:h.id)}s.isEqual=A;function C(k,w){return{id:k.id,color:w?t(w):void 0}}s.asThemeIcon=C,s.asClassNameArray=Y.a.asClassNameArray,s.asClassName=Y.a.asClassName,s.asCSSSelector=Y.a.asCSSSelector})(b||(b={}));function o(s){switch(s){case R.a.DARK:return"vs-dark";case R.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const u={ThemingContribution:"base.contributions.theming"};class f{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new B.b}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),Object(I.i)(()=>{const n=this.themingParticipants.indexOf(s);this.themingParticipants.splice(n,1)})}getThemingParticipants(){return this.themingParticipants}}let a=new f;T.a.add(u.ThemingContribution,a);function i(s){return a.onColorThemeChange(s)}class d extends I.a{constructor(s){super();this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(n=>this.onThemeChange(n)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}},u3os:function(Be,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.ver=J.clear=J.bind=void 0;var Y=L("P4Qj"),B=function(R,P){var m=(0,Y.getSensor)(R);return m.bind(P),function(){m.unbind(P)}};J.bind=B;var I=function(R){var P=(0,Y.getSensor)(R);(0,Y.removeSensor)(P)};J.clear=I;var F="1.0.1";J.ver=F},ulZh:function(Be,J,L){typeof window!="undefined"&&function(B,I){Be.exports=I()}(this,function(){return function(Y){var B={};function I(F){if(B[F])return B[F].exports;var T=B[F]={i:F,l:!1,exports:{}};return Y[F].call(T.exports,T,T.exports,I),T.l=!0,T.exports}return I.m=Y,I.c=B,I.d=function(F,T,R){I.o(F,T)||Object.defineProperty(F,T,{enumerable:!0,get:R})},I.r=function(F){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},I.t=function(F,T){if(T&1&&(F=I(F)),T&8)return F;if(T&4&&typeof F=="object"&&F&&F.__esModule)return F;var R=Object.create(null);if(I.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:F}),T&2&&typeof F!="string")for(var P in F)I.d(R,P,function(m){return F[m]}.bind(null,P));return R},I.n=function(F){var T=F&&F.__esModule?function(){return F.default}:function(){return F};return I.d(T,"a",T),T},I.o=function(F,T){return Object.prototype.hasOwnProperty.call(F,T)},I.p="/dist/",I(I.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Y,B,I){"use strict";var F=Object.prototype.hasOwnProperty,T="~";function R(){}Object.create&&(R.prototype=Object.create(null),new R().__proto__||(T=!1));function P(o,u,f){this.fn=o,this.context=u,this.once=f||!1}function m(o,u,f,a,i){if(typeof f!="function")throw new TypeError("The listener must be a function");var d=new P(f,a||o,i),s=T?T+u:u;return o._events[s]?o._events[s].fn?o._events[s]=[o._events[s],d]:o._events[s].push(d):(o._events[s]=d,o._eventsCount++),o}function t(o,u){--o._eventsCount===0?o._events=new R:delete o._events[u]}function b(){this._events=new R,this._eventsCount=0}b.prototype.eventNames=function(){var u=[],f,a;if(this._eventsCount===0)return u;for(a in f=this._events)F.call(f,a)&&u.push(T?a.slice(1):a);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},b.prototype.listeners=function(u){var f=T?T+u:u,a=this._events[f];if(!a)return[];if(a.fn)return[a.fn];for(var i=0,d=a.length,s=new Array(d);i<d;i++)s[i]=a[i].fn;return s},b.prototype.listenerCount=function(u){var f=T?T+u:u,a=this._events[f];return a?a.fn?1:a.length:0},b.prototype.emit=function(u,f,a,i,d,s){var n=T?T+u:u;if(!this._events[n])return!1;var l=this._events[n],c=arguments.length,x,A;if(l.fn){l.once&&this.removeListener(u,l.fn,void 0,!0);switch(c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,f),!0;case 3:return l.fn.call(l.context,f,a),!0;case 4:return l.fn.call(l.context,f,a,i),!0;case 5:return l.fn.call(l.context,f,a,i,d),!0;case 6:return l.fn.call(l.context,f,a,i,d,s),!0}for(A=1,x=new Array(c-1);A<c;A++)x[A-1]=arguments[A];l.fn.apply(l.context,x)}else{var C=l.length,k;for(A=0;A<C;A++){l[A].once&&this.removeListener(u,l[A].fn,void 0,!0);switch(c){case 1:l[A].fn.call(l[A].context);break;case 2:l[A].fn.call(l[A].context,f);break;case 3:l[A].fn.call(l[A].context,f,a);break;case 4:l[A].fn.call(l[A].context,f,a,i);break;default:if(!x)for(k=1,x=new Array(c-1);k<c;k++)x[k-1]=arguments[k];l[A].fn.apply(l[A].context,x)}}}return!0},b.prototype.on=function(u,f,a){return m(this,u,f,a,!1)},b.prototype.once=function(u,f,a){return m(this,u,f,a,!0)},b.prototype.removeListener=function(u,f,a,i){var d=T?T+u:u;if(!this._events[d])return this;if(!f)return t(this,d),this;var s=this._events[d];if(s.fn)s.fn===f&&(!i||s.once)&&(!a||s.context===a)&&t(this,d);else{for(var n=0,l=[],c=s.length;n<c;n++)(s[n].fn!==f||i&&!s[n].once||a&&s[n].context!==a)&&l.push(s[n]);l.length?this._events[d]=l.length===1?l[0]:l:t(this,d)}return this},b.prototype.removeAllListeners=function(u){var f;return u?(f=T?T+u:u,this._events[f]&&t(this,f)):(this._events=new R,this._eventsCount=0),this},b.prototype.off=b.prototype.removeListener,b.prototype.addListener=b.prototype.on,b.prefixed=T,b.EventEmitter=b,Y.exports=b},"./node_modules/url-toolkit/src/url-toolkit.js":function(Y,B,I){(function(F){var T=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,R=/^([^\/?#]*)([^]*)$/,P=/(?:\/|^)\.(?=\/)/g,m=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(b,o,u){if(u=u||{},b=b.trim(),o=o.trim(),!o){if(!u.alwaysNormalize)return b;var f=t.parseURL(b);if(!f)throw new Error("Error trying to parse base URL.");return f.path=t.normalizePath(f.path),t.buildURLFromParts(f)}var a=t.parseURL(o);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return u.alwaysNormalize?(a.path=t.normalizePath(a.path),t.buildURLFromParts(a)):o;var i=t.parseURL(b);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var d=R.exec(i.path);i.netLoc=d[1],i.path=d[2]}i.netLoc&&!i.path&&(i.path="/");var s={scheme:i.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(s.netLoc=i.netLoc,a.path[0]!=="/"))if(!a.path)s.path=i.path,a.params||(s.params=i.params,a.query||(s.query=i.query));else{var n=i.path,l=n.substring(0,n.lastIndexOf("/")+1)+a.path;s.path=t.normalizePath(l)}return s.path===null&&(s.path=u.alwaysNormalize?t.normalizePath(a.path):a.path),t.buildURLFromParts(s)},parseURL:function(b){var o=T.exec(b);return o?{scheme:o[1]||"",netLoc:o[2]||"",path:o[3]||"",params:o[4]||"",query:o[5]||"",fragment:o[6]||""}:null},normalizePath:function(b){for(b=b.split("").reverse().join("").replace(P,"");b.length!==(b=b.replace(m,"")).length;);return b.split("").reverse().join("")},buildURLFromParts:function(b){return b.scheme+b.netLoc+b.path+b.params+b.query+b.fragment}};Y.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(Y,B,I){function F(u){var f={};function a(d){if(f[d])return f[d].exports;var s=f[d]={i:d,l:!1,exports:{}};return u[d].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=u,a.c=f,a.i=function(d){return d},a.d=function(d,s,n){a.o(d,s)||Object.defineProperty(d,s,{configurable:!1,enumerable:!0,get:n})},a.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},a.n=function(d){var s=d&&d.__esModule?function(){return d.default}:function(){return d};return a.d(s,"a",s),s},a.o=function(d,s){return Object.prototype.hasOwnProperty.call(d,s)},a.p="/",a.oe=function(d){throw console.error(d),d};var i=a(a.s=ENTRY_MODULE);return i.default||i}var T="[\\.|\\-|\\+|\\w|/|@]+",R="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+T+").*?\\)";function P(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function m(u){return!isNaN(1*u)}function t(u,f,a){var i={};i[a]=[];var d=f.toString(),s=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return i;for(var n=s[1],l=new RegExp("(\\\\n|\\W)"+P(n)+R,"g"),c;c=l.exec(d);){if(c[3]==="dll-reference")continue;i[a].push(c[3])}for(l=new RegExp("\\("+P(n)+'\\("(dll-reference\\s('+T+'))"\\)\\)'+R,"g");c=l.exec(d);)u[c[2]]||(i[a].push(c[1]),u[c[2]]=I(c[1]).m),i[c[2]]=i[c[2]]||[],i[c[2]].push(c[4]);for(var x=Object.keys(i),A=0;A<x.length;A++)for(var C=0;C<i[x[A]].length;C++)m(i[x[A]][C])&&(i[x[A]][C]=1*i[x[A]][C]);return i}function b(u){var f=Object.keys(u);return f.reduce(function(a,i){return a||u[i].length>0},!1)}function o(u,f){for(var a={main:[f]},i={main:[]},d={main:{}};b(a);)for(var s=Object.keys(a),n=0;n<s.length;n++){var l=s[n],c=a[l],x=c.pop();if(d[l]=d[l]||{},d[l][x]||!u[l][x])continue;d[l][x]=!0,i[l]=i[l]||[],i[l].push(x);for(var A=t(u,u[l][x],l),C=Object.keys(A),k=0;k<C.length;k++)a[C[k]]=a[C[k]]||[],a[C[k]]=a[C[k]].concat(A[C[k]])}return i}Y.exports=function(u,f){f=f||{};var a={main:I.m},i=f.all?{main:Object.keys(a.main)}:o(a,u),d="";Object.keys(i).filter(function(x){return x!=="main"}).forEach(function(x){for(var A=0;i[x][A];)A++;i[x].push(A),a[x][A]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+x+" = ("+F.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+i[x].map(function(C){return""+JSON.stringify(C)+": "+a[x][C].toString()}).join(",")+`});
`}),d=d+"new (("+F.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+i.main.map(function(x){return""+JSON.stringify(x)+": "+a.main[x].toString()}).join(",")+"}))(self);";var s=new window.Blob([d],{type:"text/javascript"});if(f.bare)return s;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,l=n.createObjectURL(s),c=new window.Worker(l);return c.objectURL=l,c}},"./src/config.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"hlsDefaultConfig",function(){return k}),I.d(B,"mergeConfig",function(){return y}),I.d(B,"enableStreamingMode",function(){return h});var F=I("./src/controller/abr-controller.ts"),T=I("./src/controller/audio-stream-controller.ts"),R=I("./src/controller/audio-track-controller.ts"),P=I("./src/controller/subtitle-stream-controller.ts"),m=I("./src/controller/subtitle-track-controller.ts"),t=I("./src/controller/buffer-controller.ts"),b=I("./src/controller/timeline-controller.ts"),o=I("./src/controller/cap-level-controller.ts"),u=I("./src/controller/fps-controller.ts"),f=I("./src/controller/eme-controller.ts"),a=I("./src/controller/cmcd-controller.ts"),i=I("./src/utils/xhr-loader.ts"),d=I("./src/utils/fetch-loader.ts"),s=I("./src/utils/cues.ts"),n=I("./src/utils/mediakeys-helper.ts"),l=I("./src/utils/logger.ts");function c(){return c=Object.assign||function(p){for(var v=1;v<arguments.length;v++){var _=arguments[v];for(var E in _)Object.prototype.hasOwnProperty.call(_,E)&&(p[E]=_[E])}return p},c.apply(this,arguments)}function x(p,v){var _=Object.keys(p);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(p);v&&(E=E.filter(function(g){return Object.getOwnPropertyDescriptor(p,g).enumerable})),_.push.apply(_,E)}return _}function A(p){for(var v=1;v<arguments.length;v++){var _=arguments[v]!=null?arguments[v]:{};v%2?x(Object(_),!0).forEach(function(E){C(p,E,_[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(_)):x(Object(_)).forEach(function(E){Object.defineProperty(p,E,Object.getOwnPropertyDescriptor(_,E))})}return p}function C(p,v,_){return v in p?Object.defineProperty(p,v,{value:_,enumerable:!0,configurable:!0,writable:!0}):p[v]=_,p}var k=A(A({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:F.default,bufferController:t.default,capLevelController:o.default,fpsController:u.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},w()),{},{subtitleStreamController:P.SubtitleStreamController,subtitleTrackController:m.default,timelineController:b.TimelineController,audioStreamController:T.default,audioTrackController:R.default,emeController:f.default,cmcdController:a.default});function w(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function y(p,v){if((v.liveSyncDurationCount||v.liveMaxLatencyDurationCount)&&(v.liveSyncDuration||v.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(v.liveMaxLatencyDurationCount!==void 0&&(v.liveSyncDurationCount===void 0||v.liveMaxLatencyDurationCount<=v.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(v.liveMaxLatencyDuration!==void 0&&(v.liveSyncDuration===void 0||v.liveMaxLatencyDuration<=v.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return c({},p,v)}function h(p){var v=p.loader;if(v!==d.default&&v!==i.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),p.progressive=!1;else{var _=Object(d.fetchSupported)();_&&(p.loader=d.default,p.progressive=!0,p.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),T=I("./src/utils/ewma-bandwidth-estimator.ts"),R=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),m=I("./src/errors.ts"),t=I("./src/types/loader.ts"),b=I("./src/utils/logger.ts");function o(a,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function u(a,i,d){return i&&o(a.prototype,i),d&&o(a,d),a}var f=function(){function a(d){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=d;var s=d.config;this.bwEstimator=new T.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var i=a.prototype;return i.registerListeners=function(){var s=this.hls;s.on(R.Events.FRAG_LOADING,this.onFragLoading,this),s.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(R.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var s=this.hls;s.off(R.Events.FRAG_LOADING,this.onFragLoading,this),s.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(R.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(s,n){var l=n.frag;if(l.type===t.PlaylistLevelType.MAIN&&!this.timer){var c;this.fragCurrent=l,this.partCurrent=(c=n.part)!=null?c:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(s,n){var l=this.hls.config;n.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var s=this.fragCurrent,n=this.partCurrent,l=this.hls,c=l.autoLevelEnabled,x=l.config,A=l.media;if(!s||!A)return;var C=n?n.stats:s.stats,k=n?n.duration:s.duration;if(C.aborted){b.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!c||A.paused||!A.playbackRate||!A.readyState)return;var w=performance.now()-C.loading.start,y=Math.abs(A.playbackRate);if(w<=500*k/y)return;var h=l.levels,p=l.minAutoLevel,v=h[s.level],_=C.total||Math.max(C.loaded,Math.round(k*v.maxBitrate/8)),E=Math.max(1,C.bwEstimate?C.bwEstimate/8:C.loaded*1e3/w),g=(_-C.loaded)/E,j=A.currentTime,U=(P.BufferHelper.bufferInfo(A,j,x.maxBufferHole).end-j)/y;if(U>=2*k/y||g<=U)return;var S=Number.POSITIVE_INFINITY,z;for(z=s.level-1;z>p;z--){var H=h[z].maxBitrate;if(S=k*H/(8*.8*E),S<U)break}if(S>=g)return;var M=this.bwEstimator.getEstimate();b.logger.warn("Fragment "+s.sn+(n?" part "+n.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
Current BW estimate: `+(Object(F.isFiniteNumber)(M)?(M/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+g.toFixed(3)+` s
Estimated load time for the next fragment: `+S.toFixed(3)+` s
Time to underbuffer: `+U.toFixed(3)+" s"),l.nextLoadLevel=z,this.bwEstimator.sample(w,C.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),l.trigger(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:n,stats:C})},i.onFragLoaded=function(s,n){var l=n.frag,c=n.part;if(l.type===t.PlaylistLevelType.MAIN&&Object(F.isFiniteNumber)(l.sn)){var x=c?c.stats:l.stats,A=c?c.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var C=this.hls.levels[l.level],k=(C.loaded?C.loaded.bytes:0)+x.loaded,w=(C.loaded?C.loaded.duration:0)+A;C.loaded={bytes:k,duration:w},C.realBitrate=Math.round(8*k/w)}if(l.bitrateTest){var y={stats:x,frag:l,part:c,id:l.type};this.onFragBuffered(R.Events.FRAG_BUFFERED,y),l.bitrateTest=!1}}},i.onFragBuffered=function(s,n){var l=n.frag,c=n.part,x=c?c.stats:l.stats;if(x.aborted)return;if(l.type!==t.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var A=x.parsing.end-x.loading.start;this.bwEstimator.sample(A,x.loaded),x.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0},i.onError=function(s,n){switch(n.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var s=this.fragCurrent,n=this.partCurrent,l=this.hls,c=l.maxAutoLevel,x=l.config,A=l.minAutoLevel,C=l.media,k=n?n.duration:s?s.duration:0,w=C?C.currentTime:0,y=C&&C.playbackRate!==0?Math.abs(C.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():x.abrEwmaDefaultEstimate,p=(P.BufferHelper.bufferInfo(C,w,x.maxBufferHole).end-w)/y,v=this.findBestLevel(h,A,c,p,x.abrBandWidthFactor,x.abrBandWidthUpFactor);if(v>=0)return v;b.logger.trace((p?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var _=k?Math.min(k,x.maxStarvationDelay):x.maxStarvationDelay,E=x.abrBandWidthFactor,g=x.abrBandWidthUpFactor;if(!p){var j=this.bitrateTestDelay;if(j){var U=k?Math.min(k,x.maxLoadingDelay):x.maxLoadingDelay;_=U-j,b.logger.trace("bitrate test took "+Math.round(1e3*j)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*_)+" ms"),E=g=1}}return v=this.findBestLevel(h,A,c,p+_,E,g),Math.max(v,0)},i.findBestLevel=function(s,n,l,c,x,A){for(var C,k=this.fragCurrent,w=this.partCurrent,y=this.lastLoadedFragLevel,h=this.hls.levels,p=h[y],v=!!(p!=null&&(C=p.details)!==null&&C!==void 0&&C.live),_=p==null?void 0:p.codecSet,E=w?w.duration:k?k.duration:0,g=l;g>=n;g--){var j=h[g];if(!j||_&&j.codecSet!==_)continue;var U=j.details,S=(w?U==null?void 0:U.partTarget:U==null?void 0:U.averagetargetduration)||E,z=void 0;g<=y?z=x*s:z=A*s;var H=h[g].maxBitrate,M=H*S/z;if(b.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(z)+"/"+H+"/"+S+"/"+c+"/"+M),z>H&&(!M||v&&!this.bitrateTestDelay||M<c))return g}return-1},u(a,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,n=this.bwEstimator;if(s!==-1&&(!n||!n.canEstimate()))return s;var l=this.getNextABRAutoLevel();return s!==-1&&(l=Math.min(s,l)),l},set:function(s){this._nextAutoLevel=s}}]),a}();B.default=f},"./src/controller/audio-stream-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),T=I("./src/controller/base-stream-controller.ts"),R=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),m=I("./src/controller/fragment-tracker.ts"),t=I("./src/types/level.ts"),b=I("./src/types/loader.ts"),o=I("./src/loader/fragment.ts"),u=I("./src/demux/chunk-cache.ts"),f=I("./src/demux/transmuxer-interface.ts"),a=I("./src/types/transmuxer.ts"),i=I("./src/controller/fragment-finders.ts"),d=I("./src/utils/discontinuities.ts"),s=I("./src/errors.ts"),n=I("./src/utils/logger.ts");function l(){return l=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var y=arguments[w];for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(k[h]=y[h])}return k},l.apply(this,arguments)}function c(k,w){k.prototype=Object.create(w.prototype),k.prototype.constructor=k,x(k,w)}function x(k,w){return x=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},x(k,w)}var A=100,C=function(k){c(w,k);function w(h,p){var v;return v=k.call(this,h,p,"[audio-stream-controller]")||this,v.videoBuffer=null,v.videoTrackCC=-1,v.waitingVideoCC=-1,v.audioSwitch=!1,v.trackId=-1,v.waitingData=null,v.mainDetails=null,v.bufferFlushed=!1,v._registerListeners(),v}var y=w.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var p=this.hls;p.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(R.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.on(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.on(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.on(R.Events.ERROR,this.onError,this),p.on(R.Events.BUFFER_RESET,this.onBufferReset,this),p.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this),p.on(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.on(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var p=this.hls;p.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(R.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.off(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.off(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.off(R.Events.ERROR,this.onError,this),p.off(R.Events.BUFFER_RESET,this.onBufferReset,this),p.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),p.off(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.off(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onInitPtsFound=function(p,v){var _=v.frag,E=v.id,g=v.initPTS;if(E==="main"){var j=_.cc;this.initPTS[_.cc]=g,this.log("InitPTS for cc: "+j+" found from main: "+g),this.videoTrackCC=j,this.state===T.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(p){if(!this.levels){this.startPosition=p,this.state=T.State.STOPPED;return}var v=this.lastCurrentTime;this.stopLoad(),this.setInterval(A),this.fragLoadError=0,v>0&&p===-1?(this.log("Override startPosition with lastCurrentTime @"+v.toFixed(3)),this.state=T.State.IDLE):(this.loadedmetadata=!1,this.state=T.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()},y.doTick=function(){switch(this.state){case T.State.IDLE:this.doTickIdle();break;case T.State.WAITING_TRACK:{var p,v=this.levels,_=this.trackId,E=v==null||((p=v[_])===null||p===void 0)?void 0:p.details;if(E){if(this.waitForCdnTuneIn(E))break;this.state=T.State.WAITING_INIT_PTS}break}case T.State.FRAG_LOADING_WAITING_RETRY:{var g,j=performance.now(),U=this.retryDate;(!U||j>=U||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=T.State.IDLE);break}case T.State.WAITING_INIT_PTS:{var S=this.waitingData;if(S){var z=S.frag,H=S.part,M=S.cache,V=S.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=T.State.FRAG_LOADING;var K=M.flush(),$={frag:z,part:H,payload:K,networkDetails:null};this._handleFragmentLoadProgress($),V&&k.prototype._handleFragmentLoadComplete.call(this,$)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),me=P.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),oe=Object(i.fragmentWithinToleranceTest)(me.end,this.config.maxFragLookUpTolerance,z);oe<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+me.end+" is needed"),this.clearWaitingFragment())}}else this.state=T.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var p=this.waitingData;p&&(this.fragmentTracker.removeFragment(p.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=T.State.IDLE)},y.onTickEnd=function(){var p=this.media;if(!p||!p.readyState)return;var v=this.mediaBuffer?this.mediaBuffer:p,_=v.buffered;!this.loadedmetadata&&_.length&&(this.loadedmetadata=!0),this.lastCurrentTime=p.currentTime},y.doTickIdle=function(){var p,v,_=this.hls,E=this.levels,g=this.media,j=this.trackId,U=_.config;if(!E||!E[j])return;if(!g&&(this.startFragRequested||!U.startFragPrefetch))return;var S=E[j],z=S.details;if(!z||z.live&&this.levelLastLoaded!==j||this.waitForCdnTuneIn(z)){this.state=T.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,o.ElementaryStreamTypes.AUDIO,b.PlaylistLevelType.AUDIO));var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,b.PlaylistLevelType.AUDIO);if(H===null)return;var M=H.len,V=this.getMaxBufferLength(),K=this.audioSwitch;if(M>=V&&!K)return;if(!K&&this._streamEnded(H,z)){_.trigger(R.Events.BUFFER_EOS,{type:"audio"}),this.state=T.State.ENDED;return}var $=z.fragments,Z=$[0].start,me=H.end;if(K){var oe=this.getLoadPosition();me=oe,z.PTSKnown&&oe<Z&&((H.end>Z||H.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=Z+.05))}var fe=this.getNextFragment(me,z);if(!fe){this.bufferFlushed=!0;return}((p=fe.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((v=fe.decryptdata)!==null&&v!==void 0&&v.key)?this.loadKey(fe,z):this.loadFragment(fe,z,me)},y.getMaxBufferLength=function(){var p=k.prototype.getMaxBufferLength.call(this),v=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,b.PlaylistLevelType.MAIN);return v===null?p:Math.max(p,v.len)},y.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(p,v){var _=v.audioTracks;this.resetTransmuxer(),this.levels=_.map(function(E){return new t.Level(E)})},y.onAudioTrackSwitching=function(p,v){var _=!!v.url;this.trackId=v.id;var E=this.fragCurrent;E!=null&&E.loader&&E.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),_?this.setInterval(A):this.resetTransmuxer(),_?(this.audioSwitch=!0,this.state=T.State.IDLE):this.state=T.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(p,v){this.mainDetails=v.details},y.onAudioTrackLoaded=function(p,v){var _,E=this.levels,g=v.details,j=v.id;if(!E){this.warn("Audio tracks were reset while loading level "+j);return}this.log("Track "+j+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var U=E[j],S=0;if(g.live||(_=U.details)!==null&&_!==void 0&&_.live){var z=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!z)return;!U.details&&g.hasProgramDateTime&&z.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(g,z),S=g.fragments[0].start):S=this.alignPlaylists(g,U.details)}U.details=g,this.levelLastLoaded=j,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(U.details,S),this.state===T.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=T.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(p){var v,_=p.frag,E=p.part,g=p.payload,j=this.config,U=this.trackId,S=this.levels;if(!S){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var z=S[U];console.assert(z,"Audio track is defined on fragment load progress");var H=z.details;console.assert(H,"Audio track details are defined on fragment load progress");var M=j.defaultAudioCodec||z.audioCodec||"mp4a.40.2",V=this.transmuxer;V||(V=this.transmuxer=new f.default(this.hls,b.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var K=this.initPTS[_.cc],$=(v=_.initSegment)===null||v===void 0?void 0:v.data;if(K!==void 0){var Z=!1,me=E?E.index:-1,oe=me!==-1,fe=new a.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,g.byteLength,me,oe);V.push(g,$,M,"",_,E,H.totalduration,Z,fe,K)}else{n.logger.log("Unknown video PTS for cc "+_.cc+", waiting for video PTS before demuxing audio frag "+_.sn+" of ["+H.startSN+" ,"+H.endSN+"],track "+U);var ye=this.waitingData=this.waitingData||{frag:_,part:E,cache:new u.default,complete:!1},Ie=ye.cache;Ie.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=T.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(p){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,p)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(p,v){var _=v.tracks.audio;_&&(this.mediaBuffer=_.buffer),v.tracks.video&&(this.videoBuffer=v.tracks.video.buffer)},y.onFragBuffered=function(p,v){var _=v.frag,E=v.part;if(_.type!==b.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(E?" p: "+E.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}_.sn!=="initSegment"&&(this.fragPrevious=_,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(_,E)},y.onError=function(p,v){switch(v.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(b.PlaylistLevelType.AUDIO,v);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==T.State.ERROR&&this.state!==T.State.STOPPED&&(this.state=v.fatal?T.State.ERROR:T.State.IDLE,this.warn(v.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(v.parent==="audio"&&(this.state===T.State.PARSING||this.state===T.State.PARSED)){var _=!0,E=this.getFwdBufferInfo(this.mediaBuffer,b.PlaylistLevelType.AUDIO);E&&E.len>.5&&(_=!this.reduceMaxBufferLength(E.len)),_&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(p,v){var _=v.type;_===o.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(p){var v,_="audio",E=this.hls,g=p.remuxResult,j=p.chunkMeta,U=this.getCurrentContext(j);if(!U){this.warn("The loading context changed while buffering fragment "+j.sn+" of level "+j.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(j.level);return}var S=U.frag,z=U.part,H=g.audio,M=g.text,V=g.id3,K=g.initSegment;if(this.fragContextChanged(S))return;if(this.state=T.State.PARSING,this.audioSwitch&&H&&this.completeAudioSwitch(),K!=null&&K.tracks&&(this._bufferInitSegment(K.tracks,S,j),E.trigger(R.Events.FRAG_PARSING_INIT_SEGMENT,{frag:S,id:_,tracks:K.tracks})),H){var $=H.startPTS,Z=H.endPTS,me=H.startDTS,oe=H.endDTS;z&&(z.elementaryStreams[o.ElementaryStreamTypes.AUDIO]={startPTS:$,endPTS:Z,startDTS:me,endDTS:oe}),S.setElementaryStreamInfo(o.ElementaryStreamTypes.AUDIO,$,Z,me,oe),this.bufferFragmentData(H,S,z,j)}if(V!=null&&(v=V.samples)!==null&&v!==void 0&&v.length){var fe=l({frag:S,id:_},V);E.trigger(R.Events.FRAG_PARSING_METADATA,fe)}if(M){var ye=l({frag:S,id:_},M);E.trigger(R.Events.FRAG_PARSING_USERDATA,ye)}},y._bufferInitSegment=function(p,v,_){if(this.state!==T.State.PARSING)return;p.video&&delete p.video;var E=p.audio;if(!E)return;E.levelCodec=E.codec,E.id="audio",this.log("Init audio buffer, container:"+E.container+", codecs[parsed]=["+E.codec+"]"),this.hls.trigger(R.Events.BUFFER_CODECS,p);var g=E.initSegment;if(g!=null&&g.byteLength){var j={type:"audio",frag:v,part:null,chunkMeta:_,parent:v.type,data:g};this.hls.trigger(R.Events.BUFFER_APPENDING,j)}this.tick()},y.loadFragment=function(p,v,_){var E=this.fragmentTracker.getState(p);this.fragCurrent=p,(this.audioSwitch||E===m.FragmentState.NOT_LOADED||E===m.FragmentState.PARTIAL)&&(p.sn==="initSegment"?this._loadInitSegment(p):v.live&&!Object(F.isFiniteNumber)(this.initPTS[p.cc])?(this.log("Waiting for video PTS in continuity counter "+p.cc+" of live stream before loading audio fragment "+p.sn+" of level "+this.trackId),this.state=T.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,p,v,_)))},y.completeAudioSwitch=function(){var p=this.hls,v=this.media,_=this.trackId;v&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,p.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:_})},w}(T.default);B.default=C},"./src/controller/audio-track-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),T=I("./src/errors.ts"),R=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function m(f,a){for(var i=0;i<a.length;i++){var d=a[i];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(f,d.key,d)}}function t(f,a,i){return a&&m(f.prototype,a),i&&m(f,i),f}function b(f,a){f.prototype=Object.create(a.prototype),f.prototype.constructor=f,o(f,a)}function o(f,a){return o=Object.setPrototypeOf||function(d,s){return d.__proto__=s,d},o(f,a)}var u=function(f){b(a,f);function a(d){var s;return s=f.call(this,d,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var i=a.prototype;return i.registerListeners=function(){var s=this.hls;s.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(F.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var s=this.hls;s.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(F.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,f.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(s,n){this.tracks=n.audioTracks||[]},i.onAudioTrackLoaded=function(s,n){var l=n.id,c=n.details,x=this.tracksInGroup[l];if(!x){this.warn("Invalid audio track id "+l);return}var A=x.details;x.details=n.details,this.log("audioTrack "+l+" loaded ["+c.startSN+"-"+c.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,n,A))},i.onLevelLoading=function(s,n){this.switchLevel(n.level)},i.onLevelSwitching=function(s,n){this.switchLevel(n.level)},i.switchLevel=function(s){var n=this.hls.levels[s];if(!(n!=null&&n.audioGroupIds))return;var l=n.audioGroupIds[n.urlId];if(this.groupId!==l){this.groupId=l;var c=this.tracks.filter(function(A){return!l||A.groupId===l});this.selectDefaultTrack&&!c.some(function(A){return A.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=c;var x={audioTracks:c};this.log("Updating audio tracks, "+c.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(F.Events.AUDIO_TRACKS_UPDATED,x),this.selectInitialTrack()}},i.onError=function(s,n){if(f.prototype.onError.call(this,s,n),n.fatal||!n.context)return;n.context.type===P.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},i.setAudioTrack=function(s){var n=this.tracksInGroup;if(s<0||s>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=n[this.trackId];this.log("Now switching to audio-track index "+s);var c=n[s],x=c.id,A=c.groupId,C=A===void 0?"":A,k=c.name,w=c.type,y=c.url;if(this.trackId=s,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(F.Events.AUDIO_TRACK_SWITCHING,{id:x,groupId:C,name:k,type:w,url:y}),c.details&&!c.details.live)return;var h=this.switchParams(c.url,l==null?void 0:l.details);this.loadPlaylist(h)},i.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,l=this.findTrackId(n)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(s){for(var n=this.tracksInGroup,l=0;l<n.length;l++){var c=n[l];if((!this.selectDefaultTrack||c.default)&&(!s||s===c.name))return c.id}return-1},i.loadPlaylist=function(s){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var l=n.id,c=n.groupId,x=n.url;if(s)try{x=s.addDirectives(x)}catch(A){this.warn("Could not construct new URL with HLS Delivery Directives: "+A)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(F.Events.AUDIO_TRACK_LOADING,{url:x,id:l,groupId:c,deliveryDirectives:s||null})}},t(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),a}(R.default);B.default=u},"./src/controller/base-playlist-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/polyfills/number.ts"),T=I("./src/types/level.ts"),R=I("./src/controller/level-helper.ts"),P=I("./src/utils/logger.ts"),m=I("./src/errors.ts"),t=function(){function b(u,f){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=P.logger.log.bind(P.logger,f+":"),this.warn=P.logger.warn.bind(P.logger,f+":"),this.hls=u}var o=b.prototype;return o.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},o.onError=function(f,a){a.fatal&&a.type===m.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},o.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},o.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},o.stopLoad=function(){this.canLoad=!1,this.clearTimer()},o.switchParams=function(f,a){var i=a==null?void 0:a.renditionReports;if(i)for(var d=0;d<i.length;d++){var s=i[d],n=""+s.URI;if(n===f.substr(-n.length)){var l=parseInt(s["LAST-MSN"]),c=parseInt(s["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var x=Math.min(a.age-a.partTarget,a.targetduration);c!==void 0&&x>a.partTarget&&(c+=1)}if(Object(F.isFiniteNumber)(l))return new T.HlsUrlParameters(l,Object(F.isFiniteNumber)(c)?c:void 0,T.HlsSkip.No)}}},o.loadPlaylist=function(f){},o.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},o.playlistLoaded=function(f,a,i){var d=this,s=a.details,n=a.stats,l=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(s.advancedDateTime=Date.now()-l,s.live||i!=null&&i.live){if(s.reloaded(i),i&&this.log("live playlist "+f+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),i&&s.fragments.length>0&&Object(R.mergeDetails)(i,s),!this.canLoad||!s.live)return;var c,x=void 0,A=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var C=this.hls.config.lowLatencyMode,k=s.lastPartSn,w=s.endSN,y=s.lastPartIndex,h=y!==-1,p=k===w,v=C?0:y;h?(x=p?w+1:k,A=p?v:y+1):x=w+1;var _=s.age,E=_+s.ageHeader,g=Math.min(E-s.partTarget,s.targetduration*1.5);if(g>0){if(i&&g>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+g+" with playlist age: "+s.age),g=0;else{var j=Math.floor(g/s.targetduration);if(x+=j,A!==void 0){var U=Math.round(g%s.targetduration/s.partTarget);A+=U}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+_.toFixed(2)+"s goal: "+g+" skip sn "+j+" to part "+A)}s.tuneInGoal=g}if(c=this.getDeliveryDirectives(s,a.deliveryDirectives,x,A),C||!p){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(s,a.deliveryDirectives,x,A);var S=Object(R.computeReloadInterval)(s,n);x!==void 0&&s.canBlockReload&&(S-=s.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(c)},S)}else this.clearTimer()},o.getDeliveryDirectives=function(f,a,i,d){var s=Object(T.getSkipValue)(f,i);return a!=null&&a.skip&&f.deltaUpdateFailed&&(i=a.msn,d=a.part,s=T.HlsSkip.No),new T.HlsUrlParameters(i,d,s)},o.retryLoadingOrFail=function(f){var a=this,i=this.hls.config,d=this.retryCount<i.levelLoadingMaxRetry;if(d){var s;if(this.retryCount++,f.details.indexOf("LoadTimeOut")>-1&&(s=f.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+f.details+'"')}}else this.warn('cannot recover from error "'+f.details+'"'),this.clearTimer(),f.fatal=!0;return d},b}()},"./src/controller/base-stream-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"State",function(){return w}),I.d(B,"default",function(){return y});var F=I("./src/polyfills/number.ts"),T=I("./src/task-loop.ts"),R=I("./src/controller/fragment-tracker.ts"),P=I("./src/utils/buffer-helper.ts"),m=I("./src/utils/logger.ts"),t=I("./src/events.ts"),b=I("./src/errors.ts"),o=I("./src/types/transmuxer.ts"),u=I("./src/utils/mp4-tools.ts"),f=I("./src/utils/discontinuities.ts"),a=I("./src/controller/fragment-finders.ts"),i=I("./src/controller/level-helper.ts"),d=I("./src/loader/fragment-loader.ts"),s=I("./src/crypt/decrypter.ts"),n=I("./src/utils/time-ranges.ts"),l=I("./src/types/loader.ts");function c(h,p){for(var v=0;v<p.length;v++){var _=p[v];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(h,_.key,_)}}function x(h,p,v){return p&&c(h.prototype,p),v&&c(h,v),h}function A(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function C(h,p){h.prototype=Object.create(p.prototype),h.prototype.constructor=h,k(h,p)}function k(h,p){return k=Object.setPrototypeOf||function(_,E){return _.__proto__=E,_},k(h,p)}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"},y=function(h){C(p,h);function p(_,E,g){var j;return j=h.call(this)||this,j.hls=void 0,j.fragPrevious=null,j.fragCurrent=null,j.fragmentTracker=void 0,j.transmuxer=null,j._state=w.STOPPED,j.media=void 0,j.mediaBuffer=void 0,j.config=void 0,j.bitrateTest=!1,j.lastCurrentTime=0,j.nextLoadPosition=0,j.startPosition=0,j.loadedmetadata=!1,j.fragLoadError=0,j.retryDate=0,j.levels=null,j.fragmentLoader=void 0,j.levelLastLoaded=null,j.startFragRequested=!1,j.decrypter=void 0,j.initPTS=[],j.onvseeking=null,j.onvended=null,j.logPrefix="",j.log=void 0,j.warn=void 0,j.logPrefix=g,j.log=m.logger.log.bind(m.logger,g+":"),j.warn=m.logger.warn.bind(m.logger,g+":"),j.hls=_,j.fragmentLoader=new d.default(_.config),j.fragmentTracker=E,j.config=_.config,j.decrypter=new s.default(_,_.config),_.on(t.Events.KEY_LOADED,j.onKeyLoaded,A(j)),j}var v=p.prototype;return v.doTick=function(){this.onTickEnd()},v.onTickEnd=function(){},v.startLoad=function(E){},v.stopLoad=function(){this.fragmentLoader.abort();var E=this.fragCurrent;E&&this.fragmentTracker.removeFragment(E),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},v._streamEnded=function(E,g){var j=this.fragCurrent,U=this.fragmentTracker;if(!g.live&&j&&j.sn===g.endSN&&!E.nextStart){var S=U.getState(j);return S===R.FragmentState.PARTIAL||S===R.FragmentState.OK}return!1},v.onMediaAttached=function(E,g){var j=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),j.addEventListener("seeking",this.onvseeking),j.addEventListener("ended",this.onvended);var U=this.config;this.levels&&U.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(U.startPosition)},v.onMediaDetaching=function(){var E=this.media;E!=null&&E.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),E&&(E.removeEventListener("seeking",this.onvseeking),E.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},v.onMediaSeeking=function(){var E=this.config,g=this.fragCurrent,j=this.media,U=this.mediaBuffer,S=this.state,z=j?j.currentTime:0,H=P.BufferHelper.bufferInfo(U||j,z,E.maxBufferHole);if(this.log("media seeking to "+(Object(F.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+S),S===w.ENDED)this.resetLoadingState();else if(g&&!H.len){var M=E.maxFragLookUpTolerance,V=g.start-M,K=g.start+g.duration+M,$=z>K;(z<V||$)&&($&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}j&&(this.lastCurrentTime=z),!this.loadedmetadata&&!H.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},v.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},v.onKeyLoaded=function(E,g){if(this.state!==w.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=w.IDLE;var j=this.levels[g.frag.level].details;j&&this.loadFragment(g.frag,j,g.frag.start)},v.onHandlerDestroying=function(){this.stopLoad(),h.prototype.onHandlerDestroying.call(this)},v.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,h.prototype.onHandlerDestroyed.call(this)},v.loadKey=function(E,g){this.log("Loading key for "+E.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+E.level),this.state=w.KEY_LOADING,this.fragCurrent=E,this.hls.trigger(t.Events.KEY_LOADING,{frag:E})},v.loadFragment=function(E,g,j){this._loadFragForPlayback(E,g,j)},v._loadFragForPlayback=function(E,g,j){var U=this,S=function(H){if(U.fragContextChanged(E)){U.warn("Fragment "+E.sn+(H.part?" p: "+H.part.index:"")+" of level "+E.level+" was dropped during download."),U.fragmentTracker.removeFragment(E);return}E.stats.chunkCount++,U._handleFragmentLoadProgress(H)};this._doFragLoad(E,g,j,S).then(function(z){if(!z)return;U.fragLoadError=0;var H=U.state;if(U.fragContextChanged(E)){(H===w.FRAG_LOADING||H===w.BACKTRACKING||!U.fragCurrent&&H===w.PARSING)&&(U.fragmentTracker.removeFragment(E),U.state=w.IDLE);return}if("payload"in z&&(U.log("Loaded fragment "+E.sn+" of level "+E.level),U.hls.trigger(t.Events.FRAG_LOADED,z),U.state===w.BACKTRACKING)){U.fragmentTracker.backtrack(E,z),U.resetFragmentLoading(E);return}U._handleFragmentLoadComplete(z)}).catch(function(z){U.warn(z),U.resetFragmentLoading(E)})},v.flushMainBuffer=function(E,g,j){if(j===void 0&&(j=null),!(E-g))return;var U={startOffset:E,endOffset:g,type:j};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,U)},v._loadInitSegment=function(E){var g=this;this._doFragLoad(E).then(function(j){if(!j||g.fragContextChanged(E)||!g.levels)throw new Error("init load aborted");return j}).then(function(j){var U=g.hls,S=j.payload,z=E.decryptdata;if(S&&S.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var H=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(S),z.key.buffer,z.iv.buffer).then(function(M){var V=self.performance.now();return U.trigger(t.Events.FRAG_DECRYPTED,{frag:E,payload:M,stats:{tstart:H,tdecrypt:V}}),j.payload=M,j})}return j}).then(function(j){var U=g.fragCurrent,S=g.hls,z=g.levels;if(!z)throw new Error("init load aborted, missing levels");var H=z[E.level].details;console.assert(H,"Level details are defined when init segment is loaded");var M=E.stats;g.state=w.IDLE,g.fragLoadError=0,E.data=new Uint8Array(j.payload),M.parsing.start=M.buffering.start=self.performance.now(),M.parsing.end=M.buffering.end=self.performance.now(),j.frag===U&&S.trigger(t.Events.FRAG_BUFFERED,{stats:M,frag:U,part:null,id:E.type}),g.tick()}).catch(function(j){g.warn(j),g.resetFragmentLoading(E)})},v.fragContextChanged=function(E){var g=this.fragCurrent;return!E||!g||E.level!==g.level||E.sn!==g.sn||E.urlId!==g.urlId},v.fragBufferedComplete=function(E,g){var j=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+E.type+" sn: "+E.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+E.level+" "+n.default.toString(P.BufferHelper.getBuffered(j))),this.state=w.IDLE,this.tick()},v._handleFragmentLoadComplete=function(E){var g=this.transmuxer;if(!g)return;var j=E.frag,U=E.part,S=E.partsLoaded,z=!S||S.length===0||S.some(function(M){return!M}),H=new o.ChunkMetadata(j.level,j.sn,j.stats.chunkCount+1,0,U?U.index:-1,!z);g.flush(H)},v._handleFragmentLoadProgress=function(E){},v._doFragLoad=function(E,g,j,U){var S=this;if(j===void 0&&(j=null),!this.levels)throw new Error("frag load aborted, missing levels");if(j=Math.max(E.start,j||0),this.config.lowLatencyMode&&g){var z=g.partList;if(z&&U){j>E.end&&g.fragmentHint&&(E=g.fragmentHint);var H=this.getNextPart(z,E,j);if(H>-1){var M=z[H];return this.log("Loading part sn: "+E.sn+" p: "+M.index+" cc: "+E.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+H+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(j.toFixed(3))),this.nextLoadPosition=M.start+M.duration,this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:E,part:z[H],targetBufferTime:j}),this.doFragPartsLoad(E,z,H,U).catch(function(V){return S.handleFragLoadError(V)})}else if(!E.url||this.loadedEndOfParts(z,j))return Promise.resolve(null)}}return this.log("Loading fragment "+E.sn+" cc: "+E.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+E.level+", target: "+parseFloat(j.toFixed(3))),Object(F.isFiniteNumber)(E.sn)&&!this.bitrateTest&&(this.nextLoadPosition=E.start+E.duration),this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:E,targetBufferTime:j}),this.fragmentLoader.load(E,U).catch(function(V){return S.handleFragLoadError(V)})},v.doFragPartsLoad=function(E,g,j,U){var S=this;return new Promise(function(z,H){var M=[],V=function K($){var Z=g[$];S.fragmentLoader.loadPart(E,Z,U).then(function(me){M[Z.index]=me;var oe=me.part;S.hls.trigger(t.Events.FRAG_LOADED,me);var fe=g[$+1];if(fe&&fe.fragment===E)K($+1);else return z({frag:E,part:oe,partsLoaded:M})}).catch(H)};V(j)})},v.handleFragLoadError=function(E){var g=E.data;return g&&g.details===b.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(t.Events.ERROR,g),null},v._handleTransmuxerFlush=function(E){var g=this.getCurrentContext(E);if(!g||this.state!==w.PARSING){this.fragCurrent||(this.state=w.IDLE);return}var j=g.frag,U=g.part,S=g.level,z=self.performance.now();j.stats.parsing.end=z,U&&(U.stats.parsing.end=z),this.updateLevelTiming(j,U,S,E.partial)},v.getCurrentContext=function(E){var g=this.levels,j=E.level,U=E.sn,S=E.part;if(!g||!g[j])return this.warn("Levels object was unset while buffering fragment "+U+" of level "+j+". The current chunk will not be buffered."),null;var z=g[j],H=S>-1?Object(i.getPartWith)(z,U,S):null,M=H?H.fragment:Object(i.getFragmentWithSN)(z,U,this.fragCurrent);return M?{frag:M,part:H,level:z}:null},v.bufferFragmentData=function(E,g,j,U){if(!E||this.state!==w.PARSING)return;var S=E.data1,z=E.data2,H=S;if(S&&z&&(H=Object(u.appendUint8Array)(S,z)),!H||!H.length)return;var M={type:E.type,frag:g,part:j,chunkMeta:U,parent:g.type,data:H};this.hls.trigger(t.Events.BUFFER_APPENDING,M),E.dropped&&E.independent&&!j&&this.flushBufferGap(g)},v.flushBufferGap=function(E){var g=this.media;if(!g)return;if(!P.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,E.start);return}var j=g.currentTime,U=P.BufferHelper.bufferInfo(g,j,0),S=E.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,S*.25),H=Math.max(Math.min(E.start-z,U.end-z),j+z);E.start-H>z&&this.flushMainBuffer(H,E.start)},v.getFwdBufferInfo=function(E,g){var j=this.config,U=this.getLoadPosition();if(!Object(F.isFiniteNumber)(U))return null;var S=P.BufferHelper.bufferInfo(E,U,j.maxBufferHole);if(S.len===0&&S.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(U,g);if(z&&S.nextStart<z.end)return P.BufferHelper.bufferInfo(E,U,Math.max(S.nextStart,j.maxBufferHole))}return S},v.getMaxBufferLength=function(E){var g=this.config,j;return E?j=Math.max(8*g.maxBufferSize/E,g.maxBufferLength):j=g.maxBufferLength,Math.min(j,g.maxMaxBufferLength)},v.reduceMaxBufferLength=function(E){var g=this.config,j=E||g.maxBufferLength;return g.maxMaxBufferLength>=j?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},v.getNextFragment=function(E,g){var j,U,S=g.fragments,z=S.length;if(!z)return null;var H=this.config,M=S[0].start,V;if(g.live){var K=H.initialLiveManifestSize;if(z<K)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+K+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(V=this.getInitialLiveFragment(g,S),this.startPosition=V?this.hls.liveSyncPosition||V.start:E)}else E<=M&&(V=S[0]);if(!V){var $=H.lowLatencyMode?g.partEnd:g.fragmentEnd;V=this.getFragmentAtPosition(E,$,g)}return(j=V)!==null&&j!==void 0&&j.initSegment&&!((U=V)!==null&&U!==void 0&&U.initSegment.data)&&!this.bitrateTest&&(V=V.initSegment),V},v.getNextPart=function(E,g,j){for(var U=-1,S=!1,z=!0,H=0,M=E.length;H<M;H++){var V=E[H];if(z=z&&!V.independent,U>-1&&j<V.start)break;var K=V.loaded;!K&&(S||V.independent||z)&&V.fragment===g&&(U=H),S=K}return U},v.loadedEndOfParts=function(E,g){var j=E[E.length-1];return j&&g>j.start&&j.loaded},v.getInitialLiveFragment=function(E,g){var j=this.fragPrevious,U=null;if(j){if(E.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+j.programDateTime),U=Object(a.findFragmentByPDT)(g,j.endProgramDateTime,this.config.maxFragLookUpTolerance)),!U){var S=j.sn+1;if(S>=E.startSN&&S<=E.endSN){var z=g[S-E.startSN];j.cc===z.cc&&(U=z,this.log("Live playlist, switching playlist, load frag with next SN: "+U.sn))}U||(U=Object(a.findFragWithCC)(g,j.cc),U&&this.log("Live playlist, switching playlist, load frag with same CC: "+U.sn))}}else{var H=this.hls.liveSyncPosition;H!==null&&(U=this.getFragmentAtPosition(H,this.bitrateTest?E.fragmentEnd:E.edge,E))}return U},v.getFragmentAtPosition=function(E,g,j){var U=this.config,S=this.fragPrevious,z=j.fragments,H=j.endSN,M=j.fragmentHint,V=U.maxFragLookUpTolerance,K=!!(U.lowLatencyMode&&j.partList&&M);K&&M&&!this.bitrateTest&&(z=z.concat(M),H=M.sn);var $;if(E<g){var Z=E>g-V?0:V;$=Object(a.findFragmentByPTS)(S,z,E,Z)}else $=z[z.length-1];if($){var me=$.sn-j.startSN,oe=S&&$.level===S.level,fe=z[me+1],ye=this.fragmentTracker.getState($);if(ye===R.FragmentState.BACKTRACKED){$=null;for(var Ie=me;z[Ie]&&this.fragmentTracker.getState(z[Ie])===R.FragmentState.BACKTRACKED;)S?$=z[Ie--]:$=z[--Ie];$||($=fe)}else S&&$.sn===S.sn&&!K&&(oe&&($.sn<H&&this.fragmentTracker.getState(fe)!==R.FragmentState.OK?(this.log("SN "+$.sn+" just loaded, load next one: "+fe.sn),$=fe):$=null))}return $},v.synchronizeToLiveEdge=function(E){var g=this.config,j=this.media;if(!j)return;var U=this.hls.liveSyncPosition,S=j.currentTime,z=E.fragments[0].start,H=E.edge,M=S>=z-g.maxFragLookUpTolerance&&S<=H;if(U!==null&&j.duration>U&&(S<U||!M)){var V=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*E.targetduration;(!M&&j.readyState<4||S<H-V)&&(this.loadedmetadata||(this.nextLoadPosition=U),j.readyState&&(this.warn("Playback: "+S.toFixed(3)+" is located too far from the end of live sliding playlist: "+H+", reset currentTime to : "+U.toFixed(3)),j.currentTime=U))}},v.alignPlaylists=function(E,g){var j=this.levels,U=this.levelLastLoaded,S=this.fragPrevious,z=U!==null?j[U]:null,H=E.fragments.length;if(!H)return this.warn("No fragments in live playlist"),0;var M=E.fragments[0].start,V=!g,K=E.alignedSliding&&Object(F.isFiniteNumber)(M);if(V||!K&&!M){Object(f.alignStream)(S,z,E);var $=E.fragments[0].start;return this.log("Live playlist sliding: "+$.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+E.startSN+" prev-sn: "+(S?S.sn:"na")+" fragments: "+H),$}return M},v.waitForCdnTuneIn=function(E){var g=3;return E.live&&E.canBlockReload&&E.tuneInGoal>Math.max(E.partHoldBack,E.partTarget*g)},v.setStartPosition=function(E,g){var j=this.startPosition;if(j<g&&(j=-1),j===-1||this.lastCurrentTime===-1){var U=E.startTimeOffset;Object(F.isFiniteNumber)(U)?(j=g+U,U<0&&(j+=E.totalduration),j=Math.min(Math.max(g,j),g+E.totalduration),this.log("Start time offset "+U+" found in playlist, adjust startPosition to "+j),this.startPosition=j):E.live?j=this.hls.liveSyncPosition||g:this.startPosition=j=0,this.lastCurrentTime=j}this.nextLoadPosition=j},v.getLoadPosition=function(){var E=this.media,g=0;return this.loadedmetadata&&E?g=E.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},v.handleFragLoadAborted=function(E,g){this.transmuxer&&E.sn!=="initSegment"&&E.stats.aborted&&(this.warn("Fragment "+E.sn+(g?" part"+g.index:"")+" of level "+E.level+" was aborted"),this.resetFragmentLoading(E))},v.resetFragmentLoading=function(E){(!this.fragCurrent||!this.fragContextChanged(E))&&(this.state=w.IDLE)},v.onFragmentOrKeyLoadError=function(E,g){if(g.fatal)return;var j=g.frag;if(!j||j.type!==E)return;var U=this.fragCurrent;console.assert(U&&j.sn===U.sn&&j.level===U.level&&j.urlId===U.urlId,"Frag load error must match current frag to retry");var S=this.config;if(this.fragLoadError+1<=S.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(j.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*S.fragLoadingRetryDelay,S.fragLoadingMaxRetryTimeout);this.warn("Fragment "+j.sn+" of "+E+" "+j.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(E===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(m.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)},v.afterBufferFlushed=function(E,g,j){if(!E)return;var U=P.BufferHelper.getBuffered(E);this.fragmentTracker.detectEvictedFragments(g,U,j),this.state===w.ENDED&&this.resetLoadingState()},v.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},v.resetLiveStartWhenNotLoaded=function(E){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[E].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},v.updateLevelTiming=function(E,g,j,U){var S=this,z=j.details;console.assert(!!z,"level.details must be defined");var H=Object.keys(E.elementaryStreams).reduce(function(M,V){var K=E.elementaryStreams[V];if(K){var $=K.endPTS-K.startPTS;if($<=0)return S.warn("Could not parse fragment "+E.sn+" "+V+" duration reliably ("+$+") resetting transmuxer to fallback to playlist timing"),S.resetTransmuxer(),M||!1;var Z=U?0:Object(i.updateFragPTSDTS)(z,E,K.startPTS,K.endPTS,K.startDTS,K.endDTS);return S.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:z,level:j,drift:Z,type:V,frag:E,start:K.startPTS,end:K.endPTS}),!0}return M},!1);H?(this.state=w.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:E,part:g})):this.resetLoadingState()},v.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},x(p,[{key:"state",get:function(){return this._state},set:function(E){var g=this._state;g!==E&&(this._state=E,this.log(g+"->"+E))}}]),p}(T.default)},"./src/controller/buffer-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./src/polyfills/number.ts"),T=I("./src/events.ts"),R=I("./src/utils/logger.ts"),P=I("./src/errors.ts"),m=I("./src/utils/buffer-helper.ts"),t=I("./src/utils/mediasource-helper.ts"),b=I("./src/loader/fragment.ts"),o=I("./src/controller/buffer-operation-queue.ts"),u=Object(t.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function i(s){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var l=n.hls,c=n.media,x=n.mediaSource;R.logger.log("[buffer-controller]: Media source opened"),c&&(n.updateMediaElementDuration(),l.trigger(T.Events.MEDIA_ATTACHED,{media:c})),x&&x.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){R.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){R.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var d=i.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var n=this.hls;n.on(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(T.Events.BUFFER_RESET,this.onBufferReset,this),n.on(T.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(T.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(T.Events.BUFFER_EOS,this.onBufferEos,this),n.on(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(T.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(T.Events.FRAG_PARSED,this.onFragParsed,this),n.on(T.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var n=this.hls;n.off(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(T.Events.BUFFER_RESET,this.onBufferReset,this),n.off(T.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(T.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(T.Events.BUFFER_EOS,this.onBufferEos,this),n.off(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(T.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(T.Events.FRAG_PARSED,this.onFragParsed,this),n.off(T.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new o.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(n,l){var c=2;(l.audio&&!l.video||!l.altAudio)&&(c=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=c,this.details=null,R.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(n,l){var c=this.media=l.media;if(c&&u){var x=this.mediaSource=new u;x.addEventListener("sourceopen",this._onMediaSourceOpen),x.addEventListener("sourceended",this._onMediaSourceEnded),x.addEventListener("sourceclose",this._onMediaSourceClose),c.src=self.URL.createObjectURL(x),this._objectUrl=c.src}},d.onMediaDetaching=function(){var n=this.media,l=this.mediaSource,c=this._objectUrl;if(l){if(R.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(x){R.logger.warn("[buffer-controller]: onMediaDetaching: "+x.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(c&&self.URL.revokeObjectURL(c),n.src===c?(n.removeAttribute("src"),n.load()):R.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(T.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(l){var c=n.sourceBuffer[l];try{c&&(n.removeBufferListeners(l),n.mediaSource&&n.mediaSource.removeSourceBuffer(c),n.sourceBuffer[l]=void 0)}catch(x){R.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",x)}}),this._initSourceBuffer()},d.onBufferCodecs=function(n,l){var c=this,x=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(A){if(x){var C=c.tracks[A];if(C&&typeof C.buffer.changeType=="function"){var k=l[A],w=k.codec,y=k.levelCodec,h=k.container,p=(C.levelCodec||C.codec).replace(f,"$1"),v=(y||w).replace(f,"$1");if(p!==v){var _=h+";codecs="+(y||w);c.appendChangeType(A,_)}}}else c.pendingTracks[A]=l[A]}),x)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(n,l){var c=this,x=this.operationQueue,A={execute:function(){var k=c.sourceBuffer[n];k&&(R.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+l),k.changeType(l)),x.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(k){R.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",k)}};x.append(A,n)},d.onBufferAppending=function(n,l){var c=this,x=this.hls,A=this.operationQueue,C=this.tracks,k=l.data,w=l.type,y=l.frag,h=l.part,p=l.chunkMeta,v=p.buffering[w],_=self.performance.now();v.start=_;var E=y.stats.buffering,g=h?h.stats.buffering:null;E.start===0&&(E.start=_),g&&g.start===0&&(g.start=_);var j=C.audio,U=w==="audio"&&p.id===1&&(j==null?void 0:j.container)==="audio/mpeg",S={execute:function(){if(v.executeStart=self.performance.now(),U){var H=c.sourceBuffer[w];if(H){var M=y.start-H.timestampOffset;Math.abs(M)>=.1&&(R.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+M+") sn: "+y.sn+")"),H.timestampOffset=y.start)}}c.appendExecutor(k,w)},onStart:function(){},onComplete:function(){var H=self.performance.now();v.executeEnd=v.end=H,E.first===0&&(E.first=H),g&&g.first===0&&(g.first=H);var M=c.sourceBuffer,V={};for(var K in M)V[K]=m.BufferHelper.getBuffered(M[K]);c.appendError=0,c.hls.trigger(T.Events.BUFFER_APPENDED,{type:w,frag:y,part:h,chunkMeta:p,parent:y.type,timeRanges:V})},onError:function(H){R.logger.error("[buffer-controller]: Error encountered while trying to append to the "+w+" SourceBuffer",H);var M={type:P.ErrorTypes.MEDIA_ERROR,parent:y.type,details:P.ErrorDetails.BUFFER_APPEND_ERROR,err:H,fatal:!1};H.code===DOMException.QUOTA_EXCEEDED_ERR?M.details=P.ErrorDetails.BUFFER_FULL_ERROR:(c.appendError++,M.details=P.ErrorDetails.BUFFER_APPEND_ERROR,c.appendError>x.config.appendErrorMaxRetry&&(R.logger.error("[buffer-controller]: Failed "+x.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),M.fatal=!0)),x.trigger(T.Events.ERROR,M)}};A.append(S,w)},d.onBufferFlushing=function(n,l){var c=this,x=this.operationQueue,A=function(k){return{execute:c.removeExecutor.bind(c,k,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){c.hls.trigger(T.Events.BUFFER_FLUSHED,{type:k})},onError:function(y){R.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",y)}}};l.type?x.append(A(l.type),l.type):this.getSourceBufferTypes().forEach(function(C){x.append(A(C),C)})},d.onFragParsed=function(n,l){var c=this,x=l.frag,A=l.part,C=[],k=A?A.elementaryStreams:x.elementaryStreams;k[b.ElementaryStreamTypes.AUDIOVIDEO]?C.push("audiovideo"):(k[b.ElementaryStreamTypes.AUDIO]&&C.push("audio"),k[b.ElementaryStreamTypes.VIDEO]&&C.push("video"));var w=function(){var h=self.performance.now();x.stats.buffering.end=h,A&&(A.stats.buffering.end=h);var p=A?A.stats:x.stats;c.hls.trigger(T.Events.FRAG_BUFFERED,{frag:x,part:A,stats:p,id:x.type})};C.length===0&&R.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+x.type+" level: "+x.level+" sn: "+x.sn),this.blockBuffers(w,C)},d.onFragChanged=function(n,l){this.flushBackBuffer()},d.onBufferEos=function(n,l){var c=this,x=this.getSourceBufferTypes().reduce(function(A,C){var k=c.sourceBuffer[C];return(!l.type||l.type===C)&&(k&&!k.ended&&(k.ended=!0,R.logger.log("[buffer-controller]: "+C+" sourceBuffer now EOS"))),A&&!!(!k||k.ended)},!0);x&&this.blockBuffers(function(){var A=c.mediaSource;if(!A||A.readyState!=="open")return;A.endOfStream()})},d.onLevelUpdated=function(n,l){var c=l.details;if(!c.fragments.length)return;this.details=c,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var n=this.hls,l=this.details,c=this.media,x=this.sourceBuffer;if(!c||l===null)return;var A=this.getSourceBufferTypes();if(!A.length)return;var C=l.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(F.isFiniteNumber)(C)||C<0)return;var k=c.currentTime,w=l.levelTargetDuration,y=Math.max(C,w),h=Math.floor(k/w)*w-y;A.forEach(function(p){var v=x[p];if(v){var _=m.BufferHelper.getBuffered(v);_.length>0&&h>_.start(0)&&(n.trigger(T.Events.BACK_BUFFER_REACHED,{bufferEnd:h}),l.live&&n.trigger(T.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),n.trigger(T.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:p}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,l=this.hls,c=this.media,x=this.mediaSource,A=n.fragments[0].start+n.totalduration,C=c.duration,k=Object(F.isFiniteNumber)(x.duration)?x.duration:0;n.live&&l.config.liveDurationInfinity?(R.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),x.duration=Infinity,this.updateSeekableRange(n)):(A>k&&A>C||!Object(F.isFiniteNumber)(C))&&(R.logger.log("[buffer-controller]: Updating Media Source duration to "+A.toFixed(3)),x.duration=A)},d.updateSeekableRange=function(n){var l=this.mediaSource,c=n.fragments,x=c.length;if(x&&n.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var A=Math.max(0,c[0].start),C=Math.max(A,A+n.totalduration);l.setLiveSeekableRange(A,C)}},d.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,l=this.operationQueue,c=this.pendingTracks,x=Object.keys(c).length;if(x&&!n||x===2){this.createSourceBuffers(c),this.pendingTracks={};var A=this.getSourceBufferTypes();if(A.length===0){this.hls.trigger(T.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}A.forEach(function(C){l.executeNext(C)})}},d.createSourceBuffers=function(n){var l=this.sourceBuffer,c=this.mediaSource;if(!c)throw Error("createSourceBuffers called when mediaSource was null");var x=0;for(var A in n)if(!l[A]){var C=n[A];if(!C)throw Error("source buffer exists for track "+A+", however track does not");var k=C.levelCodec||C.codec,w=C.container+";codecs="+k;R.logger.log("[buffer-controller]: creating sourceBuffer("+w+")");try{var y=l[A]=c.addSourceBuffer(w),h=A;this.addBufferListener(h,"updatestart",this._onSBUpdateStart),this.addBufferListener(h,"updateend",this._onSBUpdateEnd),this.addBufferListener(h,"error",this._onSBUpdateError),this.tracks[A]={buffer:y,codec:k,container:C.container,levelCodec:C.levelCodec,id:C.id},x++}catch(p){R.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+p.message),this.hls.trigger(T.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,mimeType:w})}}x&&this.hls.trigger(T.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(n){var l=this.operationQueue,c=l.current(n);c.onStart()},d._onSBUpdateEnd=function(n){var l=this.operationQueue,c=l.current(n);c.onComplete(),l.shiftAndExecuteNext(n)},d._onSBUpdateError=function(n,l){R.logger.error("[buffer-controller]: "+n+" SourceBuffer error",l),this.hls.trigger(T.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var c=this.operationQueue.current(n);c&&c.onError(l)},d.removeExecutor=function(n,l,c){var x=this.media,A=this.mediaSource,C=this.operationQueue,k=this.sourceBuffer,w=k[n];if(!x||!A||!w){R.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),C.shiftAndExecuteNext(n);return}var y=Object(F.isFiniteNumber)(x.duration)?x.duration:Infinity,h=Object(F.isFiniteNumber)(A.duration)?A.duration:Infinity,p=Math.max(0,l),v=Math.min(c,y,h);v>p?(R.logger.log("[buffer-controller]: Removing ["+p+","+v+"] from the "+n+" SourceBuffer"),console.assert(!w.updating,n+" sourceBuffer must not be updating"),w.remove(p,v)):C.shiftAndExecuteNext(n)},d.appendExecutor=function(n,l){var c=this.operationQueue,x=this.sourceBuffer,A=x[l];if(!A){R.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),c.shiftAndExecuteNext(l);return}A.ended=!1,console.assert(!A.updating,l+" sourceBuffer must not be updating"),A.appendBuffer(n)},d.blockBuffers=function(n,l){var c=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){R.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var x=this.operationQueue,A=l.map(function(C){return x.appendBlocker(C)});Promise.all(A).then(function(){n(),l.forEach(function(C){var k=c.sourceBuffer[C];(!k||!k.updating)&&x.shiftAndExecuteNext(C)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(n,l,c){var x=this.sourceBuffer[n];if(!x)return;var A=c.bind(this,n);this.listeners[n].push({event:l,listener:A}),x.addEventListener(l,A)},d.removeBufferListeners=function(n){var l=this.sourceBuffer[n];if(!l)return;this.listeners[n].forEach(function(c){l.removeEventListener(c.event,c.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return T});var F=I("./src/utils/logger.ts"),T=function(){function R(m){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=m}var P=R.prototype;return P.append=function(t,b){var o=this.queues[b];o.push(t),o.length===1&&this.buffers[b]&&this.executeNext(b)},P.insertAbort=function(t,b){var o=this.queues[b];o.unshift(t),this.executeNext(b)},P.appendBlocker=function(t){var b,o=new Promise(function(f){b=f}),u={execute:b,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,t),o},P.executeNext=function(t){var b=this.buffers,o=this.queues,u=b[t],f=o[t];if(f.length){var a=f[0];try{a.execute()}catch(i){F.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(i),(!u||!u.updating)&&(f.shift(),this.executeNext(t))}}},P.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},P.current=function(t){return this.queues[t][0]},R}()},"./src/controller/cap-level-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts");function T(m,t){for(var b=0;b<t.length;b++){var o=t[b];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(m,o.key,o)}}function R(m,t,b){return t&&T(m.prototype,t),b&&T(m,b),m}var P=function(){function m(b){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=b,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=m.prototype;return t.setStreamController=function(o){this.streamController=o},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 o=this.hls;o.on(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),o.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var o=this.hls;o.off(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),o.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(o,u){m.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},t.onMediaAttaching=function(o,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},t.onManifestParsed=function(o,u){var f=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,f.config.capLevelToPlayerSize&&u.video&&this.startCapping()},t.onBufferCodecs=function(o,u){var f=this.hls;f.config.capLevelToPlayerSize&&u.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var o=this.hls.levels;if(o.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(o.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},t.getMaxLevel=function(o){var u=this,f=this.hls.levels;if(!f.length)return-1;var a=f.filter(function(i,d){return m.isLevelAllowed(d,u.restrictedLevels)&&d<=o});return this.clientRect=null,m.getMaxLevelByMediaSize(a,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 o=this.media,u={width:0,height:0};if(o){var f=o.getBoundingClientRect();u.width=f.width,u.height=f.height,!u.width&&!u.height&&(u.width=f.right-f.left||o.width||0,u.height=f.bottom-f.top||o.height||0)}return this.clientRect=u,u},m.isLevelAllowed=function(o,u){return u===void 0&&(u=[]),u.indexOf(o)===-1},m.getMaxLevelByMediaSize=function(o,u,f){if(!o||!o.length)return-1;for(var a=function(l,c){return c?l.width!==c.width||l.height!==c.height:!0},i=o.length-1,d=0;d<o.length;d+=1){var s=o[d];if((s.width>=u||s.height>=f)&&a(s,o[d+1])){i=d;break}}return i},R(m,[{key:"mediaWidth",get:function(){return this.getDimensions().width*m.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*m.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var o=1;try{o=self.devicePixelRatio}catch(u){}return o}}]),m}();B.default=P},"./src/controller/cmcd-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./src/events.ts"),T=I("./src/types/cmcd.ts"),R=I("./src/utils/buffer-helper.ts"),P=I("./src/utils/logger.ts");function m(i,d){for(var s=0;s<d.length;s++){var n=d[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function t(i,d,s){return d&&m(i.prototype,d),s&&m(i,s),i}function b(i,d){var s=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(s)return(s=s.call(i)).next.bind(s);if(Array.isArray(i)||(s=o(i))||d&&i&&typeof i.length=="number"){s&&(i=s);var n=0;return function(){return n>=i.length?{done:!0}:{done:!1,value:i[n++]}}}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 o(i,d){if(!i)return;if(typeof i=="string")return u(i,d);var s=Object.prototype.toString.call(i).slice(8,-1);if(s==="Object"&&i.constructor&&(s=i.constructor.name),s==="Map"||s==="Set")return Array.from(i);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return u(i,d)}function u(i,d){(d==null||d>i.length)&&(d=i.length);for(var s=0,n=new Array(d);s<d;s++)n[s]=i[s];return n}function f(){return f=Object.assign||function(i){for(var d=1;d<arguments.length;d++){var s=arguments[d];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i[n]=s[n])}return i},f.apply(this,arguments)}var a=function(){function i(s){var n=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(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(x){try{n.apply(x,{ot:T.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(A){P.logger.warn("Could not generate manifest CMCD data.",A)}},this.applyFragmentData=function(x){try{var A=x.frag,C=n.hls.levels[A.level],k=n.getObjectType(A),w={d:A.duration*1e3,ot:k};(k===T.CMCDObjectType.VIDEO||k===T.CMCDObjectType.AUDIO||k==T.CMCDObjectType.MUXED)&&(w.br=C.bitrate/1e3,w.tb=n.getTopBandwidth(k),w.bl=n.getBufferLength(k)),n.apply(x,w)}catch(y){P.logger.warn("Could not generate segment CMCD data.",y)}},this.hls=s;var l=this.config=s.config,c=l.cmcd;c!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=c.sessionId||i.uuid(),this.cid=c.contentId,this.useHeaders=c.useHeaders===!0,this.registerListeners())}var d=i.prototype;return d.registerListeners=function(){var n=this.hls;n.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(F.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var n=this.hls;n.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(F.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(n,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(n,l){var c,x;this.audioBuffer=(c=l.tracks.audio)===null||c===void 0?void 0:c.buffer,this.videoBuffer=(x=l.tracks.video)===null||x===void 0?void 0:x.buffer},d.createData=function(){var n;return{v:T.CMCDVersion,sf:T.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(n,l){l===void 0&&(l={}),f(l,this.createData());var c=l.ot===T.CMCDObjectType.INIT||l.ot===T.CMCDObjectType.VIDEO||l.ot===T.CMCDObjectType.MUXED;if(this.starved&&c&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var x=i.toHeaders(l);if(!Object.keys(x).length)return;n.headers||(n.headers={}),f(n.headers,x)}else{var A=i.toQuery(l);if(!A)return;n.url=i.appendQueryToUri(n.url,A)}},d.getObjectType=function(n){var l=n.type;return l==="subtitle"?T.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?T.CMCDObjectType.INIT:l==="audio"?T.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?T.CMCDObjectType.VIDEO:T.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(n){for(var l=0,c=n===T.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,x=b(c),A;!(A=x()).done;){var C=A.value;C.bitrate>l&&(l=C.bitrate)}return l>0?l:NaN},d.getBufferLength=function(n){var l=this.hls.media,c=n===T.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!c||!l)return NaN;var x=R.BufferHelper.bufferInfo(c,l.currentTime,this.config.maxBufferHole);return x.len*1e3},d.createPlaylistLoader=function(){var n=this.config.pLoader,l=this.applyPlaylistData,c=n||this.config.loader;return function(){function x(C){this.loader=void 0,this.loader=new c(C)}var A=x.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(k,w,y){l(k),this.loader.load(k,w,y)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},d.createFragmentLoader=function(){var n=this.config.fLoader,l=this.applyFragmentData,c=n||this.config.loader;return function(){function x(C){this.loader=void 0,this.loader=new c(C)}var A=x.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(k,w,y){l(k),this.loader.load(k,w,y)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},i.uuid=function(){var n=URL.createObjectURL(new Blob),l=n.toString();return URL.revokeObjectURL(n),l.substr(l.lastIndexOf("/")+1)},i.serialize=function(n){for(var l=[],c=function(U){return!Number.isNaN(U)&&U!=null&&U!==""&&U!==!1},x=function(U){return Math.round(U)},A=function(U){return x(U/100)*100},C=function(U){return encodeURIComponent(U)},k={br:x,d:x,bl:A,dl:A,mtp:A,nor:C,rtp:A,tb:x},w=Object.keys(n||{}).sort(),y=b(w),h;!(h=y()).done;){var p=h.value,v=n[p];if(!c(v))continue;if(p==="v"&&v===1)continue;if(p=="pr"&&v===1)continue;var _=k[p];_&&(v=_(v));var E=typeof v,g=void 0;p==="ot"||p==="sf"||p==="st"?g=p+"="+v:E==="boolean"?g=p:E==="number"?g=p+"="+v:g=p+"="+JSON.stringify(v),l.push(g)}return l.join(",")},i.toHeaders=function(n){for(var l=Object.keys(n),c={},x=["Object","Request","Session","Status"],A=[{},{},{},{}],C={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},k=0,w=l;k<w.length;k++){var y=w[k],h=C[y]!=null?C[y]:1;A[h][y]=n[y]}for(var p=0;p<A.length;p++){var v=i.serialize(A[p]);v&&(c["CMCD-"+x[p]]=v)}return c},i.toQuery=function(n){return"CMCD="+encodeURIComponent(i.serialize(n))},i.appendQueryToUri=function(n,l){if(!l)return n;var c=n.includes("?")?"&":"?";return""+n+c+l},i}()},"./src/controller/eme-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),T=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),P=I("./src/utils/mediakeys-helper.ts");function m(a,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function t(a,i,d){return i&&m(a.prototype,i),d&&m(a,d),a}var b=3,o=function(i,d,s){var n={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(l){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:s.audioRobustness||""})}),d.forEach(function(l){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:s.videoRobustness||""})}),[n]},u=function(i,d,s,n){switch(i){case P.KeySystems.WIDEVINE:return o(d,s,n);default:throw new Error("Unknown key-system: "+i)}},f=function(){function a(d){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=d,this._config=d.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var i=a.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(F.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(s){switch(s){case P.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},i._attemptKeySystemAccess=function(s,n,l){var c=this,x=u(s,n,l,this._drmSystemOptions);R.logger.log("Requesting encrypted media key-system access");var A=this.requestMediaKeySystemAccess(s,x);this.mediaKeysPromise=A.then(function(C){return c._onMediaKeySystemAccessObtained(s,C)}),A.catch(function(C){R.logger.error('Failed to obtain key-system "'+s+'" access:',C)})},i._onMediaKeySystemAccessObtained=function(s,n){var l=this;R.logger.log('Access for key-system "'+s+'" obtained');var c={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:s};this._mediaKeysList.push(c);var x=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(A){return c.mediaKeys=A,R.logger.log('Media-keys created for key-system "'+s+'"'),l._onMediaKeysCreated(),A});return x.catch(function(A){R.logger.error("Failed to create media-keys:",A)}),x},i._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),s._onNewMediaKeySession(n.mediaKeysSession))})},i._onNewMediaKeySession=function(s){var n=this;R.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(l){n._onKeySessionMessage(s,l.message)},!1)},i._onKeySessionMessage=function(s,n){R.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(l){R.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),s.update(l)})},i.onMediaEncrypted=function(s){var n=this;if(R.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){R.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(x){if(!n._media)return;n._attemptSetMediaKeys(x),n._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(l).catch(l)},i._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){R.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}R.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(s,n){var l=this,c=this._mediaKeysList[0];if(!c){R.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(c.mediaKeysSessionInitialized){R.logger.warn("Key-Session already initialized but requested again");return}var x=c.mediaKeysSession;if(!x){R.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){R.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}R.logger.log('Generating key-session request for "'+s+'" init data type'),c.mediaKeysSessionInitialized=!0,x.generateRequest(s,n).then(function(){R.logger.debug("Key-session generation succeeded")}).catch(function(A){R.logger.error("Error generating key-session request:",A),l.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(s,n,l){var c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,c,s,n,l);var x=this._licenseXhrSetup;if(x)try{x.call(this.hls,c,s),x=void 0}catch(A){R.logger.error(A)}try{c.readyState||c.open("POST",s,!0),x&&x.call(this.hls,c,s)}catch(A){throw new Error("issue setting up KeySystem license XHR "+A)}return c},i._onLicenseRequestReadyStageChange=function(s,n,l,c){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,R.logger.log("License request succeeded");var x=s.response,A=this._licenseResponseCallback;if(A)try{x=A.call(this.hls,s,n)}catch(k){R.logger.error(k)}c(x)}else{if(R.logger.error("License Request XHR failed ("+n+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>b){this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=b-this._requestLicenseFailureCount+1;R.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(l,c)}break}},i._generateLicenseRequestChallenge=function(s,n){switch(s.mediaKeySystemDomain){case P.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},i._requestLicense=function(s,n){R.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){R.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var c=this.getLicenseServerUrl(l.mediaKeySystemDomain),x=this._createLicenseXhr(c,s,n);R.logger.log("Sending license request to URL: "+c);var A=this._generateLicenseRequestChallenge(l,s);x.send(A)}catch(C){R.logger.error("Failure requesting DRM license: "+C),this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.KEY_SYSTEM_ERROR,details:T.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(s,n){if(!this._emeEnabled)return;var l=n.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var s=this._media,n=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(s,n){if(!this._emeEnabled)return;var l=n.levels.map(function(x){return x.audioCodec}).filter(function(x){return!!x}),c=n.levels.map(function(x){return x.videoCodec}).filter(function(x){return!!x});this._attemptKeySystemAccess(P.KeySystems.WIDEVINE,l,c)},t(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();B.default=f},"./src/controller/fps-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),T=I("./src/utils/logger.ts"),R=function(){function P(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 m=P.prototype;return m.setStreamController=function(b){this.streamController=b},m.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},m.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching)},m.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},m.onMediaAttaching=function(b,o){var u=this.hls.config;if(u.capLevelOnFPSDrop){var f=o.media instanceof self.HTMLVideoElement?o.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),u.fpsDroppedMonitoringPeriod)}},m.checkFPS=function(b,o,u){var f=performance.now();if(o){if(this.lastTime){var a=f-this.lastTime,i=u-this.lastDroppedFrames,d=o-this.lastDecodedFrames,s=1e3*i/a,n=this.hls;if(n.trigger(F.Events.FPS_DROP,{currentDropped:i,currentDecoded:d,totalDroppedFrames:u}),s>0&&i>n.config.fpsDroppedMonitoringThreshold*d){var l=n.currentLevel;T.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=l)&&(l=l-1,n.trigger(F.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:n.currentLevel}),n.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=u,this.lastDecodedFrames=o}},m.checkFPSInterval=function(){var b=this.media;if(b)if(this.isVideoPlaybackQualityAvailable){var o=b.getVideoPlaybackQuality();this.checkFPS(b,o.totalVideoFrames,o.droppedVideoFrames)}else this.checkFPS(b,b.webkitDecodedFrameCount,b.webkitDroppedFrameCount)},P}();B.default=R},"./src/controller/fragment-finders.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"findFragmentByPDT",function(){return R}),I.d(B,"findFragmentByPTS",function(){return P}),I.d(B,"fragmentWithinToleranceTest",function(){return m}),I.d(B,"pdtWithinToleranceTest",function(){return t}),I.d(B,"findFragWithCC",function(){return b});var F=I("./src/polyfills/number.ts"),T=I("./src/utils/binary-search.ts");function R(o,u,f){if(u===null||!Array.isArray(o)||!o.length||!Object(F.isFiniteNumber)(u))return null;var a=o[0].programDateTime;if(u<(a||0))return null;var i=o[o.length-1].endProgramDateTime;if(u>=(i||0))return null;f=f||0;for(var d=0;d<o.length;++d){var s=o[d];if(t(u,f,s))return s}return null}function P(o,u,f,a){f===void 0&&(f=0),a===void 0&&(a=0);var i=null;if(o?i=u[o.sn-u[0].sn+1]||null:f===0&&u[0].start===0&&(i=u[0]),i&&m(f,a,i)===0)return i;var d=T.default.search(u,m.bind(null,f,a));return d||i}function m(o,u,f){o===void 0&&(o=0),u===void 0&&(u=0);var a=Math.min(u,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-a<=o?1:f.start-a>o&&f.start?-1:0}function t(o,u,f){var a=Math.min(u,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,i=f.endProgramDateTime||0;return i-a>o}function b(o,u){return T.default.search(o,function(f){return f.cc<u?1:f.cc>u?-1:0})}},"./src/controller/fragment-tracker.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"FragmentState",function(){return R}),I.d(B,"FragmentTracker",function(){return P});var F=I("./src/events.ts"),T=I("./src/types/loader.ts"),R;(function(b){b.NOT_LOADED="NOT_LOADED",b.BACKTRACKED="BACKTRACKED",b.APPENDING="APPENDING",b.PARTIAL="PARTIAL",b.OK="OK"})(R||(R={}));var P=function(){function b(u){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=u,this._registerListeners()}var o=b.prototype;return o._registerListeners=function(){var f=this.hls;f.on(F.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.on(F.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(F.Events.FRAG_LOADED,this.onFragLoaded,this)},o._unregisterListeners=function(){var f=this.hls;f.off(F.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.off(F.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(F.Events.FRAG_LOADED,this.onFragLoaded,this)},o.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},o.getAppendedFrag=function(f,a){if(a===T.PlaylistLevelType.MAIN){var i=this.activeFragment,d=this.activeParts;if(!i)return null;if(d)for(var s=d.length;s--;){var n=d[s],l=n?n.end:i.appendedPTS;if(n.start<=f&&l!==void 0&&f<=l)return s>9&&(this.activeParts=d.slice(s-9)),n}else if(i.start<=f&&i.appendedPTS!==void 0&&f<=i.appendedPTS)return i}return this.getBufferedFrag(f,a)},o.getBufferedFrag=function(f,a){for(var i=this.fragments,d=Object.keys(i),s=d.length;s--;){var n=i[d[s]];if((n==null?void 0:n.body.type)===a&&n.buffered){var l=n.body;if(l.start<=f&&f<=l.end)return l}}return null},o.detectEvictedFragments=function(f,a,i){var d=this;Object.keys(this.fragments).forEach(function(s){var n=d.fragments[s];if(!n)return;if(!n.buffered){n.body.type===i&&d.removeFragment(n.body);return}var l=n.range[f];if(!l)return;l.time.some(function(c){var x=!d.isTimeBuffered(c.startPTS,c.endPTS,a);return x&&d.removeFragment(n.body),x})})},o.detectPartialFragments=function(f){var a=this,i=this.timeRanges,d=f.frag,s=f.part;if(!i||d.sn==="initSegment")return;var n=t(d),l=this.fragments[n];if(!l)return;Object.keys(i).forEach(function(c){var x=d.elementaryStreams[c];if(!x)return;var A=i[c],C=s!==null||x.partial===!0;l.range[c]=a.getBufferedTimes(d,s,C,A)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},o.fragBuffered=function(f){var a=t(f),i=this.fragments[a];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},o.getBufferedTimes=function(f,a,i,d){for(var s={time:[],partial:i},n=a?a.start:f.start,l=a?a.end:f.end,c=f.minEndPTS||l,x=f.maxStartPTS||n,A=0;A<d.length;A++){var C=d.start(A)-this.bufferPadding,k=d.end(A)+this.bufferPadding;if(x>=C&&c<=k){s.time.push({startPTS:Math.max(n,d.start(A)),endPTS:Math.min(l,d.end(A))});break}else if(n<k&&l>C)s.partial=!0,s.time.push({startPTS:Math.max(n,d.start(A)),endPTS:Math.min(l,d.end(A))});else if(l<=C)break}return s},o.getPartialFragment=function(f){var a=null,i,d,s,n=0,l=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(x){var A=c[x];if(!A)return;m(A)&&(d=A.body.start-l,s=A.body.end+l,f>=d&&f<=s&&(i=Math.min(f-d,s-f),n<=i&&(a=A.body,n=i)))}),a},o.getState=function(f){var a=t(f),i=this.fragments[a];return i?i.buffered?m(i)?R.PARTIAL:R.OK:i.backtrack?R.BACKTRACKED:R.APPENDING:R.NOT_LOADED},o.backtrack=function(f,a){var i=t(f),d=this.fragments[i];if(!d||d.backtrack)return null;var s=d.backtrack=a||d.loaded;return d.loaded=null,s},o.getBacktrackData=function(f){var a=t(f),i=this.fragments[a];if(i){var d,s=i.backtrack;if(s!=null&&(d=s.payload)!==null&&d!==void 0&&d.byteLength)return s;this.removeFragment(f)}return null},o.isTimeBuffered=function(f,a,i){for(var d,s,n=0;n<i.length;n++){if(d=i.start(n)-this.bufferPadding,s=i.end(n)+this.bufferPadding,f>=d&&a<=s)return!0;if(a<=d)return!1}return!1},o.onFragLoaded=function(f,a){var i=a.frag,d=a.part;if(i.sn==="initSegment"||i.bitrateTest||d)return;var s=t(i);this.fragments[s]={body:i,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},o.onBufferAppended=function(f,a){var i=this,d=a.frag,s=a.part,n=a.timeRanges;if(d.type===T.PlaylistLevelType.MAIN)if(this.activeFragment=d,s){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(s)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(c){var x=n[c];if(i.detectEvictedFragments(c,x),!s)for(var A=0;A<x.length;A++)d.appendedPTS=Math.max(x.end(A),d.appendedPTS||0)})},o.onFragBuffered=function(f,a){this.detectPartialFragments(a)},o.hasFragment=function(f){var a=t(f);return!!this.fragments[a]},o.removeFragmentsInRange=function(f,a,i){var d=this;Object.keys(this.fragments).forEach(function(s){var n=d.fragments[s];if(!n)return;if(n.buffered){var l=n.body;l.type===i&&l.start<a&&l.end>f&&d.removeFragment(l)}})},o.removeFragment=function(f){var a=t(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[a]},o.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},b}();function m(b){var o,u;return b.buffered&&(((o=b.range.video)===null||o===void 0?void 0:o.partial)||((u=b.range.audio)===null||u===void 0?void 0:u.partial))}function t(b){return b.type+"_"+b.level+"_"+b.urlId+"_"+b.sn}},"./src/controller/gap-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"STALL_MINIMUM_DURATION_MS",function(){return m}),I.d(B,"MAX_START_GAP_JUMP",function(){return t}),I.d(B,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return b}),I.d(B,"SKIP_BUFFER_RANGE_START",function(){return o}),I.d(B,"default",function(){return u});var F=I("./src/utils/buffer-helper.ts"),T=I("./src/errors.ts"),R=I("./src/events.ts"),P=I("./src/utils/logger.ts"),m=250,t=2,b=.1,o=.05,u=function(){function f(i,d,s,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=i,this.media=d,this.fragmentTracker=s,this.hls=n}var a=f.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(d){var s=this.config,n=this.media,l=this.stalled,c=n.currentTime,x=n.seeking,A=this.seeking&&!x,C=!this.seeking&&x;if(this.seeking=x,c!==d){if(this.moved=!0,l!==null){if(this.stallReported){var k=self.performance.now()-l;P.logger.warn("playback not stuck anymore @"+c+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((C||A)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!F.BufferHelper.getBuffered(n).length)return;var w=F.BufferHelper.bufferInfo(n,c,0),y=w.len>0,h=w.nextStart||0;if(!y&&!h)return;if(x){var p=w.len>t,v=!h||h-c>t&&!this.fragmentTracker.getPartialFragment(c);if(p||v)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var _,E=Math.max(h,w.start||0)-c,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,j=g==null||((_=g.details)===null||_===void 0)?void 0:_.live,U=j?g.details.targetduration*2:t;if(E>0&&E<=U){this._trySkipBufferHole(null);return}}var S=self.performance.now();if(l===null){this.stalled=S;return}var z=S-l;!x&&z>=m&&this._reportStall(w.len);var H=F.BufferHelper.bufferInfo(n,c,s.maxBufferHole);this._tryFixBufferStall(H,z)},a._tryFixBufferStall=function(d,s){var n=this.config,l=this.fragmentTracker,c=this.media,x=c.currentTime,A=l.getPartialFragment(x);if(A){var C=this._trySkipBufferHole(A);if(C)return}d.len>n.maxBufferHole&&s>n.highBufferWatchdogPeriod*1e3&&(P.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(d){var s=this.hls,n=this.media,l=this.stallReported;l||(this.stallReported=!0,P.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+d+")"),s.trigger(R.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},a._trySkipBufferHole=function(d){for(var s=this.config,n=this.hls,l=this.media,c=l.currentTime,x=0,A=F.BufferHelper.getBuffered(l),C=0;C<A.length;C++){var k=A.start(C);if(c+s.maxBufferHole>=x&&c<k){var w=Math.max(k+o,l.currentTime+b);return P.logger.warn("skipping hole, adjusting currentTime from "+c+" to "+w),this.moved=!0,this.stalled=null,l.currentTime=w,d&&n.trigger(R.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+c+" to "+w,frag:d}),w}x=A.end(C)}return 0},a._tryNudgeBuffer=function(){var d=this.config,s=this.hls,n=this.media,l=n.currentTime,c=(this.nudgeRetry||0)+1;if(this.nudgeRetry=c,c<d.nudgeMaxRetry){var x=l+c*d.nudgeOffset;P.logger.warn("Nudging 'currentTime' from "+l+" to "+x),n.currentTime=x,s.trigger(R.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else P.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+d.nudgeMaxRetry+" nudges"),s.trigger(R.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},f}()},"./src/controller/id3-track-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),T=I("./src/utils/texttrack-utils.ts"),R=I("./src/demux/id3.ts"),P=.25,m=function(){function t(o){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=o,this._registerListeners()}var b=t.prototype;return b.destroy=function(){this._unregisterListeners()},b._registerListeners=function(){var u=this.hls;u.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(F.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var u=this.hls;u.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(F.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),u.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.onMediaAttached=function(u,f){this.media=f.media},b.onMediaDetaching=function(){if(!this.id3Track)return;Object(T.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},b.getID3Track=function(u){if(!this.media)return;for(var f=0;f<u.length;f++){var a=u[f];if(a.kind==="metadata"&&a.label==="id3")return Object(T.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},b.onFragParsingMetadata=function(u,f){if(!this.media)return;var a=f.frag,i=f.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<i.length;s++){var n=R.getID3Frames(i[s].data);if(n){var l=i[s].pts,c=s<i.length-1?i[s+1].pts:a.end,x=c-l;x<=0&&(c=l+P);for(var A=0;A<n.length;A++){var C=n[A];if(!R.isTimeStampFrame(C)){var k=new d(l,c,"");k.value=C,this.id3Track.addCue(k)}}}}},b.onBufferFlushing=function(u,f){var a=f.startOffset,i=f.endOffset,d=f.type;if(!d||d==="audio"){var s=this.id3Track;s&&Object(T.removeCuesInRange)(s,a,i)}},t}();B.default=m},"./src/controller/latency-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/errors.ts"),T=I("./src/events.ts"),R=I("./src/utils/logger.ts");function P(b,o){for(var u=0;u<o.length;u++){var f=o[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(b,f.key,f)}}function m(b,o,u){return o&&P(b.prototype,o),u&&P(b,u),b}var t=function(){function b(u){var f=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 f.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var o=b.prototype;return o.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},o.registerListeners=function(){this.hls.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(T.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(T.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){this.hls.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(T.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(T.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(T.Events.ERROR,this.onError)},o.onMediaAttached=function(f,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},o.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},o.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},o.onLevelUpdated=function(f,a){var i=a.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},o.onError=function(f,a){if(a.details!==F.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,R.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},o.timeupdate=function(){var f=this.media,a=this.levelDetails;if(!f||!a)return;this.currentTime=f.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var d=this.config,s=d.lowLatencyMode,n=d.maxLiveSyncPlaybackRate;if(!s||n===1)return;var l=this.targetLatency;if(l===null)return;var c=i-l,x=Math.min(this.maxLatency,l+a.targetduration),A=c<x;if(a.live&&A&&c>.05&&this.forwardBufferLength>1){var C=Math.min(2,Math.max(1,n)),k=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;f.playbackRate=Math.min(C,Math.max(1,k))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},o.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},o.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},m(b,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var f=this.config,a=this.levelDetails;return f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:a?f.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var f=this.levelDetails;if(f===null)return null;var a=f.holdBack,i=f.partHoldBack,d=f.targetduration,s=this.config,n=s.liveSyncDuration,l=s.liveSyncDurationCount,c=s.lowLatencyMode,x=this.hls.userConfig,A=c&&i||a;(x.liveSyncDuration||x.liveSyncDurationCount||A===0)&&(A=n!==void 0?n:l*d);var C=d,k=1;return A+Math.min(this.stallCount*k,C)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),a=this.targetLatency,i=this.levelDetails;if(f===null||a===null||i===null)return null;var d=i.edge,s=f-a-this.edgeStalled,n=d-i.totalduration,l=d-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(n,s),l)}},{key:"drift",get:function(){var f=this.levelDetails;return f===null?1:f.drift}},{key:"edgeStalled",get:function(){var f=this.levelDetails;if(f===null)return 0;var a=(this.config.lowLatencyMode&&f.partTarget||f.targetduration)*3;return Math.max(f.age-a,0)}},{key:"forwardBufferLength",get:function(){var f=this.media,a=this.levelDetails;if(!f||!a)return 0;var i=f.buffered.length;return i?f.buffered.end(i-1):a.edge-this.currentTime}}]),b}()},"./src/controller/level-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return s});var F=I("./src/types/level.ts"),T=I("./src/events.ts"),R=I("./src/errors.ts"),P=I("./src/utils/codecs.ts"),m=I("./src/controller/level-helper.ts"),t=I("./src/controller/base-playlist-controller.ts"),b=I("./src/types/loader.ts");function o(){return o=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var c=arguments[l];for(var x in c)Object.prototype.hasOwnProperty.call(c,x)&&(n[x]=c[x])}return n},o.apply(this,arguments)}function u(n,l){for(var c=0;c<l.length;c++){var x=l[c];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(n,x.key,x)}}function f(n,l,c){return l&&u(n.prototype,l),c&&u(n,c),n}function a(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,i(n,l)}function i(n,l){return i=Object.setPrototypeOf||function(x,A){return x.__proto__=A,x},i(n,l)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(n){a(l,n);function l(x){var A;return A=n.call(this,x,"[level-controller]")||this,A._levels=[],A._firstLevel=-1,A._startLevel=void 0,A.currentLevelIndex=-1,A.manualLevelIndex=-1,A.onParsedComplete=void 0,A._registerListeners(),A}var c=l.prototype;return c._registerListeners=function(){var A=this.hls;A.on(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.on(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.on(T.Events.FRAG_LOADED,this.onFragLoaded,this),A.on(T.Events.ERROR,this.onError,this)},c._unregisterListeners=function(){var A=this.hls;A.off(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.off(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.off(T.Events.FRAG_LOADED,this.onFragLoaded,this),A.off(T.Events.ERROR,this.onError,this)},c.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},c.startLoad=function(){var A=this._levels;A.forEach(function(C){C.loadError=0}),n.prototype.startLoad.call(this)},c.onManifestLoaded=function(A,C){var k=[],w=[],y=[],h,p={},v,_=!1,E=!1,g=!1;if(C.levels.forEach(function(z){var H=z.attrs;_=_||!!(z.width&&z.height),E=E||!!z.videoCodec,g=g||!!z.audioCodec,d&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var M=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;v=p[M],v?v.url.push(z.url):(v=new F.Level(z),p[M]=v,k.push(v)),H&&(H.AUDIO&&Object(m.addGroupId)(v,"audio",H.AUDIO),H.SUBTITLES&&Object(m.addGroupId)(v,"text",H.SUBTITLES))}),(_||E)&&g&&(k=k.filter(function(z){var H=z.videoCodec,M=z.width,V=z.height;return!!H||!!(M&&V)})),k=k.filter(function(z){var H=z.audioCodec,M=z.videoCodec;return(!H||Object(P.isCodecSupportedInMp4)(H,"audio"))&&(!M||Object(P.isCodecSupportedInMp4)(M,"video"))}),C.audioTracks&&(w=C.audioTracks.filter(function(z){return!z.audioCodec||Object(P.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(m.assignTrackIdsByGroup)(w)),C.subtitles&&(y=C.subtitles,Object(m.assignTrackIdsByGroup)(y)),k.length>0){h=k[0].bitrate,k.sort(function(z,H){return z.bitrate-H.bitrate}),this._levels=k;for(var j=0;j<k.length;j++)if(k[j].bitrate===h){this._firstLevel=j,this.log("manifest loaded, "+k.length+" level(s) found, first bitrate: "+h);break}var U=g&&!E,S={levels:k,audioTracks:w,subtitleTracks:y,firstLevel:this._firstLevel,stats:C.stats,audio:g,video:E,altAudio:!U&&w.some(function(z){return!!z.url})};this.hls.trigger(T.Events.MANIFEST_PARSED,S),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(T.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:C.url,reason:"no level with compatible codecs found in manifest"})},c.onError=function(A,C){if(n.prototype.onError.call(this,A,C),C.fatal)return;var k=C.context,w=this._levels[this.currentLevelIndex];if(k&&(k.type===b.PlaylistContextType.AUDIO_TRACK&&w.audioGroupIds&&k.groupId===w.audioGroupIds[w.urlId]||k.type===b.PlaylistContextType.SUBTITLE_TRACK&&w.textGroupIds&&k.groupId===w.textGroupIds[w.urlId])){this.redundantFailover(this.currentLevelIndex);return}var y=!1,h=!0,p;switch(C.details){case R.ErrorDetails.FRAG_LOAD_ERROR:case R.ErrorDetails.FRAG_LOAD_TIMEOUT:case R.ErrorDetails.KEY_LOAD_ERROR:case R.ErrorDetails.KEY_LOAD_TIMEOUT:if(C.frag){var v=this._levels[C.frag.level];v?(v.fragmentError++,v.fragmentError>this.hls.config.fragLoadingMaxRetry&&(p=C.frag.level)):p=C.frag.level}break;case R.ErrorDetails.LEVEL_LOAD_ERROR:case R.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(h=!1),p=k.level),y=!0;break;case R.ErrorDetails.REMUX_ALLOC_ERROR:p=C.level,y=!0;break}p!==void 0&&this.recoverLevel(C,p,y,h)},c.recoverLevel=function(A,C,k,w){var y=A.details,h=this._levels[C];if(h.loadError++,k){var p=this.retryLoadingOrFail(A);if(p)A.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var v=h.url.length;if(v>1&&h.loadError<v)A.levelRetry=!0,this.redundantFailover(C);else if(this.manualLevelIndex===-1){var _=C===0?this._levels.length-1:C-1;this.currentLevelIndex!==_&&this._levels[_].loadError===0&&(this.warn(y+": switch to "+_),A.levelRetry=!0,this.hls.nextAutoLevel=_)}}},c.redundantFailover=function(A){var C=this._levels[A],k=C.url.length;if(k>1){var w=(C.urlId+1)%k;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(y){y.urlId=w}),this.level=A}},c.onFragLoaded=function(A,C){var k=C.frag;if(k!==void 0&&k.type===b.PlaylistLevelType.MAIN){var w=this._levels[k.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},c.onLevelLoaded=function(A,C){var k,w=C.level,y=C.details,h=this._levels[w];if(!h){var p;this.warn("Invalid level index "+w),(p=C.deliveryDirectives)!==null&&p!==void 0&&p.skip&&(y.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(h.fragmentError===0&&(h.loadError=0,this.retryCount=0),this.playlistLoaded(w,C,h.details)):(k=C.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(y.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(A,C){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var w=-1,y=this.hls.audioTracks[C.id].groupId,h=0;h<k.audioGroupIds.length;h++)if(k.audioGroupIds[h]===y){w=h;break}w!==k.urlId&&(k.urlId=w,this.startLoad())}},c.loadPlaylist=function(A){var C=this.currentLevelIndex,k=this._levels[C];if(this.canLoad&&k&&k.url.length>0){var w=k.urlId,y=k.url[w];if(A)try{y=A.addDirectives(y)}catch(h){this.warn("Could not construct new URL with HLS Delivery Directives: "+h)}this.log("Attempt loading level index "+C+(A?" at sn "+A.msn+" part "+A.part:"")+" with URL-id "+w+" "+y),this.clearTimer(),this.hls.trigger(T.Events.LEVEL_LOADING,{url:y,level:C,id:w,deliveryDirectives:A||null})}},c.removeLevel=function(A,C){var k=function(h,p){return p!==C},w=this._levels.filter(function(y,h){return h!==A?!0:y.url.length>1&&C!==void 0?(y.url=y.url.filter(k),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(k)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(k)),y.urlId=0,!0):!1}).map(function(y,h){var p=y.details;return p!=null&&p.fragments&&p.fragments.forEach(function(v){v.level=h}),y});this._levels=w,this.hls.trigger(T.Events.LEVELS_UPDATED,{levels:w})},f(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(A){var C,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===A&&(C=k[A])!==null&&C!==void 0&&C.details)return;if(A<0||A>=k.length){var w=A<0;if(this.hls.trigger(T.Events.ERROR,{type:R.ErrorTypes.OTHER_ERROR,details:R.ErrorDetails.LEVEL_SWITCH_ERROR,level:A,fatal:w,reason:"invalid level idx"}),w)return;A=Math.min(A,k.length-1)}this.clearTimer();var y=this.currentLevelIndex,h=k[y],p=k[A];this.log("switching to level "+A+" from "+y),this.currentLevelIndex=A;var v=o({},p,{level:A,maxBitrate:p.maxBitrate,uri:p.uri,urlId:p.urlId});delete v._urlId,this.hls.trigger(T.Events.LEVEL_SWITCHING,v);var _=p.details;if(!_||_.live){var E=this.switchParams(p.uri,h==null?void 0:h.details);this.loadPlaylist(E)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(A){this.manualLevelIndex=A,this._startLevel===void 0&&(this._startLevel=A),A!==-1&&(this.level=A)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(A){this._firstLevel=A}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var A=this.hls.config.startLevel;return A!==void 0?A:this._firstLevel}else return this._startLevel},set:function(A){this._startLevel=A}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(A){this.level=A,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=A)}}]),l}(t.default)},"./src/controller/level-helper.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"addGroupId",function(){return R}),I.d(B,"assignTrackIdsByGroup",function(){return P}),I.d(B,"updatePTS",function(){return m}),I.d(B,"updateFragPTSDTS",function(){return b}),I.d(B,"mergeDetails",function(){return o}),I.d(B,"mapPartIntersection",function(){return u}),I.d(B,"mapFragmentIntersection",function(){return f}),I.d(B,"adjustSliding",function(){return a}),I.d(B,"addSliding",function(){return i}),I.d(B,"computeReloadInterval",function(){return d}),I.d(B,"getFragmentWithSN",function(){return s}),I.d(B,"getPartWith",function(){return n});var F=I("./src/polyfills/number.ts"),T=I("./src/utils/logger.ts");function R(l,c,x){switch(c){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(x);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(x);break}}function P(l){var c={};l.forEach(function(x){var A=x.groupId||"";x.id=c[A]=c[A]||0,c[A]++})}function m(l,c,x){var A=l[c],C=l[x];t(A,C)}function t(l,c){var x=c.startPTS;if(Object(F.isFiniteNumber)(x)){var A=0,C;c.sn>l.sn?(A=x-l.start,C=l):(A=l.start-x,C=c),C.duration!==A&&(C.duration=A)}else if(c.sn>l.sn){var k=l.cc===c.cc;k&&l.minEndPTS?c.start=l.start+(l.minEndPTS-l.start):c.start=l.start+l.duration}else c.start=Math.max(l.start-c.duration,0)}function b(l,c,x,A,C,k){var w=A-x;w<=0&&(T.logger.warn("Fragment should have a positive duration",c),A=x+c.duration,k=C+c.duration);var y=x,h=A,p=c.startPTS,v=c.endPTS;if(Object(F.isFiniteNumber)(p)){var _=Math.abs(p-x);Object(F.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(_,c.deltaPTS):c.deltaPTS=_,y=Math.max(x,p),x=Math.min(x,p),C=Math.min(C,c.startDTS),h=Math.min(A,v),A=Math.max(A,v),k=Math.max(k,c.endDTS)}c.duration=A-x;var E=x-c.start;c.appendedPTS=A,c.start=c.startPTS=x,c.maxStartPTS=y,c.startDTS=C,c.endPTS=A,c.minEndPTS=h,c.endDTS=k;var g=c.sn;if(!l||g<l.startSN||g>l.endSN)return 0;var j,U=g-l.startSN,S=l.fragments;for(S[U]=c,j=U;j>0;j--)t(S[j],S[j-1]);for(j=U;j<S.length-1;j++)t(S[j],S[j+1]);return l.fragmentHint&&t(S[S.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,E}function o(l,c){for(var x=null,A=l.fragments,C=A.length-1;C>=0;C--){var k=A[C].initSegment;if(k){x=k;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var w=0,y;if(f(l,c,function(j,U){j.relurl&&(w=j.cc-U.cc),Object(F.isFiniteNumber)(j.startPTS)&&Object(F.isFiniteNumber)(j.endPTS)&&(U.start=U.startPTS=j.startPTS,U.startDTS=j.startDTS,U.appendedPTS=j.appendedPTS,U.maxStartPTS=j.maxStartPTS,U.endPTS=j.endPTS,U.endDTS=j.endDTS,U.minEndPTS=j.minEndPTS,U.duration=j.endPTS-j.startPTS,U.duration&&(y=U),c.PTSKnown=c.alignedSliding=!0),U.elementaryStreams=j.elementaryStreams,U.loader=j.loader,U.stats=j.stats,U.urlId=j.urlId,j.initSegment&&(U.initSegment=j.initSegment,x=j.initSegment)}),x){var h=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;h.forEach(function(j){var U;(!j.initSegment||j.initSegment.relurl===((U=x)===null||U===void 0?void 0:U.relurl))&&(j.initSegment=x)})}if(c.skippedSegments&&(c.deltaUpdateFailed=c.fragments.some(function(j){return!j}),c.deltaUpdateFailed)){T.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=c.skippedSegments;p--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}var v=c.fragments;if(w){T.logger.warn("discontinuity sliding from playlist, take drift into account");for(var _=0;_<v.length;_++)v[_].cc+=w}c.skippedSegments&&(c.startCC=c.fragments[0].cc),u(l.partList,c.partList,function(j,U){U.elementaryStreams=j.elementaryStreams,U.stats=j.stats}),y?b(c,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):a(l,c),v.length&&(c.totalduration=c.edge-v[0].start),c.driftStartTime=l.driftStartTime,c.driftStart=l.driftStart;var E=c.advancedDateTime;if(c.advanced&&E){var g=c.edge;c.driftStart||(c.driftStartTime=E,c.driftStart=g),c.driftEndTime=E,c.driftEnd=g}else c.driftEndTime=l.driftEndTime,c.driftEnd=l.driftEnd,c.advancedDateTime=l.advancedDateTime}function u(l,c,x){if(l&&c)for(var A=0,C=0,k=l.length;C<=k;C++){var w=l[C],y=c[C+A];w&&y&&w.index===y.index&&w.fragment.sn===y.fragment.sn?x(w,y):A--}}function f(l,c,x){for(var A=c.skippedSegments,C=Math.max(l.startSN,c.startSN)-c.startSN,k=(l.fragmentHint?1:0)+(A?c.endSN:Math.min(l.endSN,c.endSN))-c.startSN,w=c.startSN-l.startSN,y=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,h=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,p=C;p<=k;p++){var v=h[w+p],_=y[p];A&&!_&&p<A&&(_=c.fragments[p]=v),v&&_&&x(v,_)}}function a(l,c){var x=c.startSN+c.skippedSegments-l.startSN,A=l.fragments;if(x<0||x>=A.length)return;i(c,A[x].start)}function i(l,c){if(c){for(var x=l.fragments,A=l.skippedSegments;A<x.length;A++)x[A].start+=c;l.fragmentHint&&(l.fragmentHint.start+=c)}}function d(l,c){var x=1e3*l.levelTargetDuration,A=x/2,C=l.age,k=C>0&&C<x*3,w=c.loading.end-c.loading.start,y,h=l.availabilityDelay;if(l.updated===!1)if(k){var p=333*l.misses;y=Math.max(Math.min(A,w*2),p),l.availabilityDelay=(l.availabilityDelay||0)+y}else y=A;else k?(h=Math.min(h||x/2,C),l.availabilityDelay=h,y=h+x-C):y=x-w;return Math.round(y)}function s(l,c,x){if(!l||!l.details)return null;var A=l.details,C=A.fragments[c-A.startSN];return C||(C=A.fragmentHint,C&&C.sn===c?C:c<A.startSN&&x&&x.sn===c?x:null)}function n(l,c,x){if(!l||!l.details)return null;var A=l.details.partList;if(A)for(var C=A.length;C--;){var k=A[C];if(k.index===x&&k.fragment.sn===c)return k}return null}},"./src/controller/stream-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return A});var F=I("./src/polyfills/number.ts"),T=I("./src/controller/base-stream-controller.ts"),R=I("./src/is-supported.ts"),P=I("./src/events.ts"),m=I("./src/utils/buffer-helper.ts"),t=I("./src/controller/fragment-tracker.ts"),b=I("./src/types/loader.ts"),o=I("./src/loader/fragment.ts"),u=I("./src/demux/transmuxer-interface.ts"),f=I("./src/types/transmuxer.ts"),a=I("./src/controller/gap-controller.ts"),i=I("./src/errors.ts"),d=I("./src/utils/logger.ts");function s(C,k){for(var w=0;w<k.length;w++){var y=k[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}function n(C,k,w){return k&&s(C.prototype,k),w&&s(C,w),C}function l(C,k){C.prototype=Object.create(k.prototype),C.prototype.constructor=C,c(C,k)}function c(C,k){return c=Object.setPrototypeOf||function(y,h){return y.__proto__=h,y},c(C,k)}var x=100,A=function(C){l(k,C);function k(y,h){var p;return p=C.call(this,y,h,"[stream-controller]")||this,p.audioCodecSwap=!1,p.gapController=null,p.level=-1,p._forceStartLoad=!1,p.altAudio=!1,p.audioOnly=!1,p.fragPlaying=null,p.onvplaying=null,p.onvseeked=null,p.fragLastKbps=0,p.stalled=!1,p.couldBacktrack=!1,p.audioCodecSwitch=!1,p.videoBuffer=null,p._registerListeners(),p}var w=k.prototype;return w._registerListeners=function(){var h=this.hls;h.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),h.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),h.on(P.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),h.on(P.Events.ERROR,this.onError,this),h.on(P.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),h.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),h.on(P.Events.BUFFER_CREATED,this.onBufferCreated,this),h.on(P.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),h.on(P.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),h.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var h=this.hls;h.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),h.off(P.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),h.off(P.Events.ERROR,this.onError,this),h.off(P.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),h.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),h.off(P.Events.BUFFER_CREATED,this.onBufferCreated,this),h.off(P.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),h.off(P.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),h.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},w.startLoad=function(h){if(this.levels){var p=this.lastCurrentTime,v=this.hls;if(this.stopLoad(),this.setInterval(x),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var _=v.startLevel;_===-1&&(v.config.testBandwidth?(_=0,this.bitrateTest=!0):_=v.nextAutoLevel),this.level=v.nextLoadLevel=_,this.loadedmetadata=!1}p>0&&h===-1&&(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),h=p),this.state=T.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=h,this.tick()}else this._forceStartLoad=!0,this.state=T.State.STOPPED},w.stopLoad=function(){this._forceStartLoad=!1,C.prototype.stopLoad.call(this)},w.doTick=function(){switch(this.state){case T.State.IDLE:this.doTickIdle();break;case T.State.WAITING_LEVEL:{var h,p=this.levels,v=this.level,_=p==null||((h=p[v])===null||h===void 0)?void 0:h.details;if(_&&(!_.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(_))break;this.state=T.State.IDLE;break}break}case T.State.FRAG_LOADING_WAITING_RETRY:{var E,g=self.performance.now(),j=this.retryDate;(!j||g>=j||(E=this.media)!==null&&E!==void 0&&E.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=T.State.IDLE)}break;default:break}this.onTickEnd()},w.onTickEnd=function(){C.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},w.doTickIdle=function(){var h,p,v=this.hls,_=this.levelLastLoaded,E=this.levels,g=this.media,j=v.config,U=v.nextLoadLevel;if(_===null||!g&&(this.startFragRequested||!j.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!E||!E[U])return;var S=E[U];this.level=v.nextLoadLevel=U;var z=S.details;if(!z||this.state===T.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==U){this.state=T.State.WAITING_LEVEL;return}var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,b.PlaylistLevelType.MAIN);if(H===null)return;var M=H.len,V=this.getMaxBufferLength(S.maxBitrate);if(M>=V)return;if(this._streamEnded(H,z)){var K={};this.altAudio&&(K.type="video"),this.hls.trigger(P.Events.BUFFER_EOS,K),this.state=T.State.ENDED;return}var $=H.end,Z=this.getNextFragment($,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var me=Z.sn-z.startSN;me>1&&(Z=z.fragments[me-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===t.FragmentState.OK&&this.nextLoadPosition>$){var oe=this.audioOnly&&!this.altAudio?o.ElementaryStreamTypes.AUDIO:o.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,oe,b.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,z)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((h=Z.decryptdata)===null||h===void 0?void 0:h.keyFormat)==="identity"&&!((p=Z.decryptdata)!==null&&p!==void 0&&p.key)?this.loadKey(Z,z):this.loadFragment(Z,z,$)},w.loadFragment=function(h,p,v){var _,E=this.fragmentTracker.getState(h);if(this.fragCurrent=h,E===t.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(h);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else E=t.FragmentState.NOT_LOADED}E===t.FragmentState.NOT_LOADED||E===t.FragmentState.PARTIAL?h.sn==="initSegment"?this._loadInitSegment(h):this.bitrateTest?(h.bitrateTest=!0,this.log("Fragment "+h.sn+" of level "+h.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(h)):(this.startFragRequested=!0,C.prototype.loadFragment.call(this,h,p,v)):E===t.FragmentState.APPENDING?this.reduceMaxBufferLength(h.duration)&&this.fragmentTracker.removeFragment(h):((_=this.media)===null||_===void 0?void 0:_.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},w.getAppendedFrag=function(h){var p=this.fragmentTracker.getAppendedFrag(h,b.PlaylistLevelType.MAIN);return p&&"fragment"in p?p.fragment:p},w.getBufferedFrag=function(h){return this.fragmentTracker.getBufferedFrag(h,b.PlaylistLevelType.MAIN)},w.followingBufferedFrag=function(h){return h?this.getBufferedFrag(h.end+.5):null},w.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},w.nextLevelSwitch=function(){var h=this.levels,p=this.media;if(p!=null&&p.readyState){var v,_=this.getAppendedFrag(p.currentTime);if(_&&_.start>1&&this.flushMainBuffer(0,_.start-1),!p.paused&&h){var E=this.hls.nextLoadLevel,g=h[E],j=this.fragLastKbps;j&&this.fragCurrent?v=this.fragCurrent.duration*g.maxBitrate/(1e3*j)+1:v=0}else v=0;var U=this.getBufferedFrag(p.currentTime+v);if(U){var S=this.followingBufferedFrag(U);if(S){this.abortCurrentFrag();var z=S.maxStartPTS?S.maxStartPTS:S.start,H=S.duration,M=Math.max(U.end,z+Math.min(Math.max(H-this.config.maxFragLookUpTolerance,H*.5),H*.75));this.flushMainBuffer(M,Number.POSITIVE_INFINITY)}}}},w.abortCurrentFrag=function(){var h=this.fragCurrent;this.fragCurrent=null,h!=null&&h.loader&&h.loader.abort(),this.state===T.State.KEY_LOADING&&(this.state=T.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},w.flushMainBuffer=function(h,p){C.prototype.flushMainBuffer.call(this,h,p,this.altAudio?"video":null)},w.onMediaAttached=function(h,p){C.prototype.onMediaAttached.call(this,h,p);var v=p.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),v.addEventListener("playing",this.onvplaying),v.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,v,this.fragmentTracker,this.hls)},w.onMediaDetaching=function(){var h=this.media;h&&(h.removeEventListener("playing",this.onvplaying),h.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),C.prototype.onMediaDetaching.call(this)},w.onMediaPlaying=function(){this.tick()},w.onMediaSeeked=function(){var h=this.media,p=h?h.currentTime:null;Object(F.isFiniteNumber)(p)&&this.log("Media seeked to "+p.toFixed(3)),this.tick()},w.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(P.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},w.onManifestParsed=function(h,p){var v=!1,_=!1,E;p.levels.forEach(function(g){E=g.audioCodec,E&&(E.indexOf("mp4a.40.2")!==-1&&(v=!0),E.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=v&&_&&!Object(R.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=p.levels,this.startFragRequested=!1},w.onLevelLoading=function(h,p){var v=this.levels;if(!v||this.state!==T.State.IDLE)return;var _=v[p.level];(!_.details||_.details.live&&this.levelLastLoaded!==p.level||this.waitForCdnTuneIn(_.details))&&(this.state=T.State.WAITING_LEVEL)},w.onLevelLoaded=function(h,p){var v,_=this.levels,E=p.level,g=p.details,j=g.totalduration;if(!_){this.warn("Levels were reset while loading level "+E);return}this.log("Level "+E+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+j);var U=this.fragCurrent;U&&(this.state===T.State.FRAG_LOADING||this.state===T.State.FRAG_LOADING_WAITING_RETRY)&&(U.level!==p.level&&U.loader&&(this.state=T.State.IDLE,U.loader.abort()));var S=_[E],z=0;if(g.live||(v=S.details)!==null&&v!==void 0&&v.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;z=this.alignPlaylists(g,S.details)}if(S.details=g,this.levelLastLoaded=E,this.hls.trigger(P.Events.LEVEL_UPDATED,{details:g,level:E}),this.state===T.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=T.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,z),this.tick()},w._handleFragmentLoadProgress=function(h){var p,v=h.frag,_=h.part,E=h.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+v.sn+" of level "+v.level+" will not be buffered");return}var j=g[v.level],U=j.details;if(!U){this.warn("Dropping fragment "+v.sn+" of level "+v.level+" after level details were reset");return}var S=j.videoCodec,z=U.PTSKnown||!U.live,H=(p=v.initSegment)===null||p===void 0?void 0:p.data,M=this._getAudioCodec(j),V=this.transmuxer=this.transmuxer||new u.default(this.hls,b.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),K=_?_.index:-1,$=K!==-1,Z=new f.ChunkMetadata(v.level,v.sn,v.stats.chunkCount,E.byteLength,K,$),me=this.initPTS[v.cc];V.push(E,H,M,S,v,_,U.totalduration,z,Z,me)},w.onAudioTrackSwitching=function(h,p){var v=this.altAudio,_=!!p.url,E=p.id;if(!_){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 j=this.hls;v&&j.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),j.trigger(P.Events.AUDIO_TRACK_SWITCHED,{id:E})}},w.onAudioTrackSwitched=function(h,p){var v=p.id,_=!!this.hls.audioTracks[v].url;if(_){var E=this.videoBuffer;E&&this.mediaBuffer!==E&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=E)}this.altAudio=_,this.tick()},w.onBufferCreated=function(h,p){var v=p.tracks,_,E,g=!1;for(var j in v){var U=v[j];if(U.id==="main"){if(E=j,_=U,j==="video"){var S=v[j];S&&(this.videoBuffer=S.buffer)}}else g=!0}g&&_?(this.log("Alternate track found, use "+E+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},w.onFragBuffered=function(h,p){var v=p.frag,_=p.part;if(v&&v.type!==b.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(v)){this.warn("Fragment "+v.sn+(_?" p: "+_.index:"")+" of level "+v.level+" finished buffering, but was aborted. state: "+this.state),this.state===T.State.PARSED&&(this.state=T.State.IDLE);return}var E=_?_.stats:v.stats;this.fragLastKbps=Math.round(8*E.total/(E.buffering.end-E.loading.first)),v.sn!=="initSegment"&&(this.fragPrevious=v),this.fragBufferedComplete(v,_)},w.onError=function(h,p){switch(p.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(b.PlaylistLevelType.MAIN,p);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==T.State.ERROR&&(p.fatal?(this.warn(""+p.details),this.state=T.State.ERROR):!p.levelRetry&&this.state===T.State.WAITING_LEVEL&&(this.state=T.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="main"&&(this.state===T.State.PARSING||this.state===T.State.PARSED)){var v=!0,_=this.getFwdBufferInfo(this.media,b.PlaylistLevelType.MAIN);_&&_.len>.5&&(v=!this.reduceMaxBufferLength(_.len)),v&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},w.checkBuffer=function(){var h=this.media,p=this.gapController;if(!h||!p||!h.readyState)return;var v=m.BufferHelper.getBuffered(h);!this.loadedmetadata&&v.length?(this.loadedmetadata=!0,this.seekToStartPos()):p.poll(this.lastCurrentTime),this.lastCurrentTime=h.currentTime},w.onFragLoadEmergencyAborted=function(){this.state=T.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},w.onBufferFlushed=function(h,p){var v=p.type;if(v!==o.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var _=(v===o.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(_,v,b.PlaylistLevelType.MAIN)}},w.onLevelsUpdated=function(h,p){this.levels=p.levels},w.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},w.seekToStartPos=function(){var h=this.media,p=h.currentTime,v=this.startPosition;if(v>=0&&p<v){if(h.seeking){d.logger.log("could not seek to "+v+", already seeking at "+p);return}var _=m.BufferHelper.getBuffered(h),E=_.length?_.start(0):0,g=E-v;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+g+" to match buffer start"),v+=g,this.startPosition=v),this.log("seek to target start position "+v+" from current time "+p),h.currentTime=v}},w._getAudioCodec=function(h){var p=this.config.defaultAudioCodec||h.audioCodec;return this.audioCodecSwap&&p&&(this.log("Swapping audio codec"),p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5"),p},w._loadBitrateTestFrag=function(h){var p=this;this._doFragLoad(h).then(function(v){var _=p.hls;if(!v||_.nextLoadLevel||p.fragContextChanged(h))return;p.fragLoadError=0,p.state=T.State.IDLE,p.startFragRequested=!1,p.bitrateTest=!1;var E=h.stats;E.parsing.start=E.parsing.end=E.buffering.start=E.buffering.end=self.performance.now(),_.trigger(P.Events.FRAG_LOADED,v)})},w._handleTransmuxComplete=function(h){var p,v="main",_=this.hls,E=h.remuxResult,g=h.chunkMeta,j=this.getCurrentContext(g);if(!j){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 U=j.frag,S=j.part,z=j.level,H=E.video,M=E.text,V=E.id3,K=E.initSegment,$=this.altAudio?void 0:E.audio;if(this.fragContextChanged(U))return;if(this.state=T.State.PARSING,K){K.tracks&&(this._bufferInitSegment(z,K.tracks,U,g),_.trigger(P.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:v,tracks:K.tracks}));var Z=K.initPTS,me=K.timescale;Object(F.isFiniteNumber)(Z)&&(this.initPTS[U.cc]=Z,_.trigger(P.Events.INIT_PTS_FOUND,{frag:U,id:v,initPTS:Z,timescale:me}))}if(H&&E.independent!==!1){if(z.details){var oe=H.startPTS,fe=H.endPTS,ye=H.startDTS,Ie=H.endDTS;if(S)S.elementaryStreams[H.type]={startPTS:oe,endPTS:fe,startDTS:ye,endDTS:Ie};else if(H.firstKeyFrame&&H.independent&&(this.couldBacktrack=!0),H.dropped&&H.independent){var ve=this.getLoadPosition()+this.config.maxBufferHole;if(ve<oe){this.backtrack(U);return}U.setElementaryStreamInfo(H.type,U.start,fe,U.start,Ie,!0)}U.setElementaryStreamInfo(H.type,oe,fe,ye,Ie),this.bufferFragmentData(H,U,S,g)}}else if(E.independent===!1){this.backtrack(U);return}if($){var de=$.startPTS,Je=$.endPTS,Rt=$.startDTS,Ee=$.endDTS;S&&(S.elementaryStreams[o.ElementaryStreamTypes.AUDIO]={startPTS:de,endPTS:Je,startDTS:Rt,endDTS:Ee}),U.setElementaryStreamInfo(o.ElementaryStreamTypes.AUDIO,de,Je,Rt,Ee),this.bufferFragmentData($,U,S,g)}if(V!=null&&(p=V.samples)!==null&&p!==void 0&&p.length){var Me={frag:U,id:v,samples:V.samples};_.trigger(P.Events.FRAG_PARSING_METADATA,Me)}if(M){var rt={frag:U,id:v,samples:M.samples};_.trigger(P.Events.FRAG_PARSING_USERDATA,rt)}},w._bufferInitSegment=function(h,p,v,_){var E=this;if(this.state!==T.State.PARSING)return;this.audioOnly=!!p.audio&&!p.video,this.altAudio&&!this.audioOnly&&delete p.audio;var g=p.audio,j=p.video,U=p.audiovideo;if(g){var S=h.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),g.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(S="mp4a.40.5")),z.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),h.audioCodec&&h.audioCodec!==S&&this.log('Swapping manifest audio codec "'+h.audioCodec+'" for "'+S+'"'),g.levelCodec=S,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(h.audioCodec||"")+"/"+g.codec+"]")}j&&(j.levelCodec=h.videoCodec,j.id="main",this.log("Init video buffer, container:"+j.container+", codecs[level/parsed]=["+(h.videoCodec||"")+"/"+j.codec+"]")),U&&this.log("Init audiovideo buffer, container:"+U.container+", codecs[level/parsed]=["+(h.attrs.CODECS||"")+"/"+U.codec+"]"),this.hls.trigger(P.Events.BUFFER_CODECS,p),Object.keys(p).forEach(function(H){var M=p[H],V=M.initSegment;V!=null&&V.byteLength&&E.hls.trigger(P.Events.BUFFER_APPENDING,{type:H,data:V,frag:v,part:null,chunkMeta:_,parent:v.type})}),this.tick()},w.backtrack=function(h){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(h);var p=this.fragmentTracker.backtrack(h);this.fragPrevious=null,this.nextLoadPosition=h.start,p?this.resetFragmentLoading(h):this.state=T.State.BACKTRACKING},w.checkFragmentChanged=function(){var h=this.media,p=null;if(h&&h.readyState>1&&h.seeking===!1){var v=h.currentTime;if(m.BufferHelper.isBuffered(h,v)?p=this.getAppendedFrag(v):m.BufferHelper.isBuffered(h,v+.1)&&(p=this.getAppendedFrag(v+.1)),p){var _=this.fragPlaying,E=p.level;(!_||p.sn!==_.sn||_.level!==E||p.urlId!==_.urlId)&&(this.hls.trigger(P.Events.FRAG_CHANGED,{frag:p}),(!_||_.level!==E)&&this.hls.trigger(P.Events.LEVEL_SWITCHED,{level:E}),this.fragPlaying=p)}}},n(k,[{key:"nextLevel",get:function(){var h=this.nextBufferedFrag;return h?h.level:-1}},{key:"currentLevel",get:function(){var h=this.media;if(h){var p=this.getAppendedFrag(h.currentTime);if(p)return p.level}return-1}},{key:"nextBufferedFrag",get:function(){var h=this.media;if(h){var p=this.getAppendedFrag(h.currentTime);return this.followingBufferedFrag(p)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(T.default)},"./src/controller/subtitle-stream-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"SubtitleStreamController",function(){return l});var F=I("./src/events.ts"),T=I("./src/utils/logger.ts"),R=I("./src/utils/buffer-helper.ts"),P=I("./src/controller/fragment-finders.ts"),m=I("./src/utils/discontinuities.ts"),t=I("./src/controller/level-helper.ts"),b=I("./src/controller/fragment-tracker.ts"),o=I("./src/controller/base-stream-controller.ts"),u=I("./src/types/loader.ts"),f=I("./src/types/level.ts");function a(c,x){for(var A=0;A<x.length;A++){var C=x[A];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(c,C.key,C)}}function i(c,x,A){return x&&a(c.prototype,x),A&&a(c,A),c}function d(c,x){c.prototype=Object.create(x.prototype),c.prototype.constructor=c,s(c,x)}function s(c,x){return s=Object.setPrototypeOf||function(C,k){return C.__proto__=k,C},s(c,x)}var n=500,l=function(c){d(x,c);function x(C,k){var w;return w=c.call(this,C,k,"[subtitle-stream-controller]")||this,w.levels=[],w.currentTrackId=-1,w.tracksBuffered=[],w.mainDetails=null,w._registerListeners(),w}var A=x.prototype;return A.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},A._registerListeners=function(){var k=this.hls;k.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.on(F.Events.ERROR,this.onError,this),k.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.on(F.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.on(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.on(F.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A._unregisterListeners=function(){var k=this.hls;k.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.off(F.Events.ERROR,this.onError,this),k.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.off(F.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.off(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.off(F.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A.startLoad=function(){this.stopLoad(),this.state=o.State.IDLE,this.setInterval(n),this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},A.onLevelLoaded=function(k,w){this.mainDetails=w.details},A.onSubtitleFragProcessed=function(k,w){var y=w.frag,h=w.success;if(this.fragPrevious=y,this.state=o.State.IDLE,!h)return;var p=this.tracksBuffered[this.currentTrackId];if(!p)return;for(var v,_=y.start,E=0;E<p.length;E++)if(_>=p[E].start&&_<=p[E].end){v=p[E];break}var g=y.start+y.duration;v?v.end=g:(v={start:_,end:g},p.push(v)),this.fragmentTracker.fragBuffered(y)},A.onBufferFlushing=function(k,w){var y=w.startOffset,h=w.endOffset;if(y===0&&h!==Number.POSITIVE_INFINITY){var p=this.currentTrackId,v=this.levels;if(!v.length||!v[p]||!v[p].details)return;var _=v[p].details,E=_.targetduration,g=h-E;if(g<=0)return;w.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(j){for(var U=0;U<j.length;){if(j[U].end<=g){j.shift();continue}else if(j[U].start<g)j[U].start=g;else break;U++}}),this.fragmentTracker.removeFragmentsInRange(y,g,u.PlaylistLevelType.SUBTITLE)}},A.onError=function(k,w){var y,h=w.frag;if(!h||h.type!==u.PlaylistLevelType.SUBTITLE)return;(y=this.fragCurrent)!==null&&y!==void 0&&y.loader&&this.fragCurrent.loader.abort(),this.state=o.State.IDLE},A.onSubtitleTracksUpdated=function(k,w){var y=this,h=w.subtitleTracks;this.tracksBuffered=[],this.levels=h.map(function(p){return new f.Level(p)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(p){y.tracksBuffered[p.id]=[]}),this.mediaBuffer=null},A.onSubtitleTrackSwitch=function(k,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var y=this.levels[this.currentTrackId];y!=null&&y.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,y&&this.setInterval(n)},A.onSubtitleTrackLoaded=function(k,w){var y,h=w.details,p=w.id,v=this.currentTrackId,_=this.levels;if(!_.length)return;var E=_[v];if(p>=_.length||p!==v||!E)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,h.live||(y=E.details)!==null&&y!==void 0&&y.live){var g=this.mainDetails;if(h.deltaUpdateFailed||!g)return;var j=g.fragments[0];if(!E.details)h.hasProgramDateTime&&g.hasProgramDateTime?Object(m.alignMediaPlaylistByPDT)(h,g):j&&Object(t.addSliding)(h,j.start);else{var U=this.alignPlaylists(h,E.details);U===0&&j&&Object(t.addSliding)(h,j.start)}}if(E.details=h,this.levelLastLoaded=p,this.tick(),h.live&&!this.fragCurrent&&this.media&&this.state===o.State.IDLE){var S=Object(P.findFragmentByPTS)(null,h.fragments,this.media.currentTime,0);S||(this.warn("Subtitle playlist not aligned with playback"),E.details=void 0)}},A._handleFragmentLoadComplete=function(k){var w=k.frag,y=k.payload,h=w.decryptdata,p=this.hls;if(this.fragContextChanged(w))return;if(y&&y.byteLength>0&&h&&h.key&&h.iv&&h.method==="AES-128"){var v=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),h.key.buffer,h.iv.buffer).then(function(_){var E=performance.now();p.trigger(F.Events.FRAG_DECRYPTED,{frag:w,payload:_,stats:{tstart:v,tdecrypt:E}})})}},A.doTick=function(){if(!this.media){this.state=o.State.IDLE;return}if(this.state===o.State.IDLE){var k,w=this.currentTrackId,y=this.levels;if(!y.length||!y[w]||!y[w].details)return;var h=y[w].details,p=h.targetduration,v=this.config,_=this.media,E=R.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,_.currentTime-p,v.maxBufferHole),g=E.end,j=E.len,U=this.getMaxBufferLength()+p;if(j>U)return;console.assert(h,"Subtitle track details are defined on idle subtitle stream controller tick");var S=h.fragments,z=S.length,H=h.edge,M,V=this.fragPrevious;if(g<H){var K=v.maxFragLookUpTolerance;V&&h.hasProgramDateTime&&(M=Object(P.findFragmentByPDT)(S,V.endProgramDateTime,K)),M||(M=Object(P.findFragmentByPTS)(V,S,g,K),!M&&V&&V.start<S[0].start&&(M=S[0]))}else M=S[z-1];(k=M)!==null&&k!==void 0&&k.encrypted?(T.logger.log("Loading key for "+M.sn),this.state=o.State.KEY_LOADING,this.hls.trigger(F.Events.KEY_LOADING,{frag:M})):M&&this.fragmentTracker.getState(M)===b.FragmentState.NOT_LOADED&&this.loadFragment(M,h,g)}},A.loadFragment=function(k,w,y){this.fragCurrent=k,c.prototype.loadFragment.call(this,k,w,y)},i(x,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),x}(o.default)},"./src/controller/subtitle-track-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),T=I("./src/utils/texttrack-utils.ts"),R=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function m(a,i){for(var d=0;d<i.length;d++){var s=i[d];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function t(a,i,d){return i&&m(a.prototype,i),d&&m(a,d),a}function b(a,i){a.prototype=Object.create(i.prototype),a.prototype.constructor=a,o(a,i)}function o(a,i){return o=Object.setPrototypeOf||function(s,n){return s.__proto__=n,s},o(a,i)}var u=function(a){b(i,a);function i(s){var n;return n=a.call(this,s,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var d=i.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},d.registerListeners=function(){var n=this.hls;n.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(F.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var n=this.hls;n.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(F.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(F.Events.ERROR,this.onError,this)},d.onMediaAttached=function(n,l){if(this.media=l.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=f(this.media.textTracks);n.forEach(function(l){Object(T.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(n,l){this.tracks=l.subtitleTracks},d.onSubtitleTrackLoaded=function(n,l){var c=l.id,x=l.details,A=this.trackId,C=this.tracksInGroup[A];if(!C){this.warn("Invalid subtitle track id "+c);return}var k=C.details;C.details=l.details,this.log("subtitle track "+c+" loaded ["+x.startSN+"-"+x.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,l,k))},d.onLevelLoading=function(n,l){this.switchLevel(l.level)},d.onLevelSwitching=function(n,l){this.switchLevel(l.level)},d.switchLevel=function(n){var l=this.hls.levels[n];if(!(l!=null&&l.textGroupIds))return;var c=l.textGroupIds[l.urlId];if(this.groupId!==c){var x=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(w){return!c||w.groupId===c});this.tracksInGroup=A;var C=this.findTrackId(x==null?void 0:x.name)||this.findTrackId();this.groupId=c;var k={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(F.Events.SUBTITLE_TRACKS_UPDATED,k),C!==-1&&this.setSubtitleTrack(C,x)}},d.findTrackId=function(n){for(var l=this.tracksInGroup,c=0;c<l.length;c++){var x=l[c];if((!this.selectDefaultTrack||x.default)&&(!n||n===x.name))return x.id}return-1},d.onError=function(n,l){if(a.prototype.onError.call(this,n,l),l.fatal||!l.context)return;l.context.type===P.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},d.loadPlaylist=function(n){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var c=l.id,x=l.groupId,A=l.url;if(n)try{A=n.addDirectives(A)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("Loading subtitle playlist for id "+c),this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADING,{url:A,id:c,groupId:x,deliveryDirectives:n||null})}},d.toggleTrackModes=function(n){var l=this,c=this.media,x=this.subtitleDisplay,A=this.trackId;if(!c)return;var C=f(c.textTracks),k=C.filter(function(h){return h.groupId===l.groupId});if(n===-1)[].slice.call(C).forEach(function(h){h.mode="disabled"});else{var w=k[A];w&&(w.mode="disabled")}var y=k[n];y&&(y.mode=x?"showing":"hidden")},d.setSubtitleTrack=function(n,l){var c,x=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(c=x[n])!==null&&c!==void 0&&c.details)||n<-1||n>=x.length)return;this.clearTimer();var A=x[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,A){var C=A.id,k=A.groupId,w=k===void 0?"":k,y=A.name,h=A.type,p=A.url;this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:C,groupId:w,name:y,type:h,url:p});var v=this.switchParams(A.url,l==null?void 0:l.details);this.loadPlaylist(v)}else this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:n})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,l=f(this.media.textTracks),c=0;c<l.length;c++)if(l[c].mode==="hidden")n=c;else if(l[c].mode==="showing"){n=c;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},t(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,l)}}]),i}(R.default);function f(a){for(var i=[],d=0;d<a.length;d++){var s=a[d];s.kind==="subtitles"&&s.label&&i.push(a[d])}return i}B.default=u},"./src/controller/timeline-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"TimelineController",function(){return f});var F=I("./src/polyfills/number.ts"),T=I("./src/events.ts"),R=I("./src/utils/cea-608-parser.ts"),P=I("./src/utils/output-filter.ts"),m=I("./src/utils/webvtt-parser.ts"),t=I("./src/utils/texttrack-utils.ts"),b=I("./src/utils/imsc1-ttml-parser.ts"),o=I("./src/types/loader.ts"),u=I("./src/utils/logger.ts"),f=function(){function s(l){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var c=new P.default(this,"textTrack1"),x=new P.default(this,"textTrack2"),A=new P.default(this,"textTrack3"),C=new P.default(this,"textTrack4");this.cea608Parser1=new R.default(1,c,x),this.cea608Parser2=new R.default(3,A,C)}l.on(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(T.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(T.Events.FRAG_LOADING,this.onFragLoading,this),l.on(T.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(T.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(T.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(T.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(T.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=s.prototype;return n.destroy=function(){var c=this.hls;c.off(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this),c.off(T.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),c.off(T.Events.FRAG_LOADING,this.onFragLoading,this),c.off(T.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(T.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),c.off(T.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),c.off(T.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.off(T.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),c.off(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(c,x,A,C,k){for(var w=!1,y=k.length;y--;){var h=k[y],p=i(h[0],h[1],x,A);if(p>=0&&(h[0]=Math.min(h[0],x),h[1]=Math.max(h[1],A),w=!0,p/(A-x)>.5))return}if(w||k.push([x,A]),this.config.renderTextTracksNatively){var v=this.captionsTracks[c];this.Cues.newCue(v,x,A,C)}else{var _=this.Cues.newCue(null,x,A,C);this.hls.trigger(T.Events.CUES_PARSED,{type:"captions",cues:_,track:c})}},n.onInitPtsFound=function(c,x){var A=this,C=x.frag,k=x.id,w=x.initPTS,y=x.timescale,h=this.unparsedVttFrags;k==="main"&&(this.initPTS[C.cc]=w,this.timescale[C.cc]=y),h.length&&(this.unparsedVttFrags=[],h.forEach(function(p){A.onFragLoaded(T.Events.FRAG_LOADED,p)}))},n.getExistingTrack=function(c){var x=this.media;if(x)for(var A=0;A<x.textTracks.length;A++){var C=x.textTracks[A];if(C[c])return C}return null},n.createCaptionsTrack=function(c){this.config.renderTextTracksNatively?this.createNativeTrack(c):this.createNonNativeTrack(c)},n.createNativeTrack=function(c){if(this.captionsTracks[c])return;var x=this.captionsProperties,A=this.captionsTracks,C=this.media,k=x[c],w=k.label,y=k.languageCode,h=this.getExistingTrack(c);if(h)A[c]=h,Object(t.clearCurrentCues)(A[c]),Object(t.sendAddTrackEvent)(A[c],C);else{var p=this.createTextTrack("captions",w,y);p&&(p[c]=!0,A[c]=p)}},n.createNonNativeTrack=function(c){if(this.nonNativeCaptionsTracks[c])return;var x=this.captionsProperties[c];if(!x)return;var A=x.label,C={_id:c,label:A,kind:"captions",default:x.media?!!x.media.default:!1,closedCaptions:x.media};this.nonNativeCaptionsTracks[c]=C,this.hls.trigger(T.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[C]})},n.createTextTrack=function(c,x,A){var C=this.media;return C?C.addTextTrack(c,x,A):void 0},n.onMediaAttaching=function(c,x){this.media=x.media,this._cleanTracks()},n.onMediaDetaching=function(){var c=this.captionsTracks;Object.keys(c).forEach(function(x){Object(t.clearCurrentCues)(c[x]),delete c[x]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var c=this.media;if(!c)return;var x=c.textTracks;if(x)for(var A=0;A<x.length;A++)Object(t.clearCurrentCues)(x[A])},n.onSubtitleTracksUpdated=function(c,x){var A=this;this.textTracks=[];var C=x.subtitleTracks||[],k=C.some(function(p){return p.textCodec===b.IMSC1_CODEC});if(this.config.enableWebVTT||k&&this.config.enableIMSC1){var w=this.tracks&&C&&this.tracks.length===C.length;if(this.tracks=C||[],this.config.renderTextTracksNatively){var y=this.media?this.media.textTracks:[];this.tracks.forEach(function(p,v){var _;if(v<y.length){for(var E=null,g=0;g<y.length;g++)if(a(y[g],p)){E=y[g];break}E&&(_=E)}_?Object(t.clearCurrentCues)(_):(_=A.createTextTrack("subtitles",p.name,p.lang),_&&(_.mode="disabled")),_&&(_.groupId=p.groupId,A.textTracks.push(_))})}else if(!w&&this.tracks&&this.tracks.length){var h=this.tracks.map(function(p){return{label:p.name,kind:p.type.toLowerCase(),default:p.default,subtitleTrack:p}});this.hls.trigger(T.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:h})}}},n.onManifestLoaded=function(c,x){var A=this;this.config.enableCEA708Captions&&x.captions&&x.captions.forEach(function(C){var k=/(?:CC|SERVICE)([1-4])/.exec(C.instreamId);if(!k)return;var w="textTrack"+k[1],y=A.captionsProperties[w];if(!y)return;y.label=C.name,C.lang&&(y.languageCode=C.lang),y.media=C})},n.onFragLoading=function(c,x){var A=this.cea608Parser1,C=this.cea608Parser2,k=this.lastSn,w=this.lastPartIndex;if(!this.enabled||!(A&&C))return;if(x.frag.type===o.PlaylistLevelType.MAIN){var y,h,p=x.frag.sn,v=(y=x==null||((h=x.part)===null||h===void 0)?void 0:h.index)!=null?y:-1;p===k+1||p===k&&v===w+1||(A.reset(),C.reset()),this.lastSn=p,this.lastPartIndex=v}},n.onFragLoaded=function(c,x){var A=x.frag,C=x.payload,k=this.initPTS,w=this.unparsedVttFrags;if(A.type===o.PlaylistLevelType.SUBTITLE)if(C.byteLength){if(!Object(F.isFiniteNumber)(k[A.cc])){w.push(x),k.length&&this.hls.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Missing initial subtitle PTS")});return}var y=A.decryptdata;if(y==null||y.key==null||y.method!=="AES-128"){var h=this.tracks[A.level],p=this.vttCCs;p[A.cc]||(p[A.cc]={start:A.start,prevCC:this.prevCC,new:!0},this.prevCC=A.cc),h&&h.textCodec===b.IMSC1_CODEC?this._parseIMSC1(A,C):this._parseVTTs(A,C,p)}}else this.hls.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(c,x){var A=this,C=this.hls;Object(b.parseIMSC1)(x,this.initPTS[c.cc],this.timescale[c.cc],function(k){A._appendCues(k,c.level),C.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(k){u.logger.log("Failed to parse IMSC1: "+k),C.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:k})})},n._parseVTTs=function(c,x,A){var C=this,k=this.hls;Object(m.parseWebVTT)(x,this.initPTS[c.cc],this.timescale[c.cc],A,c.cc,c.start,function(w){C._appendCues(w,c.level),k.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(w){C._fallbackToIMSC1(c,x),u.logger.log("Failed to parse VTT cue: "+w),k.trigger(T.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:w})})},n._fallbackToIMSC1=function(c,x){var A=this,C=this.tracks[c.level];C.textCodec||Object(b.parseIMSC1)(x,this.initPTS[c.cc],this.timescale[c.cc],function(){C.textCodec=b.IMSC1_CODEC,A._parseIMSC1(c,x)},function(){C.textCodec="wvtt"})},n._appendCues=function(c,x){var A=this.hls;if(this.config.renderTextTracksNatively){var C=this.textTracks[x];if(C.mode==="disabled")return;c.forEach(function(y){return Object(t.addCueToTrack)(C,y)})}else{var k=this.tracks[x],w=k.default?"default":"subtitles"+x;A.trigger(T.Events.CUES_PARSED,{type:"subtitles",cues:c,track:w})}},n.onFragDecrypted=function(c,x){var A=x.frag;if(A.type===o.PlaylistLevelType.SUBTITLE){if(!Object(F.isFiniteNumber)(this.initPTS[A.cc])){this.unparsedVttFrags.push(x);return}this.onFragLoaded(T.Events.FRAG_LOADED,x)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(c,x){var A=this.cea608Parser1,C=this.cea608Parser2;if(!this.enabled||!(A&&C))return;for(var k=0;k<x.samples.length;k++){var w=x.samples[k].bytes;if(w){var y=this.extractCea608Data(w);A.addData(x.samples[k].pts,y[0]),C.addData(x.samples[k].pts,y[1])}}},n.onBufferFlushing=function(c,x){var A=x.startOffset,C=x.endOffset,k=x.endOffsetSubtitles,w=x.type,y=this.media;if(!y||y.currentTime<C)return;if(!w||w==="video"){var h=this.captionsTracks;Object.keys(h).forEach(function(v){return Object(t.removeCuesInRange)(h[v],A,C)})}if(this.config.renderTextTracksNatively&&(A===0&&k!==void 0)){var p=this.textTracks;Object.keys(p).forEach(function(v){return Object(t.removeCuesInRange)(p[v],A,k)})}},n.extractCea608Data=function(c){for(var x=c[0]&31,A=2,C=[[],[]],k=0;k<x;k++){var w=c[A++],y=127&c[A++],h=127&c[A++],p=(4&w)!==0,v=3&w;if(y===0&&h===0)continue;p&&((v===0||v===1)&&(C[v].push(y),C[v].push(h)))}return C},s}();function a(s,n){return s&&s.label===n.name&&!(s.textTrack1||s.textTrack2)}function i(s,n,l,c){return Math.min(n,c)-Math.max(s,l)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function T(P,m){this.subtle=void 0,this.aesIV=void 0,this.subtle=P,this.aesIV=m}var R=T.prototype;return R.decrypt=function(m,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,m)},T}()},"./src/crypt/aes-decryptor.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"removePadding",function(){return T}),I.d(B,"default",function(){return R});var F=I("./src/utils/typed-array.ts");function T(P){var m=P.byteLength,t=m&&new DataView(P.buffer).getUint8(m-1);return t?Object(F.sliceUint8)(P,0,m-t):P}var R=function(){function P(){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 m=P.prototype;return m.uint8ArrayToUint32Array_=function(b){for(var o=new DataView(b),u=new Uint32Array(4),f=0;f<4;f++)u[f]=o.getUint32(f*4);return u},m.initTable=function(){var b=this.sBox,o=this.invSBox,u=this.subMix,f=u[0],a=u[1],i=u[2],d=u[3],s=this.invSubMix,n=s[0],l=s[1],c=s[2],x=s[3],A=new Uint32Array(256),C=0,k=0,w=0;for(w=0;w<256;w++)w<128?A[w]=w<<1:A[w]=w<<1^283;for(w=0;w<256;w++){var y=k^k<<1^k<<2^k<<3^k<<4;y=y>>>8^y&255^99,b[C]=y,o[y]=C;var h=A[C],p=A[h],v=A[p],_=A[y]*257^y*16843008;f[C]=_<<24|_>>>8,a[C]=_<<16|_>>>16,i[C]=_<<8|_>>>24,d[C]=_,_=v*16843009^p*65537^h*257^C*16843008,n[y]=_<<24|_>>>8,l[y]=_<<16|_>>>16,c[y]=_<<8|_>>>24,x[y]=_,C?(C=h^A[A[A[v^h]]],k^=A[A[k]]):C=k=1}},m.expandKey=function(b){for(var o=this.uint8ArrayToUint32Array_(b),u=!0,f=0;f<o.length&&u;)u=o[f]===this.key[f],f++;if(u)return;this.key=o;var a=this.keySize=o.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var i=this.ksRows=(a+6+1)*4,d,s,n=this.keySchedule=new Uint32Array(i),l=this.invKeySchedule=new Uint32Array(i),c=this.sBox,x=this.rcon,A=this.invSubMix,C=A[0],k=A[1],w=A[2],y=A[3],h,p;for(d=0;d<i;d++){if(d<a){h=n[d]=o[d];continue}p=h,d%a===0?(p=p<<8|p>>>24,p=c[p>>>24]<<24|c[p>>>16&255]<<16|c[p>>>8&255]<<8|c[p&255],p^=x[d/a|0]<<24):a>6&&d%a===4&&(p=c[p>>>24]<<24|c[p>>>16&255]<<16|c[p>>>8&255]<<8|c[p&255]),n[d]=h=(n[d-a]^p)>>>0}for(s=0;s<i;s++)d=i-s,s&3?p=n[d]:p=n[d-4],s<4||d<=4?l[s]=p:l[s]=C[c[p>>>24]]^k[c[p>>>16&255]]^w[c[p>>>8&255]]^y[c[p&255]],l[s]=l[s]>>>0},m.networkToHostOrderSwap=function(b){return b<<24|(b&65280)<<8|(b&16711680)>>8|b>>>24},m.decrypt=function(b,o,u){for(var f=this.keySize+6,a=this.invKeySchedule,i=this.invSBox,d=this.invSubMix,s=d[0],n=d[1],l=d[2],c=d[3],x=this.uint8ArrayToUint32Array_(u),A=x[0],C=x[1],k=x[2],w=x[3],y=new Int32Array(b),h=new Int32Array(y.length),p,v,_,E,g,j,U,S,z,H,M,V,K,$,Z=this.networkToHostOrderSwap;o<y.length;){for(z=Z(y[o]),H=Z(y[o+1]),M=Z(y[o+2]),V=Z(y[o+3]),g=z^a[0],j=V^a[1],U=M^a[2],S=H^a[3],K=4,$=1;$<f;$++)p=s[g>>>24]^n[j>>16&255]^l[U>>8&255]^c[S&255]^a[K],v=s[j>>>24]^n[U>>16&255]^l[S>>8&255]^c[g&255]^a[K+1],_=s[U>>>24]^n[S>>16&255]^l[g>>8&255]^c[j&255]^a[K+2],E=s[S>>>24]^n[g>>16&255]^l[j>>8&255]^c[U&255]^a[K+3],g=p,j=v,U=_,S=E,K=K+4;p=i[g>>>24]<<24^i[j>>16&255]<<16^i[U>>8&255]<<8^i[S&255]^a[K],v=i[j>>>24]<<24^i[U>>16&255]<<16^i[S>>8&255]<<8^i[g&255]^a[K+1],_=i[U>>>24]<<24^i[S>>16&255]<<16^i[g>>8&255]<<8^i[j&255]^a[K+2],E=i[S>>>24]<<24^i[g>>16&255]<<16^i[j>>8&255]<<8^i[U&255]^a[K+3],h[o]=Z(p^A),h[o+1]=Z(E^C),h[o+2]=Z(_^k),h[o+3]=Z(v^w),A=z,C=H,k=M,w=V,o=o+4}return h.buffer},P}()},"./src/crypt/decrypter.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return o});var F=I("./src/crypt/aes-crypto.ts"),T=I("./src/crypt/fast-aes-key.ts"),R=I("./src/crypt/aes-decryptor.ts"),P=I("./src/utils/logger.ts"),m=I("./src/utils/mp4-tools.ts"),t=I("./src/utils/typed-array.ts"),b=16,o=function(){function u(a,i,d){var s=d===void 0?{}:d,n=s.removePKCS7Padding,l=n===void 0?!0:n;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=a,this.config=i,this.removePKCS7Padding=l,l)try{var c=self.crypto;c&&(this.subtle=c.subtle||c.webkitSubtle)}catch(x){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var f=u.prototype;return f.destroy=function(){this.observer=null},f.isSync=function(){return this.config.enableSoftwareAES},f.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var d=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(R.removePadding)(d):d},f.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},f.decrypt=function(i,d,s,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),d,s);var l=this.flush();l&&n(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),d,s).then(n)},f.softwareDecrypt=function(i,d,s){var n=this.currentIV,l=this.currentResult,c=this.remainderData;this.logOnce("JS AES decrypt"),c&&(i=Object(m.appendUint8Array)(c,i),this.remainderData=null);var x=this.getValidChunk(i);if(!x.length)return null;n&&(s=n);var A=this.softwareDecrypter;A||(A=this.softwareDecrypter=new R.default),A.expandKey(d);var C=l;return this.currentResult=A.decrypt(x.buffer,0,s),this.currentIV=Object(t.sliceUint8)(x,-16).buffer,C||null},f.webCryptoDecrypt=function(i,d,s){var n=this,l=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new T.default(l,d)),this.fastAesKey.expandKey().then(function(c){if(!l)return Promise.reject(new Error("web crypto not initialized"));var x=new F.default(l,s);return x.decrypt(i.buffer,c)}).catch(function(c){return n.onWebCryptoError(c,i,d,s)})},f.onWebCryptoError=function(i,d,s,n){return P.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,s,n)},f.getValidChunk=function(i){var d=i,s=i.length-i.length%b;return s!==i.length&&(d=Object(t.sliceUint8)(i,0,s),this.remainderData=Object(t.sliceUint8)(i,s)),d},f.logOnce=function(i){if(!this.logEnabled)return;P.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},u}()},"./src/crypt/fast-aes-key.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function T(P,m){this.subtle=void 0,this.key=void 0,this.subtle=P,this.key=m}var R=T.prototype;return R.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},T}()},"./src/demux/aacdemuxer.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),T=I("./src/demux/adts.ts"),R=I("./src/utils/logger.ts"),P=I("./src/demux/id3.ts");function m(o,u){o.prototype=Object.create(u.prototype),o.prototype.constructor=o,t(o,u)}function t(o,u){return t=Object.setPrototypeOf||function(a,i){return a.__proto__=i,a},t(o,u)}var b=function(o){m(u,o);function u(a,i){var d;return d=o.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=a,d.config=i,d}var f=u.prototype;return f.resetInitSegment=function(i,d,s){o.prototype.resetInitSegment.call(this,i,d,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:s,inputTimeScale:9e4,dropped:0}},u.probe=function(i){if(!i)return!1;for(var d=P.getID3Data(i,0)||[],s=d.length,n=i.length;s<n;s++)if(T.probe(i,s))return R.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(i,d){return T.canParse(i,d)},f.appendFrame=function(i,d,s){T.initTrackConfig(i,this.observer,d,s,i.manifestCodec);var n=T.appendFrame(i,d,s,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},u}(F.default);b.minProbeByteLength=9,B.default=b},"./src/demux/adts.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"getAudioConfig",function(){return P}),I.d(B,"isHeaderPattern",function(){return m}),I.d(B,"getHeaderLength",function(){return t}),I.d(B,"getFullFrameLength",function(){return b}),I.d(B,"canGetFrameLength",function(){return o}),I.d(B,"isHeader",function(){return u}),I.d(B,"canParse",function(){return f}),I.d(B,"probe",function(){return a}),I.d(B,"initTrackConfig",function(){return i}),I.d(B,"getFrameDuration",function(){return d}),I.d(B,"parseFrameHeader",function(){return s}),I.d(B,"appendFrame",function(){return n});var F=I("./src/utils/logger.ts"),T=I("./src/errors.ts"),R=I("./src/events.ts");function P(l,c,x,A){var C,k,w,y,h=navigator.userAgent.toLowerCase(),p=A,v=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];C=((c[x+2]&192)>>>6)+1;var _=(c[x+2]&60)>>>2;if(_>v.length-1){l.trigger(R.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+_});return}return w=(c[x+2]&1)<<2,w|=(c[x+3]&192)>>>6,F.logger.log("manifest codec:"+A+", ADTS type:"+C+", samplingIndex:"+_),/firefox/i.test(h)?_>=6?(C=5,y=new Array(4),k=_-3):(C=2,y=new Array(2),k=_):h.indexOf("android")!==-1?(C=2,y=new Array(2),k=_):(C=5,y=new Array(4),A&&(A.indexOf("mp4a.40.29")!==-1||A.indexOf("mp4a.40.5")!==-1)||!A&&_>=6?k=_-3:((A&&A.indexOf("mp4a.40.2")!==-1&&(_>=6&&w===1||/vivaldi/i.test(h))||!A&&w===1)&&(C=2,y=new Array(2)),k=_)),y[0]=C<<3,y[0]|=(_&14)>>1,y[1]|=(_&1)<<7,y[1]|=w<<3,C===5&&(y[1]|=(k&14)>>1,y[2]=(k&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:v[_],channelCount:w,codec:"mp4a.40."+C,manifestCodec:p}}function m(l,c){return l[c]===255&&(l[c+1]&246)===240}function t(l,c){return l[c+1]&1?7:9}function b(l,c){return(l[c+3]&3)<<11|l[c+4]<<3|(l[c+5]&224)>>>5}function o(l,c){return c+5<l.length}function u(l,c){return c+1<l.length&&m(l,c)}function f(l,c){return o(l,c)&&m(l,c)&&b(l,c)<=l.length-c}function a(l,c){if(u(l,c)){var x=t(l,c);if(c+x>=l.length)return!1;var A=b(l,c);if(A<=x)return!1;var C=c+A;return C===l.length||u(l,C)}return!1}function i(l,c,x,A,C){if(!l.samplerate){var k=P(c,x,A,C);if(!k)return;l.config=k.config,l.samplerate=k.samplerate,l.channelCount=k.channelCount,l.codec=k.codec,l.manifestCodec=k.manifestCodec,F.logger.log("parsed codec:"+l.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function d(l){return 1024*9e4/l}function s(l,c,x,A,C){var k=t(l,c),w=b(l,c);if(w-=k,w>0){var y=x+A*C;return{headerLength:k,frameLength:w,stamp:y}}}function n(l,c,x,A,C){var k=d(l.samplerate),w=s(c,x,A,C,k);if(w){var y=w.frameLength,h=w.headerLength,p=w.stamp,v=h+y,_=Math.max(0,x+v-c.length),E;_?(E=new Uint8Array(v-h),E.set(c.subarray(x+h,c.length),0)):E=c.subarray(x+h,x+v);var g={unit:E,pts:p};return _||l.samples.push(g),{sample:g,length:v,missing:_}}}},"./src/demux/base-audio-demuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"initPTSFn",function(){return b});var F=I("./src/polyfills/number.ts"),T=I("./src/demux/id3.ts"),R=I("./src/demux/dummy-demuxed-track.ts"),P=I("./src/utils/mp4-tools.ts"),m=I("./src/utils/typed-array.ts"),t=function(){function o(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=o.prototype;return u.resetInitSegment=function(a,i,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},u.resetTimeStamp=function(){},u.resetContiguity=function(){},u.canParse=function(a,i){return!1},u.appendFrame=function(a,i,d){},u.demux=function(a,i){this.cachedData&&(a=Object(P.appendUint8Array)(this.cachedData,a),this.cachedData=null);var d=T.getID3Data(a,0),s=d?d.length:0,n,l,c=this._audioTrack,x=this._id3Track,A=d?T.getTimeStamp(d):void 0,C=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=b(A,i)),d&&d.length>0&&x.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),l=this.initPTS;s<C;){if(this.canParse(a,s)){var k=this.appendFrame(c,a,s);k?(this.frameIndex++,l=k.sample.pts,s+=k.length,n=s):s=C}else T.canParse(a,s)?(d=T.getID3Data(a,s),x.samples.push({pts:l,dts:l,data:d}),s+=d.length,n=s):s++;if(s===C&&n!==C){var w=Object(m.sliceUint8)(a,n);this.cachedData?this.cachedData=Object(P.appendUint8Array)(this.cachedData,w):this.cachedData=w}}return{audioTrack:c,avcTrack:Object(R.dummyTrack)(),id3Track:x,textTrack:Object(R.dummyTrack)()}},u.demuxSampleAes=function(a,i,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(a){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(R.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(R.dummyTrack)()}},u.destroy=function(){},o}(),b=function(u,f){return Object(F.isFiniteNumber)(u)?u*90:f*9e4};B.default=t},"./src/demux/chunk-cache.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function R(){this.chunks=[],this.dataLength=0}var P=R.prototype;return P.push=function(t){this.chunks.push(t),this.dataLength+=t.length},P.flush=function(){var t=this.chunks,b=this.dataLength,o;if(t.length)t.length===1?o=t[0]:o=T(t,b);else return new Uint8Array(0);return this.reset(),o},P.reset=function(){this.chunks.length=0,this.dataLength=0},R}();function T(R,P){for(var m=new Uint8Array(P),t=0,b=0;b<R.length;b++){var o=R[b];m.set(o,t),t+=o.length}return m}},"./src/demux/dummy-demuxed-track.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"dummyTrack",function(){return F});function F(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/logger.ts"),T=function(){function R(m){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=m,this.bytesAvailable=m.byteLength,this.word=0,this.bitsAvailable=0}var P=R.prototype;return P.loadWord=function(){var t=this.data,b=this.bytesAvailable,o=t.byteLength-b,u=new Uint8Array(4),f=Math.min(4,b);if(f===0)throw new Error("no bytes available");u.set(t.subarray(o,o+f)),this.word=new DataView(u.buffer).getUint32(0),this.bitsAvailable=f*8,this.bytesAvailable-=f},P.skipBits=function(t){var b;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,b=t>>3,t-=b>>3,this.bytesAvailable-=b,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},P.readBits=function(t){var b=Math.min(this.bitsAvailable,t),o=this.word>>>32-b;return t>32&&F.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=b,this.bitsAvailable>0?this.word<<=b:this.bytesAvailable>0&&this.loadWord(),b=t-b,b>0&&this.bitsAvailable?o<<b|this.readBits(b):o},P.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()},P.skipUEG=function(){this.skipBits(1+this.skipLZ())},P.skipEG=function(){this.skipBits(1+this.skipLZ())},P.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},P.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},P.readBoolean=function(){return this.readBits(1)===1},P.readUByte=function(){return this.readBits(8)},P.readUShort=function(){return this.readBits(16)},P.readUInt=function(){return this.readBits(32)},P.skipScalingList=function(t){for(var b=8,o=8,u,f=0;f<t;f++)o!==0&&(u=this.readEG(),o=(b+u+256)%256),b=o===0?b:o},P.readSPS=function(){var t=0,b=0,o=0,u=0,f,a,i,d=this.readUByte.bind(this),s=this.readBits.bind(this),n=this.readUEG.bind(this),l=this.readBoolean.bind(this),c=this.skipBits.bind(this),x=this.skipEG.bind(this),A=this.skipUEG.bind(this),C=this.skipScalingList.bind(this);d();var k=d();if(s(5),c(3),d(),A(),k===100||k===110||k===122||k===244||k===44||k===83||k===86||k===118||k===128){var w=n();if(w===3&&c(1),A(),A(),c(1),l())for(a=w!==3?8:12,i=0;i<a;i++)l()&&(i<6?C(16):C(64))}A();var y=n();if(y===0)n();else if(y===1)for(c(1),x(),x(),f=n(),i=0;i<f;i++)x();A(),c(1);var h=n(),p=n(),v=s(1);v===0&&c(1),c(1),l()&&(t=n(),b=n(),o=n(),u=n());var _=[1,1];if(l()&&l()){var E=d();switch(E){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((h+1)*16-t*2-b*2),height:(2-v)*(p+1)*16-(v?2:4)*(o+u),pixelRatio:_}},P.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},R}();B.default=T},"./src/demux/id3.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"isHeader",function(){return F}),I.d(B,"isFooter",function(){return T}),I.d(B,"getID3Data",function(){return R}),I.d(B,"canParse",function(){return m}),I.d(B,"getTimeStamp",function(){return t}),I.d(B,"isTimeStampFrame",function(){return b}),I.d(B,"getID3Frames",function(){return u}),I.d(B,"decodeFrame",function(){return f}),I.d(B,"utf8ArrayToStr",function(){return n}),I.d(B,"testables",function(){return l});var F=function(C,k){return k+10<=C.length&&(C[k]===73&&C[k+1]===68&&C[k+2]===51&&(C[k+3]<255&&C[k+4]<255&&(C[k+6]<128&&C[k+7]<128&&C[k+8]<128&&C[k+9]<128)))},T=function(C,k){return k+10<=C.length&&(C[k]===51&&C[k+1]===68&&C[k+2]===73&&(C[k+3]<255&&C[k+4]<255&&(C[k+6]<128&&C[k+7]<128&&C[k+8]<128&&C[k+9]<128)))},R=function(C,k){for(var w=k,y=0;F(C,k);){y+=10;var h=P(C,k+6);y+=h,T(C,k+10)&&(y+=10),k+=y}return y>0?C.subarray(w,w+y):void 0},P=function(C,k){var w=0;return w=(C[k]&127)<<21,w|=(C[k+1]&127)<<14,w|=(C[k+2]&127)<<7,w|=C[k+3]&127,w},m=function(C,k){return F(C,k)&&P(C,k+6)+10<=C.length-k},t=function(C){for(var k=u(C),w=0;w<k.length;w++){var y=k[w];if(b(y))return s(y)}return},b=function(C){return C&&C.key==="PRIV"&&C.info==="com.apple.streaming.transportStreamTimestamp"},o=function(C){var k=String.fromCharCode(C[0],C[1],C[2],C[3]),w=P(C,4),y=10;return{type:k,size:w,data:C.subarray(y,y+w)}},u=function(C){for(var k=0,w=[];F(C,k);){var y=P(C,k+6);k+=10;for(var h=k+y;k+8<h;){var p=o(C.subarray(k)),v=f(p);v&&w.push(v),k+=p.size+10}T(C,k)&&(k+=10)}return w},f=function(C){return C.type==="PRIV"?a(C):C.type[0]==="W"?d(C):i(C)},a=function(C){if(C.size<2)return;var k=n(C.data,!0),w=new Uint8Array(C.data.subarray(k.length+1));return{key:C.type,info:k,data:w.buffer}},i=function(C){if(C.size<2)return;if(C.type==="TXXX"){var k=1,w=n(C.data.subarray(k),!0);k+=w.length+1;var y=n(C.data.subarray(k));return{key:C.type,info:w,data:y}}var h=n(C.data.subarray(1));return{key:C.type,data:h}},d=function(C){if(C.type==="WXXX"){if(C.size<2)return;var k=1,w=n(C.data.subarray(k),!0);k+=w.length+1;var y=n(C.data.subarray(k));return{key:C.type,info:w,data:y}}var h=n(C.data);return{key:C.type,data:h}},s=function(C){if(C.data.byteLength===8){var k=new Uint8Array(C.data),w=k[3]&1,y=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return y/=45,w&&(y+=4772185884e-2),Math.round(y)}return},n=function(C,k){k===void 0&&(k=!1);var w=x();if(w){var y=w.decode(C);if(k){var h=y.indexOf("\0");return h!==-1?y.substring(0,h):y}return y.replace(/\0/g,"")}for(var p=C.length,v,_,E,g="",j=0;j<p;){if(v=C[j++],v===0&&k)return g;if(v===0||v===3)continue;switch(v>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(v);break;case 12:case 13:_=C[j++],g+=String.fromCharCode((v&31)<<6|_&63);break;case 14:_=C[j++],E=C[j++],g+=String.fromCharCode((v&15)<<12|(_&63)<<6|(E&63)<<0);break;default:}}return g},l={decodeTextFrame:i},c;function x(){return!c&&typeof self.TextDecoder!="undefined"&&(c=new self.TextDecoder("utf-8")),c}},"./src/demux/mp3demuxer.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),T=I("./src/demux/id3.ts"),R=I("./src/utils/logger.ts"),P=I("./src/demux/mpegaudio.ts");function m(o,u){o.prototype=Object.create(u.prototype),o.prototype.constructor=o,t(o,u)}function t(o,u){return t=Object.setPrototypeOf||function(a,i){return a.__proto__=i,a},t(o,u)}var b=function(o){m(u,o);function u(){return o.apply(this,arguments)||this}var f=u.prototype;return f.resetInitSegment=function(i,d,s){o.prototype.resetInitSegment.call(this,i,d,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:s,inputTimeScale:9e4,dropped:0}},u.probe=function(i){if(!i)return!1;for(var d=T.getID3Data(i,0)||[],s=d.length,n=i.length;s<n;s++)if(P.probe(i,s))return R.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(i,d){return P.canParse(i,d)},f.appendFrame=function(i,d,s){return this.initPTS===null?void 0:P.appendFrame(i,d,s,this.initPTS,this.frameIndex)},u}(F.default);b.minProbeByteLength=4,B.default=b},"./src/demux/mp4demuxer.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/mp4-tools.ts"),T=I("./src/demux/dummy-demuxed-track.ts"),R=function(){function P(t,b){this.remainderData=null,this.config=void 0,this.config=b}var m=P.prototype;return m.resetTimeStamp=function(){},m.resetInitSegment=function(){},m.resetContiguity=function(){},P.probe=function(b){return Object(F.findBox)({data:b,start:0,end:Math.min(b.length,16384)},["moof"]).length>0},m.demux=function(b){var o=b,u=Object(T.dummyTrack)();if(this.config.progressive){this.remainderData&&(o=Object(F.appendUint8Array)(this.remainderData,b));var f=Object(F.segmentValidRange)(o);this.remainderData=f.remainder,u.samples=f.valid||new Uint8Array}else u.samples=o;return{audioTrack:Object(T.dummyTrack)(),avcTrack:u,id3Track:Object(T.dummyTrack)(),textTrack:Object(T.dummyTrack)()}},m.flush=function(){var b=Object(T.dummyTrack)();return b.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(T.dummyTrack)(),avcTrack:b,id3Track:Object(T.dummyTrack)(),textTrack:Object(T.dummyTrack)()}},m.demuxSampleAes=function(b,o,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},m.destroy=function(){},P}();R.minProbeByteLength=1024,B.default=R},"./src/demux/mpegaudio.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"appendFrame",function(){return t}),I.d(B,"parseHeader",function(){return b}),I.d(B,"isHeaderPattern",function(){return o}),I.d(B,"isHeader",function(){return u}),I.d(B,"canParse",function(){return f}),I.d(B,"probe",function(){return a});var F=null,T=[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],R=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],P=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],m=[0,1,1,4];function t(i,d,s,n,l){if(s+24>d.length)return;var c=b(d,s);if(c&&s+c.frameLength<=d.length){var x=c.samplesPerFrame*9e4/c.sampleRate,A=n+l*x,C={unit:d.subarray(s,s+c.frameLength),pts:A,dts:A};return i.config=[],i.channelCount=c.channelCount,i.samplerate=c.sampleRate,i.samples.push(C),{sample:C,length:c.frameLength,missing:0}}}function b(i,d){var s=i[d+1]>>3&3,n=i[d+1]>>1&3,l=i[d+2]>>4&15,c=i[d+2]>>2&3;if(s!==1&&l!==0&&l!==15&&c!==3){var x=i[d+2]>>1&1,A=i[d+3]>>6,C=s===3?3-n:n===3?3:4,k=T[C*14+l-1]*1e3,w=s===3?0:s===2?1:2,y=R[w*3+c],h=A===3?1:2,p=P[s][n],v=m[n],_=p*8*v,E=Math.floor(p*k/y+x)*v;if(F===null){var g=navigator.userAgent||"",j=g.match(/Chrome\/(\d+)/i);F=j?parseInt(j[1]):0}var U=!!F&&F<=87;return U&&n===2&&k>=224e3&&A===0&&(i[d+3]=i[d+3]|128),{sampleRate:y,channelCount:h,frameLength:E,samplesPerFrame:_}}}function o(i,d){return i[d]===255&&(i[d+1]&224)===224&&(i[d+1]&6)!==0}function u(i,d){return d+1<i.length&&o(i,d)}function f(i,d){var s=4;return o(i,d)&&s<=i.length-d}function a(i,d){if(d+1<i.length&&o(i,d)){var s=4,n=b(i,d),l=s;n!=null&&n.frameLength&&(l=n.frameLength);var c=d+l;return c===i.length||u(i,c)}return!1}},"./src/demux/sample-aes.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/crypt/decrypter.ts"),T=I("./src/demux/tsdemuxer.ts"),R=function(){function P(t,b,o){this.keyData=void 0,this.decrypter=void 0,this.keyData=o,this.decrypter=new F.default(t,b,{removePKCS7Padding:!1})}var m=P.prototype;return m.decryptBuffer=function(b,o){this.decrypter.decrypt(b,this.keyData.key.buffer,this.keyData.iv.buffer,o)},m.decryptAacSample=function(b,o,u,f){var a=b[o].unit,i=a.subarray(16,a.length-a.length%16),d=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),s=this;this.decryptBuffer(d,function(n){var l=new Uint8Array(n);a.set(l,16),f||s.decryptAacSamples(b,o+1,u)})},m.decryptAacSamples=function(b,o,u){for(;;o++){if(o>=b.length){u();return}if(b[o].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(b,o,u,f),!f)return}},m.getAvcEncryptedData=function(b){for(var o=Math.floor((b.length-48)/160)*16+16,u=new Int8Array(o),f=0,a=32;a<=b.length-16;a+=160,f+=16)u.set(b.subarray(a,a+16),f);return u},m.getAvcDecryptedUnit=function(b,o){for(var u=new Uint8Array(o),f=0,a=32;a<=b.length-16;a+=160,f+=16)b.set(u.subarray(f,f+16),a);return b},m.decryptAvcSample=function(b,o,u,f,a,i){var d=Object(T.discardEPB)(a.data),s=this.getAvcEncryptedData(d),n=this;this.decryptBuffer(s.buffer,function(l){a.data=n.getAvcDecryptedUnit(d,l),i||n.decryptAvcSamples(b,o,u+1,f)})},m.decryptAvcSamples=function(b,o,u,f){if(b instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;o++,u=0){if(o>=b.length){f();return}for(var a=b[o].units;!(u>=a.length);u++){var i=a[u];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(b,o,u,f,i,d),!d)return}}},P}();B.default=R},"./src/demux/transmuxer-interface.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a});var F=I("./node_modules/webworkify-webpack/index.js"),T=I.n(F),R=I("./src/events.ts"),P=I("./src/demux/transmuxer.ts"),m=I("./src/utils/logger.ts"),t=I("./src/errors.ts"),b=I("./src/utils/mediasource-helper.ts"),o=I("./node_modules/eventemitter3/index.js"),u=I.n(o),f=Object(b.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function i(s,n,l,c){var x=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=n,this.onTransmuxComplete=l,this.onFlush=c;var A=s.config,C=function(p,v){v=v||{},v.frag=x.frag,v.id=x.id,s.trigger(p,v)};this.observer=new o.EventEmitter,this.observer.on(R.Events.FRAG_DECRYPTED,C),this.observer.on(R.Events.ERROR,C);var k={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},w=navigator.vendor;if(A.enableWorker&&typeof Worker!="undefined"){m.logger.log("demuxing in webworker");var y;try{y=this.worker=F("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(h){s.trigger(R.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(h.message+" ("+h.filename+":"+h.lineno+")")})},y.postMessage({cmd:"init",typeSupported:k,vendor:w,id:n,config:JSON.stringify(A)})}catch(h){m.logger.warn("Error in worker:",h),m.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new P.default(this.observer,k,A,w,n),this.worker=null}}else this.transmuxer=new P.default(this.observer,k,A,w,n)}var d=i.prototype;return d.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var c=this.observer;c&&c.removeAllListeners(),this.observer=null},d.push=function(n,l,c,x,A,C,k,w,y,h){var p=this;y.transmuxing.start=self.performance.now();var v=this.transmuxer,_=this.worker,E=C?C.start:A.start,g=A.decryptdata,j=this.frag,U=!(j&&A.cc===j.cc),S=!(j&&y.level===j.level),z=j?y.sn-j.sn:-1,H=this.part?y.part-this.part.index:1,M=!S&&(z===1||z===0&&H===1),V=self.performance.now();(S||z||A.stats.parsing.start===0)&&(A.stats.parsing.start=V),C&&(H||!M)&&(C.stats.parsing.start=V);var K=new P.TransmuxState(U,M,w,S,E);if(!M||U){m.logger.log("[transmuxer-interface, "+A.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+`
discontinuity: `+U+`
trackSwitch: `+S+`
contiguous: `+M+`
accurateTimeOffset: `+w+`
timeOffset: `+E);var $=new P.TransmuxConfig(c,x,l,k,h);this.configureTransmuxer($)}if(this.frag=A,this.part=C,_)_.postMessage({cmd:"demux",data:n,decryptdata:g,chunkMeta:y,state:K},n instanceof ArrayBuffer?[n]:[]);else if(v){var Z=v.push(n,g,y,K);Object(P.isPromise)(Z)?Z.then(function(me){p.handleTransmuxComplete(me)}):this.handleTransmuxComplete(Z)}},d.flush=function(n){var l=this;n.transmuxing.start=self.performance.now();var c=this.transmuxer,x=this.worker;if(x)x.postMessage({cmd:"flush",chunkMeta:n});else if(c){var A=c.flush(n);Object(P.isPromise)(A)?A.then(function(C){l.handleFlushResult(C,n)}):this.handleFlushResult(A,n)}},d.handleFlushResult=function(n,l){var c=this;n.forEach(function(x){c.handleTransmuxComplete(x)}),this.onFlush(l)},d.onWorkerMessage=function(n){var l=n.data,c=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,c.trigger(l.event,l.data);break}}},d.configureTransmuxer=function(n){var l=this.worker,c=this.transmuxer;l?l.postMessage({cmd:"configure",config:n}):c&&c.configure(n)},d.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},i}()},"./src/demux/transmuxer-worker.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return t});var F=I("./src/demux/transmuxer.ts"),T=I("./src/events.ts"),R=I("./src/utils/logger.ts"),P=I("./node_modules/eventemitter3/index.js"),m=I.n(P);function t(a){var i=new P.EventEmitter,d=function(n,l){a.postMessage({event:n,data:l})};i.on(T.Events.FRAG_DECRYPTED,d),i.on(T.Events.ERROR,d),a.addEventListener("message",function(s){var n=s.data;switch(n.cmd){case"init":{var l=JSON.parse(n.config);a.transmuxer=new F.default(i,n.typeSupported,l,n.vendor,n.id),Object(R.enableLogs)(l.debug),d("init",null);break}case"configure":{a.transmuxer.configure(n.config);break}case"demux":{var c=a.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(F.isPromise)(c)?c.then(function(C){b(a,C)}):b(a,c);break}case"flush":{var x=n.chunkMeta,A=a.transmuxer.flush(x);Object(F.isPromise)(A)?A.then(function(C){u(a,C,x)}):u(a,A,x);break}default:break}})}function b(a,i){if(f(i.remuxResult))return;var d=[],s=i.remuxResult,n=s.audio,l=s.video;n&&o(d,n),l&&o(d,l),a.postMessage({event:"transmuxComplete",data:i},d)}function o(a,i){i.data1&&a.push(i.data1.buffer),i.data2&&a.push(i.data2.buffer)}function u(a,i,d){i.forEach(function(s){b(a,s)}),a.postMessage({event:"flush",data:d})}function f(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return l}),I.d(B,"isPromise",function(){return A}),I.d(B,"TransmuxConfig",function(){return C}),I.d(B,"TransmuxState",function(){return k});var F=I("./src/events.ts"),T=I("./src/errors.ts"),R=I("./src/crypt/decrypter.ts"),P=I("./src/demux/aacdemuxer.ts"),m=I("./src/demux/mp4demuxer.ts"),t=I("./src/demux/tsdemuxer.ts"),b=I("./src/demux/mp3demuxer.ts"),o=I("./src/remux/mp4-remuxer.ts"),u=I("./src/remux/passthrough-remuxer.ts"),f=I("./src/demux/chunk-cache.ts"),a=I("./src/utils/mp4-tools.ts"),i=I("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(w){i.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var s=[{demux:t.default,remux:o.default},{demux:m.default,remux:u.default},{demux:P.default,remux:o.default},{demux:b.default,remux:o.default}],n=1024;s.forEach(function(w){var y=w.demux;n=Math.max(n,y.minProbeByteLength)});var l=function(){function w(h,p,v,_,E){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 f.default,this.observer=h,this.typeSupported=p,this.config=v,this.vendor=_,this.id=E}var y=w.prototype;return y.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},y.push=function(p,v,_,E){var g=this,j=_.transmuxing;j.executeStart=d();var U=new Uint8Array(p),S=this.cache,z=this.config,H=this.currentTransmuxState,M=this.transmuxConfig;E&&(this.currentTransmuxState=E);var V=c(U,v);if(V&&V.method==="AES-128"){var K=this.getDecrypter();if(z.enableSoftwareAES){var $=K.softwareDecrypt(U,V.key.buffer,V.iv.buffer);if(!$)return j.executeEnd=d(),x(_);U=new Uint8Array($)}else return this.decryptionPromise=K.webCryptoDecrypt(U,V.key.buffer,V.iv.buffer).then(function(ke){var ht=g.push(ke,null,_);return g.decryptionPromise=null,ht}),this.decryptionPromise}var Z=E||H,me=Z.contiguous,oe=Z.discontinuity,fe=Z.trackSwitch,ye=Z.accurateTimeOffset,Ie=Z.timeOffset,ve=M.audioCodec,de=M.videoCodec,Je=M.defaultInitPts,Rt=M.duration,Ee=M.initSegmentData;if((oe||fe)&&this.resetInitSegment(Ee,ve,de,Rt),oe&&this.resetInitialTimestamp(Je),me||this.resetContiguity(),this.needsProbing(U,oe,fe)){if(S.dataLength){var Me=S.flush();U=Object(a.appendUint8Array)(Me,U)}this.configureTransmuxer(U,M)}var rt=this.transmux(U,V,Ie,ye,_),He=this.currentTransmuxState;return He.contiguous=!0,He.discontinuity=!1,He.trackSwitch=!1,j.executeEnd=d(),rt},y.flush=function(p){var v=this,_=p.transmuxing;_.executeStart=d();var E=this.decrypter,g=this.cache,j=this.currentTransmuxState,U=this.decryptionPromise;if(U)return U.then(function(){return v.flush(p)});var S=[],z=j.timeOffset;if(E){var H=E.flush();H&&S.push(this.push(H,null,p))}var M=g.dataLength;g.reset();var V=this.demuxer,K=this.remuxer;if(!V||!K)return M>=n&&this.observer.emit(F.Events.ERROR,F.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),_.executeEnd=d(),[x(p)];var $=V.flush(z);return A($)?$.then(function(Z){return v.flushRemux(S,Z,p),S}):(this.flushRemux(S,$,p),S)},y.flushRemux=function(p,v,_){var E=v.audioTrack,g=v.avcTrack,j=v.id3Track,U=v.textTrack,S=this.currentTransmuxState,z=S.accurateTimeOffset,H=S.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+_.sn+(_.part>-1?" p: "+_.part:"")+" of level "+_.level);var M=this.remuxer.remux(E,g,j,U,H,z,!0,this.id);p.push({remuxResult:M,chunkMeta:_}),_.transmuxing.executeEnd=d()},y.resetInitialTimestamp=function(p){var v=this.demuxer,_=this.remuxer;if(!v||!_)return;v.resetTimeStamp(p),_.resetTimeStamp(p)},y.resetContiguity=function(){var p=this.demuxer,v=this.remuxer;if(!p||!v)return;p.resetContiguity(),v.resetNextTimestamp()},y.resetInitSegment=function(p,v,_,E){var g=this.demuxer,j=this.remuxer;if(!g||!j)return;g.resetInitSegment(v,_,E),j.resetInitSegment(p,v,_)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(p,v,_,E,g){var j;return v&&v.method==="SAMPLE-AES"?j=this.transmuxSampleAes(p,v,_,E,g):j=this.transmuxUnencrypted(p,_,E,g),j},y.transmuxUnencrypted=function(p,v,_,E){var g=this.demuxer.demux(p,v,!1,!this.config.progressive),j=g.audioTrack,U=g.avcTrack,S=g.id3Track,z=g.textTrack,H=this.remuxer.remux(j,U,S,z,v,_,!1,this.id);return{remuxResult:H,chunkMeta:E}},y.transmuxSampleAes=function(p,v,_,E,g){var j=this;return this.demuxer.demuxSampleAes(p,v,_).then(function(U){var S=j.remuxer.remux(U.audioTrack,U.avcTrack,U.id3Track,U.textTrack,_,E,!1,j.id);return{remuxResult:S,chunkMeta:g}})},y.configureTransmuxer=function(p,v){for(var _=this.config,E=this.observer,g=this.typeSupported,j=this.vendor,U=v.audioCodec,S=v.defaultInitPts,z=v.duration,H=v.initSegmentData,M=v.videoCodec,V,K=0,$=s.length;K<$;K++)if(s[K].demux.probe(p)){V=s[K];break}V||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),V={demux:m.default,remux:u.default});var Z=this.demuxer,me=this.remuxer,oe=V.remux,fe=V.demux;(!me||!(me instanceof oe))&&(this.remuxer=new oe(E,_,g,j)),(!Z||!(Z instanceof fe))&&(this.demuxer=new fe(E,_,g),this.probe=fe.probe),this.resetInitSegment(H,U,M,z),this.resetInitialTimestamp(S)},y.needsProbing=function(p,v,_){return!this.demuxer||!this.remuxer||v||_},y.getDecrypter=function(){var p=this.decrypter;return p||(p=this.decrypter=new R.default(this.observer,this.config)),p},w}();function c(w,y){var h=null;return w.byteLength>0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(h=y),h}var x=function(y){return{remuxResult:{},chunkMeta:y}};function A(w){return"then"in w&&w.then instanceof Function}var C=function(y,h,p,v,_){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=h,this.initSegmentData=p,this.duration=v,this.defaultInitPts=_},k=function(y,h,p,v,_){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=h,this.accurateTimeOffset=p,this.trackSwitch=v,this.timeOffset=_}},"./src/demux/tsdemuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"discardEPB",function(){return x});var F=I("./src/demux/adts.ts"),T=I("./src/demux/mpegaudio.ts"),R=I("./src/demux/exp-golomb.ts"),P=I("./src/demux/id3.ts"),m=I("./src/demux/sample-aes.ts"),t=I("./src/events.ts"),b=I("./src/utils/mp4-tools.ts"),o=I("./src/utils/logger.ts"),u=I("./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},a=function(){function A(k,w,y){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=k,this.config=w,this.typeSupported=y}A.probe=function(w){var y=A.syncOffset(w);return y<0?!1:(y&&o.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},A.syncOffset=function(w){for(var y=Math.min(1e3,w.length-3*188),h=0;h<y;){if(w[h]===71&&w[h+188]===71&&w[h+2*188]===71)return h;h++}return-1},A.createTrack=function(w,y){return{container:w==="video"||w==="audio"?"video/mp2t":void 0,type:w,id:f[w],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:w==="audio"?y:void 0}};var C=A.prototype;return C.resetInitSegment=function(w,y,h){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=A.createTrack("video",h),this._audioTrack=A.createTrack("audio",h),this._id3Track=A.createTrack("id3",h),this._txtTrack=A.createTrack("text",h),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=w,this.videoCodec=y,this._duration=h},C.resetTimeStamp=function(){},C.resetContiguity=function(){var w=this._audioTrack,y=this._avcTrack,h=this._id3Track;w&&(w.pesData=null),y&&(y.pesData=null),h&&(h.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},C.demux=function(w,y,h,p){h===void 0&&(h=!1),p===void 0&&(p=!1),h||(this.sampleAes=null);var v,_=this._avcTrack,E=this._audioTrack,g=this._id3Track,j=_.pid,U=_.pesData,S=E.pid,z=g.pid,H=E.pesData,M=g.pesData,V=!1,K=this.pmtParsed,$=this._pmtId,Z=w.length;if(this.remainderData&&(w=Object(b.appendUint8Array)(this.remainderData,w),Z=w.length,this.remainderData=null),Z<188&&!p)return this.remainderData=w,{audioTrack:E,avcTrack:_,id3Track:g,textTrack:this._txtTrack};var me=Math.max(0,A.syncOffset(w));Z-=(Z+me)%188,Z<w.byteLength&&!p&&(this.remainderData=new Uint8Array(w.buffer,Z,w.buffer.byteLength-Z));for(var oe=me;oe<Z;oe+=188)if(w[oe]===71){var fe=!!(w[oe+1]&64),ye=((w[oe+1]&31)<<8)+w[oe+2],Ie=(w[oe+3]&48)>>4,ve=void 0;if(Ie>1){if(ve=oe+5+w[oe+4],ve===oe+188)continue}else ve=oe+4;switch(ye){case j:fe&&(U&&(v=n(U))&&this.parseAVCPES(v,!1),U={data:[],size:0}),U&&(U.data.push(w.subarray(ve,oe+188)),U.size+=oe+188-ve);break;case S:fe&&(H&&(v=n(H))&&(E.isAAC?this.parseAACPES(v):this.parseMPEGPES(v)),H={data:[],size:0}),H&&(H.data.push(w.subarray(ve,oe+188)),H.size+=oe+188-ve);break;case z:fe&&(M&&(v=n(M))&&this.parseID3PES(v),M={data:[],size:0}),M&&(M.data.push(w.subarray(ve,oe+188)),M.size+=oe+188-ve);break;case 0:fe&&(ve+=w[ve]+1),$=this._pmtId=d(w,ve);break;case $:{fe&&(ve+=w[ve]+1);var de=s(w,ve,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,h);j=de.avc,j>0&&(_.pid=j),S=de.audio,S>0&&(E.pid=S,E.isAAC=de.isAAC),z=de.id3,z>0&&(g.pid=z),V&&!K&&(o.logger.log("reparse from beginning"),V=!1,oe=me-188),K=this.pmtParsed=!0;break}case 17:case 8191:break;default:V=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_.pesData=U,E.pesData=H,g.pesData=M;var Je={audioTrack:E,avcTrack:_,id3Track:g,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(Je),Je},C.flush=function(){var w=this.remainderData;this.remainderData=null;var y;return w?y=this.demux(w,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},C.extractRemainingSamples=function(w){var y=w.audioTrack,h=w.avcTrack,p=w.id3Track,v=h.pesData,_=y.pesData,E=p.pesData,g;v&&(g=n(v))?(this.parseAVCPES(g,!0),h.pesData=null):h.pesData=v,_&&(g=n(_))?(y.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),y.pesData=null):(_!=null&&_.size&&o.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=_),E&&(g=n(E))?(this.parseID3PES(g),p.pesData=null):p.pesData=E},C.demuxSampleAes=function(w,y,h){var p=this.demux(w,h,!0,!this.config.progressive),v=this.sampleAes=new m.default(this.observer,this.config,y);return this.decrypt(p,v)},C.decrypt=function(w,y){return new Promise(function(h){var p=w.audioTrack,v=w.avcTrack;p.samples&&p.isAAC?y.decryptAacSamples(p.samples,0,function(){v.samples?y.decryptAvcSamples(v.samples,0,0,function(){h(w)}):h(w)}):v.samples&&y.decryptAvcSamples(v.samples,0,0,function(){h(w)})})},C.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},C.parseAVCPES=function(w,y){var h=this,p=this._avcTrack,v=this.parseAVCNALu(w.data),_=!1,E=this.avcSample,g,j=!1;w.data=null,E&&v.length&&!p.audFound&&(l(E,p),E=this.avcSample=i(!1,w.pts,w.dts,"")),v.forEach(function(U){switch(U.type){case 1:{g=!0,E||(E=h.avcSample=i(!0,w.pts,w.dts,"")),_&&(E.debug+="NDR "),E.frame=!0;var S=U.data;if(j&&S.length>4){var z=new R.default(S).readSliceType();(z===2||z===4||z===7||z===9)&&(E.key=!0)}break}case 5:g=!0,E||(E=h.avcSample=i(!0,w.pts,w.dts,"")),_&&(E.debug+="IDR "),E.key=!0,E.frame=!0;break;case 6:{g=!0,_&&E&&(E.debug+="SEI ");var H=new R.default(x(U.data));H.readUByte();for(var M=0,V=0,K=!1,$=0;!K&&H.bytesAvailable>1;){M=0;do $=H.readUByte(),M+=$;while($===255);V=0;do $=H.readUByte(),V+=$;while($===255);if(M===4&&H.bytesAvailable!==0){K=!0;var Z=H.readUByte();if(Z===181){var me=H.readUShort();if(me===49){var oe=H.readUInt();if(oe===1195456820){var fe=H.readUByte();if(fe===3){for(var ye=H.readUByte(),Ie=H.readUByte(),ve=31&ye,de=[ye,Ie],Je=0;Je<ve;Je++)de.push(H.readUByte()),de.push(H.readUByte()),de.push(H.readUByte());c(h._txtTrack.samples,{type:3,pts:w.pts,bytes:de})}}}}}else if(M===5&&H.bytesAvailable!==0){if(K=!0,V>16){for(var Rt=[],Ee=0;Ee<16;Ee++)Rt.push(H.readUByte().toString(16)),(Ee===3||Ee===5||Ee===7||Ee===9)&&Rt.push("-");for(var Me=V-16,rt=new Uint8Array(Me),He=0;He<Me;He++)rt[He]=H.readUByte();c(h._txtTrack.samples,{pts:w.pts,payloadType:M,uuid:Rt.join(""),userData:Object(P.utf8ArrayToStr)(rt),userDataBytes:rt})}}else if(V<H.bytesAvailable)for(var ke=0;ke<V;ke++)H.readUByte()}break}case 7:if(g=!0,j=!0,_&&E&&(E.debug+="SPS "),!p.sps){var ht=new R.default(U.data),ie=ht.readSPS();p.width=ie.width,p.height=ie.height,p.pixelRatio=ie.pixelRatio,p.sps=[U.data],p.duration=h._duration;for(var xe=U.data.subarray(1,4),we="avc1.",$e=0;$e<3;$e++){var ct=xe[$e].toString(16);ct.length<2&&(ct="0"+ct),we+=ct}p.codec=we}break;case 8:g=!0,_&&E&&(E.debug+="PPS "),p.pps||(p.pps=[U.data]);break;case 9:g=!1,p.audFound=!0,E&&l(E,p),E=h.avcSample=i(!1,w.pts,w.dts,_?"AUD ":"");break;case 12:g=!1;break;default:g=!1,E&&(E.debug+="unknown NAL "+U.type+" ");break}if(E&&g){var yt=E.units;yt.push(U)}}),y&&E&&(l(E,p),this.avcSample=null)},C.getLastNalUnit=function(){var w,y=this.avcSample,h;if(!y||y.units.length===0){var p=this._avcTrack.samples;y=p[p.length-1]}if((w=y)!==null&&w!==void 0&&w.units){var v=y.units;h=v[v.length-1]}return h},C.parseAVCNALu=function(w){var y=w.byteLength,h=this._avcTrack,p=h.naluState||0,v=p,_=[],E=0,g,j,U,S=-1,z=0;for(p===-1&&(S=0,z=w[0]&31,p=0,E=1);E<y;){if(g=w[E++],!p){p=g?0:1;continue}if(p===1){p=g?0:2;continue}if(!g)p=3;else if(g===1){if(S>=0){var H={data:w.subarray(S,E-p-1),type:z};_.push(H)}else{var M=this.getLastNalUnit();if(M&&(v&&E<=4-v&&(M.state&&(M.data=M.data.subarray(0,M.data.byteLength-v))),j=E-p-1,j>0)){var V=new Uint8Array(M.data.byteLength+j);V.set(M.data,0),V.set(w.subarray(0,j),M.data.byteLength),M.data=V,M.state=0}}E<y?(U=w[E]&31,S=E,z=U,p=0):p=-1}else p=0}if(S>=0&&p>=0){var K={data:w.subarray(S,y),type:z,state:p};_.push(K)}if(_.length===0){var $=this.getLastNalUnit();if($){var Z=new Uint8Array($.data.byteLength+w.byteLength);Z.set($.data,0),Z.set(w,$.data.byteLength),$.data=Z}}return h.naluState=p,_},C.parseAACPES=function(w){var y=0,h=this._audioTrack,p=this.aacOverFlow,v=w.data;if(p){this.aacOverFlow=null;var _=p.sample.unit.byteLength,E=Math.min(p.missing,_),g=_-E;p.sample.unit.set(v.subarray(0,E),g),h.samples.push(p.sample),y=p.missing}var j,U;for(j=y,U=v.length;j<U-1&&!F.isHeader(v,j);j++);if(j!==y){var S,z;if(j<U-1?(S="AAC PES did not start with ADTS header,offset:"+j,z=!1):(S="no ADTS header found in AAC PES",z=!0),o.logger.warn("parsing error:"+S),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:S}),z)return}F.initTrackConfig(h,this.observer,v,j,this.audioCodec);var H;if(w.pts!==void 0)H=w.pts;else if(p){var M=F.getFrameDuration(h.samplerate);H=p.sample.pts+M}else{o.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var V=0;j<U;)if(F.isHeader(v,j)){if(j+5<U){var K=F.appendFrame(h,v,j,H,V);if(K)if(K.missing)this.aacOverFlow=K;else{j+=K.length,V++;continue}}break}else j++},C.parseMPEGPES=function(w){var y=w.data,h=y.length,p=0,v=0,_=w.pts;if(_===void 0){o.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;v<h;)if(T.isHeader(y,v)){var E=T.appendFrame(this._audioTrack,y,v,_,p);if(E)v+=E.length,p++;else break}else v++},C.parseID3PES=function(w){if(w.pts===void 0){o.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(w)},A}();a.minProbeByteLength=188;function i(A,C,k,w){return{key:A,frame:!1,pts:C,dts:k,units:[],debug:w,length:0}}function d(A,C){return(A[C+10]&31)<<8|A[C+11]}function s(A,C,k,w){var y={audio:-1,avc:-1,id3:-1,isAAC:!0},h=(A[C+1]&15)<<8|A[C+2],p=C+3+h-4,v=(A[C+10]&15)<<8|A[C+11];for(C+=12+v;C<p;){var _=(A[C+1]&31)<<8|A[C+2];switch(A[C]){case 207:if(!w){o.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:y.audio===-1&&(y.audio=_);break;case 21:y.id3===-1&&(y.id3=_);break;case 219:if(!w){o.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:y.avc===-1&&(y.avc=_);break;case 3:case 4:k?y.audio===-1&&(y.audio=_,y.isAAC=!1):o.logger.log("MPEG audio found, not supported in this browser");break;case 36:o.logger.warn("Unsupported HEVC stream type found");break;default:break}C+=((A[C+3]&15)<<8|A[C+4])+5}return y}function n(A){var C=0,k,w,y,h,p,v=A.data;if(!A||A.size===0)return null;for(;v[0].length<19&&v.length>1;){var _=new Uint8Array(v[0].length+v[1].length);_.set(v[0]),_.set(v[1],v[0].length),v[0]=_,v.splice(1,1)}k=v[0];var E=(k[0]<<16)+(k[1]<<8)+k[2];if(E===1){if(w=(k[4]<<8)+k[5],w&&w>A.size-6)return null;var g=k[7];g&192&&(h=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,g&64?(p=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,h-p>60*9e4&&(o.logger.warn(Math.round((h-p)/9e4)+"s delta between PTS and DTS, align them"),h=p)):p=h),y=k[8];var j=y+9;if(A.size<=j)return null;A.size-=j;for(var U=new Uint8Array(A.size),S=0,z=v.length;S<z;S++){k=v[S];var H=k.byteLength;if(j)if(j>H){j-=H;continue}else k=k.subarray(j),H-=j,j=0;U.set(k,C),C+=H}return w&&(w-=y+3),{data:U,pts:h,dts:p,len:w}}return null}function l(A,C){if(A.units.length&&A.frame){if(A.pts===void 0){var k=C.samples,w=k.length;if(w){var y=k[w-1];A.pts=y.pts,A.dts=y.dts}else{C.dropped++;return}}C.samples.push(A)}A.debug.length&&o.logger.log(A.pts+"/"+A.dts+":"+A.debug)}function c(A,C){var k=A.length;if(k>0){if(C.pts>=A[k-1].pts)A.push(C);else for(var w=k-1;w>=0;w--)if(C.pts<A[w].pts){A.splice(w,0,C);break}}else A.push(C)}function x(A){for(var C=A.byteLength,k=[],w=1;w<C-2;)A[w]===0&&A[w+1]===0&&A[w+2]===3?(k.push(w+2),w+=2):w++;if(k.length===0)return A;var y=C-k.length,h=new Uint8Array(y),p=0;for(w=0;w<y;p++,w++)p===k[0]&&(p++,k.shift()),h[w]=A[p];return h}B.default=a},"./src/errors.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"ErrorTypes",function(){return F}),I.d(B,"ErrorDetails",function(){return T});var F;(function(R){R.NETWORK_ERROR="networkError",R.MEDIA_ERROR="mediaError",R.KEY_SYSTEM_ERROR="keySystemError",R.MUX_ERROR="muxError",R.OTHER_ERROR="otherError"})(F||(F={}));var T;(function(R){R.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",R.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",R.KEY_SYSTEM_NO_SESSION="keySystemNoSession",R.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",R.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",R.MANIFEST_LOAD_ERROR="manifestLoadError",R.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",R.MANIFEST_PARSING_ERROR="manifestParsingError",R.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",R.LEVEL_EMPTY_ERROR="levelEmptyError",R.LEVEL_LOAD_ERROR="levelLoadError",R.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",R.LEVEL_SWITCH_ERROR="levelSwitchError",R.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",R.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",R.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",R.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",R.FRAG_LOAD_ERROR="fragLoadError",R.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",R.FRAG_DECRYPT_ERROR="fragDecryptError",R.FRAG_PARSING_ERROR="fragParsingError",R.REMUX_ALLOC_ERROR="remuxAllocError",R.KEY_LOAD_ERROR="keyLoadError",R.KEY_LOAD_TIMEOUT="keyLoadTimeOut",R.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",R.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",R.BUFFER_APPEND_ERROR="bufferAppendError",R.BUFFER_APPENDING_ERROR="bufferAppendingError",R.BUFFER_STALLED_ERROR="bufferStalledError",R.BUFFER_FULL_ERROR="bufferFullError",R.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",R.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",R.INTERNAL_EXCEPTION="internalException",R.INTERNAL_ABORTED="aborted",R.UNKNOWN="unknown"})(T||(T={}))},"./src/events.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"Events",function(){return F});var F;(function(T){T.MEDIA_ATTACHING="hlsMediaAttaching",T.MEDIA_ATTACHED="hlsMediaAttached",T.MEDIA_DETACHING="hlsMediaDetaching",T.MEDIA_DETACHED="hlsMediaDetached",T.BUFFER_RESET="hlsBufferReset",T.BUFFER_CODECS="hlsBufferCodecs",T.BUFFER_CREATED="hlsBufferCreated",T.BUFFER_APPENDING="hlsBufferAppending",T.BUFFER_APPENDED="hlsBufferAppended",T.BUFFER_EOS="hlsBufferEos",T.BUFFER_FLUSHING="hlsBufferFlushing",T.BUFFER_FLUSHED="hlsBufferFlushed",T.MANIFEST_LOADING="hlsManifestLoading",T.MANIFEST_LOADED="hlsManifestLoaded",T.MANIFEST_PARSED="hlsManifestParsed",T.LEVEL_SWITCHING="hlsLevelSwitching",T.LEVEL_SWITCHED="hlsLevelSwitched",T.LEVEL_LOADING="hlsLevelLoading",T.LEVEL_LOADED="hlsLevelLoaded",T.LEVEL_UPDATED="hlsLevelUpdated",T.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",T.LEVELS_UPDATED="hlsLevelsUpdated",T.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",T.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",T.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",T.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",T.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",T.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",T.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",T.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",T.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",T.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",T.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",T.CUES_PARSED="hlsCuesParsed",T.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",T.INIT_PTS_FOUND="hlsInitPtsFound",T.FRAG_LOADING="hlsFragLoading",T.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",T.FRAG_LOADED="hlsFragLoaded",T.FRAG_DECRYPTED="hlsFragDecrypted",T.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",T.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",T.FRAG_PARSING_METADATA="hlsFragParsingMetadata",T.FRAG_PARSED="hlsFragParsed",T.FRAG_BUFFERED="hlsFragBuffered",T.FRAG_CHANGED="hlsFragChanged",T.FPS_DROP="hlsFpsDrop",T.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",T.ERROR="hlsError",T.DESTROYING="hlsDestroying",T.KEY_LOADING="hlsKeyLoading",T.KEY_LOADED="hlsKeyLoaded",T.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",T.BACK_BUFFER_REACHED="hlsBackBufferReached"})(F||(F={}))},"./src/hls.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return A});var F=I("./node_modules/url-toolkit/src/url-toolkit.js"),T=I.n(F),R=I("./src/loader/playlist-loader.ts"),P=I("./src/loader/key-loader.ts"),m=I("./src/controller/id3-track-controller.ts"),t=I("./src/controller/latency-controller.ts"),b=I("./src/controller/level-controller.ts"),o=I("./src/controller/fragment-tracker.ts"),u=I("./src/controller/stream-controller.ts"),f=I("./src/is-supported.ts"),a=I("./src/utils/logger.ts"),i=I("./src/config.ts"),d=I("./node_modules/eventemitter3/index.js"),s=I.n(d),n=I("./src/events.ts"),l=I("./src/errors.ts");function c(C,k){for(var w=0;w<k.length;w++){var y=k[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}function x(C,k,w){return k&&c(C.prototype,k),w&&c(C,w),C}var A=function(){C.isSupported=function(){return Object(f.isSupported)()};function C(w){w===void 0&&(w={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var y=this.config=Object(i.mergeConfig)(C.DefaultConfig,w);this.userConfig=w,Object(a.enableLogs)(y.debug),this._autoLevelCapping=-1,y.progressive&&Object(i.enableStreamingMode)(y);var h=y.abrController,p=y.bufferController,v=y.capLevelController,_=y.fpsController,E=this.abrController=new h(this),g=this.bufferController=new p(this),j=this.capLevelController=new v(this),U=new _(this),S=new R.default(this),z=new P.default(this),H=new m.default(this),M=this.levelController=new b.default(this),V=new o.FragmentTracker(this),K=this.streamController=new u.default(this,V);j.setStreamController(K),U.setStreamController(K);var $=[M,K];this.networkControllers=$;var Z=[S,z,E,g,j,U,H,V];this.audioTrackController=this.createController(y.audioTrackController,null,$),this.createController(y.audioStreamController,V,$),this.subtitleTrackController=this.createController(y.subtitleTrackController,null,$),this.createController(y.subtitleStreamController,V,$),this.createController(y.timelineController,null,Z),this.emeController=this.createController(y.emeController,null,Z),this.cmcdController=this.createController(y.cmcdController,null,Z),this.latencyController=this.createController(t.default,null,Z),this.coreComponents=Z}var k=C.prototype;return k.createController=function(y,h,p){if(y){var v=h?new y(this,h):new y(this);return p&&p.push(v),v}return null},k.on=function(y,h,p){p===void 0&&(p=this),this._emitter.on(y,h,p)},k.once=function(y,h,p){p===void 0&&(p=this),this._emitter.once(y,h,p)},k.removeAllListeners=function(y){this._emitter.removeAllListeners(y)},k.off=function(y,h,p,v){p===void 0&&(p=this),this._emitter.off(y,h,p,v)},k.listeners=function(y){return this._emitter.listeners(y)},k.emit=function(y,h,p){return this._emitter.emit(y,h,p)},k.trigger=function(y,h){if(this.config.debug)return this.emit(y,y,h);try{return this.emit(y,y,h)}catch(p){a.logger.error("An internal error happened while handling event "+y+'. Error message: "'+p.message+'". Here is a stacktrace:',p),this.trigger(n.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:y,error:p})}return!1},k.listenerCount=function(y){return this._emitter.listenerCount(y)},k.destroy=function(){a.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(y){return y.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(y){return y.destroy()}),this.coreComponents.length=0},k.attachMedia=function(y){a.logger.log("attachMedia"),this._media=y,this.trigger(n.Events.MEDIA_ATTACHING,{media:y})},k.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(y){this.stopLoad();var h=this.media,p=this.url,v=this.url=F.buildAbsoluteURL(self.location.href,y,{alwaysNormalize:!0});a.logger.log("loadSource:"+v),h&&p&&p!==v&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(h)),this.trigger(n.Events.MANIFEST_LOADING,{url:y})},k.startLoad=function(y){y===void 0&&(y=-1),a.logger.log("startLoad("+y+")"),this.networkControllers.forEach(function(h){h.startLoad(y)})},k.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(y){y.stopLoad()})},k.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){a.logger.log("recoverMediaError");var y=this._media;this.detachMedia(),y&&this.attachMedia(y)},k.removeLevel=function(y,h){h===void 0&&(h=0),this.levelController.removeLevel(y,h)},x(C,[{key:"levels",get:function(){var y=this.levelController.levels;return y||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(y){a.logger.log("set currentLevel:"+y),this.loadLevel=y,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(y){a.logger.log("set nextLevel:"+y),this.levelController.manualLevel=y,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(y){a.logger.log("set loadLevel:"+y),this.levelController.manualLevel=y}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(y){this.levelController.nextLoadLevel=y}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(y){a.logger.log("set firstLevel:"+y),this.levelController.firstLevel=y}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(y){a.logger.log("set startLevel:"+y),y!==-1&&(y=Math.max(y,this.minAutoLevel)),this.levelController.startLevel=y}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(y){var h=!!y;h!==this.config.capLevelToPlayerSize&&(h?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=h)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(y){this._autoLevelCapping!==y&&(a.logger.log("set autoLevelCapping:"+y),this._autoLevelCapping=y)}},{key:"bandwidthEstimate",get:function(){var y=this.abrController.bwEstimator;return y?y.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var y=this.levels,h=this.config.minAutoBitrate;if(!y)return 0;for(var p=y.length,v=0;v<p;v++)if(y[v].maxBitrate>h)return v;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,h=this.autoLevelCapping,p;return h===-1&&y&&y.length?p=y.length-1:p=h,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var h=this.audioTrackController;h&&(h.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var h=this.subtitleTrackController;h&&(h.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var h=this.subtitleTrackController;h&&(h.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{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 n.Events}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return C.defaultConfig?C.defaultConfig:i.hlsDefaultConfig},set:function(y){C.defaultConfig=y}}]),C}();A.defaultConfig=void 0},"./src/is-supported.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"isSupported",function(){return R}),I.d(B,"changeTypeSupported",function(){return P});var F=I("./src/utils/mediasource-helper.ts");function T(){return self.SourceBuffer||self.WebKitSourceBuffer}function R(){var m=Object(F.getMediaSource)();if(!m)return!1;var t=T(),b=m&&typeof m.isTypeSupported=="function"&&m.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!b&&!!o}function P(){var m,t=T();return typeof(t==null||((m=t.prototype)===null||m===void 0)?void 0:m.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return a}),I.d(B,"LoadError",function(){return d});var F=I("./src/polyfills/number.ts"),T=I("./src/errors.ts");function R(s,n){s.prototype=Object.create(n.prototype),s.prototype.constructor=s,o(s,n)}function P(s){var n=typeof Map=="function"?new Map:void 0;return P=function(c){if(c===null||!b(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(c))return n.get(c);n.set(c,x)}function x(){return m(c,arguments,u(this).constructor)}return x.prototype=Object.create(c.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),o(x,c)},P(s)}function m(s,n,l){return t()?m=Reflect.construct:m=function(x,A,C){var k=[null];k.push.apply(k,A);var w=Function.bind.apply(x,k),y=new w;return C&&o(y,C.prototype),y},m.apply(null,arguments)}function t(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function b(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function o(s,n){return o=Object.setPrototypeOf||function(c,x){return c.__proto__=x,c},o(s,n)}function u(s){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},u(s)}var f=Math.pow(2,17),a=function(){function s(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var n=s.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(c,x){var A=this,C=c.url;if(!C)return Promise.reject(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,networkDetails:null},"Fragment does not have a "+(C?"part list":"url")));this.abort();var k=this.config,w=k.fLoader,y=k.loader;return new Promise(function(h,p){A.loader&&A.loader.destroy();var v=A.loader=c.loader=w?new w(k):new y(k),_=i(c),E={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};c.stats=v.stats,v.load(_,E,{onSuccess:function(j,U,S,z){A.resetLoader(c,v),h({frag:c,part:null,payload:j.data,networkDetails:z})},onError:function(j,U,S){A.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,response:j,networkDetails:S}))},onAbort:function(j,U,S){A.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,networkDetails:S}))},onTimeout:function(j,U,S){A.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,networkDetails:S}))},onProgress:function(j,U,S,z){x&&x({frag:c,part:null,payload:S,networkDetails:z})}})})},n.loadPart=function(c,x,A){var C=this;this.abort();var k=this.config,w=k.fLoader,y=k.loader;return new Promise(function(h,p){C.loader&&C.loader.destroy();var v=C.loader=c.loader=w?new w(k):new y(k),_=i(c,x),E={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};x.stats=v.stats,v.load(_,E,{onSuccess:function(j,U,S,z){C.resetLoader(c,v),C.updateStatsFromPart(c,x);var H={frag:c,part:x,payload:j.data,networkDetails:z};A(H),h(H)},onError:function(j,U,S){C.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,part:x,response:j,networkDetails:S}))},onAbort:function(j,U,S){c.stats.aborted=x.stats.aborted,C.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,part:x,networkDetails:S}))},onTimeout:function(j,U,S){C.resetLoader(c,v),p(new d({type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,part:x,networkDetails:S}))}})})},n.updateStatsFromPart=function(c,x){var A=c.stats,C=x.stats,k=C.total;if(A.loaded+=C.loaded,k){var w=Math.round(c.duration/x.duration),y=Math.min(Math.round(A.loaded/k),w),h=w-y,p=h*Math.round(A.loaded/y);A.total=A.loaded+p}else A.total=Math.max(A.loaded,A.total);var v=A.loading,_=C.loading;v.start?v.first+=_.first-_.start:(v.start=_.start,v.first=_.first),v.end=_.end},n.resetLoader=function(c,x){c.loader=null,this.loader===x&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),x.destroy()},s}();function i(s,n){n===void 0&&(n=null);var l=n||s,c={frag:s,part:n,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},x=l.byteRangeStartOffset,A=l.byteRangeEndOffset;return Object(F.isFiniteNumber)(x)&&Object(F.isFiniteNumber)(A)&&(c.rangeStart=x,c.rangeEnd=A),c}var d=function(s){R(n,s);function n(l){for(var c,x=arguments.length,A=new Array(x>1?x-1:0),C=1;C<x;C++)A[C-1]=arguments[C];return c=s.call.apply(s,[this].concat(A))||this,c.data=void 0,c.data=l,c}return n}(P(Error))},"./src/loader/fragment.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"ElementaryStreamTypes",function(){return a}),I.d(B,"BaseSegment",function(){return i}),I.d(B,"Fragment",function(){return d}),I.d(B,"Part",function(){return s});var F=I("./src/polyfills/number.ts"),T=I("./node_modules/url-toolkit/src/url-toolkit.js"),R=I.n(T),P=I("./src/utils/logger.ts"),m=I("./src/loader/level-key.ts"),t=I("./src/loader/load-stats.ts");function b(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,o(n,l)}function o(n,l){return o=Object.setPrototypeOf||function(x,A){return x.__proto__=A,x},o(n,l)}function u(n,l){for(var c=0;c<l.length;c++){var x=l[c];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(n,x.key,x)}}function f(n,l,c){return l&&u(n.prototype,l),c&&u(n,c),n}var a;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(a||(a={}));var i=function(){function n(c){var x;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(x={},x[a.AUDIO]=null,x[a.VIDEO]=null,x[a.AUDIOVIDEO]=null,x),this.baseurl=c}var l=n.prototype;return l.setByteRange=function(x,A){var C=x.split("@",2),k=[];C.length===1?k[0]=A?A.byteRangeEndOffset:0:k[0]=parseInt(C[1]),k[1]=parseInt(C[0])+k[0],this._byteRange=k},f(n,[{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(T.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(x){this._url=x}}]),n}(),d=function(n){b(l,n);function l(x,A){var C;return C=n.call(this,A)||this,C._decryptdata=null,C.rawProgramDateTime=null,C.programDateTime=null,C.tagList=[],C.duration=0,C.sn=0,C.levelkey=void 0,C.type=void 0,C.loader=null,C.level=-1,C.cc=0,C.startPTS=void 0,C.endPTS=void 0,C.appendedPTS=void 0,C.startDTS=void 0,C.endDTS=void 0,C.start=0,C.deltaPTS=void 0,C.maxStartPTS=void 0,C.minEndPTS=void 0,C.stats=new t.LoadStats,C.urlId=0,C.data=void 0,C.bitrateTest=!1,C.title=null,C.initSegment=null,C.type=x,C}var c=l.prototype;return c.createInitializationVector=function(A){for(var C=new Uint8Array(16),k=12;k<16;k++)C[k]=A>>8*(15-k)&255;return C},c.setDecryptDataFromLevelKey=function(A,C){var k=A;return(A==null?void 0:A.method)==="AES-128"&&A.uri&&!A.iv&&(k=m.LevelKey.fromURI(A.uri),k.method=A.method,k.iv=this.createInitializationVector(C),k.keyFormat="identity"),k},c.setElementaryStreamInfo=function(A,C,k,w,y,h){h===void 0&&(h=!1);var p=this.elementaryStreams,v=p[A];if(!v){p[A]={startPTS:C,endPTS:k,startDTS:w,endDTS:y,partial:h};return}v.startPTS=Math.min(v.startPTS,C),v.endPTS=Math.max(v.endPTS,k),v.startDTS=Math.min(v.startDTS,w),v.endDTS=Math.max(v.endDTS,y)},c.clearElementaryStreamInfo=function(){var A=this.elementaryStreams;A[a.AUDIO]=null,A[a.VIDEO]=null,A[a.AUDIOVIDEO]=null},f(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var A=this.sn;typeof A!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&P.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),A=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,A)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(F.isFiniteNumber)(this.programDateTime))return null;var A=Object(F.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+A*1e3}},{key:"encrypted",get:function(){var A;return!!((A=this.decryptdata)!==null&&A!==void 0&&A.keyFormat&&this.decryptdata.uri)}}]),l}(i),s=function(n){b(l,n);function l(c,x,A,C,k){var w;w=n.call(this,A)||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=c.decimalFloatingPoint("DURATION"),w.gap=c.bool("GAP"),w.independent=c.bool("INDEPENDENT"),w.relurl=c.enumeratedString("URI"),w.fragment=x,w.index=C;var y=c.enumeratedString("BYTERANGE");return y&&w.setByteRange(y,k),k&&(w.fragOffset=k.fragOffset+k.duration),w}return f(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var x=this.elementaryStreams;return!!(x.audio||x.video||x.audiovideo)}}]),l}(i)},"./src/loader/key-loader.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return P});var F=I("./src/events.ts"),T=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),P=function(){function m(b){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=b,this._registerListeners()}var t=m.prototype;return t._registerListeners=function(){this.hls.on(F.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(F.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var o in this.loaders){var u=this.loaders[o];u&&u.destroy()}this.loaders={}},t.onKeyLoading=function(o,u){var f=u.frag,a=f.type,i=this.loaders[a];if(!f.decryptdata){R.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=f.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(i&&(R.logger.warn("abort previous key loader for type:"+a),i.abort()),!d){R.logger.warn("key uri is falsy");return}var n=s.loader,l=f.loader=this.loaders[a]=new n(s);this.decrypturl=d,this.decryptkey=null;var c={url:d,frag:f,responseType:"arraybuffer"},x={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(c,x,A)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(F.Events.KEY_LOADED,{frag:f}))},t.loadsuccess=function(o,u,f){var a=f.frag;if(!a.decryptdata){R.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(o.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(F.Events.KEY_LOADED,{frag:a})},t.loaderror=function(o,u){var f=u.frag,a=f.loader;a&&a.abort(),delete this.loaders[f.type],this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:o})},t.loadtimeout=function(o,u){var f=u.frag,a=f.loader;a&&a.abort(),delete this.loaders[f.type],this.hls.trigger(F.Events.ERROR,{type:T.ErrorTypes.NETWORK_ERROR,details:T.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},m}()},"./src/loader/level-details.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"LevelDetails",function(){return m});var F=I("./src/polyfills/number.ts");function T(t,b){for(var o=0;o<b.length;o++){var u=b[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function R(t,b,o){return b&&T(t.prototype,b),o&&T(t,o),t}var P=10,m=function(){function t(o){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=o}var b=t.prototype;return b.reloaded=function(u){if(!u){this.advanced=!0,this.updated=!0;return}var f=this.lastPartSn-u.lastPartSn,a=this.lastPartIndex-u.lastPartIndex;this.updated=this.endSN!==u.endSN||!!a||!!f,this.advanced=this.endSN>u.endSN||f>0||f===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(u.misses*.6):this.misses=u.misses+1,this.availabilityDelay=u.availabilityDelay},R(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(F.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||P}},{key:"drift",get:function(){var u=this.driftEndTime-this.driftStartTime;if(u>0){var f=this.driftEnd-this.driftStart;return f*1e3/u}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var u;return(u=this.fragments)!==null&&u!==void 0&&u.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var u;return(u=this.partList)!==null&&u!==void 0&&u.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),t}()},"./src/loader/level-key.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"LevelKey",function(){return m});var F=I("./node_modules/url-toolkit/src/url-toolkit.js"),T=I.n(F);function R(t,b){for(var o=0;o<b.length;o++){var u=b[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function P(t,b,o){return b&&R(t.prototype,b),o&&R(t,o),t}var m=function(){t.fromURL=function(o,u){return new t(o,u)},t.fromURI=function(o){return new t(o)};function t(b,o){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,o?this._uri=Object(F.buildAbsoluteURL)(b,o,{alwaysNormalize:!0}):this._uri=b}return P(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"LoadStats",function(){return F});var F=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(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return l});var F=I("./src/polyfills/number.ts"),T=I("./node_modules/url-toolkit/src/url-toolkit.js"),R=I.n(T),P=I("./src/loader/fragment.ts"),m=I("./src/loader/level-details.ts"),t=I("./src/loader/level-key.ts"),b=I("./src/utils/attr-list.ts"),o=I("./src/utils/logger.ts"),u=I("./src/utils/codecs.ts"),f=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,a=/#EXT-X-MEDIA:(.*)/g,i=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),d=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function n(k){var w,y;return s.test((w=(y=T.parseURL(k))===null||y===void 0?void 0:y.path)!=null?w:"")}var l=function(){function k(){}return k.findGroup=function(y,h){for(var p=0;p<y.length;p++){var v=y[p];if(v.id===h)return v}},k.convertAVC1ToAVCOTI=function(y){var h=y.split(".");if(h.length>2){var p=h.shift()+".";return p+=parseInt(h.shift()).toString(16),p+=("000"+parseInt(h.shift()).toString(16)).substr(-4),p}return y},k.resolve=function(y,h){return T.buildAbsoluteURL(h,y,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(y,h){var p=[],v={},_=!1;f.lastIndex=0;for(var E;(E=f.exec(y))!=null;)if(E[1]){var g=new b.AttrList(E[1]),j={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:k.resolve(E[2],h)},U=g.decimalResolution("RESOLUTION");U&&(j.width=U.width,j.height=U.height),c((g.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),j),j.videoCodec&&j.videoCodec.indexOf("avc1")!==-1&&(j.videoCodec=k.convertAVC1ToAVCOTI(j.videoCodec)),p.push(j)}else if(E[3]){var S=new b.AttrList(E[3]);S["DATA-ID"]&&(_=!0,v[S["DATA-ID"]]=S)}return{levels:p,sessionData:_?v:null}},k.parseMasterPlaylistMedia=function(y,h,p,v){v===void 0&&(v=[]);var _,E=[],g=0;for(a.lastIndex=0;(_=a.exec(y))!==null;){var j=new b.AttrList(_[1]);if(j.TYPE===p){var U={attrs:j,bitrate:0,id:g++,groupId:j["GROUP-ID"],instreamId:j["INSTREAM-ID"],name:j.NAME||j.LANGUAGE||"",type:p,default:j.bool("DEFAULT"),autoselect:j.bool("AUTOSELECT"),forced:j.bool("FORCED"),lang:j.LANGUAGE,url:j.URI?k.resolve(j.URI,h):""};if(v.length){var S=k.findGroup(v,U.groupId)||v[0];x(U,S,"audioCodec"),x(U,S,"textCodec")}E.push(U)}}return E},k.parseLevelPlaylist=function(y,h,p,v,_){var E=new m.LevelDetails(h),g=E.fragments,j=null,U=0,S=0,z=0,H=0,M=null,V=new P.Fragment(v,h),K,$,Z,me=-1,oe=!1;for(i.lastIndex=0,E.m3u8=y;(K=i.exec(y))!==null;){oe&&(oe=!1,V=new P.Fragment(v,h),V.start=z,V.sn=U,V.cc=H,V.level=p,j&&(V.initSegment=j,V.rawProgramDateTime=j.rawProgramDateTime));var fe=K[1];if(fe){V.duration=parseFloat(fe);var ye=(" "+K[2]).slice(1);V.title=ye||null,V.tagList.push(ye?["INF",fe,ye]:["INF",fe])}else if(K[3])Object(F.isFiniteNumber)(V.duration)&&(V.start=z,Z&&(V.levelkey=Z),V.sn=U,V.level=p,V.cc=H,V.urlId=_,g.push(V),V.relurl=(" "+K[3]).slice(1),C(V,M),M=V,z+=V.duration,U++,S=0,oe=!0);else if(K[4]){var Ie=(" "+K[4]).slice(1);M?V.setByteRange(Ie,M):V.setByteRange(Ie)}else if(K[5])V.rawProgramDateTime=(" "+K[5]).slice(1),V.tagList.push(["PROGRAM-DATE-TIME",V.rawProgramDateTime]),me===-1&&(me=g.length);else{if(K=K[0].match(d),!K){o.logger.warn("No matches on slow regex match for level playlist!");continue}for($=1;$<K.length&&!(typeof K[$]!="undefined");$++);var ve=(" "+K[$]).slice(1),de=(" "+K[$+1]).slice(1),Je=K[$+2]?(" "+K[$+2]).slice(1):"";switch(ve){case"PLAYLIST-TYPE":E.type=de.toUpperCase();break;case"MEDIA-SEQUENCE":U=E.startSN=parseInt(de);break;case"SKIP":{var Rt=new b.AttrList(de),Ee=Rt.decimalInteger("SKIPPED-SEGMENTS");if(Object(F.isFiniteNumber)(Ee)){E.skippedSegments=Ee;for(var Me=Ee;Me--;)g.unshift(null);U+=Ee}var rt=Rt.enumeratedString("RECENTLY-REMOVED-DATERANGES");rt&&(E.recentlyRemovedDateranges=rt.split(" "));break}case"TARGETDURATION":E.targetduration=parseFloat(de);break;case"VERSION":E.version=parseInt(de);break;case"EXTM3U":break;case"ENDLIST":E.live=!1;break;case"#":(de||Je)&&V.tagList.push(Je?[de,Je]:[de]);break;case"DIS":H++;case"GAP":V.tagList.push([ve]);break;case"BITRATE":V.tagList.push([ve,de]);break;case"DISCONTINUITY-SEQ":H=parseInt(de);break;case"KEY":{var He,ke=new b.AttrList(de),ht=ke.enumeratedString("METHOD"),ie=ke.URI,xe=ke.hexadecimalInteger("IV"),we=ke.enumeratedString("KEYFORMATVERSIONS"),$e=ke.enumeratedString("KEYID"),ct=(He=ke.enumeratedString("KEYFORMAT"))!=null?He:"identity",yt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(yt.indexOf(ct)>-1){o.logger.warn("Keyformat "+ct+" is not supported from the manifest");continue}else if(ct!=="identity")continue;ht&&(Z=t.LevelKey.fromURL(h,ie),ie&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ht)>=0&&(Z.method=ht,Z.keyFormat=ct,$e&&(Z.keyID=$e),we&&(Z.keyFormatVersions=we),Z.iv=xe));break}case"START":{var Ut=new b.AttrList(de),We=Ut.decimalFloatingPoint("TIME-OFFSET");Object(F.isFiniteNumber)(We)&&(E.startTimeOffset=We);break}case"MAP":{var kt=new b.AttrList(de);V.relurl=kt.URI,kt.BYTERANGE&&V.setByteRange(kt.BYTERANGE),V.level=p,V.sn="initSegment",Z&&(V.levelkey=Z),V.initSegment=null,j=V,oe=!0;break}case"SERVER-CONTROL":{var qt=new b.AttrList(de);E.canBlockReload=qt.bool("CAN-BLOCK-RELOAD"),E.canSkipUntil=qt.optionalFloat("CAN-SKIP-UNTIL",0),E.canSkipDateRanges=E.canSkipUntil>0&&qt.bool("CAN-SKIP-DATERANGES"),E.partHoldBack=qt.optionalFloat("PART-HOLD-BACK",0),E.holdBack=qt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new b.AttrList(de);E.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ae=E.partList;Ae||(Ae=E.partList=[]);var ut=S>0?Ae[Ae.length-1]:void 0,Et=S++,Ze=new P.Part(new b.AttrList(de),V,h,Et,ut);Ae.push(Ze),V.duration+=Ze.duration;break}case"PRELOAD-HINT":{var dt=new b.AttrList(de);E.preloadHint=dt;break}case"RENDITION-REPORT":{var Ne=new b.AttrList(de);E.renditionReports=E.renditionReports||[],E.renditionReports.push(Ne);break}default:o.logger.warn("line parsed but not handled: "+K);break}}}M&&!M.relurl?(g.pop(),z-=M.duration,E.partList&&(E.fragmentHint=M)):E.partList&&(C(V,M),V.cc=H,E.fragmentHint=V);var Te=g.length,Oe=g[0],ae=g[Te-1];if(z+=E.skippedSegments*E.targetduration,z>0&&Te&&ae){E.averagetargetduration=z/Te;var le=ae.sn;E.endSN=le!=="initSegment"?le:0,Oe&&(E.startCC=Oe.cc,Oe.initSegment||E.fragments.every(function(he){return he.relurl&&n(he.relurl)})&&(o.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),V=new P.Fragment(v,h),V.relurl=ae.relurl,V.level=p,V.sn="initSegment",Oe.initSegment=V,E.needSidxRanges=!0))}else E.endSN=0,E.startCC=0;return E.fragmentHint&&(z+=E.fragmentHint.duration),E.totalduration=z,E.endCC=H,me>0&&A(g,me),E},k}();function c(k,w){["video","audio","text"].forEach(function(y){var h=k.filter(function(v){return Object(u.isCodecType)(v,y)});if(h.length){var p=h.filter(function(v){return v.lastIndexOf("avc1",0)===0||v.lastIndexOf("mp4a",0)===0});w[y+"Codec"]=p.length>0?p[0]:h[0],k=k.filter(function(v){return h.indexOf(v)===-1})}}),w.unknownCodecs=k}function x(k,w,y){var h=w[y];h&&(k[y]=h)}function A(k,w){for(var y=k[w],h=w;h--;){var p=k[h];if(!p)return;p.programDateTime=y.programDateTime-p.duration*1e3,y=p}}function C(k,w){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):w!=null&&w.programDateTime&&(k.programDateTime=w.endProgramDateTime),Object(F.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),T=I("./src/events.ts"),R=I("./src/errors.ts"),P=I("./src/utils/logger.ts"),m=I("./src/utils/mp4-tools.ts"),t=I("./src/loader/m3u8-parser.ts"),b=I("./src/types/loader.ts"),o=I("./src/utils/attr-list.ts");function u(i){var d=i.type;switch(d){case b.PlaylistContextType.AUDIO_TRACK:return b.PlaylistLevelType.AUDIO;case b.PlaylistContextType.SUBTITLE_TRACK:return b.PlaylistLevelType.SUBTITLE;default:return b.PlaylistLevelType.MAIN}}function f(i,d){var s=i.url;return(s===void 0||s.indexOf("data:")===0)&&(s=d.url),s}var a=function(){function i(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var d=i.prototype;return d.registerListeners=function(){var n=this.hls;n.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(T.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(T.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var n=this.hls;n.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(T.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(T.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(T.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(n){var l=this.hls.config,c=l.pLoader,x=l.loader,A=c||x,C=new A(l);return n.loader=C,this.loaders[n.type]=C,C},d.getInternalLoader=function(n){return this.loaders[n.type]},d.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},d.destroyInternalLoaders=function(){for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy(),this.resetInternalLoader(n)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(n,l){var c=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:b.PlaylistContextType.MANIFEST,url:c,deliveryDirectives:null})},d.onLevelLoading=function(n,l){var c=l.id,x=l.level,A=l.url,C=l.deliveryDirectives;this.load({id:c,groupId:null,level:x,responseType:"text",type:b.PlaylistContextType.LEVEL,url:A,deliveryDirectives:C})},d.onAudioTrackLoading=function(n,l){var c=l.id,x=l.groupId,A=l.url,C=l.deliveryDirectives;this.load({id:c,groupId:x,level:null,responseType:"text",type:b.PlaylistContextType.AUDIO_TRACK,url:A,deliveryDirectives:C})},d.onSubtitleTrackLoading=function(n,l){var c=l.id,x=l.groupId,A=l.url,C=l.deliveryDirectives;this.load({id:c,groupId:x,level:null,responseType:"text",type:b.PlaylistContextType.SUBTITLE_TRACK,url:A,deliveryDirectives:C})},d.load=function(n){var l,c=this.hls.config,x=this.getInternalLoader(n);if(x){var A=x.context;if(A&&A.url===n.url){P.logger.trace("[playlist-loader]: playlist request ongoing");return}P.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),x.abort()}var C,k,w,y;switch(n.type){case b.PlaylistContextType.MANIFEST:C=c.manifestLoadingMaxRetry,k=c.manifestLoadingTimeOut,w=c.manifestLoadingRetryDelay,y=c.manifestLoadingMaxRetryTimeout;break;case b.PlaylistContextType.LEVEL:case b.PlaylistContextType.AUDIO_TRACK:case b.PlaylistContextType.SUBTITLE_TRACK:C=0,k=c.levelLoadingTimeOut;break;default:C=c.levelLoadingMaxRetry,k=c.levelLoadingTimeOut,w=c.levelLoadingRetryDelay,y=c.levelLoadingMaxRetryTimeout;break}if(x=this.createInternalLoader(n),(l=n.deliveryDirectives)!==null&&l!==void 0&&l.part){var h;if(n.type===b.PlaylistContextType.LEVEL&&n.level!==null?h=this.hls.levels[n.level].details:n.type===b.PlaylistContextType.AUDIO_TRACK&&n.id!==null?h=this.hls.audioTracks[n.id].details:n.type===b.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(h=this.hls.subtitleTracks[n.id].details),h){var p=h.partTarget,v=h.targetduration;p&&v&&(k=Math.min(Math.max(p*3,v*.8)*1e3,k))}}var _={timeout:k,maxRetry:C,retryDelay:w,maxRetryDelay:y,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};x.load(n,_,E)},d.loadsuccess=function(n,l,c,x){if(x===void 0&&(x=null),c.isSidxRequest){this.handleSidxRequest(n,c),this.handlePlaylistLoaded(n,l,c,x);return}this.resetInternalLoader(c.type);var A=n.data;if(A.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,c,"no EXTM3U delimiter",x);return}l.parsing.start=performance.now(),A.indexOf("#EXTINF:")>0||A.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,l,c,x):this.handleMasterPlaylist(n,l,c,x)},d.loaderror=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!1,n)},d.loadtimeout=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!0)},d.handleMasterPlaylist=function(n,l,c,x){var A=this.hls,C=n.data,k=f(n,c),w=t.default.parseMasterPlaylist(C,k),y=w.levels,h=w.sessionData;if(!y.length){this.handleManifestParsingError(n,c,"no level found in manifest",x);return}var p=y.map(function(U){return{id:U.attrs.AUDIO,audioCodec:U.audioCodec}}),v=y.map(function(U){return{id:U.attrs.SUBTITLES,textCodec:U.textCodec}}),_=t.default.parseMasterPlaylistMedia(C,k,"AUDIO",p),E=t.default.parseMasterPlaylistMedia(C,k,"SUBTITLES",v),g=t.default.parseMasterPlaylistMedia(C,k,"CLOSED-CAPTIONS");if(_.length){var j=_.some(function(U){return!U.url});!j&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(P.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),_.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new o.AttrList({}),bitrate:0,url:""}))}A.trigger(T.Events.MANIFEST_LOADED,{levels:y,audioTracks:_,subtitles:E,captions:g,url:k,stats:l,networkDetails:x,sessionData:h})},d.handleTrackOrLevelPlaylist=function(n,l,c,x){var A=this.hls,C=c.id,k=c.level,w=c.type,y=f(n,c),h=Object(F.isFiniteNumber)(C)?C:0,p=Object(F.isFiniteNumber)(k)?k:h,v=u(c),_=t.default.parseLevelPlaylist(n.data,y,p,v,h);if(!_.fragments.length){A.trigger(T.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof c.level=="number"?c.level:void 0});return}if(w===b.PlaylistContextType.MANIFEST){var E={attrs:new o.AttrList({}),bitrate:0,details:_,name:"",url:y};A.trigger(T.Events.MANIFEST_LOADED,{levels:[E],audioTracks:[],url:y,stats:l,networkDetails:x,sessionData:null})}if(l.parsing.end=performance.now(),_.needSidxRanges){var g,j=(g=_.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:j,isSidxRequest:!0,type:w,level:k,levelDetails:_,id:C,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}c.levelDetails=_,this.handlePlaylistLoaded(n,l,c,x)},d.handleSidxRequest=function(n,l){var c=Object(m.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var x=c.references,A=l.levelDetails;x.forEach(function(C,k){var w=C.info,y=A.fragments[k];y.byteRange.length===0&&y.setByteRange(String(1+w.end-w.start)+"@"+String(w.start)),y.initSegment&&y.initSegment.setByteRange(String(c.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(n,l,c,x){this.hls.trigger(T.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===b.PlaylistContextType.MANIFEST,url:n.url,reason:c,response:n,context:l,networkDetails:x})},d.handleNetworkError=function(n,l,c,x){c===void 0&&(c=!1),P.logger.warn("[playlist-loader]: A network "+(c?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var A=R.ErrorDetails.UNKNOWN,C=!1,k=this.getInternalLoader(n);switch(n.type){case b.PlaylistContextType.MANIFEST:A=c?R.ErrorDetails.MANIFEST_LOAD_TIMEOUT:R.ErrorDetails.MANIFEST_LOAD_ERROR,C=!0;break;case b.PlaylistContextType.LEVEL:A=c?R.ErrorDetails.LEVEL_LOAD_TIMEOUT:R.ErrorDetails.LEVEL_LOAD_ERROR,C=!1;break;case b.PlaylistContextType.AUDIO_TRACK:A=c?R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,C=!1;break;case b.PlaylistContextType.SUBTITLE_TRACK:A=c?R.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:R.ErrorDetails.SUBTITLE_LOAD_ERROR,C=!1;break}k&&this.resetInternalLoader(n.type);var w={type:R.ErrorTypes.NETWORK_ERROR,details:A,fatal:C,url:n.url,loader:k,context:n,networkDetails:l};x&&(w.response=x),this.hls.trigger(T.Events.ERROR,w)},d.handlePlaylistLoaded=function(n,l,c,x){var A=c.type,C=c.level,k=c.id,w=c.groupId,y=c.loader,h=c.levelDetails,p=c.deliveryDirectives;if(!(h!=null&&h.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",x);return}if(!y)return;h.live&&(y.getCacheAge&&(h.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(h.ageHeader))&&(h.ageHeader=0));switch(A){case b.PlaylistContextType.MANIFEST:case b.PlaylistContextType.LEVEL:this.hls.trigger(T.Events.LEVEL_LOADED,{details:h,level:C||0,id:k||0,stats:l,networkDetails:x,deliveryDirectives:p});break;case b.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(T.Events.AUDIO_TRACK_LOADED,{details:h,id:k||0,groupId:w||"",stats:l,networkDetails:x,deliveryDirectives:p});break;case b.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(T.Events.SUBTITLE_TRACK_LOADED,{details:h,id:k||0,groupId:w||"",stats:l,networkDetails:x,deliveryDirectives:p});break}},i}();B.default=a},"./src/polyfills/number.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"isFiniteNumber",function(){return F}),I.d(B,"MAX_SAFE_INTEGER",function(){return T});var F=Number.isFinite||function(R){return typeof R=="number"&&isFinite(R)},T=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Y,B,I){"use strict";I.r(B);var F=function(){function T(){}return T.getSilentFrame=function(P,m){switch(P){case"mp4a.40.2":if(m===1)return new Uint8Array([0,200,0,128,35,128]);if(m===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(m===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(m===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(m===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(m===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(m===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(m===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(m===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},T}();B.default=F},"./src/remux/mp4-generator.ts":function(Y,B,I){"use strict";I.r(B);var F=Math.pow(2,32)-1,T=function(){function R(){}return R.init=function(){R.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 m;for(m in R.types)R.types.hasOwnProperty(m)&&(R.types[m]=[m.charCodeAt(0),m.charCodeAt(1),m.charCodeAt(2),m.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]),b=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]);R.HDLR_TYPES={video:t,audio:b};var o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),u=new Uint8Array([0,0,0,0,0,0,0,0]);R.STTS=R.STSC=R.STCO=u,R.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),R.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),R.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);R.FTYP=R.box(R.types.ftyp,f,i,f,a),R.DINF=R.box(R.types.dinf,R.box(R.types.dref,o))},R.box=function(m){for(var t=8,b=arguments.length,o=new Array(b>1?b-1:0),u=1;u<b;u++)o[u-1]=arguments[u];for(var f=o.length,a=f;f--;)t+=o[f].byteLength;var i=new Uint8Array(t);for(i[0]=t>>24&255,i[1]=t>>16&255,i[2]=t>>8&255,i[3]=t&255,i.set(m,4),f=0,t=8;f<a;f++)i.set(o[f],t),t+=o[f].byteLength;return i},R.hdlr=function(m){return R.box(R.types.hdlr,R.HDLR_TYPES[m])},R.mdat=function(m){return R.box(R.types.mdat,m)},R.mdhd=function(m,t){t*=m;var b=Math.floor(t/(F+1)),o=Math.floor(t%(F+1));return R.box(R.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,m>>24&255,m>>16&255,m>>8&255,m&255,b>>24,b>>16&255,b>>8&255,b&255,o>>24,o>>16&255,o>>8&255,o&255,85,196,0,0]))},R.mdia=function(m){return R.box(R.types.mdia,R.mdhd(m.timescale,m.duration),R.hdlr(m.type),R.minf(m))},R.mfhd=function(m){return R.box(R.types.mfhd,new Uint8Array([0,0,0,0,m>>24,m>>16&255,m>>8&255,m&255]))},R.minf=function(m){return m.type==="audio"?R.box(R.types.minf,R.box(R.types.smhd,R.SMHD),R.DINF,R.stbl(m)):R.box(R.types.minf,R.box(R.types.vmhd,R.VMHD),R.DINF,R.stbl(m))},R.moof=function(m,t,b){return R.box(R.types.moof,R.mfhd(m),R.traf(b,t))},R.moov=function(m){for(var t=m.length,b=[];t--;)b[t]=R.trak(m[t]);return R.box.apply(null,[R.types.moov,R.mvhd(m[0].timescale,m[0].duration)].concat(b).concat(R.mvex(m)))},R.mvex=function(m){for(var t=m.length,b=[];t--;)b[t]=R.trex(m[t]);return R.box.apply(null,[R.types.mvex].concat(b))},R.mvhd=function(m,t){t*=m;var b=Math.floor(t/(F+1)),o=Math.floor(t%(F+1)),u=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,m>>24&255,m>>16&255,m>>8&255,m&255,b>>24,b>>16&255,b>>8&255,b&255,o>>24,o>>16&255,o>>8&255,o&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 R.box(R.types.mvhd,u)},R.sdtp=function(m){var t=m.samples||[],b=new Uint8Array(4+t.length),o,u;for(o=0;o<t.length;o++)u=t[o].flags,b[o+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return R.box(R.types.sdtp,b)},R.stbl=function(m){return R.box(R.types.stbl,R.stsd(m),R.box(R.types.stts,R.STTS),R.box(R.types.stsc,R.STSC),R.box(R.types.stsz,R.STSZ),R.box(R.types.stco,R.STCO))},R.avc1=function(m){var t=[],b=[],o,u,f;for(o=0;o<m.sps.length;o++)u=m.sps[o],f=u.byteLength,t.push(f>>>8&255),t.push(f&255),t=t.concat(Array.prototype.slice.call(u));for(o=0;o<m.pps.length;o++)u=m.pps[o],f=u.byteLength,b.push(f>>>8&255),b.push(f&255),b=b.concat(Array.prototype.slice.call(u));var a=R.box(R.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|m.sps.length].concat(t).concat([m.pps.length]).concat(b))),i=m.width,d=m.height,s=m.pixelRatio[0],n=m.pixelRatio[1];return R.box(R.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>8&255,i&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,R.box(R.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),R.box(R.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,n>>24,n>>16&255,n>>8&255,n&255])))},R.esds=function(m){var t=m.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(m.config).concat([6,1,2]))},R.mp4a=function(m){var t=m.samplerate;return R.box(R.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,m.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),R.box(R.types.esds,R.esds(m)))},R.mp3=function(m){var t=m.samplerate;return R.box(R.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,m.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},R.stsd=function(m){return m.type==="audio"?!m.isAAC&&m.codec==="mp3"?R.box(R.types.stsd,R.STSD,R.mp3(m)):R.box(R.types.stsd,R.STSD,R.mp4a(m)):R.box(R.types.stsd,R.STSD,R.avc1(m))},R.tkhd=function(m){var t=m.id,b=m.duration*m.timescale,o=m.width,u=m.height,f=Math.floor(b/(F+1)),a=Math.floor(b%(F+1));return R.box(R.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,f>>24,f>>16&255,f>>8&255,f&255,a>>24,a>>16&255,a>>8&255,a&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,o>>8&255,o&255,0,0,u>>8&255,u&255,0,0]))},R.traf=function(m,t){var b=R.sdtp(m),o=m.id,u=Math.floor(t/(F+1)),f=Math.floor(t%(F+1));return R.box(R.types.traf,R.box(R.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255])),R.box(R.types.tfdt,new Uint8Array([1,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,f>>24,f>>16&255,f>>8&255,f&255])),R.trun(m,b.length+16+20+8+16+8+8),b)},R.trak=function(m){return m.duration=m.duration||4294967295,R.box(R.types.trak,R.tkhd(m),R.mdia(m))},R.trex=function(m){var t=m.id;return R.box(R.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]))},R.trun=function(m,t){var b=m.samples||[],o=b.length,u=12+16*o,f=new Uint8Array(u),a,i,d,s,n,l;for(t+=8+u,f.set([0,0,15,1,o>>>24&255,o>>>16&255,o>>>8&255,o&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<o;a++)i=b[a],d=i.duration,s=i.size,n=i.flags,l=i.cts,f.set([d>>>24&255,d>>>16&255,d>>>8&255,d&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*a);return R.box(R.types.trun,f)},R.initSegment=function(m){R.types||R.init();var t=R.moov(m),b=new Uint8Array(R.FTYP.byteLength+t.byteLength);return b.set(R.FTYP),b.set(t,R.FTYP.byteLength),b},R}();T.types=void 0,T.HDLR_TYPES=void 0,T.STTS=void 0,T.STSC=void 0,T.STCO=void 0,T.STSZ=void 0,T.VMHD=void 0,T.SMHD=void 0,T.STSD=void 0,T.FTYP=void 0,T.DINF=void 0,B.default=T},"./src/remux/mp4-remuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return l}),I.d(B,"normalizePts",function(){return c});var F=I("./src/polyfills/number.ts"),T=I("./src/remux/aac-helper.ts"),R=I("./src/remux/mp4-generator.ts"),P=I("./src/events.ts"),m=I("./src/errors.ts"),t=I("./src/utils/logger.ts"),b=I("./src/types/loader.ts"),o=I("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var y=arguments[w];for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(k[h]=y[h])}return k},u.apply(this,arguments)}var f=10*1e3,a=1024,i=1152,d=null,s=null,n=!1,l=function(){function k(y,h,p,v){if(v===void 0&&(v=""),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=y,this.config=h,this.typeSupported=p,this.ISGenerated=!1,d===null){var _=navigator.userAgent||"",E=_.match(/Chrome\/(\d+)/i);d=E?parseInt(E[1]):0}if(s===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);s=g?parseInt(g[1]):0}n=!!d&&d<75||!!s&&s<600}var w=k.prototype;return w.destroy=function(){},w.resetTimeStamp=function(h){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=h},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(h){var p=!1,v=h.reduce(function(_,E){var g=E.pts-_;return g<-4294967296?(p=!0,c(_,E.pts)):g>0?_:E.pts},h[0].pts);return p&&t.logger.debug("PTS rollover detected"),v},w.remux=function(h,p,v,_,E,g,j,U){var S,z,H,M,V,K,$=E,Z=E,me=h.pid>-1,oe=p.pid>-1,fe=p.samples.length,ye=h.samples.length>0,Ie=fe>1,ve=(!me||ye)&&(!oe||Ie)||this.ISGenerated||j;if(ve){this.ISGenerated||(H=this.generateIS(h,p,E));var de=this.isVideoContiguous,Je=-1;if(Ie&&(Je=x(p.samples),!de&&this.config.forceKeyFrameOnDiscontinuity))if(K=!0,Je>0){t.logger.warn("[mp4-remuxer]: Dropped "+Je+" out of "+fe+" video samples due to a missing keyframe");var Rt=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(Je),p.dropped+=Je,Z+=(p.samples[0].pts-Rt)/(p.timescale||9e4)}else Je===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),K=!1);if(this.ISGenerated){if(ye&&Ie){var Ee=this.getVideoStartPts(p.samples),Me=c(h.samples[0].pts,Ee)-Ee,rt=Me/p.inputTimeScale;$+=Math.max(0,rt),Z+=Math.max(0,-rt)}if(ye){if(h.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),H=this.generateIS(h,p,E)),z=this.remuxAudio(h,$,this.isAudioContiguous,g,oe||Ie||U===b.PlaylistLevelType.AUDIO?Z:void 0),Ie){var He=z?z.endPTS-z.startPTS:0;p.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),H=this.generateIS(h,p,E)),S=this.remuxVideo(p,Z,de,He)}}else Ie&&(S=this.remuxVideo(p,Z,de,0));S&&(S.firstKeyFrame=Je,S.independent=Je!==-1)}}return this.ISGenerated&&(v.samples.length&&(V=this.remuxID3(v,E)),_.samples.length&&(M=this.remuxText(_,E))),{audio:z,video:S,initSegment:H,independent:K,text:M,id3:V}},w.generateIS=function(h,p,v){var _=h.samples,E=p.samples,g=this.typeSupported,j={},U=!Object(F.isFiniteNumber)(this._initPTS),S="audio/mp4",z,H,M;if(U&&(z=H=Infinity),h.config&&_.length&&(h.timescale=h.samplerate,h.isAAC||(g.mpeg?(S="audio/mpeg",h.codec=""):g.mp3&&(h.codec="mp3")),j.audio={id:"audio",container:S,codec:h.codec,initSegment:!h.isAAC&&g.mpeg?new Uint8Array(0):R.default.initSegment([h]),metadata:{channelCount:h.channelCount}},U&&(M=h.inputTimeScale,z=H=_[0].pts-Math.round(M*v))),p.sps&&p.pps&&E.length&&(p.timescale=p.inputTimeScale,j.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:R.default.initSegment([p]),metadata:{width:p.width,height:p.height}},U)){M=p.inputTimeScale;var V=this.getVideoStartPts(E),K=Math.round(M*v);H=Math.min(H,c(E[0].dts,V)-K),z=Math.min(z,V-K)}if(Object.keys(j).length)return this.ISGenerated=!0,U&&(this._initPTS=z,this._initDTS=H),{tracks:j,initPTS:z,timescale:M}},w.remuxVideo=function(h,p,v,_){var E=h.inputTimeScale,g=h.samples,j=[],U=g.length,S=this._initPTS,z=this.nextAvcDts,H=8,M,V,K,$=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,me=0,oe=!1;if(!v||z===null){var fe=p*E,ye=g[0].pts-c(g[0].dts,g[0].pts);z=fe-ye}for(var Ie=0;Ie<U;Ie++){var ve=g[Ie];if(ve.pts=c(ve.pts-S,z),ve.dts=c(ve.dts-S,z),ve.dts>ve.pts){var de=9e4*.2;me=Math.max(Math.min(me,ve.pts-ve.dts),-1*de)}ve.dts<g[Ie>0?Ie-1:Ie].dts&&(oe=!0)}oe&&g.sort(function(zt,Ot){var At=zt.dts-Ot.dts,ft=zt.pts-Ot.pts;return At||ft}),V=g[0].dts,K=g[g.length-1].dts;var Je=Math.round((K-V)/(U-1));if(me<0){if(me<Je*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(o.toMsFromMpegTsClock)(-Je,!0)+" ms");for(var Rt=me,Ee=0;Ee<U;Ee++)g[Ee].dts=Rt=Math.max(Rt,g[Ee].pts-Je),g[Ee].pts=Math.max(Rt,g[Ee].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(o.toMsFromMpegTsClock)(me,!0)+" ms to overcome this issue");for(var Me=0;Me<U;Me++)g[Me].dts=g[Me].dts+me}V=g[0].dts}if(v){var rt=V-z,He=rt>Je,ke=rt<-1;if(He||ke){He?t.logger.warn("AVC: "+Object(o.toMsFromMpegTsClock)(rt,!0)+" ms ("+rt+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(o.toMsFromMpegTsClock)(-rt,!0)+" ms ("+rt+"dts) overlapping between fragments detected"),V=z;var ht=g[0].pts-rt;g[0].dts=V,g[0].pts=ht,t.logger.log("Video: First PTS/DTS adjusted: "+Object(o.toMsFromMpegTsClock)(ht,!0)+"/"+Object(o.toMsFromMpegTsClock)(V,!0)+", delta: "+Object(o.toMsFromMpegTsClock)(rt,!0)+" ms")}}n&&(V=Math.max(0,V));for(var ie=0,xe=0,we=0;we<U;we++){for(var $e=g[we],ct=$e.units,yt=ct.length,Ut=0,We=0;We<yt;We++)Ut+=ct[We].data.length;xe+=Ut,ie+=yt,$e.length=Ut,$e.dts=Math.max($e.dts,V),$e.pts=Math.max($e.pts,$e.dts,0),$=Math.min($e.pts,$),Z=Math.max($e.pts,Z)}K=g[U-1].dts;var kt=xe+4*ie+8,qt;try{qt=new Uint8Array(kt)}catch(zt){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:m.ErrorTypes.MUX_ERROR,details:m.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:kt,reason:"fail allocating video mdat "+kt});return}var Pe=new DataView(qt.buffer);Pe.setUint32(0,kt),qt.set(R.default.types.mdat,4);for(var Ae=0;Ae<U;Ae++){for(var ut=g[Ae],Et=ut.units,Ze=0,dt=0,Ne=Et.length;dt<Ne;dt++){var Te=Et[dt],Oe=Te.data,ae=Te.data.byteLength;Pe.setUint32(H,ae),H+=4,qt.set(Oe,H),H+=ae,Ze+=4+ae}if(Ae<U-1)M=g[Ae+1].dts-ut.dts;else{var le=this.config,he=ut.dts-g[Ae>0?Ae-1:Ae].dts;if(le.stretchShortVideoTrack&&this.nextAudioPts!==null){var _e=Math.floor(le.maxBufferHole*E),Se=(_?$+_*E:this.nextAudioPts)-ut.pts;Se>_e?(M=Se-he,M<0&&(M=he),t.logger.log("[mp4-remuxer]: It is approximately "+Se/90+" ms to the next segment; using duration "+M/90+" ms for the last video frame.")):M=he}else M=he}var ze=Math.round(ut.pts-ut.dts);j.push(new A(ut.key,M,Ze,ze))}if(j.length&&d&&d<70){var xt=j[0].flags;xt.dependsOn=2,xt.isNonSync=0}console.assert(M!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=K+M,this.isVideoContiguous=!0;var Qt=R.default.moof(h.sequenceNumber++,V,u({},h,{samples:j})),sn="video",gt={data1:Qt,data2:qt,startPTS:$/E,endPTS:(Z+M)/E,startDTS:V/E,endDTS:z/E,type:sn,hasAudio:!1,hasVideo:!0,nb:j.length,dropped:h.dropped};return h.samples=[],h.dropped=0,console.assert(qt.length,"MDAT length must not be zero"),gt},w.remuxAudio=function(h,p,v,_,E){var g=h.inputTimeScale,j=h.samplerate?h.samplerate:g,U=g/j,S=h.isAAC?a:i,z=S*U,H=this._initPTS,M=!h.isAAC&&this.typeSupported.mpeg,V=[],K=h.samples,$=M?0:8,Z=this.nextAudioPts||-1,me=p*g;if(this.isAudioContiguous=v=v||K.length&&Z>0&&(_&&Math.abs(me-Z)<9e3||Math.abs(c(K[0].pts-H,me)-Z)<20*z),K.forEach(function(Oe){Oe.pts=c(Oe.pts-H,me)}),!v||Z<0){if(K=K.filter(function(Oe){return Oe.pts>=0}),!K.length)return;E===0?Z=0:_?Z=Math.max(0,me):Z=K[0].pts}if(h.isAAC)for(var oe=E!==void 0,fe=this.config.maxAudioFramesDrift,ye=0,Ie=Z;ye<K.length;ye++){var ve=K[ye],de=ve.pts,Je=de-Ie,Rt=Math.abs(1e3*Je/g);if(Je<=-fe*z&&oe)ye===0&&(t.logger.warn("Audio frame @ "+(de/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Je/g)+" ms."),this.nextAudioPts=Z=Ie=de);else if(Je>=fe*z&&Rt<f&&oe){var Ee=Math.round(Je/z);Ie=de-Ee*z,Ie<0&&(Ee--,Ie+=z),ye===0&&(this.nextAudioPts=Z=Ie),t.logger.warn("[mp4-remuxer]: Injecting "+Ee+" audio frame @ "+(Ie/g).toFixed(3)+"s due to "+Math.round(1e3*Je/g)+" ms gap.");for(var Me=0;Me<Ee;Me++){var rt=Math.max(Ie,0),He=T.default.getSilentFrame(h.manifestCodec||h.codec,h.channelCount);He||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),He=ve.unit.subarray()),K.splice(ye,0,{unit:He,pts:rt}),Ie+=z,ye++}}ve.pts=Ie,Ie+=z}for(var ke=null,ht=null,ie,xe=0,we=K.length;we--;)xe+=K[we].unit.byteLength;for(var $e=0,ct=K.length;$e<ct;$e++){var yt=K[$e],Ut=yt.unit,We=yt.pts;if(ht!==null){var kt=V[$e-1];kt.duration=Math.round((We-ht)/U)}else if(v&&h.isAAC&&(We=Z),ke=We,xe>0){xe+=$;try{ie=new Uint8Array(xe)}catch(Oe){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:m.ErrorTypes.MUX_ERROR,details:m.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xe,reason:"fail allocating audio mdat "+xe});return}if(!M){var qt=new DataView(ie.buffer);qt.setUint32(0,xe),ie.set(R.default.types.mdat,4)}}else return;ie.set(Ut,$);var Pe=Ut.byteLength;$+=Pe,V.push(new A(!0,S,Pe,0)),ht=We}var Ae=V.length;if(!Ae)return;var ut=V[V.length-1];this.nextAudioPts=Z=ht+U*ut.duration;var Et=M?new Uint8Array(0):R.default.moof(h.sequenceNumber++,ke/U,u({},h,{samples:V}));h.samples=[];var Ze=ke/g,dt=Z/g,Ne="audio",Te={data1:Et,data2:ie,startPTS:Ze,endPTS:dt,startDTS:Ze,endDTS:dt,type:Ne,hasAudio:!0,hasVideo:!1,nb:Ae};return this.isAudioContiguous=!0,console.assert(ie.length,"MDAT length must not be zero"),Te},w.remuxEmptyAudio=function(h,p,v,_){var E=h.inputTimeScale,g=h.samplerate?h.samplerate:E,j=E/g,U=this.nextAudioPts,S=(U!==null?U:_.startDTS*E)+this._initDTS,z=_.endDTS*E+this._initDTS,H=j*a,M=Math.ceil((z-S)/H),V=T.default.getSilentFrame(h.manifestCodec||h.codec,h.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!V){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var K=[],$=0;$<M;$++){var Z=S+$*H;K.push({unit:V,pts:Z,dts:Z})}return h.samples=K,this.remuxAudio(h,p,v,!1)},w.remuxID3=function(h,p){var v=h.samples.length;if(!v)return;for(var _=h.inputTimeScale,E=this._initPTS,g=this._initDTS,j=0;j<v;j++){var U=h.samples[j];U.pts=c(U.pts-E,p*_)/_,U.dts=c(U.dts-g,p*_)/_}var S=h.samples;return h.samples=[],{samples:S}},w.remuxText=function(h,p){var v=h.samples.length;if(!v)return;for(var _=h.inputTimeScale,E=this._initPTS,g=0;g<v;g++){var j=h.samples[g];j.pts=c(j.pts-E,p*_)/_}h.samples.sort(function(S,z){return S.pts-z.pts});var U=h.samples;return h.samples=[],{samples:U}},k}();function c(k,w){var y;if(w===null)return k;for(w<k?y=-8589934592:y=8589934592;Math.abs(k-w)>4294967296;)k+=y;return k}function x(k){for(var w=0;w<k.length;w++)if(k[w].key)return w;return-1}var A=function(w,y,h,p){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=y,this.size=h,this.cts=p,this.flags=new C(w)},C=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(Y,B,I){"use strict";I.r(B);var F=I("./src/polyfills/number.ts"),T=I("./src/utils/mp4-tools.ts"),R=I("./src/loader/fragment.ts"),P=I("./src/utils/logger.ts"),m=function(){function o(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var u=o.prototype;return u.destroy=function(){},u.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},u.resetNextTimestamp=function(){this.lastEndDTS=null},u.resetInitSegment=function(a,i,d){this.audioCodec=i,this.videoCodec=d,this.generateInitSegment(a),this.emitInitSegment=!0},u.generateInitSegment=function(a){var i=this.audioCodec,d=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(T.parseInitSegment)(a);i||(i=b(s.audio,R.ElementaryStreamTypes.AUDIO)),d||(d=b(s.video,R.ElementaryStreamTypes.VIDEO));var n={};s.audio&&s.video?n.audiovideo={container:"video/mp4",codec:i+","+d,initSegment:a,id:"main"}:s.audio?n.audio={container:"audio/mp4",codec:i,initSegment:a,id:"audio"}:s.video?n.video={container:"video/mp4",codec:d,initSegment:a,id:"main"}:P.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},u.remux=function(a,i,d,s,n){var l=this.initPTS,c=this.lastEndDTS,x={audio:void 0,video:void 0,text:s,id3:d,initSegment:void 0};Object(F.isFiniteNumber)(c)||(c=this.lastEndDTS=n||0);var A=i.samples;if(!A||!A.length)return x;var C={initPTS:void 0,timescale:1},k=this.initData;if((!k||!k.length)&&(this.generateInitSegment(A),k=this.initData),!k||!k.length)return P.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),x;this.emitInitSegment&&(C.tracks=this.initTracks,this.emitInitSegment=!1),Object(F.isFiniteNumber)(l)||(this.initPTS=C.initPTS=l=t(k,A,c));var w=Object(T.getDuration)(A,k),y=c,h=w+y;Object(T.offsetStartDTS)(k,A,l),w>0?this.lastEndDTS=h:(P.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!k.audio,v=!!k.video,_="";p&&(_+="audio"),v&&(_+="video");var E={data1:A,startPTS:y,startDTS:y,endPTS:h,endDTS:h,type:_,hasAudio:p,hasVideo:v,nb:1,dropped:0};return x.audio=E.type==="audio"?E:void 0,x.video=E.type!=="audio"?E:void 0,x.text=s,x.id3=d,x.initSegment=C,x},o}(),t=function(u,f,a){return Object(T.getStartDTS)(u,f)-a};function b(o,u){var f=o==null?void 0:o.codec;return f&&f.length>4?f:f==="hvc1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||u===R.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}B.default=m},"./src/task-loop.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function T(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var R=T.prototype;return R.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},R.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},R.onHandlerDestroyed=function(){},R.hasInterval=function(){return!!this._tickInterval},R.hasNextTick=function(){return!!this._tickTimer},R.setInterval=function(m){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,m),!0)},R.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},R.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},R.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},R.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},R.doTick=function(){},T}()},"./src/types/cmcd.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"CMCDVersion",function(){return F}),I.d(B,"CMCDObjectType",function(){return T}),I.d(B,"CMCDStreamingFormat",function(){return R}),I.d(B,"CMCDStreamType",function(){return P});var F=1,T;(function(m){m.MANIFEST="m",m.AUDIO="a",m.VIDEO="v",m.MUXED="av",m.INIT="i",m.CAPTION="c",m.TIMED_TEXT="tt",m.KEY="k",m.OTHER="o"})(T||(T={}));var R;(function(m){m.DASH="d",m.HLS="h",m.SMOOTH="s",m.OTHER="o"})(R||(R={}));var P;(function(m){m.VOD="v",m.LIVE="l"})(P||(P={}))},"./src/types/level.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"HlsSkip",function(){return R}),I.d(B,"getSkipValue",function(){return P}),I.d(B,"HlsUrlParameters",function(){return m}),I.d(B,"Level",function(){return t});function F(b,o){for(var u=0;u<o.length;u++){var f=o[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(b,f.key,f)}}function T(b,o,u){return o&&F(b.prototype,o),u&&F(b,u),b}var R;(function(b){b.No="",b.Yes="YES",b.v2="v2"})(R||(R={}));function P(b,o){var u=b.canSkipUntil,f=b.canSkipDateRanges,a=b.endSN,i=o!==void 0?o-a:0;return u&&i<u?f?R.v2:R.Yes:R.No}var m=function(){function b(u,f,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=f,this.skip=a}var o=b.prototype;return o.addDirectives=function(f){var a=new self.URL(f);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},b}(),t=function(){function b(o){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=[o.url],this.attrs=o.attrs,this.bitrate=o.bitrate,o.details&&(this.details=o.details),this.id=o.id||0,this.name=o.name,this.width=o.width||0,this.height=o.height||0,this.audioCodec=o.audioCodec,this.videoCodec=o.videoCodec,this.unknownCodecs=o.unknownCodecs,this.codecSet=[o.videoCodec,o.audioCodec].filter(function(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return T(b,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(u){var f=u%this.url.length;this._urlId!==f&&(this.details=void 0,this._urlId=f)}}]),b}()},"./src/types/loader.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"PlaylistContextType",function(){return F}),I.d(B,"PlaylistLevelType",function(){return T});var F;(function(R){R.MANIFEST="manifest",R.LEVEL="level",R.AUDIO_TRACK="audioTrack",R.SUBTITLE_TRACK="subtitleTrack"})(F||(F={}));var T;(function(R){R.MAIN="main",R.AUDIO="audio",R.SUBTITLE="subtitle"})(T||(T={}))},"./src/types/transmuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"ChunkMetadata",function(){return F});var F=function(P,m,t,b,o,u){b===void 0&&(b=0),o===void 0&&(o=-1),u===void 0&&(u=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=T(),this.buffering={audio:T(),video:T(),audiovideo:T()},this.level=P,this.sn=m,this.id=t,this.size=b,this.part=o,this.partial=u};function T(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"AttrList",function(){return R});var F=/^(\d+)x(\d+)$/,T=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,R=function(){function P(t){typeof t=="string"&&(t=P.parseAttrList(t));for(var b in t)t.hasOwnProperty(b)&&(this[b]=t[b])}var m=P.prototype;return m.decimalInteger=function(b){var o=parseInt(this[b],10);return o>Number.MAX_SAFE_INTEGER?Infinity:o},m.hexadecimalInteger=function(b){if(this[b]){var o=(this[b]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var u=new Uint8Array(o.length/2),f=0;f<o.length/2;f++)u[f]=parseInt(o.slice(f*2,f*2+2),16);return u}else return null},m.hexadecimalIntegerAsNumber=function(b){var o=parseInt(this[b],16);return o>Number.MAX_SAFE_INTEGER?Infinity:o},m.decimalFloatingPoint=function(b){return parseFloat(this[b])},m.optionalFloat=function(b,o){var u=this[b];return u?parseFloat(u):o},m.enumeratedString=function(b){return this[b]},m.bool=function(b){return this[b]==="YES"},m.decimalResolution=function(b){var o=F.exec(this[b]);return o===null?void 0:{width:parseInt(o[1],10),height:parseInt(o[2],10)}},P.parseAttrList=function(b){var o,u={},f='"';for(T.lastIndex=0;(o=T.exec(b))!==null;){var a=o[2];a.indexOf(f)===0&&a.lastIndexOf(f)===a.length-1&&(a=a.slice(1,-1)),u[o[1]]=a}return u},P}()},"./src/utils/binary-search.ts":function(Y,B,I){"use strict";I.r(B);var F={search:function(R,P){for(var m=0,t=R.length-1,b=null,o=null;m<=t;){b=(m+t)/2|0,o=R[b];var u=P(o);if(u>0)m=b+1;else if(u<0)t=b-1;else return o}return null}};B.default=F},"./src/utils/buffer-helper.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"BufferHelper",function(){return R});var F=I("./src/utils/logger.ts"),T={length:0,start:function(){return 0},end:function(){return 0}},R=function(){function P(){}return P.isBuffered=function(t,b){try{if(t){for(var o=P.getBuffered(t),u=0;u<o.length;u++)if(b>=o.start(u)&&b<=o.end(u))return!0}}catch(f){}return!1},P.bufferInfo=function(t,b,o){try{if(t){var u=P.getBuffered(t),f=[],a;for(a=0;a<u.length;a++)f.push({start:u.start(a),end:u.end(a)});return this.bufferedInfo(f,b,o)}}catch(i){}return{len:0,start:b,end:b,nextStart:void 0}},P.bufferedInfo=function(t,b,o){b=Math.max(0,b),t.sort(function(C,k){var w=C.start-k.start;return w||k.end-C.end});var u=[];if(o)for(var f=0;f<t.length;f++){var a=u.length;if(a){var i=u[a-1].end;t[f].start-i<o?t[f].end>i&&(u[a-1].end=t[f].end):u.push(t[f])}else u.push(t[f])}else u=t;for(var d=0,s,n=b,l=b,c=0;c<u.length;c++){var x=u[c].start,A=u[c].end;if(b+o>=x&&b<A)n=x,l=A,d=l-b;else if(b+o<x){s=x;break}}return{len:d,start:n||0,end:l||0,nextStart:s}},P.getBuffered=function(t){try{return t.buffered}catch(b){return F.logger.log("failed to get media.buffered",b),T}},P}()},"./src/utils/cea-608-parser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"Row",function(){return l}),I.d(B,"CaptionScreen",function(){return c});var F=I("./src/utils/logger.ts"),T={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},R=function(h){var p=h;return T.hasOwnProperty(h)&&(p=T[h]),String.fromCharCode(p)},P=15,m=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},b={17:2,18:4,21:6,22:8,23:10,19:13,20:15},o={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},f=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(y){y[y.ERROR=0]="ERROR",y[y.TEXT=1]="TEXT",y[y.WARNING=2]="WARNING",y[y.INFO=2]="INFO",y[y.DEBUG=3]="DEBUG",y[y.DATA=3]="DATA"})(a||(a={}));var i=function(){function y(){this.time=null,this.verboseLevel=a.ERROR}var h=y.prototype;return h.log=function(v,_){this.verboseLevel>=v&&F.logger.log(this.time+" ["+v+"] "+_)},y}(),d=function(h){for(var p=[],v=0;v<h.length;v++)p.push(h[v].toString(16));return p},s=function(){function y(p,v,_,E,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=p||"white",this.underline=v||!1,this.italics=_||!1,this.background=E||"black",this.flash=g||!1}var h=y.prototype;return h.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},h.setStyles=function(v){for(var _=["foreground","underline","italics","background","flash"],E=0;E<_.length;E++){var g=_[E];v.hasOwnProperty(g)&&(this[g]=v[g])}},h.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},h.equals=function(v){return this.foreground===v.foreground&&this.underline===v.underline&&this.italics===v.italics&&this.background===v.background&&this.flash===v.flash},h.copy=function(v){this.foreground=v.foreground,this.underline=v.underline,this.italics=v.italics,this.background=v.background,this.flash=v.flash},h.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},y}(),n=function(){function y(p,v,_,E,g,j){this.uchar=void 0,this.penState=void 0,this.uchar=p||" ",this.penState=new s(v,_,E,g,j)}var h=y.prototype;return h.reset=function(){this.uchar=" ",this.penState.reset()},h.setChar=function(v,_){this.uchar=v,this.penState.copy(_)},h.setPenState=function(v){this.penState.copy(v)},h.equals=function(v){return this.uchar===v.uchar&&this.penState.equals(v.penState)},h.copy=function(v){this.uchar=v.uchar,this.penState.copy(v.penState)},h.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},y}(),l=function(){function y(p){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var v=0;v<m;v++)this.chars.push(new n);this.logger=p,this.pos=0,this.currPenState=new s}var h=y.prototype;return h.equals=function(v){for(var _=!0,E=0;E<m;E++)if(!this.chars[E].equals(v.chars[E])){_=!1;break}return _},h.copy=function(v){for(var _=0;_<m;_++)this.chars[_].copy(v.chars[_])},h.isEmpty=function(){for(var v=!0,_=0;_<m;_++)if(!this.chars[_].isEmpty()){v=!1;break}return v},h.setCursor=function(v){this.pos!==v&&(this.pos=v),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>m&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=m)},h.moveCursor=function(v){var _=this.pos+v;if(v>1)for(var E=this.pos+1;E<_+1;E++)this.chars[E].setPenState(this.currPenState);this.setCursor(_)},h.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},h.insertChar=function(v){v>=144&&this.backSpace();var _=R(v);if(this.pos>=m){this.logger.log(a.ERROR,"Cannot insert "+v.toString(16)+" ("+_+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(_,this.currPenState),this.moveCursor(1)},h.clearFromPos=function(v){var _;for(_=v;_<m;_++)this.chars[_].reset()},h.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},h.clearToEndOfRow=function(){this.clearFromPos(this.pos)},h.getTextString=function(){for(var v=[],_=!0,E=0;E<m;E++){var g=this.chars[E].uchar;g!==" "&&(_=!1),v.push(g)}return _?"":v.join("")},h.setPenStyles=function(v){this.currPenState.setStyles(v);var _=this.chars[this.pos];_.setPenState(this.currPenState)},y}(),c=function(){function y(p){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var v=0;v<P;v++)this.rows.push(new l(p));this.logger=p,this.currRow=P-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var h=y.prototype;return h.reset=function(){for(var v=0;v<P;v++)this.rows[v].clear();this.currRow=P-1},h.equals=function(v){for(var _=!0,E=0;E<P;E++)if(!this.rows[E].equals(v.rows[E])){_=!1;break}return _},h.copy=function(v){for(var _=0;_<P;_++)this.rows[_].copy(v.rows[_])},h.isEmpty=function(){for(var v=!0,_=0;_<P;_++)if(!this.rows[_].isEmpty()){v=!1;break}return v},h.backSpace=function(){var v=this.rows[this.currRow];v.backSpace()},h.clearToEndOfRow=function(){var v=this.rows[this.currRow];v.clearToEndOfRow()},h.insertChar=function(v){var _=this.rows[this.currRow];_.insertChar(v)},h.setPen=function(v){var _=this.rows[this.currRow];_.setPenStyles(v)},h.moveCursor=function(v){var _=this.rows[this.currRow];_.moveCursor(v)},h.setCursor=function(v){this.logger.log(a.INFO,"setCursor: "+v);var _=this.rows[this.currRow];_.setCursor(v)},h.setPAC=function(v){this.logger.log(a.INFO,"pacData = "+JSON.stringify(v));var _=v.row-1;if(this.nrRollUpRows&&_<this.nrRollUpRows-1&&(_=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==_){for(var E=0;E<P;E++)this.rows[E].clear();var g=this.currRow+1-this.nrRollUpRows,j=this.lastOutputScreen;if(j){var U=j.rows[g].cueStartTime,S=this.logger.time;if(U&&S!==null&&U<S)for(var z=0;z<this.nrRollUpRows;z++)this.rows[_-this.nrRollUpRows+z+1].copy(j.rows[g+z])}}this.currRow=_;var H=this.rows[this.currRow];if(v.indent!==null){var M=v.indent,V=Math.max(M-1,0);H.setCursor(v.indent),v.color=H.chars[V].penState.foreground}var K={foreground:v.color,underline:v.underline,italics:v.italics,background:"black",flash:!1};this.setPen(K)},h.setBkgData=function(v){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(v)),this.backSpace(),this.setPen(v),this.insertChar(32)},h.setRollUpRows=function(v){this.nrRollUpRows=v},h.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var v=this.currRow+1-this.nrRollUpRows,_=this.rows.splice(v,1)[0];_.clear(),this.rows.splice(this.currRow,0,_),this.logger.log(a.INFO,"Rolling up")},h.getDisplayText=function(v){v=v||!1;for(var _=[],E="",g=-1,j=0;j<P;j++){var U=this.rows[j].getTextString();U&&(g=j+1,v?_.push("Row "+g+": '"+U+"'"):_.push(U.trim()))}return _.length>0&&(v?E="["+_.join(" | ")+"]":E=_.join(`
`)),E},h.getTextAndFormat=function(){return this.rows},y}(),x=function(){function y(p,v,_){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=p,this.outputFilter=v,this.mode=null,this.verbose=0,this.displayedMemory=new c(_),this.nonDisplayedMemory=new c(_),this.lastOutputScreen=new c(_),this.currRollUpRow=this.displayedMemory.rows[P-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=_}var h=y.prototype;return h.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[P-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},h.getHandler=function(){return this.outputFilter},h.setHandler=function(v){this.outputFilter=v},h.setPAC=function(v){this.writeScreen.setPAC(v)},h.setBkgData=function(v){this.writeScreen.setBkgData(v)},h.setMode=function(v){if(v===this.mode)return;this.mode=v,this.logger.log(a.INFO,"MODE="+v),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=v},h.insertChars=function(v){for(var _=0;_<v.length;_++)this.writeScreen.insertChar(v[_]);var E=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,E+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},h.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},h.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},h.ccAOF=function(){},h.ccAON=function(){},h.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},h.ccRU=function(v){this.logger.log(a.INFO,"RU("+v+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(v)},h.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},h.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},h.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},h.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},h.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},h.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},h.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},h.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var v=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=v,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},h.ccTO=function(v){this.logger.log(a.INFO,"TO("+v+") - Tab Offset"),this.writeScreen.moveCursor(v)},h.ccMIDROW=function(v){var _={flash:!1};if(_.underline=v%2===1,_.italics=v>=46,_.italics)_.foreground="white";else{var E=Math.floor(v/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];_.foreground=g[E]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(_)),this.writeScreen.setPen(_)},h.outputDataUpdate=function(v){v===void 0&&(v=!1);var _=this.logger.time;if(_===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=_:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,_,this.lastOutputScreen),v&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:_),this.lastOutputScreen.copy(this.displayedMemory))},h.cueSplitAtTime=function(v){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,v,this.displayedMemory),this.cueStartTime=v))},y}(),A=function(){function y(p,v,_){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var E=new i;this.channels=[null,new x(p,v,E),new x(p+1,_,E)],this.cmdHistory=w(),this.logger=E}var h=y.prototype;return h.getHandler=function(v){return this.channels[v].getHandler()},h.setHandler=function(v,_){this.channels[v].setHandler(_)},h.addData=function(v,_){var E,g,j,U=!1;this.logger.time=v;for(var S=0;S<_.length;S+=2){if(g=_[S]&127,j=_[S+1]&127,g===0&&j===0)continue;if(this.logger.log(a.DATA,"["+d([_[S],_[S+1]])+"] -> ("+d([g,j])+")"),E=this.parseCmd(g,j),E||(E=this.parseMidrow(g,j)),E||(E=this.parsePAC(g,j)),E||(E=this.parseBackgroundAttributes(g,j)),!E&&(U=this.parseChars(g,j),U)){var z=this.currentChannel;if(z&&z>0){var H=this.channels[z];H.insertChars(U)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!E&&!U&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+d([g,j])+" orig: "+d([_[S],_[S+1]]))}},h.parseCmd=function(v,_){var E=this.cmdHistory,g=(v===20||v===28||v===21||v===29)&&_>=32&&_<=47,j=(v===23||v===31)&&_>=33&&_<=35;if(!(g||j))return!1;if(k(v,_,E))return C(null,null,E),this.logger.log(a.DEBUG,"Repeated command ("+d([v,_])+") is dropped"),!0;var U=v===20||v===21||v===23?1:2,S=this.channels[U];return v===20||v===21||v===28||v===29?_===32?S.ccRCL():_===33?S.ccBS():_===34?S.ccAOF():_===35?S.ccAON():_===36?S.ccDER():_===37?S.ccRU(2):_===38?S.ccRU(3):_===39?S.ccRU(4):_===40?S.ccFON():_===41?S.ccRDC():_===42?S.ccTR():_===43?S.ccRTD():_===44?S.ccEDM():_===45?S.ccCR():_===46?S.ccENM():_===47&&S.ccEOC():S.ccTO(_-32),C(v,_,E),this.currentChannel=U,!0},h.parseMidrow=function(v,_){var E=0;if((v===17||v===25)&&_>=32&&_<=47){if(v===17?E=1:E=2,E!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[E];return g?(g.ccMIDROW(_),this.logger.log(a.DEBUG,"MIDROW ("+d([v,_])+")"),!0):!1}return!1},h.parsePAC=function(v,_){var E,g=this.cmdHistory,j=(v>=17&&v<=23||v>=25&&v<=31)&&_>=64&&_<=127,U=(v===16||v===24)&&_>=64&&_<=95;if(!(j||U))return!1;if(k(v,_,g))return C(null,null,g),!0;var S=v<=23?1:2;_>=64&&_<=95?E=S===1?t[v]:o[v]:E=S===1?b[v]:u[v];var z=this.channels[S];return z?(z.setPAC(this.interpretPAC(E,_)),C(v,_,g),this.currentChannel=S,!0):!1},h.interpretPAC=function(v,_){var E,g={color:null,italics:!1,indent:null,underline:!1,row:v};return _>95?E=_-96:E=_-64,g.underline=(E&1)===1,E<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(E/2)]:E<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((E-16)/2)*4,g},h.parseChars=function(v,_){var E,g=null,j=null;if(v>=25?(E=2,j=v-8):(E=1,j=v),j>=17&&j<=19){var U;j===17?U=_+80:j===18?U=_+112:U=_+144,this.logger.log(a.INFO,"Special char '"+R(U)+"' in channel "+E),g=[U]}else v>=32&&v<=127&&(g=_===0?[v]:[v,_]);if(g){var S=d(g);this.logger.log(a.DEBUG,"Char codes = "+S.join(",")),C(v,_,this.cmdHistory)}return g},h.parseBackgroundAttributes=function(v,_){var E=(v===16||v===24)&&_>=32&&_<=47,g=(v===23||v===31)&&_>=45&&_<=47;if(!(E||g))return!1;var j,U={};v===16||v===24?(j=Math.floor((_-32)/2),U.background=f[j],_%2===1&&(U.background=U.background+"_semi")):_===45?U.background="transparent":(U.foreground="black",_===47&&(U.underline=!0));var S=v<=23?1:2,z=this.channels[S];return z.setBkgData(U),C(v,_,this.cmdHistory),!0},h.reset=function(){for(var v=0;v<Object.keys(this.channels).length;v++){var _=this.channels[v];_&&_.reset()}this.cmdHistory=w()},h.cueSplitAtTime=function(v){for(var _=0;_<this.channels.length;_++){var E=this.channels[_];E&&E.cueSplitAtTime(v)}},y}();function C(y,h,p){p.a=y,p.b=h}function k(y,h,p){return p.a===y&&p.b===h}function w(){return{a:null,b:null}}B.default=A},"./src/utils/codecs.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"isCodecType",function(){return T}),I.d(B,"isCodecSupportedInMp4",function(){return R});var F={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 T(P,m){var t=F[m];return!!t&&t[P.slice(0,4)]===!0}function R(P,m){return MediaSource.isTypeSupported((m||"video")+'/mp4;codecs="'+P+'"')}},"./src/utils/cues.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/vttparser.ts"),T=I("./src/utils/webvtt-parser.ts"),R=I("./src/utils/texttrack-utils.ts"),P=/\s/,m={newCue:function(b,o,u,f){for(var a=[],i,d,s,n,l,c=self.VTTCue||self.TextTrackCue,x=0;x<f.rows.length;x++)if(i=f.rows[x],s=!0,n=0,l="",!i.isEmpty()){for(var A=0;A<i.chars.length;A++)P.test(i.chars[A].uchar)&&s?n++:(l+=i.chars[A].uchar,s=!1);i.cueStartTime=o,o===u&&(u+=1e-4),n>=16?n--:n++;var C=Object(F.fixLineBreaks)(l.trim()),k=Object(T.generateCueId)(o,u,C);(!b||!b.cues||!b.cues.getCueById(k))&&(d=new c(o,u,C),d.id=k,d.line=x+1,d.align="left",d.position=10+Math.min(80,Math.floor(n*8/32)*10),a.push(d))}return b&&a.length&&(a.sort(function(w,y){return w.line==="auto"||y.line==="auto"?0:w.line>8&&y.line>8?y.line-w.line:w.line-y.line}),a.forEach(function(w){return Object(R.addCueToTrack)(b,w)})),a}};B.default=m},"./src/utils/discontinuities.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"findFirstFragWithCC",function(){return P}),I.d(B,"shouldAlignOnDiscontinuities",function(){return m}),I.d(B,"findDiscontinuousReferenceFrag",function(){return t}),I.d(B,"adjustSlidingStart",function(){return o}),I.d(B,"alignStream",function(){return u}),I.d(B,"alignPDT",function(){return a}),I.d(B,"alignFragmentByPDTDelta",function(){return i}),I.d(B,"alignMediaPlaylistByPDT",function(){return d});var F=I("./src/polyfills/number.ts"),T=I("./src/utils/logger.ts"),R=I("./src/controller/level-helper.ts");function P(s,n){for(var l=null,c=0,x=s.length;c<x;c++){var A=s[c];if(A&&A.cc===n){l=A;break}}return l}function m(s,n,l){return!!(n.details&&(l.endCC>l.startCC||s&&s.cc<l.startCC))}function t(s,n){var l=s.fragments,c=n.fragments;if(!c.length||!l.length){T.logger.log("No fragments to align");return}var x=P(l,c[0].cc);if(!x||x&&!x.startPTS){T.logger.log("No frag in previous level to align on");return}return x}function b(s,n){if(s){var l=s.start+n;s.start=s.startPTS=l,s.endPTS=l+s.duration}}function o(s,n){for(var l=n.fragments,c=0,x=l.length;c<x;c++)b(l[c],s);n.fragmentHint&&b(n.fragmentHint,s),n.alignedSliding=!0}function u(s,n,l){if(!n)return;f(s,l,n),!l.alignedSliding&&n.details&&a(l,n.details),!l.alignedSliding&&n.details&&!l.skippedSegments&&Object(R.adjustSliding)(n.details,l)}function f(s,n,l){if(m(s,l,n)){var c=t(l.details,n);c&&Object(F.isFiniteNumber)(c.start)&&(T.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),o(c.start,n))}}function a(s,n){if(!n.fragments.length||!s.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=s.fragments[0].programDateTime,x=(c-l)/1e3+n.fragments[0].start;x&&Object(F.isFiniteNumber)(x)&&(T.logger.log("Adjusting PTS using programDateTime delta "+(c-l)+"ms, sliding:"+x.toFixed(3)+" "+s.url+" "),o(x,s))}function i(s,n){var l=s.programDateTime;if(!l)return;var c=(l-n)/1e3;s.start=s.startPTS=c,s.endPTS=c+s.duration}function d(s,n){if(!n.fragments.length||!s.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=n.fragments[0].start,x=l-c*1e3;s.fragments.forEach(function(A){i(A,x)}),s.fragmentHint&&i(s.fragmentHint,x),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/ewma.ts"),T=function(){function R(m,t,b){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=b,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new F.default(m),this.fast_=new F.default(t)}var P=R.prototype;return P.update=function(t,b){var o=this.slow_,u=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new F.default(t,o.getEstimate(),o.getTotalWeight())),this.fast_.halfLife!==b&&(this.fast_=new F.default(b,u.getEstimate(),u.getTotalWeight()))},P.sample=function(t,b){t=Math.max(t,this.minDelayMs_);var o=8*b,u=t/1e3,f=o/u;this.fast_.sample(u,f),this.slow_.sample(u,f)},P.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},P.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},P.destroy=function(){},R}();B.default=T},"./src/utils/ewma.ts":function(Y,B,I){"use strict";I.r(B);var F=function(){function T(P,m,t){m===void 0&&(m=0),t===void 0&&(t=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=P,this.alpha_=P?Math.exp(Math.log(.5)/P):0,this.estimate_=m,this.totalWeight_=t}var R=T.prototype;return R.sample=function(m,t){var b=Math.pow(this.alpha_,m);this.estimate_=t*(1-b)+b*this.estimate_,this.totalWeight_+=m},R.getTotalWeight=function(){return this.totalWeight_},R.getEstimate=function(){if(this.alpha_){var m=1-Math.pow(this.alpha_,this.totalWeight_);if(m)return this.estimate_/m}return this.estimate_},T}();B.default=F},"./src/utils/fetch-loader.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"fetchSupported",function(){return i});var F=I("./src/polyfills/number.ts"),T=I("./src/loader/load-stats.ts"),R=I("./src/demux/chunk-cache.ts");function P(c,x){c.prototype=Object.create(x.prototype),c.prototype.constructor=c,u(c,x)}function m(c){var x=typeof Map=="function"?new Map:void 0;return m=function(C){if(C===null||!o(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(typeof x!="undefined"){if(x.has(C))return x.get(C);x.set(C,k)}function k(){return t(C,arguments,f(this).constructor)}return k.prototype=Object.create(C.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),u(k,C)},m(c)}function t(c,x,A){return b()?t=Reflect.construct:t=function(k,w,y){var h=[null];h.push.apply(h,w);var p=Function.bind.apply(k,h),v=new p;return y&&u(v,y.prototype),v},t.apply(null,arguments)}function b(){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(c){return!1}}function o(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function u(c,x){return u=Object.setPrototypeOf||function(C,k){return C.__proto__=k,C},u(c,x)}function f(c){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},f(c)}function a(){return a=Object.assign||function(c){for(var x=1;x<arguments.length;x++){var A=arguments[x];for(var C in A)Object.prototype.hasOwnProperty.call(A,C)&&(c[C]=A[C])}return c},a.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(c){}return!1}var d=function(){function c(A){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=A.fetchSetup||n,this.controller=new self.AbortController,this.stats=new T.LoadStats}var x=c.prototype;return x.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},x.abortInternal=function(){var C=this.response;(!C||!C.ok)&&(this.stats.aborted=!0,this.controller.abort())},x.abort=function(){var C;this.abortInternal(),(C=this.callbacks)!==null&&C!==void 0&&C.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},x.load=function(C,k,w){var y=this,h=this.stats;if(h.loading.start)throw new Error("Loader can only be used once.");h.loading.start=self.performance.now();var p=s(C,this.controller.signal),v=w.onProgress,_=C.responseType==="arraybuffer",E=_?"byteLength":"length";this.context=C,this.config=k,this.callbacks=w,this.request=this.fetchSetup(C,p),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){y.abortInternal(),w.onTimeout(h,C,y.response)},k.timeout),self.fetch(this.request).then(function(g){if(y.response=y.loader=g,!g.ok){var j=g.status,U=g.statusText;throw new l(U||"fetch, bad network response",j,g)}return h.loading.first=Math.max(self.performance.now(),h.loading.start),h.total=parseInt(g.headers.get("Content-Length")||"0"),v&&Object(F.isFiniteNumber)(k.highWaterMark)?y.loadProgressively(g,h,C,k.highWaterMark,v):_?g.arrayBuffer():g.text()}).then(function(g){var j=y.response;self.clearTimeout(y.requestTimeout),h.loading.end=Math.max(self.performance.now(),h.loading.first),h.loaded=h.total=g[E];var U={url:j.url,data:g};v&&!Object(F.isFiniteNumber)(k.highWaterMark)&&v(h,C,g,j),w.onSuccess(U,h,C,j)}).catch(function(g){if(self.clearTimeout(y.requestTimeout),h.aborted)return;var j=g.code||0;w.onError({code:j,text:g.message},C,g.details)})},x.getCacheAge=function(){var C=null;if(this.response){var k=this.response.headers.get("age");C=k?parseFloat(k):null}return C},x.loadProgressively=function(C,k,w,y,h){y===void 0&&(y=0);var p=new R.default,v=C.body.getReader(),_=function E(){return v.read().then(function(g){if(g.done)return p.dataLength&&h(k,w,p.flush(),C),Promise.resolve(new ArrayBuffer(0));var j=g.value,U=j.length;return k.loaded+=U,U<y||p.dataLength?(p.push(j),p.dataLength>=y&&h(k,w,p.flush(),C)):h(k,w,j,C),E()}).catch(function(){return Promise.reject()})};return _()},c}();function s(c,x){var A={method:"GET",mode:"cors",credentials:"same-origin",signal:x,headers:new self.Headers(a({},c.headers))};return c.rangeEnd&&A.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),A}function n(c,x){return new self.Request(c.url,x)}var l=function(c){P(x,c);function x(A,C,k){var w;return w=c.call(this,A)||this,w.code=void 0,w.details=void 0,w.code=C,w.details=k,w}return x}(m(Error));B.default=d},"./src/utils/imsc1-ttml-parser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"IMSC1_CODEC",function(){return o}),I.d(B,"parseIMSC1",function(){return i});var F=I("./src/utils/mp4-tools.ts"),T=I("./src/utils/vttparser.ts"),R=I("./src/utils/vttcue.ts"),P=I("./src/demux/id3.ts"),m=I("./src/utils/timescale-conversion.ts"),t=I("./src/utils/webvtt-parser.ts");function b(){return b=Object.assign||function(y){for(var h=1;h<arguments.length;h++){var p=arguments[h];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(y[v]=p[v])}return y},b.apply(this,arguments)}var o="stpp.ttml.im1t",u=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(y,h,p,v,_){var E=Object(F.findBox)(new Uint8Array(y),["mdat"]);if(E.length===0){_(new Error("Could not parse IMSC1 mdat"));return}var g=E[0],j=Object(P.utf8ArrayToStr)(new Uint8Array(y,g.start,g.end-g.start)),U=Object(m.toTimescaleFromScale)(h,1,p);try{v(d(j,U))}catch(S){_(S)}}function d(y,h){var p=new DOMParser,v=p.parseFromString(y,"text/xml"),_=v.getElementsByTagName("tt")[0];if(!_)throw new Error("Invalid ttml");var E={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(E).reduce(function(H,M){return H[M]=_.getAttribute("ttp:"+M)||E[M],H},{}),j=_.getAttribute("xml:space")!=="preserve",U=n(s(_,"styling","style")),S=n(s(_,"layout","region")),z=s(_,"body","[begin]");return[].map.call(z,function(H){var M=l(H,j);if(!M||!H.hasAttribute("begin"))return null;var V=C(H.getAttribute("begin"),g),K=C(H.getAttribute("dur"),g),$=C(H.getAttribute("end"),g);if(V===null)throw A(H);if($===null){if(K===null)throw A(H);$=V+K}var Z=new R.default(V-h,$-h,M);Z.id=Object(t.generateCueId)(Z.startTime,Z.endTime,Z.text);var me=S[H.getAttribute("region")],oe=U[H.getAttribute("style")];Z.position=10,Z.size=80;var fe=c(me,oe),ye=fe.textAlign;if(ye){var Ie=a[ye];Ie&&(Z.lineAlign=Ie),Z.align=ye}return b(Z,fe),Z}).filter(function(H){return H!==null})}function s(y,h,p){var v=y.getElementsByTagName(h)[0];return v?[].slice.call(v.querySelectorAll(p)):[]}function n(y){return y.reduce(function(h,p){var v=p.getAttribute("xml:id");return v&&(h[v]=p),h},{})}function l(y,h){return[].slice.call(y.childNodes).reduce(function(p,v,_){var E;return v.nodeName==="br"&&_?p+`
`:(E=v.childNodes)!==null&&E!==void 0&&E.length?l(v,h):h?p+v.textContent.trim().replace(/\s+/g," "):p+v.textContent},"")}function c(y,h){var p="http://www.w3.org/ns/ttml#styling",v=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return v.reduce(function(_,E){var g=x(h,p,E)||x(y,p,E);return g&&(_[E]=g),_},{})}function x(y,h,p){return y.hasAttributeNS(h,p)?y.getAttributeNS(h,p):null}function A(y){return new Error("Could not parse ttml timestamp "+y)}function C(y,h){if(!y)return null;var p=Object(T.parseTimeStamp)(y);return p===null&&(u.test(y)?p=k(y,h):f.test(y)&&(p=w(y,h))),p}function k(y,h){var p=u.exec(y),v=(p[4]|0)+(p[5]|0)/h.subFrameRate;return(p[1]|0)*3600+(p[2]|0)*60+(p[3]|0)+v/h.frameRate}function w(y,h){var p=f.exec(y),v=Number(p[1]),_=p[2];switch(_){case"h":return v*3600;case"m":return v*60;case"ms":return v*1e3;case"f":return v/h.frameRate;case"t":return v/h.tickRate}return v}},"./src/utils/logger.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"enableLogs",function(){return t}),I.d(B,"logger",function(){return b});var F=function(){},T={trace:F,debug:F,log:F,warn:F,info:F,error:F},R=T;function P(o){var u=self.console[o];return u?u.bind(self.console,"["+o+"] >"):F}function m(o){for(var u=arguments.length,f=new Array(u>1?u-1:0),a=1;a<u;a++)f[a-1]=arguments[a];f.forEach(function(i){R[i]=o[i]?o[i].bind(o):P(i)})}function t(o){if(self.console&&o===!0||typeof o=="object"){m(o,"debug","log","info","warn","error");try{R.log()}catch(u){R=T}}else R=T}var b=R},"./src/utils/mediakeys-helper.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"KeySystems",function(){return F}),I.d(B,"requestMediaKeySystemAccess",function(){return T});var F;(function(R){R.WIDEVINE="com.widevine.alpha",R.PLAYREADY="com.microsoft.playready"})(F||(F={}));var T=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"getMediaSource",function(){return F});function F(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"bin2str",function(){return m}),I.d(B,"readUint16",function(){return t}),I.d(B,"readUint32",function(){return b}),I.d(B,"writeUint32",function(){return o}),I.d(B,"findBox",function(){return u}),I.d(B,"parseSegmentIndex",function(){return f}),I.d(B,"parseInitSegment",function(){return a}),I.d(B,"getStartDTS",function(){return i}),I.d(B,"getDuration",function(){return d}),I.d(B,"computeRawDurationFromSamples",function(){return s}),I.d(B,"offsetStartDTS",function(){return n}),I.d(B,"segmentValidRange",function(){return l}),I.d(B,"appendUint8Array",function(){return c});var F=I("./src/utils/typed-array.ts"),T=I("./src/loader/fragment.ts"),R=Math.pow(2,32)-1,P=[].push;function m(x){return String.fromCharCode.apply(null,x)}function t(x,A){"data"in x&&(A+=x.start,x=x.data);var C=x[A]<<8|x[A+1];return C<0?65536+C:C}function b(x,A){"data"in x&&(A+=x.start,x=x.data);var C=x[A]<<24|x[A+1]<<16|x[A+2]<<8|x[A+3];return C<0?4294967296+C:C}function o(x,A,C){"data"in x&&(A+=x.start,x=x.data),x[A]=C>>24,x[A+1]=C>>16&255,x[A+2]=C>>8&255,x[A+3]=C&255}function u(x,A){var C=[];if(!A.length)return C;var k,w,y;"data"in x?(k=x.data,w=x.start,y=x.end):(k=x,w=0,y=k.byteLength);for(var h=w;h<y;){var p=b(k,h),v=m(k.subarray(h+4,h+8)),_=p>1?h+p:y;if(v===A[0])if(A.length===1)C.push({data:k,start:h+8,end:_});else{var E=u({data:k,start:h+8,end:_},A.slice(1));E.length&&P.apply(C,E)}h=_}return C}function f(x){var A=u(x,["moov"]),C=A[0],k=C?C.end:null,w=u(x,["sidx"]);if(!w||!w[0])return null;var y=[],h=w[0],p=h.data[0],v=p===0?8:16,_=b(h,v);v+=4;var E=0,g=0;p===0?v+=8:v+=16,v+=2;var j=h.end+g,U=t(h,v);v+=2;for(var S=0;S<U;S++){var z=v,H=b(h,z);z+=4;var M=H&2147483647,V=(H&2147483648)>>>31;if(V===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var K=b(h,z);z+=4,y.push({referenceSize:M,subsegmentDuration:K,info:{duration:K/_,start:j,end:j+M-1}}),j+=M,z+=4,v=z}return{earliestPresentationTime:E,timescale:_,version:p,referencesCount:U,references:y,moovEndOffset:k}}function a(x){for(var A=[],C=u(x,["moov","trak"]),k=0;k<C.length;k++){var w=C[k],y=u(w,["tkhd"])[0];if(y){var h=y.data[y.start],p=h===0?12:20,v=b(y,p),_=u(w,["mdia","mdhd"])[0];if(_){h=_.data[_.start],p=h===0?12:20;var E=b(_,p),g=u(w,["mdia","hdlr"])[0];if(g){var j=m(g.data.subarray(g.start+8,g.start+12)),U={soun:T.ElementaryStreamTypes.AUDIO,vide:T.ElementaryStreamTypes.VIDEO}[j];if(U){var S=u(w,["mdia","minf","stbl","stsd"])[0],z=void 0;S&&(z=m(S.data.subarray(S.start+12,S.start+16))),A[v]={timescale:E,type:U},A[U]={timescale:E,id:v,codec:z}}}}}}var H=u(x,["moov","mvex","trex"]);return H.forEach(function(M){var V=b(M,4),K=A[V];K&&(K.default={duration:b(M,12),flags:b(M,20)})}),A}function i(x,A){return u(A,["moof","traf"]).reduce(function(C,k){var w=u(k,["tfdt"])[0],y=w.data[w.start],h=u(k,["tfhd"]).reduce(function(p,v){var _=b(v,4),E=x[_];if(E){var g=b(w,4);y===1&&(g*=Math.pow(2,32),g+=b(w,8));var j=E.timescale||9e4,U=g/j;if(isFinite(U)&&(p===null||U<p))return U}return p},null);return h!==null&&isFinite(h)&&(C===null||h<C)?h:C},null)||0}function d(x,A){for(var C=0,k=0,w=0,y=u(x,["moof","traf"]),h=0;h<y.length;h++){var p=y[h],v=u(p,["tfhd"])[0],_=b(v,4),E=A[_];if(!E)continue;var g=E.default,j=b(v,0)|(g==null?void 0:g.flags),U=g==null?void 0:g.duration;j&8&&(j&2?U=b(v,12):U=b(v,8));for(var S=E.timescale||9e4,z=u(p,["trun"]),H=0;H<z.length;H++){if(U){var M=b(z[H],4);C=U*M}else C=s(z[H]);E.type===T.ElementaryStreamTypes.VIDEO?k+=C/S:E.type===T.ElementaryStreamTypes.AUDIO&&(w+=C/S)}}if(k===0&&w===0){var V=f(x);if(V!=null&&V.references)return V.references.reduce(function(K,$){return K+$.info.duration||0},0)}return k||w}function s(x){var A=b(x,0),C=8;A&1&&(C+=4),A&4&&(C+=4);for(var k=0,w=b(x,4),y=0;y<w;y++){if(A&256){var h=b(x,C);k+=h,C+=4}A&512&&(C+=4),A&1024&&(C+=4),A&2048&&(C+=4)}return k}function n(x,A,C){u(A,["moof","traf"]).forEach(function(k){u(k,["tfhd"]).forEach(function(w){var y=b(w,4),h=x[y];if(!h)return;var p=h.timescale||9e4;u(k,["tfdt"]).forEach(function(v){var _=v.data[v.start],E=b(v,4);if(_===0)o(v,4,E-C*p);else{E*=Math.pow(2,32),E+=b(v,8),E-=C*p,E=Math.max(E,0);var g=Math.floor(E/(R+1)),j=Math.floor(E%(R+1));o(v,4,g),o(v,8,j)}})})})}function l(x){var A={valid:null,remainder:null},C=u(x,["moof"]);if(C){if(C.length<2)return A.remainder=x,A}else return A;var k=C[C.length-1];return A.valid=Object(F.sliceUint8)(x,0,k.start-8),A.remainder=Object(F.sliceUint8)(x,k.start-8),A}function c(x,A){var C=new Uint8Array(x.length+A.length);return C.set(x),C.set(A,x.length),C}},"./src/utils/output-filter.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function T(P,m){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=P,this.trackName=m}var R=T.prototype;return R.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},R.newCue=function(m,t,b){(this.startTime===null||this.startTime>m)&&(this.startTime=m),this.endTime=t,this.screen=b,this.timelineController.createCaptionsTrack(this.trackName)},R.reset=function(){this.cueRanges=[]},T}()},"./src/utils/texttrack-utils.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"sendAddTrackEvent",function(){return T}),I.d(B,"addCueToTrack",function(){return R}),I.d(B,"clearCurrentCues",function(){return P}),I.d(B,"removeCuesInRange",function(){return m}),I.d(B,"getCuesInRange",function(){return b});var F=I("./src/utils/logger.ts");function T(o,u){var f;try{f=new Event("addtrack")}catch(a){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=o,u.dispatchEvent(f)}function R(o,u){var f=o.mode;if(f==="disabled"&&(o.mode="hidden"),o.cues&&!o.cues.getCueById(u.id))try{if(o.addCue(u),!o.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(i){F.logger.debug("[texttrack-utils]: "+i);var a=new self.TextTrackCue(u.startTime,u.endTime,u.text);a.id=u.id,o.addCue(a)}f==="disabled"&&(o.mode=f)}function P(o){var u=o.mode;if(u==="disabled"&&(o.mode="hidden"),o.cues)for(var f=o.cues.length;f--;)o.removeCue(o.cues[f]);u==="disabled"&&(o.mode=u)}function m(o,u,f){var a=o.mode;if(a==="disabled"&&(o.mode="hidden"),o.cues&&o.cues.length>0)for(var i=b(o.cues,u,f),d=0;d<i.length;d++)o.removeCue(i[d]);a==="disabled"&&(o.mode=a)}function t(o,u){if(u<o[0].startTime)return 0;var f=o.length-1;if(u>o[f].endTime)return-1;for(var a=0,i=f;a<=i;){var d=Math.floor((i+a)/2);if(u<o[d].startTime)i=d-1;else if(u>o[d].startTime&&a<f)a=d+1;else return d}return o[a].startTime-u<u-o[i].startTime?a:i}function b(o,u,f){var a=[],i=t(o,u);if(i>-1)for(var d=i,s=o.length;d<s;d++){var n=o[d];if(n.startTime>=u&&n.endTime<=f)a.push(n);else if(n.startTime>f)return a}return a}},"./src/utils/time-ranges.ts":function(Y,B,I){"use strict";I.r(B);var F={toString:function(R){for(var P="",m=R.length,t=0;t<m;t++)P+="["+R.start(t).toFixed(3)+","+R.end(t).toFixed(3)+"]";return P}};B.default=F},"./src/utils/timescale-conversion.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"toTimescaleFromBase",function(){return T}),I.d(B,"toTimescaleFromScale",function(){return R}),I.d(B,"toMsFromMpegTsClock",function(){return P}),I.d(B,"toMpegTsClockFromTimescale",function(){return m});var F=9e4;function T(t,b,o,u){o===void 0&&(o=1),u===void 0&&(u=!1);var f=t*b*o;return u?Math.round(f):f}function R(t,b,o,u){return o===void 0&&(o=1),u===void 0&&(u=!1),T(t,b,1/o,u)}function P(t,b){return b===void 0&&(b=!1),T(t,1e3,1/F,b)}function m(t,b){return b===void 0&&(b=1),T(t,F,1/b)}},"./src/utils/typed-array.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"sliceUint8",function(){return F});function F(T,R,P){return Uint8Array.prototype.slice?T.slice(R,P):new Uint8Array(Array.prototype.slice.call(T,R,P))}},"./src/utils/vttcue.ts":function(Y,B,I){"use strict";I.r(B),B.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var F=["","lr","rl"],T=["start","middle","end","left","right"];function R(o,u){if(typeof u!="string")return!1;if(!Array.isArray(o))return!1;var f=u.toLowerCase();return~o.indexOf(f)?f:!1}function P(o){return R(F,o)}function m(o){return R(T,o)}function t(o){for(var u=arguments.length,f=new Array(u>1?u-1:0),a=1;a<u;a++)f[a-1]=arguments[a];for(var i=1;i<arguments.length;i++){var d=arguments[i];for(var s in d)o[s]=d[s]}return o}function b(o,u,f){var a=this,i={enumerable:!0};a.hasBeenReset=!1;var d="",s=!1,n=o,l=u,c=f,x=null,A="",C=!0,k="auto",w="start",y=50,h="middle",p=50,v="middle";Object.defineProperty(a,"id",t({},i,{get:function(){return d},set:function(E){d=""+E}})),Object.defineProperty(a,"pauseOnExit",t({},i,{get:function(){return s},set:function(E){s=!!E}})),Object.defineProperty(a,"startTime",t({},i,{get:function(){return n},set:function(E){if(typeof E!="number")throw new TypeError("Start time must be set to a number.");n=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",t({},i,{get:function(){return l},set:function(E){if(typeof E!="number")throw new TypeError("End time must be set to a number.");l=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",t({},i,{get:function(){return c},set:function(E){c=""+E,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",t({},i,{get:function(){return x},set:function(E){x=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",t({},i,{get:function(){return A},set:function(E){var g=P(E);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");A=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",t({},i,{get:function(){return C},set:function(E){C=!!E,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",t({},i,{get:function(){return k},set:function(E){if(typeof E!="number"&&E!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",t({},i,{get:function(){return w},set:function(E){var g=m(E);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");w=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",t({},i,{get:function(){return y},set:function(E){if(E<0||E>100)throw new Error("Position must be between 0 and 100.");y=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",t({},i,{get:function(){return h},set:function(E){var g=m(E);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");h=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",t({},i,{get:function(){return p},set:function(E){if(E<0||E>100)throw new Error("Size must be between 0 and 100.");p=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",t({},i,{get:function(){return v},set:function(E){var g=m(E);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");v=g,this.hasBeenReset=!0}})),a.displayState=void 0}return b.prototype.getCueAsHTML=function(){var o=self.WebVTT;return o.convertCueToDOMTree(self,this.text)},b}()},"./src/utils/vttparser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"parseTimeStamp",function(){return R}),I.d(B,"fixLineBreaks",function(){return u}),I.d(B,"VTTParser",function(){return f});var F=I("./src/utils/vttcue.ts"),T=function(){function a(){}var i=a.prototype;return i.decode=function(s,n){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},a}();function R(a){function i(s,n,l,c){return(s|0)*3600+(n|0)*60+(l|0)+parseFloat(c||0)}var d=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?i(d[2],d[3],0,d[4]):i(d[1],d[2],d[3],d[4]):null}var P=function(){function a(){this.values=Object.create(null)}var i=a.prototype;return i.set=function(s,n){!this.get(s)&&n!==""&&(this.values[s]=n)},i.get=function(s,n,l){return l?this.has(s)?this.values[s]:n[l]:this.has(s)?this.values[s]:n},i.has=function(s){return s in this.values},i.alt=function(s,n,l){for(var c=0;c<l.length;++c)if(n===l[c]){this.set(s,n);break}},i.integer=function(s,n){/^-?\d+$/.test(n)&&this.set(s,parseInt(n,10))},i.percent=function(s,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var l=parseFloat(n);if(l>=0&&l<=100)return this.set(s,l),!0}return!1},a}();function m(a,i,d,s){var n=s?a.split(s):[a];for(var l in n){if(typeof n[l]!="string")continue;var c=n[l].split(d);if(c.length!==2)continue;var x=c[0],A=c[1];i(x,A)}}var t=new F.default(0,0,""),b=t.align==="middle"?"middle":"center";function o(a,i,d){var s=a;function n(){var x=R(a);if(x===null)throw new Error("Malformed timestamp: "+s);return a=a.replace(/^[^\sa-zA-Z-]+/,""),x}function l(x,A){var C=new P;m(x,function(y,h){var p;switch(y){case"region":for(var v=d.length-1;v>=0;v--)if(d[v].id===h){C.set(y,d[v].region);break}break;case"vertical":C.alt(y,h,["rl","lr"]);break;case"line":p=h.split(","),C.integer(y,p[0]),C.percent(y,p[0])&&C.set("snapToLines",!1),C.alt(y,p[0],["auto"]),p.length===2&&C.alt("lineAlign",p[1],["start",b,"end"]);break;case"position":p=h.split(","),C.percent(y,p[0]),p.length===2&&C.alt("positionAlign",p[1],["start",b,"end","line-left","line-right","auto"]);break;case"size":C.percent(y,h);break;case"align":C.alt(y,h,["start",b,"end","left","right"]);break}},/:/,/\s/),A.region=C.get("region",null),A.vertical=C.get("vertical","");var k=C.get("line","auto");k==="auto"&&t.line===-1&&(k=-1),A.line=k,A.lineAlign=C.get("lineAlign","start"),A.snapToLines=C.get("snapToLines",!0),A.size=C.get("size",100),A.align=C.get("align",b);var w=C.get("position","auto");w==="auto"&&t.position===50&&(w=A.align==="start"||A.align==="left"?0:A.align==="end"||A.align==="right"?100:50),A.position=w}function c(){a=a.replace(/^\s+/,"")}if(c(),i.startTime=n(),c(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);a=a.substr(3),c(),i.endTime=n(),c(),l(a,i)}function u(a){return a.replace(/<br(?: \/)?>/gi,`
`)}var f=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new T,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=a.prototype;return i.parse=function(s){var n=this;s&&(n.buffer+=n.decoder.decode(s,{stream:!0}));function l(){var w=n.buffer,y=0;for(w=u(w);y<w.length&&w[y]!=="\r"&&w[y]!==`
`;)++y;var h=w.substr(0,y);return w[y]==="\r"&&++y,w[y]===`
`&&++y,n.buffer=w.substr(y),h}function c(w){m(w,function(y,h){},/:/)}try{var x="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;x=l();var A=x.match(/^()?WEBVTT([ \t].*)?$/);if(!A||!A[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var C=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;C?C=!1:x=l();switch(n.state){case"HEADER":/:/.test(x)?c(x):x||(n.state="ID");continue;case"NOTE":x||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(x)){n.state="NOTE";break}if(!x)continue;if(n.cue=new F.default(0,0,""),n.state="CUE",x.indexOf("-->")===-1){n.cue.id=x;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{o(x,n.cue,n.regionList)}catch(w){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var k=x.indexOf("-->")!==-1;if(!x||k&&(C=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=x}continue;case"BADCUE":x||(n.state="ID")}}}catch(w){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){s.onparsingerror&&s.onparsingerror(n)}return s.onflush&&s.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"generateCueId",function(){return f}),I.d(B,"parseWebVTT",function(){return i});var F=I("./src/polyfills/number.ts"),T=I("./src/utils/vttparser.ts"),R=I("./src/demux/id3.ts"),P=I("./src/utils/timescale-conversion.ts"),m=I("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,b=function(s,n,l){return l===void 0&&(l=0),s.substr(l,n.length)===n},o=function(s){var n=parseInt(s.substr(-3)),l=parseInt(s.substr(-6,2)),c=parseInt(s.substr(-9,2)),x=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(F.isFiniteNumber)(n)||!Object(F.isFiniteNumber)(l)||!Object(F.isFiniteNumber)(c)||!Object(F.isFiniteNumber)(x))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return n+=1e3*l,n+=60*1e3*c,n+=60*60*1e3*x,n},u=function(s){for(var n=5381,l=s.length;l;)n=n*33^s.charCodeAt(--l);return(n>>>0).toString()};function f(d,s,n){return u(d.toString())+u(s.toString())+u(n)}var a=function(s,n,l){var c=s[n],x=s[c.prevCC];if(!x||!x.new&&c.new){s.ccOffset=s.presentationOffset=c.start,c.new=!1;return}for(;(A=x)!==null&&A!==void 0&&A.new;){var A;s.ccOffset+=c.start-x.start,c.new=!1,c=x,x=s[c.prevCC]}s.presentationOffset=l};function i(d,s,n,l,c,x,A,C){var k=new T.VTTParser,w=Object(R.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(t,`
`).split(`
`),y=[],h=Object(P.toMpegTsClockFromTimescale)(s,n),p="00:00.000",v=0,_=0,E,g=!0,j=!1;k.oncue=function(U){var S=l[c],z=l.ccOffset,H=(v-h)/9e4;if(S!=null&&S.new&&(_!==void 0?z=l.ccOffset=S.start:a(l,c,H)),H&&(z=H-l.presentationOffset),j){var M=U.endTime-U.startTime,V=Object(m.normalizePts)((U.startTime+z-_)*9e4,x*9e4)/9e4;U.startTime=V,U.endTime=V+M}var K=U.text.trim();U.text=decodeURIComponent(encodeURIComponent(K)),U.id||(U.id=f(U.startTime,U.endTime,K)),U.endTime>0&&y.push(U)},k.onparsingerror=function(U){E=U},k.onflush=function(){if(E){C(E);return}A(y)},w.forEach(function(U){if(g)if(b(U,"X-TIMESTAMP-MAP=")){g=!1,j=!0,U.substr(16).split(",").forEach(function(S){b(S,"LOCAL:")?p=S.substr(6):b(S,"MPEGTS:")&&(v=parseInt(S.substr(7)))});try{_=o(p)/1e3}catch(S){j=!1,E=S}return}else U===""&&(g=!1);k.parse(U+`
`)}),k.flush()}},"./src/utils/xhr-loader.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/logger.ts"),T=I("./src/loader/load-stats.ts"),R=/^age:\s*[\d.]+\s*$/m,P=function(){function m(b){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=b?b.xhrSetup:null,this.stats=new T.LoadStats,this.retryDelay=0}var t=m.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var o=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),o&&(o.onreadystatechange=null,o.onprogress=null,o.readyState!==4&&(this.stats.aborted=!0,o.abort()))},t.abort=function(){var o;this.abortInternal(),(o=this.callbacks)!==null&&o!==void 0&&o.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(o,u,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=o,this.config=u,this.callbacks=f,this.retryDelay=u.retryDelay,this.loadInternal()},t.loadInternal=function(){var o=this.config,u=this.context;if(!o)return;var f=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var i=this.xhrSetup;try{if(i)try{i(f,u.url)}catch(n){f.open("GET",u.url,!0),i(f,u.url)}f.readyState||f.open("GET",u.url,!0);var d=this.context.headers;if(d)for(var s in d)f.setRequestHeader(s,d[s])}catch(n){this.callbacks.onError({code:f.status,text:n.message},u,f);return}u.rangeEnd&&f.setRequestHeader("Range","bytes="+u.rangeStart+"-"+(u.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=u.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout),f.send()},t.readystatechange=function(){var o=this.context,u=this.loader,f=this.stats;if(!o||!u)return;var a=u.readyState,i=this.config;if(f.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),a===4){u.onreadystatechange=null,u.onprogress=null;var d=u.status;if(d>=200&&d<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var s,n;if(o.responseType==="arraybuffer"?(s=u.response,n=s.byteLength):(s=u.responseText,n=s.length),f.loaded=f.total=n,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(f,o,s,u),!this.callbacks)return;var c={url:u.responseURL,data:s};this.callbacks.onSuccess(c,f,o,u)}else f.retry>=i.maxRetry||d>=400&&d<499?(F.logger.error(d+" while loading "+o.url),this.callbacks.onError({code:d,text:u.statusText},o,u)):(F.logger.warn(d+" while loading "+o.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},t.loadtimeout=function(){F.logger.warn("timeout while loading "+this.context.url);var o=this.callbacks;o&&(this.abortInternal(),o.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(o){var u=this.stats;u.loaded=o.loaded,o.lengthComputable&&(u.total=o.total)},t.getCacheAge=function(){var o=null;if(this.loader&&R.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");o=u?parseFloat(u):null}return o},m}();B.default=P}}).default})},vHTk:function(Be,J,L){Be.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(Be,J,L){var Y=L("SrGk"),B=L("bYtY");function I(R,P){Y.call(this,R,P,["filter"],"__filter_in_use__","_shadowDom")}B.inherits(I,Y),I.prototype.addWithoutUpdate=function(R,P){if(P&&F(P.style)){var m;if(P._shadowDom){m=P._shadowDom;var t=this.getDefs(!0);t.contains(P._shadowDom)||this.addDom(m)}else m=this.add(P);this.markUsed(P);var b=m.getAttribute("id");R.style.filter="url(#"+b+")"}},I.prototype.add=function(R){var P=this.createElement("filter");return R._shadowDomId=R._shadowDomId||this.nextId++,P.setAttribute("id","zr"+this._zrId+"-shadow-"+R._shadowDomId),this.updateDom(R,P),this.addDom(P),P},I.prototype.update=function(R,P){var m=P.style;if(F(m)){var t=this;Y.prototype.update.call(this,P,function(){t.updateDom(P,P._shadowDom)})}else this.remove(R,P)},I.prototype.remove=function(R,P){P._shadowDomId!=null&&(this.removeDom(R),R.style.filter="")},I.prototype.updateDom=function(R,P){var m=P.getElementsByTagName("feDropShadow");m.length===0?m=this.createElement("feDropShadow"):m=m[0];var t=R.style,b=R.scale&&R.scale[0]||1,o=R.scale&&R.scale[1]||1,u,f,a,i;if(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)u=t.shadowOffsetX||0,f=t.shadowOffsetY||0,a=t.shadowBlur,i=t.shadowColor;else if(t.textShadowBlur)u=t.textShadowOffsetX||0,f=t.textShadowOffsetY||0,a=t.textShadowBlur,i=t.textShadowColor;else{this.removeDom(P,t);return}m.setAttribute("dx",u/b),m.setAttribute("dy",f/o),m.setAttribute("flood-color",i);var d=a/2/b,s=a/2/o,n=d+" "+s;m.setAttribute("stdDeviation",n),P.setAttribute("x","-100%"),P.setAttribute("y","-100%"),P.setAttribute("width",Math.ceil(a/2*200)+"%"),P.setAttribute("height",Math.ceil(a/2*200)+"%"),P.appendChild(m),R._shadowDom=P},I.prototype.markUsed=function(R){R._shadowDom&&Y.prototype.markUsed.call(this,R._shadowDom)};function F(R){return R&&(R.shadowBlur||R.shadowOffsetX||R.shadowOffsetY||R.textShadowBlur||R.textShadowOffsetX||R.textShadowOffsetY)}var T=I;Be.exports=T},vWvF:function(Be,J,L){var Y=L("Bq2U"),B=L("SUKs"),I=L("bYtY"),F=I.isString,T=I.isFunction,R=I.isObject,P=I.isArrayLike,m=I.indexOf,t=function(){this.animators=[]};t.prototype={constructor:t,animate:function(a,i){var d,s=!1,n=this,l=this.__zr;if(a){var c=a.split("."),x=n;s=c[0]==="shape";for(var A=0,C=c.length;A<C;A++){if(!x)continue;x=x[c[A]]}x&&(d=x)}else d=n;if(!d){B('Property "'+a+'" is not existed in element '+n.id);return}var k=n.animators,w=new Y(d,i);return w.during(function(y){n.dirty(s)}).done(function(){k.splice(m(k,w),1)}),k.push(w),l&&l.animation.addAnimator(w),w},stopAnimation:function(a){for(var i=this.animators,d=i.length,s=0;s<d;s++)i[s].stop(a);return i.length=0,this},animateTo:function(a,i,d,s,n,l){b(this,a,i,d,s,n,l)},animateFrom:function(a,i,d,s,n,l){b(this,a,i,d,s,n,l,!0)}};function b(a,i,d,s,n,l,c,x){F(s)?(l=n,n=s,s=0):T(n)?(l=n,n="linear",s=0):T(s)?(l=s,s=0):T(d)?(l=d,d=500):d||(d=500),a.stopAnimation(),o(a,"",a,i,d,s,x);var A=a.animators.slice(),C=A.length;function k(){C--,C||l&&l()}C||l&&l();for(var w=0;w<A.length;w++)A[w].done(k).start(n,c)}function o(a,i,d,s,n,l,c){var x={},A=0;for(var C in s){if(!s.hasOwnProperty(C))continue;d[C]!=null?R(s[C])&&!P(s[C])?o(a,i?i+"."+C:C,d[C],s[C],n,l,c):(c?(x[C]=d[C],u(a,i,C,s[C])):x[C]=s[C],A++):s[C]!=null&&!c&&u(a,i,C,s[C])}A>0&&a.animate(i,!1).when(n==null?500:n,x).delay(l||0)}function u(a,i,d,s){if(!i)a.attr(d,s);else{var n={};n[i]={},n[i][d]=s,a.attr(n)}}var f=t;Be.exports=f},wCXF:function(Be,J,L){"use strict";L.d(J,"a",function(){return Ut});var Y=L("rePB"),B=L("VTBJ"),I=L("KQm4"),F=L("U8pU"),T=L("ODXe"),R=L("q1tI"),P=L("TSYQ"),m=L.n(P),t=L("Gytx"),b=L.n(t),o=L("Kwbf"),u=L("t23M"),f=L("qx4F"),a=L("6eGT"),i=L("IBYe"),d=L("Ff2n"),s=L("c+Xe"),n=L("fyJ8"),l=L("biw7");function c(Pe,Ae,ut,Et,Ze){var dt=ut[Pe]||{},Ne=ut[Ae]||{},Te,Oe;dt.fixed==="left"?Te=Et.left[Pe]:Ne.fixed==="right"&&(Oe=Et.right[Ae]);var ae=!1,le=!1,he=!1,_e=!1,Se=ut[Ae+1],ze=ut[Pe-1];if(Ze==="rtl"){if(Te!==void 0){var xt=ze&&ze.fixed==="left";_e=!xt}else if(Oe!==void 0){var Qt=Se&&Se.fixed==="right";he=!Qt}}else if(Te!==void 0){var sn=Se&&Se.fixed==="left";ae=!sn}else if(Oe!==void 0){var gt=ze&&ze.fixed==="right";le=!gt}return{fixLeft:Te,fixRight:Oe,lastFixLeft:ae,firstFixRight:le,lastFixRight:he,firstFixLeft:_e,isSticky:Et.isSticky}}var x=L("sR1s");function A(Pe){var Ae=Pe.cells,ut=Pe.stickyOffsets,Et=Pe.flattenColumns,Ze=Pe.rowComponent,dt=Pe.cellComponent,Ne=Pe.onHeaderRow,Te=Pe.index,Oe=R.useContext(l.a),ae=Oe.prefixCls,le=Oe.direction,he;Ne&&(he=Ne(Ae.map(function(Se){return Se.column}),Te));var _e=Object(x.a)(Ae.map(function(Se){return Se.column}));return R.createElement(Ze,Object.assign({},he),Ae.map(function(Se,ze){var xt=Se.column,Qt=c(Se.colStart,Se.colEnd,Et,ut,le),sn;return xt&&xt.onHeaderCell&&(sn=Se.column.onHeaderCell(xt)),R.createElement(n.a,Object.assign({},Se,{ellipsis:xt.ellipsis,align:xt.align,component:dt,prefixCls:ae,key:_e[ze]},Qt,{additionalProps:sn,rowType:"header"}))}))}A.displayName="HeaderRow";var C=A;function k(Pe){var Ae=[];function ut(Ne,Te){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ae[Oe]=Ae[Oe]||[];var ae=Te,le=Ne.filter(Boolean).map(function(he){var _e={key:he.key,className:he.className||"",children:he.title,column:he,colStart:ae},Se=1,ze=he.children;return ze&&ze.length>0&&(Se=ut(ze,ae,Oe+1).reduce(function(xt,Qt){return xt+Qt},0),_e.hasSubColumns=!0),"colSpan"in he&&(Se=he.colSpan),"rowSpan"in he&&(_e.rowSpan=he.rowSpan),_e.colSpan=Se,_e.colEnd=_e.colStart+Se-1,Ae[Oe].push(_e),ae+=Se,Se});return le}ut(Pe,0);for(var Et=Ae.length,Ze=function(Te){Ae[Te].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=Et-Te)})},dt=0;dt<Et;dt+=1)Ze(dt);return Ae}function w(Pe){var Ae=Pe.stickyOffsets,ut=Pe.columns,Et=Pe.flattenColumns,Ze=Pe.onHeaderRow,dt=R.useContext(l.a),Ne=dt.prefixCls,Te=dt.getComponent,Oe=R.useMemo(function(){return k(ut)},[ut]),ae=Te(["header","wrapper"],"thead"),le=Te(["header","row"],"tr"),he=Te(["header","cell"],"th");return R.createElement(ae,{className:"".concat(Ne,"-thead")},Oe.map(function(_e,Se){var ze=R.createElement(C,{key:Se,flattenColumns:Et,cells:_e,stickyOffsets:Ae,rowComponent:le,cellComponent:he,onHeaderRow:Ze,index:Se});return ze}))}var y=w,h=L("hW8S");function p(Pe){for(var Ae=Pe.colWidths,ut=Pe.columns,Et=Pe.columCount,Ze=[],dt=Et||ut.length,Ne=!1,Te=dt-1;Te>=0;Te-=1){var Oe=Ae[Te],ae=ut&&ut[Te],le=ae&&ae[h.a];(Oe||le||Ne)&&(Ze.unshift(R.createElement("col",Object.assign({key:Te,style:{width:Oe,minWidth:Oe}},le))),Ne=!0)}return R.createElement("colgroup",null,Ze)}var v=p;function _(Pe,Ae){return Object(R.useMemo)(function(){for(var ut=[],Et=0;Et<Ae;Et+=1){var Ze=Pe[Et];if(Ze!==void 0)ut[Et]=Ze;else return null}return ut},[Pe.join("_"),Ae])}var E=R.forwardRef(function(Pe,Ae){var ut=Pe.noData,Et=Pe.columns,Ze=Pe.flattenColumns,dt=Pe.colWidths,Ne=Pe.columCount,Te=Pe.stickyOffsets,Oe=Pe.direction,ae=Pe.fixHeader,le=Pe.offsetHeader,he=Pe.stickyClassName,_e=Pe.onScroll,Se=Object(d.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),ze=R.useContext(l.a),xt=ze.prefixCls,Qt=ze.scrollbarSize,sn=ze.isSticky,gt=sn&&!ae?0:Qt,zt=R.useRef(null),Ot=R.useCallback(function(Kt){Object(s.b)(Ae,Kt),Object(s.b)(zt,Kt)},[]);R.useEffect(function(){var Kt;function Zt(Ge){var lt=Ge.currentTarget,Lt=Ge.deltaX;Lt&&(_e({currentTarget:lt,scrollLeft:lt.scrollLeft+Lt}),Ge.preventDefault())}return(Kt=zt.current)===null||Kt===void 0||Kt.addEventListener("wheel",Zt),function(){var Ge;(Ge=zt.current)===null||Ge===void 0||Ge.removeEventListener("wheel",Zt)}},[]);var At=Ze[Ze.length-1],ft={fixed:At?At.fixed:null,onHeaderCell:function(){return{className:"".concat(xt,"-cell-scrollbar")}}},be=Object(R.useMemo)(function(){return gt?[].concat(Object(I.a)(Et),[ft]):Et},[gt,Et]),Fe=Object(R.useMemo)(function(){return gt?[].concat(Object(I.a)(Ze),[ft]):Ze},[gt,Ze]),Nt=Object(R.useMemo)(function(){var Kt=Te.right,Zt=Te.left;return Object(B.a)(Object(B.a)({},Te),{},{left:Oe==="rtl"?[].concat(Object(I.a)(Zt.map(function(Ge){return Ge+gt})),[0]):Zt,right:Oe==="rtl"?Kt:[].concat(Object(I.a)(Kt.map(function(Ge){return Ge+gt})),[0]),isSticky:sn})},[gt,Te,sn]),bt=_(dt,Ne);return R.createElement("div",{style:Object(B.a)({overflow:"hidden"},sn?{top:le}:{}),ref:Ot,className:m()("".concat(xt,"-header"),Object(Y.a)({},he,!!he))},R.createElement("table",{style:{tableLayout:"fixed",visibility:ut||bt?null:"hidden"}},R.createElement(v,{colWidths:bt?[].concat(Object(I.a)(bt),[gt]):[],columCount:Ne+1,columns:Fe}),R.createElement(y,Object.assign({},Se,{stickyOffsets:Nt,columns:be,flattenColumns:Fe}))))});E.displayName="FixedHeader";var g=E,j=R.createContext(null),U=j;function S(Pe){var Ae=Pe.prefixCls,ut=Pe.children,Et=Pe.component,Ze=Pe.cellComponent,dt=Pe.fixHeader,Ne=Pe.fixColumn,Te=Pe.horizonScroll,Oe=Pe.className,ae=Pe.expanded,le=Pe.componentWidth,he=Pe.colSpan,_e=R.useContext(l.a),Se=_e.scrollbarSize;return R.useMemo(function(){var ze=ut;return Ne&&(ze=R.createElement("div",{style:{width:le-(dt?Se:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ae,"-expanded-row-fixed")},ze)),R.createElement(Et,{className:Oe,style:{display:ae?null:"none"}},R.createElement(n.a,{component:Ze,prefixCls:Ae,colSpan:he},ze))},[ut,Et,dt,Te,Oe,ae,le,he,Se])}var z=S;function H(Pe){var Ae=Pe.className,ut=Pe.style,Et=Pe.record,Ze=Pe.index,dt=Pe.rowKey,Ne=Pe.getRowKey,Te=Pe.rowExpandable,Oe=Pe.expandedKeys,ae=Pe.onRow,le=Pe.indent,he=le===void 0?0:le,_e=Pe.rowComponent,Se=Pe.cellComponent,ze=Pe.childrenColumnName,xt=R.useContext(l.a),Qt=xt.prefixCls,sn=xt.fixedInfoList,gt=R.useContext(U),zt=gt.fixHeader,Ot=gt.fixColumn,At=gt.horizonScroll,ft=gt.componentWidth,be=gt.flattenColumns,Fe=gt.expandableType,Nt=gt.expandRowByClick,bt=gt.onTriggerExpand,Kt=gt.rowClassName,Zt=gt.expandedRowClassName,Ge=gt.indentSize,lt=gt.expandIcon,Lt=gt.expandedRowRender,Wt=gt.expandIconColumnIndex,ln=R.useState(!1),gn=Object(T.a)(ln,2),tr=gn[0],Wn=gn[1],En=Oe&&Oe.has(Pe.recordKey);R.useEffect(function(){En&&Wn(!0)},[En]);var xr=Fe==="row"&&(!Te||Te(Et)),Er=Fe==="nest",rr=ze&&Et&&Et[ze],ur=xr||Er,Rr;ae&&(Rr=ae(Et,Ze));var Kr=function(W){if(Nt&&ur&&bt(Et,W),Rr&&Rr.onClick){for(var G,Q=arguments.length,ue=new Array(Q>1?Q-1:0),ee=1;ee<Q;ee++)ue[ee-1]=arguments[ee];(G=Rr).onClick.apply(G,[W].concat(ue))}},ra;typeof Kt=="string"?ra=Kt:typeof Kt=="function"&&(ra=Kt(Et,Ze,he));var fn=Object(x.a)(be),or=R.createElement(_e,Object.assign({},Rr,{"data-row-key":dt,className:m()(Ae,"".concat(Qt,"-row"),"".concat(Qt,"-row-level-").concat(he),ra,Rr&&Rr.className),style:Object(B.a)(Object(B.a)({},ut),Rr?Rr.style:null),onClick:Kr}),be.map(function(te,W){var G=te.render,Q=te.dataIndex,ue=te.className,ee=fn[W],qe=sn[W],tn;W===(Wt||0)&&Er&&(tn=R.createElement(R.Fragment,null,R.createElement("span",{style:{paddingLeft:"".concat(Ge*he,"px")},className:"".concat(Qt,"-row-indent indent-level-").concat(he)}),lt({prefixCls:Qt,expanded:En,expandable:rr,record:Et,onExpand:bt})));var An;return te.onCell&&(An=te.onCell(Et,Ze)),R.createElement(n.a,Object.assign({className:ue,ellipsis:te.ellipsis,align:te.align,component:Se,prefixCls:Qt,key:ee,record:Et,index:Ze,dataIndex:Q,render:G,shouldCellUpdate:te.shouldCellUpdate},qe,{appendNode:tn,additionalProps:An}))})),sa;if(xr&&(tr||En)){var ya=Lt(Et,Ze,he+1,En),Jr=Zt&&Zt(Et,Ze,he);sa=R.createElement(z,{expanded:En,className:m()("".concat(Qt,"-expanded-row"),"".concat(Qt,"-expanded-row-level-").concat(he+1),Jr),prefixCls:Qt,fixHeader:zt,fixColumn:Ot,horizonScroll:At,component:_e,componentWidth:ft,cellComponent:Se,colSpan:be.length},ya)}var na;return rr&&En&&(na=(Et[ze]||[]).map(function(te,W){var G=Ne(te,W);return R.createElement(H,Object.assign({},Pe,{key:G,rowKey:G,record:te,recordKey:G,index:W,indent:he+1}))})),R.createElement(R.Fragment,null,or,sa,na)}H.displayName="BodyRow";var M=H,V=R.createContext(null),K=V;function $(Pe){var Ae=Pe.columnKey,ut=Pe.onColumnResize,Et=R.useRef();return R.useEffect(function(){Et.current&&ut(Ae,Et.current.offsetWidth)},[]),R.createElement(u.a,{onResize:function(dt){var Ne=dt.offsetWidth;ut(Ae,Ne)}},R.createElement("td",{ref:Et,style:{padding:0,border:0,height:0}},R.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Z(Pe){var Ae=Pe.data,ut=Pe.getRowKey,Et=Pe.measureColumnWidth,Ze=Pe.expandedKeys,dt=Pe.onRow,Ne=Pe.rowExpandable,Te=Pe.emptyNode,Oe=Pe.childrenColumnName,ae=R.useContext(K),le=ae.onColumnResize,he=R.useContext(l.a),_e=he.prefixCls,Se=he.getComponent,ze=R.useContext(U),xt=ze.fixHeader,Qt=ze.horizonScroll,sn=ze.flattenColumns,gt=ze.componentWidth;return R.useMemo(function(){var zt=Se(["body","wrapper"],"tbody"),Ot=Se(["body","row"],"tr"),At=Se(["body","cell"],"td"),ft;Ae.length?ft=Ae.map(function(Fe,Nt){var bt=ut(Fe,Nt);return R.createElement(M,{key:bt,rowKey:bt,record:Fe,recordKey:bt,index:Nt,rowComponent:Ot,cellComponent:At,expandedKeys:Ze,onRow:dt,getRowKey:ut,rowExpandable:Ne,childrenColumnName:Oe})}):ft=R.createElement(z,{expanded:!0,className:"".concat(_e,"-placeholder"),prefixCls:_e,fixHeader:xt,fixColumn:Qt,horizonScroll:Qt,component:Ot,componentWidth:gt,cellComponent:At,colSpan:sn.length},Te);var be=Object(x.a)(sn);return R.createElement(zt,{className:"".concat(_e,"-tbody")},Et&&R.createElement("tr",{"aria-hidden":"true",className:"".concat(_e,"-measure-row"),style:{height:0}},be.map(function(Fe){return R.createElement($,{key:Fe,columnKey:Fe,onColumnResize:le})})),ft)},[Ae,_e,dt,Et,Ze,ut,Se,gt,Te,sn])}var me=R.memo(Z);me.displayName="Body";var oe=me,fe=L("wRmb"),ye=L("xEkU"),Ie=L.n(ye);function ve(Pe){var Ae=Object(R.useRef)(Pe),ut=Object(R.useState)({}),Et=Object(T.a)(ut,2),Ze=Et[1],dt=Object(R.useRef)(null),Ne=Object(R.useRef)([]);function Te(Oe){dt.current===null&&(Ne.current=[],dt.current=Ie()(function(){Ne.current.forEach(function(ae){Ae.current=ae(Ae.current)}),dt.current=null,Ze({})})),Ne.current.push(Oe)}return Object(R.useEffect)(function(){return function(){Ie.a.cancel(dt.current)}},[]),[Ae.current,Te]}function de(Pe){var Ae=Object(R.useRef)(Pe),ut=Object(R.useRef)(null);function Et(){window.clearTimeout(ut.current)}function Ze(Ne){Ae.current=Ne,Et(),ut.current=window.setTimeout(function(){Ae.current=null,ut.current=null},100)}function dt(){return Ae.current}return Object(R.useEffect)(function(){return Et},[]),[Ze,dt]}function Je(Pe,Ae,ut){var Et=Object(R.useMemo)(function(){for(var Ze=[],dt=[],Ne=0,Te=0,Oe=0;Oe<Ae;Oe+=1)if(ut==="rtl"){dt[Oe]=Te,Te+=Pe[Oe]||0;var ae=Ae-Oe-1;Ze[ae]=Ne,Ne+=Pe[ae]||0}else{Ze[Oe]=Ne,Ne+=Pe[Oe]||0;var le=Ae-Oe-1;dt[le]=Te,Te+=Pe[le]||0}return{left:Ze,right:dt}},[Pe,Ae,ut]);return Et}var Rt=Je;function Ee(Pe){var Ae=Pe.className,ut=Pe.children;return R.createElement("div",{className:Ae},ut)}var Me=Ee,rt=L("n6Qo");function He(Pe){var Ae,ut=Pe.prefixCls,Et=Pe.record,Ze=Pe.onExpand,dt=Pe.expanded,Ne=Pe.expandable,Te="".concat(ut,"-row-expand-icon");if(!Ne)return R.createElement("span",{className:m()(Te,"".concat(ut,"-row-spaced"))});var Oe=function(le){Ze(Et,le),le.stopPropagation()};return R.createElement("span",{className:m()(Te,(Ae={},Object(Y.a)(Ae,"".concat(ut,"-row-expanded"),dt),Object(Y.a)(Ae,"".concat(ut,"-row-collapsed"),!dt),Ae)),onClick:Oe})}function ke(Pe,Ae,ut){var Et=[];function Ze(dt){(dt||[]).forEach(function(Ne,Te){Et.push(Ae(Ne,Te)),Ze(Ne[ut])})}return Ze(Pe),Et}var ht=L("zT1h"),ie=L("y0+3"),xe=function(Ae,ut){var Et,Ze,dt=Ae.scrollBodyRef,Ne=Ae.onScroll,Te=Ae.offsetScroll,Oe=R.useContext(l.a),ae=Oe.prefixCls,le=((Et=dt.current)===null||Et===void 0?void 0:Et.scrollWidth)||0,he=((Ze=dt.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,_e=le&&he*(he/le),Se=R.useRef(),ze=ve({scrollLeft:0,isHiddenScrollBar:!1}),xt=Object(T.a)(ze,2),Qt=xt[0],sn=xt[1],gt=R.useRef({delta:0,x:0}),zt=R.useState(!1),Ot=Object(T.a)(zt,2),At=Ot[0],ft=Ot[1],be=function(){ft(!1)},Fe=function(Ge){Ge.persist(),gt.current.delta=Ge.pageX-Qt.scrollLeft,gt.current.x=0,ft(!0),Ge.preventDefault()},Nt=function(Ge){var lt,Lt=Ge||((lt=window)===null||lt===void 0?void 0:lt.event),Wt=Lt.buttons;if(!At||Wt===0){At&&ft(!1);return}var ln=gt.current.x+Ge.pageX-gt.current.x-gt.current.delta;ln<=0&&(ln=0),ln+_e>=he&&(ln=he-_e),Ne({scrollLeft:ln/he*(le+2)}),gt.current.x=Ge.pageX},bt=function(){var Ge=Object(ie.b)(dt.current).top,lt=Ge+dt.current.offsetHeight,Lt=document.documentElement.scrollTop+window.innerHeight;lt-Object(f.a)()<=Lt||Ge>=Lt-Te?sn(function(Wt){return Object(B.a)(Object(B.a)({},Wt),{},{isHiddenScrollBar:!0})}):sn(function(Wt){return Object(B.a)(Object(B.a)({},Wt),{},{isHiddenScrollBar:!1})})},Kt=function(Ge){sn(function(lt){return Object(B.a)(Object(B.a)({},lt),{},{scrollLeft:Ge/le*he||0})})};return R.useImperativeHandle(ut,function(){return{setScrollLeft:Kt}}),R.useEffect(function(){var Zt=Object(ht.a)(document.body,"mouseup",be,!1),Ge=Object(ht.a)(document.body,"mousemove",Nt,!1);return bt(),function(){Zt.remove(),Ge.remove()}},[_e,At]),R.useEffect(function(){var Zt=Object(ht.a)(window,"scroll",bt,!1),Ge=Object(ht.a)(window,"resize",bt,!1);return function(){Zt.remove(),Ge.remove()}},[]),R.useEffect(function(){Qt.isHiddenScrollBar||sn(function(Zt){var Ge,lt;return Object(B.a)(Object(B.a)({},Zt),{},{scrollLeft:dt.current.scrollLeft/((Ge=dt.current)===null||Ge===void 0?void 0:Ge.scrollWidth)*((lt=dt.current)===null||lt===void 0?void 0:lt.clientWidth)})})},[Qt.isHiddenScrollBar]),le<=he||!_e||Qt.isHiddenScrollBar?null:R.createElement("div",{style:{height:Object(f.a)(),width:he,bottom:Te},className:"".concat(ae,"-sticky-scroll")},R.createElement("div",{onMouseDown:Fe,ref:Se,className:m()("".concat(ae,"-sticky-scroll-bar"),Object(Y.a)({},"".concat(ae,"-sticky-scroll-bar-active"),At)),style:{width:"".concat(_e,"px"),transform:"translate3d(".concat(Qt.scrollLeft,"px, 0, 0)")}}))},we=R.forwardRef(xe);function $e(Pe,Ae){return R.useMemo(function(){var ut=!!Pe;return{isSticky:ut,stickyClassName:ut?"".concat(Ae,"-sticky-header"):"",offsetHeader:Object(F.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(F.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ae])}var ct=[],yt={},Ut="rc-table-internal-hook",We=R.memo(function(Pe){var Ae=Pe.children;return Ae},function(Pe,Ae){return b()(Pe.props,Ae.props)?Pe.pingLeft!==Ae.pingLeft||Pe.pingRight!==Ae.pingRight:!1});function kt(Pe){var Ae,ut=Pe.prefixCls,Et=Pe.className,Ze=Pe.rowClassName,dt=Pe.style,Ne=Pe.data,Te=Pe.rowKey,Oe=Pe.scroll,ae=Pe.tableLayout,le=Pe.direction,he=Pe.title,_e=Pe.footer,Se=Pe.summary,ze=Pe.id,xt=Pe.showHeader,Qt=Pe.components,sn=Pe.emptyText,gt=Pe.onRow,zt=Pe.onHeaderRow,Ot=Pe.internalHooks,At=Pe.transformColumns,ft=Pe.internalRefs,be=Pe.sticky,Fe=Ne||ct,Nt=!!Fe.length,bt=R.useState(0),Kt=Object(T.a)(bt,2),Zt=Kt[0],Ge=Kt[1];R.useEffect(function(){Ge(Object(f.a)())});var lt=R.useMemo(function(){return Object(x.c)(Qt,{})},[Qt]),Lt=R.useCallback(function(Hn,Yn){return Object(x.b)(lt,Hn)||Yn},[lt]),Wt=R.useMemo(function(){return typeof Te=="function"?Te:function(Hn){var Yn=Hn&&Hn[Te];return Yn}},[Te]),ln=Object(h.c)(Pe),gn=ln.expandIcon,tr=ln.expandedRowKeys,Wn=ln.defaultExpandedRowKeys,En=ln.defaultExpandAllRows,xr=ln.expandedRowRender,Er=ln.onExpand,rr=ln.onExpandedRowsChange,ur=ln.expandRowByClick,Rr=ln.rowExpandable,Kr=ln.expandIconColumnIndex,ra=ln.expandedRowClassName,fn=ln.childrenColumnName,or=ln.indentSize,sa=gn||He,ya=fn||"children",Jr=R.useMemo(function(){return xr?"row":Pe.expandable&&Ot===Ut&&Pe.expandable.__PARENT_RENDER_ICON__||Fe.some(function(Hn){return Hn&&Object(F.a)(Hn)==="object"&&Hn[ya]})?"nest":!1},[!!xr,Fe]),na=R.useState(function(){return Wn||(En?ke(Fe,Wt,ya):[])}),te=Object(T.a)(na,2),W=te[0],G=te[1],Q=R.useMemo(function(){return new Set(tr||W||[])},[tr,W]),ue=R.useCallback(function(Hn){var Yn=Wt(Hn,Fe.indexOf(Hn)),Jn,wr=Q.has(Yn);wr?(Q.delete(Yn),Jn=Object(I.a)(Q)):Jn=[].concat(Object(I.a)(Q),[Yn]),G(Jn),Er&&Er(!wr,Hn),rr&&rr(Jn)},[Wt,Q,Fe,Er,rr]),ee=R.useState(0),qe=Object(T.a)(ee,2),tn=qe[0],An=qe[1],Vn=Object(fe.b)(Object(B.a)(Object(B.a)(Object(B.a)({},Pe),ln),{},{expandable:!!xr,expandedKeys:Q,getRowKey:Wt,onTriggerExpand:ue,expandIcon:sa,expandIconColumnIndex:Kr,direction:le}),Ot===Ut?At:null),un=Object(T.a)(Vn,2),nr=un[0],vn=un[1],dn=R.useMemo(function(){return{columns:nr,flattenColumns:vn}},[nr,vn]),xn=R.useRef(),Nn=R.useRef(),dr=R.useRef(),$n=R.useState(!1),Zn=Object(T.a)($n,2),kn=Zn[0],gr=Zn[1],Bn=R.useState(!1),ar=Object(T.a)(Bn,2),sr=ar[0],Pn=ar[1],Tr=ve(new Map),Mr=Object(T.a)(Tr,2),Sr=Mr[0],hr=Mr[1],ne=Object(x.a)(vn),Re=ne.map(function(Hn){return Sr.get(Hn)}),Xe=R.useMemo(function(){return Re},[Re.join("_")]),Le=Rt(Xe,vn.length,le),st=Oe&&Object(x.d)(Oe.y),et=Oe&&Object(x.d)(Oe.x),pt=et&&vn.some(function(Hn){var Yn=Hn.fixed;return Yn}),mt=R.useRef(),it=$e(be,ut),Mt=it.isSticky,Xt=it.offsetHeader,Vt=it.offsetScroll,St=it.stickyClassName,nn,Qe,en;st&&(Qe={overflowY:"scroll",maxHeight:Oe.y}),et&&(nn={overflowX:"auto"},st||(Qe={overflowY:"hidden"}),en={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Bt=R.useCallback(function(Hn,Yn){hr(function(Jn){var wr=new Map(Jn);return wr.set(Hn,Yn),wr})},[]),bn=de(null),On=Object(T.a)(bn,2),Gt=On[0],cn=On[1];function Ht(Hn,Yn){if(!Yn)return;typeof Yn=="function"?Yn(Hn):Yn.scrollLeft!==Hn&&(Yn.scrollLeft=Hn)}var Sn=function(Yn){var Jn=Yn.currentTarget,wr=Yn.scrollLeft,Wr=typeof wr=="number"?wr:Jn.scrollLeft,Zr=Jn||yt;if(!cn()||cn()===Zr){var ua;Gt(Zr),Ht(Wr,Nn.current),Ht(Wr,dr.current),Ht(Wr,(ua=mt.current)===null||ua===void 0?void 0:ua.setScrollLeft)}if(Jn){var xa=Jn.scrollWidth,ma=Jn.clientWidth;gr(Wr>0),Pn(Wr<xa-ma)}},wn=function(){dr.current&&Sn({currentTarget:dr.current})},wt=function(Yn){var Jn=Yn.width;wn(),An(xn.current?xn.current.offsetWidth:Jn)};R.useEffect(function(){return wn},[]),R.useEffect(function(){et&&wn()},[et]),R.useEffect(function(){Ot===Ut&&ft&&(ft.body.current=dr.current)});var It=Lt(["table"],"table"),Pt=R.useMemo(function(){return ae||(pt?Oe.x==="max-content"?"auto":"fixed":st||vn.some(function(Hn){var Yn=Hn.ellipsis;return Yn})?"fixed":"auto")},[st,pt,vn,ae]),Ct,vt={colWidths:Xe,columCount:vn.length,stickyOffsets:Le,onHeaderRow:zt,fixHeader:st},Dn=R.useMemo(function(){return Nt?null:typeof sn=="function"?sn():sn},[Nt,sn]),$t=R.createElement(oe,{data:Fe,measureColumnWidth:st||et||Mt,expandedKeys:Q,rowExpandable:Rr,getRowKey:Wt,onRow:gt,emptyNode:Dn,childrenColumnName:ya}),Cn=R.createElement(v,{colWidths:vn.map(function(Hn){var Yn=Hn.width;return Yn}),columns:vn}),pn=Se&&R.createElement(rt.b,null,Se(Fe)),Yt=Lt(["body"]);if(st||Mt){var Tn;typeof Yt=="function"?(Tn=Yt(Fe,{scrollbarSize:Zt,ref:dr,onScroll:Sn}),vt.colWidths=vn.map(function(Hn,Yn){var Jn=Hn.width,wr=Yn===nr.length-1?Jn-Zt:Jn;return typeof wr=="number"&&!Number.isNaN(wr)?wr:(Object(o.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Tn=R.createElement("div",{style:Object(B.a)(Object(B.a)({},nn),Qe),onScroll:Sn,ref:dr,className:m()("".concat(ut,"-body"))},R.createElement(It,{style:Object(B.a)(Object(B.a)({},en),{},{tableLayout:Pt})},Cn,$t,pn),Mt&&R.createElement(we,{ref:mt,offsetScroll:Vt,scrollBodyRef:dr,onScroll:Sn})),Ct=R.createElement(R.Fragment,null,xt!==!1&&R.createElement(g,Object.assign({noData:!Fe.length},vt,dn,{direction:le,offsetHeader:Xt,stickyClassName:St,ref:Nn,onScroll:Sn})),Tn)}else Ct=R.createElement("div",{style:Object(B.a)(Object(B.a)({},nn),Qe),className:m()("".concat(ut,"-content")),onScroll:Sn,ref:dr},R.createElement(It,{style:Object(B.a)(Object(B.a)({},en),{},{tableLayout:Pt})},Cn,xt!==!1&&R.createElement(y,Object.assign({},vt,dn)),$t,pn));var zn=Object(h.b)(Pe),fr=R.createElement("div",Object.assign({className:m()(ut,Et,(Ae={},Object(Y.a)(Ae,"".concat(ut,"-rtl"),le==="rtl"),Object(Y.a)(Ae,"".concat(ut,"-ping-left"),kn),Object(Y.a)(Ae,"".concat(ut,"-ping-right"),sr),Object(Y.a)(Ae,"".concat(ut,"-layout-fixed"),ae==="fixed"),Object(Y.a)(Ae,"".concat(ut,"-fixed-header"),st),Object(Y.a)(Ae,"".concat(ut,"-fixed-column"),pt),Object(Y.a)(Ae,"".concat(ut,"-scroll-horizontal"),et),Object(Y.a)(Ae,"".concat(ut,"-has-fix-left"),vn[0]&&vn[0].fixed),Object(Y.a)(Ae,"".concat(ut,"-has-fix-right"),vn[vn.length-1]&&vn[vn.length-1].fixed==="right"),Ae)),style:dt,id:ze,ref:xn},zn),R.createElement(We,{pingLeft:kn,pingRight:sr,props:Object(B.a)(Object(B.a)({},Pe),{},{stickyOffsets:Le,mergedExpandedKeys:Q})},he&&R.createElement(Me,{className:"".concat(ut,"-title")},he(Fe)),R.createElement("div",{className:"".concat(ut,"-container")},Ct),_e&&R.createElement(Me,{className:"".concat(ut,"-footer")},_e(Fe))));et&&(fr=R.createElement(u.a,{onResize:wt},fr));var Gn=R.useMemo(function(){return{prefixCls:ut,getComponent:Lt,scrollbarSize:Zt,direction:le,fixedInfoList:vn.map(function(Hn,Yn){return c(Yn,Yn,vn,Le,le)}),isSticky:Mt}},[ut,Lt,Zt,le,vn,Le,le,Mt]),Lr=R.useMemo(function(){return Object(B.a)(Object(B.a)({},dn),{},{tableLayout:Pt,rowClassName:Ze,expandedRowClassName:ra,componentWidth:tn,fixHeader:st,fixColumn:pt,horizonScroll:et,expandIcon:sa,expandableType:Jr,expandRowByClick:ur,expandedRowRender:xr,onTriggerExpand:ue,expandIconColumnIndex:Kr,indentSize:or})},[dn,Pt,Ze,ra,tn,st,pt,et,sa,Jr,ur,xr,ue,Kr,or]),Gr=R.useMemo(function(){return{onColumnResize:Bt}},[Bt]);return R.createElement(l.a.Provider,{value:Gn},R.createElement(U.Provider,{value:Lr},R.createElement(K.Provider,{value:Gr},fr)))}kt.Column=i.a,kt.ColumnGroup=a.a,kt.Summary=rt.a,kt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var qt=J.b=kt},wRmb:function(Be,J,L){"use strict";L.d(J,"a",function(){return b});var Y=L("rePB"),B=L("KQm4"),I=L("VTBJ"),F=L("Ff2n"),T=L("q1tI"),R=L.n(T),P=L("Kwbf"),m=L("Zm9Q"),t=L("hW8S");function b(i){return Object(m.a)(i).filter(function(d){return T.isValidElement(d)}).map(function(d){var s=d.key,n=d.props,l=n.children,c=Object(F.a)(n,["children"]),x=Object(I.a)({key:s},c);return l&&(x.children=b(l)),x})}function o(i){return i.reduce(function(d,s){var n=s.fixed,l=n===!0?"left":n,c=s.children;return c&&c.length>0?[].concat(Object(B.a)(d),Object(B.a)(o(c).map(function(x){return Object(I.a)({fixed:l},x)}))):[].concat(Object(B.a)(d),[Object(I.a)(Object(I.a)({},s),{},{fixed:l})])},[])}function u(i){for(var d=!0,s=0;s<i.length;s+=1){var n=i[s];if(d&&n.fixed!=="left")d=!1;else if(!d&&n.fixed==="left"){Object(P.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,c=i.length-1;c>=0;c-=1){var x=i[c];if(l&&x.fixed!=="right")l=!1;else if(!l&&x.fixed==="right"){Object(P.a)(!1,"Index ".concat(c+1," of `columns` missing `fixed='right'` prop."));break}}}function f(i){return i.map(function(d){var s=d.fixed,n=Object(F.a)(d,["fixed"]),l=s;return s==="left"?l="right":s==="right"&&(l="left"),Object(I.a)({fixed:l},n)})}function a(i,d){var s=i.prefixCls,n=i.columns,l=i.children,c=i.expandable,x=i.expandedKeys,A=i.getRowKey,C=i.onTriggerExpand,k=i.expandIcon,w=i.rowExpandable,y=i.expandIconColumnIndex,h=i.direction,p=i.expandRowByClick,v=T.useMemo(function(){return n||b(l)},[n,l]),_=T.useMemo(function(){if(c){var j,U=y||0,S=v[U],z=(j={},Object(Y.a)(j,t.a,{className:"".concat(s,"-expand-icon-col")}),Object(Y.a)(j,"title",""),Object(Y.a)(j,"fixed",S?S.fixed:null),Object(Y.a)(j,"className","".concat(s,"-row-expand-icon-cell")),Object(Y.a)(j,"render",function(V,K,$){var Z=A(K,$),me=x.has(Z),oe=w?w(K):!0,fe=k({prefixCls:s,expanded:me,expandable:oe,record:K,onExpand:C});return p?T.createElement("span",{onClick:function(Ie){return Ie.stopPropagation()}},fe):fe}),j),H=v.slice();return U>=0&&H.splice(U,0,z),H}return v},[c,v,A,x,k,h]),E=T.useMemo(function(){var j=_;return d&&(j=d(j)),j.length||(j=[{render:function(){return null}}]),j},[d,_,h]),g=T.useMemo(function(){return h==="rtl"?f(o(E)):o(E)},[E,h]);return[E,g]}J.b=a},x6Kt:function(Be,J,L){var Y=L("y+Vt"),B=L("VpOo"),I=L("nPnh"),F=I.subPixelOptimizeRect,T={},R=Y.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(P,m){var t,b,o,u;this.subPixelOptimize?(F(T,m,this.style),t=T.x,b=T.y,o=T.width,u=T.height,T.r=m.r,m=T):(t=m.x,b=m.y,o=m.width,u=m.height),m.r?B.buildPath(P,m):P.rect(t,b,o,u),P.closePath();return}});Be.exports=R},xOL1:function(Be,J){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y+Vt":function(Be,J,L){var Y=L("Gev7"),B=L("bYtY"),I=L("IMiH"),F=L("2DNl"),T=L("3C/r"),R=T.prototype.getCanvasPattern,P=Math.abs,m=new I(!0);function t(o){Y.call(this,o),this.path=null}t.prototype={constructor:t,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(o,u){var f=this.style,a=this.path||m,i=f.hasStroke(),d=f.hasFill(),s=f.fill,n=f.stroke,l=d&&!!s.colorStops,c=i&&!!n.colorStops,x=d&&!!s.image,A=i&&!!n.image;if(f.bind(o,this,u),this.setTransform(o),this.__dirty){var C;l&&(C=C||this.getBoundingRect(),this._fillGradient=f.getGradient(o,s,C)),c&&(C=C||this.getBoundingRect(),this._strokeGradient=f.getGradient(o,n,C))}l?o.fillStyle=this._fillGradient:x&&(o.fillStyle=R.call(s,o)),c?o.strokeStyle=this._strokeGradient:A&&(o.strokeStyle=R.call(n,o));var k=f.lineDash,w=f.lineDashOffset,y=!!o.setLineDash,h=this.getGlobalScale();if(a.setScale(h[0],h[1],this.segmentIgnoreThreshold),this.__dirtyPath||k&&!y&&i?(a.beginPath(o),k&&!y&&(a.setLineDash(k),a.setLineDashOffset(w)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(o.beginPath(),this.path.rebuildPath(o)),d)if(f.fillOpacity!=null){var p=o.globalAlpha;o.globalAlpha=f.fillOpacity*f.opacity,a.fill(o),o.globalAlpha=p}else a.fill(o);if(k&&y&&(o.setLineDash(k),o.lineDashOffset=w),i)if(f.strokeOpacity!=null){var p=o.globalAlpha;o.globalAlpha=f.strokeOpacity*f.opacity,a.stroke(o),o.globalAlpha=p}else a.stroke(o);k&&y&&o.setLineDash([]),f.text!=null&&(this.restoreTransform(o),this.drawRectText(o,this.getBoundingRect()))},buildPath:function(o,u,f){},createPathProxy:function(){this.path=new I},getBoundingRect:function(){var o=this._rect,u=this.style,f=!o;if(f){var a=this.path;a||(a=this.path=new I),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),o=a.getBoundingRect()}if(this._rect=o,u.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=o.clone());if(this.__dirty||f){i.copy(o);var d=u.lineWidth,s=u.strokeNoScale?this.getLineScale():1;u.hasFill()||(d=Math.max(d,this.strokeContainThreshold||4)),s>1e-10&&(i.width+=d/s,i.height+=d/s,i.x-=d/s/2,i.y-=d/s/2)}return i}return o},contain:function(o,u){var f=this.transformCoordToLocal(o,u),a=this.getBoundingRect(),i=this.style;if(o=f[0],u=f[1],a.contain(o,u)){var d=this.path.data;if(i.hasStroke()){var s=i.lineWidth,n=i.strokeNoScale?this.getLineScale():1;if(n>1e-10&&(i.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),F.containStroke(d,s/n,o,u)))return!0}if(i.hasFill())return F.contain(d,o,u)}return!1},dirty:function(o){o==null&&(o=!0),o&&(this.__dirtyPath=o,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(o){return this.animate("shape",o)},attrKV:function(o,u){o==="shape"?(this.setShape(u),this.__dirtyPath=!0,this._rect=null):Y.prototype.attrKV.call(this,o,u)},setShape:function(o,u){var f=this.shape;if(f){if(B.isObject(o))for(var a in o)o.hasOwnProperty(a)&&(f[a]=o[a]);else f[o]=u;this.dirty(!0)}return this},getLineScale:function(){var o=this.transform;return o&&P(o[0]-1)>1e-10&&P(o[3]-1)>1e-10?Math.sqrt(P(o[0]*o[3]-o[2]*o[1])):1}},t.extend=function(o){var u=function(a){t.call(this,a),o.style&&this.style.extendFrom(o.style,!1);var i=o.shape;if(i){this.shape=this.shape||{};var d=this.shape;for(var s in i)!d.hasOwnProperty(s)&&i.hasOwnProperty(s)&&(d[s]=i[s])}o.init&&o.init.call(this,a)};B.inherits(u,t);for(var f in o)f!=="style"&&f!=="shape"&&(u.prototype[f]=o[f]);return u},B.inherits(t,Y);var b=t;Be.exports=b},"y0+3":function(Be,J,L){"use strict";L.d(J,"a",function(){return o}),L.d(J,"b",function(){return f});var Y=/margin|padding|width|height|max|min|offset/,B={left:!0,top:!0},I={cssFloat:1,styleFloat:1,float:1};function F(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function T(a,i,d){if(i=i.toLowerCase(),d==="auto"){if(i==="height")return a.offsetHeight;if(i==="width")return a.offsetWidth}return i in B||(B[i]=Y.test(i)),B[i]?parseFloat(d)||0:d}function R(a,i){var d=arguments.length,s=F(a);return i=I[i]?"cssFloat"in a.style?"cssFloat":"styleFloat":i,d===1?s:T(a,i,s[i]||a.style[i])}function P(a,i,d){var s=arguments.length;if(i=I[i]?"cssFloat"in a.style?"cssFloat":"styleFloat":i,s===3)return typeof d=="number"&&Y.test(i)&&(d="".concat(d,"px")),a.style[i]=d,d;for(var n in i)i.hasOwnProperty(n)&&P(a,n,i[n]);return F(a)}function m(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function t(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function b(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:i}}function o(){var a=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:i}}function u(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function f(a){var i=a.getBoundingClientRect(),d=document.documentElement;return{left:i.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},y23F:function(Be,J){function L(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}L.prototype={constructor:L,_dragStart:function(I){for(var F=I.target;F&&!F.draggable;)F=F.parent;F&&(this._draggingTarget=F,F.dragging=!0,this._x=I.offsetX,this._y=I.offsetY,this.dispatchToElement(Y(F,I),"dragstart",I.event))},_drag:function(I){var F=this._draggingTarget;if(F){var T=I.offsetX,R=I.offsetY,P=T-this._x,m=R-this._y;this._x=T,this._y=R,F.drift(P,m,I),this.dispatchToElement(Y(F,I),"drag",I.event);var t=this.findHover(T,R,F).target,b=this._dropTarget;this._dropTarget=t,F!==t&&(b&&t!==b&&this.dispatchToElement(Y(b,I),"dragleave",I.event),t&&t!==b&&this.dispatchToElement(Y(t,I),"dragenter",I.event))}},_dragEnd:function(I){var F=this._draggingTarget;F&&(F.dragging=!1),this.dispatchToElement(Y(F,I),"dragend",I.event),this._dropTarget&&this.dispatchToElement(Y(this._dropTarget,I),"drop",I.event),this._draggingTarget=null,this._dropTarget=null}};function Y(I,F){return{target:I,topTarget:F&&F.topTarget}}var B=L;Be.exports=B},yQHh:function(Be,J,L){},"yTi+":function(Be,J,L){Be.exports=L.p+"static/AssistantCode3.fdd8db3c.jpeg"},yxFR:function(Be,J,L){var Y=L("y+Vt"),B=L("nPnh"),I=B.subPixelOptimizeLine,F={},T=Y.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(R,P){var m,t,b,o;this.subPixelOptimize?(I(F,P,this.style),m=F.x1,t=F.y1,b=F.x2,o=F.y2):(m=P.x1,t=P.y1,b=P.x2,o=P.y2);var u=P.percent;if(u===0)return;R.moveTo(m,t),u<1&&(b=m*(1-u)+b*u,o=t*(1-u)+o*u),R.lineTo(b,o)},pointAt:function(R){var P=this.shape;return[P.x1*(1-R)+P.x2*R,P.y1*(1-R)+P.y2*R]}});Be.exports=T},zarK:function(Be,J,L){var Y=L("YH21"),B=Y.addEventListener,I=Y.removeEventListener,F=Y.normalizeEvent,T=Y.getNativeEvent,R=L("bYtY"),P=L("H6uX"),m=L("ItGF"),t=300,b=m.domSupported,o=function(){var g=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],j=["touchstart","touchend","touchmove"],U={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},S=R.map(g,function(z){var H=z.replace("mouse","pointer");return U.hasOwnProperty(H)?H:z});return{mouse:g,touch:j,pointer:S}}(),u={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function f(g){return g==="mousewheel"&&m.browser.firefox?"DOMMouseScroll":g}function a(g){var j=g.pointerType;return j==="pen"||j==="touch"}function i(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 d(g){g&&(g.zrByTouch=!0)}function s(g,j){return F(g.dom,new l(g,j),!0)}function n(g,j){for(var U=j,S=!1;U&&U.nodeType!==9&&!(S=U.domBelongToZr||U!==j&&U===g.painterRoot);)U=U.parentNode;return S}function l(g,j){this.type=j.type,this.target=this.currentTarget=g.dom,this.pointerType=j.pointerType,this.clientX=j.clientX,this.clientY=j.clientY}var c=l.prototype;c.stopPropagation=c.stopImmediatePropagation=c.preventDefault=R.noop;var x={mousedown:function(g){g=F(this.dom,g),this._mayPointerCapture=[g.zrX,g.zrY],this.trigger("mousedown",g)},mousemove:function(g){g=F(this.dom,g);var j=this._mayPointerCapture;j&&(g.zrX!==j[0]||g.zrY!==j[1])&&h(this,!0),this.trigger("mousemove",g)},mouseup:function(g){g=F(this.dom,g),h(this,!1),this.trigger("mouseup",g)},mouseout:function(g){g=F(this.dom,g),this._pointerCapturing&&(g.zrEventControl="no_globalout");var j=g.toElement||g.relatedTarget;g.zrIsToLocalDOM=n(this,j),this.trigger("mouseout",g)},touchstart:function(g){g=F(this.dom,g),d(g),this._lastTouchMoment=new Date,this.handler.processGesture(g,"start"),x.mousemove.call(this,g),x.mousedown.call(this,g)},touchmove:function(g){g=F(this.dom,g),d(g),this.handler.processGesture(g,"change"),x.mousemove.call(this,g)},touchend:function(g){g=F(this.dom,g),d(g),this.handler.processGesture(g,"end"),x.mouseup.call(this,g),+new Date-this._lastTouchMoment<t&&x.click.call(this,g)},pointerdown:function(g){x.mousedown.call(this,g)},pointermove:function(g){a(g)||x.mousemove.call(this,g)},pointerup:function(g){x.mouseup.call(this,g)},pointerout:function(g){a(g)||x.mouseout.call(this,g)}};R.each(["click","mousewheel","dblclick","contextmenu"],function(g){x[g]=function(j){j=F(this.dom,j),this.trigger(g,j)}});var A={pointermove:function(g){a(g)||A.mousemove.call(this,g)},pointerup:function(g){A.mouseup.call(this,g)},mousemove:function(g){this.trigger("mousemove",g)},mouseup:function(g){var j=this._pointerCapturing;h(this,!1),this.trigger("mouseup",g),j&&(g.zrEventControl="only_globalout",this.trigger("mouseout",g))}};function C(g,j){var U=j.domHandlers;m.pointerEventsSupported?R.each(o.pointer,function(S){w(j,S,function(z){U[S].call(g,z)})}):(m.touchEventsSupported&&R.each(o.touch,function(S){w(j,S,function(z){U[S].call(g,z),i(j)})}),R.each(o.mouse,function(S){w(j,S,function(z){z=T(z),j.touching||U[S].call(g,z)})}))}function k(g,j){m.pointerEventsSupported?R.each(u.pointer,U):m.touchEventsSupported||R.each(u.mouse,U);function U(S){function z(H){H=T(H),n(g,H.target)||(H=s(g,H),j.domHandlers[S].call(g,H))}w(j,S,z,{capture:!0})}}function w(g,j,U,S){g.mounted[j]=U,g.listenerOpts[j]=S,B(g.domTarget,f(j),U,S)}function y(g){var j=g.mounted;for(var U in j)j.hasOwnProperty(U)&&I(g.domTarget,f(U),j[U],g.listenerOpts[U]);g.mounted={}}function h(g,j){if(g._mayPointerCapture=null,b&&g._pointerCapturing^j){g._pointerCapturing=j;var U=g._globalHandlerScope;j?k(g,U):y(U)}}function p(g,j){this.domTarget=g,this.domHandlers=j,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function v(g,j){P.call(this),this.dom=g,this.painterRoot=j,this._localHandlerScope=new p(g,x),b&&(this._globalHandlerScope=new p(document,A)),this._pointerCapturing=!1,this._mayPointerCapture=null,C(this,this._localHandlerScope)}var _=v.prototype;_.dispose=function(){y(this._localHandlerScope),b&&y(this._globalHandlerScope)},_.setCursor=function(g){this.dom.style&&(this.dom.style.cursor=g||"default")},R.mixin(v,P);var E=v;Be.exports=E},zetH:function(Be,J,L){Be.exports={flex_box_center:"flex_box_center___Joa_H",flex_space_between:"flex_space_between___3VhCy",flex_box_vertical_center:"flex_box_vertical_center___3wSNZ",flex_box_center_end:"flex_box_center_end___3z8HR",flex_box_column:"flex_box_column___KdHzx",form:"form___3KoYn",efficiency:"efficiency___1LMk4"}}}]);