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.
457 lines
1.7 MiB
457 lines
1.7 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[111,3,5,7,8,14],{"+NIl":function(We,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";Y.defineMode("stex",function(B,I){"use strict";function F(a,o){a.cmdState.push(o)}function S(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function R(a){var o=a.cmdState.pop();o&&o.closeBracket()}function P(a){for(var o=a.cmdState,c=o.length-1;c>=0;c--){var l=o[c];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function y(a,o,c){return function(){this.name=a,this.bracketNo=0,this.style=o,this.styles=c,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=y("importmodule","tag",["string","builtin"]),t.documentclass=y("documentclass","tag",["","atom"]),t.usepackage=y("usepackage","tag",["atom"]),t.begin=y("begin","tag",["atom"]),t.end=y("end","tag",["atom"]),t.label=y("label","tag",["atom"]),t.ref=y("ref","tag",["atom"]),t.eqref=y("eqref","tag",["atom"]),t.cite=y("cite","tag",["atom"]),t.bibitem=y("bibitem","tag",["atom"]),t.Bibitem=y("Bibitem","tag",["atom"]),t.RBibitem=y("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function b(a,o){a.f=o}function i(a,o){var c;if(a.match(/^\\[a-zA-Z@]+/)){var l=a.current().slice(1);return c=t.hasOwnProperty(l)?t[l]:t.DEFAULT,c=new c,F(o,c),b(o,f),c.style}if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/\\]/))return"tag";if(a.match("\\["))return b(o,function(s,d){return u(s,d,"\\]")}),"keyword";if(a.match("\\("))return b(o,function(s,d){return u(s,d,"\\)")}),"keyword";if(a.match("$$"))return b(o,function(s,d){return u(s,d,"$$")}),"keyword";if(a.match("$"))return b(o,function(s,d){return u(s,d,"$")}),"keyword";var n=a.next();if(n=="%")return a.skipToEnd(),"comment";if(n=="}"||n=="]"){if(c=S(o),c)c.closeBracket(n),b(o,f);else return"error";return"bracket"}else return n=="{"||n=="["?(c=t.DEFAULT,c=new c,F(o,c),"bracket"):/\d/.test(n)?(a.eatWhile(/[\w.%]/),"atom"):(a.eatWhile(/[\w\-_]/),c=P(o),c.name=="begin"&&(c.argument=a.current()),c.styleIdentifier())}function u(a,o,c){if(a.eatSpace())return null;if(c&&a.match(c))return b(o,i),"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 l=a.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(a.skipToEnd(),"comment"):"error"}function f(a,o){var c=a.peek(),l;return c=="{"||c=="["?(l=S(o),l.openBracket(c),a.eat(c),b(o,i),"bracket"):/[ \t\r]/.test(c)?(a.eat(c),null):(b(o,i),R(o),i(a,o))}return{startState:function(){var a=I.inMathMode?function(o,c){return u(o,c)}:i;return{cmdState:[],f:a}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,o){return o.f(a,o)},blankLine:function(a){a.f=i,a.cmdState.length=0},lineComment:"%"}}),Y.defineMIME("text/x-stex","stex"),Y.defineMIME("text/x-latex","stex")})},"+ua5":function(We,J,L){},"/cxE":function(We,J,L){"use strict";L.d(J,"f",function(){return I}),L.d(J,"g",function(){return F}),L.d(J,"h",function(){return S}),L.d(J,"e",function(){return P}),L.d(J,"b",function(){return y}),L.d(J,"c",function(){return t}),L.d(J,"d",function(){return b}),L.d(J,"a",function(){return i});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 S(u){if(u instanceof Error){let{name:f,message:a}=u;const o=u.stacktrace||u.stack;return{$isError:!0,name:f,message:a,stack:o}}return u}const R="Canceled";function P(u){return u instanceof Error&&u.name===R&&u.message===R}function y(){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 i extends Error{constructor(u){super("NotSupported");u&&(this.message=u)}}},"06Qe":function(We,J,L){var Y=L("ItGF"),B="urn:schemas-microsoft-com:vml",I=typeof window=="undefined"?null:window,F=!1,S=I&&I.document;function R(t){return P(t)}var P;if(S&&!Y.canvasSupported)try{!S.namespaces.zrvml&&S.namespaces.add("zrvml",B),P=function(t){return S.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){P=function(b){return S.createElement("<"+b+' xmlns="'+B+'" class="zrvml">')}}function y(){if(F||!S)return;F=!0;var t=S.styleSheets;t.length<31?S.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}J.doc=S,J.createNode=R,J.initVML=y},"0s+r":function(We,J,L){var Y=L("bYtY"),B=L("QBsz"),I=L("y23F"),F=L("H6uX"),S=L("YH21"),R=L("C0SR"),P="silent";function y(c,l,n){return{type:c,event:n,target:l.target,topTarget:l.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(){S.stop(this.event)}function b(){}b.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],u=function(c,l,n,s){F.call(this),this.storage=c,this.painter=l,this.painterRoot=s,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(c){this.proxy&&this.proxy.dispose(),c&&(Y.each(i,function(l){c.on&&c.on(l,this[l],this)},this),c.handler=this),this.proxy=c},mousemove:function(c){var l=c.zrX,n=c.zrY,s=a(this,l,n),d=this._hovered,E=d.target;E&&!E.__zr&&(d=this.findHover(d.x,d.y),E=d.target);var A=this._hovered=s?{x:l,y:n}:this.findHover(l,n),C=A.target,k=this.proxy;k.setCursor&&k.setCursor(C?C.cursor:"default"),E&&C!==E&&this.dispatchToElement(d,"mouseout",c),this.dispatchToElement(A,"mousemove",c),C&&C!==E&&this.dispatchToElement(A,"mouseover",c)},mouseout:function(c){var l=c.zrEventControl,n=c.zrIsToLocalDOM;l!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",c),l!=="no_globalout"&&(!n&&this.trigger("globalout",{type:"globalout",event:c}))},resize:function(c){this._hovered={}},dispatch:function(c,l){var n=this[c];n&&n.call(this,l)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(c){var l=this.proxy;l.setCursor&&l.setCursor(c)},dispatchToElement:function(c,l,n){c=c||{};var s=c.target;if(s&&s.silent)return;for(var d="on"+l,E=y(l,c,n);s&&!(s[d]&&(E.cancelBubble=s[d].call(s,E)),s.trigger(l,E),s=s.parent,E.cancelBubble););E.cancelBubble||(this.trigger(l,E),this.painter&&this.painter.eachOtherLayer(function(A){typeof A[d]=="function"&&A[d].call(A,E),A.trigger&&A.trigger(l,E)}))},findHover:function(c,l,n){for(var s=this.storage.getDisplayList(),d={x:c,y:l},E=s.length-1;E>=0;E--){var A;if(s[E]!==n&&!s[E].ignore&&(A=f(s[E],c,l))&&(!d.topTarget&&(d.topTarget=s[E]),A!==P)){d.target=s[E];break}}return d},processGesture:function(c,l){this._gestureMgr||(this._gestureMgr=new R);var n=this._gestureMgr;l==="start"&&n.clear();var s=n.recognize(c,this.findHover(c.zrX,c.zrY,null).target,this.proxy.dom);if(l==="end"&&n.clear(),s){var d=s.type;c.gestureEvent=d,this.dispatchToElement({target:s.target},d,s.event)}}},Y.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(c){u.prototype[c]=function(l){var n=l.zrX,s=l.zrY,d=a(this,n,s),E,A;if((c!=="mouseup"||!d)&&(E=this.findHover(n,s),A=E.target),c==="mousedown")this._downEl=A,this._downPoint=[l.zrX,l.zrY],this._upEl=A;else if(c==="mouseup")this._upEl=A;else if(c==="click"){if(this._downEl!==this._upEl||!this._downPoint||B.dist(this._downPoint,[l.zrX,l.zrY])>4)return;this._downPoint=null}this.dispatchToElement(E,c,l)}});function f(c,l,n){if(c[c.rectHover?"rectContain":"contain"](l,n)){for(var s=c,d;s;){if(s.clipPath&&!s.clipPath.contain(l,n))return!1;s.silent&&(d=!0),s=s.parent}return d?P:!0}return!1}function a(c,l,n){var s=c.painter;return l<0||l>s.getWidth()||n<0||n>s.getHeight()}Y.mixin(u,F),Y.mixin(u,I);var o=u;We.exports=o},"19Vz":function(We,J,L){(function(Y){Y(L("VrN/"))})(function(Y){Y.defineOption("placeholder","",function(y,t,b){var i=b&&b!=Y.Init;if(t&&!i)y.on("blur",S),y.on("change",R),y.on("swapDoc",R),Y.on(y.getInputField(),"compositionupdate",y.state.placeholderCompose=function(){F(y)}),R(y);else if(!t&&i){y.off("blur",S),y.off("change",R),y.off("swapDoc",R),Y.off(y.getInputField(),"compositionupdate",y.state.placeholderCompose),B(y);var u=y.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}t&&!y.hasFocus()&&S(y)});function B(y){y.state.placeholder&&(y.state.placeholder.parentNode.removeChild(y.state.placeholder),y.state.placeholder=null)}function I(y){B(y);var t=y.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=y.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var b=y.getOption("placeholder");typeof b=="string"&&(b=document.createTextNode(b)),t.appendChild(b),y.display.lineSpace.insertBefore(t,y.display.lineSpace.firstChild)}function F(y){setTimeout(function(){var t=!1,b=y.getInputField();b.nodeName=="TEXTAREA"?t=!b.value:y.lineCount()==1&&(t=!/[^\u200b]/.test(b.querySelector(".CodeMirror-line").textContent)),t?I(y):B(y)},20)}function S(y){P(y)&&I(y)}function R(y){var t=y.getWrapperElement(),b=P(y);t.className=t.className.replace(" CodeMirror-empty","")+(b?" CodeMirror-empty":""),b?I(y):B(y)}function P(y){return y.lineCount()===1&&y.getLine(0)===""}})},"1Jh7":function(We,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,S){B.buildPath(F,S,!1)}});We.exports=I},"1MYJ":function(We,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,S=0;S<F.length;S++)I=I||F[S].__dirtyPath;this.__dirtyPath=I,this.__dirty=this.__dirty||I},beforeBrush:function(){this._updatePathDirty();for(var I=this.shape.paths||[],F=this.getGlobalScale(),S=0;S<I.length;S++)I[S].path||I[S].createPathProxy(),I[S].path.setScale(F[0],F[1],I[S].segmentIgnoreThreshold)},buildPath:function(I,F){for(var S=F.paths||[],R=0;R<S.length;R++)S[R].buildPath(I,S[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)}});We.exports=B},"1RvN":function(We,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,y=R.next;P?P.next=y:this.head=y,y?y.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 y=this._list,t=this._map,b=null;if(t[R]==null){var i=y.len(),u=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var f=y.head;y.remove(f),delete t[f.key],b=f.value,this._lastRemovedEntry=f}u?u.value=P:u=new B(P),u.key=R,y.insertEntry(u),t[R]=u}return b},F.get=function(R){var P=this._map[R],y=this._list;if(P!=null)return P!==y.tail&&(y.remove(P),y.insertEntry(P)),P.value},F.clear=function(){this._list.clear(),this._map={}};var S=I;We.exports=S},"1bdT":function(We,J,L){var Y=L("3gBT"),B=L("H6uX"),I=L("DN4a"),F=L("vWvF"),S=L("bYtY"),R=function(y){I.call(this,y),B.call(this,y),F.call(this,y),this.id=y.id||Y()};R.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(y,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":y=0;break}var b=this.transform;b||(b=this.transform=[1,0,0,1,0,0]),b[4]+=y,b[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(y,t){},attrKV:function(y,t){if(y==="position"||y==="scale"||y==="origin"){if(t){var b=this[y];b||(b=this[y]=[]),b[0]=t[0],b[1]=t[1]}}else this[y]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(y,t){if(typeof y=="string")this.attrKV(y,t);else if(S.isObject(y))for(var b in y)y.hasOwnProperty(b)&&this.attrKV(b,y[b]);return this.dirty(!1),this},setClipPath:function(y){var t=this.__zr;t&&y.addSelfToZr(t),this.clipPath&&this.clipPath!==y&&this.removeClipPath(),this.clipPath=y,y.__zr=t,y.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var y=this.clipPath;y&&(y.__zr&&y.removeSelfFromZr(y.__zr),y.__zr=null,y.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(y){this.__zr=y;var t=this.animators;if(t)for(var b=0;b<t.length;b++)y.animation.addAnimator(t[b]);this.clipPath&&this.clipPath.addSelfToZr(y)},removeSelfFromZr:function(y){this.__zr=null;var t=this.animators;if(t)for(var b=0;b<t.length;b++)y.animation.removeAnimator(t[b]);this.clipPath&&this.clipPath.removeSelfFromZr(y)}},S.mixin(R,F),S.mixin(R,I),S.mixin(R,B);var P=R;We.exports=P},"1eCo":function(We,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,S){var R=F.indentUnit,P={},y=S.htmlMode?B:I;for(var t in y)P[t]=y[t];for(var t in S)P[t]=S[t];var b,i;function u(m,_){function x(U){return _.tokenize=U,U(m,_)}var v=m.next();if(v=="<")return m.eat("!")?m.eat("[")?m.match("CDATA[")?x(o("atom","]]>")):null:m.match("--")?x(o("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),x(c(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),_.tokenize=o("meta","?>"),"meta"):(b=m.eat("/")?"closeTag":"openTag",_.tokenize=f,"tag bracket");if(v=="&"){var j;return m.eat("#")?m.eat("x")?j=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):j=m.eatWhile(/[\d]/)&&m.eat(";"):j=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),j?"atom":"error"}else return m.eatWhile(/[^&<]/),null}u.isInText=!0;function f(m,_){var x=m.next();if(x==">"||x=="/"&&m.eat(">"))return _.tokenize=u,b=x==">"?"endTag":"selfcloseTag","tag bracket";if(x=="=")return b="equals",null;if(x=="<"){_.tokenize=u,_.state=d,_.tagName=_.tagStart=null;var v=_.tokenize(m,_);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(x)?(_.tokenize=a(x),_.stringStartCol=m.column(),_.tokenize(m,_)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(m){var _=function(x,v){for(;!x.eol();)if(x.next()==m){v.tokenize=f;break}return"string"};return _.isInAttribute=!0,_}function o(m,_){return function(x,v){for(;!x.eol();){if(x.match(_)){v.tokenize=u;break}x.next()}return m}}function c(m){return function(_,x){for(var v;(v=_.next())!=null;){if(v=="<")return x.tokenize=c(m+1),x.tokenize(_,x);if(v==">")if(m==1){x.tokenize=u;break}else return x.tokenize=c(m-1),x.tokenize(_,x)}return"meta"}}function l(m,_,x){this.prev=m.context,this.tagName=_,this.indent=m.indented,this.startOfLine=x,(P.doNotIndent.hasOwnProperty(_)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function n(m){m.context&&(m.context=m.context.prev)}function s(m,_){for(var x;;){if(!m.context)return;if(x=m.context.tagName,!P.contextGrabbers.hasOwnProperty(x)||!P.contextGrabbers[x].hasOwnProperty(_))return;n(m)}}function d(m,_,x){return m=="openTag"?(x.tagStart=_.column(),E):m=="closeTag"?A:d}function E(m,_,x){return m=="word"?(x.tagName=_.current(),i="tag",w):P.allowMissingTagName&&m=="endTag"?(i="tag bracket",w(m,_,x)):(i="error",E)}function A(m,_,x){if(m=="word"){var v=_.current();return x.context&&x.context.tagName!=v&&P.implicitlyClosed.hasOwnProperty(x.context.tagName)&&n(x),x.context&&x.context.tagName==v||P.matchClosing===!1?(i="tag",C):(i="tag error",k)}else return P.allowMissingTagName&&m=="endTag"?(i="tag bracket",C(m,_,x)):(i="error",k)}function C(m,_,x){return m!="endTag"?(i="error",C):(n(x),d)}function k(m,_,x){return i="error",C(m,_,x)}function w(m,_,x){if(m=="word")return i="attribute",g;if(m=="endTag"||m=="selfcloseTag"){var v=x.tagName,j=x.tagStart;return x.tagName=x.tagStart=null,m=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(v)?s(x,v):(s(x,v),x.context=new l(x,v,j==x.indented)),d}return i="error",w}function g(m,_,x){return m=="equals"?h:(P.allowMissing||(i="error"),w(m,_,x))}function h(m,_,x){return m=="string"?p:m=="word"&&P.allowUnquoted?(i="string",w):(i="error",w(m,_,x))}function p(m,_,x){return m=="string"?p:w(m,_,x)}return{startState:function(m){var _={tokenize:u,state:d,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(_.baseIndent=m),_},token:function(m,_){if(!_.tagName&&m.sol()&&(_.indented=m.indentation()),m.eatSpace())return null;b=null;var x=_.tokenize(m,_);return(x||b)&&x!="comment"&&(i=null,_.state=_.state(b||x,m,_),i&&(x=i=="error"?x+" error":i)),x},indent:function(m,_,x){var v=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+R;if(v&&v.noIndent)return Y.Pass;if(m.tokenize!=f&&m.tokenize!=u)return x?x.match(/^(\s*)/)[0].length:0;if(m.tagName)return P.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+R*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/<!\[CDATA\[/.test(_))return 0;var j=_&&/^<(\/)?([\w_:\.-]*)/.exec(_);if(j&&j[1])for(;v;)if(v.tagName==j[2]){v=v.prev;break}else if(P.implicitlyClosed.hasOwnProperty(v.tagName))v=v.prev;else break;else if(j)for(;v;){var U=P.contextGrabbers[v.tagName];if(U&&U.hasOwnProperty(j[2]))v=v.prev;else break}for(;v&&v.prev&&!v.startOfLine;)v=v.prev;return v?v.indent+R:m.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(m){m.state==h&&(m.state=w)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var _=[],x=m.context;x;x=x.prev)x.tagName&&_.push(x.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(We,J,L){"use strict";L.d(J,"d",function(){return ot}),L.d(J,"b",function(){return Se}),L.d(J,"c",function(){return xt}),L.d(J,"a",function(){return on});var Y=L("VTBJ"),B=L("1OyB"),I=L("vuIU"),F=L("JX7q"),S=L("Ji7U"),R=L("LK+K"),P=L("q1tI"),y=L("I8Z2"),t=L("BGR+"),b=L("wx14"),i=L("rePB"),u=L("4IlW"),f=L("2GS6"),a=L("Gytx"),o=L.n(a),c=L("TSYQ"),l=L.n(c),n=L("U8pU"),s=L("ODXe"),d=/iPhone/i,E=/iPod/i,A=/iPad/i,C=/\bAndroid(?:.+)Mobile\b/i,k=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,h=/Windows Phone/i,p=/\bWindows(?:.+)ARM\b/i,m=/BlackBerry/i,_=/BB10/i,x=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,j=/Mobile(?:.+)Firefox\b/i;function U(Kt,Ot){return Kt.test(Ot)}function T(Kt){var Ot=Kt||(typeof navigator!="undefined"?navigator.userAgent:""),Rt=Ot.split("[FBAN");if(typeof Rt[1]!="undefined"){var ft=Rt,be=Object(s.a)(ft,1);Ot=be[0]}if(Rt=Ot.split("Twitter"),typeof Rt[1]!="undefined"){var Fe=Rt,Ut=Object(s.a)(Fe,1);Ot=Ut[0]}var _t={apple:{phone:U(d,Ot)&&!U(h,Ot),ipod:U(E,Ot),tablet:!U(d,Ot)&&U(A,Ot)&&!U(h,Ot),device:(U(d,Ot)||U(E,Ot)||U(A,Ot))&&!U(h,Ot)},amazon:{phone:U(w,Ot),tablet:!U(w,Ot)&&U(g,Ot),device:U(w,Ot)||U(g,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(g,Ot)||U(k,Ot)),device:!U(h,Ot)&&(U(w,Ot)||U(g,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(m,Ot),blackberry10:U(_,Ot),opera:U(x,Ot),firefox:U(j,Ot),chrome:U(v,Ot),device:U(m,Ot)||U(_,Ot)||U(x,Ot)||U(j,Ot)||U(v,Ot)},any:null,phone:null,tablet:null};return _t.any=_t.apple.device||_t.android.device||_t.windows.device||_t.other.device,_t.phone=_t.apple.phone||_t.android.phone||_t.windows.phone,_t.tablet=_t.apple.tablet||_t.android.tablet||_t.windows.tablet,_t}var z=Object(Y.a)(Object(Y.a)({},T()),{},{isMobile:T}),H=z;function M(){}function V(Kt,Ot,Rt){var ft=Ot||"";return Kt.key||"".concat(ft,"item_").concat(Rt)}function K(Kt){return"".concat(Kt,"-menu-")}function $(Kt,Ot){var Rt=-1;P.Children.forEach(Kt,function(ft){Rt+=1,ft&&ft.type&&ft.type.isMenuItemGroup?P.Children.forEach(ft.props.children,function(be){Rt+=1,Ot(be,Rt)}):Ot(ft,Rt)})}function Z(Kt,Ot,Rt){if(!Kt||Rt.find)return;P.Children.forEach(Kt,function(ft){if(ft){var be=ft.type;if(!be||!(be.isSubMenu||be.isMenuItem||be.isMenuItemGroup))return;Ot.indexOf(ft.key)!==-1?Rt.find=!0:ft.props.children&&Z(ft.props.children,Ot,Rt)}})}var ve=["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 Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft=Ot&&typeof Ot.getBoundingClientRect=="function"&&Ot.getBoundingClientRect().width;if(ft){if(Rt){var be=getComputedStyle(Ot),Fe=be.marginLeft,Ut=be.marginRight;ft+=+Fe.replace("px","")+ +Ut.replace("px","")}ft=+ft.toFixed(6)}return ft||0},fe=function(Ot,Rt,ft){Ot&&Object(n.a)(Ot.style)==="object"&&(Ot.style[Rt]=ft)},ye=function(){return H.any},Pe=L("KQm4"),ge=L("Ff2n"),de=L("i8i4"),Qe=L("bdgK"),St=L("uciX"),Ee=L("8XRh"),De={adjustX:1,adjustY:1},rt={topLeft:{points:["bl","tl"],overflow:De,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:De,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:De,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:De,offset:[4,0]}},Be={topLeft:{points:["bl","tl"],overflow:De,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:De,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:De,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:De,offset:[4,0]}},ke=rt,ut=0,ie={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},xe=function(Ot,Rt,ft){var be=K(Rt),Fe=Ot.getState();Ot.setState({defaultActiveFirst:Object(Y.a)(Object(Y.a)({},Fe.defaultActiveFirst),{},Object(i.a)({},be,ft))})},we=function(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(ft){var be;Object(B.a)(this,Rt),be=Ot.call(this,ft),be.onDestroy=function(Ge){be.props.onDestroy(Ge)},be.onKeyDown=function(Ge){var dt=Ge.keyCode,Pt=be.menuInstance,zt=be.props,ln=zt.isOpen,vn=zt.store;if(dt===u.a.ENTER)return be.onTitleClick(Ge),xe(vn,be.props.eventKey,!0),!0;if(dt===u.a.RIGHT)return ln?Pt.onKeyDown(Ge):(be.triggerOpenChange(!0),xe(vn,be.props.eventKey,!0)),!0;if(dt===u.a.LEFT){var nr;if(ln)nr=Pt.onKeyDown(Ge);else return;return nr||(be.triggerOpenChange(!1),nr=!0),nr}return ln&&(dt===u.a.UP||dt===u.a.DOWN)?Pt.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 dt=be.props,Pt=dt.eventKey,zt=dt.onMouseEnter,ln=dt.store;xe(ln,be.props.eventKey,!1),zt({key:Pt,domEvent:Ge})},be.onMouseLeave=function(Ge){var dt=be.props,Pt=dt.parentMenu,zt=dt.eventKey,ln=dt.onMouseLeave;Pt.subMenuInstance=Object(F.a)(be),ln({key:zt,domEvent:Ge})},be.onTitleMouseEnter=function(Ge){var dt=be.props,Pt=dt.eventKey,zt=dt.onItemHover,ln=dt.onTitleMouseEnter;zt({key:Pt,hover:!0}),ln({key:Pt,domEvent:Ge})},be.onTitleMouseLeave=function(Ge){var dt=be.props,Pt=dt.parentMenu,zt=dt.eventKey,ln=dt.onItemHover,vn=dt.onTitleMouseLeave;Pt.subMenuInstance=Object(F.a)(be),ln({key:zt,hover:!1}),vn({key:zt,domEvent:Ge})},be.onTitleClick=function(Ge){var dt=Object(F.a)(be),Pt=dt.props;if(Pt.onTitleClick({key:Pt.eventKey,domEvent:Ge}),Pt.triggerSubMenuAction==="hover")return;be.triggerOpenChange(!Pt.isOpen,"click"),xe(Pt.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,dt){var Pt=be.props.eventKey,zt=function(){be.onOpenChange({key:Pt,item:Object(F.a)(be),trigger:dt,open:Ge})};dt==="mouseenter"?be.mouseenterTimeout=setTimeout(function(){zt()},0):zt()},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),dt=Ge.props;return{mode:dt.mode==="horizontal"?"vertical":dt.mode,visible:be.props.isOpen,level:dt.level+1,inlineIndent:dt.inlineIndent,focusable:!1,onClick:be.onSubMenuClick,onSelect:be.onSelect,onDeselect:be.onDeselect,onDestroy:be.onDestroy,selectedKeys:dt.selectedKeys,eventKey:"".concat(dt.eventKey,"-menu-"),openKeys:dt.openKeys,motion:dt.motion,onOpenChange:be.onOpenChange,subMenuOpenDelay:dt.subMenuOpenDelay,parentMenu:Object(F.a)(be),subMenuCloseDelay:dt.subMenuCloseDelay,forceSubMenuRender:dt.forceSubMenuRender,triggerSubMenuAction:dt.triggerSubMenuAction,builtinPlacements:dt.builtinPlacements,defaultActiveFirst:dt.store.getState().defaultActiveFirst[K(dt.eventKey)],multiple:dt.multiple,prefixCls:dt.rootPrefixCls,id:be.internalMenuId,manualRef:be.saveMenuInstance,itemIcon:dt.itemIcon,expandIcon:dt.expandIcon,direction:dt.direction}},be.getMotion=function(Ge,dt){var Pt=Object(F.a)(be),zt=Pt.haveRendered,ln=be.props,vn=ln.motion,nr=ln.rootPrefixCls,Kn=Object(Y.a)(Object(Y.a)({},vn),{},{leavedClassName:"".concat(nr,"-hidden"),removeOnLeave:!1,motionAppear:zt||!dt||Ge!=="inline"});return Kn};var Fe=ft.store,Ut=ft.eventKey,_t=Fe.getState(),Gt=_t.defaultActiveFirst;be.isRootMenu=!1;var en=!1;return Gt&&(en=Gt[Ut]),xe(Fe,Ut,en),be}return Object(I.a)(Rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var be=this,Fe=this.props,Ut=Fe.mode,_t=Fe.parentMenu,Gt=Fe.manualRef;if(Gt&&Gt(this),Ut!=="horizontal"||!_t.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return be.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var be=this.props,Fe=be.onDestroy,Ut=be.eventKey;Fe&&Fe(Ut),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(be){var Fe=this,Ut=this.getBaseProps(),_t=this.getMotion(Ut.mode,Ut.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ut.visible||Ut.forceSubMenuRender,!this.haveOpened)return P.createElement("div",null);var Gt=Ut.direction;return P.createElement(Ee.default,Object.assign({visible:Ut.visible},_t),function(en){var Ge=en.className,dt=en.style,Pt=l()("".concat(Ut.prefixCls,"-sub"),Ge,Object(i.a)({},"".concat(Ut.prefixCls,"-rtl"),Gt==="rtl"));return P.createElement(Ne,Object.assign({},Ut,{id:Fe.internalMenuId,className:Pt,style:dt}),be)})}},{key:"render",value:function(){var be,Fe=Object(Y.a)({},this.props),Ut=Fe.isOpen,_t=this.getPrefixCls(),Gt=Fe.mode==="inline",en=l()(_t,"".concat(_t,"-").concat(Fe.mode),(be={},Object(i.a)(be,Fe.className,!!Fe.className),Object(i.a)(be,this.getOpenClassName(),Ut),Object(i.a)(be,this.getActiveClassName(),Fe.active||Ut&&!Gt),Object(i.a)(be,this.getDisabledClassName(),Fe.disabled),Object(i.a)(be,this.getSelectedClassName(),this.isChildrenSelected()),be));this.internalMenuId||(Fe.eventKey?this.internalMenuId="".concat(Fe.eventKey,"$Menu"):(ut+=1,this.internalMenuId="$__$".concat(ut,"$Menu")));var Ge={},dt={},Pt={};Fe.disabled||(Ge={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},dt={onClick:this.onTitleClick},Pt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var zt={},ln=Fe.direction;Gt&&(ln==="rtl"?zt.paddingRight=Fe.inlineIndent*Fe.level:zt.paddingLeft=Fe.inlineIndent*Fe.level);var vn={};this.props.isOpen&&(vn={"aria-owns":this.internalMenuId});var nr=null;Fe.mode!=="horizontal"&&(nr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(nr=P.createElement(this.props.expandIcon,Object(Y.a)({},this.props))));var Kn=P.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:zt,className:"".concat(_t,"-title"),role:"button"},Pt,dt,{"aria-expanded":Ut},vn,{"aria-haspopup":"true",title:typeof Fe.title=="string"?Fe.title:void 0}),Fe.title,nr||P.createElement("i",{className:"".concat(_t,"-arrow")})),bn=this.renderChildren(Fe.children),xr=Fe.parentMenu.isRootMenu?Fe.parentMenu.props.getPopupContainer:function(Zr){return Zr.parentNode},Er=ie[Fe.mode],ar=Fe.popupOffset?{offset:Fe.popupOffset}:{},dr=Fe.mode==="inline"?"":Fe.popupClassName;dr+=ln==="rtl"?" ".concat(_t,"-rtl"):"";var Or=Fe.disabled,Kr=Fe.triggerSubMenuAction,ia=Fe.subMenuOpenDelay,hn=Fe.forceSubMenuRender,or=Fe.subMenuCloseDelay,ua=Fe.builtinPlacements;ve.forEach(function(Zr){return delete Fe[Zr]}),delete Fe.onClick;var ga=ln==="rtl"?Object.assign({},Be,ua):Object.assign({},rt,ua);return delete Fe.direction,P.createElement("li",Object.assign({},Fe,Ge,{className:en,role:"menuitem"}),Gt&&Kn,Gt&&bn,!Gt&&P.createElement(St.a,{prefixCls:_t,popupClassName:l()("".concat(_t,"-popup"),dr),getPopupContainer:xr,builtinPlacements:ga,popupPlacement:Er,popupVisible:Ut,popupAlign:ar,popup:bn,action:Or?[]:[Kr],mouseEnterDelay:ia,mouseLeaveDelay:or,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:hn},Kn))}}]),Rt}(P.Component);we.defaultProps={onMouseEnter:M,onMouseLeave:M,onTitleMouseEnter:M,onTitleMouseLeave:M,onTitleClick:M,manualRef:M,mode:"vertical",title:""};var Ke=Object(y.b)(function(Kt,Ot){var Rt=Kt.openKeys,ft=Kt.activeKey,be=Kt.selectedKeys,Fe=Ot.eventKey,Ut=Ot.subMenuKey;return{isOpen:Rt.indexOf(Fe)>-1,active:ft[Ut]===Fe,selectedKeys:be}})(we);Ke.isSubMenu=!0;var ot=Ke,gt="menuitem-overflowed",Nt=.5,He=function(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(){var ft;return Object(B.a)(this,Rt),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(Ut){return Ut.className.split(" ").indexOf("".concat(be,"-overflowed-submenu"))<0}):[]},ft.getOverflowedSubMenuItem=function(be,Fe,Ut){var _t=ft.props,Gt=_t.overflowedIndicator,en=_t.level,Ge=_t.mode,dt=_t.prefixCls,Pt=_t.theme;if(en!==1||Ge!=="horizontal")return null;var zt=ft.props.children[0],ln=zt.props,vn=ln.children,nr=ln.title,Kn=ln.style,bn=Object(ge.a)(ln,["children","title","style"]),xr=Object(Y.a)({},Kn),Er="".concat(be,"-overflowed-indicator"),ar="".concat(be,"-overflowed-indicator");Fe.length===0&&Ut!==!0?xr=Object(Y.a)(Object(Y.a)({},xr),{},{display:"none"}):Ut&&(xr=Object(Y.a)(Object(Y.a)({},xr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),ar="".concat(ar,"-placeholder"));var dr=Pt?"".concat(dt,"-").concat(Pt):"",Or={};return ve.forEach(function(Kr){bn[Kr]!==void 0&&(Or[Kr]=bn[Kr])}),P.createElement(ot,Object.assign({title:Gt,className:"".concat(dt,"-overflowed-submenu"),popupClassName:dr},Or,{key:Er,eventKey:ar,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 Ut=be.children[Fe.length-1];fe(Ut,"display","inline-block");var _t=ft.getMenuItemNodes(),Gt=_t.filter(function(en){return en.className.split(" ").indexOf(gt)>=0});Gt.forEach(function(en){fe(en,"display","inline-block")}),ft.menuItemSizes=_t.map(function(en){return oe(en,!0)}),Gt.forEach(function(en){fe(en,"display","none")}),ft.overflowedIndicatorWidth=oe(be.children[be.children.length-1],!0),ft.originalTotalWidth=ft.menuItemSizes.reduce(function(en,Ge){return en+Ge},0),ft.handleResize(),fe(Ut,"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 Ut=0,_t;ft.originalTotalWidth>Fe+Nt&&(_t=-1,ft.menuItemSizes.forEach(function(Gt){Ut+=Gt,Ut+ft.overflowedIndicatorWidth<=Fe&&(_t+=1)})),ft.setState({lastVisibleIndex:_t})},ft}return Object(I.a)(Rt,[{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 Qe.default(function(Ut){Ut.forEach(function(){var _t=be.cancelFrameId;cancelAnimationFrame(_t),be.cancelFrameId=requestAnimationFrame(be.setChildrenWidthAndResize)})}),[].slice.call(Fe.children).concat(Fe).forEach(function(Ut){be.resizeObserver.observe(Ut)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){be.resizeObserver.disconnect(),[].slice.call(Fe.children).concat(Fe).forEach(function(Ut){be.resizeObserver.observe(Ut)}),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,Ut=this.state.lastVisibleIndex;return(be||[]).reduce(function(_t,Gt,en){var Ge=Gt;if(Fe.props.mode==="horizontal"){var dt=Fe.getOverflowedSubMenuItem(Gt.props.eventKey,[]);Ut!==void 0&&Fe.props.className.indexOf("".concat(Fe.props.prefixCls,"-root"))!==-1&&(en>Ut&&(Ge=P.cloneElement(Gt,{style:{display:"none"},eventKey:"".concat(Gt.props.eventKey,"-hidden"),className:"".concat(gt)})),en===Ut+1&&(Fe.overflowedItems=be.slice(Ut+1).map(function(zt){return P.cloneElement(zt,{key:zt.props.eventKey,mode:"vertical-left"})}),dt=Fe.getOverflowedSubMenuItem(Gt.props.eventKey,Fe.overflowedItems)));var Pt=[].concat(Object(Pe.a)(_t),[dt,Ge]);return en===be.length-1&&Pt.push(Fe.getOverflowedSubMenuItem(Gt.props.eventKey,[],!0)),Pt}return[].concat(Object(Pe.a)(_t),[Ge])},[])}},{key:"render",value:function(){var be=this.props,Fe=be.visible,Ut=be.prefixCls,_t=be.overflowedIndicator,Gt=be.mode,en=be.level,Ge=be.tag,dt=be.children,Pt=be.theme,zt=Object(ge.a)(be,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ln=Ge;return P.createElement(ln,Object.assign({},zt),this.renderChildren(dt))}}]),Rt}(P.Component);He.defaultProps={tag:"div",className:""};var jt=He;function $t(Kt){return Kt.length?Kt.every(function(Ot){return!!Ot.props.disabled}):!0}function Ie(Kt,Ot,Rt){var ft=Kt.getState();Kt.setState({activeKey:Object(Y.a)(Object(Y.a)({},ft.activeKey),{},Object(i.a)({},Ot,Rt))})}function Ae(Kt){return Kt.eventKey||"0-menu-"}function ct(Kt,Ot){var Rt=Ot,ft=Kt.children,be=Kt.eventKey;if(Rt){var Fe;if($(ft,function(Ut,_t){Ut&&Ut.props&&!Ut.props.disabled&&Rt===V(Ut,be,_t)&&(Fe=!0)}),Fe)return Rt}return Rt=null,Kt.defaultActiveFirst&&$(ft,function(Ut,_t){!Rt&&Ut&&!Ut.props.disabled&&(Rt=V(Ut,be,_t))}),Rt}function Et(Kt){if(Kt){var Ot=this.instanceArray.indexOf(Kt);Ot!==-1?this.instanceArray[Ot]=Kt:this.instanceArray.push(Kt)}}var Ze=function(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(ft){var be;return Object(B.a)(this,Rt),be=Ot.call(this,ft),be.onKeyDown=function(Fe,Ut){var _t=Fe.keyCode,Gt;if(be.getFlatInstanceArray().forEach(function(Ge){Ge&&Ge.props.active&&Ge.onKeyDown&&(Gt=Ge.onKeyDown(Fe))}),Gt)return 1;var en=null;return(_t===u.a.UP||_t===u.a.DOWN)&&(en=be.step(_t===u.a.UP?-1:1)),en?(Fe.preventDefault(),Ie(be.props.store,Ae(be.props),en.props.eventKey),typeof Ut=="function"&&Ut(en),1):void 0},be.onItemHover=function(Fe){var Ut=Fe.key,_t=Fe.hover;Ie(be.props.store,Ae(be.props),_t?Ut: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 Ut=be.getFlatInstanceArray(),_t=be.props.store.getState().activeKey[Ae(be.props)],Gt=Ut.length;if(!Gt)return null;Fe<0&&(Ut=Ut.concat().reverse());var en=-1;if(Ut.every(function(zt,ln){return zt&&zt.props.eventKey===_t?(en=ln,!1):!0}),!be.props.defaultActiveFirst&&en!==-1&&$t(Ut.slice(en,Gt-1)))return;var Ge=(en+1)%Gt,dt=Ge;do{var Pt=Ut[dt];if(!Pt||Pt.props.disabled)dt=(dt+1)%Gt;else return Pt}while(dt!==Ge);return null},be.renderCommonMenuItem=function(Fe,Ut,_t){var Gt=be.props.store.getState(),en=Object(F.a)(be),Ge=en.props,dt=V(Fe,Ge.eventKey,Ut),Pt=Fe.props;if(!Pt||typeof Fe.type=="string")return Fe;var zt=dt===Gt.activeKey,ln=Object(Y.a)(Object(Y.a)({mode:Pt.mode||Ge.mode,level:Ge.level,inlineIndent:Ge.inlineIndent,renderMenuItem:be.renderMenuItem,rootPrefixCls:Ge.prefixCls,index:Ut,parentMenu:Ge.parentMenu,manualRef:Pt.disabled?void 0:Object(f.a)(Fe.ref,Et.bind(Object(F.a)(be))),eventKey:dt,active:!Pt.disabled&&zt,multiple:Ge.multiple,onClick:function(nr){(Pt.onClick||M)(nr),be.onClick(nr)},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:Pt.itemIcon||be.props.itemIcon,expandIcon:Pt.expandIcon||be.props.expandIcon},_t),{},{direction:Ge.direction});return(Ge.mode==="inline"||ye())&&(ln.triggerSubMenuAction="click"),P.cloneElement(Fe,ln)},be.renderMenuItem=function(Fe,Ut,_t){if(!Fe)return null;var Gt=be.props.store.getState(),en={openKeys:Gt.openKeys,selectedKeys:Gt.selectedKeys,triggerSubMenuAction:be.props.triggerSubMenuAction,subMenuKey:_t};return be.renderCommonMenuItem(Fe,Ut,en)},ft.store.setState({activeKey:Object(Y.a)(Object(Y.a)({},ft.store.getState().activeKey),{},Object(i.a)({},ft.eventKey,ct(ft,ft.activeKey)))}),be.instanceArray=[],be}return Object(I.a)(Rt,[{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||!o()(this.props.style,be.style)}},{key:"componentDidUpdate",value:function(be){var Fe=this.props,Ut="activeKey"in Fe?Fe.activeKey:Fe.store.getState().activeKey[Ae(Fe)],_t=ct(Fe,Ut);if(_t!==Ut)Ie(Fe.store,Ae(Fe),_t);else if("activeKey"in be){var Gt=ct(be,be.activeKey);_t!==Gt&&Ie(Fe.store,Ae(Fe),_t)}}},{key:"render",value:function(){var be=this,Fe=Object(b.a)({},this.props);this.instanceArray=[];var Ut=l()(Fe.prefixCls,Fe.className,"".concat(Fe.prefixCls,"-").concat(Fe.mode)),_t={className:Ut,role:Fe.role||"menu"};Fe.id&&(_t.id=Fe.id),Fe.focusable&&(_t.tabIndex=0,_t.onKeyDown=this.onKeyDown);var Gt=Fe.prefixCls,en=Fe.eventKey,Ge=Fe.visible,dt=Fe.level,Pt=Fe.mode,zt=Fe.overflowedIndicator,ln=Fe.theme;return ve.forEach(function(vn){return delete Fe[vn]}),delete Fe.onClick,P.createElement(jt,Object.assign({},Fe,{prefixCls:Gt,mode:Pt,tag:"ul",level:dt,theme:ln,visible:Ge,overflowedIndicator:zt},_t),P.Children.map(Fe.children,function(vn,nr){return be.renderMenuItem(vn,nr,en||"0-menu-")}))}}]),Rt}(P.Component);Ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:M};var ht=Object(y.b)()(Ze),Ne=ht,Te=L("Kwbf");function Oe(Kt,Ot,Rt){var ft=Kt.prefixCls,be=Kt.motion,Fe=Kt.defaultMotions,Ut=Fe===void 0?{}:Fe,_t=Kt.openAnimation,Gt=Kt.openTransitionName,en=Ot.switchingModeFromInline;if(be)return be;if(Object(n.a)(_t)==="object"&&_t)Object(Te.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof _t=="string")return{motionName:"".concat(ft,"-open-").concat(_t)};if(Gt)return{motionName:Gt};var Ge=Ut[Rt];return Ge||(en?null:Ut.other)}var ae=function(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(ft){var be;Object(B.a)(this,Rt),be=Ot.call(this,ft),be.inlineOpenKeys=[],be.onSelect=function(_t){var Gt=Object(F.a)(be),en=Gt.props;if(en.selectable){var Ge=be.store.getState(),dt=Ge.selectedKeys,Pt=_t.key;en.multiple?dt=dt.concat([Pt]):dt=[Pt],"selectedKeys"in en||be.store.setState({selectedKeys:dt}),en.onSelect(Object(Y.a)(Object(Y.a)({},_t),{},{selectedKeys:dt}))}},be.onClick=function(_t){var Gt=be.getRealMenuMode(),en=Object(F.a)(be),Ge=en.store,dt=en.props.onOpenChange;Gt!=="inline"&&!("openKeys"in be.props)&&(Ge.setState({openKeys:[]}),dt([])),be.props.onClick(_t)},be.onKeyDown=function(_t,Gt){be.innerMenu.getWrappedInstance().onKeyDown(_t,Gt)},be.onOpenChange=function(_t){var Gt=Object(F.a)(be),en=Gt.props,Ge=be.store.getState().openKeys.concat(),dt=!1,Pt=function(ln){var vn=!1;if(ln.open)vn=Ge.indexOf(ln.key)===-1,vn&&Ge.push(ln.key);else{var nr=Ge.indexOf(ln.key);vn=nr!==-1,vn&&Ge.splice(nr,1)}dt=dt||vn};Array.isArray(_t)?_t.forEach(Pt):Pt(_t),dt&&("openKeys"in be.props||be.store.setState({openKeys:Ge}),en.onOpenChange(Ge))},be.onDeselect=function(_t){var Gt=Object(F.a)(be),en=Gt.props;if(en.selectable){var Ge=be.store.getState().selectedKeys.concat(),dt=_t.key,Pt=Ge.indexOf(dt);Pt!==-1&&Ge.splice(Pt,1),"selectedKeys"in en||be.store.setState({selectedKeys:Ge}),en.onDeselect(Object(Y.a)(Object(Y.a)({},_t),{},{selectedKeys:Ge}))}},be.onMouseEnter=function(_t){be.restoreModeVerticalFromInline();var Gt=be.props.onMouseEnter;Gt&&Gt(_t)},be.onTransitionEnd=function(_t){var Gt=_t.propertyName==="width"&&_t.target===_t.currentTarget,en=_t.target.className,Ge=Object.prototype.toString.call(en)==="[object SVGAnimatedString]"?en.animVal:en,dt=_t.propertyName==="font-size"&&Ge.indexOf("anticon")>=0;(Gt||dt)&&be.restoreModeVerticalFromInline()},be.setInnerMenu=function(_t){be.innerMenu=_t},be.isRootMenu=!0;var Fe=ft.defaultSelectedKeys,Ut=ft.defaultOpenKeys;return"selectedKeys"in ft&&(Fe=ft.selectedKeys||[]),"openKeys"in ft&&(Ut=ft.openKeys||[]),be.store=Object(y.c)({selectedKeys:Fe,openKeys:Ut,activeKey:{"0-menu-":ct(ft,ft.activeKey)}}),be.state={switchingModeFromInline:!1},be}return Object(I.a)(Rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(be){this.updateOpentKeysWhenSwitchMode(be),this.updateMiniStore();var Fe=this.props,Ut=Fe.siderCollapsed,_t=Fe.inlineCollapsed,Gt=Fe.onOpenChange;(!be.inlineCollapsed&&_t||!be.siderCollapsed&&Ut)&&Gt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(be){var Fe=this.props,Ut=this.store,_t=this.inlineOpenKeys,Gt=Ut.getState(),en={};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=Gt.openKeys.concat(),en.openKeys=[]),(!Fe.inlineCollapsed&&be.inlineCollapsed||!Fe.siderCollapsed&&be.siderCollapsed)&&(en.openKeys=_t,this.inlineOpenKeys=[])),Object.keys(en).length&&Ut.setState(en)}},{key:"updateMenuDisplay",value:function(){var be=this.props.collapsedWidth,Fe=this.store,Ut=this.prevOpenKeys,_t=this.getInlineCollapsed()&&(be===0||be==="0"||be==="0px");_t?(this.prevOpenKeys=Fe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Ut&&(this.store.setState({openKeys:Ut}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var be=this.props.mode,Fe=this.state.switchingModeFromInline,Ut=this.getInlineCollapsed();return Fe&&Ut?"inline":Ut?"vertical":be}},{key:"getInlineCollapsed",value:function(){var be=this.props,Fe=be.inlineCollapsed,Ut=be.siderCollapsed;return Ut!==void 0?Ut: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(y.a,{store:this.store},P.createElement(Ne,Object.assign({},be,{ref:this.setInnerMenu}),this.props.children))}}]),Rt}(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(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(){var ft;return Object(B.a)(this,Rt),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,Ut=Fe.eventKey,_t=Fe.onItemHover,Gt=Fe.onMouseLeave;_t({key:Ut,hover:!1}),Gt({key:Ut,domEvent:be})},ft.onMouseEnter=function(be){var Fe=ft.props,Ut=Fe.eventKey,_t=Fe.onItemHover,Gt=Fe.onMouseEnter;_t({key:Ut,hover:!0}),Gt({key:Ut,domEvent:be})},ft.onClick=function(be){var Fe=ft.props,Ut=Fe.eventKey,_t=Fe.multiple,Gt=Fe.onClick,en=Fe.onSelect,Ge=Fe.onDeselect,dt=Fe.isSelected,Pt={key:Ut,keyPath:[Ut],item:Object(F.a)(ft),domEvent:be};Gt(Pt),_t?dt?Ge(Pt):en(Pt):dt||en(Pt)},ft.saveNode=function(be){ft.node=be},ft}return Object(I.a)(Rt,[{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),Ut=l()(this.getPrefixCls(),Fe.className,(be={},Object(i.a)(be,this.getActiveClassName(),!Fe.disabled&&Fe.active),Object(i.a)(be,this.getSelectedClassName(),Fe.isSelected),Object(i.a)(be,this.getDisabledClassName(),Fe.disabled),be)),_t=Object(Y.a)(Object(Y.a)({},Fe.attribute),{},{title:typeof Fe.title=="string"?Fe.title:void 0,className:Ut,role:Fe.role||"menuitem","aria-disabled":Fe.disabled});Fe.role==="option"?_t=Object(Y.a)(Object(Y.a)({},_t),{},{role:"option","aria-selected":Fe.isSelected}):(Fe.role===null||Fe.role==="none")&&(_t.role="none");var Gt={onClick:Fe.disabled?null:this.onClick,onMouseLeave:Fe.disabled?null:this.onMouseLeave,onMouseEnter:Fe.disabled?null:this.onMouseEnter},en=Object(Y.a)({},Fe.style);Fe.mode==="inline"&&(Fe.direction==="rtl"?en.paddingRight=Fe.inlineIndent*Fe.level:en.paddingLeft=Fe.inlineIndent*Fe.level),ve.forEach(function(dt){return delete Fe[dt]}),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"]),_t,Gt,{style:en,ref:this.saveNode}),Fe.children,Ge)}}]),Rt}(P.Component);he.isMenuItem=!0,he.defaultProps={onSelect:M,onMouseEnter:M,onMouseLeave:M,manualRef:M};var _e=Object(y.b)(function(Kt,Ot){var Rt=Kt.activeKey,ft=Kt.selectedKeys,be=Ot.eventKey,Fe=Ot.subMenuKey;return{active:Rt[Fe]===be,isSelected:ft.indexOf(be)!==-1}})(he),Se=_e,ze=function(Kt){Object(S.a)(Rt,Kt);var Ot=Object(R.a)(Rt);function Rt(){var ft;return Object(B.a)(this,Rt),ft=Ot.apply(this,arguments),ft.renderInnerMenuItem=function(be){var Fe=ft.props,Ut=Fe.renderMenuItem,_t=Fe.index;return Ut(be,_t,ft.props.subMenuKey)},ft}return Object(I.a)(Rt,[{key:"render",value:function(){var be=Object(b.a)({},this.props),Fe=be.className,Ut=Fe===void 0?"":Fe,_t=be.rootPrefixCls,Gt="".concat(_t,"-item-group-title"),en="".concat(_t,"-item-group-list"),Ge=be.title,dt=be.children;return ve.forEach(function(Pt){return delete be[Pt]}),delete be.onClick,delete be.direction,P.createElement("li",Object.assign({},be,{className:"".concat(Ut," ").concat(_t,"-item-group")}),P.createElement("div",{className:Gt,title:typeof Ge=="string"?Ge:void 0},Ge),P.createElement("ul",{className:en},P.Children.map(dt,this.renderInnerMenuItem)))}}]),Rt}(P.Component);ze.isMenuItemGroup=!0,ze.defaultProps={disabled:!0};var xt=ze,Qt=function(Ot){var Rt=Ot.className,ft=Ot.rootPrefixCls,be=Ot.style;return P.createElement("li",{className:"".concat(Rt," ").concat(ft,"-item-divider"),style:be})};Qt.defaultProps={disabled:!0,className:"",style:{}};var on=Qt,vt=J.e=le},"24YM":function(We,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(We,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 S=new Y(I);if(this._first===Y.Undefined)this._first=S,this._last=S;else if(F){const P=this._last;this._last=S,S.prev=P,P.next=S}else{const P=this._first;this._first=S,S.next=P,P.prev=S}this._size+=1;let R=!1;return()=>{R||(R=!0,this._remove(S))}}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(We,J,L){var Y=L("IMiH"),B=L("loD1"),I=L("59Ip"),F=L("aKvl"),S=L("n1HI"),R=L("hX1E"),P=R.normalizeRadian,y=L("Sj9i"),t=L("hyiK"),b=Y.CMD,i=Math.PI*2,u=1e-4;function f(C,k){return Math.abs(C-k)<u}var a=[-1,-1,-1],o=[-1,-1];function c(){var C=o[0];o[0]=o[1],o[1]=C}function l(C,k,w,g,h,p,m,_,x,v){if(v>k&&v>g&&v>p&&v>_||v<k&&v<g&&v<p&&v<_)return 0;var j=y.cubicRootAt(k,g,p,_,v,a);if(j===0)return 0;for(var U=0,T=-1,z,H,M=0;M<j;M++){var V=a[M],K=V===0||V===1?.5:1,$=y.cubicAt(C,w,h,m,V);if($<x)continue;T<0&&(T=y.cubicExtrema(k,g,p,_,o),o[1]<o[0]&&T>1&&c(),z=y.cubicAt(k,g,p,_,o[0]),T>1&&(H=y.cubicAt(k,g,p,_,o[1]))),T===2?V<o[0]?U+=z<k?K:-K:V<o[1]?U+=H<z?K:-K:U+=_<H?K:-K:V<o[0]?U+=z<k?K:-K:U+=_<z?K:-K}return U}function n(C,k,w,g,h,p,m,_){if(_>k&&_>g&&_>p||_<k&&_<g&&_<p)return 0;var x=y.quadraticRootAt(k,g,p,_,a);if(x===0)return 0;var v=y.quadraticExtremum(k,g,p);if(v>=0&&v<=1){for(var j=0,U=y.quadraticAt(k,g,p,v),T=0;T<x;T++){var z=a[T]===0||a[T]===1?.5:1,H=y.quadraticAt(C,w,h,a[T]);if(H<m)continue;a[T]<v?j+=U<k?z:-z:j+=p<U?z:-z}return j}else{var z=a[0]===0||a[0]===1?.5:1,H=y.quadraticAt(C,w,h,a[0]);return H<m?0:p<k?z:-z}}function s(C,k,w,g,h,p,m,_){if(_-=k,_>w||_<-w)return 0;var x=Math.sqrt(w*w-_*_);a[0]=-x,a[1]=x;var v=Math.abs(g-h);if(v<1e-4)return 0;if(v%i<1e-4){g=0,h=i;var j=p?1:-1;return m>=a[0]+C&&m<=a[1]+C?j:0}if(p){var x=g;g=P(h),h=P(x)}else g=P(g),h=P(h);g>h&&(h+=i);for(var U=0,T=0;T<2;T++){var z=a[T];if(z+C>m){var H=Math.atan2(_,z),j=p?1:-1;H<0&&(H=i+H),(H>=g&&H<=h||H+i>=g&&H+i<=h)&&(H>Math.PI/2&&H<Math.PI*1.5&&(j=-j),U+=j)}}return U}function d(C,k,w,g,h){for(var p=0,m=0,_=0,x=0,v=0,j=0;j<C.length;){var U=C[j++];U===b.M&&j>1&&(w||(p+=t(m,_,x,v,g,h))),j===1&&(m=C[j],_=C[j+1],x=m,v=_);switch(U){case b.M:x=C[j++],v=C[j++],m=x,_=v;break;case b.L:if(w){if(B.containStroke(m,_,C[j],C[j+1],k,g,h))return!0}else p+=t(m,_,C[j],C[j+1],g,h)||0;m=C[j++],_=C[j++];break;case b.C:if(w){if(I.containStroke(m,_,C[j++],C[j++],C[j++],C[j++],C[j],C[j+1],k,g,h))return!0}else p+=l(m,_,C[j++],C[j++],C[j++],C[j++],C[j],C[j+1],g,h)||0;m=C[j++],_=C[j++];break;case b.Q:if(w){if(F.containStroke(m,_,C[j++],C[j++],C[j],C[j+1],k,g,h))return!0}else p+=n(m,_,C[j++],C[j++],C[j],C[j+1],g,h)||0;m=C[j++],_=C[j++];break;case b.A:var T=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+T,ve=Math.sin(V)*M+z;j>1?p+=t(m,_,Z,ve,g,h):(x=Z,v=ve);var oe=(g-T)*M/H+T;if(w){if(S.containStroke(T,z,M,V,V+K,$,k,oe,h))return!0}else p+=s(T,z,M,V,V+K,$,oe,h);m=Math.cos(V+K)*H+T,_=Math.sin(V+K)*M+z;break;case b.R:x=m=C[j++],v=_=C[j++];var fe=C[j++],ye=C[j++],Z=x+fe,ve=v+ye;if(w){if(B.containStroke(x,v,Z,v,k,g,h)||B.containStroke(Z,v,Z,ve,k,g,h)||B.containStroke(Z,ve,x,ve,k,g,h)||B.containStroke(x,ve,x,v,k,g,h))return!0}else p+=t(Z,v,Z,ve,g,h),p+=t(x,ve,x,v,g,h);break;case b.Z:if(w){if(B.containStroke(m,_,x,v,k,g,h))return!0}else p+=t(m,_,x,v,g,h);m=x,_=v;break}}return!w&&!f(_,v)&&(p+=t(m,_,x,v,g,h)||0),p!==0}function E(C,k,w){return d(C,0,!1,k,w)}function A(C,k,w,g){return d(C,k,!0,w,g)}J.contain=E,J.containStroke=A},"2fw6":function(We,J,L){var Y=L("y+Vt"),B=Y.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(I,F,S){S&&I.moveTo(F.cx+F.r,F.cy),I.arc(F.cx,F.cy,F.r,0,Math.PI*2,!0)}});We.exports=B},"3/fG":function(We,J,L){"use strict";L.d(J,"a",function(){return B});function Y(I,F){let S;return F.length===0?S=I:S=I.replace(/\{(\d+)\}/g,function(R,P){const y=P[0];return typeof F[y]!="undefined"?F[y]:R}),S}function B(I,F,...S){return Y(F,S)}},"3C/r":function(We,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;We.exports=Y},"3CBa":function(We,J,L){var Y=L("hydK"),B=Y.createElement,I=L("bYtY"),F=L("SUKs"),S=L("y+Vt"),R=L("Dagg"),P=L("dqUG"),y=L("DBLp"),t=L("sW+o"),b=L("n6Mw"),i=L("vKoX"),u=L("P47w"),f=u.path,a=u.image,o=u.text;function c(h){return parseInt(h,10)}function l(h){return h instanceof S?f:h instanceof R?a:h instanceof P?o:f}function n(h,p){return p&&h&&p.parentNode!==h}function s(h,p,m){if(n(h,p)&&m){var _=m.nextSibling;_?h.insertBefore(p,_):h.appendChild(p)}}function d(h,p){if(n(h,p)){var m=h.firstChild;m?h.insertBefore(p,m):h.appendChild(p)}}function E(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,m,_){this.root=h,this.storage=p,this._opts=m=I.extend({},m||{});var x=B("svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("version","1.1"),x.setAttribute("baseProfile","full"),x.style.cssText="user-select:none;position:absolute;left:0;top:0;";var v=B("g");x.appendChild(v);var j=B("g");x.appendChild(j),this.gradientManager=new t(_,j),this.clipPathManager=new b(_,j),this.shadowManager=new i(_,j);var U=document.createElement("div");U.style.cssText="overflow:hidden;position:relative",this._svgDom=x,this._svgRoot=j,this._backgroundRoot=v,this._viewport=U,h.appendChild(U),U.appendChild(x),this.resize(m.width,m.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,m=this._visibleList,_=h.length,x=[],v;for(v=0;v<_;v++){var j=h[v],U=l(j),T=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(T,j)),j.__dirty=!1),x.push(j))}var z=y(m,x),H;for(v=0;v<z.length;v++){var M=z[v];if(M.removed)for(var V=0;V<M.count;V++){var j=m[M.indices[V]],T=C(j),K=A(j);E(p,T),E(p,K)}}for(v=0;v<z.length;v++){var M=z[v];if(M.added)for(var V=0;V<M.count;V++){var j=x[M.indices[V]],T=C(j),K=A(j);H?s(p,T,H):d(p,T),T?s(p,K,T):H?s(p,K,H):d(p,K),s(p,K,T),H=K||T||H,this.gradientManager.addWithoutUpdate(T||K,j),this.shadowManager.addWithoutUpdate(T||K,j),this.clipPathManager.markUsed(j)}else if(!M.removed)for(var V=0;V<M.count;V++){var j=x[M.indices[V]],T=C(j),K=A(j),T=C(j),K=A(j);this.gradientManager.markUsed(j),this.gradientManager.addWithoutUpdate(T||K,j),this.shadowManager.markUsed(j),this.shadowManager.addWithoutUpdate(T||K,j),this.clipPathManager.markUsed(j),K&&s(p,K,T),H=T||K||H}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=x},_getDefs:function(h){var p=this._svgDom,m=p.getElementsByTagName("defs");if(m.length===0)if(h){var m=p.insertBefore(B("defs"),p.firstChild);return m.contains||(m.contains=function(x){var v=m.children;if(!v)return!1;for(var j=v.length-1;j>=0;--j)if(v[j]===x)return!0;return!1}),m}else return null;else return m[0]},resize:function(h,p){var m=this._viewport;m.style.display="none";var _=this._opts;if(h!=null&&(_.width=h),p!=null&&(_.height=p),h=this._getSize(0),p=this._getSize(1),m.style.display="",this._width!==h||this._height!==p){this._width=h,this._height=p;var x=m.style;x.width=h+"px",x.height=p+"px";var v=this._svgDom;v.setAttribute("width",h),v.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,m=["width","height"][h],_=["clientWidth","clientHeight"][h],x=["paddingLeft","paddingTop"][h],v=["paddingRight","paddingBottom"][h];if(p[m]!=null&&p[m]!=="auto")return parseFloat(p[m]);var j=this.root,U=document.defaultView.getComputedStyle(j);return(j[_]||c(U[m])||c(j.style[m]))-(c(U[x])||0)-(c(U[v])||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 g=k;We.exports=g},"3e3G":function(We,J,L){var Y=L("bYtY"),B=L("QuXc"),I=function(S,R,P,y,t){this.x=S==null?.5:S,this.y=R==null?.5:R,this.r=P==null?.5:P,this.type="radial",this.global=t||!1,B.call(this,y)};I.prototype={constructor:I},Y.inherits(I,B);var F=I;We.exports=F},"3gBT":function(We,J){var L=2311;function Y(){return L++}We.exports=Y},"4fz+":function(We,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,y=0;y<P.length;y++)if(P[y].name===R)return P[y]},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 y=this._children,t=y.indexOf(P);t>=0&&(y.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,y=this.__zr;P&&P!==R.__storage&&(P.addToStorage(R),R instanceof F&&R.addChildrenToStorage(P)),y&&y.refresh()},remove:function(R){var P=this.__zr,y=this.__storage,t=this._children,b=Y.indexOf(t,R);return b<0?this:(t.splice(b,1),R.parent=null,y&&(y.delFromStorage(R),R instanceof F&&R.delChildrenFromStorage(y)),P&&P.refresh(),this)},removeAll:function(){var R=this._children,P=this.__storage,y,t;for(t=0;t<R.length;t++)y=R[t],P&&(P.delFromStorage(y),y instanceof F&&y.delChildrenFromStorage(P)),y.parent=null;return R.length=0,this},eachChild:function(R,P){for(var y=this._children,t=0;t<y.length;t++){var b=y[t];R.call(P,b,t)}return this},traverse:function(R,P){for(var y=0;y<this._children.length;y++){var t=this._children[y];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 y=this._children[P];R.addToStorage(y),y instanceof F&&y.addChildrenToStorage(R)}},delChildrenFromStorage:function(R){for(var P=0;P<this._children.length;P++){var y=this._children[P];R.delFromStorage(y),y instanceof F&&y.delChildrenFromStorage(R)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(R){for(var P=null,y=new I(0,0,0,0),t=R||this._children,b=[],i=0;i<t.length;i++){var u=t[i];if(u.ignore||u.invisible)continue;var f=u.getBoundingRect(),a=u.getLocalTransform(b);a?(y.copy(f),y.applyTransform(a),P=P||y.clone(),P.union(y)):(P=P||f.clone(),P.union(f))}return P||y}},Y.inherits(F,B);var S=F;We.exports=S},"4mN7":function(We,J,L){var Y=L("QBsz"),B=L("Sj9i"),I=Math.min,F=Math.max,S=Math.sin,R=Math.cos,P=Math.PI*2,y=Y.create(),t=Y.create(),b=Y.create();function i(n,s,d){if(n.length===0)return;var E=n[0],A=E[0],C=E[0],k=E[1],w=E[1],g;for(g=1;g<n.length;g++)E=n[g],A=I(A,E[0]),C=F(C,E[0]),k=I(k,E[1]),w=F(w,E[1]);s[0]=A,s[1]=k,d[0]=C,d[1]=w}function u(n,s,d,E,A,C){A[0]=I(n,d),A[1]=I(s,E),C[0]=F(n,d),C[1]=F(s,E)}var f=[],a=[];function o(n,s,d,E,A,C,k,w,g,h){var p=B.cubicExtrema,m=B.cubicAt,_,x=p(n,d,A,k,f);for(g[0]=Infinity,g[1]=Infinity,h[0]=-Infinity,h[1]=-Infinity,_=0;_<x;_++){var v=m(n,d,A,k,f[_]);g[0]=I(v,g[0]),h[0]=F(v,h[0])}for(x=p(s,E,C,w,a),_=0;_<x;_++){var j=m(s,E,C,w,a[_]);g[1]=I(j,g[1]),h[1]=F(j,h[1])}g[0]=I(n,g[0]),h[0]=F(n,h[0]),g[0]=I(k,g[0]),h[0]=F(k,h[0]),g[1]=I(s,g[1]),h[1]=F(s,h[1]),g[1]=I(w,g[1]),h[1]=F(w,h[1])}function c(n,s,d,E,A,C,k,w){var g=B.quadraticExtremum,h=B.quadraticAt,p=F(I(g(n,d,A),1),0),m=F(I(g(s,E,C),1),0),_=h(n,d,A,p),x=h(s,E,C,m);k[0]=I(n,A,_),k[1]=I(s,C,x),w[0]=F(n,A,_),w[1]=F(s,C,x)}function l(n,s,d,E,A,C,k,w,g){var h=Y.min,p=Y.max,m=Math.abs(A-C);if(m%P<1e-4&&m>1e-4){w[0]=n-d,w[1]=s-E,g[0]=n+d,g[1]=s+E;return}if(y[0]=R(A)*d+n,y[1]=S(A)*E+s,t[0]=R(C)*d+n,t[1]=S(C)*E+s,h(w,y,t),p(g,y,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 x=0;x<C;x+=Math.PI/2)x>A&&(b[0]=R(x)*d+n,b[1]=S(x)*E+s,h(w,b,w),p(g,b,g))}J.fromPoints=i,J.fromLine=u,J.fromCubic=o,J.fromQuadratic=c,J.fromArc=l},"4wi7":function(We,J,L){"use strict";var Y=L("14J3"),B=L("BMrR"),I=L("sRBo"),F=L("kaz8"),S=L("5NDa"),R=L("5rEg"),P=L("9og8"),y=L("tJVT"),t=L("WmNS"),b=L.n(t),i=L("q1tI"),u=L.n(i),f=L("oOBs"),a=L.n(f),o=L("xOL1"),c=L.n(o),l=L("BdwD"),n=function(d){var E=d.data,A=d.value,C=A===void 0?[]:A,k=d.handleChangePage,w=d.setSelectedRowKeys,g=d.selectedRowKeys,h=d.onChange,p=h===void 0?function(){}:h,m=Object(i.useState)([]),_=Object(y.a)(m,2),x=_[0],v=_[1],j=Object(i.useState)([]),U=Object(y.a)(j,2),T=U[0],z=U[1],H=Object(i.useState)([]),M=Object(y.a)(H,2),V=M[0],K=M[1],$=Object(i.useState)(1),Z=Object(y.a)($,2),ve=Z[0],oe=Z[1],fe=Object(i.useState)(),ye=Object(y.a)(fe,2),Pe=ye[0],ge=ye[1];return Object(i.useEffect)(function(){v(E),z([]),K([])},[E]),Object(i.useEffect)(function(){w&&(z(g),K(g))},[g]),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 Qe(St){return b.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:v(E.filter(function(rt){var Be;return rt==null||((Be=rt.name)===null||Be===void 0)?void 0:Be.includes(St.target.value)}));case 1:case"end":return De.stop()}},Qe)}));return function(Qe){return de.apply(this,arguments)}}(),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),x.length===0&&u.a.createElement(l.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:T.map(function(de){return"".concat(de.id)}),onChange:function(Qe){w(x.filter(function(St){return Qe.includes("".concat(St.id))}))},style:{marginTop:"10px"}},x.map(function(de,Qe){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(Qe){K(T.filter(function(St){return St.name.includes(Qe.target.value)}))},size:"large",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),V.length===0&&u.a.createElement(l.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,Qe){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:c.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){w(T.filter(function(Ee){return"".concat(Ee.id)!="".concat(de.id)}))}}))})))))};J.a=n},"55Ip":function(We,J,L){"use strict";L.d(J,"a",function(){return s});var Y=L("Ty5D"),B=L("dI71"),I=L("q1tI"),F=L.n(I),S=L("YS25"),R=L("17x9"),P=L.n(R),y=L("wx14"),t=L("zLVn"),b=L("9R94"),i=function(h){Object(B.a)(p,h);function p(){for(var _,x=arguments.length,v=new Array(x),j=0;j<x;j++)v[j]=arguments[j];return _=h.call.apply(h,[this].concat(v))||this,_.history=Object(S.a)(_.props),_}var m=p.prototype;return m.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 _,x=arguments.length,v=new Array(x),j=0;j<x;j++)v[j]=arguments[j];return _=h.call.apply(h,[this].concat(v))||this,_.history=Object(S.b)(_.props),_}var m=p.prototype;return m.render=function(){return F.a.createElement(Y.c,{history:this.history,children:this.props.children})},p}(F.a.Component),f=function(p,m){return typeof p=="function"?p(m):p},a=function(p,m){return typeof p=="string"?Object(S.c)(p,null,null,m):p},o=function(p){return p},c=F.a.forwardRef;typeof c=="undefined"&&(c=o);function l(h){return!!(h.metaKey||h.altKey||h.ctrlKey||h.shiftKey)}var n=c(function(h,p){var m=h.innerRef,_=h.navigate,x=h.onClick,v=Object(t.a)(h,["innerRef","navigate","onClick"]),j=v.target,U=Object(y.a)({},v,{onClick:function(z){try{x&&x(z)}catch(H){throw z.preventDefault(),H}!z.defaultPrevented&&z.button===0&&(!j||j==="_self")&&!l(z)&&(z.preventDefault(),_())}});return o!==c?U.ref=p||m:U.ref=m,F.a.createElement("a",U)}),s=c(function(h,p){var m=h.component,_=m===void 0?n:m,x=h.replace,v=h.to,j=h.innerRef,U=Object(t.a)(h,["component","replace","to","innerRef"]);return F.a.createElement(Y.e.Consumer,null,function(T){T||Object(b.a)(!1);var z=T.history,H=a(f(v,T.location),T.location),M=H?z.createHref(H):"",V=Object(y.a)({},U,{href:M,navigate:function(){var $=f(v,T.location),Z=x?z.replace:z.push;Z($)}});return o!==c?V.ref=p||j:V.innerRef=j,F.a.createElement(_,V)})});if(!1)var d,E;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),m=0;m<h;m++)p[m]=arguments[m];return p.filter(function(_){return _}).join(" ")}var w=C(function(h,p){var m=h["aria-current"],_=m===void 0?"page":m,x=h.activeClassName,v=x===void 0?"active":x,j=h.activeStyle,U=h.className,T=h.exact,z=h.isActive,H=h.location,M=h.sensitive,V=h.strict,K=h.style,$=h.to,Z=h.innerRef,ve=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),Pe=ye.pathname,ge=Pe&&Pe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),de=ge?Object(Y.f)(fe.pathname,{path:ge,exact:T,sensitive:M,strict:V}):null,Qe=!!(z?z(de,fe):de),St=Qe?k(U,v):U,Ee=Qe?Object(y.a)({},K,{},j):K,De=Object(y.a)({"aria-current":Qe&&_||null,className:St,style:Ee,to:ye},ve);return A!==C?De.ref=p||Z:De.innerRef=Z,F.a.createElement(s,De)})});if(!1)var g},"59Ip":function(We,J,L){var Y=L("Sj9i");function B(I,F,S,R,P,y,t,b,i,u,f){if(i===0)return!1;var a=i;if(f>F+a&&f>R+a&&f>y+a&&f>b+a||f<F-a&&f<R-a&&f<y-a&&f<b-a||u>I+a&&u>S+a&&u>P+a&&u>t+a||u<I-a&&u<S-a&&u<P-a&&u<t-a)return!1;var o=Y.cubicProjectPoint(I,F,S,R,P,y,t,b,u,f,null);return o<=a/2}J.containStroke=B},"5VLF":function(We,J,L){"use strict";var Y,B;function I(F,S,R){var P=function(y,t){return F.js_beautify(y,t)};return P.js=F.js_beautify,P.css=S.css_beautify,P.html=R.html_beautify,P.js_beautify=F.js_beautify,P.css_beautify=S.css_beautify,P.html_beautify=R.html_beautify,P}!(Y=[L("6UM0"),L("TXwP"),L("psGv")],B=function(F,S,R){return I(F,S,R)}.apply(J,Y),B!==void 0&&(We.exports=B))},"5Y4S":function(We,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(We,J,L){"use strict";L.d(J,"a",function(){return C});var Y=L("wx14"),B=L("rePB"),I=L("VTBJ"),F=L("1OyB"),S=L("vuIU"),R=L("Ji7U"),P=L("LK+K"),y=L("q1tI"),t=L.n(y),b=L("TSYQ"),i=L.n(b),u=function(w){var g,h="".concat(w.rootPrefixCls,"-item"),p=i()(h,"".concat(h,"-").concat(w.page),(g={},Object(B.a)(g,"".concat(h,"-active"),w.active),Object(B.a)(g,w.className,!!w.className),Object(B.a)(g,"".concat(h,"-disabled"),!w.page),g)),m=function(){w.onClick(w.page)},_=function(v){w.onKeyPress(v,w.onClick,w.page)};return t.a.createElement("li",{title:w.showTitle?w.page:null,className:p,onClick:m,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},o=function(k){Object(R.a)(g,k);var w=Object(P.a)(g);function g(){var h;Object(F.a)(this,g);for(var p=arguments.length,m=new Array(p),_=0;_<p;_++)m[_]=arguments[_];return h=w.call.apply(w,[this].concat(m)),h.state={goInputText:""},h.buildOptionText=function(x){return"".concat(x," ").concat(h.props.locale.items_per_page)},h.changeSize=function(x){h.props.changeSize(Number(x))},h.handleChange=function(x){h.setState({goInputText:x.target.value})},h.handleBlur=function(x){var v=h.props,j=v.goButton,U=v.quickGo,T=v.rootPrefixCls,z=h.state.goInputText;if(j||z==="")return;if(x.relatedTarget&&(x.relatedTarget.className.indexOf("".concat(T,"-prev"))>=0||x.relatedTarget.className.indexOf("".concat(T,"-next"))>=0))return;h.setState({goInputText:""}),U(h.getValidValue())},h.go=function(x){var v=h.state.goInputText;if(v==="")return;(x.keyCode===a.ENTER||x.type==="click")&&(h.setState({goInputText:""}),h.props.quickGo(h.getValidValue()))},h}return Object(S.a)(g,[{key:"getValidValue",value:function(){var p=this.state,m=p.goInputText,_=p.current;return!m||isNaN(m)?_:Number(m)}},{key:"getPageSizeOptions",value:function(){var p=this.props,m=p.pageSize,_=p.pageSizeOptions;return _.some(function(x){return x.toString()===m.toString()})?_:_.concat([m.toString()]).sort(function(x,v){var j=isNaN(Number(x))?0:Number(x),U=isNaN(Number(v))?0:Number(v);return j-U})}},{key:"render",value:function(){var p=this,m=this.props,_=m.pageSize,x=m.locale,v=m.rootPrefixCls,j=m.changeSize,U=m.quickGo,T=m.goButton,z=m.selectComponentClass,H=m.buildOptionText,M=m.selectPrefixCls,V=m.disabled,K=this.state.goInputText,$="".concat(v,"-options"),Z=z,ve=null,oe=null,fe=null;if(!j&&!U)return null;var ye=this.getPageSizeOptions();if(j&&Z){var Pe=ye.map(function(ge,de){return t.a.createElement(Z.Option,{key:de,value:ge.toString()},(H||p.buildOptionText)(ge))});ve=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}},Pe)}return U&&(T&&(fe=typeof T=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat($,"-quick-jumper-button")},x.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},T)),oe=t.a.createElement("div",{className:"".concat($,"-quick-jumper")},x.jump_to,t.a.createElement("input",{disabled:V,type:"text",value:K,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),x.page,fe)),t.a.createElement("li",{className:"".concat($)},ve,oe)}}]),g}(t.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var c=o,l=L("N2Kk");function n(){}function s(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function d(k,w,g){return g}function E(k,w,g){var h=typeof k=="undefined"?w.pageSize:k;return Math.floor((g.total-1)/h)+1}var A=function(k){Object(R.a)(g,k);var w=Object(P.a)(g);function g(h){var p;Object(F.a)(this,g),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(E(void 0,p.state,p.props),p.state.current+(p.props.showLessItems?3:5))},p.getItemIcon=function(j,U){var T=p.props.prefixCls,z=j||t.a.createElement("button",{type:"button","aria-label":U,className:"".concat(T,"-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 s(j)&&j!==p.state.current},p.shouldDisplayQuickJumper=function(){var j=p.props,U=j.showQuickJumper,T=j.pageSize,z=j.total;return z<=T?!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),T=p.state.currentInputValue;U!==T&&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,T=E(j,p.state,p.props);U=U>T?T:U,T===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,T=j;if(p.isValid(T)&&!U){var z=E(void 0,p.state,p.props);T>z?T=z:T<1&&(T=1),"current"in p.props||p.setState({current:T,currentInputValue:T});var H=p.state.pageSize;return p.props.onChange(T,H),T}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<E(void 0,p.state,p.props)},p.runIfEnter=function(j,U){if(j.key==="Enter"||j.charCode===13){for(var T=arguments.length,z=new Array(T>2?T-2:0),H=2;H<T;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 m=h.onChange!==n,_="current"in h;_&&!m&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var x=h.defaultCurrent;"current"in h&&(x=h.current);var v=h.defaultPageSize;return"pageSize"in h&&(v=h.pageSize),x=Math.min(x,E(v,void 0,h)),p.state={current:x,currentInputValue:x,pageSize:v},p}return Object(S.a)(g,[{key:"componentDidUpdate",value:function(p,m){var _=this.props.prefixCls;if(m.current!==this.state.current&&this.paginationNode){var x=this.paginationNode.querySelector(".".concat(_,"-item-").concat(m.current));x&&document.activeElement===x&&x.blur()}}},{key:"getValidValue",value:function(p){var m=p.target.value,_=E(void 0,this.state,this.props),x=this.state.currentInputValue,v;return m===""?v=m:isNaN(Number(m))?v=x:m>=_?v=_:v=Number(m),v}},{key:"getShowSizeChanger",value:function(){var p=this.props,m=p.showSizeChanger,_=p.total,x=p.totalBoundaryShowSizeChanger;return typeof m!="undefined"?m:_>x}},{key:"renderPrev",value:function(p){var m=this.props,_=m.prevIcon,x=m.itemRender,v=x(p,"prev",this.getItemIcon(_,"prev page")),j=!this.hasPrev();return Object(y.isValidElement)(v)?Object(y.cloneElement)(v,{disabled:j}):v}},{key:"renderNext",value:function(p){var m=this.props,_=m.nextIcon,x=m.itemRender,v=x(p,"next",this.getItemIcon(_,"next page")),j=!this.hasNext();return Object(y.isValidElement)(v)?Object(y.cloneElement)(v,{disabled:j}):v}},{key:"render",value:function(){var p=this,m=this.props,_=m.prefixCls,x=m.className,v=m.style,j=m.disabled,U=m.hideOnSinglePage,T=m.total,z=m.locale,H=m.showQuickJumper,M=m.showLessItems,V=m.showTitle,K=m.showTotal,$=m.simple,Z=m.itemRender,ve=m.showPrevNextJumpers,oe=m.jumpPrevIcon,fe=m.jumpNextIcon,ye=m.selectComponentClass,Pe=m.selectPrefixCls,ge=m.pageSizeOptions,de=this.state,Qe=de.current,St=de.pageSize,Ee=de.currentInputValue;if(U===!0&&T<=St)return null;var De=E(void 0,this.state,this.props),rt=[],Be=null,ke=null,ut=null,ie=null,xe=null,we=H&&H.goButton,Ke=M?1:2,ot=Qe-1>0?Qe-1:0,gt=Qe+1<De?Qe+1:De,Nt=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(Qe,"/").concat(De):null,className:"".concat(_,"-simple-pager")},xe)),t.a.createElement("ul",Object(Y.a)({className:i()(_,"".concat(_,"-simple"),Object(B.a)({},"".concat(_,"-disabled"),j),x),style:v,ref:this.savePaginationNode},Nt),t.a.createElement("li",{title:V?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ot)),t.a.createElement("li",{title:V?"".concat(Qe,"/").concat(De):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")},"/"),De),t.a.createElement("li",{title:V?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(gt)),xe);if(De<=3+Ke*2){var He={locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:V,itemRender:Z};De||rt.push(t.a.createElement(f,Object(Y.a)({},He,{key:"noPager",page:De,className:"".concat(_,"-disabled")})));for(var jt=1;jt<=De;jt+=1){var $t=Qe===jt;rt.push(t.a.createElement(f,Object(Y.a)({},He,{key:jt,page:jt,active:$t})))}}else{var Ie=M?z.prev_3:z.prev_5,Ae=M?z.next_3:z.next_5;ve&&(Be=t.a.createElement("li",{title:V?Ie:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".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:i()("".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:De,page:De,active:!1,showTitle:V,itemRender:Z}),ut=t.a.createElement(f,{locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:V,itemRender:Z});var ct=Math.max(1,Qe-Ke),Et=Math.min(Qe+Ke,De);Qe-1<=Ke&&(Et=1+Ke*2),De-Qe<=Ke&&(ct=De-Ke*2);for(var Ze=ct;Ze<=Et;Ze+=1){var ht=Qe===Ze;rt.push(t.a.createElement(f,{locale:z,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:ht,showTitle:V,itemRender:Z}))}Qe-1>=Ke*2&&Qe!==1+2&&(rt[0]=Object(y.cloneElement)(rt[0],{className:"".concat(_,"-item-after-jump-prev")}),rt.unshift(Be)),De-Qe>=Ke*2&&Qe!==De-2&&(rt[rt.length-1]=Object(y.cloneElement)(rt[rt.length-1],{className:"".concat(_,"-item-before-jump-next")}),rt.push(ke)),ct!==1&&rt.unshift(ut),Et!==De&&rt.push(ie)}var Ne=null;K&&(Ne=t.a.createElement("li",{className:"".concat(_,"-total-text")},K(T,[T===0?0:(Qe-1)*St+1,Qe*St>T?T:Qe*St])));var Te=!this.hasPrev()||!De,Oe=!this.hasNext()||!De;return t.a.createElement("ul",Object(Y.a)({className:i()(_,x,Object(B.a)({},"".concat(_,"-disabled"),j)),style:v,unselectable:"unselectable",ref:this.savePaginationNode},Nt),Ne,t.a.createElement("li",{title:V?z.prev_page:null,onClick:this.prev,tabIndex:Te?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(_,"-prev"),Object(B.a)({},"".concat(_,"-disabled"),Te)),"aria-disabled":Te},this.renderPrev(ot)),rt,t.a.createElement("li",{title:V?z.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(_,"-next"),Object(B.a)({},"".concat(_,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(gt)),t.a.createElement(c,{disabled:j,locale:z,rootPrefixCls:_,selectComponentClass:ye,selectPrefixCls:Pe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Qe,pageSize:St,pageSizeOptions:ge,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(p,m){var _={};if("current"in p&&(_.current=p.current,p.current!==m.current&&(_.currentInputValue=_.current)),"pageSize"in p&&p.pageSize!==m.pageSize){var x=m.current,v=E(p.pageSize,m,p);x=x>v?v:x,"current"in p||(_.current=x,_.currentInputValue=x),_.pageSize=p.pageSize}return _}}]),g}(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:l.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var C=A},"6GrX":function(We,J,L){var Y=L("mFDi"),B=L("Xnb7"),I=L("bYtY"),F=I.getContext,S=I.extend,R=I.retrieve2,P=I.retrieve3,y=I.trim,t={},b=0,i=5e3,u=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,f="12px sans-serif",a={};function o(U,T){a[U]=T}function c(U,T){T=T||f;var z=U+":"+T;if(t[z])return t[z];for(var H=(U+"").split(`
|
|
`),M=0,V=0,K=H.length;V<K;V++)M=Math.max(m(H[V],T).width,M);return b>i&&(b=0,t={}),b++,t[z]=M,M}function l(U,T,z,H,M,V,K,$){return K?s(U,T,z,H,M,V,K,$):n(U,T,z,H,M,V,$)}function n(U,T,z,H,M,V,K){var $=_(U,T,M,V,K),Z=c(U,T);M&&(Z+=M[1]+M[3]);var ve=$.outerHeight,oe=d(0,Z,z),fe=E(0,ve,H),ye=new Y(oe,fe,Z,ve);return ye.lineHeight=$.lineHeight,ye}function s(U,T,z,H,M,V,K,$){var Z=x(U,{rich:K,truncate:$,font:T,textAlign:z,textPadding:M,textLineHeight:V}),ve=Z.outerWidth,oe=Z.outerHeight,fe=d(0,ve,z),ye=E(0,oe,H);return new Y(fe,ye,ve,oe)}function d(U,T,z){return z==="right"?U-=T:z==="center"&&(U-=T/2),U}function E(U,T,z){return z==="middle"?U-=T/2:z==="bottom"&&(U-=T),U}function A(U,T,z){var H=T.textPosition,M=T.textDistance,V=z.x,K=z.y;M=M||0;var $=z.height,Z=z.width,ve=$/2,oe="left",fe="top";switch(H){case"left":V-=M,K+=ve,oe="right",fe="middle";break;case"right":V+=M+Z,K+=ve,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+=ve,oe="center",fe="middle";break;case"insideLeft":V+=M,K+=ve,fe="middle";break;case"insideRight":V+=Z-M,K+=ve,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,T,z){var H={textPosition:U,textDistance:z};return A({},H,T)}function k(U,T,z,H,M){if(!T)return"";var V=(U+"").split(`
|
|
`);M=w(T,z,H,M);for(var K=0,$=V.length;K<$;K++)V[K]=g(V[K],M);return V.join(`
|
|
`)}function w(U,T,z,H){H=S({},H),H.font=T;var z=R(z,"...");H.maxIterations=R(H.maxIterations,2);var M=H.minChar=R(H.minChar,0);H.cnCharWidth=c("\u56FD",T);var V=H.ascCharWidth=c("a",T);H.placeholder=R(H.placeholder,"");for(var K=U=Math.max(0,U-1),$=0;$<M&&K>=V;$++)K-=V;var Z=c(z,T);return Z>K&&(z="",Z=0),K=U-Z,H.ellipsis=z,H.ellipsisWidth=Z,H.contentWidth=K,H.containerWidth=U,H}function g(U,T){var z=T.containerWidth,H=T.font,M=T.contentWidth;if(!z)return"";var V=c(U,H);if(V<=z)return U;for(var K=0;;K++){if(V<=M||K>=T.maxIterations){U+=T.ellipsis;break}var $=K===0?h(U,M,T.ascCharWidth,T.cnCharWidth):V>0?Math.floor(U.length*M/V):0;U=U.substr(0,$),V=c(U,H)}return U===""&&(U=T.placeholder),U}function h(U,T,z,H){for(var M=0,V=0,K=U.length;V<K&&M<T;V++){var $=U.charCodeAt(V);M+=0<=$&&$<=127?z:H}return V}function p(U){return c("\u56FD",U)}function m(U,T){return a.measureText(U,T)}a.measureText=function(U,T){var z=F();return z.font=T||f,z.measureText(U)};function _(U,T,z,H,M){U!=null&&(U+="");var V=R(H,p(T)),K=U?U.split(`
|
|
`):[],$=K.length*V,Z=$,ve=!0;if(z&&(Z+=z[0]+z[2]),U&&M){ve=!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),T,M.ellipsis,{minChar:M.minChar,placeholder:M.placeholder}),Pe=0,ge=K.length;Pe<ge;Pe++)K[Pe]=g(K[Pe],ye)}return{lines:K,height:$,outerHeight:Z,lineHeight:V,canCacheByTextString:ve}}function x(U,T){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&&v(z,U.substring(H,V)),v(z,M[2],M[1]),H=u.lastIndex}H<U.length&&v(z,U.substring(H,U.length));var K=z.lines,$=0,Z=0,ve=[],oe=T.textPadding,fe=T.truncate,ye=fe&&fe.outerWidth,Pe=fe&&fe.outerHeight;oe&&(ye!=null&&(ye-=oe[1]+oe[3]),Pe!=null&&(Pe-=oe[0]+oe[2]));for(var ge=0;ge<K.length;ge++){for(var de=K[ge],Qe=0,St=0,Ee=0;Ee<de.tokens.length;Ee++){var De=de.tokens[Ee],rt=De.styleName&&T.rich[De.styleName]||{},Be=De.textPadding=rt.textPadding,ke=De.font=rt.font||T.font,ut=De.textHeight=R(rt.textHeight,p(ke));if(Be&&(ut+=Be[0]+Be[2]),De.height=ut,De.lineHeight=P(rt.textLineHeight,T.textLineHeight,ut),De.textAlign=rt&&rt.textAlign||T.textAlign,De.textVerticalAlign=rt&&rt.textVerticalAlign||"middle",Pe!=null&&$+De.lineHeight>Pe)return{lines:[],width:0,height:0};De.textWidth=c(De.text,ke);var ie=rt.textWidth,xe=ie==null||ie==="auto";if(typeof ie=="string"&&ie.charAt(ie.length-1)==="%")De.percentWidth=ie,ve.push(De),ie=0;else{if(xe){ie=De.textWidth;var we=rt.textBackgroundColor,Ke=we&&we.image;Ke&&(Ke=B.findExistImage(Ke),B.isImageReady(Ke)&&(ie=Math.max(ie,Ke.width*ut/Ke.height)))}var ot=Be?Be[1]+Be[3]:0;ie+=ot;var gt=ye!=null?ye-St:null;gt!=null&><ie&&(!xe||gt<ot?(De.text="",De.textWidth=ie=0):(De.text=k(De.text,gt-ot,ke,fe.ellipsis,{minChar:fe.minChar}),De.textWidth=c(De.text,ke),ie=De.textWidth+ot))}St+=De.width=ie,rt&&(Qe=Math.max(Qe,De.lineHeight))}de.width=St,de.lineHeight=Qe,$+=Qe,Z=Math.max(Z,St)}z.outerWidth=z.width=R(T.textWidth,Z),z.outerHeight=z.height=R(T.textHeight,$),oe&&(z.outerWidth+=oe[1]+oe[3],z.outerHeight+=oe[0]+oe[2]);for(var ge=0;ge<ve.length;ge++){var De=ve[ge],Nt=De.percentWidth;De.width=parseInt(Nt,10)/100*Z}return z}function v(U,T,z){for(var H=T==="",M=T.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 ve=(V[V.length-1]||(V[0]={tokens:[]})).tokens,oe=ve.length;oe===1&&ve[0].isLineHolder?ve[0]=Z:($||!oe||H)&&ve.push(Z)}}}function j(U){var T=(U.fontSize||U.fontFamily)&&[U.fontStyle,U.fontWeight,(U.fontSize||12)+"px",U.fontFamily||"sans-serif"].join(" ");return T&&y(T)||U.textFont||U.font}J.DEFAULT_FONT=f,J.$override=o,J.getWidth=c,J.getBoundingRect=l,J.adjustTextX=d,J.adjustTextY=E,J.calculateTextPosition=A,J.adjustTextPositionOnRect=C,J.truncateText=k,J.getLineHeight=p,J.measureText=m,J.parsePlainText=_,J.parseRichText=x,J.makeFont=j},"6RRn":function(We,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"),S=L("hW8S");L.d(J,"a",function(){return S.a}),J.c=Y.b},"6UM0":function(We,J,L){var Y,B;(function(){var I;(function(){"use strict";var S=[function(t,b,i){var u=i(1).Beautifier,f=i(5).Options;function a(o,c){var l=new u(o,c);return l.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new f}},function(t,b,i){var u=i(2).Output,f=i(3).Token,a=i(4),o=i(5).Options,c=i(7).Tokenizer,l=i(7).line_starters,n=i(7).positionable_operators,s=i(7).TOKEN;function d(M,V){return V.indexOf(M)!==-1}function E(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===s.RESERVED&&M.text===V}function k(M,V){return M&&M.type===s.RESERVED&&d(M.text,V)}var w=["case","return","do","if","throw","else","await","break","continue","async"],g=["before-newline","after-newline","preserve-newline"],h=A(g),p=[h.before_newline,h.preserve_newline],m={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _(M,V){if(V.multiline_frame||V.mode===m.ForInitializer||V.mode===m.Conditional)return;M.remove_indent(V.start_line_index)}function x(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 v(M){return M===m.ArrayLiteral}function j(M){return d(M,[m.Expression,m.ForInitializer,m.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 T(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 o(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(s.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(m.BlockStatement);var K=new c(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===s.START_EXPR?this.handle_start_expr(M):M.type===s.END_EXPR?this.handle_end_expr(M):M.type===s.START_BLOCK?this.handle_start_block(M):M.type===s.END_BLOCK?this.handle_end_block(M):M.type===s.WORD?this.handle_word(M):M.type===s.RESERVED?this.handle_word(M):M.type===s.SEMICOLON?this.handle_semicolon(M):M.type===s.STRING?this.handle_string(M):M.type===s.EQUALS?this.handle_equals(M):M.type===s.OPERATOR?this.handle_operator(M):M.type===s.COMMA?this.handle_comma(M):M.type===s.BLOCK_COMMENT?this.handle_block_comment(M,V):M.type===s.COMMENT?this.handle_comment(M,V):M.type===s.DOT?this.handle_dot(M):M.type===s.EOF?this.handle_eof(M):M.type===s.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&&v(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 ve=0;ve<K;ve+=1)this.print_newline(ve>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,$=d(this._flags.last_token.text,n)||d(M.text,n);if($){var Z=d(this._flags.last_token.text,n)&&d(this._options.operator_position,p)||d(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!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var K=this._tokens.peek();this._flags.mode===m.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==="["||v(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===s.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===m.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===m.ObjectLiteral&&this._flags.mode===m.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===s.WORD,V=V||C(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.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===s.END_EXPR&&(this._previous_flags.mode===m.ForInitializer||this._previous_flags.mode===m.Conditional),V=V||this._flags.last_token.type===s.WORD&&this._flags.mode===m.BlockStatement&&!this._flags.in_case&&!(M.text==="--"||M.text==="++")&&this._last_last_text!=="function"&&M.type!==s.WORD&&M.type!==s.RESERVED,V=V||this._flags.mode===m.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||k(this._flags.last_token,["get","set"])),V?(this.set_mode(m.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=m.Expression;if(M.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){k(this._flags.last_token,l)&&(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=m.ArrayLiteral,v(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())),d(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=m.ForInitializer):d(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=m.Conditional):d(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:(d(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M);else if(this._flags.last_token.type===s.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===m.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===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&d(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===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.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===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(M,M.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.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===m.Conditional&&(this._previous_flags.mode=m.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===s.END_EXPR?(this.set_mode(m.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m.BlockStatement):K&&(d(K.text,[":",","])&&d(V.type,[s.STRING,s.WORD,s.RESERVED])||d(V.text,["get","set","..."])&&d(K.type,[s.WORD,s.RESERVED]))?d(this._last_last_text,["class","interface"])&&!d(K.text,[":",","])?this.set_mode(m.BlockStatement):this.set_mode(m.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(m.BlockStatement):d(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||k(this._flags.last_token,["return","throw","import","default"])?this.set_mode(m.ObjectLiteral):this.set_mode(m.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===s.END_EXPR;if(this._options.brace_preserve_inline){var ve=0,oe=null;this._flags.inline_frame=!0;do if(ve+=1,oe=this._tokens.peek(ve-1),oe.newlines){this._flags.inline_frame=!1;break}while(oe.type!==s.EOF&&!(oe.type===s.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!==s.OPERATOR&&(Z||this._flags.last_token.type===s.EQUALS||k(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(v(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.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!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.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===m.Statement;)this.restore_mode();var V=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(v(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(M)},z.prototype.handle_word=function(M){if(M.type===s.RESERVED){if(d(M.text,["set","get"])&&this._flags.mode!==m.ObjectLiteral)M.type=s.WORD;else if(M.text==="import"&&d(this._tokens.peek().text,["(","."]))M.type=s.WORD;else if(d(M.text,["as","from"])&&!this._flags.import_block)M.type=s.WORD;else if(this._flags.mode===m.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(M.type=s.WORD)}}if(this.start_of_statement(M)?k(this._flags.last_token,["var","let","const"])&&M.type===s.WORD&&(this._flags.declaration_statement=!0):M.newlines&&!j(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.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===m.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===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M)),C(M,"function")){(d(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(d(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!M.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.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===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(j(this._flags.mode)||v(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===s.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===s.SEMICOLON&&this._flags.mode===m.BlockStatement?K="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&j(this._flags.mode)?K="SPACE":this._flags.last_token.type===s.STRING?K="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(d(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&d(this._last_last_text,["{",","]))?K="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?K="SPACE":K="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,K="NEWLINE"),k(M,l)&&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===s.END_BLOCK&&this._previous_flags.mode===m.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!==s.END_EXPR?(this._flags.last_token.type!==s.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,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&v(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===s.WORD||M.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(M),this._flags.last_word=M.text,M.type===s.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===m.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===s.WORD)||(this.start_of_statement(M)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(M),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M):M.text.startsWith("`")&&this._flags.last_token.type===s.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===m.ObjectLiteral||this._flags.mode===m.Statement&&this._flags.parent.mode===m.ObjectLiteral?(this._flags.mode===m.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)},z.prototype.handle_operator=function(M){var V=M.text==="*"&&(k(this._flags.last_token,["function","yield"])||d(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),K=d(M.text,["-","+"])&&(d(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||d(this._flags.last_token.text,l)||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===s.DOT){this.print_token(M);return}if(M.text==="::"){this.print_token(M);return}if(this._flags.last_token.type===s.OPERATOR&&d(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!==s.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,ve=!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&&d(M.text,n)){var fe=M.text===":",ye=fe&&oe,Pe=fe&&!oe;switch(this._options.operator_position){case h.before_newline:this._output.space_before_token=!Pe,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:Pe||this.allow_wrap_or_preserved_newline(M),Z=!(this._output.just_added_newline()||Pe),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 ge=this._tokens.peek();ve=ge&&d(ge.type,[s.WORD,s.RESERVED])}else if(M.text==="...")this.allow_wrap_or_preserved_newline(M),Z=this._flags.last_token.type===s.START_BLOCK,ve=!1;else if(d(M.text,["--","++","!","~"])||K){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(M),Z=!1,ve=!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===s.RESERVED?Z=!0:this._flags.last_token.type===s.END_EXPR?Z=!(this._flags.last_token.text==="]"&&(M.text==="--"||M.text==="++")):this._flags.last_token.type===s.OPERATOR&&(Z=d(M.text,["--","-","++","+"])&&d(this._flags.last_token.text,["--","-","++","+"]),d(M.text,["+","-"])&&d(this._flags.last_token.text,["--","++"])&&(ve=!0)),(this._flags.mode===m.BlockStatement&&!this._flags.inline_frame||this._flags.mode===m.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Z,this.print_token(M),this._output.space_before_token=ve},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=x(M.text),$,Z=!1,ve=!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,"*"),ve=T(K,oe),Z&&(this._flags.alignment=1),$=0;$<K.length;$++)Z?(this.print_token_line_indentation(M),this._output.add_token(E(K[$]))):ve&&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===m.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 i(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}i.prototype.get_indent_size=function(f,a){var o=this.__base_string_length;return a=a||0,f<0&&(o=0),o+=f*this.__indent_size,o+=a,o},i.prototype.get_indent_string=function(f,a){var o=this.__base_string;return a=a||0,f<0&&(f=0,o=""),a+=f*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},i.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var f=this.__cache.length,a=0,o="";this.__indent_size&&f>=this.__indent_size&&(a=Math.floor(f/this.__indent_size),f-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),f&&(o+=new Array(f+1).join(" ")),this.__cache.push(o)};function u(f,a){this.__indent_cache=new i(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 o=this.__lines.join(`
|
|
`);return f!==`
|
|
`&&(o=o.replace(/[\n]/g,f)),o},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 o=this.__lines.length-2;o>=0;){var c=this.__lines[o];if(c.is_empty())break;if(c.item(0).indexOf(f)!==0&&c.item(-1)!==a){this.__lines.splice(o+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=u},function(t){function b(i,u,f,a){this.type=i,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 i="\\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",o="(?:\\\\u[0-9a-fA-F]{4}|["+i+f+"])",c="(?:\\\\u[0-9a-fA-F]{4}|["+u+f+a+"])*";b.identifier=new RegExp(o+c,"g"),b.identifierStart=new RegExp(o),b.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+u+f+a+"])+");var l=/[\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,i){var u=i(6).Options,f=["before-newline","after-newline","preserve-newline"];function a(o){u.call(this,o,"js");var c=this.raw_options.brace_style||null;c==="expand-strict"?this.raw_options.brace_style="expand":c==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n<l.length;n++)l[n]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=l[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=i(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 o=this.raw_options[f],c=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(c=o.concat()):typeof o=="string"&&(c=o.split(/[^a-zA-Z0-9_\/\-]+/)),c},b.prototype._get_boolean=function(f,a){var o=this.raw_options[f],c=o===void 0?!!a:!!o;return c},b.prototype._get_characters=function(f,a){var o=this.raw_options[f],c=a||"";return typeof o=="string"&&(c=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),c},b.prototype._get_number=function(f,a){var o=this.raw_options[f];a=parseInt(a,10),isNaN(a)&&(a=0);var c=parseInt(o,10);return isNaN(c)&&(c=a),c},b.prototype._get_selection=function(f,a,o){var c=this._get_selection_list(f,a,o);if(c.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 c[0]},b.prototype._get_selection_list=function(f,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var c=this._get_array(f,o);if(!this._is_valid_selection(c,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 c},b.prototype._is_valid_selection=function(f,a){return f.length&&a.length&&!f.some(function(o){return a.indexOf(o)===-1})};function i(f,a){var o={};f=u(f);var c;for(c in f)c!==a&&(o[c]=f[c]);if(a&&f[a])for(c in f[a])o[c]=f[a][c];return o}function u(f){var a={},o;for(o in f){var c=o.replace(/-/g,"_");a[c]=f[o]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=i},function(t,b,i){var u=i(8).InputScanner,f=i(9).Tokenizer,a=i(9).TOKEN,o=i(13).Directives,c=i(4),l=i(12).Pattern,n=i(14).TemplatablePattern;function s(U,T){return T.indexOf(U)!==-1}var d={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},E=new o(/\/\*/,/\*\//),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(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var h=new RegExp(g),p="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),m=p.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_=new RegExp("^(?:"+m.join("|")+")$"),x,v=function(U,T){f.call(this,U,T),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var z=new l(this._input),H=new n(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(c.identifier).matching(c.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(c.lineBreak),shebang:z.starting_with(/#!/).until_after(c.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(/[`}\\]/)}};v.prototype=new f,v.prototype._is_comment=function(U){return U.type===d.COMMENT||U.type===d.BLOCK_COMMENT||U.type===d.UNKNOWN},v.prototype._is_opening=function(U){return U.type===d.START_BLOCK||U.type===d.START_EXPR},v.prototype._is_closing=function(U,T){return(U.type===d.END_BLOCK||U.type===d.END_EXPR)&&T&&(U.text==="]"&&T.text==="["||U.text===")"&&T.text==="("||U.text==="}"&&T.text==="{")},v.prototype._reset=function(){x=!1},v.prototype._get_next_token=function(U,T){var z=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(d.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(d.UNKNOWN,this._input.next()),z)},v.prototype._read_word=function(U){var T;if(T=this.__patterns.identifier.read(),T!=="")return T=T.replace(c.allLineBreaks,`
|
|
`),!(U.type===d.DOT||U.type===d.RESERVED&&(U.text==="set"||U.text==="get"))&&_.test(T)?(T==="in"||T==="of")&&(U.type===d.WORD||U.type===d.STRING)?this._create_token(d.OPERATOR,T):this._create_token(d.RESERVED,T):this._create_token(d.WORD,T);if(T=this.__patterns.number.read(),T!=="")return this._create_token(d.WORD,T)},v.prototype._read_singles=function(U){var T=null;return U==="("||U==="["?T=this._create_token(d.START_EXPR,U):U===")"||U==="]"?T=this._create_token(d.END_EXPR,U):U==="{"?T=this._create_token(d.START_BLOCK,U):U==="}"?T=this._create_token(d.END_BLOCK,U):U===";"?T=this._create_token(d.SEMICOLON,U):U==="."&&k.test(this._input.peek(1))?T=this._create_token(d.DOT,U):U===","&&(T=this._create_token(d.COMMA,U)),T&&this._input.next(),T},v.prototype._read_punctuation=function(){var U=this.__patterns.punct.read();if(U!=="")return U==="="?this._create_token(d.EQUALS,U):U==="?."?this._create_token(d.DOT,U):this._create_token(d.OPERATOR,U)},v.prototype._read_non_javascript=function(U){var T="";if(U==="#"){if(this._is_first_token()&&(T=this.__patterns.shebang.read(),T))return this._create_token(d.UNKNOWN,T.trim()+`
|
|
`);if(T=this.__patterns.include.read(),T)return this._create_token(d.UNKNOWN,T.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(d.WORD,z)}this._input.back()}else if(U==="<"&&this._is_first_token()){if(T=this.__patterns.html_comment_start.read(),T){for(;this._input.hasNext()&&!this._input.testChar(c.newline);)T+=this._input.next();return x=!0,this._create_token(d.COMMENT,T)}}else if(x&&U==="-"&&(T=this.__patterns.html_comment_end.read(),T))return x=!1,this._create_token(d.COMMENT,T);return null},v.prototype._read_comment=function(U){var T=null;if(U==="/"){var z="";if(this._input.peek(1)==="*"){z=this.__patterns.block_comment.read();var H=E.get_directives(z);H&&H.ignore==="start"&&(z+=E.readIgnored(this._input)),z=z.replace(c.allLineBreaks,`
|
|
`),T=this._create_token(d.BLOCK_COMMENT,z),T.directives=H}else this._input.peek(1)==="/"&&(z=this.__patterns.comment.read(),T=this._create_token(d.COMMENT,z))}return T},v.prototype._read_string=function(U){if(U==="`"||U==="'"||U==='"'){var T=this._input.next();return this.has_char_escapes=!1,U==="`"?T+=this._read_string_recursive("`",!0,"${"):T+=this._read_string_recursive(U),this.has_char_escapes&&this._options.unescape_strings&&(T=j(T)),this._input.peek()===U&&(T+=this._input.next()),T=T.replace(c.allLineBreaks,`
|
|
`),this._create_token(d.STRING,T)}return null},v.prototype._allow_regexp_or_xml=function(U){return U.type===d.RESERVED&&s(U.text,["return","case","throw","else","do","typeof","yield"])||U.type===d.END_EXPR&&U.text===")"&&U.opened.previous.type===d.RESERVED&&s(U.opened.previous.text,["if","while","for"])||s(U.type,[d.COMMENT,d.START_EXPR,d.START_BLOCK,d.START,d.END_BLOCK,d.OPERATOR,d.EQUALS,d.EOF,d.SEMICOLON,d.COMMA])},v.prototype._read_regexp=function(U,T){if(U==="/"&&this._allow_regexp_or_xml(T)){for(var z=this._input.next(),H=!1,M=!1;this._input.hasNext()&&(H||M||this._input.peek()!==U)&&!this._input.testChar(c.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(c.identifier)),this._create_token(d.STRING,z)}return null},v.prototype._read_xml=function(U,T){if(this._options.e4x&&U==="<"&&this._allow_regexp_or_xml(T)){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],ve=!!H[H.length-1]||Z.slice(0,8)==="![CDATA[";if(!ve&&(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(c.allLineBreaks,`
|
|
`),this._create_token(d.STRING,z)}}return null};function j(U){for(var T="",z=0,H=new u(U),M=null;H.hasNext();)if(M=H.match(/([\s]|[^\\]|\\\\)+/g),M&&(T+=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{T+="\\",H.hasNext()&&(T+=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){T+="\\"+M[0];continue}else z===34||z===39||z===92?T+="\\"+String.fromCharCode(z):T+=String.fromCharCode(z)}return T}v.prototype._read_string_recursive=function(U,T,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||!T&&c.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("}",T,"`"):K+=this._read_string_recursive("`",T,"${"),this._input.hasNext()&&(K+=this._input.next())));K+=M.read(),V+=K}return V},t.exports.Tokenizer=v,t.exports.TOKEN=d,t.exports.positionable_operators=w.slice(),t.exports.line_starters=p.slice()},function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function i(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},i.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},i.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},i.prototype.test=function(u,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(u,f):!1},i.prototype.testChar=function(u,f){var a=this.peek(f);return u.lastIndex=0,a!==null&&u.test(a)},i.prototype.match=function(u){var f=this.__match(u,this.__position);return f?this.__position+=f[0].length:f=null,f},i.prototype.read=function(u,f,a){var o="",c;return u&&(c=this.match(u),c&&(o+=c[0])),f&&(c||!u)&&(o+=this.readUntil(f,a)),o},i.prototype.readUntil=function(u,f){var a="",o=this.__position;u.lastIndex=this.__position;var c=u.exec(this.__input);return c?(o=c.index,f&&(o+=c[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},i.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},i.prototype.get_regexp=function(u,f){var a=null,o="g";return f&&b&&(o="y"),typeof u=="string"&&u!==""?a=new RegExp(u,o):u&&(a=new RegExp(u.source,o)),a},i.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(u){var f=this.__position,a=this.readUntilAfter(u);return this.__position=f,a},i.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=i},function(t,b,i){var u=i(8).InputScanner,f=i(3).Token,a=i(10).TokenStream,o=i(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(n,s){this._input=new u(n),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var n,s=new f(c.START,""),d=null,E=[],A=new a;s.type!==c.EOF;){for(n=this._get_next_token(s,d);this._is_comment(n);)A.add(n),n=this._get_next_token(s,d);A.isEmpty()||(n.comments_before=A,A=new a),n.parent=d,this._is_opening(n)?(E.push(d),d=n):d&&this._is_closing(n,d)&&(n.opened=d,d.closed=n,d=E.pop(),n.parent=d),n.previous=s,s.next=n,this.__tokens.add(n),s=n}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(n,s){this._readWhitespace();var d=this._input.read(/.+/g);return d?this._create_token(c.RAW,d):this._create_token(c.EOF,"")},l.prototype._is_comment=function(n){return!1},l.prototype._is_opening=function(n){return!1},l.prototype._is_closing=function(n,s){return!1},l.prototype._create_token=function(n,s){var d=new f(n,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return d},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=c},function(t){function b(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}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 i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},b.prototype.peek=function(i){var u=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(u=this.__tokens[i]),u},b.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},t.exports.TokenStream=b},function(t,b,i){var u=i(12).Pattern;function f(a,o){u.call(this,a,o),o?this._line_regexp=this._input.get_regexp(o._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,o){a+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},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 o=this.__split(this._newline_regexp,a);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return a},f.prototype.matching=function(a,o){var c=this._create();return c.__set_whitespace_patterns(a,o),c._update(),c},f.prototype._create=function(){return new f(this._input,this)},f.prototype.__split=function(a,o){a.lastIndex=0;for(var c=0,l=[],n=a.exec(o);n;)l.push(o.substring(c,n.index)),c=n.index+n[0].length,n=a.exec(o);return c<o.length?l.push(o.substring(c,o.length)):l.push(""),l},t.exports.WhitespacePattern=f},function(t){function b(i,u){this._input=i,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 i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(i){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(i),u._update(),u},b.prototype.until=function(i){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(i),u._update(),u},b.prototype.starting_with=function(i){var u=this._create();return u._starting_pattern=this._input.get_regexp(i,!0),u._update(),u},b.prototype.matching=function(i){var u=this._create();return u._match_pattern=this._input.get_regexp(i,!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(i,u){i=typeof i=="string"?i:i.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(i);f;)u[f[1]]=f[2],f=this.__directive_pattern.exec(i);return u},b.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},function(t,b,i){var u=i(12).Pattern,f={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(o,c){u.call(this,o,c),this.__template_pattern=null,this._disabled=Object.assign({},f),this._excluded=Object.assign({},f),c&&(this.__template_pattern=this._input.get_regexp(c.__template_pattern),this._excluded=Object.assign(this._excluded,c._excluded),this._disabled=Object.assign(this._disabled,c._disabled));var l=new u(o);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}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(o){var c=this._create();return c._disabled[o]=!0,c._update(),c},a.prototype.read_options=function(o){var c=this._create();for(var l in f)c._disabled[l]=o.templating.indexOf(l)===-1;return c._update(),c},a.prototype.exclude=function(o){var c=this._create();return c._excluded[o]=!0,c._update(),c},a.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),o+=c,c=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},a.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},a.prototype._read_template=function(){var o="",c=this._input.peek();if(c==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(o=o||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},t.exports.TemplatablePattern=a}],R={};function P(t){var b=R[t];if(b!==void 0)return b.exports;var i=R[t]={exports:{}};return S[t](i,i.exports,P),i.exports}var y=P(0);I=y})();var F=I;!(Y=[],B=function(){return{js_beautify:F}}.apply(J,Y),B!==void 0&&(We.exports=B))})()},"6eGT":function(We,J,L){"use strict";function Y(B){return null}J.a=Y},"6fms":function(We,J,L){var Y=L("SUKs"),B=L("06Qe"),I=L("bYtY"),F=I.each;function S(t){return parseInt(t,10)}function R(t,b){B.initVML(),this.root=t,this.storage=b;var i=document.createElement("div"),u=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",u.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=u,this._vmlViewport=i,this.resize();var f=b.delFromStorage,a=b.addToStorage;b.delFromStorage=function(o){f.call(b,o),o&&(o.onRemove&&o.onRemove(u))},b.addToStorage=function(o){o.onAdd&&o.onAdd(u),a.call(b,o)},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,i=0;i<t.length;i++){var u=t[i];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 i=this._vmlViewport.style;i.width=t+"px",i.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||S(b.width))-S(b.paddingLeft)-S(b.paddingRight)|0},_getHeight:function(){var t=this.root,b=t.currentStyle;return(t.clientHeight||S(b.height))-S(b.paddingTop)-S(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 y=R;We.exports=y},"746U":function(We,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 S}),L.d(J,"m",function(){return R}),L.d(J,"h",function(){return P}),L.d(J,"n",function(){return y}),L.d(J,"c",function(){return t}),L.d(J,"a",function(){return b}),L.d(J,"i",function(){return i}),L.d(J,"o",function(){return u}),L.d(J,"e",function(){return o}),L.d(J,"d",function(){return c}),L.d(J,"p",function(){return l}),L.d(J,"b",function(){return n});function Y(s){return Array.isArray(s)}function B(s){return typeof s=="string"}function I(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function F(s){return typeof s=="number"&&!isNaN(s)}function S(s){return s===!0||s===!1}function R(s){return typeof s=="undefined"}function P(s){return!y(s)}function y(s){return R(s)||s===null}function t(s,d){if(!s)throw new Error(d?`Unexpected type, expected '${d}'`:"Unexpected type")}function b(s){if(y(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function i(s){return typeof s=="function"}function u(s,d){const E=Math.min(s.length,d.length);for(let A=0;A<E;A++)f(s[A],d[A])}function f(s,d){if(B(d)){if(typeof s!==d)throw new Error(`argument does not match constraint: typeof ${d}`)}else if(i(d)){try{if(s instanceof d)return}catch(E){}if(!y(s)&&s.constructor===d)return;if(d.length===1&&d.call(void 0,s)===!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(s){let d=[],E=Object.getPrototypeOf(s);for(;Object.prototype!==E;)d=d.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return d}function o(s){const d=[];for(const E of a(s))typeof s[E]=="function"&&d.push(E);return d}function c(s,d){const E=C=>function(){const k=Array.prototype.slice.call(arguments,0);return d(C,k)};let A={};for(const C of s)A[C]=E(C);return A}function l(s){return s===null?void 0:s}function n(s,d="Unreachable"){throw new Error(d)}},"7Cbv":function(We,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 S(f){return typeof f=="string"&&F.test(f)}for(var R=S,P=[],y=0;y<256;++y)P.push((y+256).toString(16).substr(1));function t(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(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(o))throw TypeError("Stringified UUID is invalid");return o}var b=t;function i(f,a,o){f=f||{};var c=f.random||(f.rng||I)();if(c[6]=c[6]&15|64,c[8]=c[8]&63|128,a){o=o||0;for(var l=0;l<16;++l)a[o+l]=c[l];return a}return b(c)}var u=J.a=i},"7SHv":function(We,J,L){var Y=L("LPTA"),B=Y.devicePixelRatio,I=L("bYtY"),F=L("SUKs"),S=L("mFDi"),R=L("BPZU"),P=L("Xmg4"),y=L("mLcG"),t=L("Dagg"),b=L("ItGF"),i=1e5,u=314159,f=.01,a=.001;function o(w){return parseInt(w,10)}function c(w){return w?w.__builtin__?!0:!(typeof w.resize!="function"||typeof w.refresh!="function"):!1}var l=new S(0,0,0,0),n=new S(0,0,0,0);function s(w,g,h){return l.copy(w.getBoundingRect()),w.transform&&l.applyTransform(w.transform),n.width=g,n.height=h,!l.intersect(n)}function d(w,g){if(w===g)return!1;if(!w||!g||w.length!==g.length)return!0;for(var h=0;h<w.length;h++)if(w[h]!==g[h])return!0;return!1}function E(w,g){for(var h=0;h<w.length;h++){var p=w[h];p.setTransform(g),g.beginPath(),p.buildPath(g,p.shape),g.clip(),p.restoreTransform(g)}}function A(w,g){var h=document.createElement("div");return h.style.cssText=["position:relative","width:"+w+"px","height:"+g+"px","padding:0","margin:0","border-width:0"].join(";")+";",h}var C=function(w,g,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 m=w.style;m&&(m["-webkit-tap-highlight-color"]="transparent",m["-webkit-user-select"]=m["user-select"]=m["-webkit-touch-callout"]="none",w.innerHTML=""),this.storage=g;var _=this._zlevelList=[],x=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 T=new P(w,this,this.dpr);T.__builtin__=!0,T.initContext(),x[u]=T,T.zlevel=u,_.push(u),this._domRoot=w}else{this._width=this._getSize(0),this._height=this._getSize(1);var v=this._domRoot=A(this._width,this._height);w.appendChild(v)}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 g=this.storage.getDisplayList(!0),h=this._zlevelList;this._redrawId=Math.random(),this._paintList(g,w,this._redrawId);for(var p=0;p<h.length;p++){var m=h[p],_=this._layers[m];if(!_.__builtin__&&_.refresh){var x=p===0?this._backgroundColor:null;_.refresh(x)}}return this.refreshHover(),this},addHover:function(w,g){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,g&&h.setStyle(g),this._hoverElements.push(h),h},removeHover:function(w){var g=w.__hoverMir,h=this._hoverElements,p=I.indexOf(h,g);p>=0&&h.splice(p,1),w.__hoverMir=null},clearHover:function(w){for(var g=this._hoverElements,h=0;h<g.length;h++){var p=g[h].__from;p&&(p.__hoverMir=null)}g.length=0},refreshHover:function(){var w=this._hoverElements,g=w.length,h=this._hoverlayer;if(h&&h.clear(),!g)return;R(w,this.storage.displayableSortFunc),h||(h=this._hoverlayer=this.getLayer(i));var p={};h.ctx.save();for(var m=0;m<g;){var _=w[m],x=_.__from;if(!(x&&x.__zr)){w.splice(m,1),x.__hoverMir=null,g--;continue}m++,x.invisible||(_.transform=x.transform,_.invTransform=x.invTransform,_.__clipPaths=x.__clipPaths,this._doPaintEl(_,h,!0,p))}h.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(w,g,h){if(this._redrawId!==h)return;g=g||!1,this._updateLayerStatus(w);var p=this._doPaintList(w,g);if(this._needsManuallyCompositing&&this._compositeManually(),!p){var m=this;y(function(){m._paintList(w,g,h)})}},_compositeManually:function(){var w=this.getLayer(u).ctx,g=this._domRoot.width,h=this._domRoot.height;w.clearRect(0,0,g,h),this.eachBuiltinLayer(function(p){p.virtual&&w.drawImage(p.dom,0,0,g,h)})},_doPaintList:function(w,g){for(var h=[],p=0;p<this._zlevelList.length;p++){var m=this._zlevelList[p],_=this._layers[m];_.__builtin__&&_!==this._hoverlayer&&(_.__dirty||g)&&h.push(_)}for(var x=!0,v=0;v<h.length;v++){var _=h[v],j=_.ctx,U={};j.save();var T=g?_.__startIndex:_.__drawIndex,z=!g&&_.incremental&&Date.now,H=z&&Date.now(),M=_.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(_.__startIndex===_.__endIndex)_.clear(!1,M);else if(T===_.__startIndex){var V=w[T];(!V.incremental||!V.notClear||g)&&_.clear(!1,M)}T===-1&&(console.error("For some unknown reason. drawIndex is -1"),T=_.__startIndex);for(var K=T;K<_.__endIndex;K++){var $=w[K];if(this._doPaintEl($,_,g,U),$.__dirty=$.__dirtyText=!1,z){var Z=Date.now()-H;if(Z>15)break}}_.__drawIndex=K,_.__drawIndex<_.__endIndex&&(x=!1),U.prevElClipPaths&&j.restore(),j.restore()}return b.wxa&&I.each(this._layers,function(ve){ve&&ve.ctx&&ve.ctx.draw&&ve.ctx.draw()}),x},_doPaintEl:function(w,g,h,p){var m=g.ctx,_=w.transform;if((g.__dirty||h)&&!w.invisible&&w.style.opacity!==0&&!(_&&!_[0]&&!_[3])&&!(w.culling&&s(w,this._width,this._height))){var x=w.__clipPaths,v=p.prevElClipPaths;(!v||d(x,v))&&(v&&(m.restore(),p.prevElClipPaths=null,p.prevEl=null),x&&(m.save(),E(x,m),p.prevElClipPaths=x)),w.beforeBrush&&w.beforeBrush(m),w.brush(m,p.prevEl||null),p.prevEl=w,w.afterBrush&&w.afterBrush(m)}},getLayer:function(w,g){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),g&&(h.virtual=g),this.insertLayer(w,h),h.initContext()),h},insertLayer:function(w,g){var h=this._layers,p=this._zlevelList,m=p.length,_=null,x=-1,v=this._domRoot;if(h[w]){F("ZLevel "+w+" has been used already");return}if(!c(g)){F("Layer of zlevel "+w+" is not valid");return}if(m>0&&w>p[0]){for(x=0;x<m-1&&!(p[x]<w&&p[x+1]>w);x++);_=h[p[x]]}if(p.splice(x+1,0,w),h[w]=g,!g.virtual)if(_){var j=_.dom;j.nextSibling?v.insertBefore(g.dom,j.nextSibling):v.appendChild(g.dom)}else v.firstChild?v.insertBefore(g.dom,v.firstChild):v.appendChild(g.dom)},eachLayer:function(w,g){var h=this._zlevelList,p,m;for(m=0;m<h.length;m++)p=h[m],w.call(g,this._layers[p],p)},eachBuiltinLayer:function(w,g){var h=this._zlevelList,p,m,_;for(_=0;_<h.length;_++)m=h[_],p=this._layers[m],p.__builtin__&&w.call(g,p,m)},eachOtherLayer:function(w,g){var h=this._zlevelList,p,m,_;for(_=0;_<h.length;_++)m=h[_],p=this._layers[m],p.__builtin__||w.call(g,p,m)},getLayers:function(){return this._layers},_updateLayerStatus:function(w){this.eachBuiltinLayer(function(U,T){U.__dirty=U.__used=!1});function g(U){m&&(m.__endIndex!==U&&(m.__dirty=!0),m.__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 m=null,_=0,x,h=0;h<w.length;h++){var p=w[h],v=p.zlevel,j;x!==v&&(x=v,_=0),p.incremental?(j=this.getLayer(v+a,this._needsManuallyCompositing),j.incremental=!0,_=1):j=this.getLayer(v+(_>0?f:0),this._needsManuallyCompositing),j.__builtin__||F("ZLevel "+v+" has been used by unkown layer "+j.id),j!==m&&(j.__used=!0,j.__startIndex!==h&&(j.__dirty=!0),j.__startIndex=h,j.incremental?j.__drawIndex=-1:j.__drawIndex=h,g(h),m=j),p.__dirty&&(j.__dirty=!0,j.incremental&&j.__drawIndex<0&&(j.__drawIndex=h))}g(h),this.eachBuiltinLayer(function(U,T){!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,g){if(g){var h=this._layerConfig;h[w]?I.merge(h[w],g,!0):h[w]=g;for(var p=0;p<this._zlevelList.length;p++){var m=this._zlevelList[p];if(m===w||m===w+f){var _=this._layers[m];I.merge(_,h[w],!0)}}}},delLayer:function(w){var g=this._layers,h=this._zlevelList,p=g[w];if(!p)return;p.dom.parentNode.removeChild(p.dom),delete g[w],h.splice(I.indexOf(h,w),1)},resize:function(w,g){if(this._domRoot.style){var h=this._domRoot;h.style.display="none";var p=this._opts;if(w!=null&&(p.width=w),g!=null&&(p.height=g),w=this._getSize(0),g=this._getSize(1),h.style.display="",this._width!==w||g!==this._height){h.style.width=w+"px",h.style.height=g+"px";for(var m in this._layers)this._layers.hasOwnProperty(m)&&this._layers[m].resize(w,g);I.each(this._progressiveLayers,function(_){_.resize(w,g)}),this.refresh(!0)}this._width=w,this._height=g}else{if(w==null||g==null)return;this._width=w,this._height=g,this.getLayer(u).resize(w,g)}return this},clearLayer:function(w){var g=this._layers[w];g&&g.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 g=new P("image",this,w.pixelRatio||this.dpr);if(g.initContext(),g.clear(!1,w.backgroundColor||this._backgroundColor),w.pixelRatio<=this.dpr){this.refresh();var h=g.dom.width,p=g.dom.height,m=g.ctx;this.eachLayer(function(U){U.__builtin__?m.drawImage(U.dom,0,0,h,p):U.renderToCanvas&&(g.ctx.save(),U.renderToCanvas(g.ctx),g.ctx.restore())})}else for(var _={},x=this.storage.getDisplayList(!0),v=0;v<x.length;v++){var j=x[v];this._doPaintEl(j,g,!0,_)}return g.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(w){var g=this._opts,h=["width","height"][w],p=["clientWidth","clientHeight"][w],m=["paddingLeft","paddingTop"][w],_=["paddingRight","paddingBottom"][w];if(g[h]!=null&&g[h]!=="auto")return parseFloat(g[h]);var x=this.root,v=document.defaultView.getComputedStyle(x);return(x[p]||o(v[h])||o(x.style[h]))-(o(v[m])||0)-(o(v[_])||0)|0},pathToImage:function(w,g){g=g||this.dpr;var h=document.createElement("canvas"),p=h.getContext("2d"),m=w.getBoundingRect(),_=w.style,x=_.shadowBlur*g,v=_.shadowOffsetX*g,j=_.shadowOffsetY*g,U=_.hasStroke()?_.lineWidth:0,T=Math.max(U/2,-v+x),z=Math.max(U/2,v+x),H=Math.max(U/2,-j+x),M=Math.max(U/2,j+x),V=m.width+T+z,K=m.height+H+M;h.width=V*g,h.height=K*g,p.scale(g,g),p.clearRect(0,0,V,K),p.dpr=g;var $={position:w.position,rotation:w.rotation,scale:w.scale};w.position=[T-m.x,H-m.y],w.rotation=0,w.scale=[1,1],w.updateTransform(),w&&w.brush(p);var Z=t,ve=new Z({style:{x:0,y:0,image:h}});return $.position!=null&&(ve.position=w.position=$.position),$.rotation!=null&&(ve.rotation=w.rotation=$.rotation),$.scale!=null&&(ve.scale=w.scale=$.scale),ve}};var k=C;We.exports=k},"7ahc":function(We,J,L){"use strict";L.d(J,"a",function(){return E});var Y=L("k1fw"),B=L("0Owb"),I=L("+L6B"),F=L("2/Rp"),S=L("y8nQ"),R=L("Vl3Y"),P=L("tJVT"),y=L("OaEy"),t=L("2fM7"),b=L("q1tI"),i=L.n(b),u=L("VrN/"),f=L.n(u),a=L("p77/"),o=L.n(a),c=L("c5Ni"),l=L.n(c),n=t.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},d={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"),g=Object(P.a)(w,2),h=g[0],p=g[1];function m(x){p(d[x][1])}function _(x){C(x)}return i.a.createElement(R.a,Object(B.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:_}),i.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(t.a,{onChange:m},Object.keys(d).map(function(x){return i.a.createElement(n,{key:x,value:x},d[x][0])}))),i.a.createElement(R.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(E,{mode:h})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(F.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(F.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function E(A){var C=A.value,k=A.onChange,w=A.mode,g=A.options,h=g===void 0?{}:g,p=Object(b.useRef)(),m=Object(b.useState)(),_=Object(P.a)(m,2),x=_[0],v=_[1];return Object(b.useEffect)(function(){if(x){function j(U){var T=U.getValue();k&&k(T)}return x.on("change",j),function(){x.off("change",j)}}},[x,k]),Object(b.useEffect)(function(){x&&x.setOption("mode",w)},[x,w]),Object(b.useEffect)(function(){x&&((C!==x.getValue()||C==="")&&setTimeout(function(){x.setValue(C||" ")},300))},[x,C]),Object(b.useEffect)(function(){if(p.current&&!x){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));v(j)}},[p.current,x]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:p}))}},"7ixt":function(We,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(We,J,L){var Y=L("IMiH"),B=L("QBsz"),I=B.applyTransform,F=Y.CMD,S=[[],[],[]],R=Math.sqrt,P=Math.atan2;function y(t,b){var i=t.data,u,f,a,o,c,l,n=F.M,s=F.C,d=F.L,E=F.R,A=F.A,C=F.Q;for(a=0,o=0;a<i.length;){u=i[a++],o=a,f=0;switch(u){case n:f=1;break;case d:f=1;break;case s:f=3;break;case C:f=2;break;case A:var k=b[4],w=b[5],g=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]/g);i[a]*=g,i[a++]+=k,i[a]*=h,i[a++]+=w,i[a++]*=g,i[a++]*=h,i[a++]+=p,i[a++]+=p,a+=2,o=a;break;case E:l[0]=i[a++],l[1]=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1],l[0]+=i[a++],l[1]+=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1]}for(c=0;c<f;c++){var l=S[c];l[0]=i[a++],l[1]=i[a++],I(l,l,b),i[o++]=l[0],i[o++]=l[1]}}}We.exports=y},"815F":function(We,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"),S=L("Kwbf"),R=L("OZM5");function P(o,c){return o!=null?o:c}function y(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=new Map;function l(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(d){var E=d.key,A=d.children;Object(S.a)(E!=null,"Tree node must have a certain key: [".concat(s).concat(E,"]"));var C=String(E);Object(S.a)(!c.has(C)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(C)),c.set(C,!0),l(A,"".concat(s).concat(C," > "))})}l(o)}function t(o){function c(l){var n=Object(F.a)(l);return n.map(function(s){if(!Object(R.i)(s))return Object(S.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var d=s.key,E=s.props,A=E.children,C=Object(I.a)(E,["children"]),k=Object(B.a)({key:d},C),w=c(A);return w.length&&(k.children=w),k}).filter(function(s){return s})}return c(o)}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(c===!0?[]:c),n=[];function s(d){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(A,C){var k=Object(R.h)(E?E.pos:"0",C),w=P(A.key,k),g=Object(B.a)(Object(B.a)({},A),{},{parent:E,pos:k,children:null,data:A,isStart:[].concat(Object(Y.a)(E?E.isStart:[]),[C===0]),isEnd:[].concat(Object(Y.a)(E?E.isEnd:[]),[C===d.length-1])});return n.push(g),c===!0||l.has(w)?g.children=s(A.children||[],g):g.children=[],g})}return s(o),n}function i(o,c,l){var n;l?typeof l=="string"?n=function(E){return E[l]}:typeof l=="function"&&(n=function(E){return l(E)}):n=function(E,A){return P(E.key,A)};function s(d,E,A){var C=d?d.children:o,k=d?Object(R.h)(A.pos,E):"0";if(d){var w=n(d,k),g={node:d,index:E,pos:k,key:w,parentPos:A.node?A.pos:null,level:A.level+1};c(g)}C&&C.forEach(function(h,p){s(h,p,{node:d,pos:k,level:A?A.level+1:-1})})}s(null)}function u(o){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=c.initWrapper,n=c.processEntity,s=c.onProcessFinished,d=arguments.length>2?arguments[2]:void 0,E={},A={},C={posEntities:E,keyEntities:A};return l&&(C=l(C)||C),i(o,function(k){var w=k.node,g=k.index,h=k.pos,p=k.key,m=k.parentPos,_=k.level,x={node:w,index:g,key:p,pos:h,level:_},v=P(p,h);E[h]=x,A[v]=x,x.parent=E[m],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),n&&n(x,C)},d),s&&s(C),C}function f(o,c){var l=c.expandedKeys,n=c.selectedKeys,s=c.loadedKeys,d=c.loadingKeys,E=c.checkedKeys,A=c.halfCheckedKeys,C=c.dragOverNodeKey,k=c.dropPosition,w=c.keyEntities,g=w[o],h={eventKey:o,expanded:l.indexOf(o)!==-1,selected:n.indexOf(o)!==-1,loaded:s.indexOf(o)!==-1,loading:d.indexOf(o)!==-1,checked:E.indexOf(o)!==-1,halfChecked:A.indexOf(o)!==-1,pos:String(g?g.pos:""),dragOver:C===o&&k===0,dragOverGapTop:C===o&&k===-1,dragOverGapBottom:C===o&&k===1};return h}function a(o){var c=o.data,l=o.expanded,n=o.selected,s=o.checked,d=o.loaded,E=o.loading,A=o.halfChecked,C=o.dragOver,k=o.dragOverGapTop,w=o.dragOverGapBottom,g=o.pos,h=o.active,p=Object(B.a)(Object(B.a)({},c),{},{expanded:l,selected:n,checked:s,loaded:d,loading:E,halfChecked:A,dragOver:C,dragOverGapTop:k,dragOverGapBottom:w,pos:g,active:h});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(S.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),p}},"8EBN":function(We,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 S=0;S<Y.modeInfo.length;S++){var R=Y.modeInfo[S];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 S=0;S<Y.modeInfo.length;S++){var R=Y.modeInfo[S];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 S=0;S<Y.modeInfo.length;S++){var R=Y.modeInfo[S];if(R.file&&R.file.test(F))return R}var P=F.lastIndexOf("."),y=P>-1&&F.substring(P+1,F.length);if(y)return Y.findModeByExtension(y)},Y.findModeByName=function(F){F=F.toLowerCase();for(var S=0;S<Y.modeInfo.length;S++){var R=Y.modeInfo[S];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(We,J,L){"use strict";L.d(J,"a",function(){return S}),L.d(J,"b",function(){return R}),L.d(J,"d",function(){return P}),L.d(J,"e",function(){return y}),L.d(J,"c",function(){return t});var Y=L("MI8n"),B=L("pmY6"),I=L("3/fG"),F=function(b,i,u,f){function a(o){return o instanceof u?o:new u(function(c){c(o)})}return new(u||(u=Promise))(function(o,c){function l(d){try{s(f.next(d))}catch(E){c(E)}}function n(d){try{s(f.throw(d))}catch(E){c(E)}}function s(d){d.done?o(d.value):a(d.value).then(l,n)}s((f=f.apply(b,i||[])).next())})};class S extends B.a{constructor(b,i="",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=i,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,i){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,i){return F(this,void 0,void 0,function*(){if(!b.enabled)return;this._onBeforeRun.fire({action:b});let u;try{yield this.runAction(b,i)}catch(f){u=f}this._onDidRun.fire({action:b,error:u})})}runAction(b,i){return F(this,void 0,void 0,function*(){yield b.run(i)})}}class P extends S{constructor(b){super(P.ID,b,b?"separator text":"separator");this.checked=!1,this.enabled=!1}}P.ID="vs.actions.separator";class y{constructor(b,i,u,f){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=b,this.label=i,this.class=f,this._actions=u}get actions(){return this._actions}dispose(){}run(){return F(this,void 0,void 0,function*(){})}}class t extends S{constructor(){super(t.ID,I.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8XDt":function(We,J,L){L("qH13");var Y=L("aX58"),B=Y.registerPainter,I=L("6fms");B("vml",I)},"8hTe":function(We,J,L){We.exports={button:"button___1wy9m"}},"942q":function(We,J,L){We.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(We,J,L){"use strict";var Y=L("DYRE"),B=L("zeV3"),I=L("+L6B"),F=L("2/Rp"),S=L("k1fw"),R=L("9og8"),P=L("tJVT"),y=L("WmNS"),t=L.n(y),b=L("q1tI"),i=L.n(b),u=L("vg9a"),f=L("DlQD"),a=L.n(f),o=L("rUJ1");function c(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),nn=qe[0];return nn.length>=Q.length?ue.slice(Q.length):ue}).join(`
|
|
`)}var l=[],n=["<ul>"],s=new a.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){l.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(l,0,0,n),n.push("</ul>"),n.join("")}var w={heading:function(W){var G=d.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=c(Q,G[3]||""),ee=G[2]?G[2].trim():G[2];if(["latex","katex","math"].indexOf(ee)>=0){var qe=p(),nn=ue;ue=qe,m[qe]={type:"block",expression:nn}}return{type:"code",raw:Q,lang:ee,text:ue}}}},g=/(?:\${2})([^\n`]+?)(?:\${2})/gi,h=0,p=function(){return"__special_katext_id_".concat(h++,"__")},m={};function _(){return m}function x(){h=0,m={}}function v(te){return te=te.replace(g,function(W,G){var Q=p();return m[Q]={type:"inline",expression:G},Q}),te}var j=s.listitem;s.listitem=function(te){return j(v(te))};var U=s.paragraph;s.paragraph=function(te){return U(v(te))};var T=s.tablecell;s.tablecell=function(te,W){return T(v(te),W)},s.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(o.escape)(te,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(G?te:Object(o.escape)(te,!0))+"</code></pre>"},s.heading=function(te,W,G){var Q=this.options.headerPrefix+G.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.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:s});var z=a.a,H=L("SJMd"),M=L("ulZh"),V=L.n(M),K=L("m3rI"),$=L("Oy/b"),Z=L("p5ED"),ve=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(Yn){try{On(Q.next(Yn))}catch(un){ee(un)}}function nn(Yn){try{On(Q.throw(Yn))}catch(un){ee(un)}}function On(Yn){var un;Yn.done?ue(Yn.value):(un=Yn.value,un instanceof G?un:new G(function(rr){rr(un)})).then(qe,nn)}On((Q=Q.apply(te,W||[])).next())})}function Pe(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:nn(0),throw:nn(1),return:nn(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function nn(On){return function(Yn){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(rr){un=[6,rr],Q=0}finally{G=ue=0}if(5&un[0])throw un[1];return{value:un[0]?un[1]:void 0,done:!0}}([On,Yn])}}}function ge(){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,nn=ee.length;qe<nn;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],nn=ee[1];W.setAttribute(qe,nn)}},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,nn){var On=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(On,[["id",W],["orient",G],["markerWidth",Q.toString()],["markerHeight",ue.toString()],["refX",ee.toString()],["refY",qe.toString()]]),On.appendChild(nn),On},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}(),Qe=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}(),St=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 nn=document.createElementNS("http://www.w3.org/2000/svg","svg");nn.setAttribute("xmlns","http://www.w3.org/2000/svg"),nn.setAttribute("width",G.width.baseVal.valueAsString),nn.setAttribute("height",G.height.baseVal.valueAsString),nn.setAttribute("viewBox","0 0 "+G.viewBox.baseVal.width.toString()+" "+G.viewBox.baseVal.height.toString()),nn.innerHTML=G.innerHTML,ue.naturalSize===!0?(nn.width.baseVal.value=W.naturalWidth,nn.height.baseVal.value=W.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(nn.width.baseVal.value=ue.width,nn.height.baseVal.value=ue.height),qe.width=nn.width.baseVal.value,qe.height=nn.height.baseVal.value;var On=nn.outerHTML,Yn=qe.getContext("2d");ue.markersOnly!==!0&&Yn.drawImage(W,0,0,qe.width,qe.height);var un=window.URL,rr=new Image(qe.width,qe.height);rr.setAttribute("crossOrigin","anonymous");var mn=new Blob([On],{type:"image/svg+xml"}),sn=un.createObjectURL(mn);rr.onload=function(){Yn.drawImage(rr,0,0),un.revokeObjectURL(sn);var _n=qe.toDataURL(ue.imageType,ue.imageQuality);ee(_n)},rr.src=sn})},te}(),Ee=function(){},De=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 Be("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Be("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},Be=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 Be("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 Be("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Be("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Be("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 Be("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var W=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Be("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 Be("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Be("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}(),ut=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 Be("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 Be("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var G=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Be("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Be("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Be("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 Be("toolbox-panel-row_colors",`
|
|
background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Be("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 Be("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Be("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 nn=document.createElement("div");nn.className=ue.toolboxButtonStyleClass.name+" "+((qe=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:ue.toolboxButtonStyleColorsClass.name),nn.innerHTML=ee.icon,nn.title=ee.title,nn.addEventListener("click",function(){ue.panelButtonClick(ee)}),ue.panelButtons.push(nn),ue.buttonRow.appendChild(nn)}),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 nn,On;ee.className=G.toolboxButtonStyleClass.name+" "+(qe===Q?""+((nn=G.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&nn!==void 0?nn:G.toolboxActiveButtonStyleColorsClass.name):""+((On=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&On!==void 0?On: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 nn=document.createElement("div");return nn.style.display="inline-block",nn.style.width=ee-2+"px",nn.style.height=ee-2+"px",nn.style.backgroundColor=G,nn.style.borderRadius=ee/2+"px",G==="transparent"&&(nn.style.fill=this.uiStyleSettings.toolboxAccentColor,nn.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(nn),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}(),Ke=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}(),ot=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}(),gt=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}(),Nt=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 Ke,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 ot;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,nn=this.height+this.CB_DISTANCE-G/2,On=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,On,ue),this.positionGrip(this.controlGrips.centerLeft.visual,Q,qe),this.positionGrip(this.controlGrips.centerRight.visual,On,qe),this.positionGrip(this.controlGrips.bottomLeft.visual,Q,nn),this.positionGrip(this.controlGrips.bottomCenter.visual,ee,nn),this.positionGrip(this.controlGrips.bottomRight.visual,On,nn),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:gt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:gt.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(gt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(gt.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),He=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}(Nt),jt=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 nn=document.createElement("div");nn.style.minHeight="20px",nn.style.flexGrow="2",nn.style.display="flex",nn.style.alignItems="center";var On=document.createElement("hr");On.style.minWidth="20px",On.style.border="0px",On.style.borderTop=ue+"px solid "+G.uiStyleSettings.toolboxColor,On.style.flexGrow="2",nn.appendChild(On),ee.appendChild(nn),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),$t=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 nn=`<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=nn,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),Ie=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 jt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new $t("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}(He),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},ct=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 ot;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 jt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new $t("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}(ct),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 nn=document.createElement("div");nn.style.whiteSpace="nowrap",nn.style.overflow="hidden",nn.style.textOverflow="ellipsis",nn.innerHTML="The quick brown fox jumps over the lazy dog",qe.appendChild(nn),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),ht=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}(Nt),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 jt("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],nn=Q[3],On=!1,Yn=0;Yn<this.canvasElement.height;Yn++)for(var un=0;un<this.canvasElement.width;un++)G.data[Yn*this.canvasElement.width*4+4*un+3]>0&&(On=!0,Yn<ee&&(ee=Yn),un<ue&&(ue=un),Yn>nn&&(nn=Yn),un>qe&&(qe=un));if(On){this.left=ue/this.pixelRatio,this.top=ee/this.pixelRatio,this.width=(qe-ue)/this.pixelRatio,this.height=(nn-ee)/this.pixelRatio;var rr=document.createElement("canvas");rr.width=qe-ue,rr.height=nn-ee,rr.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ee,qe-ue,nn-ee),0,0),this.drawingImgUrl=rr.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}(Nt),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(nn){var On="both";switch(nn){case 0:On="both";break;case 1:On="start";break;case 2:On="end";break;case 3:On="none"}var Yn=document.createElement("div");if(Yn.style.display="flex",Yn.style.flexGrow="2",Yn.style.alignItems="center",Yn.style.justifyContent="space-between",Yn.style.padding="5px",Yn.style.borderWidth="2px",Yn.style.borderStyle="solid",Yn.style.borderColor=On===ee.currentType?ee.uiStyleSettings.toolboxAccentColor:"transparent",Yn.addEventListener("click",function(){G.setCurrentType(On,Yn)}),Q.appendChild(Yn),On==="both"||On==="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",Yn.appendChild(un)}var rr=document.createElement("div");rr.style.display="flex",rr.style.alignItems="center",rr.style.minHeight="20px",rr.style.flexGrow="2";var mn=document.createElement("hr");if(mn.style.minWidth="20px",mn.style.border="0px",mn.style.borderTop="3px solid "+(ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxColor:"#eeeeee"),mn.style.flexGrow="2",rr.appendChild(mn),Yn.appendChild(rr),On==="both"||On==="end"){var sn=document.createElement("div");sn.style.display="flex",sn.style.alignItems="center",sn.style.minHeight="20px",sn.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>`,sn.style.marginRight="5px",Yn.appendChild(sn)}ee.typeBoxes.push(Yn)},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}(He),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 ot,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}(ht),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",ge(ue.defaultColorSet,["transparent"]),ue.defaultColor),ee.strokePanel.onColorChanged=ee.setStrokeColor,ee.fillPanel=new xe("Fill color",ge(ue.defaultColorSet,["transparent"]),ee.fillColor,_e),ee.fillPanel.onColorChanged=ee.setFillColor,ee.strokeWidthPanel=new jt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new $t("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}(Nt),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),on=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}(),vt=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 jt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ee.strokeWidthPanel.onWidthChanged=ee.setStrokeWidth,ee.strokeStylePanel=new $t("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}(ct),Kt=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}(Kt),Rt=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}(Kt),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 on,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 De(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[Ie,Ne,Oe,ht,Qt,ze,he,Se,xt,ae,Et,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ie,Ne,Oe,ht,ze,he,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ie,Ne,Oe,ht,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(),Qe.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 Kt(W))})},te.prototype.render=function(){return ye(this,void 0,void 0,function(){var W;return Pe(this,function(G){switch(G.label){case 0:return this.setCurrentMarker(),(W=new St).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 Kt(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 Kt(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 ht?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 ut(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 Rt(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 Rt(W,Q))})}}},te.prototype.clear=function(){var W=this,G=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(qe){var nn=new Rt(W,void 0,!0);qe(nn),nn.defaultPrevented&&(G=!0)}),!G)){this.setCurrentMarker();for(var Q=function(qe){var nn=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(On){return On(new Rt(W,nn))})},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 Kt(W))})}else this.undoRedoManager.replaceLastUndoStep(G),this.eventListeners.statechange.forEach(function(ee){return ee(new Kt(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 Kt(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 Kt(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 Pe(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 Kt(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 Rt(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 Rt(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 Rt(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 Rt(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 Rt(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){Qe.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 Kt(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 Kt(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 Ut(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 _t(te,W,G,Q){return new(G||(G=Promise))(function(ue,ee){function qe(Yn){try{On(Q.next(Yn))}catch(un){ee(un)}}function nn(Yn){try{On(Q.throw(Yn))}catch(un){ee(un)}}function On(Yn){var un;Yn.done?ue(Yn.value):(un=Yn.value,un instanceof G?un:new G(function(rr){rr(un)})).then(qe,nn)}On((Q=Q.apply(te,W||[])).next())})}function Gt(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:nn(0),throw:nn(1),return:nn(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function nn(On){return function(Yn){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(rr){un=[6,rr],Q=0}finally{G=ue=0}if(5&un[0])throw un[1];return{value:un[0]?un[1]:void 0,done:!0}}([On,Yn])}}}var en=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],nn=ee[1];W.setAttribute(qe,nn)}},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,nn){var On=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(On,[["id",W],["orient",G],["markerWidth",Q.toString()],["markerHeight",ue.toString()],["refX",ee.toString()],["refY",qe.toString()]]),On.appendChild(nn),On},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,nn,On){return"M"+W+","+G+"V"+(G+ue)+"H"+(W+Q)+"V"+G+"H"+ee+"V"+qe+"H"+(ee+nn)+"V"+(qe+On)+"H"+ee+"V"+G+"Z"},te}(),dt=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 Pt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Pt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Pt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new zt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new zt("_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}(),Pt=function(te,W){this.selector=te,this.style=W},zt=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}(),vn=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}(),nr=function(te){function W(){var G=te!==null&&te.apply(this,arguments)||this;return G.buttons=[],G}return Ut(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}(vn),Kn=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}(),bn=function(te){function W(){var G=te!==null&&te.apply(this,arguments)||this;return G.elements=[],G}return Ut(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}(vn),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 nn=Ge.createDefs();qe.appendChild(nn);var On=Ge.createElement("clipPath",[["id","text-bg-clip"]]);nn.appendChild(On);var Yn=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(Yn);var un=Ge.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);un.appendChild(Ge.createTSpan(W+":"+G)),qe.appendChild(un);var rr=un.getBBox();Ge.setAttributes(un,[["x",((24-rr.width)/2).toString()],["y",((24-rr.height)/2-rr.y).toString()]]);var mn=Ge.createPath(Ge.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(rr.width))/2,(24-Math.ceil(rr.height))/2,Math.ceil(rr.width),Math.ceil(rr.height)));return On.appendChild(mn),Ge.setAttributes(Yn,[["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}(),ar=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 Ut(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}(Kn),dr=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}(),Or=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 dr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new dr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new dr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new dr(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 nn=G.y+Q*(qe+1);Ge.setAttributes(ee,[["x1",""+G.x],["y1",""+nn],["x2",""+(G.x+G.width)],["y2",""+nn]])});var ue=G.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ee,qe){var nn=G.x+ue*(qe+1);Ge.setAttributes(ee,[["x1",""+nn],["y1",""+G.y],["x2",""+nn],["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 nn=Q/W,On=ue/G;return{x:(ee.x-qe)*nn+qe,y:(ee.y-qe)*On+qe,width:ee.width*nn,height:ee.height*On}},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="°",this.angleLabelElement.appendChild(qe),W.appendChild(this.angleLabelElement),document.body.removeChild(W),W},te}(),ia=function(){function te(){this.naturalSize=!1,this.imageType="image/png"}return te.prototype.rasterize=function(W,G,Q,ue,ee,qe,nn){var On=this;return new Promise(function(Yn){var un=document.createElement("canvas");un.width=W.width.baseVal.value-2*ue,un.height=W.height.baseVal.value-2*ue;var rr=1,mn=1;On.naturalSize===!0?(rr=G.naturalWidth/(W.width.baseVal.value-2*ue)/qe,mn=G.naturalHeight/(W.height.baseVal.value-2*ue)/nn,un.width=G.naturalWidth/qe,un.height=G.naturalHeight/nn):On.width!==void 0&&On.height!==void 0&&(rr=On.width/Q.width,mn=On.height/Q.height,un.width*=rr,un.height*=mn);var sn=un.getContext("2d");sn.translate(un.width/2,un.height/2),sn.rotate(ee*Math.PI/180),sn.scale(qe,nn),sn.translate(-un.width/2,-un.height/2),sn.drawImage(G,0,0,un.width,un.height);var _n=document.createElement("canvas");_n.width=Q.width*rr,_n.height=Q.height*mn,_n.getContext("2d").putImageData(sn.getImageData((Q.x-ue)*rr,(Q.y-ue)*mn,Q.width*rr,Q.height*mn),0,0),Yn(_n.toDataURL(On.imageType,On.imageQuality))})},te}(),hn=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 dt(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 Or(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},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 nr;G.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(G);var Q=[];this.aspectRatios.forEach(function(mn){var sn=new Kn(Er.getIcon(mn.horizontal,mn.vertical),mn.horizontal===0&&mn.vertical===0?"FREE":mn.horizontal+":"+mn.vertical);sn.onClick=function(){return W.ratioButtonClicked(mn)},Q.push(sn)}),this.aspectRatioButton=new ar(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 Kn('<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 Kn('<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),!en.isLicensed){var qe=new bn;this.topToolbar.addElementBlock(qe);var nn=document.createElement("div");nn.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var On=document.createElement("a");On.style.color="currentColor",On.href="https://markerjs.com/products/cropro",On.target="_blank",On.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>',nn.appendChild(On),qe.addElement(nn)}var Yn=new nr;Yn.minWidth=3*this.toolbarHeight+"px",Yn.contentAlign="end",this.topToolbar.addButtonBlock(Yn);var un=new Kn('<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,Yn.addButton(un),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(un.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var rr=new Kn('<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");rr.onClick=this.close,Yn.addButton(rr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(rr.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 nr;G.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(G);var Q=new Kn('<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 Kn('<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 bn;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(Yn){W.rotateBy(Yn),W.straightener.angle=W.rotationAngle},ee.addElement(this.straightener.getUI());var qe=new nr;qe.minWidth=2*this.toolbarHeight+"px",qe.contentAlign="end",this.bottomToolbar.addButtonBlock(qe);var nn=new Kn('<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");nn.onClick=this.flipHorizontallyButtonClicked,qe.addButton(nn);var On=new Kn('<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");On.onClick=this.flipVerticallyButtonClicked,qe.addButton(On)},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 _t(this,void 0,void 0,function(){var W,G;return Gt(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 _t(this,void 0,void 0,function(){var W;return Gt(this,function(G){switch(G.label){case 0:return(W=new ia).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 zt("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 zt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new zt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var W=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new zt("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 zt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new zt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Pt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new zt("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 zt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new zt("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 zt("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 zt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},te.instanceCounter=0,te}(),or=L("8hTe"),ua=L.n(or),ga=/<pre[^>]*>/g;function Zr(te){var W=document.createElement("div");return W.innerHTML=te,W.childNodes.length===0?"":W.childNodes[0].nodeValue}var ra=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,nn=te.showLines,On=te.replaces,Yn=te.zoomImg,un=te.hasMask,rr=te.style,mn=rr===void 0?{}:rr,sn=te.stylesPrev,_n=sn===void 0?{}:sn,Nn=String(G),sr=Object(b.useRef)(),Qn=Object(b.useRef)(),Zn=Object(b.useState)(""),kn=Object(P.a)(Zn,2),vr=kn[0],Hn=kn[1],ir=Object(b.useState)("office"),lr=Object(P.a)(ir,2),Ln=lr[0],Cr=lr[1],Lr=function(){var tt=new hn(Qn.current);tt.displayMode="popup",tt.addRenderEventListener(function(){var pt=Object(R.a)(t.a.mark(function mt(Dt){var it;return t.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return sr.current.style.display="none",Yt.next=3,Object(ve.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:it=Yt.sent,it!=null&&it.id&&On(Qn.current.getAttribute("src").replace(K.a.API_SERVER,""),"/api/attachments/".concat(it==null?void 0:it.id,"?type=").concat(it.content_type));case 5:case"end":return Yt.stop()}},mt)}));return function(mt){return pt.apply(this,arguments)}}()),tt.show()},Tr=function(){var tt=new be(Qn.current);tt.settings.displayMode="popup",tt.addEventListener("render",function(){var pt=Object(R.a)(t.a.mark(function mt(Dt){var it;return t.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(sr.current.style.display="none",!Qn.current){Yt.next=6;break}return Yt.next=4,Object(ve.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:it=Yt.sent,it!=null&&it.id&&On(Qn.current.getAttribute("src").replace(K.a.API_SERVER,""),"/api/attachments/".concat(it==null?void 0:it.id,"?type=").concat(it.content_type));case 6:case"end":return Yt.stop()}},mt)}));return function(mt){return pt.apply(this,arguments)}}()),tt.show(),window.markerArea=tt},fr=Object(b.useMemo)(function(){sr.current&&(sr.current.style.zIndex=-1);try{var lt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,tt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Nn=Nn.replace(lt,"("+K.a.API_SERVER+"/api/attachments/").replace(tt,'"'+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(Jt){}var mt=z(Nn),Dt=_();if(Nn.match(/\[TOC\]/)&&(mt=mt.replace("<p>[TOC]</p>",k()),E()),mt=mt.replace(/(__special_katext_id_\d+__)/g,function(Jt,Yt){var At=Dt[Yt],qt=At.type,Je=At.expression;return Object($.renderToString)(Zr(Je)||"",{displayMode:qt==="block",throwOnError:!1,output:"html"})}),mt=mt.replace(/▁/g,"\u2581\u2581\u2581"),x(),qe){var it=document.createElement("div");return it.innerHTML=mt,it.innerText}return setTimeout(function(){return Xe()},500),mt},[Nn]),ne=Object(b.useRef)();A.WebkitLineClamp=nn,nn&&(mn=Object(S.a)(Object(S.a)({},mn),A));function Re(lt){var tt=lt.target;if(tt.tagName.toUpperCase()==="IMG"){if(Yn){var pt=tt.getAttribute("src");Hn(pt),Cr("image")}}else if(tt.tagName.toUpperCase()==="A"){var mt=tt.getAttribute("href");if(mt.indexOf("office")>-1)lt.preventDefault(),Hn(mt),Cr("office");else if(mt.indexOf("application/pdf")>-1)lt.preventDefault(),Hn(mt),Cr("pdf");else if(mt.indexOf("text/html")>-1)lt.preventDefault(),Hn(mt),Cr("html");else if(mt.startsWith("#")){lt.preventDefault();var Dt=document.getElementById(mt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var Xe=function(){var tt,pt=(tt=ne.current)===null||tt===void 0?void 0:tt.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 Dt=new V.a;Dt.loadSource(mt.src),Dt.attachMedia(mt)}}})};Object(b.useEffect)(function(){if(ne.current&&fr&&(fr.match(ga)&&window.PR.prettyPrint()),ne.current)return ne.current.addEventListener("click",Re),function(){ne.current.removeEventListener("click",Re),x(),E()}},[fr,ne.current,Re]);var Me=function(tt){if(!ue)return;tt.target.nodeName==="IMG"?(sr.current.style.zIndex=1,sr.current.style.display="flex",sr.current.style.width=tt.target.clientWidth+"px",sr.current.style.height=tt.target.clientHeight+"px",sr.current.style.top=tt.target.offsetTop+"px",sr.current.style.left=tt.target.offsetLeft+"px",Qn.current.src=tt.target.getAttribute("src")):sr.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:ne,style:Object(S.a)({},mn),className:"".concat(ee||""," markdown-body ").concat(ua.a.mdBody),onMouseOver:Me,dangerouslySetInnerHTML:{__html:fr}}),i.a.createElement("div",{ref:sr,className:ua.a.button},i.a.createElement(B.a,null,i.a.createElement(F.a,{onClick:function(){return Lr()}},"\u88C1\u526A"),i.a.createElement(F.a,{onClick:function(){return Tr()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:Qn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(Z.a,{close:!0,data:vr,type:vr!=null&&vr.length?Ln:"",style:Object(S.a)({},_n),onClose:function(){return Hn("")}}))}},"9VGf":function(We,J,L){"use strict";L.d(J,"a",function(){return I});var Y=L("q1tI"),B=L.n(Y);function I(F,S){var R=Object(Y.useRef)();Object(Y.useEffect)(function(){R.current=F}),Object(Y.useEffect)(function(){function P(){R.current()}if(S!==null){var y=setInterval(P,S);return function(){return clearInterval(y)}}},[S])}},AHFd:function(We,J,L){"use strict";L.d(J,"a",function(){return y});var Y=L("giR+"),B=L("fyUT"),I=L("OaEy"),F=L("2fM7"),S=L("tJVT"),R=L("q1tI"),P=L.n(R),y;(function(b){b[b.Number=1]="Number",b[b.Percent=2]="Percent"})(y||(y={}));var t=function(i){var u=i.value,f=i.onChange,a=i.disabled,o=i.hidePercentOption,c=o===void 0?!1:o,l=Object(R.useMemo)(function(){return c?y.Number:y.Percent},[c]),n=Object(R.useState)(l),s=Object(S.a)(n,2),d=s[0],E=s[1],A=Object(R.useCallback)(function(k){return d===y.Number?"".concat(k,"\u5206"):"".concat(k,"%")},[d]),C=Object(R.useCallback)(function(k){if(d===y.Number){var w=k.replace("\u5206","");return isNaN(parseInt(w,10))?0:w}else{var g=k.replace("%","");return g}},[d]);return Object(R.useEffect)(function(){E(u.type)},[u]),P.a.createElement("div",{style:{display:"inline-block"}},P.a.createElement(F.a,{onChange:function(w){E(w),f({type:w,inputValue:w===y.Number?5:20})},value:d||l,style:{width:100},options:c?[{label:"\u5206\u503C",value:y.Number}]:[{label:"\u767E\u5206\u6BD4",value:y.Percent},{label:"\u5206\u503C",value:y.Number}],disabled:a}),P.a.createElement(B.a,{disabled:a,value:u.inputValue,formatter:A,parser:C,max:d===y.Percent?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:function(w){f({type:d,inputValue:w})}}))};J.b=t},Aocz:function(We,J,L){We.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(We,J){var L=32,Y=7,B=256;function I(i){for(var u=0;i>=L;)u|=i&1,i>>=1;return i+u}function F(i,u,f,a){var o=u+1;if(o===f)return 1;if(a(i[o++],i[u])<0){for(;o<f&&a(i[o],i[o-1])<0;)o++;S(i,u,o)}else for(;o<f&&a(i[o],i[o-1])>=0;)o++;return o-u}function S(i,u,f){for(f--;u<f;){var a=i[u];i[u++]=i[f],i[f--]=a}}function R(i,u,f,a,o){for(a===u&&a++;a<f;a++){for(var c=i[a],l=u,n=a,s;l<n;)s=l+n>>>1,o(c,i[s])<0?n=s:l=s+1;var d=a-l;switch(d){case 3:i[l+3]=i[l+2];case 2:i[l+2]=i[l+1];case 1:i[l+1]=i[l];break;default:for(;d>0;)i[l+d]=i[l+d-1],d--}i[l]=c}}function P(i,u,f,a,o,c){var l=0,n=0,s=1;if(c(i,u[f+o])>0){for(n=a-o;s<n&&c(i,u[f+o+s])>0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),l+=o,s+=o}else{for(n=o+1;s<n&&c(i,u[f+o-s])<=0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var d=l;l=o-s,s=o-d}for(l++;l<s;){var E=l+(s-l>>>1);c(i,u[f+E])>0?l=E+1:s=E}return s}function y(i,u,f,a,o,c){var l=0,n=0,s=1;if(c(i,u[f+o])<0){for(n=o+1;s<n&&c(i,u[f+o-s])<0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var d=l;l=o-s,s=o-d}else{for(n=a-o;s<n&&c(i,u[f+o+s])>=0;)l=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),l+=o,s+=o}for(l++;l<s;){var E=l+(s-l>>>1);c(i,u[f+E])<0?s=E:l=E+1}return s}function t(i,u){var f=Y,a=0,o=B,c=0,l,n,s=0;a=i.length,a<2*B&&(o=a>>>1);var d=[];c=a<120?5:a<1542?10:a<119151?19:40,l=[],n=[];function E(h,p){l[s]=h,n[s]=p,s+=1}function A(){for(;s>1;){var h=s-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(;s>1;){var h=s-2;h>0&&n[h-1]<n[h+1]&&h--,k(h)}}function k(h){var p=l[h],m=n[h],_=l[h+1],x=n[h+1];n[h]=m+x,h===s-3&&(l[h+1]=l[h+2],n[h+1]=n[h+2]),s--;var v=y(i[_],i,p,m,0,u);if(p+=v,m-=v,m===0)return;if(x=P(i[p+m-1],i,_,x,x-1,u),x===0)return;m<=x?w(p,m,_,x):g(p,m,_,x)}function w(h,p,m,_){var x=0;for(x=0;x<p;x++)d[x]=i[h+x];var v=0,j=m,U=h;if(i[U++]=i[j++],--_===0){for(x=0;x<p;x++)i[U+x]=d[v+x];return}if(p===1){for(x=0;x<_;x++)i[U+x]=i[j+x];i[U+_]=d[v];return}for(var T=f,z,H,M;;){z=0,H=0,M=!1;do if(u(i[j],d[v])<0){if(i[U++]=i[j++],H++,z=0,--_===0){M=!0;break}}else if(i[U++]=d[v++],z++,H=0,--p===1){M=!0;break}while((z|H)<T);if(M)break;do{if(z=y(i[j],d,v,p,0,u),z!==0){for(x=0;x<z;x++)i[U+x]=d[v+x];if(U+=z,v+=z,p-=z,p<=1){M=!0;break}}if(i[U++]=i[j++],--_===0){M=!0;break}if(H=P(d[v],i,j,_,0,u),H!==0){for(x=0;x<H;x++)i[U+x]=i[j+x];if(U+=H,j+=H,_-=H,_===0){M=!0;break}}if(i[U++]=d[v++],--p===1){M=!0;break}T--}while(z>=Y||H>=Y);if(M)break;T<0&&(T=0),T+=2}if(f=T,f<1&&(f=1),p===1){for(x=0;x<_;x++)i[U+x]=i[j+x];i[U+_]=d[v]}else{if(p===0)throw new Error;for(x=0;x<p;x++)i[U+x]=d[v+x]}}function g(h,p,m,_){var x=0;for(x=0;x<_;x++)d[x]=i[m+x];var v=h+p-1,j=_-1,U=m+_-1,T=0,z=0;if(i[U--]=i[v--],--p===0){for(T=U-(_-1),x=0;x<_;x++)i[T+x]=d[x];return}if(_===1){for(U-=p,v-=p,z=U+1,T=v+1,x=p-1;x>=0;x--)i[z+x]=i[T+x];i[U]=d[j];return}for(var H=f;;){var M=0,V=0,K=!1;do if(u(d[j],i[v])<0){if(i[U--]=i[v--],M++,V=0,--p===0){K=!0;break}}else if(i[U--]=d[j--],V++,M=0,--_===1){K=!0;break}while((M|V)<H);if(K)break;do{if(M=p-y(d[j],i,h,p,p-1,u),M!==0){for(U-=M,v-=M,p-=M,z=U+1,T=v+1,x=M-1;x>=0;x--)i[z+x]=i[T+x];if(p===0){K=!0;break}}if(i[U--]=d[j--],--_===1){K=!0;break}if(V=_-P(i[v],d,0,_,_-1,u),V!==0){for(U-=V,j-=V,_-=V,z=U+1,T=j+1,x=0;x<V;x++)i[z+x]=d[T+x];if(_<=1){K=!0;break}}if(i[U--]=i[v--],--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,v-=p,z=U+1,T=v+1,x=p-1;x>=0;x--)i[z+x]=i[T+x];i[U]=d[j]}else{if(_===0)throw new Error;for(T=U-(_-1),x=0;x<_;x++)i[T+x]=d[x]}}this.mergeRuns=A,this.forceMergeRuns=C,this.pushRun=E}function b(i,u,f,a){f||(f=0),a||(a=i.length);var o=a-f;if(o<2)return;var c=0;if(o<L){c=F(i,f,a,u),R(i,f,a,f+c,u);return}var l=new t(i,u),n=I(o);do{if(c=F(i,f,a,u),c<n){var s=o;s>n&&(s=n),R(i,f,f+s,f+c,u),c=s}l.pushRun(f,c),l.mergeRuns(),o-=c,f+=c}while(o!==0);l.forceMergeRuns()}We.exports=b},BU3w:function(We,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 y=document.querySelector("head");return y||document.body}function F(P){var y,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Y.a)())return null;var b=document.createElement("style");if((y=t.csp)===null||y===void 0?void 0:y.nonce){var i;b.nonce=(i=t.csp)===null||i===void 0?void 0:i.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 S=new Map;function R(P,y){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=I(t);if(!S.has(b)){var i=F("",t),u=i.parentNode;S.set(b,u),u.removeChild(i)}var f=Array.from(S.get(b).children).find(function(n){return n.tagName==="STYLE"&&n[B]===y});if(f){var a,o;if(((a=t.csp)===null||a===void 0?void 0:a.nonce)&&f.nonce!==((o=t.csp)===null||o===void 0?void 0:o.nonce)){var c;f.nonce=(c=t.csp)===null||c===void 0?void 0:c.nonce}return f.innerHTML!==P&&(f.innerHTML=P),f}var l=F(P,t);return l[B]=y,l}},Bd2K:function(We,J,L){(function(Y){Y(L("VrN/"),L("osHv"))})(function(Y){Y.defineOption("autoCloseTags",!1,function(t,b,i){if(i!=Y.Init&&i&&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(),i=[],u=t.getOption("autoCloseTags"),f=0;f<b.length;f++){if(!b[f].empty())return Y.Pass;var a=b[f].head,o=t.getTokenAt(a),c=Y.innerMode(t.getMode(),o.state),l=c.state,n=c.mode.xmlCurrentTag&&c.mode.xmlCurrentTag(l),s=n&&n.name;if(!s)return Y.Pass;var d=c.mode.configuration=="html",E=typeof u=="object"&&u.dontCloseTags||d&&B,A=typeof u=="object"&&u.indentTags||d&&I;o.end>a.ch&&(s=s.slice(0,s.length-o.end+a.ch));var C=s.toLowerCase();if(!s||o.type=="string"&&(o.end!=a.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&n.close||o.string.indexOf("/")==a.ch-o.start-1||E&&P(E,C)>-1||y(t,c.mode.xmlCurrentContext&&c.mode.xmlCurrentContext(l)||[],s,a,!0))return Y.Pass;var k=typeof u=="object"&&u.emptyTags;if(k&&P(k,s)>-1){i[f]={text:"/>",newPos:Y.Pos(a.line,a.ch+2)};continue}var w=A&&P(A,C)>-1;i[f]={indent:w,text:">"+(w?`
|
|
|
|
`:"")+"</"+s+">",newPos:w?Y.Pos(a.line+1,0):Y.Pos(a.line,a.ch+1)}}for(var g=typeof u=="object"&&u.dontIndentOnAutoClose,f=b.length-1;f>=0;f--){var h=i[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),!g&&h.indent&&(t.indentLine(h.newPos.line,null,!0),t.indentLine(h.newPos.line+1,null,!0))}}function S(t,b){for(var i=t.listSelections(),u=[],f=b?"/":"</",a=t.getOption("autoCloseTags"),o=typeof a=="object"&&a.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return Y.Pass;var l=i[c].head,n=t.getTokenAt(l),s=Y.innerMode(t.getMode(),n.state),d=s.state;if(b&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=l.ch-1))return Y.Pass;var E,A=s.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(A&&s.mode.name=="javascript")E=f+"script";else if(A&&s.mode.name=="css")E=f+"style";else{var C=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(d);if(!C||C.length&&y(t,C,C[C.length-1],l))return Y.Pass;E=f+C[C.length-1]}t.getLine(l.line).charAt(n.end)!=">"&&(E+=">"),u[c]=E}if(t.replaceSelections(u),i=t.listSelections(),!o)for(var c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function R(t){return t.getOption("disableInput")?Y.Pass:S(t,!0)}Y.commands.closeTag=function(t){return S(t)};function P(t,b){if(t.indexOf)return t.indexOf(b);for(var i=0,u=t.length;i<u;++i)if(t[i]==b)return i;return-1}function y(t,b,i,u,f){if(!Y.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,u.line+500),o=Y.scanForClosingTag(t,u,null,a);if(!o||o.tag!=i)return!1;for(var c=f?1:0,l=b.length-1;l>=0&&b[l]==i;l--)++c;u=o.to;for(var l=1;l<c;l++){var n=Y.scanForClosingTag(t,u,null,a);if(!n||n.tag!=i)return!1;u=n.to}return!0}})},BdwD:function(We,J,L){"use strict";var Y=L("+L6B"),B=L("2/Rp"),I=L("0Owb"),F=L("k1fw"),S=L("q1tI"),R=L.n(S),P=L("FOrL"),y=L.n(P),t=function(i){var u=i.buttonProps,f=u===void 0?{}:u,a=i.styles,o=a===void 0?{}:a,c=i.customText,l=i.ButtonText,n=i.ButtonClick,s=i.Buttonclass,d=i.ButtonTwo;return R.a.createElement("section",{className:"tc animated fadeIn",style:Object(F.a)(Object(F.a)({},{color:"#999",margin:"200px auto"}),o)},R.a.createElement("img",{src:y.a}),R.a.createElement("p",{className:"mt20 font14"},c||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),l&&R.a.createElement(B.a,Object(I.a)({className:s,onClick:n},f),l),d&&d)};J.a=t},BjJ7:function(We,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 S}),L.d(J,"a",function(){return P});var Y=L("m3rI");function B(y){var t=!0;if(y.length>0){for(var b=0;b<y.length;b++)if(y[b].compile_success==0||!y[b].compile_success){t=!1;break}}else t=!1;return t}function I(y){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",b=[],i=0;i<y.length;i++){var u=y[i],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(y,t,b){for(var i=0;i<y.length;i++){var u=y[i];if(u.key===t){u.children=b;break}u.children&&F(u.children,t,b)}return y}function S(y,t,b){var i;return function(){var u=this,f=arguments,a=function(){i=null,b||y.apply(u,f)},o=b&&!i;clearTimeout(i),i=setTimeout(a,t),o&&y.apply(u,f)}}var R=!0,P=Y.a.API_SERVER},BlVb:function(We,J,L){var Y=L("hyiK"),B=1e-8;function I(S,R){return Math.abs(S-R)<B}function F(S,R,P){var y=0,t=S[0];if(!t)return!1;for(var b=1;b<S.length;b++){var i=S[b];y+=Y(t[0],t[1],i[0],i[1],R,P),t=i}var u=S[0];return(!I(t[0],u[0])||!I(t[1],u[1]))&&(y+=Y(t[0],t[1],u[0],u[1],R,P)),y!==0}J.contain=F},BoW6:function(We,J,L){We.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(We,J,L){var Y=L("RDYZ"),B=L("Qe9p"),I=L("bYtY"),F=I.isArrayLike,S=Array.prototype.slice;function R(E,A){return E[A]}function P(E,A,C){E[A]=C}function y(E,A,C){return(A-E)*C+E}function t(E,A,C){return C>.5?A:E}function b(E,A,C,k,w){var g=E.length;if(w===1)for(var h=0;h<g;h++)k[h]=y(E[h],A[h],C);else for(var p=g&&E[0].length,h=0;h<g;h++)for(var m=0;m<p;m++)k[h][m]=y(E[h][m],A[h][m],C)}function i(E,A,C){var k=E.length,w=A.length;if(k!==w){var g=k>w;if(g)E.length=w;else for(var h=k;h<w;h++)E.push(C===1?A[h]:S.call(A[h]))}for(var p=E[0]&&E[0].length,h=0;h<E.length;h++)if(C===1)isNaN(E[h])&&(E[h]=A[h]);else for(var m=0;m<p;m++)isNaN(E[h][m])&&(E[h][m]=A[h][m])}function u(E,A,C){if(E===A)return!0;var k=E.length;if(k!==A.length)return!1;if(C===1){for(var w=0;w<k;w++)if(E[w]!==A[w])return!1}else for(var g=E[0].length,w=0;w<k;w++)for(var h=0;h<g;h++)if(E[w][h]!==A[w][h])return!1;return!0}function f(E,A,C,k,w,g,h,p,m){var _=E.length;if(m===1)for(var x=0;x<_;x++)p[x]=a(E[x],A[x],C[x],k[x],w,g,h);else for(var v=E[0].length,x=0;x<_;x++)for(var j=0;j<v;j++)p[x][j]=a(E[x][j],A[x][j],C[x][j],k[x][j],w,g,h)}function a(E,A,C,k,w,g,h){var p=(C-E)*.5,m=(k-A)*.5;return(2*(A-C)+p+m)*h+(-3*(A-C)-2*p-m)*g+p*w+A}function o(E){if(F(E)){var A=E.length;if(F(E[0])){for(var C=[],k=0;k<A;k++)C.push(S.call(E[k]));return C}return S.call(E)}return E}function c(E){return E[0]=Math.floor(E[0]),E[1]=Math.floor(E[1]),E[2]=Math.floor(E[2]),"rgba("+E.join(",")+")"}function l(E){var A=E[E.length-1].value;return F(A&&A[0])?2:1}function n(E,A,C,k,w,g){var h=E._getter,p=E._setter,m=A==="spline",_=k.length;if(!_)return;var x=k[0].value,v=F(x),j=!1,U=!1,T=v?l(k):0,z;k.sort(function(ke,ut){return ke.time-ut.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(v&&u(Z,V,T)||!v&&Z===V||(K=!1),V=Z,typeof Z=="string"){var ve=B.parse(Z);ve?(Z=ve,j=!0):U=!0}M.push(Z)}if(!g&&K)return;for(var oe=M[_-1],$=0;$<_-1;$++)v?i(M[$],oe,T):isNaN(M[$])&&!isNaN(oe)&&!U&&!j&&(M[$]=oe);v&&i(h(E._target,w),oe,T);var fe=0,ye=0,Pe,ge,de,Qe,St,Ee;if(j)var De=[0,0,0,0];var rt=function(ke,ut){var ie;if(ut<0)ie=0;else if(ut<ye){for(Pe=Math.min(fe+1,_-1),ie=Pe;ie>=0&&!(H[ie]<=ut);ie--);ie=Math.min(ie,_-2)}else{for(ie=fe;ie<_&&!(H[ie]>ut);ie++);ie=Math.min(ie-1,_-2)}fe=ie,ye=ut;var xe=H[ie+1]-H[ie];if(xe===0)return;if(ge=(ut-H[ie])/xe,m)if(Qe=M[ie],de=M[ie===0?ie:ie-1],St=M[ie>_-2?_-1:ie+1],Ee=M[ie>_-3?_-1:ie+2],v)f(de,Qe,St,Ee,ge,ge*ge,ge*ge*ge,h(ke,w),T);else{var we;if(j)we=f(de,Qe,St,Ee,ge,ge*ge,ge*ge*ge,De,1),we=c(De);else{if(U)return t(Qe,St,ge);we=a(de,Qe,St,Ee,ge,ge*ge,ge*ge*ge)}p(ke,w,we)}else if(v)b(M[ie],M[ie+1],ge,h(ke,w),T);else{var we;if(j)b(M[ie],M[ie+1],ge,De,1),we=c(De);else{if(U)return t(M[ie],M[ie+1],ge);we=y(M[ie],M[ie+1],ge)}p(ke,w,we)}},Be=new Y({target:E._target,life:z,loop:E._loop,delay:E._delay,onframe:rt,ondestroy:C});return A&&A!=="spline"&&(Be.easing=A),Be}var s=function(E,A,C,k){this._tracks={},this._target=E,this._loop=A||!1,this._getter=C||R,this._setter=k||P,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};s.prototype={when:function(E,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;E!==0&&C[k].push({time:0,value:o(w)})}C[k].push({time:E,value:A[k]})}return this},during:function(E){return this._onframeList.push(E),this},pause:function(){for(var E=0;E<this._clipList.length;E++)this._clipList[E].pause();this._paused=!0},resume:function(){for(var E=0;E<this._clipList.length;E++)this._clipList[E].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var E=this._doneList,A=E.length,C=0;C<A;C++)E[C].call(this)},start:function(E,A){var C=this,k=0,w=function(){k--,k||C._doneCallback()},g;for(var h in this._tracks){if(!this._tracks.hasOwnProperty(h))continue;var p=n(this,E,w,this._tracks[h],h,A);p&&(this._clipList.push(p),k++,this.animation&&this.animation.addClip(p),g=p)}if(g){var m=g.onframe;g.onframe=function(_,x){m(_,x);for(var v=0;v<C._onframeList.length;v++)C._onframeList[v](_,x)}}return k||this._doneCallback(),this},stop:function(E){for(var A=this._clipList,C=this.animation,k=0;k<A.length;k++){var w=A[k];E&&w.onframe(this._target,1),C&&C.removeClip(w)}A.length=0},delay:function(E){return this._delay=E,this},done:function(E){return E&&this._doneList.push(E),this},getClips:function(){return this._clipList}};var d=s;We.exports=d},"C+DQ":function(We,J,L){},"C/vA":function(We,J,L){"use strict";L.d(J,"a",function(){return Y});function Y(B){const I=this;let F=!1,S;return function(){return F||(F=!0,S=B.apply(I,arguments)),S}}},C0SR:function(We,J,L){var Y=L("YH21"),B=function(){this._track=[]};B.prototype={constructor:B,recognize:function(P,y,t){return this._doTrack(P,y,t),this._recognize(P)},clear:function(){return this._track.length=0,this},_doTrack:function(P,y,t){var b=P.touches;if(!b)return;for(var i={points:[],touches:[],target:y,event:P},u=0,f=b.length;u<f;u++){var a=b[u],o=Y.clientToLocal(t,a,{});i.points.push([o.zrX,o.zrY]),i.touches.push(a)}this._track.push(i)},_recognize:function(P){for(var y in S)if(S.hasOwnProperty(y)){var t=S[y](this._track,P);if(t)return t}}};function I(P){var y=P[1][0]-P[0][0],t=P[1][1]-P[0][1];return Math.sqrt(y*y+t*t)}function F(P){return[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2]}var S={pinch:function(P,y){var t=P.length;if(!t)return;var b=(P[t-1]||{}).points,i=(P[t-2]||{}).points||b;if(i&&i.length>1&&b&&b.length>1){var u=I(b)/I(i);!isFinite(u)&&(u=1),y.pinchScale=u;var f=F(b);return y.pinchX=f[0],y.pinchY=f[1],{type:"pinch",target:P[0].target,event:y}}}},R=B;We.exports=R},"Cg/j":function(We,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 S});var Y;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function P(y){return y[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=P})(Y||(Y={}));const B=F("instantiationService");function I(R,P,y,t){P[Y.DI_TARGET]===P?P[Y.DI_DEPENDENCIES].push({id:R,index:y,optional:t}):(P[Y.DI_DEPENDENCIES]=[{id:R,index:y,optional:t}],P[Y.DI_TARGET]=P)}function F(R){if(Y.serviceIds.has(R))return Y.serviceIds.get(R);const P=function(y,t,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(P,y,b,!1)};return P.toString=()=>R,Y.serviceIds.set(R,P),P}function S(R){return function(P,y,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(We,J){function L(){}L.prototype={diff:function(S,R,P){P||(P=function(s,d){return s===d}),this.equals=P;var y=this;S=S.slice(),R=R.slice();var t=R.length,b=S.length,i=1,u=t+b,f=[{newPos:-1,components:[]}],a=this.extractCommon(f[0],R,S,0);if(f[0].newPos+1>=t&&a+1>=b){for(var o=[],c=0;c<R.length;c++)o.push(c);return[{indices:o,count:R.length}]}function l(){for(var s=-1*i;s<=i;s+=2){var d,E=f[s-1],A=f[s+1],C=(A?A.newPos:0)-s;E&&(f[s-1]=void 0);var k=E&&E.newPos+1<t,w=A&&0<=C&&C<b;if(!k&&!w){f[s]=void 0;continue}if(!k||w&&E.newPos<A.newPos?(d=B(A),y.pushComponent(d.components,void 0,!0)):(d=E,d.newPos++,y.pushComponent(d.components,!0,void 0)),C=y.extractCommon(d,R,S,s),d.newPos+1>=t&&C+1>=b)return Y(y,d.components,R,S);f[s]=d}i++}for(;i<=u;){var n=l();if(n)return n}},pushComponent:function(S,R,P){var y=S[S.length-1];y&&y.added===R&&y.removed===P?S[S.length-1]={count:y.count+1,added:R,removed:P}:S.push({count:1,added:R,removed:P})},extractCommon:function(S,R,P,y){for(var t=R.length,b=P.length,i=S.newPos,u=i-y,f=0;i+1<t&&u+1<b&&this.equals(R[i+1],P[u+1]);)i++,u++,f++;return f&&S.components.push({count:f}),S.newPos=i,u},tokenize:function(S){return S.slice()},join:function(S){return S.slice()}};function Y(S,R,P,y){for(var t=0,b=R.length,i=0,u=0;t<b;t++){var f=R[t];if(f.removed){for(var a=[],o=u;o<u+f.count;o++)a.push(o);f.indices=a,u+=f.count}else{for(var a=[],o=i;o<i+f.count;o++)a.push(o);f.indices=a,i+=f.count,f.added||(u+=f.count)}}return R}function B(S){return{newPos:S.newPos,components:S.components.slice(0)}}var I=new L;function F(S,R,P){return I.diff(S,R,P)}We.exports=F},DN4a:function(We,J,L){var Y=L("Fofx"),B=L("QBsz"),I=Y.identity,F=5e-5;function S(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 S(this.rotation)||S(this.position[0])||S(this.position[1])||S(this.scale[0]-1)||S(this.scale[1]-1)};var y=[];P.updateTransform=function(){var u=this.parent,f=u&&u.transform,a=this.needLocalTransform(),o=this.transform;if(!(a||f)){o&&I(o);return}o=o||Y.create(),a?this.getLocalTransform(o):I(o),f&&(a?Y.mul(o,u.transform,o):Y.copy(o,u.transform)),this.transform=o;var c=this.globalScaleRatio;if(c!=null&&c!==1){this.getGlobalScale(y);var l=y[0]<0?-1:1,n=y[1]<0?-1:1,s=((y[0]-l)*c+l)/y[0]||0,d=((y[1]-n)*c+n)/y[1]||0;o[0]*=s,o[1]*=s,o[2]*=d,o[3]*=d}this.invTransform=this.invTransform||Y.create(),Y.invert(this.invTransform,o)},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],o=this.position,c=this.scale;S(f-1)&&(f=Math.sqrt(f)),S(a-1)&&(a=Math.sqrt(a)),u[0]<0&&(f=-f),u[3]<0&&(a=-a),o[0]=u[4],o[1]=u[5],c[0]=f,c[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],o=this.invTransform;return o&&B.applyTransform(a,a,o),a},P.transformCoordToGlobal=function(u,f){var a=[u,f],o=this.transform;return o&&B.applyTransform(a,a,o),a},R.getLocalTransform=function(u,f){f=f||[],I(f);var a=u.origin,o=u.scale||[1,1],c=u.rotation||0,l=u.position||[0,0];return a&&(f[4]-=a[0],f[5]-=a[1]),Y.scale(f,f,o),c&&Y.rotate(f,f,c),a&&(f[4]+=a[0],f[5]+=a[1]),f[4]+=l[0],f[5]+=l[1],f};var i=R;We.exports=i},Dagg:function(We,J,L){var Y=L("Gev7"),B=L("mFDi"),I=L("bYtY"),F=L("Xnb7");function S(P){Y.call(this,P)}S.prototype={constructor:S,type:"image",brush:function(P,y){var t=this.style,b=t.image;t.bind(P,this,y);var i=this._image=F.createOrUpdateImage(b,this._image,this,this.onload);if(!i||!F.isImageReady(i))return;var u=t.x||0,f=t.y||0,a=t.width,o=t.height,c=i.width/i.height;if(a==null&&o!=null?a=o*c:o==null&&a!=null?o=a/c:a==null&&o==null&&(a=i.width,o=i.height),this.setTransform(P),t.sWidth&&t.sHeight){var l=t.sx||0,n=t.sy||0;P.drawImage(i,l,n,t.sWidth,t.sHeight,u,f,a,o)}else if(t.sx&&t.sy){var l=t.sx,n=t.sy,s=a-l,d=o-n;P.drawImage(i,l,n,s,d,u,f,a,o)}else P.drawImage(i,u,f,a,o);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(S,Y);var R=S;We.exports=R},DlQD:function(We,J,L){(function(Y,B){We.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 S(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}}),y=P.defaults,t=P.getDefaults,b=P.changeDefaults,i=/[&<>"']/,u=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(Te){return o[Te]};function l(Ne,Te){if(Te){if(i.test(Ne))return Ne.replace(u,c)}else if(f.test(Ne))return Ne.replace(a,c);return Ne}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(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 d=/(^|[^\[])\^/g;function E(Ne,Te){Ne=Ne.source||Ne,Te=Te||"";var Oe={replace:function(le,he){return he=he.source||he,he=he.replace(d,"$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(s(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=m(Te,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(le){return null}return Oe}var w={},g=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(Ne,Te){w[" "+Ne]||(g.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 x(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 v(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 T(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:l,unescape:s,edit:E,cleanUrl:k,resolveUrl:m,noopTest:_,merge:x,splitCells:v,rtrim:j,findClosingBracket:U,checkSanitizeDeprecation:T},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 ve(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=ve(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),on=!1,vt,Kt,Ot,Rt,ft,be,Fe,Ut=Qt.length,_t=0;_t<Ut;_t++)vt=Qt[_t],he=vt,Kt=vt.length,vt=vt.replace(/^ *([*+-]|\d+[.)]) */,""),~vt.indexOf(`
|
|
`)&&(Kt-=vt.length,vt=this.options.pedantic?vt.replace(/^ {1,4}/gm,""):vt.replace(new RegExp("^ {1,"+Kt+"}","gm"),"")),_t!==Ut-1&&(Ot=this.rules.block.bullet.exec(Qt[_t+1])[0],(Se?Ot.length===1||!ze&&Ot[Ot.length-1]===")":Ot.length>1||this.options.smartLists&&Ot!==_e)&&(Rt=Qt.slice(_t+1).join(`
|
|
`),xt.raw=xt.raw.substring(0,xt.raw.length-Rt.length),_t=Ut-1)),ft=on||/\n\n(?!\s*$)/.test(vt),_t!==Ut-1&&(on=vt.charAt(vt.length-1)===`
|
|
`,ft||(ft=on)),ft&&(xt.loose=!0),be=/^\[[ xX]\] /.test(vt),Fe=void 0,be&&(Fe=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),xt.items.push({type:"list_item",raw:he,task:be,checked:Fe,loose:ft,text:vt});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 on=Z(le,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:xt&&xt.replace(this.rules.inline._escapes,"$1")},le[0]);return on}},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,Pe=z.merge,ge={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]+/};ge._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ge._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ge.def=ye(ge.def).replace("label",ge._label).replace("title",ge._title).getRegex(),ge.bullet=/(?:[*+-]|\d{1,9}[.)])/,ge.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ge.item=ye(ge.item,"gm").replace(/bull/g,ge.bullet).getRegex(),ge.list=ye(ge.list).replace(/bull/g,ge.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ge.def.source+")").getRegex(),ge._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",ge._comment=/<!--(?!-?>)[\s\S]*?-->/,ge.html=ye(ge.html,"i").replace("comment",ge._comment).replace("tag",ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ge.paragraph=ye(ge._paragraph).replace("hr",ge.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",ge._tag).getRegex(),ge.blockquote=ye(ge.blockquote).replace("paragraph",ge.paragraph).getRegex(),ge.normal=Pe({},ge),ge.gfm=Pe({},ge.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*|$)"}),ge.gfm.nptable=ye(ge.gfm.nptable).replace("hr",ge.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",ge._tag).getRegex(),ge.gfm.table=ye(ge.gfm.table).replace("hr",ge.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",ge._tag).getRegex(),ge.pedantic=Pe({},ge.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ge._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(ge.normal._paragraph).replace("hr",ge.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ge.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",ge._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=Pe({},de),de.pedantic=Pe({},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=Pe({},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=Pe({},de.gfm,{br:ye(de.br).replace("{2,}","*").getRegex(),text:ye(de.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Qe={block:ge,inline:de},St=P.defaults,Ee=Qe.block,De=Qe.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 Be(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||St,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:Ee.normal,inline:De.normal};this.options.pedantic?(ae.block=Ee.pedantic,ae.inline=De.pedantic):this.options.gfm&&(ae.block=Ee.gfm,this.options.breaks?ae.inline=De.breaks:ae.inline=De.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 on=Object.keys(this.tokens.links);if(on.length>0)for(;(Qt=this.tokenizer.rules.inline.reflinkSearch.exec(xt))!=null;)on.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,Be)){ae=ae.substring(ze.raw.length),le.push(ze);continue}if(!he&&(ze=this.tokenizer.url(ae,Be))){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 vt="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return le},B(Ne,null,[{key:"rules",get:function(){return{block:Ee,inline:De}}}]),Ne}(),ut=P.defaults,ie=z.cleanUrl,xe=z.escape,we=function(){function Ne(Oe){this.options=Oe||ut}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}(),Ke=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}(),ot=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}(),gt=P.defaults,Nt=z.unescape,He=function(){function Ne(Oe){this.options=Oe||gt,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ke,this.slugger=new ot}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,on,vt,Kt,Ot,Rt,ft,be,Fe,Ut,_t,Gt,en,Ge,dt=ae.length;for(_e=0;_e<dt;_e++){Rt=ae[_e];switch(Rt.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(Rt.tokens),Rt.depth,Nt(this.parseInline(Rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(Rt.text,Rt.lang,Rt.escaped);continue}case"table":{for(Kt="",vt="",xt=Rt.header.length,Se=0;Se<xt;Se++)vt+=this.renderer.tablecell(this.parseInline(Rt.tokens.header[Se]),{header:!0,align:Rt.align[Se]});for(Kt+=this.renderer.tablerow(vt),Ot="",xt=Rt.cells.length,Se=0;Se<xt;Se++){for(on=Rt.tokens.cells[Se],vt="",Qt=on.length,ze=0;ze<Qt;ze++)vt+=this.renderer.tablecell(this.parseInline(on[ze]),{header:!1,align:Rt.align[ze]});Ot+=this.renderer.tablerow(vt)}he+=this.renderer.table(Kt,Ot);continue}case"blockquote":{Ot=this.parse(Rt.tokens),he+=this.renderer.blockquote(Ot);continue}case"list":{for(ft=Rt.ordered,be=Rt.start,Fe=Rt.loose,xt=Rt.items.length,Ot="",Se=0;Se<xt;Se++)_t=Rt.items[Se],Gt=_t.checked,en=_t.task,Ut="",_t.task&&(Ge=this.renderer.checkbox(Gt),Fe?_t.tokens.length>0&&_t.tokens[0].type==="text"?(_t.tokens[0].text=Ge+" "+_t.tokens[0].text,_t.tokens[0].tokens&&_t.tokens[0].tokens.length>0&&_t.tokens[0].tokens[0].type==="text"&&(_t.tokens[0].tokens[0].text=Ge+" "+_t.tokens[0].tokens[0].text)):_t.tokens.unshift({type:"text",text:Ge}):Ut+=Ge),Ut+=this.parse(_t.tokens,Fe),Ot+=this.renderer.listitem(Ut,en,Gt);he+=this.renderer.list(Ot,ft,be);continue}case"html":{he+=this.renderer.html(Rt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(Rt.tokens));continue}case"text":{for(Ot=Rt.tokens?this.parseInline(Rt.tokens):Rt.text;_e+1<dt&&ae[_e+1].type==="text";)Rt=ae[++_e],Ot+=`
|
|
`+(Rt.tokens?this.parseInline(Rt.tokens):Rt.text);he+=le?this.renderer.paragraph(Ot):Ot;continue}default:{var Pt='Token with "'+Rt.type+'" type was not found.';if(this.options.silent){console.error(Pt);return}else throw new Error(Pt)}}}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}(),jt=z.merge,$t=z.checkSanitizeDeprecation,Ie=z.escape,Ae=P.getDefaults,ct=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=jt({},Ze.defaults,Te||{}),$t(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=He.parse(le,Te)}catch(on){xt=on}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),He.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>"+Ie(ze.message+"",!0)+"</pre>";throw ze}}Ze.options=Ze.setOptions=function(Ne){return jt(Ze.defaults,Ne),ct(Ze.defaults),Ze},Ze.getDefaults=Ae,Ze.defaults=Et,Ze.use=function(Ne){var Te=jt({},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),on=0;on<xt;on++)Qt[on]=arguments[on];var vt=Ne.renderer[Se].apply(ae,Qt);return vt===!1&&(vt=ze.apply(ae,Qt)),vt}};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),on=0;on<xt;on++)Qt[on]=arguments[on];var vt=Ne.tokenizer[Se].apply(ae,Qt);return vt===!1&&(vt=ze.apply(ae,Qt)),vt}};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=S(Ne),ae;!(ae=Oe()).done;){var le=ae.value;Te(le);switch(le.type){case"table":{for(var he=S(le.tokens.header),_e;!(_e=he()).done;){var Se=_e.value;Ze.walkTokens(Se,Te)}for(var ze=S(le.tokens.cells),xt;!(xt=ze()).done;)for(var Qt=xt.value,on=S(Qt),vt;!(vt=on()).done;){var Kt=vt.value;Ze.walkTokens(Kt,Te)}break}case"list":{Ze.walkTokens(le.items,Te);break}default:le.tokens&&Ze.walkTokens(le.tokens,Te)}}},Ze.Parser=He,Ze.parser=He.parse,Ze.Renderer=we,Ze.TextRenderer=Ke,Ze.Lexer=ke,Ze.lexer=ke.lex,Ze.Tokenizer=oe,Ze.Slugger=ot,Ze.parse=Ze;var ht=Ze;return ht})},ELLl:function(We,J,L){(function(Y){Y(L("VrN/"))})(function(Y){var B={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},I=Y.Pos;Y.defineOption("autoCloseBrackets",!1,function(o,c,l){l&&l!=Y.Init&&(o.removeKeyMap(S),o.state.closeBrackets=null),c&&(R(F(c,"pairs")),o.state.closeBrackets=c,o.addKeyMap(S))});function F(o,c){return c=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[c]!=null?o[c]:B[c]}var S={Backspace:t,Enter:b};function R(o){for(var c=0;c<o.length;c++){var l=o.charAt(c),n="'"+l+"'";S[n]||(S[n]=P(l))}}R(B.pairs+"`");function P(o){return function(c){return u(c,o)}}function y(o){var c=o.state.closeBrackets;if(!c||c.override)return c;var l=o.getModeAt(o.getCursor());return l.closeBrackets||c}function t(o){var c=y(o);if(!c||o.getOption("disableInput"))return Y.Pass;for(var l=F(c,"pairs"),n=o.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return Y.Pass;var d=f(o,n[s].head);if(!d||l.indexOf(d)%2!=0)return Y.Pass}for(var s=n.length-1;s>=0;s--){var E=n[s].head;o.replaceRange("",I(E.line,E.ch-1),I(E.line,E.ch+1),"+delete")}}function b(o){var c=y(o),l=c&&F(c,"explode");if(!l||o.getOption("disableInput"))return Y.Pass;for(var n=o.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return Y.Pass;var d=f(o,n[s].head);if(!d||l.indexOf(d)%2!=0)return Y.Pass}o.operation(function(){var E=o.lineSeparator()||`
|
|
`;o.replaceSelection(E+E,null),o.execCommand("goCharLeft"),n=o.listSelections();for(var A=0;A<n.length;A++){var C=n[A].head.line;o.indentLine(C,null,!0),o.indentLine(C+1,null,!0)}})}function i(o){var c=Y.cmpPos(o.anchor,o.head)>0;return{anchor:new I(o.anchor.line,o.anchor.ch+(c?-1:1)),head:new I(o.head.line,o.head.ch+(c?1:-1))}}function u(o,c){var l=y(o);if(!l||o.getOption("disableInput"))return Y.Pass;var n=F(l,"pairs"),s=n.indexOf(c);if(s==-1)return Y.Pass;for(var d=F(l,"closeBefore"),E=F(l,"triples"),A=n.charAt(s+1)==c,C=o.listSelections(),k=s%2==0,w,g=0;g<C.length;g++){var h=C[g],p=h.head,m,_=o.getRange(p,I(p.line,p.ch+1));if(k&&!h.empty())m="surround";else if((A||!k)&&_==c)A&&a(o,p)?m="both":E.indexOf(c)>=0&&o.getRange(p,I(p.line,p.ch+3))==c+c+c?m="skipThree":m="skip";else if(A&&p.ch>1&&E.indexOf(c)>=0&&o.getRange(I(p.line,p.ch-2),p)==c+c){if(p.ch>2&&/\bstring/.test(o.getTokenTypeAt(I(p.line,p.ch-2))))return Y.Pass;m="addFour"}else if(A){var x=p.ch==0?" ":o.getRange(I(p.line,p.ch-1),p);if(!Y.isWordChar(_)&&x!=c&&!Y.isWordChar(x))m="both";else return Y.Pass}else if(k&&(_.length===0||/\s/.test(_)||d.indexOf(_)>-1))m="both";else return Y.Pass;if(!w)w=m;else if(w!=m)return Y.Pass}var v=s%2?n.charAt(s-1):c,j=s%2?c:n.charAt(s+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var U=0;U<3;U++)o.execCommand("goCharRight");else if(w=="surround"){for(var T=o.getSelections(),U=0;U<T.length;U++)T[U]=v+T[U]+j;o.replaceSelections(T,"around"),T=o.listSelections().slice();for(var U=0;U<T.length;U++)T[U]=i(T[U]);o.setSelections(T)}else w=="both"?(o.replaceSelection(v+j,null),o.triggerElectric(v+j),o.execCommand("goCharLeft")):w=="addFour"&&(o.replaceSelection(v+v+v+v,"before"),o.execCommand("goCharRight"))})}function f(o,c){var l=o.getRange(I(c.line,c.ch-1),I(c.line,c.ch+1));return l.length==2?l:null}function a(o,c){var l=o.getTokenAt(I(c.line,c.ch+1));return/\bstring/.test(l.type)&&l.start==c.ch&&(c.ch==0||!/\bstring/.test(o.getTokenTypeAt(c)))}})},FOrL:function(We,J,L){We.exports=L.p+"static/nodata.a6b3f948.png"},FWmy:function(We,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(We,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,i){return b[0]=i[0],b[1]=i[1],b[2]=i[2],b[3]=i[3],b[4]=i[4],b[5]=i[5],b}function F(b,i,u){var f=i[0]*u[0]+i[2]*u[1],a=i[1]*u[0]+i[3]*u[1],o=i[0]*u[2]+i[2]*u[3],c=i[1]*u[2]+i[3]*u[3],l=i[0]*u[4]+i[2]*u[5]+i[4],n=i[1]*u[4]+i[3]*u[5]+i[5];return b[0]=f,b[1]=a,b[2]=o,b[3]=c,b[4]=l,b[5]=n,b}function S(b,i,u){return b[0]=i[0],b[1]=i[1],b[2]=i[2],b[3]=i[3],b[4]=i[4]+u[0],b[5]=i[5]+u[1],b}function R(b,i,u){var f=i[0],a=i[2],o=i[4],c=i[1],l=i[3],n=i[5],s=Math.sin(u),d=Math.cos(u);return b[0]=f*d+c*s,b[1]=-f*s+c*d,b[2]=a*d+l*s,b[3]=-a*s+d*l,b[4]=d*o+s*n,b[5]=d*n-s*o,b}function P(b,i,u){var f=u[0],a=u[1];return b[0]=i[0]*f,b[1]=i[1]*a,b[2]=i[2]*f,b[3]=i[3]*a,b[4]=i[4]*f,b[5]=i[5]*a,b}function y(b,i){var u=i[0],f=i[2],a=i[4],o=i[1],c=i[3],l=i[5],n=u*c-o*f;return n?(n=1/n,b[0]=c*n,b[1]=-o*n,b[2]=-f*n,b[3]=u*n,b[4]=(f*l-c*a)*n,b[5]=(o*a-u*l)*n,b):null}function t(b){var i=Y();return I(i,b),i}J.create=Y,J.identity=B,J.copy=I,J.mul=F,J.translate=S,J.rotate=R,J.scale=P,J.invert=y,J.clone=t},FxDU:function(We,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(We,J,L){var Y=L("bYtY"),B=L("K2GJ"),I=L("1bdT"),F=L("ni6a");function S(P){P=P||{},I.call(this,P);for(var y in P)P.hasOwnProperty(y)&&y!=="style"&&(this[y]=P[y]);this.style=new B(P.style,this),this._rect=null,this.__clipPaths=null}S.prototype={constructor:S,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,y){},getBoundingRect:function(){},contain:function(P,y){return this.rectContain(P,y)},traverse:function(P,y){P.call(y,this)},rectContain:function(P,y){var t=this.transformCoordToLocal(P,y),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,y){P!=="style"?I.prototype.attrKV.call(this,P,y):this.style.set(y)},setStyle:function(P,y){return this.style.set(P,y),this.dirty(!1),this},useStyle:function(P){return this.style=new B(P,this),this.dirty(!1),this},calculateTextPosition:null},Y.inherits(S,I),Y.mixin(S,F);var R=S;We.exports=R},Gytx:function(We,J){We.exports=function(Y,B,I,F){var S=I?I.call(F,Y,B):void 0;if(S!==void 0)return!!S;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 y=Object.prototype.hasOwnProperty.bind(B),t=0;t<R.length;t++){var b=R[t];if(!y(b))return!1;var i=Y[b],u=B[b];if(S=I?I.call(F,i,u,b):void 0,S===!1||S===void 0&&i!==u)return!1}return!0}},H6uX:function(We,J){var L=Array.prototype.slice,Y=function(S){this._$handlers={},this._$eventProcessor=S};Y.prototype={constructor:Y,one:function(S,R,P,y){return I(this,S,R,P,y,!0)},on:function(S,R,P,y){return I(this,S,R,P,y,!1)},isSilent:function(S){var R=this._$handlers;return!R[S]||!R[S].length},off:function(S,R){var P=this._$handlers;if(!S)return this._$handlers={},this;if(R){if(P[S]){for(var y=[],t=0,b=P[S].length;t<b;t++)P[S][t].h!==R&&y.push(P[S][t]);P[S]=y}P[S]&&P[S].length===0&&delete P[S]}else delete P[S];return this},trigger:function(S){var R=this._$handlers[S],P=this._$eventProcessor;if(R){var y=arguments,t=y.length;t>3&&(y=L.call(y,1));for(var b=R.length,i=0;i<b;){var u=R[i];if(P&&P.filter&&u.query!=null&&!P.filter(S,u.query)){i++;continue}switch(t){case 1:u.h.call(u.ctx);break;case 2:u.h.call(u.ctx,y[1]);break;case 3:u.h.call(u.ctx,y[1],y[2]);break;default:u.h.apply(u.ctx,y);break}u.one?(R.splice(i,1),b--):i++}}return P&&P.afterTrigger&&P.afterTrigger(S),this},triggerWithContext:function(S){var R=this._$handlers[S],P=this._$eventProcessor;if(R){var y=arguments,t=y.length;t>4&&(y=L.call(y,1,y.length-1));for(var b=y[y.length-1],i=R.length,u=0;u<i;){var f=R[u];if(P&&P.filter&&f.query!=null&&!P.filter(S,f.query)){u++;continue}switch(t){case 1:f.h.call(b);break;case 2:f.h.call(b,y[1]);break;case 3:f.h.call(b,y[1],y[2]);break;default:f.h.apply(b,y);break}f.one?(R.splice(u,1),i--):u++}}return P&&P.afterTrigger&&P.afterTrigger(S),this}};function B(S,R){var P=S._$eventProcessor;return R!=null&&P&&P.normalizeQuery&&(R=P.normalizeQuery(R)),R}function I(S,R,P,y,t,b){var i=S._$handlers;if(typeof P=="function"&&(t=y,y=P,P=null),!y||!R)return S;P=B(S,P),i[R]||(i[R]=[]);for(var u=0;u<i[R].length;u++)if(i[R][u].h===y)return S;var f={h:y,one:b,query:P,ctx:t||S,callAtLast:y.zrEventfulCallAtLast},a=i[R].length-1,o=i[R][a];return o&&o.callAtLast?i[R].splice(a,0,f):i[R].push(f),S}var F=Y;We.exports=F},HmJG:function(We,J,L){},I8Z2:function(We,J,L){"use strict";L.d(J,"a",function(){return F}),L.d(J,"b",function(){return f}),L.d(J,"c",function(){return o});var Y=L("q1tI"),B=function(){var c=function(l,n){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,d){s.__proto__=d}||function(s,d){for(var E in d)d.hasOwnProperty(E)&&(s[E]=d[E])},c(l,n)};return function(l,n){c(l,n);function s(){this.constructor=l}l.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),I=Y.createContext(null),F=function(c){B(l,c);function l(){return c!==null&&c.apply(this,arguments)||this}return l.prototype.render=function(){return Y.createElement(I.Provider,{value:this.props.store},this.props.children)},l}(Y.Component),S=L("Gytx"),R=L.n(S),P=L("2mql"),y=L.n(P),t=function(){var c=function(l,n){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,d){s.__proto__=d}||function(s,d){for(var E in d)d.hasOwnProperty(E)&&(s[E]=d[E])},c(l,n)};return function(l,n){c(l,n);function s(){this.constructor=l}l.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),b=function(){return b=Object.assign||function(c){for(var l,n=1,s=arguments.length;n<s;n++){l=arguments[n];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])}return c},b.apply(this,arguments)};function i(c){return c.displayName||c.name||"Component"}var u=function(){return{}};function f(c,l){l===void 0&&(l={});var n=!!c,s=c||u;return function(E){var A=function(k){t(w,k);function w(g,h){var p=k.call(this,g,h)||this;return p.unsubscribe=null,p.handleChange=function(){if(!p.unsubscribe)return;var m=s(p.store.getState(),p.props);p.setState({subscribed:m})},p.store=p.context,p.state={subscribed:s(p.store.getState(),g),store:p.store,props:g},p}return w.getDerivedStateFromProps=function(g,h){return c&&c.length===2&&g!==h.props?{subscribed:s(h.store.getState(),g),props:g}:{props:g}},w.prototype.componentDidMount=function(){this.trySubscribe()},w.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},w.prototype.shouldComponentUpdate=function(g,h){return!R()(this.props,g)||!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 g=b(b(b({},this.props),this.state.subscribed),{store:this.store});return Y.createElement(E,b({},g,{ref:this.props.miniStoreForwardedRef}))},w.displayName="Connect("+i(E)+")",w.contextType=I,w}(Y.Component);if(l.forwardRef){var C=Y.forwardRef(function(k,w){return Y.createElement(A,b({},k,{miniStoreForwardedRef:w}))});return y()(C,E)}return y()(A,E)}}var a=function(){return a=Object.assign||function(c){for(var l,n=1,s=arguments.length;n<s;n++){l=arguments[n];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])}return c},a.apply(this,arguments)};function o(c){var l=c,n=[];function s(A){l=a(a({},l),A);for(var C=0;C<n.length;C++)n[C]()}function d(){return l}function E(A){return n.push(A),function(){var k=n.indexOf(A);n.splice(k,1)}}return{setState:s,getState:d,subscribe:E}}},IBYe:function(We,J,L){"use strict";function Y(B){return null}J.a=Y},IMiH:function(We,J,L){var Y=L("Sj9i"),B=L("QBsz"),I=L("4mN7"),F=L("mFDi"),S=L("LPTA"),R=S.devicePixelRatio,P={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},y=[],t=[],b=[],i=[],u=Math.min,f=Math.max,a=Math.cos,o=Math.sin,c=Math.sqrt,l=Math.abs,n=typeof Float32Array!="undefined",s=function(E){this._saveData=!(E||!1),this._saveData&&(this.data=[]),this._ctx=null};s.prototype={constructor:s,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(E,A,C){C=C||0,this._ux=l(C/R/E)||0,this._uy=l(C/R/A)||0},getContext:function(){return this._ctx},beginPath:function(E){return this._ctx=E,E&&E.beginPath(),E&&(this.dpr=E.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(E,A){return this.addData(P.M,E,A),this._ctx&&this._ctx.moveTo(E,A),this._x0=E,this._y0=A,this._xi=E,this._yi=A,this},lineTo:function(E,A){var C=l(E-this._xi)>this._ux||l(A-this._yi)>this._uy||this._len<5;return this.addData(P.L,E,A),this._ctx&&C&&(this._needsDash()?this._dashedLineTo(E,A):this._ctx.lineTo(E,A)),C&&(this._xi=E,this._yi=A),this},bezierCurveTo:function(E,A,C,k,w,g){return this.addData(P.C,E,A,C,k,w,g),this._ctx&&(this._needsDash()?this._dashedBezierTo(E,A,C,k,w,g):this._ctx.bezierCurveTo(E,A,C,k,w,g)),this._xi=w,this._yi=g,this},quadraticCurveTo:function(E,A,C,k){return this.addData(P.Q,E,A,C,k),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(E,A,C,k):this._ctx.quadraticCurveTo(E,A,C,k)),this._xi=C,this._yi=k,this},arc:function(E,A,C,k,w,g){return this.addData(P.A,E,A,C,C,k,w-k,0,g?0:1),this._ctx&&this._ctx.arc(E,A,C,k,w,g),this._xi=a(w)*C+E,this._yi=o(w)*C+A,this},arcTo:function(E,A,C,k,w){return this._ctx&&this._ctx.arcTo(E,A,C,k,w),this},rect:function(E,A,C,k){return this._ctx&&this._ctx.rect(E,A,C,k),this.addData(P.R,E,A,C,k),this},closePath:function(){this.addData(P.Z);var E=this._ctx,A=this._x0,C=this._y0;return E&&(this._needsDash()&&this._dashedLineTo(A,C),E.closePath()),this._xi=A,this._yi=C,this},fill:function(E){E&&E.fill(),this.toStatic()},stroke:function(E){E&&E.stroke(),this.toStatic()},setLineDash:function(E){if(E instanceof Array){this._lineDash=E,this._dashIdx=0;for(var A=0,C=0;C<E.length;C++)A+=E[C];this._dashSum=A}return this},setLineDashOffset:function(E){return this._dashOffset=E,this},len:function(){return this._len},setData:function(E){var A=E.length;!(this.data&&this.data.length===A)&&n&&(this.data=new Float32Array(A));for(var C=0;C<A;C++)this.data[C]=E[C];this._len=A},appendPath:function(E){E instanceof Array||(E=[E]);for(var A=E.length,C=0,k=this._len,w=0;w<A;w++)C+=E[w].len();n&&this.data instanceof Float32Array&&(this.data=new Float32Array(k+C));for(var w=0;w<A;w++)for(var g=E[w].data,h=0;h<g.length;h++)this.data[k++]=g[h];this._len=k},addData:function(E){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=E},_expandData:function(){if(!(this.data instanceof Array)){for(var E=[],A=0;A<this._len;A++)E[A]=this.data[A];this.data=E}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(E,A){var C=this._dashSum,k=this._dashOffset,w=this._lineDash,g=this._ctx,h=this._xi,p=this._yi,m=E-h,_=A-p,x=c(m*m+_*_),v=h,j=p,U,T=w.length,z;for(m/=x,_/=x,k<0&&(k=C+k),k%=C,v-=k*m,j-=k*_;m>0&&v<=E||m<0&&v>=E||m===0&&(_>0&&j<=A||_<0&&j>=A);){if(z=this._dashIdx,U=w[z],v+=m*U,j+=_*U,this._dashIdx=(z+1)%T,m>0&&v<h||m<0&&v>h||_>0&&j<p||_<0&&j>p)continue;g[z%2?"moveTo":"lineTo"](m>=0?u(v,E):f(v,E),_>=0?u(j,A):f(j,A))}m=v-E,_=j-A,this._dashOffset=-c(m*m+_*_)},_dashedBezierTo:function(E,A,C,k,w,g){var h=this._dashSum,p=this._dashOffset,m=this._lineDash,_=this._ctx,x=this._xi,v=this._yi,j,U,T,z=Y.cubicAt,H=0,M=this._dashIdx,V=m.length,K,$,Z=0;for(p<0&&(p=h+p),p%=h,j=0;j<1;j+=.1)U=z(x,E,C,w,j+.1)-z(x,E,C,w,j),T=z(v,A,k,g,j+.1)-z(v,A,k,g,j),H+=c(U*U+T*T);for(;M<V&&!(Z+=m[M],Z>p);M++);for(j=(Z-p)/H;j<=1;)K=z(x,E,C,w,j),$=z(v,A,k,g,j),M%2?_.moveTo(K,$):_.lineTo(K,$),j+=m[M]/H,M=(M+1)%V;M%2!==0&&_.lineTo(w,g),U=w-K,T=g-$,this._dashOffset=-c(U*U+T*T)},_dashedQuadraticTo:function(E,A,C,k){var w=C,g=k;C=(C+2*E)/3,k=(k+2*A)/3,E=(this._xi+2*E)/3,A=(this._yi+2*A)/3,this._dashedBezierTo(E,A,C,k,w,g)},toStatic:function(){var E=this.data;E instanceof Array&&(E.length=this._len,n&&(this.data=new Float32Array(E)))},getBoundingRect:function(){y[0]=y[1]=b[0]=b[1]=Number.MAX_VALUE,t[0]=t[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var E=this.data,A=0,C=0,k=0,w=0,g=0;g<E.length;){var h=E[g++];g===1&&(A=E[g],C=E[g+1],k=A,w=C);switch(h){case P.M:k=E[g++],w=E[g++],A=k,C=w,b[0]=k,b[1]=w,i[0]=k,i[1]=w;break;case P.L:I.fromLine(A,C,E[g],E[g+1],b,i),A=E[g++],C=E[g++];break;case P.C:I.fromCubic(A,C,E[g++],E[g++],E[g++],E[g++],E[g],E[g+1],b,i),A=E[g++],C=E[g++];break;case P.Q:I.fromQuadratic(A,C,E[g++],E[g++],E[g],E[g+1],b,i),A=E[g++],C=E[g++];break;case P.A:var p=E[g++],m=E[g++],_=E[g++],x=E[g++],v=E[g++],j=E[g++]+v;g+=1;var U=1-E[g++];g===1&&(k=a(v)*_+p,w=o(v)*x+m),I.fromArc(p,m,_,x,v,j,U,b,i),A=a(j)*_+p,C=o(j)*x+m;break;case P.R:k=A=E[g++],w=C=E[g++];var T=E[g++],z=E[g++];I.fromLine(k,w,k+T,w+z,b,i);break;case P.Z:A=k,C=w;break}B.min(y,y,b),B.max(t,t,i)}return g===0&&(y[0]=y[1]=t[0]=t[1]=0),new F(y[0],y[1],t[0]-y[0],t[1]-y[1])},rebuildPath:function(E){for(var A=this.data,C,k,w,g,h,p,m=this._ux,_=this._uy,x=this._len,v=0;v<x;){var j=A[v++];v===1&&(w=A[v],g=A[v+1],C=w,k=g);switch(j){case P.M:C=w=A[v++],k=g=A[v++],E.moveTo(w,g);break;case P.L:h=A[v++],p=A[v++],(l(h-w)>m||l(p-g)>_||v===x-1)&&(E.lineTo(h,p),w=h,g=p);break;case P.C:E.bezierCurveTo(A[v++],A[v++],A[v++],A[v++],A[v++],A[v++]),w=A[v-2],g=A[v-1];break;case P.Q:E.quadraticCurveTo(A[v++],A[v++],A[v++],A[v++]),w=A[v-2],g=A[v-1];break;case P.A:var U=A[v++],T=A[v++],z=A[v++],H=A[v++],M=A[v++],V=A[v++],K=A[v++],$=A[v++],Z=z>H?z:H,ve=z>H?1:z/H,oe=z>H?H/z:1,fe=Math.abs(z-H)>.001,ye=M+V;fe?(E.translate(U,T),E.rotate(K),E.scale(ve,oe),E.arc(0,0,Z,M,ye,1-$),E.scale(1/ve,1/oe),E.rotate(-K),E.translate(-U,-T)):E.arc(U,T,Z,M,ye,1-$),v===1&&(C=a(M)*z+U,k=o(M)*H+T),w=a(ye)*z+U,g=o(ye)*H+T;break;case P.R:C=w=A[v],k=g=A[v+1],E.rect(A[v++],A[v++],A[v++],A[v++]);break;case P.Z:E.closePath(),w=C,g=k}}}},s.CMD=P;var d=s;We.exports=d},ItGF:function(We,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={},S={},R=I.match(/Firefox\/([\d.]+)/),P=I.match(/MSIE\s([\d.]+)/)||I.match(/Trident\/.+?rv:(([\d.]+))/),y=I.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(I);return R&&(S.firefox=!0,S.version=R[1]),P&&(S.ie=!0,S.version=P[1]),y&&(S.edge=!0,S.version=y[1]),t&&(S.weChat=!0),{browser:S,os:F,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!S.ie&&!S.edge,pointerEventsSupported:"onpointerdown"in window&&(S.edge||S.ie&&S.version>=11),domSupported:typeof document!="undefined"}}We.exports=Y},JYp7:function(We,J,L){"use strict";L.d(J,"a",function(){return Y});var Y;(function(B){function I(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}B.is=I;const F=Object.freeze([]);function S(){return F}B.empty=S;function*R(d){yield d}B.single=R;function P(d){return d||F}B.from=P;function y(d){return!d||d[Symbol.iterator]().next().done===!0}B.isEmpty=y;function t(d){return d[Symbol.iterator]().next().value}B.first=t;function b(d,E){for(const A of d)if(E(A))return!0;return!1}B.some=b;function i(d,E){for(const A of d)if(E(A))return A;return}B.find=i;function*u(d,E){for(const A of d)E(A)&&(yield A)}B.filter=u;function*f(d,E){let A=0;for(const C of d)yield E(C,A++)}B.map=f;function*a(...d){for(const E of d)for(const A of E)yield A}B.concat=a;function*o(d){for(const E of d)for(const A of E)yield A}B.concatNested=o;function c(d,E,A){let C=A;for(const k of d)C=E(C,k);return C}B.reduce=c;function*l(d,E,A=d.length){for(E<0&&(E+=d.length),A<0?A+=d.length:A>d.length&&(A=d.length);E<A;E++)yield d[E]}B.slice=l;function n(d,E=Number.POSITIVE_INFINITY){const A=[];if(E===0)return[A,d];const C=d[Symbol.iterator]();for(let k=0;k<E;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 s(d,E,A=(C,k)=>C===k){const C=d[Symbol.iterator](),k=E[Symbol.iterator]();for(;;){const w=C.next(),g=k.next();if(w.done!==g.done)return!1;if(w.done)return!0;if(!A(w.value,g.value))return!1}}B.equals=s})(Y||(Y={}))},K2GJ:function(We,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]],S=function(u){this.extendFrom(u,!1)};function R(u,f,a){var o=f.x==null?0:f.x,c=f.x2==null?1:f.x2,l=f.y==null?0:f.y,n=f.y2==null?0:f.y2;f.global||(o=o*a.width+a.x,c=c*a.width+a.x,l=l*a.height+a.y,n=n*a.height+a.y),o=isNaN(o)?0:o,c=isNaN(c)?1:c,l=isNaN(l)?0:l,n=isNaN(n)?0:n;var s=u.createLinearGradient(o,l,c,n);return s}function P(u,f,a){var o=a.width,c=a.height,l=Math.min(o,c),n=f.x==null?.5:f.x,s=f.y==null?.5:f.y,d=f.r==null?.5:f.r;f.global||(n=n*o+a.x,s=s*c+a.y,d=d*l);var E=u.createRadialGradient(n,s,0,n,s,d);return E}S.prototype={constructor:S,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 o=this,c=a&&a.style,l=!c||u.__attrCachedBy!==I.STYLE_BIND;u.__attrCachedBy=I.STYLE_BIND;for(var n=0;n<F.length;n++){var s=F[n],d=s[0];(l||o[d]!==c[d])&&(u[d]=Y(u,d,o[d]||s[1]))}if((l||o.fill!==c.fill)&&(u.fillStyle=o.fill),(l||o.stroke!==c.stroke)&&(u.strokeStyle=o.stroke),(l||o.opacity!==c.opacity)&&(u.globalAlpha=o.opacity==null?1:o.opacity),(l||o.blend!==c.blend)&&(u.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()){var E=o.lineWidth;u.lineWidth=E/(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 o=f.type==="radial"?P:R,c=o(u,f,a),l=f.colorStops,n=0;n<l.length;n++)c.addColorStop(l[n].offset,l[n].color);return c}};for(var y=S.prototype,t=0;t<F.length;t++){var b=F[t];b[0]in y||(y[b[0]]=b[1])}S.getGradient=y.getGradient;var i=S;We.exports=i},LPTA:function(We,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(We,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var Y=function(){function u(f,a){for(var o=0;o<a.length;o++){var c=a[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,a,o){return a&&u(f.prototype,a),o&&u(f,o),f}}(),B=L("q1tI"),I=R(B),F=L("17x9"),S=R(F);function R(u){return u&&u.__esModule?u:{default:u}}function P(u,f){var a={};for(var o in u){if(f.indexOf(o)>=0)continue;if(!Object.prototype.hasOwnProperty.call(u,o))continue;a[o]=u[o]}return a}function y(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 i=function(u){b(f,u);function f(a){y(this,f);var o=t(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,a));return o.scrollListener=o.scrollListener.bind(o),o.eventListenerOptions=o.eventListenerOptions.bind(o),o.mousewheelListener=o.mousewheelListener.bind(o),o}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 o=this.getParentElement(this.scrollComponent);o.scrollTop=o.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var o=!1,c={get passive(){o=!0}};try{document.addEventListener("test",null,c),document.removeEventListener("test",null,c)}catch(l){}return o}},{key:"eventListenerOptions",value:function(){var o=this.props.useCapture;return this.isPassiveSupported()&&(o={useCapture:this.props.useCapture,passive:!0}),o}},{key:"setDefaultLoader",value:function(o){this.defaultLoader=o}},{key:"detachMousewheelListener",value:function(){var o=window;this.props.useWindow===!1&&(o=this.scrollComponent.parentNode),o.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var o=window;this.props.useWindow===!1&&(o=this.getParentElement(this.scrollComponent)),o.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),o.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(o){var c=this.props.getScrollParent&&this.props.getScrollParent();return c!=null?c:o&&o.parentNode}},{key:"filterProps",value:function(o){return o}},{key:"attachScrollListener",value:function(){var o=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!o)return;var c=window;this.props.useWindow===!1&&(c=o),c.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),c.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),c.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}},{key:"mousewheelListener",value:function(o){o.deltaY===1&&!this.isPassiveSupported()&&o.preventDefault()}},{key:"scrollListener",value:function(){var o=this.scrollComponent,c=window,l=this.getParentElement(o),n=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,d=c.pageYOffset!==void 0?c.pageYOffset:s.scrollTop;this.props.isReverse?n=d:n=this.calculateOffset(o,d)}else this.props.isReverse?n=l.scrollTop:n=o.scrollHeight-l.scrollTop-l.clientHeight;n<Number(this.props.threshold)&&o&&o.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=l.scrollHeight,this.beforeScrollTop=l.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(o,c){return o?this.calculateTopPosition(o)+(o.offsetHeight-c-window.innerHeight):0}},{key:"calculateTopPosition",value:function(o){return o?o.offsetTop+this.calculateTopPosition(o.offsetParent):0}},{key:"render",value:function(){var o=this,c=this.filterProps(this.props),l=c.children,n=c.element,s=c.hasMore,d=c.initialLoad,E=c.isReverse,A=c.loader,C=c.loadMore,k=c.pageStart,w=c.ref,g=c.threshold,h=c.useCapture,p=c.useWindow,m=c.getScrollParent,_=P(c,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);_.ref=function(v){o.scrollComponent=v,w&&w(v)};var x=[l];return s&&(A?E?x.unshift(A):x.push(A):this.defaultLoader&&(E?x.unshift(this.defaultLoader):x.push(this.defaultLoader))),I.default.createElement(n,_,x)}}]),f}(B.Component);i.propTypes={children:S.default.node.isRequired,element:S.default.node,hasMore:S.default.bool,initialLoad:S.default.bool,isReverse:S.default.bool,loader:S.default.node,loadMore:S.default.func.isRequired,pageStart:S.default.number,ref:S.default.func,getScrollParent:S.default.func,threshold:S.default.number,useCapture:S.default.bool,useWindow:S.default.bool},i.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=i,We.exports=J.default},LdHM:function(We,J,L){"use strict";L.d(J,"b",function(){return d}),L.d(J,"a",function(){return A});var Y=L("1OyB"),B=L("vuIU"),I=L("Ji7U"),F=L("LK+K"),S=L("q1tI"),R=L("rePB"),P=L("Ff2n"),y=L("ODXe"),t=L("4IlW"),b=L("bX4T"),i=L("YrtM"),u=L("TSYQ"),f=L.n(u),a=L("+nKL"),o=L("8OUc"),c=function(V,K){var $=V.prefixCls,Z=V.id,ve=V.flattenOptions,oe=V.childrenAsData,fe=V.values,ye=V.searchValue,Pe=V.multiple,ge=V.defaultActiveFirstOption,de=V.height,Qe=V.itemHeight,St=V.notFoundContent,Ee=V.open,De=V.menuItemSelectedIcon,rt=V.virtual,Be=V.onSelect,ke=V.onToggleOpen,ut=V.onActiveValue,ie=V.onScroll,xe=V.onMouseEnter,we="".concat($,"-item"),Ke=Object(i.a)(function(){return ve},[Ee,ve],function(ht,Ne){return Ne[0]&&ht[1]!==Ne[1]}),ot=S.useRef(null),gt=function(Ne){Ne.preventDefault()},Nt=function(Ne){ot.current&&ot.current.scrollTo({index:Ne})},He=function(Ne){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=Ke.length,ae=0;ae<Oe;ae+=1){var le=(Ne+ae*Te+Oe)%Oe,he=Ke[le],_e=he.group,Se=he.data;if(!_e&&!Se.disabled)return le}return-1},jt=S.useState(function(){return He(0)}),$t=Object(y.a)(jt,2),Ie=$t[0],Ae=$t[1],ct=function(Ne){Ae(Ne);var Te=Ke[Ne];if(!Te){ut(null,-1);return}ut(Te.data.value,Ne)};S.useEffect(function(){ct(ge!==!1?He(0):-1)},[Ke.length,ye]),S.useEffect(function(){var ht=setTimeout(function(){if(!Pe&&Ee&&fe.size===1){var Ne=Array.from(fe)[0],Te=Ke.findIndex(function(Oe){var ae=Oe.data;return ae.value===Ne});ct(Te),Nt(Te)}});return function(){return clearTimeout(ht)}},[Ee]);var Et=function(Ne){Ne!==void 0&&Be(Ne,{selected:!fe.has(Ne)}),Pe||ke(!1)};if(S.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=He(Ie+Oe,Oe);Nt(ae),ct(ae)}break}case t.a.ENTER:{var le=Ke[Ie];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){Nt(Ne)}}}),Ke.length===0)return S.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),className:"".concat(we,"-empty"),onMouseDown:gt},St);function Ze(ht){var Ne=Ke[ht];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?S.createElement("div",Object.assign({"aria-label":typeof _e=="string"?_e:null},he,{key:ht,role:"option",id:"".concat(Z,"_list_").concat(ht),"aria-selected":fe.has(Oe)}),Oe):null}return S.createElement(S.Fragment,null,S.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(Ie-1),Ze(Ie),Ze(Ie+1)),S.createElement(a.a,{itemKey:"key",ref:ot,data:Ke,height:de,itemHeight:Qe,fullHeight:!1,onMouseDown:gt,onScroll:ie,virtual:rt,onMouseEnter:xe},function(ht,Ne){var Te,Oe=ht.group,ae=ht.groupOption,le=ht.data,he=le.label,_e=le.key;if(Oe)return S.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,on=le.style,vt=le.className,Kt=Object(P.a)(le,["disabled","value","title","children","style","className"]),Ot=fe.has(ze),Rt="".concat(we,"-option"),ft=f()(we,Rt,vt,(Te={},Object(R.a)(Te,"".concat(Rt,"-grouped"),ae),Object(R.a)(Te,"".concat(Rt,"-active"),Ie===Ne&&!Se),Object(R.a)(Te,"".concat(Rt,"-disabled"),Se),Object(R.a)(Te,"".concat(Rt,"-selected"),Ot),Te)),be=oe?Qt:he,Fe=!De||typeof De=="function"||Ot;return S.createElement("div",Object.assign({},Kt,{"aria-selected":Ot,className:ft,title:xt,onMouseMove:function(){if(Ie===Ne||Se)return;ct(Ne)},onClick:function(){Se||Et(ze)},style:on}),S.createElement("div",{className:"".concat(Rt,"-content")},be||ze),S.isValidElement(De)||Ot,Fe&&S.createElement(o.a,{className:"".concat(we,"-option-state"),customizeIcon:De,customizeIconProps:{isSelected:Ot}},Ot?"\u2713":null))}))},l=S.forwardRef(c);l.displayName="OptionList";var n=l,s=function(){return null};s.isSelectOption=!0;var d=s,E=function(){return null};E.isSelectOptGroup=!0;var A=E,C=L("VTBJ"),k=L("Zm9Q");function w(M){var V=M.key,K=M.props,$=K.children,Z=K.value,ve=Object(P.a)(K,["children","value"]);return Object(C.a)({key:V,value:Z!==void 0?Z:V,children:$},ve)}function g(M){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(M).map(function(K,$){if(!S.isValidElement(K)||!K.type)return null;var Z=K.type.isSelectOptGroup,ve=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(ve===null?$:ve,"__"),label:ve},ye),{},{options:g(fe)})}).filter(function(K){return K})}var h=L("2Qr1"),p=L("qNPg"),m=L("U8pU"),_=L("Kwbf"),x=L("WKfj");function v(M){var V=M.mode,K=M.options,$=M.children,Z=M.backfill,ve=M.allowClear,oe=M.placeholder,fe=M.getInputElement,ye=M.showSearch,Pe=M.onSearch,ge=M.defaultOpen,de=M.autoFocus,Qe=M.labelInValue,St=M.value,Ee=M.inputValue,De=M.optionLabelProp,rt=V==="multiple"||V==="tags",Be=ye!==void 0?ye:rt||V==="combobox",ke=K||g($);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 ut=ke.some(function(we){return we.options?we.options.some(function(Ke){return typeof("value"in Ke?Ke.value:Ke.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(_.a)(!ut,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(_.a)(V!=="combobox"||!De,"`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||!ve||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pe&&!Be&&V!=="combobox"&&V!=="tags"&&Object(_.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(_.b)(!ge||de,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),St!=null){var ie=Object(x.d)(St);Object(_.a)(!Qe||ie.every(function(we){return Object(m.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(_.a)(!rt||Array.isArray(St),"`value` should be array when `mode` is `multiple` or `tags`")}if($){var xe=null;Object(k.a)($).some(function(we){if(!S.isValidElement(we)||!we.type)return!1;var Ke=we.type;if(Ke.isSelectOption)return!1;if(Ke.isSelectOptGroup){var ot=Object(k.a)(we.props.children).every(function(gt){return!S.isValidElement(gt)||!we.type||gt.type.isSelectOption?!0:(xe=gt.type,!1)});return!ot}return xe=Ke,!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=v,U=Object(p.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:g,flattenOptions:h.d,getLabeledValue:h.e,filterOptions:h.b,isValueDisabled:h.g,findValueOption:h.c,warningProps:j,fillOptionsWithMissingValue:h.a}),T=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=S.createRef(),$.focus=function(){$.selectRef.current.focus()},$.blur=function(){$.selectRef.current.blur()},$}return Object(B.a)(K,[{key:"render",value:function(){return S.createElement(U,Object.assign({ref:this.selectRef},this.props))}}]),K}(S.Component);T.Option=d,T.OptGroup=A;var z=T,H=J.c=z},M8RZ:function(We,J,L){"use strict";L.d(J,"a",function(){return t});var Y=L("fWQN"),B=L("mtLc"),I=L("yKVA"),F=L("879j"),S=L("q1tI"),R=L.n(S),P=L("i8i4"),y=L.n(P),t=function(b){Object(I.a)(u,b);var i=Object(F.a)(u);function u(f){var a;Object(Y.a)(this,u),a=i.call(this,f);var o=window.document;return a.node=o.createElement("div"),o.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(We,J,L){var Y=L("4fz+"),B=L("Dagg"),I=L("dqUG"),F=L("2fw6"),S=L("x6Kt"),R=L("rmlV"),P=L("yxFR"),y=L("y+Vt"),t=L("h7HQ"),b=L("1Jh7"),i=L("SKnc"),u=L("K2GJ"),f=L("Fofx"),a=L("NC18"),o=a.createFromString,c=L("bYtY"),l=c.isString,n=c.extend,s=c.defaults,d=c.trim,E=c.each,A=/[\s,]+/;function C(K){if(l(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 ve=new Y;this._root=ve;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),x(Z,ve,null,!0);for(var Pe=Z.firstChild;Pe;)this._parseNode(Pe,ve),Pe=Pe.nextSibling;var ge,de;if(oe){var Qe=d(oe).split(A);Qe.length>=4&&(ge={x:parseFloat(Qe[0]||0),y:parseFloat(Qe[1]||0),width:parseFloat(Qe[2]),height:parseFloat(Qe[3])})}if(ge&&fe!=null&&ye!=null&&(de=M(ge,fe,ye),!$.ignoreViewBox)){var St=ve;ve=new Y,ve.add(St),St.scale=de.scale.slice(),St.position=de.position.slice()}return!$.ignoreRootClip&&fe!=null&&ye!=null&&ve.setClipPath(new S({shape:{x:0,y:0,width:fe,height:ye}})),{root:ve,width:fe,height:ye,viewBoxRect:ge,viewBoxTransform:de}},k.prototype._parseNode=function(K,$){var Z=K.nodeName.toLowerCase();Z==="defs"?this._isDefine=!0:Z==="text"&&(this._isText=!0);var ve;if(this._isDefine){var oe=g[Z];if(oe){var fe=oe.call(this,K),ye=K.getAttribute("id");ye&&(this._defs[ye]=fe)}}else{var oe=w[Z];oe&&(ve=oe.call(this,K,$),$.add(ve))}for(var Pe=K.firstChild;Pe;)Pe.nodeType===1&&this._parseNode(Pe,ve),Pe.nodeType===3&&this._isText&&this._parseText(Pe,ve),Pe=Pe.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,ve=K.getAttribute("dy")||0;this._textX+=parseFloat(Z),this._textY+=parseFloat(ve)}var oe=new I({style:{text:K.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});p($,oe),x(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),x(K,Z,this._defs),Z},rect:function(K,$){var Z=new S;return p($,Z),x(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),x(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),x(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),x(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=m(Z));var ve=new t({shape:{points:Z||[]}});return p($,ve),x(K,ve,this._defs),ve},polyline:function(K,$){var Z=new y;p($,Z),x(K,Z,this._defs);var ve=K.getAttribute("points");ve&&(ve=m(ve));var oe=new b({shape:{points:ve||[]}});return oe},image:function(K,$){var Z=new B;return p($,Z),x(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,ve=K.getAttribute("y")||0,oe=K.getAttribute("dx")||0,fe=K.getAttribute("dy")||0;this._textX=parseFloat(Z)+parseFloat(oe),this._textY=parseFloat(ve)+parseFloat(fe);var ye=new Y;return p($,ye),x(K,ye,this._defs),ye},tspan:function(K,$){var Z=K.getAttribute("x"),ve=K.getAttribute("y");Z!=null&&(this._textX=parseFloat(Z)),ve!=null&&(this._textY=parseFloat(ve));var oe=K.getAttribute("dx")||0,fe=K.getAttribute("dy")||0,ye=new Y;return p($,ye),x(K,ye,this._defs),this._textX+=oe,this._textY+=fe,ye},path:function(K,$){var Z=K.getAttribute("d")||"",ve=o(Z);return p($,ve),x(K,ve,this._defs),ve}},g={lineargradient:function(K){var $=parseInt(K.getAttribute("x1")||0,10),Z=parseInt(K.getAttribute("y1")||0,10),ve=parseInt(K.getAttribute("x2")||10,10),oe=parseInt(K.getAttribute("y2")||0,10),fe=new i($,Z,ve,oe);return h(K,fe),fe},radialgradient:function(K){}};function h(K,$){for(var Z=K.firstChild;Z;){if(Z.nodeType===1){var ve=Z.getAttribute("offset");ve.indexOf("%")>0?ve=parseInt(ve,10)/100:ve?ve=parseFloat(ve):ve=0;var oe=Z.getAttribute("stop-color")||"#000000";$.addColorStop(ve,oe)}Z=Z.nextSibling}}function p(K,$){K&&K.__inheritedStyle&&($.__inheritedStyle||($.__inheritedStyle={}),s($.__inheritedStyle,K.__inheritedStyle))}function m(K){for(var $=d(K).split(A),Z=[],ve=0;ve<$.length;ve+=2){var oe=parseFloat($[ve]),fe=parseFloat($[ve+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 x(K,$,Z,ve){var oe=$.__inheritedStyle||{},fe=$.type==="text";if(K.nodeType===1&&(T(K,$),n(oe,H(K)),!ve)){for(var ye in _)if(_.hasOwnProperty(ye)){var Pe=K.getAttribute(ye);Pe!=null&&(oe[_[ye]]=Pe)}}var ge=fe?"textFill":"fill",de=fe?"textStroke":"stroke";$.style=$.style||new u;var Qe=$.style;oe.fill!=null&&Qe.set(ge,j(oe.fill,Z)),oe.stroke!=null&&Qe.set(de,j(oe.stroke,Z)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(St){var Ee=St==="lineWidth"&&fe?"textStrokeWidth":St;oe[St]!=null&&Qe.set(Ee,parseFloat(oe[St]))}),(!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"),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(St){oe[St]!=null&&Qe.set(St,oe[St])}),oe.lineDash&&($.style.lineDash=d(oe.lineDash).split(A)),Qe[de]&&Qe[de]!=="none"&&($[de]=!0),$.__inheritedStyle=oe}var v=/url\(\s*#(.*?)\)/;function j(K,$){var Z=$&&K&&K.match(v);if(Z){var ve=d(Z[1]),oe=$[ve];return oe}return K}var U=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function T(K,$){var Z=K.getAttribute("transform");if(Z){Z=Z.replace(/,/g," ");var ve=null,oe=[];Z.replace(U,function(ge,de,Qe){oe.push(de,Qe)});for(var fe=oe.length-1;fe>0;fe-=2){var ye=oe[fe],Pe=oe[fe-1];ve=ve||f.create();switch(Pe){case"translate":ye=d(ye).split(A),f.translate(ve,ve,[parseFloat(ye[0]),parseFloat(ye[1]||0)]);break;case"scale":ye=d(ye).split(A),f.scale(ve,ve,[parseFloat(ye[0]),parseFloat(ye[1]||ye[0])]);break;case"rotate":ye=d(ye).split(A),f.rotate(ve,ve,parseFloat(ye[0]));break;case"skew":ye=d(ye).split(A),console.warn("Skew transform is not supported yet");break;case"matrix":var ye=d(ye).split(A);ve[0]=parseFloat(ye[0]),ve[1]=parseFloat(ye[1]),ve[2]=parseFloat(ye[2]),ve[3]=parseFloat(ye[3]),ve[4]=parseFloat(ye[4]),ve[5]=parseFloat(ye[5]);break}}$.setLocalTransform(ve)}}var z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function H(K){var $=K.getAttribute("style"),Z={};if(!$)return Z;var ve={};z.lastIndex=0;for(var oe;(oe=z.exec($))!=null;)ve[oe[1]]=oe[2];for(var fe in _)_.hasOwnProperty(fe)&&ve[fe]!=null&&(Z[_[fe]]=ve[fe]);return Z}function M(K,$,Z){var ve=$/K.width,oe=Z/K.height,fe=Math.min(ve,oe),ye=[fe,fe],Pe=[-(K.x+K.width/2)*fe+$/2,-(K.y+K.height/2)*fe+Z/2];return{scale:ye,position:Pe}}function V(K,$){var Z=new k;return Z.parse(K,$)}J.parseXML=C,J.makeViewBoxTransform=M,J.parseSVG=V},MI8n:function(We,J,L){"use strict";L.d(J,"c",function(){return S}),L.d(J,"b",function(){return t}),L.d(J,"e",function(){return b}),L.d(J,"a",function(){return i}),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"),S;(function(a){a.None=()=>B.a.None;function o(v){return(j,U=null,T)=>{let z=!1,H;return H=v(M=>z?void 0:(H?H.dispose():z=!0,j.call(U,M)),null,T),z&&H.dispose(),H}}a.once=o;function c(v,j){return A((U,T=null,z)=>v(H=>U.call(T,j(H)),null,z))}a.map=c;function l(v,j){return A((U,T=null,z)=>v(H=>{j(H),U.call(T,H)},null,z))}a.forEach=l;function n(v,j){return A((U,T=null,z)=>v(H=>j(H)&&U.call(T,H),null,z))}a.filter=n;function s(v){return v}a.signal=s;function d(...v){return(j,U=null,T)=>Object(B.e)(...v.map(z=>z(H=>j.call(U,H),null,T)))}a.any=d;function E(v,j,U){let T=U;return c(v,z=>(T=j(T,z),T))}a.reduce=E;function A(v){let j;const U=new t({onFirstListenerAdd(){j=v(U.fire,U)},onLastListenerRemove(){j.dispose()}});return U.event}function C(v,j,U=100,T=!1,z){let H,M,V,K=0;const $=new t({leakWarningThreshold:z,onFirstListenerAdd(){H=v(Z=>{K++,M=j(M,Z),T&&!V&&($.fire(M),M=void 0),clearTimeout(V),V=setTimeout(()=>{const ve=M;M=void 0,V=void 0,(!T||K>1)&&$.fire(ve),K=0},U)})},onLastListenerRemove(){H.dispose()}});return $.event}a.debounce=C;function k(v,j=(U,T)=>U===T){let U=!0,T;return n(v,z=>{const H=U||!j(z,T);return U=!1,T=z,H})}a.latch=k;function w(v,j){return[a.filter(v,j),a.filter(v,U=>!j(U))]}a.split=w;function g(v,j=!1,U=[]){let T=U.slice(),z=v(V=>{T?T.push(V):M.fire(V)});const H=()=>{T&&T.forEach(V=>M.fire(V)),T=null},M=new t({onFirstListenerAdd(){z||(z=v(V=>M.fire(V)))},onFirstListenerDidAdd(){T&&(j?setTimeout(H):H())},onLastListenerRemove(){z&&z.dispose(),z=null}});return M.event}a.buffer=g;class h{constructor(v){this.event=v}map(v){return new h(c(this.event,v))}forEach(v){return new h(l(this.event,v))}filter(v){return new h(n(this.event,v))}reduce(v,j){return new h(E(this.event,v,j))}latch(){return new h(k(this.event))}debounce(v,j=100,U=!1,T){return new h(C(this.event,v,j,U,T))}on(v,j,U){return this.event(v,j,U)}once(v,j,U){return o(this.event)(v,j,U)}}function p(v){return new h(v)}a.chain=p;function m(v,j,U=T=>T){const T=(...V)=>M.fire(U(...V)),z=()=>v.on(j,T),H=()=>v.removeListener(j,T),M=new t({onFirstListenerAdd:z,onLastListenerRemove:H});return M.event}a.fromNodeEventEmitter=m;function _(v,j,U=T=>T){const T=(...V)=>M.fire(U(...V)),z=()=>v.addEventListener(j,T),H=()=>v.removeEventListener(j,T),M=new t({onFirstListenerAdd:z,onLastListenerRemove:H});return M.event}a.fromDOMEventEmitter=_;function x(v){return new Promise(j=>o(v)(j))}a.toPromise=x})(S||(S={}));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 y{constructor(a,o=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let o=P;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||a<o)return;this._stacks||(this._stacks=new Map);const c=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),l=this._stacks.get(c)||0;if(this._stacks.set(c,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let n,s=0;for(const[d,E]of this._stacks)(!n||s<E)&&(n=d,s=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${s}):`),console.warn(n)}return()=>{const n=this._stacks.get(c)||0;this._stacks.set(c,n-1)}}}class t{constructor(a){var o;this._disposed=!1,this._options=a,this._leakageMon=P>0?new y(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(a,o,c)=>{var l;this._listeners||(this._listeners=new I.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(o?[a,o]:a);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,o);const d=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),E=Object(B.i)(()=>{if(d&&d(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const A=this._listeners&&!this._listeners.isEmpty();A||this._options.onLastListenerRemove(this)}});return c instanceof B.b?c.add(E):Array.isArray(c)&&c.push(E),E}),this._event}fire(a){var o,c;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new I.a);for(let l of this._listeners)this._deliveryQueue.push([l,a]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,n]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,n):l[0].call(l[1],n)}catch(s){Object(Y.f)(s)}}(c=this._perfMon)===null||c===void 0||c.stop()}}dispose(){var a,o,c,l,n;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(l=(c=this._options)===null||c===void 0?void 0:c.onLastListenerRemove)===null||l===void 0||l.call(c),(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 i extends b{constructor(a){var o;super(a);this._delay=(o=a.delay)!==null&&o!==void 0?o: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(o,c,l)=>a(n=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>o.call(c,n)):o.call(c,n)},void 0,l)}bufferEvents(a){const o=[];this.buffers.push(o);const c=a();return this.buffers.pop(),o.forEach(l=>l()),c}}class f{constructor(){this.listening=!1,this.inputEvent=S.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(We,J,L){var Y=L("bYtY"),B=L("YH21"),I=B.Dispatcher,F=L("mLcG"),S=L("Bq2U"),R=function(y){y=y||{},this.stage=y.stage||{},this.onframe=y.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(y){this._clips.push(y)},addAnimator:function(y){y.animation=this;for(var t=y.getClips(),b=0;b<t.length;b++)this.addClip(t[b])},removeClip:function(y){var t=Y.indexOf(this._clips,y);t>=0&&this._clips.splice(t,1)},removeAnimator:function(y){for(var t=y.getClips(),b=0;b<t.length;b++)this.removeClip(t[b]);y.animation=null},_update:function(){for(var y=new Date().getTime()-this._pausedTime,t=y-this._time,b=this._clips,i=b.length,u=[],f=[],a=0;a<i;a++){var o=b[a],c=o.step(y,t);c&&(u.push(c),f.push(o))}for(var a=0;a<i;)b[a]._needsRemove?(b[a]=b[i-1],b.pop(),i--):a++;i=u.length;for(var a=0;a<i;a++)f[a].fire(u[a]);this._time=y,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var y=this;this._running=!0;function t(){y._running&&(F(t),!y._paused&&y._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(y,t){t=t||{};var b=new S(y,t.loop,t.getter,t.setter);return this.addAnimator(b),b}},Y.mixin(R,I);var P=R;We.exports=P},MNsG:function(We,J,L){"use strict";(function(Y,B){L.d(J,"b",function(){return c}),L.d(J,"i",function(){return d}),L.d(J,"f",function(){return E}),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 g}),L.d(J,"j",function(){return h}),L.d(J,"a",function(){return p}),L.d(J,"e",function(){return x});var I;const F="en";let S=!1,R=!1,P=!1,y=!1,t=!1,b=!1,i=!1,u,f=F,a,o;const c=typeof self=="object"?self:typeof Y=="object"?Y:{};let l;typeof c.vscode!="undefined"&&typeof c.vscode.process!="undefined"?l=c.vscode.process:typeof B!="undefined"&&(l=B);const n=typeof((I=l==null?void 0:l.versions)===null||I===void 0?void 0:I.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!n)o=navigator.userAgent,S=o.indexOf("Windows")>=0,R=o.indexOf("Macintosh")>=0,i=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,P=o.indexOf("Linux")>=0,b=!0,u=navigator.language,f=u;else if(typeof l=="object"){S=l.platform==="win32",R=l.platform==="darwin",P=l.platform==="linux",y=P&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,u=F,f=F;const v=l.env.VSCODE_NLS_CONFIG;if(v)try{const j=JSON.parse(v),U=j.availableLanguages["*"];u=j.locale,f=U||F,a=j._translationsConfigFile}catch(j){}t=!0}else console.error("Unable to resolve platform.");let s=0;R?s=1:S?s=3:P&&(s=2);const d=S,E=R,A=P,C=t,k=b,w=i,g=o,h=function(){if(c.setImmediate)return c.setImmediate.bind(c);if(typeof c.postMessage=="function"&&!c.importScripts){let U=[];c.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 T=0;return z=>{const H=++T;U.push({id:H,callback:z}),c.postMessage({vscodeSetImmediateId:H},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const j=Promise.resolve();return U=>j.then(U)}(),p=R||i?2:S?1:3;let m=!0,_=!1;function x(){if(!_){_=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const j=new Uint16Array(v.buffer);m=j[0]===(2<<8)+1}return m}}).call(this,L("IyRk"),L("Q2Ig"))},N0LK:function(We,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 S}),L.d(J,"U",function(){return R}),L.d(J,"J",function(){return P}),L.d(J,"O",function(){return y}),L.d(J,"p",function(){return t}),L.d(J,"T",function(){return b}),L.d(J,"q",function(){return i}),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 o}),L.d(J,"x",function(){return c}),L.d(J,"I",function(){return l}),L.d(J,"f",function(){return n}),L.d(J,"h",function(){return s}),L.d(J,"g",function(){return d}),L.d(J,"i",function(){return E}),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 g}),L.d(J,"e",function(){return h}),L.d(J,"E",function(){return p}),L.d(J,"F",function(){return m}),L.d(J,"j",function(){return _}),L.d(J,"z",function(){return x}),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 ve}),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 Pe}),L.d(J,"o",function(){return ge}),L.d(J,"P",function(){return de}),L.d(J,"w",function(){return Qe}),L.d(J,"c",function(){return St}),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,Ke){const ot=parseInt(Ke,10);return isNaN(ot)||ot<0||ot>=xe.length?we:xe[ot]})}function F(ie){return ie.replace(/[<>&]/g,function(xe){switch(xe){case"<":return"<";case">":return">";case"&":return"&";default:return xe}})}function S(ie){return ie.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R(ie,xe=" "){const we=P(ie,xe);return y(we,xe)}function P(ie,xe){if(!ie||!xe)return ie;const we=xe.length;if(we===0||ie.length===0)return ie;let Ke=0;for(;ie.indexOf(xe,Ke)===Ke;)Ke=Ke+we;return ie.substring(Ke)}function y(ie,xe){if(!ie||!xe)return ie;const we=xe.length,Ke=ie.length;if(we===0||Ke===0)return ie;let ot=Ke,gt=-1;for(;!(gt=ie.lastIndexOf(xe,ot-1),gt===-1||gt+we!==ot);){if(gt===0)return"";ot=gt}return ie.substring(0,ot)}function t(ie){return ie.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function b(ie){return ie.replace(/\*/g,"")}function i(ie,xe,we={}){if(!ie)throw new Error("Cannot create regex from empty string");xe||(ie=S(ie)),we.wholeWord&&(/\B/.test(ie.charAt(0))||(ie="\\b"+ie),/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"));let Ke="";return we.global&&(Ke+="g"),we.matchCase||(Ke+="i"),we.multiline&&(Ke+="m"),we.unicode&&(Ke+="u"),new RegExp(ie,Ke)}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 o(ie){for(let xe=0,we=ie.length;xe<we;xe++){const Ke=ie.charCodeAt(xe);if(Ke!==32&&Ke!==9)return xe}return-1}function c(ie,xe=0,we=ie.length){for(let Ke=xe;Ke<we;Ke++){const ot=ie.charCodeAt(Ke);if(ot!==32&&ot!==9)return ie.substring(xe,Ke)}return ie.substring(xe,we)}function l(ie,xe=ie.length-1){for(let we=xe;we>=0;we--){const Ke=ie.charCodeAt(we);if(Ke!==32&&Ke!==9)return we}return-1}function n(ie,xe){return ie<xe?-1:ie>xe?1:0}function s(ie,xe,we=0,Ke=ie.length,ot=0,gt=xe.length){for(;we<Ke&&ot<gt;we++,ot++){let jt=ie.charCodeAt(we),$t=xe.charCodeAt(ot);if(jt<$t)return-1;if(jt>$t)return 1}const Nt=Ke-we,He=gt-ot;return Nt<He?-1:Nt>He?1:0}function d(ie,xe){return E(ie,xe,0,ie.length,0,xe.length)}function E(ie,xe,we=0,Ke=ie.length,ot=0,gt=xe.length){for(;we<Ke&&ot<gt;we++,ot++){let jt=ie.charCodeAt(we),$t=xe.charCodeAt(ot);if(jt===$t)continue;if(jt>=128||$t>=128)return s(ie.toLowerCase(),xe.toLowerCase(),we,Ke,ot,gt);A(jt)&&(jt-=32),A($t)&&($t-=32);const Ie=jt-$t;if(Ie===0)continue;return Ie}const Nt=Ke-we,He=gt-ot;return Nt<He?-1:Nt>He?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&&E(ie,xe)===0}function w(ie,xe){const we=xe.length;return xe.length>ie.length?!1:E(ie,xe,0,we)===0}function g(ie,xe){let we,Ke=Math.min(ie.length,xe.length);for(we=0;we<Ke;we++)if(ie.charCodeAt(we)!==xe.charCodeAt(we))return we;return Ke}function h(ie,xe){let we,Ke=Math.min(ie.length,xe.length);const ot=ie.length-1,gt=xe.length-1;for(we=0;we<Ke;we++)if(ie.charCodeAt(ot-we)!==xe.charCodeAt(gt-we))return we;return Ke}function p(ie){return 55296<=ie&&ie<=56319}function m(ie){return 56320<=ie&&ie<=57343}function _(ie,xe){return(ie-55296<<10)+(xe-56320)+65536}function x(ie,xe,we){const Ke=ie.charCodeAt(we);if(p(Ke)&&we+1<xe){const ot=ie.charCodeAt(we+1);if(m(ot))return _(Ke,ot)}return Ke}function v(ie,xe){const we=ie.charCodeAt(xe-1);if(m(we)&&xe>1){const Ke=ie.charCodeAt(xe-2);if(p(Ke))return _(Ke,we)}return we}function j(ie,xe){const we=Ee.getInstance(),Ke=xe,ot=ie.length,gt=x(ie,ot,xe);xe+=gt>=65536?2:1;let Nt=we.getGraphemeBreakType(gt);for(;xe<ot;){const He=x(ie,ot,xe),jt=we.getGraphemeBreakType(He);if(St(Nt,jt))break;xe+=He>=65536?2:1,Nt=jt}return xe-Ke}function U(ie,xe){const we=Ee.getInstance(),Ke=xe,ot=v(ie,xe);xe-=ot>=65536?2:1;let gt=we.getGraphemeBreakType(ot);for(;xe>0;){const Nt=v(ie,xe),He=we.getGraphemeBreakType(Nt);if(St(He,gt))break;xe-=Nt>=65536?2:1,gt=He}return Ke-xe}const T=/(?:[\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 T.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 ve(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 Pe(ie){return!!(ie&&ie.length>0&&ie.charCodeAt(0)===65279)}function ge(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 Qe(ie){const xe=Ee.getInstance();return xe.getGraphemeBreakType(ie)}function St(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=De()}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 Ke=1;for(;Ke<=we;)if(ie<xe[3*Ke])Ke=2*Ke;else if(ie>xe[3*Ke+1])Ke=2*Ke+1;else return xe[3*Ke+2];return 0}}Ee._INSTANCE=null;function De(){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=Be(ie,xe);if(we!==void 0)return we;const Ke=v(xe,ie);return ie-=ke(Ke),ie}function Be(ie,xe){let we=v(xe,ie);for(ie-=ke(we);ut(we)||we===65039||we===8419;){if(ie===0)return;we=v(xe,ie),ie-=ke(we)}if(!fe(we))return;if(ie>=0){const Ke=v(xe,ie);Ke===8205&&(ie-=ke(Ke))}return ie}function ke(ie){return ie>=65536?2:1}function ut(ie){return 127995<=ie&&ie<=127999}},NC18:function(We,J,L){var Y=L("y+Vt"),B=L("IMiH"),I=L("7oTu"),F=Math.sqrt,S=Math.sin,R=Math.cos,P=Math.PI,y=function(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])},t=function(s,d){return(s[0]*d[0]+s[1]*d[1])/(y(s)*y(d))},b=function(s,d){return(s[0]*d[1]<s[1]*d[0]?-1:1)*Math.acos(t(s,d))};function i(s,d,E,A,C,k,w,g,h,p,m){var _=h*(P/180),x=R(_)*(s-E)/2+S(_)*(d-A)/2,v=-1*S(_)*(s-E)/2+R(_)*(d-A)/2,j=x*x/(w*w)+v*v/(g*g);j>1&&(w*=F(j),g*=F(j));var U=(C===k?-1:1)*F((w*w*(g*g)-w*w*(v*v)-g*g*(x*x))/(w*w*(v*v)+g*g*(x*x)))||0,T=U*w*v/g,z=U*-g*x/w,H=(s+E)/2+R(_)*T-S(_)*z,M=(d+A)/2+S(_)*T+R(_)*z,V=b([1,0],[(x-T)/w,(v-z)/g]),K=[(x-T)/w,(v-z)/g],$=[(-1*x-T)/w,(-1*v-z)/g],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),m.addData(p,H,M,w,g,V,Z,_,k)}var u=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,f=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function a(s){if(!s)return new B;for(var d=0,E=0,A=d,C=E,k,w=new B,g=B.CMD,h=s.match(u),p=0;p<h.length;p++){for(var m=h[p],_=m.charAt(0),x,v=m.match(f)||[],j=v.length,U=0;U<j;U++)v[U]=parseFloat(v[U]);for(var T=0;T<j;){var z,H,M,V,K,$,Z,ve=d,oe=E;switch(_){case"l":d+=v[T++],E+=v[T++],x=g.L,w.addData(x,d,E);break;case"L":d=v[T++],E=v[T++],x=g.L,w.addData(x,d,E);break;case"m":d+=v[T++],E+=v[T++],x=g.M,w.addData(x,d,E),A=d,C=E,_="l";break;case"M":d=v[T++],E=v[T++],x=g.M,w.addData(x,d,E),A=d,C=E,_="L";break;case"h":d+=v[T++],x=g.L,w.addData(x,d,E);break;case"H":d=v[T++],x=g.L,w.addData(x,d,E);break;case"v":E+=v[T++],x=g.L,w.addData(x,d,E);break;case"V":E=v[T++],x=g.L,w.addData(x,d,E);break;case"C":x=g.C,w.addData(x,v[T++],v[T++],v[T++],v[T++],v[T++],v[T++]),d=v[T-2],E=v[T-1];break;case"c":x=g.C,w.addData(x,v[T++]+d,v[T++]+E,v[T++]+d,v[T++]+E,v[T++]+d,v[T++]+E),d+=v[T-2],E+=v[T-1];break;case"S":z=d,H=E;var fe=w.len(),ye=w.data;k===g.C&&(z+=d-ye[fe-4],H+=E-ye[fe-3]),x=g.C,ve=v[T++],oe=v[T++],d=v[T++],E=v[T++],w.addData(x,z,H,ve,oe,d,E);break;case"s":z=d,H=E;var fe=w.len(),ye=w.data;k===g.C&&(z+=d-ye[fe-4],H+=E-ye[fe-3]),x=g.C,ve=d+v[T++],oe=E+v[T++],d+=v[T++],E+=v[T++],w.addData(x,z,H,ve,oe,d,E);break;case"Q":ve=v[T++],oe=v[T++],d=v[T++],E=v[T++],x=g.Q,w.addData(x,ve,oe,d,E);break;case"q":ve=v[T++]+d,oe=v[T++]+E,d+=v[T++],E+=v[T++],x=g.Q,w.addData(x,ve,oe,d,E);break;case"T":z=d,H=E;var fe=w.len(),ye=w.data;k===g.Q&&(z+=d-ye[fe-4],H+=E-ye[fe-3]),d=v[T++],E=v[T++],x=g.Q,w.addData(x,z,H,d,E);break;case"t":z=d,H=E;var fe=w.len(),ye=w.data;k===g.Q&&(z+=d-ye[fe-4],H+=E-ye[fe-3]),d+=v[T++],E+=v[T++],x=g.Q,w.addData(x,z,H,d,E);break;case"A":M=v[T++],V=v[T++],K=v[T++],$=v[T++],Z=v[T++],ve=d,oe=E,d=v[T++],E=v[T++],x=g.A,i(ve,oe,d,E,$,Z,M,V,K,x,w);break;case"a":M=v[T++],V=v[T++],K=v[T++],$=v[T++],Z=v[T++],ve=d,oe=E,d+=v[T++],E+=v[T++],x=g.A,i(ve,oe,d,E,$,Z,M,V,K,x,w);break}}(_==="z"||_==="Z")&&(x=g.Z,w.addData(x),d=A,E=C),k=x}return w.toStatic(),w}function o(s,d){var E=a(s);return d=d||{},d.buildPath=function(A){if(A.setData){A.setData(E.data);var C=A.getContext();C&&A.rebuildPath(C)}else{var C=A;E.rebuildPath(C)}},d.applyTransform=function(A){I(E,A),this.dirty(!0)},d}function c(s,d){return new Y(o(s,d))}function l(s,d){return Y.extend(o(s,d))}function n(s,d){for(var E=[],A=s.length,C=0;C<A;C++){var k=s[C];k.path||k.createPathProxy(),k.__dirtyPath&&k.buildPath(k.path,k.shape,!0),E.push(k.path)}var w=new Y(d);return w.createPathProxy(),w.buildPath=function(g){g.appendPath(E);var h=g.getContext();h&&g.rebuildPath(h)},w}J.createFromString=c,J.extendFromString=l,J.mergePath=n},NLgs:function(We,J,L){"use strict";L.d(J,"e",function(){return l}),L.d(J,"f",function(){return n}),L.d(J,"d",function(){return d}),L.d(J,"c",function(){return E}),L.d(J,"a",function(){return A}),L.d(J,"b",function(){return C});var Y=L("miYZ"),B=L("tsqr"),I=L("9og8"),F=L("2qtc"),S=L("kLXV"),R=L("WmNS"),P=L.n(R),y=L("q1tI"),t=L.n(y),b=L("9kvl"),i=L("xKgJ"),u=L("1vsH"),f=L("RCxd"),a=L("yTi+"),o=L.n(a),c=L("m3rI"),l=function(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(n(w)&&s(g))},n=function(w){return Object(i.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},s=function(){var w,g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,h=Object(b.c)()._store.getState(),p=h.user;return(w=p.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(S.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:g?"\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)},d=function(){var w,g=Object(b.c)()._store.getState(),h=g.user;return(w=h.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(S.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)},E=function(){var w;if(Object(i.a)())return!0;var g=Object(b.c)()._store.getState(),h=g.user,p=g.globalSetting;return S.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\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:c.a.IMG_SERVER+(p==null||((w=p.setting)===null||w===void 0)?void 0:w.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},A=function(w,g){var h;if(w)return!0;var p=Object(b.c)()._store.getState(),m=p.user,_=p.globalSetting;return S.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,g||"\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:c.a.IMG_SERVER+(_==null||((h=_.setting)===null||h===void 0)?void 0:h.authority_qrcode_url),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},C=function(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=Object(b.c)()._store.getState(),p=h.shixunsDetail.detail;return(p==null?void 0:p.public)===2||(p==null?void 0:p.public)===1||(p==null?void 0:p.shixun_status)===3?(S.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",(p==null?void 0:p.public)===2?"\u5DF2\u516C\u5F00":(p==null?void 0:p.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",g,"\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:o.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(p==null?void 0:p.shixun_status)===2?(S.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",g,"\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(){S.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 _=Object(I.a)(P.a.mark(function v(){var j;return P.a.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:p==null?void 0:p.identifier}});case 2:j=T.sent,j.status!==401&&(B.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:p==null?void 0:p.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:p==null?void 0:p.identifier}}));case 4:case"end":return T.stop()}},v)}));function x(){return _.apply(this,arguments)}return x}()})}}),!0):!1}},NohK:function(We,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,S=null;return function(){for(var R=this,P=arguments.length,y=new Array(P),t=0;t<P;t++)y[t]=arguments[t];clearTimeout(S),S=setTimeout(function(){I.apply(R,y)},F)}};J.default=Y},NvD2:function(We,J,L){"use strict";L.d(J,"a",function(){return R});var Y=L("Kwbf");function B(P,y){var t=new Set;return P.forEach(function(b){y.has(b)||t.add(b)}),t}function I(P){var y=P||{},t=y.disabled,b=y.disableCheckbox,i=y.checkable;return!!(t||b)||i===!1}function F(P,y,t,b){for(var i=new Set(P),u=new Set,f=0;f<=t;f+=1){var a=y.get(f)||new Set;a.forEach(function(n){var s=n.key,d=n.node,E=n.children,A=E===void 0?[]:E;i.has(s)&&!b(d)&&A.filter(function(C){return!b(C.node)}).forEach(function(C){i.add(C.key)})})}for(var o=new Set,c=t;c>=0;c-=1){var l=y.get(c)||new Set;l.forEach(function(n){var s=n.parent,d=n.node;if(b(d)||!n.parent||o.has(n.parent.key))return;if(b(n.parent.node)){o.add(s.key);return}var E=!0,A=!1;(s.children||[]).filter(function(C){return!b(C.node)}).forEach(function(C){var k=C.key,w=i.has(k);E&&!w&&(E=!1),!A&&(w||u.has(k))&&(A=!0)}),E&&i.add(s.key),A&&u.add(s.key),o.add(s.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(B(u,i))}}function S(P,y,t,b,i){for(var u=new Set(P),f=new Set(y),a=0;a<=b;a+=1){var o=t.get(a)||new Set;o.forEach(function(s){var d=s.key,E=s.node,A=s.children,C=A===void 0?[]:A;!u.has(d)&&!f.has(d)&&!i(E)&&C.filter(function(k){return!i(k.node)}).forEach(function(k){u.delete(k.key)})})}f=new Set;for(var c=new Set,l=b;l>=0;l-=1){var n=t.get(l)||new Set;n.forEach(function(s){var d=s.parent,E=s.node;if(i(E)||!s.parent||c.has(s.parent.key))return;if(i(s.parent.node)){c.add(d.key);return}var A=!0,C=!1;(d.children||[]).filter(function(k){return!i(k.node)}).forEach(function(k){var w=k.key,g=u.has(w);A&&!g&&(A=!1),!C&&(g||f.has(w))&&(C=!0)}),A||u.delete(d.key),C&&f.add(d.key),c.add(d.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(B(f,u))}}function R(P,y,t,b){var i=[],u;b?u=b:u=I;var f=new Set(P.filter(function(l){var n=!!t[l];return n||i.push(l),n})),a=new Map,o=0;Object.keys(t).forEach(function(l){var n=t[l],s=n.level,d=a.get(s);d||(d=new Set,a.set(s,d)),d.add(n),o=Math.max(o,s)}),Object(Y.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var c;return y===!0?c=F(f,a,o,u):c=S(f,y.halfCheckedKeys,a,o,u),c}},OLES:function(We,J,L){"use strict";var Y=L("U8pU"),B=L("VTBJ"),I=L("Ff2n"),F=L("q1tI"),S=L("uciX"),R=L("7ixt"),P=function(f){var a=f.overlay,o=f.prefixCls,c=f.id,l=f.overlayInnerStyle;return F.createElement("div",{className:"".concat(o,"-inner"),id:c,role:"tooltip",style:l},typeof a=="function"?a():a)},y=P,t=function(f,a){var o=f.overlayClassName,c=f.trigger,l=c===void 0?["hover"]:c,n=f.mouseEnterDelay,s=n===void 0?0:n,d=f.mouseLeaveDelay,E=d===void 0?.1:d,A=f.overlayStyle,C=f.prefixCls,k=C===void 0?"rc-tooltip":C,w=f.children,g=f.onVisibleChange,h=f.afterVisibleChange,p=f.transitionName,m=f.animation,_=f.placement,x=_===void 0?"right":_,v=f.align,j=v===void 0?{}:v,U=f.destroyTooltipOnHide,T=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 Pe=f.arrowContent,ge=Pe===void 0?null:Pe,de=f.overlay,Qe=f.id;return[F.createElement("div",{className:"".concat(k,"-arrow"),key:"arrow"},ge),F.createElement(y,{key:"content",prefixCls:k,id:Qe,overlay:de,overlayInnerStyle:M})]},ve=!1,oe=!1;if(typeof T=="boolean")ve=T;else if(T&&Object(Y.a)(T)==="object"){var fe=T.keepParent;ve=fe===!0,oe=fe===!1}return F.createElement(S.a,Object.assign({popupClassName:o,prefixCls:k,popup:Z,action:l,builtinPlacements:R.a,popupPlacement:x,ref:K,popupAlign:j,getPopupContainer:H,onPopupVisibleChange:g,afterPopupVisibleChange:h,popupTransitionName:p,popupAnimation:m,defaultPopupVisible:z,destroyPopupOnHide:ve,autoDestroy:oe,mouseLeaveDelay:E,popupStyle:A,mouseEnterDelay:s},$),w)},b=Object(F.forwardRef)(t),i=J.a=b},OS9S:function(We,J,L){var Y=L("bYtY"),B=Y.inherits,I=L("Gev7"),F=L("mFDi");function S(y){I.call(this,y),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}S.prototype.incremental=!0,S.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},S.prototype.addDisplayable=function(y,t){t?this._temporaryDisplayables.push(y):this._displayables.push(y),this.dirty()},S.prototype.addDisplayables=function(y,t){t=t||!1;for(var b=0;b<y.length;b++)this.addDisplayable(y[b],t)},S.prototype.eachPendingDisplayable=function(y){for(var t=this._cursor;t<this._displayables.length;t++)y&&y(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)y&&y(this._temporaryDisplayables[t])},S.prototype.update=function(){this.updateTransform();for(var y=this._cursor;y<this._displayables.length;y++){var t=this._displayables[y];t.parent=this,t.update(),t.parent=null}for(var y=0;y<this._temporaryDisplayables.length;y++){var t=this._temporaryDisplayables[y];t.parent=this,t.update(),t.parent=null}},S.prototype.brush=function(y,t){for(var b=this._cursor;b<this._displayables.length;b++){var i=this._displayables[b];i.beforeBrush&&i.beforeBrush(y),i.brush(y,b===this._cursor?null:this._displayables[b-1]),i.afterBrush&&i.afterBrush(y)}this._cursor=b;for(var b=0;b<this._temporaryDisplayables.length;b++){var i=this._temporaryDisplayables[b];i.beforeBrush&&i.beforeBrush(y),i.brush(y,b===0?null:this._temporaryDisplayables[b-1]),i.afterBrush&&i.afterBrush(y)}this._temporaryDisplayables=[],this.notClear=!0};var R=[];S.prototype.getBoundingRect=function(){if(!this._rect){for(var y=new F(Infinity,Infinity,-Infinity,-Infinity),t=0;t<this._displayables.length;t++){var b=this._displayables[t],i=b.getBoundingRect().clone();b.needLocalTransform()&&i.applyTransform(b.getLocalTransform(R)),y.union(i)}this._rect=y}return this._rect},S.prototype.contain=function(y,t){var b=this.transformCoordToLocal(y,t),i=this.getBoundingRect();if(i.contain(b[0],b[1]))for(var u=0;u<this._displayables.length;u++){var f=this._displayables[u];if(f.contain(y,t))return!0}return!1},B(S,I);var P=S;We.exports=P},OZM5:function(We,J,L){"use strict";L.d(J,"b",function(){return b}),L.d(J,"a",function(){return i}),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 o}),L.d(J,"c",function(){return c}),L.d(J,"d",function(){return l}),L.d(J,"j",function(){return d}),L.d(J,"e",function(){return E}),L.d(J,"f",function(){return A});var Y=L("KQm4"),B=L("U8pU"),I=L("Ff2n"),F=L("q1tI"),S=L.n(F),R=L("Kwbf"),P=L("WaYH"),y=.25,t=2;function b(C,k){var w=C.slice(),g=w.indexOf(k);return g>=0&&w.splice(g,1),w}function i(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 o(C,k){var w=[C],g=k[C];function h(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(m){var _=m.key,x=m.children;w.push(_),h(x)})}return h(g.children),w}function c(C,k){var w=C.clientY,g=k.selectHandle.getBoundingClientRect(),h=g.top,p=g.bottom,m=g.height,_=Math.max(m*y,t);return w<=h+_?-1:w>=p-_?1:0}function l(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 s(C,k){if(!C)return[];var w=k||{},g=w.processProps,h=g===void 0?n:g,p=Array.isArray(C)?C:[C];return p.map(function(m){var _=m.children,x=Object(I.a)(m,["children"]),v=s(_,k);return S.a.createElement(P.a,Object.assign({},h(x)),v)})}function d(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 E(C,k){var w=new Set;function g(h){if(w.has(h))return;var p=k[h];if(!p)return;w.add(h);var m=p.parent,_=p.node;if(_.disabled)return;m&&g(m.key)}return(C||[]).forEach(function(h){g(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(We,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("rAM+"),F=L("miYZ"),S=L("tsqr"),R=L("9og8"),P=L("tJVT"),y=L("jrin"),t=L("WmNS"),b=L.n(t),i=L("q1tI"),u=L.n(i),f=L("VrN/"),a=L.n(f),o=L("bdgK"),c=L("p77/"),l=L("Bd2K"),n=L("ELLl"),s=L("19Vz"),d=L("lZu9"),E=L("+NIl"),A=L("kSUc"),C=L("9Bee"),k=function(Se){var ze=Se.value,xt=ze===void 0?"":ze,Qt=Se.className,on=Se.showTextOnly,vt=Se.showLines,Kt=Se.style,Ot=Kt===void 0?{}:Kt,Rt=Object(i.useMemo)(function(){return""},[xt]);return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:Rt}}))},w=L("0Owb"),g=L("dejd"),h=L("C+DQ"),p=L("1vsH"),m=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 x(Se){var ze=Se.onActionCallback,xt=Se.title,Qt=Se.icon,on=Se.actionName,vt=Se.className,Kt=vt===void 0?"":vt,Ot=Se.children;function Rt(){ze(on)}return u.a.createElement("a",{title:xt,className:Kt,onClick:Rt},u.a.createElement("i",{className:"md-iconfont ".concat(Qt)}),Ot)}var v=function(Se){var ze=Se.watch,xt=Se.showNullButton,Qt=Se.onActionCallback,on=Se.fullScreen,vt=Se.insertTemp,Kt=Se.hidetoolBar,Ot=Se.uuid,Rt=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(m.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"},!Kt&&ft.map(function(be,Fe){return u.a.createElement("li",{key:Fe},be.actionName?u.a.createElement(x,Object(w.a)({},be,{onActionCallback:Qt})):u.a.createElement("span",{className:"v-line"}))}),xt?u.a.createElement("li",null,u.a.createElement(x,{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,vt&&u.a.createElement("li",null,u.a.createElement(x,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(vt),onActionCallback:Qt},u.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),u.a.createElement("li",{className:"btn-full-screen"},u.a.createElement(x,{icon:"".concat(on?"icon-shrink":"icon-enlarge"),title:on?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Qt})))},j=L("M8RZ"),U=L("+L6B"),T=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(on){ze(on)}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(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(T.a,{type:"ghost",onClick:xt},"\u53D6\u6D88")))},Z=L("7ahc"),ve=L("HmJG"),oe=L("BjJ7"),fe=H.a.useForm,ye={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}},ge=function(Se){var ze=Se.callback,xt=Se.onCancel,Qt=fe(),on=Object(P.a)(Qt,1),vt=on[0];function Kt(ft){ze(ft)}function Ot(ft,be){if(ft.status===-1){S.b.error(ft.message);return}vt.setFieldsValue({src:"/api/attachments/".concat(ft.id),type:be.type})}function Rt(ft){var be=ft.target.files[0];Qe(be,Ot)}return u.a.createElement(H.a,Object(w.a)({form:vt},Pe,{className:"upload-image-panel",onFinish:Kt}),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:Rt}))),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(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(T.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 Qe(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(on){ze(JSON.parse(on.target.responseText),Se)},!1),Qt.addEventListener("error",function(on){console.error(on)},!1),Qt.open("POST","".concat(oe.a,"/api/attachments.json")),Qt.send(xt)}var St=L("giR+"),Ee=L("fyUT"),De=L("7Kak"),rt=L("9yH6"),Be=rt.a.Group,ke={margin:"0 8px"},ut=function(Se){var ze=Se.callback,xt=Se.onCancel;function Qt(on){ze(on)}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(Be,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(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),u.a.createElement(T.a,{type:"ghost",onClick:xt},"\u53D6\u6D88")))},ie=L("ErOA"),xe=L("7Cbv"),we="link",Ke="upload-image",ot="code-block",gt="add-table",Nt="------------",He={default:Nt,left:":".concat(Nt),center:":".concat(Nt,":"),right:"".concat(Nt,":")},jt=L("9VGf"),$t,Ie;function Ae(){}var ct=0,Et=1e4,Ze="\u2581",ht=`
|
|
**\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=($t={},Object(y.a)($t,Oe+"-B","bold"),Object(y.a)($t,Oe+"-I","italic"),$t),he=(Ie={},Object(y.a)(Ie,we,"\u6DFB\u52A0\u94FE\u63A5"),Object(y.a)(Ie,ot,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(y.a)(Ie,Ke,"\u6DFB\u52A0\u6587\u4EF6"),Object(y.a)(Ie,gt,"\u6DFB\u52A0\u8868\u683C"),Ie),_e=J.a=function(Se){var ze=Se.defaultValue,xt=ze===void 0?"":ze,Qt=Se.onChange,on=Se.width,vt=on===void 0?"100%":on,Kt=Se.height,Ot=Kt===void 0?400:Kt,Rt=Se.miniToolbar,ft=Rt===void 0?!1:Rt,be=Se.isFocus,Fe=be===void 0?!1:be,Ut=Se.watch,_t=Se.insertTemp,Gt=Se.mode,en=Gt===void 0?"markdown":Gt,Ge=Se.id,dt=Ge===void 0?"markdown-editor-id":Ge,Pt=Se.showResizeBar,zt=Pt===void 0?!1:Pt,ln=Se.noStorage,vn=ln===void 0?!1:ln,nr=Se.showNullButton,Kn=nr===void 0?!1:nr,bn=Se.hidetoolBar,xr=bn===void 0?!1:bn,Er=Se.fullScreen,ar=Er===void 0?!1:Er,dr=Se.onBlur,Or=Se.onCMBeforeChange,Kr=Se.onFullScreen,ia=Se.className,hn=ia===void 0?"":ia,or=Se.disablePaste,ua=or===void 0?!1:or,ga=Se.placeholder,Zr=ga===void 0?"":ga,ra=Se.values,te=ra===void 0?"":ra,W=Object(i.useState)(null),G=Object(P.a)(W,2),Q=G[0],ue=G[1],ee=Object(i.useState)(xt),qe=Object(P.a)(ee,2),nn=qe[0],On=qe[1],Yn=Object(i.useState)(Ut),un=Object(P.a)(Yn,2),rr=un[0],mn=un[1],sn=Object(i.useState)(ar),_n=Object(P.a)(sn,2),Nn=_n[0],sr=_n[1],Qn=Object(i.useState)(""),Zn=Object(P.a)(Qn,2),kn=Zn[0],vr=Zn[1],Hn=Object(i.useState)(0),ir=Object(P.a)(Hn,2),lr=ir[0],Ln=ir[1],Cr=Object(i.useState)(Ot),Lr=Object(P.a)(Cr,2),Tr=Lr[0],fr=Lr[1],ne=Object(i.useState)(!1),Re=Object(P.a)(ne,2),Xe=Re[0],Me=Re[1],lt=Object(i.useRef)(Object(xe.a)()),tt=Object(i.useRef)(!1),pt=Object(i.useRef)(),mt=Object(i.useRef)(),Dt=Object(i.useRef)(),it=Object(i.useRef)(),Jt=Object(i.useRef)(),Yt=function(){var wt=Object(R.a)(b.a.mark(function It(){var kt,Ct;return b.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Object(ie.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:lt.current}});case 2:Ct=Tn.sent,Ct!=null&&(kt=Ct.attachments)!==null&&kt!==void 0&&kt.length&&(console.log("cm:",Q,mt),Ct.attachments.map(function(Zt){Zt.content_type.indexOf("image")>-1?Q.replaceSelection(".concat(Zt.content_type,")")):Zt.content_type.indexOf("video")>-1?Q.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Zt.content_type.indexOf("pdf")>-1?Q.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Zt.id,"?type=").concat(Zt.content_type,'&disposition=inline" target="_blank">').concat(Zt.name,"</a>")):Q.replaceSelection("[".concat(Zt.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Zt.id,"?type=").concat(Zt.content_type,")"))}));case 4:case"end":return Tn.stop()}},It)}));return function(){return wt.apply(this,arguments)}}();Object(i.useEffect)(function(){On(te),Q==null||Q.setValue(te)},[te]),Object(i.useEffect)(function(){Kr==null||Kr(Nn)},[Nn]),Object(i.useEffect)(function(){if(mt.current){var wt=a.a.fromTextArea(mt.current,{mode:en,lineNumbers:!ft,lineWrapping:!0,value:xt,autoCloseTags:!0,autoCloseBrackets:!0});Fe&&wt.focus();function It(kt,Ct){if(ua){Ct.preventDefault();return}var bt=Ct.clipboardData;if(bt){var Tn=bt.types.toString(),Zt=bt.items;if(Tn==="Files"||bt.types.indexOf("Files")>-1){if(Ct.preventDefault(),en=="stex")return;try{var Sn,dn=Zt[1];((Sn=Zt[0])===null||Sn===void 0?void 0:Sn.kind)==="file"&&(dn=Zt[0]);var Vt=dn.getAsFile(),wn=Vt.name.split(".").pop();Qe(Vt,function(Gn){if(Gn.id){var yr,Wn,kr;(Vt==null||((yr=Vt.type)===null||yr===void 0)?void 0:yr.indexOf("image"))>-1?wt.replaceSelection(".concat(Gn.content_type,")")):(Vt==null||((Wn=Vt.type)===null||Wn===void 0)?void 0:Wn.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,'"></video>')):(Vt==null||((kr=Vt.type)===null||kr===void 0)?void 0:kr.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Vt.type,'&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):ae.includes(wn)?wt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,'?type=office&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):wt.replaceSelection("[".concat(Vt.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Gn.content_type,")"))}else(Gn==null?void 0:Gn.status)===401&&(document.location.href="/user/login")})}catch(Gn){S.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(kt,Ct){Dt.current.classList.remove("mouse-hover-md")}),wt.on("dragover",function(kt,Ct){Dt.current.classList.add("mouse-hover-md")}),wt.on("drop",function(kt,Ct){Dt.current.classList.add("mouse-hover-md");var bt;if(bt=Ct.dataTransfer.files,bt.length>0){Ct.preventDefault(),Ct.stopPropagation();for(var Tn=function(dn){var Vt=bt[dn],wn=Vt.name.split(".").pop();Qe(Vt,function(Gn){if(Gn.id){var yr,Wn,kr;(Vt==null||((yr=Vt.type)===null||yr===void 0)?void 0:yr.indexOf("image"))>-1?wt.replaceSelection(".concat(Gn.content_type,")")):(Vt==null||((Wn=Vt.type)===null||Wn===void 0)?void 0:Wn.indexOf("video"))>-1?wt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,'"></video>')):(Vt==null||((kr=Vt.type)===null||kr===void 0)?void 0:kr.indexOf("pdf"))>-1?wt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Vt.type,'&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):ae.includes(wn)?wt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,'?type=office&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):wt.replaceSelection("[".concat(Vt.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Gn.content_type,")"))}else(Gn==null?void 0:Gn.status)===401&&(document.location.href="/user/login")})},Zt=0;Zt<bt.length;Zt++)Tn(Zt)}}),ue(wt),function(){wt.off("paste",It)}}},[]);var At=Object(i.useCallback)(function(){if(Dt.current)try{}catch(wt){console.log(wt,"---- to set md editor body height")}},[Tr,Dt,Nn]);Object(i.useEffect)(function(){function wt(){var kt=new o.default(function(Ct){var bt=Object(I.a)(Ct),Tn;try{for(bt.s();!(Tn=bt.n()).done;){var Zt=Tn.value;(Zt.target.offsetHeight>0||Zt.target.offsetWidth>0)&&(At(),Q.setSize("100%","100%"),Q.refresh())}}catch(Sn){bt.e(Sn)}finally{bt.f()}});return kt.observe(mt.current.parentElement),kt}if(Q){var It=wt();return function(){It.unobserve(mt.current.parentElement)}}},[Q,At]),Object(i.useEffect)(function(){if(Q){for(var wt=[],It=function(){var Zt=Ct[kt];bt=Object(P.a)(Zt,2);var Sn=bt[0],dn=bt[1],Vt=Object(y.a)({},Sn,function(){qt(dn)});wt.push(Vt),Q.addKeyMap(Vt)},kt=0,Ct=Object.entries(le);kt<Ct.length;kt++){var bt;It()}return pt.current=setInterval(function(){tt.current&&Yt()},4e3),function(){clearInterval(pt.current);var Tn=Object(I.a)(wt),Zt;try{for(Tn.s();!(Zt=Tn.n()).done;){var Sn=Zt.value;Q.removeKeyMap(Sn)}}catch(dn){Tn.e(dn)}finally{Tn.f()}}}},[Q]),Object(i.useEffect)(function(){ar!==Nn&&sr(ar)},[ar]),Object(jt.a)(function(){if(!vn&&lr>0){var wt=new Date().getTime(),It=window.sessionStorage.getItem(dt);wt>=lr+Et&&(!It||It!==nn)&&(window.sessionStorage.setItem(dt,nn),Me(!0))}},Et),Object(i.useEffect)(function(){mn(Ut)},[Q,Ut]),Object(i.useEffect)(function(){Q&&(Fe&&Q.focus())},[Q,Fe]),Object(i.useEffect)(function(){if(rr&&Q){var wt=Q.getScrollerElement();function It(kt){var Ct=kt.target;if(Jt.current){var bt=Ct.scrollTop/Ct.scrollHeight;Jt.current.scrollTop=Jt.current.scrollHeight*bt}}return wt.addEventListener("scroll",It),function(){wt.removeEventListener("scroll",It)}}},[Q,rr]),Object(i.useEffect)(function(){if(Q&&Or){function wt(It,kt){Or(It,kt)}return Q.on("beforeChange",wt),function(){Q.off("beforeChange",wt)}}},[Q,Or]),Object(i.useEffect)(function(){if(Q&&dr){function wt(){dr(Q.getValue())}return Q.on("blur",wt),function(){Q.off("blur",wt)}}},[Q,dr]),Object(i.useEffect)(function(){if(Q){function wt(It){var kt=It.getValue();On(kt),Ln(new Date().getTime()),It.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qt&&Qt(kt)}return Q.on("change",wt),function(){Q.off("change",wt)}}},[Q,Qt]),Object(i.useEffect)(function(){Q&&(xt==null?(Q.setValue(""),On("")):xt!==Q.getValue()&&(Q.setValue(xt),On(xt),Q.setCursor(Q.lineCount(),0)))},[Q,xt]);var qt=Object(i.useCallback)(function(wt){var It=Q.getCursor(),kt=Q.getSelection(),Ct=kt.split(`
|
|
`);switch(wt){case"bold":return Q.replaceSelection("**"+kt+"**"),kt===""&&Q.setCursor(It.line,It.ch+2),Q.focus();case"italic":return Q.replaceSelection("*"+kt+"*"),kt===""&&Q.setCursor(It.line,It.ch+1),Q.focus();case"code":return Q.replaceSelection("`"+kt+"`"),kt===""&&Q.setCursor(It.line,It.ch+1),Q.focus();case"inline-latex":return Q.replaceSelection("`$$"+kt+"$$`"),kt===""&&Q.setCursor(It.line,It.ch+3),Q.focus();case"latex":return Q.replaceSelection("```latex\n"+kt+"\n```"),Q.setCursor(It.line+1,kt.length+1),Q.focus();case"line-break":return Q.replaceSelection(`<br/>
|
|
`),Q.focus();case"list-ul":return kt===""?Q.replaceSelection("- "+kt):Q.replaceSelection(Ct.map(function(bt){return bt===""?"":"- ".concat(bt)}).join(`
|
|
`)),Q.focus();case"list-ol":return kt===""?Q.replaceSelection("1. "+kt):Q.replaceSelection(Ct.map(function(bt,Tn){return bt===""?"":"".concat(Tn+1,". ").concat(bt)}).join(`
|
|
`)),Q.focus();case"add-null-ch":return kt===""&&Q.setCursor(It.line,It.ch+1),Q.replaceSelection(Ze),Q.focus();case"inster-template-1":return kt===""&&Q.setCursor(It.line,It.ch),Q.replaceSelection(ht),Q.focus();case"eraser":return Q.setValue(""),Q.focus();case"trigger-watch":return mn(!rr),Q.focus();case"trigger-full-screen":return sr(!Nn),Q.focus();case we:vr(we);return;case ot:vr(ot);return;case Ke:vr(Ke);return;case gt:vr(gt);return;default:throw new Error}},[Q,rr,Nn]),Je=Object(i.useCallback)(function(wt){vr("");switch(kn){case we:var It=wt.title,kt=wt.link;return Q.replaceSelection("[".concat(It,"](").concat(kt,")")),Q.focus();case ot:var Ct=wt.language,bt=wt.content;return Q.replaceSelection(["```"+Ct,bt,"```"].join(`
|
|
`)),Q.focus();case Ke:var Tn=wt.src,Zt=wt.alt;return Zt?Q.replaceSelection(".concat(Tn,' "').concat(Zt,'" )')):Q.replaceSelection("")),Q.focus();case gt:for(var Sn=wt.row,dn=wt.col,Vt=wt.align,wn=`
|
|
`,Gn=0;Gn<Sn;Gn++){for(var yr=[],Wn=[],kr=0;kr<dn;kr++)Gn===1&&Wn.push(He[Vt]),yr.push(" ");Gn===1&&(wn+="| ".concat(Wn.join(" | "),` |
|
|
`)),wn+="| ".concat(yr.join(dn===1?"":" | "),` |
|
|
`)}return Q.replaceSelection(wn+`
|
|
`),Q.focus();default:throw new Error}},[Q,kn]),tn=Object(i.useMemo)(function(){switch(kn){case we:return u.a.createElement($,{callback:Je,onCancel:Wt});case ot:return u.a.createElement(Z.b,{callback:Je,onCancel:Wt});case Ke:return u.a.createElement(ge,{callback:Je,onCancel:Wt});case gt:return u.a.createElement(ut,{callback:Je,onCancel:Wt});default:return null}},[kn]);function Wt(){vr("")}Object(i.useEffect)(function(){if(it.current){var wt=it.current,It=!1,kt=0;function Ct(Zt){It=!0,kt=Zt.pageY}function bt(){It=!1}function Tn(Zt){if(It){var Sn=Zt.pageY-kt;Sn<0&&(Sn=0),Sn>300&&(Sn=300);var dn=Ot+Sn+"px";fr(dn)}}return wt.addEventListener("mousedown",Ct),document.addEventListener("mousemove",Tn),document.addEventListener("mouseup",bt),function(){wt.removeEventListener("mousedown",Ct),document.removeEventListener("mousemove",Tn),document.removeEventListener("mouseup",bt)}}},[Q,it]),Object(i.useEffect)(function(){fr(Ot)},[Ot]);var yn=Ne(vt),Rn=Ne(Tr),Pn={width:yn,height:Rn},Mt=Object(i.useMemo)(function(){if(lr){var wt=new Date(lr),It=wt.getHours(),kt=wt.getMinutes(),Ct=wt.getSeconds();return It=It<10?"0"+It:It,kt=kt<10?"0"+kt:kt,Ct=Ct<10?"0"+Ct:Ct,"".concat(It,":").concat(kt,":").concat(Ct)}return 0},[lr]);function Ht(){window.sessionStorage.removeItem(dt),Me(!1),Ln(0)}function Cn(){Me(!1),Ln(0),Q.setValue(window.sessionStorage.getItem(dt))}function En(wt,It){var kt=Q.getValue();kt=kt.replace(wt,It),On(kt),Q==null||Q.setValue(kt)}return u.a.createElement(i.Fragment,null,u.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},u.a.createElement("div",{className:"markdown-editor-container ".concat(hn," ").concat(rr?"on-preview":""," ").concat(ft?"mini":""," ").concat(Nn?"full-screen":""),style:Pn},u.a.createElement(v,{insertTemp:_t,watch:rr,fullScreen:Nn,showNullButton:Kn,onActionCallback:qt,hidetoolBar:xr,uuid:lt.current,setOpenPhones:function(){tt.current=!0}}),u.a.createElement("div",{className:"markdown-editor-body"},u.a.createElement("div",{className:"codemirror-container"},u.a.createElement("textarea",{ref:mt,placeholder:Zr})),rr?u.a.createElement("div",{ref:Jt,className:"preview-container"},en==="stex"&&u.a.createElement(k,{value:nn}),en!=="stex"&&u.a.createElement(C.a,{edit:!0,value:nn,replaces:En})):null))),zt?u.a.createElement("a",{ref:it,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:Wt,footer:null,className:"markdown-popup-form"},tn):null))}},P47w:function(We,J,L){var Y=L("hydK"),B=Y.createElement,I=L("IMiH"),F=L("mFDi"),S=L("Fofx"),R=L("6GrX"),P=L("pzxd"),y=L("dqUG"),t=I.CMD,b=Array.prototype.join,i="none",u=Math.round,f=Math.sin,a=Math.cos,o=Math.PI,c=Math.PI*2,l=180/o,n=1e-4;function s(K){return u(K*1e4)/1e4}function d(K){return K<n&&K>-n}function E(K,$){var Z=$?K.textFill:K.fill;return Z!=null&&Z!==i}function A(K,$){var Z=$?K.textStroke:K.stroke;return Z!=null&&Z!==i}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 g(K,$,Z,ve){if(E($,Z)){var oe=Z?$.textFill:$.fill;oe=oe==="transparent"?i:oe,k(K,"fill",oe),k(K,"fill-opacity",$.fillOpacity!=null?$.fillOpacity*$.opacity:$.opacity)}else k(K,"fill",i);if(A($,Z)){var fe=Z?$.textStroke:$.stroke;fe=fe==="transparent"?i:fe,k(K,"stroke",fe);var ye=Z?$.textStrokeWidth:$.lineWidth,Pe=!Z&&$.strokeNoScale?ve.getLineScale():1;k(K,"stroke-width",ye/Pe),k(K,"paint-order",Z?"stroke":"fill"),k(K,"stroke-opacity",$.strokeOpacity!=null?$.strokeOpacity:$.opacity);var ge=$.lineDash;ge?(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",i)}function h(K){for(var $=[],Z=K.data,ve=K.len(),oe=0;oe<ve;){var fe=Z[oe++],ye="",Pe=0;switch(fe){case t.M:ye="M",Pe=2;break;case t.L:ye="L",Pe=2;break;case t.Q:ye="Q",Pe=4;break;case t.C:ye="C",Pe=6;break;case t.A:var ge=Z[oe++],de=Z[oe++],Qe=Z[oe++],St=Z[oe++],Ee=Z[oe++],De=Z[oe++],rt=Z[oe++],Be=Z[oe++],ke=Math.abs(De),ut=d(ke-c)||(Be?De>=c:-De>=c),ie=De>0?De%c:De%c+c,xe=!1;ut?xe=!0:d(ke)?xe=!1:xe=ie>=o===!!Be;var we=s(ge+Qe*a(Ee)),Ke=s(de+St*f(Ee));ut&&(Be?De=c-1e-4:De=-c+1e-4,xe=!0,oe===9&&$.push("M",we,Ke));var ot=s(ge+Qe*a(Ee+De)),gt=s(de+St*f(Ee+De));$.push("A",s(Qe),s(St),u(rt*l),+xe,+Be,ot,gt);break;case t.Z:ye="Z";break;case t.R:var ot=s(Z[oe++]),gt=s(Z[oe++]),Nt=s(Z[oe++]),He=s(Z[oe++]);$.push("M",ot,gt,"L",ot+Nt,gt,"L",ot+Nt,gt+He,"L",ot,gt+He,"L",ot,gt);break}ye&&$.push(ye);for(var jt=0;jt<Pe;jt++)$.push(s(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 ve=K.path;if(K.__dirtyPath){ve.beginPath(),ve.subPixelOptimize=!1,K.buildPath(ve,K.shape),K.__dirtyPath=!1;var oe=h(ve);oe.indexOf("NaN")<0&&k(Z,"d",oe)}g(Z,$,!1,K),C(Z,K.transform),$.text!=null?T(K,K.getBoundingRect()):V(K)};var m={};m.brush=function(K){var $=K.style,Z=$.image;if(Z instanceof HTMLImageElement){var ve=Z.src;Z=ve}if(!Z)return;var oe=$.x||0,fe=$.y||0,ye=$.width,Pe=$.height,ge=K.__svgEl;ge||(ge=B("image"),K.__svgEl=ge),Z!==K.__imageSrc&&(w(ge,"href",Z),K.__imageSrc=Z),k(ge,"width",ye),k(ge,"height",Pe),k(ge,"x",oe),k(ge,"y",fe),C(ge,K.transform),$.text!=null?T(K,K.getBoundingRect()):V(K)};var _={},x=new F,v={},j=[],U={left:"start",right:"end",center:"middle",middle:"middle"},T=function(K,$){var Z=K.style,ve=K.transform,oe=K instanceof y||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&&ve&&(x.copy($),x.applyTransform(ve),$=x);var ye=K.__textSvgEl;ye||(ye=B("text"),K.__textSvgEl=ye);var Pe=ye.style,ge=Z.font||R.DEFAULT_FONT,de=ye.__computedFont;ge!==ye.__styleFont&&(Pe.font=ye.__styleFont=ge,de=ye.__computedFont=Pe.font);var Qe=Z.textPadding,St=Z.textLineHeight,Ee=K.__textCotentBlock;(!Ee||K.__dirtyText)&&(Ee=K.__textCotentBlock=R.parsePlainText(fe,de,Qe,St,Z.truncate));var De=Ee.outerHeight,rt=Ee.lineHeight;P.getBoxPosition(v,K,Z,$);var Be=v.baseX,ke=v.baseY,ut=v.textAlign||"left",ie=v.textVerticalAlign;z(ye,oe,ve,Z,$,Be,ke);var xe=R.adjustTextY(ke,De,ie),we=Be,Ke=xe;Qe&&(we=H(Be,ut,Qe),Ke+=Qe[0]),Ke+=rt/2,g(ye,Z,!0,K);var ot=Ee.canCacheByTextString,gt=K.__tspanList||(K.__tspanList=[]),Nt=gt.length;if(ot&&K.__canCacheByTextString&&K.__text===fe){if(K.__dirtyText&&Nt)for(var He=0;He<Nt;++He)M(gt[He],ut,we,Ke+He*rt)}else{K.__text=fe,K.__canCacheByTextString=ot;for(var jt=Ee.lines,$t=jt.length,He=0;He<$t;He++){var Ie=gt[He],Ae=jt[He];Ie?Ie.__zrText!==Ae&&(Ie.innerHTML="",Ie.appendChild(document.createTextNode(Ae))):(Ie=gt[He]=B("tspan"),ye.appendChild(Ie),Ie.appendChild(document.createTextNode(Ae))),M(Ie,ut,we,Ke+He*rt)}if(Nt>$t){for(;He<Nt;He++)ye.removeChild(gt[He]);gt.length=$t}}};function z(K,$,Z,ve,oe,fe,ye){S.identity(j),$&&Z&&S.copy(j,Z);var Pe=ve.textRotation;if(oe&&Pe){var ge=ve.textOrigin;ge==="center"?(fe=oe.width/2+oe.x,ye=oe.height/2+oe.y):ge&&(fe=ge[0]+oe.x,ye=ge[1]+oe.y),j[4]-=fe,j[5]-=ye,S.rotate(j,j,Pe),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,ve){k(K,"dominant-baseline","middle"),k(K,"text-anchor",U[$]),k(K,"x",Z),k(K,"y",ve)}function V(K){K&&K.__textSvgEl&&(K.__textSvgEl.parentNode&&K.__textSvgEl.parentNode.removeChild(K.__textSvgEl),K.__textSvgEl=null,K.__tspanList=[],K.__text=null)}_.drawRectText=T,_.brush=function(K){var $=K.style;$.text!=null?T(K,!1):V(K)},J.path=p,J.image=m,J.text=_},P4Qj:function(We,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(y){return y&&y.__esModule?y:{default:y}}var S={},R=function(t){var b=t.getAttribute(I.SizeSensorId);if(b&&S[b])return S[b];var i=(0,Y.default)();t.setAttribute(I.SizeSensorId,i);var u=(0,B.createSensor)(t);return S[i]=u,u};J.getSensor=R;var P=function(t){var b=t.element.getAttribute(I.SizeSensorId);t.element.removeAttribute(I.SizeSensorId),t.destroy(),b&&S[b]&&delete S[b]};J.removeSensor=P},QBsz:function(We,J){var L=typeof Float32Array=="undefined"?Array:Float32Array;function Y(g,h){var p=new L(2);return g==null&&(g=0),h==null&&(h=0),p[0]=g,p[1]=h,p}function B(g,h){return g[0]=h[0],g[1]=h[1],g}function I(g){var h=new L(2);return h[0]=g[0],h[1]=g[1],h}function F(g,h,p){return g[0]=h,g[1]=p,g}function S(g,h,p){return g[0]=h[0]+p[0],g[1]=h[1]+p[1],g}function R(g,h,p,m){return g[0]=h[0]+p[0]*m,g[1]=h[1]+p[1]*m,g}function P(g,h,p){return g[0]=h[0]-p[0],g[1]=h[1]-p[1],g}function y(g){return Math.sqrt(b(g))}var t=y;function b(g){return g[0]*g[0]+g[1]*g[1]}var i=b;function u(g,h,p){return g[0]=h[0]*p[0],g[1]=h[1]*p[1],g}function f(g,h,p){return g[0]=h[0]/p[0],g[1]=h[1]/p[1],g}function a(g,h){return g[0]*h[0]+g[1]*h[1]}function o(g,h,p){return g[0]=h[0]*p,g[1]=h[1]*p,g}function c(g,h){var p=y(h);return p===0?(g[0]=0,g[1]=0):(g[0]=h[0]/p,g[1]=h[1]/p),g}function l(g,h){return Math.sqrt((g[0]-h[0])*(g[0]-h[0])+(g[1]-h[1])*(g[1]-h[1]))}var n=l;function s(g,h){return(g[0]-h[0])*(g[0]-h[0])+(g[1]-h[1])*(g[1]-h[1])}var d=s;function E(g,h){return g[0]=-h[0],g[1]=-h[1],g}function A(g,h,p,m){return g[0]=h[0]+m*(p[0]-h[0]),g[1]=h[1]+m*(p[1]-h[1]),g}function C(g,h,p){var m=h[0],_=h[1];return g[0]=p[0]*m+p[2]*_+p[4],g[1]=p[1]*m+p[3]*_+p[5],g}function k(g,h,p){return g[0]=Math.min(h[0],p[0]),g[1]=Math.min(h[1],p[1]),g}function w(g,h,p){return g[0]=Math.max(h[0],p[0]),g[1]=Math.max(h[1],p[1]),g}J.create=Y,J.copy=B,J.clone=I,J.set=F,J.add=S,J.scaleAndAdd=R,J.sub=P,J.len=y,J.length=t,J.lenSquare=b,J.lengthSquare=i,J.mul=u,J.div=f,J.dot=a,J.scale=o,J.normalize=c,J.distance=l,J.dist=n,J.distanceSquare=s,J.distSquare=d,J.negate=E,J.lerp=A,J.applyTransform=C,J.min=k,J.max=w},"QO+J":function(We,J,L){"use strict";Object.defineProperty(J,"__esModule",{value:!0}),J.createSensor=void 0;var Y=I(L("NohK")),B=L("24YM");function I(S){return S&&S.__esModule?S:{default:S}}var F=function(R){var P=void 0,y=[],t=function(){getComputedStyle(R).position==="static"&&(R.style.position="relative");var o=document.createElement("object");return o.onload=function(){o.contentDocument.defaultView.addEventListener("resize",b),b()},o.style.display="block",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.height="100%",o.style.width="100%",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.opacity="0",o.setAttribute("class",B.SensorClassName),o.setAttribute("tabindex",B.SensorTabIndex),o.type="text/html",R.appendChild(o),o.data="about:blank",o},b=(0,Y.default)(function(){y.forEach(function(a){a(R)})}),i=function(o){P||(P=t()),y.indexOf(o)===-1&&y.push(o)},u=function(){P&&P.parentNode&&(P.contentDocument&&P.contentDocument.defaultView.removeEventListener("resize",b),P.parentNode.removeChild(P),P=void 0,y=[])},f=function(o){var c=y.indexOf(o);c!==-1&&y.splice(c,1),y.length===0&&P&&u()};return{element:R,bind:i,destroy:u,unbind:f}};J.createSensor=F},Qe9p:function(We,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 S(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)==="%"?S(parseFloat(h)/100):S(parseFloat(h))}function y(h,p,m){return m<0?m+=1:m>1&&(m-=1),m*6<1?h+(p-h)*m*6:m*2<1?p:m*3<2?h+(p-h)*(2/3-m)*6:h}function t(h,p,m){return h+(p-h)*m}function b(h,p,m,_,x){return h[0]=p,h[1]=m,h[2]=_,h[3]=x,h}function i(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&&i(f,p),f=u.put(h,f||p.slice())}function o(h,p){if(!h)return;p=p||[];var m=u.get(h);if(m)return i(p,m);h=h+"";var _=h.replace(/ /g,"").toLowerCase();if(_ in B)return i(p,B[_]),a(h,p),p;if(_.charAt(0)==="#"){if(_.length===4){var x=parseInt(_.substr(1),16);if(!(x>=0&&x<=4095)){b(p,0,0,0,1);return}return b(p,(x&3840)>>4|(x&3840)>>8,x&240|(x&240)>>4,x&15|(x&15)<<4,1),a(h,p),p}else if(_.length===7){var x=parseInt(_.substr(1),16);if(!(x>=0&&x<=16777215)){b(p,0,0,0,1);return}return b(p,(x&16711680)>>16,(x&65280)>>8,x&255,1),a(h,p),p}return}var v=_.indexOf("("),j=_.indexOf(")");if(v!==-1&&j+1===_.length){var U=_.substr(0,v),T=_.substr(v+1,j-(v+1)).split(","),z=1;switch(U){case"rgba":if(T.length!==4){b(p,0,0,0,1);return}z=P(T.pop());case"rgb":if(T.length!==3){b(p,0,0,0,1);return}return b(p,R(T[0]),R(T[1]),R(T[2]),z),a(h,p),p;case"hsla":if(T.length!==4){b(p,0,0,0,1);return}return T[3]=P(T[3]),c(T,p),a(h,p),p;case"hsl":if(T.length!==3){b(p,0,0,0,1);return}return c(T,p),a(h,p),p;default:return}}b(p,0,0,0,1);return}function c(h,p){var m=(parseFloat(h[0])%360+360)%360/360,_=P(h[1]),x=P(h[2]),v=x<=.5?x*(_+1):x+_-x*_,j=x*2-v;return p=p||[],b(p,I(y(j,v,m+1/3)*255),I(y(j,v,m)*255),I(y(j,v,m-1/3)*255),1),h.length===4&&(p[3]=h[3]),p}function l(h){if(!h)return;var p=h[0]/255,m=h[1]/255,_=h[2]/255,x=Math.min(p,m,_),v=Math.max(p,m,_),j=v-x,U=(v+x)/2,T,z;if(j===0)T=0,z=0;else{U<.5?z=j/(v+x):z=j/(2-v-x);var H=((v-p)/6+j/2)/j,M=((v-m)/6+j/2)/j,V=((v-_)/6+j/2)/j;p===v?T=V-M:m===v?T=1/3+H-V:_===v&&(T=2/3+M-H),T<0&&(T+=1),T>1&&(T-=1)}var K=[T*360,z,U];return h[3]!=null&&K.push(h[3]),K}function n(h,p){var m=o(h);if(m){for(var _=0;_<3;_++)p<0?m[_]=m[_]*(1-p)|0:m[_]=(255-m[_])*p+m[_]|0,m[_]>255?m[_]=255:h[_]<0&&(m[_]=0);return g(m,m.length===4?"rgba":"rgb")}}function s(h){var p=o(h);if(p)return((1<<24)+(p[0]<<16)+(p[1]<<8)+ +p[2]).toString(16).slice(1)}function d(h,p,m){if(!(p&&p.length)||!(h>=0&&h<=1))return;m=m||[];var _=h*(p.length-1),x=Math.floor(_),v=Math.ceil(_),j=p[x],U=p[v],T=_-x;return m[0]=I(t(j[0],U[0],T)),m[1]=I(t(j[1],U[1],T)),m[2]=I(t(j[2],U[2],T)),m[3]=S(t(j[3],U[3],T)),m}var E=d;function A(h,p,m){if(!(p&&p.length)||!(h>=0&&h<=1))return;var _=h*(p.length-1),x=Math.floor(_),v=Math.ceil(_),j=o(p[x]),U=o(p[v]),T=_-x,z=g([I(t(j[0],U[0],T)),I(t(j[1],U[1],T)),I(t(j[2],U[2],T)),S(t(j[3],U[3],T))],"rgba");return m?{color:z,leftIndex:x,rightIndex:v,value:_}:z}var C=A;function k(h,p,m,_){if(h=o(h),h)return h=l(h),p!=null&&(h[0]=F(p)),m!=null&&(h[1]=P(m)),_!=null&&(h[2]=P(_)),g(c(h),"rgba")}function w(h,p){if(h=o(h),h&&p!=null)return h[3]=S(p),g(h,"rgba")}function g(h,p){if(!h||!h.length)return;var m=h[0]+","+h[1]+","+h[2];return(p==="rgba"||p==="hsva"||p==="hsla")&&(m+=","+h[3]),p+"("+m+")"}J.parse=o,J.lift=n,J.toHex=s,J.fastLerp=d,J.fastMapToColor=E,J.lerp=A,J.mapToColor=C,J.modifyHSL=k,J.modifyAlpha=w,J.stringify=g},QuXc:function(We,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;We.exports=Y},R5GN:function(We,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("g9YV"),F=L("wCAj"),S=L("5NDa"),R=L("5rEg"),P=L("14J3"),y=L("BMrR"),t=L("iQDF"),b=L("+eQT"),i=L("miYZ"),u=L("tsqr"),f=L("jrin"),a=L("oBTY"),o=L("k1fw"),c=L("9og8"),l=L("y8nQ"),n=L("Vl3Y"),s=L("tJVT"),d=L("WmNS"),E=L.n(d),A=L("q1tI"),C=L.n(A),k=L("wd/R"),w=L.n(k),g=L("ErOA"),h=L("1vsH"),p=L("Ty5D"),m=L("9kvl"),_=L("eozf"),x=L("oUNq"),v=L("xKgJ"),j=function(T){var z=T.classroomList,H=T.dispatch,M=T.courseEndTime,V=Object(p.i)(),K=n.a.useForm(),$=Object(s.a)(K,1),Z=$[0],ve=Object(A.useState)(1),oe=Object(s.a)(ve,2),fe=oe[0],ye=oe[1],Pe=Object(A.useState)([]),ge=Object(s.a)(Pe,2),de=ge[0],Qe=ge[1],St=Object(A.useState)(0),Ee=Object(s.a)(St,2),De=Ee[0],rt=Ee[1],Be=Object(A.useState)(2e4),ke=Object(s.a)(Be,2),ut=ke[0],ie=ke[1],xe=Object(A.useState)(!0),we=Object(s.a)(xe,2),Ke=we[0],ot=we[1],gt=Object(A.useState)([]),Nt=Object(s.a)(gt,2),He=Nt[0],jt=Nt[1],$t=Object(A.useState)(),Ie=Object(s.a)($t,2),Ae=Ie[0],ct=Ie[1];Object(A.useEffect)(function(){z.actionTabs.key==="\u7ACB\u5373\u622A\u6B62"?Et():(jt([]),Qe([]))},[z.actionTabs.key]);var Et=function(){var ae=Object(c.a)(E.a.mark(function le(he){var _e,Se,ze;return E.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return ot(!0),Qt.next=3,Object(x.D)(Object(o.a)(Object(o.a)({},V),{},{page:he||fe,limit:ut,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(on,vt){on.key=on.id}),_e&&(Qe([].concat(Object(a.a)(de),Object(a.a)(_e==null?void 0:_e.course_groups))),rt(_e==null?void 0:_e.course_groups_count),ct(_e==null?void 0:_e.course_groups),ot(!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(on){return String(on.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)},ht=function(){var ae=Object(c.a)(E.a.mark(function le(){var he,_e;return E.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(he=Object(o.a)({},Z.getFieldsValue()),!(Ae!=null&&Ae.length&&!(He!=null&&He.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(g.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:(He==null?void 0:He.length)>0?He:[],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(v.c)()?z.actionTabs.detail?(H({type:"classroomList/setActionTabs",payload:{}}),H({type:"shixunHomeworks/getWorkList",payload:Object(o.a)({},V)}),H({type:"shixunHomeworks/getWorkSetting",payload:Object(o.a)({},V)})):H({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(o.a)(Object(o.a)({},z.actionTabs.params),{},{type:4})}):H({type:"classroomList/getClassroomShixunsList",payload:Object(o.a)({},z.actionTabs.params)}));case 8:case"end":return ze.stop()}},le)}));return function(){return ae.apply(this,arguments)}}(),Ne=function(){ye(1),Qe([])},Te=De>fe*ut,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:ht,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(y.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(y.a,null,C.a.createElement("span",{className:"mr5"},"\u9009\u62E9\u73ED\u7EA7:"),C.a.createElement(R.a.Search,{style:{width:"300px"},onChange:function(le){Qe(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){jt(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){jt(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(m.a)(function(U){var T=U.classroomList;return{classroomList:T}})(j)},RDYZ:function(We,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,S){if(this._initialized||(this._startTime=F+this._delay,this._initialized=!0),this._paused){this._pausedTime+=S;return}var R=(F-this._startTime-this._pausedTime)/this._life;if(R<0)return;R=Math.min(R,1);var P=this.easing,y=typeof P=="string"?Y[P]:P,t=typeof y=="function"?y(R):R;return this.fire("frame",t),R===1?this.loop?(this.restart(F),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(F){var S=(F-this._startTime-this._pausedTime)%this._life;this._startTime=F-S+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(F,S){F="on"+F,this[F]&&this[F](this._target,S)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var I=B;We.exports=I},RXMa:function(We,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 S=F.cx,R=F.cy,P=Math.PI*2;I.moveTo(S+F.r,R),I.arc(S,R,F.r,0,P,!1),I.moveTo(S+F.r0,R),I.arc(S,R,F.r0,0,P,!0)}});We.exports=B},RotF:function(We,J,L){We.exports=L("LSTS")},"SA+Z":function(We,J,L){var Y=L("wTVA"),B=L("EbDI"),I=L("ZhPi"),F=L("wkBT");function S(R){return Y(R)||B(R)||I(R)||F()}We.exports=S,We.exports.__esModule=!0,We.exports.default=We.exports},SJMd:function(We,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,S;window.PR_SHOULD_USE_CONTINUATION=!0;var R,P;(function(){var y=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"],i=[b,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],u=[i,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],f=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[i,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",c=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",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"],s=[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"],d=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[u,a,f,c,l,n,s,d],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",g="typ",h="lit",p="pun",m="pln",_="tag",x="dec",v="src",j="atn",U="atv",T="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(Be){for(var ke=0,ut=!1,ie=!1,xe=0,we=Be.length;xe<we;++xe){var Ke=Be[xe];if(Ke.ignoreCase)ie=!0;else if(/[a-z]/i.test(Ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ut=!0,ie=!1;break}}var ot={b:8,t:9,n:10,v:11,f:12,r:13};function gt(Ie){var Ae=Ie.charCodeAt(0);if(Ae!==92)return Ae;var ct=Ie.charAt(1);return Ae=ot[ct],Ae||("0"<=ct&&ct<="7"?parseInt(Ie.substring(1),8):ct==="u"||ct==="x"?parseInt(Ie.substring(2),16):Ie.charCodeAt(1))}function Nt(Ie){if(Ie<32)return(Ie<16?"\\x0":"\\x")+Ie.toString(16);var Ae=String.fromCharCode(Ie);return Ae==="\\"||Ae==="-"||Ae==="]"||Ae==="^"?"\\"+Ae:Ae}function He(Ie){var Ae=Ie.substring(1,Ie.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),ct=[],Et=Ae[0]==="^",Ze=["["];Et&&Ze.push("^");for(var ht=Et?1:0,Ne=Ae.length;ht<Ne;++ht){var Te=Ae[ht];if(/\\[bdsw]/i.test(Te))Ze.push(Te);else{var Oe=gt(Te),ae;ht+2<Ne&&Ae[ht+1]==="-"?(ae=gt(Ae[ht+2]),ht+=2):ae=Oe,ct.push([Oe,ae]),ae<65||Oe>122||(ae<65||Oe>90||ct.push([Math.max(65,Oe)|32,Math.min(ae,90)|32]),ae<97||Oe>122||ct.push([Math.max(97,Oe)&~32,Math.min(ae,122)&~32]))}}ct.sort(function(Se,ze){return Se[0]-ze[0]||ze[1]-Se[1]});for(var le=[],he=[],ht=0;ht<ct.length;++ht){var _e=ct[ht];_e[0]<=he[1]+1?he[1]=Math.max(he[1],_e[1]):le.push(he=_e)}for(var ht=0;ht<le.length;++ht){var _e=le[ht];Ze.push(Nt(_e[0])),_e[1]>_e[0]&&(_e[1]+1>_e[0]&&Ze.push("-"),Ze.push(Nt(_e[1])))}return Ze.push("]"),Ze.join("")}function jt(Ie){for(var Ae=Ie.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),ct=Ae.length,Et=[],Ze=0,ht=0;Ze<ct;++Ze){var Ne=Ae[Ze];if(Ne==="(")++ht;else if(Ne.charAt(0)==="\\"){var Te=+Ne.substring(1);Te&&(Te<=ht?Et[Te]=-1:Ae[Ze]=Nt(Te))}}for(var Ze=1;Ze<Et.length;++Ze)Et[Ze]===-1&&(Et[Ze]=++ke);for(var Ze=0,ht=0;Ze<ct;++Ze){var Ne=Ae[Ze];if(Ne==="(")++ht,Et[ht]||(Ae[Ze]="(?:");else if(Ne.charAt(0)==="\\"){var Te=+Ne.substring(1);Te&&Te<=ht&&(Ae[Ze]="\\"+Et[Te])}}for(var Ze=0;Ze<ct;++Ze)Ae[Ze]==="^"&&Ae[Ze+1]!=="^"&&(Ae[Ze]="");if(Ie.ignoreCase&&ut)for(var Ze=0;Ze<ct;++Ze){var Ne=Ae[Ze],Oe=Ne.charAt(0);Ne.length>=2&&Oe==="["?Ae[Ze]=He(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 $t=[],xe=0,we=Be.length;xe<we;++xe){var Ke=Be[xe];if(Ke.global||Ke.multiline)throw new Error(""+Ke);$t.push("(?:"+jt(Ke)+")")}return new RegExp($t.join("|"),ie?"gi":"g")}function M(Be,ke){var ut=/(?:^|\s)nocode(?:\s|$)/,ie=[],xe=0,we=[],Ke=0;function ot(gt){var Nt=gt.nodeType;if(Nt==1){if(ut.test(gt.className))return;for(var He=gt.firstChild;He;He=He.nextSibling)ot(He);var jt=gt.nodeName.toLowerCase();(jt==="br"||jt==="li")&&(ie[Ke]=`
|
|
`,we[Ke<<1]=xe++,we[Ke++<<1|1]=gt)}else if(Nt==3||Nt==4){var $t=gt.nodeValue;$t.length&&(ke?$t=$t.replace(/\r\n?/g,`
|
|
`):$t=$t.replace(/[ \t\r\n]+/g," "),ie[Ke]=$t,we[Ke<<1]=xe,xe+=$t.length,we[Ke++<<1|1]=gt)}}return ot(Be),{sourceCode:ie.join("").replace(/\n$/,""),spans:we}}function V(Be,ke,ut,ie,xe){if(!ut)return;var we={sourceNode:Be,pre:1,langExtension:null,numberLines:null,sourceCode:ut,spans:null,basePos:ke,decorations:null};ie(we),xe.push.apply(xe,we.decorations)}var K=/\S/;function $(Be){for(var ke=void 0,ut=Be.firstChild;ut;ut=ut.nextSibling){var ie=ut.nodeType;ke=ie===1?ke?Be:ut:ie===3&&K.test(ut.nodeValue)?Be:ke}return ke===Be?void 0:ke}function Z(Be,ke){var ut={},ie;(function(){for(var Ke=Be.concat(ke),ot=[],gt={},Nt=0,He=Ke.length;Nt<He;++Nt){var jt=Ke[Nt],$t=jt[3];if($t)for(var Ie=$t.length;--Ie>=0;)ut[$t.charAt(Ie)]=jt;var Ae=jt[1],ct=""+Ae;gt.hasOwnProperty(ct)||(ot.push(Ae),gt[ct]=null)}ot.push(/[\0-\uffff]/),ie=H(ot)})();var xe=ke.length,we=function(Ke){for(var ot=Ke.sourceCode,gt=Ke.basePos,Nt=Ke.sourceNode,He=[gt,m],jt=0,$t=ot.match(ie)||[],Ie={},Ae=0,ct=$t.length;Ae<ct;++Ae){var Et=$t[Ae],Ze=Ie[Et],ht=void 0,Ne;if(typeof Ze=="string")Ne=!1;else{var Te=ut[Et.charAt(0)];if(Te)ht=Et.match(Te[1]),Ze=Te[0];else{for(var Oe=0;Oe<xe;++Oe)if(Te=ke[Oe],ht=Et.match(Te[1]),ht){Ze=Te[0];break}ht||(Ze=m)}Ne=Ze.length>=5&&Ze.substring(0,5)==="lang-",Ne&&!(ht&&typeof ht[1]=="string")&&(Ne=!1,Ze=v),Ne||(Ie[Et]=Ze)}var ae=jt;if(jt+=Et.length,!Ne)He.push(gt+ae,Ze);else{var le=ht[1],he=Et.indexOf(le),_e=he+le.length;ht[2]&&(_e=Et.length-ht[2].length,he=_e-le.length);var Se=Ze.substring(5);V(Nt,gt+ae,Et.substring(0,he),we,He),V(Nt,gt+ae+he,le,de(Se,le),He),V(Nt,gt+ae+_e,Et.substring(_e),we,He)}}Ke.decorations=He};return we}function ve(Be){var ke=[],ut=[];Be.tripleQuotedStrings?ke.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Be.multiLineStrings?ke.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ke.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Be.verbatimStrings&&ut.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ie=Be.hashComments;ie&&(Be.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,"#"]),ut.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ke.push([w,/^#[^\r\n]*/,null,"#"])),Be.cStyleComments&&(ut.push([w,/^\/\/[^\r\n]*/,null]),ut.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=Be.regexLiterals;if(xe){var we=xe>1?"":`
|
|
\r`,Ke=we?".":"[\\S\\s]",ot="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Ke+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Ke+")*(?:\\x5D|$))+/";ut.push(["lang-regex",RegExp("^"+z+"("+ot+")")])}var gt=Be.types;gt&&ut.push([g,gt]);var Nt=(""+Be.keywords).replace(/^ | $/g,"");Nt.length&&ut.push([k,new RegExp("^(?:"+Nt.replace(/[\s,]+/g,"|")+")\\b"),null]),ke.push([m,/^\s+/,null,` \r
|
|
\xA0`]);var He="^.[^\\s\\w.$@'\"`/\\\\]*";return Be.regexLiterals&&(He+="(?!s*/)"),ut.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[m,/^[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"],[m,/^\\[\s\S]?/,null],[p,new RegExp(He),null]),Z(ke,ut)}var oe=ve({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(Be,ke,ut){for(var ie=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,we=Be.ownerDocument,Ke=we.createElement("li");Be.firstChild;)Ke.appendChild(Be.firstChild);var ot=[Ke];function gt(Ae){var ct=Ae.nodeType;if(ct==1&&!ie.test(Ae.className))if(Ae.nodeName==="br")Nt(Ae),Ae.parentNode&&Ae.parentNode.removeChild(Ae);else for(var Et=Ae.firstChild;Et;Et=Et.nextSibling)gt(Et);else if((ct==3||ct==4)&&ut){var Ze=Ae.nodeValue,ht=Ze.match(xe);if(ht){var Ne=Ze.substring(0,ht.index);Ae.nodeValue=Ne;var Te=Ze.substring(ht.index+ht[0].length);if(Te){var Oe=Ae.parentNode;Oe.insertBefore(we.createTextNode(Te),Ae.nextSibling)}Nt(Ae),Ne||Ae.parentNode.removeChild(Ae)}}}function Nt(Ae){for(;!Ae.nextSibling;)if(Ae=Ae.parentNode,!Ae)return;function ct(ht,Ne){var Te=Ne?ht.cloneNode(!1):ht,Oe=ht.parentNode;if(Oe){var ae=ct(Oe,1),le=ht.nextSibling;ae.appendChild(Te);for(var he=le;he;he=le)le=he.nextSibling,ae.appendChild(he)}return Te}for(var Et=ct(Ae.nextSibling,0),Ze;(Ze=Et.parentNode)&&Ze.nodeType===1;)Et=Ze;ot.push(Et)}for(var He=0;He<ot.length;++He)gt(ot[He]);ke===(ke|0)&&ot[0].setAttribute("value",ke);var jt=we.createElement("ol");jt.className="linenums";for(var $t=Math.max(0,ke-1|0)||0,He=0,Ie=ot.length;He<Ie;++He)Ke=ot[He],Ke.className="L"+(He+$t)%10,Ke.firstChild||Ke.appendChild(we.createTextNode("\xA0")),jt.appendChild(Ke);Be.appendChild(jt)}function ye(Be){var ke=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ke=ke&&+ke[1]<=8;var ut=/\n/g,ie=Be.sourceCode,xe=ie.length,we=0,Ke=Be.spans,ot=Ke.length,gt=0,Nt=Be.decorations,He=Nt.length,jt=0;Nt[He]=xe;var $t,Ie;for(Ie=$t=0;Ie<He;)Nt[Ie]!==Nt[Ie+2]?(Nt[$t++]=Nt[Ie++],Nt[$t++]=Nt[Ie++]):Ie+=2;for(He=$t,Ie=$t=0;Ie<He;){for(var Ae=Nt[Ie],ct=Nt[Ie+1],Et=Ie+2;Et+2<=He&&Nt[Et+1]===ct;)Et+=2;Nt[$t++]=Ae,Nt[$t++]=ct,Ie=Et}He=Nt.length=$t;var Ze=Be.sourceNode,ht="";Ze&&(ht=Ze.style.display,Ze.style.display="none");try{for(var Ne=null;gt<ot;){var Te=Ke[gt],Oe=Ke[gt+2]||xe,ae=Nt[jt+2]||xe,Et=Math.min(Oe,ae),le=Ke[gt+1],he;if(le.nodeType!==1&&(he=ie.substring(we,Et))){ke&&(he=he.replace(ut,"\r")),le.nodeValue=he;var _e=le.ownerDocument,Se=_e.createElement("span");Se.className=Nt[jt+1];var ze=le.parentNode;ze.replaceChild(Se,le),Se.appendChild(le),we<Oe&&(Ke[gt+1]=le=_e.createTextNode(ie.substring(Et,Oe)),ze.insertBefore(le,Se.nextSibling))}we=Et,we>=Oe&&(gt+=2),we>=ae&&(jt+=2)}}finally{Ze&&(Ze.style.display=ht)}}var Pe={};function ge(Be,ke){for(var ut=ke.length;--ut>=0;){var ie=ke[ut];Pe.hasOwnProperty(ie)?y.console&&console.warn("cannot override language handler %s",ie):Pe[ie]=Be}}function de(Be,ke){return Be&&Pe.hasOwnProperty(Be)||(Be=/^\s*</.test(ke)?"default-markup":"default-code"),Pe[Be]}ge(oe,["default-code"]),ge(Z([],[[m,/^[^<?]+/],[x,/^<!\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"]),ge(Z([[m,/^[\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"]),ge(Z([],[[U,/^[\s\S]+/]]),["uq.val"]),ge(ve({keywords:u,hashComments:!0,cStyleComments:!0,types:A}),["c","cc","cpp","cxx","cyc","m"]),ge(ve({keywords:"null,true,false"}),["json"]),ge(ve({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:A}),["cs"]),ge(ve({keywords:f,cStyleComments:!0}),["java"]),ge(ve({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ge(ve({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ge(ve({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ge(ve({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ge(ve({keywords:c,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ge(ve({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ge(Z([],[[C,/^[\s\S]+/]]),["regex"]);function Qe(Be){var ke=Be.langExtension;try{var ut=M(Be.sourceNode,Be.pre),ie=ut.sourceCode;Be.sourceCode=ie,Be.spans=ut.spans,Be.basePos=0,de(ke,ie)(Be),ye(Be)}catch(xe){y.console&&console.log(xe&&xe.stack||xe)}}function St(Be,ke,ut){var ie=ut||!1,xe=ke||null,we=document.createElement("div");we.innerHTML="<pre>"+Be+"</pre>",we=we.firstChild,ie&&fe(we,ie,!0);var Ke={langExtension:xe,numberLines:ie,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Qe(Ke),we.innerHTML}function Ee(Be,ke){var ut=ke||document.body,ie=ut.ownerDocument||document;function xe(Te){return ut.getElementsByTagName(Te)}for(var we=[xe("pre"),xe("code"),xe("xmp")],Ke=[],ot=0;ot<we.length;++ot)for(var gt=0,Nt=we[ot].length;gt<Nt;++gt)Ke.push(we[ot][gt]);we=null;var He=Date;He.now||(He={now:function(){return+new Date}});var jt=0,$t=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ie=/\bprettyprint\b/,Ae=/\bprettyprinted\b/,ct=/pre|xmp/i,Et=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,ht={};function Ne(){for(var Te=y.PR_SHOULD_USE_CONTINUATION?He.now()+250:Infinity;jt<Ke.length&&He.now()<Te;jt++){for(var Oe=Ke[jt],ae=ht,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(Ut,_t,Gt){ae[_t]=Gt});break}}var Se=Oe.className;if((ae!==ht||Ie.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&&Ie.test(xt.className)){ze=!0;break}}if(!ze){Oe.className+=" prettyprinted";var on=ae.lang;if(!on){on=Se.match($t);var vt;!on&&(vt=$(Oe))&&Et.test(vt.tagName)&&(on=vt.className.match($t)),on&&(on=on[1])}var Kt;if(ct.test(Oe.tagName))Kt=1;else{var Ot=Oe.currentStyle,Rt=ie.defaultView,ft=Ot?Ot.whiteSpace:Rt&&Rt.getComputedStyle?Rt.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;Kt=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,Kt);var Fe={langExtension:on,sourceNode:Oe,numberLines:be,pre:Kt,sourceCode:null,basePos:null,spans:null,decorations:null};Qe(Fe)}}}jt<Ke.length?y.setTimeout(Ne,250):typeof Be=="function"&&Be()}Ne()}var De=y.PR={createSimpleLexer:Z,registerLangHandler:ge,sourceDecorator:ve,PR_ATTRIB_NAME:j,PR_ATTRIB_VALUE:U,PR_COMMENT:w,PR_DECLARATION:x,PR_KEYWORD:k,PR_LITERAL:h,PR_NOCODE:T,PR_PLAIN:m,PR_PUNCTUATION:p,PR_SOURCE:v,PR_STRING:C,PR_TAG:_,PR_TYPE:g,prettyPrintOne:I?y.prettyPrintOne=St:R=St,prettyPrint:P=I?y.prettyPrint=Ee:P=Ee},rt=y.define;typeof rt=="function"&&rt.amd&&rt("google-code-prettify",[],function(){return De})})()},SKnc:function(We,J,L){var Y=L("bYtY"),B=L("QuXc"),I=function(S,R,P,y,t,b){this.x=S==null?0:S,this.y=R==null?0:R,this.x2=P==null?1:P,this.y2=y==null?0:y,this.type="linear",this.global=b||!1,B.call(this,t)};I.prototype={constructor:I},Y.inherits(I,B);var F=I;We.exports=F},SUKs:function(We,J,L){var Y=L("LPTA"),B=Y.debugMode,I=function(){};B===1&&(I=console.error);var F=I;We.exports=F},Sj9i:function(We,J,L){var Y=L("QBsz"),B=Y.create,I=Y.distSquare,F=Math.pow,S=Math.sqrt,R=1e-8,P=1e-4,y=S(3),t=1/3,b=B(),i=B(),u=B();function f(h){return h>-R&&h<R}function a(h){return h>R||h<-R}function o(h,p,m,_,x){var v=1-x;return v*v*(v*h+3*x*p)+x*x*(x*_+3*v*m)}function c(h,p,m,_,x){var v=1-x;return 3*(((p-h)*v+2*(m-p)*x)*v+(_-m)*x*x)}function l(h,p,m,_,x,v){var j=_+3*(p-m)-h,U=3*(m-p*2+h),T=3*(p-h),z=h-x,H=U*U-3*j*T,M=U*T-9*j*z,V=T*T-3*U*z,K=0;if(f(H)&&f(M))if(f(U))v[0]=0;else{var $=-T/U;$>=0&&$<=1&&(v[K++]=$)}else{var Z=M*M-4*H*V;if(f(Z)){var ve=M/H,$=-U/j+ve,oe=-ve/2;$>=0&&$<=1&&(v[K++]=$),oe>=0&&oe<=1&&(v[K++]=oe)}else if(Z>0){var fe=S(Z),ye=H*U+1.5*j*(-M+fe),Pe=H*U+1.5*j*(-M-fe);ye<0?ye=-F(-ye,t):ye=F(ye,t),Pe<0?Pe=-F(-Pe,t):Pe=F(Pe,t);var $=(-U-(ye+Pe))/(3*j);$>=0&&$<=1&&(v[K++]=$)}else{var ge=(2*H*U-3*j*M)/(2*S(H*H*H)),de=Math.acos(ge)/3,Qe=S(H),St=Math.cos(de),$=(-U-2*Qe*St)/(3*j),oe=(-U+Qe*(St+y*Math.sin(de)))/(3*j),Ee=(-U+Qe*(St-y*Math.sin(de)))/(3*j);$>=0&&$<=1&&(v[K++]=$),oe>=0&&oe<=1&&(v[K++]=oe),Ee>=0&&Ee<=1&&(v[K++]=Ee)}}return K}function n(h,p,m,_,x){var v=6*m-12*p+6*h,j=9*p+3*_-3*h-9*m,U=3*p-3*h,T=0;if(f(j)){if(a(v)){var z=-U/v;z>=0&&z<=1&&(x[T++]=z)}}else{var H=v*v-4*j*U;if(f(H))x[0]=-v/(2*j);else if(H>0){var M=S(H),z=(-v+M)/(2*j),V=(-v-M)/(2*j);z>=0&&z<=1&&(x[T++]=z),V>=0&&V<=1&&(x[T++]=V)}}return T}function s(h,p,m,_,x,v){var j=(p-h)*x+h,U=(m-p)*x+p,T=(_-m)*x+m,z=(U-j)*x+j,H=(T-U)*x+U,M=(H-z)*x+z;v[0]=h,v[1]=j,v[2]=z,v[3]=M,v[4]=M,v[5]=H,v[6]=T,v[7]=_}function d(h,p,m,_,x,v,j,U,T,z,H){var M,V=.005,K=Infinity,$,Z,ve,oe;b[0]=T,b[1]=z;for(var fe=0;fe<1;fe+=.05)i[0]=o(h,m,x,j,fe),i[1]=o(p,_,v,U,fe),ve=I(b,i),ve<K&&(M=fe,K=ve);K=Infinity;for(var ye=0;ye<32&&!(V<P);ye++)$=M-V,Z=M+V,i[0]=o(h,m,x,j,$),i[1]=o(p,_,v,U,$),ve=I(i,b),$>=0&&ve<K?(M=$,K=ve):(u[0]=o(h,m,x,j,Z),u[1]=o(p,_,v,U,Z),oe=I(u,b),Z<=1&&oe<K?(M=Z,K=oe):V*=.5);return H&&(H[0]=o(h,m,x,j,M),H[1]=o(p,_,v,U,M)),S(K)}function E(h,p,m,_){var x=1-_;return x*(x*h+2*_*p)+_*_*m}function A(h,p,m,_){return 2*((1-_)*(p-h)+_*(m-p))}function C(h,p,m,_,x){var v=h-2*p+m,j=2*(p-h),U=h-_,T=0;if(f(v)){if(a(j)){var z=-U/j;z>=0&&z<=1&&(x[T++]=z)}}else{var H=j*j-4*v*U;if(f(H)){var z=-j/(2*v);z>=0&&z<=1&&(x[T++]=z)}else if(H>0){var M=S(H),z=(-j+M)/(2*v),V=(-j-M)/(2*v);z>=0&&z<=1&&(x[T++]=z),V>=0&&V<=1&&(x[T++]=V)}}return T}function k(h,p,m){var _=h+m-2*p;return _===0?.5:(h-p)/_}function w(h,p,m,_,x){var v=(p-h)*_+h,j=(m-p)*_+p,U=(j-v)*_+v;x[0]=h,x[1]=v,x[2]=U,x[3]=U,x[4]=j,x[5]=m}function g(h,p,m,_,x,v,j,U,T){var z,H=.005,M=Infinity;b[0]=j,b[1]=U;for(var V=0;V<1;V+=.05){i[0]=E(h,m,x,V),i[1]=E(p,_,v,V);var K=I(b,i);K<M&&(z=V,M=K)}M=Infinity;for(var $=0;$<32&&!(H<P);$++){var Z=z-H,ve=z+H;i[0]=E(h,m,x,Z),i[1]=E(p,_,v,Z);var K=I(i,b);if(Z>=0&&K<M)z=Z,M=K;else{u[0]=E(h,m,x,ve),u[1]=E(p,_,v,ve);var oe=I(u,b);ve<=1&&oe<M?(z=ve,M=oe):H*=.5}}return T&&(T[0]=E(h,m,x,z),T[1]=E(p,_,v,z)),S(M)}J.cubicAt=o,J.cubicDerivativeAt=c,J.cubicRootAt=l,J.cubicExtrema=n,J.cubicSubdivide=s,J.cubicProjectPoint=d,J.quadraticAt=E,J.quadraticDerivativeAt=A,J.quadraticRootAt=C,J.quadraticExtremum=k,J.quadraticSubdivide=w,J.quadraticProjectPoint=g},SqI9:function(We,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,S){var R=S.cx,P=S.cy,y=Math.max(S.r0||0,0),t=Math.max(S.r,0),b=S.startAngle,i=S.endAngle,u=S.clockwise,f=Math.cos(b),a=Math.sin(b);F.moveTo(f*y+R,a*y+P),F.lineTo(f*t+R,a*t+P),F.arc(R,P,t,b,i,!u),F.lineTo(Math.cos(i)*y+R,Math.sin(i)*y+P),y!==0&&F.arc(R,P,y,i,b,u),F.closePath()}});We.exports=I},SrGk:function(We,J,L){var Y=L("hydK"),B=Y.createElement,I=L("bYtY"),F=L("y+Vt"),S=L("Dagg"),R=L("dqUG"),P=L("P47w"),y=P.path,t=P.image,b=P.text,i="0",u="1";function f(o,c,l,n,s){this._zrId=o,this._svgRoot=c,this._tagNames=typeof l=="string"?[l]:l,this._markLabel=n,this._domName=s||"_dom",this.nextId=0}f.prototype.createElement=B,f.prototype.getDefs=function(o){var c=this._svgRoot,l=this._svgRoot.getElementsByTagName("defs");return l.length===0?o?(l=c.insertBefore(this.createElement("defs"),c.firstChild),l.contains||(l.contains=function(n){var s=l.children;if(!s)return!1;for(var d=s.length-1;d>=0;--d)if(s[d]===n)return!0;return!1}),l):null:l[0]},f.prototype.update=function(o,c){if(!o)return;var l=this.getDefs(!1);if(o[this._domName]&&l.contains(o[this._domName]))typeof c=="function"&&c(o);else{var n=this.add(o);n&&(o[this._domName]=n)}},f.prototype.addDom=function(o){var c=this.getDefs(!0);c.appendChild(o)},f.prototype.removeDom=function(o){var c=this.getDefs(!1);c&&o[this._domName]&&(c.removeChild(o[this._domName]),o[this._domName]=null)},f.prototype.getDoms=function(){var o=this.getDefs(!1);if(!o)return[];var c=[];return I.each(this._tagNames,function(l){var n=o.getElementsByTagName(l);c=c.concat([].slice.call(n))}),c},f.prototype.markAllUnused=function(){var o=this.getDoms(),c=this;I.each(o,function(l){l[c._markLabel]=i})},f.prototype.markUsed=function(o){o&&(o[this._markLabel]=u)},f.prototype.removeUnused=function(){var o=this.getDefs(!1);if(!o)return;var c=this.getDoms(),l=this;I.each(c,function(n){n[l._markLabel]!==u&&o.removeChild(n)})},f.prototype.getSvgProxy=function(o){return o instanceof F?y:o instanceof S?t:o instanceof R?b:y},f.prototype.getTextSvgElement=function(o){return o.__textSvgEl},f.prototype.getSvgElement=function(o){return o.__svgEl};var a=f;We.exports=a},T6xi:function(We,J,L){var Y=L("YgsL"),B=L("nCxF");function I(F,S,R){var P=S.points,y=S.smooth;if(P&&P.length>=2){if(y&&y!=="spline"){var t=B(P,y,R,S.smoothConstraint);F.moveTo(P[0][0],P[0][1]);for(var b=P.length,i=0;i<(R?b:b-1);i++){var u=t[i*2],f=t[i*2+1],a=P[(i+1)%b];F.bezierCurveTo(u[0],u[1],f[0],f[1],a[0],a[1])}}else{y==="spline"&&(P=Y(P,R)),F.moveTo(P[0][0],P[0][1]);for(var i=1,o=P.length;i<o;i++)F.lineTo(P[i][0],P[i][1])}R&&F.closePath()}}J.buildPath=I},T8No:function(We,J,L){"use strict";L.d(J,"a",function(){return P}),L.d(J,"e",function(){return y}),L.d(J,"c",function(){return p}),L.d(J,"b",function(){return m}),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 S=new Map;S.set("false",!1),S.set("true",!0),S.set("isMac",Y.f),S.set("isLinux",Y.d),S.set("isWindows",Y.i),S.set("isWeb",Y.h),S.set("isMacNative",Y.f&&!Y.h),S.set("isEdge",F.indexOf("Edg/")>=0),S.set("isFirefox",F.indexOf("Firefox")>=0),S.set("isChrome",F.indexOf("Chrome")>=0),S.set("isSafari",F.indexOf("Safari")>=0);const R=Object.prototype.hasOwnProperty;class P{static has(T){return u.create(T)}static equals(T,z){return f.create(T,z)}static regex(T,z){return C.create(T,z)}static not(T){return l.create(T)}static and(...T){return g.create(T,null)}static or(...T){return h.create(T,null,!0)}static deserialize(T,z=!1){return T?this._deserializeOrExpression(T,z):void 0}static _deserializeOrExpression(T,z){let H=T.split("||");return h.create(H.map(M=>this._deserializeAndExpression(M,z)),null,!0)}static _deserializeAndExpression(T,z){let H=T.split("&&");return g.create(H.map(M=>this._deserializeOne(M,z)),null)}static _deserializeOne(T,z){if(T=T.trim(),T.indexOf("!=")>=0){let H=T.split("!=");return c.create(H[0].trim(),this._deserializeValue(H[1],z))}if(T.indexOf("==")>=0){let H=T.split("==");return f.create(H[0].trim(),this._deserializeValue(H[1],z))}if(T.indexOf("=~")>=0){let H=T.split("=~");return C.create(H[0].trim(),this._deserializeRegexValue(H[1],z))}if(T.indexOf(" in ")>=0){let H=T.split(" in ");return a.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const H=T.split(">=");return d.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const H=T.split(">");return s.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const H=T.split("<=");return A.create(H[0].trim(),H[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const H=T.split("<");return E.create(H[0].trim(),H[1].trim())}return/^\!\s*/.test(T)?l.create(T.substr(1).trim()):u.create(T)}static _deserializeValue(T,z){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let H=/^'([^']*)'$/.exec(T);return H?H[1].trim():T}static _deserializeRegexValue(T,z){if(Object(B.C)(T)){if(z)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let H=T.indexOf("/"),M=T.lastIndexOf("/");if(H===M||H<0){if(z)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let V=T.slice(H+1,M),K=T[M+1]==="i"?"i":"";try{return new RegExp(V,K)}catch($){if(z)throw new Error(`bad regexp-value '${T}', parse error: ${$}`);return console.warn(`bad regexp-value '${T}', parse error: ${$}`),null}}}function y(T,z){const H=T?T.substituteConstants():void 0,M=z?z.substituteConstants():void 0;return!H&&!M?!0:!H||!M?!1:H.equals(M)}function t(T,z){return T.cmp(z)}class b{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return i.INSTANCE}}b.INSTANCE=new b;class i{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return b.INSTANCE}}i.INSTANCE=new i;class u{constructor(T,z){this.key=T,this.negated=z,this.type=2}static create(T,z=null){const H=S.get(T);return typeof H=="boolean"?H?i.INSTANCE:b.INSTANCE:new u(T,z)}cmp(T){return T.type!==this.type?this.type-T.type:x(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=S.get(this.key);return typeof T=="boolean"?T?i.INSTANCE:b.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class f{constructor(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=4}static create(T,z,H=null){if(typeof z=="boolean")return z?u.create(T,H):l.create(T,H);const M=S.get(T);if(typeof M=="boolean"){const V=M?"true":"false";return z===V?i.INSTANCE:b.INSTANCE}return new f(T,z,H)}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=S.get(this.key);if(typeof T=="boolean"){const z=T?"true":"false";return this.value===z?i.INSTANCE:b.INSTANCE}return this}evaluate(T){return T.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(T,z){this.key=T,this.valueKey=z,this.type=10,this.negated=null}static create(T,z){return new a(T,z)}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const z=T.getValue(this.valueKey),H=T.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=o.create(this)),this.negated}}class o{constructor(T){this._actual=T,this.type=11}static create(T){return new o(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class c{constructor(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=5}static create(T,z,H=null){if(typeof z=="boolean")return z?l.create(T,H):u.create(T,H);const M=S.get(T);if(typeof M=="boolean"){const V=M?"true":"false";return z===V?b.INSTANCE:i.INSTANCE}return new c(T,z,H)}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=S.get(this.key);if(typeof T=="boolean"){const z=T?"true":"false";return this.value===z?b.INSTANCE:i.INSTANCE}return this}evaluate(T){return T.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 l{constructor(T,z){this.key=T,this.negated=z,this.type=3}static create(T,z=null){const H=S.get(T);return typeof H=="boolean"?H?b.INSTANCE:i.INSTANCE:new l(T,z)}cmp(T){return T.type!==this.type?this.type-T.type:x(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=S.get(this.key);return typeof T=="boolean"?T?b.INSTANCE:i.INSTANCE:this}evaluate(T){return!T.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(T,z){if(typeof T=="string"){const H=parseFloat(T);isNaN(H)||(T=H)}return typeof T=="string"||typeof T=="number"?z(T):b.INSTANCE}class s{constructor(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=12}static create(T,z,H=null){return n(z,M=>new s(T,M,H))}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.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 d{constructor(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=13}static create(T,z,H=null){return n(z,M=>new d(T,M,H))}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=14}static create(T,z,H=null){return n(z,M=>new E(T,M,H))}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.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(T,z,H){this.key=T,this.value=z,this.negated=H,this.type=15}static create(T,z,H=null){return n(z,M=>new A(T,M,H))}cmp(T){return T.type!==this.type?this.type-T.type:v(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class C{constructor(T,z){this.key=T,this.regexp=z,this.type=7,this.negated=null}static create(T,z){return new C(T,z)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.key<T.key)return-1;if(this.key>T.key)return 1;const z=this.regexp?this.regexp.source:"",H=T.regexp?T.regexp.source:"";return z<H?-1:z>H?1:0}equals(T){if(T.type===this.type){const z=this.regexp?this.regexp.source:"",H=T.regexp?T.regexp.source:"";return this.key===T.key&&z===H}return!1}substituteConstants(){return this}evaluate(T){let z=T.getValue(this.key);return this.regexp?this.regexp.test(z):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this)),this.negated}}class k{constructor(T){this._actual=T,this.type=8}static create(T){return new k(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function w(T){let z=null;for(let H=0,M=T.length;H<M;H++){const V=T[H].substituteConstants();if(T[H]!==V&&z===null){z=[];for(let K=0;K<H;K++)z[K]=T[K]}z!==null&&(z[H]=V)}return z===null?T:z}class g{constructor(T,z){this.expr=T,this.negated=z,this.type=6}static create(T,z){return g._normalizeArr(T,z)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let z=0,H=this.expr.length;z<H;z++){const M=t(this.expr[z],T.expr[z]);if(M!==0)return M}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].equals(T.expr[z]))return!1;return!0}return!1}substituteConstants(){const T=w(this.expr);return T===this.expr?this:g.create(T,this.negated)}evaluate(T){for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].evaluate(T))return!1;return!0}static _normalizeArr(T,z){const H=[];let M=!1;for(const V of T){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 i.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(ve=>g.create([ve,K],null)),null,$);Z&&(H.push(Z),H.sort(t))}return H.length===1?H[0]:new g(H,z)}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let z of this.expr)T.push(...z.keys());return T}negate(){if(!this.negated){const T=[];for(let z of this.expr)T.push(z.negate());this.negated=h.create(T,this,!0)}return this.negated}}class h{constructor(T,z){this.expr=T,this.negated=z,this.type=9}static create(T,z,H){return h._normalizeArr(T,z,H)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let z=0,H=this.expr.length;z<H;z++){const M=t(this.expr[z],T.expr[z]);if(M!==0)return M}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let z=0,H=this.expr.length;z<H;z++)if(!this.expr[z].equals(T.expr[z]))return!1;return!0}return!1}substituteConstants(){const T=w(this.expr);return T===this.expr?this:h.create(T,this.negated,!1)}evaluate(T){for(let z=0,H=this.expr.length;z<H;z++)if(this.expr[z].evaluate(T))return!0;return!1}static _normalizeArr(T,z,H){let M=[],V=!1;if(T){for(let K=0,$=T.length;K<$;K++){const Z=T[K];if(!Z)continue;if(Z.type===0){V=!0;continue}if(Z.type===1)return i.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(T=>T.serialize()).join(" || ")}keys(){const T=[];for(let z of this.expr)T.push(...z.keys());return T}negate(){if(!this.negated){let T=[];for(let z of this.expr)T.push(z.negate());for(;T.length>1;){const z=T.shift(),H=T.shift(),M=[];for(const K of U(z))for(const $ of U(H))M.push(g.create([K,$],null));const V=T.length===0;T.unshift(h.create(M,null,V))}this.negated=T[0]}return this.negated}}class p extends u{constructor(T,z,H){super(T,null);this._defaultValue=z,typeof H=="object"?p._info.push(Object.assign(Object.assign({},H),{key:T})):H!==!0&&p._info.push({key:T,description:H,type:z!=null?typeof z:void 0})}static all(){return p._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return f.create(this.key,T)}}p._info=[];const m=Object(I.c)("contextKeyService"),_="setContext";function x(T,z){return T<z?-1:T>z?1:0}function v(T,z,H,M){return T<H?-1:T>H?1:z<M?-1:z>M?1:0}function j(T,z){if(z.type===6&&T.type!==9&&T.type!==6){for(const V of z.expr)if(T.equals(V))return!0}const H=T.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 ve=M[Z];if($.equals(ve))return!0}}return!1}function U(T){return T.type===9?T.expr:[T]}},"TS7/":function(We,J,L){"use strict";L.r(J);var Y=L("g9YV"),B=L("wCAj"),I=L("Znn+"),F=L("ZTPi"),S=L("5Dmo"),R=L("3S7+"),P=L("sPJy"),y=L("bE4q"),t=L("miYZ"),b=L("tsqr"),i=L("9og8"),u=L("2qtc"),f=L("kLXV"),a=L("tJVT"),o=L("WmNS"),c=L.n(o),l=L("q1tI"),n=L.n(l),s=L("Ty5D"),d=L("55Ip"),E=L("9kvl"),A=L("jhfD"),C=L("1vsH"),k=L("DjyN"),w=L("NUBc"),g=L("oBTY"),h=L("5NDa"),p=L("5rEg"),m=L("14J3"),_=L("BMrR"),x=L("jCWc"),v=L("kPKH"),j=L("+L6B"),U=L("2/Rp"),T=L("k1fw"),z=L("ErOA"),H=L("Ot1p"),M=L("m3rI"),V=L("9Bee"),K=function(sn){var _n=sn.shixunHomeworks,Nn=sn.dispatch,sr=Object(s.i)();return n.a.createElement(f.a,{centered:!0,title:"\u63D0\u793A",visible:_n.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(c.a.mark(function Qn(){var Zn;return c.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Nn({type:"shixunHomeworks/deleteReply",payload:{object_id:_n.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:Zn=vr.sent,Zn.status===0&&(b.b.success("\u5220\u9664\u6210\u529F"),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Nn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},_n.actionTabs.params)}));case 4:case"end":return vr.stop()}},Qn)})),onCancel:function(){Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))},$=Object(E.a)(function(mn){var sn=mn.shixunHomeworks;return{shixunHomeworks:sn}})(K),Z=L("XYT7"),ve=L("wd/R"),oe=L.n(ve),fe=L("/MfK"),ye=L("BtR2"),Pe=L("942q"),ge=L.n(Pe),de=L("xKgJ"),Qe=L("gMzb");oe.a.lang("ZH-cn");var St=function(sn){var _n=sn.shixunHomeworks,Nn=sn.classroomList,sr=sn.globalSetting,Qn=sn.user,Zn=sn.loading,kn=sn.dispatch,vr=Object(l.useState)(Object(T.a)(Object(T.a)({},Object(s.i)()),{},{limit:10})),Hn=Object(a.a)(vr,2),ir=Hn[0],lr=Hn[1],Ln=Object(l.useState)(!1),Cr=Object(a.a)(Ln,2),Lr=Cr[0],Tr=Cr[1],fr=Object(l.useState)(-1),ne=Object(a.a)(fr,2),Re=ne[0],Xe=ne[1],Me=Object(l.useState)(""),lt=Object(a.a)(Me,2),tt=lt[0],pt=lt[1],mt=Object(l.useState)(""),Dt=Object(a.a)(mt,2),it=Dt[0],Jt=Dt[1],Yt=Nn.detailLeftMenus,At=Object(l.useState)({}),qt=Object(a.a)(At,2),Je=qt[0],tn=qt[1],Wt=_n.workDetail,yn=_n.workList,Rn=Object(l.useState)({}),Pn=Object(a.a)(Rn,2),Mt=Pn[0],Ht=Pn[1];ir.page_size=10,Object(l.useEffect)(function(){kn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},ir)}),kn({type:"shixunHomeworks/getWorkDetail",payload:Object(T.a)({},ir)}),Yt.course_modules||kn({type:"classroomList/getClassroomLeftMenus",payload:Object(T.a)({},ir)})},[ir.categoryId]),Object(l.useEffect)(function(){_n!=null&&_n.replyList&&tn(_n.replyList)},[_n]);function Cn(wt){return En.apply(this,arguments)}function En(){return En=Object(i.a)(c.a.mark(function wt(It){var kt;return c.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Mt!=null&&Mt.ec_point_ids){bt.next=2;break}return bt.abrupt("return");case 2:return bt.next=4,Object(z.a)("/api/ec_courses/".concat(Mt==null?void 0:Mt.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:Object(T.a)({homework_common_id:It},Mt)});case 4:kt=bt.sent;case 5:case"end":return bt.stop()}},wt)})),En.apply(this,arguments)}return n.a.createElement("section",{className:ge.a.bg},n.a.createElement("section",{className:" edu-container"},n.a.createElement("aside",{className:[ge.a.desc,"c-black","font14","bg-white"].join(" ")},_n.actionTabs.key!=="\u7F16\u8F91\u4F5C\u4E1A"&&n.a.createElement(V.a,{value:(Wt==null?void 0:Wt.explanation)||"\u6682\u65E0\uFF5E"}),_n.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:(Wt==null?void 0:Wt.explanation)||"",height:200,isFocus:!0,watch:!0}),n.a.createElement(Qe.a,{setitem:function(It){return Ht(Object(T.a)({},It))},homework_common_id:ir.categoryId}),n.a.createElement(_.a,null,n.a.createElement(v.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"default",size:"large",onClick:Object(i.a)(c.a.mark(function wt(){return c.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:kn({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return kt.stop()}},wt)}))},"\u53D6\u6D88"),n.a.createElement(U.a,{type:"primary",size:"large",className:"ml20",onClick:Object(i.a)(c.a.mark(function wt(){var It;return c.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!(tt==="")){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:tt,categoryId:ir.categoryId}});case 6:It=Ct.sent,Cn(ir.categoryId),It.status===0&&(b.b.success("\u64CD\u4F5C\u6210\u529F"),kn({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),kn({type:"shixunHomeworks/getWorkDetail",payload:Object(T.a)({},ir)}));case 9:case"end":return Ct.stop()}},wt)}))},"\u4FDD\u5B58"))))),n.a.createElement("aside",{className:[ge.a.reply,"bg-white","mt20"].join(" ")},Lr&&n.a.createElement(H.a,{onChange:function(It){pt(It)},height:200,isFocus:!0,watch:!0}),n.a.createElement(_.a,{onClick:function(){Tr(!0)}},n.a.createElement(v.a,{flex:"1"},!Lr&&n.a.createElement(p.a,{size:"large",className:"current",placeholder:"\u8BF4\u70B9\u4EC0\u4E48",disabled:!0})),n.a.createElement(v.a,null,n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(i.a)(c.a.mark(function wt(){var It;return c.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!(tt==="")){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:ir.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:tt}}});case 6:It=Ct.sent,It.status===0&&(b.b.success("\u53D1\u5E03\u6210\u529F"),kn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},ir)}),Tr(!1),pt(""));case 8:case"end":return Ct.stop()}},wt)}))},"\u53D1\u8868")))),(Je==null?void 0:Je.comments)&&Je.comments!=""&&n.a.createElement("aside",{className:[ge.a.replyList,"bg-white"].join(" ")},Je==null?void 0:Je.comments.map(function(wt,It){var kt,Ct,bt,Tn;return n.a.createElement(_.a,{gutter:[12,12],key:It},n.a.createElement(v.a,{flex:"40px"},n.a.createElement("img",{width:"40",src:"".concat(M.a.IMG_SERVER,"/images/").concat(wt==null||((kt=wt.author)===null||kt===void 0)?void 0:kt.image_url)})),n.a.createElement(v.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(v.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(v.a,{span:4},n.a.createElement("div",{className:"tr"},(Object(de.c)()||(Qn==null||((bt=Qn.userInfo)===null||bt===void 0)?void 0:bt.login)===(wt==null||((Tn=wt.author)===null||Tn===void 0)?void 0:Tn.login))&&n.a.createElement(fe.a,{className:"current",onClick:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5220\u9664",params:ir,selectArr:wt,object_type:"message"}})}}))),n.a.createElement(v.a,{span:24},n.a.createElement(V.a,{value:wt.content})),wt.children&&n.a.createElement("aside",{className:ge.a.comment},wt.children.map(function(Zt,Sn){var dn,Vt;return n.a.createElement(_.a,{key:Sn},n.a.createElement(v.a,{span:24},n.a.createElement(_.a,null,n.a.createElement(v.a,{flex:"1"},Zt.author.name,n.a.createElement("span",{className:"c-light-black ml10"},oe()(Zt==null?void 0:Zt.created_on).fromNow())),n.a.createElement(v.a,null,(Object(de.c)()||(Qn==null||((dn=Qn.userInfo)===null||dn===void 0)?void 0:dn.login)===(Zt==null||((Vt=Zt.author)===null||Vt===void 0)?void 0:Vt.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:ir,selectArr:Zt}})}}))))),n.a.createElement(v.a,null,n.a.createElement(V.a,{value:Zt.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 Zt=Object(i.a)(c.a.mark(function Sn(dn){var Vt,wn;return c.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(Z.H)(Object(T.a)(Object(T.a)({},ir),{},{parent_id:wt.id,page:dn,limit:5}));case 2:wn=yr.sent,wn!=null&&(Vt=wn.comments)!==null&&Vt!==void 0&&Vt.length&&(Je.comments[It].page=dn,Je.comments[It].children=Object(g.a)(wn==null?void 0:wn.comments),tn(Object(T.a)({},Je)));case 4:case"end":return yr.stop()}},Sn)}));return function(Sn){return Zt.apply(this,arguments)}}()})),n.a.createElement(v.a,{span:24,className:"mt5 c-light-black"},Re===It&&n.a.createElement("aside",null,n.a.createElement(H.a,{onChange:function(Sn){Jt(Sn)},height:150,isFocus:!0}),n.a.createElement(_.a,null,n.a.createElement(v.a,{span:24,className:"tr"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:Object(i.a)(c.a.mark(function Zt(){var Sn,dn;return c.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(!(it==="")){wn.next=4;break}b.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),wn.next=12;break;case 4:return wn.next=6,kn({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:ir.categoryId,jour_type:"HomeworkCommon",m_parent_id:wt.id,reply_id:1,notes:it}}});case 6:return wn.next=8,Object(Z.H)(Object(T.a)(Object(T.a)({},ir),{},{parent_id:wt.id,limit:5}));case 8:dn=wn.sent,dn!=null&&(Sn=dn.comments)!==null&&Sn!==void 0&&Sn.length&&(++Je.comments[It].child_message_count,Je.comments[It].children=Object(g.a)(dn==null?void 0:dn.comments),Je.comments[It].page=1,tn(Je)),b.b.success("\u53D1\u5E03\u6210\u529F"),Xe(-1);case 12:case"end":return wn.stop()}},Zt)}))},"\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(i.a)(c.a.mark(function Zt(){return c.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,kn({type:"shixunHomeworks/replyUnLike",payload:{object_id:wt.id,object_type:"journals_for_message"}});case 2:kn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},ir)});case 3:case"end":return dn.stop()}},Zt)}))}),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(i.a)(c.a.mark(function Zt(){return c.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,kn({type:"shixunHomeworks/replyLike",payload:{object_id:wt.id,object_type:"journals_for_message"}});case 2:kn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},ir)});case 3:case"end":return dn.stop()}},Zt)}))}),wt.praise_count))))))}))),n.a.createElement("aside",{className:"tc mt30 pb30"},n.a.createElement(w.a,{defaultCurrent:1,total:Je==null?void 0:Je.parent_messages_count,hideOnSinglePage:!0,current:ir.page||1,pageSize:10,onChange:function(It){ir.page=It,kn({type:"shixunHomeworks/getReplyList",payload:Object(T.a)({},ir)})}})),n.a.createElement($,null))},Ee=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.classroomList,Nn=mn.loading,sr=mn.user,Qn=mn.globalSetting;return{shixunHomeworks:sn,globalSetting:Qn,classroomList:_n,user:sr,loading:Nn.effects}})(St),De=L("giR+"),rt=L("fyUT"),Be=L("7Kak"),ke=L("9yH6"),ut=L("qVdP"),ie=L("jsC+"),xe=L("sRBo"),we=L("kaz8"),Ke=L("lUTK"),ot=L("BvKs"),gt=L("jrin"),Nt=L("y8nQ"),He=L("Vl3Y"),jt=L("8Skl"),$t=L("y3Kf"),Ie=L("CTES"),Ae=L("Llu2"),ct=L("0NbB"),Et=L("BdwD"),Ze=L("Xm8N"),ht=L("PpiC"),Ne=L("IMoZ"),Te=function(sn){var _n=sn.shixunHomeworks,Nn=sn.dispatch,sr=Object(ht.a)(sn,["shixunHomeworks","dispatch"]),Qn=Object(s.i)(),Zn=Object(l.useState)(!0),kn=Object(a.a)(Zn,2),vr=kn[0],Hn=kn[1],ir=Object(l.useState)(!1),lr=Object(a.a)(ir,2),Ln=lr[0],Cr=lr[1],Lr=He.a.useForm(),Tr=Object(a.a)(Lr,1),fr=Tr[0],ne=function(){var Re=Object(i.a)(c.a.mark(function Xe(){var Me,lt;return c.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return Me=fr.getFieldValue(),pt.next=3,Object(z.a)("/api/homework_commons/".concat(Qn.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:Object(g.a)(_n.actionTabs.selectArrs),cover_all:vr,hidden_comment:Me.hidden_comment,comment:Me.comment}});case 3:lt=pt.sent,lt.status===0&&(b.b.success("\u8BC4\u9605\u6210\u529F"),fr.resetFields(),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Nn({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},_n.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:_n.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(c.a.mark(function Re(){var Xe;return c.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:Xe=fr.getFieldValue(),JSON.stringify(Xe)==="{}"||Xe.hidden_comment===""&&Xe.comment===""?Cr(!0):_n.workList.partial_comment?Nn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",selectArrs:_n.actionTabs.selectArrs,params:_n.actionTabs.params}}):ne();case 2:case"end":return lt.stop()}},Re)})),onCancel:function(){Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(He.a,{form:fr,onChange:function(){Ln&&Cr(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(He.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(He.a.Item,{name:"hidden_comment"},n.a.createElement(p.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Ln&&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:_n.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){Hn(Xe.target.value)},value:vr},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(E.a)(function(mn){var sn=mn.shixunHomeworks;return{shixunHomeworks:sn}})(Te),ae=L("BoW6"),le=L.n(ae),he=function(sn){var _n,Nn,sr,Qn,Zn=sn.shixunHomeworks,kn=sn.dispatch,vr=Object(ht.a)(sn,["shixunHomeworks","dispatch"]),Hn=Object(s.i)(),ir=Object(l.useState)(!1),lr=Object(a.a)(ir,2),Ln=lr[0],Cr=lr[1],Lr=Object(l.useState)((_n=Zn.actionTabs.selectArrs)===null||_n===void 0||((Nn=_n.data)===null||Nn===void 0)?void 0:Nn.name),Tr=Object(a.a)(Lr,2),fr=Tr[0],ne=Tr[1],Re=He.a.useForm(),Xe=Object(a.a)(Re,1),Me=Xe[0];Object(l.useEffect)(function(){var tt,pt,mt,Dt,it,Jt;Zn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Me.setFieldsValue({comment:(tt=Zn.actionTabs.selectArrs)===null||tt===void 0||((pt=tt.data)===null||pt===void 0)?void 0:pt.work_comment,hidden_comment:(mt=Zn.actionTabs.selectArrs)===null||mt===void 0||((Dt=mt.data)===null||Dt===void 0)?void 0:Dt.work_comment_hidden}),ne((it=Zn.actionTabs.selectArrs)===null||it===void 0||((Jt=it.data)===null||Jt===void 0)?void 0:Jt.name)},[Zn.actionTabs.key]);var lt=function(){var tt=Object(i.a)(c.a.mark(function pt(){var mt,Dt,it,Jt;return c.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return it=Me.getFieldValue(),At.next=3,Object(z.a)("/api/student_works/".concat((mt=Zn.actionTabs.selectArrs)===null||mt===void 0||((Dt=mt.data)===null||Dt===void 0)?void 0:Dt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:it.hidden_comment,comment:it.comment}});case 3:if(Jt=At.sent,!(Jt.status===0)){At.next=9;break}return b.b.success("\u8BC4\u9605\u6210\u529F"),Me.resetFields(),kn({type:"shixunHomeworks/setActionTabs",payload:{}}),At.abrupt("return",kn({type:"shixunHomeworks/getWorkList",payload:Hn}));case 9:case"end":return At.stop()}},pt)}));return function(){return tt.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(f.a,{centered:!0,title:(sr=Zn.actionTabs.selectArrs)!==null&&sr!==void 0&&(Qn=sr.data)!==null&&Qn!==void 0&&Qn.work_comment_hidden?"\u66F4\u6539"+fr+"\u70B9\u8BC4":fr+"\u70B9\u8BC4",visible:Zn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(c.a.mark(function tt(){var pt;return c.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:pt=Me.getFieldValue(),JSON.stringify(pt)==="{}"||pt.hidden_comment===""&&pt.comment===""?Cr(!0):lt();case 2:case"end":return Dt.stop()}},tt)})),onCancel:function(){kn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(He.a,{form:Me,onChange:function(){Ln&&Cr(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(He.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(He.a.Item,{name:"hidden_comment"},n.a.createElement(p.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Ln&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},_e=Object(E.a)(function(mn){var sn=mn.shixunHomeworks;return{shixunHomeworks:sn}})(he),Se=function(sn){var _n=sn.shixunHomeworks,Nn=sn.dispatch,sr=Object(ht.a)(sn,["shixunHomeworks","dispatch"]),Qn=Object(s.i)(),Zn=Object(l.useState)([]),kn=Object(a.a)(Zn,2),vr=kn[0],Hn=kn[1],ir=Object(l.useState)([]),lr=Object(a.a)(ir,2),Ln=lr[0],Cr=lr[1];Object(l.useEffect)(function(){_n.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B"&&Lr()},[_n.actionTabs.key]);function Lr(){return Tr.apply(this,arguments)}function Tr(){return Tr=Object(i.a)(c.a.mark(function ne(){var Re;return c.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,Object(z.a)("/api/homework_commons/".concat(Qn.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:Re=Me.sent,Hn(Re);case 4:case"end":return Me.stop()}},ne)})),Tr.apply(this,arguments)}var fr=[{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:_n.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B",width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(c.a.mark(function ne(){var Re;return c.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,Object(z.a)("/api/homework_commons/".concat(Qn.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:Ln}});case 2:Re=Me.sent,(Re==null?void 0:Re.status)===0&&(E.d.replace("/classrooms/".concat(Qn.coursesId,"/shixun_homework/").concat(Qn.categoryId,"/detail?tabs=4")),window.location.reload(),Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Cr([]));case 4:case"end":return Me.stop()}},ne)})),onCancel:function(){Cr([]),Nn({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(B.a,{rowSelection:{type:"checkbox",onChange:function(Re,Xe){Cr(Object(g.a)(Re))},selectedRowKeys:Ln,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:fr,dataSource:vr==null?void 0:vr.group_list})))},ze=Object(E.a)(function(mn){var sn=mn.shixunHomeworks;return{shixunHomeworks:sn}})(Se),xt=L("mgmH"),Qt=function(sn){var _n,Nn,sr,Qn,Zn,kn,vr,Hn,ir,lr,Ln,Cr,Lr,Tr,fr,ne=sn.shixunHomeworks,Re=sn.loading,Xe=sn.dispatch,Me=sn.globalSetting,lt=sn.setExportParams,tt=sn.user,pt=Object(s.i)(),mt=Object(l.useState)(Object(T.a)(Object(T.a)({},{page:1,limit:20,order:"work_score",b_order:"desc"}),pt)),Dt=Object(a.a)(mt,2),it=Dt[0],Jt=Dt[1],Yt=He.a.useForm(),At=Object(a.a)(Yt,1),qt=At[0],Je=Object(l.useState)(),tn=Object(a.a)(Je,2),Wt=tn[0],yn=tn[1],Rn=Object(l.useState)({}),Pn=Object(a.a)(Rn,2),Mt=Pn[0],Ht=Pn[1],Cn=Object(l.useState)([]),En=Object(a.a)(Cn,2),wt=En[0],It=En[1],kt=Object(l.useState)(!1),Ct=Object(a.a)(kt,2),bt=Ct[0],Tn=Ct[1],Zt=Object(l.useState)([]),Sn=Object(a.a)(Zt,2),dn=Sn[0],Vt=Sn[1],wn=Object(l.useState)(!1),Gn=Object(a.a)(wn,2),yr=Gn[0],Wn=Gn[1],kr=Object(l.useState)(),Yr=Object(a.a)(kr,2),Bn=Yr[0],Vn=Yr[1],qn=Object(l.useState)(1),Rr=Object(a.a)(qn,2),jr=Rr[0],$r=Rr[1],pa=Object(l.useState)(),ma=Object(a.a)(pa,2),ya=ma[0],Va=ma[1],Ma=Object(l.useState)(),$a=Object(a.a)(Ma,2),aa=$a[0],La=$a[1],oi=Object(l.useState)(),Pa=Object(a.a)(oi,2),qr=Pa[0],xa=Pa[1],Sa=Object(l.useState)(),Le=Object(a.a)(Sa,2),et=Le[0],at=Le[1],je=Object(l.useState)(),ce=Object(a.a)(je,2),Ce=ce[0],me=ce[1],Ue=Object(l.useState)(!1),Ve=Object(a.a)(Ue,2),st=Ve[0],$e=Ve[1];Object(l.useEffect)(function(){return yt(!0),function(){Ht([]),It([])}},[it.coursesId]),Object(l.useEffect)(function(){var fn,Ft=JSON.parse(JSON.stringify(ne.workList));!(Ft!=null&&(fn=Ft.student_works)!==null&&fn!==void 0&&fn.length)&&Ft!==null&&Ft!==void 0&&Ft.id?(Ft.student_works=[Object(T.a)({},Ft)],Ht(Ft)):(Ft!=null&&Ft.id&&It([Object(T.a)(Object(T.a)({},Ft),{number:"\u6211"})]),Ht(Object(T.a)({},Ft)))},[ne.workList]);var yt=function(Ft){lt(Object(T.a)({},it));var Xt=Xe({type:"shixunHomeworks/getWorkList",payload:it});return Ft&&Xt.then(function(In){var xn,er,wr;(In!=null&&(xn=In.homework_status)!==null&&xn!==void 0&&xn.includes("\u8FDB\u884C\u4E2D")||In!=null&&(er=In.homework_status)!==null&&er!==void 0&&er.includes("\u8865\u4EA4\u4E2D")||In!=null&&(wr=In.homework_status)!==null&&wr!==void 0&&wr.includes("\u63D0\u4EA4\u4E2D"))&&!Object(de.s)()&&rn()}),Xt};Object(l.useEffect)(function(){Bt()},[]);var Bt=function(){var fn=Object(i.a)(c.a.mark(function Ft(){var Xt;return c.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,Object(Z.I)({categoryId:pt.categoryId});case 2:Xt=xn.sent,yn(Xt==null?void 0:Xt.update_score);case 4:case"end":return xn.stop()}},Ft)}));return function(){return fn.apply(this,arguments)}}(),rn=function(){var fn=Object(i.a)(c.a.mark(function Ft(){var Xt;return c.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return Xe({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6210\u7EE9\u8BA1\u7B97\u4E2D\uFF0C\u8BF7\u7A0D\u5019..."}}),xn.next=3,Object(Z.Z)({categoryId:pt.categoryId});case 3:Xt=xn.sent,Xe({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),(Xt==null?void 0:Xt.status)===0&&(b.b.success(Xt==null?void 0:Xt.message),yt());case 6:case"end":return xn.stop()}},Ft)}));return function(){return fn.apply(this,arguments)}}(),cn=function(){it.page=1;var Ft=Object.assign({},qt.getFieldValue());delete it.course_group,delete it.teacher_comment,Object.keys(Ft).map(function(Xt){switch(Xt){case"task_status":Ft[Xt].includes("all")||!Ft[Xt].length?(delete it.work_status,qt.setFieldsValue(Object(gt.a)({},"task_status","all"))):(it.work_status=Ft[Xt],qt.setFieldsValue(Object(gt.a)({},"task_status",it.work_status)));break;case"course_group_info":Ft[Xt].includes("all")||!Ft[Xt].length?(delete it.course_group,qt.setFieldsValue(Object(gt.a)({},"course_group_info","all"))):(it.course_group=Ft[Xt],qt.setFieldsValue(Object(gt.a)({},"course_group_info",it.course_group)));break;case"teacher_comment":if(Ft[Xt].includes("all")||!Ft[Xt].length)delete it.teacher_comment,qt.setFieldsValue(Object(gt.a)({},"teacher_comment","all"));else{var In;it.teacher_comment=((In=Ft[Xt])===null||In===void 0?void 0:In.length)===1?Number(Ft[Xt][0]):"",qt.setFieldsValue(Object(gt.a)({},"teacher_comment",Ft[Xt]))}break}}),yt()};Object(l.useEffect)(function(){if(document.getElementById("divhe")){var fn=document.getElementById("divhe").scrollHeight;fn>47&&(me(47),$e(!0))}},[document.getElementById("divhe")]);var An=function(Ft,Xt){it.page=Ft,it.limit=20,yt()};function zn(){$r(1),Va(""),La(""),xa(""),at(""),Vt([])}var cr=[{title:"\u5E8F\u53F7",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:{showTitle:!1},render:function(Ft,Xt,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(Ft){return n.a.createElement(R.a,{placement:"bottomLeft",title:Ft},n.a.createElement("span",{className:"current"},Ft))}},!(Mt!=null&&Mt.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(Ft){return n.a.createElement(R.a,{placement:"bottomLeft",title:Ft||"--"},n.a.createElement("span",{className:"current"},Ft||"--"))}},{title:"\u5206\u73ED",dataIndex:"group_name",align:"center",width:180,ellipsis:{showTitle:!1},render:function(Ft,Xt){return Ft?n.a.createElement(R.a,{placement:"bottom",title:Ft},n.a.createElement("span",{className:"current"},Ft)):"--"}},{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(Ft){return n.a.createElement(C.h,{status:Ft})}},{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(Ft,Xt){return Ft?n.a.createElement(R.a,{placement:"bottomLeft",title:Ft},Ft):"--"}},{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(Ft,Xt){return Ft?n.a.createElement(R.a,{placement:"bottomLeft",title:Ft},Ft):"--"}},{title:"\u901A\u5173\u60C5\u51B5",align:"center",dataIndex:"complete_count",ellipsis:{showTitle:!1},render:function(Ft,Xt){return n.a.createElement("span",null,Ft||0,"/",Mt.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(Ft,Xt){return Ft&&Ft!="--"?n.a.createElement(R.a,{placement:"bottom",title:Ft},n.a.createElement("span",{className:"current"},Ft)):"--"}},!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(Ft,Xt){var In,xn;return Ft>=0&&Ft<=60?xn=n.a.createElement("span",{className:"c-red"},Ft):Ft===100?xn=n.a.createElement("span",{className:"c-green"},Ft):Ft>60?xn=n.a.createElement("span",{className:"c-orange"},Ft):xn="--",n.a.createElement(R.a,{placement:"bottom",title:Xt.ultimate_score?n.a.createElement("div",null,xn==="--"?"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A0\u5206":"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A".concat(Xt.work_score,"\u5206")):n.a.createElement("div",null,n.a.createElement("div",null,Xt.final_score?"\u5173\u5361\u5F97\u5206\uFF1A".concat(Xt.final_score,"\u5206"):"\u5173\u5361\u5F97\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Xt.eff_score?"\u6548\u7387\u8BC4\u5206\uFF1A".concat(Xt.eff_score,"\u5206"):"\u6548\u7387\u8BC4\u5206\uFF1A0\u5206"),n.a.createElement("div",null,Xt.late_penalty?"\u8FDF\u4EA4\u6263\u5206\uFF1A".concat(Xt.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",Xt.view_answer_count,"\u5173"),n.a.createElement("div",null,Xt.work_score?"\u6700\u7EC8\u6210\u7EE9\uFF1A".concat(Xt.work_score,"\u5206"):"\u6700\u7EC8\u6210\u7EE9\uFF1A0\u5206"))},xn)}},{title:"\u6253\u56DE\u6B21\u6570",dataIndex:"redo_count",align:"center",render:function(Ft){return Ft||"- -"}},{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(Ft){return Ft?"\u5DF2\u8BC4\u9605":"\u672A\u8BC4\u9605"}},{title:"\u64CD\u4F5C",dataInex:"action",align:"center",width:70,fixed:"right",ellipsis:!0,className:"workListTable",render:function(Ft,Xt){var In,xn,er;return Object(de.s)()?n.a.createElement("div",null,Object(C.B)(Xt==null?void 0:Xt.work_status)==="\u672A\u5F00\u542F"?n.a.createElement("span",null,"--"):n.a.createElement(d.a,{target:"_blank",onClick:function(Jn){Jn.stopPropagation()},to:"/classrooms/".concat(it.coursesId,"/shixun_homework/").concat(it.categoryId,"/").concat(Xt.id,"/comment")},"\u67E5\u770B")):n.a.createElement("div",null,n.a.createElement("span",{style:{color:"#0152d9"},onClick:function(Jn){Jn.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:"",data:{name:Xt==null?void 0:Xt.user_name,homeworkId:Xt==null?void 0:Xt.id,work_comment:Xt==null?void 0:Xt.work_comment,work_comment_hidden:Xt==null?void 0:Xt.work_comment_hidden}}}})}},Xt.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u8FFD\u52A0\u70B9\u8BC4"),(Xt==null||((In=Xt.shixun_detail)===null||In===void 0||((xn=In[0])===null||xn===void 0))?void 0:xn.game_identifier)&&[1,2,3,4].includes(Xt==null?void 0:Xt.work_status)&&[n.a.createElement("br",null),n.a.createElement("a",{target:"_blank",onClick:function(Jn){var pn;if(Jn.stopPropagation(),Object(de.v)()){var Dn,gr;Object(C.S)("/tasks/".concat(Xt==null||((Dn=Xt.shixun_detail)===null||Dn===void 0||((gr=Dn[0])===null||gr===void 0))?void 0:gr.game_identifier,"?homework_common_id=").concat(pt.categoryId));return}if((pn=tt.userInfo)!==null&&pn!==void 0&&pn.professional_certification){var Sr,Xn;Object(C.S)("/tasks/".concat(Xt==null||((Sr=Xt.shixun_detail)===null||Sr===void 0||((Xn=Sr[0])===null||Xn===void 0))?void 0:Xn.game_identifier,"?homework_common_id=").concat(pt.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")],(Mt==null||((er=Mt.homework_status)===null||er===void 0)?void 0:er[0])!=="\u5DF2\u622A\u6B62"&&!!Xt.myshixun_id&&[n.a.createElement("br",null),n.a.createElement("span",{className:le.a.color32C,onClick:function(Jn){Jn.stopPropagation(),Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:Xt,params:it}})}},"\u6253\u56DE\u91CD\u505A")])}}].filter(function(fn){return!!fn}),hr=function(){var Ft,Xt;return n.a.createElement(ot.a,null,n.a.createElement(ot.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)()&&(Mt==null?void 0:Mt.student_works.length)>0&&n.a.createElement(ot.a.Item,{key:"3"},n.a.createElement(d.a,{onClick:function(xn){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(Mt==null||((Ft=Mt.student_works)===null||Ft===void 0||((Xt=Ft[0])===null||Xt===void 0))?void 0:Xt.id,"/comment")},"\u5B9E\u8BAD\u62A5\u544A")),n.a.createElement(ot.a.Item,{key:"2"},n.a.createElement(d.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")},((_n=Mt.homework_status)===null||_n===void 0?void 0:_n.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(Et.a,null),!!wt.length&&n.a.createElement(B.a,{className:"mb10",dataSource:wt,columns:cr,pagination:!1,showHeader:!1,loading:!1}),!((Nn=Mt.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 ",(Mt==null?void 0:Mt.commit_count)||0," \u4EBA"),n.a.createElement("span",{className:"ml5"},"\u672A\u5F00\u59CB\u505A\u9898 ",(Mt==null?void 0:Mt.uncommit_count)||0," \u4EBA"),(Mt==null?void 0:Mt.left_time)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("span",{className:"ml20 c-black"},Mt==null||((sr=Mt.left_time)===null||sr===void 0)?void 0:sr.status),n.a.createElement("span",{className:"ml20 c-orange-ff9"},Mt==null||((Qn=Mt.left_time)===null||Qn===void 0)?void 0:Qn.time))),Object(de.c)()&&n.a.createElement(n.a.Fragment,null,n.a.createElement(He.a,{form:qt,onChange:cn,initialValues:(Zn={},Object(gt.a)(Zn,"task_status","all"),Object(gt.a)(Zn,"course_group_info","all"),Object(gt.a)(Zn,"teacher_comment","all"),Zn)},((kn=Mt.task_status)===null||kn===void 0?void 0:kn.length)>0&&n.a.createElement(He.a.Item,{name:"task_status"},n.a.createElement(we.a.Group,{value:[],style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(v.a,{className:"font14",flex:"80px"},"\u4F5C\u4E1A\u72B6\u6001:"),n.a.createElement(v.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(v.a,{flex:"1"},Mt.task_status&&Mt.task_status.map(function(fn,Ft){return n.a.createElement(we.a,{name:"task_status",value:fn.id},fn.name,"(",fn.count,")",fn.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)}))))),((vr=Mt.course_group_info)===null||vr===void 0?void 0:vr.length)>0&&n.a.createElement(He.a.Item,{name:"course_group_info"},n.a.createElement(we.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(v.a,{className:"font14",flex:"80px"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(v.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(v.a,{flex:"1",id:"divhe",style:{height:Ce+"px",overflow:"hidden"}},(Hn=Mt.course_group_info)===null||Hn===void 0?void 0:Hn.map(function(fn,Ft){return n.a.createElement(we.a,{value:fn.course_group_id},fn.group_group_name,"(",fn.count,")")})),st&&n.a.createElement("span",{onClick:function(){var Ft=document.getElementById("divhe").scrollHeight;Ce>47?me(47):me(Ft)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},Ce===47?"\u5C55\u5F00":"\u6536\u8D77",Ce===47?n.a.createElement(jt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):n.a.createElement($t.a,{style:{marginBottom:"3px",marginLeft:"2px"}}))))),((ir=Mt.teacher_comment)===null||ir===void 0?void 0:ir.length)>0&&n.a.createElement(He.a.Item,{name:"teacher_comment"},n.a.createElement(we.a.Group,{style:{width:"100%"}},n.a.createElement(_.a,null,n.a.createElement(v.a,{className:"font14",flex:"80px"},"\u8FFD\u52A0\u70B9\u8BC4:"),n.a.createElement(v.a,{flex:"80px"},n.a.createElement(we.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(v.a,{flex:"1"},Mt.teacher_comment&&Mt.teacher_comment.map(function(fn,Ft){return n.a.createElement(we.a,{value:String(fn.id)},fn.name,"(",fn.count,")")})))))),n.a.createElement(_.a,{align:"middle"},n.a.createElement(v.a,{flex:"1"},n.a.createElement(_.a,{align:"middle"},n.a.createElement(v.a,null,n.a.createElement(p.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Ft){it.search=Ft,it.page=1,yt()},style:{width:240}})),n.a.createElement(v.a,null,n.a.createElement("span",{className:"ml5"},n.a.createElement("span",{className:"c-red"},Mt.work_count),"\u4E2A\u68C0\u7D22\u7ED3\u679C\uFF08",Mt.work_count,"\u4E2A\u5B66\u751F\uFF09")))),n.a.createElement(v.a,null,Object(de.c)()&&Mt.code_review&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",selectArrs:Mt.student_works.map(function(Ft){return Ft.id}),params:it}})}},n.a.createElement("span",{className:"".concat(le.a.tr1," iconfont icon-daimachazhong")}),"\u4EE3\u7801\u67E5\u91CD"),Object(de.c)()&&Wt&&n.a.createElement(U.a,{className:"ml10",onClick:rn},n.a.createElement("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"\u66F4\u65B0\u6210\u7EE9"),(Mt==null||((lr=Mt.homework_status)===null||lr===void 0)?void 0:lr.includes("\u5DF2\u622A\u6B62"))&&!(Me!=null&&Me.setting.hide_quality_analysis)&&Object(de.c)()&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u8D28\u91CF\u68C0\u6D4B",selectArrs:Mt.student_works.map(function(Ft){return Ft.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:Mt.student_works.map(function(Ft){return Ft.id}),params:it}})}},n.a.createElement(Ie.a,{className:"mr5"}),"\u4E00\u952E\u70B9\u8BC4"),((Mt==null||((Ln=Mt.homework_status)===null||Ln===void 0)?void 0:Ln.includes("\u63D0\u4EA4\u4E2D"))||(Mt==null||((Cr=Mt.homework_status)===null||Cr===void 0)?void 0:Cr.includes("\u8865\u4EA4\u4E2D"))||(Mt==null||((Lr=Mt.homework_status)===null||Lr===void 0)?void 0:Lr.includes("\u8FDB\u884C\u4E2D")))&&n.a.createElement(U.a,{className:"ml10",onClick:function(){Tn(!0)}},"\u4E00\u952E\u6253\u56DE"),Object(de.c)()&&n.a.createElement(ie.a,{overlay:hr,className:"ml10"},n.a.createElement(U.a,null,n.a.createElement(Ae.a,null),"\u5BFC\u51FA",n.a.createElement(ct.a,null)))))),n.a.createElement(_.a,{style:{justifyContent:"end",marginTop:"5px"}},Object(de.c)()&&Wt&&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(Ft){return{onClick:function(In){window.open("/classrooms/".concat(it.coursesId,"/shixun_homework/").concat(it.categoryId,"/").concat(Ft.id,"/comment"),"_blank")}}},scroll:{x:1500},dataSource:Mt.student_works,columns:cr,onChange:function(Ft,Xt,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"),yt()}}),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:bt,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(i.a)(c.a.mark(function fn(){var Ft,Xt;return c.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:if(!(jr===2)){xn.next=13;break}if(!(dn.length<=0)){xn.next=4;break}return b.b.info("\u8BF7\u9009\u62E9\u4F5C\u4E1A\u72B6\u6001"),xn.abrupt("return");case 4:if(et){xn.next=7;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),xn.abrupt("return");case 7:return xn.next=9,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:et,status:dn}});case 9:Ft=xn.sent,Ft.status===0&&(Vn(Ft),Tn(!1),Wn(!0)),xn.next=32;break;case 13:if(!(qr===0||aa===0)){xn.next=16;break}xn.next=22;break;case 16:if(qr){xn.next=19;break}return b.b.info("\u6700\u4F4E\u5206\u4E0D\u80FD\u4E3A\u7A7A"),xn.abrupt("return");case 19:if(aa){xn.next=22;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u4E3A\u7A7A"),xn.abrupt("return");case 22:if(!(qr>aa)){xn.next=25;break}return b.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u5927\u4E8E\u6700\u4F4E\u5206"),xn.abrupt("return");case 25:if(et){xn.next=28;break}return b.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),xn.abrupt("return");case 28:return xn.next=30,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:et,min_score:qr,max_score:aa}});case 30:Xt=xn.sent,Xt.status===0&&(Vn(Xt),Tn(!1),Wn(!0));case 32:case"end":return xn.stop()}},fn)})),onCancel:function(){Tn(!1),zn()}},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:jr,onChange:function(Ft){$r(Ft.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"))),jr===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:qr,onChange:function(Ft){return xa(Ft)},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:aa,onChange:function(Ft){return La(Ft)},style:{width:"100px"}})),jr===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(Ft){Vt(Object(g.a)(Ft))},style:{width:"100%"}},(Tr=Mt.task_status)===null||Tr===void 0?void 0:Tr.map(function(fn,Ft){return n.a.createElement(we.a,{name:"task_status",value:fn.id},fn.name,"(",fn.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(Ft){return at(Ft)},placeholder:"\u8BF7\u586B\u5199\u8BC4\u8BED"}))))),n.a.createElement(f.a,{visible:yr,title:"\u6253\u56DE\u786E\u8BA4",onOk:Object(i.a)(c.a.mark(function fn(){var Ft,Xt;return c.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:if(!(jr===2)){xn.next=7;break}return xn.next=3,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:et,status:dn}});case 3:Ft=xn.sent,Ft.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),zn(),yt(),Wn(!1)),xn.next=11;break;case 7:return xn.next=9,Object(z.a)("/api/homework_commons/".concat(it.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:it.categoryId,comment:et,min_score:qr,max_score:aa}});case 9:Xt=xn.sent,Xt.status===0&&(b.b.info("\u6253\u56DE\u6210\u529F"),zn(),yt(),Wn(!1));case 11:case"end":return xn.stop()}},fn)})),onCancel:function(){zn(),Wn(!1)}},n.a.createElement("div",{style:{padding:"32px"}},jr===1&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u6210\u7EE9\u5728",qr,"-",aa,"\u7684\u5B66\u751F\u8FDB\u884C\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),jr===2&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u4F5C\u4E1A\u72B6\u6001\u4E3A",((fr=Mt.task_status)===null||fr===void 0?void 0:fr.filter(function(fn){return dn==null?void 0:dn.includes(fn.id)}).map(function(fn){return fn.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",Bn==null?void 0:Bn.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:An,current:it.page||1,defaultPageSize:20,total:Mt.work_count})))},on=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading,Nn=mn.user,sr=mn.globalSetting;return{shixunHomeworks:sn,loading:_n.effects,globalSetting:sr,user:Nn}})(Qt),vt=L("fOrg"),Kt=L("+KLJ"),Ot=function(sn){var _n,Nn=sn.shixunHomeworks,sr=sn.loading,Qn=sn.dispatch,Zn=Object(s.i)(),kn=Object(l.useState)(Object(T.a)(Object(T.a)({},{page:1,limit:20,group_ids:[]}),Zn)),vr=Object(a.a)(kn,2),Hn=vr[0],ir=vr[1],lr=Object(s.h)(),Ln=Nn.codeReview,Cr=Object(l.useState)({}),Lr=Object(a.a)(Cr,2),Tr=Lr[0],fr=Lr[1],ne=He.a.useForm(),Re=Object(a.a)(ne,1),Xe=Re[0];Hn.order="code_rate",Hn.sort="desc",Hn.category=Hn.categoryId,Object(l.useEffect)(function(){Me(),console.log("params",Hn)},[Hn]),Object(l.useEffect)(function(){Nn.actionTabs.key==="\u6267\u884C\u4EE3\u7801\u67E5\u91CD"&&Me()},[Nn.actionTabs.key]);var Me=function(){var mt=Object(i.a)(c.a.mark(function Dt(){var it;return c.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Qn({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},Hn)});case 2:it=Yt.sent,it.status===-2&&setTimeout(function(){return Me()},1500);case 4:case"end":return Yt.stop()}},Dt)}));return function(){return mt.apply(this,arguments)}}(),lt=function(){},tt=function(Dt,it){Hn.page=Dt,Hn.limit=20,Qn({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},Hn)})},pt=[{title:"\u5E8F\u53F7",dataIndex:"number",render:function(Dt,it,Jt){return Hn.limit*(Hn.page-1)+Jt+1}},{title:"\u59D3\u540D",dataIndex:"username"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u76F8\u4F3C\u5EA6",dataIndex:"code_rate",render:function(Dt){return n.a.createElement("span",{className:"c-orange"},Dt)}},{title:"\u64CD\u4F5C",dataInex:"action",render:function(Dt,it){return n.a.createElement("div",null,n.a.createElement(d.a,{target:"_blank",to:"/classrooms/".concat(Hn.coursesId,"/shixun_homework/").concat(Hn.categoryId,"/review_detail/").concat(it.user_id)},"\u67E5\u770B"),n.a.createElement("br",null))}}];return n.a.createElement("section",{className:"minH500 bg-white pl30 pr30 pt10"},(Ln==null?void 0:Ln.status)===-2&&n.a.createElement(Kt.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(v.a,{flex:"1"},n.a.createElement("p",{className:"mt10"},"\u67E5\u91CD\u65F6\u95F4\uFF1A",Ln.last_review_time,n.a.createElement(U.a,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){Qn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",params:Hn}})}},"\u4EE3\u7801\u67E5\u91CD"))),n.a.createElement(v.a,null,n.a.createElement(p.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Dt){Hn.search=Dt,Qn({type:"shixunHomeworks/getCodeReview",payload:Hn})},style:{width:200}}),n.a.createElement("span",{className:"ml5 c-red"}))),((_n=Ln.group_info)===null||_n===void 0?void 0:_n.length)>0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(_.a,null,n.a.createElement(v.a,{flex:"80px",className:"font14"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(v.a,{flex:"80px"},n.a.createElement(we.a,{checked:Hn.group_ids=="",value:"all",onChange:function(Dt){delete Hn.group_ids,Hn.group_ids=[],Hn.page=1,ir(Object(T.a)({},Hn))}},"\u5168\u90E8")),n.a.createElement(v.a,{flex:"1"},Ln.group_info&&Ln.group_info.map(function(mt,Dt){return n.a.createElement(we.a,{value:mt.id,checked:Hn.group_ids.includes(mt.id),onChange:function(Jt){Jt.target.checked?Hn.group_ids.push(mt.id):Hn.group_ids.splice(Hn.group_ids.indexOf(mt.id),1),Hn.page=1,ir(Object(T.a)({},Hn))}},mt.name,"(",mt.members_count,")")}))),n.a.createElement(_.a,{className:"font14 c-red mt5"},n.a.createElement(v.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"},Ln.copy_reviews_count),"\u4E2A\u7591\u4F3C\u6284\u88AD\u4F5C\u54C1\uFF08",Ln.all_reviews_count,"\u4F5C\u54C1\uFF09"),n.a.createElement(B.a,{className:"mt30",loading:sr["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:Ln.users_reviews,columns:pt,onChange:function(Dt,it,Jt){Jt.order==="ascend"&&(Hn.b_order="asc"),Jt.order==="descend"&&(Hn.b_order="desc"),Jt.order||delete Hn.b_order,Qn({type:"shixunHomeworks/getCodeReview",payload:Object(T.a)({},Hn)})}}),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(w.a,{showSizeChanger:!1,onChange:tt,defaultCurrent:Hn.page||1,current:Hn.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:Ln.copy_reviews_count})))},Rt=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(Ot),ft=L("OaEy"),be=L("2fM7"),Fe=L("iQDF"),Ut=L("+eQT"),_t=L("zetH"),Gt=L.n(_t),en=L("eozf"),Ge=L("LvDl"),dt=Ut.a.RangePicker,Pt=be.a.Option,zt=function(sn){var _n=sn.shixunHomeworks,Nn=sn.loading,sr=sn.dispatch,Qn=Object(s.i)(),Zn=Object(s.h)(),kn=_n.workSetting,vr=_n.workList,Hn=_n.changeData,ir=Object(l.useState)(!0),lr=Object(a.a)(ir,2),Ln=lr[0],Cr=lr[1],Lr=Object(l.useState)({}),Tr=Object(a.a)(Lr,2),fr=Tr[0],ne=Tr[1],Re=Object(l.useState)(!1),Xe=Object(a.a)(Re,2),Me=Xe[0],lt=Xe[1],tt=He.a.useForm(),pt=Object(a.a)(tt,1),mt=pt[0],Dt=Object(l.useState)([]),it=Object(a.a)(Dt,2),Jt=it[0],Yt=it[1],At=Object(l.useState)([]),qt=Object(a.a)(At,2),Je=qt[0],tn=qt[1],Wt=Object(l.useState)(!1),yn=Object(a.a)(Wt,2),Rn=yn[0],Pn=yn[1],Mt=Object(l.useState)([]),Ht=Object(a.a)(Mt,2),Cn=Ht[0],En=Ht[1],wt=Object(l.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),kt=It[0],Ct=It[1];Object(l.useEffect)(function(){return bt(),function(){Yt([].concat())}},[]);var bt=function(){sr({type:"shixunHomeworks/getWorkSetting",payload:Object(T.a)({},Qn)})};Object(l.useEffect)(function(){if(!(kn!=null&&kn.course_id))return;Object.keys(kt).map(function(dn){kt[dn]=kn[dn]}),(!kt.allow_late||!kt.unified_late)&&(kt.late_penalty=5),Jt=JSON.parse(JSON.stringify(kn.group_settings.map(function(dn){return Object(T.a)(Object(T.a)({},dn),{},{group_name:[dn.group_name]})}).filter(function(dn){return dn.publish_time!==null}))),Je=JSON.parse(JSON.stringify(kn.allow_late_settings.map(function(dn){return Object(T.a)(Object(T.a)({},dn),{},{group_name:[dn.group_name]})}).filter(function(dn){return dn.late_time!==null}))),Ct(Object(T.a)({},kt)),Yt(Object(g.a)(Jt)),tn(Object(g.a)(Je))},[kn]);var Tn=function(){var Vt,wn,Gn=JSON.parse(JSON.stringify(kt));if(Gn.challenge_settings.filter(function(Wn){return!Wn.hide}),Gn.categoryId=Qn.categoryId,(Vt=Gn.challenge_settings)!==null&&Vt!==void 0&&Vt.every(function(Wn){return!Wn.checked})){b.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(kt.unified_setting||(Jt=(wn=Jt)===null||wn===void 0?void 0:wn.map(function(Wn){var kr;if(!Wn.publish_time||!Wn.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(!Wn.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Wn.group_name=typeof(Wn==null?void 0:Wn.group_name)=="string"?[Wn==null?void 0:Wn.group_name]:Wn==null?void 0:Wn.group_name,Wn.group_id=(kr=kn.group_settings)===null||kr===void 0?void 0:kr.filter(function(Yr){var Bn;return Wn==null||((Bn=Wn.group_name)===null||Bn===void 0)?void 0:Bn.includes(Yr.group_name)}).map(function(Yr){return Yr.group_id||Yr.id}).toString().split(","),Wn})),Gn.group_settings=Jt,kt.allow_late)if(kt.unified_late){if(kt.late_penalty===null||kt.late_penalty===void 0||kt.late_penalty<0||kt.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(!kt.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 yr;Je=(yr=Je)===null||yr===void 0?void 0:yr.map(function(Wn){var kr,Yr;if(Wn.late_penalty===null||Wn.late_penalty===void 0||Wn.late_penalty<0||Wn.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(!Wn.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(!Wn.group_name)throw b.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Wn.group_name=typeof(Wn==null?void 0:Wn.group_name)=="string"?[Wn==null?void 0:Wn.group_name]:Wn==null?void 0:Wn.group_name,Wn.group_id=Wn==null||((kr=Wn.group_name)===null||kr===void 0||((Yr=kr.map(function(Bn){var Vn,qn,Rr=(Vn=kn.group_settings)===null||Vn===void 0||((qn=Vn.filter(function(jr){return(jr==null?void 0:jr.group_name)===Bn}))===null||qn===void 0)?void 0:qn[0];return Rr==null?void 0:Rr.group_id}))===null||Yr===void 0))?void 0:Yr.toString().split(","),Wn}),Gn.allow_late_settings=Je}Zt(Gn)},Zt=function(Vt){var wn,Gn;if(console.log(Vt.total_score,Vt.eff_score),Vt.total_score===null){b.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Vt!=null&&Vt.work_efficiency&&Vt.eff_score===null){b.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var yr=Vt.challenge_settings.reduce(function(Yr,Bn){return Yr+Number(Bn.challenge_score)},0);if((yr==null?void 0:yr.toFixed(10))!==((wn=Vt.total_score-Vt.eff_score)===null||wn===void 0?void 0:wn.toFixed(10))){b.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(Vt.total_score,"\u5206"));return}var Wn={shixun_evaluation:Vt.shixun_evaluation,challenge_settings:Vt.challenge_settings},kr=function(){var Yr=Object(i.a)(c.a.mark(function Bn(){var Vn;return c.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return lt(!0),Rr.next=3,Object(z.a)("/api/homework_commons/".concat(Qn.categoryId,"/public_setting.json"),{method:"post",body:Object(T.a)({},Vt)});case 3:Vn=Rr.sent,Vn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),Cr(!0),bt(),sr({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},Qn)})),lt(!1);case 6:case"end":return Rr.stop()}},Bn)}));return function(){return Yr.apply(this,arguments)}}();!Object(Ge.isEqual)(Hn,Wn)&&!(vr!=null&&(Gn=vr.homework_status)!==null&&Gn!==void 0&&Gn.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:kr}):kr()},Sn=Object(l.useMemo)(function(){return kt.public_after_abort?"public_after_abort":kt.public_after_over?"public_after_over":"immediately"},[kt]);return n.a.createElement("section",{className:[Gt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(v.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u516C\u5F00\u8BBE\u7F6E")),n.a.createElement(v.a,null,(kn==null?void 0:kn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Cr(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(v.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:kt.score_open,disabled:Ln,onChange:function(Vt){kt.score_open=Vt.target.checked,Ct(Object.assign({},kt))}},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(v.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:kt.answer_public,disabled:Ln,onChange:function(Vt){Vt.target.checked?Ct(function(wn){return Object(T.a)(Object(T.a)({},wn),{},{answer_public:Vt.target.checked})}):Ct(function(wn){return Object(T.a)(Object(T.a)({},wn),{},{answer_public:Vt.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)")),kt.answer_public&&n.a.createElement(v.a,{span:24,className:"mt10 pl30"},n.a.createElement(ke.a.Group,{style:{marginLeft:22},onChange:function(Vt){Vt.target.value==="public_after_abort"?Ct(function(wn){return Object(T.a)(Object(T.a)({},wn),{},{public_after_abort:!0,public_after_over:!1})}):Vt.target.value==="public_after_over"?Ct(function(wn){return Object(T.a)(Object(T.a)({},wn),{},{public_after_abort:!1,public_after_over:!0})}):Ct(function(wn){return Object(T.a)(Object(T.a)({},wn),{},{public_after_abort:!1,public_after_over:!1})})},value:Sn,disabled:Ln},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(v.a,{span:24,className:"mt15 pl30"},n.a.createElement(we.a,{checked:kt.forbid_copy_answers,disabled:Ln,onChange:function(Vt){kt.forbid_copy_answers=Vt.target.checked,Ct(Object.assign({},kt))}},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(v.a,{span:24,className:"mt15 pl30 pb40"},n.a.createElement(we.a,{checked:kt.comment_public,disabled:Ln,onChange:function(Vt){kt.comment_public=Vt.target.checked,Ct(Object.assign({},kt))}},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)")),!Ln&&n.a.createElement(v.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",loading:Me,onClick:function(){return Tn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Cr(!0),bt()}},"\u53D6\u6D88"))),n.a.createElement(f.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:Rn,onCancel:function(){return Pn(!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(Vt){}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Vt,wn){En(Vt)}},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(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(zt),vn=function(sn){var _n=sn.shixunHomeworks,Nn=sn.loading,sr=sn.dispatch,Qn=Object(s.i)(),Zn=_n.workSetting,kn=_n.workList,vr=_n.changeData,Hn=Object(l.useState)(!0),ir=Object(a.a)(Hn,2),lr=ir[0],Ln=ir[1],Cr=Object(l.useState)(!1),Lr=Object(a.a)(Cr,2),Tr=Lr[0],fr=Lr[1],ne=Object(l.useState)(!1),Re=Object(a.a)(ne,2),Xe=Re[0],Me=Re[1],lt=Object(l.useState)([]),tt=Object(a.a)(lt,2),pt=tt[0],mt=tt[1],Dt=Object(l.useState)([]),it=Object(a.a)(Dt,2),Jt=it[0],Yt=it[1],At=Object(l.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"}),qt=Object(a.a)(At,2),Je=qt[0],tn=qt[1];Object(l.useEffect)(function(){return Wt(),function(){mt([].concat())}},[]);var Wt=function(){sr({type:"shixunHomeworks/getWorkSetting",payload:Object(T.a)({},Qn)})};Object(l.useEffect)(function(){if(!(Zn!=null&&Zn.course_id))return;Object.keys(Je).map(function(Mt){Je[Mt]=Zn[Mt]}),(!Je.allow_late||!Je.unified_late)&&(Je.late_penalty=5),pt=JSON.parse(JSON.stringify(Zn.group_settings.map(function(Mt){return Object(T.a)(Object(T.a)({},Mt),{},{group_name:[Mt.group_name]})}).filter(function(Mt){return Mt.publish_time!==null}))),Jt=JSON.parse(JSON.stringify(Zn.allow_late_settings.map(function(Mt){return Object(T.a)(Object(T.a)({},Mt),{},{group_name:[Mt.group_name]})}).filter(function(Mt){return Mt.late_time!==null}))),tn(Object(T.a)(Object(T.a)({},Je),{},{difficulty_level_sort:Je.difficulty_level_sort||"asc"})),mt(Object(g.a)(pt)),Yt(Object(g.a)(Jt))},[Zn]);var yn=function(){var Ht,Cn,En=JSON.parse(JSON.stringify(Je));if(En.challenge_settings.filter(function(It){return!It.hide}),En.categoryId=Qn.categoryId,(Ht=En.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(Je.unified_setting||(pt=(Cn=pt)===null||Cn===void 0?void 0:Cn.map(function(It){var kt;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=(kt=Zn.group_settings)===null||kt===void 0?void 0:kt.filter(function(Ct){var bt;return It==null||((bt=It.group_name)===null||bt===void 0)?void 0:bt.includes(Ct.group_name)}).map(function(Ct){return Ct.group_id||Ct.id}).toString().split(","),It})),En.group_settings=pt,Je.allow_late)if(Je.unified_late){if(Je.late_penalty===null||Je.late_penalty===void 0||Je.late_penalty<0||Je.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(!Je.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;Jt=(wt=Jt)===null||wt===void 0?void 0:wt.map(function(It){var kt,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||((kt=It.group_name)===null||kt===void 0||((Ct=kt.map(function(bt){var Tn,Zt,Sn=(Tn=Zn.group_settings)===null||Tn===void 0||((Zt=Tn.filter(function(dn){return(dn==null?void 0:dn.group_name)===bt}))===null||Zt===void 0)?void 0:Zt[0];return Sn==null?void 0:Sn.group_id}))===null||Ct===void 0))?void 0:Ct.toString().split(","),It}),En.allow_late_settings=Jt}Rn(En)},Rn=function(Ht){var Cn,En;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,bt){return Ct+Number(bt.challenge_score)},0);if((wt==null?void 0:wt.toFixed(10))!==((Cn=Ht.total_score-Ht.eff_score)===null||Cn===void 0?void 0:Cn.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},kt=function(){var Ct=Object(i.a)(c.a.mark(function bt(){var Tn;return c.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:return fr(!0),Sn.next=3,Object(z.a)("/api/homework_commons/".concat(Qn.categoryId,"/score_setting.json"),{method:"post",body:Object(T.a)({},Ht)});case 3:Tn=Sn.sent,Tn.status===0&&(b.b.success("\u66F4\u65B0\u6210\u529F"),Ln(!0),Wt(),sr({type:"shixunHomeworks/getWorkList",payload:Object(T.a)({},Qn)})),fr(!1);case 6:case"end":return Sn.stop()}},bt)}));return function(){return Ct.apply(this,arguments)}}();!Object(Ge.isEqual)(vr,It)&&!(kn!=null&&(En=kn.homework_status)!==null&&En!==void 0&&En.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:kt}):kt()},Pn=function(){var Ht,Cn=Je.eff_score,En=Je.total_score,wt=Je.difficulty_level_sort,It=En-Cn,kt=(Ht=Je.challenge_settings)===null||Ht===void 0?void 0:Ht.filter(function(wn){return wn.checked}).length;if(!kt){Je.challenge_settings.map(function(wn,Gn){wn.challenge_score=0});return}var Ct=Je.challenge_settings.filter(function(wn){return wn.checked}).map(function(wn){return wt==="desc"?wn.challenge_exp_desc:wn.challenge_exp}).reduce(function(wn,Gn){return wn+Gn}),bt=It/Ct,Tn=0,Zt=0,Sn;switch(Je.shixun_evaluation){case 0:var dn=parseFloat((It/kt).toFixed(1));Je.challenge_settings.map(function(wn,Gn){wn.checked?(Tn=Gn,wn.challenge_score=dn>0?dn:0):wn.challenge_score=0}),Sn=(It-dn*(kt-1)).toFixed(1),Je.challenge_settings[Tn].challenge_score=Sn>0?Sn:0;break;case 1:Je.challenge_settings.map(function(wn,Gn){wn.checked?(Tn=Gn,Zt+=Number((Math.round((wt==="desc"?wn.challenge_exp_desc:wn.challenge_exp)*bt*10)/10).toFixed(1)),wn.challenge_score=(Math.round((wt==="desc"?wn.challenge_exp_desc:wn.challenge_exp)*bt*10)/10).toFixed(1)):wn.challenge_score=0});var Vt=Je.challenge_settings[Tn].challenge_score;Sn=(It-Zt+Number(Vt)).toFixed(1),Je.challenge_settings[Tn].challenge_score=Sn>0?Sn:0;break}};return n.a.createElement("section",{className:[Gt.a.form," bg-white pl30 pr30 pt10 mb20 pb10"].join(" ")},n.a.createElement(_.a,{className:"mt25"},n.a.createElement(v.a,{flex:"1"}),n.a.createElement(v.a,null,(Zn==null?void 0:Zn.can_edit)&&n.a.createElement(U.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return Ln(!1)}},"\u7F16\u8F91\u8BBE\u7F6E")),n.a.createElement(v.a,{span:24,className:"pl30 mt10"},n.a.createElement("strong",null,"\u603B\u5206\u503C\uFF1A"),n.a.createElement(rt.a,{min:0,value:Je.total_score,disabled:lr,onChange:function(Ht){Je.total_score=Ht,tn(Object.assign({},Je)),Pn()}}),"\xA0\u5206"),n.a.createElement(v.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(v.a,{flex:"1"},n.a.createElement(we.a,{disabled:lr,checked:Je.work_efficiency,onChange:function(Ht){Je.work_efficiency=Ht.target.checked,Je.work_efficiency?Je.eff_score=20:Je.eff_score=0,tn(Object.assign({},Je)),Pn()}},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(v.a,{className:Gt.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(v.a,null,n.a.createElement("span",{className:"mr5"},"\u6548\u7387\u5206"),n.a.createElement(rt.a,{min:0,disabled:lr||!Je.work_efficiency,value:Je.eff_score,step:.1,onChange:function(Ht){Je.eff_score=Ht,tn(Object.assign({},Je)),Pn()}}),n.a.createElement("span",null,"\xA0\u5206"))),n.a.createElement(_.a,{align:"middle",style:{paddingLeft:105,marginTop:"20px"}},n.a.createElement(v.a,null,n.a.createElement("span",{className:"mr5"},"\u5B9E\u8BAD\u8017\u65F6\u89C4\u5219\uFF1A"),n.a.createElement(ke.a.Group,{disabled:lr,value:Je.training_time_rules,onChange:function(Ht){Je.training_time_rules=Ht.target.value,tn(Object.assign({},Je)),Pn()}},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(),Me(!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(v.a,null,n.a.createElement("strong",null,"\u5173\u5361\u4EFB\u52A1\u5206\u503C\u8BBE\u7F6E\u89C4\u5219")),n.a.createElement(v.a,{flex:"1"},n.a.createElement("div",{className:"ml5"},n.a.createElement(ke.a.Group,{disabled:lr,value:Je.shixun_evaluation,onChange:function(Ht){Je.shixun_evaluation=Ht.target.value,Ht.target.value!==1&&(Je.difficulty_level_sort="asc"),tn(Object.assign({},Je)),Pn()}},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:Je.shixun_evaluation===1?"flex":"none"}},n.a.createElement(ke.a.Group,{disabled:lr,value:Je.difficulty_level_sort||"asc",onChange:function(Ht){Je.difficulty_level_sort=Ht.target.value,tn(Object.assign({},Je)),Pn()}},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(v.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)"))),Je.challenge_settings&&Je.challenge_settings.map(function(Mt,Ht){return n.a.createElement(_.a,{key:Ht,align:"middle",style:{paddingLeft:275,marginTop:20}},n.a.createElement(v.a,{flex:"1"},n.a.createElement(we.a,{disabled:lr||!(Zn!=null&&Zn.task_pass),checked:Mt.checked,onChange:function(En){var wt=Object(Ge.cloneDeep)(Je.challenge_settings);if(wt[Ht].checked=En.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}Je.challenge_settings[Ht].checked=En.target.checked,Je.challenge_settings[Ht].hide=En.target.checked,Je.shixun_evaluation===2&&!En.target.checked&&(Je.challenge_settings[Ht].challenge_score=0),tn(Object(T.a)({},Je)),Pn()}},n.a.createElement("strong",null,Mt.challenge_name))),n.a.createElement(v.a,null,!Mt.checked&&n.a.createElement("span",{className:"tag-style-border-small bg-orange border-raduis-50 c-white mr10"},"\u53EF\u4E0D\u505A")),n.a.createElement(v.a,{flex:"150px"},n.a.createElement(rt.a,{min:0,step:.1,value:Mt.challenge_score,disabled:lr||Je.shixun_evaluation!==2||!Mt.checked,onChange:function(En){Je.challenge_settings[Ht].challenge_score=En,tn(Object(T.a)({},Je))}}),n.a.createElement("span",{className:"ml10"},"\u5206")),n.a.createElement(v.a,{flex:"300px"},n.a.createElement("span",{className:"tag-style-border-small bg-green c-white mr10"},Mt.difficulty),"\u91D1\u5E01\u5956\u52B1\u6570\uFF1A ",Mt.challenge_exp))}),n.a.createElement(_.a,{className:"mt30",style:{paddingLeft:65}},n.a.createElement(v.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:lr,value:Je.answer_open_evaluation,onChange:function(Ht){Je.answer_open_evaluation=Ht.target.value,tn(Object(T.a)({},Je))}},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")))),!lr&&n.a.createElement(v.a,{className:"mb50",style:{marginTop:"10px"}},n.a.createElement(U.a,{type:"primary",size:"large",loading:Tr,onClick:function(){return yn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){Ln(!0),Wt()}},"\u53D6\u6D88")),n.a.createElement(f.a,{visible:Xe,width:860,onCancel:function(){Me(!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"))))},nr=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(vn),Kn=function(sn){var _n,Nn,sr=sn.shixunHomeworks,Qn=sn.loading,Zn=sn.dispatch,kn=Object(l.useState)(!0),vr=Object(a.a)(kn,2),Hn=vr[0],ir=vr[1],lr=Object(l.useState)(!1),Ln=Object(a.a)(lr,2),Cr=Ln[0],Lr=Ln[1],Tr=Object(l.useState)([]),fr=Object(a.a)(Tr,2),ne=fr[0],Re=fr[1],Xe=Object(l.useState)([]),Me=Object(a.a)(Xe,2),lt=Me[0],tt=Me[1],pt=Object(l.useState)([]),mt=Object(a.a)(pt,2),Dt=mt[0],it=mt[1],Jt=Object(l.useState)([]),Yt=Object(a.a)(Jt,2),At=Yt[0],qt=Yt[1],Je=Object(s.i)();function tn(){return Wt.apply(this,arguments)}function Wt(){return Wt=Object(i.a)(c.a.mark(function Mt(){var Ht;return c.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.next=2,Object(z.a)("/api/homework_commons/".concat(Je.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:Ht=En.sent,tt(Ht);case 4:case"end":return En.stop()}},Mt)})),Wt.apply(this,arguments)}function yn(){return Rn.apply(this,arguments)}function Rn(){return Rn=Object(i.a)(c.a.mark(function Mt(){var Ht;return c.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.next=2,Object(z.a)("/api/courses/".concat(Je==null?void 0:Je.coursesId,"/teachers"),{method:"get",params:{homework_id:Je.categoryId}});case 2:Ht=En.sent,Ht==null||Ht.teacher_list.map(function(wt){wt.key=wt.user_id}),it(Ht==null?void 0:Ht.teacher_list),qt(Ht==null?void 0:Ht.teacher_list);case 6:case"end":return En.stop()}},Mt)})),Rn.apply(this,arguments)}Object(l.useEffect)(function(){tn(),yn()},[Je]);var Pn=function(){};return n.a.createElement("section",{className:[Gt.a.form," bg-white pl30 pr30 pt10"].join(" ")},n.a.createElement(_.a,null,n.a.createElement(v.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u534F\u4F5C\u8BBE\u7F6E"),(lt==null?void 0:lt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){Lr(!0)}},"+\u6DFB\u52A0\u534F\u4F5C\u8005"))),n.a.createElement(_.a,{style:{marginTop:"20px",marginBottom:"20px"}},(lt==null||((_n=lt.data)===null||_n===void 0)?void 0:_n.length)<=0&&n.a.createElement(Et.a,{customText:"\u8BE5\u4F5C\u4E1A\u6682\u65E0\u534F\u4F5C\u8005"}),lt==null||((Nn=lt.data)===null||Nn===void 0)?void 0:Nn.map(function(Mt){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"}},Mt==null?void 0:Mt.real_name),(lt==null?void 0:lt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(i.a)(c.a.mark(function Ht(){var Cn;return c.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Object(z.a)("/api/homework_commons/".concat(Je.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:Mt.id}});case 2:Cn=wt.sent,Cn.status===0&&(b.b.info("\u5220\u9664\u6210\u529F"),tn(),yn());case 4:case"end":return wt.stop()}},Ht)}))},"X"))})),n.a.createElement(_.a,null,!Hn&&n.a.createElement(v.a,{className:"mb50"},n.a.createElement(U.a,{type:"primary",size:"large",onClick:function(){return Pn()}},"\u63D0\u4EA4"),n.a.createElement(U.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){ir(!0)}},"\u53D6\u6D88"))),n.a.createElement(f.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:Cr,onCancel:function(){return Lr(!1)},onOk:Object(i.a)(c.a.mark(function Mt(){var Ht;return c.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(!(ne.length===0)){En.next=3;break}return b.b.info("\u8BF7\u9009\u62E9\u534F\u4F5C\u8001\u5E08"),En.abrupt("return");case 3:return En.next=5,Object(z.a)("/api/homework_commons/".concat(Je.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:ne}});case 5:Ht=En.sent,Ht.status===0&&(b.b.info("\u6DFB\u52A0\u6210\u529F"),Re([]),tn(),yn(),Lr(!1));case 7:case"end":return En.stop()}},Mt)}))},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){it(At.filter(function(Cn){return Cn.name.indexOf(Ht.target.value)>-1}))}})),n.a.createElement(B.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Ht,Cn){Re(Ht)},selectedRowKeys:ne,getCheckboxProps:function(Ht){return{disabled:Ht.is_collaborator}}},pagination:!1,dataSource:Dt,columns:[{title:"\u59D3\u540D",dataIndex:"name",key:"name"},{title:"\u89D2\u8272",dataIndex:"role",key:"role"}]}))))},bn=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(Kn),xr=Ut.a.RangePicker,Er=be.a.Option,ar=function(sn){var _n=sn.shixunHomeworks,Nn=sn.loading,sr=sn.dispatch;return n.a.createElement("section",{className:[Gt.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(en.a,null)),n.a.createElement(F.a.TabPane,{tab:"\u8BC4\u5206\u8BBE\u7F6E",key:2},n.a.createElement(nr,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(bn,null))))},dr=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(ar),Or=L("lO7E"),Kr=L.n(Or),ia=L("cVA7"),hn=L.n(ia),or=function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return console.log("---",sn,_n,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:_n},{name:"\u4EE3\u7801\u89C4\u8303\u6027",type:"bar",stack:"Ad",color:["#f3d460"],emphasis:{focus:"series"},data:sn}]}},ua=function(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{dataset:[{source:sn}],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}}]}},ga=function(sn){var _n,Nn,sr,Qn,Zn=sn.shixunHomeworks,kn=sn.loading,vr=sn.dispatch,Hn=Object(s.i)(),ir=Object(l.useState)(Object(T.a)(Object(T.a)({},{sort_by:"student_id",sort_direction:"desc"}),Hn)),lr=Object(a.a)(ir,2),Ln=lr[0],Cr=lr[1],Lr=Object(l.useState)(),Tr=Object(a.a)(Lr,2),fr=Tr[0],ne=Tr[1],Re=Object(l.useState)([]),Xe=Object(a.a)(Re,2),Me=Xe[0],lt=Xe[1],tt=Object(l.useRef)(),pt=Object(l.useState)(1),mt=Object(a.a)(pt,2),Dt=mt[0],it=mt[1],Jt=Object(l.useState)(!1),Yt=Object(a.a)(Jt,2),At=Yt[0],qt=Yt[1],Je=Object(l.useState)(10),tn=Object(a.a)(Je,2),Wt=tn[0],yn=tn[1],Rn=Object(l.useState)([]),Pn=Object(a.a)(Rn,2),Mt=Pn[0],Ht=Pn[1];Object(l.useEffect)(function(){En()},[]);var Cn=[{title:"\u5B66\u53F7",dataIndex:"student_number",sorter:!0,showSorterTooltip:!1,sortOrder:Ln.sort_by==="student_number"?Ln.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(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"bug",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.critical)}},{title:"\u4E3B\u8981",dataIndex:"bug",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.major)}},{title:"\u6B21\u8981",dataIndex:"bug",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"bug",sorter:!1,showSorterTooltip:!1,sortOrder:Ln.sort_by==="bug"?Ln.sort_direction==="desc"?"descend":"ascend":null,render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.grade)}}]},{title:"\u6F0F\u6D1E",children:[{title:"\u963B\u65AD",dataIndex:"vulnerability",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"vulnerability",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.critical)}},{title:"\u4E3B\u8981",dataIndex:"vulnerability",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.major)}},{title:"\u6B21\u8981",dataIndex:"vulnerability",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"vulnerability",sorter:!1,showSorterTooltip:!1,sortOrder:Ln.sort_by==="vulnerability"?Ln.sort_direction==="desc"?"descend":"ascend":null,render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.grade)}}]},{title:"\u4EE3\u7801\u89C4\u8303\u6027",children:[{title:"\u963B\u65AD",dataIndex:"specification",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.blocker)}},{title:"\u4E25\u91CD",dataIndex:"specification",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.critical)}},{title:"\u4E3B\u8981",dataIndex:"specification",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.major)}},{title:"\u6B21\u8981",dataIndex:"specification",render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.minor)}},{title:"\u7B49\u7EA7",dataIndex:"specification",sorter:!1,showSorterTooltip:!1,sortOrder:Ln.sort_by==="specification"?Ln.sort_direction==="desc"?"descend":"ascend":null,render:function(bt){return n.a.createElement("span",{className:"current"},bt==null?void 0:bt.grade)}}]},{title:"\u590D\u6742\u4EE3\u7801",dataIndex:"complexity",sorter:!0,showSorterTooltip:!1,sortOrder:Ln.sort_by==="complexity"?Ln.sort_direction==="desc"?"descend":"ascend":null},{title:"\u4EE3\u7801\u884C\u6570",dataIndex:"total_row_number",sorter:!0,showSorterTooltip:!1,sortOrder:Ln.sort_by==="total_row_number"?Ln.sort_direction==="desc"?"descend":"ascend":null},{title:"\u8D28\u91CF\u8BC4\u5206",dataIndex:"quality_score",sorter:!0,showSorterTooltip:!1,sortOrder:Ln.sort_by==="quality_score"?Ln.sort_direction==="desc"?"descend":"ascend":null},{title:"\u64CD\u4F5C",dataIndex:"action",align:"center",render:function(bt,Tn){return n.a.createElement("a",{target:"_blank",href:"/classrooms/".concat(Hn.coursesId,"/shixun_homework/").concat(Hn.categoryId,"/analysis/").concat(Tn.id),className:"current c-light-primary"},"\u8BE6\u7EC6\u5206\u6790")}}];Object(l.useEffect)(function(){return fr===2&&(tt.current=setInterval(function(){En()},6e4)),function(){clearTimeout(tt.current)}},[fr]);function En(){return wt.apply(this,arguments)}function wt(){return wt=Object(i.a)(c.a.mark(function Ct(){var bt;return c.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Object(z.a)("/api/homework_commons/".concat(Ln.categoryId,"/code_quality_analyses/check_status.json"),{method:"GET"});case 2:bt=Zt.sent,ne(bt.status),bt.status!=2&&bt.status!=-1&&(It({page:1,limit:10}),clearTimeout(tt.current));case 5:case"end":return Zt.stop()}},Ct)})),wt.apply(this,arguments)}function It(Ct){return kt.apply(this,arguments)}function kt(){return kt=Object(i.a)(c.a.mark(function Ct(bt){var Tn;return c.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:return it(bt==null?void 0:bt.page),yn(bt==null?void 0:bt.limit),Sn.next=4,Object(z.a)("/api/homework_commons/".concat(Ln.categoryId,"/code_quality_analyses.json"),{method:"GET",params:Object(T.a)({},bt)});case 4:Tn=Sn.sent,lt(Tn);case 6:case"end":return Sn.stop()}},Ct)})),kt.apply(this,arguments)}return console.log("-------",fr),n.a.createElement("section",{style:{paddingBottom:"10px"},className:"minH500 bg-white pl30 pr30 pt10"},(fr===0||fr===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",Me==null?void 0:Me.created_at)),n.a.createElement(U.a,{onClick:function(){vr({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(v.a,{flex:"80px"},n.a.createElement("label",null,"\u5206\u73ED\u60C5\u51B5:")),n.a.createElement(v.a,{flex:"80px"},n.a.createElement(we.a,{checked:(Mt==null?void 0:Mt.length)===0,onChange:function(bt){bt.target.checked&&(Ht([]),It({page:Dt,limit:Wt}))},style:{fontSize:"14px"},value:"all"},"\u5168\u90E8")),n.a.createElement(v.a,{flex:"1"},n.a.createElement(we.a.Group,{value:Mt,onChange:function(){var Ct=Object(i.a)(c.a.mark(function bt(Tn){return c.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:Ht(Object(g.a)(Tn)),It({page:Dt,limit:Wt,group_course_ids:Tn});case 2:case"end":return Sn.stop()}},bt)}));return function(bt){return Ct.apply(this,arguments)}}(),style:{width:"100%",fontSize:"14px"}},Me==null||((_n=Me.course_groups)===null||_n===void 0)?void 0:_n.map(function(Ct,bt){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"),(Me==null?void 0:Me.grade_statistics)&&n.a.createElement(hn.a,{option:or(Me==null||((Nn=Me.grade_statistics)===null||Nn===void 0)?void 0:Nn.map(function(Ct){return Ct.specification_count}),Me==null||((sr=Me.grade_statistics)===null||sr===void 0)?void 0:sr.map(function(Ct){return Ct.vulnerability_count}),Me==null||((Qn=Me.grade_statistics)===null||Qn===void 0)?void 0:Qn.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"),(Me==null?void 0:Me.quality_scores)&&n.a.createElement(hn.a,{option:ua(Me==null?void 0:Me.quality_scores.map(function(Ct,bt){return[bt+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(bt){It({page:1,limit:Wt,search:bt})},style:{width:"300px"},enterButton:"\u641C\u7D22"})),n.a.createElement(B.a,{columns:Cn,dataSource:Me==null?void 0:Me.analysis,bordered:!0,scroll:{x:"calc(800px + 50%)"},pagination:!1,onChange:function(bt,Tn,Zt){Zt.field&&(Ln.sort_by=Zt.field),Zt.order||(Ln.sort_direction="asc"),Zt.order==="ascend"&&(Ln.sort_direction="asc"),Zt.order==="descend"&&(Ln.sort_direction="desc"),Zt.order||(Ln.sort_direction="asc"),It(Object(T.a)({page:1,limit:Wt},Ln))}}),n.a.createElement(w.a,{current:Dt,total:Me==null?void 0:Me.total_count,pageSizeOptions:["10","20","50","100","200"],pageSize:Wt,style:{textAlign:"center",marginTop:"20px",marginBottom:"20px"},onChange:function(bt,Tn){it(bt),yn(Tn),It({page:bt,limit:Tn,group_course_ids:Mt})}}))),fr===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(){En()}},"\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:!!At,footer:null,onCancel:function(){return qt(!1)}},n.a.createElement("div",{style:{height:500,overflow:"hidden"}},!!At&&n.a.createElement("iframe",{style:{height:"100%",width:"100%"},src:"https://sonar.educoder.net/project/issues?id=".concat(Hn==null?void 0:Hn.categoryId,"-").concat(At==null?void 0:At.student_number,"&resolved=false"),frameBorder:"0"}))))},Zr=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n.effects}})(ga),ra=L("RotF"),te=L.n(ra),W=function(sn){var _n,Nn=sn.shixunHomeworks,sr=sn.loading,Qn=sn.dispatch,Zn=Object(s.i)(),kn=Object(s.h)(),vr=Object(l.useState)([]),Hn=Object(a.a)(vr,2),ir=Hn[0],lr=Hn[1],Ln=Object(l.useState)([]),Cr=Object(a.a)(Ln,2),Lr=Cr[0],Tr=Cr[1],fr=Object(l.useState)(!0),ne=Object(a.a)(fr,2),Re=ne[0],Xe=ne[1],Me=Object(l.useState)(!1),lt=Object(a.a)(Me,2),tt=lt[0],pt=lt[1],mt=Object(l.useState)(1),Dt=Object(a.a)(mt,2),it=Dt[0],Jt=Dt[1],Yt=Object(l.useState)([]),At=Object(a.a)(Yt,2),qt=At[0],Je=At[1],tn=Object(l.useState)(!1),Wt=Object(a.a)(tn,2),yn=Wt[0],Rn=Wt[1],Pn=Object(l.useState)(!1),Mt=Object(a.a)(Pn,2),Ht=Mt[0],Cn=Mt[1];Object(l.useEffect)(function(){Nn.actionTabs.key==="\u4EE3\u7801\u67E5\u91CD"?(It.resetFields(),lr([]),Rn(!0),Ct()):Rn(!1)},[Nn.actionTabs.key]);var En=He.a.useForm(),wt=Object(a.a)(En,1),It=wt[0],kt=[],Ct=function(){var Zt=Object(i.a)(c.a.mark(function Sn(){var dn,Vt,wn;return c.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:if(!(Re&&!tt)){yr.next=11;break}return pt(!0),Jt(it+1),yr.next=5,Object(Z.x)(Object(T.a)(Object(T.a)({},Zn),{},{page:it}));case 5:Vt=yr.sent,wn=Object(g.a)(Vt.group_list),Vt!=null&&Vt.ungroup_list&&wn.push({id:Vt==null?void 0:Vt.ungroup_list.id,name:Vt==null?void 0:Vt.ungroup_list.name,works_count:Vt==null?void 0:Vt.ungroup_list.work_count,last_review_time:Vt==null?void 0:Vt.ungroup_list.last_review_time}),lr([].concat(Object(g.a)(ir),Object(g.a)(wn))),pt(!1),((dn=Vt.group_list)===null||dn===void 0?void 0:dn.length)<10&&Xe(!1);case 11:case"end":return yr.stop()}},Sn)}));return function(){return Zt.apply(this,arguments)}}(),bt=function(){Qn({type:"shixunHomeworks/setActionTabs",payload:{}}),Cn(!1),Xe(!0),pt(!1),Jt(1),lr([]),It.resetFields()},Tn=[{title:"",dataIndex:"id",width:280,render:function(Sn,dn){return n.a.createElement(we.a,{disabled:!(dn.works_count>1),value:String(dn.id)},dn.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:yn,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",width:820,bodyStyle:{minHeight:200},onOk:Object(i.a)(c.a.mark(function Zt(){var Sn,dn;return c.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return Sn=It.getFieldValue(),wn.next=3,Object(z.a)("/api/homework_commons/".concat(Zn.categoryId,"/homework_code_repeat.json"),{method:"post",body:{group_ids:Object(g.a)(Sn.group_ids)}});case 3:if(dn=wn.sent,!(dn.status===0)){wn.next=11;break}return bt(),b.b.success("\u64CD\u4F5C\u6210\u529F"),wn.next=9,Qn({type:"shixunHomeworks/getWorkList",payload:Nn.actionTabs.params});case 9:E.d.push("/classrooms/".concat(Zn.coursesId,"/shixun_homework/").concat(Zn.categoryId,"/detail?tabs=2")),Qn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6267\u884C\u4EE3\u7801\u67E5\u91CD"}});case 11:case"end":return wn.stop()}},Zt)})),onCancel:bt},Nn.codeReviewCourse&&n.a.createElement(He.a,{form:It,onChange:function(Sn){Je(Object(T.a)({},It.getFieldValue()))},initialValues:(_n={},Object(gt.a)(_n,"group_ids",kt),Object(gt.a)(_n,"end_time",oe()(oe()().add(7,"days").format("YYYY-MM-DD HH:mm"))),_n)},n.a.createElement("div",{className:"flexd-table-header mt20"},n.a.createElement(B.a,{pagination:!1,dataSource:[],columns:Tn})),n.a.createElement(He.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(Sn){Ct()},hasMore:Re,useWindow:!1},n.a.createElement(B.a,{loading:sr.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:Tn,dataSource:ir,pagination:!1})))))),n.a.createElement(_.a,null,n.a.createElement(v.a,{className:"ml10"},n.a.createElement(we.a,{checked:Ht,onChange:function(Sn){Cn(Sn.target.checked);var dn=[];Sn.target.checked&&(dn=ir.filter(function(Vt){return Vt.works_count>1}).map(function(Vt){return Vt.id+""})),It.setFieldsValue(Object(gt.a)({},"group_ids",dn))}},"\u5168\u9009"))))},G=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading;return{shixunHomeworks:sn,loading:_n}})(W),Q=L("R5GN"),ue=L("rhHp"),ee=L("Aocz"),qe=L.n(ee),nn=L("HBuW"),On=L("NLgs"),Yn=[{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(sn){var _n,Nn,sr,Qn,Zn,kn,vr,Hn,ir,lr,Ln=sn.shixunHomeworks,Cr=sn.globalSetting,Lr=sn.loading,Tr=sn.dispatch,fr=Object(s.i)(),ne=Object(s.h)(),Re=Object(s.g)(),Xe=Object(l.useState)([]),Me=Object(a.a)(Xe,2),lt=Me[0],tt=Me[1],pt=Object(l.useState)(ne.query.tabs||"0"),mt=Object(a.a)(pt,2),Dt=mt[0],it=mt[1],Jt=Object(l.useState)({}),Yt=Object(a.a)(Jt,2),At=Yt[0],qt=Yt[1],Je=Ln.workList,tn=Object(l.useState)(!1),Wt=Object(a.a)(tn,2),yn=Wt[0],Rn=Wt[1],Pn;fr.category=ne.query.category_id,fr.order="work_score",fr.b_order="desc";var Mt=function(Ct){it(Ct),Ct==="0"&&Tr({type:"shixunHomeworks/getWorkList",payload:At})},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(i.a)(c.a.mark(function Tn(){var Zt,Sn,dn;return c.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return Sn=(Zt=Ln.workList)===null||Zt===void 0?void 0:Zt.myshixun_identifier,wn.next=3,Object(Z.X)({id:Sn});case 3:dn=wn.sent,dn&&(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`),Tr({type:"shixunHomeworks/getWorkList",payload:At}));case 5:case"end":return wn.stop()}},Tn)}));function bt(){return Ct.apply(this,arguments)}return bt}()})},Cn=function kt(Ct){var bt;Ct=(bt=Ct)!==null&&bt!==void 0&&bt.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 Tn=Object(i.a)(c.a.mark(function Sn(){var dn,Vt;return c.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return Gn.next=2,Object(nn.Bb)({url:Ct});case 2:if(dn=Gn.sent,dn){Gn.next=5;break}return Gn.abrupt("return");case 5:return b.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Gn.next=8,Object(nn.E)({id:dn.shixun_identifier});case 8:if(Vt=Gn.sent,!(Vt!=null&&Vt.game_identifier)){Gn.next=12;break}return Object(C.S)("/tasks/".concat(Vt.game_identifier,"?coursesId=").concat(fr.coursesId)),Gn.abrupt("return");case 12:(Vt==null?void 0:Vt.status)===2?kt(Vt==null?void 0:Vt.message):(Vt==null?void 0:Vt.status)===3&&En(Vt==null?void 0:Vt.message);case 13:case"end":return Gn.stop()}},Sn)}));function Zt(){return Tn.apply(this,arguments)}return Zt}()})},En=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 kt=Object(i.a)(c.a.mark(function Ct(bt){var Tn,Zt;return c.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return bt=(Tn=bt)!==null&&Tn!==void 0&&Tn.includes(".json")?bt:"".concat(bt,".json"),dn.next=3,Object(nn.Bb)({url:bt});case 3:if(Zt=dn.sent,console.log(Zt,"execRes"),!(Zt!=null&&Zt.game_identifier)){dn.next=8;break}return Object(C.S)("/tasks/".concat(Zt.game_identifier,"?coursesId=").concat(fr.coursesId)),dn.abrupt("return");case 8:(Zt==null?void 0:Zt.status)===-3?Object(C.q)():(Zt==null?void 0:Zt.status)===2?Cn(Zt==null?void 0:Zt.message):(Zt==null?void 0:Zt.status)===3&&En(Zt==null?void 0:Zt.message);case 9:case"end":return dn.stop()}},Ct)}));return function(bt){return kt.apply(this,arguments)}}(),It=[{name:"\u4F5C\u4E1A\u5217\u8868",id:"0",compontent:n.a.createElement(on,{setExportParams:qt}),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(Rt,null)},{name:"\u8D28\u91CF\u68C0\u6D4B",id:"4",compontent:n.a.createElement(Zr,null)},{name:Object(de.c)()?"\u8BBE\u7F6E":"\u5F97\u5206\u89C4\u5219",id:"3",compontent:n.a.createElement(dr,null)}].filter(function(kt){var Ct;if(Object(de.s)())return kt.name!=="\u4EE3\u7801\u67E5\u91CD";if(Object(de.s)()||(Je==null||((Ct=Je.homework_status)===null||Ct===void 0)?void 0:Ct[0])!=="\u5DF2\u622A\u6B62")return kt.name!=="\u8D28\u91CF\u68C0\u6D4B";var bt;return!Je.code_review&&(Je==null||((bt=Je.homework_status)===null||bt===void 0)?void 0:bt[0])!=="\u672A\u53D1\u5E03"?!0:kt.name!=="\u4EE3\u7801\u67E5\u91CD"}).filter(function(kt){return Je.open_code_quality_analysis?!0:kt.name!=="\u8D28\u91CF\u68C0\u6D4B"});return n.a.createElement("section",null,n.a.createElement("div",{className:"edu-container"},Je.homework_name&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},Je.category&&n.a.createElement(y.a,{separator:">"},n.a.createElement(y.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework")},Je.course_name)),n.a.createElement(y.a.Item,null,n.a.createElement(d.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.category.main?"":Je.category.category_id)},Je.category.category_name)),n.a.createElement(y.a.Item,null,"\u4F5C\u4E1A\u8BE6\u60C5"))),n.a.createElement("aside",{className:[qe.a.title,"mt20"].join(" ")},n.a.createElement(d.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.category.main?"":Je.category.category_id)},n.a.createElement(A.a,{className:"font16 c-black"})),n.a.createElement(R.a,{title:Je.homework_name,placement:"bottom"},n.a.createElement("strong",{className:"font20 ml5"},Je.homework_name)),n.a.createElement(C.m,{temporary:!0,status:Je.homework_status}),Dt==="4"&&n.a.createElement("span",{className:"iconfont icon-a-wenhaobeifen2",onClick:function(){Rn(!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)()&&((_n=Ln.workList)===null||_n===void 0?void 0:_n.redo_work)&&n.a.createElement("p",{onClick:Ht},n.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x"}),"\u91CD\u505A"),((Nn=Ln.workList)===null||Nn===void 0?void 0:Nn.shixun_status)>1&&((sr=Ln.workList)===null||sr===void 0?void 0:sr.time_status)<5&&Object(de.s)()&&n.a.createElement("p",{onClick:function(){var Ct,bt,Tn,Zt,Sn,dn,Vt;if(!Object(On.e)(Tr,!0))return;(Ct=Ln.workList)!==null&&Ct!==void 0&&(bt=Ct.task_operation)!==null&&bt!==void 0&&(Tn=bt[1])!==null&&Tn!==void 0&&Tn.includes("/")?wt((Zt=Ln.workList)===null||Zt===void 0||((Sn=Zt.task_operation)===null||Sn===void 0)?void 0:Sn[1]):Object(C.S)("/tasks/".concat((dn=Ln.workList)===null||dn===void 0||((Vt=dn.task_operation)===null||Vt===void 0)?void 0:Vt[1]))}},n.a.createElement("span",{className:"iconfont icon-kaiqizhong"}),(Qn=Ln.workList)===null||Qn===void 0||((Zn=Qn.task_operation)===null||Zn===void 0)?void 0:Zn[0]),((kn=Ln.workList)===null||kn===void 0?void 0:kn.commit_des)&&n.a.createElement("p",{onClick:function(){var Ct;Object(C.S)("/classrooms/".concat(fr.coursesId,"/shixun_homework/").concat(fr.categoryId,"/").concat((Ct=Ln.workList)===null||Ct===void 0?void 0:Ct.id,"/commitsummary"))}},n.a.createElement("span",{className:"iconfont icon-tijiaozongjie"}),(vr=Ln.workList)===null||vr===void 0?void 0:vr.commit_des),Dt=="1"&&Object(de.c)()&&n.a.createElement("p",{onClick:function(){Tr({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)()&&Je.publish_immediately&&n.a.createElement("p",{onClick:function(){Tr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u53D1\u5E03",selectArrs:[fr.categoryId],selectArrsAll:[Je],params:fr,detail:!0,type:2}})}},n.a.createElement("span",{className:"iconfont icon-yishezhifabushijian1 translateY1"}),"\u7ACB\u5373\u53D1\u5E03"),!((Hn=Cr.setting)!==null&&Hn!==void 0&&Hn.hide_quality_analysis)&&((ir=Ln.workList)===null||ir===void 0?void 0:ir.show_analysis_detail)&&n.a.createElement("p",{onClick:function(){var Ct;Object(C.S)("/classrooms/".concat(fr.coursesId,"/shixun_homework/").concat(fr.categoryId,"/analysis/").concat((Ct=Ln.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"),((lr=Ln.workList)===null||lr===void 0?void 0:lr.is_enter_shixun)&&n.a.createElement("p",{onClick:function(){Object(C.S)("/shixuns/".concat(Je.shixun_identifier,"/challenges"))}},n.a.createElement("span",{className:"iconfont icon-shixun3 translateY1"}),"\u8FDB\u5165\u5B9E\u8BAD"),Object(de.c)()&&Je.end_immediately&&n.a.createElement("p",{style:{background:"#0152d9",color:"#fff"},onClick:function(){Tr({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u622A\u6B62",params:fr,type:2,detail:!0,selectArrs:[fr.categoryId]}})}},n.a.createElement("span",{style:{color:"#fff"},className:"iconfont icon-jiezhishiyan"}),"\u7ACB\u5373\u622A\u6B62")),n.a.createElement(F.a,{defaultActiveKey:Dt,activeKey:Dt,onChange:Mt,className:qe.a.menuTabs},It.map(function(kt,Ct){return n.a.createElement(F.a.TabPane,{tab:kt.name,key:kt.id,forceRender:kt.forceRender},kt.compontent)})))),n.a.createElement(G,null),n.a.createElement(Q.a,{courseEndTime:Je==null?void 0:Je.course_end_date}),n.a.createElement(ue.a,{courseEndTime:Je==null?void 0:Je.course_end_date}),n.a.createElement(f.a,{visible:yn,title:"\u89C4\u5219\u8BF4\u660E",width:800,footer:null,onCancel:function(){Rn(!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:Yn,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")))},rr=J.default=Object(E.a)(function(mn){var sn=mn.shixunHomeworks,_n=mn.loading,Nn=mn.globalSetting;return{shixunHomeworks:sn,globalSetting:Nn,loading:_n.effects}})(un)},TXwP:function(We,J,L){var Y,B;(function(){var I;(function(){"use strict";var S=[,,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 i(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}i.prototype.get_indent_size=function(f,a){var o=this.__base_string_length;return a=a||0,f<0&&(o=0),o+=f*this.__indent_size,o+=a,o},i.prototype.get_indent_string=function(f,a){var o=this.__base_string;return a=a||0,f<0&&(f=0,o=""),a+=f*this.__indent_size,this.__ensure_cache(a),o+=this.__cache[a],o},i.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var f=this.__cache.length,a=0,o="";this.__indent_size&&f>=this.__indent_size&&(a=Math.floor(f/this.__indent_size),f-=a*this.__indent_size,o=new Array(a+1).join(this.__indent_string)),f&&(o+=new Array(f+1).join(" ")),this.__cache.push(o)};function u(f,a){this.__indent_cache=new i(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 o=this.__lines.join(`
|
|
`);return f!==`
|
|
`&&(o=o.replace(/[\n]/g,f)),o},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 o=this.__lines.length-2;o>=0;){var c=this.__lines[o];if(c.is_empty())break;if(c.item(0).indexOf(f)!==0&&c.item(-1)!==a){this.__lines.splice(o+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=u},,,,function(t){function b(f,a){this.raw_options=i(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 o=this.raw_options[f],c=a||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(c=o.concat()):typeof o=="string"&&(c=o.split(/[^a-zA-Z0-9_\/\-]+/)),c},b.prototype._get_boolean=function(f,a){var o=this.raw_options[f],c=o===void 0?!!a:!!o;return c},b.prototype._get_characters=function(f,a){var o=this.raw_options[f],c=a||"";return typeof o=="string"&&(c=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),c},b.prototype._get_number=function(f,a){var o=this.raw_options[f];a=parseInt(a,10),isNaN(a)&&(a=0);var c=parseInt(o,10);return isNaN(c)&&(c=a),c},b.prototype._get_selection=function(f,a,o){var c=this._get_selection_list(f,a,o);if(c.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 c[0]},b.prototype._get_selection_list=function(f,a,o){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[a[0]],!this._is_valid_selection(o,a))throw new Error("Invalid Default Value!");var c=this._get_array(f,o);if(!this._is_valid_selection(c,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 c},b.prototype._is_valid_selection=function(f,a){return f.length&&a.length&&!f.some(function(o){return a.indexOf(o)===-1})};function i(f,a){var o={};f=u(f);var c;for(c in f)c!==a&&(o[c]=f[c]);if(a&&f[a])for(c in f[a])o[c]=f[a][c];return o}function u(f){var a={},o;for(o in f){var c=o.replace(/-/g,"_");a[c]=f[o]}return a}t.exports.Options=b,t.exports.normalizeOpts=u,t.exports.mergeOpts=i},,function(t){var b=RegExp.prototype.hasOwnProperty("sticky");function i(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},i.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},i.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},i.prototype.test=function(u,f){return f=f||0,f+=this.__position,f>=0&&f<this.__input_length?!!this.__match(u,f):!1},i.prototype.testChar=function(u,f){var a=this.peek(f);return u.lastIndex=0,a!==null&&u.test(a)},i.prototype.match=function(u){var f=this.__match(u,this.__position);return f?this.__position+=f[0].length:f=null,f},i.prototype.read=function(u,f,a){var o="",c;return u&&(c=this.match(u),c&&(o+=c[0])),f&&(c||!u)&&(o+=this.readUntil(f,a)),o},i.prototype.readUntil=function(u,f){var a="",o=this.__position;u.lastIndex=this.__position;var c=u.exec(this.__input);return c?(o=c.index,f&&(o+=c[0].length)):o=this.__input_length,a=this.__input.substring(this.__position,o),this.__position=o,a},i.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},i.prototype.get_regexp=function(u,f){var a=null,o="g";return f&&b&&(o="y"),typeof u=="string"&&u!==""?a=new RegExp(u,o):u&&(a=new RegExp(u.source,o)),a},i.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(u){var f=this.__position,a=this.readUntilAfter(u);return this.__position=f,a},i.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=i},,,,,function(t){function b(i,u){i=typeof i=="string"?i:i.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+u,"g")}b.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var f=this.__directive_pattern.exec(i);f;)u[f[1]]=f[2],f=this.__directive_pattern.exec(i);return u},b.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=b},,function(t,b,i){var u=i(16).Beautifier,f=i(17).Options;function a(o,c){var l=new u(o,c);return l.beautify()}t.exports=a,t.exports.defaultOptions=function(){return new f}},function(t,b,i){var u=i(17).Options,f=i(2).Output,a=i(8).InputScanner,o=i(13).Directives,c=new o(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,s=/\s/,d=/(?:\s|\n)+/g,E=/\/\*(?:[\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=s.test(this._input.peek()),g=0;s.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===`
|
|
`&&((g===0||g<this._options.max_preserve_newlines)&&(g++,this._output.add_new_line(!0)));return w},C.prototype.foundNestedPseudoClass=function(){for(var k=0,w=1,g=this._input.peek(w);g;){if(g==="{")return!0;if(g==="(")k+=1;else if(g===")"){if(k===0)return!1;k-=1}else if(g===";"||g==="}")return!1;w++,g=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&&l.test(k||"")&&(w=k.match(l)[0])),k=k.replace(n,`
|
|
`);var g=k.match(/^[\t ]*/)[0];this._output=new f(this._options,g),this._input=new a(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var h=0,p=!1,m=!1,_=!1,x=!1,v=!1,j=!1,U=this._ch,T=!1,z,H,M;z=this._input.read(d),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(E),K=c.get_directives(V);K&&K.ignore==="start"&&(V+=c.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"?x=!0:$==="import"&&(v=!0),$ in this.NESTED_AT_RULE?(this._nestedLevel+=1,$ in this.CONDITIONAL_GROUP_RULE&&(_=!0)):!p&&h===0&&$.indexOf(":")!==-1&&(m=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")m&&(m=!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),v=!1,x=!1,m&&(this.outdent(),m=!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])){T=!0;break}(p||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!x&&h===0?(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var ve=M==='"'||M==="'";this.preserveSingleSpace(ve||H),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")T=!1,h===0?(m&&(this.outdent(),m=!1),x=!1,v=!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),m&&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&&(!m||j)&&h===0&&!v&&!x?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!m&&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&&s.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("="),s.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()===`
|
|
`&&T&&this._output.add_new_line()}var ye=this._output.get_code(w);return ye},t.exports.Beautifier=C},function(t,b,i){var u=i(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 o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l<c.length;l++)c[l]!=="expand"?this.brace_style="collapse":this.brace_style=c[l]}f.prototype=new u,t.exports.Options=f}],R={};function P(t){var b=R[t];if(b!==void 0)return b.exports;var i=R[t]={exports:{}};return S[t](i,i.exports,P),i.exports}var y=P(15);I=y})();var F=I;!(Y=[],B=function(){return{css_beautify:F}}.apply(J,Y),B!==void 0&&(We.exports=B))})()},Vhoy:function(We,J,L){"use strict";L.d(J,"d",function(){return F}),L.d(J,"e",function(){return S}),L.d(J,"c",function(){return R}),L.d(J,"b",function(){return P}),L.d(J,"a",function(){return y});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 S(t,b){return new P(t,b)}function R(t){return t?t.replace(/\$\((.*?)\)/g,(b,i)=>` ${i} `).trim():""}class P{constructor(t,b,i){this.id=t,this.definition=b,this.description=i,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 y;(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 i(a){if(a instanceof P)return["codicon","codicon-"+a.id];const o=b.exec(a.id);if(!o)return i(P.error);let[,c,l]=o;const n=["codicon","codicon-"+c];return l&&n.push("codicon-modifier-"+l.substr(1)),n}t.asClassNameArray=i;function u(a){return i(a).join(" ")}t.asClassName=u;function f(a){return"."+i(a).join(".")}t.asCSSSelector=f})(y||(y={})),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(We,J){function L(Y,B){var I=B.x,F=B.y,S=B.width,R=B.height,P=B.r,y,t,b,i;S<0&&(I=I+S,S=-S),R<0&&(F=F+R,R=-R),typeof P=="number"?y=t=b=i=P:P instanceof Array?P.length===1?y=t=b=i=P[0]:P.length===2?(y=b=P[0],t=i=P[1]):P.length===3?(y=P[0],t=i=P[1],b=P[2]):(y=P[0],t=P[1],b=P[2],i=P[3]):y=t=b=i=0;var u;y+t>S&&(u=y+t,y*=S/u,t*=S/u),b+i>S&&(u=b+i,b*=S/u,i*=S/u),t+b>R&&(u=t+b,t*=R/u,b*=R/u),y+i>R&&(u=y+i,y*=R/u,i*=R/u),Y.moveTo(I+y,F),Y.lineTo(I+S-t,F),t!==0&&Y.arc(I+S-t,F+t,t,-Math.PI/2,0),Y.lineTo(I+S,F+R-b),b!==0&&Y.arc(I+S-b,F+R-b,b,0,Math.PI/2),Y.lineTo(I+i,F+R),i!==0&&Y.arc(I+i,F+R-i,i,Math.PI/2,Math.PI),Y.lineTo(I,F+y),y!==0&&Y.arc(I+y,F+y,y,Math.PI,Math.PI*1.5)}J.buildPath=L},"VrN/":function(We,J,L){(function(Y,B){We.exports=B()})(this,function(){"use strict";var Y=navigator.userAgent,B=navigator.platform,I=/gecko\/\d/i.test(Y),F=/MSIE \d/.test(Y),S=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Y),R=/Edge\/(\d+)/.exec(Y),P=F||S||R,y=P&&(F?document.documentMode||6:+(R||S)[1]),t=!R&&/WebKit\//.test(Y),b=t&&/Qt\/\d+\.\d+/.test(Y),i=!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),o=/PhantomJS/.test(Y),c=!R&&/AppleWebKit/.test(Y)&&/Mobile\/\w+/.test(Y),l=/Android/.test(Y),n=c||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Y),s=c||/Mac/.test(B),d=/\bCrOS\b/.test(Y),E=/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=s&&(b||u&&(A==null||A<12.11)),k=I||P&&y>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=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 m(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=m(e,r,D,O);return N.setAttribute("role","presentation"),N}var x;document.createRange?x=function(e,r,D,O){var N=document.createRange();return N.setEnd(O||e,D),N.setStart(e,r),N}:x=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 v(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 T(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()};c?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,ve={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},fe={origin:"*mouse"},ye={origin:"+move"};function Pe(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 ge=[""];function de(e){for(;ge.length<=e;)ge.push(Qe(ge)+" ");return ge[e]}function Qe(e){return e[e.length-1]}function St(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 De(){}function rt(e,r){var D;return Object.create?D=Object.create(e):(De.prototype=e,D=new De),r&&M(r,D),D}var Be=/[\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()||Be.test(e))}function ut(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 Ke(e,r,D){for(;(D<0?r>0:r<e.length)&&we(e.charAt(r));)r+=D;return r}function ot(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 gt(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 Nt=null;function He(e,r,D){var O;Nt=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:Nt=N),X.from==r&&(X.from!=X.to&&D!="before"?O=N:Nt=N)}return O!=null?O:Nt}var jt=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,Ye,nt){this.level=pe,this.from=Ye,this.to=nt}return function(pe,Ye){var nt=Ye=="ltr"?"L":"R";if(pe.length==0||Ye=="ltr"&&!O.test(pe))return!1;for(var Lt=pe.length,Tt=[],an=0;an<Lt;++an)Tt.push(D(pe.charCodeAt(an)));for(var gn=0,Mn=nt;gn<Lt;++gn){var jn=Tt[gn];jn=="m"?Tt[gn]=Mn:Mn=jn}for(var $n=0,Un=nt;$n<Lt;++$n){var tr=Tt[$n];tr=="1"&&Un=="r"?Tt[$n]="n":X.test(tr)&&(Un=tr,tr=="r"&&(Tt[$n]="R"))}for(var br=1,mr=Tt[0];br<Lt-1;++br){var Ir=Tt[br];Ir=="+"&&mr=="1"&&Tt[br+1]=="1"?Tt[br]="1":Ir==","&&mr==Tt[br+1]&&(mr=="1"||mr=="n")&&(Tt[br]=mr),mr=Ir}for(var sa=0;sa<Lt;++sa){var Fa=Tt[sa];if(Fa==",")Tt[sa]="N";else if(Fa=="%"){var va=void 0;for(va=sa+1;va<Lt&&Tt[va]=="%";++va);for(var ii=sa&&Tt[sa-1]=="!"||va<Lt&&Tt[va]=="1"?"1":"N",ti=sa;ti<va;++ti)Tt[ti]=ii;sa=va-1}}for(var Aa=0,ni=nt;Aa<Lt;++Aa){var za=Tt[Aa];ni=="L"&&za=="1"?Tt[Aa]="L":X.test(za)&&(ni=za)}for(var ka=0;ka<Lt;++ka)if(N.test(Tt[ka])){var Da=void 0;for(Da=ka+1;Da<Lt&&N.test(Tt[Da]);++Da);for(var Ea=(ka?Tt[ka-1]:nt)=="L",ri=(Da<Lt?Tt[Da]:nt)=="L",So=Ea==ri?Ea?"L":"R":nt,to=ka;to<Da;++to)Tt[to]=So;ka=Da-1}for(var Ga=[],Li,Ba=0;Ba<Lt;)if(q.test(Tt[Ba])){var ms=Ba;for(++Ba;Ba<Lt&&q.test(Tt[Ba]);++Ba);Ga.push(new se(0,ms,Ba))}else{var Ki=Ba,lo=Ga.length,uo=Ye=="rtl"?1:0;for(++Ba;Ba<Lt&&Tt[Ba]!="L";++Ba);for(var Xa=Ki;Xa<Ba;)if(re.test(Tt[Xa])){Ki<Xa&&(Ga.splice(lo,0,new se(1,Ki,Xa)),lo+=uo);var Oo=Xa;for(++Xa;Xa<Ba&&re.test(Tt[Xa]);++Xa);Ga.splice(lo,0,new se(2,Oo,Xa)),lo+=uo,Ki=Xa}else++Xa;Ki<Ba&&Ga.splice(lo,0,new se(1,Ki,Ba))}return Ye=="ltr"&&(Ga[0].level==1&&(Li=pe.match(/^\s+/))&&(Ga[0].from=Li[0].length,Ga.unshift(new se(0,0,Li[0].length))),Qe(Ga).level==1&&(Li=pe.match(/\s+$/))&&(Qe(Ga).to-=Li[0].length,Ga.push(new se(0,Lt-Li[0].length,Lt)))),Ye=="rtl"?Ga.reverse():Ga}}();function $t(e,r){var D=e.order;return D==null&&(D=e.order=jt(e.text,r)),D}var Ie=[],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]||Ie).concat(D)}};function ct(e,r){return e._handlers&&e._handlers[r]||Ie}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=ct(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 ht(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 ct(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)),s&&e.ctrlKey&&r==1&&(r=3),r}var xt=function(){if(P&&y<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),Qt;function on(e){if(Qt==null){var r=m("span","\u200B");p(e,m("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Qt=r.offsetWidth<=1&&r.offsetHeight>2&&!(P&&y<8))}var D=Qt?m("span","\u200B"):m("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var vt;function Kt(e){if(vt!=null)return vt;var r=p(e,document.createTextNode("A\u062EA")),D=x(r,0,1).getBoundingClientRect(),O=x(r,1,2).getBoundingClientRect();return h(e),!D||D.left==D.right?!1:vt=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/)},Rt=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=m("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,m("span","x")),D=r.getBoundingClientRect(),O=x(r,0,1).getBoundingClientRect();return be=Math.abs(D.left-O.left)>1}var Ut={},_t={};function Gt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),Ut[e]=r}function en(e,r){_t[e]=r}function Ge(e){if(typeof e=="string"&&_t.hasOwnProperty(e))e=_t[e];else if(e&&typeof e.name=="string"&&_t.hasOwnProperty(e.name)){var r=_t[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 dt(e,r){r=Ge(r);var D=Ut[r.name];if(!D)return dt(e,"text/plain");var O=D(e,r);if(Pt.hasOwnProperty(r.name)){var N=Pt[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 Pt={};function zt(e,r){var D=Pt.hasOwnProperty(e)?Pt[e]:Pt[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 vn(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 nr(e,r,D){return e.startState?e.startState(r,D):!0}var Kn=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};Kn.prototype.eol=function(){return this.pos>=this.string.length},Kn.prototype.sol=function(){return this.pos==this.lineStart},Kn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Kn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Kn.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},Kn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},Kn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Kn.prototype.skipToEnd=function(){this.pos=this.string.length},Kn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},Kn.prototype.backUp=function(e){this.pos-=e},Kn.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)},Kn.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},Kn.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)}},Kn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Kn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},Kn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},Kn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function bn(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 ar(e,r){var D=r-e.height;if(D)for(var O=e;O;O=O.parent)O.height+=D}function dr(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 Or(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 ia(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function hn(e,r,D){if(D===void 0&&(D=null),!(this instanceof hn))return new hn(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 ua(e,r){return e.sticky==r.sticky&&or(e,r)==0}function ga(e){return hn(e.line,e.ch)}function Zr(e,r){return or(e,r)<0?r:e}function ra(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 hn(e.first,0);var D=e.first+e.size-1;return r.line>D?hn(D,bn(e,D).text.length):G(r,bn(e,r.line).text.length)}function G(e,r){var D=e.ch;return D==null||D>r?hn(e.line,r):D<0?hn(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,Ye){return N.push(pe,Ye)},X,O);for(var q=D.state,re=function(pe){D.baseTokens=N;var Ye=e.state.overlays[pe],nt=1,Lt=0;D.state=!0,Nn(e,r.text,Ye.mode,D,function(Tt,an){for(var gn=nt;Lt<Tt;){var Mn=N[nt];Mn>Tt&&N.splice(nt,1,Tt,N[nt+1],Mn),nt+=2,Lt=Math.min(Tt,Mn)}if(!an)return;if(Ye.opaque)N.splice(gn,nt-gn,Tt,"overlay "+an),nt=gn+2;else for(;gn<nt;gn+=2){var jn=N[gn+1];N[gn+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 nn(e,r,D){if(!r.styles||r.styles[0]!=e.state.modeGen){var O=On(e,dr(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 On(e,r,D){var O=e.doc,N=e.display;if(!O.mode.startState)return new ee(O,!0,r);var X=sr(e,r,D),q=X>O.first&&bn(O,X-1).stateAfter,re=q?ee.fromSaved(O,q,X):new ee(O,nr(O.mode),X);return O.iter(X,r,function(se){Yn(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 Yn(e,r,D,O){var N=e.doc.mode,X=new Kn(r,e.options.tabSize,D);for(X.start=X.pos=O||0,r==""&&un(N,D.state);!X.eol();)rr(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=vn(e,r);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function rr(e,r,D,O){for(var N=0;N<10;N++){O&&(O[0]=vn(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 mn=function(e,r,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=D};function sn(e,r,D,O){var N=e.doc,X=N.mode,q;r=W(N,r);var re=bn(N,r.line),se=On(e,r.line,D),pe=new Kn(re.text,e.options.tabSize,se),Ye;for(O&&(Ye=[]);(O||pe.pos<r.ch)&&!pe.eol();)pe.start=pe.pos,q=rr(X,pe,se.state),O&&Ye.push(new mn(pe,q,ln(N.mode,se.state)));return O?Ye:new mn(pe,q,se.state)}function _n(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,Ye=new Kn(r,e.options.tabSize,O),nt,Lt=e.options.addModeClass&&[null];for(r==""&&_n(un(D,O.state),X);!Ye.eol();){if(Ye.pos>e.options.maxHighlightLength?(re=!1,q&&Yn(e,r,O,Ye.pos),Ye.pos=r.length,nt=null):nt=_n(rr(D,Ye,O.state,Lt),X),Lt){var Tt=Lt[0].name;Tt&&(nt="m-"+(nt?Tt+" "+nt:Tt))}if(!re||pe!=nt){for(;se<Ye.start;)se=Math.min(Ye.start,se+5e3),N(se,pe);pe=nt}Ye.start=Ye.pos}for(;se<Ye.pos;){var an=Math.min(Ye.pos,se+5e3);N(an,pe),se=an}}function sr(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=bn(X,re-1),pe=se.stateAfter;if(pe&&(!D||re+(pe instanceof ue?pe.lookAhead:0)<=X.modeFrontier))return re;var Ye=V(se.text,null,e.options.tabSize);(N==null||O>Ye)&&(N=re-1,O=Ye)}return N}function Qn(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=bn(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 vr(){Zn=!0}function Hn(){kn=!0}function ir(e,r,D){this.marker=e,this.from=r,this.to=D}function lr(e,r){if(e)for(var D=0;D<e.length;++D){var O=e[D];if(O.marker==r)return O}}function Ln(e,r){for(var D,O=0;O<e.length;++O)e[O]!=r&&(D||(D=[])).push(e[O]);return D}function Cr(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Lr(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 ir(q,X.from,se?null:X.to))}}return O}function Tr(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 ir(q,se?null:X.from-r,X.to==null?null:X.to-r))}}return O}function fr(e,r){if(r.full)return null;var D=Kr(e,r.from.line)&&bn(e,r.from.line).markedSpans,O=Kr(e,r.to.line)&&bn(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=Lr(D,N,q),se=Tr(O,X,q),pe=r.text.length==1,Ye=Qe(r.text).length+(pe?N:0);if(re)for(var nt=0;nt<re.length;++nt){var Lt=re[nt];if(Lt.to==null){var Tt=lr(se,Lt.marker);Tt?pe&&(Lt.to=Tt.to==null?null:Tt.to+Ye):Lt.to=N}}if(se)for(var an=0;an<se.length;++an){var gn=se[an];if(gn.to!=null&&(gn.to+=Ye),gn.from==null){var Mn=lr(re,gn.marker);Mn||(gn.from=Ye,pe&&(re||(re=[])).push(gn))}else gn.from+=Ye,pe&&(re||(re=[])).push(gn)}re&&(re=ne(re)),se&&se!=re&&(se=ne(se));var jn=[re];if(!pe){var $n=r.text.length-2,Un;if($n>0&&re)for(var tr=0;tr<re.length;++tr)re[tr].to==null&&(Un||(Un=[])).push(new ir(re[tr].marker,null,null));for(var br=0;br<$n;++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 gn=Tt.markedSpans[an].marker;gn.readOnly&&(!O||$(O,gn)==-1)&&(O||(O=[])).push(gn)}}),!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 Ye=[se,1],nt=or(pe.from,re.from),Lt=or(pe.to,re.to);(nt<0||!q.inclusiveLeft&&!nt)&&Ye.push({from:pe.from,to:re.from}),(Lt>0||!q.inclusiveRight&&!Lt)&&Ye.push({from:re.to,to:pe.to}),N.splice.apply(N,Ye),se+=Ye.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 Me(e,r){if(!r)return;for(var D=0;D<r.length;++D)r[D].marker.attachLine(e);e.markedSpans=r}function lt(e){return e.inclusiveLeft?-1:0}function tt(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)||lt(e)-lt(r);if(X)return-X;var q=or(O.to,N.to)||tt(e)-tt(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 Dt(e){return mt(e,!0)}function it(e){return mt(e,!1)}function Jt(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 Yt(e,r,D,O,N){var X=bn(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),Ye=or(pe.from,D)||lt(se.marker)-lt(N),nt=or(pe.to,O)||tt(se.marker)-tt(N);if(Ye>=0&&nt<=0||Ye<=0&&nt>=0)continue;if(Ye<=0&&(se.marker.inclusiveRight&&N.inclusiveLeft?or(pe.to,D)>=0:or(pe.to,D)>0)||Ye>=0&&(se.marker.inclusiveRight&&N.inclusiveLeft?or(pe.from,O)<=0:or(pe.from,O)<0))return!0}}function At(e){for(var r;r=Dt(e);)e=r.find(-1,!0).line;return e}function qt(e){for(var r;r=it(e);)e=r.find(1,!0).line;return e}function Je(e){for(var r,D;r=it(e);)e=r.find(1,!0).line,(D||(D=[])).push(e);return D}function tn(e,r){var D=bn(e,r),O=At(D);return D==O?r:dr(O)}function Wt(e,r){if(r>e.lastLine())return r;var D=bn(e,r),O;if(!yn(e,D))return r;for(;O=it(D);)D=O.find(1,!0).line;return dr(D)+1}function yn(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&&Rn(e,r,O))return!0}}function Rn(e,r,D){if(D.to==null){var O=D.marker.find(1,!0);return Rn(e,O.line,lr(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)&&Rn(e,r,N))return!0}function Pn(e){e=At(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 Mt(e){if(e.height==0)return 0;for(var r=e.text.length,D,O=e;D=Dt(O);){var N=D.find(0,!0);O=N.from.line,r+=N.from.ch-N.to.ch}for(O=e;D=it(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=bn(D,D.first),r.maxLineLength=Mt(r.maxLine),r.maxLineChanged=!0,D.iter(function(O){var N=Mt(O);N>r.maxLineLength&&(r.maxLineLength=N,r.maxLine=O)})}var Cn=function(e,r,D){this.text=e,Me(this,r),this.height=D?D(this):1};Cn.prototype.lineNo=function(){return dr(this)},Oe(Cn);function En(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),Me(e,D);var N=O?O(e):1;N!=e.height&&ar(e,N)}function wt(e){e.parent=null,Xe(e)}var It={},kt={};function Ct(e,r){if(!e||/^\s*$/.test(e))return null;var D=r.addModeClass?kt:It;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function bt(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=Zt,Kt(e.display.measure)&&(q=$t(X,e.doc.direction))&&(O.addToken=dn(O.addToken,q)),O.map=[];var re=r!=e.display.externalMeasured&&dr(X);wn(X,O,nn(e,X,re)),X.styleClasses&&(X.styleClasses.bgClass&&(O.bgClass=T(X.styleClasses.bgClass,O.bgClass||"")),X.styleClasses.textClass&&(O.textClass=T(X.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(on(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=T(O.pre.className,O.textClass||"")),O}function Tn(e){var r=m("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Zt(e,r,D,O,N,X,q){if(!r)return;var re=e.splitSpaces?Sn(r,e.trailingSpace):r,se=e.cm.state.specialChars,pe=!1,Ye;if(!se.test(r))e.col+=r.length,Ye=document.createTextNode(re),e.map.push(e.pos,e.pos+r.length,Ye),P&&y<9&&(pe=!0),e.pos+=r.length;else{Ye=document.createDocumentFragment();for(var nt=0;;){se.lastIndex=nt;var Lt=se.exec(r),Tt=Lt?Lt.index-nt:r.length-nt;if(Tt){var an=document.createTextNode(re.slice(nt,nt+Tt));P&&y<9?Ye.appendChild(m("span",[an])):Ye.appendChild(an),e.map.push(e.pos,e.pos+Tt,an),e.col+=Tt,e.pos+=Tt}if(!Lt)break;nt+=Tt+1;var gn=void 0;if(Lt[0]==" "){var Mn=e.cm.options.tabSize,jn=Mn-e.col%Mn;gn=Ye.appendChild(m("span",de(jn),"cm-tab")),gn.setAttribute("role","presentation"),gn.setAttribute("cm-text"," "),e.col+=jn}else Lt[0]=="\r"||Lt[0]==`
|
|
`?(gn=Ye.appendChild(m("span",Lt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),gn.setAttribute("cm-text",Lt[0]),e.col+=1):(gn=e.cm.options.specialCharPlaceholder(Lt[0]),gn.setAttribute("cm-text",Lt[0]),P&&y<9?Ye.appendChild(m("span",[gn])):Ye.appendChild(gn),e.col+=1);e.map.push(e.pos,e.pos+1,gn),e.pos++}}if(e.trailingSpace=re.charCodeAt(r.length-1)==32,D||O||N||pe||X||q){var $n=D||"";O&&($n+=O),N&&($n+=N);var Un=m("span",[Ye],$n,X);if(q)for(var tr in q)q.hasOwnProperty(tr)&&tr!="style"&&tr!="class"&&Un.setAttribute(tr,q[tr]);return e.content.appendChild(Un)}e.content.appendChild(Ye)}function Sn(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 dn(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,Ye=pe+O.length;;){for(var nt=void 0,Lt=0;Lt<r.length&&!(nt=r[Lt],nt.to>pe&&nt.from<=pe);Lt++);if(nt.to>=Ye)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 Vt(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 wn(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,Ye="",nt,Lt,Tt=0,an,gn,Mn,jn,$n;;){if(Tt==se){an=gn=Mn=Lt="",$n=null,jn=null,Tt=Infinity;for(var Un=[],tr=void 0,br=0;br<O.length;++br){var mr=O[br],Ir=mr.marker;if(Ir.type=="bookmark"&&mr.from==se&&Ir.widgetNode)Un.push(Ir);else if(mr.from<=se&&(mr.to==null||mr.to>se||Ir.collapsed&&mr.to==se&&mr.from==se)){if(mr.to!=null&&mr.to!=se&&Tt>mr.to&&(Tt=mr.to,gn=""),Ir.className&&(an+=" "+Ir.className),Ir.css&&(Lt=(Lt?Lt+";":"")+Ir.css),Ir.startStyle&&mr.from==se&&(Mn+=" "+Ir.startStyle),Ir.endStyle&&mr.to==Tt&&(tr||(tr=[])).push(Ir.endStyle,mr.to),Ir.title&&(($n||($n={})).title=Ir.title),Ir.attributes)for(var sa in Ir.attributes)($n||($n={}))[sa]=Ir.attributes[sa];Ir.collapsed&&(!jn||pt(jn.marker,Ir)<0)&&(jn=mr)}else mr.from>se&&Tt>mr.from&&(Tt=mr.from)}if(tr)for(var Fa=0;Fa<tr.length;Fa+=2)tr[Fa+1]==Tt&&(gn+=" "+tr[Fa]);if(!jn||jn.from==se)for(var va=0;va<Un.length;++va)Vt(r,0,Un[va]);if(jn&&(jn.from||0)==se){if(Vt(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 ii=Math.min(re,Tt);;){if(Ye){var ti=se+Ye.length;if(!jn){var Aa=ti>ii?Ye.slice(0,ii-se):Ye;r.addToken(r,Aa,nt?nt+an:an,Mn,se+Aa.length==Tt?gn:"",Lt,$n)}if(ti>=ii){Ye=Ye.slice(ii-se),se=ii;break}se=ti,Mn=""}Ye=N.slice(X,X=D[pe++]),nt=Ct(D[pe++],r.cm.options)}}}function Gn(e,r,D){this.line=r,this.rest=Je(r),this.size=this.rest?dr(Qe(this.rest))-D+1:1,this.node=this.text=null,this.hidden=yn(e,r)}function yr(e,r,D){for(var O=[],N,X=r;X<D;X=N){var q=new Gn(e.doc,bn(e.doc,X),X);N=X+q.size,O.push(q)}return O}var Wn=null;function kr(e){Wn?Wn.ops.push(e):e.ownsGroup=Wn={ops:[e],delayedCallbacks:[]}}function Yr(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 Bn(e,r){var D=e.ownsGroup;if(!D)return;try{Yr(D)}finally{Wn=null,r(D)}}var Vn=null;function qn(e,r){var D=ct(e,r);if(!D.length)return;var O=Array.prototype.slice.call(arguments,2),N;Wn?N=Wn.delayedCallbacks:Vn?N=Vn:(N=Vn=[],setTimeout(Rr,0));for(var X=function(re){N.push(function(){return D[re].apply(null,O)})},q=0;q<D.length;++q)X(q)}function Rr(){var e=Vn;Vn=null;for(var r=0;r<e.length;++r)e[r]()}function jr(e,r,D,O){for(var N=0;N<r.changes.length;N++){var X=r.changes[N];X=="text"?ya(e,r):X=="gutter"?Ma(e,r,D,O):X=="class"?Va(e,r):X=="widget"&&$a(e,r,O)}r.changes=null}function $r(e){return e.node==e.text&&(e.node=m("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),P&&y<8&&(e.node.style.zIndex=2)),e.node}function pa(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=$r(r);r.background=O.insertBefore(m("div",null,D),O.firstChild),e.display.input.setUneditable(r.background)}}function ma(e,r){var D=e.display.externalMeasured;return D&&D.line==r.line?(e.display.externalMeasured=null,r.measure=D.measure,D.built):bt(e,r)}function ya(e,r){var D=r.text.className,O=ma(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,Va(e,r)):D&&(r.text.className=D)}function Va(e,r){pa(e,r),r.line.wrapClass?$r(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 Ma(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=$r(r);r.gutterBackground=m("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=$r(r),re=r.gutter=m("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(m("div",ia(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,Ye=X.hasOwnProperty(pe)&&X[pe];Ye&&re.appendChild(m("div",[Ye],"CodeMirror-gutter-elt","left: "+O.gutterLeft[pe]+"px; width: "+O.gutterWidth[pe]+"px"))}}}function $a(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);La(e,r,D)}function aa(e,r,D,O){var N=ma(e,r);return r.text=r.node=N.pre,N.bgClass&&(r.bgClass=N.bgClass),N.textClass&&(r.textClass=N.textClass),Va(e,r),Ma(e,r,D,O),La(e,r,O),r.node}function La(e,r,D){if(oi(e,r.line,r,D,!0),r.rest)for(var O=0;O<r.rest.length;O++)oi(e,r.rest[O],r,D,!1)}function oi(e,r,D,O,N){if(!r.widgets)return;for(var X=$r(D),q=0,re=r.widgets;q<re.length;++q){var se=re[q],pe=m("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),Pa(se,pe,D,O),e.display.input.setUneditable(pe),N&&se.above?X.insertBefore(pe,D.gutter||D.text):X.appendChild(pe),qn(se,"redraw")}}function Pa(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 qr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!v(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,m("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function xa(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 Sa(e){return e.lineSpace.offsetTop}function Le(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function et(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=p(e.measure,m("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 me(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(dr(e.rest[N])>D)return{map:e.measure.maps[N],cache:e.measure.caches[N],before:!0}}function Ue(e,r){r=At(r);var D=dr(r),O=e.display.externalMeasured=new Gn(e.doc,r,D);O.lineN=D;var N=O.built=bt(e,O);return O.text=N.pre,p(e.display.lineMeasure,N.pre),O}function Ve(e,r,D,O){return yt(e,$e(e,r),D,O)}function st(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[ea(e,r)];var D=e.display.externalMeasured;if(D&&r>=D.lineN&&r<D.lineN+D.size)return D}function $e(e,r){var D=dr(r),O=st(e,D);O&&!O.text?O=null:O&&O.changes&&(jr(e,O,D,pr(e)),e.curOp.forceUpdate=!0),O||(O=Ue(e,r));var N=me(O,r,D);return{line:r,view:O,rect:null,map:N.map,cache:N.cache,before:N.before,hasHeights:!1}}function yt(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=An(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 Bt={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 cn(e,r){var D=Bt;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 An(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 Ye=0;Ye<4;Ye++){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&&y<9&&q==0&&re==N.coverEnd-N.coverStart?pe=X.parentNode.getBoundingClientRect():pe=cn(x(X,q,re).getClientRects(),O),pe.left||pe.right||q==0)break;re=q,q=q-1,se="right"}P&&y<11&&(pe=zn(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&&y<9&&!q&&(!pe||!pe.left&&!pe.right)){var Lt=X.parentNode.getClientRects()[0];Lt?pe={left:Lt.left,right:Lt.left+Nr(e.display),top:Lt.top,bottom:Lt.bottom}:pe=Bt}for(var Tt=pe.top-r.rect.top,an=pe.bottom-r.rect.top,gn=(Tt+an)/2,Mn=r.view.measure.heights,jn=0;jn<Mn.length-1&&!(gn<Mn[jn]);jn++);var $n=jn?Mn[jn-1]:0,Un=Mn[jn],tr={left:(se=="right"?pe.right:pe.left)-r.rect.left,right:(se=="left"?pe.left:pe.right)-r.rect.left,top:$n,bottom:Un};return!pe.left&&!pe.right&&(tr.bogus=!0),e.options.singleCursorHeightPerLine||(tr.rtop=Tt,tr.rbottom=an),tr}function zn(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 hr(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 fn(e){hr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ft(){return i&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Xt(){return i&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function In(e){var r=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(r+=qr(e.widgets[D]));return r}function xn(e,r,D,O,N){if(!N){var X=In(r);D.top+=X,D.bottom+=X}if(O=="line")return D;O||(O="local");var q=Pn(r);if(O=="local"?q+=Sa(e.display):q-=e.display.viewOffset,O=="page"||O=="window"){var re=e.display.lineSpace.getBoundingClientRect();q+=re.top+(O=="window"?0:Xt());var se=re.left+(O=="window"?0:Ft());D.left+=se,D.right+=se}return D.top+=q,D.bottom+=q,D}function er(e,r,D){if(D=="div")return r;var O=r.left,N=r.top;if(D=="page")O-=Ft(),N-=Xt();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 wr(e,r,D,O,N){return O||(O=bn(e.doc,r.line)),xn(e,O,Ve(e,O,r.ch,N),D)}function Jn(e,r,D,O,N,X){O=O||bn(e.doc,r.line),N||(N=$e(e,O));function q(an,gn){var Mn=yt(e,N,an,gn?"right":"left",X);return gn?Mn.left=Mn.right:Mn.right=Mn.left,xn(e,O,Mn,D)}var re=$t(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 Ye(an,gn,Mn){var jn=re[gn],$n=jn.level==1;return q(Mn?an-1:an,$n!=Mn)}var nt=He(re,se,pe),Lt=Nt,Tt=Ye(se,nt,pe=="before");return Lt!=null&&(Tt.other=Ye(se,Lt,pe!="before")),Tt}function pn(e,r){var D=0;r=W(e.doc,r),e.options.lineWrapping||(D=Nr(e.display)*r.ch);var O=bn(e.doc,r.line),N=Pn(O)+Sa(e.display);return{left:D,right:D,top:N,bottom:N+O.height}}function Dn(e,r,D,O,N){var X=hn(e,r,D);return X.xRel=N,O&&(X.outside=O),X}function gr(e,r,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return Dn(O.first,0,null,-1,-1);var N=Or(O,D),X=O.first+O.size-1;if(N>X)return Dn(O.first+O.size-1,bn(O,X).text.length,null,1,1);r<0&&(r=0);for(var q=bn(O,N);;){var re=Qr(e,q,N,r,D),se=Jt(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=bn(O,N=pe.line)}}function Sr(e,r,D,O){O-=In(r);var N=r.text.length,X=ot(function(q){return yt(e,D,q-1).bottom<=O},N,0);return N=ot(function(q){return yt(e,D,q).top>O},X,N),{begin:X,end:N}}function Xn(e,r,D,O){D||(D=$e(e,r));var N=xn(e,r,yt(e,D,O),"line").top;return Sr(e,r,D,N)}function Dr(e,r,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>r}function Qr(e,r,D,O,N){N-=Pn(r);var X=$e(e,r),q=In(r),re=0,se=r.text.length,pe=!0,Ye=$t(r,e.doc.direction);if(Ye){var nt=(e.options.lineWrapping?Hr:Pr)(e,r,D,X,Ye,O,N);pe=nt.level!=1,re=pe?nt.from:nt.to-1,se=pe?nt.to:nt.from-1}var Lt=null,Tt=null,an=ot(function(br){var mr=yt(e,X,br);return mr.top+=q,mr.bottom+=q,Dr(mr,O,N,!1)?(mr.top<=N&&mr.left<=O&&(Lt=br,Tt=mr),!0):!1},re,se),gn,Mn,jn=!1;if(Tt){var $n=O-Tt.left<Tt.right-O,Un=$n==pe;an=Lt+(Un?0:1),Mn=Un?"after":"before",gn=$n?Tt.left:Tt.right}else{!pe&&(an==se||an==re)&&an++,Mn=an==0?"after":an==r.text.length?"before":yt(e,X,an-(pe?1:0)).bottom+q<=N==pe?"after":"before";var tr=Jn(e,hn(D,an,Mn),"line",r,X);gn=tr.left,jn=N<tr.top?-1:N>=tr.bottom?1:0}return an=Ke(r.text,an,1),Dn(D,an,Mn,jn,O-gn)}function Pr(e,r,D,O,N,X,q){var re=ot(function(nt){var Lt=N[nt],Tt=Lt.level!=1;return Dr(Jn(e,hn(D,Tt?Lt.to:Lt.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,Ye=Jn(e,hn(D,pe?se.from:se.to,pe?"after":"before"),"line",r,O);Dr(Ye,X,q,!0)&&Ye.top>q&&(se=N[re-1])}return se}function Hr(e,r,D,O,N,X,q){var re=Sr(e,r,O,q),se=re.begin,pe=re.end;/\s/.test(r.text.charAt(pe-1))&&pe--;for(var Ye=null,nt=null,Lt=0;Lt<N.length;Lt++){var Tt=N[Lt];if(Tt.from>=pe||Tt.to<=se)continue;var an=Tt.level!=1,gn=yt(e,O,an?Math.min(pe,Tt.to)-1:Math.max(se,Tt.from)).right,Mn=gn<X?X-gn+1e9:gn-X;(!Ye||nt>Mn)&&(Ye=Tt,nt=Mn)}return Ye||(Ye=N[N.length-1]),Ye.from<se&&(Ye={from:se,to:Ye.to,level:Ye.level}),Ye.to>pe&&(Ye={from:Ye.from,to:pe,level:Ye.level}),Ye}var Fr;function Ur(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Fr==null){Fr=m("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Fr.appendChild(document.createTextNode("x")),Fr.appendChild(m("br"));Fr.appendChild(document.createTextNode("x"))}p(e.measure,Fr);var D=Fr.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=m("span","xxxxxxxxxx"),D=m("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:da(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:r.wrapper.clientWidth}}function da(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Qa(e){var r=Ur(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(N){if(yn(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 Na(e){var r=e.doc,D=Qa(e);r.iter(function(O){var N=D(O);N!=O.height&&ar(O,N)})}function wa(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=gr(e,X,q),pe;if(O&&se.xRel>0&&(pe=bn(e.doc,se.line).text).length==se.ch){var Ye=V(pe,pe.length,e.options.tabSize)-pe.length;se=hn(se.line,Math.max(0,Math.round((X-et(e.display).left)/Nr(e.display))-Ye))}return se}function ea(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 Gr(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&&tn(e.doc,r)<N.viewTo&&ta(e);else if(D<=N.viewFrom)kn&&Wt(e.doc,D+O)>N.viewFrom?ta(e):(N.viewFrom+=O,N.viewTo+=O);else if(r<=N.viewFrom&&D>=N.viewTo)ta(e);else if(r<=N.viewFrom){var X=ja(e,D,D+O,1);X?(N.view=N.view.slice(X.index),N.viewFrom=X.lineN,N.viewTo+=O):ta(e)}else if(D>=N.viewTo){var q=ja(e,r,r,-1);q?(N.view=N.view.slice(0,q.index),N.viewTo=q.lineN):ta(e)}else{var re=ja(e,r,r,-1),se=ja(e,D,D+O,1);re&&se?(N.view=N.view.slice(0,re.index).concat(yr(e,re.lineN,se.lineN)).concat(N.view.slice(se.index)),N.viewTo+=O):ta(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[ea(e,r)];if(X.node==null)return;var q=X.changes||(X.changes=[]);$(q,D)==-1&&q.push(D)}function ta(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ja(e,r,D,O){var N=ea(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(;tn(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=yr(e,r,D),O.viewFrom=r):(O.viewFrom>r?O.view=yr(e,r,O.viewFrom).concat(O.view):O.viewFrom<r&&(O.view=O.view.slice(ea(e,r))),O.viewFrom=r,O.viewTo<D?O.view=O.view.concat(yr(e,O.viewTo,D)):O.viewTo>D&&(O.view=O.view.slice(0,ea(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 Vr(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=Jn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),N=D.appendChild(m("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(m("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 Jr(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=et(e.display),re=q.left,se=Math.max(O.sizerWidth,je(e)-O.sizer.offsetLeft)-q.right,pe=N.direction=="ltr";function Ye(Un,tr,br,mr){tr<0&&(tr=0),tr=Math.round(tr),mr=Math.round(mr),X.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+Un+`px;
|
|
top: `+tr+"px; width: "+(br==null?se-Un:br)+`px;
|
|
height: `+(mr-tr)+"px"))}function nt(Un,tr,br){var mr=bn(N,Un),Ir=mr.text.length,sa,Fa;function va(Aa,ni){return wr(e,hn(Un,Aa),"div",mr,ni)}function ii(Aa,ni,za){var ka=Xn(e,mr,null,Aa),Da=ni=="ltr"==(za=="after")?"left":"right",Ea=za=="after"?ka.begin:ka.end-(/\s/.test(mr.text.charAt(ka.end-1))?2:1);return va(Ea,Da)[Da]}var ti=$t(mr,N.direction);return gt(ti,tr||0,br==null?Ir:br,function(Aa,ni,za,ka){var Da=za=="ltr",Ea=va(Aa,Da?"left":"right"),ri=va(ni-1,Da?"right":"left"),So=tr==null&&Aa==0,to=br==null&&ni==Ir,Ga=ka==0,Li=!ti||ka==ti.length-1;if(ri.top-Ea.top<=3){var Ba=(pe?So:to)&&Ga,ms=(pe?to:So)&&Li,Ki=Ba?re:(Da?Ea:ri).left,lo=ms?se:(Da?ri:Ea).right;Ye(Ki,Ea.top,lo-Ki,Ea.bottom)}else{var uo,Xa,Oo,vs;Da?(uo=pe&&So&&Ga?re:Ea.left,Xa=pe?se:ii(Aa,za,"before"),Oo=pe?re:ii(ni,za,"after"),vs=pe&&to&&Li?se:ri.right):(uo=pe?ii(Aa,za,"before"):re,Xa=!pe&&So&&Ga?se:Ea.right,Oo=!pe&&to&&Li?re:ri.left,vs=pe?ii(ni,za,"after"):se),Ye(uo,Ea.top,Xa-uo,Ea.bottom),Ea.bottom<ri.top&&Ye(re,Ea.bottom,null,ri.top),Ye(Oo,ri.top,vs-Oo,ri.bottom)}(!sa||Jr(Ea,sa)<0)&&(sa=Ea),Jr(ri,sa)<0&&(sa=ri),(!Fa||Jr(Ea,Fa)<0)&&(Fa=Ea),Jr(ri,Fa)<0&&(Fa=ri)}),{start:sa,end:Fa}}var Lt=r.from(),Tt=r.to();if(Lt.line==Tt.line)nt(Lt.line,Lt.ch,Tt.ch);else{var an=bn(N,Lt.line),gn=bn(N,Tt.line),Mn=At(an)==At(gn),jn=nt(Lt.line,Lt.ch,Mn?an.text.length+1:null).end,$n=nt(Tt.line,Mn?0:null,Tt.ch).start;Mn&&(jn.top<$n.top-2?(Ye(jn.right,jn.top,null,jn.bottom),Ye(re,$n.top,$n.left,$n.bottom)):Ye(jn.right,jn.top,$n.left-jn.right,jn.bottom)),jn.bottom<$n.top&&Ye(re,jn.bottom,null,$n.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,g(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&&y<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 Ye=N.line.height-q;if((Ye>.005||Ye<-.005)&&(ar(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 Lt=Math.ceil(re/Nr(e.display));Lt>e.display.maxLineLength&&(e.display.maxLineLength=Lt,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-Sa(e));var N=D&&D.bottom!=null?D.bottom:O+e.wrapper.clientHeight,X=Or(r,O),q=Or(r,N);if(D&&D.ensure){var re=D.ensure.from.line,se=D.ensure.to.line;re<X?(X=re,q=Or(r,Pn(bn(r,re))+e.wrapper.clientHeight)):Math.min(se,r.lastLine())>=q&&(X=Or(r,Pn(bn(r,se))-e.wrapper.clientHeight),q=se)}return{from:X,to:Math.max(q,X+1)}}function co(e,r){if(ht(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&&!o){var X=m("div","\u200B",null,`position: absolute;
|
|
top: `+(r.top-D.viewOffset-Sa(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?hn(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,D=r.sticky=="before"?hn(r.line,r.ch+1,"before"):r);for(var X=0;X<5;X++){var q=!1,re=Jn(e,r),se=!D||D==r?re:Jn(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),Ye=e.doc.scrollTop,nt=e.doc.scrollLeft;if(pe.scrollTop!=null&&(Di(e,pe.scrollTop),Math.abs(e.doc.scrollTop-Ye)>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=Ur(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+Le(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 Ye=Math.min(r.top,(pe?re:r.bottom)-X);Ye!=N&&(q.scrollTop=Ye)}var nt=e.options.fixedGutter?0:D.gutters.offsetWidth,Lt=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<Lt?q.scrollLeft=Math.max(0,r.left+nt-(an?0:10)):r.right>Tt+Lt-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=pn(e,r.from),O=pn(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,Mr(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+Le(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=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),N=this.horiz=m("div",[m("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&&y<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=s&&!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&&g(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},kr(e.curOp)}function Ei(e){var r=e.curOp;r&&Bn(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=Ve(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&&Wr(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 Ha(e,r){if(e.curOp)return r();ui(e);try{return r()}finally{Ei(e)}}function ca(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ui(e);try{return r.apply(e,arguments)}finally{Ei(e)}}}function Oa(e){return function(){if(this.curOp)return e.apply(this,arguments);ui(this);try{return e.apply(this,arguments)}finally{Ei(this)}}}function ha(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=On(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,Ye=se.classes;Ye?X.styleClasses=Ye:pe&&(X.styleClasses=null);for(var nt=!q||q.length!=X.styles.length||pe!=Ye&&(!pe||!Ye||pe.bgClass!=Ye.bgClass||pe.textClass!=Ye.textClass),Lt=0;!nt&&Lt<q.length;++Lt)nt=q[Lt]!=X.styles[Lt];nt&&N.push(O.line),X.stateAfter=O.save(),O.nextLine()}else X.text.length<=e.options.maxHighlightLength&&Yn(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&&Ha(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||!v(e.display.lineDiv,r))return null;var D={activeElt:r};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&v(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&&v(document.body,e.anchorNode)&&v(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 ta(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;la(e)&&(ta(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=tn(e.doc,X),q=Wt(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=Pn(bn(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"),vo(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+Le(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);Vr(e),mi(e,N),Wr(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);Vr(e),mi(e,O),Wr(e,O),D.finish()}}function vo(e,r,D){var O=e.display,N=e.options.lineNumbers,X=O.lineDiv,q=X.firstChild;function re(an){var gn=an.nextSibling;return t&&s&&e.display.currentWheelTarget==an?an.style.display="none":an.parentNode.removeChild(an),gn}for(var se=O.view,pe=O.viewFrom,Ye=0;Ye<se.length;Ye++){var nt=se[Ye];if(!nt.hidden)if(!nt.node||nt.node.parentNode!=X){var Lt=aa(e,nt,pe,D);X.insertBefore(Lt,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),jr(e,nt,pe,D)),Tt&&(h(nt.lineNumber),nt.lineNumber.appendChild(document.createTextNode(ia(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 Wr(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 Mr(e){var r=e.display,D=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var O=da(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 la(e){if(!e.options.lineNumbers)return!1;var r=e.doc,D=ia(e.options,r.first+r.size-1),O=e.display;if(D.length!=O.lineNumChars){var N=O.measure.appendChild(m("div",[m("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 Ua(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(m("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),Gr(e),Mr(e)}function Ui(e,r,D,O){var N=this;this.input=D,N.scrollbarFiller=m("div",null,"CodeMirror-scrollbar-filler"),N.scrollbarFiller.setAttribute("cm-not-content","true"),N.gutterFiller=m("div",null,"CodeMirror-gutter-filler"),N.gutterFiller.setAttribute("cm-not-content","true"),N.lineDiv=_("div",null,"CodeMirror-code"),N.selectionDiv=m("div",null,null,"position: relative; z-index: 1"),N.cursorDiv=m("div",null,"CodeMirror-cursors"),N.measure=m("div",null,"CodeMirror-measure"),N.lineMeasure=m("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=m("div",[X],null,"position: relative"),N.sizer=m("div",[N.mover],"CodeMirror-sizer"),N.sizerWidth=null,N.heightForcer=m("div",null,null,"position: absolute; height: "+Z+"px; width: 1px;"),N.gutters=m("div",null,"CodeMirror-gutters"),N.lineGutter=null,N.scroller=m("div",[N.sizer,N.heightForcer,N.gutters],"CodeMirror-scroll"),N.scroller.setAttribute("tabIndex","-1"),N.wrapper=m("div",[N.scrollbarFiller,N.gutterFiller,N.scroller],"CodeMirror"),P&&y<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=Ua(O.gutters,O.lineNumbers),Mi(N),D.init(N)}var ci=0,_a=null;P?_a=-.53:I?_a=15:i?_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&&s&&t){e:for(var pe=r.target,Ye=X.view;pe!=q;pe=pe.parentNode)for(var nt=0;nt<Ye.length;nt++)if(Ye[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 Lt=N*_a,Tt=e.doc.scrollTop,an=Tt+X.wrapper.clientHeight;Lt<0?Tt=Math.max(0,Tt+Lt-50):an=Math.min(e.doc.height,an+Lt+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 gn=q.scrollLeft-X.wheelStartX,Mn=q.scrollTop-X.wheelStartY,jn=Mn&&X.wheelDY&&Mn/X.wheelDY||gn&&X.wheelDX&&gn/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 Wa=function(e,r){this.ranges=e,this.primIndex=r};Wa.prototype.primary=function(){return this.ranges[this.primIndex]},Wa.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(!ua(D.anchor,O.anchor)||!ua(D.head,O.head))return!1}return!0},Wa.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Br(ga(this.ranges[r].anchor),ga(this.ranges[r].head));return new Wa(e,this.primIndex)},Wa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Wa.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 Br=function(e,r){this.anchor=e,this.head=r};Br.prototype.from=function(){return ra(this.anchor,this.head)},Br.prototype.to=function(){return Zr(this.anchor,this.head)},Br.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(Lt,Tt){return or(Lt.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=ra(re.from(),q.from()),Ye=Zr(re.to(),q.to()),nt=re.empty()?q.from()==q.head:re.from()==re.head;X<=D&&--D,r.splice(--X,2,new Br(nt?Ye:pe,nt?pe:Ye))}}return new Wa(r,D)}function Fn(e,r){return new Wa([new Br(e,r||e)],0)}function ur(e){return e.text?hn(e.from.line+e.text.length-1,Qe(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 ur(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+=ur(r).ch-r.to.ch),hn(D,O)}function oa(e,r){for(var D=[],O=0;O<e.sel.ranges.length;O++){var N=e.sel.ranges[O];D.push(new Br(Ar(N.anchor,r),Ar(N.head,r)))}return _r(e.cm,D,e.sel.primIndex)}function vi(e,r,D){return e.line==r.line?hn(D.line,e.ch-r.ch+D.ch):hn(D.line+(e.line-r.line),e.ch)}function ai(e,r,D){for(var O=[],N=hn(e.first,0),X=N,q=0;q<r.length;q++){var re=r[q],se=vi(re.from,N,X),pe=vi(ur(re),N,X);if(N=re.to,X=pe,D=="around"){var Ye=e.sel.ranges[q],nt=or(Ye.head,Ye.anchor)<0;O[q]=new Br(nt?pe:se,nt?se:pe)}else O[q]=new Br(se,se)}return new Wa(O,e.sel.primIndex)}function Ra(e){e.doc.mode=dt(e.options,e.doc.modeOption),Ya(e)}function Ya(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&&Gr(e)}function gi(e,r){return r.from.ch==0&&r.to.ch==0&&Qe(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Wi(e,r,D,O){function N($n){return D?D[$n]:null}function X($n,Un,tr){En($n,Un,tr,O),qn($n,"change",$n,r)}function q($n,Un){for(var tr=[],br=$n;br<Un;++br)tr.push(new Cn(pe[br],N(br),O));return tr}var re=r.from,se=r.to,pe=r.text,Ye=bn(e,re.line),nt=bn(e,se.line),Lt=Qe(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(gi(e,r)){var gn=q(0,pe.length-1);X(nt,nt.text,Tt),an&&e.remove(re.line,an),gn.length&&e.insert(re.line,gn)}else if(Ye==nt)if(pe.length==1)X(Ye,Ye.text.slice(0,re.ch)+Lt+Ye.text.slice(se.ch),Tt);else{var Mn=q(1,pe.length-1);Mn.push(new Cn(Lt+Ye.text.slice(se.ch),Tt,O)),X(Ye,Ye.text.slice(0,re.ch)+pe[0],N(0)),e.insert(re.line+1,Mn)}else if(pe.length==1)X(Ye,Ye.text.slice(0,re.ch)+pe[0]+nt.text.slice(se.ch),N(0)),e.remove(re.line+1,an);else{X(Ye,Ye.text.slice(0,re.ch)+pe[0],N(0)),X(nt,Lt+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)}qn(e,"change",e,r)}function Ca(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 gs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Na(e),Ra(e),ys(e),e.options.lineWrapping||Ht(e),e.options.mode=r.modeOption,Gr(e)}function ys(e){(e.doc.direction=="rtl"?U:g)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Ha(e,function(){ys(e),Gr(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:ga(r.from),to:ur(r),text:xr(e,r.from,r.to)};return Es(e,D,r.from.line,r.to.line+1),Ca(e,function(O){return Es(O,D,r.from.line,r.to.line+1)},!0),D}function bs(e){for(;e.length;){var r=Qe(e);if(r.ranges)e.pop();else break}}function pl(e,r){if(r)return bs(e.done),Qe(e.done);if(e.done.length&&!Qe(e.done).ranges)return Qe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Qe(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=Qe(q.changes),or(r.from,r.to)==0&&or(r.from,re.to)==0?re.to=ur(r):q.changes.push(rs(e,r));else{var se=Qe(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 vl(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,Qe(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=Qe(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 gl(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(gl(D[N]));return O}function xs(e,r){var D=yl(e,r),O=fr(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 go(e,r,D){for(var O=[],N=0;N<e.length;++N){var X=e[N];if(X.ranges){O.push(D?Wa.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],Ye=void 0;if(re.push({from:pe.from,to:pe.to,text:pe.text}),r)for(var nt in pe)(Ye=nt.match(/^spans_(\d+)$/))&&($(r,Number(Ye[1]))>-1&&(Qe(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 Br(N,r)}else return new Br(D||r,r)}function Vo(e,r,D,O,N){N==null&&(N=e.cm&&(e.cm.display.shift||e.extend)),Ka(e,new Wa([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);Ka(e,q,D)}function is(e,r,D,O){var N=e.sel.ranges.slice(0);N[r]=D,Ka(e,_r(e.cm,N,e.sel.primIndex),O)}function Cs(e,r,D,O){Ka(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 Br(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=Qe(O);N&&N.ranges?(O[O.length-1]=r,Yo(e,r,D)):Ka(e,r,D)}function Ka(e,r,D){Yo(e,r,D),vl(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)),qn(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 Br(se,pe))}return N?_r(e.cm,N,r.primIndex):r}function yo(e,r,D,O,N){var X=bn(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,Ye="selectRight"in se?!se.selectRight:se.inclusiveRight;if((re.from==null||(pe?re.from<=r.ch:re.from<r.ch))&&(re.to==null||(Ye?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),Lt=void 0;if((O<0?Ye:pe)&&(nt=As(e,nt,-O,nt&&nt.line==r.line?X:null)),nt&&nt.line==r.line&&(Lt=or(nt,D))&&(O<0?Lt<0:Lt>0))return yo(e,nt,r,O,N)}var Tt=se.find(O<0?-1:1);return(O<0?pe:Ye)&&(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,hn(e.first,0))}function As(e,r,D,O){return D<0&&r.ch==0?r.line>e.first?W(e,hn(r.line-1)):null:D>0&&r.ch==(O||bn(e,r.line)).text.length?r.line<e.first+e.size-1?hn(r.line+1,0):null:new hn(r.line,r.ch+D)}function Ds(e){e.setSelection(hn(e.firstLine(),0),hn(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 ca(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=oa(e,r);_s(e,r,D,e.cm?e.cm.curOp.id:NaN),Mo(e,r,D,fr(e,r));var O=[];Ca(e,function(N,X){!X&&$(O,N.history)==-1&&(Ns(N.history,r),O.push(N.history)),Mo(N,r,null,fr(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)){Ka(e,X,{clearRedo:!1});return}q=X}else if(O){re.push(X);return}else break;var Ye=[];Go(q,se),se.push({changes:Ye,generation:N.generation}),N.generation=X.generation||++N.maxGeneration;for(var nt=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),Lt=function(gn){var Mn=X.changes[gn];if(Mn.origin=r,nt&&!Ms(e,Mn,!1))return re.length=0,{};Ye.push(rs(e,Mn));var jn=gn?oa(e,Mn):Qe(re);Mo(e,Mn,jn,xs(e,Mn)),!gn&&e.cm&&e.cm.scrollIntoView({from:Mn.from,to:ur(Mn)});var $n=[];Ca(e,function(Un,tr){!tr&&$($n,Un.history)==-1&&(Ns(Un.history,Mn),$n.push(Un.history)),Mo(Un,Mn,null,xs(Un,Mn))})},Tt=X.changes.length-1;Tt>=0;--Tt){var an=Lt(Tt);if(an)return an.v}}function Ps(e,r){if(r==0)return;if(e.first+=r,e.sel=new Wa(St(e.sel.ranges,function(N){return new Br(hn(N.anchor.line+r,N.anchor.ch),hn(N.head.line+r,N.head.ch))}),e.sel.primIndex),e.cm){Gr(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 ca(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:hn(e.first,0),to:hn(r.to.line+N,r.to.ch),text:[Qe(r.text)],origin:r.origin}}var X=e.lastLine();r.to.line>X&&(r={from:r.from,to:hn(X,bn(e,X).text.length),text:[r.text[0]],origin:r.origin}),r.removed=xr(e,r.from,r.to),D||(D=oa(e,r)),e.cm?_l(e.cm,r,O):Wi(e,r,O),Yo(e,D,oe),e.cantEdit&&Xo(e,hn(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=dr(At(bn(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=Mt(Tt);an>N.maxLineLength&&(N.maxLine=Tt,N.maxLineLength=an,N.maxLineChanged=!0,re=!1)}),re&&(e.curOp.updateMaxLine=!0)),Qn(O,X.line),Ni(e,400);var pe=r.text.length-(q.line-X.line)-1;r.full?Gr(e):X.line==q.line&&r.text.length==1&&!gi(e.doc,r)?Xr(e,X.line,"text"):Gr(e,X.line,q.line+1,pe);var Ye=Te(e,"changes"),nt=Te(e,"change");if(nt||Ye){var Lt={from:X,to:q,text:r.text,removed:r.removed,origin:r.origin};nt&&qn(e,"change",e,Lt),Ye&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Lt)}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=hn(pe.from.line+O,pe.from.ch),pe.to=hn(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=bn(e,te(e,r)):N=dr(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),qn(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=dr(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=qr(this);ar(D,Math.max(0,D.height-X)),e&&(Ha(e,function(){js(e,D,-X),Xr(e,O,"widget")}),qn(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=qr(this)-r;if(!N)return;yn(this.doc,O)||ar(O,O.height+N),D&&Ha(D,function(){D.curOp.forceUpdate=!0,js(D,O,N),qn(D,"lineWidgetChanged",D,e,dr(O))})},Oe(ko);function js(e,r,D){Pn(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&&!yn(e,q)){var se=Pn(q)<e.scrollTop;ar(q,q.height+qr(N)),se&&Vi(X,N.height),X.curOp.forceUpdate=!0}return!0}),X&&qn(X,"lineWidgetAdded",X,N,typeof r=="number"?r:dr(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&&qn(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=lr(q.markedSpans,this);e&&!this.collapsed?Xr(e,dr(q),"text"):e&&(re.to!=null&&(N=dr(q)),re.from!=null&&(O=dr(q))),q.markedSpans=Ln(q.markedSpans,re),re.from==null&&this.collapsed&&!yn(this.doc,q)&&e&&ar(q,Ur(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var pe=At(this.lines[se]),Ye=Mt(pe);Ye>e.display.maxLineLength&&(e.display.maxLine=pe,e.display.maxLineLength=Ye,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Gr(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&&qn(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=lr(X.markedSpans,this);if(q.from!=null&&(D=hn(r?X:dr(X),q.from),e==-1))return D;if(q.to!=null&&(O=hn(r?X:dr(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;Ha(O,function(){var N=r.line,X=dr(r.line),q=st(O,X);if(q&&(cr(q),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!yn(D.doc,N)&&D.height!=null){var re=D.height;D.height=null;var se=qr(D)-re;se&&ar(N,N.height+se)}qn(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 ca(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(Yt(e,r.line,r,D,X)||r.line!=D.line&&Yt(e,D.line,r,D,X))throw new Error("Inserting collapsed marker partially overlapping an existing one");Hn()}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&&At(nt)==se.display.maxLine&&(pe=!0),X.collapsed&&re!=r.line&&ar(nt,0),Cr(nt,new ir(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){yn(e,nt)&&ar(nt,0)}),X.clearOnEnter&&Ae(X,"beforeCursorEnter",function(){return X.clear()}),X.readOnly&&(vr(),(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)Gr(se,r.line,D.line+1);else if(X.className||X.startStyle||X.endStyle||X.css||X.attributes||X.title)for(var Ye=r.line;Ye<=D.line;Ye++)Xr(se,Ye,"text");X.atomic&&Os(se.doc),qn(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();qn(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 Ca(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=Qe(X)}),new No(X,q)}function Fs(e){return e.findMarks(hn(e.first,0),e.clipPos(hn(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];Ca(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 Cn("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var X=hn(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}),Ka(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:ha(function(e){var r=hn(this.first,0),D=this.first+this.size-1;bo(this,{from:r,to:hn(D,bn(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ri(this.cm,0,0),Ka(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 bn(this,e)},getLineNumber:function(e){return dr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=bn(this,e)),At(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:ha(function(e,r,D){Cs(this,W(this,typeof e=="number"?hn(e,r||0):e),null,D)}),setSelection:ha(function(e,r,D){Cs(this,W(this,e),W(this,r||e),D)}),extendSelection:ha(function(e,r,D){Vo(this,W(this,e),r&&W(this,r),D)}),extendSelections:ha(function(e,r){ws(this,Q(this,e),r)}),extendSelectionsBy:ha(function(e,r){var D=St(this.sel.ranges,e);ws(this,Q(this,D),r)}),setSelections:ha(function(e,r,D){if(!e.length)return;for(var O=[],N=0;N<e.length;N++)O[N]=new Br(W(this,e[N].anchor),W(this,e[N].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Ka(this,_r(this.cm,O,r),D)}),addSelection:ha(function(e,r,D){var O=this.sel.ranges.slice(0);O.push(new Br(W(this,e),W(this,r||e))),Ka(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:ha(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"&&ai(this,O,r),se=O.length-1;se>=0;se--)bo(this,O[se]);re?Ts(this,re):this.cm&&yi(this.cm)}),undo:ha(function(){$o(this,"undo")}),redo:ha(function(){$o(this,"redo")}),undoSelection:ha(function(){$o(this,"undo",!0)}),redoSelection:ha(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),Ca(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:go(this.history.done),undone:go(this.history.undone)}},setHistory:function(e){var r=this.history=new Ko(this.history.maxGeneration);r.done=go(e.done.slice(0),null,!0),r.undone=go(e.undone.slice(0),null,!0)},setGutterMarker:ha(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:ha(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=bn(this,e),!e)return null}else if(r=dr(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:ha(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:ha(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:ha(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=bn(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,hn(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 fa&&(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];Ca(e,function(N){return O.push(N.id)},!0),e.history=new Ko(null),e.history.done=go(this.history.done,O),e.history.undone=go(this.history.undone,O)}},iterLinkedDocs:function(e){Ca(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:ha(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),ht(r,e)||xa(r.display,e))return;ae(e),P&&(Bs=+new Date);var D=wa(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&&ca(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,ur(Tt))))})()},se=function(Tt,an){if(r.options.allowDropFileTypes&&$(r.options.allowDropFileTypes,Tt.type)==-1){re();return}var gn=new FileReader;gn.onerror=function(){return re()},gn.onload=function(){var Mn=gn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Mn)){re();return}X[an]=Mn,re()},gn.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 Ye=e.dataTransfer.getData("Text");if(Ye){var nt;if(r.state.draggingText&&!r.state.draggingText.copy&&(nt=r.listSelections()),Yo(r.doc,Fn(D,D)),nt)for(var Lt=0;Lt<nt.length;++Lt)_o(r.doc,"",nt[Lt].anchor,nt[Lt].head,"drag");r.replaceSelection(Ye,"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(ht(e,r)||xa(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!f){var D=m("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=wa(e,r);if(!D)return;var O=document.createDocumentFragment();Za(e,D,O),e.display.dragCursor||(e.display.dragCursor=m("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=s?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=St(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,Qe(O).to)<=0;){var q=O.pop();if(or(q.from,X.from)<0){X.from=q.from;break}}O.push(X)}Ha(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=Ke(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 hn(r.line,O,D<0?"after":"before")}function ls(e,r,D,O,N){if(e){r.doc.direction=="rtl"&&(N=-N);var X=$t(D,r.doc.direction);if(X){var q=N<0?Qe(X):X[0],re=N<0==(q.level==1),se=re?"after":"before",pe;if(q.level>0||r.doc.direction=="rtl"){var Ye=$e(r,D);pe=N<0?D.text.length-1:0;var nt=yt(r,Ye,pe).top;pe=ot(function(Lt){return yt(r,Ye,Lt).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 hn(O,pe,se)}}return new hn(O,N<0?D.text.length:0,N<0?"before":"after")}function Il(e,r,D,O){var N=$t(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=He(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,$n){return os(r,jn instanceof hn?jn.ch:jn,$n)},se,pe=function(jn){return e.options.lineWrapping?(se=se||$e(e,r),Xn(e,r,se,jn)):{begin:0,end:r.text.length}},Ye=pe(D.sticky=="before"?re(D,-1):D.ch);if(e.doc.direction=="rtl"||q.level==1){var nt=q.level==1==O<0,Lt=re(D,nt?1:-1);if(Lt!=null&&(nt?Lt<=q.to&&Lt<=Ye.end:Lt>=q.from&&Lt>=Ye.begin)){var Tt=nt?"before":"after";return new hn(D.line,Lt,Tt)}}var an=function(jn,$n,Un){for(var tr=function(sa,Fa){return Fa?new hn(D.line,re(sa,1),"before"):new hn(D.line,sa,"after")};jn>=0&&jn<N.length;jn+=$n){var br=N[jn],mr=$n>0==(br.level!=1),Ir=mr?Un.begin:re(Un.end,-1);if(br.from<=Ir&&Ir<br.to)return tr(Ir,mr);if(Ir=mr?br.from:re(br.to,-1),Un.begin<=Ir&&Ir<Un.end)return tr(Ir,mr)}},gn=an(X+O,O,Ye);if(gn)return gn;var Mn=O>0?Ye.end:re(Ye.begin,-1);return Mn!=null&&!(O>0&&Mn==r.text.length)&&(gn=an(O>0?0:N.length-1,O,pe(Mn)),gn)?gn: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=bn(e.doc,r.head.line).text.length;return r.head.ch==D&&r.head.line<e.lastLine()?{from:r.head,to:hn(r.head.line+1,0)}:{from:r.head,to:hn(r.head.line,D)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return wo(e,function(r){return{from:hn(r.from().line,0),to:W(e.doc,hn(r.to().line+1,0))}})},delLineLeft:function(e){return wo(e,function(r){return{from:hn(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(hn(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(hn(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 Ha(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=bn(e.doc,N.line).text;if(X){if(N.ch==X.length&&(N=new hn(N.line,N.ch-1)),N.ch>0)N=new hn(N.line,N.ch+1),e.replaceRange(X.charAt(N.ch-1)+X.charAt(N.ch-2),hn(N.line,N.ch-2),N,"+transpose");else if(N.line>e.doc.first){var q=bn(e.doc,N.line-1).text;q&&(N=new hn(N.line,1),e.replaceRange(X.charAt(0)+e.doc.lineSeparator()+q.charAt(q.length-1),hn(N.line-1,q.length-1),N,"+transpose"))}}D.push(new Br(N,N))}e.setSelections(D)})},newlineAndIndent:function(e){return Ha(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=bn(e.doc,r),O=At(D);return O!=D&&(r=dr(O)),ls(!0,e,O,r,1)}function kl(e,r){var D=bn(e.doc,r),O=qt(D);return O!=D&&(r=dr(O)),ls(!0,e,D,r,-1)}function Xs(e,r){var D=Ys(e,r.line),O=bn(e.doc,D.line),N=$t(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 hn(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)!=ve}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"&&qn(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(),ht(r,e))return;P&&y<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&&(s?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),I&&!s&&!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)&&(g(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),ht(this,e)}function qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(xa(r.display,e)||ht(r,e)||e.ctrlKey&&!e.altKey||s&&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(ht(r,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,xa(D,e)){t||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(r,e))return;var O=wa(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)!=ve}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=d?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=s?D.metaKey:D.ctrlKey),N.moveOnDrag==null&&(N.moveOnDrag=!(s?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=ca(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&&y==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 Br(r,r);if(D=="word")return e.findWordAt(r);if(D=="line")return new Br(hn(r.line,0),W(e.doc,hn(r.line+1,0)));var O=D(e,r);return new Br(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 Br(D,D)):(q=X.sel.primary(),re=X.sel.primIndex),O.unit=="rectangle")O.addNew||(q=new Br(D,D)),D=wa(e,r,!0,!0),re=-1;else{var Ye=tl(e,D,O.unit);O.extend?q=as(q,Ye.anchor,Ye.head,O.extend):q=Ye}O.addNew?re==-1?(re=pe.length,Ka(X,_r(e,pe.concat([q]),re),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[re].empty()&&O.unit=="char"&&!O.extend?(Ka(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,Ka(X,new Wa([q],0),fe),se=X.sel);var nt=D;function Lt(Un){if(or(nt,Un)==0)return;if(nt=Un,O.unit=="rectangle"){for(var tr=[],br=e.options.tabSize,mr=V(bn(X,D.line).text,D.ch,br),Ir=V(bn(X,Un.line).text,Un.ch,br),sa=Math.min(mr,Ir),Fa=Math.max(mr,Ir),va=Math.min(D.line,Un.line),ii=Math.min(e.lastLine(),Math.max(D.line,Un.line));va<=ii;va++){var ti=bn(X,va).text,Aa=Pe(ti,sa,br);sa==Fa?tr.push(new Br(hn(va,Aa),hn(va,Aa))):ti.length>Aa&&tr.push(new Br(hn(va,Aa),hn(va,Pe(ti,Fa,br))))}tr.length||tr.push(new Br(D,D)),Ka(X,_r(e,se.ranges.slice(0,re).concat(tr),re),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Un)}else{var ni=q,za=tl(e,Un,O.unit),ka=ni.anchor,Da;or(za.anchor,ka)>0?(Da=za.head,ka=ra(ni.from(),za.anchor)):(Da=za.anchor,ka=Zr(ni.to(),za.head));var Ea=se.ranges.slice(0);Ea[re]=Yl(e,new Br(W(X,ka),Da)),Ka(X,_r(e,Ea,re),fe)}}var Tt=N.wrapper.getBoundingClientRect(),an=0;function gn(Un){var tr=++an,br=wa(e,Un,!0,O.unit=="rectangle");if(!br)return;if(or(br,nt)!=0){e.curOp.focus=j(),Lt(br);var mr=Ii(N,X);(br.line>=mr.to||br.line<mr.from)&&setTimeout(ca(e,function(){an==tr&&gn(Un)}),150)}else{var Ir=Un.clientY<Tt.top?-20:Un.clientY>Tt.bottom?20:0;Ir&&setTimeout(ca(e,function(){if(an!=tr)return;N.scroller.scrollTop+=Ir,gn(Un)}),50)}}function Mn(Un){e.state.selectingText=!1,an=Infinity,Un&&(ae(Un),N.input.focus()),Et(N.wrapper.ownerDocument,"mousemove",jn),Et(N.wrapper.ownerDocument,"mouseup",$n),X.history.lastSelOrigin=null}var jn=ca(e,function(Un){Un.buttons===0||!ze(Un)?Mn(Un):gn(Un)}),$n=ca(e,Mn);e.state.selectingText=$n,Ae(N.wrapper.ownerDocument,"mousemove",jn),Ae(N.wrapper.ownerDocument,"mouseup",$n)}function Yl(e,r){var D=r.anchor,O=r.head,N=bn(e.doc,D.line);if(or(D,O)==0&&D.sticky==O.sticky)return r;var X=$t(N);if(!X)return r;var q=He(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 Ye=He(X,O.ch,O.sticky),nt=Ye-q||(O.ch-D.ch)*(re.level==1?-1:1);Ye==se-1||Ye==se?pe=nt<0:pe=nt>0}var Lt=X[se+(pe?-1:0)],Tt=pe==(Lt.level==1),an=Tt?Lt.from:Lt.to,gn=Tt?"after":"before";return D.ch==an&&D.sticky==gn?r:new Br(new hn(D.line,an,gn),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(Lt){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 Ye=Or(e.doc,X),nt=e.display.gutterSpecs[se];return Ze(e,D,e,Ye,nt.className,r),he(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function rl(e,r){if(xa(e.display,r)||Xl(e,r))return;if(ht(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-"),fn(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,Ra(O)},!0),D("indentUnit",2,Ra,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(O){Ya(O),fn(O),Gr(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 Ye=se.text.indexOf(N,pe);if(Ye==-1)break;pe=Ye+N.length,X.push(hn(q,Ye))}q++});for(var re=X.length-1;re>=0;re--)_o(O.doc,N,X[re],hn(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",Tn,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",!E),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=Ua(N,O.options.lineNumbers),di(O)},!0),D("fixedGutter",!0,function(O,N){O.display.gutters.style.left=N?da(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=Ua(O.options.gutters,N),di(O)},!0),D("firstLineNumber",1,di,!0),D("lineNumberFormatter",function(O){return O},di,!0),D("showCursorWhenSelecting",!1,Vr,!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,Vr,!0),D("singleCursorHeightPerLine",!0,Vr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,Ya,!0),D("addModeClass",!1,Ya,!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,Ya,!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):(g(e.display.wrapper,"CodeMirror-wrap"),Ht(e)),Na(e),Gr(e),fn(e),setTimeout(function(){return mi(e)},100)}function fa(e,r){var D=this;if(!(this instanceof fa))return new fa(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 fa.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&&y<11&&setTimeout(function(){return D.display.input.reset(!0)},20),Zl(this),Al(),ui(this),this.curOp.forceUpdate=!0,gs(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);la(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")}fa.defaults=il,fa.optionHandlers=qo;function Zl(e){var r=e.display;Ae(r.scroller,"mousedown",ca(e,el)),P&&y<11?Ae(r.scroller,"dblclick",ca(e,function(se){if(ht(e,se))return;var pe=wa(e,se);if(!pe||cs(e,se)||xa(e.display,se))return;ae(se);var Ye=e.findWordAt(pe);Vo(e.doc,Ye.anchor,Ye.head)})):Ae(r.scroller,"dblclick",function(se){return ht(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 Ye=pe.left-se.left,nt=pe.top-se.top;return Ye*Ye+nt*nt>20*20}Ae(r.scroller,"touchstart",function(se){if(!ht(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&&!xa(r,se)&&pe.left!=null&&!pe.moved&&new Date-pe.start<300){var Ye=e.coordsChar(r.activeTouch,"page"),nt;!pe.prev||q(pe,pe.prev)?nt=new Br(Ye,Ye):!pe.prev.prev||q(pe,pe.prev.prev)?nt=e.findWordAt(Ye):nt=new Br(hn(Ye.line,0),W(e.doc,hn(Ye.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){ht(e,se)||_e(se)},over:function(se){ht(e,se)||(Rl(e,se),_e(se))},start:function(se){return Ol(e,se)},drop:ca(e,Sl),leave:function(se){ht(e,se)||Hs(e)}};var re=r.input.getField();Ae(re,"keyup",function(se){return Zs.call(e,se)}),Ae(re,"keydown",ca(e,Js)),Ae(re,"keypress",ca(e,qs)),Ae(re,"focus",function(se){return li(e,se)}),Ae(re,"blur",function(se){return Ci(e,se)})}var hs=[];fa.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=On(e,r).state:D="prev");var q=e.options.tabSize,re=bn(N,r),se=V(re.text,null,q);re.stateAfter&&(re.stateAfter=null);var pe=re.text.match(/^\s*/)[0],Ye;if(!O&&!/\S/.test(re.text))Ye=0,D="not";else if(D=="smart"&&(Ye=N.mode.indent(X,re.text.slice(pe.length),re.text),Ye==ve||Ye>150)){if(!O)return;D="prev"}D=="prev"?r>N.first?Ye=V(bn(N,r-1).text,null,q):Ye=0:D=="add"?Ye=se+e.options.indentUnit:D=="subtract"?Ye=se-e.options.indentUnit:typeof D=="number"&&(Ye=se+D),Ye=Math.max(0,Ye);var nt="",Lt=0;if(e.options.indentWithTabs)for(var Tt=Math.floor(Ye/q);Tt;--Tt)Lt+=q,nt+=" ";if(Lt<Ye&&(nt+=de(Ye-Lt)),nt!=pe)return _o(N,nt,hn(r,0),hn(r,pe.length),"+input"),re.stateAfter=null,!0;for(var an=0;an<N.sel.ranges.length;an++){var gn=N.sel.ranges[an];if(gn.head.line==r&&gn.head.ch<pe.length){var Mn=hn(r,pe.length);is(N,an,new Br(Mn,Mn));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 Ye=0;Ye<wi.text.length;Ye++)pe.push(X.splitLines(wi.text[Ye]))}}else se.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(pe=St(se,function(jn){return[jn]}));for(var nt=e.curOp.updateInput,Lt=O.ranges.length-1;Lt>=0;Lt--){var Tt=O.ranges[Lt],an=Tt.from(),gn=Tt.to();Tt.empty()&&(D&&D>0?an=hn(an.line,an.ch-D):e.state.overwrite&&!re?gn=hn(gn.line,Math.min(bn(X,gn.line).text.length,gn.ch+Qe(se).length)):re&&wi&&wi.lineWise&&wi.text.join(`
|
|
`)==se.join(`
|
|
`)&&(an=gn=hn(an.line,0)));var Mn={from:an,to:gn,text:pe?pe[Lt%pe.length]:se,origin:N||(re?"paste":e.state.cutIncoming>q?"cut":"+input")};bo(e.doc,Mn),qn(e,"inputRead",e,Mn)}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&&Ha(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(bn(e.doc,N.head.line).text.slice(0,N.head.ch))&&(q=zo(e,N.head.line,"smart")));q&&qn(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:hn(N,0),head:hn(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=m("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=m("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),c&&(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)&&ca(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:Oa(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++,Gr(this)}),removeOverlay:Oa(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++,Gr(this);return}}}),indentLine:Oa(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:Oa(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(),Ye=Math.max(X,se.line);X=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var nt=Ye;nt<X;++nt)zo(this,nt,O);var Lt=this.doc.sel.ranges;se.ch==0&&N.length==Lt.length&&Lt[q].from().ch>0&&is(this.doc,q,new Br(se,Lt[q].to()),oe)}}}),getTokenAt:function(O,N){return sn(this,O,N)},getLineTokens:function(O,N){return sn(this,hn(O),N,!0)},getTokenTypeAt:function(O){O=W(this.doc,O);var N=nn(this,bn(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 Ye=se?se.indexOf("overlay "):-1;return Ye<0?se:Ye==0?null:se.slice(0,Ye-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 Ye=0;Ye<q._global.length;Ye++){var nt=q._global[Ye];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),On(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(),Jn(this,X,N||"page")},charCoords:function(O,N){return wr(this,W(this.doc,O),N||"page")},coordsChar:function(O,N){return O=er(this,O,N||"page"),gr(this,O.left,O.top)},lineAtHeight:function(O,N){return O=er(this,{top:O,left:0},N||"page").top,Or(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=bn(this.doc,O)}else re=O;return xn(this,re,{top:0,left:0},N||"page",X||q).top+(q?this.doc.height-Pn(re):0)},defaultTextHeight:function(){return Ur(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=Jn(this,W(this.doc,O));var pe=O.bottom,Ye=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),Lt=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),Ye+N.offsetWidth>Lt&&(Ye=Lt-N.offsetWidth)}N.style.top=pe+"px",N.style.left=N.style.right="",re=="right"?(Ye=se.sizer.clientWidth-N.offsetWidth,N.style.right="0px"):(re=="left"?Ye=0:re=="middle"&&(Ye=(se.sizer.clientWidth-N.offsetWidth)/2),N.style.left=Ye+"px"),X&&Gi(this,{left:Ye,top:pe,right:Ye+N.offsetWidth,bottom:pe+N.offsetHeight})},triggerOnKeyDown:Oa(Js),triggerOnKeyPress:Oa(qs),triggerOnKeyUp:Zs,triggerOnMouseDown:Oa(el),execCommand:function(O){if(Fo.hasOwnProperty(O))return Fo[O].call(null,this)},triggerElectric:Oa(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:Oa(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:Oa(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),Ye=0;Ye<N;++Ye){var nt=Jn(this,pe,"div");if(se==null?se=nt.left:nt.left=se,pe=cl(this,nt,re,X),pe.hitSide)break}return pe},moveV:Oa(function(O,N){var X=this,q=this.doc,re=[],se=!this.display.shift&&!q.extend&&q.sel.somethingSelected();if(q.extendSelectionsBy(function(Ye){if(se)return O<0?Ye.from():Ye.to();var nt=Jn(X,Ye.head,"div");Ye.goalColumn!=null&&(nt.left=Ye.goalColumn),re.push(nt.left);var Lt=cl(X,nt,O,N);return N=="page"&&Ye==q.sel.primary()&&Vi(X,wr(X,Lt,"div").top-nt.top),Lt},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=bn(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),Ye=ut(pe,se)?function(nt){return ut(nt,se)}:/\s/.test(pe)?function(nt){return/\s/.test(nt)}:function(nt){return!/\s/.test(nt)&&!ut(nt)};q>0&&Ye(X.charAt(q-1));)--q;for(;re<X.length&&Ye(X.charAt(re));)++re}return new Br(hn(O.line,q),hn(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"):g(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:Oa(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:Oa(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:hn(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:Oa(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&&hr(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 Ha(this,O)},startOperation:function(){return ui(this)},endOperation:function(){return Ei(this)},refresh:Oa(function(){var O=this.display.cachedTextHeight;Gr(this),this.curOp.forceUpdate=!0,fn(this),Ri(this,this.doc.scrollLeft,this.doc.scrollTop),Zi(this.display),(O==null||Math.abs(O-Ur(this.display))>.5||this.options.lineWrapping)&&Na(this),Ze(this,"refresh",this)}),swapDoc:Oa(function(O){var N=this.doc;return N.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,O),fn(this),this.display.input.reset(),Ri(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,qn(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=bn(e,r.line),se=N&&e.direction=="rtl"?-D:D;function pe(){var $n=r.line+se;return $n<e.first||$n>=e.first+e.size?!1:(r=new hn($n,r.ch,r.sticky),re=bn(e,$n))}function Ye($n){var Un;if(O=="codepoint"){var tr=re.text.charCodeAt(r.ch+(O>0?0:-1));isNaN(tr)?Un=null:Un=new hn(r.line,Math.max(0,Math.min(re.text.length,r.ch+D*(tr>=55296&&tr<56320?2:1))),-D)}else N?Un=Il(e.cm,re,r,D):Un=ss(re,r,D);if(Un==null)if(!$n&&pe())r=ls(N,e.cm,re,r.line,se);else return!1;else r=Un;return!0}if(O=="char"||O=="codepoint")Ye();else if(O=="column")Ye(!0);else if(O=="word"||O=="group")for(var nt=null,Lt=O=="group",Tt=e.cm&&e.cm.getHelper(r,"wordChars"),an=!0;!(D<0&&!Ye(!an));an=!1){var gn=re.text.charAt(r.ch)||`
|
|
`,Mn=ut(gn,Tt)?"w":Lt&&gn==`
|
|
`?"n":!Lt||/\s/.test(gn)?null:"p";if(Lt&&!an&&!Mn&&(Mn="s"),nt&&nt!=Mn){D<0&&(D=1,Ye(),r.sticky="after");break}if(Mn&&(nt=Mn),D>0&&!Ye(!an))break}var jn=Xo(e,r,X,q,!0);return ua(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*Ur(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=gr(e,X,q),!pe.outside);){if(D<0?q<=0:q>=N.height){pe.hitSide=!0;break}q+=D*5}return pe}var na=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};na.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)||ht(O,re)||ol(re,O))return;y<=11&&setTimeout(ca(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)||ht(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 Ye=dl(),nt=Ye.firstChild;O.display.lineSpace.insertBefore(Ye,O.display.lineSpace.firstChild),nt.value=wi.text.join(`
|
|
`);var Lt=document.activeElement;z(nt),setTimeout(function(){O.display.lineSpace.removeChild(Ye),Lt.focus(),Lt==N&&D.showPrimarySelection()},50)}Ae(N,"copy",q),Ae(N,"cut",q)},na.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},na.prototype.prepareSelection=function(){var e=Ja(this.cm,!1);return e.focus=document.activeElement==this.div,e},na.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},na.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},na.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(ra(X,q),O)==0&&or(Zr(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 Ye=re[re.length-1].measure,nt=Ye.maps?Ye.maps[Ye.maps.length-1]:Ye.map;pe={node:nt[nt.length-1],offset:nt[nt.length-2]-nt[nt.length-3]}}if(!se||!pe){e.removeAllRanges();return}var Lt=e.rangeCount&&e.getRangeAt(0),Tt;try{Tt=x(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)),Lt&&e.anchorNode==null?e.addRange(Lt):I&&this.startGracePeriod()),this.rememberSelection()},na.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)},na.prototype.showMultipleSelections=function(e){p(this.cm.display.cursorDiv,e.cursors),p(this.cm.display.selectionDiv,e.selection)},na.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},na.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return v(this.div,r)},na.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},na.prototype.blur=function(){this.div.blur()},na.prototype.getField=function(){return this.div},na.prototype.supportsTouch=function(){return!0},na.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ha(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)},na.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},na.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(l&&i&&this.cm.display.gutterSpecs.length&&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&&Ha(r,function(){Ka(r.doc,Fn(D,O),oe),(D.bad||O.bad)&&(r.curOp.selectionChanged=!0)})},na.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=hn(O.line-1,bn(e.doc,O.line-1).length)),N.ch==bn(e.doc,N.line).text.length&&N.line<e.lastLine()&&(N=hn(N.line+1,0)),O.line<r.viewFrom||N.line>r.viewTo-1)return!1;var X,q,re;O.line==r.viewFrom||(X=ea(e,O.line))==0?(q=dr(r.view[0].line),re=r.view[0].node):(q=dr(r.view[X].line),re=r.view[X-1].node.nextSibling);var se=ea(e,N.line),pe,Ye;if(se==r.view.length-1?(pe=r.viewTo-1,Ye=r.lineDiv.lastChild):(pe=dr(r.view[se+1].line)-1,Ye=r.view[se+1].node.previousSibling),!re)return!1;for(var nt=e.doc.splitLines(tu(e,re,Ye,q,pe)),Lt=xr(e.doc,hn(q,0),hn(pe,bn(e.doc,pe).text.length));nt.length>1&&Lt.length>1;)if(Qe(nt)==Qe(Lt))nt.pop(),Lt.pop(),pe--;else if(nt[0]==Lt[0])nt.shift(),Lt.shift(),q++;else break;for(var Tt=0,an=0,gn=nt[0],Mn=Lt[0],jn=Math.min(gn.length,Mn.length);Tt<jn&&gn.charCodeAt(Tt)==Mn.charCodeAt(Tt);)++Tt;for(var $n=Qe(nt),Un=Qe(Lt),tr=Math.min($n.length-(nt.length==1?Tt:0),Un.length-(Lt.length==1?Tt:0));an<tr&&$n.charCodeAt($n.length-an-1)==Un.charCodeAt(Un.length-an-1);)++an;if(nt.length==1&&Lt.length==1&&q==O.line)for(;Tt&&Tt>O.ch&&$n.charCodeAt($n.length-an-1)==Un.charCodeAt(Un.length-an-1);)Tt--,an++;nt[nt.length-1]=$n.slice(0,$n.length-an).replace(/^\u200b+/,""),nt[0]=nt[0].slice(Tt).replace(/\u200b+$/,"");var br=hn(q,Tt),mr=hn(pe,Lt.length?Qe(Lt).length-an:0);if(nt.length>1||nt[0]||or(br,mr))return _o(e.doc,nt,br,mr,"+input"),!0},na.prototype.ensurePolled=function(){this.forceCompositionEnd()},na.prototype.reset=function(){this.forceCompositionEnd()},na.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},na.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)},na.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ha(this.cm,function(){return Gr(e.cm)})},na.prototype.setUneditable=function(e){e.contentEditable="false"},na.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ca(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},na.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},na.prototype.onContextMenu=function(){},na.prototype.resetPosition=function(){},na.prototype.needsContentAttribute=!0;function hl(e,r){var D=st(e,r.line);if(!D||D.hidden)return null;var O=bn(e.doc,r.line),N=me(D,O,r.line),X=$t(O,e.doc.direction),q="left";if(X){var re=He(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 Ye(){q&&(X+=re,se&&(X+=re),q=se=!1)}function nt(Tt){Tt&&(Ye(),X+=Tt)}function Lt(Tt){if(Tt.nodeType==1){var an=Tt.getAttribute("cm-text");if(an){nt(an);return}var gn=Tt.getAttribute("cm-marker"),Mn;if(gn){var jn=e.findMarks(hn(O,0),hn(N+1,0),pe(+gn));jn.length&&(Mn=jn[0].find(0))&&nt(xr(e.doc,Mn.from,Mn.to).join(re));return}if(Tt.getAttribute("contenteditable")=="false")return;var $n=/^(pre|div|p|li|table|br)$/i.test(Tt.nodeName);if(!/^br$/i.test(Tt.nodeName)&&Tt.textContent.length==0)return;$n&&Ye();for(var Un=0;Un<Tt.childNodes.length;Un++)Lt(Tt.childNodes[Un]);/^(pre|p)$/i.test(Tt.nodeName)&&(se=!0),$n&&(q=!0)}else Tt.nodeType==3&&nt(Tt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Lt(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(hn(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||!v(O,r))return To(hn(dr(e.line),0),!0);if(r==O&&(N=!0,r=O.childNodes[D],D=0,!r)){var X=e.rest?Qe(e.rest):e.line;return To(hn(dr(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 Ye(Mn,jn,$n){for(var Un=-1;Un<(pe?pe.length:0);Un++)for(var tr=Un<0?se.map:pe[Un],br=0;br<tr.length;br+=3){var mr=tr[br+2];if(mr==Mn||mr==jn){var Ir=dr(Un<0?e.line:e.rest[Un]),sa=tr[br]+$n;return($n<0||mr!=Mn)&&(sa=tr[br+($n?1:0)]),hn(Ir,sa)}}}var nt=Ye(q,re,D);if(nt)return To(nt,N);for(var Lt=re.nextSibling,Tt=q?q.nodeValue.length-D:0;Lt;Lt=Lt.nextSibling){if(nt=Ye(Lt,Lt.firstChild,0),nt)return To(hn(nt.line,nt.ch-Tt),N);Tt+=Lt.textContent.length}for(var an=re.previousSibling,gn=D;an;an=an.previousSibling){if(nt=Ye(an,an.firstChild,-1),nt)return To(hn(nt.line,nt.ch+gn),N);gn+=an.textContent.length}}var Ta=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null};Ta.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),c&&(N.style.width="0px"),Ae(N,"input",function(){P&&y>=9&&r.hasSelection&&(r.hasSelection=null),D.poll()}),Ae(N,"paste",function(q){if(ht(O,q)||ol(q,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function X(q){if(ht(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(xa(e,q)||ht(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){xa(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)})},Ta.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var e=this.cm,r=e.display,D=e.doc,O=Ja(e);if(e.options.moveInputWithCursor){var N=Jn(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},Ta.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")},Ta.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&&y>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",P&&y>=9&&(this.hasSelection=null))},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||j()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.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()})},Ta.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)},Ta.prototype.poll=function(){var e=this,r=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!r.state.focused||Rt(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&&y>=9&&this.hasSelection===N||s&&/[\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 Ha(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},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){P&&y>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(e){var r=this,D=r.cm,O=D.display,N=r.textarea;r.contextMenuPending&&r.contextMenuPending();var X=wa(D,e),q=O.scroller.scrollTop;if(!X||u)return;var re=D.options.resetSelectionOnContextMenu;re&&D.doc.sel.contains(X)==-1&&ca(D,Ka)(D.doc,Fn(X),oe);var se=N.style.cssText,pe=r.wrapper.style.cssText,Ye=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",N.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-Ye.top-5)+"px; left: "+(e.clientX-Ye.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 Lt(){if(N.selectionStart!=null){var gn=D.somethingSelected(),Mn="\u200B"+(gn?N.value:"");N.value="\u21DA",N.value=Mn,r.prevInput=gn?"":"\u200B",N.selectionStart=1,N.selectionEnd=Mn.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&&y<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=q),N.selectionStart!=null){(!P||P&&y<9)&&Lt();var gn=0,Mn=function(){O.selForContextMenu==D.doc.sel&&N.selectionStart==0&&N.selectionEnd>0&&r.prevInput=="\u200B"?ca(D,Ds)(D):gn++<10?O.detectingSelectAll=setTimeout(Mn,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(Mn,200)}}if(P&&y>=9&&Lt(),k){_e(e);var an=function(){Et(window,"mouseup",an),setTimeout(Tt,20)};Ae(window,"mouseup",an)}else setTimeout(Tt,50)},Ta.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ta.prototype.setUneditable=function(){},Ta.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=fa(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=Pe,e.isWordChar=ke,e.Pass=ve,e.signal=Ze,e.Line=Cn,e.changeEnd=ur,e.scrollbarModel=$i,e.Pos=hn,e.cmpPos=or,e.modes=Ut,e.mimeModes=_t,e.resolveMode=Ge,e.getMode=dt,e.modeExtensions=Pt,e.extendMode=zt,e.copyState=ln,e.startState=nr,e.innerMode=vn,e.commands=Fo,e.keyMap=zi,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=xo,e.normalizeKeyMap=Pl,e.StringStream=Kn,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=v,e.rmClass=g,e.keyNames=eo}$l(fa),ql(fa);var iu="iter insert remove copy getEditor constructor".split(" ");for(var ns in ei.prototype)ei.prototype.hasOwnProperty(ns)&&$(iu,ns)<0&&(fa.prototype[ns]=function(e){return function(){return e.apply(this.doc,arguments)}}(ei.prototype[ns]));return Oe(ei),fa.inputStyles={textarea:Ta,contenteditable:na},fa.defineMode=function(e){!fa.defaults.mode&&e!="null"&&(fa.defaults.mode=e),Gt.apply(this,arguments)},fa.defineMIME=en,fa.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),fa.defineMIME("text/plain","null"),fa.defineExtension=function(e,r){fa.prototype[e]=r},fa.defineDocExtension=function(e,r){ei.prototype[e]=r},fa.fromTextArea=ru,au(fa),fa.version="5.58.2",fa})},WaYH:function(We,J,L){"use strict";var Y=L("rePB"),B=L("Ff2n"),I=L("VTBJ"),F=L("1OyB"),S=L("vuIU"),R=L("JX7q"),P=L("Ji7U"),y=L("LK+K"),t=L("q1tI"),b=L("TSYQ"),i=L.n(b),u=L("sboe"),f=L("OZM5"),a=function(k){var w=k.prefixCls,g=k.level,h=k.isStart,p=k.isEnd;if(!g)return null;for(var m="".concat(w,"-indent-unit"),_=[],x=0;x<g;x+=1){var v;_.push(t.createElement("span",{key:x,className:i()(m,(v={},Object(Y.a)(v,"".concat(m,"-start"),h[x+1]),Object(Y.a)(v,"".concat(m,"-end"),p[x+1]),Object(Y.a)(v,"".concat(m,"-end-first-level"),!x&&p[0]),v))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(w,"-indent")},_)},o=a,c=L("815F"),l="open",n="close",s="---",d=function(C){Object(P.a)(w,C);var k=Object(y.a)(w);function w(){var g;return Object(F.a)(this,w),g=k.apply(this,arguments),g.state={dragNodeHighlight:!1},g.onSelectorClick=function(h){var p=g.props.context.onNodeClick;p(h,Object(c.b)(g.props)),g.isSelectable()?g.onSelect(h):g.onCheck(h)},g.onSelectorDoubleClick=function(h){var p=g.props.context.onNodeDoubleClick;p(h,Object(c.b)(g.props))},g.onSelect=function(h){if(g.isDisabled())return;var p=g.props.context.onNodeSelect;h.preventDefault(),p(h,Object(c.b)(g.props))},g.onCheck=function(h){if(g.isDisabled())return;var p=g.props,m=p.disableCheckbox,_=p.checked,x=g.props.context.onNodeCheck;if(!g.isCheckable()||m)return;h.preventDefault();var v=!_;x(h,Object(c.b)(g.props),v)},g.onMouseEnter=function(h){var p=g.props.context.onNodeMouseEnter;p(h,Object(c.b)(g.props))},g.onMouseLeave=function(h){var p=g.props.context.onNodeMouseLeave;p(h,Object(c.b)(g.props))},g.onContextMenu=function(h){var p=g.props.context.onNodeContextMenu;p(h,Object(c.b)(g.props))},g.onDragStart=function(h){var p=g.props.context.onNodeDragStart;h.stopPropagation(),g.setState({dragNodeHighlight:!0}),p(h,Object(R.a)(g));try{h.dataTransfer.setData("text/plain","")}catch(m){}},g.onDragEnter=function(h){var p=g.props.context.onNodeDragEnter;h.preventDefault(),h.stopPropagation(),p(h,Object(R.a)(g))},g.onDragOver=function(h){var p=g.props.context.onNodeDragOver;h.preventDefault(),h.stopPropagation(),p(h,Object(R.a)(g))},g.onDragLeave=function(h){var p=g.props.context.onNodeDragLeave;h.stopPropagation(),p(h,Object(R.a)(g))},g.onDragEnd=function(h){var p=g.props.context.onNodeDragEnd;h.stopPropagation(),g.setState({dragNodeHighlight:!1}),p(h,Object(R.a)(g))},g.onDrop=function(h){var p=g.props.context.onNodeDrop;h.preventDefault(),h.stopPropagation(),g.setState({dragNodeHighlight:!1}),p(h,Object(R.a)(g))},g.onExpand=function(h){var p=g.props.context.onNodeExpand;p(h,Object(c.b)(g.props))},g.setSelectHandle=function(h){g.selectHandle=h},g.getNodeState=function(){var h=g.props.expanded;return g.isLeaf()?null:h?l:n},g.hasChildren=function(){var h=g.props.eventKey,p=g.props.context.keyEntities,m=p[h]||{},_=m.children;return!!(_||[]).length},g.isLeaf=function(){var h=g.props,p=h.isLeaf,m=h.loaded,_=g.props.context.loadData,x=g.hasChildren();return p===!1?!1:p||!_&&!x||_&&m&&!x},g.isDisabled=function(){var h=g.props.disabled,p=g.props.context.disabled;return!!(p||h)},g.isCheckable=function(){var h=g.props.checkable,p=g.props.context.checkable;return!p||h===!1?!1:p},g.syncLoadData=function(h){var p=h.expanded,m=h.loading,_=h.loaded,x=g.props.context,v=x.loadData,j=x.onNodeLoad;if(m)return;v&&p&&!g.isLeaf()&&(!g.hasChildren()&&!_&&j(Object(c.b)(g.props)))},g.renderSwitcher=function(){var h=g.props,p=h.expanded,m=h.switcherIcon,_=g.props.context,x=_.prefixCls,v=_.switcherIcon,j=m||v;if(g.isLeaf())return t.createElement("span",{className:i()("".concat(x,"-switcher"),"".concat(x,"-switcher-noop"))},typeof j=="function"?j(Object(I.a)(Object(I.a)({},g.props),{},{isLeaf:!0})):j);var U=i()("".concat(x,"-switcher"),"".concat(x,"-switcher_").concat(p?l:n));return t.createElement("span",{onClick:g.onExpand,className:U},typeof j=="function"?j(Object(I.a)(Object(I.a)({},g.props),{},{isLeaf:!1})):j)},g.renderCheckbox=function(){var h=g.props,p=h.checked,m=h.halfChecked,_=h.disableCheckbox,x=g.props.context.prefixCls,v=g.isDisabled(),j=g.isCheckable();if(!j)return null;var U=typeof j!="boolean"?j:null;return t.createElement("span",{className:i()("".concat(x,"-checkbox"),p&&"".concat(x,"-checkbox-checked"),!p&&m&&"".concat(x,"-checkbox-indeterminate"),(v||_)&&"".concat(x,"-checkbox-disabled")),onClick:g.onCheck},U)},g.renderIcon=function(){var h=g.props.loading,p=g.props.context.prefixCls;return t.createElement("span",{className:i()("".concat(p,"-iconEle"),"".concat(p,"-icon__").concat(g.getNodeState()||"docu"),h&&"".concat(p,"-icon_loading"))})},g.renderSelector=function(){var h=g.state.dragNodeHighlight,p=g.props,m=p.title,_=p.selected,x=p.icon,v=p.loading,j=p.data,U=g.props.context,T=U.prefixCls,z=U.showIcon,H=U.icon,M=U.draggable,V=U.loadData,K=U.titleRender,$=g.isDisabled(),Z="".concat(T,"-node-content-wrapper"),ve;if(z){var oe=x||H;ve=oe?t.createElement("span",{className:i()("".concat(T,"-iconEle"),"".concat(T,"-icon__customize"))},typeof oe=="function"?oe(g.props):oe):g.renderIcon()}else V&&v&&(ve=g.renderIcon());var fe;typeof m=="function"?fe=m(j):K?fe=K(j):fe=m;var ye=t.createElement("span",{className:"".concat(T,"-title")},fe);return t.createElement("span",{ref:g.setSelectHandle,title:typeof m=="string"?m:"",className:i()("".concat(Z),"".concat(Z,"-").concat(g.getNodeState()||"normal"),!$&&(_||h)&&"".concat(T,"-node-selected"),!$&&M&&"draggable"),draggable:!$&&M||void 0,"aria-grabbed":!$&&M||void 0,onMouseEnter:g.onMouseEnter,onMouseLeave:g.onMouseLeave,onContextMenu:g.onContextMenu,onClick:g.onSelectorClick,onDoubleClick:g.onSelectorDoubleClick,onDragStart:M?g.onDragStart:void 0},ve,ye)},g}return Object(S.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,m=p.eventKey,_=p.className,x=p.style,v=p.dragOver,j=p.dragOverGapTop,U=p.dragOverGapBottom,T=p.isLeaf,z=p.isStart,H=p.isEnd,M=p.expanded,V=p.selected,K=p.checked,$=p.halfChecked,Z=p.loading,ve=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"]),Pe=this.props.context,ge=Pe.prefixCls,de=Pe.filterTreeNode,Qe=Pe.draggable,St=Pe.keyEntities,Ee=this.isDisabled(),De=Object(f.f)(ye),rt=St[m]||{},Be=rt.level,ke=H[H.length-1];return t.createElement("div",Object.assign({ref:ve,className:i()(_,"".concat(ge,"-treenode"),(h={},Object(Y.a)(h,"".concat(ge,"-treenode-disabled"),Ee),Object(Y.a)(h,"".concat(ge,"-treenode-switcher-").concat(M?"open":"close"),!T),Object(Y.a)(h,"".concat(ge,"-treenode-checkbox-checked"),K),Object(Y.a)(h,"".concat(ge,"-treenode-checkbox-indeterminate"),$),Object(Y.a)(h,"".concat(ge,"-treenode-selected"),V),Object(Y.a)(h,"".concat(ge,"-treenode-loading"),Z),Object(Y.a)(h,"".concat(ge,"-treenode-active"),oe),Object(Y.a)(h,"".concat(ge,"-treenode-leaf-last"),ke),Object(Y.a)(h,"drag-over",!Ee&&v),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(c.b)(this.props))),h)),style:x,onDragEnter:Qe?this.onDragEnter:void 0,onDragOver:Qe?this.onDragOver:void 0,onDragLeave:Qe?this.onDragLeave:void 0,onDrop:Qe?this.onDrop:void 0,onDragEnd:Qe?this.onDragEnd:void 0,onMouseMove:fe},De),t.createElement(o,{prefixCls:ge,level:Be,isStart:z,isEnd:H}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),w}(t.Component),E=function(k){return t.createElement(u.a.Consumer,null,function(w){return t.createElement(d,Object.assign({},k,{context:w}))})};E.displayName="TreeNode",E.defaultProps={title:s},E.isTreeNode=1;var A=J.a=E},Xm8N:function(We,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("miYZ"),F=L("tsqr"),S=L("9og8"),R=L("WmNS"),P=L.n(R),y=L("q1tI"),t=L.n(y),b=L("ErOA"),i=L("Ty5D"),u=L("9kvl"),f=function(o){var c=o.shixunHomeworks,l=o.dispatch,n=Object(i.i)();return t.a.createElement(B.a,{centered:!0,title:"\u63D0\u793A",visible:c.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(S.a)(P.a.mark(function s(){var d,E,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(c.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:n.coursesId}});case 2:d=w.sent,d.shixun_identifier&&(F.b.success("\u64CD\u4F5C\u6210\u529F"),l({type:"shixunHomeworks/setActionTabs",payload:{}}),C=d==null||((E=d.new_works)===null||E===void 0||((A=E.find(function(g){return"".concat(g.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()}},s)})),onCancel:function(){l({type:"shixunHomeworks/setActionTabs",payload:{}})}},t.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),t.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};J.a=Object(u.a)(function(a){var o=a.shixunHomeworks;return{shixunHomeworks:o}})(f)},Xmg4:function(We,J,L){var Y=L("bYtY"),B=L("LPTA"),I=B.devicePixelRatio,F=L("K2GJ"),S=L("3C/r");function R(){return!1}function P(b,i,u){var f=Y.createCanvas(),a=i.getWidth(),o=i.getHeight(),c=f.style;return c&&(c.position="absolute",c.left=0,c.top=0,c.width=a+"px",c.height=o+"px",f.setAttribute("data-zr-dom-id",b)),f.width=a*u,f.height=o*u,f}var y=function(b,i,u){var f;u=u||I,typeof b=="string"?f=P(b,i,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=i,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=u};y.prototype={constructor:y,__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,i){var u=this.dpr,f=this.dom,a=f.style,o=this.domBack;a&&(a.width=b+"px",a.height=i+"px"),f.width=b*u,f.height=i*u,o&&(o.width=b*u,o.height=i*u,u!==1&&this.ctxBack.scale(u,u))},clear:function(b,i){var u=this.dom,f=this.ctx,a=u.width,o=u.height,i=i||this.clearColor,c=this.motionBlur&&!b,l=this.lastFrameAlpha,n=this.dpr;if(c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(u,0,0,a/n,o/n)),f.clearRect(0,0,a,o),i&&i!=="transparent"){var s;i.colorStops?(s=i.__canvasGradient||F.getGradient(f,i,{x:0,y:0,width:a,height:o}),i.__canvasGradient=s):i.image&&(s=S.prototype.getCanvasPattern.call(i,f)),f.save(),f.fillStyle=s||i,f.fillRect(0,0,a,o),f.restore()}if(c){var d=this.domBack;f.save(),f.globalAlpha=l,f.drawImage(d,0,0,a,o),f.restore()}}};var t=y;We.exports=t},Xnb7:function(We,J,L){var Y=L("1RvN"),B=new Y(50);function I(P){if(typeof P=="string"){var y=B.get(P);return y&&y.image}else return P}function F(P,y,t,b,i){if(P)if(typeof P=="string"){if(y&&y.__zrImageSrc===P||!t)return y;var u=B.get(P),f={hostEl:t,cb:b,cbPayload:i};return u?(y=u.image,!R(y)&&u.pending.push(f)):(y=new Image,y.onload=y.onerror=S,B.put(P,y.__cachedImgObj={image:y,pending:[f]}),y.src=y.__zrImageSrc=P),y}else return P;else return y}function S(){var P=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var y=0;y<P.pending.length;y++){var t=P.pending[y],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(We,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"),S=L("LK+K"),R=L("q1tI"),P=L("VTBJ"),y=L("rePB"),t=L("Zm9Q"),b=L("Kwbf"),i=L("c+Xe"),u=L("m+aA"),f=L("bdgK"),a=new Map;function o(oe){oe.forEach(function(fe){var ye,Pe=fe.target;(ye=a.get(Pe))===null||ye===void 0||ye.forEach(function(ge){return ge(Pe)})})}var c=new f.default(o),l=null,n=null;function s(oe,fe){a.has(oe)||(a.set(oe,new Set),c.observe(oe)),a.get(oe).add(fe)}function d(oe,fe){a.has(oe)&&(a.get(oe).delete(fe),a.get(oe).size||(c.unobserve(oe),a.delete(oe)))}var E=function(oe){Object(F.a)(ye,oe);var fe=Object(S.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,Pe=R.useRef(0),ge=R.useRef([]),de=R.useContext(A),Qe=R.useCallback(function(St,Ee,De){Pe.current+=1;var rt=Pe.current;ge.current.push({size:St,element:Ee,data:De}),Promise.resolve().then(function(){rt===Pe.current&&(ye==null||ye(ge.current),ge.current=[])}),de==null||de(St,Ee,De)},[ye,de]);return R.createElement(A.Provider,{value:Qe},fe)}function k(oe){var fe=oe.children,ye=oe.disabled,Pe=R.useRef(null),ge=R.useRef(null),de=R.useContext(A),Qe=R.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),St=R.isValidElement(fe)&&Object(i.c)(fe),Ee=St?fe.ref:null,De=R.useMemo(function(){return Object(i.a)(Ee,Pe)},[Ee,Pe]),rt=R.useRef(oe);rt.current=oe;var Be=R.useCallback(function(ke){var ut=rt.current,ie=ut.onResize,xe=ut.data,we=ke.getBoundingClientRect(),Ke=we.width,ot=we.height,gt=ke.offsetWidth,Nt=ke.offsetHeight,He=Math.floor(Ke),jt=Math.floor(ot);if(Qe.current.width!==He||Qe.current.height!==jt||Qe.current.offsetWidth!==gt||Qe.current.offsetHeight!==Nt){var $t={width:He,height:jt,offsetWidth:gt,offsetHeight:Nt};Qe.current=$t;var Ie=gt===Math.round(Ke)?Ke:gt,Ae=Nt===Math.round(ot)?ot:Nt,ct=Object(P.a)(Object(P.a)({},$t),{},{offsetWidth:Ie,offsetHeight:Ae});de==null||de(ct,ke,xe),ie&&Promise.resolve().then(function(){ie(ct,ke)})}},[]);return R.useEffect(function(){var ke=Object(u.a)(Pe.current)||Object(u.a)(ge.current);return ke&&!ye&&s(ke,Be),function(){return d(ke,Be)}},[Pe.current,ye]),R.createElement(E,{ref:ge},St?R.cloneElement(fe,{ref:De}):fe)}var w="rc-observer-key";function g(oe){var fe=oe.children,ye=Object(t.a)(fe);return ye.map(function(Pe,ge){var de=(Pe==null?void 0:Pe.key)||"".concat(w,"-").concat(ge);return R.createElement(k,Object(Y.a)({},oe,{key:de}),Pe)})}g.Collection=C;var h=g,p=L("bT9E"),m=L("TSYQ"),_=L.n(m),x=`
|
|
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
|
|
`,v=["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 T(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 Pe=window.getComputedStyle(oe),ge=Pe.getPropertyValue("box-sizing")||Pe.getPropertyValue("-moz-box-sizing")||Pe.getPropertyValue("-webkit-box-sizing"),de=parseFloat(Pe.getPropertyValue("padding-bottom"))+parseFloat(Pe.getPropertyValue("padding-top")),Qe=parseFloat(Pe.getPropertyValue("border-bottom-width"))+parseFloat(Pe.getPropertyValue("border-top-width")),St=v.map(function(De){return"".concat(De,":").concat(Pe.getPropertyValue(De))}).join(";"),Ee={sizingStyle:St,paddingSize:de,borderSize:Qe,boxSizing:ge};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,Pe=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 ge=T(oe,fe),de=ge.paddingSize,Qe=ge.borderSize,St=ge.boxSizing,Ee=ge.sizingStyle;U.setAttribute("style","".concat(Ee,";").concat(x)),U.value=oe.value||oe.placeholder||"";var De=Number.MIN_SAFE_INTEGER,rt=Number.MAX_SAFE_INTEGER,Be=U.scrollHeight,ke;if(St==="border-box"?Be+=Qe:St==="content-box"&&(Be-=de),ye!==null||Pe!==null){U.value=" ";var ut=U.scrollHeight-de;ye!==null&&(De=ut*ye,St==="border-box"&&(De=De+de+Qe),Be=Math.max(De,Be)),Pe!==null&&(rt=ut*Pe,St==="border-box"&&(rt=rt+de+Qe),ke=Be>rt?"":"hidden",Be=Math.min(rt,Be))}return{height:Be,minHeight:De,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(S.a)(ye);function ye(Pe){var ge;return Object(B.a)(this,ye),ge=fe.call(this,Pe),ge.nextFrameActionId=void 0,ge.resizeFrameId=void 0,ge.textArea=void 0,ge.saveTextArea=function(de){ge.textArea=de},ge.handleResize=function(de){var Qe=ge.state.resizeStatus,St=ge.props,Ee=St.autoSize,De=St.onResize;if(Qe!==V.NONE)return;typeof De=="function"&&De(de),Ee&&ge.resizeOnNextFrame()},ge.resizeOnNextFrame=function(){cancelAnimationFrame(ge.nextFrameActionId),ge.nextFrameActionId=requestAnimationFrame(ge.resizeTextarea)},ge.resizeTextarea=function(){var de=ge.props.autoSize;if(!de||!ge.textArea)return;var Qe=de.minRows,St=de.maxRows,Ee=z(ge.textArea,!1,Qe,St);ge.setState({textareaStyles:Ee,resizeStatus:V.RESIZING},function(){cancelAnimationFrame(ge.resizeFrameId),ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:V.RESIZED},function(){ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:V.NONE}),ge.fixFirefoxAutoScroll()})})})})},ge.renderTextArea=function(){var de=ge.props,Qe=de.prefixCls,St=Qe===void 0?"rc-textarea":Qe,Ee=de.autoSize,De=de.onResize,rt=de.className,Be=de.disabled,ke=ge.state,ut=ke.textareaStyles,ie=ke.resizeStatus,xe=Object(p.a)(ge.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=_()(St,rt,Object(y.a)({},"".concat(St,"-disabled"),Be));"value"in xe&&(xe.value=xe.value||"");var Ke=Object(P.a)(Object(P.a)(Object(P.a)({},ge.props.style),ut),ie===V.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return R.createElement(h,{onResize:ge.handleResize,disabled:!(Ee||De)},R.createElement("textarea",Object(Y.a)({},xe,{className:we,style:Ke,ref:ge.saveTextArea})))},ge.state={textareaStyles:{},resizeStatus:V.NONE},ge}return Object(I.a)(ye,[{key:"componentDidUpdate",value:function(ge){(ge.value!==this.props.value||!M()(ge.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 ge=this.textArea.selectionStart,de=this.textArea.selectionEnd;this.textArea.setSelectionRange(ge,de)}}catch(Qe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(R.Component),$=K,Z=function(oe){Object(F.a)(ye,oe);var fe=Object(S.a)(ye);function ye(Pe){var ge;Object(B.a)(this,ye),ge=fe.call(this,Pe),ge.resizableTextArea=void 0,ge.focus=function(){ge.resizableTextArea.textArea.focus()},ge.saveTextArea=function(Qe){ge.resizableTextArea=Qe},ge.handleChange=function(Qe){var St=ge.props.onChange;ge.setValue(Qe.target.value,function(){ge.resizableTextArea.resizeTextarea()}),St&&St(Qe)},ge.handleKeyDown=function(Qe){var St=ge.props,Ee=St.onPressEnter,De=St.onKeyDown;Qe.keyCode===13&&Ee&&Ee(Qe),De&&De(Qe)};var de=typeof Pe.value=="undefined"||Pe.value===null?Pe.defaultValue:Pe.value;return ge.state={value:de},ge}return Object(I.a)(ye,[{key:"setValue",value:function(ge,de){"value"in this.props||this.setState({value:ge},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(ge){return"value"in ge?{value:ge.value}:null}}]),ye}(R.Component),ve=J.default=Z},YH21:function(We,J,L){var Y=L("H6uX");J.Dispatcher=Y;var B=L("ItGF"),I=L("Ze12"),F=I.isCanvasEl,S=I.transformCoordWithViewport,R=typeof window!="undefined"&&!!window.addEventListener,P=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,y=[];function t(n,s,d,E){return d=d||{},E||!B.canvasSupported?b(n,s,d):B.browser.firefox&&s.layerX!=null&&s.layerX!==s.offsetX?(d.zrX=s.layerX,d.zrY=s.layerY):s.offsetX!=null?(d.zrX=s.offsetX,d.zrY=s.offsetY):b(n,s,d),d}function b(n,s,d){if(B.domSupported&&n.getBoundingClientRect){var E=s.clientX,A=s.clientY;if(F(n)){var C=n.getBoundingClientRect();d.zrX=E-C.left,d.zrY=A-C.top;return}else if(S(y,n,E,A)){d.zrX=y[0],d.zrY=y[1];return}}d.zrX=d.zrY=0}function i(n){return n||window.event}function u(n,s,d){if(s=i(s),s.zrX!=null)return s;var E=s.type,A=E&&E.indexOf("touch")>=0;if(!A)t(n,s,s,d),s.zrDelta=s.wheelDelta?s.wheelDelta/120:-(s.detail||0)/3;else{var C=E!=="touchend"?s.targetTouches[0]:s.changedTouches[0];C&&t(n,C,s,d)}var k=s.button;return s.which==null&&k!==void 0&&P.test(s.type)&&(s.which=k&1?1:k&2?3:k&4?2:0),s}function f(n,s,d,E){R?n.addEventListener(s,d,E):n.attachEvent("on"+s,d)}function a(n,s,d,E){R?n.removeEventListener(s,d,E):n.detachEvent("on"+s,d)}var o=R?function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0}:function(n){n.returnValue=!1,n.cancelBubble=!0};function c(n){return n.which===2||n.which===3}function l(n){return n.which>1}J.clientToLocal=t,J.getNativeEvent=i,J.normalizeEvent=u,J.addEventListener=f,J.removeEventListener=a,J.stop=o,J.isMiddleOrRightButtonOnMouseUpDown=c,J.notLeftMouse=l},YgsL:function(We,J,L){var Y=L("QBsz"),B=Y.distance;function I(S,R,P,y,t,b,i){var u=(P-S)*.5,f=(y-R)*.5;return(2*(R-P)+u+f)*i+(-3*(R-P)-2*u-f)*b+u*t+R}function F(S,R){for(var P=S.length,y=[],t=0,b=1;b<P;b++)t+=B(S[b-1],S[b]);var i=t/2;i=i<P?P:i;for(var b=0;b<i;b++){var u=b/(i-1)*(R?P:P-1),f=Math.floor(u),a=u-f,o,c=S[f%P],l,n;R?(o=S[(f-1+P)%P],l=S[(f+1)%P],n=S[(f+2)%P]):(o=S[f===0?f:f-1],l=S[f>P-2?P-1:f+1],n=S[f>P-3?P-1:f+2]);var s=a*a,d=a*s;y.push([I(o[0],c[0],l[0],n[0],a,s,d),I(o[1],c[1],l[1],n[1],a,s,d)])}return y}We.exports=F},ZW9T:function(We,J,L){"use strict";L.d(J,"a",function(){return H});var Y=L("k1fw"),B=L("oBTY"),I=L("miYZ"),F=L("tsqr"),S=L("rAM+"),R=L("tJVT"),P=L("PpiC"),y=L("q1tI"),t=L.n(y),b=L("bdgK"),i=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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},c={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},l={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},n=L("5VLF"),s=L.n(n),d={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"]}},E=function(V,K){return K.map(function($){return{label:$,kind:V.languages.CompletionItemKind.Keyword,insertText:$}})},A=function(V){return Object.keys(d.tables).map(function(K){return{label:K,kind:V.languages.CompletionItemKind.Variable,insertText:K}})},C=function(V,K){var $=d.tables[V];return $?$.map(function(Z){return{label:Z,kind:K.languages.CompletionItemKind.Field,insertText:Z}}):[]};function k(M,V,K,$,Z){var ve=V.getWordUntilPosition(K),oe={startLineNumber:K.lineNumber,endLineNumber:K.lineNumber,startColumn:ve.startColumn,endColumn:ve.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){d.languages.map(function(Z){return M.languages.registerDocumentFormattingEditProvider(Z,{provideDocumentFormattingEdits:function(oe,fe,ye){return Object(i.a)(f.a.mark(function Pe(){var ge;return f.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return ge=s()(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}),Qe.abrupt("return",[{range:oe.getFullModelRange(),text:ge}]);case 2:case"end":return Qe.stop()}},Pe)}))()}}),Z});var V=c.quickKey.map(function(Z){return{label:Z.label,kind:M.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),K=l.quickKey.map(function(Z){return{label:Z.label,kind:M.languages.CompletionItemKind.Method,insertText:Z.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=o.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(ve,oe){var fe=ve.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Pe=ve.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(c.keywords.map(function(ge){return{label:ge,kind:M.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(c.quickKey.map(function(ge){return{label:ge.label,kind:M.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Pe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}}),M.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ve,oe){var fe=ve.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn};return{suggestions:Object(B.a)(a.keywords.map(function(Pe){return{label:Pe,kind:M.languages.CompletionItemKind.Function,documentation:Pe,insertText:Pe,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}}))}}}),M.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ve,oe){var fe=ve.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Pe=ve.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(o.keywords.map(function(ge){return{label:ge,kind:M.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(o.quickKey.map(function(ge){return{label:ge.label,kind:M.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Pe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}}),M.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ve,oe){var fe=ve.getWordUntilPosition(oe),ye={startLineNumber:oe.lineNumber,endLineNumber:oe.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Pe=ve.getLineContent(oe.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(B.a)(l.keywords.map(function(ge){return{label:ge,kind:M.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})),Object(B.a)(l.quickKey.map(function(ge){return{label:ge.label,kind:M.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Pe.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:M.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ye}})))}}})},g="\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"),m=L("+ua5");function _(M){return/^\d+$/.test(M)?"".concat(M,"px"):M}function x(){}var v=!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 T=null,z=J.b=function(M){var V=M.width,K=V===void 0?"100%":V,$=M.height,Z=$===void 0?"100%":$,ve=M.value,oe=M.language,fe=oe===void 0?"javascript":oe,ye=M.style,Pe=ye===void 0?{}:ye,ge=M.options,de=ge===void 0?{}:ge,Qe=M.overrideServices,St=Qe===void 0?{}:Qe,Ee=M.theme,De=Ee===void 0?"vs-dark":Ee,rt=M.onEditBlur,Be=M.onSave,ke=M.autoHeight,ut=ke===void 0?!1:ke,ie=M.forbidCopy,xe=ie===void 0?!1:ie,we=M.onChange,Ke=we===void 0?x:we,ot=M.editorDidMount,gt=ot===void 0?x:ot,Nt=M.onFocus,He=Nt===void 0?x:Nt,jt=M.filename,$t=jt===void 0?"educoder.txt":jt,Ie=M.errorLine,Ae=M.errorContent,ct=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(y.useRef)(),ht=Object(y.useRef)({}),Ne=Object(y.useRef)(),Te=Object(y.useRef)(),Oe=Object(y.useRef)(!1),ae=Object(y.useRef)(),le=Object(y.useState)(!1),he=Object(R.a)(le,2),_e=he[0],Se=he[1];function ze(){var Pt;return Ze.current&&(Pt=new b.default(function(zt){var ln=Object(S.a)(zt),vn;try{for(ln.s();!(vn=ln.n()).done;){var nr=vn.value;(nr.target.offsetHeight>0||nr.target.offsetWidth>0)&&ht.current.instance.layout()}}catch(Kn){ln.e(Kn)}finally{ln.f()}}),Pt.observe(Ze.current)),Pt}function xt(){F.b.warn(decodeURIComponent(g))}var Qt=function(){var zt=ht.current.instance;if(ve!=null&&zt&&_e){var ln=zt.getModel();ln&&ve!==ln.getValue()&&(v=!0,ln.setValue(ve),zt.layout(),v=!1)}};Object(y.useEffect)(function(){Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Qt()},500)},[ve,_e,ht.current]),Object(y.useEffect)(function(){if(Ie&&ht.current&&ht.current.instance){var Pt=ht.current.instance;Pt.changeViewZones(function(ln){var vn=document.createElement("div");vn.style.padding="10px 20px",vn.style.width="calc(100% - 20px)",vn.className="my-error-line-wrp",vn.innerHTML=ct,ln.addZone({afterLineNumber:Ie||11,heightInLines:3,domNode:vn})});var zt={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}};Pt.addOverlayWidget(zt),Pt.revealPositionInCenter({lineNumber:20,column:1})}},[Ie,ht.current,_e]);function on(){var Pt=ht.current.instance;if(Pt){var zt=Pt.getSelection(),ln=ht.current.pastePos||{},vn=new T.Range(ln.startLineNumber||zt.endLineNumber,ln.startColumn||zt.endColumn,ln.endLineNumber||zt.endLineNumber,ln.endColumn||zt.endColumn);setTimeout(function(){Pt.executeEdits("",[{range:vn,text:""}])},300)}}function vt(Pt){(window.navigator.platform.match("Mac")?Pt.metaKey:Pt.ctrlKey)&&Pt.keyCode==83&&(Pt.preventDefault(),Be())}var Kt=function(){if(ut&&ht.current.instance){var zt=ht.current.instance.getContentHeight();Ge(zt<Z?Z:zt)}else Ge(Z)};function Ot(Pt){var zt=document.createEvent("MouseEvents");zt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Pt.dispatchEvent(zt)}function Rt(Pt,zt){var ln=window.URL||window.webkitURL||window,vn=new Blob([zt]),nr=document.createElementNS("http://www.w3.org/1999/xhtml","a");nr.href=ln.createObjectURL(vn),nr.download=Pt,Ot(nr)}Object(y.useEffect)(function(){Kt()},[Kt]),Object(y.useEffect)(function(){Ze.current&&!_e&&Promise.all([L.e(16),L.e(28)]).then(L.t.bind(null,"M/lh",7)).then(function(Pt){try{T=Pt,ht.current.instance=T.editor.create(Ze.current,{value:ve,language:U(fe),theme:De,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},St);var zt=ht.current.instance,ln=h.d._menuItems,vn=Object(B.a)(ln).find(function(Er){return Er[0]._debugName=="EditorContext"}),nr=vn[1],Kn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],bn=function(ar,dr){var Or=ar._first;do{var Kr,ia,hn=dr.includes((Kr=Or.element)===null||Kr===void 0||((ia=Kr.command)===null||ia===void 0)?void 0:ia.id);hn&&ar._remove(Or)}while(Or=Or.next)};if(gt(zt,T),setTimeout(function(){Kt(),ht.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Rt($t||"educoder.txt",zt.getValue())}}),zt.getDomNode().addEventListener("input",function(){Ne.current.autoFormat&&zt.getAction("editor.action.formatDocument").run()})},500),ht.current.subscription=zt.onDidChangeModelContent(function(Er){Oe.current?clearTimeout(ae.current):(Kt(),Ke(zt.getValue(),Er)),ae.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||w(T,U(fe)),xe&&(bn(nr,Kn),Ze.current.classList.add("noCopyPaste"),zt.onKeyDown(function(Er){var ar=Er.keyCode,dr=Er.ctrlKey,Or=Er.metaKey;(ar===33||ar===52)&&(Or||dr)&&(xt(),Er.preventDefault())})),window.Monaco=T,rt&&zt.onDidBlurEditorWidget(function(){rt(zt.getValue())}),He&&zt.onDidFocusEditorText(function(){He(zt.getValue())}),xe){zt.addCommand(T.KeyMod.CtrlCmd|T.KeyCode.KEY_V,function(){return xt(),null}),zt.onDidPaste(function(Er){ht.current.pastePos=Er});try{window.addEventListener("paste",on)}catch(Er){}}var xr=ze();return Se(!0),function(){var Er=ht.current.instance;Er.dispose();var ar=Er.getModel();ar&&ar.dispose(),ht.current.subscription&&ht.current.subscription.dispose(),xe&&window.removeEventListener("paste",on),xr.unobserve(Ze.current)}}catch(Er){}})},[]),Object(y.useEffect)(function(){var Pt=ht.current.instance;if(Pt&&_e)return document.addEventListener("keydown",vt,!1),function(){document.removeEventListener("keydown",vt)}},[Be,_e]),Object(y.useEffect)(function(){var Pt=ht.current.instance;if(Pt&&_e){var zt=U(fe);T.editor.setModelLanguage(Pt.getModel(),zt),console.log("language:",fe,Pt.getModel(),zt)}},[fe,_e]),Object(y.useEffect)(function(){var Pt=ht.current.instance;Pt&&_e&&T.editor.setTheme(De)},[De,_e]),Object(y.useEffect)(function(){var Pt=ht.current.instance;Ne.current=de,Pt&&_e&&(Pt.updateOptions(Object(Y.a)({},de)),setTimeout(function(){Pt.getModel().updateOptions(Object(Y.a)({},de))},200))},[JSON.stringify(de),_e]),Object(y.useEffect)(function(){var Pt=ht.current.instance;Pt&&_e&&Pt.layout()},[K,Z,_e]);var ft=Object(y.useState)(_(K)),be=Object(R.a)(ft,2),Fe=be[0],Ut=be[1],_t=Object(y.useState)(_(Z)),Gt=Object(R.a)(_t,2),en=Gt[0],Ge=Gt[1],dt=Object(Y.a)(Object(Y.a)({},Pe),{},{width:Fe,height:en});return t.a.createElement("div",{className:"my-monaco-editor",ref:Ze,style:dt})};function H(M){var V=M.width,K=V===void 0?"100%":V,$=M.height,Z=$===void 0?"100%":$,ve=M.original,oe=M.modified,fe=M.language,ye=M.options,Pe=ye===void 0?{}:ye,ge=Object(y.useRef)(),de=Object(y.useState)(null),Qe=Object(R.a)(de,2),St=Qe[0],Ee=Qe[1];function De(ut){var ie;return ge.current&&(ie=new b.default(function(xe){var we=Object(S.a)(xe),Ke;try{for(we.s();!(Ke=we.n()).done;){var ot=Ke.value;(ot.target.offsetHeight>0||ot.target.offsetWidth>0)&&ut.layout()}}catch(gt){we.e(gt)}finally{we.f()}}),ie.observe(ge.current)),ie}Object(y.useEffect)(function(){ge.current&&Promise.all([L.e(16),L.e(28)]).then(L.t.bind(null,"M/lh",7)).then(function(ut){T=ut;var ie=T.editor.createDiffEditor(ge.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},Pe),{},{wordWrap:!0}));Ee(ie);var xe=De(ie);return function(){ie.dispose();var we=ie.getModel();we&&we.dispose(),xe.unobserve(ge.current)}})},[]),Object(y.useEffect)(function(){St&&St.setModel({original:T.editor.createModel(ve,fe),modified:T.editor.createModel(oe,fe)})},[ve,oe,fe,St]);var rt=_(K),Be=_(Z),ke={width:rt,height:Be};return t.a.createElement("div",{className:"my-diff-editor",ref:ge,style:ke})}},Ze12:function(We,J,L){var Y=L("ItGF"),B=L("hOwI"),I=B.buildTransformer,F="___zrEVENTSAVED",S=[];function R(i,u,f,a,o){return P(S,u,a,o,!0)&&P(i,f,S[0],S[1])}function P(i,u,f,a,o){if(u.getBoundingClientRect&&Y.domSupported&&!b(u)){var c=u[F]||(u[F]={}),l=y(u,c),n=t(l,c,o);if(n)return n(i,f,a),!0}return!1}function y(i,u){var f=u.markers;if(f)return f;f=u.markers=[];for(var a=["left","right"],o=["top","bottom"],c=0;c<4;c++){var l=document.createElement("div"),n=l.style,s=c%2,d=(c>>1)%2;n.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[s]+":0",o[d]+":0",a[1-s]+":auto",o[1-d]+":auto",""].join("!important;"),i.appendChild(l),f.push(l)}return f}function t(i,u,f){for(var a=f?"invTrans":"trans",o=u[a],c=u.srcCoords,l=!0,n=[],s=[],d=0;d<4;d++){var E=i[d].getBoundingClientRect(),A=2*d,C=E.left,k=E.top;n.push(C,k),l=l&&c&&C===c[A]&&k===c[A+1],s.push(i[d].offsetLeft,i[d].offsetTop)}return l&&o?o:(u.srcCoords=n,u[a]=f?I(s,n):I(n,s))}function b(i){return i.nodeName.toUpperCase()==="CANVAS"}J.transformLocalCoord=R,J.transformCoordWithViewport=P,J.isCanvasEl=b},ZpRC:function(We,J,L){"use strict";function Y(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function B(i,u){return(!u||i!=="hidden")&&i!=="visible"&&i!=="clip"}function I(i,u){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var f=getComputedStyle(i,null);return B(f.overflowY,u)||B(f.overflowX,u)||function(a){var o=function(c){if(!c.ownerDocument||!c.ownerDocument.defaultView)return null;try{return c.ownerDocument.defaultView.frameElement}catch(l){return null}}(a);return!!o&&(o.clientHeight<a.scrollHeight||o.clientWidth<a.scrollWidth)}(i)}return!1}function F(i,u,f,a,o,c,l,n){return c<i&&l>u||c>i&&l<u?0:c<=i&&n<=f||l>=u&&n>=f?c-i-a:l>u&&n<f||c<i&&n>f?l-u+o:0}var S=function(i,u){var f=window,a=u.scrollMode,o=u.block,c=u.inline,l=u.boundary,n=u.skipOverflowHiddenElements,s=typeof l=="function"?l:function(ut){return ut!==l};if(!Y(i))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,E=[],A=i;Y(A)&&s(A);){if((A=A.parentElement)===d){E.push(A);break}A!=null&&A===document.body&&I(A)&&!I(document.documentElement)||A!=null&&I(A,n)&&E.push(A)}for(var C=f.visualViewport?f.visualViewport.width:innerWidth,k=f.visualViewport?f.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,h=i.getBoundingClientRect(),p=h.height,m=h.width,_=h.top,x=h.right,v=h.bottom,j=h.left,U=o==="start"||o==="nearest"?_:o==="end"?v:_+p/2,T=c==="center"?j+m/2:c==="end"?x:j,z=[],H=0;H<E.length;H++){var M=E[H],V=M.getBoundingClientRect(),K=V.height,$=V.width,Z=V.top,ve=V.right,oe=V.bottom,fe=V.left;if(a==="if-needed"&&_>=0&&j>=0&&v<=k&&x<=C&&_>=Z&&v<=oe&&j>=fe&&x<=ve)return z;var ye=getComputedStyle(M),Pe=parseInt(ye.borderLeftWidth,10),ge=parseInt(ye.borderTopWidth,10),de=parseInt(ye.borderRightWidth,10),Qe=parseInt(ye.borderBottomWidth,10),St=0,Ee=0,De="offsetWidth"in M?M.offsetWidth-M.clientWidth-Pe-de:0,rt="offsetHeight"in M?M.offsetHeight-M.clientHeight-ge-Qe:0;if(d===M)St=o==="start"?U:o==="end"?U-k:o==="nearest"?F(g,g+k,k,ge,Qe,g+U,g+U+p,p):U-k/2,Ee=c==="start"?T:c==="center"?T-C/2:c==="end"?T-C:F(w,w+C,C,Pe,de,w+T,w+T+m,m),St=Math.max(0,St+g),Ee=Math.max(0,Ee+w);else{St=o==="start"?U-Z-ge:o==="end"?U-oe+Qe+rt:o==="nearest"?F(Z,oe,K,ge,Qe+rt,U,U+p,p):U-(Z+K/2)+rt/2,Ee=c==="start"?T-fe-Pe:c==="center"?T-(fe+$/2)+De/2:c==="end"?T-ve+de+De:F(fe,ve,$,Pe,de+De,T,T+m,m);var Be=M.scrollLeft,ke=M.scrollTop;U+=ke-(St=Math.max(0,Math.min(ke+St,M.scrollHeight-K+rt))),T+=Be-(Ee=Math.max(0,Math.min(Be+Ee,M.scrollWidth-$+De)))}z.push({el:M,top:St,left:Ee})}return z};function R(i){return i===Object(i)&&Object.keys(i).length!==0}function P(i,u){u===void 0&&(u="auto");var f="scrollBehavior"in document.body.style;i.forEach(function(a){var o=a.el,c=a.top,l=a.left;o.scroll&&f?o.scroll({top:c,left:l,behavior:u}):(o.scrollTop=c,o.scrollLeft=l)})}function y(i){return i===!1?{block:"end",inline:"nearest"}:R(i)?i:{block:"start",inline:"nearest"}}function t(i,u){var f=!i.ownerDocument.documentElement.contains(i);if(R(u)&&typeof u.behavior=="function")return u.behavior(f?[]:S(i,u));if(f)return;var a=y(u);return P(S(i,a),a.behavior)}var b=J.a=t},aKvl:function(We,J,L){var Y=L("Sj9i"),B=Y.quadraticProjectPoint;function I(F,S,R,P,y,t,b,i,u){if(b===0)return!1;var f=b;if(u>S+f&&u>P+f&&u>t+f||u<S-f&&u<P-f&&u<t-f||i>F+f&&i>R+f&&i>y+f||i<F-f&&i<R-f&&i<y-f)return!1;var a=B(F,S,R,P,y,t,i,u,null);return a<=f/2}J.containStroke=I},aX58:function(We,J,L){var Y=L("3gBT"),B=L("ItGF"),I=L("bYtY"),F=L("0s+r"),S=L("r6Bn"),R=L("7SHv"),P=L("MKOG"),y=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},i={},u="4.3.1";function f(s,d){var E=new n(Y(),s,d);return i[E.id]=E,E}function a(s){if(s)s.dispose();else{for(var d in i)i.hasOwnProperty(d)&&i[d].dispose();i={}}return this}function o(s){return i[s]}function c(s,d){b[s]=d}function l(s){delete i[s]}var n=function(s,d,E){E=E||{},this.dom=d,this.id=s;var A=this,C=new S,k=E.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](d,C,E,s);this.storage=C,this.painter=w;var g=!B.node&&!B.worker?new y(w.getViewportRoot(),w.root):null;this.handler=new F(C,w,g,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(m){h.call(C,m),m&&m.removeSelfFromZr(A)},C.addToStorage=function(m){p.call(C,m),m.addSelfToZr(A)}};n.prototype={constructor:n,getId:function(){return this.id},add:function(s){this.storage.addRoot(s),this._needsRefresh=!0},remove:function(s){this.storage.delRoot(s),this._needsRefresh=!0},configLayer:function(s,d){this.painter.configLayer&&this.painter.configLayer(s,d),this._needsRefresh=!0},setBackgroundColor:function(s){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(s),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 s;this._needsRefresh&&(s=!0,this.refreshImmediately()),this._needsRefreshHover&&(s=!0,this.refreshHoverImmediately()),s&&this.trigger("rendered")},addHover:function(s,d){if(this.painter.addHover){var E=this.painter.addHover(s,d);return this.refreshHover(),E}},removeHover:function(s){this.painter.removeHover&&(this.painter.removeHover(s),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(s){s=s||{},this.painter.resize(s.width,s.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(s,d){return this.painter.pathToImage(s,d)},setCursorStyle:function(s){this.handler.setCursorStyle(s)},findHover:function(s,d){return this.handler.findHover(s,d)},on:function(s,d,E){this.handler.on(s,d,E)},off:function(s,d){this.handler.off(s,d)},trigger:function(s,d){this.handler.trigger(s,d)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,l(this.id)}},J.version=u,J.init=f,J.dispose=a,J.getInstance=o,J.registerPainter=c},bT9E:function(We,J,L){"use strict";L.d(J,"a",function(){return B});var Y=L("VTBJ");function B(I,F){var S=Object(Y.a)({},I);return Array.isArray(F)&&F.forEach(function(R){delete S[R]}),S}},bYtY:function(We,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,S=I.filter,R=I.slice,P=I.map,y=I.reduce,t={};function b(Ee,De){Ee==="createCanvas"&&(l=null),t[Ee]=De}function i(Ee){if(Ee==null||typeof Ee!="object")return Ee;var De=Ee,rt=B.call(Ee);if(rt==="[object Array]"){if(!Pe(Ee)){De=[];for(var Be=0,ke=Ee.length;Be<ke;Be++)De[Be]=i(Ee[Be])}}else if(Y[rt]){if(!Pe(Ee)){var ut=Ee.constructor;if(Ee.constructor.from)De=ut.from(Ee);else{De=new ut(Ee.length);for(var Be=0,ke=Ee.length;Be<ke;Be++)De[Be]=i(Ee[Be])}}}else if(!L[rt]&&!Pe(Ee)&&!z(Ee)){De={};for(var ie in Ee)Ee.hasOwnProperty(ie)&&(De[ie]=i(Ee[ie]))}return De}function u(Ee,De,rt){if(!j(De)||!j(Ee))return rt?i(De):Ee;for(var Be in De)if(De.hasOwnProperty(Be)){var ke=Ee[Be],ut=De[Be];j(ut)&&j(ke)&&!_(ut)&&!_(ke)&&!z(ut)&&!z(ke)&&!U(ut)&&!U(ke)&&!Pe(ut)&&!Pe(ke)?u(ke,ut,rt):(rt||!(Be in Ee))&&(Ee[Be]=i(De[Be],!0))}return Ee}function f(Ee,De){for(var rt=Ee[0],Be=1,ke=Ee.length;Be<ke;Be++)rt=u(rt,Ee[Be],De);return rt}function a(Ee,De){for(var rt in De)De.hasOwnProperty(rt)&&(Ee[rt]=De[rt]);return Ee}function o(Ee,De,rt){for(var Be in De)De.hasOwnProperty(Be)&&(rt?De[Be]!=null:Ee[Be]==null)&&(Ee[Be]=De[Be]);return Ee}var c=function(){return t.createCanvas()};t.createCanvas=function(){return document.createElement("canvas")};var l;function n(){return l||(l=c().getContext("2d")),l}function s(Ee,De){if(Ee){if(Ee.indexOf)return Ee.indexOf(De);for(var rt=0,Be=Ee.length;rt<Be;rt++)if(Ee[rt]===De)return rt}return-1}function d(Ee,De){var rt=Ee.prototype;function Be(){}Be.prototype=De.prototype,Ee.prototype=new Be;for(var ke in rt)rt.hasOwnProperty(ke)&&(Ee.prototype[ke]=rt[ke]);Ee.prototype.constructor=Ee,Ee.superClass=De}function E(Ee,De,rt){Ee="prototype"in Ee?Ee.prototype:Ee,De="prototype"in De?De.prototype:De,o(Ee,De,rt)}function A(Ee){return Ee?typeof Ee=="string"?!1:typeof Ee.length=="number":void 0}function C(Ee,De,rt){if(!(Ee&&De))return;if(Ee.forEach&&Ee.forEach===F)Ee.forEach(De,rt);else if(Ee.length===+Ee.length)for(var Be=0,ke=Ee.length;Be<ke;Be++)De.call(rt,Ee[Be],Be,Ee);else for(var ut in Ee)Ee.hasOwnProperty(ut)&&De.call(rt,Ee[ut],ut,Ee)}function k(Ee,De,rt){if(!(Ee&&De))return;if(Ee.map&&Ee.map===P)return Ee.map(De,rt);for(var Be=[],ke=0,ut=Ee.length;ke<ut;ke++)Be.push(De.call(rt,Ee[ke],ke,Ee));return Be}function w(Ee,De,rt,Be){if(!(Ee&&De))return;if(Ee.reduce&&Ee.reduce===y)return Ee.reduce(De,rt,Be);for(var ke=0,ut=Ee.length;ke<ut;ke++)rt=De.call(Be,rt,Ee[ke],ke,Ee);return rt}function g(Ee,De,rt){if(!(Ee&&De))return;if(Ee.filter&&Ee.filter===S)return Ee.filter(De,rt);for(var Be=[],ke=0,ut=Ee.length;ke<ut;ke++)De.call(rt,Ee[ke],ke,Ee)&&Be.push(Ee[ke]);return Be}function h(Ee,De,rt){if(!(Ee&&De))return;for(var Be=0,ke=Ee.length;Be<ke;Be++)if(De.call(rt,Ee[Be],Be,Ee))return Ee[Be]}function p(Ee,De){var rt=R.call(arguments,2);return function(){return Ee.apply(De,rt.concat(R.call(arguments)))}}function m(Ee){var De=R.call(arguments,1);return function(){return Ee.apply(this,De.concat(R.call(arguments)))}}function _(Ee){return B.call(Ee)==="[object Array]"}function x(Ee){return typeof Ee=="function"}function v(Ee){return B.call(Ee)==="[object String]"}function j(Ee){var De=typeof Ee;return De==="function"||!!Ee&&De==="object"}function U(Ee){return!!L[B.call(Ee)]}function T(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 De=0,rt=arguments.length;De<rt;De++)if(arguments[De]!=null)return arguments[De]}function V(Ee,De){return Ee!=null?Ee:De}function K(Ee,De,rt){return Ee!=null?Ee:De!=null?De:rt}function $(){return Function.call.apply(R,arguments)}function Z(Ee){if(typeof Ee=="number")return[Ee,Ee,Ee,Ee];var De=Ee.length;return De===2?[Ee[0],Ee[1],Ee[0],Ee[1]]:De===3?[Ee[0],Ee[1],Ee[2],Ee[1]]:Ee}function ve(Ee,De){if(!Ee)throw new Error(De)}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 Pe(Ee){return Ee[fe]}function ge(Ee){var De=_(Ee);this.data={};var rt=this;Ee instanceof ge?Ee.each(Be):Ee&&C(Ee,Be);function Be(ke,ut){De?rt.set(ke,ut):rt.set(ut,ke)}}ge.prototype={constructor:ge,get:function(Ee){return this.data.hasOwnProperty(Ee)?this.data[Ee]:null},set:function(Ee,De){return this.data[Ee]=De},each:function(Ee,De){De!==void 0&&(Ee=p(Ee,De));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 ge(Ee)}function Qe(Ee,De){for(var rt=new Ee.constructor(Ee.length+De.length),Be=0;Be<Ee.length;Be++)rt[Be]=Ee[Be];var ke=Ee.length;for(Be=0;Be<De.length;Be++)rt[Be+ke]=De[Be];return rt}function St(){}J.$override=b,J.clone=i,J.merge=u,J.mergeAll=f,J.extend=a,J.defaults=o,J.createCanvas=c,J.getContext=n,J.indexOf=s,J.inherits=d,J.mixin=E,J.isArrayLike=A,J.each=C,J.map=k,J.reduce=w,J.filter=g,J.find=h,J.bind=p,J.curry=m,J.isArray=_,J.isFunction=x,J.isString=v,J.isObject=j,J.isBuiltInObject=U,J.isTypedArray=T,J.isDom=z,J.eqNaN=H,J.retrieve=M,J.retrieve2=V,J.retrieve3=K,J.slice=$,J.normalizeCssArray=Z,J.assert=ve,J.trim=oe,J.setAsPrimitive=ye,J.isPrimitive=Pe,J.createHashMap=de,J.concatArray=Qe,J.noop=St},biw7:function(We,J,L){"use strict";var Y=L("q1tI"),B=L.n(Y),I=Y.createContext(null);J.a=I},c5Ni:function(We,J,L){},chpo:function(We,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(We,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,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*Math.asin(1/F)/(2*Math.PI),-(F*Math.pow(2,10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/S)))},elasticOut:function(B){var I,F=.1,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*Math.asin(1/F)/(2*Math.PI),F*Math.pow(2,-10*B)*Math.sin((B-I)*(2*Math.PI)/S)+1)},elasticInOut:function(B){var I,F=.1,S=.4;return B===0?0:B===1?1:(!F||F<1?(F=1,I=S/4):I=S*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)/S)):F*Math.pow(2,-10*(B-=1))*Math.sin((B-I)*(2*Math.PI)/S)*.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;We.exports=Y},dejd:function(We,J,L){},dmUQ:function(We,J,L){"use strict";var Y=L("Ff2n"),B=L("rePB"),I=L("1OyB"),F=L("vuIU"),S=L("Ji7U"),R=L("md7G"),P=L("foSv"),y=L("q1tI"),t=L.n(y),b=L("TSYQ"),i=L.n(b),u=L("4IlW");function f(p,m){var _=Object.keys(p);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(p);m&&(x=x.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),_.push.apply(_,x)}return _}function a(p){for(var m=1;m<arguments.length;m++){var _=arguments[m]!=null?arguments[m]:{};m%2?f(Object(_),!0).forEach(function(x){Object(B.a)(p,x,_[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(_)):f(Object(_)).forEach(function(x){Object.defineProperty(p,x,Object.getOwnPropertyDescriptor(_,x))})}return p}function o(p){var m=c();return function(){var x=Object(P.a)(p),v;if(m){var j=Object(P.a)(this).constructor;v=Reflect.construct(x,arguments,j)}else v=x.apply(this,arguments);return Object(R.a)(this,v)}}function c(){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 l(){}function n(p){p.preventDefault()}var s=function(m){return m.replace(/[^\w.-]+/g,"")},d=200,E=600,A=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,C=function(m){return m!=null},k=function(m,_){return _===m||typeof _=="number"&&typeof m=="number"&&isNaN(_)&&isNaN(m)},w=function(p){Object(S.a)(_,p);var m=o(_);function _(x){var v;Object(I.a)(this,_),v=m.call(this,x),v.onKeyDown=function(T){var z=v.props,H=z.onKeyDown,M=z.onPressEnter;if(T.keyCode===u.a.UP){var V=v.getRatio(T);v.up(T,V,null),v.stop()}else if(T.keyCode===u.a.DOWN){var K=v.getRatio(T);v.down(T,K,null),v.stop()}else T.keyCode===u.a.ENTER&&M&&M(T);if(v.recordCursorPosition(),v.lastKeyCode=T.keyCode,H){for(var $=arguments.length,Z=new Array($>1?$-1:0),ve=1;ve<$;ve++)Z[ve-1]=arguments[ve];H.apply(void 0,[T].concat(Z))}},v.onKeyUp=function(T){var z=v.props.onKeyUp;if(v.stop(),v.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,[T].concat(M))}},v.onChange=function(T){var z=v.props.onChange;v.state.focused&&(v.inputting=!0),v.rawInput=v.props.parser(v.getValueFromEvent(T)),v.setState({inputValue:v.rawInput}),z(v.toNumber(v.rawInput))},v.onMouseUp=function(){var T=v.props.onMouseUp;v.recordCursorPosition(),T&&T.apply(void 0,arguments)},v.onFocus=function(){var T;v.setState({focused:!0}),(T=v.props).onFocus.apply(T,arguments)},v.onBlur=function(){var T=v.props.onBlur;v.inputting=!1,v.setState({focused:!1});var z=v.getCurrentValidValue(v.state.inputValue),H=v.setValue(z,l);if(T){var M=v.input.value,V=v.getInputDisplayValue({focus:!1,value:H});v.input.value=V&&Number(V),T.apply(void 0,arguments),v.input.value=M}},v.getRatio=function(T){var z=1;return T.metaKey||T.ctrlKey?z=.1:T.shiftKey&&(z=10),z},v.getFullNum=function(T){return isNaN(T)?T:/e/i.test(String(T))?Number(T).toFixed(18).replace(/\.?0+$/,""):T},v.getPrecision=function(T){if(C(v.props.precision))return v.props.precision;var z=String(T);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},v.getInputDisplayValue=function(T){var z=T||v.state,H=z.focused,M=z.inputValue,V=z.value,K;H?K=M:K=v.toPrecisionAsStep(V),K==null&&(K="");var $=v.formatWrapper(K);return C(v.props.decimalSeparator)&&($=$.toString().replace(".",v.props.decimalSeparator)),$},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(T){}},v.restoreByAfter=function(T){if(T===void 0)return!1;var z=v.input.value,H=z.lastIndexOf(T);if(H===-1)return!1;var M=v.cursorBefore.length;return v.lastKeyCode===u.a.DELETE&&v.cursorBefore.charAt(M-1)===T[0]?(v.fixCaret(M,M),!0):H+T.length===z.length?(v.fixCaret(H,H),!0):!1},v.partRestoreByAfter=function(T){return T===void 0?!1:Array.prototype.some.call(T,function(z,H){var M=T.substring(H);return v.restoreByAfter(M)})},v.isNotCompleteNumber=function(T){return isNaN(T)||T===""||T===null||T&&T.toString().indexOf(".")===T.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(T,z,H){v.pressingUpOrDown=!0,v.step("down",T,z,H)},v.up=function(T,z,H){v.pressingUpOrDown=!0,v.step("up",T,z,H)},v.saveInput=function(T){v.input=T};var j=x.value;j===void 0&&(j=x.defaultValue),v.state={focused:x.autoFocus};var U=v.getValidValue(v.toNumber(j));return v.state=a(a({},v.state),{},{inputValue:v.toPrecisionAsStep(U),value:U}),v}return Object(F.a)(_,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var j=this.props,U=j.value,T=j.onChange,z=j.max,H=j.min,M=this.state.focused;if(v){if(!k(v.value,U)||!k(v.max,z)||!k(v.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&&v.max!==z&&typeof $=="number"&&$>z&&T&&T(z),"min"in this.props&&v.min!==H&&typeof $=="number"&&$<H&&T&&T(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(ve){}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(v){var j=v;return j===""?j="":this.isNotCompleteNumber(parseFloat(j))?j=this.state.value:j=this.getValidValue(j),this.toNumber(j)}},{key:"getValueFromEvent",value:function(v){var j=v.target.value.trim().replace(/。/g,".");return C(this.props.decimalSeparator)&&(j=j.replace(this.props.decimalSeparator,".")),j}},{key:"getValidValue",value:function(v){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,T=parseFloat(v);return isNaN(T)?v:(T<j&&(T=j),T>U&&(T=U),T)}},{key:"setValue",value:function(v,j){var U=this.props.precision,T=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),z=this.state.value,H=z===void 0?null:z,M=this.state.inputValue,V=M===void 0?null:M,K=typeof T=="number"?T.toFixed(U):"".concat(T),$=T!==H||K!=="".concat(V);return"value"in this.props?(V=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:V},j)):this.setState({value:T,inputValue:this.toPrecisionAsStep(v)},j),$&&this.props.onChange(T),T}},{key:"getMaxPrecision",value:function(v){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.props,T=U.precision,z=U.step;if(C(T))return T;var H=this.getPrecision(j),M=this.getPrecision(z),V=this.getPrecision(v);return v?Math.max(V,H+M):H+M}},{key:"getPrecisionFactor",value:function(v){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,U=this.getMaxPrecision(v,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(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var j=Math.abs(this.getMaxPrecision(v));return isNaN(j)?v.toString():Number(v).toFixed(j)}},{key:"toNumber",value:function(v){var j=this.props.precision,U=this.state.focused,T=v&&v.length>16&&U;return this.isNotCompleteNumber(v)||T?v:C(j)?Math.round(v*Math.pow(10,j))/Math.pow(10,j):Number(v)}},{key:"upStep",value:function(v,j){var U=this.props.step,T=this.getPrecisionFactor(v,j),z=Math.abs(this.getMaxPrecision(v,j)),H=((T*v+T*U*j)/T).toFixed(z);return this.toNumber(H)}},{key:"downStep",value:function(v,j){var U=this.props.step,T=this.getPrecisionFactor(v,j),z=Math.abs(this.getMaxPrecision(v,j)),H=((T*v-T*U*j)/T).toFixed(z);return this.toNumber(H)}},{key:"step",value:function(v,j){var U=this,T=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(v,"Step")](M,T),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[v](j,T,!0)},z?d:E)}},{key:"fixCaret",value:function(v,j){if(v===void 0||j===void 0||!this.input||!this.input.value)return;try{var U=this.input.selectionStart,T=this.input.selectionEnd;(v!==U||j!==T)&&this.input.setSelectionRange(v,j)}catch(z){}}},{key:"render",value:function(){var v,j=this.props,U=j.prefixCls,T=j.disabled,z=j.readOnly,H=j.useTouch,M=j.autoComplete,V=j.upHandler,K=j.downHandler,$=j.className,Z=j.max,ve=j.min,oe=j.style,fe=j.title,ye=j.onMouseEnter,Pe=j.onMouseLeave,ge=j.onMouseOver,de=j.onMouseOut,Qe=j.required,St=j.onClick,Ee=j.tabIndex,De=j.type,rt=j.placeholder,Be=j.id,ke=j.inputMode,ut=j.pattern,ie=j.step,xe=j.maxLength,we=j.autoFocus,Ke=j.name,ot=j.onPaste,gt=j.onInput,Nt=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"]),He=this.state,jt=He.value,$t=He.focused,Ie=i()(U,(v={},Object(B.a)(v,$,!!$),Object(B.a)(v,"".concat(U,"-disabled"),T),Object(B.a)(v,"".concat(U,"-focused"),$t),v)),Ae={};Object.keys(Nt).forEach(function(_e){(_e.substr(0,5)==="data-"||_e.substr(0,5)==="aria-"||_e==="role")&&(Ae[_e]=Nt[_e])});var ct=!z&&!T,Et=this.getInputDisplayValue(null),Ze=(jt||jt===0)&&(isNaN(jt)||Number(jt)>=Z),ht=(jt||jt===0)&&(isNaN(jt)||Number(jt)<=ve),Ne=Ze||T||z,Te=ht||T||z,Oe=i()("".concat(U,"-handler"),"".concat(U,"-handler-up"),Object(B.a)({},"".concat(U,"-handler-up-disabled"),Ne)),ae=i()("".concat(U,"-handler"),"".concat(U,"-handler-down"),Object(B.a)({},"".concat(U,"-handler-down-disabled"),Te)),le=H?{onTouchStart:Ne?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Ne?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=H?{onTouchStart:Te?l:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Ie,style:oe,title:fe,onMouseEnter:ye,onMouseLeave:Pe,onMouseOver:ge,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":ve,"aria-valuemax":Z,"aria-valuenow":jt,required:Qe,type:De,placeholder:rt,onPaste:ot,onClick:St,onMouseUp:this.onMouseUp,className:"".concat(U,"-input"),tabIndex:Ee,autoComplete:M,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ct?this.onKeyDown:l,onKeyUp:ct?this.onKeyUp:l,autoFocus:we,maxLength:xe,readOnly:z,disabled:T,max:Z,min:ve,step:ie,name:Ke,title:fe,id:Be,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Et),pattern:ut,inputMode:ke,onInput:gt},Ae))))}}]),_}(t.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:A,min:-A,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var g=w,h=J.a=g},dqUG:function(We,J,L){var Y=L("Gev7"),B=L("bYtY"),I=L("6GrX"),F=L("pzxd"),S=L("gut8"),R=S.ContextCachedBy,P=function(t){Y.call(this,t)};P.prototype={constructor:P,type:"text",brush:function(t,b){var i=this.style;this.__dirty&&F.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var u=i.text;if(u!=null&&(u+=""),!F.needDrawText(u,i)){t.__attrCachedBy=R.NONE;return}this.setTransform(t),F.renderText(this,t,u,i,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 i=I.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,F.getStroke(t.textStroke,t.textStrokeWidth)){var u=t.textStrokeWidth;i.x-=u/2,i.y-=u/2,i.width+=u,i.height+=u}this._rect=i}return this._rect}},B.inherits(P,Y);var y=P;We.exports=y},eozf:function(We,J,L){"use strict";L.d(J,"b",function(){return Pe}),L.d(J,"c",function(){return ge});var Y=L("sRBo"),B=L("kaz8"),I=L("5Dmo"),F=L("3S7+"),S=L("/zsF"),R=L("PArb"),P=L("7Kak"),y=L("9yH6"),t=L("14J3"),b=L("BMrR"),i=L("+L6B"),u=L("2/Rp"),f=L("jCWc"),a=L("kPKH"),o=L("2qtc"),c=L("kLXV"),l=L("9og8"),n=L("miYZ"),s=L("tsqr"),d=L("oBTY"),E=L("k1fw"),A=L("tJVT"),C=L("OaEy"),k=L("2fM7"),w=L("iQDF"),g=L("+eQT"),h=L("WmNS"),p=L.n(h),m=L("q1tI"),_=L.n(m),x=L("/MfK"),v=L("w5pM"),j=L("Lyp1"),U=L("wd/R"),T=L.n(U),z=L("xKgJ"),H=L("ErOA"),M=L("LvDl"),V=L.n(M),K=L("1vsH"),$=L("zetH"),Z=L.n($),ve=L("Ty5D"),oe=L("9kvl"),fe=L("AHFd");function ye(Ee,De){for(var rt=[],Be=Ee;Be<De;Be++)rt.push(Be);return rt}var Pe=function(De,rt,Be){var ke=De<T()().startOf("day"),ut=De>T()(rt).endOf("day"),ie=De<T()(Be).startOf("day");return rt?Be?T()()<=T()(Be)?ie||ut:ke||ut:De&&ke||ut:Be&&T()()<=T()(Be)?ie:ke},ge=function(De,rt){var Be=parseInt(T()(De).format("HH")),ke=parseInt(T()().format("HH")),ut=parseInt(T()().format("mm"));if(!De)return{disabledHours:function(){return ye(0,ke)},disabledMinutes:function(){return ye(0,ut)}};if(rt){var ie=parseInt(T()(rt).format("HH")),xe=parseInt(T()(rt).format("mm"));return T()(De).isSame(T()(rt),"day")?{disabledHours:function(){return ye(0,ie)},disabledMinutes:function(){return Be<=ie?ye(0,xe):[]}}:void 0}return T()(De).isSame(T()(),"day")?{disabledHours:function(){return ye(0,ke)},disabledMinutes:function(){return T()(De).isSame(T()(),"hour")&&Be<=ke?ye(0,ut):[]}}:void 0},de=g.a.RangePicker,Qe=k.a.Option,St=function(De){var rt,Be,ke,ut,ie,xe,we,Ke=De.shixunHomeworks,ot=De.loading,gt=De.dispatch,Nt=Object(ve.i)(),He=Ke.workSetting,jt=Ke.workList,$t=Ke.changeData,Ie=Object(m.useState)(!0),Ae=Object(A.a)(Ie,2),ct=Ae[0],Et=Ae[1],Ze=Object(m.useState)(!1),ht=Object(A.a)(Ze,2),Ne=ht[0],Te=ht[1],Oe=Object(m.useState)([]),ae=Object(A.a)(Oe,2),le=ae[0],he=ae[1],_e=Object(m.useState)([]),Se=Object(A.a)(_e,2),ze=Se[0],xt=Se[1],Qt=Object(m.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}),on=Object(A.a)(Qt,2),vt=on[0],Kt=on[1];Object(m.useEffect)(function(){return Ot(),function(){he([].concat())}},[]);var Ot=function(){gt({type:"shixunHomeworks/getWorkSetting",payload:Object(E.a)({},Nt)})};Object(m.useEffect)(function(){var Ge;if(!(He!=null&&He.course_id))return;Object.keys(vt).map(function(dt){vt[dt]=He[dt]}),(!vt.allow_late||!vt.unified_late)&&(vt.late_penalty=20,vt.penalty_type=fe.a.Percent),vt.unified_setting||(vt.unified_late=!1,vt.unified_anonymous_comment=!1,vt.unified_anonymous_appeal=!1),le=JSON.parse(JSON.stringify(He.group_settings.map(function(dt){return Object(E.a)(Object(E.a)({},dt),{},{group_name:[dt.group_name]})}).filter(function(dt){return dt.publish_time!==null}))),ze=JSON.parse(JSON.stringify(He.allow_late_settings.map(function(dt){return Object(E.a)(Object(E.a)({},dt),{},{group_name:[dt.group_name]})}).filter(function(dt){return dt.late_time!==null}))),Kt(Object(E.a)({},vt)),he(Object(d.a)(le)),((Ge=ze)===null||Ge===void 0?void 0:Ge.length)<=0?xt([{penalty_type:fe.a.Percent,late_penalty:20}]):xt(Object(d.a)(ze))},[He]);var Rt=function(){var dt,Pt,zt=JSON.parse(JSON.stringify(vt));if(zt.challenge_settings.filter(function(vn){return!vn.hide}),zt.categoryId=Nt.categoryId,(dt=zt.challenge_settings)!==null&&dt!==void 0&&dt.every(function(vn){return!vn.checked})){s.b.warn("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(vt.unified_setting||(le=(Pt=le)===null||Pt===void 0?void 0:Pt.map(function(vn){var nr;if(!vn.publish_time||!vn.end_time)throw s.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(!vn.group_name)throw s.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return vn.group_name=typeof(vn==null?void 0:vn.group_name)=="string"?[vn==null?void 0:vn.group_name]:vn==null?void 0:vn.group_name,vn.group_id=(nr=He.group_settings)===null||nr===void 0?void 0:nr.filter(function(Kn){var bn;return vn==null||((bn=vn.group_name)===null||bn===void 0)?void 0:bn.includes(Kn.group_name)}).map(function(Kn){return Kn.group_id||Kn.id}).toString().split(","),vn})),zt.group_settings=le,vt.allow_late)if(vt.unified_late){if(vt.late_penalty===null||vt.late_penalty===void 0||vt.late_penalty<0||vt.late_penalty>100)throw s.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(!vt.late_time)throw s.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(vn){var nr,Kn;if(vn.late_penalty===null||vn.late_penalty===void 0||vn.late_penalty<0||vn.late_penalty>100)throw s.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(!vn.late_time)throw s.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(!vn.group_name)throw s.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return vn.group_name=typeof(vn==null?void 0:vn.group_name)=="string"?[vn==null?void 0:vn.group_name]:vn==null?void 0:vn.group_name,vn.group_id=vn==null||((nr=vn.group_name)===null||nr===void 0||((Kn=nr.map(function(bn){var xr,Er,ar=(xr=He.group_settings)===null||xr===void 0||((Er=xr.filter(function(dr){return(dr==null?void 0:dr.group_name)===bn}))===null||Er===void 0)?void 0:Er[0];return ar==null?void 0:ar.group_id}))===null||Kn===void 0))?void 0:Kn.toString().split(","),vn}),zt.allow_late_settings=ze}ft(zt)},ft=function(dt){var Pt,zt;if(dt.total_score===null){s.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(dt!=null&&dt.work_efficiency&&dt.eff_score===null){s.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var ln=dt.challenge_settings.reduce(function(Kn,bn){return Kn+Number(bn.challenge_score)},0);if((ln==null?void 0:ln.toFixed(10))!==((Pt=dt.total_score-dt.eff_score)===null||Pt===void 0?void 0:Pt.toFixed(10))){s.b.warn("\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A".concat(dt.total_score,"\u5206"));return}var vn={shixun_evaluation:dt.shixun_evaluation,challenge_settings:dt.challenge_settings},nr=function(){var Kn=Object(l.a)(p.a.mark(function bn(){var xr;return p.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return Te(!0),ar.next=3,Object(H.a)("/api/homework_commons/".concat(Nt.categoryId,"/publish_setting.json"),{method:"post",body:Object(E.a)({},dt)});case 3:xr=ar.sent,xr.status===0&&(s.b.success("\u66F4\u65B0\u6210\u529F"),Et(!0),Ot(),gt({type:"shixunHomeworks/getWorkList",payload:Object(E.a)({},Nt)})),Te(!1);case 6:case"end":return ar.stop()}},bn)}));return function(){return Kn.apply(this,arguments)}}();!Object(M.isEqual)($t,vn)&&!(jt!=null&&(zt=jt.homework_status)!==null&&zt!==void 0&&zt.includes("\u672A\u53D1\u5E03"))?c.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:nr}):nr()},be=function(dt,Pt){var zt,ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"group_id";return Pt?Pt.find(function(vn){return vn[ln]===dt}):He==null||((zt=He.group_settings)===null||zt===void 0)?void 0:zt.find(function(vn){return vn.group_id[0]===dt})},Fe=(He==null?void 0:He.allow_late)||(He==null?void 0:He.anonymous_comment),Ut=function(dt){var Pt=be(dt,He==null?void 0:He.allow_late_settings,"id"),zt=be(dt,He==null?void 0:He.anonymous_comment_settings);return(He==null?void 0:He.allow_late)&&Pt&&(Pt==null?void 0:Pt.late_time)!==null||(He==null?void 0:He.anonymous_comment)&&zt&&(zt==null?void 0:zt.evaluation_start)!==null},_t=Object(m.useMemo)(function(){var Ge;if(He!=null&&He.unified_setting){var dt;return!(jt!=null&&(dt=jt.homework_status)!==null&&dt!==void 0&&dt.includes("\u5DF2\u622A\u6B62"))||(He==null?void 0:He.allow_late)||(He==null?void 0:He.anonymous_comment)}var Pt=He==null||((Ge=He.group_settings)===null||Ge===void 0)?void 0:Ge.some(function(zt){return T()(zt.end_time)<=T()()});return!Pt||(He==null?void 0:He.allow_late)||(He==null?void 0:He.all_group_late)},[He,jt]),Gt=He==null?void 0:He.anonymous_comment,en=function(dt){if(!dt)return!1;var Pt=be(dt,He==null?void 0:He.anonymous_comment_settings);return(He==null?void 0:He.anonymous_comment)&&Pt&&(Pt==null?void 0:Pt.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)()&&ct&&_.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(y.a.Group,{disabled:ct||!(jt!=null&&(rt=jt.homework_status)!==null&&rt!==void 0&&rt.includes("\u672A\u53D1\u5E03")),value:vt.unified_setting,onChange:function(dt){var Pt;if(!(jt!=null&&(Pt=jt.homework_status)!==null&&Pt!==void 0&&Pt.includes("\u672A\u53D1\u5E03"))){s.b.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(vt.unified_setting=!vt.unified_setting,vt.unified_setting||(vt.unified_late=!1),Kt(Object.assign({},vt)),vt.unified_setting===!1&&le==""){he(le.concat({}));return}vt.unified_setting&&(he([]),xt([{late_penalty:5}]))}},_.a.createElement(y.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),_.a.createElement(y.a,{disabled:(He==null||((Be=He.group_settings)===null||Be===void 0)?void 0:Be.length)===0,value:!1},"\u5206\u73ED\u53D1\u5E03")),(He==null||((ke=He.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"))),vt.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(g.a,{disabled:ct||!(jt!=null&&(ut=jt.homework_status)!==null&&ut!==void 0&&ut.includes("\u672A\u53D1\u5E03")||jt!=null&&(ie=jt.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(dt){return Pe(dt,He==null?void 0:He.course_end_date)},disabledTime:function(dt){return ge(dt)},value:vt.publish_time?T()(vt.publish_time):"",onChange:function(dt,Pt){vt.publish_time=Pt,(vt.end_time==""||!vt.end_time)&&vt.unified_setting&&(vt.end_time=T()(dt).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),Kt(Object.assign({},vt))}})),_.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(g.a,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:T()(Object(K.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:ct||Fe,disabledDate:function(dt){return Pe(dt,He==null?void 0:He.course_end_date,vt.publish_time)},disabledTime:function(dt){return ge(dt,vt.publish_time)},value:vt.end_time?T()(vt.end_time):"",onChange:function(dt,Pt){vt.end_time=Pt,Kt(Object.assign({},vt))}})),_.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)")))),!vt.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,dt){var Pt,zt,ln,vn,nr;return _.a.createElement(a.a,{span:24,key:dt},_.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 ",dt+1),_.a.createElement(a.a,{flex:"1",style:{maxWidth:300}},_.a.createElement(k.a,{disabled:ct||!(jt!=null&&(Pt=jt.homework_status)!==null&&Pt!==void 0&&Pt.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(bn){le[dt].group_name=bn,le[dt].group_id=Ge.group_id;var xr=Object(M.flattenDeep)(le.map(function(ar){return ar.group_name})),Er=ze.map(function(ar){var dr=(ar==null?void 0:ar.group_name)||[];return Object(E.a)(Object(E.a)({},ar),{},{group_name:Object(M.remove)(dr,function(Or){return xr.includes(Or)})})});xt(Er),he(le.slice())}},He.group_settings&&He.group_settings.map(function(Kn){var bn=le.map(function(xr){return xr.group_name}).flat();if(!bn.includes(Kn.group_name))return _.a.createElement(Qe,{value:Kn.group_name,key:Kn.id},Kn.group_name)}))))),_.a.createElement(a.a,{span:10},_.a.createElement("div",{className:"ml30"},_.a.createElement(de,{ranges:{\u6B64\u523B:[Ge.publish_time?T()(Ge.publish_time):T()(),T()()]},allowClear:!1,disabled:ct||(T()()<=T()((zt=be((ln=Ge.group_id)===null||ln===void 0?void 0:ln[0]))===null||zt===void 0?void 0:zt.publish_time)?!1:[!0,Ut((vn=Ge.group_id)===null||vn===void 0?void 0:vn[0])]),style:{width:400},placeholder:["\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4","\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4"],disabledDate:function(bn){return Pe(bn,He==null?void 0:He.course_end_date)},disabledTime:function(bn){return ge(bn)},showTime:{showNow:!0,format:"HH:mm",defaultValue:[T()(Object(K.d)(),"HH:mm"),T()(Object(K.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:Ge.publish_time&&[T()(Ge.publish_time),Ge.end_time?T()(Ge.end_time):void 0],onChange:function(bn,xr){le[dt].publish_time=xr[0],le[dt].end_time=xr[1],he(Object(d.a)(le))}}))),!ct&&_.a.createElement(a.a,{span:4},dt>0&&!Ge.id&&_.a.createElement(x.a,{onClick:function(){le=le.filter(function(bn,xr){return dt!==xr}),he(le.slice()),setTimeout(function(){return he(le.slice())},10)}}),le.length<(He==null||((nr=He.group_settings)===null||nr===void 0)?void 0:nr.length)&&_.a.createElement(v.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:vt.allow_late,disabled:ct||_t,onChange:function(){vt.allow_late=!vt.allow_late,ze==""&&xt([{late_penalty:5}]),Kt(Object.assign({},vt))}},_.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)))),(vt==null?void 0:vt.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(y.a.Group,{disabled:ct||(He==null?void 0:He.anonymous_comment)||(He==null?void 0:He.allow_late),value:vt.unified_late,onChange:function(dt){vt.unified_late=dt.target.value,ze==""&&!dt.target.value&&xt([{penalty_type:fe.a.Percent,late_penalty:20}]),Kt(Object(E.a)({},vt))}},(vt==null?void 0:vt.unified_setting)&&_.a.createElement(y.a,{value:!0}," \u7EDF\u4E00\u8865\u4EA4 "),(He==null||((we=He.group_settings)===null||we===void 0)?void 0:we.length)>0&&_.a.createElement(y.a,{value:!1}," \u5206\u73ED\u8865\u4EA4 "))),vt!=null&&vt.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:ct||Gt,value:{type:vt.penalty_type,inputValue:vt.late_penalty},onChange:function(dt){Kt(Object(E.a)(Object(E.a)({},vt),{},{late_penalty:dt.inputValue,penalty_type:dt.type}))}})),_.a.createElement(a.a,{flex:"1",className:"ml5"},_.a.createElement("span",{className:"c-grey-c ml10"},vt.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(g.a,{allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:T()(Object(K.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:ct||Gt,value:vt.late_time?T()(vt.late_time):"",disabledDate:function(dt){return Pe(dt,He==null?void 0:He.course_end_date)},onChange:function(dt,Pt){vt.late_time=Pt,Kt(Object.assign({},vt))}})),_.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,dt){var Pt;return _.a.createElement(a.a,{span:24,key:dt},_.a.createElement(b.a,{className:"mt25"},_.a.createElement(a.a,{style:{marginLeft:30}},_.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219",dt+1,"\uFF1A"),_.a.createElement(k.a,{disabled:ct||!(jt!=null&&(Pt=jt.homework_status)!==null&&Pt!==void 0&&Pt.includes("\u672A\u53D1\u5E03"))&&Ge.id||(He==null?void 0:He.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[dt].group_name=ln,ze[dt].group_id=Ge.group_id,xt(ze.slice())}},He.group_settings&&He.group_settings.map(function(zt){var ln=ze.map(function(nr){return nr.group_name}).flat(),vn=le.map(function(nr){return nr.group_name}).flat();if(vt!=null&&vt.unified_setting){if(!ln.includes(zt.group_name))return _.a.createElement(Qe,{value:zt.group_name,key:zt.id},zt.group_name)}else if(vn.includes(zt.group_name)&&(!ln.includes(zt.group_name)&&T()(zt.end_time)<=T()()))return _.a.createElement(Qe,{value:zt.group_name,key:zt.id},zt.group_name)}))),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u6263\u5206\uFF1A"),_.a.createElement(fe.b,{disabled:ct||en(Ge.id),value:{type:Ge.penalty_type,inputValue:Ge.late_penalty},onChange:function(ln){ze[dt].late_penalty=ln.inputValue,ze[dt].penalty_type=ln.type,xt(Object(d.a)(ze))}})),_.a.createElement(a.a,{className:"ml20"},_.a.createElement("span",null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\uFF1A"),_.a.createElement(g.a,{disabled:ct||en(Ge.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:T()(Object(K.d)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:function(ln){return Pe(ln,He==null?void 0:He.course_end_date)},format:"YYYY-MM-DD HH:mm",value:Ge!=null&&Ge.late_time?T()(Ge.late_time):void 0,onChange:function(ln,vn){ze[dt].late_time=vn,xt(Object(d.a)(ze))}})),!ct&&_.a.createElement(a.a,{className:"ml20"},dt>0&&!Ge.id&&_.a.createElement(x.a,{onClick:function(){ze=ze.filter(function(ln,vn){return dt!==vn}),xt(ze.slice()),setTimeout(function(){return xt(ze.slice())},10)}}),_.a.createElement(v.a,{className:"c-green ml20",onClick:function(){xt(ze.concat({penalty_type:fe.a.Percent,late_minus_score:20}))}}))))})),_.a.createElement(R.a,null),!ct&&_.a.createElement(a.a,{className:"mb50"},_.a.createElement(u.a,{type:"primary",size:"large",style:{marginTop:"40px"},loading:Ne,onClick:function(){return Rt()}},"\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 De=Ee.shixunHomeworks,rt=Ee.loading;return{shixunHomeworks:De,loading:rt.effects}})(St)},fW2E:function(We,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}We.exports=Y},fjLI:function(We,J,L){"use strict";L.d(J,"f",function(){return f}),L.d(J,"b",function(){return a}),L.d(J,"a",function(){return o}),L.d(J,"d",function(){return c}),L.d(J,"e",function(){return l}),L.d(J,"c",function(){return n});var Y=L("8HAY"),B=L("Vhoy"),I=L("MI8n"),F=L("JYp7"),S=L("pmY6"),R=L("24hK"),P=L("nnTU"),y=L("T8No"),t=L("Cg/j"),b=L("t9D7"),i=function(s,d,E,A){var C=arguments.length,k=C<3?d:A===null?A=Object.getOwnPropertyDescriptor(d,E):A,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(s,d,E,A);else for(var g=s.length-1;g>=0;g--)(w=s[g])&&(k=(C<3?w(k):C>3?w(d,E,k):w(d,E))||k);return C>3&&k&&Object.defineProperty(d,E,k),k},u=function(s,d){return function(E,A){d(E,A,s)}};function f(s){return s.command!==void 0}class a{constructor(s){this.id=a._idPool++,this._debugName=s}}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 o=Object(t.c)("menuService"),c=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new I.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===a.CommandPalette}}addCommand(s){return this.addCommands(F.a.single(s))}addCommands(s){for(const d of s)this._commands.set(d.id,d);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(S.i)(()=>{let d=!1;for(const E of s)d=this._commands.delete(E.id)||d;d&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((d,E)=>s.set(E,d)),s}appendMenuItem(s,d){return this.appendMenuItems(F.a.single({id:s,item:d}))}appendMenuItems(s){const d=new Set,E=new R.a;for(const{id:A,item:C}of s){let k=this._menuItems.get(A);k||(k=new R.a,this._menuItems.set(A,k)),E.push(k.push(C)),d.add(A)}return this._onDidChangeMenu.fire(d),Object(S.i)(()=>{if(E.size>0){for(let A of E)A();this._onDidChangeMenu.fire(d),E.clear()}})}getMenuItems(s){let d;return this._menuItems.has(s)?d=[...this._menuItems.get(s)]:d=[],s===a.CommandPalette&&this._appendImplicitItems(d),d}_appendImplicitItems(s){const d=new Set;for(const E of s)f(E)&&(d.add(E.command.id),E.alt&&d.add(E.alt.id));this._commands.forEach((E,A)=>{d.has(A)||s.push({command:E})})}};class l extends Y.e{constructor(s,d,E,A){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=d,this._contextKeyService=E,this._options=A}get actions(){const s=[],d=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=d.getActions(this._options);d.dispose();for(const[,A]of E)A.length>0&&(s.push(...A),s.push(new Y.d));return s.length&&s.pop(),s}}let n=class s{constructor(d,E,A,C,k){var w,g;if(this._commandService=k,this.id=d.id,this.label=(A==null?void 0:A.renderShortTitle)&&d.shortTitle?typeof d.shortTitle=="string"?d.shortTitle:d.shortTitle.value:typeof d.title=="string"?d.title:d.title.value,this.tooltip=(g=typeof d.tooltip=="string"?d.tooltip:(w=d.tooltip)===null||w===void 0?void 0:w.value)!==null&&g!==void 0?g:"",this.enabled=!d.precondition||C.contextMatchesRules(d.precondition),this.checked=void 0,d.toggled){const h=d.toggled.condition?d.toggled:{condition:d.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=d,this.alt=E?new s(E,void 0,A,C,k):void 0,this._options=A,b.d.isThemeIcon(d.icon)&&(this.class=B.a.asClassName(d.icon))}dispose(){}run(...d){var E,A;let C=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(C=[...C,this._options.arg]),((A=this._options)===null||A===void 0?void 0:A.shouldForwardArgs)&&(C=[...C,...d]),this._commandService.executeCommand(this.id,...C)}};n=i([u(3,y.b),u(4,P.b)],n)},fyJ8:function(We,J,L){"use strict";var Y=L("rePB"),B=L("VTBJ"),I=L("Ff2n"),F=L("U8pU"),S=L("q1tI"),R=L.n(S),P=L("TSYQ"),y=L.n(P),t=L("c+Xe"),b=L("sR1s");function i(c){return c&&Object(F.a)(c)==="object"&&!Array.isArray(c)&&!S.isValidElement(c)}function u(c){return typeof c=="string"?!0:Object(t.c)(c)}function f(c,l){var n,s=c.prefixCls,d=c.className,E=c.record,A=c.index,C=c.dataIndex,k=c.render,w=c.children,g=c.component,h=g===void 0?"td":g,p=c.colSpan,m=c.rowSpan,_=c.fixLeft,x=c.fixRight,v=c.firstFixLeft,j=c.lastFixLeft,U=c.firstFixRight,T=c.lastFixRight,z=c.appendNode,H=c.additionalProps,M=H===void 0?{}:H,V=c.ellipsis,K=c.align,$=c.rowType,Z=c.isSticky,ve="".concat(s,"-cell"),oe,fe;if(w)fe=w;else{var ye=Object(b.b)(E,C);if(fe=ye,k){var Pe=k(ye,E,A);i(Pe)?(fe=Pe.children,oe=Pe.props):fe=Pe}}Object(F.a)(fe)==="object"&&!Array.isArray(fe)&&!S.isValidElement(fe)&&(fe=null),V&&(j||U)&&(fe=S.createElement("span",{className:"".concat(ve,"-content")},fe));var ge=oe||{},de=ge.colSpan,Qe=ge.rowSpan,St=ge.style,Ee=ge.className,De=Object(I.a)(ge,["colSpan","rowSpan","style","className"]),rt=de!==void 0?de:p,Be=Qe!==void 0?Qe:m;if(rt===0||Be===0)return null;var ke={},ut=typeof _=="number",ie=typeof x=="number";ut&&(ke.position="sticky",ke.left=_),ie&&(ke.position="sticky",ke.right=x);var xe={};K&&(xe.textAlign=K);var we,Ke=V===!0?{showTitle:!0}:V;Ke&&(Ke.showTitle||$==="header")&&(typeof fe=="string"||typeof fe=="number"?we=fe.toString():S.isValidElement(fe)&&typeof fe.props.children=="string"&&(we=fe.props.children));var ot=Object(B.a)(Object(B.a)(Object(B.a)({title:we},De),M),{},{colSpan:rt&&rt!==1?rt:null,rowSpan:Be&&Be!==1?Be:null,className:y()(ve,d,(n={},Object(Y.a)(n,"".concat(ve,"-fix-left"),ut),Object(Y.a)(n,"".concat(ve,"-fix-left-first"),v),Object(Y.a)(n,"".concat(ve,"-fix-left-last"),j),Object(Y.a)(n,"".concat(ve,"-fix-right"),ie),Object(Y.a)(n,"".concat(ve,"-fix-right-first"),U),Object(Y.a)(n,"".concat(ve,"-fix-right-last"),T),Object(Y.a)(n,"".concat(ve,"-ellipsis"),V),Object(Y.a)(n,"".concat(ve,"-with-append"),z),Object(Y.a)(n,"".concat(ve,"-fix-sticky"),(ut||ie)&&Z),n),M.className,Ee),style:Object(B.a)(Object(B.a)(Object(B.a)(Object(B.a)({},M.style),xe),ke),St),ref:u(h)?l:null});return S.createElement(h,Object.assign({},ot),z,fe)}var a=S.forwardRef(f);a.displayName="Cell";var o=S.memo(a,function(c,l){return l.shouldCellUpdate?!l.shouldCellUpdate(l.record,c.record):!1});J.a=o},gMzb:function(We,J,L){"use strict";var Y=L("k1fw"),B=L("oBTY"),I=L("9og8"),F=L("tJVT"),S=L("sRBo"),R=L("kaz8"),P=L("WmNS"),y=L.n(P),t=L("q1tI"),b=L.n(t),i=L("9kvl"),u=L("wlus"),f=L("w5pM"),a=L("ErOA"),o=L("OaEy"),c=L("2fM7"),l=L("y8nQ"),n=L("Vl3Y"),s=L("Ty5D"),d=L("yQHh"),E=L.n(d),A=R.a.Group,C=function(m){var _,x,v,j,U,T,z,H,M=m.classroomList,V=m.loading,K=m.user,$=m.exercise_id,Z=$===void 0?null:$,ve=m.homework_common_id,oe=ve===void 0?null:ve,fe=m.setitem,ye=m.item,Pe=m.type,ge=m.rz,de=m.dispatch,Qe=Object(t.useState)([]),St=Object(F.a)(Qe,2),Ee=St[0],De=St[1],rt=Object(t.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20}),Be=Object(F.a)(rt,2),ke=Be[0],ut=Be[1],ie=Object(s.i)(),xe=Object(t.useState)(!1),we=Object(F.a)(xe,2),Ke=we[0],ot=we[1],gt=Object(t.useState)(!1),Nt=Object(F.a)(gt,2),He=Nt[0],jt=Nt[1],$t=n.a.useForm(),Ie=Object(F.a)($t,1),Ae=Ie[0];Object(t.useEffect)(function(){ge&&(ke.zydatas=ge,ut(Object(Y.a)({},ke)),ye!=null&&ye.ec_course_id&&ct())},[ye,ge]);function ct(){return Et.apply(this,arguments)}function Et(){return Et=Object(I.a)(y.a.mark(function ae(){return y.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 ht.apply(this,arguments)}function ht(){return ht=Object(I.a)(y.a.mark(function ae(le){var he;return y.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,ut(Object(Y.a)({},ke)),Ae.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]});case 6:case"end":return Se.stop()}},ae)})),ht.apply(this,arguments)}function Ne(ae){return Te.apply(this,arguments)}function Te(){return Te=Object(I.a)(y.a.mark(function ae(le){var he;return y.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,ut(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)(y.a.mark(function le(he){var _e;return y.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,ut(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:E.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=[],ut(Object(Y.a)({},ke)),Ze(le.ec_major_school_id)),le.ec_year_id&&(ke.kcdatas=[],ke.zsdatas=[],ut(Object(Y.a)({},ke)),Ne(le.ec_year_id)),le.ec_course_id&&(ke.zsdatas=[],ut(Object(Y.a)({},ke)),Oe(le.ec_course_id))},onFinish:function(){var ae=Object(I.a)(y.a.mark(function le(he){return y.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(c.a,{style:{width:150},disabled:((_=ke.zydatas)===null||_===void 0?void 0:_.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},ke==null||((x=ke.zydatas)===null||x===void 0)?void 0:x.map(function(ae,le){return b.a.createElement(c.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(c.a,{style:{width:150},disabled:((v=ke.jbdatas)===null||v===void 0?void 0:v.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(c.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(c.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||((T=ke.kcdatas)===null||T===void 0)?void 0:T.map(function(ae,le){return b.a.createElement(c.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(c.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(c.a.Option,{key:le,value:ae==null?void 0:ae.id},ae==null?void 0:ae.name)})))))},k=Object(i.a)(function(p){var m=p.classroomList,_=p.loading,x=p.globalSetting,v=p.user;return{classroomList:m,globalSetting:x,loading:_.effects,user:v}})(C),w=R.a.Group,g=function(m){var _,x,v,j=m.classroomList,U=m.loading,T=m.user,z=m.exercise_id,H=z===void 0?null:z,M=m.homework_common_id,V=M===void 0?null:M,K=m.setitem,$=m.type,Z=m.dispatch,ve=Object(t.useState)([{}]),oe=Object(F.a)(ve,2),fe=oe[0],ye=oe[1],Pe=Object(t.useState)([]),ge=Object(F.a)(Pe,2),de=ge[0],Qe=ge[1];function St(){return Ee.apply(this,arguments)}function Ee(){return Ee=Object(I.a)(y.a.mark(function Be(){var ke,ut,ie,xe,we;return y.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.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:ut=ot.sent,(ut==null||((ke=ut.data)===null||ke===void 0)?void 0:ke.length)>0&&(we=[],ut==null||((ie=ut.data)===null||ie===void 0)||ie.map(function(gt){var Nt;gt==null||((Nt=gt.ec_point_ids)===null||Nt===void 0)||Nt.map(function(He){we.push(He)})}),K(Object(Y.a)(Object(Y.a)({},ut==null||((xe=ut.data)===null||xe===void 0)?void 0:xe[0]),{},{ec_point_ids:we})),ye(ut==null?void 0:ut.data));case 4:case"end":return ot.stop()}},Be)})),Ee.apply(this,arguments)}Object(t.useEffect)(function(){var Be,ke;T!=null&&(Be=T.userInfo)!==null&&Be!==void 0&&(ke=Be.course)!==null&&ke!==void 0&&ke.course_school_id&&De()},[T==null||((_=T.userInfo)===null||_===void 0||((x=_.course)===null||x===void 0))?void 0:x.course_school_id]);function De(){return rt.apply(this,arguments)}function rt(){return rt=Object(I.a)(y.a.mark(function Be(){var ke,ut,ie;return y.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return we.next=2,Object(a.a)("/api/schools/".concat(T==null||((ke=T.userInfo)===null||ke===void 0||((ut=ke.course)===null||ut===void 0))?void 0:ut.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:ie=we.sent,Qe(ie==null?void 0:ie.data),(V||H)&&St();case 5:case"end":return we.stop()}},Be)})),rt.apply(this,arguments)}return console.log(fe),b.a.createElement("div",{style:{display:(v=T.userInfo.course)!==null&&v!==void 0&&v.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(Be,ke){return b.a.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"}},b.a.createElement(k,{rz:de,item:Be,type:ke,setitem:function(ie){fe.splice(ke,1,ie),ye(Object(B.a)(fe));var xe=[];fe==null||fe.map(function(we){var Ke;we==null||((Ke=we.ec_point_ids)===null||Ke===void 0)||Ke.map(function(ot){xe.push(ot)})}),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(i.a)(function(p){var m=p.classroomList,_=p.loading,x=p.globalSetting,v=p.user;return{classroomList:m,globalSetting:x,loading:_.effects,user:v}})(g)},gut8:function(We,J){var L={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Y=9;J.ContextCachedBy=L,J.WILL_BE_RESTORED=Y},h7HQ:function(We,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,S){B.buildPath(F,S,!0)}});We.exports=I},hOwI:function(We,J){var L=Math.log(2);function Y(I,F,S,R,P,y){var t=R+"-"+P,b=I.length;if(y.hasOwnProperty(t))return y[t];if(F===1){var i=Math.round(Math.log((1<<b)-1&~P)/L);return I[S][i]}for(var u=R|1<<S,f=S+1;R&1<<f;)f++;for(var a=0,o=0,c=0;o<b;o++){var l=1<<o;l&P||(a+=(c%2?-1:1)*I[S][o]*Y(I,F-1,f,u,P|l,y),c++)}return y[t]=a,a}function B(I,F){var S=[[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(S,8,0,0,0,R);if(P===0)return;for(var y=[],t=0;t<8;t++)for(var b=0;b<8;b++)y[b]==null&&(y[b]=0),y[b]+=((t+b)%2?-1:1)*Y(S,7,t===0?1:0,1<<t,1<<b,R)/P*F[t];return function(i,u,f){var a=u*y[6]+f*y[7]+1;i[0]=(u*y[0]+f*y[1]+y[2])/a,i[1]=(u*y[3]+f*y[4]+y[5])/a}}J.buildTransformer=B},hW8S:function(We,J,L){"use strict";L.d(J,"a",function(){return F}),L.d(J,"c",function(){return S}),L.d(J,"b",function(){return R});var Y=L("VTBJ"),B=L("Ff2n"),I=L("Kwbf"),F="RC_TABLE_INTERNAL_COL_DEFINE";function S(P){var y=P.expandable,t=Object(B.a)(P,["expandable"]);return"expandable"in P?Object(Y.a)(Object(Y.a)({},t),y):t}function R(P){return Object.keys(P).reduce(function(y,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(y[t]=P[t]),y},{})}},hX1E:function(We,J){var L=Math.PI*2;function Y(B){return B%=L,B<0&&(B+=L),B}J.normalizeRadian=Y},hydK:function(We,J){var L="http://www.w3.org/2000/svg";function Y(B){return document.createElementNS(L,B)}J.createElement=Y},hyiK:function(We,J){function L(Y,B,I,F,S,R){if(R>B&&R>F||R<B&&R<F)return 0;if(F===B)return 0;var P=F<B?1:-1,y=(R-B)/(F-B);(y===1||y===0)&&(P=F<B?.5:-.5);var t=y*(I-Y)+Y;return t===S?Infinity:t>S?P:0}We.exports=L},iXp4:function(We,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 S=this.__clipPaths,R=this.style,P;if(S)for(var y=0;y<S.length;y++){var t=S[y],b=t&&t.shape,i=t&&t.type;if(b&&(i==="sector"&&b.startAngle===b.endAngle||i==="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}We.exports=I},ic2d:function(We,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(S,R){Y.a(B.l(S)),Y.a(B.k(R)),Y.a(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,R)}as(S){return this.data.get(S)||null}}const F=new I},j5sG:function(We,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(S){var R=void 0,P=[],y=(0,Y.default)(function(){P.forEach(function(f){f(S)})}),t=function(){var a=new ResizeObserver(y);return a.observe(S),y(),a},b=function(a){R||(R=t()),P.indexOf(a)===-1&&P.push(a)},i=function(){R.disconnect(),P=[],R=void 0},u=function(a){var o=P.indexOf(a);o!==-1&&P.splice(o,1),P.length===0&&R&&i()};return{element:S,bind:b,destroy:i,unbind:u}};J.createSensor=I},jTL6:function(We,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 S=F.cx,R=F.cy,P=Math.max(F.r,0),y=F.startAngle,t=F.endAngle,b=F.clockwise,i=Math.cos(y),u=Math.sin(y);I.moveTo(i*P+S,u*P+R),I.arc(S,R,P,y,t,!b)}});We.exports=B},juDX:function(We,J,L){L("P47w");var Y=L("aX58"),B=Y.registerPainter,I=L("3CBa");B("svg",I)},k3GJ:function(We,J,L){"use strict";L.d(J,"a",function(){return aa});var Y=L("rePB"),B=L("ODXe"),I=L("Ff2n"),F=L("VTBJ"),S=L("q1tI"),R=L("TSYQ"),P=L.n(R),y=L("Zm9Q"),t=L("6cGi"),b=L("KQm4"),i=L("xEkU"),u=L.n(i),f=L("t23M");function a(Le){var et=Object(S.useRef)(),at=Object(S.useRef)(!1);function je(){for(var ce=arguments.length,Ce=new Array(ce),me=0;me<ce;me++)Ce[me]=arguments[me];at.current||(u.a.cancel(et.current),et.current=u()(function(){Le.apply(void 0,Ce)}))}return Object(S.useEffect)(function(){return function(){at.current=!0,u.a.cancel(et.current)}},[]),je}function o(Le){var et=Object(S.useRef)([]),at=Object(S.useState)({}),je=Object(B.a)(at,2),ce=je[1],Ce=Object(S.useRef)(typeof Le=="function"?Le():Le),me=a(function(){var Ve=Ce.current;et.current.forEach(function(st){Ve=st(Ve)}),et.current=[],Ce.current=Ve,ce({})});function Ue(Ve){et.current.push(Ve),me()}return[Ce.current,Ue]}var c=L("4IlW");function l(Le,et){var at,je=Le.prefixCls,ce=Le.id,Ce=Le.active,me=Le.rtl,Ue=Le.tab,Ve=Ue.key,st=Ue.tab,$e=Ue.disabled,yt=Ue.closeIcon,Bt=Le.tabBarGutter,rn=Le.tabPosition,cn=Le.closable,An=Le.renderWrapper,zn=Le.removeAriaLabel,cr=Le.editable,hr=Le.onClick,fn=Le.onRemove,Ft=Le.onFocus,Xt="".concat(je,"-tab");S.useEffect(function(){return fn},[]);var In={};rn==="top"||rn==="bottom"?In[me?"marginLeft":"marginRight"]=Bt:In.marginBottom=Bt;var xn=cr&&cn!==!1&&!$e;function er(pn){if($e)return;hr(pn)}function wr(pn){pn.preventDefault(),pn.stopPropagation(),cr.onEdit("remove",{key:Ve,event:pn})}var Jn=S.createElement("div",{key:Ve,ref:et,className:P()(Xt,(at={},Object(Y.a)(at,"".concat(Xt,"-with-remove"),xn),Object(Y.a)(at,"".concat(Xt,"-active"),Ce),Object(Y.a)(at,"".concat(Xt,"-disabled"),$e),at)),style:In,onClick:er},S.createElement("div",{role:"tab","aria-selected":Ce,id:ce&&"".concat(ce,"-tab-").concat(Ve),className:"".concat(Xt,"-btn"),"aria-controls":ce&&"".concat(ce,"-panel-").concat(Ve),"aria-disabled":$e,tabIndex:$e?null:0,onClick:function(Dn){Dn.stopPropagation(),er(Dn)},onKeyDown:function(Dn){[c.a.SPACE,c.a.ENTER].includes(Dn.which)&&(Dn.preventDefault(),er(Dn))},onFocus:Ft},st),xn&&S.createElement("button",{type:"button","aria-label":zn||"remove",tabIndex:0,className:"".concat(Xt,"-remove"),onClick:function(Dn){Dn.stopPropagation(),wr(Dn)}},yt||cr.removeIcon||"\xD7"));return An&&(Jn=An(Jn)),Jn}var n=S.forwardRef(l),s={width:0,height:0,left:0,top:0};function d(Le,et,at){return Object(S.useMemo)(function(){for(var je,ce=new Map,Ce=et.get((je=Le[0])===null||je===void 0?void 0:je.key)||s,me=Ce.left+Ce.width,Ue=0;Ue<Le.length;Ue+=1){var Ve=Le[Ue].key,st=et.get(Ve);if(!st){var $e;st=et.get(($e=Le[Ue-1])===null||$e===void 0?void 0:$e.key)||s}var yt=ce.get(Ve)||Object(F.a)({},st);yt.right=me-yt.left-yt.width,ce.set(Ve,yt)}return ce},[Le.map(function(je){return je.key}).join("_"),et,at])}var E={width:0,height:0,left:0,top:0,right:0};function A(Le,et,at,je,ce){var Ce=ce.tabs,me=ce.tabPosition,Ue=ce.rtl,Ve,st,$e;["top","bottom"].includes(me)?(Ve="width",st=Ue?"right":"left",$e=Math.abs(et.left)):(Ve="height",st="top",$e=-et.top);var yt=et[Ve],Bt=at[Ve],rn=je[Ve],cn=yt;return Bt+rn>yt&&(cn=yt-rn),Object(S.useMemo)(function(){if(!Ce.length)return[0,0];for(var An=Ce.length,zn=An,cr=0;cr<An;cr+=1){var hr=Le.get(Ce[cr].key)||E;if(hr[st]+hr[Ve]>$e+cn){zn=cr-1;break}}for(var fn=0,Ft=An-1;Ft>=0;Ft-=1){var Xt=Le.get(Ce[Ft].key)||E;if(Xt[st]<$e){fn=Ft+1;break}}return[fn,zn]},[Le,$e,cn,me,Ce.map(function(An){return An.key}).join("_"),Ue])}var C=L("wx14"),k=L("1OyB"),w=L("vuIU"),g=L("JX7q"),h=L("Ji7U"),p=L("LK+K"),m=L("I8Z2"),_=L("bT9E"),x=L("2GS6"),v=L("Gytx"),j=L.n(v),U=L("U8pU"),T=/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,ve=/\bWindows(?:.+)ARM\b/i,oe=/BlackBerry/i,fe=/BB10/i,ye=/Opera Mini/i,Pe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ge=/Mobile(?:.+)Firefox\b/i;function de(Le,et){return Le.test(et)}function Qe(Le){var et=Le||(typeof navigator!="undefined"?navigator.userAgent:""),at=(et||"").split("[FBAN");if(typeof at[1]!="undefined"){var je=at,ce=Object(B.a)(je,1);et=ce[0]}if(at=et.split("Twitter"),typeof at[1]!="undefined"){var Ce=at,me=Object(B.a)(Ce,1);et=me[0]}var Ue={apple:{phone:de(T,et)&&!de(Z,et),ipod:de(z,et),tablet:!de(T,et)&&de(H,et)&&!de(Z,et),device:(de(T,et)||de(z,et)||de(H,et))&&!de(Z,et)},amazon:{phone:de(K,et),tablet:!de(K,et)&&de($,et),device:de(K,et)||de($,et)},android:{phone:!de(Z,et)&&de(K,et)||!de(Z,et)&&de(M,et),tablet:!de(Z,et)&&!de(K,et)&&!de(M,et)&&(de($,et)||de(V,et)),device:!de(Z,et)&&(de(K,et)||de($,et)||de(M,et)||de(V,et))||de(/\bokhttp\b/i,et)},windows:{phone:de(Z,et),tablet:de(ve,et),device:de(Z,et)||de(ve,et)},other:{blackberry:de(oe,et),blackberry10:de(fe,et),opera:de(ye,et),firefox:de(ge,et),chrome:de(Pe,et),device:de(oe,et)||de(fe,et)||de(ye,et)||de(ge,et)||de(Pe,et)},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 St=Object(F.a)(Object(F.a)({},Qe()),{},{isMobile:Qe}),Ee=St;function De(){}function rt(Le,et,at){var je=et||"";return Le.key||"".concat(je,"item_").concat(at)}function Be(Le){return"".concat(Le,"-menu-")}function ke(Le,et){var at=-1;S.Children.forEach(Le,function(je){at+=1,je&&je.type&&je.type.isMenuItemGroup?S.Children.forEach(je.props.children,function(ce){at+=1,et(ce,at)}):et(je,at)})}function ut(Le,et,at){if(!Le||at.find)return;S.Children.forEach(Le,function(je){if(je){var ce=je.type;if(!ce||!(ce.isSubMenu||ce.isMenuItem||ce.isMenuItemGroup))return;et.indexOf(je.key)!==-1?at.find=!0:je.props.children&&ut(je.props.children,et,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(et){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,je=et&&typeof et.getBoundingClientRect=="function"&&et.getBoundingClientRect().width;if(je){if(at){var ce=getComputedStyle(et),Ce=ce.marginLeft,me=ce.marginRight;je+=+Ce.replace("px","")+ +me.replace("px","")}je=+je.toFixed(6)}return je||0},we=function(et,at,je){et&&Object(U.a)(et.style)==="object"&&(et.style[at]=je)},Ke=function(){return Ee.any},ot=L("bdgK"),gt=L("i8i4"),Nt=L.n(gt),He=L("wgJM"),jt=L("l4aY"),$t=L("m+aA"),Ie=L("c+Xe"),Ae=L("zT1h"),ct=L("QC+M");function Et(Le,et,at){return at?Le[0]===et[0]:Le[0]===et[0]&&Le[1]===et[1]}function Ze(Le,et,at){var je=Le[et]||{};return Object(F.a)(Object(F.a)({},je),at)}function ht(Le,et,at,je){for(var ce=at.points,Ce=Object.keys(Le),me=0;me<Ce.length;me+=1){var Ue=Ce[me];if(Et(Le[Ue].points,ce,je))return"".concat(et,"-placement-").concat(Ue)}return""}var Ne=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Le=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(Le)||/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(Le==null?void 0:Le.substr(0,4)))},Te=L("MNnm");function Oe(Le,et){var at={};return at[Le.toLowerCase()]=et.toLowerCase(),at["Webkit".concat(Le)]="webkit".concat(et),at["Moz".concat(Le)]="moz".concat(et),at["ms".concat(Le)]="MS".concat(et),at["O".concat(Le)]="o".concat(et.toLowerCase()),at}function ae(Le,et){var at={animationend:Oe("Animation","AnimationEnd"),transitionend:Oe("Transition","TransitionEnd")};return Le&&("AnimationEvent"in et||delete at.animationend.animation,"TransitionEvent"in et||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(Le){if(Se[Le])return Se[Le];var et=le[Le];if(et)for(var at=Object.keys(et),je=at.length,ce=0;ce<je;ce+=1){var Ce=at[ce];if(Object.prototype.hasOwnProperty.call(et,Ce)&&Ce in he)return Se[Le]=et[Ce],Se[Le]}return""}var xt=ze("animationend"),Qt=ze("transitionend"),on=!!(xt&&Qt),vt=xt||"animationend",Kt=Qt||"transitionend";function Ot(Le,et){if(!Le)return null;if(Object(U.a)(Le)==="object"){var at=et.replace(/-\w/g,function(je){return je[1].toUpperCase()});return Le[at]}return"".concat(Le,"-").concat(et)}var Rt="none",ft="appear",be="enter",Fe="leave",Ut="none",_t="prepare",Gt="start",en="active",Ge="end";function dt(Le){var et=Object(S.useRef)(!1),at=Object(S.useState)(Le),je=Object(B.a)(at,2),ce=je[0],Ce=je[1];function me(Ue){et.current||Ce(Ue)}return Object(S.useEffect)(function(){return function(){et.current=!0}},[]),[ce,me]}var Pt=Object(Te.a)()?S.useLayoutEffect:S.useEffect,zt=Pt,ln=function(){var Le=S.useRef(null);function et(){He.a.cancel(Le.current)}function at(je){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;et();var Ce=Object(He.a)(function(){ce<=1?je({isCanceled:function(){return Ce!==Le.current}}):at(je,ce-1)});Le.current=Ce}return S.useEffect(function(){return function(){et()}},[]),[at,et]},vn=[_t,Gt,en,Ge],nr=!1,Kn=!0;function bn(Le){return Le===en||Le===Ge}var xr=function(Le,et){var at=S.useState(Ut),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],me=ln(),Ue=Object(B.a)(me,2),Ve=Ue[0],st=Ue[1];function $e(){Ce(_t)}return zt(function(){if(ce!==Ut&&ce!==Ge){var yt=vn.indexOf(ce),Bt=vn[yt+1],rn=et(ce);rn===nr?Ce(Bt):Ve(function(cn){function An(){if(cn.isCanceled())return;Ce(Bt)}rn===!0?An():Promise.resolve(rn).then(An)})}},[Le,ce]),S.useEffect(function(){return function(){st()}},[]),[$e,ce]},Er=function(Le){var et=Object(S.useRef)(),at=Object(S.useRef)(Le);at.current=Le;var je=S.useCallback(function(me){at.current(me)},[]);function ce(me){me&&(me.removeEventListener(Kt,je),me.removeEventListener(vt,je))}function Ce(me){et.current&&et.current!==me&&ce(et.current),me&&me!==et.current&&(me.addEventListener(Kt,je),me.addEventListener(vt,je),et.current=me)}return S.useEffect(function(){return function(){ce(et.current)}},[]),[Ce,ce]};function ar(Le,et,at,je){var ce=je.motionEnter,Ce=ce===void 0?!0:ce,me=je.motionAppear,Ue=me===void 0?!0:me,Ve=je.motionLeave,st=Ve===void 0?!0:Ve,$e=je.motionDeadline,yt=je.motionLeaveImmediately,Bt=je.onAppearPrepare,rn=je.onEnterPrepare,cn=je.onLeavePrepare,An=je.onAppearStart,zn=je.onEnterStart,cr=je.onLeaveStart,hr=je.onAppearActive,fn=je.onEnterActive,Ft=je.onLeaveActive,Xt=je.onAppearEnd,In=je.onEnterEnd,xn=je.onLeaveEnd,er=je.onVisibleChanged,wr=dt(),Jn=Object(B.a)(wr,2),pn=Jn[0],Dn=Jn[1],gr=dt(Rt),Sr=Object(B.a)(gr,2),Xn=Sr[0],Dr=Sr[1],Qr=dt(null),Pr=Object(B.a)(Qr,2),Hr=Pr[0],Fr=Pr[1],Ur=Object(S.useRef)(!1),Nr=Object(S.useRef)(null),pr=Object(S.useRef)(!1),da=Object(S.useRef)(null);function Qa(){var Jr=at();return Jr||da.current}var Na=Object(S.useRef)(!1);function wa(Jr){var zr=Qa();if(Jr&&!Jr.deadline&&Jr.target!==zr)return;var ba;Xn===ft&&Na.current?ba=Xt==null?void 0:Xt(zr,Jr):Xn===be&&Na.current?ba=In==null?void 0:In(zr,Jr):Xn===Fe&&Na.current&&(ba=xn==null?void 0:xn(zr,Jr)),ba!==!1&&!pr.current&&(Dr(Rt),Fr(null))}var ea=Er(wa),Gr=Object(B.a)(ea,1),Xr=Gr[0],ta=S.useMemo(function(){var Jr,zr,ba;switch(Xn){case"appear":return Jr={},Object(Y.a)(Jr,_t,Bt),Object(Y.a)(Jr,Gt,An),Object(Y.a)(Jr,en,hr),Jr;case"enter":return zr={},Object(Y.a)(zr,_t,rn),Object(Y.a)(zr,Gt,zn),Object(Y.a)(zr,en,fn),zr;case"leave":return ba={},Object(Y.a)(ba,_t,cn),Object(Y.a)(ba,Gt,cr),Object(Y.a)(ba,en,Ft),ba;default:return{}}},[Xn]),ja=xr(Xn,function(Jr){if(Jr===_t){var zr=ta[_t];return zr?zr(Qa()):nr}if(Vr in ta){var ba;Fr(((ba=ta[Vr])===null||ba===void 0?void 0:ba.call(ta,Qa(),null))||null)}return Vr===en&&(Xr(Qa()),$e>0&&(clearTimeout(Nr.current),Nr.current=setTimeout(function(){wa({deadline:!0})},$e))),Kn}),hi=Object(B.a)(ja,2),si=hi[0],Vr=hi[1],Ja=bn(Vr);Na.current=Ja,zt(function(){Dn(et);var Jr=Ur.current;if(Ur.current=!0,!Le)return;var zr;!Jr&&et&&Ue&&(zr=ft),Jr&&et&&Ce&&(zr=be),(Jr&&!et&&st||!Jr&&yt&&!et&&st)&&(zr=Fe),zr&&(Dr(zr),si())},[et]),Object(S.useEffect)(function(){(Xn===ft&&!Ue||Xn===be&&!Ce||Xn===Fe&&!st)&&Dr(Rt)},[Ue,Ce,st]),Object(S.useEffect)(function(){return function(){clearTimeout(Nr.current),pr.current=!0}},[]),Object(S.useEffect)(function(){pn!==void 0&&Xn===Rt&&(er==null||er(pn))},[pn,Xn]);var Za=Hr;return ta[_t]&&Vr===Gt&&(Za=Object(F.a)({transition:"none"},Za)),[Xn,Vr,Za,pn!=null?pn:et]}var dr=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(){return Object(k.a)(this,at),et.apply(this,arguments)}return Object(w.a)(at,[{key:"render",value:function(){return this.props.children}}]),at}(S.Component),Or=dr;function Kr(Le){var et=Le;Object(U.a)(Le)==="object"&&(et=Le.transitionSupport);function at(ce){return!!(ce.motionName&&et)}var je=S.forwardRef(function(ce,Ce){var me=ce.visible,Ue=me===void 0?!0:me,Ve=ce.removeOnLeave,st=Ve===void 0?!0:Ve,$e=ce.forceRender,yt=ce.children,Bt=ce.motionName,rn=ce.leavedClassName,cn=ce.eventProps,An=at(ce),zn=Object(S.useRef)(),cr=Object(S.useRef)();function hr(){try{return Object($t.a)(zn.current||cr.current)}catch(Dr){return null}}var fn=ar(An,Ue,hr,ce),Ft=Object(B.a)(fn,4),Xt=Ft[0],In=Ft[1],xn=Ft[2],er=Ft[3],wr=S.useRef(er);er&&(wr.current=!0);var Jn=Object(S.useRef)(Ce);Jn.current=Ce;var pn=S.useCallback(function(Dr){zn.current=Dr,Object(Ie.b)(Jn.current,Dr)},[]),Dn,gr=Object(F.a)(Object(F.a)({},cn),{},{visible:Ue});if(!yt)Dn=null;else if(Xt===Rt||!at(ce))er?Dn=yt(Object(F.a)({},gr),pn):!st&&wr.current?Dn=yt(Object(F.a)(Object(F.a)({},gr),{},{className:rn}),pn):$e?Dn=yt(Object(F.a)(Object(F.a)({},gr),{},{style:{display:"none"}}),pn):Dn=null;else{var Sr,Xn;In===_t?Xn="prepare":bn(In)?Xn="active":In===Gt&&(Xn="start"),Dn=yt(Object(F.a)(Object(F.a)({},gr),{},{className:P()(Ot(Bt,Xt),(Sr={},Object(Y.a)(Sr,Ot(Bt,"".concat(Xt,"-").concat(Xn)),Xn),Object(Y.a)(Sr,Bt,typeof Bt=="string"),Sr)),style:xn}),pn)}return S.createElement(Or,{ref:cr},Dn)});return je.displayName="CSSMotion",je}var ia=Kr(on),hn="add",or="keep",ua="remove",ga="removed";function Zr(Le){var et;return Le&&Object(U.a)(Le)==="object"&&"key"in Le?et=Le:et={key:Le},Object(F.a)(Object(F.a)({},et),{},{key:String(et.key)})}function ra(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Le.map(Zr)}function te(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],at=[],je=0,ce=et.length,Ce=ra(Le),me=ra(et);Ce.forEach(function(st){for(var $e=!1,yt=je;yt<ce;yt+=1){var Bt=me[yt];if(Bt.key===st.key){je<yt&&(at=at.concat(me.slice(je,yt).map(function(rn){return Object(F.a)(Object(F.a)({},rn),{},{status:hn})})),je=yt),at.push(Object(F.a)(Object(F.a)({},Bt),{},{status:or})),je+=1,$e=!0;break}}$e||at.push(Object(F.a)(Object(F.a)({},st),{},{status:ua}))}),je<ce&&(at=at.concat(me.slice(je).map(function(st){return Object(F.a)(Object(F.a)({},st),{},{status:hn})})));var Ue={};at.forEach(function(st){var $e=st.key;Ue[$e]=(Ue[$e]||0)+1});var Ve=Object.keys(Ue).filter(function(st){return Ue[st]>1});return Ve.forEach(function(st){at=at.filter(function($e){var yt=$e.key,Bt=$e.status;return yt!==st||Bt!==ua}),at.forEach(function($e){$e.key===st&&($e.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(Le){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ia,at=function(je){Object(h.a)(Ce,je);var ce=Object(p.a)(Ce);function Ce(){var me;return Object(k.a)(this,Ce),me=ce.apply(this,arguments),me.state={keyEntities:[]},me.removeKey=function(Ue){me.setState(function(Ve){var st=Ve.keyEntities;return{keyEntities:st.map(function($e){return $e.key!==Ue?$e:Object(F.a)(Object(F.a)({},$e),{},{status:ga})})}})},me}return Object(w.a)(Ce,[{key:"render",value:function(){var Ue=this,Ve=this.state.keyEntities,st=this.props,$e=st.component,yt=st.children,Bt=st.onVisibleChanged,rn=Object(I.a)(st,["component","children","onVisibleChanged"]),cn=$e||S.Fragment,An={};return W.forEach(function(zn){An[zn]=rn[zn],delete rn[zn]}),delete rn.keys,S.createElement(cn,rn,Ve.map(function(zn){var cr=zn.status,hr=Object(I.a)(zn,["status"]),fn=cr===hn||cr===or;return S.createElement(et,Object(C.a)({},An,{key:hr.key,visible:fn,eventProps:hr,onVisibleChanged:function(Xt){Bt==null||Bt(Xt,{key:hr.key}),Xt||Ue.removeKey(hr.key)}}),yt)}))}}],[{key:"getDerivedStateFromProps",value:function(Ue,Ve){var st=Ue.keys,$e=Ve.keyEntities,yt=ra(st),Bt=te($e,yt);return{keyEntities:Bt.filter(function(rn){var cn=$e.find(function(An){var zn=An.key;return rn.key===zn});return!(cn&&cn.status===ga&&rn.status===ua)})}}}]),Ce}(S.Component);return at.defaultProps={component:"div"},at}var Q=G(on),ue=ia;function ee(Le){var et=Le.prefixCls,at=Le.motion,je=Le.animation,ce=Le.transitionName;return at||(je?{motionName:"".concat(et,"-").concat(je)}:ce?{motionName:ce}:null)}function qe(Le){var et=Le.prefixCls,at=Le.visible,je=Le.zIndex,ce=Le.mask,Ce=Le.maskMotion,me=Le.maskAnimation,Ue=Le.maskTransitionName;if(!ce)return null;var Ve={};return(Ce||Ue||me)&&(Ve=Object(F.a)({motionAppear:!0},ee({motion:Ce,prefixCls:et,transitionName:Ue,animation:me}))),S.createElement(ue,Object(C.a)({},Ve,{visible:at,removeOnLeave:!0}),function(st){var $e=st.className;return S.createElement("div",{style:{zIndex:je},className:P()("".concat(et,"-mask"),$e)})})}var nn=L("9mu1"),On=L("o0o1"),Yn=L.n(On),un=L("HaE+"),rr=["measure","align",null,"motion"],mn=function(Le,et){var at=Object(S.useState)(null),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],me=Object(S.useRef)(),Ue=Object(S.useRef)(!1);function Ve(yt){Ue.current||Ce(yt)}function st(){He.a.cancel(me.current)}function $e(yt){st(),me.current=Object(He.a)(function(){Ve(function(Bt){switch(ce){case"align":return"motion";case"motion":return"stable";default:}return Bt}),yt==null||yt()})}return Object(S.useEffect)(function(){Ve("measure")},[Le]),Object(S.useEffect)(function(){switch(ce){case"measure":et();break;default:}ce&&(me.current=Object(He.a)(Object(un.a)(Yn.a.mark(function yt(){var Bt,rn;return Yn.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:Bt=rr.indexOf(ce),rn=rr[Bt+1],rn&&Bt!==-1&&Ve(rn);case 3:case"end":return An.stop()}},yt)}))))},[ce]),Object(S.useEffect)(function(){return function(){Ue.current=!0,st()}},[]),[ce,$e]},sn=function(Le){var et=S.useState({width:0,height:0}),at=Object(B.a)(et,2),je=at[0],ce=at[1];function Ce(Ue){ce({width:Ue.offsetWidth,height:Ue.offsetHeight})}var me=S.useMemo(function(){var Ue={};if(Le){var Ve=je.width,st=je.height;Le.indexOf("height")!==-1&&st?Ue.height=st:Le.indexOf("minHeight")!==-1&&st&&(Ue.minHeight=st),Le.indexOf("width")!==-1&&Ve?Ue.width=Ve:Le.indexOf("minWidth")!==-1&&Ve&&(Ue.minWidth=Ve)}return Ue},[Le,je]);return[me,Ce]},_n=S.forwardRef(function(Le,et){var at=Le.visible,je=Le.prefixCls,ce=Le.className,Ce=Le.style,me=Le.children,Ue=Le.zIndex,Ve=Le.stretch,st=Le.destroyPopupOnHide,$e=Le.forceRender,yt=Le.align,Bt=Le.point,rn=Le.getRootDomNode,cn=Le.getClassNameFromAlign,An=Le.onAlign,zn=Le.onMouseEnter,cr=Le.onMouseLeave,hr=Le.onMouseDown,fn=Le.onTouchStart,Ft=Object(S.useRef)(),Xt=Object(S.useRef)(),In=Object(S.useState)(),xn=Object(B.a)(In,2),er=xn[0],wr=xn[1],Jn=sn(Ve),pn=Object(B.a)(Jn,2),Dn=pn[0],gr=pn[1];function Sr(){Ve&&gr(rn())}var Xn=mn(at,Sr),Dr=Object(B.a)(Xn,2),Qr=Dr[0],Pr=Dr[1],Hr=Object(S.useRef)();function Fr(){return Bt||rn}function Ur(){var ea;(ea=Ft.current)===null||ea===void 0||ea.forceAlign()}function Nr(ea,Gr){var Xr=cn(Gr);er!==Xr&&wr(Xr),Qr==="align"&&(er!==Xr?Promise.resolve().then(function(){Ur()}):Pr(function(){var ta;(ta=Hr.current)===null||ta===void 0||ta.call(Hr)}),An==null||An(ea,Gr))}var pr=Object(F.a)({},ee(Le));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ea){var Gr=pr[ea];pr[ea]=function(Xr,ta){return Pr(),Gr==null?void 0:Gr(Xr,ta)}});function da(){return new Promise(function(ea){Hr.current=ea})}S.useEffect(function(){!pr.motionName&&Qr==="motion"&&Pr()},[pr.motionName,Qr]),S.useImperativeHandle(et,function(){return{forceAlign:Ur,getElement:function(){return Xt.current}}});var Qa=Object(F.a)(Object(F.a)({},Dn),{},{zIndex:Ue,opacity:Qr==="motion"||Qr==="stable"||!at?void 0:0,pointerEvents:Qr==="stable"?void 0:"none"},Ce),Na=!0;(yt==null?void 0:yt.points)&&(Qr==="align"||Qr==="stable")&&(Na=!1);var wa=me;return S.Children.count(me)>1&&(wa=S.createElement("div",{className:"".concat(je,"-content")},me)),S.createElement(ue,Object(C.a)({visible:at,ref:Xt,leavedClassName:"".concat(je,"-hidden")},pr,{onAppearPrepare:da,onEnterPrepare:da,removeOnLeave:st,forceRender:$e}),function(ea,Gr){var Xr=ea.className,ta=ea.style,ja=P()(je,ce,er,Xr);return S.createElement(nn.a,{target:Fr(),key:"popup",ref:Ft,monitorWindowResize:!0,disabled:Na,align:yt,onAlign:Nr},S.createElement("div",{ref:Gr,className:ja,onMouseEnter:zn,onMouseLeave:cr,onMouseDownCapture:hr,onTouchStartCapture:fn,style:Object(F.a)(Object(F.a)({},ta),Qa)},wa))})});_n.displayName="PopupInner";var Nn=_n,sr=S.forwardRef(function(Le,et){var at=Le.prefixCls,je=Le.visible,ce=Le.zIndex,Ce=Le.children,me=Le.mobile;me=me===void 0?{}:me;var Ue=me.popupClassName,Ve=me.popupStyle,st=me.popupMotion,$e=st===void 0?{}:st,yt=me.popupRender,Bt=S.useRef();S.useImperativeHandle(et,function(){return{forceAlign:function(){},getElement:function(){return Bt.current}}});var rn=Object(F.a)({zIndex:ce},Ve),cn=Ce;return S.Children.count(Ce)>1&&(cn=S.createElement("div",{className:"".concat(at,"-content")},Ce)),yt&&(cn=yt(cn)),S.createElement(ue,Object(C.a)({visible:je,ref:Bt,removeOnLeave:!0},$e),function(An,zn){var cr=An.className,hr=An.style,fn=P()(at,Ue,cr);return S.createElement("div",{ref:zn,className:fn,style:Object(F.a)(Object(F.a)({},hr),rn)},cn)})});sr.displayName="MobilePopupInner";var Qn=sr,Zn=["visible","mobile"],kn=S.forwardRef(function(Le,et){var at=Le.visible,je=Le.mobile,ce=Object(I.a)(Le,Zn),Ce=Object(S.useState)(at),me=Object(B.a)(Ce,2),Ue=me[0],Ve=me[1],st=Object(S.useState)(!1),$e=Object(B.a)(st,2),yt=$e[0],Bt=$e[1],rn=Object(F.a)(Object(F.a)({},ce),{},{visible:Ue});Object(S.useEffect)(function(){Ve(at),at&&je&&Bt(Ne())},[at,je]);var cn=yt?S.createElement(Qn,Object(C.a)({},rn,{mobile:je,ref:et})):S.createElement(Nn,Object(C.a)({},rn,{ref:et}));return S.createElement("div",null,S.createElement(qe,rn),cn)});kn.displayName="Popup";var vr=kn,Hn=S.createContext(null),ir=Hn;function lr(){}function Ln(){return""}function Cr(Le){return Le?Le.ownerDocument:window.document}var Lr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Tr(Le){var et=function(at){Object(h.a)(ce,at);var je=Object(p.a)(ce);function ce(Ce){var me;Object(k.a)(this,ce),me=je.call(this,Ce),me.popupRef=S.createRef(),me.triggerRef=S.createRef(),me.attachId=void 0,me.clickOutsideHandler=void 0,me.touchOutsideHandler=void 0,me.contextMenuOutsideHandler1=void 0,me.contextMenuOutsideHandler2=void 0,me.mouseDownTimeout=void 0,me.focusTime=void 0,me.preClickTime=void 0,me.preTouchTime=void 0,me.delayTimer=void 0,me.hasPopupMouseDown=void 0,me.onMouseEnter=function(Ve){var st=me.props.mouseEnterDelay;me.fireEvents("onMouseEnter",Ve),me.delaySetPopupVisible(!0,st,st?null:Ve)},me.onMouseMove=function(Ve){me.fireEvents("onMouseMove",Ve),me.setPoint(Ve)},me.onMouseLeave=function(Ve){me.fireEvents("onMouseLeave",Ve),me.delaySetPopupVisible(!1,me.props.mouseLeaveDelay)},me.onPopupMouseEnter=function(){me.clearDelayTimer()},me.onPopupMouseLeave=function(Ve){var st;if(Ve.relatedTarget&&!Ve.relatedTarget.setTimeout&&Object(jt.a)((st=me.popupRef.current)===null||st===void 0?void 0:st.getElement(),Ve.relatedTarget))return;me.delaySetPopupVisible(!1,me.props.mouseLeaveDelay)},me.onFocus=function(Ve){me.fireEvents("onFocus",Ve),me.clearDelayTimer(),me.isFocusToShow()&&(me.focusTime=Date.now(),me.delaySetPopupVisible(!0,me.props.focusDelay))},me.onMouseDown=function(Ve){me.fireEvents("onMouseDown",Ve),me.preClickTime=Date.now()},me.onTouchStart=function(Ve){me.fireEvents("onTouchStart",Ve),me.preTouchTime=Date.now()},me.onBlur=function(Ve){me.fireEvents("onBlur",Ve),me.clearDelayTimer(),me.isBlurToHide()&&me.delaySetPopupVisible(!1,me.props.blurDelay)},me.onContextMenu=function(Ve){Ve.preventDefault(),me.fireEvents("onContextMenu",Ve),me.setPopupVisible(!0,Ve)},me.onContextMenuClose=function(){me.isContextMenuToShow()&&me.close()},me.onClick=function(Ve){if(me.fireEvents("onClick",Ve),me.focusTime){var st;if(me.preClickTime&&me.preTouchTime?st=Math.min(me.preClickTime,me.preTouchTime):me.preClickTime?st=me.preClickTime:me.preTouchTime&&(st=me.preTouchTime),Math.abs(st-me.focusTime)<20)return;me.focusTime=0}me.preClickTime=0,me.preTouchTime=0,me.isClickToShow()&&(me.isClickToHide()||me.isBlurToHide())&&Ve&&Ve.preventDefault&&Ve.preventDefault();var $e=!me.state.popupVisible;(me.isClickToHide()&&!$e||$e&&me.isClickToShow())&&me.setPopupVisible(!me.state.popupVisible,Ve)},me.onPopupMouseDown=function(){if(me.hasPopupMouseDown=!0,clearTimeout(me.mouseDownTimeout),me.mouseDownTimeout=window.setTimeout(function(){me.hasPopupMouseDown=!1},0),me.context){var Ve;(Ve=me.context).onPopupMouseDown.apply(Ve,arguments)}},me.onDocumentClick=function(Ve){if(me.props.mask&&!me.props.maskClosable)return;var st=Ve.target,$e=me.getRootDomNode(),yt=me.getPopupDomNode();(!Object(jt.a)($e,st)||me.isContextMenuOnly())&&!Object(jt.a)(yt,st)&&!me.hasPopupMouseDown&&me.close()},me.getRootDomNode=function(){var Ve=me.props.getTriggerDOMNode;if(Ve)return Ve(me.triggerRef.current);try{var st=Object($t.a)(me.triggerRef.current);if(st)return st}catch($e){}return Nt.a.findDOMNode(Object(g.a)(me))},me.getPopupClassNameFromAlign=function(Ve){var st=[],$e=me.props,yt=$e.popupPlacement,Bt=$e.builtinPlacements,rn=$e.prefixCls,cn=$e.alignPoint,An=$e.getPopupClassNameFromAlign;return yt&&Bt&&st.push(ht(Bt,rn,Ve,cn)),An&&st.push(An(Ve)),st.join(" ")},me.getComponent=function(){var Ve=me.props,st=Ve.prefixCls,$e=Ve.destroyPopupOnHide,yt=Ve.popupClassName,Bt=Ve.onPopupAlign,rn=Ve.popupMotion,cn=Ve.popupAnimation,An=Ve.popupTransitionName,zn=Ve.popupStyle,cr=Ve.mask,hr=Ve.maskAnimation,fn=Ve.maskTransitionName,Ft=Ve.maskMotion,Xt=Ve.zIndex,In=Ve.popup,xn=Ve.stretch,er=Ve.alignPoint,wr=Ve.mobile,Jn=Ve.forceRender,pn=me.state,Dn=pn.popupVisible,gr=pn.point,Sr=me.getPopupAlign(),Xn={};return me.isMouseEnterToShow()&&(Xn.onMouseEnter=me.onPopupMouseEnter),me.isMouseLeaveToHide()&&(Xn.onMouseLeave=me.onPopupMouseLeave),Xn.onMouseDown=me.onPopupMouseDown,Xn.onTouchStart=me.onPopupMouseDown,S.createElement(vr,Object(C.a)({prefixCls:st,destroyPopupOnHide:$e,visible:Dn,point:er&&gr,className:yt,align:Sr,onAlign:Bt,animation:cn,getClassNameFromAlign:me.getPopupClassNameFromAlign},Xn,{stretch:xn,getRootDomNode:me.getRootDomNode,style:zn,mask:cr,zIndex:Xt,transitionName:An,maskAnimation:hr,maskTransitionName:fn,maskMotion:Ft,ref:me.popupRef,motion:rn,mobile:wr,forceRender:Jn}),typeof In=="function"?In():In)},me.attachParent=function(Ve){He.a.cancel(me.attachId);var st=me.props,$e=st.getPopupContainer,yt=st.getDocument,Bt=me.getRootDomNode(),rn;$e?(Bt||$e.length===0)&&(rn=$e(Bt)):rn=yt(me.getRootDomNode()).body,rn?rn.appendChild(Ve):me.attachId=Object(He.a)(function(){me.attachParent(Ve)})},me.getContainer=function(){var Ve=me.props.getDocument,st=Ve(me.getRootDomNode()).createElement("div");return st.style.position="absolute",st.style.top="0",st.style.left="0",st.style.width="100%",me.attachParent(st),st},me.setPoint=function(Ve){var st=me.props.alignPoint;if(!st||!Ve)return;me.setState({point:{pageX:Ve.pageX,pageY:Ve.pageY}})},me.handlePortalUpdate=function(){me.state.prevPopupVisible!==me.state.popupVisible&&me.props.afterPopupVisibleChange(me.state.popupVisible)},me.triggerContextValue={onPopupMouseDown:me.onPopupMouseDown};var Ue;return"popupVisible"in Ce?Ue=!!Ce.popupVisible:Ue=!!Ce.defaultPopupVisible,me.state={prevPopupVisible:Ue,popupVisible:Ue},Lr.forEach(function(Ve){me["fire".concat(Ve)]=function(st){me.fireEvents(Ve,st)}}),me}return Object(w.a)(ce,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var me=this.props,Ue=this.state;if(Ue.popupVisible){var Ve;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ve=me.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ae.a)(Ve,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ve=Ve||me.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ae.a)(Ve,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ve=Ve||me.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ae.a)(Ve,"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),He.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var me;return((me=this.popupRef.current)===null||me===void 0?void 0:me.getElement())||null}},{key:"getPopupAlign",value:function(){var me=this.props,Ue=me.popupPlacement,Ve=me.popupAlign,st=me.builtinPlacements;return Ue&&st?Ze(st,Ue,Ve):Ve}},{key:"setPopupVisible",value:function(me,Ue){var Ve=this.props.alignPoint,st=this.state.popupVisible;this.clearDelayTimer(),st!==me&&("popupVisible"in this.props||this.setState({popupVisible:me,prevPopupVisible:st}),this.props.onPopupVisibleChange(me)),Ve&&Ue&&me&&this.setPoint(Ue)}},{key:"delaySetPopupVisible",value:function(me,Ue,Ve){var st=this,$e=Ue*1e3;if(this.clearDelayTimer(),$e){var yt=Ve?{pageX:Ve.pageX,pageY:Ve.pageY}:null;this.delayTimer=window.setTimeout(function(){st.setPopupVisible(me,yt),st.clearDelayTimer()},$e)}else this.setPopupVisible(me,Ve)}},{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(me){var Ue=this.props.children.props,Ve=this.props;return Ue[me]&&Ve[me]?this["fire".concat(me)]:Ue[me]||Ve[me]}},{key:"isClickToShow",value:function(){var me=this.props,Ue=me.action,Ve=me.showAction;return Ue.indexOf("click")!==-1||Ve.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var me=this.props.action;return me==="contextMenu"||me.length===1&&me[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var me=this.props,Ue=me.action,Ve=me.showAction;return Ue.indexOf("contextMenu")!==-1||Ve.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var me=this.props,Ue=me.action,Ve=me.hideAction;return Ue.indexOf("click")!==-1||Ve.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var me=this.props,Ue=me.action,Ve=me.showAction;return Ue.indexOf("hover")!==-1||Ve.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var me=this.props,Ue=me.action,Ve=me.hideAction;return Ue.indexOf("hover")!==-1||Ve.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var me=this.props,Ue=me.action,Ve=me.showAction;return Ue.indexOf("focus")!==-1||Ve.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var me=this.props,Ue=me.action,Ve=me.hideAction;return Ue.indexOf("focus")!==-1||Ve.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var me;(me=this.popupRef.current)===null||me===void 0||me.forceAlign()}}},{key:"fireEvents",value:function(me,Ue){var Ve=this.props.children.props[me];Ve&&Ve(Ue);var st=this.props[me];st&&st(Ue)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var me=this.state.popupVisible,Ue=this.props,Ve=Ue.children,st=Ue.forceRender,$e=Ue.alignPoint,yt=Ue.className,Bt=Ue.autoDestroy,rn=S.Children.only(Ve),cn={key:"trigger"};this.isContextMenuToShow()?cn.onContextMenu=this.onContextMenu:cn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(cn.onClick=this.onClick,cn.onMouseDown=this.onMouseDown,cn.onTouchStart=this.onTouchStart):(cn.onClick=this.createTwoChains("onClick"),cn.onMouseDown=this.createTwoChains("onMouseDown"),cn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(cn.onMouseEnter=this.onMouseEnter,$e&&(cn.onMouseMove=this.onMouseMove)):cn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?cn.onMouseLeave=this.onMouseLeave:cn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(cn.onFocus=this.onFocus,cn.onBlur=this.onBlur):(cn.onFocus=this.createTwoChains("onFocus"),cn.onBlur=this.createTwoChains("onBlur"));var An=P()(rn&&rn.props&&rn.props.className,yt);An&&(cn.className=An);var zn=Object(F.a)({},cn);Object(Ie.c)(rn)&&(zn.ref=Object(Ie.a)(this.triggerRef,rn.ref));var cr=S.cloneElement(rn,zn),hr;return(me||this.popupRef.current||st)&&(hr=S.createElement(Le,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!me&&Bt&&(hr=null),S.createElement(ir.Provider,{value:this.triggerContextValue},cr,hr)}}],[{key:"getDerivedStateFromProps",value:function(me,Ue){var Ve=me.popupVisible,st={};return Ve!==void 0&&Ue.popupVisible!==Ve&&(st.popupVisible=Ve,st.prevPopupVisible=Ue.popupVisible),st}}]),ce}(S.Component);return et.contextType=ir,et.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ln,getDocument:Cr,onPopupVisibleChange:lr,afterPopupVisibleChange:lr,onPopupAlign:lr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},et}var fr=Tr(ct.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]}},Me=Re,lt=0,tt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},pt=function(et,at,je){var ce=Be(at),Ce=et.getState();et.setState({defaultActiveFirst:Object(F.a)(Object(F.a)({},Ce.defaultActiveFirst),{},Object(Y.a)({},ce,je))})},mt=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(je){var ce;Object(k.a)(this,at),ce=et.call(this,je),ce.onDestroy=function($e){ce.props.onDestroy($e)},ce.onKeyDown=function($e){var yt=$e.keyCode,Bt=ce.menuInstance,rn=ce.props.store,cn=ce.getVisible();if(yt===c.a.ENTER)return ce.onTitleClick($e),pt(rn,ce.props.eventKey,!0),!0;if(yt===c.a.RIGHT)return cn?Bt.onKeyDown($e):(ce.triggerOpenChange(!0),pt(rn,ce.props.eventKey,!0)),!0;if(yt===c.a.LEFT){var An;if(cn)An=Bt.onKeyDown($e);else return;return An||(ce.triggerOpenChange(!1),An=!0),An}return cn&&(yt===c.a.UP||yt===c.a.DOWN)?Bt.onKeyDown($e):void 0},ce.onOpenChange=function($e){ce.props.onOpenChange($e)},ce.onPopupVisibleChange=function($e){ce.triggerOpenChange($e,$e?"mouseenter":"mouseleave")},ce.onMouseEnter=function($e){var yt=ce.props,Bt=yt.eventKey,rn=yt.onMouseEnter,cn=yt.store;pt(cn,ce.props.eventKey,!1),rn({key:Bt,domEvent:$e})},ce.onMouseLeave=function($e){var yt=ce.props,Bt=yt.parentMenu,rn=yt.eventKey,cn=yt.onMouseLeave;Bt.subMenuInstance=Object(g.a)(ce),cn({key:rn,domEvent:$e})},ce.onTitleMouseEnter=function($e){var yt=ce.props,Bt=yt.eventKey,rn=yt.onItemHover,cn=yt.onTitleMouseEnter;rn({key:Bt,hover:!0}),cn({key:Bt,domEvent:$e})},ce.onTitleMouseLeave=function($e){var yt=ce.props,Bt=yt.parentMenu,rn=yt.eventKey,cn=yt.onItemHover,An=yt.onTitleMouseLeave;Bt.subMenuInstance=Object(g.a)(ce),cn({key:rn,hover:!1}),An({key:rn,domEvent:$e})},ce.onTitleClick=function($e){var yt=Object(g.a)(ce),Bt=yt.props;if(Bt.onTitleClick({key:Bt.eventKey,domEvent:$e}),Bt.triggerSubMenuAction==="hover")return;ce.triggerOpenChange(!ce.getVisible(),"click"),pt(Bt.store,ce.props.eventKey,!1)},ce.onSubMenuClick=function($e){typeof ce.props.onClick=="function"&&ce.props.onClick(ce.addKeyPath($e))},ce.onSelect=function($e){ce.props.onSelect($e)},ce.onDeselect=function($e){ce.props.onDeselect($e)},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($e){ce.menuInstance=$e},ce.addKeyPath=function($e){return Object(F.a)(Object(F.a)({},$e),{},{keyPath:($e.keyPath||[]).concat(ce.props.eventKey)})},ce.triggerOpenChange=function($e,yt){var Bt=ce.props.eventKey,rn=function(){ce.onOpenChange({key:Bt,item:Object(g.a)(ce),trigger:yt,open:$e})};yt==="mouseenter"?ce.mouseenterTimeout=setTimeout(function(){rn()},0):rn()},ce.isChildrenSelected=function(){var $e={find:!1};return ut(ce.props.children,ce.props.selectedKeys,$e),$e.find},ce.isInlineMode=function(){return ce.getMode()==="inline"},ce.adjustWidth=function(){if(!ce.subMenuTitle||!ce.menuInstance)return;var $e=gt.findDOMNode(ce.menuInstance);if($e.offsetWidth>=ce.subMenuTitle.offsetWidth)return;$e.style.minWidth="".concat(ce.subMenuTitle.offsetWidth,"px")},ce.saveSubMenuTitle=function($e){ce.subMenuTitle=$e},ce.getBaseProps=function(){var $e=Object(g.a)(ce),yt=$e.props,Bt=ce.getMode();return{mode:Bt==="horizontal"?"vertical":Bt,visible:ce.getVisible(),level:yt.level+1,inlineIndent:yt.inlineIndent,focusable:!1,onClick:ce.onSubMenuClick,onSelect:ce.onSelect,onDeselect:ce.onDeselect,onDestroy:ce.onDestroy,selectedKeys:yt.selectedKeys,eventKey:"".concat(yt.eventKey,"-menu-"),openKeys:yt.openKeys,motion:yt.motion,onOpenChange:ce.onOpenChange,subMenuOpenDelay:yt.subMenuOpenDelay,parentMenu:Object(g.a)(ce),subMenuCloseDelay:yt.subMenuCloseDelay,forceSubMenuRender:yt.forceSubMenuRender,triggerSubMenuAction:yt.triggerSubMenuAction,builtinPlacements:yt.builtinPlacements,defaultActiveFirst:yt.store.getState().defaultActiveFirst[Be(yt.eventKey)],multiple:yt.multiple,prefixCls:yt.rootPrefixCls,id:ce.internalMenuId,manualRef:ce.saveMenuInstance,itemIcon:yt.itemIcon,expandIcon:yt.expandIcon,direction:yt.direction}},ce.getMotion=function($e,yt){var Bt=Object(g.a)(ce),rn=Bt.haveRendered,cn=ce.props,An=cn.motion,zn=cn.rootPrefixCls,cr=Object(F.a)(Object(F.a)({},An),{},{leavedClassName:"".concat(zn,"-hidden"),removeOnLeave:!1,motionAppear:rn||!yt||$e!=="inline"});return cr};var Ce=je.store,me=je.eventKey,Ue=Ce.getState(),Ve=Ue.defaultActiveFirst;ce.isRootMenu=!1;var st=!1;return Ve&&(st=Ve[me]),pt(Ce,me,st),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,me=Ce.mode,Ue=Ce.parentMenu,Ve=Ce.manualRef,st=Ce.isOpen,$e=function(){ce.setState({mode:me,isOpen:st})},yt=st!==this.state.isOpen,Bt=me!==this.state.mode;if((Bt||yt)&&(He.a.cancel(this.updateStateRaf),Bt?this.updateStateRaf=Object(He.a)($e):$e()),Ve&&Ve(this),me!=="horizontal"||!(Ue==null?void 0:Ue.isRootMenu)||!st)return;this.minWidthTimeout=setTimeout(function(){return ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ce=this.props,Ce=ce.onDestroy,me=ce.eventKey;Ce&&Ce(me),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),He.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ce,Ce){var me=this.getBaseProps();return S.createElement(Ht,Object(C.a)({},me,{id:this.internalMenuId,className:ce,style:Ce}),this.props.children)}},{key:"renderChildren",value:function(){var ce=this,Ce=this.getBaseProps(),me=Ce.mode,Ue=Ce.visible,Ve=Ce.forceSubMenuRender,st=Ce.direction,$e=this.getMotion(me,Ue);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ue||Ve,!this.haveOpened)return S.createElement("div",null);var yt=P()("".concat(Ce.prefixCls,"-sub"),Object(Y.a)({},"".concat(Ce.prefixCls,"-rtl"),st==="rtl"));return this.isInlineMode()?S.createElement(ue,Object(C.a)({visible:Ce.visible,forceRender:Ve},$e),function(Bt){var rn=Bt.className,cn=Bt.style,An=P()(yt,rn);return ce.renderPopupMenu(An,cn)}):this.renderPopupMenu(yt)}},{key:"render",value:function(){var ce,Ce,me,Ue=Object(F.a)({},this.props),Ve=this.getVisible(),st=this.getPrefixCls(),$e=this.isInlineMode(),yt=this.getMode(),Bt=P()(st,"".concat(st,"-").concat(yt),(ce={},Object(Y.a)(ce,Ue.className,!!Ue.className),Object(Y.a)(ce,this.getOpenClassName(),Ve),Object(Y.a)(ce,this.getActiveClassName(),Ue.active||Ve&&!$e),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"):(lt+=1,this.internalMenuId="$__$".concat(lt,"$Menu")));var rn={},cn={},An={};Ue.disabled||(rn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},cn={onClick:this.onTitleClick},An={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var zn={},cr=Ue.direction,hr=cr==="rtl";$e&&(hr?zn.paddingRight=Ue.inlineIndent*Ue.level:zn.paddingLeft=Ue.inlineIndent*Ue.level);var fn={};this.getVisible()&&(fn={"aria-owns":this.internalMenuId});var Ft=null;yt!=="horizontal"&&(Ft=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ft=S.createElement(this.props.expandIcon,Object(F.a)({},this.props))));var Xt=S.createElement("div",Object(C.a)({ref:this.saveSubMenuTitle,style:zn,className:"".concat(st,"-title"),role:"button"},An,cn,{"aria-expanded":Ve},fn,{"aria-haspopup":"true",title:typeof Ue.title=="string"?Ue.title:void 0}),Ue.title,Ft||S.createElement("i",{className:"".concat(st,"-arrow")})),In=this.renderChildren(),xn=((Ce=Ue.parentMenu)===null||Ce===void 0?void 0:Ce.isRootMenu)?Ue.parentMenu.props.getPopupContainer:function(Fr){return Fr.parentNode},er=tt[yt],wr=Ue.popupOffset?{offset:Ue.popupOffset}:{},Jn=P()((me={},Object(Y.a)(me,Ue.popupClassName,Ue.popupClassName&&!$e),Object(Y.a)(me,"".concat(st,"-rtl"),hr),me)),pn=Ue.disabled,Dn=Ue.triggerSubMenuAction,gr=Ue.subMenuOpenDelay,Sr=Ue.forceSubMenuRender,Xn=Ue.subMenuCloseDelay,Dr=Ue.builtinPlacements;ie.forEach(function(Fr){return delete Ue[Fr]}),delete Ue.onClick;var Qr=hr?Object(F.a)(Object(F.a)({},Xe),Dr):Object(F.a)(Object(F.a)({},Re),Dr);delete Ue.direction;var Pr=this.getBaseProps(),Hr=$e?null:this.getMotion(Pr.mode,Pr.visible);return S.createElement("li",Object(C.a)({},Ue,rn,{className:Bt,role:"menuitem"}),S.createElement(fr,{prefixCls:st,popupClassName:P()("".concat(st,"-popup"),Jn),getPopupContainer:xn,builtinPlacements:Qr,popupPlacement:er,popupVisible:$e?!1:Ve,popupAlign:wr,popup:$e?null:In,action:pn||$e?[]:[Dn],mouseEnterDelay:gr,mouseLeaveDelay:Xn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Sr,popupMotion:Hr},Xt),$e?In:null)}}]),at}(S.Component);mt.defaultProps={onMouseEnter:De,onMouseLeave:De,onTitleMouseEnter:De,onTitleMouseLeave:De,onTitleClick:De,manualRef:De,mode:"vertical",title:""};var Dt=Object(m.b)(function(Le,et){var at=Le.openKeys,je=Le.activeKey,ce=Le.selectedKeys,Ce=et.eventKey,me=et.subMenuKey;return{isOpen:at.indexOf(Ce)>-1,active:je[me]===Ce,selectedKeys:ce}})(mt);Dt.isSubMenu=!0;var it=Dt,Jt="menuitem-overflowed",Yt=.5,At=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=et.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=S.createRef(),je.getMenuItemNodes=function(){var ce=je.props.prefixCls,Ce=je.childRef.current;return Ce?[].slice.call(Ce.children).filter(function(me){return me.className.split(" ").indexOf("".concat(ce,"-overflowed-submenu"))<0}):[]},je.getOverflowedSubMenuItem=function(ce,Ce,me){var Ue=je.props,Ve=Ue.overflowedIndicator,st=Ue.level,$e=Ue.mode,yt=Ue.prefixCls,Bt=Ue.theme;if(st!==1||$e!=="horizontal")return null;var rn=je.props.children[0],cn=rn.props,An=cn.children,zn=cn.title,cr=cn.style,hr=Object(I.a)(cn,["children","title","style"]),fn=Object(F.a)({},cr),Ft="".concat(ce,"-overflowed-indicator"),Xt="".concat(ce,"-overflowed-indicator");Ce.length===0&&me!==!0?fn=Object(F.a)(Object(F.a)({},fn),{},{display:"none"}):me&&(fn=Object(F.a)(Object(F.a)({},fn),{},{visibility:"hidden",position:"absolute"}),Ft="".concat(Ft,"-placeholder"),Xt="".concat(Xt,"-placeholder"));var In=Bt?"".concat(yt,"-").concat(Bt):"",xn={};return ie.forEach(function(er){hr[er]!==void 0&&(xn[er]=hr[er])}),S.createElement(it,Object(C.a)({title:Ve,className:"".concat(yt,"-overflowed-submenu"),popupClassName:In},xn,{key:Ft,eventKey:Xt,disabled:!1,style:fn}),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 me=ce.children[Ce.length-1];we(me,"display","inline-block");var Ue=je.getMenuItemNodes(),Ve=Ue.filter(function(st){return st.className.split(" ").indexOf(Jt)>=0});Ve.forEach(function(st){we(st,"display","inline-block")}),je.menuItemSizes=Ue.map(function(st){return xe(st,!0)}),Ve.forEach(function(st){we(st,"display","none")}),je.overflowedIndicatorWidth=xe(ce.children[ce.children.length-1],!0),je.originalTotalWidth=je.menuItemSizes.reduce(function(st,$e){return st+$e},0),je.handleResize(),we(me,"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 me=0,Ue;je.originalTotalWidth>Ce+Yt&&(Ue=-1,je.menuItemSizes.forEach(function(Ve){me+=Ve,me+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 ot.default(function(me){me.forEach(function(){var Ue=ce.cancelFrameId;cancelAnimationFrame(Ue),ce.cancelFrameId=requestAnimationFrame(ce.setChildrenWidthAndResize)})}),[].slice.call(Ce.children).concat(Ce).forEach(function(me){ce.resizeObserver.observe(me)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ce.resizeObserver.disconnect(),[].slice.call(Ce.children).concat(Ce).forEach(function(me){ce.resizeObserver.observe(me)}),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,me=this.state.lastVisibleIndex;return(ce||[]).reduce(function(Ue,Ve,st){var $e=Ve;if(Ce.props.mode==="horizontal"){var yt=Ce.getOverflowedSubMenuItem(Ve.props.eventKey,[]);me!==void 0&&Ce.props.className.indexOf("".concat(Ce.props.prefixCls,"-root"))!==-1&&(st>me&&($e=S.cloneElement(Ve,{style:{display:"none"},eventKey:"".concat(Ve.props.eventKey,"-hidden"),className:"".concat(Jt)})),st===me+1&&(Ce.overflowedItems=ce.slice(me+1).map(function(rn){return S.cloneElement(rn,{key:rn.props.eventKey,mode:"vertical-left"})}),yt=Ce.getOverflowedSubMenuItem(Ve.props.eventKey,Ce.overflowedItems)));var Bt=[].concat(Object(b.a)(Ue),[yt,$e]);return st===ce.length-1&&Bt.push(Ce.getOverflowedSubMenuItem(Ve.props.eventKey,[],!0)),Bt}return[].concat(Object(b.a)(Ue),[$e])},[])}},{key:"render",value:function(){var ce=this.props,Ce=ce.visible,me=ce.prefixCls,Ue=ce.overflowedIndicator,Ve=ce.mode,st=ce.level,$e=ce.tag,yt=ce.children,Bt=ce.theme,rn=Object(I.a)(ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),cn=$e;return S.createElement(cn,Object(C.a)({ref:this.childRef},rn),this.renderChildren(yt))}}]),at}(S.Component);At.defaultProps={tag:"div",className:""};var qt=At;function Je(Le){return Le.length?Le.every(function(et){return!!et.props.disabled}):!0}function tn(Le,et,at){var je=Le.getState();Le.setState({activeKey:Object(F.a)(Object(F.a)({},je.activeKey),{},Object(Y.a)({},et,at))})}function Wt(Le){return Le.eventKey||"0-menu-"}function yn(Le,et){var at=et,je=Le.children,ce=Le.eventKey;if(at){var Ce;if(ke(je,function(me,Ue){me&&me.props&&!me.props.disabled&&at===rt(me,ce,Ue)&&(Ce=!0)}),Ce)return at}return at=null,Le.defaultActiveFirst&&ke(je,function(me,Ue){!at&&me&&!me.props.disabled&&(at=rt(me,ce,Ue))}),at}function Rn(Le){if(!Le)return;var et=this.instanceArray.indexOf(Le);et!==-1?this.instanceArray[et]=Le:this.instanceArray.push(Le)}var Pn=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(je){var ce;return Object(k.a)(this,at),ce=et.call(this,je),ce.onKeyDown=function(Ce,me){var Ue=Ce.keyCode,Ve;if(ce.getFlatInstanceArray().forEach(function($e){$e&&$e.props.active&&$e.onKeyDown&&(Ve=$e.onKeyDown(Ce))}),Ve)return 1;var st=null;return(Ue===c.a.UP||Ue===c.a.DOWN)&&(st=ce.step(Ue===c.a.UP?-1:1)),st?(Ce.preventDefault(),tn(ce.props.store,Wt(ce.props),st.props.eventKey),typeof me=="function"&&me(st),1):void 0},ce.onItemHover=function(Ce){var me=Ce.key,Ue=Ce.hover;tn(ce.props.store,Wt(ce.props),Ue?me: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 me=ce.getFlatInstanceArray(),Ue=ce.props.store.getState().activeKey[Wt(ce.props)],Ve=me.length;if(!Ve)return null;Ce<0&&(me=me.concat().reverse());var st=-1;if(me.every(function(rn,cn){return rn&&rn.props.eventKey===Ue?(st=cn,!1):!0}),!ce.props.defaultActiveFirst&&st!==-1&&Je(me.slice(st,Ve-1)))return;var $e=(st+1)%Ve,yt=$e;do{var Bt=me[yt];if(!Bt||Bt.props.disabled)yt=(yt+1)%Ve;else return Bt}while(yt!==$e);return null},ce.renderCommonMenuItem=function(Ce,me,Ue){var Ve=ce.props.store.getState(),st=Object(g.a)(ce),$e=st.props,yt=rt(Ce,$e.eventKey,me),Bt=Ce.props;if(!Bt||typeof Ce.type=="string")return Ce;var rn=yt===Ve.activeKey,cn=Object(F.a)(Object(F.a)({mode:Bt.mode||$e.mode,level:$e.level,inlineIndent:$e.inlineIndent,renderMenuItem:ce.renderMenuItem,rootPrefixCls:$e.prefixCls,index:me,parentMenu:$e.parentMenu,manualRef:Bt.disabled?void 0:Object(x.a)(Ce.ref,Rn.bind(Object(g.a)(ce))),eventKey:yt,active:!Bt.disabled&&rn,multiple:$e.multiple,onClick:function(zn){(Bt.onClick||De)(zn),ce.onClick(zn)},onItemHover:ce.onItemHover,motion:$e.motion,subMenuOpenDelay:$e.subMenuOpenDelay,subMenuCloseDelay:$e.subMenuCloseDelay,forceSubMenuRender:$e.forceSubMenuRender,onOpenChange:ce.onOpenChange,onDeselect:ce.onDeselect,onSelect:ce.onSelect,builtinPlacements:$e.builtinPlacements,itemIcon:Bt.itemIcon||ce.props.itemIcon,expandIcon:Bt.expandIcon||ce.props.expandIcon},Ue),{},{direction:$e.direction});return($e.mode==="inline"||Ke())&&(cn.triggerSubMenuAction="click"),S.cloneElement(Ce,Object(F.a)(Object(F.a)({},cn),{},{key:yt||me}))},ce.renderMenuItem=function(Ce,me,Ue){if(!Ce)return null;var Ve=ce.props.store.getState(),st={openKeys:Ve.openKeys,selectedKeys:Ve.selectedKeys,triggerSubMenuAction:ce.props.triggerSubMenuAction,subMenuKey:Ue};return ce.renderCommonMenuItem(Ce,me,st)},je.store.setState({activeKey:Object(F.a)(Object(F.a)({},je.store.getState().activeKey),{},Object(Y.a)({},je.eventKey,yn(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,me="activeKey"in Ce?Ce.activeKey:Ce.store.getState().activeKey[Wt(Ce)],Ue=yn(Ce,me);if(Ue!==me)tn(Ce.store,Wt(Ce),Ue);else if("activeKey"in ce){var Ve=yn(ce,ce.activeKey);Ue!==Ve&&tn(Ce.store,Wt(Ce),Ue)}}},{key:"render",value:function(){var ce=this,Ce=Object(C.a)({},this.props);this.instanceArray=[];var me=P()(Ce.prefixCls,Ce.className,"".concat(Ce.prefixCls,"-").concat(Ce.mode)),Ue={className:me,role:Ce.role||"menu"};Ce.id&&(Ue.id=Ce.id),Ce.focusable&&(Ue.tabIndex=0,Ue.onKeyDown=this.onKeyDown);var Ve=Ce.prefixCls,st=Ce.eventKey,$e=Ce.visible,yt=Ce.level,Bt=Ce.mode,rn=Ce.overflowedIndicator,cn=Ce.theme;return ie.forEach(function(An){return delete Ce[An]}),delete Ce.onClick,S.createElement(qt,Object(C.a)({},Ce,{prefixCls:Ve,mode:Bt,tag:"ul",level:yt,theme:cn,visible:$e,overflowedIndicator:rn},Ue),Object(y.a)(Ce.children).map(function(An,zn){return ce.renderMenuItem(An,zn,st||"0-menu-")}))}}]),at}(S.Component);Pn.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:De};var Mt=Object(m.b)()(Pn),Ht=Mt,Cn=L("Kwbf");function En(Le,et,at){var je=Le.prefixCls,ce=Le.motion,Ce=Le.defaultMotions,me=Ce===void 0?{}:Ce,Ue=Le.openAnimation,Ve=Le.openTransitionName,st=et.switchingModeFromInline;if(ce)return ce;if(Object(U.a)(Ue)==="object"&&Ue)Object(Cn.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(Ve)return{motionName:Ve};var $e=me[at];return $e||(st?null:me.other)}var wt=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(je){var ce;Object(k.a)(this,at),ce=et.call(this,je),ce.onSelect=function(Ue){var Ve=Object(g.a)(ce),st=Ve.props;if(st.selectable){var $e=ce.store.getState(),yt=$e.selectedKeys,Bt=Ue.key;st.multiple?yt=yt.concat([Bt]):yt=[Bt],"selectedKeys"in st||ce.store.setState({selectedKeys:yt}),st.onSelect(Object(F.a)(Object(F.a)({},Ue),{},{selectedKeys:yt}))}},ce.onClick=function(Ue){var Ve=ce.getRealMenuMode(),st=Object(g.a)(ce),$e=st.store,yt=st.props.onOpenChange;Ve!=="inline"&&!("openKeys"in ce.props)&&($e.setState({openKeys:[]}),yt([])),ce.props.onClick(Ue)},ce.onKeyDown=function(Ue,Ve){ce.innerMenu.getWrappedInstance().onKeyDown(Ue,Ve)},ce.onOpenChange=function(Ue){var Ve=Object(g.a)(ce),st=Ve.props,$e=ce.store.getState().openKeys.concat(),yt=!1,Bt=function(cn){var An=!1;if(cn.open)An=$e.indexOf(cn.key)===-1,An&&$e.push(cn.key);else{var zn=$e.indexOf(cn.key);An=zn!==-1,An&&$e.splice(zn,1)}yt=yt||An};Array.isArray(Ue)?Ue.forEach(Bt):Bt(Ue),yt&&("openKeys"in ce.props||ce.store.setState({openKeys:$e}),st.onOpenChange($e))},ce.onDeselect=function(Ue){var Ve=Object(g.a)(ce),st=Ve.props;if(st.selectable){var $e=ce.store.getState().selectedKeys.concat(),yt=Ue.key,Bt=$e.indexOf(yt);Bt!==-1&&$e.splice(Bt,1),"selectedKeys"in st||ce.store.setState({selectedKeys:$e}),st.onDeselect(Object(F.a)(Object(F.a)({},Ue),{},{selectedKeys:$e}))}},ce.onMouseEnter=function(Ue){ce.restoreModeVerticalFromInline();var Ve=ce.props.onMouseEnter;Ve&&Ve(Ue)},ce.onTransitionEnd=function(Ue){var Ve=Ue.propertyName==="width"&&Ue.target===Ue.currentTarget,st=Ue.target.className,$e=Object.prototype.toString.call(st)==="[object SVGAnimatedString]"?st.animVal:st,yt=Ue.propertyName==="font-size"&&$e.indexOf("anticon")>=0;(Ve||yt)&&ce.restoreModeVerticalFromInline()},ce.setInnerMenu=function(Ue){ce.innerMenu=Ue},ce.isRootMenu=!0;var Ce=je.defaultSelectedKeys,me=je.defaultOpenKeys;return"selectedKeys"in je&&(Ce=je.selectedKeys||[]),"openKeys"in je&&(me=je.openKeys||[]),ce.store=Object(m.c)({selectedKeys:Ce,openKeys:me,activeKey:{"0-menu-":yn(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,me=Ce.siderCollapsed,Ue=Ce.inlineCollapsed,Ve=Ce.onOpenChange;(!ce.inlineCollapsed&&Ue||!ce.siderCollapsed&&me)&&Ve([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ce=this.props.collapsedWidth,Ce=this.store,me=this.prevOpenKeys,Ue=this.getInlineCollapsed()&&(ce===0||ce==="0"||ce==="0px");Ue?(this.prevOpenKeys=Ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):me&&(this.store.setState({openKeys:me}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ce=this.props.mode,Ce=this.state.switchingModeFromInline,me=this.getInlineCollapsed();return Ce&&me?"inline":me?"vertical":ce}},{key:"getInlineCollapsed",value:function(){var ce=this.props,Ce=ce.inlineCollapsed,me=ce.siderCollapsed;return me!==void 0?me: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:En(this.props,this.state,Ce)}),delete ce.openAnimation,delete ce.openTransitionName,S.createElement(m.a,{store:this.store},S.createElement(Ht,Object(C.a)({},ce,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ce,Ce){var me=Ce.prevProps,Ue=Ce.store,Ve=Ue.getState(),st={},$e={prevProps:ce};return me.mode==="inline"&&ce.mode!=="inline"&&($e.switchingModeFromInline=!0),"openKeys"in ce?st.openKeys=ce.openKeys||[]:((ce.inlineCollapsed&&!me.inlineCollapsed||ce.siderCollapsed&&!me.siderCollapsed)&&($e.switchingModeFromInline=!0,$e.inlineOpenKeys=Ve.openKeys,st.openKeys=[]),(!ce.inlineCollapsed&&me.inlineCollapsed||!ce.siderCollapsed&&me.siderCollapsed)&&(st.openKeys=Ce.inlineOpenKeys,$e.inlineOpenKeys=[])),Object.keys(st).length&&Ue.setState(st),$e}}]),at}(S.Component);wt.defaultProps={selectable:!0,onClick:De,onSelect:De,onOpenChange:De,onDeselect:De,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:S.createElement("span",null,"\xB7\xB7\xB7")};var It=wt,kt=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=et.apply(this,arguments),je.onKeyDown=function(ce){var Ce=ce.keyCode;return Ce===c.a.ENTER?(je.onClick(ce),!0):void 0},je.onMouseLeave=function(ce){var Ce=je.props,me=Ce.eventKey,Ue=Ce.onItemHover,Ve=Ce.onMouseLeave;Ue({key:me,hover:!1}),Ve({key:me,domEvent:ce})},je.onMouseEnter=function(ce){var Ce=je.props,me=Ce.eventKey,Ue=Ce.onItemHover,Ve=Ce.onMouseEnter;Ue({key:me,hover:!0}),Ve({key:me,domEvent:ce})},je.onClick=function(ce){var Ce=je.props,me=Ce.eventKey,Ue=Ce.multiple,Ve=Ce.onClick,st=Ce.onSelect,$e=Ce.onDeselect,yt=Ce.isSelected,Bt={key:me,keyPath:[me],item:Object(g.a)(je),domEvent:ce};Ve(Bt),Ue?yt?$e(Bt):st(Bt):yt||st(Bt)},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),me=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:me,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 Ve={onClick:Ce.disabled?null:this.onClick,onMouseLeave:Ce.disabled?null:this.onMouseLeave,onMouseEnter:Ce.disabled?null:this.onMouseEnter},st=Object(F.a)({},Ce.style);Ce.mode==="inline"&&(Ce.direction==="rtl"?st.paddingRight=Ce.inlineIndent*Ce.level:st.paddingLeft=Ce.inlineIndent*Ce.level),ie.forEach(function(yt){return delete Ce[yt]}),delete Ce.direction;var $e=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&($e=S.createElement(this.props.itemIcon,this.props)),S.createElement("li",Object(C.a)({},Object(_.a)(Ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ue,Ve,{style:st,ref:this.saveNode}),Ce.children,$e)}}]),at}(S.Component);kt.isMenuItem=!0,kt.defaultProps={onSelect:De,onMouseEnter:De,onMouseLeave:De,manualRef:De};var Ct=Object(m.b)(function(Le,et){var at=Le.activeKey,je=Le.selectedKeys,ce=et.eventKey,Ce=et.subMenuKey;return{active:at[Ce]===ce,isSelected:Array.isArray(je)?je.indexOf(ce)!==-1:je===ce}})(kt),bt=Ct,Tn=function(Le){Object(h.a)(at,Le);var et=Object(p.a)(at);function at(){var je;return Object(k.a)(this,at),je=et.apply(this,arguments),je.renderInnerMenuItem=function(ce){var Ce=je.props,me=Ce.renderMenuItem,Ue=Ce.index;return me(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,me=Ce===void 0?"":Ce,Ue=ce.rootPrefixCls,Ve="".concat(Ue,"-item-group-title"),st="".concat(Ue,"-item-group-list"),$e=ce.title,yt=ce.children;return ie.forEach(function(Bt){return delete ce[Bt]}),delete ce.direction,S.createElement("li",Object(C.a)({},ce,{onClick:function(rn){return rn.stopPropagation()},className:"".concat(me," ").concat(Ue,"-item-group")}),S.createElement("div",{className:Ve,title:typeof $e=="string"?$e:void 0},$e),S.createElement("ul",{className:st},S.Children.map(yt,this.renderInnerMenuItem)))}}]),at}(S.Component);Tn.isMenuItemGroup=!0,Tn.defaultProps={disabled:!0};var Zt=Tn,Sn=function(et){var at=et.className,je=et.rootPrefixCls,ce=et.style;return S.createElement("li",{className:"".concat(at," ").concat(je,"-item-divider"),style:ce})};Sn.defaultProps={disabled:!0,className:"",style:{}};var dn=Sn,Vt=It,wn=L("eDIo");function Gn(Le,et){var at=Le.prefixCls,je=Le.editable,ce=Le.locale,Ce=Le.style;return!je||je.showAdd===!1?null:S.createElement("button",{ref:et,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 yr=S.forwardRef(Gn);function Wn(Le,et){var at=Le.prefixCls,je=Le.id,ce=Le.tabs,Ce=Le.locale,me=Le.mobile,Ue=Le.moreIcon,Ve=Ue===void 0?"More":Ue,st=Le.moreTransitionName,$e=Le.style,yt=Le.className,Bt=Le.editable,rn=Le.tabBarGutter,cn=Le.rtl,An=Le.onTabClick,zn=Object(S.useState)(!1),cr=Object(B.a)(zn,2),hr=cr[0],fn=cr[1],Ft=Object(S.useState)(null),Xt=Object(B.a)(Ft,2),In=Xt[0],xn=Xt[1],er="".concat(je,"-more-popup"),wr="".concat(at,"-dropdown"),Jn=In!==null?"".concat(er,"-").concat(In):null,pn=Ce==null?void 0:Ce.dropdownAriaLabel,Dn=S.createElement(Vt,{onClick:function(Hr){var Fr=Hr.key,Ur=Hr.domEvent;An(Fr,Ur),fn(!1)},id:er,tabIndex:-1,role:"listbox","aria-activedescendant":Jn,selectedKeys:[In],"aria-label":pn!==void 0?pn:"expanded dropdown"},ce.map(function(Pr){return S.createElement(bt,{key:Pr.key,id:"".concat(er,"-").concat(Pr.key),role:"option","aria-controls":je&&"".concat(je,"-panel-").concat(Pr.key),disabled:Pr.disabled},Pr.tab)}));function gr(Pr){for(var Hr=ce.filter(function(da){return!da.disabled}),Fr=Hr.findIndex(function(da){return da.key===In})||0,Ur=Hr.length,Nr=0;Nr<Ur;Nr+=1){Fr=(Fr+Pr+Ur)%Ur;var pr=Hr[Fr];if(!pr.disabled){xn(pr.key);return}}}function Sr(Pr){var Hr=Pr.which;if(!hr){[c.a.DOWN,c.a.SPACE,c.a.ENTER].includes(Hr)&&(fn(!0),Pr.preventDefault());return}switch(Hr){case c.a.UP:gr(-1),Pr.preventDefault();break;case c.a.DOWN:gr(1),Pr.preventDefault();break;case c.a.ESC:fn(!1);break;case c.a.SPACE:case c.a.ENTER:In!==null&&An(In,Pr);break}}Object(S.useEffect)(function(){var Pr=document.getElementById(Jn);Pr&&Pr.scrollIntoView&&Pr.scrollIntoView(!1)},[In]),Object(S.useEffect)(function(){hr||xn(null)},[hr]);var Xn=Object(Y.a)({},cn?"marginLeft":"marginRight",rn);ce.length||(Xn.visibility="hidden",Xn.order=1);var Dr=P()(Object(Y.a)({},"".concat(wr,"-rtl"),cn)),Qr=me?null:S.createElement(wn.a,{prefixCls:wr,overlay:Dn,trigger:["hover"],visible:hr,transitionName:st,onVisibleChange:fn,overlayClassName:Dr,mouseEnterDelay:.1,mouseLeaveDelay:.1},S.createElement("button",{type:"button",className:"".concat(at,"-nav-more"),style:Xn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":er,id:"".concat(je,"-more"),"aria-expanded":hr,onKeyDown:Sr},Ve));return S.createElement("div",{className:P()("".concat(at,"-nav-operations"),yt),style:$e,ref:et},Qr,S.createElement(yr,{prefixCls:at,locale:Ce,editable:Bt}))}var kr=S.forwardRef(Wn),Yr=Object(S.createContext)(null),Bn=.1,Vn=.01,qn=20,Rr=Math.pow(.995,qn);function jr(){var Le=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(Le)||/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(Le.substr(0,4)))}function $r(Le,et){var at=Object(S.useState)(),je=Object(B.a)(at,2),ce=je[0],Ce=je[1],me=Object(S.useState)(0),Ue=Object(B.a)(me,2),Ve=Ue[0],st=Ue[1],$e=Object(S.useState)(0),yt=Object(B.a)($e,2),Bt=yt[0],rn=yt[1],cn=Object(S.useState)(),An=Object(B.a)(cn,2),zn=An[0],cr=An[1],hr=Object(S.useRef)();function fn(pn){var Dn=pn.touches[0],gr=Dn.screenX,Sr=Dn.screenY;Ce({x:gr,y:Sr}),window.clearInterval(hr.current)}function Ft(pn){if(!ce)return;pn.preventDefault();var Dn=pn.touches[0],gr=Dn.screenX,Sr=Dn.screenY;Ce({x:gr,y:Sr});var Xn=gr-ce.x,Dr=Sr-ce.y;et(Xn,Dr);var Qr=Date.now();st(Qr),rn(Qr-Ve),cr({x:Xn,y:Dr})}function Xt(){if(!ce)return;if(Ce(null),cr(null),zn){var pn=zn.x/Bt,Dn=zn.y/Bt,gr=Math.abs(pn),Sr=Math.abs(Dn);if(Math.max(gr,Sr)<Bn)return;var Xn=pn,Dr=Dn;hr.current=window.setInterval(function(){if(Math.abs(Xn)<Vn&&Math.abs(Dr)<Vn){window.clearInterval(hr.current);return}Xn*=Rr,Dr*=Rr,et(Xn*qn,Dr*qn)},qn)}}var In=Object(S.useRef)(0),xn=Object(S.useRef)(!1),er=Object(S.useRef)();function wr(pn){var Dn=pn.deltaX,gr=pn.deltaY,Sr=0,Xn=Math.abs(Dn),Dr=Math.abs(gr);Xn===Dr?Sr=er.current==="x"?Dn:gr:Xn>Dr?(Sr=Dn,er.current="x"):(Sr=gr,er.current="y");var Qr=Date.now();Qr-In.current>100&&(xn.current=!1),(et(-Sr,-Sr)||xn.current)&&(pn.preventDefault(),xn.current=!0),In.current=Qr}var Jn=Object(S.useRef)(null);Jn.current={onTouchStart:fn,onTouchMove:Ft,onTouchEnd:Xt,onWheel:wr},S.useEffect(function(){function pn(Xn){Jn.current.onTouchStart(Xn)}function Dn(Xn){Jn.current.onTouchMove(Xn)}function gr(Xn){Jn.current.onTouchEnd(Xn)}function Sr(Xn){Jn.current.onWheel(Xn)}return document.addEventListener("touchmove",Dn,{passive:!1}),document.addEventListener("touchend",gr,{passive:!1}),Le.current.addEventListener("touchstart",pn,{passive:!1}),Le.current.addEventListener("wheel",Sr),function(){document.removeEventListener("touchmove",Dn),document.removeEventListener("touchend",gr)}},[])}function pa(){var Le=Object(S.useRef)(new Map);function et(je){return Le.current.has(je)||Le.current.set(je,S.createRef()),Le.current.get(je)}function at(je){Le.current.delete(je)}return[et,at]}function ma(Le,et){var at=S.useRef(Le),je=S.useState({}),ce=Object(B.a)(je,2),Ce=ce[1];function me(Ue){var Ve=typeof Ue=="function"?Ue(at.current):Ue;Ve!==at.current&&et(Ve,at.current),at.current=Ve,Ce({})}return[at.current,me]}var ya=function(et){var at=et.position,je=et.prefixCls,ce=et.extra;if(!ce)return null;var Ce,me=ce;return at==="right"&&(Ce=me.right||!me.left&&me||null),at==="left"&&(Ce=me.left||null),Ce?S.createElement("div",{className:"".concat(je,"-extra-content")},Ce):null};function Va(Le,et){var at,je=S.useContext(Yr),ce=je.prefixCls,Ce=je.tabs,me=Le.className,Ue=Le.style,Ve=Le.id,st=Le.animated,$e=Le.activeKey,yt=Le.rtl,Bt=Le.extra,rn=Le.editable,cn=Le.locale,An=Le.tabPosition,zn=Le.tabBarGutter,cr=Le.children,hr=Le.onTabClick,fn=Le.onTabScroll,Ft=Object(S.useRef)(),Xt=Object(S.useRef)(),In=Object(S.useRef)(),xn=Object(S.useRef)(),er=pa(),wr=Object(B.a)(er,2),Jn=wr[0],pn=wr[1],Dn=An==="top"||An==="bottom",gr=ma(0,function(Wr,Mr){Dn&&fn&&fn({direction:Wr>Mr?"left":"right"})}),Sr=Object(B.a)(gr,2),Xn=Sr[0],Dr=Sr[1],Qr=ma(0,function(Wr,Mr){!Dn&&fn&&fn({direction:Wr>Mr?"top":"bottom"})}),Pr=Object(B.a)(Qr,2),Hr=Pr[0],Fr=Pr[1],Ur=Object(S.useState)(0),Nr=Object(B.a)(Ur,2),pr=Nr[0],da=Nr[1],Qa=Object(S.useState)(0),Na=Object(B.a)(Qa,2),wa=Na[0],ea=Na[1],Gr=Object(S.useState)(0),Xr=Object(B.a)(Gr,2),ta=Xr[0],ja=Xr[1],hi=Object(S.useState)(0),si=Object(B.a)(hi,2),Vr=si[0],Ja=si[1],Za=Object(S.useState)(null),Jr=Object(B.a)(Za,2),zr=Jr[0],ba=Jr[1],Pi=Object(S.useState)(null),no=Object(B.a)(Pi,2),li=no[0],Ci=no[1],Ti=Object(S.useState)(0),Si=Object(B.a)(Ti,2),Ii=Si[0],co=Si[1],Ro=Object(S.useState)(0),Gi=Object(B.a)(Ro,2),Oi=Gi[0],Vi=Gi[1],yi=o(new Map),Ri=Object(B.a)(yi,2),ho=Ri[0],Yi=Ri[1],Ai=d(Ce,ho,pr),Di="".concat(ce,"-nav-operations-hidden"),bi=0,Ia=0;Dn?yt?(bi=0,Ia=Math.max(0,pr-zr)):(bi=Math.min(0,zr-pr),Ia=0):(bi=Math.min(0,li-wa),Ia=0);function fi(Wr){return Wr<bi?[bi,!1]:Wr>Ia?[Ia,!1]:[Wr,!0]}var pi=Object(S.useRef)(),_i=Object(S.useState)(),mi=Object(B.a)(_i,2),Xi=mi[0],$i=mi[1];function Qi(){$i(Date.now())}function ki(){window.clearTimeout(pi.current)}$r(Ft,function(Wr,Mr){var la=!1;function Ua(Mi,di){Mi(function(Ui){var ci=fi(Ui+di),_a=Object(B.a)(ci,2),Fi=_a[0],Bi=_a[1];return la=Bi,Fi})}if(Dn){if(zr>=pr)return la;Ua(Dr,Wr)}else{if(li>=wa)return la;Ua(Fr,Mr)}return ki(),Qi(),la}),Object(S.useEffect)(function(){return ki(),Xi&&(pi.current=window.setTimeout(function(){$i(0)},100)),ki},[Xi]);function ui(){var Wr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$e,Mr=Ai.get(Wr);if(!Mr)return;if(Dn){var la=Xn;yt?Mr.right<Xn?la=Mr.right:Mr.right+Mr.width>Xn+zr&&(la=Mr.right+Mr.width-zr):Mr.left<-Xn?la=-Mr.left:Mr.left+Mr.width>-Xn+zr&&(la=-(Mr.left+Mr.width-zr)),Fr(0),Dr(fi(la)[0])}else{var Ua=Hr;Mr.top<-Hr?Ua=-Mr.top:Mr.top+Mr.height>-Hr+li&&(Ua=-(Mr.top+Mr.height-li)),Dr(0),Fr(fi(Ua)[0])}}var Ei=A(Ai,{width:zr,height:li,left:Xn,top:Hr},{width:ta,height:Vr},{width:Ii,height:Oi},Object(F.a)(Object(F.a)({},Le),{},{tabs:Ce})),ro=Object(B.a)(Ei,2),Ao=ro[0],Do=ro[1],fo=Ce.map(function(Wr){var Mr=Wr.key;return S.createElement(n,{id:Ve,prefixCls:ce,key:Mr,rtl:yt,tab:Wr,closable:Wr.closable,editable:rn,active:Mr===$e,tabPosition:An,tabBarGutter:zn,renderWrapper:cr,removeAriaLabel:cn==null?void 0:cn.removeAriaLabel,ref:Jn(Mr),onClick:function(Ua){hr(Mr,Ua)},onRemove:function(){pn(Mr)},onFocus:function(){ui(Mr),Qi(),yt||(Ft.current.scrollLeft=0),Ft.current.scrollTop=0}})}),ao=a(function(){var Wr,Mr,la,Ua,Mi,di,Ui,ci,_a,Fi=((Wr=Ft.current)===null||Wr===void 0?void 0:Wr.offsetWidth)||0,Bi=((Mr=Ft.current)===null||Mr===void 0?void 0:Mr.offsetHeight)||0,Hi=((la=xn.current)===null||la===void 0?void 0:la.offsetWidth)||0,Wa=((Ua=xn.current)===null||Ua===void 0?void 0:Ua.offsetHeight)||0,Br=((Mi=In.current)===null||Mi===void 0?void 0:Mi.offsetWidth)||0,_r=((di=In.current)===null||di===void 0?void 0:di.offsetHeight)||0;ba(Fi),Ci(Bi),co(Hi),Vi(Wa);var Fn=(((Ui=Xt.current)===null||Ui===void 0?void 0:Ui.offsetWidth)||0)-Hi,ur=(((ci=Xt.current)===null||ci===void 0?void 0:ci.offsetHeight)||0)-Wa;da(Fn),ea(ur);var Ar=(_a=In.current)===null||_a===void 0?void 0:_a.className.includes(Di);ja(Fn-(Ar?0:Br)),Ja(ur-(Ar?0:_r)),Yi(function(){var oa=new Map;return Ce.forEach(function(vi){var ai=vi.key,Ra=Jn(ai).current;Ra&&oa.set(ai,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),oa})}),po=Ce.slice(0,Ao),Ha=Ce.slice(Do+1),ca=[].concat(Object(b.a)(po),Object(b.a)(Ha)),Oa=Object(S.useState)(),ha=Object(B.a)(Oa,2),Ni=ha[0],mo=ha[1],qa=Ai.get($e),io=Object(S.useRef)();function oo(){u.a.cancel(io.current)}Object(S.useEffect)(function(){var Wr={};return qa&&(Dn?(yt?Wr.right=qa.right:Wr.left=qa.left,Wr.width=qa.width):(Wr.top=qa.top,Wr.height=qa.height)),oo(),io.current=u()(function(){mo(Wr)}),oo},[qa,Dn,yt]),Object(S.useEffect)(function(){ui()},[$e,qa,Ai,Dn]),Object(S.useEffect)(function(){ao()},[yt,zn,$e,Ce.map(function(Wr){return Wr.key}).join("_")]);var so=!!ca.length,xi="".concat(ce,"-nav-wrap"),Ji,ji,vo,Zi;return Dn?yt?(ji=Xn>0,Ji=Xn+zr<pr):(Ji=Xn<0,ji=-Xn+zr<pr):(vo=Hr<0,Zi=-Hr+li<wa),S.createElement("div",{ref:et,role:"tablist",className:P()("".concat(ce,"-nav"),me),style:Ue,onKeyDown:function(){Qi()}},S.createElement(ya,{position:"left",extra:Bt,prefixCls:ce}),S.createElement(f.a,{onResize:ao},S.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"),vo),Object(Y.a)(at,"".concat(xi,"-ping-bottom"),Zi),at)),ref:Ft},S.createElement(f.a,{onResize:ao},S.createElement("div",{ref:Xt,className:"".concat(ce,"-nav-list"),style:{transform:"translate(".concat(Xn,"px, ").concat(Hr,"px)"),transition:Xi?"none":void 0}},fo,S.createElement(yr,{ref:xn,prefixCls:ce,locale:cn,editable:rn,style:{visibility:so?"hidden":null}}),S.createElement("div",{className:P()("".concat(ce,"-ink-bar"),Object(Y.a)({},"".concat(ce,"-ink-bar-animated"),st.inkBar)),style:Ni}))))),S.createElement(kr,Object.assign({},Le,{ref:In,prefixCls:ce,tabs:ca,className:!so&&Di})),S.createElement(ya,{position:"right",extra:Bt,prefixCls:ce}))}var Ma=S.forwardRef(Va);function $a(Le){var et=Le.id,at=Le.activeKey,je=Le.animated,ce=Le.tabPosition,Ce=Le.rtl,me=Le.destroyInactiveTabPane,Ue=S.useContext(Yr),Ve=Ue.prefixCls,st=Ue.tabs,$e=je.tabPane,yt=st.findIndex(function(Bt){return Bt.key===at});return S.createElement("div",{className:P()("".concat(Ve,"-content-holder"))},S.createElement("div",{className:P()("".concat(Ve,"-content"),"".concat(Ve,"-content-").concat(ce),Object(Y.a)({},"".concat(Ve,"-content-animated"),$e)),style:yt&&$e?Object(Y.a)({},Ce?"marginRight":"marginLeft","-".concat(yt,"00%")):null},st.map(function(Bt){return S.cloneElement(Bt.node,{key:Bt.key,prefixCls:Ve,tabKey:Bt.key,id:et,animated:$e,active:Bt.key===at,destroyInactiveTabPane:me})})))}function aa(Le){var et=Le.prefixCls,at=Le.forceRender,je=Le.className,ce=Le.style,Ce=Le.id,me=Le.active,Ue=Le.animated,Ve=Le.destroyInactiveTabPane,st=Le.tabKey,$e=Le.children,yt=S.useState(at),Bt=Object(B.a)(yt,2),rn=Bt[0],cn=Bt[1];S.useEffect(function(){me?cn(!0):Ve&&cn(!1)},[me,Ve]);var An={};return me||(Ue?(An.visibility="hidden",An.height=0,An.overflowY="hidden"):An.display="none"),S.createElement("div",{id:Ce&&"".concat(Ce,"-panel-").concat(st),role:"tabpanel",tabIndex:me?0:-1,"aria-labelledby":Ce&&"".concat(Ce,"-tab-").concat(st),"aria-hidden":!me,style:Object(F.a)(Object(F.a)({},An),ce),className:P()("".concat(et,"-tabpane"),me&&"".concat(et,"-tabpane-active"),je)},(me||rn||at)&&$e)}var La=0;function oi(Le){return Object(y.a)(Le).map(function(et){if(S.isValidElement(et)){var at=et.key!==void 0?String(et.key):void 0;return Object(F.a)(Object(F.a)({key:at},et.props),{},{node:et})}return null}).filter(function(et){return et})}function Pa(Le,et){var at,je=Le.id,ce=Le.prefixCls,Ce=ce===void 0?"rc-tabs":ce,me=Le.className,Ue=Le.children,Ve=Le.direction,st=Le.activeKey,$e=Le.defaultActiveKey,yt=Le.editable,Bt=Le.animated,rn=Le.tabPosition,cn=rn===void 0?"top":rn,An=Le.tabBarGutter,zn=Le.tabBarStyle,cr=Le.tabBarExtraContent,hr=Le.locale,fn=Le.moreIcon,Ft=Le.moreTransitionName,Xt=Le.destroyInactiveTabPane,In=Le.renderTabBar,xn=Le.onChange,er=Le.onTabClick,wr=Le.onTabScroll,Jn=Object(I.a)(Le,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),pn=oi(Ue),Dn=Ve==="rtl",gr;Bt===!1?gr={inkBar:!1,tabPane:!1}:gr=Object(F.a)({inkBar:!0,tabPane:!1},Bt!==!0?Bt:null);var Sr=Object(S.useState)(!1),Xn=Object(B.a)(Sr,2),Dr=Xn[0],Qr=Xn[1];Object(S.useEffect)(function(){Qr(jr())},[]);var Pr=Object(t.a)(function(){var Vr;return(Vr=pn[0])===null||Vr===void 0?void 0:Vr.key},{value:st,defaultValue:$e}),Hr=Object(B.a)(Pr,2),Fr=Hr[0],Ur=Hr[1],Nr=Object(S.useState)(function(){return pn.findIndex(function(Vr){return Vr.key===Fr})}),pr=Object(B.a)(Nr,2),da=pr[0],Qa=pr[1];Object(S.useEffect)(function(){var Vr=pn.findIndex(function(Za){return Za.key===Fr});if(Vr===-1){var Ja;Vr=Math.max(0,Math.min(da,pn.length-1)),Ur((Ja=pn[Vr])===null||Ja===void 0?void 0:Ja.key)}Qa(Vr)},[pn.map(function(Vr){return Vr.key}).join("_"),Fr,da]);var Na=Object(t.a)(null,{value:je}),wa=Object(B.a)(Na,2),ea=wa[0],Gr=wa[1],Xr=cn;Dr&&!["left","right"].includes(cn)&&(Xr="top"),Object(S.useEffect)(function(){je||(Gr("rc-tabs-".concat(La)),La+=1)},[]);function ta(Vr,Ja){er==null||er(Vr,Ja),Ur(Vr),xn==null||xn(Vr)}var ja={id:ea,activeKey:Fr,animated:gr,tabPosition:Xr,rtl:Dn,mobile:Dr},hi,si=Object(F.a)(Object(F.a)({},ja),{},{editable:yt,locale:hr,moreIcon:fn,moreTransitionName:Ft,tabBarGutter:An,onTabClick:ta,onTabScroll:wr,extra:cr,style:zn,panes:Ue});return In?hi=In(si,Ma):hi=S.createElement(Ma,Object.assign({},si)),S.createElement(Yr.Provider,{value:{tabs:pn,prefixCls:Ce}},S.createElement("div",Object.assign({ref:et,id:je,className:P()(Ce,"".concat(Ce,"-").concat(Xr),(at={},Object(Y.a)(at,"".concat(Ce,"-mobile"),Dr),Object(Y.a)(at,"".concat(Ce,"-editable"),yt),Object(Y.a)(at,"".concat(Ce,"-rtl"),Dn),at),me)},Jn),hi,S.createElement($a,Object.assign({destroyInactiveTabPane:Xt},ja,{animated:gr}))))}var qr=S.forwardRef(Pa);qr.TabPane=aa;var xa=qr,Sa=J.b=xa},kSUc:function(We,J,L){},lO7E:function(We,J,L){We.exports=L.p+"static/zwt.3af2a320.png"},lZu9:function(We,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"),S=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 y in P)P.hasOwnProperty(y)&&I.tokenTypeOverrides[y]&&(P[y]=I.tokenTypeOverrides[y]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,b=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,u=I.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,a=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,c=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function s(H,M,V){return M.f=M.inline=V,V(H,M)}function d(H,M,V){return M.f=M.block=V,V(H,M)}function E(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=S;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=E(M.prevLine.stream),$=M.indentedCode,Z=M.prevLine.hr,ve=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,ve)){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&&(!ve||!$)&&!M.prevLine.fencedCodeEnd,Pe=(M.list===!1||Z||K)&&M.indentation<=oe&&H.match(t),ge=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&&(ge=H.match(u))&&ge[1].length<=6)return M.quote=0,M.header=ge[1].length,M.thisLine.header=!0,I.highlightFormatting&&(M.formatting="header"),M.f=M.inline,g(M);if(M.indentation<=oe&&H.eat(">"))return M.quote=V?1:M.quote+1,I.highlightFormatting&&(M.formatting="quote"),H.eatSpace(),g(M);if(!Pe&&!M.setext&&V&&M.indentation<=oe&&(ge=H.match(b))){var de=ge[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(i,!1)&&(M.taskList=!0),M.f=M.inline,I.highlightFormatting&&(M.formatting=["list","list-"+de]),g(M)}else{if(V&&M.indentation<=oe&&(ge=H.match(o,!0)))return M.quote=0,M.fencedEndRE=new RegExp(ge[1]+"+ *$"),M.localMode=I.fencedCodeBlockHighlighting&&R(ge[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,g(M);if(M.setext||(!ye||!ve)&&!M.quote&&M.list===!1&&!M.code&&!Pe&&!c.test(H.string)&&(ge=H.lookAhead(1))&&(ge=ge.match(f)))return M.setext?(M.header=M.setext,M.setext=0,H.skipToEnd(),I.highlightFormatting&&(M.formatting="header")):(M.header=ge[0].charAt(0)=="="?1:2,M.setext=M.header),M.thisLine.header=!0,M.f=M.inline,g(M);if(Pe)return H.skipToEnd(),M.hr=!0,M.thisLine.hr=!0,P.hr;if(H.peek()==="[")return s(H,M,j)}return s(H,M,M.inline)}function k(H,M){var V=F.token(H,M.htmlState);if(!S){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=g(M)),M.localMode=M.localState=null,M.block=C,M.f=p,M.fencedEndRE=null,M.code=0,M.thisLine.fencedCodeEnd=!0,K?d(H,M,M.block):Z}else return M.localMode?M.localMode.token(H,M.localState):(H.skipToEnd(),P.code)}function g(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)?g(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,g(M);if(M.taskList){var K=H.match(i,!0)[1]===" ";return K?M.taskOpen=!0:M.taskClosed=!0,I.highlightFormatting&&(M.formatting="task"),M.taskList=!1,g(M)}if(M.taskOpen=!1,M.taskClosed=!1,M.header&&H.match(/^#+$/,!0))return I.highlightFormatting&&(M.formatting="header"),g(M);var $=H.next();if(M.linkTitle){M.linkTitle=!1;var Z=$;$==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ve="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(H.match(new RegExp(ve),!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,g(M);if(fe==M.code){var ye=g(M);return M.code=0,ye}else return M.formatting=oe,g(M)}else if(M.code)return g(M);if($==="\\"&&(H.next(),I.highlightFormatting)){var Pe=g(M),ge=P.formatting+"-escape";return Pe?Pe+" "+ge:ge}if($==="!"&&H.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return M.imageMarker=!0,M.image=!0,I.highlightFormatting&&(M.formatting="image"),g(M);if($==="["&&M.imageMarker&&H.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return M.imageMarker=!1,M.imageAltText=!0,I.highlightFormatting&&(M.formatting="image"),g(M);if($==="]"&&M.imageAltText){I.highlightFormatting&&(M.formatting="image");var Pe=g(M);return M.imageAltText=!1,M.image=!1,M.inline=M.f=_,Pe}if($==="["&&!M.image)return M.linkText&&H.match(/^.*?\]/)||(M.linkText=!0,I.highlightFormatting&&(M.formatting="link")),g(M);if($==="]"&&M.linkText){I.highlightFormatting&&(M.formatting="link");var Pe=g(M);return M.linkText=!1,M.inline=M.f=H.match(/\(.*?\)| ?\[.*?\]/,!1)?_:p,Pe}if($==="<"&&H.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=m,I.highlightFormatting&&(M.formatting="link");var Pe=g(M);return Pe?Pe+=" ":Pe="",Pe+P.linkInline}if($==="<"&&H.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){M.f=M.inline=m,I.highlightFormatting&&(M.formatting="link");var Pe=g(M);return Pe?Pe+=" ":Pe="",Pe+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 Qe=H.string.substring(H.start,de);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Qe)&&(M.md_inside=!0)}return H.backUp(1),M.htmlState=Y.startState(F),d(H,M,k)}if(I.xml&&$==="<"&&H.match(/^\/\w*?>/))return M.md_inside=!1,"tag";if($==="*"||$==="_"){for(var St=1,Ee=H.pos==1?" ":H.string.charAt(H.pos-2);St<3&&H.eat($);)St++;var De=H.peek()||" ",rt=!/\s/.test(De)&&(!l.test(De)||/\s/.test(Ee)||l.test(Ee)),Be=!/\s/.test(Ee)&&(!l.test(Ee)||/\s/.test(De)||l.test(De)),ke=null,ut=null;if(St%2&&(!M.em&&rt&&($==="*"||!Be||l.test(Ee))?ke=!0:M.em==$&&Be&&($==="*"||!rt||l.test(De))&&(ke=!1)),St>1&&(!M.strong&&rt&&($==="*"||!Be||l.test(Ee))?ut=!0:M.strong==$&&Be&&($==="*"||!rt||l.test(De))&&(ut=!1)),ut!=null||ke!=null){I.highlightFormatting&&(M.formatting=ke==null?"strong":ut==null?"em":"strong em"),ke===!0&&(M.em=$),ut===!0&&(M.strong=$);var ye=g(M);return ke===!1&&(M.em=!1),ut===!1&&(M.strong=!1),ye}}else if($===" "&&(H.eat("*")||H.eat("_"))){if(H.peek()===" ")return g(M);H.backUp(1)}if(I.strikethrough){if($==="~"&&H.eatWhile($)){if(M.strikethrough){I.highlightFormatting&&(M.formatting="strikethrough");var ye=g(M);return M.strikethrough=!1,ye}else if(H.match(/^[^\s]/,!1))return M.strikethrough=!0,I.highlightFormatting&&(M.formatting="strikethrough"),g(M)}else if($===" "&&H.match(/^~~/,!0)){if(H.peek()===" ")return g(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=g(M);return M.emoji=!1,ie}return $===" "&&(H.match(/^ +$/,!1)?M.trailingSpace++:M.trailingSpace&&(M.trailingSpaceNewLine=!0)),g(M)}function m(H,M){var V=H.next();if(V===">"){M.f=M.inline=p,I.highlightFormatting&&(M.formatting="link");var K=g(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=v(V==="("?")":"]"),I.highlightFormatting&&(M.formatting="link-string"),M.linkHref=!0,g(M)):"error"}var x={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(H){return function(M,V){var K=M.next();if(K===H){V.f=V.inline=p,I.highlightFormatting&&(V.formatting="link-string");var $=g(V);return V.linkHref=!1,$}return M.match(x[H]),V.linkHref=!0,g(V)}}function j(H,M){return H.match(/^([^\]\\]|\\.)*\]:/,!1)?(M.f=U,H.next(),I.highlightFormatting&&(M.formatting="link"),M.linkText=!0,g(M)):s(H,M,p)}function U(H,M){if(H.match(/^\]:/,!0)){M.f=M.inline=T,I.highlightFormatting&&(M.formatting="link");var V=g(M);return M.linkText=!1,V}return H.match(/^([^\]\\]|\\.)+/,!0),P.linkText}function T(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:g,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),Y.defineMIME("text/markdown","markdown"),Y.defineMIME("text/x-markdown","markdown")})},loD1:function(We,J){function L(Y,B,I,F,S,R,P){if(S===0)return!1;var y=S,t=0,b=Y;if(P>B+y&&P>F+y||P<B-y&&P<F-y||R>Y+y&&R>I+y||R<Y-y&&R<I-y)return!1;if(Y!==I)t=(B-F)/(Y-I),b=(Y*F-I*B)/(Y-I);else return Math.abs(R-Y)<=y/2;var i=t*R-P+b,u=i*i/(t*t+1);return u<=y/2*y/2}J.containStroke=L},mFDi:function(We,J,L){var Y=L("QBsz"),B=L("Fofx"),I=Y.applyTransform,F=Math.min,S=Math.max;function R(y,t,b,i){b<0&&(y=y+b,b=-b),i<0&&(t=t+i,i=-i),this.x=y,this.y=t,this.width=b,this.height=i}R.prototype={constructor:R,union:function(y){var t=F(y.x,this.x),b=F(y.y,this.y);this.width=S(y.x+y.width,this.x+this.width)-t,this.height=S(y.y+y.height,this.y+this.height)-b,this.x=t,this.y=b},applyTransform:function(){var y=[],t=[],b=[],i=[];return function(u){if(!u)return;y[0]=b[0]=this.x,y[1]=i[1]=this.y,t[0]=i[0]=this.x+this.width,t[1]=b[1]=this.y+this.height,I(y,y,u),I(t,t,u),I(b,b,u),I(i,i,u),this.x=F(y[0],t[0],b[0],i[0]),this.y=F(y[1],t[1],b[1],i[1]);var f=S(y[0],t[0],b[0],i[0]),a=S(y[1],t[1],b[1],i[1]);this.width=f-this.x,this.height=a-this.y}}(),calculateTransform:function(y){var t=this,b=y.width/t.width,i=y.height/t.height,u=B.create();return B.translate(u,u,[-t.x,-t.y]),B.scale(u,u,[b,i]),B.translate(u,u,[y.x,y.y]),u},intersect:function(y){if(!y)return!1;y instanceof R||(y=R.create(y));var t=this,b=t.x,i=t.x+t.width,u=t.y,f=t.y+t.height,a=y.x,o=y.x+y.width,c=y.y,l=y.y+y.height;return!(i<a||o<b||f<c||l<u)},contain:function(y,t){var b=this;return y>=b.x&&y<=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(y){this.x=y.x,this.y=y.y,this.width=y.width,this.height=y.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},R.create=function(y){return new R(y.x,y.y,y.width,y.height)};var P=R;We.exports=P},mLcG:function(We,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)};We.exports=L},mgmH:function(We,J,L){"use strict";L.d(J,"d",function(){return f}),L.d(J,"b",function(){return a}),L.d(J,"e",function(){return o}),L.d(J,"c",function(){return c}),L.d(J,"n",function(){return l}),L.d(J,"g",function(){return n}),L.d(J,"h",function(){return s}),L.d(J,"j",function(){return E}),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 g}),L.d(J,"i",function(){return h}),L.d(J,"o",function(){return p}),L.d(J,"t",function(){return m}),L.d(J,"s",function(){return _}),L.d(J,"p",function(){return x}),L.d(J,"q",function(){return v}),L.d(J,"r",function(){return j}),L.d(J,"v",function(){return U}),L.d(J,"u",function(){return T});var Y=L("miYZ"),B=L("tsqr"),I=L("k1fw"),F=L("9og8"),S=L("WmNS"),R=L.n(S),P=L("oUNq"),y=L("9kvl"),t=L("1vsH"),b=L("m3rI"),i=function(){Object(y.c)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},u=function(){Object(y.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 i(),$.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"),y.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(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),o=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"),y.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(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),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 $.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"),y.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(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),l=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"),y.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(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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"),y.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(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),s=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"),y.d.push("/classrooms/".concat(M.coursesId,"/exportlist/").concat(V))):K.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),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 i(),$.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)}}(),E=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 i(),$.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)}}(),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/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"),y.d.push("/classrooms/".concat(M.coursesId,"/exportlist/exercise_score"))):V.status===-3&&(Object(y.c)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),y.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)}}(),m=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)}}(),x=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)}}(),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_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)}}(),T=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(We,J,L){var Y=L("hX1E"),B=Y.normalizeRadian,I=Math.PI*2;function F(S,R,P,y,t,b,i,u,f){if(i===0)return!1;var a=i;u-=S,f-=R;var o=Math.sqrt(u*u+f*f);if(o-a>P||o+a<P)return!1;if(Math.abs(y-t)%I<1e-4)return!0;if(b){var c=y;y=B(t),t=B(c)}else y=B(y),t=B(t);y>t&&(t+=I);var l=Math.atan2(f,u);return l<0&&(l+=I),l>=y&&l<=t||l+I>=y&&l+I<=t}J.containStroke=F},n6Mw:function(We,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 y=this.getTextSvgElement(R);y&&this.updateDom(y,R.__clipPaths,!0),this.markUsed(R)},F.prototype.updateDom=function(R,P,y){if(P&&P.length>0){var t=this.getDefs(!0),b=P[0],i,u,f=y?"_textDom":"_dom";b[f]?(u=b[f].getAttribute("id"),i=b[f],t.contains(i)||t.appendChild(i)):(u="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",u),t.appendChild(i),b[f]=i);var a=this.getSvgProxy(b);if(b.transform&&b.parent.invTransform&&!y){var o=Array.prototype.slice.call(b.transform);I.mul(b.transform,b.parent.invTransform,b.transform),a.brush(b),b.transform=o}else a.brush(b);var c=this.getSvgElement(b);i.innerHTML="",i.appendChild(c.cloneNode()),R.setAttribute("clip-path","url(#"+u+")"),P.length>1&&this.updateDom(i,P.slice(1),y)}else R&&R.setAttribute("clip-path","none")},F.prototype.markUsed=function(R){var P=this;R.__clipPaths&&B.each(R.__clipPaths,function(y){y._dom&&Y.prototype.markUsed.call(P,y._dom),y._textDom&&Y.prototype.markUsed.call(P,y._textDom)})};var S=F;We.exports=S},n6Qo:function(We,J,L){"use strict";L.d(J,"a",function(){return y});var Y=L("q1tI"),B=L("biw7"),I=L("fyJ8");function F(t){var b=t.className,i=t.index,u=t.children,f=t.colSpan,a=t.rowSpan,o=Y.useContext(B.a),c=o.prefixCls,l=o.fixedInfoList,n=l[i];return Y.createElement(I.a,Object.assign({className:b,index:i,component:"td",prefixCls:c,record:null,dataIndex:null,render:function(){return{children:u,props:{colSpan:f,rowSpan:a}}}},n))}function S(t){return Y.createElement("tr",Object.assign({},t))}function R(t){var b=t.children,i=Y.useContext(B.a),u=i.prefixCls;return Y.createElement("tfoot",{className:"".concat(u,"-summary")},b)}var P=J.b=R,y={Cell:F,Row:S}},nCxF:function(We,J,L){var Y=L("QBsz"),B=Y.min,I=Y.max,F=Y.scale,S=Y.distance,R=Y.add,P=Y.clone,y=Y.sub;function t(b,i,u,f){var a=[],o=[],c=[],l=[],n,s,d,E;if(f){d=[Infinity,Infinity],E=[-Infinity,-Infinity];for(var A=0,C=b.length;A<C;A++)B(d,d,b[A]),I(E,E,b[A]);B(d,d,f[0]),I(E,E,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],s=b[(A+1)%C];else if(A===0||A===C-1){a.push(P(b[A]));continue}else n=b[A-1],s=b[A+1];y(o,s,n),F(o,o,i);var w=S(k,n),g=S(k,s),h=w+g;h!==0&&(w/=h,g/=h),F(c,o,-w),F(l,o,g);var p=R([],k,c),m=R([],k,l);f&&(I(p,p,d),B(p,p,E),I(m,m,d),B(m,m,E)),a.push(p),a.push(m)}return u&&a.push(a.shift()),a}We.exports=t},nEHx:function(We,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(We,J){var L=Math.round;function Y(F,S,R){if(!S)return;var P=S.x1,y=S.x2,t=S.y1,b=S.y2;F.x1=P,F.x2=y,F.y1=t,F.y2=b;var i=R&&R.lineWidth;if(!i)return;L(P*2)===L(y*2)&&(F.x1=F.x2=I(P,i,!0)),L(t*2)===L(b*2)&&(F.y1=F.y2=I(t,i,!0))}function B(F,S,R){if(!S)return;var P=S.x,y=S.y,t=S.width,b=S.height;F.x=P,F.y=y,F.width=t,F.height=b;var i=R&&R.lineWidth;if(!i)return;F.x=I(P,i,!0),F.y=I(y,i,!0),F.width=Math.max(I(P+t,i,!1)-F.x,t===0?0:1),F.height=Math.max(I(y+b,i,!1)-F.y,b===0?0:1)}function I(F,S,R){if(!S)return F;var P=L(F*2);return(P+L(S))%2===0?P/2:(P+(R?1:-1))/2}J.subPixelOptimizeLine=Y,J.subPixelOptimizeRect=B,J.subPixelOptimize=I},ni6a:function(We,J,L){var Y=L("pzxd"),B=L("mFDi"),I=L("gut8"),F=I.WILL_BE_RESTORED,S=new B,R=function(){};R.prototype={constructor:R,drawRectText:function(y,t){var b=this.style;t=b.textRect||t,this.__dirty&&Y.normalizeTextStyle(b,!0);var i=b.text;if(i!=null&&(i+=""),!Y.needDrawText(i,b))return;y.save();var u=this.transform;b.transformText?this.setTransform(y):u&&(S.copy(t),S.applyTransform(u),t=S),Y.renderText(this,y,i,b,t,F),y.restore()}};var P=R;We.exports=P},nnTU:function(We,J,L){"use strict";L.d(J,"b",function(){return P}),L.d(J,"a",function(){return y});var Y=L("MI8n"),B=L("JYp7"),I=L("pmY6"),F=L("24hK"),S=L("746U"),R=L("Cg/j");const P=Object(R.c)("commandService"),y=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 o=[];for(let l of t.description.args)o.push(l.constraint);const c=t.handler;t.handler=function(l,...n){return Object(S.o)(n,o),c(l,...n)}}const{id:i}=t;let u=this._commands.get(i);u||(u=new F.a,this._commands.set(i,u));let f=u.unshift(t),a=Object(I.i)(()=>{f();const o=this._commands.get(i);(o==null?void 0:o.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),a}registerCommandAlias(t,b){return y.registerCommand(t,(i,...u)=>i.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 i=this.getCommand(b);i&&t.set(b,i)}return t}};y.registerCommand("noop",()=>{})},oOBs:function(We,J,L){We.exports={leftdiv:"leftdiv___1FhsT",listClass:"listClass___1Y2ac",spantitle:"spantitle___1pL39",rightdiv:"rightdiv___3ZICD"}},ogmK:function(We,J,L){"use strict";L.d(J,"a",function(){return Tr});var Y=L("1OyB"),B=L("vuIU"),I=L("Ji7U"),F=L("LK+K"),S=L("rePB"),R=L("VTBJ"),P=L("ODXe"),y=L("q1tI"),t=L("TSYQ"),b=L.n(t),i=L("Kwbf"),u=L("6cGi"),f=L("U8pU"),a=L("4IlW"),o=y.createContext({}),c=o,l={visibility:"hidden"};function n(ne){var Re=ne.prefixCls,Xe=ne.prevIcon,Me=Xe===void 0?"\u2039":Xe,lt=ne.nextIcon,tt=lt===void 0?"\u203A":lt,pt=ne.superPrevIcon,mt=pt===void 0?"\xAB":pt,Dt=ne.superNextIcon,it=Dt===void 0?"\xBB":Dt,Jt=ne.onSuperPrev,Yt=ne.onSuperNext,At=ne.onPrev,qt=ne.onNext,Je=ne.children,tn=y.useContext(c),Wt=tn.hideNextBtn,yn=tn.hidePrevBtn;return y.createElement("div",{className:Re},Jt&&y.createElement("button",{type:"button",onClick:Jt,tabIndex:-1,className:"".concat(Re,"-super-prev-btn"),style:yn?l:{}},mt),At&&y.createElement("button",{type:"button",onClick:At,tabIndex:-1,className:"".concat(Re,"-prev-btn"),style:yn?l:{}},Me),y.createElement("div",{className:"".concat(Re,"-view")},Je),qt&&y.createElement("button",{type:"button",onClick:qt,tabIndex:-1,className:"".concat(Re,"-next-btn"),style:Wt?l:{}},tt),Yt&&y.createElement("button",{type:"button",onClick:Yt,tabIndex:-1,className:"".concat(Re,"-super-next-btn"),style:Wt?l:{}},it))}var s=n;function d(ne){var Re=y.useContext(c),Xe=Re.hideHeader;if(Xe)return null;var Me=ne.prefixCls,lt=ne.generateConfig,tt=ne.locale,pt=ne.value,mt=ne.format,Dt="".concat(Me,"-header");return y.createElement(s,{prefixCls:Dt},pt?lt.locale.format(tt.locale,pt,mt):"\xA0")}var E=d,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 Me=Re-ne.scrollTop,lt=Me/Xe*10;k.set(ne,requestAnimationFrame(function(){ne.scrollTop+=lt,ne.scrollTop!==Re&&w(ne,Re,Xe-10)}))}function g(ne,Re){var Xe=Re.onLeftRight,Me=Re.onCtrlLeftRight,lt=Re.onUpDown,tt=Re.onPageUpDown,pt=Re.onEnter,mt=ne.which,Dt=ne.ctrlKey,it=ne.metaKey;switch(mt){case a.a.LEFT:if(Dt||it){if(Me)return Me(-1),!0}else if(Xe)return Xe(-1),!0;break;case a.a.RIGHT:if(Dt||it){if(Me)return Me(1),!0}else if(Xe)return Xe(1),!0;break;case a.a.UP:if(lt)return lt(-1),!0;break;case a.a.DOWN:if(lt)return lt(1),!0;break;case a.a.PAGE_UP:if(tt)return tt(-1),!0;break;case a.a.PAGE_DOWN:if(tt)return tt(1),!0;break;case a.a.ENTER:if(pt)return pt(),!0;break}return!1}function h(ne,Re,Xe,Me){var lt=ne;if(!lt)switch(Re){case"time":lt=Me?"hh:mm:ss a":"HH:mm:ss";break;case"week":lt="gggg-wo";break;case"month":lt="YYYY-MM";break;case"quarter":lt="YYYY-[Q]Q";break;case"year":lt="YYYY";break;default:lt=Xe?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return lt}function p(ne,Re){var Xe=ne==="time"?8:10;return Math.max(Xe,Re.length)+2}var m=null,_=new Set;function x(ne){return!m&&typeof window!="undefined"&&window.addEventListener&&(m=function(Xe){Object(C.a)(_).forEach(function(Me){Me(Xe)})},window.addEventListener("mousedown",m)),_.add(ne),function(){_.delete(ne),_.size===0&&(window.removeEventListener("mousedown",m),m=null)}}var v=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},T=function(Re){return Re==="date"?"week":Re},z={year:v,month:j,quarter:U,week:T,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,Me=ne.onSelect,lt=ne.value,tt=ne.active,pt=ne.hideDisabledOptions,mt="".concat(Re,"-cell"),Dt=y.useContext(c),it=Dt.open,Jt=y.useRef(null),Yt=y.useRef(new Map);return y.useLayoutEffect(function(){var At=Yt.current.get(lt);At&&it!==!1&&w(Jt.current,At.offsetTop,120)},[lt]),y.useLayoutEffect(function(){if(it){var At=Yt.current.get(lt);At&&w(Jt.current,At.offsetTop,0)}},[it]),y.createElement("ul",{className:b()("".concat(Re,"-column"),Object(S.a)({},"".concat(Re,"-column-active"),tt)),ref:Jt,style:{position:"relative"}},Xe.map(function(At){var qt;return pt&&At.disabled?null:y.createElement("li",{key:At.value,ref:function(tn){Yt.current.set(At.value,tn)},className:b()(mt,(qt={},Object(S.a)(qt,"".concat(mt,"-disabled"),At.disabled),Object(S.a)(qt,"".concat(mt,"-selected"),lt===At.value),qt)),onClick:function(){if(At.disabled)return;Me(At.value)}},y.createElement("div",{className:"".concat(mt,"-inner")},At.label))}))}var V=M;function K(ne,Re){for(var Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",Me=String(ne);Me.length<Re;)Me="".concat(Xe).concat(ne);return Me}var $=function(){for(var Re=arguments.length,Xe=new Array(Re),Me=0;Me<Re;Me++)Xe[Me]=arguments[Me];return Xe};function Z(ne){return ne==null?[]:Array.isArray(ne)?ne:[ne]}function ve(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 Me=[oe(ne,0),oe(ne,1)];return Me[Xe]=typeof Re=="function"?Re(Me[Xe]):Re,!Me[0]&&!Me[1]?null:Me}function ye(ne,Re,Xe,Me,lt){var tt=ne.setHour(Re,Xe);return tt=ne.setMinute(tt,Me),tt=ne.setSecond(tt,lt),tt}function Pe(ne,Re,Xe,Me,lt,tt){var pt=Math.floor(ne/Me)*Me;if(pt<ne)return[pt,60-lt,60-tt];var mt=Math.floor(Re/lt)*lt;if(mt<Re)return[pt,mt,60-tt];var Dt=Math.floor(Xe/tt)*tt;return[pt,mt,Dt]}function ge(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,Me){for(var lt=[],tt=ne;tt<=Re;tt+=Xe)lt.push({label:K(tt,2),value:tt,disabled:(Me||[]).includes(tt)});return lt}function Qe(ne){var Re=ne.generateConfig,Xe=ne.prefixCls,Me=ne.operationRef,lt=ne.activeColumnIndex,tt=ne.value,pt=ne.showHour,mt=ne.showMinute,Dt=ne.showSecond,it=ne.use12Hours,Jt=ne.hourStep,Yt=Jt===void 0?1:Jt,At=ne.minuteStep,qt=At===void 0?1:At,Je=ne.secondStep,tn=Je===void 0?1:Je,Wt=ne.disabledHours,yn=ne.disabledMinutes,Rn=ne.disabledSeconds,Pn=ne.hideDisabledOptions,Mt=ne.onSelect,Ht=[],Cn="".concat(Xe,"-content"),En="".concat(Xe,"-time-panel"),wt,It=tt?Re.getHour(tt):-1,kt=tt?Re.getMinute(tt):-1,Ct=tt?Re.getSecond(tt):-1,bt=function(Vn,qn,Rr,jr){var $r=tt||Re.getNow(),pa=Math.max(0,qn),ma=Math.max(0,Rr),ya=Math.max(0,jr);return $r=ye(Re,$r,!it||!Vn?pa:pa+12,ma,ya),$r},Tn=de(0,23,Yt,Wt&&Wt()),Zt=Object(A.a)(function(){return Tn},Tn,ge);it&&(wt=It>=12,It%=12);var Sn=y.useMemo(function(){if(!it)return[!1,!1];var Bn=[!0,!0];return Zt.forEach(function(Vn){var qn=Vn.disabled,Rr=Vn.value;if(qn)return;Rr>=12?Bn[1]=!1:Bn[0]=!1}),Bn},[it,Zt]),dn=Object(P.a)(Sn,2),Vt=dn[0],wn=dn[1],Gn=y.useMemo(function(){return it?Zt.filter(wt?function(Bn){return Bn.value>=12}:function(Bn){return Bn.value<12}).map(function(Bn){var Vn=Bn.value%12,qn=Vn===0?"12":K(Vn,2);return Object(R.a)(Object(R.a)({},Bn),{},{label:qn,value:Vn})}):Zt},[it,Zt]),yr=de(0,59,qt,yn&&yn(It)),Wn=de(0,59,tn,Rn&&Rn(It,kt));Me.current={onUpDown:function(Vn){var qn=Ht[lt];if(qn)for(var Rr=qn.units.findIndex(function(ma){return ma.value===qn.value}),jr=qn.units.length,$r=1;$r<jr;$r+=1){var pa=qn.units[(Rr+Vn*$r+jr)%jr];if(pa.disabled!==!0){qn.onSelect(pa.value);break}}}};function kr(Bn,Vn,qn,Rr,jr){Bn!==!1&&Ht.push({node:y.cloneElement(Vn,{prefixCls:En,value:qn,active:lt===Ht.length,onSelect:jr,units:Rr,hideDisabledOptions:Pn}),onSelect:jr,value:qn,units:Rr})}kr(pt,y.createElement(V,{key:"hour"}),It,Gn,function(Bn){Mt(bt(wt,Bn,kt,Ct),"mouse")}),kr(mt,y.createElement(V,{key:"minute"}),kt,yr,function(Bn){Mt(bt(wt,It,Bn,Ct),"mouse")}),kr(Dt,y.createElement(V,{key:"second"}),Ct,Wn,function(Bn){Mt(bt(wt,It,kt,Bn),"mouse")});var Yr=-1;return typeof wt=="boolean"&&(Yr=wt?1:0),kr(it===!0,y.createElement(V,{key:"12hours"}),Yr,[{label:"AM",value:0,disabled:Vt},{label:"PM",value:1,disabled:wn}],function(Bn){Mt(bt(!!Bn,It,kt,Ct),"mouse")}),y.createElement("div",{className:Cn},Ht.map(function(Bn){var Vn=Bn.node;return Vn}))}var St=Qe,Ee=function(Re){return Re.filter(function(Xe){return Xe!==!1}).length};function De(ne){var Re=ne.generateConfig,Xe=ne.format,Me=Xe===void 0?"HH:mm:ss":Xe,lt=ne.prefixCls,tt=ne.active,pt=ne.operationRef,mt=ne.showHour,Dt=ne.showMinute,it=ne.showSecond,Jt=ne.use12Hours,Yt=Jt===void 0?!1:Jt,At=ne.onSelect,qt=ne.value,Je="".concat(lt,"-time-panel"),tn=y.useRef(),Wt=y.useState(-1),yn=Object(P.a)(Wt,2),Rn=yn[0],Pn=yn[1],Mt=Ee([mt,Dt,it,Yt]);return pt.current={onKeyDown:function(Cn){return g(Cn,{onLeftRight:function(wt){Pn((Rn+wt+Mt)%Mt)},onUpDown:function(wt){Rn===-1?Pn(0):tn.current&&tn.current.onUpDown(wt)},onEnter:function(){At(qt||Re.getNow(),"key"),Pn(-1)}})},onBlur:function(){Pn(-1)}},y.createElement("div",{className:b()(Je,Object(S.a)({},"".concat(Je,"-active"),tt))},y.createElement(E,Object.assign({},ne,{format:Me,prefixCls:lt})),y.createElement(St,Object.assign({},ne,{prefixCls:lt,activeColumnIndex:Rn,operationRef:tn})))}var rt=De,Be=7;function ke(ne,Re){return!ne&&!Re?!0:!ne||!Re?!1:void 0}function ut(ne,Re,Xe){var Me=ke(Re,Xe);if(typeof Me=="boolean")return Me;var lt=Math.floor(ne.getYear(Re)/10),tt=Math.floor(ne.getYear(Xe)/10);return lt===tt}function ie(ne,Re,Xe){var Me=ke(Re,Xe);return typeof Me=="boolean"?Me: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 Me=ke(Re,Xe);return typeof Me=="boolean"?Me:ie(ne,Re,Xe)&&xe(ne,Re)===xe(ne,Xe)}function Ke(ne,Re,Xe){var Me=ke(Re,Xe);return typeof Me=="boolean"?Me:ie(ne,Re,Xe)&&ne.getMonth(Re)===ne.getMonth(Xe)}function ot(ne,Re,Xe){var Me=ke(Re,Xe);return typeof Me=="boolean"?Me:ne.getYear(Re)===ne.getYear(Xe)&&ne.getMonth(Re)===ne.getMonth(Xe)&&ne.getDate(Re)===ne.getDate(Xe)}function gt(ne,Re,Xe){var Me=ke(Re,Xe);return typeof Me=="boolean"?Me:ne.getHour(Re)===ne.getHour(Xe)&&ne.getMinute(Re)===ne.getMinute(Xe)&&ne.getSecond(Re)===ne.getSecond(Xe)}function Nt(ne,Re,Xe,Me){var lt=ke(Xe,Me);return typeof lt=="boolean"?lt:ne.locale.getWeek(Re,Xe)===ne.locale.getWeek(Re,Me)}function He(ne,Re,Xe){return ot(ne,Re,Xe)&>(ne,Re,Xe)}function jt(ne,Re,Xe,Me){return!Re||!Xe||!Me?!1:!ot(ne,Re,Me)&&!ot(ne,Xe,Me)&&ne.isAfter(Me,Re)&&ne.isAfter(Xe,Me)}function $t(ne,Re,Xe){var Me=Re.locale.getWeekFirstDay(ne),lt=Re.setDate(Xe,1),tt=Re.getWeekDay(lt),pt=Re.addDate(lt,Me-tt);return Re.getMonth(pt)===Re.getMonth(Xe)&&Re.getDate(pt)>1&&(pt=Re.addDate(pt,-7)),pt}function Ie(ne,Re,Xe){var Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(Re){case"year":return Xe.addYear(ne,Me*10);case"quarter":case"month":return Xe.addYear(ne,Me);default:return Xe.addMonth(ne,Me)}}var Ae=y.createContext({}),ct=Ae;function Et(ne){var Re=ne.cellPrefixCls,Xe=ne.generateConfig,Me=ne.rangedValue,lt=ne.hoverRangedValue,tt=ne.isInView,pt=ne.isSameCell,mt=ne.offsetCell,Dt=ne.today,it=ne.value;function Jt(Yt){var At,qt=mt(Yt,-1),Je=mt(Yt,1),tn=oe(Me,0),Wt=oe(Me,1),yn=oe(lt,0),Rn=oe(lt,1),Pn=jt(Xe,yn,Rn,Yt);function Mt(kt){return pt(tn,kt)}function Ht(kt){return pt(Wt,kt)}var Cn=pt(yn,Yt),En=pt(Rn,Yt),wt=(Pn||En)&&(!tt(qt)||Ht(qt)),It=(Pn||Cn)&&(!tt(Je)||Mt(Je));return At={},Object(S.a)(At,"".concat(Re,"-in-view"),tt(Yt)),Object(S.a)(At,"".concat(Re,"-in-range"),jt(Xe,tn,Wt,Yt)),Object(S.a)(At,"".concat(Re,"-range-start"),Mt(Yt)),Object(S.a)(At,"".concat(Re,"-range-end"),Ht(Yt)),Object(S.a)(At,"".concat(Re,"-range-start-single"),Mt(Yt)&&!Wt),Object(S.a)(At,"".concat(Re,"-range-end-single"),Ht(Yt)&&!tn),Object(S.a)(At,"".concat(Re,"-range-start-near-hover"),Mt(Yt)&&(pt(qt,yn)||jt(Xe,yn,Rn,qt))),Object(S.a)(At,"".concat(Re,"-range-end-near-hover"),Ht(Yt)&&(pt(Je,Rn)||jt(Xe,yn,Rn,Je))),Object(S.a)(At,"".concat(Re,"-range-hover"),Pn),Object(S.a)(At,"".concat(Re,"-range-hover-start"),Cn),Object(S.a)(At,"".concat(Re,"-range-hover-end"),En),Object(S.a)(At,"".concat(Re,"-range-hover-edge-start"),wt),Object(S.a)(At,"".concat(Re,"-range-hover-edge-end"),It),Object(S.a)(At,"".concat(Re,"-range-hover-edge-start-near-range"),wt&&pt(qt,Wt)),Object(S.a)(At,"".concat(Re,"-range-hover-edge-end-near-range"),It&&pt(Je,tn)),Object(S.a)(At,"".concat(Re,"-today"),pt(Dt,Yt)),Object(S.a)(At,"".concat(Re,"-selected"),pt(it,Yt)),At}return Jt}function Ze(ne){for(var Re=ne.prefixCls,Xe=ne.disabledDate,Me=ne.onSelect,lt=ne.rowNum,tt=ne.colNum,pt=ne.prefixColumn,mt=ne.rowClassName,Dt=ne.baseDate,it=ne.getCellClassName,Jt=ne.getCellText,Yt=ne.getCellNode,At=ne.getCellDate,qt=ne.titleCell,Je=ne.headerCells,tn=y.useContext(c),Wt=tn.onDateMouseEnter,yn=tn.onDateMouseLeave,Rn="".concat(Re,"-cell"),Pn=[],Mt=0;Mt<lt;Mt+=1){for(var Ht=[],Cn=void 0,En=function(kt){var Ct=Mt*tt+kt,bt=At(Dt,Ct),Tn=Xe&&Xe(bt);kt===0&&(Cn=bt,pt&&Ht.push(pt(Cn))),Ht.push(y.createElement("td",{key:kt,title:qt&&qt(bt),className:b()(Rn,Object(R.a)(Object(S.a)({},"".concat(Rn,"-disabled"),Tn),it(bt))),onClick:function(){Tn||Me(bt)},onMouseEnter:function(){!Tn&&Wt&&Wt(bt)},onMouseLeave:function(){!Tn&&yn&&yn(bt)}},Yt?Yt(bt):y.createElement("div",{className:"".concat(Rn,"-inner")},Jt(bt))))},wt=0;wt<tt;wt+=1)En(wt);Pn.push(y.createElement("tr",{key:Mt,className:mt&&mt(Cn)},Ht))}return y.createElement("div",{className:"".concat(Re,"-body")},y.createElement("table",{className:"".concat(Re,"-content")},Je&&y.createElement("thead",null,y.createElement("tr",null,Je)),y.createElement("tbody",null,Pn)))}function ht(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.prefixColumn,lt=ne.locale,tt=ne.rowCount,pt=ne.viewDate,mt=ne.value,Dt=ne.dateRender,it=y.useContext(ct),Jt=it.rangedValue,Yt=it.hoverRangedValue,At=$t(lt.locale,Xe,pt),qt="".concat(Re,"-cell"),Je=Xe.locale.getWeekFirstDay(lt.locale),tn=Xe.getNow(),Wt=[],yn=lt.shortWeekDays||(Xe.locale.getShortWeekDays?Xe.locale.getShortWeekDays(lt.locale):[]);Me&&Wt.push(y.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var Rn=0;Rn<Be;Rn+=1)Wt.push(y.createElement("th",{key:Rn},yn[(Rn+Je)%Be]));var Pn=Et({cellPrefixCls:qt,today:tn,value:mt,generateConfig:Xe,rangedValue:Me?null:Jt,hoverRangedValue:Me?null:Yt,isSameCell:function(Cn,En){return ot(Xe,Cn,En)},isInView:function(Cn){return Ke(Xe,Cn,pt)},offsetCell:function(Cn,En){return Xe.addDate(Cn,En)}}),Mt=Dt?function(Ht){return Dt(Ht,tn)}:void 0;return y.createElement(Ze,Object.assign({},ne,{rowNum:tt,colNum:Be,baseDate:At,getCellNode:Mt,getCellText:Xe.getDate,getCellClassName:Pn,getCellDate:Xe.addDate,titleCell:function(Cn){return Xe.locale.format(lt.locale,Cn,"YYYY-MM-DD")},headerCells:Wt}))}var Ne=ht;function Te(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.locale,lt=ne.viewDate,tt=ne.onNextMonth,pt=ne.onPrevMonth,mt=ne.onNextYear,Dt=ne.onPrevYear,it=ne.onYearClick,Jt=ne.onMonthClick,Yt=y.useContext(c),At=Yt.hideHeader;if(At)return null;var qt="".concat(Re,"-header"),Je=Me.shortMonths||(Xe.locale.getShortMonths?Xe.locale.getShortMonths(Me.locale):[]),tn=Xe.getMonth(lt),Wt=y.createElement("button",{type:"button",key:"year",onClick:it,tabIndex:-1,className:"".concat(Re,"-year-btn")},Xe.locale.format(Me.locale,lt,Me.yearFormat)),yn=y.createElement("button",{type:"button",key:"month",onClick:Jt,tabIndex:-1,className:"".concat(Re,"-month-btn")},Me.monthFormat?Xe.locale.format(Me.locale,lt,Me.monthFormat):Je[tn]),Rn=Me.monthBeforeYear?[yn,Wt]:[Wt,yn];return y.createElement(s,Object.assign({},ne,{prefixCls:qt,onSuperPrev:Dt,onPrev:pt,onNext:tt,onSuperNext:mt}),Rn)}var Oe=Te,ae=6;function le(ne){var Re=ne.prefixCls,Xe=ne.panelName,Me=Xe===void 0?"date":Xe,lt=ne.keyboardConfig,tt=ne.active,pt=ne.operationRef,mt=ne.generateConfig,Dt=ne.value,it=ne.viewDate,Jt=ne.onViewDateChange,Yt=ne.onPanelChange,At=ne.onSelect,qt="".concat(Re,"-").concat(Me,"-panel");pt.current={onKeyDown:function(yn){return g(yn,Object(R.a)({onLeftRight:function(Pn){At(mt.addDate(Dt||it,Pn),"key")},onCtrlLeftRight:function(Pn){At(mt.addYear(Dt||it,Pn),"key")},onUpDown:function(Pn){At(mt.addDate(Dt||it,Pn*Be),"key")},onPageUpDown:function(Pn){At(mt.addMonth(Dt||it,Pn),"key")}},lt))}};var Je=function(yn){var Rn=mt.addYear(it,yn);Jt(Rn),Yt(null,Rn)},tn=function(yn){var Rn=mt.addMonth(it,yn);Jt(Rn),Yt(null,Rn)};return y.createElement("div",{className:b()(qt,Object(S.a)({},"".concat(qt,"-active"),tt))},y.createElement(Oe,Object.assign({},ne,{prefixCls:Re,value:Dt,viewDate:it,onPrevYear:function(){Je(-1)},onNextYear:function(){Je(1)},onPrevMonth:function(){tn(-1)},onNextMonth:function(){tn(1)},onMonthClick:function(){Yt("month",it)},onYearClick:function(){Yt("year",it)}})),y.createElement(Ne,Object.assign({},ne,{onSelect:function(yn){return At(yn,"mouse")},prefixCls:Re,value:Dt,viewDate:it,rowCount:ae})))}var he=le;function _e(ne,Re,Xe){if(!Xe)return Re;var Me=Re;return Me=ne.setHour(Me,ne.getHour(Xe)),Me=ne.setMinute(Me,ne.getMinute(Xe)),Me=ne.setSecond(Me,ne.getSecond(Xe)),Me}var Se=$("date","time");function ze(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Me=ne.generateConfig,lt=ne.value,tt=ne.defaultValue,pt=ne.disabledTime,mt=ne.showTime,Dt=ne.onSelect,it="".concat(Re,"-datetime-panel"),Jt=y.useState(null),Yt=Object(P.a)(Jt,2),At=Yt[0],qt=Yt[1],Je=y.useRef({}),tn=y.useRef({}),Wt=Object(f.a)(mt)==="object"?Object(R.a)({},mt):{};function yn(Ht){var Cn=Se.indexOf(At)+Ht,En=Se[Cn]||null;return En}var Rn=function(Cn){tn.current.onBlur&&tn.current.onBlur(Cn),qt(null)};Xe.current={onKeyDown:function(Cn){if(Cn.which===a.a.TAB){var En=yn(Cn.shiftKey?-1:1);return qt(En),En&&Cn.preventDefault(),!0}if(At){var wt=At==="date"?Je:tn;return wt.current&&wt.current.onKeyDown&&wt.current.onKeyDown(Cn),!0}return[a.a.LEFT,a.a.RIGHT,a.a.UP,a.a.DOWN].includes(Cn.which)?(qt("date"),!0):!1},onBlur:Rn,onClose:Rn};var Pn=function(Cn,En){var wt=Cn;En==="date"&&!lt&&Wt.defaultValue?(wt=Me.setHour(wt,Me.getHour(Wt.defaultValue)),wt=Me.setMinute(wt,Me.getMinute(Wt.defaultValue)),wt=Me.setSecond(wt,Me.getSecond(Wt.defaultValue))):En==="time"&&!lt&&tt&&(wt=Me.setYear(wt,Me.getYear(tt)),wt=Me.setMonth(wt,Me.getMonth(tt)),wt=Me.setDate(wt,Me.getDate(tt))),Dt&&Dt(wt,"mouse")},Mt=pt?pt(lt||null):{};return y.createElement("div",{className:b()(it,Object(S.a)({},"".concat(it,"-active"),At))},y.createElement(he,Object.assign({},ne,{operationRef:Je,active:At==="date",onSelect:function(Cn){Pn(_e(Me,Cn,mt&&Object(f.a)(mt)==="object"?mt.defaultValue:null),"date")}})),y.createElement(rt,Object.assign({},ne,{format:void 0},Wt,Mt,{defaultValue:void 0,operationRef:tn,active:At==="time",onSelect:function(Cn){Pn(Cn,"time")}})))}var xt=ze;function Qt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.locale,lt=ne.value,tt="".concat(Re,"-cell"),pt=function(Jt){return y.createElement("td",{key:"week",className:b()(tt,"".concat(tt,"-week"))},Xe.locale.getWeek(Me.locale,Jt))},mt="".concat(Re,"-week-panel-row"),Dt=function(Jt){return b()(mt,Object(S.a)({},"".concat(mt,"-selected"),Nt(Xe,Me.locale,lt,Jt)))};return y.createElement(he,Object.assign({},ne,{panelName:"week",prefixColumn:pt,rowClassName:Dt,keyboardConfig:{onLeftRight:null}}))}var on=Qt;function vt(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.locale,lt=ne.viewDate,tt=ne.onNextYear,pt=ne.onPrevYear,mt=ne.onYearClick,Dt=y.useContext(c),it=Dt.hideHeader;if(it)return null;var Jt="".concat(Re,"-header");return y.createElement(s,Object.assign({},ne,{prefixCls:Jt,onSuperPrev:pt,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:mt,className:"".concat(Re,"-year-btn")},Xe.locale.format(Me.locale,lt,Me.yearFormat)))}var Kt=vt,Ot=3,Rt=4;function ft(ne){var Re=ne.prefixCls,Xe=ne.locale,Me=ne.value,lt=ne.viewDate,tt=ne.generateConfig,pt=ne.monthCellRender,mt=y.useContext(ct),Dt=mt.rangedValue,it=mt.hoverRangedValue,Jt="".concat(Re,"-cell"),Yt=Et({cellPrefixCls:Jt,value:Me,generateConfig:tt,rangedValue:Dt,hoverRangedValue:it,isSameCell:function(Wt,yn){return Ke(tt,Wt,yn)},isInView:function(){return!0},offsetCell:function(Wt,yn){return tt.addMonth(Wt,yn)}}),At=Xe.shortMonths||(tt.locale.getShortMonths?tt.locale.getShortMonths(Xe.locale):[]),qt=tt.setMonth(lt,0),Je=pt?function(tn){return pt(tn,Xe)}:void 0;return y.createElement(Ze,Object.assign({},ne,{rowNum:Rt,colNum:Ot,baseDate:qt,getCellNode:Je,getCellText:function(Wt){return Xe.monthFormat?tt.locale.format(Xe.locale,Wt,Xe.monthFormat):At[tt.getMonth(Wt)]},getCellClassName:Yt,getCellDate:tt.addMonth,titleCell:function(Wt){return tt.locale.format(Xe.locale,Wt,"YYYY-MM")}}))}var be=ft;function Fe(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Me=ne.onViewDateChange,lt=ne.generateConfig,tt=ne.value,pt=ne.viewDate,mt=ne.onPanelChange,Dt=ne.onSelect,it="".concat(Re,"-month-panel");Xe.current={onKeyDown:function(At){return g(At,{onLeftRight:function(Je){Dt(lt.addMonth(tt||pt,Je),"key")},onCtrlLeftRight:function(Je){Dt(lt.addYear(tt||pt,Je),"key")},onUpDown:function(Je){Dt(lt.addMonth(tt||pt,Je*Ot),"key")},onEnter:function(){mt("date",tt||pt)}})}};var Jt=function(At){var qt=lt.addYear(pt,At);Me(qt),mt(null,qt)};return y.createElement("div",{className:it},y.createElement(Kt,Object.assign({},ne,{prefixCls:Re,onPrevYear:function(){Jt(-1)},onNextYear:function(){Jt(1)},onYearClick:function(){mt("year",pt)}})),y.createElement(be,Object.assign({},ne,{prefixCls:Re,onSelect:function(At){Dt(At,"mouse"),mt("date",At)}})))}var Ut=Fe;function _t(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.locale,lt=ne.viewDate,tt=ne.onNextYear,pt=ne.onPrevYear,mt=ne.onYearClick,Dt=y.useContext(c),it=Dt.hideHeader;if(it)return null;var Jt="".concat(Re,"-header");return y.createElement(s,Object.assign({},ne,{prefixCls:Jt,onSuperPrev:pt,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:mt,className:"".concat(Re,"-year-btn")},Xe.locale.format(Me.locale,lt,Me.yearFormat)))}var Gt=_t,en=4,Ge=1;function dt(ne){var Re=ne.prefixCls,Xe=ne.locale,Me=ne.value,lt=ne.viewDate,tt=ne.generateConfig,pt=y.useContext(ct),mt=pt.rangedValue,Dt=pt.hoverRangedValue,it="".concat(Re,"-cell"),Jt=Et({cellPrefixCls:it,value:Me,generateConfig:tt,rangedValue:mt,hoverRangedValue:Dt,isSameCell:function(qt,Je){return we(tt,qt,Je)},isInView:function(){return!0},offsetCell:function(qt,Je){return tt.addMonth(qt,Je*3)}}),Yt=tt.setDate(tt.setMonth(lt,0),1);return y.createElement(Ze,Object.assign({},ne,{rowNum:Ge,colNum:en,baseDate:Yt,getCellText:function(qt){return tt.locale.format(Xe.locale,qt,Xe.quarterFormat||"[Q]Q")},getCellClassName:Jt,getCellDate:function(qt,Je){return tt.addMonth(qt,Je*3)},titleCell:function(qt){return tt.locale.format(Xe.locale,qt,"YYYY-[Q]Q")}}))}var Pt=dt;function zt(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Me=ne.onViewDateChange,lt=ne.generateConfig,tt=ne.value,pt=ne.viewDate,mt=ne.onPanelChange,Dt=ne.onSelect,it="".concat(Re,"-quarter-panel");Xe.current={onKeyDown:function(At){return g(At,{onLeftRight:function(Je){Dt(lt.addMonth(tt||pt,Je*3),"key")},onCtrlLeftRight:function(Je){Dt(lt.addYear(tt||pt,Je),"key")},onUpDown:function(Je){Dt(lt.addYear(tt||pt,Je),"key")}})}};var Jt=function(At){var qt=lt.addYear(pt,At);Me(qt),mt(null,qt)};return y.createElement("div",{className:it},y.createElement(Gt,Object.assign({},ne,{prefixCls:Re,onPrevYear:function(){Jt(-1)},onNextYear:function(){Jt(1)},onYearClick:function(){mt("year",pt)}})),y.createElement(Pt,Object.assign({},ne,{prefixCls:Re,onSelect:function(At){Dt(At,"mouse")}})))}var ln=zt;function vn(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.viewDate,lt=ne.onPrevDecade,tt=ne.onNextDecade,pt=ne.onDecadeClick,mt=y.useContext(c),Dt=mt.hideHeader;if(Dt)return null;var it="".concat(Re,"-header"),Jt=Xe.getYear(Me),Yt=Math.floor(Jt/ar)*ar,At=Yt+ar-1;return y.createElement(s,Object.assign({},ne,{prefixCls:it,onSuperPrev:lt,onSuperNext:tt}),y.createElement("button",{type:"button",onClick:pt,className:"".concat(Re,"-decade-btn")},Yt,"-",At))}var nr=vn,Kn=3,bn=4;function xr(ne){var Re=ne.prefixCls,Xe=ne.value,Me=ne.viewDate,lt=ne.locale,tt=ne.generateConfig,pt=y.useContext(ct),mt=pt.rangedValue,Dt=pt.hoverRangedValue,it="".concat(Re,"-cell"),Jt=tt.getYear(Me),Yt=Math.floor(Jt/ar)*ar,At=Yt+ar-1,qt=tt.setYear(Me,Yt-Math.ceil((Kn*bn-ar)/2)),Je=function(yn){var Rn=tt.getYear(yn);return Yt<=Rn&&Rn<=At},tn=Et({cellPrefixCls:it,value:Xe,generateConfig:tt,rangedValue:mt,hoverRangedValue:Dt,isSameCell:function(yn,Rn){return ie(tt,yn,Rn)},isInView:Je,offsetCell:function(yn,Rn){return tt.addYear(yn,Rn)}});return y.createElement(Ze,Object.assign({},ne,{rowNum:bn,colNum:Kn,baseDate:qt,getCellText:tt.getYear,getCellClassName:tn,getCellDate:tt.addYear,titleCell:function(yn){return tt.locale.format(lt.locale,yn,"YYYY")}}))}var Er=xr,ar=10;function dr(ne){var Re=ne.prefixCls,Xe=ne.operationRef,Me=ne.onViewDateChange,lt=ne.generateConfig,tt=ne.value,pt=ne.viewDate,mt=ne.sourceMode,Dt=ne.onSelect,it=ne.onPanelChange,Jt="".concat(Re,"-year-panel");Xe.current={onKeyDown:function(qt){return g(qt,{onLeftRight:function(tn){Dt(lt.addYear(tt||pt,tn),"key")},onCtrlLeftRight:function(tn){Dt(lt.addYear(tt||pt,tn*ar),"key")},onUpDown:function(tn){Dt(lt.addYear(tt||pt,tn*Kn),"key")},onEnter:function(){it(mt==="date"?"date":"month",tt||pt)}})}};var Yt=function(qt){var Je=lt.addYear(pt,qt*10);Me(Je),it(null,Je)};return y.createElement("div",{className:Jt},y.createElement(nr,Object.assign({},ne,{prefixCls:Re,onPrevDecade:function(){Yt(-1)},onNextDecade:function(){Yt(1)},onDecadeClick:function(){it("decade",pt)}})),y.createElement(Er,Object.assign({},ne,{prefixCls:Re,onSelect:function(qt){it(mt==="date"?"date":"month",qt),Dt(qt,"mouse")}})))}var Or=dr;function Kr(ne){var Re=ne.prefixCls,Xe=ne.generateConfig,Me=ne.viewDate,lt=ne.onPrevDecades,tt=ne.onNextDecades,pt=y.useContext(c),mt=pt.hideHeader;if(mt)return null;var Dt="".concat(Re,"-header"),it=Xe.getYear(Me),Jt=Math.floor(it/ra)*ra,Yt=Jt+ra-1;return y.createElement(s,Object.assign({},ne,{prefixCls:Dt,onSuperPrev:lt,onSuperNext:tt}),Jt,"-",Yt)}var ia=Kr,hn=3,or=4;function ua(ne){var Re=Zr-1,Xe=ne.prefixCls,Me=ne.viewDate,lt=ne.generateConfig,tt=ne.disabledDate,pt="".concat(Xe,"-cell"),mt=lt.getYear(Me),Dt=Math.floor(mt/Zr)*Zr,it=Math.floor(mt/ra)*ra,Jt=it+ra-1,Yt=lt.setYear(Me,it-Math.ceil((hn*or*Zr-ra)/2)),At=function(Je){var tn,Wt=tt&&tt(Je),yn=lt.getYear(Je),Rn=yn+Re;return tn={},Object(S.a)(tn,"".concat(pt,"-disabled"),Wt),Object(S.a)(tn,"".concat(pt,"-in-view"),it<=yn&&Rn<=Jt),Object(S.a)(tn,"".concat(pt,"-selected"),yn===Dt),tn};return y.createElement(Ze,Object.assign({},ne,{rowNum:or,colNum:hn,baseDate:Yt,getCellText:function(Je){var tn=lt.getYear(Je);return"".concat(tn,"-").concat(tn+Re)},getCellClassName:At,getCellDate:function(Je,tn){return lt.addYear(Je,tn*Zr)}}))}var ga=ua,Zr=10,ra=Zr*10;function te(ne){var Re=ne.prefixCls,Xe=ne.onViewDateChange,Me=ne.generateConfig,lt=ne.viewDate,tt=ne.operationRef,pt=ne.onSelect,mt=ne.onPanelChange,Dt="".concat(Re,"-decade-panel");tt.current={onKeyDown:function(At){return g(At,{onLeftRight:function(Je){pt(Me.addYear(lt,Je*Zr),"key")},onCtrlLeftRight:function(Je){pt(Me.addYear(lt,Je*ra),"key")},onUpDown:function(Je){pt(Me.addYear(lt,Je*Zr*hn),"key")},onEnter:function(){mt("year",lt)}})}};var it=function(At){var qt=Me.addYear(lt,At*ra);Xe(qt),mt(null,qt)},Jt=function(At){pt(At,"mouse"),mt("year",At)};return y.createElement("div",{className:Dt},y.createElement(ia,Object.assign({},ne,{prefixCls:Re,onPrevDecades:function(){it(-1)},onNextDecades:function(){it(1)}})),y.createElement(ga,Object.assign({},ne,{prefixCls:Re,onSelect:Jt})))}var W=te;function G(ne,Re,Xe){return Xe?y.createElement("div",{className:"".concat(ne,"-footer-extra")},Xe(Re)):null}function Q(ne){var Re=ne.prefixCls,Xe=ne.rangeList,Me=Xe===void 0?[]:Xe,lt=ne.components,tt=lt===void 0?{}:lt,pt=ne.needConfirmButton,mt=ne.onNow,Dt=ne.onOk,it=ne.okDisabled,Jt=ne.showNow,Yt=ne.locale,At,qt;if(Me.length){var Je=tt.rangeItem||"span";At=y.createElement(y.Fragment,null,Me.map(function(Wt){var yn=Wt.label,Rn=Wt.onClick,Pn=Wt.onMouseEnter,Mt=Wt.onMouseLeave;return y.createElement("li",{key:yn,className:"".concat(Re,"-preset")},y.createElement(Je,{onClick:Rn,onMouseEnter:Pn,onMouseLeave:Mt},yn))}))}if(pt){var tn=tt.button||"button";mt&&!At&&Jt!==!1&&(At=y.createElement("li",{className:"".concat(Re,"-now")},y.createElement("a",{className:"".concat(Re,"-now-btn"),onClick:mt},Yt.now))),qt=pt&&y.createElement("li",{className:"".concat(Re,"-ok")},y.createElement(tn,{disabled:it,onClick:Dt},Yt.ok))}return!At&&!qt?null:y.createElement("ul",{className:"".concat(Re,"-ranges")},At,qt)}function ue(ne){var Re,Xe=ne.prefixCls,Me=Xe===void 0?"rc-picker":Xe,lt=ne.className,tt=ne.style,pt=ne.locale,mt=ne.generateConfig,Dt=ne.value,it=ne.defaultValue,Jt=ne.pickerValue,Yt=ne.defaultPickerValue,At=ne.disabledDate,qt=ne.mode,Je=ne.picker,tn=Je===void 0?"date":Je,Wt=ne.tabIndex,yn=Wt===void 0?0:Wt,Rn=ne.showNow,Pn=ne.showTime,Mt=ne.showToday,Ht=ne.renderExtraFooter,Cn=ne.hideHeader,En=ne.onSelect,wt=ne.onChange,It=ne.onPanelChange,kt=ne.onMouseDown,Ct=ne.onPickerValueChange,bt=ne.onOk,Tn=ne.components,Zt=ne.direction,Sn=ne.hourStep,dn=Sn===void 0?1:Sn,Vt=ne.minuteStep,wn=Vt===void 0?1:Vt,Gn=ne.secondStep,yr=Gn===void 0?1:Gn,Wn=tn==="date"&&!!Pn||tn==="time",kr=24%dn===0,Yr=60%wn===0,Bn=60%yr===0,Vn=y.useContext(c),qn=Vn.operationRef,Rr=Vn.panelRef,jr=Vn.onSelect,$r=Vn.hideRanges,pa=Vn.defaultOpenValue,ma=y.useContext(ct),ya=ma.inRange,Va=ma.panelPosition,Ma=ma.rangedValue,$a=ma.hoverRangedValue,aa=y.useRef({}),La=y.useRef(!0),oi=Object(u.a)(null,{value:Dt,defaultValue:it,postState:function(pn){return!pn&&pa&&tn==="time"?pa:pn}}),Pa=Object(P.a)(oi,2),qr=Pa[0],xa=Pa[1],Sa=Object(u.a)(null,{value:Jt,defaultValue:Yt||qr,postState:function(pn){return pn||mt.getNow()}}),Le=Object(P.a)(Sa,2),et=Le[0],at=Le[1],je=function(pn){at(pn),Ct&&Ct(pn)},ce=function(pn){var Dn=z[tn];return Dn?Dn(pn):pn},Ce=Object(u.a)(function(){return tn==="time"?"time":ce("date")},{value:qt}),me=Object(P.a)(Ce,2),Ue=me[0],Ve=me[1];y.useEffect(function(){Ve(tn)},[tn]);var st=y.useState(function(){return Ue}),$e=Object(P.a)(st,2),yt=$e[0],Bt=$e[1],rn=function(pn,Dn){var gr=ce(pn||Ue);Bt(Ue),Ve(gr),It&&(Ue!==gr||He(mt,et,et))&&It(Dn,gr)},cn=function(pn,Dn){var gr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;(Ue===tn||gr)&&(xa(pn),En&&En(pn),jr&&jr(pn,Dn),wt&&!He(mt,pn,qr)&&wt(pn))},An=function(pn){return aa.current&&aa.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(pn.which)&&pn.preventDefault(),aa.current.onKeyDown(pn)):(Object(i.a)(!1,"Panel not correct handle keyDown event. Please help to fire issue about this."),!1)},zn=function(pn){aa.current&&aa.current.onBlur&&aa.current.onBlur(pn)};qn&&Va!=="right"&&(qn.current={onKeyDown:An,onClose:function(){aa.current&&aa.current.onClose&&aa.current.onClose()}}),y.useEffect(function(){Dt&&!La.current&&at(Dt)},[Dt]),y.useEffect(function(){La.current=!1},[]);var cr,hr=Object(R.a)(Object(R.a)({},ne),{},{operationRef:aa,prefixCls:Me,viewDate:et,value:qr,onViewDateChange:je,sourceMode:yt,onPanelChange:rn,disabledDate:Ue!=="decade"?At:void 0});delete hr.onChange,delete hr.onSelect;switch(Ue){case"decade":cr=y.createElement(W,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;case"year":cr=y.createElement(Or,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;case"month":cr=y.createElement(Ut,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;case"quarter":cr=y.createElement(ln,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;case"week":cr=y.createElement(on,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;case"time":delete hr.showTime,cr=y.createElement(rt,Object.assign({},hr,Object(f.a)(Pn)==="object"?Pn:null,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}));break;default:Pn?cr=y.createElement(xt,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}})):cr=y.createElement(he,Object.assign({},hr,{onSelect:function(pn,Dn){je(pn),cn(pn,Dn)}}))}var fn,Ft,Xt=function(){var pn=mt.getNow(),Dn=Pe(mt.getHour(pn),mt.getMinute(pn),mt.getSecond(pn),kr?dn:1,Yr?wn:1,Bn?yr:1),gr=ye(mt,pn,Dn[0],Dn[1],Dn[2]);cn(gr,"submit")};$r||(fn=G(Me,Ue,Ht),Ft=Q({prefixCls:Me,components:Tn,needConfirmButton:Wn,okDisabled:!qr||At&&At(qr),locale:pt,showNow:Rn,onNow:Wn&&Xt,onOk:function(){qr&&(cn(qr,"submit",!0),bt&&bt(qr))}}));var In;if(Mt&&Ue==="date"&&tn==="date"&&!Pn){var xn=mt.getNow(),er="".concat(Me,"-today-btn"),wr=At&&At(xn);In=y.createElement("a",{className:b()(er,wr&&"".concat(er,"-disabled")),"aria-disabled":wr,onClick:function(){wr||cn(xn,"mouse",!0)}},pt.today)}return y.createElement(c.Provider,{value:Object(R.a)(Object(R.a)({},Vn),{},{hideHeader:"hideHeader"in ne?Cn:Vn.hideHeader,hidePrevBtn:ya&&Va==="right",hideNextBtn:ya&&Va==="left"})},y.createElement("div",{tabIndex:yn,className:b()("".concat(Me,"-panel"),lt,(Re={},Object(S.a)(Re,"".concat(Me,"-panel-has-range"),Ma&&Ma[0]&&Ma[1]),Object(S.a)(Re,"".concat(Me,"-panel-has-range-hover"),$a&&$a[0]&&$a[1]),Object(S.a)(Re,"".concat(Me,"-panel-rtl"),Zt==="rtl"),Re)),style:tt,onKeyDown:An,onBlur:zn,onMouseDown:kt,ref:Rr},cr,fn||Ft||In?y.createElement("div",{className:"".concat(Me,"-footer")},fn,Ft,In):null))}var ee=ue,qe=L("uciX"),nn={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 On(ne){var Re,Xe=ne.prefixCls,Me=ne.popupElement,lt=ne.popupStyle,tt=ne.visible,pt=ne.dropdownClassName,mt=ne.dropdownAlign,Dt=ne.transitionName,it=ne.getPopupContainer,Jt=ne.children,Yt=ne.range,At=ne.popupPlacement,qt=ne.direction,Je="".concat(Xe,"-dropdown"),tn=function(){return At!==void 0?At:qt==="rtl"?"bottomRight":"bottomLeft"};return y.createElement(qe.a,{showAction:[],hideAction:[],popupPlacement:tn(),builtinPlacements:nn,prefixCls:Je,popupTransitionName:Dt,popup:Me,popupAlign:mt,popupVisible:tt,popupClassName:b()(pt,(Re={},Object(S.a)(Re,"".concat(Je,"-range"),Yt),Object(S.a)(Re,"".concat(Je,"-rtl"),qt==="rtl"),Re)),popupStyle:lt,getPopupContainer:it},Jt)}var Yn=On;function un(ne){var Re=ne.open,Xe=ne.value,Me=ne.isClickOutside,lt=ne.triggerOpen,tt=ne.forwardKeyDown,pt=ne.blurToCancel,mt=ne.onSubmit,Dt=ne.onCancel,it=ne.onFocus,Jt=ne.onBlur,Yt=Object(y.useState)(!1),At=Object(P.a)(Yt,2),qt=At[0],Je=At[1],tn=Object(y.useState)(!1),Wt=Object(P.a)(tn,2),yn=Wt[0],Rn=Wt[1],Pn=Object(y.useRef)(!1),Mt=Object(y.useRef)(!1),Ht={onMouseDown:function(){Je(!0),lt(!0)},onKeyDown:function(En){switch(En.which){case a.a.ENTER:{Re?mt()!==!1&&Je(!0):lt(!0),En.preventDefault();return}case a.a.TAB:{qt&&Re&&!En.shiftKey?(Je(!1),En.preventDefault()):!qt&&Re&&(!tt(En)&&En.shiftKey&&(Je(!0),En.preventDefault()));return}case a.a.ESC:{Je(!0),Dt();return}}!Re&&![a.a.SHIFT].includes(En.which)?lt(!0):qt||tt(En)},onFocus:function(En){Je(!0),Rn(!0),it&&it(En)},onBlur:function(En){if(Pn.current||!Me(document.activeElement)){Pn.current=!1;return}pt?setTimeout(function(){Me(document.activeElement)&&Dt()},0):Re&&(lt(!1),Mt.current&&mt()),Rn(!1),Jt&&Jt(En)}};return Object(y.useEffect)(function(){Mt.current=!1},[Re]),Object(y.useEffect)(function(){Mt.current=!0},[Xe]),Object(y.useEffect)(function(){return x(function(Cn){var En=Cn.target;Re&&(Me(En)?yn||lt(!1):(Pn.current=!0,requestAnimationFrame(function(){Pn.current=!1})))})}),[Ht,{focused:yn,typing:qt}]}function rr(ne){var Re=ne.valueTexts,Xe=ne.onTextChange,Me=y.useState(""),lt=Object(P.a)(Me,2),tt=lt[0],pt=lt[1],mt=y.useRef([]);mt.current=Re;function Dt(Jt){pt(Jt),Xe(Jt)}function it(){pt(mt.current[0])}return y.useEffect(function(){Re.every(function(Jt){return Jt!==tt})&&it()},[Re.join("||")]),[tt,Dt,it]}var mn=L("Gytx"),sn=L.n(mn);function _n(ne,Re){var Xe=Re.formatList,Me=Re.generateConfig,lt=Re.locale;return Object(A.a)(function(){if(!ne)return[[""],""];for(var tt="",pt=[],mt=0;mt<Xe.length;mt+=1){var Dt=Xe[mt],it=Me.locale.format(lt.locale,ne,Dt);pt.push(it),mt===0&&(tt=it)}return[pt,tt]},[ne,Xe],function(tt,pt){return tt[0]!==pt[0]||!sn()(tt[1],pt[1])})}function Nn(ne,Re){var Xe=Re.formatList,Me=Re.generateConfig,lt=Re.locale,tt=Object(y.useState)(null),pt=Object(P.a)(tt,2),mt=pt[0],Dt=pt[1],it=Object(y.useRef)(null);function Jt(Wt){var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(cancelAnimationFrame(it.current),yn){Dt(Wt);return}it.current=requestAnimationFrame(function(){Dt(Wt)})}var Yt=_n(mt,{formatList:Xe,generateConfig:Me,locale:lt}),At=Object(P.a)(Yt,2),qt=At[1];function Je(Wt){Jt(Wt)}function tn(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Jt(null,Wt)}return Object(y.useEffect)(function(){tn(!0)},[ne]),Object(y.useEffect)(function(){return function(){return cancelAnimationFrame(it.current)}},[]),[qt,Je,tn]}function sr(ne){var Re,Xe=ne.prefixCls,Me=Xe===void 0?"rc-picker":Xe,lt=ne.id,tt=ne.tabIndex,pt=ne.style,mt=ne.className,Dt=ne.dropdownClassName,it=ne.dropdownAlign,Jt=ne.popupStyle,Yt=ne.transitionName,At=ne.generateConfig,qt=ne.locale,Je=ne.inputReadOnly,tn=ne.allowClear,Wt=ne.autoFocus,yn=ne.showTime,Rn=ne.picker,Pn=Rn===void 0?"date":Rn,Mt=ne.format,Ht=ne.use12Hours,Cn=ne.value,En=ne.defaultValue,wt=ne.open,It=ne.defaultOpen,kt=ne.defaultOpenValue,Ct=ne.suffixIcon,bt=ne.clearIcon,Tn=ne.disabled,Zt=ne.disabledDate,Sn=ne.placeholder,dn=ne.getPopupContainer,Vt=ne.pickerRef,wn=ne.panelRender,Gn=ne.onChange,yr=ne.onOpenChange,Wn=ne.onFocus,kr=ne.onBlur,Yr=ne.onMouseDown,Bn=ne.onMouseUp,Vn=ne.onMouseEnter,qn=ne.onMouseLeave,Rr=ne.onContextMenu,jr=ne.onClick,$r=ne.direction,pa=ne.autoComplete,ma=pa===void 0?"off":pa,ya=y.useRef(null),Va=Pn==="date"&&!!yn||Pn==="time",Ma=Z(h(Mt,Pn,yn,Ht)),$a=y.useRef(null),aa=y.useRef(null),La=Object(u.a)(null,{value:Cn,defaultValue:En}),oi=Object(P.a)(La,2),Pa=oi[0],qr=oi[1],xa=y.useState(Pa),Sa=Object(P.a)(xa,2),Le=Sa[0],et=Sa[1],at=y.useRef(null),je=Object(u.a)(!1,{value:wt,defaultValue:It,postState:function(pr){return Tn?!1:pr},onChange:function(pr){yr&&yr(pr),!pr&&at.current&&at.current.onClose&&at.current.onClose()}}),ce=Object(P.a)(je,2),Ce=ce[0],me=ce[1],Ue=_n(Le,{formatList:Ma,generateConfig:At,locale:qt}),Ve=Object(P.a)(Ue,2),st=Ve[0],$e=Ve[1],yt=rr({valueTexts:st,onTextChange:function(pr){var da=At.locale.parse(qt.locale,pr,Ma);da&&(!Zt||!Zt(da))&&et(da)}}),Bt=Object(P.a)(yt,3),rn=Bt[0],cn=Bt[1],An=Bt[2],zn=function(pr){et(pr),qr(pr),Gn&&!He(At,Pa,pr)&&Gn(pr,pr?At.locale.format(qt.locale,pr,Ma[0]):"")},cr=function(pr){if(Tn&&pr)return;me(pr)},hr=function(pr){return Ce&&at.current&&at.current.onKeyDown?at.current.onKeyDown(pr):(Object(i.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},fn=function(){Bn&&Bn.apply(void 0,arguments),ya.current&&(ya.current.focus(),cr(!0))},Ft=un({blurToCancel:Va,open:Ce,value:rn,triggerOpen:cr,forwardKeyDown:hr,isClickOutside:function(pr){return!H([$a.current,aa.current],pr)},onSubmit:function(){return Zt&&Zt(Le)?!1:(zn(Le),cr(!1),An(),!0)},onCancel:function(){cr(!1),et(Pa),An()},onFocus:Wn,onBlur:kr}),Xt=Object(P.a)(Ft,2),In=Xt[0],xn=Xt[1],er=xn.focused,wr=xn.typing;y.useEffect(function(){Ce||(et(Pa),!st.length||st[0]===""?cn(""):$e!==rn&&An())},[Ce,st]),y.useEffect(function(){Ce||An()},[Pn]),y.useEffect(function(){et(Pa)},[Pa]),Vt&&(Vt.current={focus:function(){ya.current&&ya.current.focus()},blur:function(){ya.current&&ya.current.blur()}});var Jn=Object(R.a)(Object(R.a)({},ne),{},{className:void 0,style:void 0,pickerValue:void 0,onPickerValueChange:void 0}),pn=y.createElement(ee,Object.assign({},Jn,{generateConfig:At,className:b()(Object(S.a)({},"".concat(Me,"-panel-focused"),!wr)),value:Le,locale:qt,tabIndex:-1,onChange:et,direction:$r}));wn&&(pn=wn(pn));var Dn=y.createElement("div",{className:"".concat(Me,"-panel-container"),onMouseDown:function(pr){pr.preventDefault()}},pn),gr;Ct&&(gr=y.createElement("span",{className:"".concat(Me,"-suffix")},Ct));var Sr;tn&&Pa&&!Tn&&(Sr=y.createElement("span",{onMouseDown:function(pr){pr.preventDefault(),pr.stopPropagation()},onMouseUp:function(pr){pr.preventDefault(),pr.stopPropagation(),zn(null),cr(!1)},className:"".concat(Me,"-clear")},bt||y.createElement("span",{className:"".concat(Me,"-clear-btn")})));var Xn=function(pr,da){(da==="submit"||da!=="key"&&!Va)&&(zn(pr),cr(!1))},Dr=$r==="rtl"?"bottomRight":"bottomLeft",Qr=Nn(rn,{formatList:Ma,generateConfig:At,locale:qt}),Pr=Object(P.a)(Qr,3),Hr=Pr[0],Fr=Pr[1],Ur=Pr[2];return y.createElement(c.Provider,{value:{operationRef:at,hideHeader:Pn==="time",panelRef:$a,onSelect:Xn,open:Ce,defaultOpenValue:kt,onDateMouseEnter:Fr,onDateMouseLeave:Ur}},y.createElement(Yn,{visible:Ce,popupElement:Dn,popupStyle:Jt,prefixCls:Me,dropdownClassName:Dt,dropdownAlign:it,getPopupContainer:dn,transitionName:Yt,popupPlacement:Dr,direction:$r},y.createElement("div",{className:b()(Me,mt,(Re={},Object(S.a)(Re,"".concat(Me,"-disabled"),Tn),Object(S.a)(Re,"".concat(Me,"-focused"),er),Object(S.a)(Re,"".concat(Me,"-rtl"),$r==="rtl"),Re)),style:pt,onMouseDown:Yr,onMouseUp:fn,onMouseEnter:Vn,onMouseLeave:qn,onContextMenu:Rr,onClick:jr},y.createElement("div",{className:b()("".concat(Me,"-input"),Object(S.a)({},"".concat(Me,"-input-placeholder"),!!Hr)),ref:aa},y.createElement("input",Object.assign({id:lt,tabIndex:tt,disabled:Tn,readOnly:Je||!wr,value:Hr||rn,onChange:function(pr){cn(pr.target.value)},autoFocus:Wt,placeholder:Sn,ref:ya,title:rn},In,{size:p(Pn,Ma[0])},ve(ne),{autoComplete:ma})),gr,Sr))))}var Qn=function(ne){Object(I.a)(Xe,ne);var Re=Object(F.a)(Xe);function Xe(){var Me;return Object(Y.a)(this,Xe),Me=Re.apply(this,arguments),Me.pickerRef=y.createRef(),Me.focus=function(){Me.pickerRef.current&&Me.pickerRef.current.focus()},Me.blur=function(){Me.pickerRef.current&&Me.pickerRef.current.blur()},Me}return Object(B.a)(Xe,[{key:"render",value:function(){return y.createElement(sr,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(y.Component),Zn=Qn;function kn(ne,Re,Xe){var Me=ne.picker,lt=ne.locale,tt=ne.selectedValue,pt=ne.disabledDate,mt=ne.disabled,Dt=ne.generateConfig,it=oe(tt,0),Jt=oe(tt,1);function Yt(Wt){var yn=Dt.getYear(Wt),Rn=Dt.locale.getWeek(lt.locale,Wt);return yn*100+Rn}function At(Wt){var yn=Dt.getYear(Wt),Rn=Dt.getMonth(Wt);return yn*100+Rn}function qt(Wt){var yn=Dt.getYear(Wt),Rn=xe(Dt,Wt);return yn*10+Rn}var Je=y.useCallback(function(Wt){if(pt&&pt(Wt))return!0;if(mt[1]&&Jt)return!ot(Dt,Wt,Jt)&&Dt.isAfter(Wt,Jt);if(Re&&Jt)switch(Me){case"quarter":return qt(Wt)>qt(Jt);case"month":return At(Wt)>At(Jt);case"week":return Yt(Wt)>Yt(Jt);default:return!ot(Dt,Wt,Jt)&&Dt.isAfter(Wt,Jt)}return!1},[pt,mt[1],Jt,Re]),tn=y.useCallback(function(Wt){if(pt&&pt(Wt))return!0;if(mt[0]&&it)return!ot(Dt,Wt,Jt)&&Dt.isAfter(it,Wt);if(Xe&&it)switch(Me){case"quarter":return qt(Wt)<qt(it);case"month":return At(Wt)<At(it);case"week":return Yt(Wt)<Yt(it);default:return!ot(Dt,Wt,it)&&Dt.isAfter(it,Wt)}return!1},[pt,mt[0],it,Xe]);return[Je,tn]}function vr(ne,Re,Xe,Me){var lt=Ie(ne,Xe,Me,1);function tt(pt){return pt(ne,Re)?"same":pt(lt,Re)?"closing":"far"}switch(Xe){case"year":return tt(function(pt,mt){return ut(Me,pt,mt)});case"quarter":case"month":return tt(function(pt,mt){return ie(Me,pt,mt)});default:return tt(function(pt,mt){return Ke(Me,pt,mt)})}}function Hn(ne,Re,Xe,Me){var lt=oe(ne,0),tt=oe(ne,1);if(Re===0)return lt;if(lt&&tt){var pt=vr(lt,tt,Xe,Me);switch(pt){case"same":return lt;case"closing":return lt;default:return Ie(tt,Xe,Me,-1)}}return lt}function ir(ne){var Re=ne.values,Xe=ne.picker,Me=ne.defaultDates,lt=ne.generateConfig,tt=y.useState(function(){return[oe(Me,0),oe(Me,1)]}),pt=Object(P.a)(tt,2),mt=pt[0],Dt=pt[1],it=y.useState(null),Jt=Object(P.a)(it,2),Yt=Jt[0],At=Jt[1],qt=oe(Re,0),Je=oe(Re,1);function tn(yn){return mt[yn]?mt[yn]:oe(Yt,yn)||Hn(Re,yn,Xe,lt)||qt||Je||lt.getNow()}function Wt(yn,Rn){if(yn){var Pn=fe(Yt,yn,Rn);Dt(fe(mt,null,Rn)||[null,null]);var Mt=(Rn+1)%2;oe(Re,Mt)||(Pn=fe(Pn,yn,Mt)),At(Pn)}else(qt||Je)&&At(null)}return[tn,Wt]}function lr(ne,Re){return ne&&ne[0]&&ne[1]&&Re.isAfter(ne[0],ne[1])?[ne[1],ne[0]]:ne}function Ln(ne,Re,Xe,Me){return ne||Me&&Me[Re]?!0:!!Xe[(Re+1)%2]}function Cr(ne){var Re,Xe,Me,lt=ne.prefixCls,tt=lt===void 0?"rc-picker":lt,pt=ne.id,mt=ne.style,Dt=ne.className,it=ne.popupStyle,Jt=ne.dropdownClassName,Yt=ne.transitionName,At=ne.dropdownAlign,qt=ne.getPopupContainer,Je=ne.generateConfig,tn=ne.locale,Wt=ne.placeholder,yn=ne.autoFocus,Rn=ne.disabled,Pn=ne.format,Mt=ne.picker,Ht=Mt===void 0?"date":Mt,Cn=ne.showTime,En=ne.use12Hours,wt=ne.separator,It=wt===void 0?"~":wt,kt=ne.value,Ct=ne.defaultValue,bt=ne.defaultPickerValue,Tn=ne.open,Zt=ne.defaultOpen,Sn=ne.disabledDate,dn=ne.disabledTime,Vt=ne.dateRender,wn=ne.panelRender,Gn=ne.ranges,yr=ne.allowEmpty,Wn=ne.allowClear,kr=ne.suffixIcon,Yr=ne.clearIcon,Bn=ne.pickerRef,Vn=ne.inputReadOnly,qn=ne.mode,Rr=ne.renderExtraFooter,jr=ne.onChange,$r=ne.onOpenChange,pa=ne.onPanelChange,ma=ne.onCalendarChange,ya=ne.onFocus,Va=ne.onBlur,Ma=ne.onOk,$a=ne.components,aa=ne.order,La=ne.direction,oi=ne.activePickerIndex,Pa=ne.autoComplete,qr=Pa===void 0?"off":Pa,xa=Ht==="date"&&!!Cn||Ht==="time",Sa=Object(y.useRef)({}),Le=Object(y.useRef)(null),et=Object(y.useRef)(null),at=Object(y.useRef)(null),je=Object(y.useRef)(null),ce=Object(y.useRef)(null),Ce=Object(y.useRef)(null),me=Object(y.useRef)(null),Ue=Z(h(Pn,Ht,Cn,En)),Ve=Object(u.a)(0,{value:oi}),st=Object(P.a)(Ve,2),$e=st[0],yt=st[1],Bt=Object(y.useRef)(null),rn=y.useMemo(function(){return Array.isArray(Rn)?Rn:[Rn||!1,Rn||!1]},[Rn]),cn=Object(u.a)(null,{value:kt,defaultValue:Ct,postState:function(Fn){return Ht==="time"&&!aa?Fn:lr(Fn,Je)}}),An=Object(P.a)(cn,2),zn=An[0],cr=An[1],hr=ir({values:zn,picker:Ht,defaultDates:bt,generateConfig:Je}),fn=Object(P.a)(hr,2),Ft=fn[0],Xt=fn[1],In=Object(u.a)(zn,{postState:function(Fn){var ur=Fn;if(rn[0]&&rn[1])return ur;for(var Ar=0;Ar<2;Ar+=1)rn[Ar]&&!oe(ur,Ar)&&!oe(yr,Ar)&&(ur=fe(ur,Je.getNow(),Ar));return ur}}),xn=Object(P.a)(In,2),er=xn[0],wr=xn[1],Jn=Object(u.a)([Ht,Ht],{value:qn}),pn=Object(P.a)(Jn,2),Dn=pn[0],gr=pn[1];Object(y.useEffect)(function(){gr([Ht,Ht])},[Ht]);var Sr=function(Fn,ur){gr(Fn),pa&&pa(ur,Fn)},Xn=kn({picker:Ht,selectedValue:er,locale:tn,disabled:rn,disabledDate:Sn,generateConfig:Je},Sa.current[1],Sa.current[0]),Dr=Object(P.a)(Xn,2),Qr=Dr[0],Pr=Dr[1],Hr=Object(u.a)(!1,{value:Tn,defaultValue:Zt,postState:function(Fn){return rn[$e]?!1:Fn},onChange:function(Fn){$r&&$r(Fn),!Fn&&Bt.current&&Bt.current.onClose&&Bt.current.onClose()}}),Fr=Object(P.a)(Hr,2),Ur=Fr[0],Nr=Fr[1],pr=Ur&&$e===0,da=Ur&&$e===1,Qa=Object(y.useState)(0),Na=Object(P.a)(Qa,2),wa=Na[0],ea=Na[1];Object(y.useEffect)(function(){!Ur&&Le.current&&ea(Le.current.offsetWidth)},[Ur]);var Gr=y.useRef();function Xr(_r,Fn){if(_r)clearTimeout(Gr.current),Sa.current[Fn]=!0,yt(Fn),Nr(_r),Ur||Xt(null,Fn);else if($e===Fn){Nr(_r);var ur=Sa.current;Gr.current=setTimeout(function(){ur===Sa.current&&(Sa.current={})})}}function ta(_r){Xr(!0,_r),setTimeout(function(){var Fn=[Ce,me][_r];Fn.current&&Fn.current.focus()},0)}function ja(_r,Fn){var ur=_r,Ar=oe(ur,0),oa=oe(ur,1);Ar&&oa&&Je.isAfter(Ar,oa)&&(Ht==="week"&&!Nt(Je,tn.locale,Ar,oa)||Ht==="quarter"&&!we(Je,Ar,oa)||Ht!=="week"&&Ht!=="quarter"&&Ht!=="time"&&!ot(Je,Ar,oa)?(Fn===0?(ur=[Ar,null],oa=null):(Ar=null,ur=[null,oa]),Sa.current=Object(S.a)({},Fn,!0)):(Ht!=="time"||aa!==!1)&&(ur=lr(ur,Je))),wr(ur);var vi=ur&&ur[0]?Je.locale.format(tn.locale,ur[0],Ue[0]):"",ai=ur&&ur[1]?Je.locale.format(tn.locale,ur[1],Ue[0]):"";if(ma){var Ra={range:Fn===0?"start":"end"};ma(ur,[vi,ai],Ra)}var Ya=Ln(Ar,0,rn,yr),gi=Ln(oa,1,rn,yr),Wi=ur===null||Ya&&gi;Wi&&(cr(ur),jr&&(!He(Je,oe(zn,0),Ar)||!He(Je,oe(zn,1),oa))&&jr(ur,[vi,ai]));var Ca=null;Fn===0&&!rn[1]?Ca=1:Fn===1&&!rn[0]&&(Ca=0),Ca!==null&&Ca!==$e&&(!Sa.current[Ca]||!oe(ur,Ca))&&oe(ur,Fn)?ta(Ca):Xr(!1,Fn)}var hi=function(Fn){return Ur&&Bt.current&&Bt.current.onKeyDown?Bt.current.onKeyDown(Fn):(Object(i.a)(!1,"Picker not correct forward KeyDown operation. Please help to fire issue about this."),!1)},si={formatList:Ue,generateConfig:Je,locale:tn},Vr=_n(oe(er,0),si),Ja=Object(P.a)(Vr,2),Za=Ja[0],Jr=Ja[1],zr=_n(oe(er,1),si),ba=Object(P.a)(zr,2),Pi=ba[0],no=ba[1],li=function(Fn,ur){var Ar=Je.locale.parse(tn.locale,Fn,Ue),oa=ur===0?Qr:Pr;Ar&&!oa(Ar)&&(wr(fe(er,Ar,ur)),Xt(Ar,ur))},Ci=rr({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=rr({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(y.useState)(null),ho=Object(P.a)(Ri,2),Yi=ho[0],Ai=ho[1],Di=Object(y.useState)(null),bi=Object(P.a)(Di,2),Ia=bi[0],fi=bi[1],pi=Nn(Si,{formatList:Ue,generateConfig:Je,locale:tn}),_i=Object(P.a)(pi,3),mi=_i[0],Xi=_i[1],$i=_i[2],Qi=Nn(Oi,{formatList:Ue,generateConfig:Je,locale:tn}),ki=Object(P.a)(Qi,3),ui=ki[0],Ei=ki[1],ro=ki[2],Ao=function(Fn){fi(fe(er,Fn,$e)),$e===0?Xi(Fn):Ei(Fn)},Do=function(){fi(fe(er,null,$e)),$e===0?$i():ro()},fo=function(Fn,ur){return{blurToCancel:xa,forwardKeyDown:hi,onBlur:Va,isClickOutside:function(oa){return!H([et.current,at.current,je.current],oa)},onFocus:function(oa){yt(Fn),ya&&ya(oa)},triggerOpen:function(oa){Xr(oa,Fn)},onSubmit:function(){ja(er,Fn),ur()},onCancel:function(){Xr(!1,Fn),wr(zn),ur()}}},ao=un(Object(R.a)(Object(R.a)({},fo(0,co)),{},{open:pr,value:Si})),po=Object(P.a)(ao,2),Ha=po[0],ca=po[1],Oa=ca.focused,ha=ca.typing,Ni=un(Object(R.a)(Object(R.a)({},fo(1,yi)),{},{open:da,value:Oi})),mo=Object(P.a)(Ni,2),qa=mo[0],io=mo[1],oo=io.focused,so=io.typing,xi=function(Fn){!Ur&&!Ce.current.contains(Fn.target)&&!me.current.contains(Fn.target)&&(rn[0]?rn[1]||ta(1):ta(0))},Ji=function(Fn){Ur&&(Oa||oo)&&!Ce.current.contains(Fn.target)&&!me.current.contains(Fn.target)&&Fn.preventDefault()},ji=zn&&zn[0]?Je.locale.format(tn.locale,zn[0],"YYYYMMDDHHmmss"):"",vo=zn&&zn[1]?Je.locale.format(tn.locale,zn[1],"YYYYMMDDHHmmss"):"";Object(y.useEffect)(function(){Ur||(wr(zn),!Za.length||Za[0]===""?Ii(""):Jr!==Si&&co(),!Pi.length||Pi[0]===""?Vi(""):no!==Oi&&yi())},[Ur,Za,Pi]),Object(y.useEffect)(function(){wr(zn)},[ji,vo]),Bn&&(Bn.current={focus:function(){Ce.current&&Ce.current.focus()},blur:function(){Ce.current&&Ce.current.blur(),me.current&&me.current.blur()}});var Zi=Object.keys(Gn||{}),Wr=Zi.map(function(_r){var Fn=Gn[_r],ur=typeof Fn=="function"?Fn():Fn;return{label:_r,onClick:function(){ja(ur,null),Xr(!1,$e)},onMouseEnter:function(){Ai(ur)},onMouseLeave:function(){Ai(null)}}});function Mr(){var _r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ur=null;Ur&&Ia&&Ia[0]&&Ia[1]&&Je.isAfter(Ia[1],Ia[0])&&(ur=Ia);var Ar=Cn;if(Cn&&Object(f.a)(Cn)==="object"&&Cn.defaultValue){var oa=Cn.defaultValue;Ar=Object(R.a)(Object(R.a)({},Cn),{},{defaultValue:oe(oa,$e)||void 0})}var vi=null;return Vt&&(vi=function(Ra,Ya){return Vt(Ra,Ya,{range:$e?"end":"start"})}),y.createElement(ct.Provider,{value:{inRange:!0,panelPosition:_r,rangedValue:Yi||er,hoverRangedValue:ur}},y.createElement(ee,Object.assign({},ne,Fn,{dateRender:vi,showTime:Ar,mode:Dn[$e],generateConfig:Je,style:void 0,direction:La,disabledDate:$e===0?Qr:Pr,disabledTime:function(Ra){return dn?dn(Ra,$e===0?"start":"end"):!1},className:b()(Object(S.a)({},"".concat(tt,"-panel-focused"),$e===0?!ha:!so)),value:oe(er,$e),locale:tn,tabIndex:-1,onPanelChange:function(Ra,Ya){Sr(fe(Dn,Ya,$e),fe(er,Ra,$e));var gi=Ra;_r==="right"&&Dn[$e]===Ya&&(gi=Ie(gi,Ya,Je,-1)),Xt(gi,$e)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:void 0,defaultPickerValue:void 0})))}var la=0,Ua=0;$e&&at.current&&ce.current&&et.current&&(la=at.current.offsetWidth+ce.current.offsetWidth,et.current.offsetWidth&&la>et.current.offsetWidth&&(Ua=la));var Mi=La==="rtl"?{right:la}:{left:la};function di(){var _r,Fn=G(tt,Dn[$e],Rr),ur=Q({prefixCls:tt,components:$a,needConfirmButton:xa,okDisabled:!oe(er,$e)||Sn&&Sn(er[$e]),locale:tn,rangeList:Wr,onOk:function(){oe(er,$e)&&(ja(er,$e),Ma&&Ma(er))}});if(Ht!=="time"&&!Cn){var Ar=Ft($e),oa=Ie(Ar,Ht,Je),vi=Dn[$e],ai=vi===Ht,Ra=Mr(ai?"left":!1,{pickerValue:Ar,onPickerValueChange:function(Ca){Xt(Ca,$e)}}),Ya=Mr("right",{pickerValue:oa,onPickerValueChange:function(Ca){Xt(Ie(Ca,Ht,Je,-1),$e)}});La==="rtl"?_r=y.createElement(y.Fragment,null,Ya,ai&&Ra):_r=y.createElement(y.Fragment,null,Ra,ai&&Ya)}else _r=Mr();var gi=y.createElement(y.Fragment,null,y.createElement("div",{className:"".concat(tt,"-panels")},_r),(Fn||ur)&&y.createElement("div",{className:"".concat(tt,"-footer")},Fn,ur));return wn&&(gi=wn(gi)),y.createElement("div",{className:"".concat(tt,"-panel-container"),style:{marginLeft:Ua},ref:et,onMouseDown:function(Ca){Ca.preventDefault()}},gi)}var Ui=y.createElement("div",{className:b()("".concat(tt,"-range-wrapper"),"".concat(tt,"-").concat(Ht,"-range-wrapper")),style:{minWidth:wa}},y.createElement("div",{className:"".concat(tt,"-range-arrow"),style:Mi}),di()),ci;kr&&(ci=y.createElement("span",{className:"".concat(tt,"-suffix")},kr));var _a;Wn&&(oe(zn,0)&&!rn[0]||oe(zn,1)&&!rn[1])&&(_a=y.createElement("span",{onMouseDown:function(Fn){Fn.preventDefault(),Fn.stopPropagation()},onMouseUp:function(Fn){Fn.preventDefault(),Fn.stopPropagation();var ur=zn;rn[0]||(ur=fe(ur,null,0)),rn[1]||(ur=fe(ur,null,1)),ja(ur,null),Xr(!1,$e)},className:"".concat(tt,"-clear")},Yr||y.createElement("span",{className:"".concat(tt,"-clear-btn")})));var Fi={size:p(Ht,Ue[0])},Bi=0,Hi=0;at.current&&je.current&&ce.current&&($e===0?Hi=at.current.offsetWidth:(Bi=la,Hi=je.current.offsetWidth));var Wa=La==="rtl"?{right:Bi}:{left:Bi},Br=function(Fn,ur){var Ar=fe(er,Fn,$e);ur==="submit"||ur!=="key"&&!xa?(ja(Ar,$e),$e===0?$i():ro()):wr(Ar)};return y.createElement(c.Provider,{value:{operationRef:Bt,hideHeader:Ht==="time",onDateMouseEnter:Ao,onDateMouseLeave:Do,hideRanges:!0,onSelect:Br,open:Ur}},y.createElement(Yn,{visible:Ur,popupElement:Ui,popupStyle:it,prefixCls:tt,dropdownClassName:Jt,dropdownAlign:At,getPopupContainer:qt,transitionName:Yt,range:!0,direction:La},y.createElement("div",Object.assign({ref:Le,className:b()(tt,"".concat(tt,"-range"),Dt,(Re={},Object(S.a)(Re,"".concat(tt,"-disabled"),rn[0]&&rn[1]),Object(S.a)(Re,"".concat(tt,"-focused"),$e===0?Oa:oo),Object(S.a)(Re,"".concat(tt,"-rtl"),La==="rtl"),Re)),style:mt,onClick:xi,onMouseDown:Ji},ve(ne)),y.createElement("div",{className:b()("".concat(tt,"-input"),(Xe={},Object(S.a)(Xe,"".concat(tt,"-input-active"),$e===0),Object(S.a)(Xe,"".concat(tt,"-input-placeholder"),!!mi),Xe)),ref:at},y.createElement("input",Object.assign({id:pt,disabled:rn[0],readOnly:Vn||!ha,value:mi||Si,onChange:function(Fn){Ii(Fn.target.value)},autoFocus:yn,placeholder:oe(Wt,0)||"",ref:Ce},Ha,Fi,{autoComplete:qr}))),y.createElement("div",{className:"".concat(tt,"-range-separator"),ref:ce},It),y.createElement("div",{className:b()("".concat(tt,"-input"),(Me={},Object(S.a)(Me,"".concat(tt,"-input-active"),$e===1),Object(S.a)(Me,"".concat(tt,"-input-placeholder"),!!ui),Me)),ref:je},y.createElement("input",Object.assign({disabled:rn[1],readOnly:Vn||!so,value:ui||Oi,onChange:function(Fn){Vi(Fn.target.value)},placeholder:oe(Wt,1)||"",ref:me},qa,Fi,{autoComplete:qr}))),y.createElement("div",{className:"".concat(tt,"-active-bar"),style:Object(R.a)(Object(R.a)({},Wa),{},{width:Hi,position:"absolute"})}),ci,_a)))}var Lr=function(ne){Object(I.a)(Xe,ne);var Re=Object(F.a)(Xe);function Xe(){var Me;return Object(Y.a)(this,Xe),Me=Re.apply(this,arguments),Me.pickerRef=y.createRef(),Me.focus=function(){Me.pickerRef.current&&Me.pickerRef.current.focus()},Me.blur=function(){Me.pickerRef.current&&Me.pickerRef.current.blur()},Me}return Object(B.a)(Xe,[{key:"render",value:function(){return y.createElement(Cr,Object.assign({},this.props,{pickerRef:this.pickerRef}))}}]),Xe}(y.Component),Tr=Lr,fr=J.b=Zn},osHv:function(We,J,L){(function(Y){Y(L("VrN/"))})(function(Y){"use strict";var B=Y.Pos;function I(l,n){return l.line-n.line||l.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",S=F+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",R=new RegExp("<(/?)(["+F+"]["+S+"]*)","g");function P(l,n,s,d){this.line=n,this.ch=s,this.cm=l,this.text=l.getLine(n),this.min=d?Math.max(d.from,l.firstLine()):l.firstLine(),this.max=d?Math.min(d.to-1,l.lastLine()):l.lastLine()}function y(l,n){var s=l.cm.getTokenTypeAt(B(l.line,n));return s&&/\btag\b/.test(s)}function t(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function b(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function i(l){for(;;){var n=l.text.indexOf(">",l.ch);if(n==-1){if(t(l))continue;return}if(!y(l,n+1)){l.ch=n+1;continue}var s=l.text.lastIndexOf("/",n),d=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,d?"selfClose":"regular"}}function u(l){for(;;){var n=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(n==-1){if(b(l))continue;return}if(!y(l,n+1)){l.ch=n;continue}R.lastIndex=n,l.ch=n;var s=R.exec(l.text);if(s&&s.index==n)return s}}function f(l){for(;;){R.lastIndex=l.ch;var n=R.exec(l.text);if(!n){if(t(l))continue;return}if(!y(l,n.index+1)){l.ch=n.index+1;continue}return l.ch=n.index+n[0].length,n}}function a(l){for(;;){var n=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(n==-1){if(b(l))continue;return}if(!y(l,n+1)){l.ch=n;continue}var s=l.text.lastIndexOf("/",n),d=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,d?"selfClose":"regular"}}function o(l,n){for(var s=[];;){var d=f(l),E,A=l.line,C=l.ch-(d?d[0].length:0);if(!d||!(E=i(l)))return;if(E=="selfClose")continue;if(d[1]){for(var k=s.length-1;k>=0;--k)if(s[k]==d[2]){s.length=k;break}if(k<0&&(!n||n==d[2]))return{tag:d[2],from:B(A,C),to:B(l.line,l.ch)}}else s.push(d[2])}}function c(l,n){for(var s=[];;){var d=a(l);if(!d)return;if(d=="selfClose"){u(l);continue}var E=l.line,A=l.ch,C=u(l);if(!C)return;if(C[1])s.push(C[2]);else{for(var k=s.length-1;k>=0;--k)if(s[k]==C[2]){s.length=k;break}if(k<0&&(!n||n==C[2]))return{tag:C[2],from:B(l.line,l.ch),to:B(E,A)}}}}Y.registerHelper("fold","xml",function(l,n){for(var s=new P(l,n.line,0);;){var d=f(s);if(!d||s.line!=n.line)return;var E=i(s);if(!E)return;if(!d[1]&&E!="selfClose"){var A=B(s.line,s.ch),C=o(s,d[2]);return C&&I(C.from,A)>0?{from:A,to:C.from}:null}}}),Y.findMatchingTag=function(l,n,s){var d=new P(l,n.line,n.ch,s);if(d.text.indexOf(">")==-1&&d.text.indexOf("<")==-1)return;var E=i(d),A=E&&B(d.line,d.ch),C=E&&u(d);if(!E||!C||I(d,n)>0)return;var k={from:B(d.line,d.ch),to:A,tag:C[2]};return E=="selfClose"?{open:k,close:null,at:"open"}:C[1]?{open:c(d,C[2]),close:k,at:"close"}:(d=new P(l,A.line,A.ch,s),{open:k,close:o(d,C[2]),at:"open"})},Y.findEnclosingTag=function(l,n,s,d){for(var E=new P(l,n.line,n.ch,s);;){var A=c(E,d);if(!A)break;var C=new P(l,n.line,n.ch,s),k=o(C,A.tag);if(k)return{open:A,close:k}}},Y.scanForClosingTag=function(l,n,s,d){var E=new P(l,n.line,n.ch,d?{from:0,to:d}:null);return o(E,s)}})},p5ED:function(We,J,L){"use strict";var Y=L("+L6B"),B=L("2/Rp"),I=L("5Dmo"),F=L("3S7+"),S=L("k1fw"),R=L("9og8"),P=L("tJVT"),y=L("WmNS"),t=L.n(y),b=L("q1tI"),i=L.n(b),u=L("vHTk"),f=L.n(u),a=L("yEEn"),o=L("ZW9T"),c=L("1vsH"),l=L("V0Rq"),n=L("m3rI");J.a=function(s){var d,E,A,C,k,w,g,h=s.editOffice,p=h===void 0?"view":h,m=s.data,_=s.theme,x=s.type,v=s.filename,j=s.monacoEditor,U=s.className,T=s.style,z=s.close,H=s.onClose,M=s.hasMask,V=s.disabledDownload,K=Object(b.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),$=Object(P.a)(K,2),Z=$[0],ve=$[1],oe=Object(b.useState)(""),fe=Object(P.a)(oe,2),ye=fe[0],Pe=fe[1],ge=Object(b.useState)(),de=Object(P.a)(ge,2),Qe=de[0],St=de[1],Ee=window.ENV==="build"?"/react/build":"",De=n.a.PROXY_SERVER||location.origin,rt,Be=1024*1024,ke=10*Be,ut=Object(b.useRef)();(d=m)!==null&&d!==void 0&&d.startsWith("/api")&&x!=="txt"&&(m=n.a.API_SERVER+m),x==="office"&&(rt=Object(c.T)(m).filesize,rt>ke&&(x="other")),v&&j&&(j.filename=v),Object(b.useEffect)(function(){var Ke,ot,gt=(Ke=document.cookie)===null||Ke===void 0||((ot=Ke.replace(/\s/g,""))===null||ot===void 0)?void 0:ot.split(";");gt==null||gt.map(function(Nt){var He=Nt.split("=");He[0]==="_educoder_session"&&Pe(He[1])})},[]),Object(b.useEffect)(function(){x==="office"&&ie()},[x,m]);var ie=function(){var Ke=Object(R.a)(t.a.mark(function ot(){var gt,Nt,He;return t.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return console.log("data:",m),gt=m,m.startsWith("http")||(gt=location.origin+gt),Nt=new URL(gt).pathname.split("/").pop(),$t.next=6,Object(l.V)({attachment_id:Nt});case 6:He=$t.sent,St(He);case 8:case"end":return $t.stop()}},ot)}));return function(){return Ke.apply(this,arguments)}}(),xe=function(){if(m.startsWith("http")||m.startsWith("blob:")){we();return}Object(c.z)(v||"educoder",m,v)},we=function(){Object(c.x)(v||"educoder",decodeURIComponent(m))};return i.a.createElement("div",{style:Object(S.a)({},T||{}),className:"".concat(M&&f.a.bgBlack," ").concat(x?f.a.wrp:"hide")},z&&i.a.createElement("div",{className:f.a.close,ref:ut},!V&&i.a.createElement(F.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ut.current}},i.a.createElement("span",{onClick:we},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(F.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ut.current}},i.a.createElement("span",{className:"",onClick:H},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(f.a[U]," ").concat(U," ").concat(f.a.monaco," ").concat(x==="txt"?"show":"hide")},x==="txt"&&i.a.createElement(o.b,j)),x==="audio"&&i.a.createElement("audio",{src:"".concat(((E=m)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((A=m)===null||A===void 0?void 0:A.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(m),autoPlay:!0}),x==="video"&&i.a.createElement(i.a.Fragment,null,((C=m)===null||C===void 0?void 0:C.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(m),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})),x==="office"&&Qe&&i.a.createElement("iframe",{src:"".concat(Ee,"/office.html?key=").concat(Qe.key,"&url=").concat(De+Qe.url,"&callbackUrl=").concat(De+Qe.callbackUrl,"&fileType=").concat(Qe.fileType,"&title=").concat(Qe.title,"&model=").concat(p,"&officeServer=").concat(n.a.OFFICE_SERVER,"&disabledDownload=").concat(!!V)}),x==="html"&&i.a.createElement("iframe",{src:m+"&disposition=inline"}),x==="pdf"&&i.a.createElement("iframe",{src:"".concat(Ee,"/js/pdfview/index.html?url=").concat(m,"&disabledDownload=").concat(!!V)}),x==="image"&&i.a.createElement("img",{src:"".concat(((k=m)===null||k===void 0?void 0:k.indexOf("http://"))>-1||((w=m)===null||w===void 0?void 0:w.indexOf("https://"))>-1||(g=m)!==null&&g!==void 0&&g.startsWith("/api")?"":"data:image/png;base64,").concat(m)}),x==="other"&&i.a.createElement("div",null,i.a.createElement(B.a,{type:"primary",size:"large",onClick:xe},i.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),x==="download"&&i.a.createElement(B.a,{type:"primary",size:"large",onClick:xe},i.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(We,J,L){},pmY6:function(We,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 o}),L.d(J,"b",function(){return c}),L.d(J,"a",function(){return l}),L.d(J,"d",function(){return n}),L.d(J,"c",function(){return s});var Y=L("C/vA"),B=L("JYp7");const I=!1;let F=null;function S(d){F=d}if(I){const d="__is_disposable_tracked__";S(new class{trackDisposable(E){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[d]||console.log(A)},3e3)}setParent(E,A){if(E&&E!==l.None)try{E[d]=!0}catch(C){}}markAsDisposed(E){if(E&&E!==l.None)try{E[d]=!0}catch(A){}}markAsSingleton(E){}})}function R(d){return F==null||F.trackDisposable(d),d}function P(d){F==null||F.markAsDisposed(d)}function y(d,E){F==null||F.setParent(d,E)}function t(d,E){if(!F)return;for(const A of d)F.setParent(A,E)}function b(d){return F==null||F.markAsSingleton(d),d}class i extends Error{constructor(d){super(`Encountered errors while disposing of store. Errors: [${d.join(", ")}]`);this.errors=d}}function u(d){return typeof d.dispose=="function"&&d.dispose.length===0}function f(d){if(B.a.is(d)){let E=[];for(const A of d)if(A)try{A.dispose()}catch(C){E.push(C)}if(E.length===1)throw E[0];if(E.length>1)throw new i(E);return Array.isArray(d)?[]:d}else if(d)return d.dispose(),d}function a(...d){const E=o(()=>f(d));return t(d,E),E}function o(d){const E=R({dispose:Object(Y.a)(()=>{P(E),d()})});return E}class c{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(d){if(!d)return d;if(d===this)throw new Error("Cannot register a disposable on itself!");return y(d,this),this._isDisposed?c.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(d),d}}c.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new c,R(this),y(this._store,this)}dispose(){P(this),this._store.dispose()}_register(d){if(d===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(d)}}l.None=Object.freeze({dispose(){}});class n{constructor(){this._isDisposed=!1,R(this)}get value(){return this._isDisposed?void 0:this._value}set value(d){var E;if(this._isDisposed||d===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),d&&y(d,this),this._value=d}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,P(this),(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}clearAndLeak(){const d=this._value;return this._value=void 0,d&&y(d,null),d}}class s{constructor(d){this.object=d}dispose(){}}},psGv:function(We,J,L){var Y,B;(function(){var I;(function(){"use strict";var P=[,,function(i){function u(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}u.prototype.clone_empty=function(){var o=new u(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},u.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},u.prototype.has_match=function(o){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(o))return!0;return!1},u.prototype.set_indent=function(o,c){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=c||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 o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},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(o){this.__items.push(o);var c=o.lastIndexOf(`
|
|
`);c!==-1?this.__character_count=o.length-c:this.__character_count+=o.length},u.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},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 o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function f(o,c){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),c=c||"",o.indent_level>0&&(c=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}f.prototype.get_indent_size=function(o,c){var l=this.__base_string_length;return c=c||0,o<0&&(l=0),l+=o*this.__indent_size,l+=c,l},f.prototype.get_indent_string=function(o,c){var l=this.__base_string;return c=c||0,o<0&&(o=0,l=""),c+=o*this.__indent_size,this.__ensure_cache(c),l+=this.__cache[c],l},f.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var o=this.__cache.length,c=0,l="";this.__indent_size&&o>=this.__indent_size&&(c=Math.floor(o/this.__indent_size),o-=c*this.__indent_size,l=new Array(c+1).join(this.__indent_string)),o&&(l+=new Array(o+1).join(" ")),this.__cache.push(l)};function a(o,c){this.__indent_cache=new f(o,c),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new 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(o,c){return this.__indent_cache.get_indent_string(o,c)},a.prototype.get_indent_size=function(o,c){return this.__indent_cache.get_indent_size(o,c)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(o){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
|
|
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
|
|
`);return o!==`
|
|
`&&(l=l.replace(/[\n]/g,o)),l},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(o,c){return o=o||0,c=c||0,this.next_line.set_indent(o,c),this.__lines.length>1?(this.current_line.set_indent(o,c),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(o){for(var c=0;c<o.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},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(o){for(var c=this.__lines.length;o<c;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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(o,c){for(var l=this.__lines.length-2;l>=0;){var n=this.__lines[l];if(n.is_empty())break;if(n.item(0).indexOf(o)!==0&&n.item(-1)!==c){this.__lines.splice(l+1,0,new u(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},i.exports.Output=a},function(i){function u(f,a,o,c){this.type=f,this.text=a,this.comments_before=null,this.newlines=o||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=u},,,function(i){function u(o,c){this.raw_options=f(o,c),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(o,c){var l=this.raw_options[o],n=c||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(n=l.concat()):typeof l=="string"&&(n=l.split(/[^a-zA-Z0-9_\/\-]+/)),n},u.prototype._get_boolean=function(o,c){var l=this.raw_options[o],n=l===void 0?!!c:!!l;return n},u.prototype._get_characters=function(o,c){var l=this.raw_options[o],n=c||"";return typeof l=="string"&&(n=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),n},u.prototype._get_number=function(o,c){var l=this.raw_options[o];c=parseInt(c,10),isNaN(c)&&(c=0);var n=parseInt(l,10);return isNaN(n)&&(n=c),n},u.prototype._get_selection=function(o,c,l){var n=this._get_selection_list(o,c,l);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[o]+"'");return n[0]},u.prototype._get_selection_list=function(o,c,l){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[c[0]],!this._is_valid_selection(l,c))throw new Error("Invalid Default Value!");var n=this._get_array(o,l);if(!this._is_valid_selection(n,c))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
`+c+`
|
|
You passed in: '`+this.raw_options[o]+"'");return n},u.prototype._is_valid_selection=function(o,c){return o.length&&c.length&&!o.some(function(l){return c.indexOf(l)===-1})};function f(o,c){var l={};o=a(o);var n;for(n in o)n!==c&&(l[n]=o[n]);if(c&&o[c])for(n in o[c])l[n]=o[c][n];return l}function a(o){var c={},l;for(l in o){var n=l.replace(/-/g,"_");c[n]=o[l]}return c}i.exports.Options=u,i.exports.normalizeOpts=a,i.exports.mergeOpts=f},,function(i){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 o=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(o=this.__input.charAt(a)),o},f.prototype.__match=function(a,o){a.lastIndex=o;var c=a.exec(this.__input);return c&&!(u&&a.sticky)&&(c.index!==o&&(c=null)),c},f.prototype.test=function(a,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(a,o):!1},f.prototype.testChar=function(a,o){var c=this.peek(o);return a.lastIndex=0,c!==null&&a.test(c)},f.prototype.match=function(a){var o=this.__match(a,this.__position);return o?this.__position+=o[0].length:o=null,o},f.prototype.read=function(a,o,c){var l="",n;return a&&(n=this.match(a),n&&(l+=n[0])),o&&(n||!a)&&(l+=this.readUntil(o,c)),l},f.prototype.readUntil=function(a,o){var c="",l=this.__position;a.lastIndex=this.__position;var n=a.exec(this.__input);return n?(l=n.index,o&&(l+=n[0].length)):l=this.__input_length,c=this.__input.substring(this.__position,l),this.__position=l,c},f.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},f.prototype.get_regexp=function(a,o){var c=null,l="g";return o&&u&&(l="y"),typeof a=="string"&&a!==""?c=new RegExp(a,l):a&&(c=new RegExp(a.source,l)),c},f.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(a){var o=this.__position,c=this.readUntilAfter(a);return this.__position=o,c},f.prototype.lookBack=function(a){var o=this.__position-1;return o>=a.length&&this.__input.substring(o-a.length,o).toLowerCase()===a},i.exports.InputScanner=f},function(i,u,f){var a=f(8).InputScanner,o=f(3).Token,c=f(10).TokenStream,l=f(11).WhitespacePattern,n={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(d,E){this._input=new a(d),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var d,E=new o(n.START,""),A=null,C=[],k=new c;E.type!==n.EOF;){for(d=this._get_next_token(E,A);this._is_comment(d);)k.add(d),d=this._get_next_token(E,A);k.isEmpty()||(d.comments_before=k,k=new c),d.parent=A,this._is_opening(d)?(C.push(A),A=d):A&&this._is_closing(d,A)&&(d.opened=A,A.closed=d,A=C.pop(),d.parent=A),d.previous=E,E.next=d,this.__tokens.add(d),E=d}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(d,E){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(n.RAW,A):this._create_token(n.EOF,"")},s.prototype._is_comment=function(d){return!1},s.prototype._is_opening=function(d){return!1},s.prototype._is_closing=function(d,E){return!1},s.prototype._create_token=function(d,E){var A=new o(d,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=s,i.exports.TOKEN=n},function(i){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},i.exports.TokenStream=u},function(i,u,f){var a=f(12).Pattern;function o(c,l){a.call(this,c,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new a,o.prototype.__set_whitespace_patterns=function(c,l){c+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var c=this._input.read(this._match_pattern);if(c===" ")this.whitespace_before_token=" ";else if(c){var l=this.__split(this._newline_regexp,c);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return c},o.prototype.matching=function(c,l){var n=this._create();return n.__set_whitespace_patterns(c,l),n._update(),n},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(c,l){c.lastIndex=0;for(var n=0,s=[],d=c.exec(l);d;)s.push(l.substring(n,d.index)),n=d.index+d[0].length,d=c.exec(l);return n<l.length?s.push(l.substring(n,l.length)):s.push(""),s},i.exports.WhitespacePattern=o},function(i){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(){},i.exports.Pattern=u},function(i){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 o=this.__directive_pattern.exec(f);o;)a[o[1]]=o[2],o=this.__directive_pattern.exec(f);return a},u.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=u},function(i,u,f){var a=f(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(l,n){a.call(this,l,n),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),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 s=new a(l);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}/)}}c.prototype=new a,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(l){var n=this._create();return n._disabled[l]=!0,n._update(),n},c.prototype.read_options=function(l){var n=this._create();for(var s in o)n._disabled[s]=l.templating.indexOf(s)===-1;return n._update(),n},c.prototype.exclude=function(l){var n=this._create();return n._excluded[l]=!0,n._update(),n},c.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var n=this._read_template();n;)this._match_pattern?n+=this._input.read(this._match_pattern):n+=this._input.readUntil(this.__template_pattern),l+=n,n=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},c.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},c.prototype._read_template=function(){var l="",n=this._input.peek();if(n==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(l=l||this.__patterns.erb.read())}else n==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},i.exports.TemplatablePattern=c},,,,function(i,u,f){var a=f(19).Beautifier,o=f(20).Options;function c(l,n,s,d){var E=new a(l,n,s,d);return E.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new o}},function(i,u,f){var a=f(20).Options,o=f(2).Output,c=f(21).Tokenizer,l=f(21).TOKEN,n=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,d=function(_,x){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=_.max_preserve_newlines,this.preserve_newlines=_.preserve_newlines,this._output=new o(_,x)};d.prototype.current_line_has_match=function(_){return this._output.current_line.has_match(_)},d.prototype.set_space_before_token=function(_,x){this._output.space_before_token=_,this._output.non_breaking_space=x},d.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},d.prototype.add_raw_token=function(_){this._output.add_raw_token(_)},d.prototype.print_preserved_newlines=function(_){var x=0;_.type!==l.TEXT&&_.previous.type!==l.TEXT&&(x=_.newlines?1:0),this.preserve_newlines&&(x=_.newlines<this.max_preserve_newlines+1?_.newlines:this.max_preserve_newlines+1);for(var v=0;v<x;v++)this.print_newline(v>0);return x!==0},d.prototype.traverse_whitespace=function(_){return _.whitespace_before||_.newlines?(this.print_preserved_newlines(_)||(this._output.space_before_token=!0),!0):!1},d.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},d.prototype.print_newline=function(_){this._output.add_new_line(_)},d.prototype.print_token=function(_){_.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(_.text))},d.prototype.indent=function(){this.indent_level++},d.prototype.get_full_indent=function(_){return _=this.indent_level+(_||0),_<1?"":this._output.get_indent_string(_)};var E=function(_){for(var x=null,v=_.next;v.type!==l.EOF&&_.closed!==v;){if(v.type===l.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===l.EQUALS&&v.next.next&&v.next.next.type===l.VALUE&&(x=v.next.next.text);break}v=v.next}return x},A=function(_,x){var v=null,j=null;return x.closed?(_==="script"?v="text/javascript":_==="style"&&(v="text/css"),v=E(x)||v,v.search("text/css")>-1?j="css":v.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?j="javascript":v.search(/(text|application|dojo)\/(x-)?(html)/)>-1?j="html":v.search(/test\/null/)>-1&&(j="null"),j):null};function C(_,x){return x.indexOf(_)!==-1}function k(_,x,v){this.parent=_||null,this.tag=x?x.tag_name:"",this.indent_level=v||0,this.parser_token=x||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 x=new k(this._current_frame,_,this._printer.indent_level);this._current_frame=x},w.prototype._try_pop_frame=function(_){var x=null;return _&&(x=_.parser_token,this._printer.indent_level=_.indent_level,this._current_frame=_.parent),x},w.prototype._get_frame=function(_,x){for(var v=this._current_frame;v&&!(_.indexOf(v.tag)!==-1);){if(x&&x.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},w.prototype.try_pop=function(_,x){var v=this._get_frame([_],x);return this._try_pop_frame(v)},w.prototype.indent_to_tag=function(_){var x=this._get_frame(_);x&&(this._printer.indent_level=x.indent_level)};function g(_,x,v,j){this._source_text=_||"",x=x||{},this._js_beautify=v,this._css_beautify=j,this._tag_stack=null;var U=new a(x,"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"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,x=this._options.eol;this._options.eol==="auto"&&(x=`
|
|
`,_&&n.test(_)&&(x=_.match(n)[0])),_=_.replace(s,`
|
|
`);var v=_.match(/^[\t ]*/)[0],j={text:"",type:""},U=new h,T=new d(this._options,v),z=new c(_,this._options).tokenize();this._tag_stack=new w(T);for(var H=null,M=z.next();M.type!==l.EOF;)M.type===l.TAG_OPEN||M.type===l.COMMENT?(H=this._handle_tag_open(T,M,U,j),U=H):M.type===l.ATTRIBUTE||M.type===l.EQUALS||M.type===l.VALUE||M.type===l.TEXT&&!U.tag_complete?H=this._handle_inside_tag(T,M,U,z):M.type===l.TAG_CLOSE?H=this._handle_tag_close(T,M,U):M.type===l.TEXT?H=this._handle_text(T,M,U):T.add_raw_token(M),j=H,M=z.next();var V=T._output.get_code(x);return V},g.prototype._handle_tag_close=function(_,x,v){var j={text:x.text,type:x.type};return _.alignment_size=0,v.tag_complete=!0,_.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),v.is_unformatted?_.add_raw_token(x):(v.tag_start_char==="<"&&(_.set_space_before_token(x.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&_.print_newline(!1)),_.print_token(x)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(_.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&_.set_wrap_point(),j},g.prototype._handle_inside_tag=function(_,x,v,j){var U=v.has_wrapped_attrs,T={text:x.text,type:x.type};if(_.set_space_before_token(x.newlines||x.whitespace_before!=="",!0),v.is_unformatted)_.add_raw_token(x);else if(v.tag_start_char==="{"&&x.type===l.TEXT)_.print_preserved_newlines(x)?(x.newlines=0,_.add_raw_token(x)):_.print_token(x);else{if(x.type===l.ATTRIBUTE?(_.set_space_before_token(!0),v.attr_count+=1):(x.type===l.EQUALS||x.type===l.VALUE&&x.previous.type===l.EQUALS)&&_.set_space_before_token(!1),x.type===l.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(_.traverse_whitespace(x),U=U||x.newlines!==0),this._is_wrap_attributes_force)){var z=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var H=!0,M=0,V;do{if(V=j.peek(M),V.type===l.ATTRIBUTE){H=!1;break}M+=1}while(M<4&&V.type!==l.EOF&&V.type!==l.TAG_CLOSE);z=!H}z&&(_.print_newline(!1),U=!0)}_.print_token(x),U=U||_.previous_token_wrapped(),v.has_wrapped_attrs=U}return T},g.prototype._handle_text=function(_,x,v){var j={text:x.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(_,x,v):v.is_unformatted||v.is_content_unformatted?_.add_raw_token(x):(_.traverse_whitespace(x),_.print_token(x)),j},g.prototype._print_custom_beatifier_text=function(_,x,v){var j=this;if(x.text!==""){var U=x.text,T,z=1,H="",M="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:v.custom_beautifier_name==="html"&&(T=function(oe,fe){var ye=new g(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]*$/,""),v.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(x);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&&(x.whitespace_before=K[0]))}if(U)if(T){var $=function(){this.eol=`
|
|
`};$.prototype=this._options.raw_options;var Z=new $;U=T(V+U,Z)}else{var ve=x.whitespace_before;ve&&(U=U.replace(new RegExp(`
|
|
(`+ve+")?","g"),`
|
|
`)),U=V+U.replace(/\n/g,`
|
|
`+V)}H&&(U?U=H+U+`
|
|
`+M:U=H+M),_.print_newline(!1),U&&(x.text=U,x.whitespace_before="",x.newlines=0,_.add_raw_token(x),_.print_newline(!0))}},g.prototype._handle_tag_open=function(_,x,v,j){var U=this._get_tag_open_token(x);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&x.type===l.TAG_OPEN&&x.text.indexOf("</")===0?(_.add_raw_token(x),U.start_tag_token=this._tag_stack.try_pop(U.tag_name)):(_.traverse_whitespace(x),this._set_tag_position(_,x,U,v,j),U.is_inline_element||_.set_wrap_point(),_.print_token(x)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(U.alignment_size=x.text.length+1),!U.tag_complete&&!U.is_unformatted&&(_.alignment_size=U.alignment_size),U};var h=function(_,x){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="",!x)this.tag_complete=!0;else{var v;this.tag_start_char=x.text[0],this.text=x.text,this.tag_start_char==="<"?(v=x.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=x.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(x.text.startsWith("{{#>")||x.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&x.next!==null?this.tag_check=x.next.text.split(" ")[0]:this.tag_check=x.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),x.type===l.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||x.closed&&x.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)))}};g.prototype._get_tag_open_token=function(_){var x=new h(this._tag_stack.get_parser_token(),_);return x.alignment_size=this._options.wrap_attributes_indent_size,x.is_end_tag=x.is_end_tag||C(x.tag_check,this._options.void_elements),x.is_empty_element=x.tag_complete||x.is_start_tag&&x.is_end_tag,x.is_unformatted=!x.tag_complete&&C(x.tag_check,this._options.unformatted),x.is_content_unformatted=!x.is_empty_element&&C(x.tag_check,this._options.content_unformatted),x.is_inline_element=C(x.tag_name,this._options.inline)||x.tag_name.includes("-")||x.tag_start_char==="{",x},g.prototype._set_tag_position=function(_,x,v,j,U){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||_.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=A(v.tag_check,x)))),C(v.tag_check,this._options.extra_liners)&&(_.print_newline(!1),_._output.just_added_blankline()||_.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var T=_.current_line_has_match(/{{#if/);T||_.print_newline(!1)}v.tag_name==="!--"&&U.type===l.TAG_CLOSE&&j.is_end_tag&&v.text.indexOf(`
|
|
`)===-1||(v.is_inline_element||v.is_unformatted||_.print_newline(!1),this._calcluate_parent_multiline(_,v))}else if(v.is_end_tag){var z=!1;z=v.start_tag_token&&v.start_tag_token.multiline_content,z=z||!v.is_inline_element&&!(j.is_inline_element||j.is_unformatted)&&!(U.type===l.TAG_CLOSE&&v.start_tag_token===j)&&U.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(z=!1),z&&_.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(U.type!=="TK_CONTENT"||v.is_content_unformatted)&&_.print_newline(!1),this._calcluate_parent_multiline(_,v)},g.prototype._calcluate_parent_multiline=function(_,x){x.parent&&_._output.just_added_newline()&&!((x.is_inline_element||x.is_unformatted)&&x.parent.is_inline_element)&&(x.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"],m=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(_){var x=null;if(_.is_empty_element||!_.is_start_tag||!_.parent)return;if(_.tag_name==="body")x=x||this._tag_stack.try_pop("head");else if(_.tag_name==="li")x=x||this._tag_stack.try_pop("li",["ol","ul"]);else if(_.tag_name==="dd"||_.tag_name==="dt")x=x||this._tag_stack.try_pop("dt",["dl"]),x=x||this._tag_stack.try_pop("dd",["dl"]);else if(_.parent.tag_name==="p"&&p.indexOf(_.tag_name)!==-1){var v=_.parent.parent;(!v||m.indexOf(v.tag_name)===-1)&&(x=x||this._tag_stack.try_pop("p"))}else _.tag_name==="rp"||_.tag_name==="rt"?(x=x||this._tag_stack.try_pop("rt",["ruby","rtc"]),x=x||this._tag_stack.try_pop("rp",["ruby","rtc"])):_.tag_name==="optgroup"?x=x||this._tag_stack.try_pop("optgroup",["select"]):_.tag_name==="option"?x=x||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):_.tag_name==="colgroup"?x=x||this._tag_stack.try_pop("caption",["table"]):_.tag_name==="thead"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"])):_.tag_name==="tbody"||_.tag_name==="tfoot"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("thead",["table"]),x=x||this._tag_stack.try_pop("tbody",["table"])):_.tag_name==="tr"?(x=x||this._tag_stack.try_pop("caption",["table"]),x=x||this._tag_stack.try_pop("colgroup",["table"]),x=x||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(_.tag_name==="th"||_.tag_name==="td")&&(x=x||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),x=x||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return _.parent=this._tag_stack.get_parser_token(),x},i.exports.Beautifier=g},function(i,u,f){var a=f(6).Options;function o(c){a.call(this,c,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new a,i.exports.Options=o},function(i,u,f){var a=f(9).Tokenizer,o=f(9).TOKEN,c=f(13).Directives,l=f(14).TemplatablePattern,n=f(12).Pattern,s={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},d=new c(/<\!--/,/-->/),E=function(A,C){a.call(this,A,C),this._current_tag_name="";var k=new l(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 g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=w.matching(g).until_after(g)}};E.prototype=new a,E.prototype._is_comment=function(A){return!1},E.prototype._is_opening=function(A){return A.type===s.TAG_OPEN},E.prototype._is_closing=function(A,C){return A.type===s.TAG_CLOSE&&C&&((A.text===">"||A.text==="/>")&&C.text[0]==="<"||A.text==="}}"&&C.text[0]==="{"&&C.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(A,C){var k=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(s.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(s.UNKNOWN,this._input.next()),k)},E.prototype._read_comment_or_cdata=function(A){var C=null,k=null,w=null;if(A==="<"){var g=this._input.peek(1);g==="!"&&(k=this.__patterns.comment.read(),k?(w=d.get_directives(k),w&&w.ignore==="start"&&(k+=d.readIgnored(this._input))):k=this.__patterns.cdata.read()),k&&(C=this._create_token(s.COMMENT,k),C.directives=w)}return C},E.prototype._read_processing=function(A){var C=null,k=null,w=null;if(A==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(k=this.__patterns.conditional_comment.read(),k=k||this.__patterns.processing.read()),k&&(C=this._create_token(s.COMMENT,k),C.directives=w)}return C},E.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(s.TAG_OPEN,k)),w},E.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(s.COMMENT,k)):(k=this.__patterns.handlebars_open.read(),w=this._create_token(s.TAG_OPEN,k))),w},E.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(s.TAG_CLOSE,k)):C.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),w=this._create_token(s.TAG_CLOSE,"}}"))),w},E.prototype._read_attribute=function(A,C,k){var w=null,g="";if(k&&k.text[0]==="<")if(A==="=")w=this._create_token(s.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(s.VALUE,h)}else g=this.__patterns.attribute.read(),g&&(C.type===s.EQUALS?w=this._create_token(s.VALUE,g):w=this._create_token(s.ATTRIBUTE,g));return w},E.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)},E.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===s.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var g=C.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var h=this._read_comment_or_cdata(A);if(h)return h.type=s.TEXT,h;w=this._input.readUntil(new RegExp("</"+g+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(g)&&(w=this._input.readUntil(new RegExp("</"+g+"[\\n\\r\\t ]*?>","ig")))}return w?this._create_token(s.TEXT,w):null},E.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(s.TEXT,C)},i.exports.Tokenizer=E,i.exports.TOKEN=s}],y={};function t(i){var u=y[i];if(u!==void 0)return u.exports;var f=y[i]={exports:{}};return P[i](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 y=L("6UM0"),t=L("TXwP");return{html_beautify:function(b,i){return F(b,i,y.js_beautify,t.css_beautify)}}}.apply(J,Y),B!==void 0&&(We.exports=B));else var S,R})()},pzxd:function(We,J,L){var Y=L("bYtY"),B=Y.retrieve2,I=Y.retrieve3,F=Y.each,S=Y.normalizeCssArray,R=Y.isString,P=Y.isObject,y=L("6GrX"),t=L("VpOo"),b=L("Xnb7"),i=L("fW2E"),u=L("gut8"),f=u.ContextCachedBy,a=u.WILL_BE_RESTORED,o=y.DEFAULT_FONT,c={left:1,right:1,center:1},l={top:1,bottom:1,middle:1},n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],s={},d={};function E(V){return A(V),F(V.rich,A),V}function A(V){if(V){V.font=y.makeFont(V);var K=V.textAlign;K==="middle"&&(K="center"),V.textAlign=K==null||c[K]?K:"left";var $=V.textVerticalAlign||V.textBaseline;$==="center"&&($="middle"),V.textVerticalAlign=$==null||l[$]?$:"top";var Z=V.textPadding;Z&&(V.textPadding=S(V.textPadding))}}function C(V,K,$,Z,ve,oe){Z.rich?w(V,K,$,Z,ve,oe):k(V,K,$,Z,ve,oe)}function k(V,K,$,Z,ve,oe){"use strict";var fe=m(Z),ye,Pe=!1,ge=K.__attrCachedBy===f.PLAIN_TEXT;oe!==a?(oe&&(ye=oe.style,Pe=!fe&&ge&&ye),K.__attrCachedBy=fe?f.NONE:f.PLAIN_TEXT):ge&&(K.__attrCachedBy=f.NONE);var de=Z.font||o;(!Pe||de!==(ye.font||o))&&(K.font=de);var Qe=V.__computedFont;V.__styleFont!==de&&(V.__styleFont=de,Qe=V.__computedFont=K.font);var St=Z.textPadding,Ee=Z.textLineHeight,De=V.__textCotentBlock;(!De||V.__dirtyText)&&(De=V.__textCotentBlock=y.parsePlainText($,Qe,St,Ee,Z.truncate));var rt=De.outerHeight,Be=De.lines,ke=De.lineHeight,ut=v(d,V,Z,ve),ie=ut.baseX,xe=ut.baseY,we=ut.textAlign||"left",Ke=ut.textVerticalAlign;h(K,Z,ve,ie,xe);var ot=y.adjustTextY(xe,rt,Ke),gt=ie,Nt=ot;if(fe||St){var He=y.getWidth($,Qe),jt=He;St&&(jt+=St[1]+St[3]);var $t=y.adjustTextX(ie,jt,we);fe&&_(V,K,Z,$t,ot,jt,rt),St&&(gt=H(ie,we,St),Nt+=St[0])}K.textAlign=we,K.textBaseline="middle",K.globalAlpha=Z.opacity||1;for(var Ie=0;Ie<n.length;Ie++){var Ae=n[Ie],ct=Ae[0],Et=Ae[1],Ze=Z[ct];(!Pe||Ze!==ye[ct])&&(K[Et]=i(K,Et,Ze||Ae[2]))}Nt+=ke/2;var ht=Z.textStrokeWidth,Ne=Pe?ye.textStrokeWidth:null,Te=!Pe||ht!==Ne,Oe=!Pe||Te||Z.textStroke!==ye.textStroke,ae=U(Z.textStroke,ht),le=T(Z.textFill);if(ae&&(Te&&(K.lineWidth=ht),Oe&&(K.strokeStyle=ae)),le&&((!Pe||Z.textFill!==ye.textFill)&&(K.fillStyle=le)),Be.length===1)ae&&K.strokeText(Be[0],gt,Nt),le&&K.fillText(Be[0],gt,Nt);else for(var Ie=0;Ie<Be.length;Ie++)ae&&K.strokeText(Be[Ie],gt,Nt),le&&K.fillText(Be[Ie],gt,Nt),Nt+=ke}function w(V,K,$,Z,ve,oe){oe!==a&&(K.__attrCachedBy=f.NONE);var fe=V.__textCotentBlock;(!fe||V.__dirtyText)&&(fe=V.__textCotentBlock=y.parseRichText($,Z)),g(V,K,fe,Z,ve)}function g(V,K,$,Z,ve){var oe=$.width,fe=$.outerWidth,ye=$.outerHeight,Pe=Z.textPadding,ge=v(d,V,Z,ve),de=ge.baseX,Qe=ge.baseY,St=ge.textAlign,Ee=ge.textVerticalAlign;h(K,Z,ve,de,Qe);var De=y.adjustTextX(de,fe,St),rt=y.adjustTextY(Qe,ye,Ee),Be=De,ke=rt;Pe&&(Be+=Pe[3],ke+=Pe[0]);var ut=Be+oe;m(Z)&&_(V,K,Z,De,rt,fe,ye);for(var ie=0;ie<$.lines.length;ie++){for(var xe=$.lines[ie],we=xe.tokens,Ke=we.length,ot=xe.lineHeight,gt=xe.width,Nt=0,He=Be,jt=ut,$t=Ke-1,Ie;Nt<Ke&&(Ie=we[Nt],!Ie.textAlign||Ie.textAlign==="left");)p(V,K,Ie,Z,ot,ke,He,"left"),gt-=Ie.width,He+=Ie.width,Nt++;for(;$t>=0&&(Ie=we[$t],Ie.textAlign==="right");)p(V,K,Ie,Z,ot,ke,jt,"right"),gt-=Ie.width,jt-=Ie.width,$t--;for(He+=(oe-(He-Be)-(ut-jt)-gt)/2;Nt<=$t;)Ie=we[Nt],p(V,K,Ie,Z,ot,ke,He+Ie.width/2,"center"),He+=Ie.width,Nt++;ke+=ot}}function h(V,K,$,Z,ve){if($&&K.textRotation){var oe=K.textOrigin;oe==="center"?(Z=$.width/2+$.x,ve=$.height/2+$.y):oe&&(Z=oe[0]+$.x,ve=oe[1]+$.y),V.translate(Z,ve),V.rotate(-K.textRotation),V.translate(-Z,-ve)}}function p(V,K,$,Z,ve,oe,fe,ye){var Pe=Z.rich[$.styleName]||{};Pe.text=$.text;var ge=$.textVerticalAlign,de=oe+ve/2;ge==="top"?de=oe+$.height/2:ge==="bottom"&&(de=oe+ve-$.height/2),!$.isLineHolder&&m(Pe)&&_(V,K,Pe,ye==="right"?fe-$.width:ye==="center"?fe-$.width/2:fe,de-$.height/2,$.width,$.height);var Qe=$.textPadding;Qe&&(fe=H(fe,ye,Qe),de-=$.height/2-Qe[2]-$.textHeight/2),j(K,"shadowBlur",I(Pe.textShadowBlur,Z.textShadowBlur,0)),j(K,"shadowColor",Pe.textShadowColor||Z.textShadowColor||"transparent"),j(K,"shadowOffsetX",I(Pe.textShadowOffsetX,Z.textShadowOffsetX,0)),j(K,"shadowOffsetY",I(Pe.textShadowOffsetY,Z.textShadowOffsetY,0)),j(K,"textAlign",ye),j(K,"textBaseline","middle"),j(K,"font",$.font||o);var St=U(Pe.textStroke||Z.textStroke,De),Ee=T(Pe.textFill||Z.textFill),De=B(Pe.textStrokeWidth,Z.textStrokeWidth);St&&(j(K,"lineWidth",De),j(K,"strokeStyle",St),K.strokeText($.text,fe,de)),Ee&&(j(K,"fillStyle",Ee),K.fillText($.text,fe,de))}function m(V){return!!(V.textBackgroundColor||V.textBorderWidth&&V.textBorderColor)}function _(V,K,$,Z,ve,oe,fe){var ye=$.textBackgroundColor,Pe=$.textBorderWidth,ge=$.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||Pe&&ge){K.beginPath();var Qe=$.textBorderRadius;Qe?t.buildPath(K,{x:Z,y:ve,width:oe,height:fe,r:Qe}):K.rect(Z,ve,oe,fe),K.closePath()}if(de)if(j(K,"fillStyle",ye),$.fillOpacity!=null){var St=K.globalAlpha;K.globalAlpha=$.fillOpacity*$.opacity,K.fill(),K.globalAlpha=St}else K.fill();else if(P(ye)){var Ee=ye.image;Ee=b.createOrUpdateImage(Ee,null,V,x,ye),Ee&&b.isImageReady(Ee)&&K.drawImage(Ee,Z,ve,oe,fe)}if(Pe&&ge)if(j(K,"lineWidth",Pe),j(K,"strokeStyle",ge),$.strokeOpacity!=null){var St=K.globalAlpha;K.globalAlpha=$.strokeOpacity*$.opacity,K.stroke(),K.globalAlpha=St}else K.stroke()}function x(V,K){K.image=V}function v(V,K,$,Z){var ve=$.x||0,oe=$.y||0,fe=$.textAlign,ye=$.textVerticalAlign;if(Z){var Pe=$.textPosition;if(Pe instanceof Array)ve=Z.x+z(Pe[0],Z.width),oe=Z.y+z(Pe[1],Z.height);else{var ge=K&&K.calculateTextPosition?K.calculateTextPosition(s,$,Z):y.calculateTextPosition(s,$,Z);ve=ge.x,oe=ge.y,fe=fe||ge.textAlign,ye=ye||ge.textVerticalAlign}var de=$.textOffset;de&&(ve+=de[0],oe+=de[1])}return V=V||{},V.baseX=ve,V.baseY=oe,V.textAlign=fe,V.textVerticalAlign=ye,V}function j(V,K,$){return V[K]=i(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 T(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=E,J.renderText=C,J.getBoxPosition=v,J.getStroke=U,J.getFill=T,J.parsePercent=z,J.needDrawText=M},qH13:function(We,J,L){var Y=L("ItGF"),B=L("QBsz"),I=B.applyTransform,F=L("mFDi"),S=L("Qe9p"),R=L("6GrX"),P=L("pzxd"),y=L("ni6a"),t=L("Gev7"),b=L("Dagg"),i=L("dqUG"),u=L("y+Vt"),f=L("IMiH"),a=L("QuXc"),o=L("06Qe"),c=f.CMD,l=Math.round,n=Math.sqrt,s=Math.abs,d=Math.cos,E=Math.sin,A=Math.max;if(!Y.canvasSupported){var C=",",k="progid:DXImageTransform.Microsoft",w=21600,g=w/2,h=1e5,p=1e3,m=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,"&").replace(/"/g,""")},x=function(ie,xe,we){return"rgb("+[ie,xe,we].join(",")+")"},v=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},T=P.parsePercent,z=function(ie,xe,we){var Ke=S.parse(xe);we=+we,isNaN(we)&&(we=1),Ke&&(ie.color=x(Ke[0],Ke[1],Ke[2]),ie.opacity=we*Ke[3])},H=function(ie){var xe=S.parse(ie);return[x(xe[0],xe[1],xe[2]),xe[3]]},M=function(ie,xe,we){var Ke=xe.fill;if(Ke!=null)if(Ke instanceof a){var ot,gt=0,Nt=[0,0],He=0,jt=1,$t=we.getBoundingRect(),Ie=$t.width,Ae=$t.height;if(Ke.type==="linear"){ot="gradient";var ct=we.transform,Et=[Ke.x*Ie,Ke.y*Ae],Ze=[Ke.x2*Ie,Ke.y2*Ae];ct&&(I(Et,Et,ct),I(Ze,Ze,ct));var ht=Ze[0]-Et[0],Ne=Ze[1]-Et[1];gt=Math.atan2(ht,Ne)*180/Math.PI,gt<0&&(gt+=360),gt<1e-6&&(gt=0)}else{ot="gradientradial";var Et=[Ke.x*Ie,Ke.y*Ae],ct=we.transform,Te=we.scale,Oe=Ie,ae=Ae;Nt=[(Et[0]-$t.x)/Oe,(Et[1]-$t.y)/ae],ct&&I(Et,Et,ct),Oe/=Te[0]*w,ae/=Te[1]*w;var le=A(Oe,ae);He=2*0/le,jt=2*Ke.r/le-He}var he=Ke.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],on=H(Qt.color);ze.push(Qt.offset*jt+He+" "+on[0]),(xt===0||xt===_e-1)&&Se.push(on)}if(_e>=2){var vt=Se[0][0],Kt=Se[1][0],Ot=Se[0][1]*xe.opacity,Rt=Se[1][1]*xe.opacity;ie.type=ot,ie.method="none",ie.focus="100%",ie.angle=gt,ie.color=vt,ie.color2=Kt,ie.colors=ze.join(","),ie.opacity=Rt,ie.opacity2=Ot}ot==="radial"&&(ie.focusposition=Nt.join(","))}else z(ie,Ke,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,Ke){var ot=xe==="fill",gt=ie.getElementsByTagName(xe)[0];we[xe]!=null&&we[xe]!=="none"&&(ot||!ot&&we.lineWidth)?(ie[ot?"filled":"stroked"]="true",we[xe]instanceof a&&j(ie,gt),gt||(gt=o.createNode(xe)),ot?M(gt,we,Ke):V(gt,we),v(ie,gt)):(ie[ot?"filled":"stroked"]="false",j(ie,gt))},$=[[],[],[]],Z=function(ie,xe){var we=c.M,Ke=c.C,ot=c.L,gt=c.A,Nt=c.Q,He=[],jt,$t,Ie,Ae,ct,Et,Ze=ie.data,ht=ie.len();for(Ae=0;Ae<ht;){Ie=Ze[Ae++],$t="",jt=0;switch(Ie){case we:$t=" m ",jt=1,ct=Ze[Ae++],Et=Ze[Ae++],$[0][0]=ct,$[0][1]=Et;break;case ot:$t=" l ",jt=1,ct=Ze[Ae++],Et=Ze[Ae++],$[0][0]=ct,$[0][1]=Et;break;case Nt:case Ke:$t=" c ",jt=3;var Ne=Ze[Ae++],Te=Ze[Ae++],Oe=Ze[Ae++],ae=Ze[Ae++],le,he;Ie===Nt?(le=Oe,he=ae,Oe=(Oe+2*Ne)/3,ae=(ae+2*Te)/3,Ne=(ct+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,ct=le,Et=he;break;case gt: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 on=Ze[Ae++],vt=Ze[Ae++],Kt=Ze[Ae++],Ot=Ze[Ae++],Rt=Ze[Ae++]+Qt,ft=Ze[Ae++]+Rt+Qt;Ae++;var be=Ze[Ae++],Fe=on+d(Rt)*Kt,Ut=vt+E(Rt)*Ot,Ne=on+d(ft)*Kt,Te=vt+E(ft)*Ot,_t=be?" wa ":" at ";Math.abs(Fe-Ne)<1e-4&&(Math.abs(ft-Rt)>.01?be&&(Fe+=270/w):Math.abs(Ut-vt)<1e-4?be&&Fe<on||!be&&Fe>on?Te-=270/w:Te+=270/w:be&&Ut<vt||!be&&Ut>vt?Ne+=270/w:Ne-=270/w),He.push(_t,l(((on-Kt)*ze+_e)*w-g),C,l(((vt-Ot)*xt+Se)*w-g),C,l(((on+Kt)*ze+_e)*w-g),C,l(((vt+Ot)*xt+Se)*w-g),C,l((Fe*ze+_e)*w-g),C,l((Ut*xt+Se)*w-g),C,l((Ne*ze+_e)*w-g),C,l((Te*xt+Se)*w-g)),ct=Ne,Et=Te;break;case c.R:var Gt=$[0],en=$[1];Gt[0]=Ze[Ae++],Gt[1]=Ze[Ae++],en[0]=Gt[0]+Ze[Ae++],en[1]=Gt[1]+Ze[Ae++],xe&&(I(Gt,Gt,xe),I(en,en,xe)),Gt[0]=l(Gt[0]*w-g),en[0]=l(en[0]*w-g),Gt[1]=l(Gt[1]*w-g),en[1]=l(en[1]*w-g),He.push(" m ",Gt[0],C,Gt[1]," l ",en[0],C,Gt[1]," l ",en[0],C,en[1]," l ",Gt[0],C,en[1]);break;case c.Z:He.push(" x ")}if(jt>0){He.push($t);for(var Ge=0;Ge<jt;Ge++){var dt=$[Ge];xe&&I(dt,dt,xe),He.push(l(dt[0]*w-g),C,l(dt[1]*w-g),Ge<jt-1?C:"")}}}return He.join("")};u.prototype.brushVML=function(ie){var xe=this.style,we=this._vmlEl;we||(we=o.createNode("shape"),m(we),this._vmlEl=we),K(we,"fill",xe,this),K(we,"stroke",xe,this);var Ke=this.transform,ot=Ke!=null,gt=we.getElementsByTagName("stroke")[0];if(gt){var Nt=xe.lineWidth;if(ot&&!xe.strokeNoScale){var He=Ke[0]*Ke[3]-Ke[1]*Ke[2];Nt*=n(s(He))}gt.weight=Nt+"px"}var jt=this.path||(this.path=new f);this.__dirtyPath&&(jt.beginPath(),jt.subPixelOptimize=!1,this.buildPath(jt,this.shape),jt.toStatic(),this.__dirtyPath=!1),we.path=Z(jt,this.transform),we.style.zIndex=U(this.zlevel,this.z,this.z2),v(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){v(ie,this._vmlEl),this.appendRectText(ie)};var ve=function(ie){return typeof ie=="object"&&ie.tagName&&ie.tagName.toUpperCase()==="IMG"};b.prototype.brushVML=function(ie){var xe=this.style,we=xe.image,Ke,ot;if(ve(we)){var gt=we.src;if(gt===this._imageSrc)Ke=this._imageWidth,ot=this._imageHeight;else{var Nt=we.runtimeStyle,He=Nt.width,jt=Nt.height;Nt.width="auto",Nt.height="auto",Ke=we.width,ot=we.height,Nt.width=He,Nt.height=jt,this._imageSrc=gt,this._imageWidth=Ke,this._imageHeight=ot}we=gt}else we===this._imageSrc&&(Ke=this._imageWidth,ot=this._imageHeight);if(!we)return;var $t=xe.x||0,Ie=xe.y||0,Ae=xe.width,ct=xe.height,Et=xe.sWidth,Ze=xe.sHeight,ht=xe.sx||0,Ne=xe.sy||0,Te=Et&&Ze,Oe=this._vmlEl;Oe||(Oe=o.doc.createElement("div"),m(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=[$t,Ie],xt=[$t+Ae,Ie],Qt=[$t,Ie+ct],on=[$t+Ae,Ie+ct];I(ze,ze,he),I(xt,xt,he),I(Qt,Qt,he),I(on,on,he);var vt=A(ze[0],xt[0],Qt[0],on[0]),Kt=A(ze[1],xt[1],Qt[1],on[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=",l($t*_e+he[4]),C,"Dy=",l(Ie*Se+he[5])),ae.padding="0 "+l(vt)+"px "+l(Kt)+"px 0",ae.filter=k+".Matrix("+Ot.join("")+", SizingMethod=clip)"}else he&&($t=$t*_e+he[4],Ie=Ie*Se+he[5]),ae.filter="",ae.left=l($t)+"px",ae.top=l(Ie)+"px";var Rt=this._imageEl,ft=this._cropEl;Rt||(Rt=o.doc.createElement("div"),this._imageEl=Rt);var be=Rt.style;if(Te){if(Ke&&ot)be.width=l(_e*Ke*Ae/Et)+"px",be.height=l(Se*ot*ct/Ze)+"px";else{var Fe=new Image,Ut=this;Fe.onload=function(){Fe.onload=null,Ke=Fe.width,ot=Fe.height,be.width=l(_e*Ke*Ae/Et)+"px",be.height=l(Se*ot*ct/Ze)+"px",Ut._imageWidth=Ke,Ut._imageHeight=ot,Ut._imageSrc=we},Fe.src=we}ft||(ft=o.doc.createElement("div"),ft.style.overflow="hidden",this._cropEl=ft);var _t=ft.style;_t.width=l((Ae+ht*Ae/Et)*_e),_t.height=l((ct+Ne*ct/Ze)*Se),_t.filter=k+".Matrix(Dx="+-ht*Ae/Et*_e+",Dy="+-Ne*ct/Ze*Se+")",ft.parentNode||Oe.appendChild(ft),Rt.parentNode!==ft&&ft.appendChild(Rt)}else be.width=l(_e*Ae)+"px",be.height=l(Se*ct)+"px",Oe.appendChild(Rt),ft&&ft.parentNode&&(Oe.removeChild(ft),this._cropEl=null);var Gt="",en=xe.opacity;en<1&&(Gt+=".Alpha(opacity="+l(en*100)+") "),Gt+=k+".AlphaImageLoader(src="+we+", SizingMethod=scale)",be.filter=Gt,Oe.style.zIndex=U(this.zlevel,this.z,this.z2),v(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){v(ie,this._vmlEl),this.appendRectText(ie)};var oe="normal",fe={},ye=0,Pe=100,ge=document.createElement("div"),de=function(ie){var xe=fe[ie];if(!xe){ye>Pe&&(ye=0,fe={});var we=ge.style,Ke;try{we.font=ie,Ke=we.fontFamily.split(",")[0]}catch(ot){}xe={style:we.fontStyle||oe,variant:we.fontVariant||oe,weight:we.fontWeight||oe,size:parseFloat(we.fontSize||12)|0,family:Ke||"Microsoft YaHei"},fe[ie]=xe,ye++}return xe},Qe;R.$override("measureText",function(ie,xe){var we=o.doc;Qe||(Qe=we.createElement("div"),Qe.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",o.doc.body.appendChild(Qe));try{Qe.style.font=xe}catch(Ke){}return Qe.innerHTML="",Qe.appendChild(we.createTextNode(ie)),{width:Qe.offsetWidth}});for(var St=new F,Ee=function(ie,xe,we,Ke){var ot=this.style;this.__dirty&&P.normalizeTextStyle(ot,!0);var gt=ot.text;if(gt!=null&&(gt+=""),!gt)return;if(ot.rich){var Nt=R.parseRichText(gt,ot);gt=[];for(var He=0;He<Nt.lines.length;He++){for(var jt=Nt.lines[He].tokens,$t=[],Ie=0;Ie<jt.length;Ie++)$t.push(jt[Ie].text);gt.push($t.join(""))}gt=gt.join(`
|
|
`)}var Ae,ct,Et=ot.textAlign,Ze=ot.textVerticalAlign,ht=de(ot.font),Ne=ht.style+" "+ht.variant+" "+ht.weight+" "+ht.size+'px "'+ht.family+'"';we=we||R.getBoundingRect(gt,Ne,Et,Ze,ot.textPadding,ot.textLineHeight);var Te=this.transform;if(Te&&!Ke&&(St.copy(xe),St.applyTransform(Te),xe=St),Ke)Ae=xe.x,ct=xe.y;else{var Oe=ot.textPosition;if(Oe instanceof Array)Ae=xe.x+T(Oe[0],xe.width),ct=xe.y+T(Oe[1],xe.height),Et=Et||"left";else{var ae=this.calculateTextPosition?this.calculateTextPosition({},ot,xe):R.calculateTextPosition({},ot,xe);Ae=ae.x,ct=ae.y,Et=Et||ae.textAlign,Ze=Ze||ae.textVerticalAlign}}Ae=R.adjustTextX(Ae,we.width,Et),ct=R.adjustTextY(ct,we.height,Ze),ct+=we.height/2;var le=o.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",m(he),_e.textpathok=!0,Se.on=!0,he.from="0 0",he.to="1000 0.05",v(he,ze),v(he,_e),v(he,Se),this._textVmlEl=he);var xt=[Ae,ct],Qt=he.style;Te&&Ke?(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=(l(xt[0])||0)+","+(l(xt[1])||0),ze.origin="0 0",Qt.left="0px",Qt.top="0px"):(ze.on=!1,Qt.left=l(Ae)+"px",Qt.top=l(ct)+"px"),Se.string=_(gt);try{Se.style.font=Ne}catch(on){}K(he,"fill",{fill:ot.textFill,opacity:ot.opacity},this),K(he,"stroke",{stroke:ot.textStroke,opacity:ot.opacity,lineDash:ot.lineDash||null},this),he.style.zIndex=U(this.zlevel,this.z,this.z2),v(ie,he)},De=function(ie){j(ie,this._textVmlEl),this._textVmlEl=null},rt=function(ie){v(ie,this._textVmlEl)},Be=[y,t,b,u,i],ke=0;ke<Be.length;ke++){var ut=Be[ke].prototype;ut.drawRectText=Ee,ut.removeRectText=De,ut.appendRectText=rt}i.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)},i.prototype.onRemove=function(ie){this.removeRectText(ie)},i.prototype.onAdd=function(ie){this.appendRectText(ie)}}},r6Bn:function(We,J,L){var Y=L("bYtY"),B=L("ItGF"),I=L("4fz+"),F=L("BPZU");function S(y,t){return y.zlevel===t.zlevel?y.z===t.z?y.z2-t.z2:y.z-t.z:y.zlevel-t.zlevel}var R=function(){this._roots=[],this._displayList=[],this._displayListLen=0};R.prototype={constructor:R,traverse:function(y,t){for(var b=0;b<this._roots.length;b++)this._roots[b].traverse(y,t)},getDisplayList:function(y,t){return t=t||!1,y&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(y){this._displayListLen=0;for(var t=this._roots,b=this._displayList,i=0,u=t.length;i<u;i++)this._updateAndAddDisplayable(t[i],null,y);b.length=this._displayListLen,B.canvasSupported&&F(b,S)},_updateAndAddDisplayable:function(y,t,b){if(y.ignore&&!b)return;y.beforeUpdate(),y.__dirty&&y.update(),y.afterUpdate();var i=y.clipPath;if(i){t?t=t.slice():t=[];for(var u=i,f=y;u;)u.parent=f,u.updateTransform(),t.push(u),f=u,u=u.clipPath}if(y.isGroup){for(var a=y._children,o=0;o<a.length;o++){var c=a[o];y.__dirty&&(c.__dirty=!0),this._updateAndAddDisplayable(c,t,b)}y.__dirty=!1}else y.__clipPaths=t,this._displayList[this._displayListLen++]=y},addRoot:function(y){if(y.__storage===this)return;y instanceof I&&y.addChildrenToStorage(this),this.addToStorage(y),this._roots.push(y)},delRoot:function(y){if(y==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(y instanceof Array){for(var t=0,i=y.length;t<i;t++)this.delRoot(y[t]);return}var u=Y.indexOf(this._roots,y);u>=0&&(this.delFromStorage(y),this._roots.splice(u,1),y instanceof I&&y.delChildrenFromStorage(this))},addToStorage:function(y){return y&&(y.__storage=this,y.dirty(!1)),this},delFromStorage:function(y){return y&&(y.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:S};var P=R;We.exports=P},rA99:function(We,J,L){var Y=L("y+Vt"),B=L("QBsz"),I=L("Sj9i"),F=I.quadraticSubdivide,S=I.cubicSubdivide,R=I.quadraticAt,P=I.cubicAt,y=I.quadraticDerivativeAt,t=I.cubicDerivativeAt,b=[];function i(f,a,o){var c=f.cpx2,l=f.cpy2;return c===null||l===null?[(o?t:P)(f.x1,f.cpx1,f.cpx2,f.x2,a),(o?t:P)(f.y1,f.cpy1,f.cpy2,f.y2,a)]:[(o?y:R)(f.x1,f.cpx1,f.x2,a),(o?y: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 o=a.x1,c=a.y1,l=a.x2,n=a.y2,s=a.cpx1,d=a.cpy1,E=a.cpx2,A=a.cpy2,C=a.percent;if(C===0)return;f.moveTo(o,c),E==null||A==null?(C<1&&(F(o,s,l,C,b),s=b[1],l=b[2],F(c,d,n,C,b),d=b[1],n=b[2]),f.quadraticCurveTo(s,d,l,n)):(C<1&&(S(o,s,E,l,C,b),s=b[1],E=b[2],l=b[3],S(c,d,A,n,C,b),d=b[1],A=b[2],n=b[3]),f.bezierCurveTo(s,d,E,A,l,n))},pointAt:function(f){return i(this.shape,f,!1)},tangentAt:function(f){var a=i(this.shape,f,!0);return B.normalize(a,a)}});We.exports=u},"rAM+":function(We,J,L){"use strict";L.d(J,"a",function(){return B});var Y=L("Qw5x");function B(I,F){var S;if(typeof Symbol=="undefined"||I[Symbol.iterator]==null){if(Array.isArray(I)||(S=Object(Y.a)(I))||F&&I&&typeof I.length=="number"){S&&(I=S);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 y=!0,t=!1,b;return{s:function(){S=I[Symbol.iterator]()},n:function(){var u=S.next();return y=u.done,u},e:function(u){t=!0,b=u},f:function(){try{!y&&S.return!=null&&S.return()}finally{if(t)throw b}}}}},rUJ1:function(We,J){const L=/[&<>"']/,Y=/[&<>"']/g,B=/[<>"']|&(?!#?\w+;)/,I=/[<>"']|&(?!#?\w+;)/g,F={"&":"&","<":"<",">":">",'"':""","'":"'"},S=w=>F[w];function R(w,g){if(g){if(L.test(w))return w.replace(Y,S)}else if(B.test(w))return w.replace(I,S);return w}const P=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(w){return w.replace(P,(g,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,g){w=w.source||w,g=g||"";const h={replace:(p,m)=>(m=m.source||m,m=m.replace(t,"$1"),w=w.replace(p,m),h),getRegex:()=>new RegExp(w,g)};return h}const i=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(w,g,h){if(w){let p;try{p=decodeURIComponent(y(h)).replace(i,"").toLowerCase()}catch(m){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}g&&!u.test(h)&&(h=n(g,h));try{h=encodeURI(h).replace(/%25/g,"%")}catch(p){return null}return h}const a={},o=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(w,g){a[" "+w]||(o.test(w)?a[" "+w]=w+"/":a[" "+w]=A(w,"/",!0)),w=a[" "+w];const h=w.indexOf(":")===-1;return g.substring(0,2)==="//"?h?g:w.replace(c,"$1")+g:g.charAt(0)==="/"?h?g:w.replace(l,"$1")+g:w+g}const s={exec:function(){}};function d(w){let g=1,h,p;for(;g<arguments.length;g++){h=arguments[g];for(p in h)Object.prototype.hasOwnProperty.call(h,p)&&(w[p]=h[p])}return w}function E(w,g){const h=w.replace(/\|/g,(_,x,v)=>{let j=!1,U=x;for(;--U>=0&&v[U]==="\\";)j=!j;return j?"|":" |"}),p=h.split(/ \|/);let m=0;if(p.length>g)p.splice(g);else for(;p.length<g;)p.push("");for(;m<p.length;m++)p[m]=p[m].trim().replace(/\\\|/g,"|");return p}function A(w,g,h){const p=w.length;if(p===0)return"";let m=0;for(;m<p;){const _=w.charAt(p-m-1);if(_===g&&!h)m++;else if(_!==g&&h)m++;else break}return w.substr(0,p-m)}function C(w,g){if(w.indexOf(g[1])===-1)return-1;const h=w.length;let p=0,m=0;for(;m<h;m++)if(w[m]==="\\")m++;else if(w[m]===g[0])p++;else if(w[m]===g[1]&&(p--,p<0))return m;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")}We.exports={escape:R,unescape:y,edit:b,cleanUrl:f,resolveUrl:n,noopTest:s,merge:d,splitCells:E,rtrim:A,findClosingBracket:C,checkSanitizeDeprecation:k}},rhHp:function(We,J,L){"use strict";var Y=L("2qtc"),B=L("kLXV"),I=L("sRBo"),F=L("kaz8"),S=L("7Kak"),R=L("9yH6"),P=L("14J3"),y=L("BMrR"),t=L("jCWc"),b=L("kPKH"),i=L("iQDF"),u=L("+eQT"),f=L("miYZ"),a=L("tsqr"),o=L("jrin"),c=L("oBTY"),l=L("k1fw"),n=L("9og8"),s=L("y8nQ"),d=L("Vl3Y"),E=L("tJVT"),A=L("WmNS"),C=L.n(A),k=L("q1tI"),w=L.n(k),g=L("wd/R"),h=L.n(g),p=L("ErOA"),m=L("1vsH"),_=L("Ty5D"),x=L("9kvl"),v=L("xKgJ"),j=L("oUNq"),U=L("4wi7"),T=L("eozf"),z=function(M){var V=M.classroomList,K=M.dispatch,$=M.courseEndTime,Z=Object(_.i)(),ve=d.a.useForm(),oe=Object(E.a)(ve,1),fe=oe[0],ye=Object(k.useState)(1),Pe=Object(E.a)(ye,2),ge=Pe[0],de=Pe[1],Qe=Object(k.useState)([]),St=Object(E.a)(Qe,2),Ee=St[0],De=St[1],rt=Object(k.useState)(0),Be=Object(E.a)(rt,2),ke=Be[0],ut=Be[1],ie=Object(k.useState)(20),xe=Object(E.a)(ie,2),we=xe[0],Ke=xe[1],ot=Object(k.useState)(!0),gt=Object(E.a)(ot,2),Nt=gt[0],He=gt[1],jt=Object(k.useState)([]),$t=Object(E.a)(jt,2),Ie=$t[0],Ae=$t[1],ct=Object(k.useState)(!0),Et=Object(E.a)(ct,2),Ze=Et[0],ht=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];ht(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(on){for(;;)switch(on.prev=on.next){case 0:return He(!0),on.next=3,Object(j.D)(Object(l.a)(Object(l.a)({},Z),{},{page:Se||ge,limit:2e4,homework_id:V.actionTabs.type===1?"":V.actionTabs.selectArrs[0]}));case 3:ze=on.sent,ze==null||ze.course_groups.map(function(vt,Kt){vt.key=vt.id,vt.title=vt.name,vt.disabled=vt.is_published}),ze&&(De(Object(c.a)(ze==null?void 0:ze.course_groups)),ut(ze==null?void 0:ze.course_groups_count),He(!1),Se||fe.setFieldsValue((xt={},Object(o.a)(xt,"publish_time",h()(h()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),Object(o.a)(xt,"end_time",h()(h()(new Date(Object(m.b)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))),xt)));case 6:case"end":return on.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(vt){for(;;)switch(vt.prev=vt.next){case 0:if(ze=Object(l.a)({},fe.getFieldsValue()),!(ze.end_time<=ze.publish_time)){vt.next=4;break}return a.b.info("\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u6216\u7B49\u4E8E\u53D1\u5E03\u65F6\u95F4"),vt.abrupt("return");case 4:if(!((Ie==null?void 0:Ie.length)<=0&&!Ze&&Ee.length>0)){vt.next=7;break}return a.b.info("\u53D1\u5E03\u73ED\u7EA7\u4E0D\u80FD\u4E3A\u7A7A"),vt.abrupt("return");case 7:return xt={homework_ids:Object(c.a)(V.actionTabs.selectArrs),group_ids:Ie.length>0?Ie.map(function(Kt){return Kt.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:!Ie.length},vt.next=10,Object(p.a)("/api/courses/".concat(Z.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:Object(l.a)({},xt)});case 10:Qt=vt.sent,Qt.status===0&&(Oe(),Object(m.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(v.c)()?V.actionTabs.detail?(K({type:"shixunHomeworks/setActionTabs",payload:{}}),K({type:"shixunHomeworks/getWorkList",payload:Object(l.a)({},Z)}),K({type:"shixunHomeworks/getWorkSetting",payload:Object(l.a)({},Z)})):K({type:"classroomList/getClassroomTeacherShixunsList",payload:Object(l.a)(Object(l.a)({},V.actionTabs.params),{},{type:4})}):K({type:"classroomList/getClassroomShixunsList",payload:Object(l.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 vt.stop()}},_e)}));return function(){return he.apply(this,arguments)}}(),Oe=function(){de(1),De([]),Ae([])},ae=ke>ge*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(d.a,{form:fe},w.a.createElement("div",{style:{paddingLeft:0}},w.a.createElement(y.a,{className:"mt30",align:"middle"},w.a.createElement(b.a,null,w.a.createElement(d.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(T.b)(_e,$)},disabledTime:function(_e){return Object(T.c)(_e)},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:h()(Object(m.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),w.a.createElement(b.a,{className:"ml20"},w.a.createElement(d.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(m.d)(),"HH:mm")},disabledDate:function(_e){return Object(T.b)(_e,$,fe.getFieldValue("publish_time"))},disabledTime:function(_e){return Object(T.c)(_e,fe.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})))),V.actionTabs.type===2&&w.a.createElement(y.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){ht(_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:Ie.length===Ee.length,onChange:function(_e){Ie.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",Ie.length||0,"\u4E2A\u5206\u73ED")),(V.actionTabs.type===1||!Ze)&&Ee.length>0&&w.a.createElement(U.a,{data:Ee,selectedRowKeys:Ie,setSelectedRowKeys:Ae})))};J.a=Object(x.a)(function(H){var M=H.classroomList;return{classroomList:M}})(z)},rmlV:function(We,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 S=.5522848,R=F.cx,P=F.cy,y=F.rx,t=F.ry,b=y*S,i=t*S;I.moveTo(R-y,P),I.bezierCurveTo(R-y,P-i,R-b,P-t,R,P-t),I.bezierCurveTo(R+b,P-t,R+y,P-i,R+y,P),I.bezierCurveTo(R+y,P+i,R+b,P+t,R,P+t),I.bezierCurveTo(R-b,P+t,R-y,P+i,R-y,P),I.closePath()}});We.exports=B},sR1s:function(We,J,L){"use strict";L.d(J,"b",function(){return F}),L.d(J,"a",function(){return S}),L.d(J,"c",function(){return R}),L.d(J,"d",function(){return P});var Y=L("U8pU"),B="RC_TABLE_KEY";function I(y){return y==null?[]:Array.isArray(y)?y:[y]}function F(y,t){if(!t&&typeof t!="number")return y;for(var b=I(t),i=y,u=0;u<b.length;u+=1){if(!i)return null;var f=b[u];i=i[f]}return i}function S(y){var t=[],b={};return y.forEach(function(i){for(var u=i||{},f=u.key,a=u.dataIndex,o=f||I(a).join("-")||B;b[o];)o="".concat(o,"_next");b[o]=!0,t.push(o)}),t}function R(){var y={};function t(f,a){a&&Object.keys(a).forEach(function(o){var c=a[o];c&&Object(Y.a)(c)==="object"?(f[o]=f[o]||{},t(f[o],c)):f[o]=c})}for(var b=arguments.length,i=new Array(b),u=0;u<b;u++)i[u]=arguments[u];return i.forEach(function(f){t(y,f)}),y}function P(y){return y!=null}},"sW+o":function(We,J,L){var Y=L("SrGk"),B=L("bYtY"),I=L("SUKs"),F=L("Qe9p");function S(P,y){Y.call(this,P,y,["linearGradient","radialGradient"],"__gradient_in_use__")}B.inherits(S,Y),S.prototype.addWithoutUpdate=function(P,y){if(y&&y.style){var t=this;B.each(["fill","stroke"],function(b){if(y.style[b]&&(y.style[b].type==="linear"||y.style[b].type==="radial")){var i=y.style[b],u=t.getDefs(!0),f;i._dom?(f=i._dom,u.contains(i._dom)||t.addDom(f)):f=t.add(i),t.markUsed(y);var a=f.getAttribute("id");P.setAttribute(b,"url(#"+a+")")}})}},S.prototype.add=function(P){var y;if(P.type==="linear")y=this.createElement("linearGradient");else if(P.type==="radial")y=this.createElement("radialGradient");else return I("Illegal gradient type."),null;return P.id=P.id||this.nextId++,y.setAttribute("id","zr"+this._zrId+"-gradient-"+P.id),this.updateDom(P,y),this.addDom(y),y},S.prototype.update=function(P){var y=this;Y.prototype.update.call(this,P,function(){var t=P.type,b=P._dom.tagName;t==="linear"&&b==="linearGradient"||t==="radial"&&b==="radialGradient"?y.updateDom(P,P._dom):(y.removeDom(P),y.add(P))})},S.prototype.updateDom=function(P,y){if(P.type==="linear")y.setAttribute("x1",P.x),y.setAttribute("y1",P.y),y.setAttribute("x2",P.x2),y.setAttribute("y2",P.y2);else if(P.type==="radial")y.setAttribute("cx",P.x),y.setAttribute("cy",P.y),y.setAttribute("r",P.r);else{I("Illegal gradient type.");return}P.global?y.setAttribute("gradientUnits","userSpaceOnUse"):y.setAttribute("gradientUnits","objectBoundingBox"),y.innerHTML="";for(var t=P.colorStops,b=0,i=t.length;b<i;++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],o=F.toHex(f);u.setAttribute("stop-color","#"+o),u.setAttribute("stop-opacity",a)}else u.setAttribute("stop-color",t[b].color);y.appendChild(u)}P._dom=y},S.prototype.markUsed=function(P){if(P.style){var y=P.style.fill;y&&y._dom&&Y.prototype.markUsed.call(this,y._dom),y=P.style.stroke,y&&y._dom&&Y.prototype.markUsed.call(this,y._dom)}};var R=S;We.exports=R},sboe:function(We,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(We,J,L){"use strict";var Y=L("VTBJ"),B=L("1OyB"),I=L("vuIU"),F=L("Ji7U"),S=L("LK+K"),R=L("q1tI"),P=L.n(R),y=L("m+aA"),t=L("Zm9Q"),b=L("Kwbf"),i=L("c+Xe"),u=L("bdgK"),f="rc-observer-key",a=function(o){Object(F.a)(l,o);var c=Object(S.a)(l);function l(){var n;return Object(B.a)(this,l),n=c.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(s){var d=n.props.onResize,E=s[0].target,A=E.getBoundingClientRect(),C=A.width,k=A.height,w=E.offsetWidth,g=E.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!==g){var m={width:h,height:p,offsetWidth:w,offsetHeight:g};n.setState(m),d&&Promise.resolve().then(function(){d(Object(Y.a)(Object(Y.a)({},m),{},{offsetWidth:w,offsetHeight:g}))})}},n.setChildNode=function(s){n.childNode=s},n}return Object(I.a)(l,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var d=Object(y.a)(this.childNode||this),E=d!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=d),!this.resizeObserver&&d&&(this.resizeObserver=new u.default(this.onResize),this.resizeObserver.observe(d))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,d=Object(t.a)(s);if(d.length>1)Object(b.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(d.length===0)return Object(b.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=d[0];if(R.isValidElement(E)&&Object(i.c)(E)){var A=E.ref;d[0]=R.cloneElement(E,{ref:Object(i.a)(A,this.setChildNode)})}return d.length===1?d[0]:d.map(function(C,k){return!R.isValidElement(C)||"key"in C&&C.key!==null?C:R.cloneElement(C,{key:"".concat(f,"-").concat(k)})})}}]),l}(R.Component);a.displayName="ResizeObserver",J.a=a},t9D7:function(We,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 i}),L.d(J,"a",function(){return u}),L.d(J,"f",function(){return o}),L.d(J,"c",function(){return c});var Y=L("Vhoy"),B=L("MI8n"),I=L("pmY6"),F=L("Cg/j"),S=L("ic2d"),R=L("nEHx");const P=Object(F.c)("themeService");var y;(function(l){function n(s){return s&&typeof s=="object"&&typeof s.id=="string"}l.isThemeColor=n})(y||(y={}));function t(l){return{id:l}}var b;(function(l){function n(k){return k&&typeof k=="object"&&typeof k.id=="string"&&(typeof k.color=="undefined"||y.isThemeColor(k.color))}l.isThemeIcon=n;const s=new RegExp(`^\\$\\((${Y.a.iconNameExpression}(?:${Y.a.iconModifierExpression})?)\\)$`);function d(k){const w=s.exec(k);if(!w)return;let[,g]=w;return{id:g}}l.fromString=d;function E(k,w){let g=k.id;const h=g.lastIndexOf("~");return h!==-1&&(g=g.substring(0,h)),w&&(g=`${g}~${w}`),{id:g}}l.modify=E;function A(k,w){var g,h;return k.id===w.id&&((g=k.color)===null||g===void 0?void 0:g.id)===((h=w.color)===null||h===void 0?void 0:h.id)}l.isEqual=A;function C(k,w){return{id:k.id,color:w?t(w):void 0}}l.asThemeIcon=C,l.asClassNameArray=Y.a.asClassNameArray,l.asClassName=Y.a.asClassName,l.asCSSSelector=Y.a.asCSSSelector})(b||(b={}));function i(l){switch(l){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(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),Object(I.i)(()=>{const n=this.themingParticipants.indexOf(l);this.themingParticipants.splice(n,1)})}getThemingParticipants(){return this.themingParticipants}}let a=new f;S.a.add(u.ThemingContribution,a);function o(l){return a.onColorThemeChange(l)}class c extends I.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(n=>this.onThemeChange(n)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},u3os:function(We,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 y=(0,Y.getSensor)(R);return y.bind(P),function(){y.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(We,J,L){typeof window!="undefined"&&function(B,I){We.exports=I()}(this,function(){return function(Y){var B={};function I(F){if(B[F])return B[F].exports;var S=B[F]={i:F,l:!1,exports:{}};return Y[F].call(S.exports,S,S.exports,I),S.l=!0,S.exports}return I.m=Y,I.c=B,I.d=function(F,S,R){I.o(F,S)||Object.defineProperty(F,S,{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,S){if(S&1&&(F=I(F)),S&8)return F;if(S&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}),S&2&&typeof F!="string")for(var P in F)I.d(R,P,function(y){return F[y]}.bind(null,P));return R},I.n=function(F){var S=F&&F.__esModule?function(){return F.default}:function(){return F};return I.d(S,"a",S),S},I.o=function(F,S){return Object.prototype.hasOwnProperty.call(F,S)},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,S="~";function R(){}Object.create&&(R.prototype=Object.create(null),new R().__proto__||(S=!1));function P(i,u,f){this.fn=i,this.context=u,this.once=f||!1}function y(i,u,f,a,o){if(typeof f!="function")throw new TypeError("The listener must be a function");var c=new P(f,a||i,o),l=S?S+u:u;return i._events[l]?i._events[l].fn?i._events[l]=[i._events[l],c]:i._events[l].push(c):(i._events[l]=c,i._eventsCount++),i}function t(i,u){--i._eventsCount===0?i._events=new R:delete i._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(S?a.slice(1):a);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},b.prototype.listeners=function(u){var f=S?S+u:u,a=this._events[f];if(!a)return[];if(a.fn)return[a.fn];for(var o=0,c=a.length,l=new Array(c);o<c;o++)l[o]=a[o].fn;return l},b.prototype.listenerCount=function(u){var f=S?S+u:u,a=this._events[f];return a?a.fn?1:a.length:0},b.prototype.emit=function(u,f,a,o,c,l){var n=S?S+u:u;if(!this._events[n])return!1;var s=this._events[n],d=arguments.length,E,A;if(s.fn){s.once&&this.removeListener(u,s.fn,void 0,!0);switch(d){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,f),!0;case 3:return s.fn.call(s.context,f,a),!0;case 4:return s.fn.call(s.context,f,a,o),!0;case 5:return s.fn.call(s.context,f,a,o,c),!0;case 6:return s.fn.call(s.context,f,a,o,c,l),!0}for(A=1,E=new Array(d-1);A<d;A++)E[A-1]=arguments[A];s.fn.apply(s.context,E)}else{var C=s.length,k;for(A=0;A<C;A++){s[A].once&&this.removeListener(u,s[A].fn,void 0,!0);switch(d){case 1:s[A].fn.call(s[A].context);break;case 2:s[A].fn.call(s[A].context,f);break;case 3:s[A].fn.call(s[A].context,f,a);break;case 4:s[A].fn.call(s[A].context,f,a,o);break;default:if(!E)for(k=1,E=new Array(d-1);k<d;k++)E[k-1]=arguments[k];s[A].fn.apply(s[A].context,E)}}}return!0},b.prototype.on=function(u,f,a){return y(this,u,f,a,!1)},b.prototype.once=function(u,f,a){return y(this,u,f,a,!0)},b.prototype.removeListener=function(u,f,a,o){var c=S?S+u:u;if(!this._events[c])return this;if(!f)return t(this,c),this;var l=this._events[c];if(l.fn)l.fn===f&&(!o||l.once)&&(!a||l.context===a)&&t(this,c);else{for(var n=0,s=[],d=l.length;n<d;n++)(l[n].fn!==f||o&&!l[n].once||a&&l[n].context!==a)&&s.push(l[n]);s.length?this._events[c]=s.length===1?s[0]:s:t(this,c)}return this},b.prototype.removeAllListeners=function(u){var f;return u?(f=S?S+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=S,b.EventEmitter=b,Y.exports=b},"./node_modules/url-toolkit/src/url-toolkit.js":function(Y,B,I){(function(F){var S=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,R=/^([^\/?#]*)([^]*)$/,P=/(?:\/|^)\.(?=\/)/g,y=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(b,i,u){if(u=u||{},b=b.trim(),i=i.trim(),!i){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(i);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)):i;var o=t.parseURL(b);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var c=R.exec(o.path);o.netLoc=c[1],o.path=c[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=o.netLoc,a.path[0]!=="/"))if(!a.path)l.path=o.path,a.params||(l.params=o.params,a.query||(l.query=o.query));else{var n=o.path,s=n.substring(0,n.lastIndexOf("/")+1)+a.path;l.path=t.normalizePath(s)}return l.path===null&&(l.path=u.alwaysNormalize?t.normalizePath(a.path):a.path),t.buildURLFromParts(l)},parseURL:function(b){var i=S.exec(b);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(b){for(b=b.split("").reverse().join("").replace(P,"");b.length!==(b=b.replace(y,"")).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(c){if(f[c])return f[c].exports;var l=f[c]={i:c,l:!1,exports:{}};return u[c].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=u,a.c=f,a.i=function(c){return c},a.d=function(c,l,n){a.o(c,l)||Object.defineProperty(c,l,{configurable:!1,enumerable:!0,get:n})},a.r=function(c){Object.defineProperty(c,"__esModule",{value:!0})},a.n=function(c){var l=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(l,"a",l),l},a.o=function(c,l){return Object.prototype.hasOwnProperty.call(c,l)},a.p="/",a.oe=function(c){throw console.error(c),c};var o=a(a.s=ENTRY_MODULE);return o.default||o}var S="[\\.|\\-|\\+|\\w|/|@]+",R="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+S+").*?\\)";function P(u){return(u+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function y(u){return!isNaN(1*u)}function t(u,f,a){var o={};o[a]=[];var c=f.toString(),l=c.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return o;for(var n=l[1],s=new RegExp("(\\\\n|\\W)"+P(n)+R,"g"),d;d=s.exec(c);){if(d[3]==="dll-reference")continue;o[a].push(d[3])}for(s=new RegExp("\\("+P(n)+'\\("(dll-reference\\s('+S+'))"\\)\\)'+R,"g");d=s.exec(c);)u[d[2]]||(o[a].push(d[1]),u[d[2]]=I(d[1]).m),o[d[2]]=o[d[2]]||[],o[d[2]].push(d[4]);for(var E=Object.keys(o),A=0;A<E.length;A++)for(var C=0;C<o[E[A]].length;C++)y(o[E[A]][C])&&(o[E[A]][C]=1*o[E[A]][C]);return o}function b(u){var f=Object.keys(u);return f.reduce(function(a,o){return a||u[o].length>0},!1)}function i(u,f){for(var a={main:[f]},o={main:[]},c={main:{}};b(a);)for(var l=Object.keys(a),n=0;n<l.length;n++){var s=l[n],d=a[s],E=d.pop();if(c[s]=c[s]||{},c[s][E]||!u[s][E])continue;c[s][E]=!0,o[s]=o[s]||[],o[s].push(E);for(var A=t(u,u[s][E],s),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 o}Y.exports=function(u,f){f=f||{};var a={main:I.m},o=f.all?{main:Object.keys(a.main)}:i(a,u),c="";Object.keys(o).filter(function(E){return E!=="main"}).forEach(function(E){for(var A=0;o[E][A];)A++;o[E].push(A),a[E][A]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",c=c+"var "+E+" = ("+F.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+o[E].map(function(C){return""+JSON.stringify(C)+": "+a[E][C].toString()}).join(",")+`});
|
|
`}),c=c+"new (("+F.toString().replace("ENTRY_MODULE",JSON.stringify(u))+")({"+o.main.map(function(E){return""+JSON.stringify(E)+": "+a.main[E].toString()}).join(",")+"}))(self);";var l=new window.Blob([c],{type:"text/javascript"});if(f.bare)return l;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,s=n.createObjectURL(l),d=new window.Worker(s);return d.objectURL=s,d}},"./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 g}),I.d(B,"enableStreamingMode",function(){return h});var F=I("./src/controller/abr-controller.ts"),S=I("./src/controller/audio-stream-controller.ts"),R=I("./src/controller/audio-track-controller.ts"),P=I("./src/controller/subtitle-stream-controller.ts"),y=I("./src/controller/subtitle-track-controller.ts"),t=I("./src/controller/buffer-controller.ts"),b=I("./src/controller/timeline-controller.ts"),i=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"),o=I("./src/utils/xhr-loader.ts"),c=I("./src/utils/fetch-loader.ts"),l=I("./src/utils/cues.ts"),n=I("./src/utils/mediakeys-helper.ts"),s=I("./src/utils/logger.ts");function d(){return d=Object.assign||function(p){for(var m=1;m<arguments.length;m++){var _=arguments[m];for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(p[x]=_[x])}return p},d.apply(this,arguments)}function E(p,m){var _=Object.keys(p);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(p);m&&(x=x.filter(function(v){return Object.getOwnPropertyDescriptor(p,v).enumerable})),_.push.apply(_,x)}return _}function A(p){for(var m=1;m<arguments.length;m++){var _=arguments[m]!=null?arguments[m]:{};m%2?E(Object(_),!0).forEach(function(x){C(p,x,_[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(_)):E(Object(_)).forEach(function(x){Object.defineProperty(p,x,Object.getOwnPropertyDescriptor(_,x))})}return p}function C(p,m,_){return m in p?Object.defineProperty(p,m,{value:_,enumerable:!0,configurable:!0,writable:!0}):p[m]=_,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:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:F.default,bufferController:t.default,capLevelController:i.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:y.default,timelineController:b.TimelineController,audioStreamController:S.default,audioTrackController:R.default,emeController:f.default,cmcdController:a.default});function w(){return{cueHandler:l.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function g(p,m){if((m.liveSyncDurationCount||m.liveMaxLatencyDurationCount)&&(m.liveSyncDuration||m.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(m.liveMaxLatencyDurationCount!==void 0&&(m.liveSyncDurationCount===void 0||m.liveMaxLatencyDurationCount<=m.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(m.liveMaxLatencyDuration!==void 0&&(m.liveSyncDuration===void 0||m.liveMaxLatencyDuration<=m.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return d({},p,m)}function h(p){var m=p.loader;if(m!==c.default&&m!==o.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),p.progressive=!1;else{var _=Object(c.fetchSupported)();_&&(p.loader=c.default,p.progressive=!0,p.enableSoftwareAES=!0,s.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"),S=I("./src/utils/ewma-bandwidth-estimator.ts"),R=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/errors.ts"),t=I("./src/types/loader.ts"),b=I("./src/utils/logger.ts");function i(a,o){for(var c=0;c<o.length;c++){var l=o[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function u(a,o,c){return o&&i(a.prototype,o),c&&i(a,c),a}var f=function(){function a(c){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=c;var l=c.config;this.bwEstimator=new S.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var o=a.prototype;return o.registerListeners=function(){var l=this.hls;l.on(R.Events.FRAG_LOADING,this.onFragLoading,this),l.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(R.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(R.Events.FRAG_LOADING,this.onFragLoading,this),l.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(R.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(l,n){var s=n.frag;if(s.type===t.PlaylistLevelType.MAIN&&!this.timer){var d;this.fragCurrent=s,this.partCurrent=(d=n.part)!=null?d:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(l,n){var s=this.hls.config;n.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,d=s.autoLevelEnabled,E=s.config,A=s.media;if(!l||!A)return;var C=n?n.stats:l.stats,k=n?n.duration:l.duration;if(C.aborted){b.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!d||A.paused||!A.playbackRate||!A.readyState)return;var w=performance.now()-C.loading.start,g=Math.abs(A.playbackRate);if(w<=500*k/g)return;var h=s.levels,p=s.minAutoLevel,m=h[l.level],_=C.total||Math.max(C.loaded,Math.round(k*m.maxBitrate/8)),x=Math.max(1,C.bwEstimate?C.bwEstimate/8:C.loaded*1e3/w),v=(_-C.loaded)/x,j=A.currentTime,U=(P.BufferHelper.bufferInfo(A,j,E.maxBufferHole).end-j)/g;if(U>=2*k/g||v<=U)return;var T=Number.POSITIVE_INFINITY,z;for(z=l.level-1;z>p;z--){var H=h[z].maxBitrate;if(T=k*H/(8*.8*x),T<U)break}if(T>=v)return;var M=this.bwEstimator.getEstimate();b.logger.warn("Fragment "+l.sn+(n?" part "+n.index:"")+" of level "+l.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: `+v.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+T.toFixed(3)+` s
|
|
Time to underbuffer: `+U.toFixed(3)+" s"),s.nextLoadLevel=z,this.bwEstimator.sample(w,C.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:n,stats:C})},o.onFragLoaded=function(l,n){var s=n.frag,d=n.part;if(s.type===t.PlaylistLevelType.MAIN&&Object(F.isFiniteNumber)(s.sn)){var E=d?d.stats:s.stats,A=d?d.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var C=this.hls.levels[s.level],k=(C.loaded?C.loaded.bytes:0)+E.loaded,w=(C.loaded?C.loaded.duration:0)+A;C.loaded={bytes:k,duration:w},C.realBitrate=Math.round(8*k/w)}if(s.bitrateTest){var g={stats:E,frag:s,part:d,id:s.type};this.onFragBuffered(R.Events.FRAG_BUFFERED,g),s.bitrateTest=!1}}},o.onFragBuffered=function(l,n){var s=n.frag,d=n.part,E=d?d.stats:s.stats;if(E.aborted)return;if(s.type!==t.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var A=E.parsing.end-E.loading.start;this.bwEstimator.sample(A,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=A/1e3:this.bitrateTestDelay=0},o.onError=function(l,n){switch(n.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,d=s.maxAutoLevel,E=s.config,A=s.minAutoLevel,C=s.media,k=n?n.duration:l?l.duration:0,w=C?C.currentTime:0,g=C&&C.playbackRate!==0?Math.abs(C.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,p=(P.BufferHelper.bufferInfo(C,w,E.maxBufferHole).end-w)/g,m=this.findBestLevel(h,A,d,p,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(m>=0)return m;b.logger.trace((p?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var _=k?Math.min(k,E.maxStarvationDelay):E.maxStarvationDelay,x=E.abrBandWidthFactor,v=E.abrBandWidthUpFactor;if(!p){var j=this.bitrateTestDelay;if(j){var U=k?Math.min(k,E.maxLoadingDelay):E.maxLoadingDelay;_=U-j,b.logger.trace("bitrate test took "+Math.round(1e3*j)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*_)+" ms"),x=v=1}}return m=this.findBestLevel(h,A,d,p+_,x,v),Math.max(m,0)},o.findBestLevel=function(l,n,s,d,E,A){for(var C,k=this.fragCurrent,w=this.partCurrent,g=this.lastLoadedFragLevel,h=this.hls.levels,p=h[g],m=!!(p!=null&&(C=p.details)!==null&&C!==void 0&&C.live),_=p==null?void 0:p.codecSet,x=w?w.duration:k?k.duration:0,v=s;v>=n;v--){var j=h[v];if(!j||_&&j.codecSet!==_)continue;var U=j.details,T=(w?U==null?void 0:U.partTarget:U==null?void 0:U.averagetargetduration)||x,z=void 0;v<=g?z=E*l:z=A*l;var H=h[v].maxBitrate,M=H*T/z;if(b.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(z)+"/"+H+"/"+T+"/"+d+"/"+M),z>H&&(!M||m&&!this.bitrateTestDelay||M<d))return v}return-1},u(a,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,n=this.bwEstimator;if(l!==-1&&(!n||!n.canEstimate()))return l;var s=this.getNextABRAutoLevel();return l!==-1&&(s=Math.min(l,s)),s},set:function(l){this._nextAutoLevel=l}}]),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"),S=I("./src/controller/base-stream-controller.ts"),R=I("./src/events.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/controller/fragment-tracker.ts"),t=I("./src/types/level.ts"),b=I("./src/types/loader.ts"),i=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"),o=I("./src/controller/fragment-finders.ts"),c=I("./src/utils/discontinuities.ts"),l=I("./src/errors.ts"),n=I("./src/utils/logger.ts");function s(){return s=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var g=arguments[w];for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&(k[h]=g[h])}return k},s.apply(this,arguments)}function d(k,w){k.prototype=Object.create(w.prototype),k.prototype.constructor=k,E(k,w)}function E(k,w){return E=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},E(k,w)}var A=100,C=function(k){d(w,k);function w(h,p){var m;return m=k.call(this,h,p,"[audio-stream-controller]")||this,m.videoBuffer=null,m.videoTrackCC=-1,m.waitingVideoCC=-1,m.audioSwitch=!1,m.trackId=-1,m.waitingData=null,m.mainDetails=null,m.bufferFlushed=!1,m._registerListeners(),m}var g=w.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._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)},g._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)},g.onInitPtsFound=function(p,m){var _=m.frag,x=m.id,v=m.initPTS;if(x==="main"){var j=_.cc;this.initPTS[_.cc]=v,this.log("InitPTS for cc: "+j+" found from main: "+v),this.videoTrackCC=j,this.state===S.State.WAITING_INIT_PTS&&this.tick()}},g.startLoad=function(p){if(!this.levels){this.startPosition=p,this.state=S.State.STOPPED;return}var m=this.lastCurrentTime;this.stopLoad(),this.setInterval(A),this.fragLoadError=0,m>0&&p===-1?(this.log("Override startPosition with lastCurrentTime @"+m.toFixed(3)),this.state=S.State.IDLE):(this.loadedmetadata=!1,this.state=S.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()},g.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_TRACK:{var p,m=this.levels,_=this.trackId,x=m==null||((p=m[_])===null||p===void 0)?void 0:p.details;if(x){if(this.waitForCdnTuneIn(x))break;this.state=S.State.WAITING_INIT_PTS}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var v,j=performance.now(),U=this.retryDate;(!U||j>=U||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=S.State.IDLE);break}case S.State.WAITING_INIT_PTS:{var T=this.waitingData;if(T){var z=T.frag,H=T.part,M=T.cache,V=T.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=S.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(),ve=P.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),oe=Object(o.fragmentWithinToleranceTest)(ve.end,this.config.maxFragLookUpTolerance,z);oe<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ve.end+" is needed"),this.clearWaitingFragment())}}else this.state=S.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var p=this.waitingData;p&&(this.fragmentTracker.removeFragment(p.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=S.State.IDLE)},g.onTickEnd=function(){var p=this.media;if(!p||!p.readyState)return;var m=this.mediaBuffer?this.mediaBuffer:p,_=m.buffered;!this.loadedmetadata&&_.length&&(this.loadedmetadata=!0),this.lastCurrentTime=p.currentTime},g.doTickIdle=function(){var p,m,_=this.hls,x=this.levels,v=this.media,j=this.trackId,U=_.config;if(!x||!x[j])return;if(!v&&(this.startFragRequested||!U.startFragPrefetch))return;var T=x[j],z=T.details;if(!z||z.live&&this.levelLastLoaded!==j||this.waitForCdnTuneIn(z)){this.state=S.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.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=S.State.ENDED;return}var $=z.fragments,Z=$[0].start,ve=H.end;if(K){var oe=this.getLoadPosition();ve=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"),v.currentTime=Z+.05))}var fe=this.getNextFragment(ve,z);if(!fe){this.bufferFlushed=!0;return}((p=fe.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((m=fe.decryptdata)!==null&&m!==void 0&&m.key)?this.loadKey(fe,z):this.loadFragment(fe,z,ve)},g.getMaxBufferLength=function(){var p=k.prototype.getMaxBufferLength.call(this),m=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,b.PlaylistLevelType.MAIN);return m===null?p:Math.max(p,m.len)},g.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(p,m){var _=m.audioTracks;this.resetTransmuxer(),this.levels=_.map(function(x){return new t.Level(x)})},g.onAudioTrackSwitching=function(p,m){var _=!!m.url;this.trackId=m.id;var x=this.fragCurrent;x!=null&&x.loader&&x.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),_?this.setInterval(A):this.resetTransmuxer(),_?(this.audioSwitch=!0,this.state=S.State.IDLE):this.state=S.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(p,m){this.mainDetails=m.details},g.onAudioTrackLoaded=function(p,m){var _,x=this.levels,v=m.details,j=m.id;if(!x){this.warn("Audio tracks were reset while loading level "+j);return}this.log("Track "+j+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var U=x[j],T=0;if(v.live||(_=U.details)!==null&&_!==void 0&&_.live){var z=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!z)return;!U.details&&v.hasProgramDateTime&&z.hasProgramDateTime?(Object(c.alignMediaPlaylistByPDT)(v,z),T=v.fragments[0].start):T=this.alignPlaylists(v,U.details)}U.details=v,this.levelLastLoaded=j,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(U.details,T),this.state===S.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=S.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(p){var m,_=p.frag,x=p.part,v=p.payload,j=this.config,U=this.trackId,T=this.levels;if(!T){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var z=T[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],$=(m=_.initSegment)===null||m===void 0?void 0:m.data;if(K!==void 0){var Z=!1,ve=x?x.index:-1,oe=ve!==-1,fe=new a.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,v.byteLength,ve,oe);V.push(v,$,M,"",_,x,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:x,cache:new u.default,complete:!1},Pe=ye.cache;Pe.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=S.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(p){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,p)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(p,m){var _=m.tracks.audio;_&&(this.mediaBuffer=_.buffer),m.tracks.video&&(this.videoBuffer=m.tracks.video.buffer)},g.onFragBuffered=function(p,m){var _=m.frag,x=m.part;if(_.type!==b.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(x?" p: "+x.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(_,x)},g.onError=function(p,m){switch(m.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(b.PlaylistLevelType.AUDIO,m);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==S.State.ERROR&&this.state!==S.State.STOPPED&&(this.state=m.fatal?S.State.ERROR:S.State.IDLE,this.warn(m.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(m.parent==="audio"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var _=!0,x=this.getFwdBufferInfo(this.mediaBuffer,b.PlaylistLevelType.AUDIO);x&&x.len>.5&&(_=!this.reduceMaxBufferLength(x.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}},g.onBufferFlushed=function(p,m){var _=m.type;_===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(p){var m,_="audio",x=this.hls,v=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 T=U.frag,z=U.part,H=v.audio,M=v.text,V=v.id3,K=v.initSegment;if(this.fragContextChanged(T))return;if(this.state=S.State.PARSING,this.audioSwitch&&H&&this.completeAudioSwitch(),K!=null&&K.tracks&&(this._bufferInitSegment(K.tracks,T,j),x.trigger(R.Events.FRAG_PARSING_INIT_SEGMENT,{frag:T,id:_,tracks:K.tracks})),H){var $=H.startPTS,Z=H.endPTS,ve=H.startDTS,oe=H.endDTS;z&&(z.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:$,endPTS:Z,startDTS:ve,endDTS:oe}),T.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,$,Z,ve,oe),this.bufferFragmentData(H,T,z,j)}if(V!=null&&(m=V.samples)!==null&&m!==void 0&&m.length){var fe=s({frag:T,id:_},V);x.trigger(R.Events.FRAG_PARSING_METADATA,fe)}if(M){var ye=s({frag:T,id:_},M);x.trigger(R.Events.FRAG_PARSING_USERDATA,ye)}},g._bufferInitSegment=function(p,m,_){if(this.state!==S.State.PARSING)return;p.video&&delete p.video;var x=p.audio;if(!x)return;x.levelCodec=x.codec,x.id="audio",this.log("Init audio buffer, container:"+x.container+", codecs[parsed]=["+x.codec+"]"),this.hls.trigger(R.Events.BUFFER_CODECS,p);var v=x.initSegment;if(v!=null&&v.byteLength){var j={type:"audio",frag:m,part:null,chunkMeta:_,parent:m.type,data:v};this.hls.trigger(R.Events.BUFFER_APPENDING,j)}this.tick()},g.loadFragment=function(p,m,_){var x=this.fragmentTracker.getState(p);this.fragCurrent=p,(this.audioSwitch||x===y.FragmentState.NOT_LOADED||x===y.FragmentState.PARTIAL)&&(p.sn==="initSegment"?this._loadInitSegment(p):m.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=S.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,p,m,_)))},g.completeAudioSwitch=function(){var p=this.hls,m=this.media,_=this.trackId;m&&(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}(S.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"),S=I("./src/errors.ts"),R=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function y(f,a){for(var o=0;o<a.length;o++){var c=a[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}function t(f,a,o){return a&&y(f.prototype,a),o&&y(f,o),f}function b(f,a){f.prototype=Object.create(a.prototype),f.prototype.constructor=f,i(f,a)}function i(f,a){return i=Object.setPrototypeOf||function(c,l){return c.__proto__=l,c},i(f,a)}var u=function(f){b(a,f);function a(c){var l;return l=f.call(this,c,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var o=a.prototype;return o.registerListeners=function(){var l=this.hls;l.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(F.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var l=this.hls;l.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(F.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(F.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(F.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,f.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(l,n){this.tracks=n.audioTracks||[]},o.onAudioTrackLoaded=function(l,n){var s=n.id,d=n.details,E=this.tracksInGroup[s];if(!E){this.warn("Invalid audio track id "+s);return}var A=E.details;E.details=n.details,this.log("audioTrack "+s+" loaded ["+d.startSN+"-"+d.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,n,A))},o.onLevelLoading=function(l,n){this.switchLevel(n.level)},o.onLevelSwitching=function(l,n){this.switchLevel(n.level)},o.switchLevel=function(l){var n=this.hls.levels[l];if(!(n!=null&&n.audioGroupIds))return;var s=n.audioGroupIds[n.urlId];if(this.groupId!==s){this.groupId=s;var d=this.tracks.filter(function(A){return!s||A.groupId===s});this.selectDefaultTrack&&!d.some(function(A){return A.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=d;var E={audioTracks:d};this.log("Updating audio tracks, "+d.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(F.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},o.onError=function(l,n){if(f.prototype.onError.call(this,l,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)},o.setAudioTrack=function(l){var n=this.tracksInGroup;if(l<0||l>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=n[this.trackId];this.log("Now switching to audio-track index "+l);var d=n[l],E=d.id,A=d.groupId,C=A===void 0?"":A,k=d.name,w=d.type,g=d.url;if(this.trackId=l,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(F.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:C,name:k,type:w,url:g}),d.details&&!d.details.live)return;var h=this.switchParams(d.url,s==null?void 0:s.details);this.loadPlaylist(h)},o.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,s=this.findTrackId(n)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(l){for(var n=this.tracksInGroup,s=0;s<n.length;s++){var d=n[s];if((!this.selectDefaultTrack||d.default)&&(!l||l===d.name))return d.id}return-1},o.loadPlaylist=function(l){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var s=n.id,d=n.groupId,E=n.url;if(l)try{E=l.addDirectives(E)}catch(A){this.warn("Could not construct new URL with HLS Delivery Directives: "+A)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(F.Events.AUDIO_TRACK_LOADING,{url:E,id:s,groupId:d,deliveryDirectives:l||null})}},t(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),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"),S=I("./src/types/level.ts"),R=I("./src/controller/level-helper.ts"),P=I("./src/utils/logger.ts"),y=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 i=b.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(f,a){a.fatal&&a.type===y.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(f,a){var o=a==null?void 0:a.renditionReports;if(o)for(var c=0;c<o.length;c++){var l=o[c],n=""+l.URI;if(n===f.substr(-n.length)){var s=parseInt(l["LAST-MSN"]),d=parseInt(l["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var E=Math.min(a.age-a.partTarget,a.targetduration);d!==void 0&&E>a.partTarget&&(d+=1)}if(Object(F.isFiniteNumber)(s))return new S.HlsUrlParameters(s,Object(F.isFiniteNumber)(d)?d:void 0,S.HlsSkip.No)}}},i.loadPlaylist=function(f){},i.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},i.playlistLoaded=function(f,a,o){var c=this,l=a.details,n=a.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||o!=null&&o.live){if(l.reloaded(o),o&&this.log("live playlist "+f+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),o&&l.fragments.length>0&&Object(R.mergeDetails)(o,l),!this.canLoad||!l.live)return;var d,E=void 0,A=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var C=this.hls.config.lowLatencyMode,k=l.lastPartSn,w=l.endSN,g=l.lastPartIndex,h=g!==-1,p=k===w,m=C?0:g;h?(E=p?w+1:k,A=p?m:g+1):E=w+1;var _=l.age,x=_+l.ageHeader,v=Math.min(x-l.partTarget,l.targetduration*1.5);if(v>0){if(o&&v>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+v+" with playlist age: "+l.age),v=0;else{var j=Math.floor(v/l.targetduration);if(E+=j,A!==void 0){var U=Math.round(v%l.targetduration/l.partTarget);A+=U}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+_.toFixed(2)+"s goal: "+v+" skip sn "+j+" to part "+A)}l.tuneInGoal=v}if(d=this.getDeliveryDirectives(l,a.deliveryDirectives,E,A),C||!p){this.loadPlaylist(d);return}}else d=this.getDeliveryDirectives(l,a.deliveryDirectives,E,A);var T=Object(R.computeReloadInterval)(l,n);E!==void 0&&l.canBlockReload&&(T-=l.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout(function(){return c.loadPlaylist(d)},T)}else this.clearTimer()},i.getDeliveryDirectives=function(f,a,o,c){var l=Object(S.getSkipValue)(f,o);return a!=null&&a.skip&&f.deltaUpdateFailed&&(o=a.msn,c=a.part,l=S.HlsSkip.No),new S.HlsUrlParameters(o,c,l)},i.retryLoadingOrFail=function(f){var a=this,o=this.hls.config,c=this.retryCount<o.levelLoadingMaxRetry;if(c){var l;if(this.retryCount++,f.details.indexOf("LoadTimeOut")>-1&&(l=f.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.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 c},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 g});var F=I("./src/polyfills/number.ts"),S=I("./src/task-loop.ts"),R=I("./src/controller/fragment-tracker.ts"),P=I("./src/utils/buffer-helper.ts"),y=I("./src/utils/logger.ts"),t=I("./src/events.ts"),b=I("./src/errors.ts"),i=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"),o=I("./src/controller/level-helper.ts"),c=I("./src/loader/fragment-loader.ts"),l=I("./src/crypt/decrypter.ts"),n=I("./src/utils/time-ranges.ts"),s=I("./src/types/loader.ts");function d(h,p){for(var m=0;m<p.length;m++){var _=p[m];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(h,_.key,_)}}function E(h,p,m){return p&&d(h.prototype,p),m&&d(h,m),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(_,x){return _.__proto__=x,_},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"},g=function(h){C(p,h);function p(_,x,v){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=v,j.log=y.logger.log.bind(y.logger,v+":"),j.warn=y.logger.warn.bind(y.logger,v+":"),j.hls=_,j.fragmentLoader=new c.default(_.config),j.fragmentTracker=x,j.config=_.config,j.decrypter=new l.default(_,_.config),_.on(t.Events.KEY_LOADED,j.onKeyLoaded,A(j)),j}var m=p.prototype;return m.doTick=function(){this.onTickEnd()},m.onTickEnd=function(){},m.startLoad=function(x){},m.stopLoad=function(){this.fragmentLoader.abort();var x=this.fragCurrent;x&&this.fragmentTracker.removeFragment(x),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},m._streamEnded=function(x,v){var j=this.fragCurrent,U=this.fragmentTracker;if(!v.live&&j&&j.sn===v.endSN&&!x.nextStart){var T=U.getState(j);return T===R.FragmentState.PARTIAL||T===R.FragmentState.OK}return!1},m.onMediaAttached=function(x,v){var j=this.media=this.mediaBuffer=v.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)},m.onMediaDetaching=function(){var x=this.media;x!=null&&x.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),x&&(x.removeEventListener("seeking",this.onvseeking),x.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},m.onMediaSeeking=function(){var x=this.config,v=this.fragCurrent,j=this.media,U=this.mediaBuffer,T=this.state,z=j?j.currentTime:0,H=P.BufferHelper.bufferInfo(U||j,z,x.maxBufferHole);if(this.log("media seeking to "+(Object(F.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+T),T===w.ENDED)this.resetLoadingState();else if(v&&!H.len){var M=x.maxFragLookUpTolerance,V=v.start-M,K=v.start+v.duration+M,$=z>K;(z<V||$)&&($&&v.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),v.loader.abort()),this.resetLoadingState())}j&&(this.lastCurrentTime=z),!this.loadedmetadata&&!H.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},m.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},m.onKeyLoaded=function(x,v){if(this.state!==w.KEY_LOADING||v.frag!==this.fragCurrent||!this.levels)return;this.state=w.IDLE;var j=this.levels[v.frag.level].details;j&&this.loadFragment(v.frag,j,v.frag.start)},m.onHandlerDestroying=function(){this.stopLoad(),h.prototype.onHandlerDestroying.call(this)},m.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(t.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,h.prototype.onHandlerDestroyed.call(this)},m.loadKey=function(x,v){this.log("Loading key for "+x.sn+" of ["+v.startSN+"-"+v.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level),this.state=w.KEY_LOADING,this.fragCurrent=x,this.hls.trigger(t.Events.KEY_LOADING,{frag:x})},m.loadFragment=function(x,v,j){this._loadFragForPlayback(x,v,j)},m._loadFragForPlayback=function(x,v,j){var U=this,T=function(H){if(U.fragContextChanged(x)){U.warn("Fragment "+x.sn+(H.part?" p: "+H.part.index:"")+" of level "+x.level+" was dropped during download."),U.fragmentTracker.removeFragment(x);return}x.stats.chunkCount++,U._handleFragmentLoadProgress(H)};this._doFragLoad(x,v,j,T).then(function(z){if(!z)return;U.fragLoadError=0;var H=U.state;if(U.fragContextChanged(x)){(H===w.FRAG_LOADING||H===w.BACKTRACKING||!U.fragCurrent&&H===w.PARSING)&&(U.fragmentTracker.removeFragment(x),U.state=w.IDLE);return}if("payload"in z&&(U.log("Loaded fragment "+x.sn+" of level "+x.level),U.hls.trigger(t.Events.FRAG_LOADED,z),U.state===w.BACKTRACKING)){U.fragmentTracker.backtrack(x,z),U.resetFragmentLoading(x);return}U._handleFragmentLoadComplete(z)}).catch(function(z){U.warn(z),U.resetFragmentLoading(x)})},m.flushMainBuffer=function(x,v,j){if(j===void 0&&(j=null),!(x-v))return;var U={startOffset:x,endOffset:v,type:j};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,U)},m._loadInitSegment=function(x){var v=this;this._doFragLoad(x).then(function(j){if(!j||v.fragContextChanged(x)||!v.levels)throw new Error("init load aborted");return j}).then(function(j){var U=v.hls,T=j.payload,z=x.decryptdata;if(T&&T.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var H=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(T),z.key.buffer,z.iv.buffer).then(function(M){var V=self.performance.now();return U.trigger(t.Events.FRAG_DECRYPTED,{frag:x,payload:M,stats:{tstart:H,tdecrypt:V}}),j.payload=M,j})}return j}).then(function(j){var U=v.fragCurrent,T=v.hls,z=v.levels;if(!z)throw new Error("init load aborted, missing levels");var H=z[x.level].details;console.assert(H,"Level details are defined when init segment is loaded");var M=x.stats;v.state=w.IDLE,v.fragLoadError=0,x.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&&T.trigger(t.Events.FRAG_BUFFERED,{stats:M,frag:U,part:null,id:x.type}),v.tick()}).catch(function(j){v.warn(j),v.resetFragmentLoading(x)})},m.fragContextChanged=function(x){var v=this.fragCurrent;return!x||!v||x.level!==v.level||x.sn!==v.sn||x.urlId!==v.urlId},m.fragBufferedComplete=function(x,v){var j=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+x.type+" sn: "+x.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+x.level+" "+n.default.toString(P.BufferHelper.getBuffered(j))),this.state=w.IDLE,this.tick()},m._handleFragmentLoadComplete=function(x){var v=this.transmuxer;if(!v)return;var j=x.frag,U=x.part,T=x.partsLoaded,z=!T||T.length===0||T.some(function(M){return!M}),H=new i.ChunkMetadata(j.level,j.sn,j.stats.chunkCount+1,0,U?U.index:-1,!z);v.flush(H)},m._handleFragmentLoadProgress=function(x){},m._doFragLoad=function(x,v,j,U){var T=this;if(j===void 0&&(j=null),!this.levels)throw new Error("frag load aborted, missing levels");if(j=Math.max(x.start,j||0),this.config.lowLatencyMode&&v){var z=v.partList;if(z&&U){j>x.end&&v.fragmentHint&&(x=v.fragmentHint);var H=this.getNextPart(z,x,j);if(H>-1){var M=z[H];return this.log("Loading part sn: "+x.sn+" p: "+M.index+" cc: "+x.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+H+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.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:x,part:z[H],targetBufferTime:j}),this.doFragPartsLoad(x,z,H,U).catch(function(V){return T.handleFragLoadError(V)})}else if(!x.url||this.loadedEndOfParts(z,j))return Promise.resolve(null)}}return this.log("Loading fragment "+x.sn+" cc: "+x.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+x.level+", target: "+parseFloat(j.toFixed(3))),Object(F.isFiniteNumber)(x.sn)&&!this.bitrateTest&&(this.nextLoadPosition=x.start+x.duration),this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:x,targetBufferTime:j}),this.fragmentLoader.load(x,U).catch(function(V){return T.handleFragLoadError(V)})},m.doFragPartsLoad=function(x,v,j,U){var T=this;return new Promise(function(z,H){var M=[],V=function K($){var Z=v[$];T.fragmentLoader.loadPart(x,Z,U).then(function(ve){M[Z.index]=ve;var oe=ve.part;T.hls.trigger(t.Events.FRAG_LOADED,ve);var fe=v[$+1];if(fe&&fe.fragment===x)K($+1);else return z({frag:x,part:oe,partsLoaded:M})}).catch(H)};V(j)})},m.handleFragLoadError=function(x){var v=x.data;return v&&v.details===b.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(t.Events.ERROR,v),null},m._handleTransmuxerFlush=function(x){var v=this.getCurrentContext(x);if(!v||this.state!==w.PARSING){this.fragCurrent||(this.state=w.IDLE);return}var j=v.frag,U=v.part,T=v.level,z=self.performance.now();j.stats.parsing.end=z,U&&(U.stats.parsing.end=z),this.updateLevelTiming(j,U,T,x.partial)},m.getCurrentContext=function(x){var v=this.levels,j=x.level,U=x.sn,T=x.part;if(!v||!v[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=v[j],H=T>-1?Object(o.getPartWith)(z,U,T):null,M=H?H.fragment:Object(o.getFragmentWithSN)(z,U,this.fragCurrent);return M?{frag:M,part:H,level:z}:null},m.bufferFragmentData=function(x,v,j,U){if(!x||this.state!==w.PARSING)return;var T=x.data1,z=x.data2,H=T;if(T&&z&&(H=Object(u.appendUint8Array)(T,z)),!H||!H.length)return;var M={type:x.type,frag:v,part:j,chunkMeta:U,parent:v.type,data:H};this.hls.trigger(t.Events.BUFFER_APPENDING,M),x.dropped&&x.independent&&!j&&this.flushBufferGap(v)},m.flushBufferGap=function(x){var v=this.media;if(!v)return;if(!P.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,x.start);return}var j=v.currentTime,U=P.BufferHelper.bufferInfo(v,j,0),T=x.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,T*.25),H=Math.max(Math.min(x.start-z,U.end-z),j+z);x.start-H>z&&this.flushMainBuffer(H,x.start)},m.getFwdBufferInfo=function(x,v){var j=this.config,U=this.getLoadPosition();if(!Object(F.isFiniteNumber)(U))return null;var T=P.BufferHelper.bufferInfo(x,U,j.maxBufferHole);if(T.len===0&&T.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(U,v);if(z&&T.nextStart<z.end)return P.BufferHelper.bufferInfo(x,U,Math.max(T.nextStart,j.maxBufferHole))}return T},m.getMaxBufferLength=function(x){var v=this.config,j;return x?j=Math.max(8*v.maxBufferSize/x,v.maxBufferLength):j=v.maxBufferLength,Math.min(j,v.maxMaxBufferLength)},m.reduceMaxBufferLength=function(x){var v=this.config,j=x||v.maxBufferLength;return v.maxMaxBufferLength>=j?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},m.getNextFragment=function(x,v){var j,U,T=v.fragments,z=T.length;if(!z)return null;var H=this.config,M=T[0].start,V;if(v.live){var K=H.initialLiveManifestSize;if(z<K)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+K+")"),null;!v.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(V=this.getInitialLiveFragment(v,T),this.startPosition=V?this.hls.liveSyncPosition||V.start:x)}else x<=M&&(V=T[0]);if(!V){var $=H.lowLatencyMode?v.partEnd:v.fragmentEnd;V=this.getFragmentAtPosition(x,$,v)}return(j=V)!==null&&j!==void 0&&j.initSegment&&!((U=V)!==null&&U!==void 0&&U.initSegment.data)&&!this.bitrateTest&&(V=V.initSegment),V},m.getNextPart=function(x,v,j){for(var U=-1,T=!1,z=!0,H=0,M=x.length;H<M;H++){var V=x[H];if(z=z&&!V.independent,U>-1&&j<V.start)break;var K=V.loaded;!K&&(T||V.independent||z)&&V.fragment===v&&(U=H),T=K}return U},m.loadedEndOfParts=function(x,v){var j=x[x.length-1];return j&&v>j.start&&j.loaded},m.getInitialLiveFragment=function(x,v){var j=this.fragPrevious,U=null;if(j){if(x.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+j.programDateTime),U=Object(a.findFragmentByPDT)(v,j.endProgramDateTime,this.config.maxFragLookUpTolerance)),!U){var T=j.sn+1;if(T>=x.startSN&&T<=x.endSN){var z=v[T-x.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)(v,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?x.fragmentEnd:x.edge,x))}return U},m.getFragmentAtPosition=function(x,v,j){var U=this.config,T=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(x<v){var Z=x>v-V?0:V;$=Object(a.findFragmentByPTS)(T,z,x,Z)}else $=z[z.length-1];if($){var ve=$.sn-j.startSN,oe=T&&$.level===T.level,fe=z[ve+1],ye=this.fragmentTracker.getState($);if(ye===R.FragmentState.BACKTRACKED){$=null;for(var Pe=ve;z[Pe]&&this.fragmentTracker.getState(z[Pe])===R.FragmentState.BACKTRACKED;)T?$=z[Pe--]:$=z[--Pe];$||($=fe)}else T&&$.sn===T.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 $},m.synchronizeToLiveEdge=function(x){var v=this.config,j=this.media;if(!j)return;var U=this.hls.liveSyncPosition,T=j.currentTime,z=x.fragments[0].start,H=x.edge,M=T>=z-v.maxFragLookUpTolerance&&T<=H;if(U!==null&&j.duration>U&&(T<U||!M)){var V=v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:v.liveMaxLatencyDurationCount*x.targetduration;(!M&&j.readyState<4||T<H-V)&&(this.loadedmetadata||(this.nextLoadPosition=U),j.readyState&&(this.warn("Playback: "+T.toFixed(3)+" is located too far from the end of live sliding playlist: "+H+", reset currentTime to : "+U.toFixed(3)),j.currentTime=U))}},m.alignPlaylists=function(x,v){var j=this.levels,U=this.levelLastLoaded,T=this.fragPrevious,z=U!==null?j[U]:null,H=x.fragments.length;if(!H)return this.warn("No fragments in live playlist"),0;var M=x.fragments[0].start,V=!v,K=x.alignedSliding&&Object(F.isFiniteNumber)(M);if(V||!K&&!M){Object(f.alignStream)(T,z,x);var $=x.fragments[0].start;return this.log("Live playlist sliding: "+$.toFixed(2)+" start-sn: "+(v?v.startSN:"na")+"->"+x.startSN+" prev-sn: "+(T?T.sn:"na")+" fragments: "+H),$}return M},m.waitForCdnTuneIn=function(x){var v=3;return x.live&&x.canBlockReload&&x.tuneInGoal>Math.max(x.partHoldBack,x.partTarget*v)},m.setStartPosition=function(x,v){var j=this.startPosition;if(j<v&&(j=-1),j===-1||this.lastCurrentTime===-1){var U=x.startTimeOffset;Object(F.isFiniteNumber)(U)?(j=v+U,U<0&&(j+=x.totalduration),j=Math.min(Math.max(v,j),v+x.totalduration),this.log("Start time offset "+U+" found in playlist, adjust startPosition to "+j),this.startPosition=j):x.live?j=this.hls.liveSyncPosition||v:this.startPosition=j=0,this.lastCurrentTime=j}this.nextLoadPosition=j},m.getLoadPosition=function(){var x=this.media,v=0;return this.loadedmetadata&&x?v=x.currentTime:this.nextLoadPosition&&(v=this.nextLoadPosition),v},m.handleFragLoadAborted=function(x,v){this.transmuxer&&x.sn!=="initSegment"&&x.stats.aborted&&(this.warn("Fragment "+x.sn+(v?" part"+v.index:"")+" of level "+x.level+" was aborted"),this.resetFragmentLoading(x))},m.resetFragmentLoading=function(x){(!this.fragCurrent||!this.fragContextChanged(x))&&(this.state=w.IDLE)},m.onFragmentOrKeyLoadError=function(x,v){if(v.fatal)return;var j=v.frag;if(!j||j.type!==x)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 T=this.config;if(this.fragLoadError+1<=T.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(j.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*T.fragLoadingRetryDelay,T.fragLoadingMaxRetryTimeout);this.warn("Fragment "+j.sn+" of "+x+" "+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 v.levelRetry?(x===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(y.logger.error(v.details+" reaches max retry, redispatch as fatal ..."),v.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)},m.afterBufferFlushed=function(x,v,j){if(!x)return;var U=P.BufferHelper.getBuffered(x);this.fragmentTracker.detectEvictedFragments(v,U,j),this.state===w.ENDED&&this.resetLoadingState()},m.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},m.resetLiveStartWhenNotLoaded=function(x){if(!this.loadedmetadata){this.startFragRequested=!1;var v=this.levels?this.levels[x].details:null;if(v!=null&&v.live)return this.startPosition=-1,this.setStartPosition(v,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},m.updateLevelTiming=function(x,v,j,U){var T=this,z=j.details;console.assert(!!z,"level.details must be defined");var H=Object.keys(x.elementaryStreams).reduce(function(M,V){var K=x.elementaryStreams[V];if(K){var $=K.endPTS-K.startPTS;if($<=0)return T.warn("Could not parse fragment "+x.sn+" "+V+" duration reliably ("+$+") resetting transmuxer to fallback to playlist timing"),T.resetTransmuxer(),M||!1;var Z=U?0:Object(o.updateFragPTSDTS)(z,x,K.startPTS,K.endPTS,K.startDTS,K.endDTS);return T.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:z,level:j,drift:Z,type:V,frag:x,start:K.startPTS,end:K.endPTS}),!0}return M},!1);H?(this.state=w.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:x,part:v})):this.resetLoadingState()},m.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(p,[{key:"state",get:function(){return this._state},set:function(x){var v=this._state;v!==x&&(this._state=x,this.log(v+"->"+x))}}]),p}(S.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"),S=I("./src/events.ts"),R=I("./src/utils/logger.ts"),P=I("./src/errors.ts"),y=I("./src/utils/buffer-helper.ts"),t=I("./src/utils/mediasource-helper.ts"),b=I("./src/loader/fragment.ts"),i=I("./src/controller/buffer-operation-queue.ts"),u=Object(t.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function o(l){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 s=n.hls,d=n.media,E=n.mediaSource;R.logger.log("[buffer-controller]: Media source opened"),d&&(n.updateMediaElementDuration(),s.trigger(S.Events.MEDIA_ATTACHED,{media:d})),E&&E.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=l,this._initSourceBuffer(),this.registerListeners()}var c=o.prototype;return c.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},c.destroy=function(){this.unregisterListeners(),this.details=null},c.registerListeners=function(){var n=this.hls;n.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(S.Events.BUFFER_RESET,this.onBufferReset,this),n.on(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(S.Events.BUFFER_EOS,this.onBufferEos,this),n.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(S.Events.FRAG_PARSED,this.onFragParsed,this),n.on(S.Events.FRAG_CHANGED,this.onFragChanged,this)},c.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(S.Events.BUFFER_RESET,this.onBufferReset,this),n.off(S.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(S.Events.BUFFER_EOS,this.onBufferEos,this),n.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(S.Events.FRAG_PARSED,this.onFragParsed,this),n.off(S.Events.FRAG_CHANGED,this.onFragChanged,this)},c._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},c.onManifestParsed=function(n,s){var d=2;(s.audio&&!s.video||!s.altAudio)&&(d=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=d,this.details=null,R.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},c.onMediaAttaching=function(n,s){var d=this.media=s.media;if(d&&u){var E=this.mediaSource=new u;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),d.src=self.URL.createObjectURL(E),this._objectUrl=d.src}},c.onMediaDetaching=function(){var n=this.media,s=this.mediaSource,d=this._objectUrl;if(s){if(R.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(E){R.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(d&&self.URL.revokeObjectURL(d),n.src===d?(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(S.Events.MEDIA_DETACHED,void 0)},c.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(s){var d=n.sourceBuffer[s];try{d&&(n.removeBufferListeners(s),n.mediaSource&&n.mediaSource.removeSourceBuffer(d),n.sourceBuffer[s]=void 0)}catch(E){R.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",E)}}),this._initSourceBuffer()},c.onBufferCodecs=function(n,s){var d=this,E=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(A){if(E){var C=d.tracks[A];if(C&&typeof C.buffer.changeType=="function"){var k=s[A],w=k.codec,g=k.levelCodec,h=k.container,p=(C.levelCodec||C.codec).replace(f,"$1"),m=(g||w).replace(f,"$1");if(p!==m){var _=h+";codecs="+(g||w);d.appendChangeType(A,_)}}}else d.pendingTracks[A]=s[A]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},c.appendChangeType=function(n,s){var d=this,E=this.operationQueue,A={execute:function(){var k=d.sourceBuffer[n];k&&(R.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+s),k.changeType(s)),E.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(k){R.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",k)}};E.append(A,n)},c.onBufferAppending=function(n,s){var d=this,E=this.hls,A=this.operationQueue,C=this.tracks,k=s.data,w=s.type,g=s.frag,h=s.part,p=s.chunkMeta,m=p.buffering[w],_=self.performance.now();m.start=_;var x=g.stats.buffering,v=h?h.stats.buffering:null;x.start===0&&(x.start=_),v&&v.start===0&&(v.start=_);var j=C.audio,U=w==="audio"&&p.id===1&&(j==null?void 0:j.container)==="audio/mpeg",T={execute:function(){if(m.executeStart=self.performance.now(),U){var H=d.sourceBuffer[w];if(H){var M=g.start-H.timestampOffset;Math.abs(M)>=.1&&(R.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+M+") sn: "+g.sn+")"),H.timestampOffset=g.start)}}d.appendExecutor(k,w)},onStart:function(){},onComplete:function(){var H=self.performance.now();m.executeEnd=m.end=H,x.first===0&&(x.first=H),v&&v.first===0&&(v.first=H);var M=d.sourceBuffer,V={};for(var K in M)V[K]=y.BufferHelper.getBuffered(M[K]);d.appendError=0,d.hls.trigger(S.Events.BUFFER_APPENDED,{type:w,frag:g,part:h,chunkMeta:p,parent:g.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:g.type,details:P.ErrorDetails.BUFFER_APPEND_ERROR,err:H,fatal:!1};H.code===DOMException.QUOTA_EXCEEDED_ERR?M.details=P.ErrorDetails.BUFFER_FULL_ERROR:(d.appendError++,M.details=P.ErrorDetails.BUFFER_APPEND_ERROR,d.appendError>E.config.appendErrorMaxRetry&&(R.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),M.fatal=!0)),E.trigger(S.Events.ERROR,M)}};A.append(T,w)},c.onBufferFlushing=function(n,s){var d=this,E=this.operationQueue,A=function(k){return{execute:d.removeExecutor.bind(d,k,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){d.hls.trigger(S.Events.BUFFER_FLUSHED,{type:k})},onError:function(g){R.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",g)}}};s.type?E.append(A(s.type),s.type):this.getSourceBufferTypes().forEach(function(C){E.append(A(C),C)})},c.onFragParsed=function(n,s){var d=this,E=s.frag,A=s.part,C=[],k=A?A.elementaryStreams:E.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();E.stats.buffering.end=h,A&&(A.stats.buffering.end=h);var p=A?A.stats:E.stats;d.hls.trigger(S.Events.FRAG_BUFFERED,{frag:E,part:A,stats:p,id:E.type})};C.length===0&&R.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(w,C)},c.onFragChanged=function(n,s){this.flushBackBuffer()},c.onBufferEos=function(n,s){var d=this,E=this.getSourceBufferTypes().reduce(function(A,C){var k=d.sourceBuffer[C];return(!s.type||s.type===C)&&(k&&!k.ended&&(k.ended=!0,R.logger.log("[buffer-controller]: "+C+" sourceBuffer now EOS"))),A&&!!(!k||k.ended)},!0);E&&this.blockBuffers(function(){var A=d.mediaSource;if(!A||A.readyState!=="open")return;A.endOfStream()})},c.onLevelUpdated=function(n,s){var d=s.details;if(!d.fragments.length)return;this.details=d,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},c.flushBackBuffer=function(){var n=this.hls,s=this.details,d=this.media,E=this.sourceBuffer;if(!d||s===null)return;var A=this.getSourceBufferTypes();if(!A.length)return;var C=s.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(F.isFiniteNumber)(C)||C<0)return;var k=d.currentTime,w=s.levelTargetDuration,g=Math.max(C,w),h=Math.floor(k/w)*w-g;A.forEach(function(p){var m=E[p];if(m){var _=y.BufferHelper.getBuffered(m);_.length>0&&h>_.start(0)&&(n.trigger(S.Events.BACK_BUFFER_REACHED,{bufferEnd:h}),s.live&&n.trigger(S.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),n.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:p}))}})},c.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,s=this.hls,d=this.media,E=this.mediaSource,A=n.fragments[0].start+n.totalduration,C=d.duration,k=Object(F.isFiniteNumber)(E.duration)?E.duration:0;n.live&&s.config.liveDurationInfinity?(R.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.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)),E.duration=A)},c.updateSeekableRange=function(n){var s=this.mediaSource,d=n.fragments,E=d.length;if(E&&n.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var A=Math.max(0,d[0].start),C=Math.max(A,A+n.totalduration);s.setLiveSeekableRange(A,C)}},c.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,s=this.operationQueue,d=this.pendingTracks,E=Object.keys(d).length;if(E&&!n||E===2){this.createSourceBuffers(d),this.pendingTracks={};var A=this.getSourceBufferTypes();if(A.length===0){this.hls.trigger(S.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){s.executeNext(C)})}},c.createSourceBuffers=function(n){var s=this.sourceBuffer,d=this.mediaSource;if(!d)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var A in n)if(!s[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 g=s[A]=d.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:g,codec:k,container:C.container,levelCodec:C.levelCodec,id:C.id},E++}catch(p){R.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+p.message),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,mimeType:w})}}E&&this.hls.trigger(S.Events.BUFFER_CREATED,{tracks:this.tracks})},c._onSBUpdateStart=function(n){var s=this.operationQueue,d=s.current(n);d.onStart()},c._onSBUpdateEnd=function(n){var s=this.operationQueue,d=s.current(n);d.onComplete(),s.shiftAndExecuteNext(n)},c._onSBUpdateError=function(n,s){R.logger.error("[buffer-controller]: "+n+" SourceBuffer error",s),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var d=this.operationQueue.current(n);d&&d.onError(s)},c.removeExecutor=function(n,s,d){var E=this.media,A=this.mediaSource,C=this.operationQueue,k=this.sourceBuffer,w=k[n];if(!E||!A||!w){R.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),C.shiftAndExecuteNext(n);return}var g=Object(F.isFiniteNumber)(E.duration)?E.duration:Infinity,h=Object(F.isFiniteNumber)(A.duration)?A.duration:Infinity,p=Math.max(0,s),m=Math.min(d,g,h);m>p?(R.logger.log("[buffer-controller]: Removing ["+p+","+m+"] from the "+n+" SourceBuffer"),console.assert(!w.updating,n+" sourceBuffer must not be updating"),w.remove(p,m)):C.shiftAndExecuteNext(n)},c.appendExecutor=function(n,s){var d=this.operationQueue,E=this.sourceBuffer,A=E[s];if(!A){R.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),d.shiftAndExecuteNext(s);return}A.ended=!1,console.assert(!A.updating,s+" sourceBuffer must not be updating"),A.appendBuffer(n)},c.blockBuffers=function(n,s){var d=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){R.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var E=this.operationQueue,A=s.map(function(C){return E.appendBlocker(C)});Promise.all(A).then(function(){n(),s.forEach(function(C){var k=d.sourceBuffer[C];(!k||!k.updating)&&E.shiftAndExecuteNext(C)})})},c.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},c.addBufferListener=function(n,s,d){var E=this.sourceBuffer[n];if(!E)return;var A=d.bind(this,n);this.listeners[n].push({event:s,listener:A}),E.addEventListener(s,A)},c.removeBufferListeners=function(n){var s=this.sourceBuffer[n];if(!s)return;this.listeners[n].forEach(function(d){s.removeEventListener(d.event,d.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return S});var F=I("./src/utils/logger.ts"),S=function(){function R(y){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=y}var P=R.prototype;return P.append=function(t,b){var i=this.queues[b];i.push(t),i.length===1&&this.buffers[b]&&this.executeNext(b)},P.insertAbort=function(t,b){var i=this.queues[b];i.unshift(t),this.executeNext(b)},P.appendBlocker=function(t){var b,i=new Promise(function(f){b=f}),u={execute:b,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(u,t),i},P.executeNext=function(t){var b=this.buffers,i=this.queues,u=b[t],f=i[t];if(f.length){var a=f[0];try{a.execute()}catch(o){F.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),(!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 S(y,t){for(var b=0;b<t.length;b++){var i=t[b];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(y,i.key,i)}}function R(y,t,b){return t&&S(y.prototype,t),b&&S(y,b),y}var P=function(){function y(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=y.prototype;return t.setStreamController=function(i){this.streamController=i},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var i=this.hls;i.on(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var i=this.hls;i.off(F.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(i,u){y.isLevelAllowed(u.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(u.droppedLevel)},t.onMediaAttaching=function(i,u){this.media=u.media instanceof HTMLVideoElement?u.media:null},t.onManifestParsed=function(i,u){var f=this.hls;this.restrictedLevels=[],this.firstLevel=u.firstLevel,f.config.capLevelToPlayerSize&&u.video&&this.startCapping()},t.onBufferCodecs=function(i,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 i=this.hls.levels;if(i.length){var u=this.hls;u.autoLevelCapping=this.getMaxLevel(i.length-1),u.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=u.autoLevelCapping}}},t.getMaxLevel=function(i){var u=this,f=this.hls.levels;if(!f.length)return-1;var a=f.filter(function(o,c){return y.isLevelAllowed(c,u.restrictedLevels)&&c<=i});return this.clientRect=null,y.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 i=this.media,u={width:0,height:0};if(i){var f=i.getBoundingClientRect();u.width=f.width,u.height=f.height,!u.width&&!u.height&&(u.width=f.right-f.left||i.width||0,u.height=f.bottom-f.top||i.height||0)}return this.clientRect=u,u},y.isLevelAllowed=function(i,u){return u===void 0&&(u=[]),u.indexOf(i)===-1},y.getMaxLevelByMediaSize=function(i,u,f){if(!i||!i.length)return-1;for(var a=function(s,d){return d?s.width!==d.width||s.height!==d.height:!0},o=i.length-1,c=0;c<i.length;c+=1){var l=i[c];if((l.width>=u||l.height>=f)&&a(l,i[c+1])){o=c;break}}return o},R(y,[{key:"mediaWidth",get:function(){return this.getDimensions().width*y.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*y.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(u){}return i}}]),y}();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"),S=I("./src/types/cmcd.ts"),R=I("./src/utils/buffer-helper.ts"),P=I("./src/utils/logger.ts");function y(o,c){for(var l=0;l<c.length;l++){var n=c[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,n.key,n)}}function t(o,c,l){return c&&y(o.prototype,c),l&&y(o,l),o}function b(o,c){var l=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(l)return(l=l.call(o)).next.bind(l);if(Array.isArray(o)||(l=i(o))||c&&o&&typeof o.length=="number"){l&&(o=l);var n=0;return function(){return n>=o.length?{done:!0}:{done:!1,value:o[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 i(o,c){if(!o)return;if(typeof o=="string")return u(o,c);var l=Object.prototype.toString.call(o).slice(8,-1);if(l==="Object"&&o.constructor&&(l=o.constructor.name),l==="Map"||l==="Set")return Array.from(o);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return u(o,c)}function u(o,c){(c==null||c>o.length)&&(c=o.length);for(var l=0,n=new Array(c);l<c;l++)n[l]=o[l];return n}function f(){return f=Object.assign||function(o){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(o[n]=l[n])}return o},f.apply(this,arguments)}var a=function(){function o(l){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(E){try{n.apply(E,{ot:S.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(A){P.logger.warn("Could not generate manifest CMCD data.",A)}},this.applyFragmentData=function(E){try{var A=E.frag,C=n.hls.levels[A.level],k=n.getObjectType(A),w={d:A.duration*1e3,ot:k};(k===S.CMCDObjectType.VIDEO||k===S.CMCDObjectType.AUDIO||k==S.CMCDObjectType.MUXED)&&(w.br=C.bitrate/1e3,w.tb=n.getTopBandwidth(k),w.bl=n.getBufferLength(k)),n.apply(E,w)}catch(g){P.logger.warn("Could not generate segment CMCD data.",g)}},this.hls=l;var s=this.config=l.config,d=s.cmcd;d!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=d.sessionId||o.uuid(),this.cid=d.contentId,this.useHeaders=d.useHeaders===!0,this.registerListeners())}var c=o.prototype;return c.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)},c.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()},c.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},c.onMediaAttached=function(n,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},c.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},c.onBufferCreated=function(n,s){var d,E;this.audioBuffer=(d=s.tracks.audio)===null||d===void 0?void 0:d.buffer,this.videoBuffer=(E=s.tracks.video)===null||E===void 0?void 0:E.buffer},c.createData=function(){var n;return{v:S.CMCDVersion,sf:S.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}},c.apply=function(n,s){s===void 0&&(s={}),f(s,this.createData());var d=s.ot===S.CMCDObjectType.INIT||s.ot===S.CMCDObjectType.VIDEO||s.ot===S.CMCDObjectType.MUXED;if(this.starved&&d&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var E=o.toHeaders(s);if(!Object.keys(E).length)return;n.headers||(n.headers={}),f(n.headers,E)}else{var A=o.toQuery(s);if(!A)return;n.url=o.appendQueryToUri(n.url,A)}},c.getObjectType=function(n){var s=n.type;return s==="subtitle"?S.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?S.CMCDObjectType.INIT:s==="audio"?S.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?S.CMCDObjectType.VIDEO:S.CMCDObjectType.MUXED:void 0},c.getTopBandwidth=function(n){for(var s=0,d=n===S.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=b(d),A;!(A=E()).done;){var C=A.value;C.bitrate>s&&(s=C.bitrate)}return s>0?s:NaN},c.getBufferLength=function(n){var s=this.hls.media,d=n===S.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!d||!s)return NaN;var E=R.BufferHelper.bufferInfo(d,s.currentTime,this.config.maxBufferHole);return E.len*1e3},c.createPlaylistLoader=function(){var n=this.config.pLoader,s=this.applyPlaylistData,d=n||this.config.loader;return function(){function E(C){this.loader=void 0,this.loader=new d(C)}var A=E.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(k,w,g){s(k),this.loader.load(k,w,g)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},c.createFragmentLoader=function(){var n=this.config.fLoader,s=this.applyFragmentData,d=n||this.config.loader;return function(){function E(C){this.loader=void 0,this.loader=new d(C)}var A=E.prototype;return A.destroy=function(){this.loader.destroy()},A.abort=function(){this.loader.abort()},A.load=function(k,w,g){s(k),this.loader.load(k,w,g)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},o.uuid=function(){var n=URL.createObjectURL(new Blob),s=n.toString();return URL.revokeObjectURL(n),s.substr(s.lastIndexOf("/")+1)},o.serialize=function(n){for(var s=[],d=function(U){return!Number.isNaN(U)&&U!=null&&U!==""&&U!==!1},E=function(U){return Math.round(U)},A=function(U){return E(U/100)*100},C=function(U){return encodeURIComponent(U)},k={br:E,d:E,bl:A,dl:A,mtp:A,nor:C,rtp:A,tb:E},w=Object.keys(n||{}).sort(),g=b(w),h;!(h=g()).done;){var p=h.value,m=n[p];if(!d(m))continue;if(p==="v"&&m===1)continue;if(p=="pr"&&m===1)continue;var _=k[p];_&&(m=_(m));var x=typeof m,v=void 0;p==="ot"||p==="sf"||p==="st"?v=p+"="+m:x==="boolean"?v=p:x==="number"?v=p+"="+m:v=p+"="+JSON.stringify(m),s.push(v)}return s.join(",")},o.toHeaders=function(n){for(var s=Object.keys(n),d={},E=["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=s;k<w.length;k++){var g=w[k],h=C[g]!=null?C[g]:1;A[h][g]=n[g]}for(var p=0;p<A.length;p++){var m=o.serialize(A[p]);m&&(d["CMCD-"+E[p]]=m)}return d},o.toQuery=function(n){return"CMCD="+encodeURIComponent(o.serialize(n))},o.appendQueryToUri=function(n,s){if(!s)return n;var d=n.includes("?")?"&":"?";return""+n+d+s},o}()},"./src/controller/eme-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),P=I("./src/utils/mediakeys-helper.ts");function y(a,o){for(var c=0;c<o.length;c++){var l=o[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function t(a,o,c){return o&&y(a.prototype,o),c&&y(a,c),a}var b=3,i=function(o,c,l){var n={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(s){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:l.audioRobustness||""})}),c.forEach(function(s){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:l.videoRobustness||""})}),[n]},u=function(o,c,l,n){switch(o){case P.KeySystems.WIDEVINE:return i(c,l,n);default:throw new Error("Unknown key-system: "+o)}},f=function(){function a(c){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=c,this._config=c.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var o=a.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._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)},o._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)},o.getLicenseServerUrl=function(l){switch(l){case P.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},o._attemptKeySystemAccess=function(l,n,s){var d=this,E=u(l,n,s,this._drmSystemOptions);R.logger.log("Requesting encrypted media key-system access");var A=this.requestMediaKeySystemAccess(l,E);this.mediaKeysPromise=A.then(function(C){return d._onMediaKeySystemAccessObtained(l,C)}),A.catch(function(C){R.logger.error('Failed to obtain key-system "'+l+'" access:',C)})},o._onMediaKeySystemAccessObtained=function(l,n){var s=this;R.logger.log('Access for key-system "'+l+'" obtained');var d={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:l};this._mediaKeysList.push(d);var E=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(A){return d.mediaKeys=A,R.logger.log('Media-keys created for key-system "'+l+'"'),s._onMediaKeysCreated(),A});return E.catch(function(A){R.logger.error("Failed to create media-keys:",A)}),E},o._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),l._onNewMediaKeySession(n.mediaKeysSession))})},o._onNewMediaKeySession=function(l){var n=this;R.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(s){n._onKeySessionMessage(l,s.message)},!1)},o._onKeySessionMessage=function(l,n){R.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(s){R.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),l.update(s)})},o.onMediaEncrypted=function(l){var n=this;if(R.logger.log('Media is encrypted using "'+l.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:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(E){if(!n._media)return;n._attemptSetMediaKeys(E),n._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(s).catch(s)},o._attemptSetMediaKeys=function(l){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:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}R.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(l,n){var s=this,d=this._mediaKeysList[0];if(!d){R.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(d.mediaKeysSessionInitialized){R.logger.warn("Key-Session already initialized but requested again");return}var E=d.mediaKeysSession;if(!E){R.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.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:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}R.logger.log('Generating key-session request for "'+l+'" init data type'),d.mediaKeysSessionInitialized=!0,E.generateRequest(l,n).then(function(){R.logger.debug("Key-session generation succeeded")}).catch(function(A){R.logger.error("Error generating key-session request:",A),s.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(l,n,s){var d=new XMLHttpRequest;d.responseType="arraybuffer",d.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,d,l,n,s);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,d,l),E=void 0}catch(A){R.logger.error(A)}try{d.readyState||d.open("POST",l,!0),E&&E.call(this.hls,d,l)}catch(A){throw new Error("issue setting up KeySystem license XHR "+A)}return d},o._onLicenseRequestReadyStageChange=function(l,n,s,d){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,R.logger.log("License request succeeded");var E=l.response,A=this._licenseResponseCallback;if(A)try{E=A.call(this.hls,l,n)}catch(k){R.logger.error(k)}d(E)}else{if(R.logger.error("License Request XHR failed ("+n+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>b){this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.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(s,d)}break}},o._generateLicenseRequestChallenge=function(l,n){switch(l.mediaKeySystemDomain){case P.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},o._requestLicense=function(l,n){R.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){R.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var d=this.getLicenseServerUrl(s.mediaKeySystemDomain),E=this._createLicenseXhr(d,l,n);R.logger.log("Sending license request to URL: "+d);var A=this._generateLicenseRequestChallenge(s,l);E.send(A)}catch(C){R.logger.error("Failure requesting DRM license: "+C),this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.KEY_SYSTEM_ERROR,details:S.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(l,n){if(!this._emeEnabled)return;var s=n.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var l=this._media,n=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(l,n){if(!this._emeEnabled)return;var s=n.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),d=n.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(P.KeySystems.WIDEVINE,s,d)},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"),S=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 y=P.prototype;return y.setStreamController=function(b){this.streamController=b},y.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},y.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching)},y.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},y.onMediaAttaching=function(b,i){var u=this.hls.config;if(u.capLevelOnFPSDrop){var f=i.media instanceof self.HTMLVideoElement?i.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)}},y.checkFPS=function(b,i,u){var f=performance.now();if(i){if(this.lastTime){var a=f-this.lastTime,o=u-this.lastDroppedFrames,c=i-this.lastDecodedFrames,l=1e3*o/a,n=this.hls;if(n.trigger(F.Events.FPS_DROP,{currentDropped:o,currentDecoded:c,totalDroppedFrames:u}),l>0&&o>n.config.fpsDroppedMonitoringThreshold*c){var s=n.currentLevel;S.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=s)&&(s=s-1,n.trigger(F.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:n.currentLevel}),n.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=u,this.lastDecodedFrames=i}},y.checkFPSInterval=function(){var b=this.media;if(b)if(this.isVideoPlaybackQualityAvailable){var i=b.getVideoPlaybackQuality();this.checkFPS(b,i.totalVideoFrames,i.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 y}),I.d(B,"pdtWithinToleranceTest",function(){return t}),I.d(B,"findFragWithCC",function(){return b});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/binary-search.ts");function R(i,u,f){if(u===null||!Array.isArray(i)||!i.length||!Object(F.isFiniteNumber)(u))return null;var a=i[0].programDateTime;if(u<(a||0))return null;var o=i[i.length-1].endProgramDateTime;if(u>=(o||0))return null;f=f||0;for(var c=0;c<i.length;++c){var l=i[c];if(t(u,f,l))return l}return null}function P(i,u,f,a){f===void 0&&(f=0),a===void 0&&(a=0);var o=null;if(i?o=u[i.sn-u[0].sn+1]||null:f===0&&u[0].start===0&&(o=u[0]),o&&y(f,a,o)===0)return o;var c=S.default.search(u,y.bind(null,f,a));return c||o}function y(i,u,f){i===void 0&&(i=0),u===void 0&&(u=0);var a=Math.min(u,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-a<=i?1:f.start-a>i&&f.start?-1:0}function t(i,u,f){var a=Math.min(u,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,o=f.endProgramDateTime||0;return o-a>i}function b(i,u){return S.default.search(i,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"),S=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 i=b.prototype;return i._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)},i._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)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(f,a){if(a===S.PlaylistLevelType.MAIN){var o=this.activeFragment,c=this.activeParts;if(!o)return null;if(c)for(var l=c.length;l--;){var n=c[l],s=n?n.end:o.appendedPTS;if(n.start<=f&&s!==void 0&&f<=s)return l>9&&(this.activeParts=c.slice(l-9)),n}else if(o.start<=f&&o.appendedPTS!==void 0&&f<=o.appendedPTS)return o}return this.getBufferedFrag(f,a)},i.getBufferedFrag=function(f,a){for(var o=this.fragments,c=Object.keys(o),l=c.length;l--;){var n=o[c[l]];if((n==null?void 0:n.body.type)===a&&n.buffered){var s=n.body;if(s.start<=f&&f<=s.end)return s}}return null},i.detectEvictedFragments=function(f,a,o){var c=this;Object.keys(this.fragments).forEach(function(l){var n=c.fragments[l];if(!n)return;if(!n.buffered){n.body.type===o&&c.removeFragment(n.body);return}var s=n.range[f];if(!s)return;s.time.some(function(d){var E=!c.isTimeBuffered(d.startPTS,d.endPTS,a);return E&&c.removeFragment(n.body),E})})},i.detectPartialFragments=function(f){var a=this,o=this.timeRanges,c=f.frag,l=f.part;if(!o||c.sn==="initSegment")return;var n=t(c),s=this.fragments[n];if(!s)return;Object.keys(o).forEach(function(d){var E=c.elementaryStreams[d];if(!E)return;var A=o[d],C=l!==null||E.partial===!0;s.range[d]=a.getBufferedTimes(c,l,C,A)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},i.fragBuffered=function(f){var a=t(f),o=this.fragments[a];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},i.getBufferedTimes=function(f,a,o,c){for(var l={time:[],partial:o},n=a?a.start:f.start,s=a?a.end:f.end,d=f.minEndPTS||s,E=f.maxStartPTS||n,A=0;A<c.length;A++){var C=c.start(A)-this.bufferPadding,k=c.end(A)+this.bufferPadding;if(E>=C&&d<=k){l.time.push({startPTS:Math.max(n,c.start(A)),endPTS:Math.min(s,c.end(A))});break}else if(n<k&&s>C)l.partial=!0,l.time.push({startPTS:Math.max(n,c.start(A)),endPTS:Math.min(s,c.end(A))});else if(s<=C)break}return l},i.getPartialFragment=function(f){var a=null,o,c,l,n=0,s=this.bufferPadding,d=this.fragments;return Object.keys(d).forEach(function(E){var A=d[E];if(!A)return;y(A)&&(c=A.body.start-s,l=A.body.end+s,f>=c&&f<=l&&(o=Math.min(f-c,l-f),n<=o&&(a=A.body,n=o)))}),a},i.getState=function(f){var a=t(f),o=this.fragments[a];return o?o.buffered?y(o)?R.PARTIAL:R.OK:o.backtrack?R.BACKTRACKED:R.APPENDING:R.NOT_LOADED},i.backtrack=function(f,a){var o=t(f),c=this.fragments[o];if(!c||c.backtrack)return null;var l=c.backtrack=a||c.loaded;return c.loaded=null,l},i.getBacktrackData=function(f){var a=t(f),o=this.fragments[a];if(o){var c,l=o.backtrack;if(l!=null&&(c=l.payload)!==null&&c!==void 0&&c.byteLength)return l;this.removeFragment(f)}return null},i.isTimeBuffered=function(f,a,o){for(var c,l,n=0;n<o.length;n++){if(c=o.start(n)-this.bufferPadding,l=o.end(n)+this.bufferPadding,f>=c&&a<=l)return!0;if(a<=c)return!1}return!1},i.onFragLoaded=function(f,a){var o=a.frag,c=a.part;if(o.sn==="initSegment"||o.bitrateTest||c)return;var l=t(o);this.fragments[l]={body:o,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(f,a){var o=this,c=a.frag,l=a.part,n=a.timeRanges;if(c.type===S.PlaylistLevelType.MAIN)if(this.activeFragment=c,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(d){var E=n[d];if(o.detectEvictedFragments(d,E),!l)for(var A=0;A<E.length;A++)c.appendedPTS=Math.max(E.end(A),c.appendedPTS||0)})},i.onFragBuffered=function(f,a){this.detectPartialFragments(a)},i.hasFragment=function(f){var a=t(f);return!!this.fragments[a]},i.removeFragmentsInRange=function(f,a,o){var c=this;Object.keys(this.fragments).forEach(function(l){var n=c.fragments[l];if(!n)return;if(n.buffered){var s=n.body;s.type===o&&s.start<a&&s.end>f&&c.removeFragment(s)}})},i.removeFragment=function(f){var a=t(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[a]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},b}();function y(b){var i,u;return b.buffered&&(((i=b.range.video)===null||i===void 0?void 0:i.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 y}),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 i}),I.d(B,"default",function(){return u});var F=I("./src/utils/buffer-helper.ts"),S=I("./src/errors.ts"),R=I("./src/events.ts"),P=I("./src/utils/logger.ts"),y=250,t=2,b=.1,i=.05,u=function(){function f(o,c,l,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=o,this.media=c,this.fragmentTracker=l,this.hls=n}var a=f.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(c){var l=this.config,n=this.media,s=this.stalled,d=n.currentTime,E=n.seeking,A=this.seeking&&!E,C=!this.seeking&&E;if(this.seeking=E,d!==c){if(this.moved=!0,s!==null){if(this.stallReported){var k=self.performance.now()-s;P.logger.warn("playback not stuck anymore @"+d+", 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,d,0),g=w.len>0,h=w.nextStart||0;if(!g&&!h)return;if(E){var p=w.len>t,m=!h||h-d>t&&!this.fragmentTracker.getPartialFragment(d);if(p||m)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var _,x=Math.max(h,w.start||0)-d,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,j=v==null||((_=v.details)===null||_===void 0)?void 0:_.live,U=j?v.details.targetduration*2:t;if(x>0&&x<=U){this._trySkipBufferHole(null);return}}var T=self.performance.now();if(s===null){this.stalled=T;return}var z=T-s;!E&&z>=y&&this._reportStall(w.len);var H=F.BufferHelper.bufferInfo(n,d,l.maxBufferHole);this._tryFixBufferStall(H,z)},a._tryFixBufferStall=function(c,l){var n=this.config,s=this.fragmentTracker,d=this.media,E=d.currentTime,A=s.getPartialFragment(E);if(A){var C=this._trySkipBufferHole(A);if(C)return}c.len>n.maxBufferHole&&l>n.highBufferWatchdogPeriod*1e3&&(P.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(c){var l=this.hls,n=this.media,s=this.stallReported;s||(this.stallReported=!0,P.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+c+")"),l.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:c}))},a._trySkipBufferHole=function(c){for(var l=this.config,n=this.hls,s=this.media,d=s.currentTime,E=0,A=F.BufferHelper.getBuffered(s),C=0;C<A.length;C++){var k=A.start(C);if(d+l.maxBufferHole>=E&&d<k){var w=Math.max(k+i,s.currentTime+b);return P.logger.warn("skipping hole, adjusting currentTime from "+d+" to "+w),this.moved=!0,this.stalled=null,s.currentTime=w,c&&n.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+d+" to "+w,frag:c}),w}E=A.end(C)}return 0},a._tryNudgeBuffer=function(){var c=this.config,l=this.hls,n=this.media,s=n.currentTime,d=(this.nudgeRetry||0)+1;if(this.nudgeRetry=d,d<c.nudgeMaxRetry){var E=s+d*c.nudgeOffset;P.logger.warn("Nudging 'currentTime' from "+s+" to "+E),n.currentTime=E,l.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else P.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+c.nudgeMaxRetry+" nudges"),l.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.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"),S=I("./src/utils/texttrack-utils.ts"),R=I("./src/demux/id3.ts"),P=.25,y=function(){function t(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,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(S.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(S.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},b.onFragParsingMetadata=function(u,f){if(!this.media)return;var a=f.frag,o=f.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var c=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<o.length;l++){var n=R.getID3Frames(o[l].data);if(n){var s=o[l].pts,d=l<o.length-1?o[l+1].pts:a.end,E=d-s;E<=0&&(d=s+P);for(var A=0;A<n.length;A++){var C=n[A];if(!R.isTimeStampFrame(C)){var k=new c(s,d,"");k.value=C,this.id3Track.addCue(k)}}}}},b.onBufferFlushing=function(u,f){var a=f.startOffset,o=f.endOffset,c=f.type;if(!c||c==="audio"){var l=this.id3Track;l&&Object(S.removeCuesInRange)(l,a,o)}},t}();B.default=y},"./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"),S=I("./src/events.ts"),R=I("./src/utils/logger.ts");function P(b,i){for(var u=0;u<i.length;u++){var f=i[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(b,f.key,f)}}function y(b,i,u){return i&&P(b.prototype,i),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 i=b.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(S.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(S.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(S.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(S.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(S.Events.ERROR,this.onError)},i.onMediaAttached=function(f,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(f,a){var o=a.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.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")},i.timeupdate=function(){var f=this.media,a=this.levelDetails;if(!f||!a)return;this.currentTime=f.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var c=this.config,l=c.lowLatencyMode,n=c.maxLiveSyncPlaybackRate;if(!l||n===1)return;var s=this.targetLatency;if(s===null)return;var d=o-s,E=Math.min(this.maxLatency,s+a.targetduration),A=d<E;if(a.live&&A&&d>.05&&this.forwardBufferLength>1){var C=Math.min(2,Math.max(1,n)),k=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20;f.playbackRate=Math.min(C,Math.max(1,k))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},i.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},i.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},y(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,o=f.partHoldBack,c=f.targetduration,l=this.config,n=l.liveSyncDuration,s=l.liveSyncDurationCount,d=l.lowLatencyMode,E=this.hls.userConfig,A=d&&o||a;(E.liveSyncDuration||E.liveSyncDurationCount||A===0)&&(A=n!==void 0?n:s*c);var C=c,k=1;return A+Math.min(this.stallCount*k,C)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),a=this.targetLatency,o=this.levelDetails;if(f===null||a===null||o===null)return null;var c=o.edge,l=f-a-this.edgeStalled,n=c-o.totalduration,s=c-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(n,l),s)}},{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 o=f.buffered.length;return o?f.buffered.end(o-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 l});var F=I("./src/types/level.ts"),S=I("./src/events.ts"),R=I("./src/errors.ts"),P=I("./src/utils/codecs.ts"),y=I("./src/controller/level-helper.ts"),t=I("./src/controller/base-playlist-controller.ts"),b=I("./src/types/loader.ts");function i(){return i=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&(n[E]=d[E])}return n},i.apply(this,arguments)}function u(n,s){for(var d=0;d<s.length;d++){var E=s[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}function f(n,s,d){return s&&u(n.prototype,s),d&&u(n,d),n}function a(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,o(n,s)}function o(n,s){return o=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E},o(n,s)}var c=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(n){a(s,n);function s(E){var A;return A=n.call(this,E,"[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 d=s.prototype;return d._registerListeners=function(){var A=this.hls;A.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),A.on(S.Events.ERROR,this.onError,this)},d._unregisterListeners=function(){var A=this.hls;A.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),A.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),A.off(S.Events.ERROR,this.onError,this)},d.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},d.startLoad=function(){var A=this._levels;A.forEach(function(C){C.loadError=0}),n.prototype.startLoad.call(this)},d.onManifestLoaded=function(A,C){var k=[],w=[],g=[],h,p={},m,_=!1,x=!1,v=!1;if(C.levels.forEach(function(z){var H=z.attrs;_=_||!!(z.width&&z.height),x=x||!!z.videoCodec,v=v||!!z.audioCodec,c&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var M=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;m=p[M],m?m.url.push(z.url):(m=new F.Level(z),p[M]=m,k.push(m)),H&&(H.AUDIO&&Object(y.addGroupId)(m,"audio",H.AUDIO),H.SUBTITLES&&Object(y.addGroupId)(m,"text",H.SUBTITLES))}),(_||x)&&v&&(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(y.assignTrackIdsByGroup)(w)),C.subtitles&&(g=C.subtitles,Object(y.assignTrackIdsByGroup)(g)),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=v&&!x,T={levels:k,audioTracks:w,subtitleTracks:g,firstLevel:this._firstLevel,stats:C.stats,audio:v,video:x,altAudio:!U&&w.some(function(z){return!!z.url})};this.hls.trigger(S.Events.MANIFEST_PARSED,T),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(S.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"})},d.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 g=!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 m=this._levels[C.frag.level];m?(m.fragmentError++,m.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),g=!0;break;case R.ErrorDetails.REMUX_ALLOC_ERROR:p=C.level,g=!0;break}p!==void 0&&this.recoverLevel(C,p,g,h)},d.recoverLevel=function(A,C,k,w){var g=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 m=h.url.length;if(m>1&&h.loadError<m)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(g+": switch to "+_),A.levelRetry=!0,this.hls.nextAutoLevel=_)}}},d.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(g){g.urlId=w}),this.level=A}},d.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)}},d.onLevelLoaded=function(A,C){var k,w=C.level,g=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&&(g.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&&(g.deltaUpdateFailed=!0)},d.onAudioTrackSwitched=function(A,C){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var w=-1,g=this.hls.audioTracks[C.id].groupId,h=0;h<k.audioGroupIds.length;h++)if(k.audioGroupIds[h]===g){w=h;break}w!==k.urlId&&(k.urlId=w,this.startLoad())}},d.loadPlaylist=function(A){var C=this.currentLevelIndex,k=this._levels[C];if(this.canLoad&&k&&k.url.length>0){var w=k.urlId,g=k.url[w];if(A)try{g=A.addDirectives(g)}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+" "+g),this.clearTimer(),this.hls.trigger(S.Events.LEVEL_LOADING,{url:g,level:C,id:w,deliveryDirectives:A||null})}},d.removeLevel=function(A,C){var k=function(h,p){return p!==C},w=this._levels.filter(function(g,h){return h!==A?!0:g.url.length>1&&C!==void 0?(g.url=g.url.filter(k),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(k)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(k)),g.urlId=0,!0):!1}).map(function(g,h){var p=g.details;return p!=null&&p.fragments&&p.fragments.forEach(function(m){m.level=h}),g});this._levels=w,this.hls.trigger(S.Events.LEVELS_UPDATED,{levels:w})},f(s,[{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(S.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 g=this.currentLevelIndex,h=k[g],p=k[A];this.log("switching to level "+A+" from "+g),this.currentLevelIndex=A;var m=i({},p,{level:A,maxBitrate:p.maxBitrate,uri:p.uri,urlId:p.urlId});delete m._urlId,this.hls.trigger(S.Events.LEVEL_SWITCHING,m);var _=p.details;if(!_||_.live){var x=this.switchParams(p.uri,h==null?void 0:h.details);this.loadPlaylist(x)}}},{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)}}]),s}(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 y}),I.d(B,"updateFragPTSDTS",function(){return b}),I.d(B,"mergeDetails",function(){return i}),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 o}),I.d(B,"computeReloadInterval",function(){return c}),I.d(B,"getFragmentWithSN",function(){return l}),I.d(B,"getPartWith",function(){return n});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/logger.ts");function R(s,d,E){switch(d){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(E);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(E);break}}function P(s){var d={};s.forEach(function(E){var A=E.groupId||"";E.id=d[A]=d[A]||0,d[A]++})}function y(s,d,E){var A=s[d],C=s[E];t(A,C)}function t(s,d){var E=d.startPTS;if(Object(F.isFiniteNumber)(E)){var A=0,C;d.sn>s.sn?(A=E-s.start,C=s):(A=s.start-E,C=d),C.duration!==A&&(C.duration=A)}else if(d.sn>s.sn){var k=s.cc===d.cc;k&&s.minEndPTS?d.start=s.start+(s.minEndPTS-s.start):d.start=s.start+s.duration}else d.start=Math.max(s.start-d.duration,0)}function b(s,d,E,A,C,k){var w=A-E;w<=0&&(S.logger.warn("Fragment should have a positive duration",d),A=E+d.duration,k=C+d.duration);var g=E,h=A,p=d.startPTS,m=d.endPTS;if(Object(F.isFiniteNumber)(p)){var _=Math.abs(p-E);Object(F.isFiniteNumber)(d.deltaPTS)?d.deltaPTS=Math.max(_,d.deltaPTS):d.deltaPTS=_,g=Math.max(E,p),E=Math.min(E,p),C=Math.min(C,d.startDTS),h=Math.min(A,m),A=Math.max(A,m),k=Math.max(k,d.endDTS)}d.duration=A-E;var x=E-d.start;d.appendedPTS=A,d.start=d.startPTS=E,d.maxStartPTS=g,d.startDTS=C,d.endPTS=A,d.minEndPTS=h,d.endDTS=k;var v=d.sn;if(!s||v<s.startSN||v>s.endSN)return 0;var j,U=v-s.startSN,T=s.fragments;for(T[U]=d,j=U;j>0;j--)t(T[j],T[j-1]);for(j=U;j<T.length-1;j++)t(T[j],T[j+1]);return s.fragmentHint&&t(T[T.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,x}function i(s,d){for(var E=null,A=s.fragments,C=A.length-1;C>=0;C--){var k=A[C].initSegment;if(k){E=k;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var w=0,g;if(f(s,d,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&&(g=U),d.PTSKnown=d.alignedSliding=!0),U.elementaryStreams=j.elementaryStreams,U.loader=j.loader,U.stats=j.stats,U.urlId=j.urlId,j.initSegment&&(U.initSegment=j.initSegment,E=j.initSegment)}),E){var h=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments;h.forEach(function(j){var U;(!j.initSegment||j.initSegment.relurl===((U=E)===null||U===void 0?void 0:U.relurl))&&(j.initSegment=E)})}if(d.skippedSegments&&(d.deltaUpdateFailed=d.fragments.some(function(j){return!j}),d.deltaUpdateFailed)){S.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=d.skippedSegments;p--;)d.fragments.shift();d.startSN=d.fragments[0].sn,d.startCC=d.fragments[0].cc}var m=d.fragments;if(w){S.logger.warn("discontinuity sliding from playlist, take drift into account");for(var _=0;_<m.length;_++)m[_].cc+=w}d.skippedSegments&&(d.startCC=d.fragments[0].cc),u(s.partList,d.partList,function(j,U){U.elementaryStreams=j.elementaryStreams,U.stats=j.stats}),g?b(d,g,g.startPTS,g.endPTS,g.startDTS,g.endDTS):a(s,d),m.length&&(d.totalduration=d.edge-m[0].start),d.driftStartTime=s.driftStartTime,d.driftStart=s.driftStart;var x=d.advancedDateTime;if(d.advanced&&x){var v=d.edge;d.driftStart||(d.driftStartTime=x,d.driftStart=v),d.driftEndTime=x,d.driftEnd=v}else d.driftEndTime=s.driftEndTime,d.driftEnd=s.driftEnd,d.advancedDateTime=s.advancedDateTime}function u(s,d,E){if(s&&d)for(var A=0,C=0,k=s.length;C<=k;C++){var w=s[C],g=d[C+A];w&&g&&w.index===g.index&&w.fragment.sn===g.fragment.sn?E(w,g):A--}}function f(s,d,E){for(var A=d.skippedSegments,C=Math.max(s.startSN,d.startSN)-d.startSN,k=(s.fragmentHint?1:0)+(A?d.endSN:Math.min(s.endSN,d.endSN))-d.startSN,w=d.startSN-s.startSN,g=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,h=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,p=C;p<=k;p++){var m=h[w+p],_=g[p];A&&!_&&p<A&&(_=d.fragments[p]=m),m&&_&&E(m,_)}}function a(s,d){var E=d.startSN+d.skippedSegments-s.startSN,A=s.fragments;if(E<0||E>=A.length)return;o(d,A[E].start)}function o(s,d){if(d){for(var E=s.fragments,A=s.skippedSegments;A<E.length;A++)E[A].start+=d;s.fragmentHint&&(s.fragmentHint.start+=d)}}function c(s,d){var E=1e3*s.levelTargetDuration,A=E/2,C=s.age,k=C>0&&C<E*3,w=d.loading.end-d.loading.start,g,h=s.availabilityDelay;if(s.updated===!1)if(k){var p=333*s.misses;g=Math.max(Math.min(A,w*2),p),s.availabilityDelay=(s.availabilityDelay||0)+g}else g=A;else k?(h=Math.min(h||E/2,C),s.availabilityDelay=h,g=h+E-C):g=E-w;return Math.round(g)}function l(s,d,E){if(!s||!s.details)return null;var A=s.details,C=A.fragments[d-A.startSN];return C||(C=A.fragmentHint,C&&C.sn===d?C:d<A.startSN&&E&&E.sn===d?E:null)}function n(s,d,E){if(!s||!s.details)return null;var A=s.details.partList;if(A)for(var C=A.length;C--;){var k=A[C];if(k.index===E&&k.fragment.sn===d)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"),S=I("./src/controller/base-stream-controller.ts"),R=I("./src/is-supported.ts"),P=I("./src/events.ts"),y=I("./src/utils/buffer-helper.ts"),t=I("./src/controller/fragment-tracker.ts"),b=I("./src/types/loader.ts"),i=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"),o=I("./src/errors.ts"),c=I("./src/utils/logger.ts");function l(C,k){for(var w=0;w<k.length;w++){var g=k[w];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(C,g.key,g)}}function n(C,k,w){return k&&l(C.prototype,k),w&&l(C,w),C}function s(C,k){C.prototype=Object.create(k.prototype),C.prototype.constructor=C,d(C,k)}function d(C,k){return d=Object.setPrototypeOf||function(g,h){return g.__proto__=h,g},d(C,k)}var E=100,A=function(C){s(k,C);function k(g,h){var p;return p=C.call(this,g,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,m=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var _=m.startLevel;_===-1&&(m.config.testBandwidth?(_=0,this.bitrateTest=!0):_=m.nextAutoLevel),this.level=m.nextLoadLevel=_,this.loadedmetadata=!1}p>0&&h===-1&&(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),h=p),this.state=S.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=h,this.tick()}else this._forceStartLoad=!0,this.state=S.State.STOPPED},w.stopLoad=function(){this._forceStartLoad=!1,C.prototype.stopLoad.call(this)},w.doTick=function(){switch(this.state){case S.State.IDLE:this.doTickIdle();break;case S.State.WAITING_LEVEL:{var h,p=this.levels,m=this.level,_=p==null||((h=p[m])===null||h===void 0)?void 0:h.details;if(_&&(!_.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(_))break;this.state=S.State.IDLE;break}break}case S.State.FRAG_LOADING_WAITING_RETRY:{var x,v=self.performance.now(),j=this.retryDate;(!j||v>=j||(x=this.media)!==null&&x!==void 0&&x.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=S.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,m=this.hls,_=this.levelLastLoaded,x=this.levels,v=this.media,j=m.config,U=m.nextLoadLevel;if(_===null||!v&&(this.startFragRequested||!j.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!x||!x[U])return;var T=x[U];this.level=m.nextLoadLevel=U;var z=T.details;if(!z||this.state===S.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==U){this.state=S.State.WAITING_LEVEL;return}var H=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,b.PlaylistLevelType.MAIN);if(H===null)return;var M=H.len,V=this.getMaxBufferLength(T.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=S.State.ENDED;return}var $=H.end,Z=this.getNextFragment($,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var ve=Z.sn-z.startSN;ve>1&&(Z=z.fragments[ve-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===t.FragmentState.OK&&this.nextLoadPosition>$){var oe=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,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,m){var _,x=this.fragmentTracker.getState(h);if(this.fragCurrent=h,x===t.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(h);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else x=t.FragmentState.NOT_LOADED}x===t.FragmentState.NOT_LOADED||x===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,m)):x===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 m,_=this.getAppendedFrag(p.currentTime);if(_&&_.start>1&&this.flushMainBuffer(0,_.start-1),!p.paused&&h){var x=this.hls.nextLoadLevel,v=h[x],j=this.fragLastKbps;j&&this.fragCurrent?m=this.fragCurrent.duration*v.maxBitrate/(1e3*j)+1:m=0}else m=0;var U=this.getBufferedFrag(p.currentTime+m);if(U){var T=this.followingBufferedFrag(U);if(T){this.abortCurrentFrag();var z=T.maxStartPTS?T.maxStartPTS:T.start,H=T.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===S.State.KEY_LOADING&&(this.state=S.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 m=p.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),m.addEventListener("playing",this.onvplaying),m.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,m,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 m=!1,_=!1,x;p.levels.forEach(function(v){x=v.audioCodec,x&&(x.indexOf("mp4a.40.2")!==-1&&(m=!0),x.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=m&&_&&!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 m=this.levels;if(!m||this.state!==S.State.IDLE)return;var _=m[p.level];(!_.details||_.details.live&&this.levelLastLoaded!==p.level||this.waitForCdnTuneIn(_.details))&&(this.state=S.State.WAITING_LEVEL)},w.onLevelLoaded=function(h,p){var m,_=this.levels,x=p.level,v=p.details,j=v.totalduration;if(!_){this.warn("Levels were reset while loading level "+x);return}this.log("Level "+x+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+j);var U=this.fragCurrent;U&&(this.state===S.State.FRAG_LOADING||this.state===S.State.FRAG_LOADING_WAITING_RETRY)&&(U.level!==p.level&&U.loader&&(this.state=S.State.IDLE,U.loader.abort()));var T=_[x],z=0;if(v.live||(m=T.details)!==null&&m!==void 0&&m.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;z=this.alignPlaylists(v,T.details)}if(T.details=v,this.levelLastLoaded=x,this.hls.trigger(P.Events.LEVEL_UPDATED,{details:v,level:x}),this.state===S.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=S.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,z),this.tick()},w._handleFragmentLoadProgress=function(h){var p,m=h.frag,_=h.part,x=h.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var j=v[m.level],U=j.details;if(!U){this.warn("Dropping fragment "+m.sn+" of level "+m.level+" after level details were reset");return}var T=j.videoCodec,z=U.PTSKnown||!U.live,H=(p=m.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(m.level,m.sn,m.stats.chunkCount,x.byteLength,K,$),ve=this.initPTS[m.cc];V.push(x,H,M,T,m,_,U.totalduration,z,Z,ve)},w.onAudioTrackSwitching=function(h,p){var m=this.altAudio,_=!!p.url,x=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 v=this.fragCurrent;v!=null&&v.loader&&(this.log("Switching to main audio track, cancel main fragment load"),v.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var j=this.hls;m&&j.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),j.trigger(P.Events.AUDIO_TRACK_SWITCHED,{id:x})}},w.onAudioTrackSwitched=function(h,p){var m=p.id,_=!!this.hls.audioTracks[m].url;if(_){var x=this.videoBuffer;x&&this.mediaBuffer!==x&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=x)}this.altAudio=_,this.tick()},w.onBufferCreated=function(h,p){var m=p.tracks,_,x,v=!1;for(var j in m){var U=m[j];if(U.id==="main"){if(x=j,_=U,j==="video"){var T=m[j];T&&(this.videoBuffer=T.buffer)}}else v=!0}v&&_?(this.log("Alternate track found, use "+x+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},w.onFragBuffered=function(h,p){var m=p.frag,_=p.part;if(m&&m.type!==b.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(_?" p: "+_.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state),this.state===S.State.PARSED&&(this.state=S.State.IDLE);return}var x=_?_.stats:m.stats;this.fragLastKbps=Math.round(8*x.total/(x.buffering.end-x.loading.first)),m.sn!=="initSegment"&&(this.fragPrevious=m),this.fragBufferedComplete(m,_)},w.onError=function(h,p){switch(p.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(b.PlaylistLevelType.MAIN,p);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==S.State.ERROR&&(p.fatal?(this.warn(""+p.details),this.state=S.State.ERROR):!p.levelRetry&&this.state===S.State.WAITING_LEVEL&&(this.state=S.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="main"&&(this.state===S.State.PARSING||this.state===S.State.PARSED)){var m=!0,_=this.getFwdBufferInfo(this.media,b.PlaylistLevelType.MAIN);_&&_.len>.5&&(m=!this.reduceMaxBufferLength(_.len)),m&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},w.checkBuffer=function(){var h=this.media,p=this.gapController;if(!h||!p||!h.readyState)return;var m=y.BufferHelper.getBuffered(h);!this.loadedmetadata&&m.length?(this.loadedmetadata=!0,this.seekToStartPos()):p.poll(this.lastCurrentTime),this.lastCurrentTime=h.currentTime},w.onFragLoadEmergencyAborted=function(){this.state=S.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},w.onBufferFlushed=function(h,p){var m=p.type;if(m!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var _=(m===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(_,m,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,m=this.startPosition;if(m>=0&&p<m){if(h.seeking){c.logger.log("could not seek to "+m+", already seeking at "+p);return}var _=y.BufferHelper.getBuffered(h),x=_.length?_.start(0):0,v=x-m;v>0&&(v<this.config.maxBufferHole||v<this.config.maxFragLookUpTolerance)&&(c.logger.log("adjusting start position by "+v+" to match buffer start"),m+=v,this.startPosition=m),this.log("seek to target start position "+m+" from current time "+p),h.currentTime=m}},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(m){var _=p.hls;if(!m||_.nextLoadLevel||p.fragContextChanged(h))return;p.fragLoadError=0,p.state=S.State.IDLE,p.startFragRequested=!1,p.bitrateTest=!1;var x=h.stats;x.parsing.start=x.parsing.end=x.buffering.start=x.buffering.end=self.performance.now(),_.trigger(P.Events.FRAG_LOADED,m)})},w._handleTransmuxComplete=function(h){var p,m="main",_=this.hls,x=h.remuxResult,v=h.chunkMeta,j=this.getCurrentContext(v);if(!j){this.warn("The loading context changed while buffering fragment "+v.sn+" of level "+v.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(v.level);return}var U=j.frag,T=j.part,z=j.level,H=x.video,M=x.text,V=x.id3,K=x.initSegment,$=this.altAudio?void 0:x.audio;if(this.fragContextChanged(U))return;if(this.state=S.State.PARSING,K){K.tracks&&(this._bufferInitSegment(z,K.tracks,U,v),_.trigger(P.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:m,tracks:K.tracks}));var Z=K.initPTS,ve=K.timescale;Object(F.isFiniteNumber)(Z)&&(this.initPTS[U.cc]=Z,_.trigger(P.Events.INIT_PTS_FOUND,{frag:U,id:m,initPTS:Z,timescale:ve}))}if(H&&x.independent!==!1){if(z.details){var oe=H.startPTS,fe=H.endPTS,ye=H.startDTS,Pe=H.endDTS;if(T)T.elementaryStreams[H.type]={startPTS:oe,endPTS:fe,startDTS:ye,endDTS:Pe};else if(H.firstKeyFrame&&H.independent&&(this.couldBacktrack=!0),H.dropped&&H.independent){var ge=this.getLoadPosition()+this.config.maxBufferHole;if(ge<oe){this.backtrack(U);return}U.setElementaryStreamInfo(H.type,U.start,fe,U.start,Pe,!0)}U.setElementaryStreamInfo(H.type,oe,fe,ye,Pe),this.bufferFragmentData(H,U,T,v)}}else if(x.independent===!1){this.backtrack(U);return}if($){var de=$.startPTS,Qe=$.endPTS,St=$.startDTS,Ee=$.endDTS;T&&(T.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:de,endPTS:Qe,startDTS:St,endDTS:Ee}),U.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,de,Qe,St,Ee),this.bufferFragmentData($,U,T,v)}if(V!=null&&(p=V.samples)!==null&&p!==void 0&&p.length){var De={frag:U,id:m,samples:V.samples};_.trigger(P.Events.FRAG_PARSING_METADATA,De)}if(M){var rt={frag:U,id:m,samples:M.samples};_.trigger(P.Events.FRAG_PARSING_USERDATA,rt)}},w._bufferInitSegment=function(h,p,m,_){var x=this;if(this.state!==S.State.PARSING)return;this.audioOnly=!!p.audio&&!p.video,this.altAudio&&!this.audioOnly&&delete p.audio;var v=p.audio,j=p.video,U=p.audiovideo;if(v){var T=h.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(T&&(T.indexOf("mp4a.40.5")!==-1?T="mp4a.40.2":T="mp4a.40.5"),v.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(T="mp4a.40.5")),z.indexOf("android")!==-1&&v.container!=="audio/mpeg"&&(T="mp4a.40.2",this.log("Android: force audio codec to "+T)),h.audioCodec&&h.audioCodec!==T&&this.log('Swapping manifest audio codec "'+h.audioCodec+'" for "'+T+'"'),v.levelCodec=T,v.id="main",this.log("Init audio buffer, container:"+v.container+", codecs[selected/level/parsed]=["+(T||"")+"/"+(h.audioCodec||"")+"/"+v.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&&x.hls.trigger(P.Events.BUFFER_APPENDING,{type:H,data:V,frag:m,part:null,chunkMeta:_,parent:m.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=S.State.BACKTRACKING},w.checkFragmentChanged=function(){var h=this.media,p=null;if(h&&h.readyState>1&&h.seeking===!1){var m=h.currentTime;if(y.BufferHelper.isBuffered(h,m)?p=this.getAppendedFrag(m):y.BufferHelper.isBuffered(h,m+.1)&&(p=this.getAppendedFrag(m+.1)),p){var _=this.fragPlaying,x=p.level;(!_||p.sn!==_.sn||_.level!==x||p.urlId!==_.urlId)&&(this.hls.trigger(P.Events.FRAG_CHANGED,{frag:p}),(!_||_.level!==x)&&this.hls.trigger(P.Events.LEVEL_SWITCHED,{level:x}),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}(S.default)},"./src/controller/subtitle-stream-controller.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"SubtitleStreamController",function(){return s});var F=I("./src/events.ts"),S=I("./src/utils/logger.ts"),R=I("./src/utils/buffer-helper.ts"),P=I("./src/controller/fragment-finders.ts"),y=I("./src/utils/discontinuities.ts"),t=I("./src/controller/level-helper.ts"),b=I("./src/controller/fragment-tracker.ts"),i=I("./src/controller/base-stream-controller.ts"),u=I("./src/types/loader.ts"),f=I("./src/types/level.ts");function a(d,E){for(var A=0;A<E.length;A++){var C=E[A];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(d,C.key,C)}}function o(d,E,A){return E&&a(d.prototype,E),A&&a(d,A),d}function c(d,E){d.prototype=Object.create(E.prototype),d.prototype.constructor=d,l(d,E)}function l(d,E){return l=Object.setPrototypeOf||function(C,k){return C.__proto__=k,C},l(d,E)}var n=500,s=function(d){c(E,d);function E(C,k){var w;return w=d.call(this,C,k,"[subtitle-stream-controller]")||this,w.levels=[],w.currentTrackId=-1,w.tracksBuffered=[],w.mainDetails=null,w._registerListeners(),w}var A=E.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=i.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 g=w.frag,h=w.success;if(this.fragPrevious=g,this.state=i.State.IDLE,!h)return;var p=this.tracksBuffered[this.currentTrackId];if(!p)return;for(var m,_=g.start,x=0;x<p.length;x++)if(_>=p[x].start&&_<=p[x].end){m=p[x];break}var v=g.start+g.duration;m?m.end=v:(m={start:_,end:v},p.push(m)),this.fragmentTracker.fragBuffered(g)},A.onBufferFlushing=function(k,w){var g=w.startOffset,h=w.endOffset;if(g===0&&h!==Number.POSITIVE_INFINITY){var p=this.currentTrackId,m=this.levels;if(!m.length||!m[p]||!m[p].details)return;var _=m[p].details,x=_.targetduration,v=h-x;if(v<=0)return;w.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(j){for(var U=0;U<j.length;){if(j[U].end<=v){j.shift();continue}else if(j[U].start<v)j[U].start=v;else break;U++}}),this.fragmentTracker.removeFragmentsInRange(g,v,u.PlaylistLevelType.SUBTITLE)}},A.onError=function(k,w){var g,h=w.frag;if(!h||h.type!==u.PlaylistLevelType.SUBTITLE)return;(g=this.fragCurrent)!==null&&g!==void 0&&g.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},A.onSubtitleTracksUpdated=function(k,w){var g=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){g.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 g=this.levels[this.currentTrackId];g!=null&&g.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,g&&this.setInterval(n)},A.onSubtitleTrackLoaded=function(k,w){var g,h=w.details,p=w.id,m=this.currentTrackId,_=this.levels;if(!_.length)return;var x=_[m];if(p>=_.length||p!==m||!x)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,h.live||(g=x.details)!==null&&g!==void 0&&g.live){var v=this.mainDetails;if(h.deltaUpdateFailed||!v)return;var j=v.fragments[0];if(!x.details)h.hasProgramDateTime&&v.hasProgramDateTime?Object(y.alignMediaPlaylistByPDT)(h,v):j&&Object(t.addSliding)(h,j.start);else{var U=this.alignPlaylists(h,x.details);U===0&&j&&Object(t.addSliding)(h,j.start)}}if(x.details=h,this.levelLastLoaded=p,this.tick(),h.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var T=Object(P.findFragmentByPTS)(null,h.fragments,this.media.currentTime,0);T||(this.warn("Subtitle playlist not aligned with playback"),x.details=void 0)}},A._handleFragmentLoadComplete=function(k){var w=k.frag,g=k.payload,h=w.decryptdata,p=this.hls;if(this.fragContextChanged(w))return;if(g&&g.byteLength>0&&h&&h.key&&h.iv&&h.method==="AES-128"){var m=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),h.key.buffer,h.iv.buffer).then(function(_){var x=performance.now();p.trigger(F.Events.FRAG_DECRYPTED,{frag:w,payload:_,stats:{tstart:m,tdecrypt:x}})})}},A.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var k,w=this.currentTrackId,g=this.levels;if(!g.length||!g[w]||!g[w].details)return;var h=g[w].details,p=h.targetduration,m=this.config,_=this.media,x=R.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,_.currentTime-p,m.maxBufferHole),v=x.end,j=x.len,U=this.getMaxBufferLength()+p;if(j>U)return;console.assert(h,"Subtitle track details are defined on idle subtitle stream controller tick");var T=h.fragments,z=T.length,H=h.edge,M,V=this.fragPrevious;if(v<H){var K=m.maxFragLookUpTolerance;V&&h.hasProgramDateTime&&(M=Object(P.findFragmentByPDT)(T,V.endProgramDateTime,K)),M||(M=Object(P.findFragmentByPTS)(V,T,v,K),!M&&V&&V.start<T[0].start&&(M=T[0]))}else M=T[z-1];(k=M)!==null&&k!==void 0&&k.encrypted?(S.logger.log("Loading key for "+M.sn),this.state=i.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,v)}},A.loadFragment=function(k,w,g){this.fragCurrent=k,d.prototype.loadFragment.call(this,k,w,g)},o(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(i.default)},"./src/controller/subtitle-track-controller.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/events.ts"),S=I("./src/utils/texttrack-utils.ts"),R=I("./src/controller/base-playlist-controller.ts"),P=I("./src/types/loader.ts");function y(a,o){for(var c=0;c<o.length;c++){var l=o[c];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l.key,l)}}function t(a,o,c){return o&&y(a.prototype,o),c&&y(a,c),a}function b(a,o){a.prototype=Object.create(o.prototype),a.prototype.constructor=a,i(a,o)}function i(a,o){return i=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},i(a,o)}var u=function(a){b(o,a);function o(l){var n;return n=a.call(this,l,"[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 c=o.prototype;return c.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},c.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)},c.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)},c.onMediaAttached=function(n,s){if(this.media=s.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)},c.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},c.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(s){Object(S.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},c.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},c.onManifestParsed=function(n,s){this.tracks=s.subtitleTracks},c.onSubtitleTrackLoaded=function(n,s){var d=s.id,E=s.details,A=this.trackId,C=this.tracksInGroup[A];if(!C){this.warn("Invalid subtitle track id "+d);return}var k=C.details;C.details=s.details,this.log("subtitle track "+d+" loaded ["+E.startSN+"-"+E.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,s,k))},c.onLevelLoading=function(n,s){this.switchLevel(s.level)},c.onLevelSwitching=function(n,s){this.switchLevel(s.level)},c.switchLevel=function(n){var s=this.hls.levels[n];if(!(s!=null&&s.textGroupIds))return;var d=s.textGroupIds[s.urlId];if(this.groupId!==d){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(w){return!d||w.groupId===d});this.tracksInGroup=A;var C=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=d;var k={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(F.Events.SUBTITLE_TRACKS_UPDATED,k),C!==-1&&this.setSubtitleTrack(C,E)}},c.findTrackId=function(n){for(var s=this.tracksInGroup,d=0;d<s.length;d++){var E=s[d];if((!this.selectDefaultTrack||E.default)&&(!n||n===E.name))return E.id}return-1},c.onError=function(n,s){if(a.prototype.onError.call(this,n,s),s.fatal||!s.context)return;s.context.type===P.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},c.loadPlaylist=function(n){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var d=s.id,E=s.groupId,A=s.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 "+d),this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADING,{url:A,id:d,groupId:E,deliveryDirectives:n||null})}},c.toggleTrackModes=function(n){var s=this,d=this.media,E=this.subtitleDisplay,A=this.trackId;if(!d)return;var C=f(d.textTracks),k=C.filter(function(h){return h.groupId===s.groupId});if(n===-1)[].slice.call(C).forEach(function(h){h.mode="disabled"});else{var w=k[A];w&&(w.mode="disabled")}var g=k[n];g&&(g.mode=E?"showing":"hidden")},c.setSubtitleTrack=function(n,s){var d,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(d=E[n])!==null&&d!==void 0&&d.details)||n<-1||n>=E.length)return;this.clearTimer();var A=E[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,g=A.name,h=A.type,p=A.url;this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:C,groupId:w,name:g,type:h,url:p});var m=this.switchParams(A.url,s==null?void 0:s.details);this.loadPlaylist(m)}else this.hls.trigger(F.Events.SUBTITLE_TRACK_SWITCH,{id:n})},c.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,s=f(this.media.textTracks),d=0;d<s.length;d++)if(s[d].mode==="hidden")n=d;else if(s[d].mode==="showing"){n=d;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},t(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,s)}}]),o}(R.default);function f(a){for(var o=[],c=0;c<a.length;c++){var l=a[c];l.kind==="subtitles"&&l.label&&o.push(a[c])}return o}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"),S=I("./src/events.ts"),R=I("./src/utils/cea-608-parser.ts"),P=I("./src/utils/output-filter.ts"),y=I("./src/utils/webvtt-parser.ts"),t=I("./src/utils/texttrack-utils.ts"),b=I("./src/utils/imsc1-ttml-parser.ts"),i=I("./src/types/loader.ts"),u=I("./src/utils/logger.ts"),f=function(){function l(s){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=c(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.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 d=new P.default(this,"textTrack1"),E=new P.default(this,"textTrack2"),A=new P.default(this,"textTrack3"),C=new P.default(this,"textTrack4");this.cea608Parser1=new R.default(1,d,E),this.cea608Parser2=new R.default(3,A,C)}s.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(S.Events.FRAG_LOADING,this.onFragLoading,this),s.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=l.prototype;return n.destroy=function(){var d=this.hls;d.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(S.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.off(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),d.off(S.Events.FRAG_LOADING,this.onFragLoading,this),d.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(S.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),d.off(S.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),d.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(S.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),d.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(d,E,A,C,k){for(var w=!1,g=k.length;g--;){var h=k[g],p=o(h[0],h[1],E,A);if(p>=0&&(h[0]=Math.min(h[0],E),h[1]=Math.max(h[1],A),w=!0,p/(A-E)>.5))return}if(w||k.push([E,A]),this.config.renderTextTracksNatively){var m=this.captionsTracks[d];this.Cues.newCue(m,E,A,C)}else{var _=this.Cues.newCue(null,E,A,C);this.hls.trigger(S.Events.CUES_PARSED,{type:"captions",cues:_,track:d})}},n.onInitPtsFound=function(d,E){var A=this,C=E.frag,k=E.id,w=E.initPTS,g=E.timescale,h=this.unparsedVttFrags;k==="main"&&(this.initPTS[C.cc]=w,this.timescale[C.cc]=g),h.length&&(this.unparsedVttFrags=[],h.forEach(function(p){A.onFragLoaded(S.Events.FRAG_LOADED,p)}))},n.getExistingTrack=function(d){var E=this.media;if(E)for(var A=0;A<E.textTracks.length;A++){var C=E.textTracks[A];if(C[d])return C}return null},n.createCaptionsTrack=function(d){this.config.renderTextTracksNatively?this.createNativeTrack(d):this.createNonNativeTrack(d)},n.createNativeTrack=function(d){if(this.captionsTracks[d])return;var E=this.captionsProperties,A=this.captionsTracks,C=this.media,k=E[d],w=k.label,g=k.languageCode,h=this.getExistingTrack(d);if(h)A[d]=h,Object(t.clearCurrentCues)(A[d]),Object(t.sendAddTrackEvent)(A[d],C);else{var p=this.createTextTrack("captions",w,g);p&&(p[d]=!0,A[d]=p)}},n.createNonNativeTrack=function(d){if(this.nonNativeCaptionsTracks[d])return;var E=this.captionsProperties[d];if(!E)return;var A=E.label,C={_id:d,label:A,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[d]=C,this.hls.trigger(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[C]})},n.createTextTrack=function(d,E,A){var C=this.media;return C?C.addTextTrack(d,E,A):void 0},n.onMediaAttaching=function(d,E){this.media=E.media,this._cleanTracks()},n.onMediaDetaching=function(){var d=this.captionsTracks;Object.keys(d).forEach(function(E){Object(t.clearCurrentCues)(d[E]),delete d[E]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=c(),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 d=this.media;if(!d)return;var E=d.textTracks;if(E)for(var A=0;A<E.length;A++)Object(t.clearCurrentCues)(E[A])},n.onSubtitleTracksUpdated=function(d,E){var A=this;this.textTracks=[];var C=E.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 g=this.media?this.media.textTracks:[];this.tracks.forEach(function(p,m){var _;if(m<g.length){for(var x=null,v=0;v<g.length;v++)if(a(g[v],p)){x=g[v];break}x&&(_=x)}_?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(S.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:h})}}},n.onManifestLoaded=function(d,E){var A=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(C){var k=/(?:CC|SERVICE)([1-4])/.exec(C.instreamId);if(!k)return;var w="textTrack"+k[1],g=A.captionsProperties[w];if(!g)return;g.label=C.name,C.lang&&(g.languageCode=C.lang),g.media=C})},n.onFragLoading=function(d,E){var A=this.cea608Parser1,C=this.cea608Parser2,k=this.lastSn,w=this.lastPartIndex;if(!this.enabled||!(A&&C))return;if(E.frag.type===i.PlaylistLevelType.MAIN){var g,h,p=E.frag.sn,m=(g=E==null||((h=E.part)===null||h===void 0)?void 0:h.index)!=null?g:-1;p===k+1||p===k&&m===w+1||(A.reset(),C.reset()),this.lastSn=p,this.lastPartIndex=m}},n.onFragLoaded=function(d,E){var A=E.frag,C=E.payload,k=this.initPTS,w=this.unparsedVttFrags;if(A.type===i.PlaylistLevelType.SUBTITLE)if(C.byteLength){if(!Object(F.isFiniteNumber)(k[A.cc])){w.push(E),k.length&&this.hls.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Missing initial subtitle PTS")});return}var g=A.decryptdata;if(g==null||g.key==null||g.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(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(d,E){var A=this,C=this.hls;Object(b.parseIMSC1)(E,this.initPTS[d.cc],this.timescale[d.cc],function(k){A._appendCues(k,d.level),C.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(k){u.logger.log("Failed to parse IMSC1: "+k),C.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:k})})},n._parseVTTs=function(d,E,A){var C=this,k=this.hls;Object(y.parseWebVTT)(E,this.initPTS[d.cc],this.timescale[d.cc],A,d.cc,d.start,function(w){C._appendCues(w,d.level),k.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(w){C._fallbackToIMSC1(d,E),u.logger.log("Failed to parse VTT cue: "+w),k.trigger(S.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:w})})},n._fallbackToIMSC1=function(d,E){var A=this,C=this.tracks[d.level];C.textCodec||Object(b.parseIMSC1)(E,this.initPTS[d.cc],this.timescale[d.cc],function(){C.textCodec=b.IMSC1_CODEC,A._parseIMSC1(d,E)},function(){C.textCodec="wvtt"})},n._appendCues=function(d,E){var A=this.hls;if(this.config.renderTextTracksNatively){var C=this.textTracks[E];if(C.mode==="disabled")return;d.forEach(function(g){return Object(t.addCueToTrack)(C,g)})}else{var k=this.tracks[E],w=k.default?"default":"subtitles"+E;A.trigger(S.Events.CUES_PARSED,{type:"subtitles",cues:d,track:w})}},n.onFragDecrypted=function(d,E){var A=E.frag;if(A.type===i.PlaylistLevelType.SUBTITLE){if(!Object(F.isFiniteNumber)(this.initPTS[A.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(S.Events.FRAG_LOADED,E)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(d,E){var A=this.cea608Parser1,C=this.cea608Parser2;if(!this.enabled||!(A&&C))return;for(var k=0;k<E.samples.length;k++){var w=E.samples[k].bytes;if(w){var g=this.extractCea608Data(w);A.addData(E.samples[k].pts,g[0]),C.addData(E.samples[k].pts,g[1])}}},n.onBufferFlushing=function(d,E){var A=E.startOffset,C=E.endOffset,k=E.endOffsetSubtitles,w=E.type,g=this.media;if(!g||g.currentTime<C)return;if(!w||w==="video"){var h=this.captionsTracks;Object.keys(h).forEach(function(m){return Object(t.removeCuesInRange)(h[m],A,C)})}if(this.config.renderTextTracksNatively&&(A===0&&k!==void 0)){var p=this.textTracks;Object.keys(p).forEach(function(m){return Object(t.removeCuesInRange)(p[m],A,k)})}},n.extractCea608Data=function(d){for(var E=d[0]&31,A=2,C=[[],[]],k=0;k<E;k++){var w=d[A++],g=127&d[A++],h=127&d[A++],p=(4&w)!==0,m=3&w;if(g===0&&h===0)continue;p&&((m===0||m===1)&&(C[m].push(g),C[m].push(h)))}return C},l}();function a(l,n){return l&&l.label===n.name&&!(l.textTrack1||l.textTrack2)}function o(l,n,s,d){return Math.min(n,d)-Math.max(l,s)}function c(){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 S(P,y){this.subtle=void 0,this.aesIV=void 0,this.subtle=P,this.aesIV=y}var R=S.prototype;return R.decrypt=function(y,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,y)},S}()},"./src/crypt/aes-decryptor.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"removePadding",function(){return S}),I.d(B,"default",function(){return R});var F=I("./src/utils/typed-array.ts");function S(P){var y=P.byteLength,t=y&&new DataView(P.buffer).getUint8(y-1);return t?Object(F.sliceUint8)(P,0,y-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 y=P.prototype;return y.uint8ArrayToUint32Array_=function(b){for(var i=new DataView(b),u=new Uint32Array(4),f=0;f<4;f++)u[f]=i.getUint32(f*4);return u},y.initTable=function(){var b=this.sBox,i=this.invSBox,u=this.subMix,f=u[0],a=u[1],o=u[2],c=u[3],l=this.invSubMix,n=l[0],s=l[1],d=l[2],E=l[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 g=k^k<<1^k<<2^k<<3^k<<4;g=g>>>8^g&255^99,b[C]=g,i[g]=C;var h=A[C],p=A[h],m=A[p],_=A[g]*257^g*16843008;f[C]=_<<24|_>>>8,a[C]=_<<16|_>>>16,o[C]=_<<8|_>>>24,c[C]=_,_=m*16843009^p*65537^h*257^C*16843008,n[g]=_<<24|_>>>8,s[g]=_<<16|_>>>16,d[g]=_<<8|_>>>24,E[g]=_,C?(C=h^A[A[A[m^h]]],k^=A[A[k]]):C=k=1}},y.expandKey=function(b){for(var i=this.uint8ArrayToUint32Array_(b),u=!0,f=0;f<i.length&&u;)u=i[f]===this.key[f],f++;if(u)return;this.key=i;var a=this.keySize=i.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var o=this.ksRows=(a+6+1)*4,c,l,n=this.keySchedule=new Uint32Array(o),s=this.invKeySchedule=new Uint32Array(o),d=this.sBox,E=this.rcon,A=this.invSubMix,C=A[0],k=A[1],w=A[2],g=A[3],h,p;for(c=0;c<o;c++){if(c<a){h=n[c]=i[c];continue}p=h,c%a===0?(p=p<<8|p>>>24,p=d[p>>>24]<<24|d[p>>>16&255]<<16|d[p>>>8&255]<<8|d[p&255],p^=E[c/a|0]<<24):a>6&&c%a===4&&(p=d[p>>>24]<<24|d[p>>>16&255]<<16|d[p>>>8&255]<<8|d[p&255]),n[c]=h=(n[c-a]^p)>>>0}for(l=0;l<o;l++)c=o-l,l&3?p=n[c]:p=n[c-4],l<4||c<=4?s[l]=p:s[l]=C[d[p>>>24]]^k[d[p>>>16&255]]^w[d[p>>>8&255]]^g[d[p&255]],s[l]=s[l]>>>0},y.networkToHostOrderSwap=function(b){return b<<24|(b&65280)<<8|(b&16711680)>>8|b>>>24},y.decrypt=function(b,i,u){for(var f=this.keySize+6,a=this.invKeySchedule,o=this.invSBox,c=this.invSubMix,l=c[0],n=c[1],s=c[2],d=c[3],E=this.uint8ArrayToUint32Array_(u),A=E[0],C=E[1],k=E[2],w=E[3],g=new Int32Array(b),h=new Int32Array(g.length),p,m,_,x,v,j,U,T,z,H,M,V,K,$,Z=this.networkToHostOrderSwap;i<g.length;){for(z=Z(g[i]),H=Z(g[i+1]),M=Z(g[i+2]),V=Z(g[i+3]),v=z^a[0],j=V^a[1],U=M^a[2],T=H^a[3],K=4,$=1;$<f;$++)p=l[v>>>24]^n[j>>16&255]^s[U>>8&255]^d[T&255]^a[K],m=l[j>>>24]^n[U>>16&255]^s[T>>8&255]^d[v&255]^a[K+1],_=l[U>>>24]^n[T>>16&255]^s[v>>8&255]^d[j&255]^a[K+2],x=l[T>>>24]^n[v>>16&255]^s[j>>8&255]^d[U&255]^a[K+3],v=p,j=m,U=_,T=x,K=K+4;p=o[v>>>24]<<24^o[j>>16&255]<<16^o[U>>8&255]<<8^o[T&255]^a[K],m=o[j>>>24]<<24^o[U>>16&255]<<16^o[T>>8&255]<<8^o[v&255]^a[K+1],_=o[U>>>24]<<24^o[T>>16&255]<<16^o[v>>8&255]<<8^o[j&255]^a[K+2],x=o[T>>>24]<<24^o[v>>16&255]<<16^o[j>>8&255]<<8^o[U&255]^a[K+3],h[i]=Z(p^A),h[i+1]=Z(x^C),h[i+2]=Z(_^k),h[i+3]=Z(m^w),A=z,C=H,k=M,w=V,i=i+4}return h.buffer},P}()},"./src/crypt/decrypter.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return i});var F=I("./src/crypt/aes-crypto.ts"),S=I("./src/crypt/fast-aes-key.ts"),R=I("./src/crypt/aes-decryptor.ts"),P=I("./src/utils/logger.ts"),y=I("./src/utils/mp4-tools.ts"),t=I("./src/utils/typed-array.ts"),b=16,i=function(){function u(a,o,c){var l=c===void 0?{}:c,n=l.removePKCS7Padding,s=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=o,this.removePKCS7Padding=s,s)try{var d=self.crypto;d&&(this.subtle=d.subtle||d.webkitSubtle)}catch(E){}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 o=this.currentResult;if(!o){this.reset();return}var c=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(R.removePadding)(c):c},f.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},f.decrypt=function(o,c,l,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),c,l);var s=this.flush();s&&n(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),c,l).then(n)},f.softwareDecrypt=function(o,c,l){var n=this.currentIV,s=this.currentResult,d=this.remainderData;this.logOnce("JS AES decrypt"),d&&(o=Object(y.appendUint8Array)(d,o),this.remainderData=null);var E=this.getValidChunk(o);if(!E.length)return null;n&&(l=n);var A=this.softwareDecrypter;A||(A=this.softwareDecrypter=new R.default),A.expandKey(c);var C=s;return this.currentResult=A.decrypt(E.buffer,0,l),this.currentIV=Object(t.sliceUint8)(E,-16).buffer,C||null},f.webCryptoDecrypt=function(o,c,l){var n=this,s=this.subtle;return(this.key!==c||!this.fastAesKey)&&(this.key=c,this.fastAesKey=new S.default(s,c)),this.fastAesKey.expandKey().then(function(d){if(!s)return Promise.reject(new Error("web crypto not initialized"));var E=new F.default(s,l);return E.decrypt(o.buffer,d)}).catch(function(d){return n.onWebCryptoError(d,o,c,l)})},f.onWebCryptoError=function(o,c,l,n){return P.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(c,l,n)},f.getValidChunk=function(o){var c=o,l=o.length-o.length%b;return l!==o.length&&(c=Object(t.sliceUint8)(o,0,l),this.remainderData=Object(t.sliceUint8)(o,l)),c},f.logOnce=function(o){if(!this.logEnabled)return;P.logger.log("[decrypter.ts]: "+o),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 S(P,y){this.subtle=void 0,this.key=void 0,this.subtle=P,this.key=y}var R=S.prototype;return R.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},S}()},"./src/demux/aacdemuxer.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),S=I("./src/demux/adts.ts"),R=I("./src/utils/logger.ts"),P=I("./src/demux/id3.ts");function y(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,t(i,u)}function t(i,u){return t=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},t(i,u)}var b=function(i){y(u,i);function u(a,o){var c;return c=i.call(this)||this,c.observer=void 0,c.config=void 0,c.observer=a,c.config=o,c}var f=u.prototype;return f.resetInitSegment=function(o,c,l){i.prototype.resetInitSegment.call(this,o,c,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},u.probe=function(o){if(!o)return!1;for(var c=P.getID3Data(o,0)||[],l=c.length,n=o.length;l<n;l++)if(S.probe(o,l))return R.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(o,c){return S.canParse(o,c)},f.appendFrame=function(o,c,l){S.initTrackConfig(o,this.observer,c,l,o.manifestCodec);var n=S.appendFrame(o,c,l,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 y}),I.d(B,"getHeaderLength",function(){return t}),I.d(B,"getFullFrameLength",function(){return b}),I.d(B,"canGetFrameLength",function(){return i}),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 o}),I.d(B,"getFrameDuration",function(){return c}),I.d(B,"parseFrameHeader",function(){return l}),I.d(B,"appendFrame",function(){return n});var F=I("./src/utils/logger.ts"),S=I("./src/errors.ts"),R=I("./src/events.ts");function P(s,d,E,A){var C,k,w,g,h=navigator.userAgent.toLowerCase(),p=A,m=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];C=((d[E+2]&192)>>>6)+1;var _=(d[E+2]&60)>>>2;if(_>m.length-1){s.trigger(R.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+_});return}return w=(d[E+2]&1)<<2,w|=(d[E+3]&192)>>>6,F.logger.log("manifest codec:"+A+", ADTS type:"+C+", samplingIndex:"+_),/firefox/i.test(h)?_>=6?(C=5,g=new Array(4),k=_-3):(C=2,g=new Array(2),k=_):h.indexOf("android")!==-1?(C=2,g=new Array(2),k=_):(C=5,g=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,g=new Array(2)),k=_)),g[0]=C<<3,g[0]|=(_&14)>>1,g[1]|=(_&1)<<7,g[1]|=w<<3,C===5&&(g[1]|=(k&14)>>1,g[2]=(k&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:m[_],channelCount:w,codec:"mp4a.40."+C,manifestCodec:p}}function y(s,d){return s[d]===255&&(s[d+1]&246)===240}function t(s,d){return s[d+1]&1?7:9}function b(s,d){return(s[d+3]&3)<<11|s[d+4]<<3|(s[d+5]&224)>>>5}function i(s,d){return d+5<s.length}function u(s,d){return d+1<s.length&&y(s,d)}function f(s,d){return i(s,d)&&y(s,d)&&b(s,d)<=s.length-d}function a(s,d){if(u(s,d)){var E=t(s,d);if(d+E>=s.length)return!1;var A=b(s,d);if(A<=E)return!1;var C=d+A;return C===s.length||u(s,C)}return!1}function o(s,d,E,A,C){if(!s.samplerate){var k=P(d,E,A,C);if(!k)return;s.config=k.config,s.samplerate=k.samplerate,s.channelCount=k.channelCount,s.codec=k.codec,s.manifestCodec=k.manifestCodec,F.logger.log("parsed codec:"+s.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function c(s){return 1024*9e4/s}function l(s,d,E,A,C){var k=t(s,d),w=b(s,d);if(w-=k,w>0){var g=E+A*C;return{headerLength:k,frameLength:w,stamp:g}}}function n(s,d,E,A,C){var k=c(s.samplerate),w=l(d,E,A,C,k);if(w){var g=w.frameLength,h=w.headerLength,p=w.stamp,m=h+g,_=Math.max(0,E+m-d.length),x;_?(x=new Uint8Array(m-h),x.set(d.subarray(E+h,d.length),0)):x=d.subarray(E+h,E+m);var v={unit:x,pts:p};return _||s.samples.push(v),{sample:v,length:m,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"),S=I("./src/demux/id3.ts"),R=I("./src/demux/dummy-demuxed-track.ts"),P=I("./src/utils/mp4-tools.ts"),y=I("./src/utils/typed-array.ts"),t=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var u=i.prototype;return u.resetInitSegment=function(a,o,c){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,o){return!1},u.appendFrame=function(a,o,c){},u.demux=function(a,o){this.cachedData&&(a=Object(P.appendUint8Array)(this.cachedData,a),this.cachedData=null);var c=S.getID3Data(a,0),l=c?c.length:0,n,s,d=this._audioTrack,E=this._id3Track,A=c?S.getTimeStamp(c):void 0,C=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=b(A,o)),c&&c.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:c}),s=this.initPTS;l<C;){if(this.canParse(a,l)){var k=this.appendFrame(d,a,l);k?(this.frameIndex++,s=k.sample.pts,l+=k.length,n=l):l=C}else S.canParse(a,l)?(c=S.getID3Data(a,l),E.samples.push({pts:s,dts:s,data:c}),l+=c.length,n=l):l++;if(l===C&&n!==C){var w=Object(y.sliceUint8)(a,n);this.cachedData?this.cachedData=Object(P.appendUint8Array)(this.cachedData,w):this.cachedData=w}}return{audioTrack:d,avcTrack:Object(R.dummyTrack)(),id3Track:E,textTrack:Object(R.dummyTrack)()}},u.demuxSampleAes=function(a,o,c){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},u.flush=function(a){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(R.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(R.dummyTrack)()}},u.destroy=function(){},i}(),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,i;if(t.length)t.length===1?i=t[0]:i=S(t,b);else return new Uint8Array(0);return this.reset(),i},P.reset=function(){this.chunks.length=0,this.dataLength=0},R}();function S(R,P){for(var y=new Uint8Array(P),t=0,b=0;b<R.length;b++){var i=R[b];y.set(i,t),t+=i.length}return y}},"./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"),S=function(){function R(y){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=y,this.bytesAvailable=y.byteLength,this.word=0,this.bitsAvailable=0}var P=R.prototype;return P.loadWord=function(){var t=this.data,b=this.bytesAvailable,i=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(i,i+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),i=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?i<<b|this.readBits(b):i},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,i=8,u,f=0;f<t;f++)i!==0&&(u=this.readEG(),i=(b+u+256)%256),b=i===0?b:i},P.readSPS=function(){var t=0,b=0,i=0,u=0,f,a,o,c=this.readUByte.bind(this),l=this.readBits.bind(this),n=this.readUEG.bind(this),s=this.readBoolean.bind(this),d=this.skipBits.bind(this),E=this.skipEG.bind(this),A=this.skipUEG.bind(this),C=this.skipScalingList.bind(this);c();var k=c();if(l(5),d(3),c(),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&&d(1),A(),A(),d(1),s())for(a=w!==3?8:12,o=0;o<a;o++)s()&&(o<6?C(16):C(64))}A();var g=n();if(g===0)n();else if(g===1)for(d(1),E(),E(),f=n(),o=0;o<f;o++)E();A(),d(1);var h=n(),p=n(),m=l(1);m===0&&d(1),d(1),s()&&(t=n(),b=n(),i=n(),u=n());var _=[1,1];if(s()&&s()){var x=c();switch(x){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:{_=[c()<<8|c(),c()<<8|c()];break}}}return{width:Math.ceil((h+1)*16-t*2-b*2),height:(2-m)*(p+1)*16-(m?2:4)*(i+u),pixelRatio:_}},P.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},R}();B.default=S},"./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 S}),I.d(B,"getID3Data",function(){return R}),I.d(B,"canParse",function(){return y}),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 s});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)))},S=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,g=0;F(C,k);){g+=10;var h=P(C,k+6);g+=h,S(C,k+10)&&(g+=10),k+=g}return g>0?C.subarray(w,w+g):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},y=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 g=k[w];if(b(g))return l(g)}return},b=function(C){return C&&C.key==="PRIV"&&C.info==="com.apple.streaming.transportStreamTimestamp"},i=function(C){var k=String.fromCharCode(C[0],C[1],C[2],C[3]),w=P(C,4),g=10;return{type:k,size:w,data:C.subarray(g,g+w)}},u=function(C){for(var k=0,w=[];F(C,k);){var g=P(C,k+6);k+=10;for(var h=k+g;k+8<h;){var p=i(C.subarray(k)),m=f(p);m&&w.push(m),k+=p.size+10}S(C,k)&&(k+=10)}return w},f=function(C){return C.type==="PRIV"?a(C):C.type[0]==="W"?c(C):o(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}},o=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 g=n(C.data.subarray(k));return{key:C.type,info:w,data:g}}var h=n(C.data.subarray(1));return{key:C.type,data:h}},c=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 g=n(C.data.subarray(k));return{key:C.type,info:w,data:g}}var h=n(C.data);return{key:C.type,data:h}},l=function(C){if(C.data.byteLength===8){var k=new Uint8Array(C.data),w=k[3]&1,g=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return g/=45,w&&(g+=4772185884e-2),Math.round(g)}return},n=function(C,k){k===void 0&&(k=!1);var w=E();if(w){var g=w.decode(C);if(k){var h=g.indexOf("\0");return h!==-1?g.substring(0,h):g}return g.replace(/\0/g,"")}for(var p=C.length,m,_,x,v="",j=0;j<p;){if(m=C[j++],m===0&&k)return v;if(m===0||m===3)continue;switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(m);break;case 12:case 13:_=C[j++],v+=String.fromCharCode((m&31)<<6|_&63);break;case 14:_=C[j++],x=C[j++],v+=String.fromCharCode((m&15)<<12|(_&63)<<6|(x&63)<<0);break;default:}}return v},s={decodeTextFrame:o},d;function E(){return!d&&typeof self.TextDecoder!="undefined"&&(d=new self.TextDecoder("utf-8")),d}},"./src/demux/mp3demuxer.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/demux/base-audio-demuxer.ts"),S=I("./src/demux/id3.ts"),R=I("./src/utils/logger.ts"),P=I("./src/demux/mpegaudio.ts");function y(i,u){i.prototype=Object.create(u.prototype),i.prototype.constructor=i,t(i,u)}function t(i,u){return t=Object.setPrototypeOf||function(a,o){return a.__proto__=o,a},t(i,u)}var b=function(i){y(u,i);function u(){return i.apply(this,arguments)||this}var f=u.prototype;return f.resetInitSegment=function(o,c,l){i.prototype.resetInitSegment.call(this,o,c,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:l,inputTimeScale:9e4,dropped:0}},u.probe=function(o){if(!o)return!1;for(var c=S.getID3Data(o,0)||[],l=c.length,n=o.length;l<n;l++)if(P.probe(o,l))return R.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(o,c){return P.canParse(o,c)},f.appendFrame=function(o,c,l){return this.initPTS===null?void 0:P.appendFrame(o,c,l,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"),S=I("./src/demux/dummy-demuxed-track.ts"),R=function(){function P(t,b){this.remainderData=null,this.config=void 0,this.config=b}var y=P.prototype;return y.resetTimeStamp=function(){},y.resetInitSegment=function(){},y.resetContiguity=function(){},P.probe=function(b){return Object(F.findBox)({data:b,start:0,end:Math.min(b.length,16384)},["moof"]).length>0},y.demux=function(b){var i=b,u=Object(S.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(F.appendUint8Array)(this.remainderData,b));var f=Object(F.segmentValidRange)(i);this.remainderData=f.remainder,u.samples=f.valid||new Uint8Array}else u.samples=i;return{audioTrack:Object(S.dummyTrack)(),avcTrack:u,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},y.flush=function(){var b=Object(S.dummyTrack)();return b.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(S.dummyTrack)(),avcTrack:b,id3Track:Object(S.dummyTrack)(),textTrack:Object(S.dummyTrack)()}},y.demuxSampleAes=function(b,i,u){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},y.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 i}),I.d(B,"isHeader",function(){return u}),I.d(B,"canParse",function(){return f}),I.d(B,"probe",function(){return a});var F=null,S=[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]],y=[0,1,1,4];function t(o,c,l,n,s){if(l+24>c.length)return;var d=b(c,l);if(d&&l+d.frameLength<=c.length){var E=d.samplesPerFrame*9e4/d.sampleRate,A=n+s*E,C={unit:c.subarray(l,l+d.frameLength),pts:A,dts:A};return o.config=[],o.channelCount=d.channelCount,o.samplerate=d.sampleRate,o.samples.push(C),{sample:C,length:d.frameLength,missing:0}}}function b(o,c){var l=o[c+1]>>3&3,n=o[c+1]>>1&3,s=o[c+2]>>4&15,d=o[c+2]>>2&3;if(l!==1&&s!==0&&s!==15&&d!==3){var E=o[c+2]>>1&1,A=o[c+3]>>6,C=l===3?3-n:n===3?3:4,k=S[C*14+s-1]*1e3,w=l===3?0:l===2?1:2,g=R[w*3+d],h=A===3?1:2,p=P[l][n],m=y[n],_=p*8*m,x=Math.floor(p*k/g+E)*m;if(F===null){var v=navigator.userAgent||"",j=v.match(/Chrome\/(\d+)/i);F=j?parseInt(j[1]):0}var U=!!F&&F<=87;return U&&n===2&&k>=224e3&&A===0&&(o[c+3]=o[c+3]|128),{sampleRate:g,channelCount:h,frameLength:x,samplesPerFrame:_}}}function i(o,c){return o[c]===255&&(o[c+1]&224)===224&&(o[c+1]&6)!==0}function u(o,c){return c+1<o.length&&i(o,c)}function f(o,c){var l=4;return i(o,c)&&l<=o.length-c}function a(o,c){if(c+1<o.length&&i(o,c)){var l=4,n=b(o,c),s=l;n!=null&&n.frameLength&&(s=n.frameLength);var d=c+s;return d===o.length||u(o,d)}return!1}},"./src/demux/sample-aes.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/crypt/decrypter.ts"),S=I("./src/demux/tsdemuxer.ts"),R=function(){function P(t,b,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new F.default(t,b,{removePKCS7Padding:!1})}var y=P.prototype;return y.decryptBuffer=function(b,i){this.decrypter.decrypt(b,this.keyData.key.buffer,this.keyData.iv.buffer,i)},y.decryptAacSample=function(b,i,u,f){var a=b[i].unit,o=a.subarray(16,a.length-a.length%16),c=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),l=this;this.decryptBuffer(c,function(n){var s=new Uint8Array(n);a.set(s,16),f||l.decryptAacSamples(b,i+1,u)})},y.decryptAacSamples=function(b,i,u){for(;;i++){if(i>=b.length){u();return}if(b[i].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(b,i,u,f),!f)return}},y.getAvcEncryptedData=function(b){for(var i=Math.floor((b.length-48)/160)*16+16,u=new Int8Array(i),f=0,a=32;a<=b.length-16;a+=160,f+=16)u.set(b.subarray(a,a+16),f);return u},y.getAvcDecryptedUnit=function(b,i){for(var u=new Uint8Array(i),f=0,a=32;a<=b.length-16;a+=160,f+=16)b.set(u.subarray(f,f+16),a);return b},y.decryptAvcSample=function(b,i,u,f,a,o){var c=Object(S.discardEPB)(a.data),l=this.getAvcEncryptedData(c),n=this;this.decryptBuffer(l.buffer,function(s){a.data=n.getAvcDecryptedUnit(c,s),o||n.decryptAvcSamples(b,i,u+1,f)})},y.decryptAvcSamples=function(b,i,u,f){if(b instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,u=0){if(i>=b.length){f();return}for(var a=b[i].units;!(u>=a.length);u++){var o=a[u];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var c=this.decrypter.isSync();if(this.decryptAvcSample(b,i,u,f,o,c),!c)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"),S=I.n(F),R=I("./src/events.ts"),P=I("./src/demux/transmuxer.ts"),y=I("./src/utils/logger.ts"),t=I("./src/errors.ts"),b=I("./src/utils/mediasource-helper.ts"),i=I("./node_modules/eventemitter3/index.js"),u=I.n(i),f=Object(b.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function o(l,n,s,d){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=l,this.id=n,this.onTransmuxComplete=s,this.onFlush=d;var A=l.config,C=function(p,m){m=m||{},m.frag=E.frag,m.id=E.id,l.trigger(p,m)};this.observer=new i.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"){y.logger.log("demuxing in webworker");var g;try{g=this.worker=F("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(h){l.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+")")})},g.postMessage({cmd:"init",typeSupported:k,vendor:w,id:n,config:JSON.stringify(A)})}catch(h){y.logger.warn("Error in worker:",h),y.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.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 c=o.prototype;return c.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var d=this.observer;d&&d.removeAllListeners(),this.observer=null},c.push=function(n,s,d,E,A,C,k,w,g,h){var p=this;g.transmuxing.start=self.performance.now();var m=this.transmuxer,_=this.worker,x=C?C.start:A.start,v=A.decryptdata,j=this.frag,U=!(j&&A.cc===j.cc),T=!(j&&g.level===j.level),z=j?g.sn-j.sn:-1,H=this.part?g.part-this.part.index:1,M=!T&&(z===1||z===0&&H===1),V=self.performance.now();(T||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,T,x);if(!M||U){y.logger.log("[transmuxer-interface, "+A.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+`
|
|
discontinuity: `+U+`
|
|
trackSwitch: `+T+`
|
|
contiguous: `+M+`
|
|
accurateTimeOffset: `+w+`
|
|
timeOffset: `+x);var $=new P.TransmuxConfig(d,E,s,k,h);this.configureTransmuxer($)}if(this.frag=A,this.part=C,_)_.postMessage({cmd:"demux",data:n,decryptdata:v,chunkMeta:g,state:K},n instanceof ArrayBuffer?[n]:[]);else if(m){var Z=m.push(n,v,g,K);Object(P.isPromise)(Z)?Z.then(function(ve){p.handleTransmuxComplete(ve)}):this.handleTransmuxComplete(Z)}},c.flush=function(n){var s=this;n.transmuxing.start=self.performance.now();var d=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:n});else if(d){var A=d.flush(n);Object(P.isPromise)(A)?A.then(function(C){s.handleFlushResult(C,n)}):this.handleFlushResult(A,n)}},c.handleFlushResult=function(n,s){var d=this;n.forEach(function(E){d.handleTransmuxComplete(E)}),this.onFlush(s)},c.onWorkerMessage=function(n){var s=n.data,d=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,d.trigger(s.event,s.data);break}}},c.configureTransmuxer=function(n){var s=this.worker,d=this.transmuxer;s?s.postMessage({cmd:"configure",config:n}):d&&d.configure(n)},c.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},o}()},"./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"),S=I("./src/events.ts"),R=I("./src/utils/logger.ts"),P=I("./node_modules/eventemitter3/index.js"),y=I.n(P);function t(a){var o=new P.EventEmitter,c=function(n,s){a.postMessage({event:n,data:s})};o.on(S.Events.FRAG_DECRYPTED,c),o.on(S.Events.ERROR,c),a.addEventListener("message",function(l){var n=l.data;switch(n.cmd){case"init":{var s=JSON.parse(n.config);a.transmuxer=new F.default(o,n.typeSupported,s,n.vendor,n.id),Object(R.enableLogs)(s.debug),c("init",null);break}case"configure":{a.transmuxer.configure(n.config);break}case"demux":{var d=a.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(F.isPromise)(d)?d.then(function(C){b(a,C)}):b(a,d);break}case"flush":{var E=n.chunkMeta,A=a.transmuxer.flush(E);Object(F.isPromise)(A)?A.then(function(C){u(a,C,E)}):u(a,A,E);break}default:break}})}function b(a,o){if(f(o.remuxResult))return;var c=[],l=o.remuxResult,n=l.audio,s=l.video;n&&i(c,n),s&&i(c,s),a.postMessage({event:"transmuxComplete",data:o},c)}function i(a,o){o.data1&&a.push(o.data1.buffer),o.data2&&a.push(o.data2.buffer)}function u(a,o,c){o.forEach(function(l){b(a,l)}),a.postMessage({event:"flush",data:c})}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 s}),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"),S=I("./src/errors.ts"),R=I("./src/crypt/decrypter.ts"),P=I("./src/demux/aacdemuxer.ts"),y=I("./src/demux/mp4demuxer.ts"),t=I("./src/demux/tsdemuxer.ts"),b=I("./src/demux/mp3demuxer.ts"),i=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"),o=I("./src/utils/logger.ts"),c;try{c=self.performance.now.bind(self.performance)}catch(w){o.logger.debug("Unable to use Performance API on this environment"),c=self.Date.now}var l=[{demux:t.default,remux:i.default},{demux:y.default,remux:u.default},{demux:P.default,remux:i.default},{demux:b.default,remux:i.default}],n=1024;l.forEach(function(w){var g=w.demux;n=Math.max(n,g.minProbeByteLength)});var s=function(){function w(h,p,m,_,x){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=m,this.vendor=_,this.id=x}var g=w.prototype;return g.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},g.push=function(p,m,_,x){var v=this,j=_.transmuxing;j.executeStart=c();var U=new Uint8Array(p),T=this.cache,z=this.config,H=this.currentTransmuxState,M=this.transmuxConfig;x&&(this.currentTransmuxState=x);var V=d(U,m);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=c(),E(_);U=new Uint8Array($)}else return this.decryptionPromise=K.webCryptoDecrypt(U,V.key.buffer,V.iv.buffer).then(function(ke){var ut=v.push(ke,null,_);return v.decryptionPromise=null,ut}),this.decryptionPromise}var Z=x||H,ve=Z.contiguous,oe=Z.discontinuity,fe=Z.trackSwitch,ye=Z.accurateTimeOffset,Pe=Z.timeOffset,ge=M.audioCodec,de=M.videoCodec,Qe=M.defaultInitPts,St=M.duration,Ee=M.initSegmentData;if((oe||fe)&&this.resetInitSegment(Ee,ge,de,St),oe&&this.resetInitialTimestamp(Qe),ve||this.resetContiguity(),this.needsProbing(U,oe,fe)){if(T.dataLength){var De=T.flush();U=Object(a.appendUint8Array)(De,U)}this.configureTransmuxer(U,M)}var rt=this.transmux(U,V,Pe,ye,_),Be=this.currentTransmuxState;return Be.contiguous=!0,Be.discontinuity=!1,Be.trackSwitch=!1,j.executeEnd=c(),rt},g.flush=function(p){var m=this,_=p.transmuxing;_.executeStart=c();var x=this.decrypter,v=this.cache,j=this.currentTransmuxState,U=this.decryptionPromise;if(U)return U.then(function(){return m.flush(p)});var T=[],z=j.timeOffset;if(x){var H=x.flush();H&&T.push(this.push(H,null,p))}var M=v.dataLength;v.reset();var V=this.demuxer,K=this.remuxer;if(!V||!K)return M>=n&&this.observer.emit(F.Events.ERROR,F.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),_.executeEnd=c(),[E(p)];var $=V.flush(z);return A($)?$.then(function(Z){return m.flushRemux(T,Z,p),T}):(this.flushRemux(T,$,p),T)},g.flushRemux=function(p,m,_){var x=m.audioTrack,v=m.avcTrack,j=m.id3Track,U=m.textTrack,T=this.currentTransmuxState,z=T.accurateTimeOffset,H=T.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+_.sn+(_.part>-1?" p: "+_.part:"")+" of level "+_.level);var M=this.remuxer.remux(x,v,j,U,H,z,!0,this.id);p.push({remuxResult:M,chunkMeta:_}),_.transmuxing.executeEnd=c()},g.resetInitialTimestamp=function(p){var m=this.demuxer,_=this.remuxer;if(!m||!_)return;m.resetTimeStamp(p),_.resetTimeStamp(p)},g.resetContiguity=function(){var p=this.demuxer,m=this.remuxer;if(!p||!m)return;p.resetContiguity(),m.resetNextTimestamp()},g.resetInitSegment=function(p,m,_,x){var v=this.demuxer,j=this.remuxer;if(!v||!j)return;v.resetInitSegment(m,_,x),j.resetInitSegment(p,m,_)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(p,m,_,x,v){var j;return m&&m.method==="SAMPLE-AES"?j=this.transmuxSampleAes(p,m,_,x,v):j=this.transmuxUnencrypted(p,_,x,v),j},g.transmuxUnencrypted=function(p,m,_,x){var v=this.demuxer.demux(p,m,!1,!this.config.progressive),j=v.audioTrack,U=v.avcTrack,T=v.id3Track,z=v.textTrack,H=this.remuxer.remux(j,U,T,z,m,_,!1,this.id);return{remuxResult:H,chunkMeta:x}},g.transmuxSampleAes=function(p,m,_,x,v){var j=this;return this.demuxer.demuxSampleAes(p,m,_).then(function(U){var T=j.remuxer.remux(U.audioTrack,U.avcTrack,U.id3Track,U.textTrack,_,x,!1,j.id);return{remuxResult:T,chunkMeta:v}})},g.configureTransmuxer=function(p,m){for(var _=this.config,x=this.observer,v=this.typeSupported,j=this.vendor,U=m.audioCodec,T=m.defaultInitPts,z=m.duration,H=m.initSegmentData,M=m.videoCodec,V,K=0,$=l.length;K<$;K++)if(l[K].demux.probe(p)){V=l[K];break}V||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),V={demux:y.default,remux:u.default});var Z=this.demuxer,ve=this.remuxer,oe=V.remux,fe=V.demux;(!ve||!(ve instanceof oe))&&(this.remuxer=new oe(x,_,v,j)),(!Z||!(Z instanceof fe))&&(this.demuxer=new fe(x,_,v),this.probe=fe.probe),this.resetInitSegment(H,U,M,z),this.resetInitialTimestamp(T)},g.needsProbing=function(p,m,_){return!this.demuxer||!this.remuxer||m||_},g.getDecrypter=function(){var p=this.decrypter;return p||(p=this.decrypter=new R.default(this.observer,this.config)),p},w}();function d(w,g){var h=null;return w.byteLength>0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(h=g),h}var E=function(g){return{remuxResult:{},chunkMeta:g}};function A(w){return"then"in w&&w.then instanceof Function}var C=function(g,h,p,m,_){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=h,this.initSegmentData=p,this.duration=m,this.defaultInitPts=_},k=function(g,h,p,m,_){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=h,this.accurateTimeOffset=p,this.trackSwitch=m,this.timeOffset=_}},"./src/demux/tsdemuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"discardEPB",function(){return E});var F=I("./src/demux/adts.ts"),S=I("./src/demux/mpegaudio.ts"),R=I("./src/demux/exp-golomb.ts"),P=I("./src/demux/id3.ts"),y=I("./src/demux/sample-aes.ts"),t=I("./src/events.ts"),b=I("./src/utils/mp4-tools.ts"),i=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,g){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=g}A.probe=function(w){var g=A.syncOffset(w);return g<0?!1:(g&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},A.syncOffset=function(w){for(var g=Math.min(1e3,w.length-3*188),h=0;h<g;){if(w[h]===71&&w[h+188]===71&&w[h+2*188]===71)return h;h++}return-1},A.createTrack=function(w,g){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"?g:void 0}};var C=A.prototype;return C.resetInitSegment=function(w,g,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=g,this._duration=h},C.resetTimeStamp=function(){},C.resetContiguity=function(){var w=this._audioTrack,g=this._avcTrack,h=this._id3Track;w&&(w.pesData=null),g&&(g.pesData=null),h&&(h.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},C.demux=function(w,g,h,p){h===void 0&&(h=!1),p===void 0&&(p=!1),h||(this.sampleAes=null);var m,_=this._avcTrack,x=this._audioTrack,v=this._id3Track,j=_.pid,U=_.pesData,T=x.pid,z=v.pid,H=x.pesData,M=v.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:x,avcTrack:_,id3Track:v,textTrack:this._txtTrack};var ve=Math.max(0,A.syncOffset(w));Z-=(Z+ve)%188,Z<w.byteLength&&!p&&(this.remainderData=new Uint8Array(w.buffer,Z,w.buffer.byteLength-Z));for(var oe=ve;oe<Z;oe+=188)if(w[oe]===71){var fe=!!(w[oe+1]&64),ye=((w[oe+1]&31)<<8)+w[oe+2],Pe=(w[oe+3]&48)>>4,ge=void 0;if(Pe>1){if(ge=oe+5+w[oe+4],ge===oe+188)continue}else ge=oe+4;switch(ye){case j:fe&&(U&&(m=n(U))&&this.parseAVCPES(m,!1),U={data:[],size:0}),U&&(U.data.push(w.subarray(ge,oe+188)),U.size+=oe+188-ge);break;case T:fe&&(H&&(m=n(H))&&(x.isAAC?this.parseAACPES(m):this.parseMPEGPES(m)),H={data:[],size:0}),H&&(H.data.push(w.subarray(ge,oe+188)),H.size+=oe+188-ge);break;case z:fe&&(M&&(m=n(M))&&this.parseID3PES(m),M={data:[],size:0}),M&&(M.data.push(w.subarray(ge,oe+188)),M.size+=oe+188-ge);break;case 0:fe&&(ge+=w[ge]+1),$=this._pmtId=c(w,ge);break;case $:{fe&&(ge+=w[ge]+1);var de=l(w,ge,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,h);j=de.avc,j>0&&(_.pid=j),T=de.audio,T>0&&(x.pid=T,x.isAAC=de.isAAC),z=de.id3,z>0&&(v.pid=z),V&&!K&&(i.logger.log("reparse from beginning"),V=!1,oe=ve-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,x.pesData=H,v.pesData=M;var Qe={audioTrack:x,avcTrack:_,id3Track:v,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(Qe),Qe},C.flush=function(){var w=this.remainderData;this.remainderData=null;var g;return w?g=this.demux(w,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},C.extractRemainingSamples=function(w){var g=w.audioTrack,h=w.avcTrack,p=w.id3Track,m=h.pesData,_=g.pesData,x=p.pesData,v;m&&(v=n(m))?(this.parseAVCPES(v,!0),h.pesData=null):h.pesData=m,_&&(v=n(_))?(g.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),g.pesData=null):(_!=null&&_.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=_),x&&(v=n(x))?(this.parseID3PES(v),p.pesData=null):p.pesData=x},C.demuxSampleAes=function(w,g,h){var p=this.demux(w,h,!0,!this.config.progressive),m=this.sampleAes=new y.default(this.observer,this.config,g);return this.decrypt(p,m)},C.decrypt=function(w,g){return new Promise(function(h){var p=w.audioTrack,m=w.avcTrack;p.samples&&p.isAAC?g.decryptAacSamples(p.samples,0,function(){m.samples?g.decryptAvcSamples(m.samples,0,0,function(){h(w)}):h(w)}):m.samples&&g.decryptAvcSamples(m.samples,0,0,function(){h(w)})})},C.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},C.parseAVCPES=function(w,g){var h=this,p=this._avcTrack,m=this.parseAVCNALu(w.data),_=!1,x=this.avcSample,v,j=!1;w.data=null,x&&m.length&&!p.audFound&&(s(x,p),x=this.avcSample=o(!1,w.pts,w.dts,"")),m.forEach(function(U){switch(U.type){case 1:{v=!0,x||(x=h.avcSample=o(!0,w.pts,w.dts,"")),_&&(x.debug+="NDR "),x.frame=!0;var T=U.data;if(j&&T.length>4){var z=new R.default(T).readSliceType();(z===2||z===4||z===7||z===9)&&(x.key=!0)}break}case 5:v=!0,x||(x=h.avcSample=o(!0,w.pts,w.dts,"")),_&&(x.debug+="IDR "),x.key=!0,x.frame=!0;break;case 6:{v=!0,_&&x&&(x.debug+="SEI ");var H=new R.default(E(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 ve=H.readUShort();if(ve===49){var oe=H.readUInt();if(oe===1195456820){var fe=H.readUByte();if(fe===3){for(var ye=H.readUByte(),Pe=H.readUByte(),ge=31&ye,de=[ye,Pe],Qe=0;Qe<ge;Qe++)de.push(H.readUByte()),de.push(H.readUByte()),de.push(H.readUByte());d(h._txtTrack.samples,{type:3,pts:w.pts,bytes:de})}}}}}else if(M===5&&H.bytesAvailable!==0){if(K=!0,V>16){for(var St=[],Ee=0;Ee<16;Ee++)St.push(H.readUByte().toString(16)),(Ee===3||Ee===5||Ee===7||Ee===9)&&St.push("-");for(var De=V-16,rt=new Uint8Array(De),Be=0;Be<De;Be++)rt[Be]=H.readUByte();d(h._txtTrack.samples,{pts:w.pts,payloadType:M,uuid:St.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(v=!0,j=!0,_&&x&&(x.debug+="SPS "),!p.sps){var ut=new R.default(U.data),ie=ut.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.",Ke=0;Ke<3;Ke++){var ot=xe[Ke].toString(16);ot.length<2&&(ot="0"+ot),we+=ot}p.codec=we}break;case 8:v=!0,_&&x&&(x.debug+="PPS "),p.pps||(p.pps=[U.data]);break;case 9:v=!1,p.audFound=!0,x&&s(x,p),x=h.avcSample=o(!1,w.pts,w.dts,_?"AUD ":"");break;case 12:v=!1;break;default:v=!1,x&&(x.debug+="unknown NAL "+U.type+" ");break}if(x&&v){var gt=x.units;gt.push(U)}}),g&&x&&(s(x,p),this.avcSample=null)},C.getLastNalUnit=function(){var w,g=this.avcSample,h;if(!g||g.units.length===0){var p=this._avcTrack.samples;g=p[p.length-1]}if((w=g)!==null&&w!==void 0&&w.units){var m=g.units;h=m[m.length-1]}return h},C.parseAVCNALu=function(w){var g=w.byteLength,h=this._avcTrack,p=h.naluState||0,m=p,_=[],x=0,v,j,U,T=-1,z=0;for(p===-1&&(T=0,z=w[0]&31,p=0,x=1);x<g;){if(v=w[x++],!p){p=v?0:1;continue}if(p===1){p=v?0:2;continue}if(!v)p=3;else if(v===1){if(T>=0){var H={data:w.subarray(T,x-p-1),type:z};_.push(H)}else{var M=this.getLastNalUnit();if(M&&(m&&x<=4-m&&(M.state&&(M.data=M.data.subarray(0,M.data.byteLength-m))),j=x-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}}x<g?(U=w[x]&31,T=x,z=U,p=0):p=-1}else p=0}if(T>=0&&p>=0){var K={data:w.subarray(T,g),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 g=0,h=this._audioTrack,p=this.aacOverFlow,m=w.data;if(p){this.aacOverFlow=null;var _=p.sample.unit.byteLength,x=Math.min(p.missing,_),v=_-x;p.sample.unit.set(m.subarray(0,x),v),h.samples.push(p.sample),g=p.missing}var j,U;for(j=g,U=m.length;j<U-1&&!F.isHeader(m,j);j++);if(j!==g){var T,z;if(j<U-1?(T="AAC PES did not start with ADTS header,offset:"+j,z=!1):(T="no ADTS header found in AAC PES",z=!0),i.logger.warn("parsing error:"+T),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:T}),z)return}F.initTrackConfig(h,this.observer,m,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{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var V=0;j<U;)if(F.isHeader(m,j)){if(j+5<U){var K=F.appendFrame(h,m,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 g=w.data,h=g.length,p=0,m=0,_=w.pts;if(_===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;m<h;)if(S.isHeader(g,m)){var x=S.appendFrame(this._audioTrack,g,m,_,p);if(x)m+=x.length,p++;else break}else m++},C.parseID3PES=function(w){if(w.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(w)},A}();a.minProbeByteLength=188;function o(A,C,k,w){return{key:A,frame:!1,pts:C,dts:k,units:[],debug:w,length:0}}function c(A,C){return(A[C+10]&31)<<8|A[C+11]}function l(A,C,k,w){var g={audio:-1,avc:-1,id3:-1,isAAC:!0},h=(A[C+1]&15)<<8|A[C+2],p=C+3+h-4,m=(A[C+10]&15)<<8|A[C+11];for(C+=12+m;C<p;){var _=(A[C+1]&31)<<8|A[C+2];switch(A[C]){case 207:if(!w){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:g.audio===-1&&(g.audio=_);break;case 21:g.id3===-1&&(g.id3=_);break;case 219:if(!w){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:g.avc===-1&&(g.avc=_);break;case 3:case 4:k?g.audio===-1&&(g.audio=_,g.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}C+=((A[C+3]&15)<<8|A[C+4])+5}return g}function n(A){var C=0,k,w,g,h,p,m=A.data;if(!A||A.size===0)return null;for(;m[0].length<19&&m.length>1;){var _=new Uint8Array(m[0].length+m[1].length);_.set(m[0]),_.set(m[1],m[0].length),m[0]=_,m.splice(1,1)}k=m[0];var x=(k[0]<<16)+(k[1]<<8)+k[2];if(x===1){if(w=(k[4]<<8)+k[5],w&&w>A.size-6)return null;var v=k[7];v&192&&(h=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,v&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&&(i.logger.warn(Math.round((h-p)/9e4)+"s delta between PTS and DTS, align them"),h=p)):p=h),g=k[8];var j=g+9;if(A.size<=j)return null;A.size-=j;for(var U=new Uint8Array(A.size),T=0,z=m.length;T<z;T++){k=m[T];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-=g+3),{data:U,pts:h,dts:p,len:w}}return null}function s(A,C){if(A.units.length&&A.frame){if(A.pts===void 0){var k=C.samples,w=k.length;if(w){var g=k[w-1];A.pts=g.pts,A.dts=g.dts}else{C.dropped++;return}}C.samples.push(A)}A.debug.length&&i.logger.log(A.pts+"/"+A.dts+":"+A.debug)}function d(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 E(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 g=C-k.length,h=new Uint8Array(g),p=0;for(w=0;w<g;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 S});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 S;(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"})(S||(S={}))},"./src/events.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"Events",function(){return F});var F;(function(S){S.MEDIA_ATTACHING="hlsMediaAttaching",S.MEDIA_ATTACHED="hlsMediaAttached",S.MEDIA_DETACHING="hlsMediaDetaching",S.MEDIA_DETACHED="hlsMediaDetached",S.BUFFER_RESET="hlsBufferReset",S.BUFFER_CODECS="hlsBufferCodecs",S.BUFFER_CREATED="hlsBufferCreated",S.BUFFER_APPENDING="hlsBufferAppending",S.BUFFER_APPENDED="hlsBufferAppended",S.BUFFER_EOS="hlsBufferEos",S.BUFFER_FLUSHING="hlsBufferFlushing",S.BUFFER_FLUSHED="hlsBufferFlushed",S.MANIFEST_LOADING="hlsManifestLoading",S.MANIFEST_LOADED="hlsManifestLoaded",S.MANIFEST_PARSED="hlsManifestParsed",S.LEVEL_SWITCHING="hlsLevelSwitching",S.LEVEL_SWITCHED="hlsLevelSwitched",S.LEVEL_LOADING="hlsLevelLoading",S.LEVEL_LOADED="hlsLevelLoaded",S.LEVEL_UPDATED="hlsLevelUpdated",S.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",S.LEVELS_UPDATED="hlsLevelsUpdated",S.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",S.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",S.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",S.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",S.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",S.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",S.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",S.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",S.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",S.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",S.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",S.CUES_PARSED="hlsCuesParsed",S.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",S.INIT_PTS_FOUND="hlsInitPtsFound",S.FRAG_LOADING="hlsFragLoading",S.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",S.FRAG_LOADED="hlsFragLoaded",S.FRAG_DECRYPTED="hlsFragDecrypted",S.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",S.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",S.FRAG_PARSING_METADATA="hlsFragParsingMetadata",S.FRAG_PARSED="hlsFragParsed",S.FRAG_BUFFERED="hlsFragBuffered",S.FRAG_CHANGED="hlsFragChanged",S.FPS_DROP="hlsFpsDrop",S.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",S.ERROR="hlsError",S.DESTROYING="hlsDestroying",S.KEY_LOADING="hlsKeyLoading",S.KEY_LOADED="hlsKeyLoaded",S.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",S.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"),S=I.n(F),R=I("./src/loader/playlist-loader.ts"),P=I("./src/loader/key-loader.ts"),y=I("./src/controller/id3-track-controller.ts"),t=I("./src/controller/latency-controller.ts"),b=I("./src/controller/level-controller.ts"),i=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"),o=I("./src/config.ts"),c=I("./node_modules/eventemitter3/index.js"),l=I.n(c),n=I("./src/events.ts"),s=I("./src/errors.ts");function d(C,k){for(var w=0;w<k.length;w++){var g=k[w];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(C,g.key,g)}}function E(C,k,w){return k&&d(C.prototype,k),w&&d(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 c.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 g=this.config=Object(o.mergeConfig)(C.DefaultConfig,w);this.userConfig=w,Object(a.enableLogs)(g.debug),this._autoLevelCapping=-1,g.progressive&&Object(o.enableStreamingMode)(g);var h=g.abrController,p=g.bufferController,m=g.capLevelController,_=g.fpsController,x=this.abrController=new h(this),v=this.bufferController=new p(this),j=this.capLevelController=new m(this),U=new _(this),T=new R.default(this),z=new P.default(this),H=new y.default(this),M=this.levelController=new b.default(this),V=new i.FragmentTracker(this),K=this.streamController=new u.default(this,V);j.setStreamController(K),U.setStreamController(K);var $=[M,K];this.networkControllers=$;var Z=[T,z,x,v,j,U,H,V];this.audioTrackController=this.createController(g.audioTrackController,null,$),this.createController(g.audioStreamController,V,$),this.subtitleTrackController=this.createController(g.subtitleTrackController,null,$),this.createController(g.subtitleStreamController,V,$),this.createController(g.timelineController,null,Z),this.emeController=this.createController(g.emeController,null,Z),this.cmcdController=this.createController(g.cmcdController,null,Z),this.latencyController=this.createController(t.default,null,Z),this.coreComponents=Z}var k=C.prototype;return k.createController=function(g,h,p){if(g){var m=h?new g(this,h):new g(this);return p&&p.push(m),m}return null},k.on=function(g,h,p){p===void 0&&(p=this),this._emitter.on(g,h,p)},k.once=function(g,h,p){p===void 0&&(p=this),this._emitter.once(g,h,p)},k.removeAllListeners=function(g){this._emitter.removeAllListeners(g)},k.off=function(g,h,p,m){p===void 0&&(p=this),this._emitter.off(g,h,p,m)},k.listeners=function(g){return this._emitter.listeners(g)},k.emit=function(g,h,p){return this._emitter.emit(g,h,p)},k.trigger=function(g,h){if(this.config.debug)return this.emit(g,g,h);try{return this.emit(g,g,h)}catch(p){a.logger.error("An internal error happened while handling event "+g+'. Error message: "'+p.message+'". Here is a stacktrace:',p),this.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:g,error:p})}return!1},k.listenerCount=function(g){return this._emitter.listenerCount(g)},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(g){return g.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(g){return g.destroy()}),this.coreComponents.length=0},k.attachMedia=function(g){a.logger.log("attachMedia"),this._media=g,this.trigger(n.Events.MEDIA_ATTACHING,{media:g})},k.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(g){this.stopLoad();var h=this.media,p=this.url,m=this.url=F.buildAbsoluteURL(self.location.href,g,{alwaysNormalize:!0});a.logger.log("loadSource:"+m),h&&p&&p!==m&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(h)),this.trigger(n.Events.MANIFEST_LOADING,{url:g})},k.startLoad=function(g){g===void 0&&(g=-1),a.logger.log("startLoad("+g+")"),this.networkControllers.forEach(function(h){h.startLoad(g)})},k.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(g){g.stopLoad()})},k.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){a.logger.log("recoverMediaError");var g=this._media;this.detachMedia(),g&&this.attachMedia(g)},k.removeLevel=function(g,h){h===void 0&&(h=0),this.levelController.removeLevel(g,h)},E(C,[{key:"levels",get:function(){var g=this.levelController.levels;return g||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(g){a.logger.log("set currentLevel:"+g),this.loadLevel=g,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(g){a.logger.log("set nextLevel:"+g),this.levelController.manualLevel=g,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(g){a.logger.log("set loadLevel:"+g),this.levelController.manualLevel=g}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(g){this.levelController.nextLoadLevel=g}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(g){a.logger.log("set firstLevel:"+g),this.levelController.firstLevel=g}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(g){a.logger.log("set startLevel:"+g),g!==-1&&(g=Math.max(g,this.minAutoLevel)),this.levelController.startLevel=g}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(g){var h=!!g;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(g){this._autoLevelCapping!==g&&(a.logger.log("set autoLevelCapping:"+g),this._autoLevelCapping=g)}},{key:"bandwidthEstimate",get:function(){var g=this.abrController.bwEstimator;return g?g.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var g=this.levels,h=this.config.minAutoBitrate;if(!g)return 0;for(var p=g.length,m=0;m<p;m++)if(g[m].maxBitrate>h)return m;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,h=this.autoLevelCapping,p;return h===-1&&g&&g.length?p=g.length-1:p=h,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var h=this.audioTrackController;h&&(h.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var h=this.subtitleTrackController;h&&(h.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var h=this.subtitleTrackController;h&&(h.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{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 s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return C.defaultConfig?C.defaultConfig:o.hlsDefaultConfig},set:function(g){C.defaultConfig=g}}]),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 S(){return self.SourceBuffer||self.WebKitSourceBuffer}function R(){var y=Object(F.getMediaSource)();if(!y)return!1;var t=S(),b=y&&typeof y.isTypeSupported=="function"&&y.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!b&&!!i}function P(){var y,t=S();return typeof(t==null||((y=t.prototype)===null||y===void 0)?void 0:y.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 c});var F=I("./src/polyfills/number.ts"),S=I("./src/errors.ts");function R(l,n){l.prototype=Object.create(n.prototype),l.prototype.constructor=l,i(l,n)}function P(l){var n=typeof Map=="function"?new Map:void 0;return P=function(d){if(d===null||!b(d))return d;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(d))return n.get(d);n.set(d,E)}function E(){return y(d,arguments,u(this).constructor)}return E.prototype=Object.create(d.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),i(E,d)},P(l)}function y(l,n,s){return t()?y=Reflect.construct:y=function(E,A,C){var k=[null];k.push.apply(k,A);var w=Function.bind.apply(E,k),g=new w;return C&&i(g,C.prototype),g},y.apply(null,arguments)}function t(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function b(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function i(l,n){return i=Object.setPrototypeOf||function(d,E){return d.__proto__=E,d},i(l,n)}function u(l){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},u(l)}var f=Math.pow(2,17),a=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var n=l.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(d,E){var A=this,C=d.url;if(!C)return Promise.reject(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,networkDetails:null},"Fragment does not have a "+(C?"part list":"url")));this.abort();var k=this.config,w=k.fLoader,g=k.loader;return new Promise(function(h,p){A.loader&&A.loader.destroy();var m=A.loader=d.loader=w?new w(k):new g(k),_=o(d),x={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};d.stats=m.stats,m.load(_,x,{onSuccess:function(j,U,T,z){A.resetLoader(d,m),h({frag:d,part:null,payload:j.data,networkDetails:z})},onError:function(j,U,T){A.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,response:j,networkDetails:T}))},onAbort:function(j,U,T){A.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,networkDetails:T}))},onTimeout:function(j,U,T){A.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,networkDetails:T}))},onProgress:function(j,U,T,z){E&&E({frag:d,part:null,payload:T,networkDetails:z})}})})},n.loadPart=function(d,E,A){var C=this;this.abort();var k=this.config,w=k.fLoader,g=k.loader;return new Promise(function(h,p){C.loader&&C.loader.destroy();var m=C.loader=d.loader=w?new w(k):new g(k),_=o(d,E),x={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:f};E.stats=m.stats,m.load(_,x,{onSuccess:function(j,U,T,z){C.resetLoader(d,m),C.updateStatsFromPart(d,E);var H={frag:d,part:E,payload:j.data,networkDetails:z};A(H),h(H)},onError:function(j,U,T){C.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,part:E,response:j,networkDetails:T}))},onAbort:function(j,U,T){d.stats.aborted=E.stats.aborted,C.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,part:E,networkDetails:T}))},onTimeout:function(j,U,T){C.resetLoader(d,m),p(new c({type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,part:E,networkDetails:T}))}})})},n.updateStatsFromPart=function(d,E){var A=d.stats,C=E.stats,k=C.total;if(A.loaded+=C.loaded,k){var w=Math.round(d.duration/E.duration),g=Math.min(Math.round(A.loaded/k),w),h=w-g,p=h*Math.round(A.loaded/g);A.total=A.loaded+p}else A.total=Math.max(A.loaded,A.total);var m=A.loading,_=C.loading;m.start?m.first+=_.first-_.start:(m.start=_.start,m.first=_.first),m.end=_.end},n.resetLoader=function(d,E){d.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},l}();function o(l,n){n===void 0&&(n=null);var s=n||l,d={frag:l,part:n,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},E=s.byteRangeStartOffset,A=s.byteRangeEndOffset;return Object(F.isFiniteNumber)(E)&&Object(F.isFiniteNumber)(A)&&(d.rangeStart=E,d.rangeEnd=A),d}var c=function(l){R(n,l);function n(s){for(var d,E=arguments.length,A=new Array(E>1?E-1:0),C=1;C<E;C++)A[C-1]=arguments[C];return d=l.call.apply(l,[this].concat(A))||this,d.data=void 0,d.data=s,d}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 o}),I.d(B,"Fragment",function(){return c}),I.d(B,"Part",function(){return l});var F=I("./src/polyfills/number.ts"),S=I("./node_modules/url-toolkit/src/url-toolkit.js"),R=I.n(S),P=I("./src/utils/logger.ts"),y=I("./src/loader/level-key.ts"),t=I("./src/loader/load-stats.ts");function b(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,i(n,s)}function i(n,s){return i=Object.setPrototypeOf||function(E,A){return E.__proto__=A,E},i(n,s)}function u(n,s){for(var d=0;d<s.length;d++){var E=s[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}function f(n,s,d){return s&&u(n.prototype,s),d&&u(n,d),n}var a;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(a||(a={}));var o=function(){function n(d){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[a.AUDIO]=null,E[a.VIDEO]=null,E[a.AUDIOVIDEO]=null,E),this.baseurl=d}var s=n.prototype;return s.setByteRange=function(E,A){var C=E.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(S.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),n}(),c=function(n){b(s,n);function s(E,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=E,C}var d=s.prototype;return d.createInitializationVector=function(A){for(var C=new Uint8Array(16),k=12;k<16;k++)C[k]=A>>8*(15-k)&255;return C},d.setDecryptDataFromLevelKey=function(A,C){var k=A;return(A==null?void 0:A.method)==="AES-128"&&A.uri&&!A.iv&&(k=y.LevelKey.fromURI(A.uri),k.method=A.method,k.iv=this.createInitializationVector(C),k.keyFormat="identity"),k},d.setElementaryStreamInfo=function(A,C,k,w,g,h){h===void 0&&(h=!1);var p=this.elementaryStreams,m=p[A];if(!m){p[A]={startPTS:C,endPTS:k,startDTS:w,endDTS:g,partial:h};return}m.startPTS=Math.min(m.startPTS,C),m.endPTS=Math.max(m.endPTS,k),m.startDTS=Math.min(m.startDTS,w),m.endDTS=Math.max(m.endDTS,g)},d.clearElementaryStreamInfo=function(){var A=this.elementaryStreams;A[a.AUDIO]=null,A[a.VIDEO]=null,A[a.AUDIOVIDEO]=null},f(s,[{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)}}]),s}(o),l=function(n){b(s,n);function s(d,E,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=d.decimalFloatingPoint("DURATION"),w.gap=d.bool("GAP"),w.independent=d.bool("INDEPENDENT"),w.relurl=d.enumeratedString("URI"),w.fragment=E,w.index=C;var g=d.enumeratedString("BYTERANGE");return g&&w.setByteRange(g,k),k&&(w.fragOffset=k.fragOffset+k.duration),w}return f(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),s}(o)},"./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"),S=I("./src/errors.ts"),R=I("./src/utils/logger.ts"),P=function(){function y(b){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=b,this._registerListeners()}var t=y.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 i in this.loaders){var u=this.loaders[i];u&&u.destroy()}this.loaders={}},t.onKeyLoading=function(i,u){var f=u.frag,a=f.type,o=this.loaders[a];if(!f.decryptdata){R.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var c=f.decryptdata.uri;if(c!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(o&&(R.logger.warn("abort previous key loader for type:"+a),o.abort()),!c){R.logger.warn("key uri is falsy");return}var n=l.loader,s=f.loader=this.loaders[a]=new n(l);this.decrypturl=c,this.decryptkey=null;var d={url:c,frag:f,responseType:"arraybuffer"},E={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(d,E,A)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(F.Events.KEY_LOADED,{frag:f}))},t.loadsuccess=function(i,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(i.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(F.Events.KEY_LOADED,{frag:a})},t.loaderror=function(i,u){var f=u.frag,a=f.loader;a&&a.abort(),delete this.loaders[f.type],this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:i})},t.loadtimeout=function(i,u){var f=u.frag,a=f.loader;a&&a.abort(),delete this.loaders[f.type],this.hls.trigger(F.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},y}()},"./src/loader/level-details.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"LevelDetails",function(){return y});var F=I("./src/polyfills/number.ts");function S(t,b){for(var i=0;i<b.length;i++){var u=b[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function R(t,b,i){return b&&S(t.prototype,b),i&&S(t,i),t}var P=10,y=function(){function t(i){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=i}var 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 y});var F=I("./node_modules/url-toolkit/src/url-toolkit.js"),S=I.n(F);function R(t,b){for(var i=0;i<b.length;i++){var u=b[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(t,u.key,u)}}function P(t,b,i){return b&&R(t.prototype,b),i&&R(t,i),t}var y=function(){t.fromURL=function(i,u){return new t(i,u)},t.fromURI=function(i){return new t(i)};function t(b,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(F.buildAbsoluteURL)(b,i,{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 s});var F=I("./src/polyfills/number.ts"),S=I("./node_modules/url-toolkit/src/url-toolkit.js"),R=I.n(S),P=I("./src/loader/fragment.ts"),y=I("./src/loader/level-details.ts"),t=I("./src/loader/level-key.ts"),b=I("./src/utils/attr-list.ts"),i=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,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),c=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function n(k){var w,g;return l.test((w=(g=S.parseURL(k))===null||g===void 0?void 0:g.path)!=null?w:"")}var s=function(){function k(){}return k.findGroup=function(g,h){for(var p=0;p<g.length;p++){var m=g[p];if(m.id===h)return m}},k.convertAVC1ToAVCOTI=function(g){var h=g.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 g},k.resolve=function(g,h){return S.buildAbsoluteURL(h,g,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(g,h){var p=[],m={},_=!1;f.lastIndex=0;for(var x;(x=f.exec(g))!=null;)if(x[1]){var v=new b.AttrList(x[1]),j={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:k.resolve(x[2],h)},U=v.decimalResolution("RESOLUTION");U&&(j.width=U.width,j.height=U.height),d((v.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(x[3]){var T=new b.AttrList(x[3]);T["DATA-ID"]&&(_=!0,m[T["DATA-ID"]]=T)}return{levels:p,sessionData:_?m:null}},k.parseMasterPlaylistMedia=function(g,h,p,m){m===void 0&&(m=[]);var _,x=[],v=0;for(a.lastIndex=0;(_=a.exec(g))!==null;){var j=new b.AttrList(_[1]);if(j.TYPE===p){var U={attrs:j,bitrate:0,id:v++,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(m.length){var T=k.findGroup(m,U.groupId)||m[0];E(U,T,"audioCodec"),E(U,T,"textCodec")}x.push(U)}}return x},k.parseLevelPlaylist=function(g,h,p,m,_){var x=new y.LevelDetails(h),v=x.fragments,j=null,U=0,T=0,z=0,H=0,M=null,V=new P.Fragment(m,h),K,$,Z,ve=-1,oe=!1;for(o.lastIndex=0,x.m3u8=g;(K=o.exec(g))!==null;){oe&&(oe=!1,V=new P.Fragment(m,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=_,v.push(V),V.relurl=(" "+K[3]).slice(1),C(V,M),M=V,z+=V.duration,U++,T=0,oe=!0);else if(K[4]){var Pe=(" "+K[4]).slice(1);M?V.setByteRange(Pe,M):V.setByteRange(Pe)}else if(K[5])V.rawProgramDateTime=(" "+K[5]).slice(1),V.tagList.push(["PROGRAM-DATE-TIME",V.rawProgramDateTime]),ve===-1&&(ve=v.length);else{if(K=K[0].match(c),!K){i.logger.warn("No matches on slow regex match for level playlist!");continue}for($=1;$<K.length&&!(typeof K[$]!="undefined");$++);var ge=(" "+K[$]).slice(1),de=(" "+K[$+1]).slice(1),Qe=K[$+2]?(" "+K[$+2]).slice(1):"";switch(ge){case"PLAYLIST-TYPE":x.type=de.toUpperCase();break;case"MEDIA-SEQUENCE":U=x.startSN=parseInt(de);break;case"SKIP":{var St=new b.AttrList(de),Ee=St.decimalInteger("SKIPPED-SEGMENTS");if(Object(F.isFiniteNumber)(Ee)){x.skippedSegments=Ee;for(var De=Ee;De--;)v.unshift(null);U+=Ee}var rt=St.enumeratedString("RECENTLY-REMOVED-DATERANGES");rt&&(x.recentlyRemovedDateranges=rt.split(" "));break}case"TARGETDURATION":x.targetduration=parseFloat(de);break;case"VERSION":x.version=parseInt(de);break;case"EXTM3U":break;case"ENDLIST":x.live=!1;break;case"#":(de||Qe)&&V.tagList.push(Qe?[de,Qe]:[de]);break;case"DIS":H++;case"GAP":V.tagList.push([ge]);break;case"BITRATE":V.tagList.push([ge,de]);break;case"DISCONTINUITY-SEQ":H=parseInt(de);break;case"KEY":{var Be,ke=new b.AttrList(de),ut=ke.enumeratedString("METHOD"),ie=ke.URI,xe=ke.hexadecimalInteger("IV"),we=ke.enumeratedString("KEYFORMATVERSIONS"),Ke=ke.enumeratedString("KEYID"),ot=(Be=ke.enumeratedString("KEYFORMAT"))!=null?Be:"identity",gt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(gt.indexOf(ot)>-1){i.logger.warn("Keyformat "+ot+" is not supported from the manifest");continue}else if(ot!=="identity")continue;ut&&(Z=t.LevelKey.fromURL(h,ie),ie&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ut)>=0&&(Z.method=ut,Z.keyFormat=ot,Ke&&(Z.keyID=Ke),we&&(Z.keyFormatVersions=we),Z.iv=xe));break}case"START":{var Nt=new b.AttrList(de),He=Nt.decimalFloatingPoint("TIME-OFFSET");Object(F.isFiniteNumber)(He)&&(x.startTimeOffset=He);break}case"MAP":{var jt=new b.AttrList(de);V.relurl=jt.URI,jt.BYTERANGE&&V.setByteRange(jt.BYTERANGE),V.level=p,V.sn="initSegment",Z&&(V.levelkey=Z),V.initSegment=null,j=V,oe=!0;break}case"SERVER-CONTROL":{var $t=new b.AttrList(de);x.canBlockReload=$t.bool("CAN-BLOCK-RELOAD"),x.canSkipUntil=$t.optionalFloat("CAN-SKIP-UNTIL",0),x.canSkipDateRanges=x.canSkipUntil>0&&$t.bool("CAN-SKIP-DATERANGES"),x.partHoldBack=$t.optionalFloat("PART-HOLD-BACK",0),x.holdBack=$t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ie=new b.AttrList(de);x.partTarget=Ie.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ae=x.partList;Ae||(Ae=x.partList=[]);var ct=T>0?Ae[Ae.length-1]:void 0,Et=T++,Ze=new P.Part(new b.AttrList(de),V,h,Et,ct);Ae.push(Ze),V.duration+=Ze.duration;break}case"PRELOAD-HINT":{var ht=new b.AttrList(de);x.preloadHint=ht;break}case"RENDITION-REPORT":{var Ne=new b.AttrList(de);x.renditionReports=x.renditionReports||[],x.renditionReports.push(Ne);break}default:i.logger.warn("line parsed but not handled: "+K);break}}}M&&!M.relurl?(v.pop(),z-=M.duration,x.partList&&(x.fragmentHint=M)):x.partList&&(C(V,M),V.cc=H,x.fragmentHint=V);var Te=v.length,Oe=v[0],ae=v[Te-1];if(z+=x.skippedSegments*x.targetduration,z>0&&Te&&ae){x.averagetargetduration=z/Te;var le=ae.sn;x.endSN=le!=="initSegment"?le:0,Oe&&(x.startCC=Oe.cc,Oe.initSegment||x.fragments.every(function(he){return he.relurl&&n(he.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),V=new P.Fragment(m,h),V.relurl=ae.relurl,V.level=p,V.sn="initSegment",Oe.initSegment=V,x.needSidxRanges=!0))}else x.endSN=0,x.startCC=0;return x.fragmentHint&&(z+=x.fragmentHint.duration),x.totalduration=z,x.endCC=H,ve>0&&A(v,ve),x},k}();function d(k,w){["video","audio","text"].forEach(function(g){var h=k.filter(function(m){return Object(u.isCodecType)(m,g)});if(h.length){var p=h.filter(function(m){return m.lastIndexOf("avc1",0)===0||m.lastIndexOf("mp4a",0)===0});w[g+"Codec"]=p.length>0?p[0]:h[0],k=k.filter(function(m){return h.indexOf(m)===-1})}}),w.unknownCodecs=k}function E(k,w,g){var h=w[g];h&&(k[g]=h)}function A(k,w){for(var g=k[w],h=w;h--;){var p=k[h];if(!p)return;p.programDateTime=g.programDateTime-p.duration*1e3,g=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"),S=I("./src/events.ts"),R=I("./src/errors.ts"),P=I("./src/utils/logger.ts"),y=I("./src/utils/mp4-tools.ts"),t=I("./src/loader/m3u8-parser.ts"),b=I("./src/types/loader.ts"),i=I("./src/utils/attr-list.ts");function u(o){var c=o.type;switch(c){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(o,c){var l=o.url;return(l===void 0||l.indexOf("data:")===0)&&(l=c.url),l}var a=function(){function o(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var c=o.prototype;return c.registerListeners=function(){var n=this.hls;n.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.unregisterListeners=function(){var n=this.hls;n.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(S.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(S.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(S.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.createInternalLoader=function(n){var s=this.hls.config,d=s.pLoader,E=s.loader,A=d||E,C=new A(s);return n.loader=C,this.loaders[n.type]=C,C},c.getInternalLoader=function(n){return this.loaders[n.type]},c.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},c.destroyInternalLoaders=function(){for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy(),this.resetInternalLoader(n)}},c.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},c.onManifestLoading=function(n,s){var d=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:b.PlaylistContextType.MANIFEST,url:d,deliveryDirectives:null})},c.onLevelLoading=function(n,s){var d=s.id,E=s.level,A=s.url,C=s.deliveryDirectives;this.load({id:d,groupId:null,level:E,responseType:"text",type:b.PlaylistContextType.LEVEL,url:A,deliveryDirectives:C})},c.onAudioTrackLoading=function(n,s){var d=s.id,E=s.groupId,A=s.url,C=s.deliveryDirectives;this.load({id:d,groupId:E,level:null,responseType:"text",type:b.PlaylistContextType.AUDIO_TRACK,url:A,deliveryDirectives:C})},c.onSubtitleTrackLoading=function(n,s){var d=s.id,E=s.groupId,A=s.url,C=s.deliveryDirectives;this.load({id:d,groupId:E,level:null,responseType:"text",type:b.PlaylistContextType.SUBTITLE_TRACK,url:A,deliveryDirectives:C})},c.load=function(n){var s,d=this.hls.config,E=this.getInternalLoader(n);if(E){var A=E.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),E.abort()}var C,k,w,g;switch(n.type){case b.PlaylistContextType.MANIFEST:C=d.manifestLoadingMaxRetry,k=d.manifestLoadingTimeOut,w=d.manifestLoadingRetryDelay,g=d.manifestLoadingMaxRetryTimeout;break;case b.PlaylistContextType.LEVEL:case b.PlaylistContextType.AUDIO_TRACK:case b.PlaylistContextType.SUBTITLE_TRACK:C=0,k=d.levelLoadingTimeOut;break;default:C=d.levelLoadingMaxRetry,k=d.levelLoadingTimeOut,w=d.levelLoadingRetryDelay,g=d.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(n),(s=n.deliveryDirectives)!==null&&s!==void 0&&s.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,m=h.targetduration;p&&m&&(k=Math.min(Math.max(p*3,m*.8)*1e3,k))}}var _={timeout:k,maxRetry:C,retryDelay:w,maxRetryDelay:g,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(n,_,x)},c.loadsuccess=function(n,s,d,E){if(E===void 0&&(E=null),d.isSidxRequest){this.handleSidxRequest(n,d),this.handlePlaylistLoaded(n,s,d,E);return}this.resetInternalLoader(d.type);var A=n.data;if(A.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,d,"no EXTM3U delimiter",E);return}s.parsing.start=performance.now(),A.indexOf("#EXTINF:")>0||A.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,s,d,E):this.handleMasterPlaylist(n,s,d,E)},c.loaderror=function(n,s,d){d===void 0&&(d=null),this.handleNetworkError(s,d,!1,n)},c.loadtimeout=function(n,s,d){d===void 0&&(d=null),this.handleNetworkError(s,d,!0)},c.handleMasterPlaylist=function(n,s,d,E){var A=this.hls,C=n.data,k=f(n,d),w=t.default.parseMasterPlaylist(C,k),g=w.levels,h=w.sessionData;if(!g.length){this.handleManifestParsingError(n,d,"no level found in manifest",E);return}var p=g.map(function(U){return{id:U.attrs.AUDIO,audioCodec:U.audioCodec}}),m=g.map(function(U){return{id:U.attrs.SUBTITLES,textCodec:U.textCodec}}),_=t.default.parseMasterPlaylistMedia(C,k,"AUDIO",p),x=t.default.parseMasterPlaylistMedia(C,k,"SUBTITLES",m),v=t.default.parseMasterPlaylistMedia(C,k,"CLOSED-CAPTIONS");if(_.length){var j=_.some(function(U){return!U.url});!j&&g[0].audioCodec&&!g[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 i.AttrList({}),bitrate:0,url:""}))}A.trigger(S.Events.MANIFEST_LOADED,{levels:g,audioTracks:_,subtitles:x,captions:v,url:k,stats:s,networkDetails:E,sessionData:h})},c.handleTrackOrLevelPlaylist=function(n,s,d,E){var A=this.hls,C=d.id,k=d.level,w=d.type,g=f(n,d),h=Object(F.isFiniteNumber)(C)?C:0,p=Object(F.isFiniteNumber)(k)?k:h,m=u(d),_=t.default.parseLevelPlaylist(n.data,g,p,m,h);if(!_.fragments.length){A.trigger(S.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof d.level=="number"?d.level:void 0});return}if(w===b.PlaylistContextType.MANIFEST){var x={attrs:new i.AttrList({}),bitrate:0,details:_,name:"",url:g};A.trigger(S.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:g,stats:s,networkDetails:E,sessionData:null})}if(s.parsing.end=performance.now(),_.needSidxRanges){var v,j=(v=_.fragments[0].initSegment)===null||v===void 0?void 0:v.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}d.levelDetails=_,this.handlePlaylistLoaded(n,s,d,E)},c.handleSidxRequest=function(n,s){var d=Object(y.parseSegmentIndex)(new Uint8Array(n.data));if(!d)return;var E=d.references,A=s.levelDetails;E.forEach(function(C,k){var w=C.info,g=A.fragments[k];g.byteRange.length===0&&g.setByteRange(String(1+w.end-w.start)+"@"+String(w.start)),g.initSegment&&g.initSegment.setByteRange(String(d.moovEndOffset)+"@0")})},c.handleManifestParsingError=function(n,s,d,E){this.hls.trigger(S.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===b.PlaylistContextType.MANIFEST,url:n.url,reason:d,response:n,context:s,networkDetails:E})},c.handleNetworkError=function(n,s,d,E){d===void 0&&(d=!1),P.logger.warn("[playlist-loader]: A network "+(d?"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=d?R.ErrorDetails.MANIFEST_LOAD_TIMEOUT:R.ErrorDetails.MANIFEST_LOAD_ERROR,C=!0;break;case b.PlaylistContextType.LEVEL:A=d?R.ErrorDetails.LEVEL_LOAD_TIMEOUT:R.ErrorDetails.LEVEL_LOAD_ERROR,C=!1;break;case b.PlaylistContextType.AUDIO_TRACK:A=d?R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,C=!1;break;case b.PlaylistContextType.SUBTITLE_TRACK:A=d?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:s};E&&(w.response=E),this.hls.trigger(S.Events.ERROR,w)},c.handlePlaylistLoaded=function(n,s,d,E){var A=d.type,C=d.level,k=d.id,w=d.groupId,g=d.loader,h=d.levelDetails,p=d.deliveryDirectives;if(!(h!=null&&h.targetduration)){this.handleManifestParsingError(n,d,"invalid target duration",E);return}if(!g)return;h.live&&(g.getCacheAge&&(h.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(h.ageHeader))&&(h.ageHeader=0));switch(A){case b.PlaylistContextType.MANIFEST:case b.PlaylistContextType.LEVEL:this.hls.trigger(S.Events.LEVEL_LOADED,{details:h,level:C||0,id:k||0,stats:s,networkDetails:E,deliveryDirectives:p});break;case b.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(S.Events.AUDIO_TRACK_LOADED,{details:h,id:k||0,groupId:w||"",stats:s,networkDetails:E,deliveryDirectives:p});break;case b.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(S.Events.SUBTITLE_TRACK_LOADED,{details:h,id:k||0,groupId:w||"",stats:s,networkDetails:E,deliveryDirectives:p});break}},o}();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 S});var F=Number.isFinite||function(R){return typeof R=="number"&&isFinite(R)},S=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Y,B,I){"use strict";I.r(B);var F=function(){function S(){}return S.getSilentFrame=function(P,y){switch(P){case"mp4a.40.2":if(y===1)return new Uint8Array([0,200,0,128,35,128]);if(y===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(y===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(y===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(y===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(y===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(y===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(y===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(y===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},S}();B.default=F},"./src/remux/mp4-generator.ts":function(Y,B,I){"use strict";I.r(B);var F=Math.pow(2,32)-1,S=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 y;for(y in R.types)R.types.hasOwnProperty(y)&&(R.types[y]=[y.charCodeAt(0),y.charCodeAt(1),y.charCodeAt(2),y.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 i=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]),o=new Uint8Array([0,0,0,1]);R.FTYP=R.box(R.types.ftyp,f,o,f,a),R.DINF=R.box(R.types.dinf,R.box(R.types.dref,i))},R.box=function(y){for(var t=8,b=arguments.length,i=new Array(b>1?b-1:0),u=1;u<b;u++)i[u-1]=arguments[u];for(var f=i.length,a=f;f--;)t+=i[f].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=t&255,o.set(y,4),f=0,t=8;f<a;f++)o.set(i[f],t),t+=i[f].byteLength;return o},R.hdlr=function(y){return R.box(R.types.hdlr,R.HDLR_TYPES[y])},R.mdat=function(y){return R.box(R.types.mdat,y)},R.mdhd=function(y,t){t*=y;var b=Math.floor(t/(F+1)),i=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,y>>24&255,y>>16&255,y>>8&255,y&255,b>>24,b>>16&255,b>>8&255,b&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},R.mdia=function(y){return R.box(R.types.mdia,R.mdhd(y.timescale,y.duration),R.hdlr(y.type),R.minf(y))},R.mfhd=function(y){return R.box(R.types.mfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255]))},R.minf=function(y){return y.type==="audio"?R.box(R.types.minf,R.box(R.types.smhd,R.SMHD),R.DINF,R.stbl(y)):R.box(R.types.minf,R.box(R.types.vmhd,R.VMHD),R.DINF,R.stbl(y))},R.moof=function(y,t,b){return R.box(R.types.moof,R.mfhd(y),R.traf(b,t))},R.moov=function(y){for(var t=y.length,b=[];t--;)b[t]=R.trak(y[t]);return R.box.apply(null,[R.types.moov,R.mvhd(y[0].timescale,y[0].duration)].concat(b).concat(R.mvex(y)))},R.mvex=function(y){for(var t=y.length,b=[];t--;)b[t]=R.trex(y[t]);return R.box.apply(null,[R.types.mvex].concat(b))},R.mvhd=function(y,t){t*=y;var b=Math.floor(t/(F+1)),i=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,y>>24&255,y>>16&255,y>>8&255,y&255,b>>24,b>>16&255,b>>8&255,b&255,i>>24,i>>16&255,i>>8&255,i&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return R.box(R.types.mvhd,u)},R.sdtp=function(y){var t=y.samples||[],b=new Uint8Array(4+t.length),i,u;for(i=0;i<t.length;i++)u=t[i].flags,b[i+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return R.box(R.types.sdtp,b)},R.stbl=function(y){return R.box(R.types.stbl,R.stsd(y),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(y){var t=[],b=[],i,u,f;for(i=0;i<y.sps.length;i++)u=y.sps[i],f=u.byteLength,t.push(f>>>8&255),t.push(f&255),t=t.concat(Array.prototype.slice.call(u));for(i=0;i<y.pps.length;i++)u=y.pps[i],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|y.sps.length].concat(t).concat([y.pps.length]).concat(b))),o=y.width,c=y.height,l=y.pixelRatio[0],n=y.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,o>>8&255,o&255,c>>8&255,c&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([l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255])))},R.esds=function(y){var t=y.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(y.config).concat([6,1,2]))},R.mp4a=function(y){var t=y.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,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),R.box(R.types.esds,R.esds(y)))},R.mp3=function(y){var t=y.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,y.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},R.stsd=function(y){return y.type==="audio"?!y.isAAC&&y.codec==="mp3"?R.box(R.types.stsd,R.STSD,R.mp3(y)):R.box(R.types.stsd,R.STSD,R.mp4a(y)):R.box(R.types.stsd,R.STSD,R.avc1(y))},R.tkhd=function(y){var t=y.id,b=y.duration*y.timescale,i=y.width,u=y.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,i>>8&255,i&255,0,0,u>>8&255,u&255,0,0]))},R.traf=function(y,t){var b=R.sdtp(y),i=y.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,i>>24,i>>16&255,i>>8&255,i&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(y,b.length+16+20+8+16+8+8),b)},R.trak=function(y){return y.duration=y.duration||4294967295,R.box(R.types.trak,R.tkhd(y),R.mdia(y))},R.trex=function(y){var t=y.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(y,t){var b=y.samples||[],i=b.length,u=12+16*i,f=new Uint8Array(u),a,o,c,l,n,s;for(t+=8+u,f.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<i;a++)o=b[a],c=o.duration,l=o.size,n=o.flags,s=o.cts,f.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*a);return R.box(R.types.trun,f)},R.initSegment=function(y){R.types||R.init();var t=R.moov(y),b=new Uint8Array(R.FTYP.byteLength+t.byteLength);return b.set(R.FTYP),b.set(t,R.FTYP.byteLength),b},R}();S.types=void 0,S.HDLR_TYPES=void 0,S.STTS=void 0,S.STSC=void 0,S.STCO=void 0,S.STSZ=void 0,S.VMHD=void 0,S.SMHD=void 0,S.STSD=void 0,S.FTYP=void 0,S.DINF=void 0,B.default=S},"./src/remux/mp4-remuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return s}),I.d(B,"normalizePts",function(){return d});var F=I("./src/polyfills/number.ts"),S=I("./src/remux/aac-helper.ts"),R=I("./src/remux/mp4-generator.ts"),P=I("./src/events.ts"),y=I("./src/errors.ts"),t=I("./src/utils/logger.ts"),b=I("./src/types/loader.ts"),i=I("./src/utils/timescale-conversion.ts");function u(){return u=Object.assign||function(k){for(var w=1;w<arguments.length;w++){var g=arguments[w];for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&(k[h]=g[h])}return k},u.apply(this,arguments)}var f=10*1e3,a=1024,o=1152,c=null,l=null,n=!1,s=function(){function k(g,h,p,m){if(m===void 0&&(m=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=g,this.config=h,this.typeSupported=p,this.ISGenerated=!1,c===null){var _=navigator.userAgent||"",x=_.match(/Chrome\/(\d+)/i);c=x?parseInt(x[1]):0}if(l===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);l=v?parseInt(v[1]):0}n=!!c&&c<75||!!l&&l<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,m=h.reduce(function(_,x){var v=x.pts-_;return v<-4294967296?(p=!0,d(_,x.pts)):v>0?_:x.pts},h[0].pts);return p&&t.logger.debug("PTS rollover detected"),m},w.remux=function(h,p,m,_,x,v,j,U){var T,z,H,M,V,K,$=x,Z=x,ve=h.pid>-1,oe=p.pid>-1,fe=p.samples.length,ye=h.samples.length>0,Pe=fe>1,ge=(!ve||ye)&&(!oe||Pe)||this.ISGenerated||j;if(ge){this.ISGenerated||(H=this.generateIS(h,p,x));var de=this.isVideoContiguous,Qe=-1;if(Pe&&(Qe=E(p.samples),!de&&this.config.forceKeyFrameOnDiscontinuity))if(K=!0,Qe>0){t.logger.warn("[mp4-remuxer]: Dropped "+Qe+" out of "+fe+" video samples due to a missing keyframe");var St=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(Qe),p.dropped+=Qe,Z+=(p.samples[0].pts-St)/(p.timescale||9e4)}else Qe===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),K=!1);if(this.ISGenerated){if(ye&&Pe){var Ee=this.getVideoStartPts(p.samples),De=d(h.samples[0].pts,Ee)-Ee,rt=De/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,x)),z=this.remuxAudio(h,$,this.isAudioContiguous,v,oe||Pe||U===b.PlaylistLevelType.AUDIO?Z:void 0),Pe){var Be=z?z.endPTS-z.startPTS:0;p.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),H=this.generateIS(h,p,x)),T=this.remuxVideo(p,Z,de,Be)}}else Pe&&(T=this.remuxVideo(p,Z,de,0));T&&(T.firstKeyFrame=Qe,T.independent=Qe!==-1)}}return this.ISGenerated&&(m.samples.length&&(V=this.remuxID3(m,x)),_.samples.length&&(M=this.remuxText(_,x))),{audio:z,video:T,initSegment:H,independent:K,text:M,id3:V}},w.generateIS=function(h,p,m){var _=h.samples,x=p.samples,v=this.typeSupported,j={},U=!Object(F.isFiniteNumber)(this._initPTS),T="audio/mp4",z,H,M;if(U&&(z=H=Infinity),h.config&&_.length&&(h.timescale=h.samplerate,h.isAAC||(v.mpeg?(T="audio/mpeg",h.codec=""):v.mp3&&(h.codec="mp3")),j.audio={id:"audio",container:T,codec:h.codec,initSegment:!h.isAAC&&v.mpeg?new Uint8Array(0):R.default.initSegment([h]),metadata:{channelCount:h.channelCount}},U&&(M=h.inputTimeScale,z=H=_[0].pts-Math.round(M*m))),p.sps&&p.pps&&x.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(x),K=Math.round(M*m);H=Math.min(H,d(x[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,m,_){var x=h.inputTimeScale,v=h.samples,j=[],U=v.length,T=this._initPTS,z=this.nextAvcDts,H=8,M,V,K,$=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,ve=0,oe=!1;if(!m||z===null){var fe=p*x,ye=v[0].pts-d(v[0].dts,v[0].pts);z=fe-ye}for(var Pe=0;Pe<U;Pe++){var ge=v[Pe];if(ge.pts=d(ge.pts-T,z),ge.dts=d(ge.dts-T,z),ge.dts>ge.pts){var de=9e4*.2;ve=Math.max(Math.min(ve,ge.pts-ge.dts),-1*de)}ge.dts<v[Pe>0?Pe-1:Pe].dts&&(oe=!0)}oe&&v.sort(function(Kt,Ot){var Rt=Kt.dts-Ot.dts,ft=Kt.pts-Ot.pts;return Rt||ft}),V=v[0].dts,K=v[v.length-1].dts;var Qe=Math.round((K-V)/(U-1));if(ve<0){if(ve<Qe*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-Qe,!0)+" ms");for(var St=ve,Ee=0;Ee<U;Ee++)v[Ee].dts=St=Math.max(St,v[Ee].pts-Qe),v[Ee].pts=Math.max(St,v[Ee].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(ve,!0)+" ms to overcome this issue");for(var De=0;De<U;De++)v[De].dts=v[De].dts+ve}V=v[0].dts}if(m){var rt=V-z,Be=rt>Qe,ke=rt<-1;if(Be||ke){Be?t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(rt,!0)+" ms ("+rt+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-rt,!0)+" ms ("+rt+"dts) overlapping between fragments detected"),V=z;var ut=v[0].pts-rt;v[0].dts=V,v[0].pts=ut,t.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(ut,!0)+"/"+Object(i.toMsFromMpegTsClock)(V,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(rt,!0)+" ms")}}n&&(V=Math.max(0,V));for(var ie=0,xe=0,we=0;we<U;we++){for(var Ke=v[we],ot=Ke.units,gt=ot.length,Nt=0,He=0;He<gt;He++)Nt+=ot[He].data.length;xe+=Nt,ie+=gt,Ke.length=Nt,Ke.dts=Math.max(Ke.dts,V),Ke.pts=Math.max(Ke.pts,Ke.dts,0),$=Math.min(Ke.pts,$),Z=Math.max(Ke.pts,Z)}K=v[U-1].dts;var jt=xe+4*ie+8,$t;try{$t=new Uint8Array(jt)}catch(Kt){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:jt,reason:"fail allocating video mdat "+jt});return}var Ie=new DataView($t.buffer);Ie.setUint32(0,jt),$t.set(R.default.types.mdat,4);for(var Ae=0;Ae<U;Ae++){for(var ct=v[Ae],Et=ct.units,Ze=0,ht=0,Ne=Et.length;ht<Ne;ht++){var Te=Et[ht],Oe=Te.data,ae=Te.data.byteLength;Ie.setUint32(H,ae),H+=4,$t.set(Oe,H),H+=ae,Ze+=4+ae}if(Ae<U-1)M=v[Ae+1].dts-ct.dts;else{var le=this.config,he=ct.dts-v[Ae>0?Ae-1:Ae].dts;if(le.stretchShortVideoTrack&&this.nextAudioPts!==null){var _e=Math.floor(le.maxBufferHole*x),Se=(_?$+_*x:this.nextAudioPts)-ct.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(ct.pts-ct.dts);j.push(new A(ct.key,M,Ze,ze))}if(j.length&&c&&c<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})),on="video",vt={data1:Qt,data2:$t,startPTS:$/x,endPTS:(Z+M)/x,startDTS:V/x,endDTS:z/x,type:on,hasAudio:!1,hasVideo:!0,nb:j.length,dropped:h.dropped};return h.samples=[],h.dropped=0,console.assert($t.length,"MDAT length must not be zero"),vt},w.remuxAudio=function(h,p,m,_,x){var v=h.inputTimeScale,j=h.samplerate?h.samplerate:v,U=v/j,T=h.isAAC?a:o,z=T*U,H=this._initPTS,M=!h.isAAC&&this.typeSupported.mpeg,V=[],K=h.samples,$=M?0:8,Z=this.nextAudioPts||-1,ve=p*v;if(this.isAudioContiguous=m=m||K.length&&Z>0&&(_&&Math.abs(ve-Z)<9e3||Math.abs(d(K[0].pts-H,ve)-Z)<20*z),K.forEach(function(Oe){Oe.pts=d(Oe.pts-H,ve)}),!m||Z<0){if(K=K.filter(function(Oe){return Oe.pts>=0}),!K.length)return;x===0?Z=0:_?Z=Math.max(0,ve):Z=K[0].pts}if(h.isAAC)for(var oe=x!==void 0,fe=this.config.maxAudioFramesDrift,ye=0,Pe=Z;ye<K.length;ye++){var ge=K[ye],de=ge.pts,Qe=de-Pe,St=Math.abs(1e3*Qe/v);if(Qe<=-fe*z&&oe)ye===0&&(t.logger.warn("Audio frame @ "+(de/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Qe/v)+" ms."),this.nextAudioPts=Z=Pe=de);else if(Qe>=fe*z&&St<f&&oe){var Ee=Math.round(Qe/z);Pe=de-Ee*z,Pe<0&&(Ee--,Pe+=z),ye===0&&(this.nextAudioPts=Z=Pe),t.logger.warn("[mp4-remuxer]: Injecting "+Ee+" audio frame @ "+(Pe/v).toFixed(3)+"s due to "+Math.round(1e3*Qe/v)+" ms gap.");for(var De=0;De<Ee;De++){var rt=Math.max(Pe,0),Be=S.default.getSilentFrame(h.manifestCodec||h.codec,h.channelCount);Be||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Be=ge.unit.subarray()),K.splice(ye,0,{unit:Be,pts:rt}),Pe+=z,ye++}}ge.pts=Pe,Pe+=z}for(var ke=null,ut=null,ie,xe=0,we=K.length;we--;)xe+=K[we].unit.byteLength;for(var Ke=0,ot=K.length;Ke<ot;Ke++){var gt=K[Ke],Nt=gt.unit,He=gt.pts;if(ut!==null){var jt=V[Ke-1];jt.duration=Math.round((He-ut)/U)}else if(m&&h.isAAC&&(He=Z),ke=He,xe>0){xe+=$;try{ie=new Uint8Array(xe)}catch(Oe){this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:y.ErrorTypes.MUX_ERROR,details:y.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xe,reason:"fail allocating audio mdat "+xe});return}if(!M){var $t=new DataView(ie.buffer);$t.setUint32(0,xe),ie.set(R.default.types.mdat,4)}}else return;ie.set(Nt,$);var Ie=Nt.byteLength;$+=Ie,V.push(new A(!0,T,Ie,0)),ut=He}var Ae=V.length;if(!Ae)return;var ct=V[V.length-1];this.nextAudioPts=Z=ut+U*ct.duration;var Et=M?new Uint8Array(0):R.default.moof(h.sequenceNumber++,ke/U,u({},h,{samples:V}));h.samples=[];var Ze=ke/v,ht=Z/v,Ne="audio",Te={data1:Et,data2:ie,startPTS:Ze,endPTS:ht,startDTS:Ze,endDTS:ht,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,m,_){var x=h.inputTimeScale,v=h.samplerate?h.samplerate:x,j=x/v,U=this.nextAudioPts,T=(U!==null?U:_.startDTS*x)+this._initDTS,z=_.endDTS*x+this._initDTS,H=j*a,M=Math.ceil((z-T)/H),V=S.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=T+$*H;K.push({unit:V,pts:Z,dts:Z})}return h.samples=K,this.remuxAudio(h,p,m,!1)},w.remuxID3=function(h,p){var m=h.samples.length;if(!m)return;for(var _=h.inputTimeScale,x=this._initPTS,v=this._initDTS,j=0;j<m;j++){var U=h.samples[j];U.pts=d(U.pts-x,p*_)/_,U.dts=d(U.dts-v,p*_)/_}var T=h.samples;return h.samples=[],{samples:T}},w.remuxText=function(h,p){var m=h.samples.length;if(!m)return;for(var _=h.inputTimeScale,x=this._initPTS,v=0;v<m;v++){var j=h.samples[v];j.pts=d(j.pts-x,p*_)/_}h.samples.sort(function(T,z){return T.pts-z.pts});var U=h.samples;return h.samples=[],{samples:U}},k}();function d(k,w){var g;if(w===null)return k;for(w<k?g=-8589934592:g=8589934592;Math.abs(k-w)>4294967296;)k+=g;return k}function E(k){for(var w=0;w<k.length;w++)if(k[w].key)return w;return-1}var A=function(w,g,h,p){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=g,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"),S=I("./src/utils/mp4-tools.ts"),R=I("./src/loader/fragment.ts"),P=I("./src/utils/logger.ts"),y=function(){function i(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var u=i.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,o,c){this.audioCodec=o,this.videoCodec=c,this.generateInitSegment(a),this.emitInitSegment=!0},u.generateInitSegment=function(a){var o=this.audioCodec,c=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(S.parseInitSegment)(a);o||(o=b(l.audio,R.ElementaryStreamTypes.AUDIO)),c||(c=b(l.video,R.ElementaryStreamTypes.VIDEO));var n={};l.audio&&l.video?n.audiovideo={container:"video/mp4",codec:o+","+c,initSegment:a,id:"main"}:l.audio?n.audio={container:"audio/mp4",codec:o,initSegment:a,id:"audio"}:l.video?n.video={container:"video/mp4",codec:c,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,o,c,l,n){var s=this.initPTS,d=this.lastEndDTS,E={audio:void 0,video:void 0,text:l,id3:c,initSegment:void 0};Object(F.isFiniteNumber)(d)||(d=this.lastEndDTS=n||0);var A=o.samples;if(!A||!A.length)return E;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."),E;this.emitInitSegment&&(C.tracks=this.initTracks,this.emitInitSegment=!1),Object(F.isFiniteNumber)(s)||(this.initPTS=C.initPTS=s=t(k,A,d));var w=Object(S.getDuration)(A,k),g=d,h=w+g;Object(S.offsetStartDTS)(k,A,s),w>0?this.lastEndDTS=h:(P.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!k.audio,m=!!k.video,_="";p&&(_+="audio"),m&&(_+="video");var x={data1:A,startPTS:g,startDTS:g,endPTS:h,endDTS:h,type:_,hasAudio:p,hasVideo:m,nb:1,dropped:0};return E.audio=x.type==="audio"?x:void 0,E.video=x.type!=="audio"?x:void 0,E.text=l,E.id3=c,E.initSegment=C,E},i}(),t=function(u,f,a){return Object(S.getStartDTS)(u,f)-a};function b(i,u){var f=i==null?void 0:i.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=y},"./src/task-loop.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"default",function(){return F});var F=function(){function S(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var R=S.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(y){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,y),!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(){},S}()},"./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 S}),I.d(B,"CMCDStreamingFormat",function(){return R}),I.d(B,"CMCDStreamType",function(){return P});var F=1,S;(function(y){y.MANIFEST="m",y.AUDIO="a",y.VIDEO="v",y.MUXED="av",y.INIT="i",y.CAPTION="c",y.TIMED_TEXT="tt",y.KEY="k",y.OTHER="o"})(S||(S={}));var R;(function(y){y.DASH="d",y.HLS="h",y.SMOOTH="s",y.OTHER="o"})(R||(R={}));var P;(function(y){y.VOD="v",y.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 y}),I.d(B,"Level",function(){return t});function F(b,i){for(var u=0;u<i.length;u++){var f=i[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(b,f.key,f)}}function S(b,i,u){return i&&F(b.prototype,i),u&&F(b,u),b}var R;(function(b){b.No="",b.Yes="YES",b.v2="v2"})(R||(R={}));function P(b,i){var u=b.canSkipUntil,f=b.canSkipDateRanges,a=b.endSN,o=i!==void 0?i-a:0;return u&&o<u?f?R.v2:R.Yes:R.No}var y=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 i=b.prototype;return i.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(i){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(u){return u}).join(",").replace(/\.[^.,]+/g,"")}return S(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 S});var F;(function(R){R.MANIFEST="manifest",R.LEVEL="level",R.AUDIO_TRACK="audioTrack",R.SUBTITLE_TRACK="subtitleTrack"})(F||(F={}));var S;(function(R){R.MAIN="main",R.AUDIO="audio",R.SUBTITLE="subtitle"})(S||(S={}))},"./src/types/transmuxer.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"ChunkMetadata",function(){return F});var F=function(P,y,t,b,i,u){b===void 0&&(b=0),i===void 0&&(i=-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=S(),this.buffering={audio:S(),video:S(),audiovideo:S()},this.level=P,this.sn=y,this.id=t,this.size=b,this.part=i,this.partial=u};function S(){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+)$/,S=/\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 y=P.prototype;return y.decimalInteger=function(b){var i=parseInt(this[b],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.hexadecimalInteger=function(b){if(this[b]){var i=(this[b]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var u=new Uint8Array(i.length/2),f=0;f<i.length/2;f++)u[f]=parseInt(i.slice(f*2,f*2+2),16);return u}else return null},y.hexadecimalIntegerAsNumber=function(b){var i=parseInt(this[b],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},y.decimalFloatingPoint=function(b){return parseFloat(this[b])},y.optionalFloat=function(b,i){var u=this[b];return u?parseFloat(u):i},y.enumeratedString=function(b){return this[b]},y.bool=function(b){return this[b]==="YES"},y.decimalResolution=function(b){var i=F.exec(this[b]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},P.parseAttrList=function(b){var i,u={},f='"';for(S.lastIndex=0;(i=S.exec(b))!==null;){var a=i[2];a.indexOf(f)===0&&a.lastIndexOf(f)===a.length-1&&(a=a.slice(1,-1)),u[i[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 y=0,t=R.length-1,b=null,i=null;y<=t;){b=(y+t)/2|0,i=R[b];var u=P(i);if(u>0)y=b+1;else if(u<0)t=b-1;else return i}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"),S={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 i=P.getBuffered(t),u=0;u<i.length;u++)if(b>=i.start(u)&&b<=i.end(u))return!0}}catch(f){}return!1},P.bufferInfo=function(t,b,i){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,i)}}catch(o){}return{len:0,start:b,end:b,nextStart:void 0}},P.bufferedInfo=function(t,b,i){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(i)for(var f=0;f<t.length;f++){var a=u.length;if(a){var o=u[a-1].end;t[f].start-o<i?t[f].end>o&&(u[a-1].end=t[f].end):u.push(t[f])}else u.push(t[f])}else u=t;for(var c=0,l,n=b,s=b,d=0;d<u.length;d++){var E=u[d].start,A=u[d].end;if(b+i>=E&&b<A)n=E,s=A,c=s-b;else if(b+i<E){l=E;break}}return{len:c,start:n||0,end:s||0,nextStart:l}},P.getBuffered=function(t){try{return t.buffered}catch(b){return F.logger.log("failed to get media.buffered",b),S}},P}()},"./src/utils/cea-608-parser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"Row",function(){return s}),I.d(B,"CaptionScreen",function(){return d});var F=I("./src/utils/logger.ts"),S={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 S.hasOwnProperty(h)&&(p=S[h]),String.fromCharCode(p)},P=15,y=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},i={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(g){g[g.ERROR=0]="ERROR",g[g.TEXT=1]="TEXT",g[g.WARNING=2]="WARNING",g[g.INFO=2]="INFO",g[g.DEBUG=3]="DEBUG",g[g.DATA=3]="DATA"})(a||(a={}));var o=function(){function g(){this.time=null,this.verboseLevel=a.ERROR}var h=g.prototype;return h.log=function(m,_){this.verboseLevel>=m&&F.logger.log(this.time+" ["+m+"] "+_)},g}(),c=function(h){for(var p=[],m=0;m<h.length;m++)p.push(h[m].toString(16));return p},l=function(){function g(p,m,_,x,v){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=m||!1,this.italics=_||!1,this.background=x||"black",this.flash=v||!1}var h=g.prototype;return h.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},h.setStyles=function(m){for(var _=["foreground","underline","italics","background","flash"],x=0;x<_.length;x++){var v=_[x];m.hasOwnProperty(v)&&(this[v]=m[v])}},h.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},h.equals=function(m){return this.foreground===m.foreground&&this.underline===m.underline&&this.italics===m.italics&&this.background===m.background&&this.flash===m.flash},h.copy=function(m){this.foreground=m.foreground,this.underline=m.underline,this.italics=m.italics,this.background=m.background,this.flash=m.flash},h.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},g}(),n=function(){function g(p,m,_,x,v,j){this.uchar=void 0,this.penState=void 0,this.uchar=p||" ",this.penState=new l(m,_,x,v,j)}var h=g.prototype;return h.reset=function(){this.uchar=" ",this.penState.reset()},h.setChar=function(m,_){this.uchar=m,this.penState.copy(_)},h.setPenState=function(m){this.penState.copy(m)},h.equals=function(m){return this.uchar===m.uchar&&this.penState.equals(m.penState)},h.copy=function(m){this.uchar=m.uchar,this.penState.copy(m.penState)},h.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},g}(),s=function(){function g(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 m=0;m<y;m++)this.chars.push(new n);this.logger=p,this.pos=0,this.currPenState=new l}var h=g.prototype;return h.equals=function(m){for(var _=!0,x=0;x<y;x++)if(!this.chars[x].equals(m.chars[x])){_=!1;break}return _},h.copy=function(m){for(var _=0;_<y;_++)this.chars[_].copy(m.chars[_])},h.isEmpty=function(){for(var m=!0,_=0;_<y;_++)if(!this.chars[_].isEmpty()){m=!1;break}return m},h.setCursor=function(m){this.pos!==m&&(this.pos=m),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>y&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=y)},h.moveCursor=function(m){var _=this.pos+m;if(m>1)for(var x=this.pos+1;x<_+1;x++)this.chars[x].setPenState(this.currPenState);this.setCursor(_)},h.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},h.insertChar=function(m){m>=144&&this.backSpace();var _=R(m);if(this.pos>=y){this.logger.log(a.ERROR,"Cannot insert "+m.toString(16)+" ("+_+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(_,this.currPenState),this.moveCursor(1)},h.clearFromPos=function(m){var _;for(_=m;_<y;_++)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 m=[],_=!0,x=0;x<y;x++){var v=this.chars[x].uchar;v!==" "&&(_=!1),m.push(v)}return _?"":m.join("")},h.setPenStyles=function(m){this.currPenState.setStyles(m);var _=this.chars[this.pos];_.setPenState(this.currPenState)},g}(),d=function(){function g(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 m=0;m<P;m++)this.rows.push(new s(p));this.logger=p,this.currRow=P-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var h=g.prototype;return h.reset=function(){for(var m=0;m<P;m++)this.rows[m].clear();this.currRow=P-1},h.equals=function(m){for(var _=!0,x=0;x<P;x++)if(!this.rows[x].equals(m.rows[x])){_=!1;break}return _},h.copy=function(m){for(var _=0;_<P;_++)this.rows[_].copy(m.rows[_])},h.isEmpty=function(){for(var m=!0,_=0;_<P;_++)if(!this.rows[_].isEmpty()){m=!1;break}return m},h.backSpace=function(){var m=this.rows[this.currRow];m.backSpace()},h.clearToEndOfRow=function(){var m=this.rows[this.currRow];m.clearToEndOfRow()},h.insertChar=function(m){var _=this.rows[this.currRow];_.insertChar(m)},h.setPen=function(m){var _=this.rows[this.currRow];_.setPenStyles(m)},h.moveCursor=function(m){var _=this.rows[this.currRow];_.moveCursor(m)},h.setCursor=function(m){this.logger.log(a.INFO,"setCursor: "+m);var _=this.rows[this.currRow];_.setCursor(m)},h.setPAC=function(m){this.logger.log(a.INFO,"pacData = "+JSON.stringify(m));var _=m.row-1;if(this.nrRollUpRows&&_<this.nrRollUpRows-1&&(_=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==_){for(var x=0;x<P;x++)this.rows[x].clear();var v=this.currRow+1-this.nrRollUpRows,j=this.lastOutputScreen;if(j){var U=j.rows[v].cueStartTime,T=this.logger.time;if(U&&T!==null&&U<T)for(var z=0;z<this.nrRollUpRows;z++)this.rows[_-this.nrRollUpRows+z+1].copy(j.rows[v+z])}}this.currRow=_;var H=this.rows[this.currRow];if(m.indent!==null){var M=m.indent,V=Math.max(M-1,0);H.setCursor(m.indent),m.color=H.chars[V].penState.foreground}var K={foreground:m.color,underline:m.underline,italics:m.italics,background:"black",flash:!1};this.setPen(K)},h.setBkgData=function(m){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(m)),this.backSpace(),this.setPen(m),this.insertChar(32)},h.setRollUpRows=function(m){this.nrRollUpRows=m},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 m=this.currRow+1-this.nrRollUpRows,_=this.rows.splice(m,1)[0];_.clear(),this.rows.splice(this.currRow,0,_),this.logger.log(a.INFO,"Rolling up")},h.getDisplayText=function(m){m=m||!1;for(var _=[],x="",v=-1,j=0;j<P;j++){var U=this.rows[j].getTextString();U&&(v=j+1,m?_.push("Row "+v+": '"+U+"'"):_.push(U.trim()))}return _.length>0&&(m?x="["+_.join(" | ")+"]":x=_.join(`
|
|
`)),x},h.getTextAndFormat=function(){return this.rows},g}(),E=function(){function g(p,m,_){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=m,this.mode=null,this.verbose=0,this.displayedMemory=new d(_),this.nonDisplayedMemory=new d(_),this.lastOutputScreen=new d(_),this.currRollUpRow=this.displayedMemory.rows[P-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=_}var h=g.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(m){this.outputFilter=m},h.setPAC=function(m){this.writeScreen.setPAC(m)},h.setBkgData=function(m){this.writeScreen.setBkgData(m)},h.setMode=function(m){if(m===this.mode)return;this.mode=m,this.logger.log(a.INFO,"MODE="+m),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=m},h.insertChars=function(m){for(var _=0;_<m.length;_++)this.writeScreen.insertChar(m[_]);var x=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,x+": "+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(m){this.logger.log(a.INFO,"RU("+m+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(m)},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 m=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=m,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},h.ccTO=function(m){this.logger.log(a.INFO,"TO("+m+") - Tab Offset"),this.writeScreen.moveCursor(m)},h.ccMIDROW=function(m){var _={flash:!1};if(_.underline=m%2===1,_.italics=m>=46,_.italics)_.foreground="white";else{var x=Math.floor(m/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];_.foreground=v[x]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(_)),this.writeScreen.setPen(_)},h.outputDataUpdate=function(m){m===void 0&&(m=!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),m&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:_),this.lastOutputScreen.copy(this.displayedMemory))},h.cueSplitAtTime=function(m){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,m,this.displayedMemory),this.cueStartTime=m))},g}(),A=function(){function g(p,m,_){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var x=new o;this.channels=[null,new E(p,m,x),new E(p+1,_,x)],this.cmdHistory=w(),this.logger=x}var h=g.prototype;return h.getHandler=function(m){return this.channels[m].getHandler()},h.setHandler=function(m,_){this.channels[m].setHandler(_)},h.addData=function(m,_){var x,v,j,U=!1;this.logger.time=m;for(var T=0;T<_.length;T+=2){if(v=_[T]&127,j=_[T+1]&127,v===0&&j===0)continue;if(this.logger.log(a.DATA,"["+c([_[T],_[T+1]])+"] -> ("+c([v,j])+")"),x=this.parseCmd(v,j),x||(x=this.parseMidrow(v,j)),x||(x=this.parsePAC(v,j)),x||(x=this.parseBackgroundAttributes(v,j)),!x&&(U=this.parseChars(v,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?")}!x&&!U&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+c([v,j])+" orig: "+c([_[T],_[T+1]]))}},h.parseCmd=function(m,_){var x=this.cmdHistory,v=(m===20||m===28||m===21||m===29)&&_>=32&&_<=47,j=(m===23||m===31)&&_>=33&&_<=35;if(!(v||j))return!1;if(k(m,_,x))return C(null,null,x),this.logger.log(a.DEBUG,"Repeated command ("+c([m,_])+") is dropped"),!0;var U=m===20||m===21||m===23?1:2,T=this.channels[U];return m===20||m===21||m===28||m===29?_===32?T.ccRCL():_===33?T.ccBS():_===34?T.ccAOF():_===35?T.ccAON():_===36?T.ccDER():_===37?T.ccRU(2):_===38?T.ccRU(3):_===39?T.ccRU(4):_===40?T.ccFON():_===41?T.ccRDC():_===42?T.ccTR():_===43?T.ccRTD():_===44?T.ccEDM():_===45?T.ccCR():_===46?T.ccENM():_===47&&T.ccEOC():T.ccTO(_-32),C(m,_,x),this.currentChannel=U,!0},h.parseMidrow=function(m,_){var x=0;if((m===17||m===25)&&_>=32&&_<=47){if(m===17?x=1:x=2,x!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[x];return v?(v.ccMIDROW(_),this.logger.log(a.DEBUG,"MIDROW ("+c([m,_])+")"),!0):!1}return!1},h.parsePAC=function(m,_){var x,v=this.cmdHistory,j=(m>=17&&m<=23||m>=25&&m<=31)&&_>=64&&_<=127,U=(m===16||m===24)&&_>=64&&_<=95;if(!(j||U))return!1;if(k(m,_,v))return C(null,null,v),!0;var T=m<=23?1:2;_>=64&&_<=95?x=T===1?t[m]:i[m]:x=T===1?b[m]:u[m];var z=this.channels[T];return z?(z.setPAC(this.interpretPAC(x,_)),C(m,_,v),this.currentChannel=T,!0):!1},h.interpretPAC=function(m,_){var x,v={color:null,italics:!1,indent:null,underline:!1,row:m};return _>95?x=_-96:x=_-64,v.underline=(x&1)===1,x<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(x/2)]:x<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((x-16)/2)*4,v},h.parseChars=function(m,_){var x,v=null,j=null;if(m>=25?(x=2,j=m-8):(x=1,j=m),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 "+x),v=[U]}else m>=32&&m<=127&&(v=_===0?[m]:[m,_]);if(v){var T=c(v);this.logger.log(a.DEBUG,"Char codes = "+T.join(",")),C(m,_,this.cmdHistory)}return v},h.parseBackgroundAttributes=function(m,_){var x=(m===16||m===24)&&_>=32&&_<=47,v=(m===23||m===31)&&_>=45&&_<=47;if(!(x||v))return!1;var j,U={};m===16||m===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 T=m<=23?1:2,z=this.channels[T];return z.setBkgData(U),C(m,_,this.cmdHistory),!0},h.reset=function(){for(var m=0;m<Object.keys(this.channels).length;m++){var _=this.channels[m];_&&_.reset()}this.cmdHistory=w()},h.cueSplitAtTime=function(m){for(var _=0;_<this.channels.length;_++){var x=this.channels[_];x&&x.cueSplitAtTime(m)}},g}();function C(g,h,p){p.a=g,p.b=h}function k(g,h,p){return p.a===g&&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 S}),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 S(P,y){var t=F[y];return!!t&&t[P.slice(0,4)]===!0}function R(P,y){return MediaSource.isTypeSupported((y||"video")+'/mp4;codecs="'+P+'"')}},"./src/utils/cues.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/vttparser.ts"),S=I("./src/utils/webvtt-parser.ts"),R=I("./src/utils/texttrack-utils.ts"),P=/\s/,y={newCue:function(b,i,u,f){for(var a=[],o,c,l,n,s,d=self.VTTCue||self.TextTrackCue,E=0;E<f.rows.length;E++)if(o=f.rows[E],l=!0,n=0,s="",!o.isEmpty()){for(var A=0;A<o.chars.length;A++)P.test(o.chars[A].uchar)&&l?n++:(s+=o.chars[A].uchar,l=!1);o.cueStartTime=i,i===u&&(u+=1e-4),n>=16?n--:n++;var C=Object(F.fixLineBreaks)(s.trim()),k=Object(S.generateCueId)(i,u,C);(!b||!b.cues||!b.cues.getCueById(k))&&(c=new d(i,u,C),c.id=k,c.line=E+1,c.align="left",c.position=10+Math.min(80,Math.floor(n*8/32)*10),a.push(c))}return b&&a.length&&(a.sort(function(w,g){return w.line==="auto"||g.line==="auto"?0:w.line>8&&g.line>8?g.line-w.line:w.line-g.line}),a.forEach(function(w){return Object(R.addCueToTrack)(b,w)})),a}};B.default=y},"./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 y}),I.d(B,"findDiscontinuousReferenceFrag",function(){return t}),I.d(B,"adjustSlidingStart",function(){return i}),I.d(B,"alignStream",function(){return u}),I.d(B,"alignPDT",function(){return a}),I.d(B,"alignFragmentByPDTDelta",function(){return o}),I.d(B,"alignMediaPlaylistByPDT",function(){return c});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/logger.ts"),R=I("./src/controller/level-helper.ts");function P(l,n){for(var s=null,d=0,E=l.length;d<E;d++){var A=l[d];if(A&&A.cc===n){s=A;break}}return s}function y(l,n,s){return!!(n.details&&(s.endCC>s.startCC||l&&l.cc<s.startCC))}function t(l,n){var s=l.fragments,d=n.fragments;if(!d.length||!s.length){S.logger.log("No fragments to align");return}var E=P(s,d[0].cc);if(!E||E&&!E.startPTS){S.logger.log("No frag in previous level to align on");return}return E}function b(l,n){if(l){var s=l.start+n;l.start=l.startPTS=s,l.endPTS=s+l.duration}}function i(l,n){for(var s=n.fragments,d=0,E=s.length;d<E;d++)b(s[d],l);n.fragmentHint&&b(n.fragmentHint,l),n.alignedSliding=!0}function u(l,n,s){if(!n)return;f(l,s,n),!s.alignedSliding&&n.details&&a(s,n.details),!s.alignedSliding&&n.details&&!s.skippedSegments&&Object(R.adjustSliding)(n.details,s)}function f(l,n,s){if(y(l,s,n)){var d=t(s.details,n);d&&Object(F.isFiniteNumber)(d.start)&&(S.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),i(d.start,n))}}function a(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,d=l.fragments[0].programDateTime,E=(d-s)/1e3+n.fragments[0].start;E&&Object(F.isFiniteNumber)(E)&&(S.logger.log("Adjusting PTS using programDateTime delta "+(d-s)+"ms, sliding:"+E.toFixed(3)+" "+l.url+" "),i(E,l))}function o(l,n){var s=l.programDateTime;if(!s)return;var d=(s-n)/1e3;l.start=l.startPTS=d,l.endPTS=d+l.duration}function c(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,d=n.fragments[0].start,E=s-d*1e3;l.fragments.forEach(function(A){o(A,E)}),l.fragmentHint&&o(l.fragmentHint,E),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Y,B,I){"use strict";I.r(B);var F=I("./src/utils/ewma.ts"),S=function(){function R(y,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(y),this.fast_=new F.default(t)}var P=R.prototype;return P.update=function(t,b){var i=this.slow_,u=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new F.default(t,i.getEstimate(),i.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 i=8*b,u=t/1e3,f=i/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=S},"./src/utils/ewma.ts":function(Y,B,I){"use strict";I.r(B);var F=function(){function S(P,y,t){y===void 0&&(y=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_=y,this.totalWeight_=t}var R=S.prototype;return R.sample=function(y,t){var b=Math.pow(this.alpha_,y);this.estimate_=t*(1-b)+b*this.estimate_,this.totalWeight_+=y},R.getTotalWeight=function(){return this.totalWeight_},R.getEstimate=function(){if(this.alpha_){var y=1-Math.pow(this.alpha_,this.totalWeight_);if(y)return this.estimate_/y}return this.estimate_},S}();B.default=F},"./src/utils/fetch-loader.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"fetchSupported",function(){return o});var F=I("./src/polyfills/number.ts"),S=I("./src/loader/load-stats.ts"),R=I("./src/demux/chunk-cache.ts");function P(d,E){d.prototype=Object.create(E.prototype),d.prototype.constructor=d,u(d,E)}function y(d){var E=typeof Map=="function"?new Map:void 0;return y=function(C){if(C===null||!i(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(C))return E.get(C);E.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)},y(d)}function t(d,E,A){return b()?t=Reflect.construct:t=function(k,w,g){var h=[null];h.push.apply(h,w);var p=Function.bind.apply(k,h),m=new p;return g&&u(m,g.prototype),m},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(d){return!1}}function i(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function u(d,E){return u=Object.setPrototypeOf||function(C,k){return C.__proto__=k,C},u(d,E)}function f(d){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},f(d)}function a(){return a=Object.assign||function(d){for(var E=1;E<arguments.length;E++){var A=arguments[E];for(var C in A)Object.prototype.hasOwnProperty.call(A,C)&&(d[C]=A[C])}return d},a.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var c=function(){function d(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 S.LoadStats}var E=d.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var C=this.response;(!C||!C.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var C;this.abortInternal(),(C=this.callbacks)!==null&&C!==void 0&&C.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(C,k,w){var g=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=l(C,this.controller.signal),m=w.onProgress,_=C.responseType==="arraybuffer",x=_?"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(){g.abortInternal(),w.onTimeout(h,C,g.response)},k.timeout),self.fetch(this.request).then(function(v){if(g.response=g.loader=v,!v.ok){var j=v.status,U=v.statusText;throw new s(U||"fetch, bad network response",j,v)}return h.loading.first=Math.max(self.performance.now(),h.loading.start),h.total=parseInt(v.headers.get("Content-Length")||"0"),m&&Object(F.isFiniteNumber)(k.highWaterMark)?g.loadProgressively(v,h,C,k.highWaterMark,m):_?v.arrayBuffer():v.text()}).then(function(v){var j=g.response;self.clearTimeout(g.requestTimeout),h.loading.end=Math.max(self.performance.now(),h.loading.first),h.loaded=h.total=v[x];var U={url:j.url,data:v};m&&!Object(F.isFiniteNumber)(k.highWaterMark)&&m(h,C,v,j),w.onSuccess(U,h,C,j)}).catch(function(v){if(self.clearTimeout(g.requestTimeout),h.aborted)return;var j=v.code||0;w.onError({code:j,text:v.message},C,v.details)})},E.getCacheAge=function(){var C=null;if(this.response){var k=this.response.headers.get("age");C=k?parseFloat(k):null}return C},E.loadProgressively=function(C,k,w,g,h){g===void 0&&(g=0);var p=new R.default,m=C.body.getReader(),_=function x(){return m.read().then(function(v){if(v.done)return p.dataLength&&h(k,w,p.flush(),C),Promise.resolve(new ArrayBuffer(0));var j=v.value,U=j.length;return k.loaded+=U,U<g||p.dataLength?(p.push(j),p.dataLength>=g&&h(k,w,p.flush(),C)):h(k,w,j,C),x()}).catch(function(){return Promise.reject()})};return _()},d}();function l(d,E){var A={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(a({},d.headers))};return d.rangeEnd&&A.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),A}function n(d,E){return new self.Request(d.url,E)}var s=function(d){P(E,d);function E(A,C,k){var w;return w=d.call(this,A)||this,w.code=void 0,w.details=void 0,w.code=C,w.details=k,w}return E}(y(Error));B.default=c},"./src/utils/imsc1-ttml-parser.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"IMSC1_CODEC",function(){return i}),I.d(B,"parseIMSC1",function(){return o});var F=I("./src/utils/mp4-tools.ts"),S=I("./src/utils/vttparser.ts"),R=I("./src/utils/vttcue.ts"),P=I("./src/demux/id3.ts"),y=I("./src/utils/timescale-conversion.ts"),t=I("./src/utils/webvtt-parser.ts");function b(){return b=Object.assign||function(g){for(var h=1;h<arguments.length;h++){var p=arguments[h];for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(g[m]=p[m])}return g},b.apply(this,arguments)}var i="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 o(g,h,p,m,_){var x=Object(F.findBox)(new Uint8Array(g),["mdat"]);if(x.length===0){_(new Error("Could not parse IMSC1 mdat"));return}var v=x[0],j=Object(P.utf8ArrayToStr)(new Uint8Array(g,v.start,v.end-v.start)),U=Object(y.toTimescaleFromScale)(h,1,p);try{m(c(j,U))}catch(T){_(T)}}function c(g,h){var p=new DOMParser,m=p.parseFromString(g,"text/xml"),_=m.getElementsByTagName("tt")[0];if(!_)throw new Error("Invalid ttml");var x={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},v=Object.keys(x).reduce(function(H,M){return H[M]=_.getAttribute("ttp:"+M)||x[M],H},{}),j=_.getAttribute("xml:space")!=="preserve",U=n(l(_,"styling","style")),T=n(l(_,"layout","region")),z=l(_,"body","[begin]");return[].map.call(z,function(H){var M=s(H,j);if(!M||!H.hasAttribute("begin"))return null;var V=C(H.getAttribute("begin"),v),K=C(H.getAttribute("dur"),v),$=C(H.getAttribute("end"),v);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 ve=T[H.getAttribute("region")],oe=U[H.getAttribute("style")];Z.position=10,Z.size=80;var fe=d(ve,oe),ye=fe.textAlign;if(ye){var Pe=a[ye];Pe&&(Z.lineAlign=Pe),Z.align=ye}return b(Z,fe),Z}).filter(function(H){return H!==null})}function l(g,h,p){var m=g.getElementsByTagName(h)[0];return m?[].slice.call(m.querySelectorAll(p)):[]}function n(g){return g.reduce(function(h,p){var m=p.getAttribute("xml:id");return m&&(h[m]=p),h},{})}function s(g,h){return[].slice.call(g.childNodes).reduce(function(p,m,_){var x;return m.nodeName==="br"&&_?p+`
|
|
`:(x=m.childNodes)!==null&&x!==void 0&&x.length?s(m,h):h?p+m.textContent.trim().replace(/\s+/g," "):p+m.textContent},"")}function d(g,h){var p="http://www.w3.org/ns/ttml#styling",m=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return m.reduce(function(_,x){var v=E(h,p,x)||E(g,p,x);return v&&(_[x]=v),_},{})}function E(g,h,p){return g.hasAttributeNS(h,p)?g.getAttributeNS(h,p):null}function A(g){return new Error("Could not parse ttml timestamp "+g)}function C(g,h){if(!g)return null;var p=Object(S.parseTimeStamp)(g);return p===null&&(u.test(g)?p=k(g,h):f.test(g)&&(p=w(g,h))),p}function k(g,h){var p=u.exec(g),m=(p[4]|0)+(p[5]|0)/h.subFrameRate;return(p[1]|0)*3600+(p[2]|0)*60+(p[3]|0)+m/h.frameRate}function w(g,h){var p=f.exec(g),m=Number(p[1]),_=p[2];switch(_){case"h":return m*3600;case"m":return m*60;case"ms":return m*1e3;case"f":return m/h.frameRate;case"t":return m/h.tickRate}return m}},"./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(){},S={trace:F,debug:F,log:F,warn:F,info:F,error:F},R=S;function P(i){var u=self.console[i];return u?u.bind(self.console,"["+i+"] >"):F}function y(i){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(o){R[o]=i[o]?i[o].bind(i):P(o)})}function t(i){if(self.console&&i===!0||typeof i=="object"){y(i,"debug","log","info","warn","error");try{R.log()}catch(u){R=S}}else R=S}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 S});var F;(function(R){R.WIDEVINE="com.widevine.alpha",R.PLAYREADY="com.microsoft.playready"})(F||(F={}));var S=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 y}),I.d(B,"readUint16",function(){return t}),I.d(B,"readUint32",function(){return b}),I.d(B,"writeUint32",function(){return i}),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 o}),I.d(B,"getDuration",function(){return c}),I.d(B,"computeRawDurationFromSamples",function(){return l}),I.d(B,"offsetStartDTS",function(){return n}),I.d(B,"segmentValidRange",function(){return s}),I.d(B,"appendUint8Array",function(){return d});var F=I("./src/utils/typed-array.ts"),S=I("./src/loader/fragment.ts"),R=Math.pow(2,32)-1,P=[].push;function y(E){return String.fromCharCode.apply(null,E)}function t(E,A){"data"in E&&(A+=E.start,E=E.data);var C=E[A]<<8|E[A+1];return C<0?65536+C:C}function b(E,A){"data"in E&&(A+=E.start,E=E.data);var C=E[A]<<24|E[A+1]<<16|E[A+2]<<8|E[A+3];return C<0?4294967296+C:C}function i(E,A,C){"data"in E&&(A+=E.start,E=E.data),E[A]=C>>24,E[A+1]=C>>16&255,E[A+2]=C>>8&255,E[A+3]=C&255}function u(E,A){var C=[];if(!A.length)return C;var k,w,g;"data"in E?(k=E.data,w=E.start,g=E.end):(k=E,w=0,g=k.byteLength);for(var h=w;h<g;){var p=b(k,h),m=y(k.subarray(h+4,h+8)),_=p>1?h+p:g;if(m===A[0])if(A.length===1)C.push({data:k,start:h+8,end:_});else{var x=u({data:k,start:h+8,end:_},A.slice(1));x.length&&P.apply(C,x)}h=_}return C}function f(E){var A=u(E,["moov"]),C=A[0],k=C?C.end:null,w=u(E,["sidx"]);if(!w||!w[0])return null;var g=[],h=w[0],p=h.data[0],m=p===0?8:16,_=b(h,m);m+=4;var x=0,v=0;p===0?m+=8:m+=16,m+=2;var j=h.end+v,U=t(h,m);m+=2;for(var T=0;T<U;T++){var z=m,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,g.push({referenceSize:M,subsegmentDuration:K,info:{duration:K/_,start:j,end:j+M-1}}),j+=M,z+=4,m=z}return{earliestPresentationTime:x,timescale:_,version:p,referencesCount:U,references:g,moovEndOffset:k}}function a(E){for(var A=[],C=u(E,["moov","trak"]),k=0;k<C.length;k++){var w=C[k],g=u(w,["tkhd"])[0];if(g){var h=g.data[g.start],p=h===0?12:20,m=b(g,p),_=u(w,["mdia","mdhd"])[0];if(_){h=_.data[_.start],p=h===0?12:20;var x=b(_,p),v=u(w,["mdia","hdlr"])[0];if(v){var j=y(v.data.subarray(v.start+8,v.start+12)),U={soun:S.ElementaryStreamTypes.AUDIO,vide:S.ElementaryStreamTypes.VIDEO}[j];if(U){var T=u(w,["mdia","minf","stbl","stsd"])[0],z=void 0;T&&(z=y(T.data.subarray(T.start+12,T.start+16))),A[m]={timescale:x,type:U},A[U]={timescale:x,id:m,codec:z}}}}}}var H=u(E,["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 o(E,A){return u(A,["moof","traf"]).reduce(function(C,k){var w=u(k,["tfdt"])[0],g=w.data[w.start],h=u(k,["tfhd"]).reduce(function(p,m){var _=b(m,4),x=E[_];if(x){var v=b(w,4);g===1&&(v*=Math.pow(2,32),v+=b(w,8));var j=x.timescale||9e4,U=v/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 c(E,A){for(var C=0,k=0,w=0,g=u(E,["moof","traf"]),h=0;h<g.length;h++){var p=g[h],m=u(p,["tfhd"])[0],_=b(m,4),x=A[_];if(!x)continue;var v=x.default,j=b(m,0)|(v==null?void 0:v.flags),U=v==null?void 0:v.duration;j&8&&(j&2?U=b(m,12):U=b(m,8));for(var T=x.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=l(z[H]);x.type===S.ElementaryStreamTypes.VIDEO?k+=C/T:x.type===S.ElementaryStreamTypes.AUDIO&&(w+=C/T)}}if(k===0&&w===0){var V=f(E);if(V!=null&&V.references)return V.references.reduce(function(K,$){return K+$.info.duration||0},0)}return k||w}function l(E){var A=b(E,0),C=8;A&1&&(C+=4),A&4&&(C+=4);for(var k=0,w=b(E,4),g=0;g<w;g++){if(A&256){var h=b(E,C);k+=h,C+=4}A&512&&(C+=4),A&1024&&(C+=4),A&2048&&(C+=4)}return k}function n(E,A,C){u(A,["moof","traf"]).forEach(function(k){u(k,["tfhd"]).forEach(function(w){var g=b(w,4),h=E[g];if(!h)return;var p=h.timescale||9e4;u(k,["tfdt"]).forEach(function(m){var _=m.data[m.start],x=b(m,4);if(_===0)i(m,4,x-C*p);else{x*=Math.pow(2,32),x+=b(m,8),x-=C*p,x=Math.max(x,0);var v=Math.floor(x/(R+1)),j=Math.floor(x%(R+1));i(m,4,v),i(m,8,j)}})})})}function s(E){var A={valid:null,remainder:null},C=u(E,["moof"]);if(C){if(C.length<2)return A.remainder=E,A}else return A;var k=C[C.length-1];return A.valid=Object(F.sliceUint8)(E,0,k.start-8),A.remainder=Object(F.sliceUint8)(E,k.start-8),A}function d(E,A){var C=new Uint8Array(E.length+A.length);return C.set(E),C.set(A,E.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 S(P,y){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=P,this.trackName=y}var R=S.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(y,t,b){(this.startTime===null||this.startTime>y)&&(this.startTime=y),this.endTime=t,this.screen=b,this.timelineController.createCaptionsTrack(this.trackName)},R.reset=function(){this.cueRanges=[]},S}()},"./src/utils/texttrack-utils.ts":function(Y,B,I){"use strict";I.r(B),I.d(B,"sendAddTrackEvent",function(){return S}),I.d(B,"addCueToTrack",function(){return R}),I.d(B,"clearCurrentCues",function(){return P}),I.d(B,"removeCuesInRange",function(){return y}),I.d(B,"getCuesInRange",function(){return b});var F=I("./src/utils/logger.ts");function S(i,u){var f;try{f=new Event("addtrack")}catch(a){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=i,u.dispatchEvent(f)}function R(i,u){var f=i.mode;if(f==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(u.id))try{if(i.addCue(u),!i.cues.getCueById(u.id))throw new Error("addCue is failed for: "+u)}catch(o){F.logger.debug("[texttrack-utils]: "+o);var a=new self.TextTrackCue(u.startTime,u.endTime,u.text);a.id=u.id,i.addCue(a)}f==="disabled"&&(i.mode=f)}function P(i){var u=i.mode;if(u==="disabled"&&(i.mode="hidden"),i.cues)for(var f=i.cues.length;f--;)i.removeCue(i.cues[f]);u==="disabled"&&(i.mode=u)}function y(i,u,f){var a=i.mode;if(a==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var o=b(i.cues,u,f),c=0;c<o.length;c++)i.removeCue(o[c]);a==="disabled"&&(i.mode=a)}function t(i,u){if(u<i[0].startTime)return 0;var f=i.length-1;if(u>i[f].endTime)return-1;for(var a=0,o=f;a<=o;){var c=Math.floor((o+a)/2);if(u<i[c].startTime)o=c-1;else if(u>i[c].startTime&&a<f)a=c+1;else return c}return i[a].startTime-u<u-i[o].startTime?a:o}function b(i,u,f){var a=[],o=t(i,u);if(o>-1)for(var c=o,l=i.length;c<l;c++){var n=i[c];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="",y=R.length,t=0;t<y;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 S}),I.d(B,"toTimescaleFromScale",function(){return R}),I.d(B,"toMsFromMpegTsClock",function(){return P}),I.d(B,"toMpegTsClockFromTimescale",function(){return y});var F=9e4;function S(t,b,i,u){i===void 0&&(i=1),u===void 0&&(u=!1);var f=t*b*i;return u?Math.round(f):f}function R(t,b,i,u){return i===void 0&&(i=1),u===void 0&&(u=!1),S(t,b,1/i,u)}function P(t,b){return b===void 0&&(b=!1),S(t,1e3,1/F,b)}function y(t,b){return b===void 0&&(b=1),S(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(S,R,P){return Uint8Array.prototype.slice?S.slice(R,P):new Uint8Array(Array.prototype.slice.call(S,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"],S=["start","middle","end","left","right"];function R(i,u){if(typeof u!="string")return!1;if(!Array.isArray(i))return!1;var f=u.toLowerCase();return~i.indexOf(f)?f:!1}function P(i){return R(F,i)}function y(i){return R(S,i)}function t(i){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 o=1;o<arguments.length;o++){var c=arguments[o];for(var l in c)i[l]=c[l]}return i}function b(i,u,f){var a=this,o={enumerable:!0};a.hasBeenReset=!1;var c="",l=!1,n=i,s=u,d=f,E=null,A="",C=!0,k="auto",w="start",g=50,h="middle",p=50,m="middle";Object.defineProperty(a,"id",t({},o,{get:function(){return c},set:function(x){c=""+x}})),Object.defineProperty(a,"pauseOnExit",t({},o,{get:function(){return l},set:function(x){l=!!x}})),Object.defineProperty(a,"startTime",t({},o,{get:function(){return n},set:function(x){if(typeof x!="number")throw new TypeError("Start time must be set to a number.");n=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",t({},o,{get:function(){return s},set:function(x){if(typeof x!="number")throw new TypeError("End time must be set to a number.");s=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",t({},o,{get:function(){return d},set:function(x){d=""+x,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",t({},o,{get:function(){return E},set:function(x){E=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",t({},o,{get:function(){return A},set:function(x){var v=P(x);if(v===!1)throw new SyntaxError("An invalid or illegal string was specified.");A=v,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",t({},o,{get:function(){return C},set:function(x){C=!!x,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",t({},o,{get:function(){return k},set:function(x){if(typeof x!="number"&&x!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",t({},o,{get:function(){return w},set:function(x){var v=y(x);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");w=v,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",t({},o,{get:function(){return g},set:function(x){if(x<0||x>100)throw new Error("Position must be between 0 and 100.");g=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",t({},o,{get:function(){return h},set:function(x){var v=y(x);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");h=v,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",t({},o,{get:function(){return p},set:function(x){if(x<0||x>100)throw new Error("Size must be between 0 and 100.");p=x,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",t({},o,{get:function(){return m},set:function(x){var v=y(x);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");m=v,this.hasBeenReset=!0}})),a.displayState=void 0}return b.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.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"),S=function(){function a(){}var o=a.prototype;return o.decode=function(l,n){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},a}();function R(a){function o(l,n,s,d){return(l|0)*3600+(n|0)*60+(s|0)+parseFloat(d||0)}var c=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return c?parseFloat(c[2])>59?o(c[2],c[3],0,c[4]):o(c[1],c[2],c[3],c[4]):null}var P=function(){function a(){this.values=Object.create(null)}var o=a.prototype;return o.set=function(l,n){!this.get(l)&&n!==""&&(this.values[l]=n)},o.get=function(l,n,s){return s?this.has(l)?this.values[l]:n[s]:this.has(l)?this.values[l]:n},o.has=function(l){return l in this.values},o.alt=function(l,n,s){for(var d=0;d<s.length;++d)if(n===s[d]){this.set(l,n);break}},o.integer=function(l,n){/^-?\d+$/.test(n)&&this.set(l,parseInt(n,10))},o.percent=function(l,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var s=parseFloat(n);if(s>=0&&s<=100)return this.set(l,s),!0}return!1},a}();function y(a,o,c,l){var n=l?a.split(l):[a];for(var s in n){if(typeof n[s]!="string")continue;var d=n[s].split(c);if(d.length!==2)continue;var E=d[0],A=d[1];o(E,A)}}var t=new F.default(0,0,""),b=t.align==="middle"?"middle":"center";function i(a,o,c){var l=a;function n(){var E=R(a);if(E===null)throw new Error("Malformed timestamp: "+l);return a=a.replace(/^[^\sa-zA-Z-]+/,""),E}function s(E,A){var C=new P;y(E,function(g,h){var p;switch(g){case"region":for(var m=c.length-1;m>=0;m--)if(c[m].id===h){C.set(g,c[m].region);break}break;case"vertical":C.alt(g,h,["rl","lr"]);break;case"line":p=h.split(","),C.integer(g,p[0]),C.percent(g,p[0])&&C.set("snapToLines",!1),C.alt(g,p[0],["auto"]),p.length===2&&C.alt("lineAlign",p[1],["start",b,"end"]);break;case"position":p=h.split(","),C.percent(g,p[0]),p.length===2&&C.alt("positionAlign",p[1],["start",b,"end","line-left","line-right","auto"]);break;case"size":C.percent(g,h);break;case"align":C.alt(g,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 d(){a=a.replace(/^\s+/,"")}if(d(),o.startTime=n(),d(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);a=a.substr(3),d(),o.endTime=n(),d(),s(a,o)}function u(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}var f=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new S,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=a.prototype;return o.parse=function(l){var n=this;l&&(n.buffer+=n.decoder.decode(l,{stream:!0}));function s(){var w=n.buffer,g=0;for(w=u(w);g<w.length&&w[g]!=="\r"&&w[g]!==`
|
|
`;)++g;var h=w.substr(0,g);return w[g]==="\r"&&++g,w[g]===`
|
|
`&&++g,n.buffer=w.substr(g),h}function d(w){y(w,function(g,h){},/:/)}try{var E="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;E=s();var A=E.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:E=s();switch(n.state){case"HEADER":/:/.test(E)?d(E):E||(n.state="ID");continue;case"NOTE":E||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){n.state="NOTE";break}if(!E)continue;if(n.cue=new F.default(0,0,""),n.state="CUE",E.indexOf("-->")===-1){n.cue.id=E;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{i(E,n.cue,n.regionList)}catch(w){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var k=E.indexOf("-->")!==-1;if(!E||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+=E}continue;case"BADCUE":E||(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},o.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=`
|
|
|
|
`,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){l.onparsingerror&&l.onparsingerror(n)}return l.onflush&&l.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 o});var F=I("./src/polyfills/number.ts"),S=I("./src/utils/vttparser.ts"),R=I("./src/demux/id3.ts"),P=I("./src/utils/timescale-conversion.ts"),y=I("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,b=function(l,n,s){return s===void 0&&(s=0),l.substr(s,n.length)===n},i=function(l){var n=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),d=parseInt(l.substr(-9,2)),E=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(F.isFiniteNumber)(n)||!Object(F.isFiniteNumber)(s)||!Object(F.isFiniteNumber)(d)||!Object(F.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return n+=1e3*s,n+=60*1e3*d,n+=60*60*1e3*E,n},u=function(l){for(var n=5381,s=l.length;s;)n=n*33^l.charCodeAt(--s);return(n>>>0).toString()};function f(c,l,n){return u(c.toString())+u(l.toString())+u(n)}var a=function(l,n,s){var d=l[n],E=l[d.prevCC];if(!E||!E.new&&d.new){l.ccOffset=l.presentationOffset=d.start,d.new=!1;return}for(;(A=E)!==null&&A!==void 0&&A.new;){var A;l.ccOffset+=d.start-E.start,d.new=!1,d=E,E=l[d.prevCC]}l.presentationOffset=s};function o(c,l,n,s,d,E,A,C){var k=new S.VTTParser,w=Object(R.utf8ArrayToStr)(new Uint8Array(c)).trim().replace(t,`
|
|
`).split(`
|
|
`),g=[],h=Object(P.toMpegTsClockFromTimescale)(l,n),p="00:00.000",m=0,_=0,x,v=!0,j=!1;k.oncue=function(U){var T=s[d],z=s.ccOffset,H=(m-h)/9e4;if(T!=null&&T.new&&(_!==void 0?z=s.ccOffset=T.start:a(s,d,H)),H&&(z=H-s.presentationOffset),j){var M=U.endTime-U.startTime,V=Object(y.normalizePts)((U.startTime+z-_)*9e4,E*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&&g.push(U)},k.onparsingerror=function(U){x=U},k.onflush=function(){if(x){C(x);return}A(g)},w.forEach(function(U){if(v)if(b(U,"X-TIMESTAMP-MAP=")){v=!1,j=!0,U.substr(16).split(",").forEach(function(T){b(T,"LOCAL:")?p=T.substr(6):b(T,"MPEGTS:")&&(m=parseInt(T.substr(7)))});try{_=i(p)/1e3}catch(T){j=!1,x=T}return}else U===""&&(v=!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"),S=I("./src/loader/load-stats.ts"),R=/^age:\s*[\d.]+\s*$/m,P=function(){function y(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 S.LoadStats,this.retryDelay=0}var t=y.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},t.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(i,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=i,this.config=u,this.callbacks=f,this.retryDelay=u.retryDelay,this.loadInternal()},t.loadInternal=function(){var i=this.config,u=this.context;if(!i)return;var f=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var o=this.xhrSetup;try{if(o)try{o(f,u.url)}catch(n){f.open("GET",u.url,!0),o(f,u.url)}f.readyState||f.open("GET",u.url,!0);var c=this.context.headers;if(c)for(var l in c)f.setRequestHeader(l,c[l])}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),i.timeout),f.send()},t.readystatechange=function(){var i=this.context,u=this.loader,f=this.stats;if(!i||!u)return;var a=u.readyState,o=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 c=u.status;if(c>=200&&c<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var l,n;if(i.responseType==="arraybuffer"?(l=u.response,n=l.byteLength):(l=u.responseText,n=l.length),f.loaded=f.total=n,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(f,i,l,u),!this.callbacks)return;var d={url:u.responseURL,data:l};this.callbacks.onSuccess(d,f,i,u)}else f.retry>=o.maxRetry||c>=400&&c<499?(F.logger.error(c+" while loading "+i.url),this.callbacks.onError({code:c,text:u.statusText},i,u)):(F.logger.warn(c+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.loadtimeout=function(){F.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(i){var u=this.stats;u.loaded=i.loaded,i.lengthComputable&&(u.total=i.total)},t.getCacheAge=function(){var i=null;if(this.loader&&R.test(this.loader.getAllResponseHeaders())){var u=this.loader.getResponseHeader("age");i=u?parseFloat(u):null}return i},y}();B.default=P}}).default})},vHTk:function(We,J,L){We.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(We,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 y;if(P._shadowDom){y=P._shadowDom;var t=this.getDefs(!0);t.contains(P._shadowDom)||this.addDom(y)}else y=this.add(P);this.markUsed(P);var b=y.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 y=P.style;if(F(y)){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 y=P.getElementsByTagName("feDropShadow");y.length===0?y=this.createElement("feDropShadow"):y=y[0];var t=R.style,b=R.scale&&R.scale[0]||1,i=R.scale&&R.scale[1]||1,u,f,a,o;if(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)u=t.shadowOffsetX||0,f=t.shadowOffsetY||0,a=t.shadowBlur,o=t.shadowColor;else if(t.textShadowBlur)u=t.textShadowOffsetX||0,f=t.textShadowOffsetY||0,a=t.textShadowBlur,o=t.textShadowColor;else{this.removeDom(P,t);return}y.setAttribute("dx",u/b),y.setAttribute("dy",f/i),y.setAttribute("flood-color",o);var c=a/2/b,l=a/2/i,n=c+" "+l;y.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(y),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 S=I;We.exports=S},vWvF:function(We,J,L){var Y=L("Bq2U"),B=L("SUKs"),I=L("bYtY"),F=I.isString,S=I.isFunction,R=I.isObject,P=I.isArrayLike,y=I.indexOf,t=function(){this.animators=[]};t.prototype={constructor:t,animate:function(a,o){var c,l=!1,n=this,s=this.__zr;if(a){var d=a.split("."),E=n;l=d[0]==="shape";for(var A=0,C=d.length;A<C;A++){if(!E)continue;E=E[d[A]]}E&&(c=E)}else c=n;if(!c){B('Property "'+a+'" is not existed in element '+n.id);return}var k=n.animators,w=new Y(c,o);return w.during(function(g){n.dirty(l)}).done(function(){k.splice(y(k,w),1)}),k.push(w),s&&s.animation.addAnimator(w),w},stopAnimation:function(a){for(var o=this.animators,c=o.length,l=0;l<c;l++)o[l].stop(a);return o.length=0,this},animateTo:function(a,o,c,l,n,s){b(this,a,o,c,l,n,s)},animateFrom:function(a,o,c,l,n,s){b(this,a,o,c,l,n,s,!0)}};function b(a,o,c,l,n,s,d,E){F(l)?(s=n,n=l,l=0):S(n)?(s=n,n="linear",l=0):S(l)?(s=l,l=0):S(c)?(s=c,c=500):c||(c=500),a.stopAnimation(),i(a,"",a,o,c,l,E);var A=a.animators.slice(),C=A.length;function k(){C--,C||s&&s()}C||s&&s();for(var w=0;w<A.length;w++)A[w].done(k).start(n,d)}function i(a,o,c,l,n,s,d){var E={},A=0;for(var C in l){if(!l.hasOwnProperty(C))continue;c[C]!=null?R(l[C])&&!P(l[C])?i(a,o?o+"."+C:C,c[C],l[C],n,s,d):(d?(E[C]=c[C],u(a,o,C,l[C])):E[C]=l[C],A++):l[C]!=null&&!d&&u(a,o,C,l[C])}A>0&&a.animate(o,!1).when(n==null?500:n,E).delay(s||0)}function u(a,o,c,l){if(!o)a.attr(c,l);else{var n={};n[o]={},n[o][c]=l,a.attr(n)}}var f=t;We.exports=f},wCXF:function(We,J,L){"use strict";L.d(J,"a",function(){return Nt});var Y=L("rePB"),B=L("VTBJ"),I=L("KQm4"),F=L("U8pU"),S=L("ODXe"),R=L("q1tI"),P=L("TSYQ"),y=L.n(P),t=L("Gytx"),b=L.n(t),i=L("Kwbf"),u=L("t23M"),f=L("qx4F"),a=L("6eGT"),o=L("IBYe"),c=L("Ff2n"),l=L("c+Xe"),n=L("fyJ8"),s=L("biw7");function d(Ie,Ae,ct,Et,Ze){var ht=ct[Ie]||{},Ne=ct[Ae]||{},Te,Oe;ht.fixed==="left"?Te=Et.left[Ie]:Ne.fixed==="right"&&(Oe=Et.right[Ae]);var ae=!1,le=!1,he=!1,_e=!1,Se=ct[Ae+1],ze=ct[Ie-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 on=Se&&Se.fixed==="left";ae=!on}else if(Oe!==void 0){var vt=ze&&ze.fixed==="right";le=!vt}return{fixLeft:Te,fixRight:Oe,lastFixLeft:ae,firstFixRight:le,lastFixRight:he,firstFixLeft:_e,isSticky:Et.isSticky}}var E=L("sR1s");function A(Ie){var Ae=Ie.cells,ct=Ie.stickyOffsets,Et=Ie.flattenColumns,Ze=Ie.rowComponent,ht=Ie.cellComponent,Ne=Ie.onHeaderRow,Te=Ie.index,Oe=R.useContext(s.a),ae=Oe.prefixCls,le=Oe.direction,he;Ne&&(he=Ne(Ae.map(function(Se){return Se.column}),Te));var _e=Object(E.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=d(Se.colStart,Se.colEnd,Et,ct,le),on;return xt&&xt.onHeaderCell&&(on=Se.column.onHeaderCell(xt)),R.createElement(n.a,Object.assign({},Se,{ellipsis:xt.ellipsis,align:xt.align,component:ht,prefixCls:ae,key:_e[ze]},Qt,{additionalProps:on,rowType:"header"}))}))}A.displayName="HeaderRow";var C=A;function k(Ie){var Ae=[];function ct(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=ct(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}ct(Ie,0);for(var Et=Ae.length,Ze=function(Te){Ae[Te].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=Et-Te)})},ht=0;ht<Et;ht+=1)Ze(ht);return Ae}function w(Ie){var Ae=Ie.stickyOffsets,ct=Ie.columns,Et=Ie.flattenColumns,Ze=Ie.onHeaderRow,ht=R.useContext(s.a),Ne=ht.prefixCls,Te=ht.getComponent,Oe=R.useMemo(function(){return k(ct)},[ct]),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 g=w,h=L("hW8S");function p(Ie){for(var Ae=Ie.colWidths,ct=Ie.columns,Et=Ie.columCount,Ze=[],ht=Et||ct.length,Ne=!1,Te=ht-1;Te>=0;Te-=1){var Oe=Ae[Te],ae=ct&&ct[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 m=p;function _(Ie,Ae){return Object(R.useMemo)(function(){for(var ct=[],Et=0;Et<Ae;Et+=1){var Ze=Ie[Et];if(Ze!==void 0)ct[Et]=Ze;else return null}return ct},[Ie.join("_"),Ae])}var x=R.forwardRef(function(Ie,Ae){var ct=Ie.noData,Et=Ie.columns,Ze=Ie.flattenColumns,ht=Ie.colWidths,Ne=Ie.columCount,Te=Ie.stickyOffsets,Oe=Ie.direction,ae=Ie.fixHeader,le=Ie.offsetHeader,he=Ie.stickyClassName,_e=Ie.onScroll,Se=Object(c.a)(Ie,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),ze=R.useContext(s.a),xt=ze.prefixCls,Qt=ze.scrollbarSize,on=ze.isSticky,vt=on&&!ae?0:Qt,Kt=R.useRef(null),Ot=R.useCallback(function(Gt){Object(l.b)(Ae,Gt),Object(l.b)(Kt,Gt)},[]);R.useEffect(function(){var Gt;function en(Ge){var dt=Ge.currentTarget,Pt=Ge.deltaX;Pt&&(_e({currentTarget:dt,scrollLeft:dt.scrollLeft+Pt}),Ge.preventDefault())}return(Gt=Kt.current)===null||Gt===void 0||Gt.addEventListener("wheel",en),function(){var Ge;(Ge=Kt.current)===null||Ge===void 0||Ge.removeEventListener("wheel",en)}},[]);var Rt=Ze[Ze.length-1],ft={fixed:Rt?Rt.fixed:null,onHeaderCell:function(){return{className:"".concat(xt,"-cell-scrollbar")}}},be=Object(R.useMemo)(function(){return vt?[].concat(Object(I.a)(Et),[ft]):Et},[vt,Et]),Fe=Object(R.useMemo)(function(){return vt?[].concat(Object(I.a)(Ze),[ft]):Ze},[vt,Ze]),Ut=Object(R.useMemo)(function(){var Gt=Te.right,en=Te.left;return Object(B.a)(Object(B.a)({},Te),{},{left:Oe==="rtl"?[].concat(Object(I.a)(en.map(function(Ge){return Ge+vt})),[0]):en,right:Oe==="rtl"?Gt:[].concat(Object(I.a)(Gt.map(function(Ge){return Ge+vt})),[0]),isSticky:on})},[vt,Te,on]),_t=_(ht,Ne);return R.createElement("div",{style:Object(B.a)({overflow:"hidden"},on?{top:le}:{}),ref:Ot,className:y()("".concat(xt,"-header"),Object(Y.a)({},he,!!he))},R.createElement("table",{style:{tableLayout:"fixed",visibility:ct||_t?null:"hidden"}},R.createElement(m,{colWidths:_t?[].concat(Object(I.a)(_t),[vt]):[],columCount:Ne+1,columns:Fe}),R.createElement(g,Object.assign({},Se,{stickyOffsets:Ut,columns:be,flattenColumns:Fe}))))});x.displayName="FixedHeader";var v=x,j=R.createContext(null),U=j;function T(Ie){var Ae=Ie.prefixCls,ct=Ie.children,Et=Ie.component,Ze=Ie.cellComponent,ht=Ie.fixHeader,Ne=Ie.fixColumn,Te=Ie.horizonScroll,Oe=Ie.className,ae=Ie.expanded,le=Ie.componentWidth,he=Ie.colSpan,_e=R.useContext(s.a),Se=_e.scrollbarSize;return R.useMemo(function(){var ze=ct;return Ne&&(ze=R.createElement("div",{style:{width:le-(ht?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))},[ct,Et,ht,Te,Oe,ae,le,he,Se])}var z=T;function H(Ie){var Ae=Ie.className,ct=Ie.style,Et=Ie.record,Ze=Ie.index,ht=Ie.rowKey,Ne=Ie.getRowKey,Te=Ie.rowExpandable,Oe=Ie.expandedKeys,ae=Ie.onRow,le=Ie.indent,he=le===void 0?0:le,_e=Ie.rowComponent,Se=Ie.cellComponent,ze=Ie.childrenColumnName,xt=R.useContext(s.a),Qt=xt.prefixCls,on=xt.fixedInfoList,vt=R.useContext(U),Kt=vt.fixHeader,Ot=vt.fixColumn,Rt=vt.horizonScroll,ft=vt.componentWidth,be=vt.flattenColumns,Fe=vt.expandableType,Ut=vt.expandRowByClick,_t=vt.onTriggerExpand,Gt=vt.rowClassName,en=vt.expandedRowClassName,Ge=vt.indentSize,dt=vt.expandIcon,Pt=vt.expandedRowRender,zt=vt.expandIconColumnIndex,ln=R.useState(!1),vn=Object(S.a)(ln,2),nr=vn[0],Kn=vn[1],bn=Oe&&Oe.has(Ie.recordKey);R.useEffect(function(){bn&&Kn(!0)},[bn]);var xr=Fe==="row"&&(!Te||Te(Et)),Er=Fe==="nest",ar=ze&&Et&&Et[ze],dr=xr||Er,Or;ae&&(Or=ae(Et,Ze));var Kr=function(W){if(Ut&&dr&&_t(Et,W),Or&&Or.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=Or).onClick.apply(G,[W].concat(ue))}},ia;typeof Gt=="string"?ia=Gt:typeof Gt=="function"&&(ia=Gt(Et,Ze,he));var hn=Object(E.a)(be),or=R.createElement(_e,Object.assign({},Or,{"data-row-key":ht,className:y()(Ae,"".concat(Qt,"-row"),"".concat(Qt,"-row-level-").concat(he),ia,Or&&Or.className),style:Object(B.a)(Object(B.a)({},ct),Or?Or.style:null),onClick:Kr}),be.map(function(te,W){var G=te.render,Q=te.dataIndex,ue=te.className,ee=hn[W],qe=on[W],nn;W===(zt||0)&&Er&&(nn=R.createElement(R.Fragment,null,R.createElement("span",{style:{paddingLeft:"".concat(Ge*he,"px")},className:"".concat(Qt,"-row-indent indent-level-").concat(he)}),dt({prefixCls:Qt,expanded:bn,expandable:ar,record:Et,onExpand:_t})));var On;return te.onCell&&(On=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:nn,additionalProps:On}))})),ua;if(xr&&(nr||bn)){var ga=Pt(Et,Ze,he+1,bn),Zr=en&&en(Et,Ze,he);ua=R.createElement(z,{expanded:bn,className:y()("".concat(Qt,"-expanded-row"),"".concat(Qt,"-expanded-row-level-").concat(he+1),Zr),prefixCls:Qt,fixHeader:Kt,fixColumn:Ot,horizonScroll:Rt,component:_e,componentWidth:ft,cellComponent:Se,colSpan:be.length},ga)}var ra;return ar&&bn&&(ra=(Et[ze]||[]).map(function(te,W){var G=Ne(te,W);return R.createElement(H,Object.assign({},Ie,{key:G,rowKey:G,record:te,recordKey:G,index:W,indent:he+1}))})),R.createElement(R.Fragment,null,or,ua,ra)}H.displayName="BodyRow";var M=H,V=R.createContext(null),K=V;function $(Ie){var Ae=Ie.columnKey,ct=Ie.onColumnResize,Et=R.useRef();return R.useEffect(function(){Et.current&&ct(Ae,Et.current.offsetWidth)},[]),R.createElement(u.a,{onResize:function(ht){var Ne=ht.offsetWidth;ct(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(Ie){var Ae=Ie.data,ct=Ie.getRowKey,Et=Ie.measureColumnWidth,Ze=Ie.expandedKeys,ht=Ie.onRow,Ne=Ie.rowExpandable,Te=Ie.emptyNode,Oe=Ie.childrenColumnName,ae=R.useContext(K),le=ae.onColumnResize,he=R.useContext(s.a),_e=he.prefixCls,Se=he.getComponent,ze=R.useContext(U),xt=ze.fixHeader,Qt=ze.horizonScroll,on=ze.flattenColumns,vt=ze.componentWidth;return R.useMemo(function(){var Kt=Se(["body","wrapper"],"tbody"),Ot=Se(["body","row"],"tr"),Rt=Se(["body","cell"],"td"),ft;Ae.length?ft=Ae.map(function(Fe,Ut){var _t=ct(Fe,Ut);return R.createElement(M,{key:_t,rowKey:_t,record:Fe,recordKey:_t,index:Ut,rowComponent:Ot,cellComponent:Rt,expandedKeys:Ze,onRow:ht,getRowKey:ct,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:vt,cellComponent:Rt,colSpan:on.length},Te);var be=Object(E.a)(on);return R.createElement(Kt,{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,ht,Et,Ze,ct,Se,vt,Te,on])}var ve=R.memo(Z);ve.displayName="Body";var oe=ve,fe=L("wRmb"),ye=L("xEkU"),Pe=L.n(ye);function ge(Ie){var Ae=Object(R.useRef)(Ie),ct=Object(R.useState)({}),Et=Object(S.a)(ct,2),Ze=Et[1],ht=Object(R.useRef)(null),Ne=Object(R.useRef)([]);function Te(Oe){ht.current===null&&(Ne.current=[],ht.current=Pe()(function(){Ne.current.forEach(function(ae){Ae.current=ae(Ae.current)}),ht.current=null,Ze({})})),Ne.current.push(Oe)}return Object(R.useEffect)(function(){return function(){Pe.a.cancel(ht.current)}},[]),[Ae.current,Te]}function de(Ie){var Ae=Object(R.useRef)(Ie),ct=Object(R.useRef)(null);function Et(){window.clearTimeout(ct.current)}function Ze(Ne){Ae.current=Ne,Et(),ct.current=window.setTimeout(function(){Ae.current=null,ct.current=null},100)}function ht(){return Ae.current}return Object(R.useEffect)(function(){return Et},[]),[Ze,ht]}function Qe(Ie,Ae,ct){var Et=Object(R.useMemo)(function(){for(var Ze=[],ht=[],Ne=0,Te=0,Oe=0;Oe<Ae;Oe+=1)if(ct==="rtl"){ht[Oe]=Te,Te+=Ie[Oe]||0;var ae=Ae-Oe-1;Ze[ae]=Ne,Ne+=Ie[ae]||0}else{Ze[Oe]=Ne,Ne+=Ie[Oe]||0;var le=Ae-Oe-1;ht[le]=Te,Te+=Ie[le]||0}return{left:Ze,right:ht}},[Ie,Ae,ct]);return Et}var St=Qe;function Ee(Ie){var Ae=Ie.className,ct=Ie.children;return R.createElement("div",{className:Ae},ct)}var De=Ee,rt=L("n6Qo");function Be(Ie){var Ae,ct=Ie.prefixCls,Et=Ie.record,Ze=Ie.onExpand,ht=Ie.expanded,Ne=Ie.expandable,Te="".concat(ct,"-row-expand-icon");if(!Ne)return R.createElement("span",{className:y()(Te,"".concat(ct,"-row-spaced"))});var Oe=function(le){Ze(Et,le),le.stopPropagation()};return R.createElement("span",{className:y()(Te,(Ae={},Object(Y.a)(Ae,"".concat(ct,"-row-expanded"),ht),Object(Y.a)(Ae,"".concat(ct,"-row-collapsed"),!ht),Ae)),onClick:Oe})}function ke(Ie,Ae,ct){var Et=[];function Ze(ht){(ht||[]).forEach(function(Ne,Te){Et.push(Ae(Ne,Te)),Ze(Ne[ct])})}return Ze(Ie),Et}var ut=L("zT1h"),ie=L("y0+3"),xe=function(Ae,ct){var Et,Ze,ht=Ae.scrollBodyRef,Ne=Ae.onScroll,Te=Ae.offsetScroll,Oe=R.useContext(s.a),ae=Oe.prefixCls,le=((Et=ht.current)===null||Et===void 0?void 0:Et.scrollWidth)||0,he=((Ze=ht.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,_e=le&&he*(he/le),Se=R.useRef(),ze=ge({scrollLeft:0,isHiddenScrollBar:!1}),xt=Object(S.a)(ze,2),Qt=xt[0],on=xt[1],vt=R.useRef({delta:0,x:0}),Kt=R.useState(!1),Ot=Object(S.a)(Kt,2),Rt=Ot[0],ft=Ot[1],be=function(){ft(!1)},Fe=function(Ge){Ge.persist(),vt.current.delta=Ge.pageX-Qt.scrollLeft,vt.current.x=0,ft(!0),Ge.preventDefault()},Ut=function(Ge){var dt,Pt=Ge||((dt=window)===null||dt===void 0?void 0:dt.event),zt=Pt.buttons;if(!Rt||zt===0){Rt&&ft(!1);return}var ln=vt.current.x+Ge.pageX-vt.current.x-vt.current.delta;ln<=0&&(ln=0),ln+_e>=he&&(ln=he-_e),Ne({scrollLeft:ln/he*(le+2)}),vt.current.x=Ge.pageX},_t=function(){var Ge=Object(ie.b)(ht.current).top,dt=Ge+ht.current.offsetHeight,Pt=document.documentElement.scrollTop+window.innerHeight;dt-Object(f.a)()<=Pt||Ge>=Pt-Te?on(function(zt){return Object(B.a)(Object(B.a)({},zt),{},{isHiddenScrollBar:!0})}):on(function(zt){return Object(B.a)(Object(B.a)({},zt),{},{isHiddenScrollBar:!1})})},Gt=function(Ge){on(function(dt){return Object(B.a)(Object(B.a)({},dt),{},{scrollLeft:Ge/le*he||0})})};return R.useImperativeHandle(ct,function(){return{setScrollLeft:Gt}}),R.useEffect(function(){var en=Object(ut.a)(document.body,"mouseup",be,!1),Ge=Object(ut.a)(document.body,"mousemove",Ut,!1);return _t(),function(){en.remove(),Ge.remove()}},[_e,Rt]),R.useEffect(function(){var en=Object(ut.a)(window,"scroll",_t,!1),Ge=Object(ut.a)(window,"resize",_t,!1);return function(){en.remove(),Ge.remove()}},[]),R.useEffect(function(){Qt.isHiddenScrollBar||on(function(en){var Ge,dt;return Object(B.a)(Object(B.a)({},en),{},{scrollLeft:ht.current.scrollLeft/((Ge=ht.current)===null||Ge===void 0?void 0:Ge.scrollWidth)*((dt=ht.current)===null||dt===void 0?void 0:dt.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:y()("".concat(ae,"-sticky-scroll-bar"),Object(Y.a)({},"".concat(ae,"-sticky-scroll-bar-active"),Rt)),style:{width:"".concat(_e,"px"),transform:"translate3d(".concat(Qt.scrollLeft,"px, 0, 0)")}}))},we=R.forwardRef(xe);function Ke(Ie,Ae){return R.useMemo(function(){var ct=!!Ie;return{isSticky:ct,stickyClassName:ct?"".concat(Ae,"-sticky-header"):"",offsetHeader:Object(F.a)(Ie)==="object"&&Ie.offsetHeader||0,offsetScroll:Object(F.a)(Ie)==="object"&&Ie.offsetScroll||0}},[Ie,Ae])}var ot=[],gt={},Nt="rc-table-internal-hook",He=R.memo(function(Ie){var Ae=Ie.children;return Ae},function(Ie,Ae){return b()(Ie.props,Ae.props)?Ie.pingLeft!==Ae.pingLeft||Ie.pingRight!==Ae.pingRight:!1});function jt(Ie){var Ae,ct=Ie.prefixCls,Et=Ie.className,Ze=Ie.rowClassName,ht=Ie.style,Ne=Ie.data,Te=Ie.rowKey,Oe=Ie.scroll,ae=Ie.tableLayout,le=Ie.direction,he=Ie.title,_e=Ie.footer,Se=Ie.summary,ze=Ie.id,xt=Ie.showHeader,Qt=Ie.components,on=Ie.emptyText,vt=Ie.onRow,Kt=Ie.onHeaderRow,Ot=Ie.internalHooks,Rt=Ie.transformColumns,ft=Ie.internalRefs,be=Ie.sticky,Fe=Ne||ot,Ut=!!Fe.length,_t=R.useState(0),Gt=Object(S.a)(_t,2),en=Gt[0],Ge=Gt[1];R.useEffect(function(){Ge(Object(f.a)())});var dt=R.useMemo(function(){return Object(E.c)(Qt,{})},[Qt]),Pt=R.useCallback(function(Bn,Vn){return Object(E.b)(dt,Bn)||Vn},[dt]),zt=R.useMemo(function(){return typeof Te=="function"?Te:function(Bn){var Vn=Bn&&Bn[Te];return Vn}},[Te]),ln=Object(h.c)(Ie),vn=ln.expandIcon,nr=ln.expandedRowKeys,Kn=ln.defaultExpandedRowKeys,bn=ln.defaultExpandAllRows,xr=ln.expandedRowRender,Er=ln.onExpand,ar=ln.onExpandedRowsChange,dr=ln.expandRowByClick,Or=ln.rowExpandable,Kr=ln.expandIconColumnIndex,ia=ln.expandedRowClassName,hn=ln.childrenColumnName,or=ln.indentSize,ua=vn||Be,ga=hn||"children",Zr=R.useMemo(function(){return xr?"row":Ie.expandable&&Ot===Nt&&Ie.expandable.__PARENT_RENDER_ICON__||Fe.some(function(Bn){return Bn&&Object(F.a)(Bn)==="object"&&Bn[ga]})?"nest":!1},[!!xr,Fe]),ra=R.useState(function(){return Kn||(bn?ke(Fe,zt,ga):[])}),te=Object(S.a)(ra,2),W=te[0],G=te[1],Q=R.useMemo(function(){return new Set(nr||W||[])},[nr,W]),ue=R.useCallback(function(Bn){var Vn=zt(Bn,Fe.indexOf(Bn)),qn,Rr=Q.has(Vn);Rr?(Q.delete(Vn),qn=Object(I.a)(Q)):qn=[].concat(Object(I.a)(Q),[Vn]),G(qn),Er&&Er(!Rr,Bn),ar&&ar(qn)},[zt,Q,Fe,Er,ar]),ee=R.useState(0),qe=Object(S.a)(ee,2),nn=qe[0],On=qe[1],Yn=Object(fe.b)(Object(B.a)(Object(B.a)(Object(B.a)({},Ie),ln),{},{expandable:!!xr,expandedKeys:Q,getRowKey:zt,onTriggerExpand:ue,expandIcon:ua,expandIconColumnIndex:Kr,direction:le}),Ot===Nt?Rt:null),un=Object(S.a)(Yn,2),rr=un[0],mn=un[1],sn=R.useMemo(function(){return{columns:rr,flattenColumns:mn}},[rr,mn]),_n=R.useRef(),Nn=R.useRef(),sr=R.useRef(),Qn=R.useState(!1),Zn=Object(S.a)(Qn,2),kn=Zn[0],vr=Zn[1],Hn=R.useState(!1),ir=Object(S.a)(Hn,2),lr=ir[0],Ln=ir[1],Cr=ge(new Map),Lr=Object(S.a)(Cr,2),Tr=Lr[0],fr=Lr[1],ne=Object(E.a)(mn),Re=ne.map(function(Bn){return Tr.get(Bn)}),Xe=R.useMemo(function(){return Re},[Re.join("_")]),Me=St(Xe,mn.length,le),lt=Oe&&Object(E.d)(Oe.y),tt=Oe&&Object(E.d)(Oe.x),pt=tt&&mn.some(function(Bn){var Vn=Bn.fixed;return Vn}),mt=R.useRef(),Dt=Ke(be,ct),it=Dt.isSticky,Jt=Dt.offsetHeader,Yt=Dt.offsetScroll,At=Dt.stickyClassName,qt,Je,tn;lt&&(Je={overflowY:"scroll",maxHeight:Oe.y}),tt&&(qt={overflowX:"auto"},lt||(Je={overflowY:"hidden"}),tn={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Wt=R.useCallback(function(Bn,Vn){fr(function(qn){var Rr=new Map(qn);return Rr.set(Bn,Vn),Rr})},[]),yn=de(null),Rn=Object(S.a)(yn,2),Pn=Rn[0],Mt=Rn[1];function Ht(Bn,Vn){if(!Vn)return;typeof Vn=="function"?Vn(Bn):Vn.scrollLeft!==Bn&&(Vn.scrollLeft=Bn)}var Cn=function(Vn){var qn=Vn.currentTarget,Rr=Vn.scrollLeft,jr=typeof Rr=="number"?Rr:qn.scrollLeft,$r=qn||gt;if(!Mt()||Mt()===$r){var pa;Pn($r),Ht(jr,Nn.current),Ht(jr,sr.current),Ht(jr,(pa=mt.current)===null||pa===void 0?void 0:pa.setScrollLeft)}if(qn){var ma=qn.scrollWidth,ya=qn.clientWidth;vr(jr>0),Ln(jr<ma-ya)}},En=function(){sr.current&&Cn({currentTarget:sr.current})},wt=function(Vn){var qn=Vn.width;En(),On(_n.current?_n.current.offsetWidth:qn)};R.useEffect(function(){return En},[]),R.useEffect(function(){tt&&En()},[tt]),R.useEffect(function(){Ot===Nt&&ft&&(ft.body.current=sr.current)});var It=Pt(["table"],"table"),kt=R.useMemo(function(){return ae||(pt?Oe.x==="max-content"?"auto":"fixed":lt||mn.some(function(Bn){var Vn=Bn.ellipsis;return Vn})?"fixed":"auto")},[lt,pt,mn,ae]),Ct,bt={colWidths:Xe,columCount:mn.length,stickyOffsets:Me,onHeaderRow:Kt,fixHeader:lt},Tn=R.useMemo(function(){return Ut?null:typeof on=="function"?on():on},[Ut,on]),Zt=R.createElement(oe,{data:Fe,measureColumnWidth:lt||tt||it,expandedKeys:Q,rowExpandable:Or,getRowKey:zt,onRow:vt,emptyNode:Tn,childrenColumnName:ga}),Sn=R.createElement(m,{colWidths:mn.map(function(Bn){var Vn=Bn.width;return Vn}),columns:mn}),dn=Se&&R.createElement(rt.b,null,Se(Fe)),Vt=Pt(["body"]);if(lt||it){var wn;typeof Vt=="function"?(wn=Vt(Fe,{scrollbarSize:en,ref:sr,onScroll:Cn}),bt.colWidths=mn.map(function(Bn,Vn){var qn=Bn.width,Rr=Vn===rr.length-1?qn-en:qn;return typeof Rr=="number"&&!Number.isNaN(Rr)?Rr:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):wn=R.createElement("div",{style:Object(B.a)(Object(B.a)({},qt),Je),onScroll:Cn,ref:sr,className:y()("".concat(ct,"-body"))},R.createElement(It,{style:Object(B.a)(Object(B.a)({},tn),{},{tableLayout:kt})},Sn,Zt,dn),it&&R.createElement(we,{ref:mt,offsetScroll:Yt,scrollBodyRef:sr,onScroll:Cn})),Ct=R.createElement(R.Fragment,null,xt!==!1&&R.createElement(v,Object.assign({noData:!Fe.length},bt,sn,{direction:le,offsetHeader:Jt,stickyClassName:At,ref:Nn,onScroll:Cn})),wn)}else Ct=R.createElement("div",{style:Object(B.a)(Object(B.a)({},qt),Je),className:y()("".concat(ct,"-content")),onScroll:Cn,ref:sr},R.createElement(It,{style:Object(B.a)(Object(B.a)({},tn),{},{tableLayout:kt})},Sn,xt!==!1&&R.createElement(g,Object.assign({},bt,sn)),Zt,dn));var Gn=Object(h.b)(Ie),yr=R.createElement("div",Object.assign({className:y()(ct,Et,(Ae={},Object(Y.a)(Ae,"".concat(ct,"-rtl"),le==="rtl"),Object(Y.a)(Ae,"".concat(ct,"-ping-left"),kn),Object(Y.a)(Ae,"".concat(ct,"-ping-right"),lr),Object(Y.a)(Ae,"".concat(ct,"-layout-fixed"),ae==="fixed"),Object(Y.a)(Ae,"".concat(ct,"-fixed-header"),lt),Object(Y.a)(Ae,"".concat(ct,"-fixed-column"),pt),Object(Y.a)(Ae,"".concat(ct,"-scroll-horizontal"),tt),Object(Y.a)(Ae,"".concat(ct,"-has-fix-left"),mn[0]&&mn[0].fixed),Object(Y.a)(Ae,"".concat(ct,"-has-fix-right"),mn[mn.length-1]&&mn[mn.length-1].fixed==="right"),Ae)),style:ht,id:ze,ref:_n},Gn),R.createElement(He,{pingLeft:kn,pingRight:lr,props:Object(B.a)(Object(B.a)({},Ie),{},{stickyOffsets:Me,mergedExpandedKeys:Q})},he&&R.createElement(De,{className:"".concat(ct,"-title")},he(Fe)),R.createElement("div",{className:"".concat(ct,"-container")},Ct),_e&&R.createElement(De,{className:"".concat(ct,"-footer")},_e(Fe))));tt&&(yr=R.createElement(u.a,{onResize:wt},yr));var Wn=R.useMemo(function(){return{prefixCls:ct,getComponent:Pt,scrollbarSize:en,direction:le,fixedInfoList:mn.map(function(Bn,Vn){return d(Vn,Vn,mn,Me,le)}),isSticky:it}},[ct,Pt,en,le,mn,Me,le,it]),kr=R.useMemo(function(){return Object(B.a)(Object(B.a)({},sn),{},{tableLayout:kt,rowClassName:Ze,expandedRowClassName:ia,componentWidth:nn,fixHeader:lt,fixColumn:pt,horizonScroll:tt,expandIcon:ua,expandableType:Zr,expandRowByClick:dr,expandedRowRender:xr,onTriggerExpand:ue,expandIconColumnIndex:Kr,indentSize:or})},[sn,kt,Ze,ia,nn,lt,pt,tt,ua,Zr,dr,xr,ue,Kr,or]),Yr=R.useMemo(function(){return{onColumnResize:Wt}},[Wt]);return R.createElement(s.a.Provider,{value:Wn},R.createElement(U.Provider,{value:kr},R.createElement(K.Provider,{value:Yr},yr)))}jt.Column=o.a,jt.ColumnGroup=a.a,jt.Summary=rt.a,jt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var $t=J.b=jt},wRmb:function(We,J,L){"use strict";L.d(J,"a",function(){return b});var Y=L("rePB"),B=L("KQm4"),I=L("VTBJ"),F=L("Ff2n"),S=L("q1tI"),R=L.n(S),P=L("Kwbf"),y=L("Zm9Q"),t=L("hW8S");function b(o){return Object(y.a)(o).filter(function(c){return S.isValidElement(c)}).map(function(c){var l=c.key,n=c.props,s=n.children,d=Object(F.a)(n,["children"]),E=Object(I.a)({key:l},d);return s&&(E.children=b(s)),E})}function i(o){return o.reduce(function(c,l){var n=l.fixed,s=n===!0?"left":n,d=l.children;return d&&d.length>0?[].concat(Object(B.a)(c),Object(B.a)(i(d).map(function(E){return Object(I.a)({fixed:s},E)}))):[].concat(Object(B.a)(c),[Object(I.a)(Object(I.a)({},l),{},{fixed:s})])},[])}function u(o){for(var c=!0,l=0;l<o.length;l+=1){var n=o[l];if(c&&n.fixed!=="left")c=!1;else if(!c&&n.fixed==="left"){Object(P.a)(!1,"Index ".concat(l-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,d=o.length-1;d>=0;d-=1){var E=o[d];if(s&&E.fixed!=="right")s=!1;else if(!s&&E.fixed==="right"){Object(P.a)(!1,"Index ".concat(d+1," of `columns` missing `fixed='right'` prop."));break}}}function f(o){return o.map(function(c){var l=c.fixed,n=Object(F.a)(c,["fixed"]),s=l;return l==="left"?s="right":l==="right"&&(s="left"),Object(I.a)({fixed:s},n)})}function a(o,c){var l=o.prefixCls,n=o.columns,s=o.children,d=o.expandable,E=o.expandedKeys,A=o.getRowKey,C=o.onTriggerExpand,k=o.expandIcon,w=o.rowExpandable,g=o.expandIconColumnIndex,h=o.direction,p=o.expandRowByClick,m=S.useMemo(function(){return n||b(s)},[n,s]),_=S.useMemo(function(){if(d){var j,U=g||0,T=m[U],z=(j={},Object(Y.a)(j,t.a,{className:"".concat(l,"-expand-icon-col")}),Object(Y.a)(j,"title",""),Object(Y.a)(j,"fixed",T?T.fixed:null),Object(Y.a)(j,"className","".concat(l,"-row-expand-icon-cell")),Object(Y.a)(j,"render",function(V,K,$){var Z=A(K,$),ve=E.has(Z),oe=w?w(K):!0,fe=k({prefixCls:l,expanded:ve,expandable:oe,record:K,onExpand:C});return p?S.createElement("span",{onClick:function(Pe){return Pe.stopPropagation()}},fe):fe}),j),H=m.slice();return U>=0&&H.splice(U,0,z),H}return m},[d,m,A,E,k,h]),x=S.useMemo(function(){var j=_;return c&&(j=c(j)),j.length||(j=[{render:function(){return null}}]),j},[c,_,h]),v=S.useMemo(function(){return h==="rtl"?f(i(x)):i(x)},[x,h]);return[x,v]}J.b=a},x6Kt:function(We,J,L){var Y=L("y+Vt"),B=L("VpOo"),I=L("nPnh"),F=I.subPixelOptimizeRect,S={},R=Y.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(P,y){var t,b,i,u;this.subPixelOptimize?(F(S,y,this.style),t=S.x,b=S.y,i=S.width,u=S.height,S.r=y.r,y=S):(t=y.x,b=y.y,i=y.width,u=y.height),y.r?B.buildPath(P,y):P.rect(t,b,i,u),P.closePath();return}});We.exports=R},xOL1:function(We,J){We.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC"},"y+Vt":function(We,J,L){var Y=L("Gev7"),B=L("bYtY"),I=L("IMiH"),F=L("2DNl"),S=L("3C/r"),R=S.prototype.getCanvasPattern,P=Math.abs,y=new I(!0);function t(i){Y.call(this,i),this.path=null}t.prototype={constructor:t,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,u){var f=this.style,a=this.path||y,o=f.hasStroke(),c=f.hasFill(),l=f.fill,n=f.stroke,s=c&&!!l.colorStops,d=o&&!!n.colorStops,E=c&&!!l.image,A=o&&!!n.image;if(f.bind(i,this,u),this.setTransform(i),this.__dirty){var C;s&&(C=C||this.getBoundingRect(),this._fillGradient=f.getGradient(i,l,C)),d&&(C=C||this.getBoundingRect(),this._strokeGradient=f.getGradient(i,n,C))}s?i.fillStyle=this._fillGradient:E&&(i.fillStyle=R.call(l,i)),d?i.strokeStyle=this._strokeGradient:A&&(i.strokeStyle=R.call(n,i));var k=f.lineDash,w=f.lineDashOffset,g=!!i.setLineDash,h=this.getGlobalScale();if(a.setScale(h[0],h[1],this.segmentIgnoreThreshold),this.__dirtyPath||k&&!g&&o?(a.beginPath(i),k&&!g&&(a.setLineDash(k),a.setLineDashOffset(w)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),c)if(f.fillOpacity!=null){var p=i.globalAlpha;i.globalAlpha=f.fillOpacity*f.opacity,a.fill(i),i.globalAlpha=p}else a.fill(i);if(k&&g&&(i.setLineDash(k),i.lineDashOffset=w),o)if(f.strokeOpacity!=null){var p=i.globalAlpha;i.globalAlpha=f.strokeOpacity*f.opacity,a.stroke(i),i.globalAlpha=p}else a.stroke(i);k&&g&&i.setLineDash([]),f.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,u,f){},createPathProxy:function(){this.path=new I},getBoundingRect:function(){var i=this._rect,u=this.style,f=!i;if(f){var a=this.path;a||(a=this.path=new I),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),i=a.getBoundingRect()}if(this._rect=i,u.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||f){o.copy(i);var c=u.lineWidth,l=u.strokeNoScale?this.getLineScale():1;u.hasFill()||(c=Math.max(c,this.strokeContainThreshold||4)),l>1e-10&&(o.width+=c/l,o.height+=c/l,o.x-=c/l/2,o.y-=c/l/2)}return o}return i},contain:function(i,u){var f=this.transformCoordToLocal(i,u),a=this.getBoundingRect(),o=this.style;if(i=f[0],u=f[1],a.contain(i,u)){var c=this.path.data;if(o.hasStroke()){var l=o.lineWidth,n=o.strokeNoScale?this.getLineScale():1;if(n>1e-10&&(o.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),F.containStroke(c,l/n,i,u)))return!0}if(o.hasFill())return F.contain(c,i,u)}return!1},dirty:function(i){i==null&&(i=!0),i&&(this.__dirtyPath=i,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(i){return this.animate("shape",i)},attrKV:function(i,u){i==="shape"?(this.setShape(u),this.__dirtyPath=!0,this._rect=null):Y.prototype.attrKV.call(this,i,u)},setShape:function(i,u){var f=this.shape;if(f){if(B.isObject(i))for(var a in i)i.hasOwnProperty(a)&&(f[a]=i[a]);else f[i]=u;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&P(i[0]-1)>1e-10&&P(i[3]-1)>1e-10?Math.sqrt(P(i[0]*i[3]-i[2]*i[1])):1}},t.extend=function(i){var u=function(a){t.call(this,a),i.style&&this.style.extendFrom(i.style,!1);var o=i.shape;if(o){this.shape=this.shape||{};var c=this.shape;for(var l in o)!c.hasOwnProperty(l)&&o.hasOwnProperty(l)&&(c[l]=o[l])}i.init&&i.init.call(this,a)};B.inherits(u,t);for(var f in i)f!=="style"&&f!=="shape"&&(u.prototype[f]=i[f]);return u},B.inherits(t,Y);var b=t;We.exports=b},"y0+3":function(We,J,L){"use strict";L.d(J,"a",function(){return i}),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 S(a,o,c){if(o=o.toLowerCase(),c==="auto"){if(o==="height")return a.offsetHeight;if(o==="width")return a.offsetWidth}return o in B||(B[o]=Y.test(o)),B[o]?parseFloat(c)||0:c}function R(a,o){var c=arguments.length,l=F(a);return o=I[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,c===1?l:S(a,o,l[o]||a.style[o])}function P(a,o,c){var l=arguments.length;if(o=I[o]?"cssFloat"in a.style?"cssFloat":"styleFloat":o,l===3)return typeof c=="number"&&Y.test(o)&&(c="".concat(c,"px")),a.style[o]=c,c;for(var n in o)o.hasOwnProperty(n)&&P(a,n,o[n]);return F(a)}function y(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),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:o}}function i(){var a=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:o}}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 o=a.getBoundingClientRect(),c=document.documentElement;return{left:o.left+(window.pageXOffset||c.scrollLeft)-(c.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||c.scrollTop)-(c.clientTop||document.body.clientTop||0)}}},y23F:function(We,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 S=I.offsetX,R=I.offsetY,P=S-this._x,y=R-this._y;this._x=S,this._y=R,F.drift(P,y,I),this.dispatchToElement(Y(F,I),"drag",I.event);var t=this.findHover(S,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;We.exports=B},yQHh:function(We,J,L){},"yTi+":function(We,J,L){We.exports=L.p+"static/AssistantCode3.fdd8db3c.jpeg"},yxFR:function(We,J,L){var Y=L("y+Vt"),B=L("nPnh"),I=B.subPixelOptimizeLine,F={},S=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 y,t,b,i;this.subPixelOptimize?(I(F,P,this.style),y=F.x1,t=F.y1,b=F.x2,i=F.y2):(y=P.x1,t=P.y1,b=P.x2,i=P.y2);var u=P.percent;if(u===0)return;R.moveTo(y,t),u<1&&(b=y*(1-u)+b*u,i=t*(1-u)+i*u),R.lineTo(b,i)},pointAt:function(R){var P=this.shape;return[P.x1*(1-R)+P.x2*R,P.y1*(1-R)+P.y2*R]}});We.exports=S},zarK:function(We,J,L){var Y=L("YH21"),B=Y.addEventListener,I=Y.removeEventListener,F=Y.normalizeEvent,S=Y.getNativeEvent,R=L("bYtY"),P=L("H6uX"),y=L("ItGF"),t=300,b=y.domSupported,i=function(){var v=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],j=["touchstart","touchend","touchmove"],U={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},T=R.map(v,function(z){var H=z.replace("mouse","pointer");return U.hasOwnProperty(H)?H:z});return{mouse:v,touch:j,pointer:T}}(),u={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function f(v){return v==="mousewheel"&&y.browser.firefox?"DOMMouseScroll":v}function a(v){var j=v.pointerType;return j==="pen"||j==="touch"}function o(v){v.touching=!0,v.touchTimer!=null&&(clearTimeout(v.touchTimer),v.touchTimer=null),v.touchTimer=setTimeout(function(){v.touching=!1,v.touchTimer=null},700)}function c(v){v&&(v.zrByTouch=!0)}function l(v,j){return F(v.dom,new s(v,j),!0)}function n(v,j){for(var U=j,T=!1;U&&U.nodeType!==9&&!(T=U.domBelongToZr||U!==j&&U===v.painterRoot);)U=U.parentNode;return T}function s(v,j){this.type=j.type,this.target=this.currentTarget=v.dom,this.pointerType=j.pointerType,this.clientX=j.clientX,this.clientY=j.clientY}var d=s.prototype;d.stopPropagation=d.stopImmediatePropagation=d.preventDefault=R.noop;var E={mousedown:function(v){v=F(this.dom,v),this._mayPointerCapture=[v.zrX,v.zrY],this.trigger("mousedown",v)},mousemove:function(v){v=F(this.dom,v);var j=this._mayPointerCapture;j&&(v.zrX!==j[0]||v.zrY!==j[1])&&h(this,!0),this.trigger("mousemove",v)},mouseup:function(v){v=F(this.dom,v),h(this,!1),this.trigger("mouseup",v)},mouseout:function(v){v=F(this.dom,v),this._pointerCapturing&&(v.zrEventControl="no_globalout");var j=v.toElement||v.relatedTarget;v.zrIsToLocalDOM=n(this,j),this.trigger("mouseout",v)},touchstart:function(v){v=F(this.dom,v),c(v),this._lastTouchMoment=new Date,this.handler.processGesture(v,"start"),E.mousemove.call(this,v),E.mousedown.call(this,v)},touchmove:function(v){v=F(this.dom,v),c(v),this.handler.processGesture(v,"change"),E.mousemove.call(this,v)},touchend:function(v){v=F(this.dom,v),c(v),this.handler.processGesture(v,"end"),E.mouseup.call(this,v),+new Date-this._lastTouchMoment<t&&E.click.call(this,v)},pointerdown:function(v){E.mousedown.call(this,v)},pointermove:function(v){a(v)||E.mousemove.call(this,v)},pointerup:function(v){E.mouseup.call(this,v)},pointerout:function(v){a(v)||E.mouseout.call(this,v)}};R.each(["click","mousewheel","dblclick","contextmenu"],function(v){E[v]=function(j){j=F(this.dom,j),this.trigger(v,j)}});var A={pointermove:function(v){a(v)||A.mousemove.call(this,v)},pointerup:function(v){A.mouseup.call(this,v)},mousemove:function(v){this.trigger("mousemove",v)},mouseup:function(v){var j=this._pointerCapturing;h(this,!1),this.trigger("mouseup",v),j&&(v.zrEventControl="only_globalout",this.trigger("mouseout",v))}};function C(v,j){var U=j.domHandlers;y.pointerEventsSupported?R.each(i.pointer,function(T){w(j,T,function(z){U[T].call(v,z)})}):(y.touchEventsSupported&&R.each(i.touch,function(T){w(j,T,function(z){U[T].call(v,z),o(j)})}),R.each(i.mouse,function(T){w(j,T,function(z){z=S(z),j.touching||U[T].call(v,z)})}))}function k(v,j){y.pointerEventsSupported?R.each(u.pointer,U):y.touchEventsSupported||R.each(u.mouse,U);function U(T){function z(H){H=S(H),n(v,H.target)||(H=l(v,H),j.domHandlers[T].call(v,H))}w(j,T,z,{capture:!0})}}function w(v,j,U,T){v.mounted[j]=U,v.listenerOpts[j]=T,B(v.domTarget,f(j),U,T)}function g(v){var j=v.mounted;for(var U in j)j.hasOwnProperty(U)&&I(v.domTarget,f(U),j[U],v.listenerOpts[U]);v.mounted={}}function h(v,j){if(v._mayPointerCapture=null,b&&v._pointerCapturing^j){v._pointerCapturing=j;var U=v._globalHandlerScope;j?k(v,U):g(U)}}function p(v,j){this.domTarget=v,this.domHandlers=j,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function m(v,j){P.call(this),this.dom=v,this.painterRoot=j,this._localHandlerScope=new p(v,E),b&&(this._globalHandlerScope=new p(document,A)),this._pointerCapturing=!1,this._mayPointerCapture=null,C(this,this._localHandlerScope)}var _=m.prototype;_.dispose=function(){g(this._localHandlerScope),b&&g(this._globalHandlerScope)},_.setCursor=function(v){this.dom.style&&(this.dom.style.cursor=v||"default")},R.mixin(m,P);var x=m;We.exports=x},zetH:function(We,J,L){We.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"}}}]);
|