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.
440 lines
1.4 MiB
440 lines
1.4 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[274,5,7,10,14],{"+GGh":function(it,ve){it.exports="data:image/png;base64,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"},"+NIl":function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){"use strict";ie.defineMode("stex",function(G,P){"use strict";function V(u,c){u.cmdState.push(c)}function k(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function B(u){var c=u.cmdState.pop();c&&c.closeBracket()}function z(u){for(var c=u.cmdState,f=c.length-1;f>=0;f--){var o=c[f];if(o.name=="DEFAULT")continue;return o}return{styleIdentifier:function(){return null}}}function K(u,c,f){return function(){this.name=u,this.bracketNo=0,this.style=c,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=K("importmodule","tag",["string","builtin"]),n.documentclass=K("documentclass","tag",["","atom"]),n.usepackage=K("usepackage","tag",["atom"]),n.begin=K("begin","tag",["atom"]),n.end=K("end","tag",["atom"]),n.label=K("label","tag",["atom"]),n.ref=K("ref","tag",["atom"]),n.eqref=K("eqref","tag",["atom"]),n.cite=K("cite","tag",["atom"]),n.bibitem=K("bibitem","tag",["atom"]),n.Bibitem=K("Bibitem","tag",["atom"]),n.RBibitem=K("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function M(u,c){u.f=c}function y(u,c){var f;if(u.match(/^\\[a-zA-Z@]+/)){var o=u.current().slice(1);return f=n.hasOwnProperty(o)?n[o]:n.DEFAULT,f=new f,V(c,f),M(c,g),f.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return M(c,function(s,a){return m(s,a,"\\]")}),"keyword";if(u.match("\\("))return M(c,function(s,a){return m(s,a,"\\)")}),"keyword";if(u.match("$$"))return M(c,function(s,a){return m(s,a,"$$")}),"keyword";if(u.match("$"))return M(c,function(s,a){return m(s,a,"$")}),"keyword";var l=u.next();if(l=="%")return u.skipToEnd(),"comment";if(l=="}"||l=="]"){if(f=k(c),f)f.closeBracket(l),M(c,g);else return"error";return"bracket"}else return l=="{"||l=="["?(f=n.DEFAULT,f=new f,V(c,f),"bracket"):/\d/.test(l)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),f=z(c),f.name=="begin"&&(f.argument=u.current()),f.styleIdentifier())}function m(u,c,f){if(u.eatSpace())return null;if(f&&u.match(f))return M(c,y),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var o=u.next();return o=="{"||o=="}"||o=="["||o=="]"||o=="("||o==")"?"bracket":o=="%"?(u.skipToEnd(),"comment"):"error"}function g(u,c){var f=u.peek(),o;return f=="{"||f=="["?(o=k(c),o.openBracket(f),u.eat(f),M(c,y),"bracket"):/[ \t\r]/.test(f)?(u.eat(f),null):(M(c,y),B(c),y(u,c))}return{startState:function(){var u=P.inMathMode?function(c,f){return m(c,f)}:y;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,c){return c.f(u,c)},blankLine:function(u){u.f=y,u.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},"+ua5":function(it,ve,W){},"/cxE":function(it,ve,W){"use strict";W.d(ve,"f",function(){return P}),W.d(ve,"g",function(){return V}),W.d(ve,"h",function(){return k}),W.d(ve,"e",function(){return z}),W.d(ve,"b",function(){return K}),W.d(ve,"c",function(){return n}),W.d(ve,"d",function(){return M}),W.d(ve,"a",function(){return y});class ie{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
|
|
|
|
`+m.stack):m},0)}}emit(m){this.listeners.forEach(g=>{g(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const G=new ie;function P(m){z(m)||G.onUnexpectedError(m);return}function V(m){z(m)||G.onUnexpectedExternalError(m);return}function k(m){if(m instanceof Error){let{name:g,message:u}=m;const c=m.stacktrace||m.stack;return{$isError:!0,name:g,message:u,stack:c}}return m}const B="Canceled";function z(m){return m instanceof Error&&m.name===B&&m.message===B}function K(){const m=new Error(B);return m.name=m.message,m}function n(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function M(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class y extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){ie.defineOption("placeholder","",function(K,n,M){var y=M&&M!=ie.Init;if(n&&!y)K.on("blur",k),K.on("change",B),K.on("swapDoc",B),ie.on(K.getInputField(),"compositionupdate",K.state.placeholderCompose=function(){V(K)}),B(K);else if(!n&&y){K.off("blur",k),K.off("change",B),K.off("swapDoc",B),ie.off(K.getInputField(),"compositionupdate",K.state.placeholderCompose),G(K);var m=K.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}n&&!K.hasFocus()&&k(K)});function G(K){K.state.placeholder&&(K.state.placeholder.parentNode.removeChild(K.state.placeholder),K.state.placeholder=null)}function P(K){G(K);var n=K.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=K.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var M=K.getOption("placeholder");typeof M=="string"&&(M=document.createTextNode(M)),n.appendChild(M),K.display.lineSpace.insertBefore(n,K.display.lineSpace.firstChild)}function V(K){setTimeout(function(){var n=!1,M=K.getInputField();M.nodeName=="TEXTAREA"?n=!M.value:K.lineCount()==1&&(n=!/[^\u200b]/.test(M.querySelector(".CodeMirror-line").textContent)),n?P(K):G(K)},20)}function k(K){z(K)&&P(K)}function B(K){var n=K.getWrapperElement(),M=z(K);n.className=n.className.replace(" CodeMirror-empty","")+(M?" CodeMirror-empty":""),M?P(K):G(K)}function z(K){return K.lineCount()===1&&K.getLine(0)===""}})},"1eCo":function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){"use strict";var G={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},P={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(V,k){var B=V.indentUnit,z={},K=k.htmlMode?G:P;for(var n in K)z[n]=K[n];for(var n in k)z[n]=k[n];var M,y;function m(d,E){function p(F){return E.tokenize=F,F(d,E)}var v=d.next();if(v=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?p(c("atom","]]>")):null:d.match("--")?p(c("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),p(f(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),E.tokenize=c("meta","?>"),"meta"):(M=d.eat("/")?"closeTag":"openTag",E.tokenize=g,"tag bracket");if(v=="&"){var C;return d.eat("#")?d.eat("x")?C=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):C=d.eatWhile(/[\d]/)&&d.eat(";"):C=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),C?"atom":"error"}else return d.eatWhile(/[^&<]/),null}m.isInText=!0;function g(d,E){var p=d.next();if(p==">"||p=="/"&&d.eat(">"))return E.tokenize=m,M=p==">"?"endTag":"selfcloseTag","tag bracket";if(p=="=")return M="equals",null;if(p=="<"){E.tokenize=m,E.state=a,E.tagName=E.tagStart=null;var v=E.tokenize(d,E);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(p)?(E.tokenize=u(p),E.stringStartCol=d.column(),E.tokenize(d,E)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(d){var E=function(p,v){for(;!p.eol();)if(p.next()==d){v.tokenize=g;break}return"string"};return E.isInAttribute=!0,E}function c(d,E){return function(p,v){for(;!p.eol();){if(p.match(E)){v.tokenize=m;break}p.next()}return d}}function f(d){return function(E,p){for(var v;(v=E.next())!=null;){if(v=="<")return p.tokenize=f(d+1),p.tokenize(E,p);if(v==">")if(d==1){p.tokenize=m;break}else return p.tokenize=f(d-1),p.tokenize(E,p)}return"meta"}}function o(d,E,p){this.prev=d.context,this.tagName=E,this.indent=d.indented,this.startOfLine=p,(z.doNotIndent.hasOwnProperty(E)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function l(d){d.context&&(d.context=d.context.prev)}function s(d,E){for(var p;;){if(!d.context)return;if(p=d.context.tagName,!z.contextGrabbers.hasOwnProperty(p)||!z.contextGrabbers[p].hasOwnProperty(E))return;l(d)}}function a(d,E,p){return d=="openTag"?(p.tagStart=E.column(),O):d=="closeTag"?w:a}function O(d,E,p){return d=="word"?(p.tagName=E.current(),y="tag",D):z.allowMissingTagName&&d=="endTag"?(y="tag bracket",D(d,E,p)):(y="error",O)}function w(d,E,p){if(d=="word"){var v=E.current();return p.context&&p.context.tagName!=v&&z.implicitlyClosed.hasOwnProperty(p.context.tagName)&&l(p),p.context&&p.context.tagName==v||z.matchClosing===!1?(y="tag",S):(y="tag error",L)}else return z.allowMissingTagName&&d=="endTag"?(y="tag bracket",S(d,E,p)):(y="error",L)}function S(d,E,p){return d!="endTag"?(y="error",S):(l(p),a)}function L(d,E,p){return y="error",S(d,E,p)}function D(d,E,p){if(d=="word")return y="attribute",A;if(d=="endTag"||d=="selfcloseTag"){var v=p.tagName,C=p.tagStart;return p.tagName=p.tagStart=null,d=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(v)?s(p,v):(s(p,v),p.context=new o(p,v,C==p.indented)),a}return y="error",D}function A(d,E,p){return d=="equals"?T:(z.allowMissing||(y="error"),D(d,E,p))}function T(d,E,p){return d=="string"?x:d=="word"&&z.allowUnquoted?(y="string",D):(y="error",D(d,E,p))}function x(d,E,p){return d=="string"?x:D(d,E,p)}return{startState:function(d){var E={tokenize:m,state:a,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(E.baseIndent=d),E},token:function(d,E){if(!E.tagName&&d.sol()&&(E.indented=d.indentation()),d.eatSpace())return null;M=null;var p=E.tokenize(d,E);return(p||M)&&p!="comment"&&(y=null,E.state=E.state(M||p,d,E),y&&(p=y=="error"?p+" error":y)),p},indent:function(d,E,p){var v=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+B;if(v&&v.noIndent)return ie.Pass;if(d.tokenize!=g&&d.tokenize!=m)return p?p.match(/^(\s*)/)[0].length:0;if(d.tagName)return z.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+B*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/<!\[CDATA\[/.test(E))return 0;var C=E&&/^<(\/)?([\w_:\.-]*)/.exec(E);if(C&&C[1])for(;v;)if(v.tagName==C[2]){v=v.prev;break}else if(z.implicitlyClosed.hasOwnProperty(v.tagName))v=v.prev;else break;else if(C)for(;v;){var F=z.contextGrabbers[v.tagName];if(F&&F.hasOwnProperty(C[2]))v=v.prev;else break}for(;v&&v.prev&&!v.startOfLine;)v=v.prev;return v?v.indent+B:d.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(d){d.state==T&&(d.state=D)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var E=[],p=d.context;p;p=p.prev)p.tagName&&E.push(p.tagName);return E.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(it,ve,W){"use strict";W.d(ve,"a",function(){return G});class ie{constructor(P){this.element=P,this.next=ie.Undefined,this.prev=ie.Undefined}}ie.Undefined=new ie(void 0);class G{constructor(){this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ie.Undefined}clear(){let P=this._first;for(;P!==ie.Undefined;){const V=P.next;P.prev=ie.Undefined,P.next=ie.Undefined,P=V}this._first=ie.Undefined,this._last=ie.Undefined,this._size=0}unshift(P){return this._insert(P,!1)}push(P){return this._insert(P,!0)}_insert(P,V){const k=new ie(P);if(this._first===ie.Undefined)this._first=k,this._last=k;else if(V){const z=this._last;this._last=k,k.prev=z,z.next=k}else{const z=this._first;this._first=k,k.next=z,z.prev=k}this._size+=1;let B=!1;return()=>{B||(B=!0,this._remove(k))}}shift(){if(this._first===ie.Undefined)return;{const P=this._first.element;return this._remove(this._first),P}}pop(){if(this._last===ie.Undefined)return;{const P=this._last.element;return this._remove(this._last),P}}_remove(P){if(P.prev!==ie.Undefined&&P.next!==ie.Undefined){const V=P.prev;V.next=P.next,P.next.prev=V}else P.prev===ie.Undefined&&P.next===ie.Undefined?(this._first=ie.Undefined,this._last=ie.Undefined):P.next===ie.Undefined?(this._last=this._last.prev,this._last.next=ie.Undefined):P.prev===ie.Undefined&&(this._first=this._first.next,this._first.prev=ie.Undefined);this._size-=1}*[Symbol.iterator](){let P=this._first;for(;P!==ie.Undefined;)yield P.element,P=P.next}}},"3/fG":function(it,ve,W){"use strict";W.d(ve,"a",function(){return G});function ie(P,V){let k;return V.length===0?k=P:k=P.replace(/\{(\d+)\}/g,function(B,z){const K=z[0];return typeof V[K]!="undefined"?V[K]:B}),k}function G(P,V,...k){return ie(V,k)}},"55Ip":function(it,ve,W){"use strict";W.d(ve,"a",function(){return s});var ie=W("Ty5D"),G=W("dI71"),P=W("q1tI"),V=W.n(P),k=W("YS25"),B=W("17x9"),z=W.n(B),K=W("wx14"),n=W("zLVn"),M=W("9R94"),y=function(T){Object(G.a)(x,T);function x(){for(var E,p=arguments.length,v=new Array(p),C=0;C<p;C++)v[C]=arguments[C];return E=T.call.apply(T,[this].concat(v))||this,E.history=Object(k.a)(E.props),E}var d=x.prototype;return d.render=function(){return V.a.createElement(ie.c,{history:this.history,children:this.props.children})},x}(V.a.Component),m=function(T){Object(G.a)(x,T);function x(){for(var E,p=arguments.length,v=new Array(p),C=0;C<p;C++)v[C]=arguments[C];return E=T.call.apply(T,[this].concat(v))||this,E.history=Object(k.b)(E.props),E}var d=x.prototype;return d.render=function(){return V.a.createElement(ie.c,{history:this.history,children:this.props.children})},x}(V.a.Component),g=function(x,d){return typeof x=="function"?x(d):x},u=function(x,d){return typeof x=="string"?Object(k.c)(x,null,null,d):x},c=function(x){return x},f=V.a.forwardRef;typeof f=="undefined"&&(f=c);function o(T){return!!(T.metaKey||T.altKey||T.ctrlKey||T.shiftKey)}var l=f(function(T,x){var d=T.innerRef,E=T.navigate,p=T.onClick,v=Object(n.a)(T,["innerRef","navigate","onClick"]),C=v.target,F=Object(K.a)({},v,{onClick:function(j){try{p&&p(j)}catch(U){throw j.preventDefault(),U}!j.defaultPrevented&&j.button===0&&(!C||C==="_self")&&!o(j)&&(j.preventDefault(),E())}});return c!==f?F.ref=x||d:F.ref=d,V.a.createElement("a",F)}),s=f(function(T,x){var d=T.component,E=d===void 0?l:d,p=T.replace,v=T.to,C=T.innerRef,F=Object(n.a)(T,["component","replace","to","innerRef"]);return V.a.createElement(ie.e.Consumer,null,function(R){R||Object(M.a)(!1);var j=R.history,U=u(g(v,R.location),R.location),b=U?j.createHref(U):"",Q=Object(K.a)({},F,{href:b,navigate:function(){var oe=g(v,R.location),fe=p?j.replace:j.push;fe(oe)}});return c!==f?Q.ref=x||C:Q.innerRef=C,V.a.createElement(E,Q)})});if(!1)var a,O;var w=function(x){return x},S=V.a.forwardRef;typeof S=="undefined"&&(S=w);function L(){for(var T=arguments.length,x=new Array(T),d=0;d<T;d++)x[d]=arguments[d];return x.filter(function(E){return E}).join(" ")}var D=S(function(T,x){var d=T["aria-current"],E=d===void 0?"page":d,p=T.activeClassName,v=p===void 0?"active":p,C=T.activeStyle,F=T.className,R=T.exact,j=T.isActive,U=T.location,b=T.sensitive,Q=T.strict,ee=T.style,oe=T.to,fe=T.innerRef,Fe=Object(n.a)(T,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return V.a.createElement(ie.e.Consumer,null,function(Le){Le||Object(M.a)(!1);var Ie=U||Le.location,Be=u(g(oe,Ie),Ie),We=Be.pathname,ge=We&&We.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ue=ge?Object(ie.f)(Ie.pathname,{path:ge,exact:R,sensitive:b,strict:Q}):null,ke=!!(j?j(ue,Ie):ue),lt=ke?L(F,v):F,ot=ke?Object(K.a)({},ee,{},C):ee,ut=Object(K.a)({"aria-current":ke&&E||null,className:lt,style:ot,to:Be},Fe);return w!==S?ut.ref=x||fe:ut.innerRef=fe,V.a.createElement(s,ut)})});if(!1)var A},"5VLF":function(it,ve,W){"use strict";var ie,G;function P(V,k,B){var z=function(K,n){return V.js_beautify(K,n)};return z.js=V.js_beautify,z.css=k.css_beautify,z.html=B.html_beautify,z.js_beautify=V.js_beautify,z.css_beautify=k.css_beautify,z.html_beautify=B.html_beautify,z}!(ie=[W("6UM0"),W("TXwP"),W("psGv")],G=function(V,k,B){return P(V,k,B)}.apply(ve,ie),G!==void 0&&(it.exports=G))},"5Y4S":function(it,ve,W){"use strict";W.d(ve,"a",function(){return P});var ie=W("MNsG");const G=ie.b.performance&&typeof ie.b.performance.now=="function";class P{constructor(V){this._highResolution=G&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new P(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ie.b.performance.now():Date.now()}}},"6UM0":function(it,ve,W){var ie,G;(function(){var P;(function(){"use strict";var k=[function(n,M,y){var m=y(1).Beautifier,g=y(5).Options;function u(c,f){var o=new m(c,f);return o.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new g}},function(n,M,y){var m=y(2).Output,g=y(3).Token,u=y(4),c=y(5).Options,f=y(7).Tokenizer,o=y(7).line_starters,l=y(7).positionable_operators,s=y(7).TOKEN;function a(b,Q){return Q.indexOf(b)!==-1}function O(b){return b.replace(/^\s+/g,"")}function w(b){for(var Q={},ee=0;ee<b.length;ee++)Q[b[ee].replace(/-/g,"_")]=b[ee];return Q}function S(b,Q){return b&&b.type===s.RESERVED&&b.text===Q}function L(b,Q){return b&&b.type===s.RESERVED&&a(b.text,Q)}var D=["case","return","do","if","throw","else","await","break","continue","async"],A=["before-newline","after-newline","preserve-newline"],T=w(A),x=[T.before_newline,T.preserve_newline],d={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function E(b,Q){if(Q.multiline_frame||Q.mode===d.ForInitializer||Q.mode===d.Conditional)return;b.remove_indent(Q.start_line_index)}function p(b){b=b.replace(u.allLineBreaks,`
|
|
`);for(var Q=[],ee=b.indexOf(`
|
|
`);ee!==-1;)Q.push(b.substring(0,ee)),b=b.substring(ee+1),ee=b.indexOf(`
|
|
`);return b.length&&Q.push(b),Q}function v(b){return b===d.ArrayLiteral}function C(b){return a(b,[d.Expression,d.ForInitializer,d.Conditional])}function F(b,Q){for(var ee=0;ee<b.length;ee++){var oe=b[ee].trim();if(oe.charAt(0)!==Q)return!1}return!0}function R(b,Q){for(var ee=0,oe=b.length,fe;ee<oe;ee++)if(fe=b[ee],fe&&fe.indexOf(Q)!==0)return!1;return!0}function j(b,Q){Q=Q||{},this._source_text=b||"",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 c(Q)}j.prototype.create_flags=function(b,Q){var ee=0;b&&(ee=b.indentation_level,!this._output.just_added_newline()&&b.line_indent_level>ee&&(ee=b.line_indent_level));var oe={mode:Q,parent:b,last_token:b?b.last_token:new g(s.START_BLOCK,""),last_word:b?b.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:ee,alignment:0,line_indent_level:b?b.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},j.prototype._reset=function(b){var Q=b.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,Q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var ee=new f(b,this._options);return this._tokens=ee.tokenize(),b},j.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b,Q=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=`
|
|
`,Q&&u.lineBreak.test(Q||"")&&(ee=Q.match(u.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return b=this._output.get_code(ee),b},j.prototype.handle_token=function(b,Q){b.type===s.START_EXPR?this.handle_start_expr(b):b.type===s.END_EXPR?this.handle_end_expr(b):b.type===s.START_BLOCK?this.handle_start_block(b):b.type===s.END_BLOCK?this.handle_end_block(b):b.type===s.WORD?this.handle_word(b):b.type===s.RESERVED?this.handle_word(b):b.type===s.SEMICOLON?this.handle_semicolon(b):b.type===s.STRING?this.handle_string(b):b.type===s.EQUALS?this.handle_equals(b):b.type===s.OPERATOR?this.handle_operator(b):b.type===s.COMMA?this.handle_comma(b):b.type===s.BLOCK_COMMENT?this.handle_block_comment(b,Q):b.type===s.COMMENT?this.handle_comment(b,Q):b.type===s.DOT?this.handle_dot(b):b.type===s.EOF?this.handle_eof(b):b.type===s.UNKNOWN?this.handle_unknown(b,Q):this.handle_unknown(b,Q)},j.prototype.handle_whitespace_and_comments=function(b,Q){var ee=b.newlines,oe=this._options.keep_array_indentation&&v(this._flags.mode);if(b.comments_before)for(var fe=b.comments_before.next();fe;)this.handle_whitespace_and_comments(fe,Q),this.handle_token(fe,Q),fe=b.comments_before.next();if(oe)for(var Fe=0;Fe<ee;Fe+=1)this.print_newline(Fe>0,Q);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,Q);for(var Le=1;Le<ee;Le+=1)this.print_newline(!0,Q)}};var U=["async","break","continue","return","throw","yield"];j.prototype.allow_wrap_or_preserved_newline=function(b,Q){if(Q=Q===void 0?!1:Q,this._output.just_added_newline())return;var ee=this._options.preserve_newlines&&b.newlines||Q,oe=a(this._flags.last_token.text,l)||a(b.text,l);if(oe){var fe=a(this._flags.last_token.text,l)&&a(this._options.operator_position,x)||a(b.text,l);ee=ee&&fe}if(ee)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,U))return;this._output.set_wrap_point()}},j.prototype.print_newline=function(b,Q){if(!Q&&(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 ee=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&S(ee,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(b)&&(this._flags.multiline_frame=!0)},j.prototype.print_token_line_indentation=function(b){this._output.just_added_newline()&&(this._options.keep_array_indentation&&b.newlines&&(b.text==="["||v(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(b.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))},j.prototype.print_token=function(b){if(this._output.raw){this._output.add_raw_token(b);return}if(this._options.comma_first&&b.previous&&b.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Q),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(b),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(b),this._output.non_breaking_space=!0,this._output.add_token(b.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},j.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.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))},j.prototype.set_mode=function(b){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,b),this._flags=this.create_flags(this._previous_flags,b),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},j.prototype.start_of_statement=function(b){var Q=!1;return Q=Q||L(this._flags.last_token,["var","let","const"])&&b.type===s.WORD,Q=Q||S(this._flags.last_token,"do"),Q=Q||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&L(this._flags.last_token,U)&&!b.newlines,Q=Q||S(this._flags.last_token,"else")&&!(S(b,"if")&&!b.comments_before),Q=Q||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),Q=Q||this._flags.last_token.type===s.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(b.text==="--"||b.text==="++")&&this._last_last_text!=="function"&&b.type!==s.WORD&&b.type!==s.RESERVED,Q=Q||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),Q?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(b,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(b,L(b,["do","for","if","while"])),!0):!1},j.prototype.handle_start_expr=function(b){this.start_of_statement(b)||this.handle_whitespace_and_comments(b);var Q=d.Expression;if(b.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(b),this.set_mode(Q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Q=d.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())),a(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,Q=d.ForInitializer):a(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Q=d.Conditional):a(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&b.whitespace_before===""?this._output.space_before_token=!1:(a(this._flags.last_token.text,o)||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(b);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var oe=this._tokens.peek(-4);L(ee,["async","function"])||ee.text==="*"&&L(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.text==="*"&&(oe.text==="{"||oe.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(b);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(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(b,b.newlines),this.print_token(b),this.set_mode(Q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},j.prototype.handle_end_expr=function(b){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(b),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(b,b.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(b),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},j.prototype.handle_start_block=function(b){this.handle_whitespace_and_comments(b);var Q=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):ee&&(a(ee.text,[":",","])&&a(Q.type,[s.STRING,s.WORD,s.RESERVED])||a(Q.text,["get","set","..."])&&a(ee.type,[s.WORD,s.RESERVED]))?a(this._last_last_text,["class","interface"])&&!a(ee.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):a(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!Q.comments_before&&Q.text==="}",fe=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var Fe=0,Le=null;this._flags.inline_frame=!0;do if(Fe+=1,Le=this._tokens.peek(Fe-1),Le.newlines){this._flags.inline_frame=!1;break}while(Le.type!==s.EOF&&!(Le.type===s.END_BLOCK&&Le.opened===b))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&b.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(fe||this._flags.last_token.type===s.EQUALS||L(this._flags.last_token,D)&&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(b),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(b),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},j.prototype.handle_end_block=function(b){for(this.handle_whitespace_and_comments(b);this._flags.mode===d.Statement;)this.restore_mode();var Q=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!Q?this._output.space_before_token=!0:this._options.brace_style==="expand"?Q||this.print_newline():Q||(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(b)},j.prototype.handle_word=function(b){if(b.type===s.RESERVED){if(a(b.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)b.type=s.WORD;else if(b.text==="import"&&a(this._tokens.peek().text,["(","."]))b.type=s.WORD;else if(a(b.text,["as","from"])&&!this._flags.import_block)b.type=s.WORD;else if(this._flags.mode===d.ObjectLiteral){var Q=this._tokens.peek();Q.text===":"&&(b.type=s.WORD)}}if(this.start_of_statement(b)?L(this._flags.last_token,["var","let","const"])&&b.type===s.WORD&&(this._flags.declaration_statement=!0):b.newlines&&!C(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||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(b),this.print_newline()):this.handle_whitespace_and_comments(b),this._flags.do_block&&!this._flags.do_while)if(S(b,"while")){this._output.space_before_token=!0,this.print_token(b),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&&S(b,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(b,["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(b),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(b)),S(b,"function")){(a(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(a(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!b.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,U)?this._output.space_before_token=!0:S(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&&(C(this._flags.mode)||v(this._flags.mode))||this.print_newline(),this.print_token(b),this._flags.last_word=b.text;return}var ee="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":L(b,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&b.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===d.BlockStatement?ee="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&C(this._flags.mode)?ee="SPACE":this._flags.last_token.type===s.STRING?ee="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),L(b,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),L(b,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&b.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ee==="NEWLINE"?L(this._flags.last_token,D)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(b,["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||!L(b,["var","let","const"]))&&this._flags.last_token.text!==":"&&(S(b,"if")&&S(b.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(b,o)&&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():ee==="SPACE"&&(this._output.space_before_token=!0);b.previous&&(b.previous.type===s.WORD||b.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(b),this._flags.last_word=b.text,b.type===s.RESERVED&&(b.text==="do"?this._flags.do_block=!0:b.text==="if"?this._flags.if_block=!0:b.text==="import"?this._flags.import_block=!0:this._flags.import_block&&S(b,"from")&&(this._flags.import_block=!1))},j.prototype.handle_semicolon=function(b){this.start_of_statement(b)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(b);for(var Q=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&S(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(b)},j.prototype.handle_string=function(b){b.text.startsWith("`")&&b.newlines===0&&b.whitespace_before===""&&(b.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(b)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(b),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(b):b.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(b.previous.text==="]"||b.previous.text===")")&&b.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(b)},j.prototype.handle_equals=function(b){this.start_of_statement(b)||this.handle_whitespace_and_comments(b),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(b),this._output.space_before_token=!0},j.prototype.handle_comma=function(b){this.handle_whitespace_and_comments(b,!0),this.print_token(b),this._output.space_before_token=!0,this._flags.declaration_statement?(C(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(b)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(b)},j.prototype.handle_operator=function(b){var Q=b.text==="*"&&(L(this._flags.last_token,["function","yield"])||a(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),ee=a(b.text,["-","+"])&&(a(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||a(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(b)){var oe=!Q;this.handle_whitespace_and_comments(b,oe)}if(b.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(b);return}if(b.text==="::"){this.print_token(b);return}if(this._flags.last_token.type===s.OPERATOR&&a(this._options.operator_position,x)&&this.allow_wrap_or_preserved_newline(b),b.text===":"&&this._flags.in_case){this.print_token(b),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 fe=!0,Fe=!0,Le=!1;if(b.text===":"?this._flags.ternary_depth===0?fe=!1:(this._flags.ternary_depth-=1,Le=!0):b.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!Q&&this._options.preserve_newlines&&a(b.text,l)){var Ie=b.text===":",Be=Ie&&Le,We=Ie&&!Le;switch(this._options.operator_position){case T.before_newline:this._output.space_before_token=!We,this.print_token(b),(!Ie||Be)&&this.allow_wrap_or_preserved_newline(b),this._output.space_before_token=!0;return;case T.after_newline:this._output.space_before_token=!0,!Ie||Be?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(b):this._output.space_before_token=!1,this.print_token(b),this._output.space_before_token=!0;return;case T.preserve_newline:We||this.allow_wrap_or_preserved_newline(b),fe=!(this._output.just_added_newline()||We),this._output.space_before_token=fe,this.print_token(b),this._output.space_before_token=!0;return}}if(Q){this.allow_wrap_or_preserved_newline(b),fe=!1;var ge=this._tokens.peek();Fe=ge&&a(ge.type,[s.WORD,s.RESERVED])}else if(b.text==="...")this.allow_wrap_or_preserved_newline(b),fe=this._flags.last_token.type===s.START_BLOCK,Fe=!1;else if(a(b.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(b),fe=!1,Fe=!1,b.newlines&&(b.text==="--"||b.text==="++"||b.text==="~")){var ue=L(this._flags.last_token,D)&&b.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&C(this._flags.mode)&&(fe=!0),this._flags.last_token.type===s.RESERVED?fe=!0:this._flags.last_token.type===s.END_EXPR?fe=!(this._flags.last_token.text==="]"&&(b.text==="--"||b.text==="++")):this._flags.last_token.type===s.OPERATOR&&(fe=a(b.text,["--","-","++","+"])&&a(this._flags.last_token.text,["--","-","++","+"]),a(b.text,["+","-"])&&a(this._flags.last_token.text,["--","++"])&&(Fe=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||fe,this.print_token(b),this._output.space_before_token=Fe},j.prototype.handle_block_comment=function(b,Q){if(this._output.raw){this._output.add_raw_token(b),b.directives&&b.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(b.directives){this.print_newline(!1,Q),this.print_token(b),b.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!u.newline.test(b.text)&&!b.newlines){this._output.space_before_token=!0,this.print_token(b),this._output.space_before_token=!0;return}else this.print_block_commment(b,Q)},j.prototype.print_block_commment=function(b,Q){var ee=p(b.text),oe,fe=!1,Fe=!1,Le=b.whitespace_before,Ie=Le.length;if(this.print_newline(!1,Q),this.print_token_line_indentation(b),this._output.add_token(ee[0]),this.print_newline(!1,Q),ee.length>1){for(ee=ee.slice(1),fe=F(ee,"*"),Fe=R(ee,Le),fe&&(this._flags.alignment=1),oe=0;oe<ee.length;oe++)fe?(this.print_token_line_indentation(b),this._output.add_token(O(ee[oe]))):Fe&&ee[oe]?(this.print_token_line_indentation(b),this._output.add_token(ee[oe].substring(Ie))):(this._output.current_line.set_indent(-1),this._output.add_token(ee[oe])),this.print_newline(!1,Q);this._flags.alignment=0}},j.prototype.handle_comment=function(b,Q){b.newlines?this.print_newline(!1,Q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(b),this.print_newline(!1,Q)},j.prototype.handle_dot=function(b){this.start_of_statement(b)||this.handle_whitespace_and_comments(b,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,D)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(b,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(b)},j.prototype.handle_unknown=function(b,Q){this.print_token(b),b.text[b.text.length-1]===`
|
|
`&&this.print_newline(!1,Q)},j.prototype.handle_eof=function(b){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(b)},n.exports.Beautifier=j},function(n){function M(g){this.__parent=g,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=[]}M.prototype.clone_empty=function(){var g=new M(this.__parent);return g.set_indent(this.__indent_count,this.__alignment_count),g},M.prototype.item=function(g){return g<0?this.__items[this.__items.length+g]:this.__items[g]},M.prototype.has_match=function(g){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(g))return!0;return!1},M.prototype.set_indent=function(g,u){this.is_empty()&&(this.__indent_count=g||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},M.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)},M.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},M.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var g=this.__parent.current_line;return g.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),g.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),g.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,g.__items[0]===" "&&(g.__items.splice(0,1),g.__character_count-=1),!0}return!1},M.prototype.is_empty=function(){return this.__items.length===0},M.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},M.prototype.push=function(g){this.__items.push(g);var u=g.lastIndexOf(`
|
|
`);u!==-1?this.__character_count=g.length-u:this.__character_count+=g.length},M.prototype.pop=function(){var g=null;return this.is_empty()||(g=this.__items.pop(),this.__character_count-=g.length),g},M.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},M.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},M.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},M.prototype.toString=function(){var g="";return this.is_empty()?this.__parent.indent_empty_lines&&(g=this.__parent.get_indent_string(this.__indent_count)):(g=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),g+=this.__items.join("")),g};function y(g,u){this.__cache=[""],this.__indent_size=g.indent_size,this.__indent_string=g.indent_char,g.indent_with_tabs||(this.__indent_string=new Array(g.indent_size+1).join(g.indent_char)),u=u||"",g.indent_level>0&&(u=new Array(g.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}y.prototype.get_indent_size=function(g,u){var c=this.__base_string_length;return u=u||0,g<0&&(c=0),c+=g*this.__indent_size,c+=u,c},y.prototype.get_indent_string=function(g,u){var c=this.__base_string;return u=u||0,g<0&&(g=0,c=""),u+=g*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},y.prototype.__ensure_cache=function(g){for(;g>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var g=this.__cache.length,u=0,c="";this.__indent_size&&g>=this.__indent_size&&(u=Math.floor(g/this.__indent_size),g-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),g&&(c+=new Array(g+1).join(" ")),this.__cache.push(c)};function m(g,u){this.__indent_cache=new y(g,u),this.raw=!1,this._end_with_newline=g.end_with_newline,this.indent_size=g.indent_size,this.wrap_line_length=g.wrap_line_length,this.indent_empty_lines=g.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new M(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(g,u){return this.__indent_cache.get_indent_string(g,u)},m.prototype.get_indent_size=function(g,u){return this.__indent_cache.get_indent_size(g,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(g){return this.is_empty()||!g&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(g){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
|
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
`);return g!==`
|
|
`&&(c=c.replace(/[\n]/g,g)),c},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(g,u){return g=g||0,u=u||0,this.next_line.set_indent(g,u),this.__lines.length>1?(this.current_line.set_indent(g,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(g){for(var u=0;u<g.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(g.whitespace_before),this.current_line.push(g.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(g){this.__add_space_before_token(),this.current_line.push(g),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(g){for(var u=this.__lines.length;g<u;)this.__lines[g]._remove_indent(),g++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(g){for(g=g===void 0?!1:g,this.current_line.trim();g&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(g,u){for(var c=this.__lines.length-2;c>=0;){var f=this.__lines[c];if(f.is_empty())break;if(f.item(0).indexOf(g)!==0&&f.item(-1)!==u){this.__lines.splice(c+1,0,new M(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=m},function(n){function M(y,m,g,u){this.type=y,this.text=m,this.comments_before=null,this.newlines=g||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=M},function(n,M){var y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",g="\\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",u="\\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",c="(?:\\\\u[0-9a-fA-F]{4}|["+y+g+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+m+g+u+"])*";M.identifier=new RegExp(c+f,"g"),M.identifierStart=new RegExp(c),M.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+g+u+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;M.newline=/[\n\r\u2028\u2029]/,M.lineBreak=new RegExp(`\r
|
|
|`+M.newline.source),M.allLineBreaks=new RegExp(M.lineBreak.source,"g")},function(n,M,y){var m=y(6).Options,g=["before-newline","after-newline","preserve-newline"];function u(c){m.call(this,c,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l<o.length;l++)o[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[l];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",g),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}u.prototype=new m,n.exports.Options=u},function(n){function M(g,u){this.raw_options=y(g,u),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"])}M.prototype._get_array=function(g,u){var c=this.raw_options[g],f=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(f=c.concat()):typeof c=="string"&&(f=c.split(/[^a-zA-Z0-9_\/\-]+/)),f},M.prototype._get_boolean=function(g,u){var c=this.raw_options[g],f=c===void 0?!!u:!!c;return f},M.prototype._get_characters=function(g,u){var c=this.raw_options[g],f=u||"";return typeof c=="string"&&(f=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),f},M.prototype._get_number=function(g,u){var c=this.raw_options[g];u=parseInt(u,10),isNaN(u)&&(u=0);var f=parseInt(c,10);return isNaN(f)&&(f=u),f},M.prototype._get_selection=function(g,u,c){var f=this._get_selection_list(g,u,c);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+g+`' can only be one of the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return f[0]},M.prototype._get_selection_list=function(g,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var f=this._get_array(g,c);if(!this._is_valid_selection(f,u))throw new Error("Invalid Option Value: The option '"+g+`' can contain only the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return f},M.prototype._is_valid_selection=function(g,u){return g.length&&u.length&&!g.some(function(c){return u.indexOf(c)===-1})};function y(g,u){var c={};g=m(g);var f;for(f in g)f!==u&&(c[f]=g[f]);if(u&&g[u])for(f in g[u])c[f]=g[u][f];return c}function m(g){var u={},c;for(c in g){var f=c.replace(/-/g,"_");u[f]=g[c]}return u}n.exports.Options=M,n.exports.normalizeOpts=m,n.exports.mergeOpts=y},function(n,M,y){var m=y(8).InputScanner,g=y(9).Tokenizer,u=y(9).TOKEN,c=y(13).Directives,f=y(4),o=y(12).Pattern,l=y(14).TemplatablePattern;function s(F,R){return R.indexOf(F)!==-1}var a={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:u.START,RAW:u.RAW,EOF:u.EOF},O=new c(/\/\*/,/\*\//),w=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,S=/[0-9]/,L=/[^\d\.]/,D=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),A=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";A=A.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),A="\\?\\.(?!\\d) "+A,A=A.replace(/ /g,"|");var T=new RegExp(A),x="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=x.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),E=new RegExp("^(?:"+d.join("|")+")$"),p,v=function(F,R){g.call(this,F,R),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var j=new o(this._input),U=new l(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(f.identifier).matching(f.identifierMatch),number:j.matching(w),punct:j.matching(T),comment:j.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:j.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:j.matching(/<!--/),html_comment_end:j.matching(/-->/),include:j.starting_with(/#include/).until_after(f.lineBreak),shebang:j.starting_with(/#!/).until_after(f.lineBreak),xml:j.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:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};v.prototype=new g,v.prototype._is_comment=function(F){return F.type===a.COMMENT||F.type===a.BLOCK_COMMENT||F.type===a.UNKNOWN},v.prototype._is_opening=function(F){return F.type===a.START_BLOCK||F.type===a.START_EXPR},v.prototype._is_closing=function(F,R){return(F.type===a.END_BLOCK||F.type===a.END_EXPR)&&R&&(F.text==="]"&&R.text==="["||F.text===")"&&R.text==="("||F.text==="}"&&R.text==="{")},v.prototype._reset=function(){p=!1},v.prototype._get_next_token=function(F,R){var j=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(a.EOF,""):(j=j||this._read_non_javascript(U),j=j||this._read_string(U),j=j||this._read_word(F),j=j||this._read_singles(U),j=j||this._read_comment(U),j=j||this._read_regexp(U,F),j=j||this._read_xml(U,F),j=j||this._read_punctuation(),j=j||this._create_token(a.UNKNOWN,this._input.next()),j)},v.prototype._read_word=function(F){var R;if(R=this.__patterns.identifier.read(),R!=="")return R=R.replace(f.allLineBreaks,`
|
|
`),!(F.type===a.DOT||F.type===a.RESERVED&&(F.text==="set"||F.text==="get"))&&E.test(R)?(R==="in"||R==="of")&&(F.type===a.WORD||F.type===a.STRING)?this._create_token(a.OPERATOR,R):this._create_token(a.RESERVED,R):this._create_token(a.WORD,R);if(R=this.__patterns.number.read(),R!=="")return this._create_token(a.WORD,R)},v.prototype._read_singles=function(F){var R=null;return F==="("||F==="["?R=this._create_token(a.START_EXPR,F):F===")"||F==="]"?R=this._create_token(a.END_EXPR,F):F==="{"?R=this._create_token(a.START_BLOCK,F):F==="}"?R=this._create_token(a.END_BLOCK,F):F===";"?R=this._create_token(a.SEMICOLON,F):F==="."&&L.test(this._input.peek(1))?R=this._create_token(a.DOT,F):F===","&&(R=this._create_token(a.COMMA,F)),R&&this._input.next(),R},v.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(a.EQUALS,F):F==="?."?this._create_token(a.DOT,F):this._create_token(a.OPERATOR,F)},v.prototype._read_non_javascript=function(F){var R="";if(F==="#"){if(this._is_first_token()&&(R=this.__patterns.shebang.read(),R))return this._create_token(a.UNKNOWN,R.trim()+`
|
|
`);if(R=this.__patterns.include.read(),R)return this._create_token(a.UNKNOWN,R.trim()+`
|
|
`);F=this._input.next();var j="#";if(this._input.hasNext()&&this._input.testChar(S)){do F=this._input.next(),j+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(j+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(j+="{}",this._input.next(),this._input.next())),this._create_token(a.WORD,j)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(R=this.__patterns.html_comment_start.read(),R){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)R+=this._input.next();return p=!0,this._create_token(a.COMMENT,R)}}else if(p&&F==="-"&&(R=this.__patterns.html_comment_end.read(),R))return p=!1,this._create_token(a.COMMENT,R);return null},v.prototype._read_comment=function(F){var R=null;if(F==="/"){var j="";if(this._input.peek(1)==="*"){j=this.__patterns.block_comment.read();var U=O.get_directives(j);U&&U.ignore==="start"&&(j+=O.readIgnored(this._input)),j=j.replace(f.allLineBreaks,`
|
|
`),R=this._create_token(a.BLOCK_COMMENT,j),R.directives=U}else this._input.peek(1)==="/"&&(j=this.__patterns.comment.read(),R=this._create_token(a.COMMENT,j))}return R},v.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var R=this._input.next();return this.has_char_escapes=!1,F==="`"?R+=this._read_string_recursive("`",!0,"${"):R+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(R=C(R)),this._input.peek()===F&&(R+=this._input.next()),R=R.replace(f.allLineBreaks,`
|
|
`),this._create_token(a.STRING,R)}return null},v.prototype._allow_regexp_or_xml=function(F){return F.type===a.RESERVED&&s(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===a.END_EXPR&&F.text===")"&&F.opened.previous.type===a.RESERVED&&s(F.opened.previous.text,["if","while","for"])||s(F.type,[a.COMMENT,a.START_EXPR,a.START_BLOCK,a.START,a.END_BLOCK,a.OPERATOR,a.EQUALS,a.EOF,a.SEMICOLON,a.COMMA])},v.prototype._read_regexp=function(F,R){if(F==="/"&&this._allow_regexp_or_xml(R)){for(var j=this._input.next(),U=!1,b=!1;this._input.hasNext()&&(U||b||this._input.peek()!==F)&&!this._input.testChar(f.newline);)j+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?b=!0:this._input.peek()==="]"&&(b=!1)),this._input.next();return this._input.peek()===F&&(j+=this._input.next(),j+=this._input.read(f.identifier)),this._create_token(a.STRING,j)}return null},v.prototype._read_xml=function(F,R){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(R)){var j="",U=this.__patterns.xml.read_match();if(U){for(var b=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Q=b.indexOf("{")===0,ee=0;U;){var oe=!!U[1],fe=U[2],Fe=!!U[U.length-1]||fe.slice(0,8)==="![CDATA[";if(!Fe&&(fe===b||Q&&fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ee:++ee),j+=U[0],ee<=0)break;U=this.__patterns.xml.read_match()}return U||(j+=this._input.match(/[\s\S]*/g)[0]),j=j.replace(f.allLineBreaks,`
|
|
`),this._create_token(a.STRING,j)}}return null};function C(F){for(var R="",j=0,U=new m(F),b=null;U.hasNext();)if(b=U.match(/([\s]|[^\\]|\\\\)+/g),b&&(R+=b[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")b=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")b=U.match(/u([0-9A-Fa-f]{4})/g);else{R+="\\",U.hasNext()&&(R+=U.next());continue}if(!b)return F;if(j=parseInt(b[1],16),j>126&&j<=255&&b[0].indexOf("x")===0)return F;if(j>=0&&j<32){R+="\\"+b[0];continue}else j===34||j===39||j===92?R+="\\"+String.fromCharCode(j):R+=String.fromCharCode(j)}return R}v.prototype._read_string_recursive=function(F,R,j){var U,b;F==="'"?b=this.__patterns.single_quote:F==='"'?b=this.__patterns.double_quote:F==="`"?b=this.__patterns.template_text:F==="}"&&(b=this.__patterns.template_expression);for(var Q=b.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===F||!R&&f.newline.test(ee)){this._input.back();break}else ee==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ee+=this._input.next()):j&&(j==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),j===ee&&(F==="`"?ee+=this._read_string_recursive("}",R,"`"):ee+=this._read_string_recursive("`",R,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=b.read(),Q+=ee}return Q},n.exports.Tokenizer=v,n.exports.TOKEN=a,n.exports.positionable_operators=D.slice(),n.exports.line_starters=x.slice()},function(n){var M=RegExp.prototype.hasOwnProperty("sticky");function y(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},y.prototype.peek=function(m){var g=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(g=this.__input.charAt(m)),g},y.prototype.__match=function(m,g){m.lastIndex=g;var u=m.exec(this.__input);return u&&!(M&&m.sticky)&&(u.index!==g&&(u=null)),u},y.prototype.test=function(m,g){return g=g||0,g+=this.__position,g>=0&&g<this.__input_length?!!this.__match(m,g):!1},y.prototype.testChar=function(m,g){var u=this.peek(g);return m.lastIndex=0,u!==null&&m.test(u)},y.prototype.match=function(m){var g=this.__match(m,this.__position);return g?this.__position+=g[0].length:g=null,g},y.prototype.read=function(m,g,u){var c="",f;return m&&(f=this.match(m),f&&(c+=f[0])),g&&(f||!m)&&(c+=this.readUntil(g,u)),c},y.prototype.readUntil=function(m,g){var u="",c=this.__position;m.lastIndex=this.__position;var f=m.exec(this.__input);return f?(c=f.index,g&&(c+=f[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},y.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},y.prototype.get_regexp=function(m,g){var u=null,c="g";return g&&M&&(c="y"),typeof m=="string"&&m!==""?u=new RegExp(m,c):m&&(u=new RegExp(m.source,c)),u},y.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(m){var g=this.__position,u=this.readUntilAfter(m);return this.__position=g,u},y.prototype.lookBack=function(m){var g=this.__position-1;return g>=m.length&&this.__input.substring(g-m.length,g).toLowerCase()===m},n.exports.InputScanner=y},function(n,M,y){var m=y(8).InputScanner,g=y(3).Token,u=y(10).TokenStream,c=y(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(l,s){this._input=new m(l),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var l,s=new g(f.START,""),a=null,O=[],w=new u;s.type!==f.EOF;){for(l=this._get_next_token(s,a);this._is_comment(l);)w.add(l),l=this._get_next_token(s,a);w.isEmpty()||(l.comments_before=w,w=new u),l.parent=a,this._is_opening(l)?(O.push(a),a=l):a&&this._is_closing(l,a)&&(l.opened=a,a.closed=l,a=O.pop(),l.parent=a),l.previous=s,s.next=l,this.__tokens.add(l),s=l}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(l,s){this._readWhitespace();var a=this._input.read(/.+/g);return a?this._create_token(f.RAW,a):this._create_token(f.EOF,"")},o.prototype._is_comment=function(l){return!1},o.prototype._is_opening=function(l){return!1},o.prototype._is_closing=function(l,s){return!1},o.prototype._create_token=function(l,s){var a=new g(l,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return a},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=o,n.exports.TOKEN=f},function(n){function M(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}M.prototype.restart=function(){this.__position=0},M.prototype.isEmpty=function(){return this.__tokens_length===0},M.prototype.hasNext=function(){return this.__position<this.__tokens_length},M.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},M.prototype.peek=function(y){var m=null;return y=y||0,y+=this.__position,y>=0&&y<this.__tokens_length&&(m=this.__tokens[y]),m},M.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},n.exports.TokenStream=M},function(n,M,y){var m=y(12).Pattern;function g(u,c){m.call(this,u,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}g.prototype=new m,g.prototype.__set_whitespace_patterns=function(u,c){u+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},g.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var u=this._input.read(this._match_pattern);if(u===" ")this.whitespace_before_token=" ";else if(u){var c=this.__split(this._newline_regexp,u);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return u},g.prototype.matching=function(u,c){var f=this._create();return f.__set_whitespace_patterns(u,c),f._update(),f},g.prototype._create=function(){return new g(this._input,this)},g.prototype.__split=function(u,c){u.lastIndex=0;for(var f=0,o=[],l=u.exec(c);l;)o.push(c.substring(f,l.index)),f=l.index+l[0].length,l=u.exec(c);return f<c.length?o.push(c.substring(f,c.length)):o.push(""),o},n.exports.WhitespacePattern=g},function(n){function M(y,m){this._input=y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,m&&(this._starting_pattern=this._input.get_regexp(m._starting_pattern,!0),this._match_pattern=this._input.get_regexp(m._match_pattern,!0),this._until_pattern=this._input.get_regexp(m._until_pattern),this._until_after=m._until_after)}M.prototype.read=function(){var y=this._input.read(this._starting_pattern);return(!this._starting_pattern||y)&&(y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),y},M.prototype.read_match=function(){return this._input.match(this._match_pattern)},M.prototype.until_after=function(y){var m=this._create();return m._until_after=!0,m._until_pattern=this._input.get_regexp(y),m._update(),m},M.prototype.until=function(y){var m=this._create();return m._until_after=!1,m._until_pattern=this._input.get_regexp(y),m._update(),m},M.prototype.starting_with=function(y){var m=this._create();return m._starting_pattern=this._input.get_regexp(y,!0),m._update(),m},M.prototype.matching=function(y){var m=this._create();return m._match_pattern=this._input.get_regexp(y,!0),m._update(),m},M.prototype._create=function(){return new M(this._input,this)},M.prototype._update=function(){},n.exports.Pattern=M},function(n){function M(y,m){y=typeof y=="string"?y:y.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+m,"g")}M.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var g=this.__directive_pattern.exec(y);g;)m[g[1]]=g[2],g=this.__directive_pattern.exec(y);return m},M.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=M},function(n,M,y){var m=y(12).Pattern,g={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function u(c,f){m.call(this,c,f),this.__template_pattern=null,this._disabled=Object.assign({},g),this._excluded=Object.assign({},g),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var o=new m(c);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new m,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(c){var f=this._create();return f._disabled[c]=!0,f._update(),f},u.prototype.read_options=function(c){var f=this._create();for(var o in g)f._disabled[o]=c.templating.indexOf(o)===-1;return f._update(),f},u.prototype.exclude=function(c){var f=this._create();return f._excluded[c]=!0,f._update(),f},u.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),c+=f,f=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},u.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},u.prototype._read_template=function(){var c="",f=this._input.peek();if(f==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(c=c||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},n.exports.TemplatablePattern=u}],B={};function z(n){var M=B[n];if(M!==void 0)return M.exports;var y=B[n]={exports:{}};return k[n](y,y.exports,z),y.exports}var K=z(0);P=K})();var V=P;!(ie=[],G=function(){return{js_beautify:V}}.apply(ve,ie),G!==void 0&&(it.exports=G))})()},"6nfa":function(it,ve,W){it.exports={flex_box_center:"flex_box_center___24EuS",flex_space_between:"flex_space_between___H0sq_",flex_box_vertical_center:"flex_box_vertical_center___lroQv",flex_box_center_end:"flex_box_center_end___2zqAg",flex_box_column:"flex_box_column___1sePp",row:"row___FQAuJ",title:"title___1l3-g",tagsWrap:"tagsWrap___18FE-",action:"action___asdVT",bar:"bar___M_nl0",name:"name___BKyJY",active:"active___1eybt",tagsBorderWrap:"tagsBorderWrap___1NzgL"}},"746U":function(it,ve,W){"use strict";W.d(ve,"f",function(){return ie}),W.d(ve,"l",function(){return G}),W.d(ve,"k",function(){return P}),W.d(ve,"j",function(){return V}),W.d(ve,"g",function(){return k}),W.d(ve,"m",function(){return B}),W.d(ve,"h",function(){return z}),W.d(ve,"n",function(){return K}),W.d(ve,"c",function(){return n}),W.d(ve,"a",function(){return M}),W.d(ve,"i",function(){return y}),W.d(ve,"o",function(){return m}),W.d(ve,"e",function(){return c}),W.d(ve,"d",function(){return f}),W.d(ve,"p",function(){return o}),W.d(ve,"b",function(){return l});function ie(s){return Array.isArray(s)}function G(s){return typeof s=="string"}function P(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function V(s){return typeof s=="number"&&!isNaN(s)}function k(s){return s===!0||s===!1}function B(s){return typeof s=="undefined"}function z(s){return!K(s)}function K(s){return B(s)||s===null}function n(s,a){if(!s)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function M(s){if(K(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function y(s){return typeof s=="function"}function m(s,a){const O=Math.min(s.length,a.length);for(let w=0;w<O;w++)g(s[w],a[w])}function g(s,a){if(G(a)){if(typeof s!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(y(a)){try{if(s instanceof a)return}catch(O){}if(!K(s)&&s.constructor===a)return;if(a.length===1&&a.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 u(s){let a=[],O=Object.getPrototypeOf(s);for(;Object.prototype!==O;)a=a.concat(Object.getOwnPropertyNames(O)),O=Object.getPrototypeOf(O);return a}function c(s){const a=[];for(const O of u(s))typeof s[O]=="function"&&a.push(O);return a}function f(s,a){const O=S=>function(){const L=Array.prototype.slice.call(arguments,0);return a(S,L)};let w={};for(const S of s)w[S]=O(S);return w}function o(s){return s===null?void 0:s}function l(s,a="Unreachable"){throw new Error(a)}},"7Cbv":function(it,ve,W){"use strict";var ie=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),G=new Uint8Array(16);function P(){if(!ie)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ie(G)}var V=/^(?:[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 k(g){return typeof g=="string"&&V.test(g)}for(var B=k,z=[],K=0;K<256;++K)z.push((K+256).toString(16).substr(1));function n(g){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=(z[g[u+0]]+z[g[u+1]]+z[g[u+2]]+z[g[u+3]]+"-"+z[g[u+4]]+z[g[u+5]]+"-"+z[g[u+6]]+z[g[u+7]]+"-"+z[g[u+8]]+z[g[u+9]]+"-"+z[g[u+10]]+z[g[u+11]]+z[g[u+12]]+z[g[u+13]]+z[g[u+14]]+z[g[u+15]]).toLowerCase();if(!B(c))throw TypeError("Stringified UUID is invalid");return c}var M=n;function y(g,u,c){g=g||{};var f=g.random||(g.rng||P)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,u){c=c||0;for(var o=0;o<16;++o)u[c+o]=f[o];return u}return M(f)}var m=ve.a=y},"7ahc":function(it,ve,W){"use strict";W.d(ve,"a",function(){return O});var ie=W("k1fw"),G=W("0Owb"),P=W("+L6B"),V=W("2/Rp"),k=W("y8nQ"),B=W("Vl3Y"),z=W("tJVT"),K=W("OaEy"),n=W("2fM7"),M=W("q1tI"),y=W.n(M),m=W("VrN/"),g=W.n(m),u=W("p77/"),c=W.n(u),f=W("c5Ni"),o=W.n(f),l=n.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},a={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"]};ve.b=function(w){var S=w.callback,L=w.onCancel,D=Object(M.useState)("python"),A=Object(z.a)(D,2),T=A[0],x=A[1];function d(p){x(a[p][1])}function E(p){S(p)}return y.a.createElement(B.a,Object(G.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),y.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},y.a.createElement(n.a,{onChange:d},Object.keys(a).map(function(p){return y.a.createElement(l,{key:p,value:p},a[p][0])}))),y.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},y.a.createElement(O,{mode:T})),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(V.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(V.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function O(w){var S=w.value,L=w.onChange,D=w.mode,A=w.options,T=A===void 0?{}:A,x=Object(M.useRef)(),d=Object(M.useState)(),E=Object(z.a)(d,2),p=E[0],v=E[1];return Object(M.useEffect)(function(){if(p){function C(F){var R=F.getValue();L&&L(R)}return p.on("change",C),function(){p.off("change",C)}}},[p,L]),Object(M.useEffect)(function(){p&&p.setOption("mode",D)},[p,D]),Object(M.useEffect)(function(){p&&((S!==p.getValue()||S==="")&&setTimeout(function(){p.setValue(S||" ")},300))},[p,S]),Object(M.useEffect)(function(){if(x.current&&!p){var C=g.a.fromTextArea(x.current,Object(ie.a)({mode:D,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},T));v(C)}},[x.current,p]),y.a.createElement("div",{className:"my-codemirror-container"},y.a.createElement("textarea",{ref:x}))}},"7qnI":function(it,ve,W){"use strict";var ie=W("5Dmo"),G=W("3S7+"),P=W("fWQN"),V=W("mtLc"),k=W("yKVA"),B=W("879j"),z=W("5NDa"),K=W("5rEg"),n=W("q1tI"),M=W.n(n),y=W("O2Wb"),m=W.n(y),g=K.a.TextArea,u=function(c){Object(k.a)(o,c);var f=Object(B.a)(o);function o(){return Object(P.a)(this,o),f.apply(this,arguments)}return Object(V.a)(o,[{key:"render",value:function(){var s=this,a=this.props,O=a.index,w=a.onAnswerChange,S=a.addChildAnswer,L=a.exerciseIsPublish,D=a.answers,A=a.activeOptionErrorIndex,T=a.flex,x=T===void 0?"0 0 1000px":T;return M.a.createElement("div",{className:m.a.flex},M.a.createElement("div",{className:"".concat(m.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",O+1,"):"),M.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),style:{flexDirection:"column"}},D.map(function(d,E){var p="".concat(O,"-").concat(E);return M.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),key:E},M.a.createElement("div",{className:m.a.flex1,style:{flex:x}},M.a.createElement("div",null,M.a.createElement(g,{className:p===A?m.a.error:"",spellCheck:!1,rows:4,value:d||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(E==0?"":"(\u53EF\u9009)"),onChange:function(C){return w(O,E,C.target.value)},style:{minHeight:95}}))),!L&&M.a.createElement(M.a.Fragment,null,E!=0&&M.a.createElement(G.a,{title:"\u5220\u9664"},M.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s.props.deleteChildAnswer(O,E)},style:{float:"right"}})),E===0&&M.a.createElement(G.a,{title:"\u5220\u9664"},M.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s.props.deleteChildAnswermain(O,E)},style:{float:"right"}})),M.a.createElement(G.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},M.a.createElement("i",{className:"".concat(m.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return S(O)},style:{float:"right",visibility:E==D.length-1?"":"hidden"}}))))})))}}]),o}(n.Component);ve.a=u},"8EBN":function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){"use strict";ie.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 G=0;G<ie.modeInfo.length;G++){var P=ie.modeInfo[G];P.mimes&&(P.mime=P.mimes[0])}ie.findModeByMIME=function(V){V=V.toLowerCase();for(var k=0;k<ie.modeInfo.length;k++){var B=ie.modeInfo[k];if(B.mime==V)return B;if(B.mimes){for(var z=0;z<B.mimes.length;z++)if(B.mimes[z]==V)return B}}if(/\+xml$/.test(V))return ie.findModeByMIME("application/xml");if(/\+json$/.test(V))return ie.findModeByMIME("application/json")},ie.findModeByExtension=function(V){V=V.toLowerCase();for(var k=0;k<ie.modeInfo.length;k++){var B=ie.modeInfo[k];if(B.ext){for(var z=0;z<B.ext.length;z++)if(B.ext[z]==V)return B}}},ie.findModeByFileName=function(V){for(var k=0;k<ie.modeInfo.length;k++){var B=ie.modeInfo[k];if(B.file&&B.file.test(V))return B}var z=V.lastIndexOf("."),K=z>-1&&V.substring(z+1,V.length);if(K)return ie.findModeByExtension(K)},ie.findModeByName=function(V){V=V.toLowerCase();for(var k=0;k<ie.modeInfo.length;k++){var B=ie.modeInfo[k];if(B.name.toLowerCase()==V)return B;if(B.alias){for(var z=0;z<B.alias.length;z++)if(B.alias[z].toLowerCase()==V)return B}}}})},"8HAY":function(it,ve,W){"use strict";W.d(ve,"a",function(){return k}),W.d(ve,"b",function(){return B}),W.d(ve,"d",function(){return z}),W.d(ve,"e",function(){return K}),W.d(ve,"c",function(){return n});var ie=W("MI8n"),G=W("pmY6"),P=W("3/fG"),V=function(M,y,m,g){function u(c){return c instanceof m?c:new m(function(f){f(c)})}return new(m||(m=Promise))(function(c,f){function o(a){try{s(g.next(a))}catch(O){f(O)}}function l(a){try{s(g.throw(a))}catch(O){f(O)}}function s(a){a.done?c(a.value):u(a.value).then(o,l)}s((g=g.apply(M,y||[])).next())})};class k extends G.a{constructor(M,y="",m="",g=!0,u){super();this._onDidChange=this._register(new ie.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=M,this._label=y,this._cssClass=m,this._enabled=g,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(M){this._setLabel(M)}_setLabel(M){this._label!==M&&(this._label=M,this._onDidChange.fire({label:M}))}get tooltip(){return this._tooltip||""}set tooltip(M){this._setTooltip(M)}_setTooltip(M){this._tooltip!==M&&(this._tooltip=M,this._onDidChange.fire({tooltip:M}))}get class(){return this._cssClass}set class(M){this._setClass(M)}_setClass(M){this._cssClass!==M&&(this._cssClass=M,this._onDidChange.fire({class:M}))}get enabled(){return this._enabled}set enabled(M){this._setEnabled(M)}_setEnabled(M){this._enabled!==M&&(this._enabled=M,this._onDidChange.fire({enabled:M}))}get checked(){return this._checked}set checked(M){this._setChecked(M)}_setChecked(M){this._checked!==M&&(this._checked=M,this._onDidChange.fire({checked:M}))}run(M,y){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(M))})}}class B extends G.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new ie.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new ie.b),this.onDidRun=this._onDidRun.event}run(M,y){return V(this,void 0,void 0,function*(){if(!M.enabled)return;this._onBeforeRun.fire({action:M});let m;try{yield this.runAction(M,y)}catch(g){m=g}this._onDidRun.fire({action:M,error:m})})}runAction(M,y){return V(this,void 0,void 0,function*(){yield M.run(y)})}}class z extends k{constructor(M){super(z.ID,M,M?"separator text":"separator");this.checked=!1,this.enabled=!1}}z.ID="vs.actions.separator";class K{constructor(M,y,m,g){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=M,this.label=y,this.class=g,this._actions=m}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class n extends k{constructor(){super(n.ID,P.a("submenu.empty","(empty)"),void 0,!1)}}n.ID="vs.actions.empty"},"8WcF":function(it,ve,W){it.exports={flex_box_center:"flex_box_center___2fahw",flex_space_between:"flex_space_between___1h4HM",flex_box_vertical_center:"flex_box_vertical_center___2kxeE",flex_box_center_end:"flex_box_center_end___OjPB4",flex_box_column:"flex_box_column___3zY1h",orderWrap:"orderWrap___VQuq1",orderIconWrap:"orderIconWrap___18q7W",orderAsc:"orderAsc___3WBGg",orderDesc:"orderDesc____ipxK",active:"active___3EMfI",cursorPointer:"cursorPointer___3og_L",orderTextWrap:"orderTextWrap___XQlmv"}},"8hTe":function(it,ve,W){it.exports={button:"button___1wy9m"}},"8mKB":function(it,ve,W){"use strict";var ie=W("rePB"),G=W("1OyB"),P=W("vuIU"),V=W("Ji7U"),k=W("md7G"),B=W("foSv"),z=W("q1tI"),K=W.n(z),n=W("m+aA"),M=W("TSYQ"),y=W.n(M),m=W("4IlW");function g(T){var x=T.pageXOffset,d="scrollLeft";if(typeof x!="number"){var E=T.document;x=E.documentElement[d],typeof x!="number"&&(x=E.body[d])}return x}function u(T){var x,d,E=T.ownerDocument,p=E.body,v=E&&E.documentElement,C=T.getBoundingClientRect();return x=C.left,d=C.top,x-=v.clientLeft||p.clientLeft||0,d-=v.clientTop||p.clientTop||0,{left:x,top:d}}function c(T){var x=u(T),d=T.ownerDocument,E=d.defaultView||d.parentWindow;return x.left+=g(E),x.left}function f(T){var x=o();return function(){var E=Object(B.a)(T),p;if(x){var v=Object(B.a)(this).constructor;p=Reflect.construct(E,arguments,v)}else p=E.apply(this,arguments);return Object(k.a)(this,p)}}function o(){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(T){return!1}}var l=function(T){Object(V.a)(d,T);var x=f(d);function d(){var E;return Object(G.a)(this,d),E=x.apply(this,arguments),E.onHover=function(p){var v=E.props,C=v.onHover,F=v.index;C(p,F)},E.onClick=function(p){var v=E.props,C=v.onClick,F=v.index;C(p,F)},E.onKeyDown=function(p){var v=E.props,C=v.onClick,F=v.index;p.keyCode===13&&C(p,F)},E}return Object(P.a)(d,[{key:"getClassName",value:function(){var p=this.props,v=p.prefixCls,C=p.index,F=p.value,R=p.allowHalf,j=p.focused,U=C+1,b=v;return F===0&&C===0&&j?b+=" ".concat(v,"-focused"):R&&F+.5>=U&&F<U?(b+=" ".concat(v,"-half ").concat(v,"-active"),j&&(b+=" ".concat(v,"-focused"))):(b+=U<=F?" ".concat(v,"-full"):" ".concat(v,"-zero"),U===F&&j&&(b+=" ".concat(v,"-focused"))),b}},{key:"render",value:function(){var p=this.onHover,v=this.onClick,C=this.onKeyDown,F=this.props,R=F.disabled,j=F.prefixCls,U=F.character,b=F.characterRender,Q=F.index,ee=F.count,oe=F.value,fe=typeof U=="function"?U(this.props):U,Fe=K.a.createElement("li",{className:this.getClassName()},K.a.createElement("div",{onClick:R?null:v,onKeyDown:R?null:C,onMouseMove:R?null:p,role:"radio","aria-checked":oe>Q?"true":"false","aria-posinset":Q+1,"aria-setsize":ee,tabIndex:R?-1:0},K.a.createElement("div",{className:"".concat(j,"-first")},fe),K.a.createElement("div",{className:"".concat(j,"-second")},fe)));return b&&(Fe=b(Fe,this.props)),Fe}}]),d}(K.a.Component);function s(T,x){var d=Object.keys(T);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(T);x&&(E=E.filter(function(p){return Object.getOwnPropertyDescriptor(T,p).enumerable})),d.push.apply(d,E)}return d}function a(T){for(var x=1;x<arguments.length;x++){var d=arguments[x]!=null?arguments[x]:{};x%2?s(Object(d),!0).forEach(function(E){Object(ie.a)(T,E,d[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(E){Object.defineProperty(T,E,Object.getOwnPropertyDescriptor(d,E))})}return T}function O(T){var x=w();return function(){var E=Object(B.a)(T),p;if(x){var v=Object(B.a)(this).constructor;p=Reflect.construct(E,arguments,v)}else p=E.apply(this,arguments);return Object(k.a)(this,p)}}function w(){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(T){return!1}}function S(){}var L=function(T){Object(V.a)(d,T);var x=O(d);function d(E){var p;Object(G.a)(this,d),p=x.call(this,E),p.onHover=function(C,F){var R=p.props.onHoverChange,j=p.getStarValue(F,C.pageX),U=p.state.cleanedValue;j!==U&&p.setState({hoverValue:j,cleanedValue:null}),R(j)},p.onMouseLeave=function(){var C=p.props.onHoverChange;p.setState({hoverValue:void 0,cleanedValue:null}),C(void 0)},p.onClick=function(C,F){var R=p.props.allowClear,j=p.state.value,U=p.getStarValue(F,C.pageX),b=!1;R&&(b=U===j),p.onMouseLeave(),p.changeValue(b?0:U),p.setState({cleanedValue:b?U:null})},p.onFocus=function(){var C=p.props.onFocus;p.setState({focused:!0}),C&&C()},p.onBlur=function(){var C=p.props.onBlur;p.setState({focused:!1}),C&&C()},p.onKeyDown=function(C){var F=C.keyCode,R=p.props,j=R.count,U=R.allowHalf,b=R.onKeyDown,Q=R.direction,ee=Q==="rtl",oe=p.state.value;F===m.a.RIGHT&&oe<j&&!ee?(U?oe+=.5:oe+=1,p.changeValue(oe),C.preventDefault()):F===m.a.LEFT&&oe>0&&!ee||F===m.a.RIGHT&&oe>0&&ee?(U?oe-=.5:oe-=1,p.changeValue(oe),C.preventDefault()):F===m.a.LEFT&&oe<j&&ee&&(U?oe+=.5:oe+=1,p.changeValue(oe),C.preventDefault()),b&&b(C)},p.saveRef=function(C){return function(F){p.stars[C]=F}},p.saveRate=function(C){p.rate=C};var v=E.value;return v===void 0&&(v=E.defaultValue),p.stars={},p.state={value:v,focused:!1,cleanedValue:null},p}return Object(P.a)(d,[{key:"componentDidMount",value:function(){var p=this.props,v=p.autoFocus,C=p.disabled;v&&!C&&this.focus()}},{key:"getStarDOM",value:function(p){return Object(n.a)(this.stars[p])}},{key:"getStarValue",value:function(p,v){var C=this.props,F=C.allowHalf,R=C.direction,j=R==="rtl",U=p+1;if(F){var b=this.getStarDOM(p),Q=c(b),ee=b.clientWidth;(j&&v-Q>ee/2||!j&&v-Q<ee/2)&&(U-=.5)}return U}},{key:"focus",value:function(){var p=this.props.disabled;p||this.rate.focus()}},{key:"blur",value:function(){var p=this.props.disabled;p||this.rate.blur()}},{key:"changeValue",value:function(p){var v=this.props.onChange;"value"in this.props||this.setState({value:p}),v(p)}},{key:"render",value:function(){for(var p=this.props,v=p.count,C=p.allowHalf,F=p.style,R=p.prefixCls,j=p.disabled,U=p.className,b=p.character,Q=p.characterRender,ee=p.tabIndex,oe=p.direction,fe=this.state,Fe=fe.value,Le=fe.hoverValue,Ie=fe.focused,Be=[],We=j?"".concat(R,"-disabled"):"",ge=0;ge<v;ge+=1)Be.push(K.a.createElement(l,{ref:this.saveRef(ge),index:ge,count:v,disabled:j,prefixCls:"".concat(R,"-star"),allowHalf:C,value:Le===void 0?Fe:Le,onClick:this.onClick,onHover:this.onHover,key:ge,character:b,characterRender:Q,focused:Ie}));var ue=y()(R,We,U,Object(ie.a)({},"".concat(R,"-rtl"),oe==="rtl"));return K.a.createElement("ul",{className:ue,style:F,onMouseLeave:j?null:this.onMouseLeave,tabIndex:j?-1:ee,onFocus:j?null:this.onFocus,onBlur:j?null:this.onBlur,onKeyDown:j?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Be)}}],[{key:"getDerivedStateFromProps",value:function(p,v){return"value"in p&&p.value!==void 0?a(a({},v),{},{value:p.value}):v}}]),d}(K.a.Component);L.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:S,character:"\u2605",onHoverChange:S,tabIndex:0,direction:"ltr"};var D=L,A=ve.a=D},"9Bee":function(it,ve,W){"use strict";var ie=W("DYRE"),G=W("zeV3"),P=W("+L6B"),V=W("2/Rp"),k=W("k1fw"),B=W("9og8"),z=W("tJVT"),K=W("WmNS"),n=W.n(K),M=W("q1tI"),y=W.n(M),m=W("vg9a"),g=W("DlQD"),u=W.n(g),c=W("rUJ1");function f(Y,_){var I=Y.match(/^(\s+)(?:```)/);if(I===null)return _;var H=I[1];return _.split(`
|
|
`).map(function(q){var X=q.match(/^\s+/);if(X===null)return q;var le=Object(z.a)(X,1),Ve=le[0];return Ve.length>=H.length?q.slice(H.length):q}).join(`
|
|
`)}var o=[],l=["<ul>"],s=new u.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function O(){o.length=0,l=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(Y,_,I,H){if(_>=Y.length||Y[_].level<=I)return _;var q=Y[_];H.push("<li><a href='#"+q.anchor+"'>"+q.text+"</a>"),_++;var X=[];return _=S(Y,_,q.level,X),X.length>0&&(H.push("<ul>"),X.forEach(function(le){H.push(le)}),H.push("</ul>")),H.push("</li>"),_=S(Y,_,I,H),_}function L(){return S(o,0,0,l),l.push("</ul>"),l.join("")}var D={heading:function(_){var I=a.exec(_);if(I)return{type:"heading",raw:I[0],depth:I[1].length,text:I[2]}},fences:function(_){var I=this.rules.block.fences.exec(_);if(I){var H=I[0],q=f(H,I[3]||""),X=I[2]?I[2].trim():I[2];if(["latex","katex","math"].indexOf(X)>=0){var le=x(),Ve=q;q=le,d[le]={type:"block",expression:Ve}}return{type:"code",raw:H,lang:X,text:q}}}},A=/(?:\${2})([^\n`]+?)(?:\${2})/gi,T=0,x=function(){return"__special_katext_id_".concat(T++,"__")},d={};function E(){return d}function p(){T=0,d={}}function v(Y){return Y=Y.replace(A,function(_,I){var H=x();return d[H]={type:"inline",expression:I},H}),Y}var C=s.listitem;s.listitem=function(Y){return C(v(Y))};var F=s.paragraph;s.paragraph=function(Y){return F(v(Y))};var R=s.tablecell;s.tablecell=function(Y,_){return R(v(Y),_)},s.code=function(Y,_,I){var H=(_||"").match(/\S*/)[0];return H?["latex","katex","math"].indexOf(H)>=0?"<p class='editormd-tex'>".concat(Y,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(_,'">').concat(I?Y:Object(c.escape)(Y,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(I?Y:Object(c.escape)(Y,!0))+"</code></pre>"},s.heading=function(Y,_,I){var H=this.options.headerPrefix+I.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:H,level:_,text:Y}),"<h"+_+' id="'+H+'">'+Y+"</h"+_+">"},u.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),u.a.use({tokenizer:D,renderer:s});var j=u.a,U=W("SJMd"),b=W("ulZh"),Q=W.n(b),ee=W("m3rI"),oe=W("Oy/b"),fe=W("p5ED"),Fe=W("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 Le=function(Y,_){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,H){I.__proto__=H}||function(I,H){for(var q in H)Object.prototype.hasOwnProperty.call(H,q)&&(I[q]=H[q])})(Y,_)};function Ie(Y,_){function I(){this.constructor=Y}Le(Y,_),Y.prototype=_===null?Object.create(_):(I.prototype=_.prototype,new I)}function Be(Y,_,I,H){return new(I||(I=Promise))(function(q,X){function le(Lt){try{Ze(H.next(Lt))}catch(Xe){X(Xe)}}function Ve(Lt){try{Ze(H.throw(Lt))}catch(Xe){X(Xe)}}function Ze(Lt){var Xe;Lt.done?q(Lt.value):(Xe=Lt.value,Xe instanceof I?Xe:new I(function(bt){bt(Xe)})).then(le,Ve)}Ze((H=H.apply(Y,_||[])).next())})}function We(Y,_){var I,H,q,X,le={label:0,sent:function(){if(1&q[0])throw q[1];return q[1]},trys:[],ops:[]};return X={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(X[Symbol.iterator]=function(){return this}),X;function Ve(Ze){return function(Lt){return function(Xe){if(I)throw new TypeError("Generator is already executing.");for(;le;)try{if(I=1,H&&(q=2&Xe[0]?H.return:Xe[0]?H.throw||((q=H.return)&&q.call(H),0):H.next)&&!(q=q.call(H,Xe[1])).done)return q;switch(H=0,q&&(Xe=[2&Xe[0],q.value]),Xe[0]){case 0:case 1:q=Xe;break;case 4:return le.label++,{value:Xe[1],done:!1};case 5:le.label++,H=Xe[1],Xe=[0];continue;case 7:Xe=le.ops.pop(),le.trys.pop();continue;default:if(!(q=le.trys,(q=q.length>0&&q[q.length-1])||Xe[0]!==6&&Xe[0]!==2)){le=0;continue}if(Xe[0]===3&&(!q||Xe[1]>q[0]&&Xe[1]<q[3])){le.label=Xe[1];break}if(Xe[0]===6&&le.label<q[1]){le.label=q[1],q=Xe;break}if(q&&le.label<q[2]){le.label=q[2],le.ops.push(Xe);break}q[2]&&le.ops.pop(),le.trys.pop();continue}Xe=_.call(Y,le)}catch(bt){Xe=[6,bt],H=0}finally{I=q=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Ze,Lt])}}}function ge(){for(var Y=0,_=0,I=arguments.length;_<I;_++)Y+=arguments[_].length;var H=Array(Y),q=0;for(_=0;_<I;_++)for(var X=arguments[_],le=0,Ve=X.length;le<Ve;le++,q++)H[q]=X[le];return H}var ue=function(){function Y(){}return Y.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Y.setAttributes=function(_,I){for(var H=0,q=I;H<q.length;H++){var X=q[H],le=X[0],Ve=X[1];_.setAttribute(le,Ve)}},Y.createRect=function(_,I,H){var q=document.createElementNS("http://www.w3.org/2000/svg","rect");return q.setAttribute("width",_.toString()),q.setAttribute("height",I.toString()),H&&Y.setAttributes(q,H),q},Y.createLine=function(_,I,H,q,X){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",_.toString()),le.setAttribute("y1",I.toString()),le.setAttribute("x2",H.toString()),le.setAttribute("y2",q.toString()),X&&Y.setAttributes(le,X),le},Y.createPolygon=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",_),I&&Y.setAttributes(H,I),H},Y.createCircle=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(_/2).toString()),H.setAttribute("cy",(_/2).toString()),H.setAttribute("r",_.toString()),I&&Y.setAttributes(H,I),H},Y.createEllipse=function(_,I,H){var q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return q.setAttribute("cx",(_/2).toString()),q.setAttribute("cy",(I/2).toString()),q.setAttribute("rx",(_/2).toString()),q.setAttribute("ry",(I/2).toString()),H&&Y.setAttributes(q,H),q},Y.createGroup=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","g");return _&&Y.setAttributes(I,_),I},Y.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Y.createMarker=function(_,I,H,q,X,le,Ve){var Ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return Y.setAttributes(Ze,[["id",_],["orient",I],["markerWidth",H.toString()],["markerHeight",q.toString()],["refX",X.toString()],["refY",le.toString()]]),Ze.appendChild(Ve),Ze},Y.createText=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","text");return I.setAttribute("x","0"),I.setAttribute("y","0"),_&&Y.setAttributes(I,_),I},Y.createTSpan=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=_,I&&Y.setAttributes(H,I),H},Y.createImage=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","image");return _&&Y.setAttributes(I,_),I},Y.createPoint=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=_,H.y=I,H},Y.createPath=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",_),I&&Y.setAttributes(H,I),H},Y}(),ke=function(){function Y(){}return Y.addKey=function(_){Y.key=_},Object.defineProperty(Y,"isLicensed",{get:function(){return!!Y.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Y.key)},enumerable:!1,configurable:!0}),Y}(),lt=function(){function Y(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Y.prototype.rasterize=function(_,I,H){var q=this;return new Promise(function(X){var le=H!==void 0?H:document.createElement("canvas");_===null&&(q.markersOnly=!0,q.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",I.width.baseVal.valueAsString),Ve.setAttribute("height",I.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+I.viewBox.baseVal.width.toString()+" "+I.viewBox.baseVal.height.toString()),Ve.innerHTML=I.innerHTML,q.naturalSize===!0?(Ve.width.baseVal.value=_.naturalWidth,Ve.height.baseVal.value=_.naturalHeight):q.width!==void 0&&q.height!==void 0&&(Ve.width.baseVal.value=q.width,Ve.height.baseVal.value=q.height),le.width=Ve.width.baseVal.value,le.height=Ve.height.baseVal.value;var Ze=Ve.outerHTML,Lt=le.getContext("2d");q.markersOnly!==!0&&Lt.drawImage(_,0,0,le.width,le.height);var Xe=window.URL,bt=new Image(le.width,le.height);bt.setAttribute("crossOrigin","anonymous");var Zt=new Blob([Ze],{type:"image/svg+xml"}),Wn=Xe.createObjectURL(Zt);bt.onload=function(){Lt.drawImage(bt,0,0),Xe.revokeObjectURL(Wn);var qn=le.toDataURL(q.imageType,q.imageQuality);X(qn)},bt.src=Wn})},Y}(),ot=function(){},ut=function(){function Y(_){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+_+"_"}return Object.defineProperty(Y.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Y.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(Y.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Y.prototype.addClass=function(_){return this.styleSheet===void 0&&this.addStyleSheet(),_.name=""+this.classNamePrefix+_.localName,this.classes.push(_),this.styleSheet.sheet.insertRule("."+_.name+" {"+_.style+"}",this.styleSheet.sheet.cssRules.length),_},Y.prototype.addRule=function(_){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(_),this.styleSheet.sheet.insertRule(_.selector+" {"+_.style+"}",this.styleSheet.sheet.cssRules.length)},Y.prototype.addStyleSheet=function(){var _;this.styleSheet=document.createElement("style"),((_=this.styleSheetRoot)!==null&&_!==void 0?_:document.head).appendChild(this.styleSheet),this.addRule(new xt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new xt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new xt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Je("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Je("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Y.prototype.removeStyleSheet=function(){var _;this.styleSheet&&(((_=this.styleSheetRoot)!==null&&_!==void 0?_:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Y}(),xt=function(Y,_){this.selector=Y,this.style=_},Je=function(Y,_){this.localName=Y,this.style=_},et=function(){function Y(_,I,H,q,X){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=_,this.displayMode=I,this.markerItems=H,this.uiStyleSettings=q,this.styles=X,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Y.prototype.show=function(_){var I=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=_,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var H=document.createElement("div");H.className=this.toolbarBlockStyleClass.name,H.style.whiteSpace="nowrap",this.uiContainer.appendChild(H),this.addActionButton(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(H,'<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(X){var le=document.createElement("div");le.className=""+I.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",X.typeName),le.innerHTML=X.icon,le.addEventListener("click",function(){I.markerToolbarButtonClicked(le,X)}),I.buttons.push(le),I.markerButtons.push(le)}),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 q=document.createElement("div");q.className=this.toolbarBlockStyleClass.name,q.style.whiteSpace="nowrap",q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(q),this.addActionButton(q,'<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(q,'<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()},Y.prototype.addButtonClickListener=function(_){this.buttonClickListeners.push(_)},Y.prototype.removeButtonClickListener=function(_){this.buttonClickListeners.indexOf(_)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(_),1)},Y.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Y.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var _=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var I=0;I<this.markerButtons.length;I++)I<_||I===_&&this.markerButtons.length-1===_?this.markerButtonBlock.appendChild(this.markerButtons[I]):(I===_&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[I]))}},Y.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")},Y.prototype.resetButtonStyles=function(){var _=this;this.buttons.forEach(function(I){I.className=I.className.replace(_.uiStyleSettings.toolbarButtonStyleColorsClassName?_.uiStyleSettings.toolbarButtonStyleColorsClassName:_.toolbarButtonStyleColorsClass.name,"").trim(),I.className=I.className.replace(_.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?_.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:_.toolbarActiveButtonStyleColorsClass.name,"").trim(),I.className+=" "+(_.uiStyleSettings.toolbarButtonStyleColorsClassName?_.uiStyleSettings.toolbarButtonStyleColorsClassName:_.toolbarButtonStyleColorsClass.name)})},Y.prototype.addActionButton=function(_,I,H){var q=this,X=document.createElement("div");switch(X.className=""+this.toolbarButtonStyleClass.name,X.innerHTML=I,X.setAttribute("data-action",H),X.addEventListener("click",function(){q.actionToolbarButtonClicked(X,H)}),H){case"select":X.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":X.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":X.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":X.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":X.style.fill=this.uiStyleSettings.closeButtonColor}_.appendChild(X),this.buttons.push(X)},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Je("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 Je("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Je("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Je("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 Je("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var _=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Je("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*_)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*_)+`px;
|
|
padding: `+_+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Je("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Je("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new xt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new xt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Y.prototype.markerToolbarButtonClicked=function(_,I){this.setActiveButton(_),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("marker",I)}),this.markerButtonOverflowBlock.style.display="none"},Y.prototype.actionToolbarButtonClicked=function(_,I){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("action",I)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Y.prototype.setActiveButton=function(_){this.resetButtonStyles(),_.className=_.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),_.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Y.prototype.setActiveMarkerButton=function(_){var I=this.markerButtons.find(function(H){return H.getAttribute("data-type-name")===_});I&&this.setActiveButton(I)},Y.prototype.setCurrentMarker=function(_){var I=this;this.currentMarker=_,this.buttons.filter(function(H){return/delete|notes/.test(H.getAttribute("data-action"))}).forEach(function(H){I.currentMarker===void 0?(H.style.fillOpacity="0.4",H.style.pointerEvents="none"):(H.style.fillOpacity="1",H.style.pointerEvents="all")})},Y}(),dt=function(){function Y(_,I,H,q){this.panels=[],this.panelButtons=[],this.markerjsContainer=_,this.displayMode=I,this.uiStyleSettings=H,this.styles=q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Y.prototype.addStyles=function(){var _;this.toolboxStyleClass=this.styles.addClass(new Je("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 Je("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var I=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Je("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Je("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Je("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 Je("toolbox-panel-row_colors",`
|
|
background-color: `+((_=this.uiStyleSettings.toolboxBackgroundColor)!==null&&_!==void 0?_:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Je("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
|
|
padding: `+I+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Je("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Je("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new xt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new xt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Y.prototype.show=function(_){var I;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=_,this.uiContainer.className=this.toolboxStyleClass.name+" "+((I=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&I!==void 0?I:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Y.prototype.setPanelButtons=function(_){var I,H,q=this;this.panels=_,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((I=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&I!==void 0?I:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((H=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&H!==void 0?H:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(X){var le;X.uiStyleSettings=q.uiStyleSettings;var Ve=document.createElement("div");Ve.className=q.toolboxButtonStyleClass.name+" "+((le=q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:q.toolboxButtonStyleColorsClass.name),Ve.innerHTML=X.icon,Ve.title=X.title,Ve.addEventListener("click",function(){q.panelButtonClick(X)}),q.panelButtons.push(Ve),q.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Y.prototype.panelButtonClick=function(_){var I=this,H=-1;if(_!==this.activePanel){H=this.panels.indexOf(_),this.panelRow.innerHTML="";var q=_.getUi();q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(q),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=_}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){I.displayMode==="inline"?I.panelRow.style.display="none":I.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(X,le){var Ve,Ze;X.className=I.toolboxButtonStyleClass.name+" "+(le===H?""+((Ve=I.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:I.toolboxActiveButtonStyleColorsClass.name):""+((Ze=I.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:I.toolboxButtonStyleColorsClass.name))})},Y}(),de=function(Y,_){this.title=Y,this.icon=_},Ce=function(Y){function _(I,H,q,X){var le=Y.call(this,I,X||'<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 le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=H,le.currentColor=q,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.whiteSpace="nowrap",this.colors.forEach(function(q){var X=I.getColorBox(q);H.appendChild(X),I.colorBoxes.push(X)}),H},_.prototype.getColorBox=function(I){var H=this,q=this.uiStyleSettings.toolbarHeight/4,X=this.uiStyleSettings.toolbarHeight-q,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=X-2+"px",le.style.height=X-2+"px",le.style.padding="1px",le.style.marginRight="2px",le.style.marginBottom="2px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderRadius=(X+2)/2+"px",le.style.borderColor=I===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){H.setCurrentColor(I,le)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=X-2+"px",Ve.style.height=X-2+"px",Ve.style.backgroundColor=I,Ve.style.borderRadius=X/2+"px",I==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.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>`),le.appendChild(Ve),le},_.prototype.setCurrentColor=function(I,H){var q=this;this.currentColor=I,this.colorBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(I)},_}(de),Ue=function(){function Y(_,I,H){this._state="new",this._isSelected=!1,this._container=_,this._overlayContainer=I,this.globalSettings=H,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Y.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Y.prototype.ownsTarget=function(_){return!1},Object.defineProperty(Y.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Y.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Y.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Y.prototype.pointerDown=function(_,I){},Y.prototype.dblClick=function(_,I){},Y.prototype.manipulate=function(_){},Y.prototype.pointerUp=function(_){this.stateChanged()},Y.prototype.dispose=function(){},Y.prototype.addMarkerVisualToContainer=function(_){this.container.childNodes.length>0?this.container.insertBefore(_,this.container.childNodes[0]):this.container.appendChild(_)},Y.prototype.getState=function(){return{typeName:Y.typeName,state:this.state,notes:this.notes}},Y.prototype.restoreState=function(_){this._state=_.state,this.notes=_.notes},Y.prototype.scale=function(_,I){},Y.prototype.colorChanged=function(_){this.onColorChanged&&this.onColorChanged(_),this.stateChanged()},Y.prototype.fillColorChanged=function(_){this.onFillColorChanged&&this.onFillColorChanged(_),this.stateChanged()},Y.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var _=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),_.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(_)&&this.onStateChanged(this)}},Y.typeName="MarkerBase",Y}(),Ke=function(){function Y(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Y.prototype.findGripByVisual=function(_){return this.topLeft.ownsTarget(_)?this.topLeft:this.topCenter.ownsTarget(_)?this.topCenter:this.topRight.ownsTarget(_)?this.topRight:this.centerLeft.ownsTarget(_)?this.centerLeft:this.centerRight.ownsTarget(_)?this.centerRight:this.bottomLeft.ownsTarget(_)?this.bottomLeft:this.bottomCenter.ownsTarget(_)?this.bottomCenter:this.bottomRight.ownsTarget(_)?this.bottomRight:void 0},Y}(),st=function(){function Y(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(_){return _===this.visual||_===this.visual.childNodes[0]||_===this.visual.childNodes[1]},Y}(),ht=function(){function Y(){}return Y.toITransformMatrix=function(_){return{a:_.a,b:_.b,c:_.c,d:_.d,e:_.e,f:_.f}},Y.toSVGMatrix=function(_,I){return _.a=I.a,_.b=I.b,_.c=I.c,_.d=I.d,_.e=I.e,_.f=I.f,_},Y}(),yt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.left=0,X.top=0,X.width=0,X.height=0,X.defaultSize={x:50,y:20},X.offsetX=0,X.offsetY=0,X.rotationAngle=0,X.CB_DISTANCE=10,X._suppressMarkerCreateEvent=!1,X.container.transform.baseVal.appendItem(ue.createTransform()),X.setupControlBox(),X}return Ie(_,Y),Object.defineProperty(_.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"visual",{get:function(){return this._visual},set:function(I){this._visual=I;var H=ue.createTransform();this._visual.transform.baseVal.appendItem(H)},enumerable:!1,configurable:!0}),_.prototype.ownsTarget=function(I){return!!Y.prototype.ownsTarget.call(this,I)||!!(this.controlGrips.findGripByVisual(I)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(I))},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.left=I.x,this.top=I.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var q=this.unrotatePoint(I);if(this.manipulationStartX=q.x,this.manipulationStartY=q.y,this.offsetX=q.x-this.left,this.offsetY=q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(H),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(H)){this.activeGrip=this.rotatorGrip;var X=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=X.x-this.width/2,this.top=X.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},_.prototype.pointerUp=function(I){var H=this.state;Y.prototype.pointerUp.call(this,I),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(I),this._state="select",H==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},_.prototype.moveVisual=function(I){this.visual.style.transform="translate("+I.x+"px, "+I.y+"px)"},_.prototype.manipulate=function(I){var H=this.unrotatePoint(I);this.state==="creating"?this.resize(I):this.state==="move"?(this.left=this.manipulationStartLeft+(H.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(H.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(H):this.state==="rotate"&&this.rotate(I)},_.prototype.resize=function(I){var H=this.manipulationStartLeft,q=this.manipulationStartWidth,X=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:H=this.manipulationStartLeft+I.x-this.manipulationStartX,q=this.manipulationStartWidth+this.manipulationStartLeft-H;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:q=this.manipulationStartWidth+I.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:X=this.manipulationStartTop+I.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-X;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+I.y-this.manipulationStartY}q>=0?(this.left=H,this.width=q):(this.left=H+q,this.width=-q),le>=0?(this.top=X,this.height=le):(this.top=X+le,this.height=-le),this.setSize()},_.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},_.prototype.rotate=function(I){if(Math.abs(I.x-this.centerX)>.1){var H=Math.sign(I.x-this.centerX);this.rotationAngle=180*Math.atan((I.y-this.centerY)/(I.x-this.centerX))/Math.PI+90*H,this.applyRotation()}},_.prototype.applyRotation=function(){var I=this.container.transform.baseVal.getItem(0);I.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(I,0)},_.prototype.rotatePoint=function(I){if(this.rotationAngle===0)return I;var H=this.container.getCTM(),q=ue.createPoint(I.x,I.y);return{x:(q=q.matrixTransform(H)).x,y:q.y}},_.prototype.unrotatePoint=function(I){if(this.rotationAngle===0)return I;var H=this.container.getCTM();H=H.inverse();var q=ue.createPoint(I.x,I.y);return{x:(q=q.matrixTransform(H)).x,y:q.y}},_.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},_.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},_.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var I=ue.createTransform();I.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(I),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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"},_.prototype.adjustControlBox=function(){var I=this.controlBox.transform.baseVal.getItem(0);I.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(I,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()},_.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()},_.prototype.createGrip=function(){var I=new st;return I.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(I.visual),I},_.prototype.positionGrips=function(){var I=this.controlGrips.topLeft.GRIP_SIZE,H=-I/2,q=H,X=(this.width+this.CB_DISTANCE)/2-I/2,le=(this.height+this.CB_DISTANCE)/2-I/2,Ve=this.height+this.CB_DISTANCE-I/2,Ze=this.width+this.CB_DISTANCE-I/2;this.positionGrip(this.controlGrips.topLeft.visual,H,q),this.positionGrip(this.controlGrips.topCenter.visual,X,q),this.positionGrip(this.controlGrips.topRight.visual,Ze,q),this.positionGrip(this.controlGrips.centerLeft.visual,H,le),this.positionGrip(this.controlGrips.centerRight.visual,Ze,le),this.positionGrip(this.controlGrips.bottomLeft.visual,H,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,X,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,Ze,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,X,q-3*this.CB_DISTANCE)},_.prototype.positionGrip=function(I,H,q){var X=I.transform.baseVal.getItem(0);X.setTranslate(H,q),I.transform.baseVal.replaceItem(X,0)},_.prototype.hideControlBox=function(){this.controlBox.style.display="none"},_.prototype.showControlBox=function(){this.controlBox.style.display=""},_.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ht.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ht.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Y.prototype.getState.call(this))},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I);var H=I;this.left=H.left,this.top=H.top,this.width=H.width,this.height=H.height,this.rotationAngle=H.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,H.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,H.containerTransformMatrix))},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H);var q=this.rotatePoint({x:this.left,y:this.top}),X=this.unrotatePoint({x:q.x*I,y:q.y*H});this.left=X.x,this.top=X.y,this.width=this.width*I,this.height=this.height*H,this.adjustControlBox()},_}(Ue),mt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.fillColor="transparent",X.strokeColor="transparent",X.strokeWidth=0,X.strokeDasharray="",X.opacity=1,X.setStrokeColor=X.setStrokeColor.bind(X),X.setFillColor=X.setFillColor.bind(X),X.setStrokeWidth=X.setStrokeWidth.bind(X),X.setStrokeDasharray=X.setStrokeDasharray.bind(X),X.createVisual=X.createVisual.bind(X),X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.visual)},_.prototype.createVisual=function(){this.visual=ue.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)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},_.prototype.manipulate=function(I){Y.prototype.manipulate.call(this,I)},_.prototype.resize=function(I){Y.prototype.resize.call(this,I),this.setSize()},_.prototype.setSize=function(){Y.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},_.prototype.pointerUp=function(I){Y.prototype.pointerUp.call(this,I),this.setSize()},_.prototype.setStrokeColor=function(I){this.strokeColor=I,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(I),this.stateChanged()},_.prototype.setFillColor=function(I){this.fillColor=I,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},_.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},_.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},_.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this))},_.prototype.restoreState=function(I){var H=I;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Y.prototype.restoreState.call(this,I),this.setSize()},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.setSize()},_.title="Rectangle marker",_}(yt),Ot=function(Y){function _(I,H,q,X){var le=Y.call(this,I,X||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return le.widths=[],le.widthBoxes=[],le.widths=H,le.currentWidth=q,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.widths.forEach(function(q){var X=document.createElement("div");X.style.display="flex",X.style.flexGrow="2",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.padding="5px",X.style.borderWidth="2px",X.style.borderStyle="solid",X.style.borderColor=q===I.currentWidth?I.uiStyleSettings.toolboxAccentColor:"transparent",X.addEventListener("click",function(){I.setCurrentWidth(q,X)}),H.appendChild(X);var le=document.createElement("div");le.innerText=q.toString(),le.style.marginRight="5px",X.appendChild(le);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var Ze=document.createElement("hr");Ze.style.minWidth="20px",Ze.style.border="0px",Ze.style.borderTop=q+"px solid "+I.uiStyleSettings.toolboxColor,Ze.style.flexGrow="2",Ve.appendChild(Ze),X.appendChild(Ve),I.widthBoxes.push(X)}),H},_.prototype.setCurrentWidth=function(I,H){var q=this;this.currentWidth=I,this.widthBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},_}(de),Tt=function(Y){function _(I,H,q,X){var le=Y.call(this,I,X||'<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 le.styles=[],le.styleBoxes=[],le.styles=H,le.currentStyle=q,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.styles.forEach(function(q){var X=document.createElement("div");X.style.display="flex",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.padding="5px",X.style.borderWidth="2px",X.style.borderStyle="solid",X.style.overflow="hidden",X.style.maxWidth=100/I.styles.length-5+"%",X.style.borderColor=q===I.currentStyle?I.uiStyleSettings.toolboxAccentColor:"transparent",X.addEventListener("click",function(){I.setCurrentStyle(q,X)}),H.appendChild(X);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var Ve=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+I.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(q!==""?'stroke-dasharray="'+q+'"':"")+` />
|
|
</svg>`;le.innerHTML=Ve,X.appendChild(le),I.styleBoxes.push(X)}),H},_.prototype.setCurrentStyle=function(I,H){var q=this;this.currentStyle=I,this.styleBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},_}(de),Et=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.strokeColor=q.defaultColor,X.strokeWidth=q.defaultStrokeWidth,X.strokeDasharray=q.defaultStrokeDasharray,X.strokePanel=new Ce("Line color",q.defaultColorSet,q.defaultColor),X.strokePanel.onColorChanged=X.setStrokeColor,X.strokeWidthPanel=new Ot("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),X.strokeWidthPanel.onWidthChanged=X.setStrokeWidth,X.strokeStylePanel=new Tt("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),X.strokeStylePanel.onStyleChanged=X.setStrokeDasharray,X}return Ie(_,Y),Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Y.prototype.getState.call(this);return I.typeName=_.typeName,I},_.typeName="FrameMarker",_.title="Frame marker",_.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',_}(mt),Qe=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},Kt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.x1=0,X.y1=0,X.x2=0,X.y2=0,X.defaultLength=50,X.manipulationStartX=0,X.manipulationStartY=0,X.manipulationStartX1=0,X.manipulationStartY1=0,X.manipulationStartX2=0,X.manipulationStartY2=0,X.setupControlBox(),X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!!Y.prototype.ownsTarget.call(this,I)||!(!this.grip1.ownsTarget(I)&&!this.grip2.ownsTarget(I))},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.manipulationStartX=I.x,this.manipulationStartY=I.y,this.state==="new"&&(this.x1=I.x,this.y1=I.y,this.x2=I.x,this.y2=I.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(H)?this.activeGrip=this.grip1:this.grip2.ownsTarget(H)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},_.prototype.pointerUp=function(I){var H=this.state;Y.prototype.pointerUp.call(this,I),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(I),this._state="select",H==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},_.prototype.adjustVisual=function(){},_.prototype.manipulate=function(I){this.state==="creating"?this.resize(I):this.state==="move"?(this.x1=this.manipulationStartX1+I.x-this.manipulationStartX,this.y1=this.manipulationStartY1+I.y-this.manipulationStartY,this.x2=this.manipulationStartX2+I.x-this.manipulationStartX,this.y2=this.manipulationStartY2+I.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(I)},_.prototype.resize=function(I){switch(this.activeGrip){case this.grip1:this.x1=I.x,this.y1=I.y;break;case this.grip2:case void 0:this.x2=I.x,this.y2=I.y}this.adjustVisual(),this.adjustControlBox()},_.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},_.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},_.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},_.prototype.adjustControlBox=function(){this.positionGrips()},_.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},_.prototype.createGrip=function(){var I=new st;return I.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(I.visual),I},_.prototype.positionGrips=function(){var I=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-I/2,this.y1-I/2),this.positionGrip(this.grip2.visual,this.x2-I/2,this.y2-I/2)},_.prototype.positionGrip=function(I,H,q){var X=I.transform.baseVal.getItem(0);X.setTranslate(H,q),I.transform.baseVal.replaceItem(X,0)},_.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Y.prototype.getState.call(this))},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I);var H=I;this.x1=H.x1,this.y1=H.y1,this.x2=H.x2,this.y2=H.y2},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.x1=this.x1*I,this.y1=this.y1*H,this.x2=this.x2*I,this.y2=this.y2*H,this.adjustVisual(),this.adjustControlBox()},_}(Ue),Ut=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.strokeColor="transparent",X.strokeWidth=0,X.strokeDasharray="",X.setStrokeColor=X.setStrokeColor.bind(X),X.setStrokeWidth=X.setStrokeWidth.bind(X),X.setStrokeDasharray=X.setStrokeDasharray.bind(X),X.strokeColor=q.defaultColor,X.strokeWidth=q.defaultStrokeWidth,X.strokeDasharray=q.defaultStrokeDasharray,X.strokePanel=new Ce("Line color",q.defaultColorSet,q.defaultColor),X.strokePanel.onColorChanged=X.setStrokeColor,X.strokeWidthPanel=new Ot("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),X.strokeWidthPanel.onWidthChanged=X.setStrokeWidth,X.strokeStylePanel=new Tt("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),X.strokeStylePanel.onStyleChanged=X.setStrokeDasharray,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorLine&&I!==this.visibleLine)},_.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},_.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},_.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},_.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},_.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.createVisual(),this.adjustVisual()},_.typeName="LineMarker",_.title="Line marker",_.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',_}(Kt),qe=function(Y){function _(I,H,q,X){var le=Y.call(this,I,X||'<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 le.fonts=[],le.fontBoxes=[],le.fonts=H,le.currentFont=q,le.setCurrentFont=le.setCurrentFont.bind(le),le}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.flexGrow="2",this.fonts.forEach(function(q){var X=document.createElement("div");X.style.display="inline-block",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.padding="5px",X.style.borderWidth="2px",X.style.borderStyle="solid",X.style.overflow="hidden",X.style.maxWidth=100/I.fonts.length-5+"%",X.style.borderColor=q===I.currentFont?I.uiStyleSettings.toolboxAccentColor:"transparent",X.addEventListener("click",function(){I.setCurrentFont(q,X)}),H.appendChild(X);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=q,le.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(Ve),X.appendChild(le),I.fontBoxes.push(X)}),H},_.prototype.setCurrentFont=function(I,H){var q=this;this.currentFont=I,this.fontBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},_}(de),tt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.color="transparent",X.padding=5,X.DEFAULT_TEXT="your text here",X.text=X.DEFAULT_TEXT,X.isMoved=!1,X.color=q.defaultColor,X.fontFamily=q.defaultFontFamily,X.defaultSize={x:100,y:30},X.setColor=X.setColor.bind(X),X.setFont=X.setFont.bind(X),X.renderText=X.renderText.bind(X),X.sizeText=X.sizeText.bind(X),X.textEditDivClicked=X.textEditDivClicked.bind(X),X.showTextEditor=X.showTextEditor.bind(X),X.setSize=X.setSize.bind(X),X.positionTextEditor=X.positionTextEditor.bind(X),X.colorPanel=new Ce("Color",q.defaultColorSet,q.defaultColor),X.colorPanel.onColorChanged=X.setColor,X.fontFamilyPanel=new qe("Font",q.defaultFontFamilies,q.defaultFontFamily),X.fontFamilyPanel.onFontChanged=X.setFont,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){if(Y.prototype.ownsTarget.call(this,I)||I===this.visual||I===this.textElement||I===this.bgRectangle)return!0;var H=!1;return this.textElement.childNodes.forEach(function(q){q===I&&(H=!0)}),H},_.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.isMoved=!1,this.pointerDownPoint=I,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},_.prototype.renderText=function(){var I=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(H){I.textElement.appendChild(ue.createTSpan(H.trim()===""?" ":H.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},_.prototype.getTextScale=function(){var I=this.textElement.getBBox(),H=1;if(I.width>0&&I.height>0){var q=(1*this.width-this.width*this.padding*2/100)/I.width,X=(1*this.height-this.height*this.padding*2/100)/I.height;H=Math.min(q,X)}return H},_.prototype.getTextPosition=function(I){var H=this.textElement.getBBox(),q=0,X=0;return H.width>0&&H.height>0&&(q=(this.width-H.width*I)/2,X=this.height/2-H.height*I/2),{x:q,y:X}},_.prototype.sizeText=function(){var I=this.textElement.getBBox(),H=this.getTextScale(),q=this.getTextPosition(H);q.y-=I.y*H,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+q.x+"px, "+q.y+"px) scale("+H+", "+H+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(q.x,q.y),this.textElement.transform.baseVal.getItem(1).setScale(H,H))},_.prototype.manipulate=function(I){Y.prototype.manipulate.call(this,I),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(I.x-this.pointerDownPoint.x)>5||Math.abs(I.y-this.pointerDownPoint.y)>5)},_.prototype.resize=function(I){Y.prototype.resize.call(this,I),this.isMoved=!0,this.setSize(),this.sizeText()},_.prototype.setSize=function(){Y.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},_.prototype.pointerUp=function(I){var H=this.state;H==="creating"&&(this._suppressMarkerCreateEvent=!0),Y.prototype.pointerUp.call(this,I),this.setSize(),(H==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},_.prototype.showTextEditor=function(){var I=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(H){H.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var H=Number.parseFloat(I.textEditor.style.fontSize);I.textEditor.clientWidth>=Number.parseInt(I.textEditor.style.maxWidth)&&H>.9;)H-=.1,I.textEditor.style.fontSize=Math.max(H,.9)+"em"}),this.textEditor.addEventListener("keyup",function(H){H.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(H){if(H.clipboardData){var q=H.clipboardData.getData("text"),X=window.getSelection();if(!X.rangeCount)return!1;X.deleteFromDocument(),X.getRangeAt(0).insertNode(document.createTextNode(q)),H.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){I.textEditDivClicked(I.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},_.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var I=this.getTextScale(),H=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),q=this.textElement.getBBox(),X={x:q.width*I,y:q.height*I};H.x-=X.x/2,H.y-=X.y/2,this.textEditor.style.top=H.y+"px",this.textEditor.style.left=H.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-H.x+"px",this.textEditor.style.fontSize=Math.max(16*I,12)+"px",this.textElement.style.display="none"}},_.prototype.textEditDivClicked=function(I){this.text=I.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},_.prototype.select=function(){Y.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},_.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Y.prototype.deselect.call(this)},_.prototype.dblClick=function(I,H){Y.prototype.dblClick.call(this,I,H),this.showTextEditor()},_.prototype.setColor=function(I){this.textElement&&ue.setAttributes(this.textElement,[["fill",I]]),this.color=I,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(I)},_.prototype.setFont=function(I){this.textElement&&ue.setAttributes(this.textElement,[["font-family",I]]),this.fontFamily=I,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},_.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},_.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){var H=I;this.color=H.color,this.fontFamily=H.fontFamily,this.padding=H.padding,this.text=H.text,this.createVisual(),Y.prototype.restoreState.call(this,I),this.setSize()},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.setSize(),this.sizeText(),this.positionTextEditor()},_.typeName="TextMarker",_.title="Text marker",_.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>',_}(yt),Re=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.color="transparent",X.lineWidth=3,X.drawing=!1,X.pixelRatio=1,X.color=q.defaultColor,X.lineWidth=q.defaultStrokeWidth,X.pixelRatio=q.freehandPixelRatio,X.setColor=X.setColor.bind(X),X.addCanvas=X.addCanvas.bind(X),X.finishCreation=X.finishCreation.bind(X),X.setLineWidth=X.setLineWidth.bind(X),X.colorPanel=new Ce("Color",q.defaultColorSet,q.defaultColor),X.colorPanel.onColorChanged=X.setColor,X.lineWidthPanel=new Ot("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),X.lineWidthPanel.onWidthChanged=X.setLineWidth,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.drawingImage)},_.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var I=ue.createTransform();this.visual.transform.baseVal.appendItem(I),this.addMarkerVisualToContainer(this.visual)},_.prototype.pointerDown=function(I,H){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(I.x,I.y),this.drawing=!0):Y.prototype.pointerDown.call(this,I,H)},_.prototype.manipulate=function(I){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(I.x,I.y),this.canvasContext.stroke()):Y.prototype.manipulate.call(this,I)},_.prototype.resize=function(I){Y.prototype.resize.call(this,I),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},_.prototype.pointerUp=function(I){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Y.prototype.pointerUp.call(this,I)},_.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)},_.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.select.call(this)},_.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.deselect.call(this)},_.prototype.finishCreation=function(){for(var I=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),H=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],q=H[0],X=H[1],le=H[2],Ve=H[3],Ze=!1,Lt=0;Lt<this.canvasElement.height;Lt++)for(var Xe=0;Xe<this.canvasElement.width;Xe++)I.data[Lt*this.canvasElement.width*4+4*Xe+3]>0&&(Ze=!0,Lt<X&&(X=Lt),Xe<q&&(q=Xe),Lt>Ve&&(Ve=Lt),Xe>le&&(le=Xe));if(Ze){this.left=q/this.pixelRatio,this.top=X/this.pixelRatio,this.width=(le-q)/this.pixelRatio,this.height=(Ve-X)/this.pixelRatio;var bt=document.createElement("canvas");bt.width=le-q,bt.height=Ve-X,bt.getContext("2d").putImageData(this.canvasContext.getImageData(q,X,le-q,Ve-X),0,0),this.drawingImgUrl=bt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},_.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},_.prototype.setColor=function(I){this.color=I,this.colorChanged(I)},_.prototype.setLineWidth=function(I){this.lineWidth=I},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({drawingImgUrl:this.drawingImgUrl},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){this.createVisual(),Y.prototype.restoreState.call(this,I),this.drawingImgUrl=I.drawingImgUrl,this.setDrawingImage()},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.setDrawingImage()},_.typeName="FreehandMarker",_.title="Freehand marker",_.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>',_}(yt),Te=function(Y){function _(I,H,q){var X=Y.call(this,I,q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return X.typeBoxes=[],X.currentType=H,X.setCurrentType=X.setCurrentType.bind(X),X}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2";for(var q=function(Ve){var Ze="both";switch(Ve){case 0:Ze="both";break;case 1:Ze="start";break;case 2:Ze="end";break;case 3:Ze="none"}var Lt=document.createElement("div");if(Lt.style.display="flex",Lt.style.flexGrow="2",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=Ze===X.currentType?X.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){I.setCurrentType(Ze,Lt)}),H.appendChild(Lt),Ze==="both"||Ze==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.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="`+(X.uiStyleSettings!==void 0?X.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Xe.style.marginLeft="5px",Lt.appendChild(Xe)}var bt=document.createElement("div");bt.style.display="flex",bt.style.alignItems="center",bt.style.minHeight="20px",bt.style.flexGrow="2";var Zt=document.createElement("hr");if(Zt.style.minWidth="20px",Zt.style.border="0px",Zt.style.borderTop="3px solid "+(X.uiStyleSettings!==void 0?X.uiStyleSettings.toolboxColor:"#eeeeee"),Zt.style.flexGrow="2",bt.appendChild(Zt),Lt.appendChild(bt),Ze==="both"||Ze==="end"){var Wn=document.createElement("div");Wn.style.display="flex",Wn.style.alignItems="center",Wn.style.minHeight="20px",Wn.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="`+(X.uiStyleSettings!==void 0?X.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Wn.style.marginRight="5px",Lt.appendChild(Wn)}X.typeBoxes.push(Lt)},X=this,le=0;le<4;le++)q(le);return H},_.prototype.setCurrentType=function(I,H){var q=this;this.currentType=I,this.typeBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},_}(de),Se=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.arrowType="end",X.arrowBaseHeight=10,X.arrowBaseWidth=10,X.getArrowPoints=X.getArrowPoints.bind(X),X.setArrowType=X.setArrowType.bind(X),X.arrowTypePanel=new Te("Arrow type","end"),X.arrowTypePanel.onArrowTypeChanged=X.setArrowType,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.arrow1&&I!==this.arrow2)},_.prototype.getArrowPoints=function(I,H){var q=this.arrowBaseWidth+2*this.strokeWidth,X=this.arrowBaseHeight+2*this.strokeWidth;return I-q/2+","+(H+X/2)+" "+I+","+(H-X/2)+" "+(I+q/2)+","+(H+X/2)},_.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="creating"&&this.createTips()},_.prototype.adjustVisual=function(){if(Y.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.arrow1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(H,0);var q=this.arrow2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(q,0)}},_.prototype.setArrowType=function(I){this.arrowType=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({arrowType:this.arrowType},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I);var H=I;this.arrowType=H.arrowType,this.createTips(),this.adjustVisual()},_.typeName="ArrowMarker",_.title="Arrow marker",_.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',_}(Ut),te=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.fillColor=q.defaultFillColor,X.strokeWidth=0,X.fillPanel=new Ce("Color",q.defaultColorSet,q.defaultFillColor),X.fillPanel.onColorChanged=X.setFillColor,X}return Ie(_,Y),Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Y.prototype.getState.call(this);return I.typeName=_.typeName,I},_.typeName="CoverMarker",_.title="Cover marker",_.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',_}(mt),se=function(Y){function _(I,H,q,X){var le=Y.call(this,I,X||'<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 le.opacities=[],le.opacityBoxes=[],le.opacities=H,le.currentOpacity=q,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return Ie(_,Y),_.prototype.getUi=function(){var I=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",H.style.justifyContent="space-between",this.opacities.forEach(function(q){var X=document.createElement("div");X.style.display="flex",X.style.alignItems="center",X.style.justifyContent="center",X.style.padding="5px",X.style.borderWidth="2px",X.style.borderStyle="solid",X.style.borderColor=q===I.currentOpacity?I.uiStyleSettings.toolboxAccentColor:"transparent",X.addEventListener("click",function(){I.setCurrentOpacity(q,X)}),H.appendChild(X);var le=document.createElement("div");le.innerText=100*q+"%",X.appendChild(le),I.opacityBoxes.push(X)}),H},_.prototype.setCurrentOpacity=function(I,H){var q=this;this.currentOpacity=I,this.opacityBoxes.forEach(function(X){X.style.borderColor=X===H?q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},_}(de),he=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.setOpacity=X.setOpacity.bind(X),X.fillColor=q.defaultHighlightColor,X.strokeWidth=0,X.opacity=q.defaultHighlightOpacity,X.fillPanel=new Ce("Color",q.defaultColorSet,X.fillColor),X.fillPanel.onColorChanged=X.setFillColor,X.opacityPanel=new se("Opacity",q.defaultOpacitySteps,X.opacity),X.opacityPanel.onOpacityChanged=X.setOpacity,X}return Ie(_,Y),_.prototype.setOpacity=function(I){this.opacity=I,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Y.prototype.getState.call(this);return I.typeName=_.typeName,I},_.typeName="HighlightMarker",_.title="Highlight marker",_.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>',_}(te),me='<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>',xe=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.bgColor="transparent",X.tipPosition={x:0,y:0},X.tipBase1Position={x:0,y:0},X.tipBase2Position={x:0,y:0},X.tipMoving=!1,X.color=q.defaultStrokeColor,X.bgColor=q.defaultFillColor,X.fontFamily=q.defaultFontFamily,X.defaultSize={x:100,y:30},X.setBgColor=X.setBgColor.bind(X),X.getTipPoints=X.getTipPoints.bind(X),X.positionTip=X.positionTip.bind(X),X.setTipPoints=X.setTipPoints.bind(X),X.colorPanel=new Ce("Text color",q.defaultColorSet,X.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>'),X.colorPanel.onColorChanged=X.setColor,X.bgColorPanel=new Ce("Fill color",q.defaultColorSet,X.bgColor,me),X.bgColorPanel.onColorChanged=X.setBgColor,X.fontFamilyPanel=new qe("Font",q.defaultFontFamilies,q.defaultFontFamily),X.fontFamilyPanel.onFontChanged=X.setFont,X.tipGrip=new st,X.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),X.controlBox.appendChild(X.tipGrip.visual),X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return Y.prototype.ownsTarget.call(this,I)||this.tipGrip.ownsTarget(I)||this.tip===I},_.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},_.prototype.pointerDown=function(I,H){this.state==="new"&&Y.prototype.pointerDown.call(this,I,H),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(H)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Y.prototype.pointerDown.call(this,I,H)},_.prototype.pointerUp=function(I){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Y.prototype.pointerUp.call(this,I);else{var H=this.state==="creating";Y.prototype.pointerUp.call(this,I),this.setTipPoints(H),this.positionTip()}},_.prototype.manipulate=function(I){if(this.tipMoving){var H=this.unrotatePoint(I);this.tipPosition={x:H.x-this.manipulationStartLeft,y:H.y-this.manipulationStartTop},this.positionTip()}else Y.prototype.manipulate.call(this,I)},_.prototype.setBgColor=function(I){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",I]]),ue.setAttributes(this.tip,[["fill",I]])),this.bgColor=I,this.fillColorChanged(I)},_.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},_.prototype.setTipPoints=function(I){I===void 0&&(I=!1);var H=Math.min(this.height/2,15),q=this.height/5;I&&(this.tipPosition={x:H+q/2,y:this.height+20});var X=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?X<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(q=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:0},this.tipBase2Position={x:H+q,y:0}):(this.tipBase1Position={x:0,y:H},this.tipBase2Position={x:0,y:H+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?X<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(q=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-q,y:0},this.tipBase2Position={x:this.width-H,y:0}):(this.tipBase1Position={x:this.width,y:H},this.tipBase2Position={x:this.width,y:H+q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?X<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(q=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-q,y:this.height},this.tipBase2Position={x:this.width-H,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-H-q},this.tipBase2Position={x:this.width,y:this.height-H}):X<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(q=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:this.height},this.tipBase2Position={x:H+q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-H},this.tipBase2Position={x:0,y:this.height-H-q})},_.prototype.resize=function(I){Y.prototype.resize.call(this,I),this.positionTip()},_.prototype.positionTip=function(){ue.setAttributes(this.tip,[["points",this.getTipPoints()]]);var I=this.tipGrip.visual.transform.baseVal.getItem(0);I.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(I,0)},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),_.prototype.select=function(){this.positionTip(),Y.prototype.select.call(this)},_.prototype.getState=function(){var I=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){var H=I;this.bgColor=H.bgColor,this.tipPosition=H.tipPosition,Y.prototype.restoreState.call(this,I),this.createTip(),this.setTipPoints()},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.tipPosition={x:this.tipPosition.x*I,y:this.tipPosition.y*H},this.positionTip()},_.typeName="CalloutMarker",_.title="Callout marker",_.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>',_}(tt),Me=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.fillColor="transparent",X.strokeColor="transparent",X.strokeWidth=0,X.strokeDasharray="",X.opacity=1,X.strokeColor=q.defaultColor,X.strokeWidth=q.defaultStrokeWidth,X.strokeDasharray=q.defaultStrokeDasharray,X.fillColor=q.defaultFillColor,X.setStrokeColor=X.setStrokeColor.bind(X),X.setFillColor=X.setFillColor.bind(X),X.setStrokeWidth=X.setStrokeWidth.bind(X),X.setStrokeDasharray=X.setStrokeDasharray.bind(X),X.setOpacity=X.setOpacity.bind(X),X.createVisual=X.createVisual.bind(X),X.strokePanel=new Ce("Line color",ge(q.defaultColorSet,["transparent"]),q.defaultColor),X.strokePanel.onColorChanged=X.setStrokeColor,X.fillPanel=new Ce("Fill color",ge(q.defaultColorSet,["transparent"]),X.fillColor,me),X.fillPanel.onColorChanged=X.setFillColor,X.strokeWidthPanel=new Ot("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),X.strokeWidthPanel.onWidthChanged=X.setStrokeWidth,X.strokeStylePanel=new Tt("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),X.strokeStylePanel.onStyleChanged=X.setStrokeDasharray,X.opacityPanel=new se("Opacity",q.defaultOpacitySteps,X.opacity),X.opacityPanel.onOpacityChanged=X.setOpacity,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.visual)},_.prototype.createVisual=function(){this.visual=ue.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)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},_.prototype.manipulate=function(I){Y.prototype.manipulate.call(this,I)},_.prototype.resize=function(I){Y.prototype.resize.call(this,I),this.setSize()},_.prototype.setSize=function(){Y.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},_.prototype.pointerUp=function(I){Y.prototype.pointerUp.call(this,I),this.setSize()},_.prototype.setStrokeColor=function(I){this.strokeColor=I,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(I),this.stateChanged()},_.prototype.setFillColor=function(I){this.fillColor=I,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(I),this.stateChanged()},_.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},_.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},_.prototype.setOpacity=function(I){this.opacity=I,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){var H=I;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Y.prototype.restoreState.call(this,I),this.setSize()},_.prototype.scale=function(I,H){Y.prototype.scale.call(this,I,H),this.setSize()},_.typeName="EllipseMarker",_.title="Ellipse marker",_.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>',_}(yt),Pe=function(Y){function _(I,H,q){return Y.call(this,I,H,q)||this}return Ie(_,Y),Object.defineProperty(_.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.tip1&&I!==this.tip2)},_.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.state==="creating"&&this.createTips()},_.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.tip1.transform.baseVal.getItem(0);H.setRotate(I,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(H,0);var q=this.tip2.transform.baseVal.getItem(0);q.setRotate(I+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(q,0)}},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Y.prototype.getState.call(this);return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I),this.createTips(),this.adjustVisual()},_.typeName="MeasurementMarker",_.title="Measurement marker",_.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>',_}(Ut),rt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.strokePanel.colors=q.defaultColorSet,X.fillColor="transparent",X}return Ie(_,Y),Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Y.prototype.getState.call(this);return I.typeName=_.typeName,I},_.typeName="EllipseFrameMarker",_.title="Ellipse frame marker",_.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>',_}(Me),ft=function(){function Y(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Y.prototype.addUndoStep=function(_){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(_)||(this.undoStack.push(_),JSON.stringify(this.lastRedoStep)!==JSON.stringify(_)&&this.redoStack.splice(0,this.redoStack.length))},Y.prototype.replaceLastUndoStep=function(_){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=_)},Y.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Y.prototype.undo=function(){if(this.undoStack.length>1){var _=this.undoStack.pop();return _!==void 0&&this.redoStack.push(_),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Y.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Y}(),pt=function(Y){function _(I,H,q){var X=Y.call(this,I,H,q)||this;return X.strokeColor="transparent",X.strokeWidth=0,X.strokeDasharray="",X.curveX=0,X.curveY=0,X.manipulationStartCurveX=0,X.manipulationStartCurveY=0,X.setStrokeColor=X.setStrokeColor.bind(X),X.setStrokeWidth=X.setStrokeWidth.bind(X),X.setStrokeDasharray=X.setStrokeDasharray.bind(X),X.positionGrips=X.positionGrips.bind(X),X.addControlGrips=X.addControlGrips.bind(X),X.adjustVisual=X.adjustVisual.bind(X),X.setupControlBox=X.setupControlBox.bind(X),X.resize=X.resize.bind(X),X.strokeColor=q.defaultColor,X.strokeWidth=q.defaultStrokeWidth,X.strokeDasharray=q.defaultStrokeDasharray,X.strokePanel=new Ce("Line color",q.defaultColorSet,q.defaultColor),X.strokePanel.onColorChanged=X.setStrokeColor,X.strokeWidthPanel=new Ot("Line width",q.defaultStrokeWidths,q.defaultStrokeWidth),X.strokeWidthPanel.onWidthChanged=X.setStrokeWidth,X.strokeStylePanel=new Tt("Line style",q.defaultStrokeDasharrays,q.defaultStrokeDasharray),X.strokeStylePanel.onStyleChanged=X.setStrokeDasharray,X}return Ie(_,Y),_.prototype.ownsTarget=function(I){return!(!Y.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorCurve&&I!==this.visibleCurve&&!this.curveGrip.ownsTarget(I))},_.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},_.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},_.prototype.pointerDown=function(I,H){Y.prototype.pointerDown.call(this,I,H),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=I.x,this.curveY=I.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(H)&&(this.activeGrip=this.curveGrip,this._state="resize")},_.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},_.prototype.setupControlBox=function(){Y.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},_.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Y.prototype.addControlGrips.call(this)},_.prototype.positionGrips=function(){Y.prototype.positionGrips.call(this);var I=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-I/2,this.curveY-I/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()))},_.prototype.manipulate=function(I){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+I.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+I.y-this.manipulationStartY),Y.prototype.manipulate.call(this,I)},_.prototype.resize=function(I){this.activeGrip===this.curveGrip&&(this.curveX=I.x,this.curveY=I.y),Y.prototype.resize.call(this,I),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},_.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},_.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},_.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual()},_.prototype.scale=function(I,H){this.curveX=this.curveX*I,this.curveY=this.curveY*H,Y.prototype.scale.call(this,I,H)},Object.defineProperty(_.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),_.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Y.prototype.getState.call(this));return I.typeName=_.typeName,I},_.prototype.restoreState=function(I){Y.prototype.restoreState.call(this,I);var H=I;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.curveX=H.curveX,this.curveY=H.curveY,this.createVisual(),this.adjustVisual()},_.typeName="CurveMarker",_.title="Curve marker",_.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>',_}(Kt),Bt=function(){function Y(_,I){I===void 0&&(I=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=_,this.cancelable=I}return Object.defineProperty(Y.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Y.prototype.preventDefault=function(){this._defaultPrevented=!0},Y}(),wt=function(Y){function _(I,H,q){var X=Y.call(this,I,!1)||this;return X.dataUrl=H,X.state=q,X}return Ie(_,Y),_}(Bt),Ye=function(Y){function _(I,H,q){q===void 0&&(q=!1);var X=Y.call(this,I,q)||this;return X.marker=H,X}return Ie(_,Y),_}(Bt),en=function(){function Y(){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 Y.prototype.addEventListener=function(_,I){this[_].push(I)},Y.prototype.removeEventListener=function(_,I){var H=this[_].indexOf(I);H>-1&&this[_].splice(H,1)},Y}(),Ge=function(){function Y(_){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Qe,this._isOpen=!1,this.undoRedoManager=new ft,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 en,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Y.instanceCounter++,this.styles=new ut(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=_,this.targetRoot=document.body,this.width=_.clientWidth,this.height=_.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(Y.prototype,"ALL_MARKER_TYPES",{get:function(){return[Et,Re,Se,tt,rt,Me,he,xe,Pe,te,Ut,pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Et,Re,Se,tt,Me,he,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Et,Re,Se,tt,he]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(_){var I=this;this._availableMarkerTypes.splice(0),_.forEach(function(H){if(typeof H=="string"){var q=I.ALL_MARKER_TYPES.find(function(X){return X.typeName===H});q!==void 0&&I._availableMarkerTypes.push(q)}else I._availableMarkerTypes.push(H)})},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(_){this._zoomLevel=_,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(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ke.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Y.prototype.show=function(){var _=this;this.styles.styleSheetRoot===void 0&&ot.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ot.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(I){return I(new Bt(_))})},Y.prototype.render=function(){return Be(this,void 0,void 0,function(){var _;return We(this,function(I){switch(I.label){case 0:return this.setCurrentMarker(),(_=new lt).naturalSize=this.renderAtNaturalSize,_.imageType=this.renderImageType,_.imageQuality=this.renderImageQuality,_.markersOnly=this.renderMarkersOnly,_.width=this.renderWidth,_.height=this.renderHeight,[4,_.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return I.sent(),[4,_.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,I.sent()]}})})},Y.prototype.close=function(_){var I=this;if(_===void 0&&(_=!1),this.isOpen){var H=!1;_||this.eventListeners.beforeclose.forEach(function(q){var X=new Bt(I,!0);q(X),X.defaultPrevented&&(H=!0)}),H||(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(q){return q(new Bt(I))}),this.detachEvents(),this._isOpen=!1)}},Y.prototype.addMarkersToToolbar=function(){for(var _,I=[],H=0;H<arguments.length;H++)I[H]=arguments[H];(_=this._availableMarkerTypes).push.apply(_,I)},Y.prototype.addRenderEventListener=function(_){this.addEventListener("render",function(I){_(I.dataUrl,I.state)})},Y.prototype.removeRenderEventListener=function(_){},Y.prototype.addCloseEventListener=function(_){this.addEventListener("close",function(){_()})},Y.prototype.removeCloseEventListener=function(_){},Y.prototype.setupResizeObserver=function(){var _=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){_.resize(_.target.clientWidth,_.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return _.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Y.prototype.onPopupTargetResize=function(){var _=1*this.target.clientWidth/this.target.clientHeight,I=this.editorCanvas.clientWidth/_>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*_:this.editorCanvas.clientWidth,H=I<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/_;this.resize(I,H)},Y.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Y.prototype.resize=function(_,I){this._isResizing=!0;var H=_/this.imageWidth,q=I/this.imageHeight;this.imageWidth=Math.round(_),this.imageHeight=Math.round(I),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(H,q),this._isResizing=!1},Y.prototype.scaleMarkers=function(_,I){var H,q=this;this._currentMarker&&this._currentMarker instanceof tt?this._currentMarker.scale(_,I):(H=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(X){X!==q._currentMarker&&X.scale(_,I)}),H!==void 0&&this.setCurrentMarker(H)},Y.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"},Y.prototype.setTopLeft=function(){var _=this.editingTarget.getBoundingClientRect(),I=this.editorCanvas.getBoundingClientRect();this.left=_.left-I.left,this.top=_.top-I.top},Y.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)},Y.prototype.addDefs=function(){for(var _,I=[],H=0;H<arguments.length;H++)I[H]=arguments[H];this.defs=ue.createDefs(),this.addDefsToImage(),(_=this.defs).append.apply(_,I)},Y.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Y.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)},Y.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Y.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Y.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)},Y.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Y.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)},Y.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 _=document.createElement("a");_.href="https://markerjs.com/",_.target="_blank",_.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>',_.title="Powered by marker.js",_.style.display="grid",_.style.alignItems="center",_.style.justifyItems="center",_.style.padding="3px",_.style.width="20px",_.style.height="20px",this.logoUI.appendChild(_),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Y.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")},Y.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"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.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 _=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=_+"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 et(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 dt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Y.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.removeMarker=function(_){this.markerImage.removeChild(_.container),this.markers.indexOf(_)>-1&&this.markers.splice(this.markers.indexOf(_),1),_.dispose()},Y.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())},Y.prototype.toolbarButtonClicked=function(_,I){if(_==="marker"&&I!==void 0)this.createNewMarker(I);else if(_==="action")switch(I){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()}},Y.prototype.deleteSelectedMarker=function(){var _=this;if(this._currentMarker!==void 0){var I=!1;if(this.eventListeners.markerbeforedelete.forEach(function(q){var X=new Ye(_,_._currentMarker,!0);q(X),X.defaultPrevented&&(I=!0)}),!I){var H=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(q){return q(new Ye(_,H))})}}},Y.prototype.clear=function(){var _=this,I=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var Ve=new Ye(_,void 0,!0);le(Ve),Ve.defaultPrevented&&(I=!0)}),!I)){this.setCurrentMarker();for(var H=function(le){var Ve=q.markers[le];q.setCurrentMarker(q.markers[le]),q._currentMarker.dispose(),q.markerImage.removeChild(q._currentMarker.container),q.markers.splice(q.markers.indexOf(q._currentMarker),1),q.eventListeners.markerdelete.forEach(function(Ze){return Ze(new Ye(_,Ve))})},q=this,X=this.markers.length-1;X>=0;X--)H(X);this.addUndoStep()}},Object.defineProperty(Y.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Y.prototype.showNotesEditor=function(){var _;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=(_=this._currentMarker.notes)!==null&&_!==void 0?_:"",this.overlayContainer.appendChild(this.notesArea))},Y.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)},Y.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Y.prototype.addUndoStep=function(){var _=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var I=this.getState(),H=this.undoRedoManager.getLastUndoStep();if(!H||H.width===I.width&&H.height===I.height){var q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(I),q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(X){return X(new Bt(_))})}else this.undoRedoManager.replaceLastUndoStep(I),this.eventListeners.statechange.forEach(function(X){return X(new Bt(_))})}},Y.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Y.prototype.undoStep=function(){var _=this,I=this.undoRedoManager.undo();I!==void 0&&(this.restoreState(I),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Bt(_))}))},Y.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Y.prototype.redoStep=function(){var _=this,I=this.undoRedoManager.redo();I!==void 0&&(this.restoreState(I),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Bt(_))}))},Y.prototype.stepZoom=function(){var _=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=_<this.zoomSteps.length-1?this.zoomSteps[_+1]:this.zoomSteps[0]},Y.prototype.panTo=function(_){this.contentDiv.scrollBy({left:this.prevPanPoint.x-_.x,top:this.prevPanPoint.y-_.y}),this.prevPanPoint=_},Y.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var _,I,H=this;return We(this,function(q){switch(q.label){case 0:return[4,this.render()];case 1:return _=q.sent(),I=this.getState(),this.eventListeners.render.forEach(function(X){return X(new wt(H,_,I))}),this.close(!0),[2]}})})},Y.prototype.getState=function(_){_===!0&&this.setCurrentMarker();var I={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(H){return I.markers.push(H.getState())}),I},Y.prototype.restoreState=function(_){var I=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);_.markers.forEach(function(H){var q=I._availableMarkerTypes.find(function(le){return le.typeName===H.typeName});if(q!==void 0){var X=I.addNewMarker(q);X.restoreState(H),I.markers.push(X)}}),_.width&&_.height&&(_.width!==this.imageWidth||_.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/_.width,this.imageHeight/_.height),this.eventListeners.restorestate.forEach(function(H){return H(new Bt(I))})},Y.prototype.addNewMarker=function(_){var I=ue.createGroup();return this.markerImage.appendChild(I),new _(I,this.overlayContainer,this.settings)},Y.prototype.createNewMarker=function(_){var I,H=this;(I=typeof _=="string"?this._availableMarkerTypes.find(function(q){return q.typeName===_}):_)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(I),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(I.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(q){return q(new Ye(H,H._currentMarker))}))},Y.prototype.markerCreated=function(_){var I=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(_),this.setCurrentMarker(_),_ instanceof Re&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Re):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(H){return H(new Ye(I,I._currentMarker))})},Y.prototype.colorChanged=function(_){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=_,this.settings.defaultStrokeColor=_)},Y.prototype.fillColorChanged=function(_){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=_)},Y.prototype.markerStateChanged=function(_){var I=this;this.eventListeners.markerchange.forEach(function(H){return H(new Ye(I,_))})},Y.prototype.setCurrentMarker=function(_){var I=this;this._currentMarker!==_&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(H){return H(new Ye(I,I._currentMarker))})),this._currentMarker=_,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(H){return H(new Ye(I,I._currentMarker))}))},Y.prototype.onPointerDown=function(_){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||_.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var I=this.markers.find(function(H){return H.ownsTarget(_.target)});I!==void 0?(this.setCurrentMarker(I),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(_.clientX,_.clientY),_.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:_.clientX,y:_.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(_.clientX,_.clientY))},Y.prototype.onDblClick=function(_){if(this._isFocused||this.focus(),this.mode==="select"){var I=this.markers.find(function(H){return H.ownsTarget(_.target)});I!==void 0&&I!==this._currentMarker&&this.setCurrentMarker(I),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(_.clientX,_.clientY),_.target):this.setCurrentMarker()}},Y.prototype.onPointerMove=function(_){this.touchPoints!==1&&_.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||_.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(_.clientX,_.clientY)):this.zoomLevel>1&&this.panTo({x:_.clientX,y:_.clientY}))},Y.prototype.onPointerUp=function(_){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(_.clientX,_.clientY)),this.isDragging=!1,this.addUndoStep()},Y.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Y.prototype.onKeyUp=function(_){this._currentMarker===void 0||this.notesArea!==void 0||_.key!=="Delete"&&_.key!=="Backspace"||this.deleteSelectedMarker()},Y.prototype.clientToLocalCoordinates=function(_,I){var H=this.markerImage.getBoundingClientRect();return{x:(_-H.left)/this.zoomLevel,y:(I-H.top)/this.zoomLevel}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var _=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=_+"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()},Y.prototype.addLicenseKey=function(_){ke.addKey(_)},Y.prototype.addEventListener=function(_,I){this.eventListeners.addEventListener(_,I)},Y.prototype.removeEventListener=function(_,I){this.eventListeners.removeEventListener(_,I)},Y.prototype.renderState=function(_){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(_),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Y.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Y.prototype.focus=function(){var _=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(I){return I(new Bt(_))}))},Y.prototype.blur=function(){var _=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(I){return I(new Bt(_))}))},Y.instanceCounter=0,Y}();/* **********************************
|
|
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 hn=function(Y,_){return(hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,H){I.__proto__=H}||function(I,H){for(var q in H)Object.prototype.hasOwnProperty.call(H,q)&&(I[q]=H[q])})(Y,_)};function At(Y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function I(){this.constructor=Y}hn(Y,_),Y.prototype=_===null?Object.create(_):(I.prototype=_.prototype,new I)}function Ft(Y,_,I,H){return new(I||(I=Promise))(function(q,X){function le(Lt){try{Ze(H.next(Lt))}catch(Xe){X(Xe)}}function Ve(Lt){try{Ze(H.throw(Lt))}catch(Xe){X(Xe)}}function Ze(Lt){var Xe;Lt.done?q(Lt.value):(Xe=Lt.value,Xe instanceof I?Xe:new I(function(bt){bt(Xe)})).then(le,Ve)}Ze((H=H.apply(Y,_||[])).next())})}function Gt(Y,_){var I,H,q,X,le={label:0,sent:function(){if(1&q[0])throw q[1];return q[1]},trys:[],ops:[]};return X={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(X[Symbol.iterator]=function(){return this}),X;function Ve(Ze){return function(Lt){return function(Xe){if(I)throw new TypeError("Generator is already executing.");for(;le;)try{if(I=1,H&&(q=2&Xe[0]?H.return:Xe[0]?H.throw||((q=H.return)&&q.call(H),0):H.next)&&!(q=q.call(H,Xe[1])).done)return q;switch(H=0,q&&(Xe=[2&Xe[0],q.value]),Xe[0]){case 0:case 1:q=Xe;break;case 4:return le.label++,{value:Xe[1],done:!1};case 5:le.label++,H=Xe[1],Xe=[0];continue;case 7:Xe=le.ops.pop(),le.trys.pop();continue;default:if(!(q=le.trys,(q=q.length>0&&q[q.length-1])||Xe[0]!==6&&Xe[0]!==2)){le=0;continue}if(Xe[0]===3&&(!q||Xe[1]>q[0]&&Xe[1]<q[3])){le.label=Xe[1];break}if(Xe[0]===6&&le.label<q[1]){le.label=q[1],q=Xe;break}if(q&&le.label<q[2]){le.label=q[2],le.ops.push(Xe);break}q[2]&&le.ops.pop(),le.trys.pop();continue}Xe=_.call(Y,le)}catch(bt){Xe=[6,bt],H=0}finally{I=q=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Ze,Lt])}}}var on=function(){function Y(){}return Y.addKey=function(_){Y.key=_},Object.defineProperty(Y,"isLicensed",{get:function(){return!!Y.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Y.key)},enumerable:!1,configurable:!0}),Y}(),_t=function(){function Y(){}return Y.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Y.setAttributes=function(_,I){for(var H=0,q=I;H<q.length;H++){var X=q[H],le=X[0],Ve=X[1];_.setAttribute(le,Ve)}},Y.createRect=function(_,I,H){var q=document.createElementNS("http://www.w3.org/2000/svg","rect");return q.setAttribute("width",_.toString()),q.setAttribute("height",I.toString()),H&&Y.setAttributes(q,H),q},Y.createLine=function(_,I,H,q,X){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",_.toString()),le.setAttribute("y1",I.toString()),le.setAttribute("x2",H.toString()),le.setAttribute("y2",q.toString()),X&&Y.setAttributes(le,X),le},Y.createPolygon=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",_),I&&Y.setAttributes(H,I),H},Y.createCircle=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(_/2).toString()),H.setAttribute("cy",(_/2).toString()),H.setAttribute("r",_.toString()),I&&Y.setAttributes(H,I),H},Y.createEllipse=function(_,I,H){var q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return q.setAttribute("cx",(_/2).toString()),q.setAttribute("cy",(I/2).toString()),q.setAttribute("rx",(_/2).toString()),q.setAttribute("ry",(I/2).toString()),H&&Y.setAttributes(q,H),q},Y.createGroup=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","g");return _&&Y.setAttributes(I,_),I},Y.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Y.createMarker=function(_,I,H,q,X,le,Ve){var Ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return Y.setAttributes(Ze,[["id",_],["orient",I],["markerWidth",H.toString()],["markerHeight",q.toString()],["refX",X.toString()],["refY",le.toString()]]),Ze.appendChild(Ve),Ze},Y.createText=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","text");return I.setAttribute("x","0"),I.setAttribute("y","0"),_&&Y.setAttributes(I,_),I},Y.createTSpan=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=_,I&&Y.setAttributes(H,I),H},Y.createImage=function(_){var I=document.createElementNS("http://www.w3.org/2000/svg","image");return _&&Y.setAttributes(I,_),I},Y.createPoint=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=_,H.y=I,H},Y.createPath=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",_),I&&Y.setAttributes(H,I),H},Y.createElement=function(_,I){var H=document.createElementNS("http://www.w3.org/2000/svg",_);return I&&Y.setAttributes(H,I),H},Y.getHollowRectanglePath=function(_,I,H,q,X,le,Ve,Ze){return"M"+_+","+I+"V"+(I+q)+"H"+(_+H)+"V"+I+"H"+X+"V"+le+"H"+(X+Ve)+"V"+(le+Ze)+"H"+X+"V"+I+"Z"},Y}(),tn=function(){function Y(_){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+_+"_"}return Object.defineProperty(Y.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Y.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(Y.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),Y.prototype.addClass=function(_){return this.styleSheet===void 0&&this.addStyleSheet(),_.name=""+this.classNamePrefix+_.localName,this.classes.push(_),this.styleSheet.sheet.insertRule("."+_.name+" {"+_.style+"}",this.styleSheet.sheet.cssRules.length),_},Y.prototype.addRule=function(_){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(_),this.styleSheet.sheet.insertRule(_.selector+" {"+_.style+"}",this.styleSheet.sheet.cssRules.length)},Y.prototype.addStyleSheet=function(){var _;this.styleSheet=document.createElement("style"),((_=this.styleSheetRoot)!==null&&_!==void 0?_:document.head).appendChild(this.styleSheet),this.addRule(new St("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new It("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new It("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Y.prototype.removeStyleSheet=function(){var _;this.styleSheet&&(((_=this.styleSheetRoot)!==null&&_!==void 0?_:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Y}(),St=function(Y,_){this.selector=Y,this.style=_},It=function(Y,_){this.localName=Y,this.style=_},Yt=function(){function Y(){this.blocks=[],this.display=""}return Y.prototype.addButtonBlock=function(_){_.className=this.blockClassName,_.buttonClassName=this.buttonClassName,_.buttonColorsClassName=this.buttonColorsClassName,_.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(_)},Y.prototype.addElementBlock=function(_){_.className===void 0&&(_.className=this.blockClassName),this.blocks.push(_)},Y.prototype.getUI=function(){var _=document.createElement("div");return _.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,_.style.display=this.display,this.blocks.forEach(function(I){return _.appendChild(I.getUI())}),_},Y}(),mn=function(){function Y(){}return Y.prototype.getUI=function(){var _=document.createElement("div");if(_.className=this.className,this.minWidth!==void 0&&(_.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":_.style.justifyContent="flex-start";break;case"center":_.style.justifyContent="center";break;case"end":_.style.justifyContent="flex-end"}return _.style.whiteSpace="nowrap",_},Y}(),ln=function(Y){function _(){var I=Y!==null&&Y.apply(this,arguments)||this;return I.buttons=[],I}return At(_,Y),_.prototype.addButton=function(I){I.className=this.buttonClassName,I.colorsClassName=this.buttonColorsClassName,I.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(I)},_.prototype.getUI=function(){var I=Y.prototype.getUI.call(this);return this.buttons.forEach(function(H){return I.appendChild(H.getUI())}),I},_}(mn),Jt=function(){function Y(_,I){this._isActive=!1,this._isHidden=!1,this._icon=_,this.title=I,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Y.prototype,"icon",{get:function(){return this._icon},set:function(_){this._icon=_,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isActive",{get:function(){return this._isActive},set:function(_){this._isActive=_,this.adjustClassName()},enumerable:!1,configurable:!0}),Y.prototype.getUI=function(){var _=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 _.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Y.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,"")))},Y.prototype.hide=function(){this._isHidden=!0},Y}(),Rt=function(Y){function _(){var I=Y!==null&&Y.apply(this,arguments)||this;return I.elements=[],I}return At(_,Y),_.prototype.addElement=function(I){this.elements.push(I)},_.prototype.getUI=function(){var I=Y.prototype.getUI.call(this);return this.elements.forEach(function(H){return I.appendChild(H)}),I},_}(mn),Gn=function(){function Y(_,I){this.horizontal=_,this.vertical=I}return Object.defineProperty(Y.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Y.prototype.getVerticalLength=function(_){return _/this.ratio},Y.prototype.getHorizontalLength=function(_){return _*this.ratio},Y}(),un=function(){function Y(){}return Y.getIcon=function(_,I){if(_>0&&I>0){var H=new Gn(_,I),q=H.ratio>=1?20:H.getHorizontalLength(20),X=H.ratio<1?20:H.getVerticalLength(20),le=document.createElementNS("http://www.w3.org/2000/svg","svg");le.setAttribute("xmlns","http://www.w3.org/2000/svg"),le.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(le);var Ve=_t.createDefs();le.appendChild(Ve);var Ze=_t.createElement("clipPath",[["id","text-bg-clip"]]);Ve.appendChild(Ze);var Lt=_t.createPath(_t.getHollowRectanglePath((24-q)/2,(24-X)/2,q,X,(24-q)/2+2,(24-X)/2+2,q-4,X-4));le.appendChild(Lt);var Xe=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(_t.createTSpan(_+":"+I)),le.appendChild(Xe);var bt=Xe.getBBox();_t.setAttributes(Xe,[["x",((24-bt.width)/2).toString()],["y",((24-bt.height)/2-bt.y).toString()]]);var Zt=_t.createPath(_t.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(bt.width))/2,(24-Math.ceil(bt.height))/2,Math.ceil(bt.width),Math.ceil(bt.height)));return Ze.appendChild(Zt),_t.setAttributes(Lt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(le),le.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>'},Y}(),vn=function(Y){function _(I,H,q){var X=Y.call(this,I,H)||this;return X.isDropdownOpen=!1,X.onClick=X.dropdownButtonClicked,X.dropdownButtons=q,X}return At(_,Y),_.prototype.setupDropdown=function(){var I=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(H){H.className=I.className,H.colorsClassName=I.colorsClassName,I.dropdownBlock.appendChild(H.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},_.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},_.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},_.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},_.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},_.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},_}(Jt),Qt=function(){function Y(_,I){this.GRIP_SIZE=10,this.color=_,this.fillColor=I,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(_){return _===this.visual||_===this.visual.childNodes[0]||_===this.visual.childNodes[1]},Y.prototype.setCenter=function(_,I){this.visual.childNodes.forEach(function(H){return _t.setAttributes(H,[["cx",_.toString()],["cy",I.toString()]])})},Y}(),An=function(){function Y(_,I,H,q){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=_,this.canvasHeight=I,this.margin=H,this.container=q,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(Y.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(_){this._aspectRatio=_,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(_){this._isGridVisible=_,this.gridContainer&&_t.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(_){this._zoomFactor=_,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Y.prototype.open=function(){var _=this;this.cropShadeElement=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var I=0;I<this.numberOfGridLines;I++)this.horizontalGridLines.push(_t.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(_t.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(H){return _.gridContainer.appendChild(H)}),this.verticalGridLines.forEach(function(H){return _.gridContainer.appendChild(H)}),this.cropRectElement=_t.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Qt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Qt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Qt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Qt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Y.prototype.setCropRectangle=function(_){this.cropRect=_;var I=Object.assign({},this.cropRect);this.zoomFactor!==1&&(I.width=this.cropRect.width*this.zoomFactor,I.height=this.cropRect.height*this.zoomFactor,I.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-I.width/2,I.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-I.height/2),_t.setAttributes(this.cropRectElement,[["x",I.x.toString()],["y",I.y.toString()],["width",I.width.toString()],["height",I.height.toString()]]);var H=I.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(X,le){var Ve=I.y+H*(le+1);_t.setAttributes(X,[["x1",""+I.x],["y1",""+Ve],["x2",""+(I.x+I.width)],["y2",""+Ve]])});var q=I.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(X,le){var Ve=I.x+q*(le+1);_t.setAttributes(X,[["x1",""+Ve],["y1",""+I.y],["x2",""+Ve],["y2",""+(I.y+I.height)]])}),_t.setAttributes(this.cropShadeElement,[["d",_t.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,I.x,I.y,I.width,I.height)]]),this.topLeftGrip.setCenter(I.x,I.y),this.topRightGrip.setCenter(I.x+I.width,I.y),this.bottomLeftGrip.setCenter(I.x,I.y+I.height),this.bottomRightGrip.setCenter(I.x+I.width,I.y+I.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Y.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)},Y.prototype.clientToLocalCoordinates=function(_,I){var H=this.container.getBoundingClientRect();return{x:_-H.left+this.margin,y:I-H.top+this.margin}},Y.prototype.onPointerDown=function(_){this.container.setPointerCapture(_.pointerId),this.previousPoint=this.clientToLocalCoordinates(_.clientX,_.clientY),this.cropRectElement===_.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(_.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(_.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(_.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(_.target)&&(this.activeGrip=this.bottomRightGrip)},Y.prototype.onPointerMove=function(_){if(this.isMoving)this.move(this.clientToLocalCoordinates(_.clientX,_.clientY));else if(this.activeGrip){var I=this.clientToLocalCoordinates(_.clientX,_.clientY);this.resize(I)}_.preventDefault()},Y.prototype.onPointerUp=function(_){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(_.pointerId)},Y.prototype.move=function(_){var I=_.x-this.previousPoint.x,H=_.y-this.previousPoint.y;this.zoomFactor!==1&&(I=-I/this.zoomFactor,H=-H/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+I),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+H),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=_},Y.prototype.resize=function(_){var I=Object.assign({},this.cropRect),H=_.x-this.previousPoint.x,q=_.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:I.x+H<this.margin&&(H=this.margin-I.x),I.x+=H,I.width=this.cropRect.x+this.cropRect.width-I.x;break;case this.bottomRightGrip:case this.topRightGrip:I.width+H>this.canvasWidth*this.zoomFactor&&(H=this.canvasWidth*this.zoomFactor-I.width),I.width+=H}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(I.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(H),I.height=this.aspectRatio.getVerticalLength(I.width)):(I.y+=q,I.height=this.cropRect.y+this.cropRect.height-I.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?I.height=this.aspectRatio.getVerticalLength(I.width):I.height+=q}I.width<10&&(I.x=this.cropRect.x,I.width=10),I.height<10&&(I.y=this.cropRect.y,I.height=10),this.previousPoint=_,I.x>=this.margin&&I.y>=this.margin&&I.x-this.margin+I.width<=this.canvasWidth&&I.y-this.margin+I.height<=this.canvasHeight&&(this.cropRect=I,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Y.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var _=this.cropRect.x+this.cropRect.width/2,I=this.cropRect.y+this.cropRect.height/2,H=this.aspectRatio.getHorizontalLength(this.cropRect.height),q=this.aspectRatio.getVerticalLength(this.cropRect.width);H/this.canvasWidth<q/this.canvasHeight?this.cropRect.width=H:this.cropRect.height=q,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=_-this.cropRect.width/2,this.cropRect.y=I-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)}},Y.prototype.getRescaledRect=function(_,I,H,q,X,le){var Ve=H/_,Ze=q/I;return{x:(X.x-le)*Ve+le,y:(X.y-le)*Ze+le,width:X.width*Ve,height:X.height*Ze}},Y.prototype.scaleCanvas=function(_,I){var H=this.getRescaledRect(this.canvasWidth,this.canvasHeight,_,I,this.cropRect,this.margin);this.canvasWidth=_,this.canvasHeight=I,this.onCropChange&&this.onCropChange(H),this.setCropRectangle(H)},Y}(),zn=function(){function Y(_){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=_,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(Y.prototype,"angle",{get:function(){return this._angle},set:function(_){this._angle=_,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Y.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},Y.prototype.onPointerDown=function(_){this.controlContainer.setPointerCapture(_.pointerId),this.isDragging=!0,this.previousPoint={x:_.clientX,y:_.clientY}},Y.prototype.onPointerMove=function(_){this.isDragging&&(this.onAngleChange&&this.onAngleChange((_.clientX-this.previousPoint.x)/5),this.previousPoint.x=_.clientX)},Y.prototype.onPointerUp=function(_){this.isDragging&&this.onAngleChange&&this.onAngleChange((_.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(_.pointerId)},Y.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var _=this.angleLabelText.getBBox();_t.setAttributes(this.angleLabelElement,[["x",((this.width-_.width)/2).toString()],["y",(this.height/2).toString()]])}},Y.prototype.positionScaleShape=function(){if(this.scaleShape){var _=this.scaleShape.transform.baseVal.getItem(0);_.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(_,0)}},Y.prototype.getVisual=function(){var _=document.createElementNS("http://www.w3.org/2000/svg","svg");_.setAttribute("xmlns","http://www.w3.org/2000/svg"),_.setAttribute("width",this.width+"px"),_.setAttribute("height",this.height+"px"),_.setAttribute("viewBox","0 0 "+this.width+" "+this.height),_.style.flexShrink="0",document.body.appendChild(_);for(var I="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,H=1;H<=this.width/5+10;H++){var q=H%5==0?this.height/3:this.height/6;I+="h4v"+-q+"h1v"+q}I+="v1H0Z",this.scaleShape=_t.createPath(I);var X=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(X),_.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var le=_t.createTSpan("");return le.innerHTML="°",this.angleLabelElement.appendChild(le),_.appendChild(this.angleLabelElement),document.body.removeChild(_),_},Y}(),Nn=function(){function Y(){this.naturalSize=!1,this.imageType="image/png"}return Y.prototype.rasterize=function(_,I,H,q,X,le,Ve){var Ze=this;return new Promise(function(Lt){var Xe=document.createElement("canvas");Xe.width=_.width.baseVal.value-2*q,Xe.height=_.height.baseVal.value-2*q;var bt=1,Zt=1;Ze.naturalSize===!0?(bt=I.naturalWidth/(_.width.baseVal.value-2*q)/le,Zt=I.naturalHeight/(_.height.baseVal.value-2*q)/Ve,Xe.width=I.naturalWidth/le,Xe.height=I.naturalHeight/Ve):Ze.width!==void 0&&Ze.height!==void 0&&(bt=Ze.width/H.width,Zt=Ze.height/H.height,Xe.width*=bt,Xe.height*=Zt);var Wn=Xe.getContext("2d");Wn.translate(Xe.width/2,Xe.height/2),Wn.rotate(X*Math.PI/180),Wn.scale(le,Ve),Wn.translate(-Xe.width/2,-Xe.height/2),Wn.drawImage(I,0,0,Xe.width,Xe.height);var qn=document.createElement("canvas");qn.width=H.width*bt,qn.height=H.height*Zt,qn.getContext("2d").putImageData(Wn.getImageData((H.x-q)*bt,(H.y-q)*Zt,H.width*bt,H.height*Zt),0,0),Lt(qn.toDataURL(Ze.imageType,Ze.imageQuality))})},Y}(),at=function(){function Y(_){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=Y.instanceCounter++,this.styles=new tn(this.instanceNo),this.target=_,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(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(_){this._zoomToCropEnabled=_,_?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(_){this._isGridVisible=_,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"gridLines",{get:function(){return this._gridLines},set:function(_){this._gridLines=_,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(_){this._rotationAngle=_,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"aspectRatio",{get:function(){var _;return(_=this._aspectRatio)!==null&&_!==void 0?_:this.aspectRatios[0]},set:function(_){this._aspectRatio=_},enumerable:!1,configurable:!0}),Y.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},Y.prototype.show=function(){this.showUI(),this.open()},Y.prototype.close=function(_){_===void 0&&(_=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),_||this.closeEventListeners.forEach(function(I){return I()}),this._isOpen=!1)},Y.prototype.addRenderEventListener=function(_){this.renderEventListeners.push(_)},Y.prototype.removeRenderEventListener=function(_){this.renderEventListeners.indexOf(_)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(_),1)},Y.prototype.addCloseEventListener=function(_){this.closeEventListeners.push(_)},Y.prototype.removeCloseEventListener=function(_){this.closeEventListeners.indexOf(_)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(_),1)},Y.prototype.setupResizeObserver=function(){var _=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){_.resize(_.target.clientWidth,_.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))},Y.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var _=1*this.target.clientWidth/this.target.clientHeight,I=this.contentDiv.clientWidth/_>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*_:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,H=I+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/_;this.resize(I,H)}},Y.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Y.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",_t.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Y.prototype.resize=function(_,I){this.imageWidth=Math.round(_),this.imageHeight=Math.round(I),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()},Y.prototype.setEditingTarget=function(){var _=document.createElement("canvas");_.width=this.target.naturalWidth,_.height=this.target.naturalHeight,_.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var I=_.toDataURL();_t.setAttributes(this.editingTarget,[["href",I]]),this.setEditingTargetSize()},Y.prototype.setTopLeft=function(){var _=this.target.getBoundingClientRect(),I=this.editorCanvas.getBoundingClientRect();this.left=_.left-I.left-this.CANVAS_MARGIN,this.top=_.top-I.top-this.CANVAS_MARGIN},Y.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=_t.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=_t.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=_t.createGroup(),this.editingTargetRotationScaleContainer=_t.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var _=_t.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(_);var I=_t.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(I),this.editingTargetContainer=_t.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)},Y.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Y.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=_t.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new An(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()},Y.prototype.zoomToCrop=function(){if(this.cropRect){var _=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,I=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=_+"px "+I+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-_+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-I+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Y.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)},Y.prototype.cropRectChanged=function(_){this.cropRect=_,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Y.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},Y.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"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.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 _=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,I=this.target.offsetTop>_+this.CANVAS_MARGIN?this.target.offsetTop-(_+this.CANVAS_MARGIN):0;this.coverDiv.style.top=I+"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},Y.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Y.prototype.addTopToolbar=function(){var _=this;this.topToolbar=new Yt,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 I=new ln;I.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(I);var H=[];this.aspectRatios.forEach(function(Zt){var Wn=new Jt(un.getIcon(Zt.horizontal,Zt.vertical),Zt.horizontal===0&&Zt.vertical===0?"FREE":Zt.horizontal+":"+Zt.vertical);Wn.onClick=function(){return _.ratioButtonClicked(Zt)},H.push(Wn)}),this.aspectRatioButton=new vn(un.getIcon(0,0),"Aspect ratio",H),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,I.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var q=new Jt('<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");q.isActive=this.isGridVisible,q.onClick=function(){_.isGridVisible=!_.isGridVisible,q.isActive=_.isGridVisible},I.addButton(q);var X=new Jt('<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(X.isActive=this.zoomToCropEnabled,X.onClick=function(){_.zoomToCropEnabled=!_.zoomToCropEnabled,X.isActive=_.zoomToCropEnabled},I.addButton(X),!on.isLicensed){var le=new Rt;this.topToolbar.addElementBlock(le);var Ve=document.createElement("div");Ve.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ze=document.createElement("a");Ze.style.color="currentColor",Ze.href="https://markerjs.com/products/cropro",Ze.target="_blank",Ze.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>',Ve.appendChild(Ze),le.addElement(Ve)}var Lt=new ln;Lt.minWidth=3*this.toolbarHeight+"px",Lt.contentAlign="end",this.topToolbar.addButtonBlock(Lt);var Xe=new Jt('<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");Xe.onClick=this.startRenderAndClose,Lt.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var bt=new Jt('<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");bt.onClick=this.close,Lt.addButton(bt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(bt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Y.prototype.addBottomToolbar=function(){var _=this;this.bottomToolbar=new Yt,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 I=new ln;I.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(I);var H=new Jt('<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");H.onClick=this.rotateLeftButtonClicked,I.addButton(H);var q=new Jt('<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");q.onClick=this.rotateRightButtonClicked,I.addButton(q);var X=new Rt;X.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(X),this.straightener=new zn("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(Lt){_.rotateBy(Lt),_.straightener.angle=_.rotationAngle},X.addElement(this.straightener.getUI());var le=new ln;le.minWidth=2*this.toolbarHeight+"px",le.contentAlign="end",this.bottomToolbar.addButtonBlock(le);var Ve=new Jt('<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");Ve.onClick=this.flipHorizontallyButtonClicked,le.addButton(Ve);var Ze=new Jt('<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");Ze.onClick=this.flipVerticallyButtonClicked,le.addButton(Ze)},Y.prototype.ratioButtonClicked=function(_){this.aspectRatio=_,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Y.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=un.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Y.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Gn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Y.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Y.prototype.restoreState=function(_){if(_){var I=this.cropLayer.getRescaledRect(_.width,_.height,this.imageWidth,this.imageHeight,_.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(I),this.cropRectChanged(I),this.flippedHorizontally=_.flippedHorizontally,this.flippedVertically=_.flippedVertically,this.applyFlip(),this.rotationAngle=_.rotationAngle,this.applyRotation()}},Y.prototype.clientToLocalCoordinates=function(_,I){var H=this.cropImage.getBoundingClientRect();return{x:_-H.left,y:I-H.top}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var _=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=_+"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()},Y.prototype.rotateLeftButtonClicked=function(){var _=this.rotationAngle-90;this.rotationAngle%90!=0&&(_+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(_)},Y.prototype.rotateRightButtonClicked=function(){var _=this.rotationAngle+90;this.rotationAngle%90!=0&&(_-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(_)},Y.prototype.rotateTo=function(_){_=(_=_>180?_-360:_)<=-180?_+360:_,this.rotationAngle=_,this.applyRotation()},Y.prototype.rotateBy=function(_){this.rotateTo((this.rotationAngle+_)%360)},Y.prototype.applyRotation=function(){var _=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var I=this.editingTargetRotationContainer.transform.baseVal.getItem(0);I.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(I,0);var H=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/H.width,this.imageHeight/H.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=_},Y.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Y.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Y.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Y.prototype.startRenderAndClose=function(){return Ft(this,void 0,void 0,function(){var _,I;return Gt(this,function(H){switch(H.label){case 0:return[4,this.render()];case 1:return _=H.sent(),I=this.getState(),this.renderEventListeners.forEach(function(q){return q(_,I)}),this.close(!0),[2]}})})},Y.prototype.render=function(){return Ft(this,void 0,void 0,function(){var _;return Gt(this,function(I){switch(I.label){case 0:return(_=new Nn).naturalSize=this.renderAtNaturalSize,_.imageType=this.renderImageType,_.imageQuality=this.renderImageQuality,_.width=this.renderWidth,_.height=this.renderHeight,this.unzoomFromCrop(),_t.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,_.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 I.sent(),[4,_.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,I.sent()]}})})},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new It("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 It("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new It("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var _=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new It("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*_)+`px;
|
|
height: `+(this.toolbarHeight-2*_)+`px;
|
|
padding: `+_+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new It("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new It("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new It("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 It("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new It("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 It("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*_)+`px;
|
|
padding: `+_+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new It("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},Y.instanceCounter=0,Y}(),Wt=W("8hTe"),Vn=W.n(Wt),bn=/<pre[^>]*>/g;function cn(Y){var _=document.createElement("div");return _.innerHTML=Y,_.childNodes.length===0?"":_.childNodes[0].nodeValue}var Mn=ve.a=function(Y){var _=Y.value,I=_===void 0?"":_,H=Y.edit,q=H===void 0?!1:H,X=Y.className,le=Y.showTextOnly,Ve=Y.showLines,Ze=Y.replaces,Lt=Y.zoomImg,Xe=Y.hasMask,bt=Y.style,Zt=bt===void 0?{}:bt,Wn=Y.stylesPrev,qn=Wn===void 0?{}:Wn,gn=String(I),Pt=Object(M.useRef)(),jt=Object(M.useRef)(),nn=Object(M.useState)(""),rn=Object(z.a)(nn,2),En=rn[0],$n=rn[1],dn=Object(M.useState)("office"),ci=Object(z.a)(dn,2),cr=ci[0],gr=ci[1],br=function(){var Un=new at(jt.current);Un.displayMode="popup",Un.addRenderEventListener(function(){var pi=Object(B.a)(n.a.mark(function yn(mi){var Jn;return n.a.wrap(function(Si){for(;;)switch(Si.prev=Si.next){case 0:return Pt.current.style.display="none",Si.next=3,Object(Fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mi}});case 3:Jn=Si.sent,Jn!=null&&Jn.id&&Ze(jt.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Jn==null?void 0:Jn.id,"?type=").concat(Jn.content_type));case 5:case"end":return Si.stop()}},yn)}));return function(yn){return pi.apply(this,arguments)}}()),Un.show()},Hr=function(){var Un=new Ge(jt.current);Un.settings.displayMode="popup",Un.addEventListener("render",function(){var pi=Object(B.a)(n.a.mark(function yn(mi){var Jn;return n.a.wrap(function(Si){for(;;)switch(Si.prev=Si.next){case 0:if(Pt.current.style.display="none",!jt.current){Si.next=6;break}return Si.next=4,Object(Fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mi.dataUrl}});case 4:Jn=Si.sent,Jn!=null&&Jn.id&&Ze(jt.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Jn==null?void 0:Jn.id,"?type=").concat(Jn.content_type));case 6:case"end":return Si.stop()}},yn)}));return function(yn){return pi.apply(this,arguments)}}()),Un.show(),window.markerArea=Un},fi=Object(M.useMemo)(function(){Pt.current&&(Pt.current.style.zIndex=-1);try{var ai=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;gn=gn.replace(ai,"("+ee.a.API_SERVER+"/api/attachments/").replace(Un,'"'+ee.a.API_SERVER+"/api/attachments/").replace(pi,'"'+ee.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(nr){}var yn=j(gn),mi=E();if(gn.match(/\[TOC\]/)&&(yn=yn.replace("<p>[TOC]</p>",L()),O()),yn=yn.replace(/(__special_katext_id_\d+__)/g,function(nr,Si){var Pi=mi[Si],Gr=Pi.type,Qi=Pi.expression;return Object(oe.renderToString)(cn(Qi)||"",{displayMode:Gr==="block",throwOnError:!1,output:"html"})}),yn=yn.replace(/▁/g,"\u2581\u2581\u2581"),p(),le){var Jn=document.createElement("div");return Jn.innerHTML=yn,Jn.innerText}return setTimeout(function(){return Kr()},500),yn},[gn]),Di=Object(M.useRef)();w.WebkitLineClamp=Ve,Ve&&(Zt=Object(k.a)(Object(k.a)({},Zt),w));function dr(ai){var Un=ai.target;if(Un.tagName.toUpperCase()==="IMG"){if(Lt){var pi=Un.getAttribute("src");$n(pi),gr("image")}}else if(Un.tagName.toUpperCase()==="A"){var yn=Un.getAttribute("href");if(yn.indexOf("office")>-1)ai.preventDefault(),$n(yn),gr("office");else if(yn.indexOf("application/pdf")>-1)ai.preventDefault(),$n(yn),gr("pdf");else if(yn.indexOf("text/html")>-1)ai.preventDefault(),$n(yn),gr("html");else if(yn.startsWith("#")){ai.preventDefault();var mi=document.getElementById(yn.replace("#",""));mi&&mi.scrollIntoView(!0)}}}var Kr=function(){var Un,pi=(Un=Di.current)===null||Un===void 0?void 0:Un.querySelectorAll("video");pi==null||pi.forEach(function(yn){if(yn.oncontextmenu=function(){return!1},yn.src.indexOf(".m3u8")>-1&&!yn.canPlayType("application/vnd.apple.mpegurl")){if(Q.a.isSupported()){var mi=new Q.a;mi.loadSource(yn.src),mi.attachMedia(yn)}}})};Object(M.useEffect)(function(){if(Di.current&&fi&&(fi.match(bn)&&window.PR.prettyPrint()),Di.current)return Di.current.addEventListener("click",dr),function(){Di.current.removeEventListener("click",dr),p(),O()}},[fi,Di.current,dr]);var Ar=function(Un){if(!q)return;Un.target.nodeName==="IMG"?(Pt.current.style.zIndex=1,Pt.current.style.display="flex",Pt.current.style.width=Un.target.clientWidth+"px",Pt.current.style.height=Un.target.clientHeight+"px",Pt.current.style.top=Un.target.offsetTop+"px",Pt.current.style.left=Un.target.offsetLeft+"px",jt.current.src=Un.target.getAttribute("src")):Pt.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:Di,style:Object(k.a)({},Zt),className:"".concat(X||""," markdown-body ").concat(Vn.a.mdBody),onMouseOver:Ar,dangerouslySetInnerHTML:{__html:fi}}),y.a.createElement("div",{ref:Pt,className:Vn.a.button},y.a.createElement(G.a,null,y.a.createElement(V.a,{onClick:function(){return br()}},"\u88C1\u526A"),y.a.createElement(V.a,{onClick:function(){return Hr()}},"\u7F16\u8F91"))),y.a.createElement("img",{ref:jt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),y.a.createElement(fe.a,{close:!0,data:En,type:En!=null&&En.length?cr:"",style:Object(k.a)({},qn),onClose:function(){return $n("")}}))}},"9JIy":function(it,ve,W){it.exports={flex_box_center:"flex_box_center___Hq8-r",flex_space_between:"flex_space_between___3Nl1U",flex_box_vertical_center:"flex_box_vertical_center___1hgum",flex_box_center_end:"flex_box_center_end___i5ldC",flex_box_column:"flex_box_column____1u-K",table:"table___2yPMl"}},"9VGf":function(it,ve,W){"use strict";W.d(ve,"a",function(){return P});var ie=W("q1tI"),G=W.n(ie);function P(V,k){var B=Object(ie.useRef)();Object(ie.useEffect)(function(){B.current=V}),Object(ie.useEffect)(function(){function z(){B.current()}if(k!==null){var K=setInterval(z,k);return function(){return clearInterval(K)}}},[k])}},BU3w:function(it,ve,W){"use strict";W.d(ve,"a",function(){return B});var ie=W("MNnm"),G="rc-util-key";function P(z){if(z.attachTo)return z.attachTo;var K=document.querySelector("head");return K||document.body}function V(z){var K,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ie.a)())return null;var M=document.createElement("style");if((K=n.csp)===null||K===void 0?void 0:K.nonce){var y;M.nonce=(y=n.csp)===null||y===void 0?void 0:y.nonce}M.innerHTML=z;var m=P(n),g=m.firstChild;return n.prepend&&m.prepend?m.prepend(M):n.prepend&&g?m.insertBefore(M,g):m.appendChild(M),M}var k=new Map;function B(z,K){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},M=P(n);if(!k.has(M)){var y=V("",n),m=y.parentNode;k.set(M,m),m.removeChild(y)}var g=Array.from(k.get(M).children).find(function(l){return l.tagName==="STYLE"&&l[G]===K});if(g){var u,c;if(((u=n.csp)===null||u===void 0?void 0:u.nonce)&&g.nonce!==((c=n.csp)===null||c===void 0?void 0:c.nonce)){var f;g.nonce=(f=n.csp)===null||f===void 0?void 0:f.nonce}return g.innerHTML!==z&&(g.innerHTML=z),g}var o=V(z,n);return o[G]=K,o}},Bd2K:function(it,ve,W){(function(ie){ie(W("VrN/"),W("osHv"))})(function(ie){ie.defineOption("autoCloseTags",!1,function(n,M,y){if(y!=ie.Init&&y&&n.removeKeyMap("autoCloseTags"),!M)return;var m={name:"autoCloseTags"};(typeof M!="object"||M.whenClosing!==!1)&&(m["'/'"]=function(g){return B(g)}),(typeof M!="object"||M.whenOpening!==!1)&&(m["'>'"]=function(g){return V(g)}),n.addKeyMap(m)});var G=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],P=["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 V(n){if(n.getOption("disableInput"))return ie.Pass;for(var M=n.listSelections(),y=[],m=n.getOption("autoCloseTags"),g=0;g<M.length;g++){if(!M[g].empty())return ie.Pass;var u=M[g].head,c=n.getTokenAt(u),f=ie.innerMode(n.getMode(),c.state),o=f.state,l=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(o),s=l&&l.name;if(!s)return ie.Pass;var a=f.mode.configuration=="html",O=typeof m=="object"&&m.dontCloseTags||a&&G,w=typeof m=="object"&&m.indentTags||a&&P;c.end>u.ch&&(s=s.slice(0,s.length-c.end+u.ch));var S=s.toLowerCase();if(!s||c.type=="string"&&(c.end!=u.ch||!/[\"\']/.test(c.string.charAt(c.string.length-1))||c.string.length==1)||c.type=="tag"&&l.close||c.string.indexOf("/")==u.ch-c.start-1||O&&z(O,S)>-1||K(n,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(o)||[],s,u,!0))return ie.Pass;var L=typeof m=="object"&&m.emptyTags;if(L&&z(L,s)>-1){y[g]={text:"/>",newPos:ie.Pos(u.line,u.ch+2)};continue}var D=w&&z(w,S)>-1;y[g]={indent:D,text:">"+(D?`
|
|
|
|
`:"")+"</"+s+">",newPos:D?ie.Pos(u.line+1,0):ie.Pos(u.line,u.ch+1)}}for(var A=typeof m=="object"&&m.dontIndentOnAutoClose,g=M.length-1;g>=0;g--){var T=y[g];n.replaceRange(T.text,M[g].head,M[g].anchor,"+insert");var x=n.listSelections().slice(0);x[g]={head:T.newPos,anchor:T.newPos},n.setSelections(x),!A&&T.indent&&(n.indentLine(T.newPos.line,null,!0),n.indentLine(T.newPos.line+1,null,!0))}}function k(n,M){for(var y=n.listSelections(),m=[],g=M?"/":"</",u=n.getOption("autoCloseTags"),c=typeof u=="object"&&u.dontIndentOnSlash,f=0;f<y.length;f++){if(!y[f].empty())return ie.Pass;var o=y[f].head,l=n.getTokenAt(o),s=ie.innerMode(n.getMode(),l.state),a=s.state;if(M&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=o.ch-1))return ie.Pass;var O,w=s.mode.name!="xml"&&n.getMode().name=="htmlmixed";if(w&&s.mode.name=="javascript")O=g+"script";else if(w&&s.mode.name=="css")O=g+"style";else{var S=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(a);if(!S||S.length&&K(n,S,S[S.length-1],o))return ie.Pass;O=g+S[S.length-1]}n.getLine(o.line).charAt(l.end)!=">"&&(O+=">"),m[f]=O}if(n.replaceSelections(m),y=n.listSelections(),!c)for(var f=0;f<y.length;f++)(f==y.length-1||y[f].head.line<y[f+1].head.line)&&n.indentLine(y[f].head.line)}function B(n){return n.getOption("disableInput")?ie.Pass:k(n,!0)}ie.commands.closeTag=function(n){return k(n)};function z(n,M){if(n.indexOf)return n.indexOf(M);for(var y=0,m=n.length;y<m;++y)if(n[y]==M)return y;return-1}function K(n,M,y,m,g){if(!ie.scanForClosingTag)return!1;var u=Math.min(n.lastLine()+1,m.line+500),c=ie.scanForClosingTag(n,m,null,u);if(!c||c.tag!=y)return!1;for(var f=g?1:0,o=M.length-1;o>=0&&M[o]==y;o--)++f;m=c.to;for(var o=1;o<f;o++){var l=ie.scanForClosingTag(n,m,null,u);if(!l||l.tag!=y)return!1;m=l.to}return!0}})},BdwD:function(it,ve,W){"use strict";var ie=W("+L6B"),G=W("2/Rp"),P=W("0Owb"),V=W("k1fw"),k=W("q1tI"),B=W.n(k),z=W("FOrL"),K=W.n(z),n=function(y){var m=y.buttonProps,g=m===void 0?{}:m,u=y.styles,c=u===void 0?{}:u,f=y.customText,o=y.ButtonText,l=y.ButtonClick,s=y.Buttonclass,a=y.ButtonTwo;return B.a.createElement("section",{className:"tc animated fadeIn",style:Object(V.a)(Object(V.a)({},{color:"#999",margin:"200px auto"}),c)},B.a.createElement("img",{src:K.a}),B.a.createElement("p",{className:"mt20 font14"},f||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),o&&B.a.createElement(G.a,Object(P.a)({className:s,onClick:l},g),o),a&&a)};ve.a=n},BjJ7:function(it,ve,W){"use strict";W.d(ve,"d",function(){return G}),W.d(ve,"c",function(){return P}),W.d(ve,"e",function(){return V}),W.d(ve,"b",function(){return k}),W.d(ve,"a",function(){return z});var ie=W("m3rI");function G(K){var n=!0;if(K.length>0){for(var M=0;M<K.length;M++)if(K[M].compile_success==0||!K[M].compile_success){n=!1;break}}else n=!1;return n}function P(K){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",M=[],y=0;y<K.length;y++){var m=K[y],g=n?"".concat(n,"/").concat(m.name):"".concat(m.name);M.push({title:m.name,isLeaf:!(m.type==="tree"),key:g})}return M}function V(K,n,M){for(var y=0;y<K.length;y++){var m=K[y];if(m.key===n){m.children=M;break}m.children&&V(m.children,n,M)}return K}function k(K,n,M){var y;return function(){var m=this,g=arguments,u=function(){y=null,M||K.apply(m,g)},c=M&&!y;clearTimeout(y),y=setTimeout(u,n),c&&K.apply(m,g)}}var B=!0,z=ie.a.API_SERVER},Bq7L:function(it,ve){it.exports="data:image/png;base64,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"},"C+DQ":function(it,ve,W){},"C/vA":function(it,ve,W){"use strict";W.d(ve,"a",function(){return ie});function ie(G){const P=this;let V=!1,k;return function(){return V||(V=!0,k=G.apply(P,arguments)),k}}},"Cg/j":function(it,ve,W){"use strict";W.d(ve,"b",function(){return ie}),W.d(ve,"a",function(){return G}),W.d(ve,"c",function(){return V}),W.d(ve,"d",function(){return k});var ie;(function(B){B.serviceIds=new Map,B.DI_TARGET="$di$target",B.DI_DEPENDENCIES="$di$dependencies";function z(K){return K[B.DI_DEPENDENCIES]||[]}B.getServiceDependencies=z})(ie||(ie={}));const G=V("instantiationService");function P(B,z,K,n){z[ie.DI_TARGET]===z?z[ie.DI_DEPENDENCIES].push({id:B,index:K,optional:n}):(z[ie.DI_DEPENDENCIES]=[{id:B,index:K,optional:n}],z[ie.DI_TARGET]=z)}function V(B){if(ie.serviceIds.has(B))return ie.serviceIds.get(B);const z=function(K,n,M){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");P(z,K,M,!1)};return z.toString=()=>B,ie.serviceIds.set(B,z),z}function k(B){return function(z,K,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");P(B,z,n,!0)}}},DlQD:function(it,ve,W){(function(ie,G){it.exports=G()})(this,function(){"use strict";function ie(Re,Te){for(var Se=0;Se<Te.length;Se++){var te=Te[Se];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(Re,te.key,te)}}function G(Re,Te,Se){return Te&&ie(Re.prototype,Te),Se&&ie(Re,Se),Re}function P(Re,Te){if(!Re)return;if(typeof Re=="string")return V(Re,Te);var Se=Object.prototype.toString.call(Re).slice(8,-1);if(Se==="Object"&&Re.constructor&&(Se=Re.constructor.name),Se==="Map"||Se==="Set")return Array.from(Re);if(Se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Se))return V(Re,Te)}function V(Re,Te){(Te==null||Te>Re.length)&&(Te=Re.length);for(var Se=0,te=new Array(Te);Se<Te;Se++)te[Se]=Re[Se];return te}function k(Re,Te){var Se;if(typeof Symbol=="undefined"||Re[Symbol.iterator]==null){if(Array.isArray(Re)||(Se=P(Re))||Te&&Re&&typeof Re.length=="number"){Se&&(Re=Se);var te=0;return function(){return te>=Re.length?{done:!0}:{done:!1,value:Re[te++]}}}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 Se=Re[Symbol.iterator](),Se.next.bind(Se)}function B(Re,Te){return Te={exports:{}},Re(Te,Te.exports),Te.exports}var z=B(function(Re){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 Se(te){Re.exports.defaults=te}Re.exports={defaults:Te(),getDefaults:Te,changeDefaults:Se}}),K=z.defaults,n=z.getDefaults,M=z.changeDefaults,y=/[&<>"']/,m=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(Te){return c[Te]};function o(Re,Te){if(Te){if(y.test(Re))return Re.replace(m,f)}else if(g.test(Re))return Re.replace(u,f);return Re}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Re){return Re.replace(l,function(Te,Se){return Se=Se.toLowerCase(),Se==="colon"?":":Se.charAt(0)==="#"?Se.charAt(1)==="x"?String.fromCharCode(parseInt(Se.substring(2),16)):String.fromCharCode(+Se.substring(1)):""})}var a=/(^|[^\[])\^/g;function O(Re,Te){Re=Re.source||Re,Te=Te||"";var Se={replace:function(se,he){return he=he.source||he,he=he.replace(a,"$1"),Re=Re.replace(se,he),Se},getRegex:function(){return new RegExp(Re,Te)}};return Se}var w=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Re,Te,Se){if(Re){var te;try{te=decodeURIComponent(s(Se)).replace(w,"").toLowerCase()}catch(se){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}Te&&!S.test(Se)&&(Se=d(Te,Se));try{Se=encodeURI(Se).replace(/%25/g,"%")}catch(se){return null}return Se}var D={},A=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(Re,Te){D[" "+Re]||(A.test(Re)?D[" "+Re]=Re+"/":D[" "+Re]=C(Re,"/",!0)),Re=D[" "+Re];var Se=Re.indexOf(":")===-1;return Te.substring(0,2)==="//"?Se?Te:Re.replace(T,"$1")+Te:Te.charAt(0)==="/"?Se?Te:Re.replace(x,"$1")+Te:Re+Te}var E={exec:function(){}};function p(Re){for(var Te=1,Se,te;Te<arguments.length;Te++){Se=arguments[Te];for(te in Se)Object.prototype.hasOwnProperty.call(Se,te)&&(Re[te]=Se[te])}return Re}function v(Re,Te){var Se=Re.replace(/\|/g,function(he,me,xe){for(var Me=!1,Pe=me;--Pe>=0&&xe[Pe]==="\\";)Me=!Me;return Me?"|":" |"}),te=Se.split(/ \|/),se=0;if(te.length>Te)te.splice(Te);else for(;te.length<Te;)te.push("");for(;se<te.length;se++)te[se]=te[se].trim().replace(/\\\|/g,"|");return te}function C(Re,Te,Se){var te=Re.length;if(te===0)return"";for(var se=0;se<te;){var he=Re.charAt(te-se-1);if(he===Te&&!Se)se++;else if(he!==Te&&Se)se++;else break}return Re.substr(0,te-se)}function F(Re,Te){if(Re.indexOf(Te[1])===-1)return-1;for(var Se=Re.length,te=0,se=0;se<Se;se++)if(Re[se]==="\\")se++;else if(Re[se]===Te[0])te++;else if(Re[se]===Te[1]&&(te--,te<0))return se;return-1}function R(Re){Re&&Re.sanitize&&!Re.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 j={escape:o,unescape:s,edit:O,cleanUrl:L,resolveUrl:d,noopTest:E,merge:p,splitCells:v,rtrim:C,findClosingBracket:F,checkSanitizeDeprecation:R},U=z.defaults,b=j.rtrim,Q=j.splitCells,ee=j.escape,oe=j.findClosingBracket;function fe(Re,Te,Se){var te=Te.href,se=Te.title?ee(Te.title):null,he=Re[1].replace(/\\([\[\]])/g,"$1");return Re[0].charAt(0)!=="!"?{type:"link",raw:Se,href:te,title:se,text:he}:{type:"image",raw:Se,href:te,title:se,text:ee(he)}}function Fe(Re,Te){var Se=Re.match(/^(\s+)(?:```)/);if(Se===null)return Te;var te=Se[1];return Te.split(`
|
|
`).map(function(se){var he=se.match(/^\s+/);if(he===null)return se;var me=he[0];return me.length>=te.length?se.slice(te.length):se}).join(`
|
|
`)}var Le=function(){function Re(Se){this.options=Se||U}var Te=Re.prototype;return Te.space=function(te){var se=this.rules.block.newline.exec(te);if(se)return se[0].length>1?{type:"space",raw:se[0]}:{raw:`
|
|
`}},Te.code=function(te,se){var he=this.rules.block.code.exec(te);if(he){var me=se[se.length-1];if(me&&me.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var xe=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?xe:b(xe,`
|
|
`)}}},Te.fences=function(te){var se=this.rules.block.fences.exec(te);if(se){var he=se[0],me=Fe(he,se[3]||"");return{type:"code",raw:he,lang:se[2]?se[2].trim():se[2],text:me}}},Te.heading=function(te){var se=this.rules.block.heading.exec(te);if(se)return{type:"heading",raw:se[0],depth:se[1].length,text:se[2]}},Te.nptable=function(te){var se=this.rules.block.nptable.exec(te);if(se){var he={type:"table",header:Q(se[1].replace(/^ *| *\| *$/g,"")),align:se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:se[3]?se[3].replace(/\n$/,"").split(`
|
|
`):[],raw:se[0]};if(he.header.length===he.align.length){var me=he.align.length,xe;for(xe=0;xe<me;xe++)/^ *-+: *$/.test(he.align[xe])?he.align[xe]="right":/^ *:-+: *$/.test(he.align[xe])?he.align[xe]="center":/^ *:-+ *$/.test(he.align[xe])?he.align[xe]="left":he.align[xe]=null;for(me=he.cells.length,xe=0;xe<me;xe++)he.cells[xe]=Q(he.cells[xe],he.header.length);return he}}},Te.hr=function(te){var se=this.rules.block.hr.exec(te);if(se)return{type:"hr",raw:se[0]}},Te.blockquote=function(te){var se=this.rules.block.blockquote.exec(te);if(se){var he=se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:se[0],text:he}}},Te.list=function(te){var se=this.rules.block.list.exec(te);if(se){for(var he=se[0],me=se[2],xe=me.length>1,Me=me[me.length-1]===")",Pe={type:"list",raw:he,ordered:xe,start:xe?+me.slice(0,-1):"",loose:!1,items:[]},rt=se[0].match(this.rules.block.item),ft=!1,pt,Bt,wt,Ye,en,Ge,hn,At=rt.length,Ft=0;Ft<At;Ft++)pt=rt[Ft],he=pt,Bt=pt.length,pt=pt.replace(/^ *([*+-]|\d+[.)]) */,""),~pt.indexOf(`
|
|
`)&&(Bt-=pt.length,pt=this.options.pedantic?pt.replace(/^ {1,4}/gm,""):pt.replace(new RegExp("^ {1,"+Bt+"}","gm"),"")),Ft!==At-1&&(wt=this.rules.block.bullet.exec(rt[Ft+1])[0],(xe?wt.length===1||!Me&&wt[wt.length-1]===")":wt.length>1||this.options.smartLists&&wt!==me)&&(Ye=rt.slice(Ft+1).join(`
|
|
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-Ye.length),Ft=At-1)),en=ft||/\n\n(?!\s*$)/.test(pt),Ft!==At-1&&(ft=pt.charAt(pt.length-1)===`
|
|
`,en||(en=ft)),en&&(Pe.loose=!0),Ge=/^\[[ xX]\] /.test(pt),hn=void 0,Ge&&(hn=pt[1]!==" ",pt=pt.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:he,task:Ge,checked:hn,loose:en,text:pt});return Pe}},Te.html=function(te){var se=this.rules.block.html.exec(te);if(se)return{type:this.options.sanitize?"paragraph":"html",raw:se[0],pre:!this.options.sanitizer&&(se[1]==="pre"||se[1]==="script"||se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(se[0]):ee(se[0]):se[0]}},Te.def=function(te){var se=this.rules.block.def.exec(te);if(se){se[3]&&(se[3]=se[3].substring(1,se[3].length-1));var he=se[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:se[0],href:se[2],title:se[3]}}},Te.table=function(te){var se=this.rules.block.table.exec(te);if(se){var he={type:"table",header:Q(se[1].replace(/^ *| *\| *$/g,"")),align:se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:se[3]?se[3].replace(/\n$/,"").split(`
|
|
`):[]};if(he.header.length===he.align.length){he.raw=se[0];var me=he.align.length,xe;for(xe=0;xe<me;xe++)/^ *-+: *$/.test(he.align[xe])?he.align[xe]="right":/^ *:-+: *$/.test(he.align[xe])?he.align[xe]="center":/^ *:-+ *$/.test(he.align[xe])?he.align[xe]="left":he.align[xe]=null;for(me=he.cells.length,xe=0;xe<me;xe++)he.cells[xe]=Q(he.cells[xe].replace(/^ *\| *| *\| *$/g,""),he.header.length);return he}}},Te.lheading=function(te){var se=this.rules.block.lheading.exec(te);if(se)return{type:"heading",raw:se[0],depth:se[2].charAt(0)==="="?1:2,text:se[1]}},Te.paragraph=function(te){var se=this.rules.block.paragraph.exec(te);if(se)return{type:"paragraph",raw:se[0],text:se[1].charAt(se[1].length-1)===`
|
|
`?se[1].slice(0,-1):se[1]}},Te.text=function(te,se){var he=this.rules.block.text.exec(te);if(he){var me=se[se.length-1];return me&&me.type==="text"?{raw:he[0],text:he[0]}:{type:"text",raw:he[0],text:he[0]}}},Te.escape=function(te){var se=this.rules.inline.escape.exec(te);if(se)return{type:"escape",raw:se[0],text:ee(se[1])}},Te.tag=function(te,se,he){var me=this.rules.inline.tag.exec(te);if(me)return!se&&/^<a /i.test(me[0])?se=!0:se&&/^<\/a>/i.test(me[0])&&(se=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(me[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(me[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:me[0],inLink:se,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):ee(me[0]):me[0]}},Te.link=function(te){var se=this.rules.inline.link.exec(te);if(se){var he=oe(se[2],"()");if(he>-1){var me=se[0].indexOf("!")===0?5:4,xe=me+se[1].length+he;se[2]=se[2].substring(0,he),se[0]=se[0].substring(0,xe).trim(),se[3]=""}var Me=se[2],Pe="";if(this.options.pedantic){var rt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Me);rt?(Me=rt[1],Pe=rt[3]):Pe=""}else Pe=se[3]?se[3].slice(1,-1):"";Me=Me.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=fe(se,{href:Me&&Me.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},se[0]);return ft}},Te.reflink=function(te,se){var he;if((he=this.rules.inline.reflink.exec(te))||(he=this.rules.inline.nolink.exec(te))){var me=(he[2]||he[1]).replace(/\s+/g," ");if(me=se[me.toLowerCase()],!me||!me.href){var xe=he[0].charAt(0);return{type:"text",raw:xe,text:xe}}var Me=fe(he,me,he[0]);return Me}},Te.strong=function(te,se,he){he===void 0&&(he="");var me=this.rules.inline.strong.start.exec(te);if(me&&(!me[1]||me[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){se=se.slice(-1*te.length);var xe=me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;xe.lastIndex=0;for(var Me;(me=xe.exec(se))!=null;)if(Me=this.rules.inline.strong.middle.exec(se.slice(0,me.index+3)),Me)return{type:"strong",raw:te.slice(0,Me[0].length),text:te.slice(2,Me[0].length-2)}}},Te.em=function(te,se,he){he===void 0&&(he="");var me=this.rules.inline.em.start.exec(te);if(me&&(!me[1]||me[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){se=se.slice(-1*te.length);var xe=me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;xe.lastIndex=0;for(var Me;(me=xe.exec(se))!=null;)if(Me=this.rules.inline.em.middle.exec(se.slice(0,me.index+2)),Me)return{type:"em",raw:te.slice(0,Me[0].length),text:te.slice(1,Me[0].length-1)}}},Te.codespan=function(te){var se=this.rules.inline.code.exec(te);if(se){var he=se[2].replace(/\n/g," "),me=/[^ ]/.test(he),xe=he.startsWith(" ")&&he.endsWith(" ");return me&&xe&&(he=he.substring(1,he.length-1)),he=ee(he,!0),{type:"codespan",raw:se[0],text:he}}},Te.br=function(te){var se=this.rules.inline.br.exec(te);if(se)return{type:"br",raw:se[0]}},Te.del=function(te){var se=this.rules.inline.del.exec(te);if(se)return{type:"del",raw:se[0],text:se[1]}},Te.autolink=function(te,se){var he=this.rules.inline.autolink.exec(te);if(he){var me,xe;return he[2]==="@"?(me=ee(this.options.mangle?se(he[1]):he[1]),xe="mailto:"+me):(me=ee(he[1]),xe=me),{type:"link",raw:he[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},Te.url=function(te,se){var he;if(he=this.rules.inline.url.exec(te)){var me,xe;if(he[2]==="@")me=ee(this.options.mangle?se(he[0]):he[0]),xe="mailto:"+me;else{var Me;do Me=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Me!==he[0]);me=ee(he[0]),he[1]==="www."?xe="http://"+me:xe=me}return{type:"link",raw:he[0],text:me,href:xe,tokens:[{type:"text",raw:me,text:me}]}}},Te.inlineText=function(te,se,he){var me=this.rules.inline.text.exec(te);if(me){var xe;return se?xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(me[0]):ee(me[0]):me[0]:xe=ee(this.options.smartypants?he(me[0]):me[0]),{type:"text",raw:me[0],text:xe}}},Re}(),Ie=j.noopTest,Be=j.edit,We=j.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:Ie,table:Ie,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=Be(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=Be(ge.item,"gm").replace(/bull/g,ge.bullet).getRegex(),ge.list=Be(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=Be(ge.html,"i").replace("comment",ge._comment).replace("tag",ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ge.paragraph=Be(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=Be(ge.blockquote).replace("paragraph",ge.paragraph).getRegex(),ge.normal=We({},ge),ge.gfm=We({},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=Be(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=Be(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=We({},ge.normal,{html:Be(`^ *(?: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:Ie,paragraph:Be(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 ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ie,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:Ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ue._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ue.punctuation=Be(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Be(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Be(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Be(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Be(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Be(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Be(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Be(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Be(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Be(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Be(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=Be(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Be(ue.tag).replace("comment",ge._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Be(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Be(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Be(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=We({},ue),ue.pedantic=We({},ue.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:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=We({},ue.normal,{escape:Be(ue.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ue.gfm.url=Be(ue.gfm.url,"i").replace("email",ue.gfm._extended_email).getRegex(),ue.breaks=We({},ue.gfm,{br:Be(ue.br).replace("{2,}","*").getRegex(),text:Be(ue.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ke={block:ge,inline:ue},lt=z.defaults,ot=ke.block,ut=ke.inline;function xt(Re){return Re.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 Je(Re){var Te="",Se,te,se=Re.length;for(Se=0;Se<se;Se++)te=Re.charCodeAt(Se),Math.random()>.5&&(te="x"+te.toString(16)),Te+="&#"+te+";";return Te}var et=function(){function Re(Se){this.tokens=[],this.tokens.links=Object.create(null),this.options=Se||lt,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:ot.normal,inline:ut.normal};this.options.pedantic?(te.block=ot.pedantic,te.inline=ut.pedantic):this.options.gfm&&(te.block=ot.gfm,this.options.breaks?te.inline=ut.breaks:te.inline=ut.gfm),this.tokenizer.rules=te}Re.lex=function(te,se){var he=new Re(se);return he.lex(te)};var Te=Re.prototype;return Te.lex=function(te){return te=te.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(te,se,he){se===void 0&&(se=[]),he===void 0&&(he=!0),te=te.replace(/^ +$/gm,"");for(var me,xe,Me,Pe;te;){if(me=this.tokenizer.space(te)){te=te.substring(me.raw.length),me.type&&se.push(me);continue}if(me=this.tokenizer.code(te,se)){te=te.substring(me.raw.length),me.type?se.push(me):(Pe=se[se.length-1],Pe.raw+=`
|
|
`+me.raw,Pe.text+=`
|
|
`+me.text);continue}if(me=this.tokenizer.fences(te)){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.heading(te)){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.nptable(te)){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.hr(te)){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.blockquote(te)){te=te.substring(me.raw.length),me.tokens=this.blockTokens(me.text,[],he),se.push(me);continue}if(me=this.tokenizer.list(te)){for(te=te.substring(me.raw.length),Me=me.items.length,xe=0;xe<Me;xe++)me.items[xe].tokens=this.blockTokens(me.items[xe].text,[],!1);se.push(me);continue}if(me=this.tokenizer.html(te)){te=te.substring(me.raw.length),se.push(me);continue}if(he&&(me=this.tokenizer.def(te))){te=te.substring(me.raw.length),this.tokens.links[me.tag]||(this.tokens.links[me.tag]={href:me.href,title:me.title});continue}if(me=this.tokenizer.table(te)){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.lheading(te)){te=te.substring(me.raw.length),se.push(me);continue}if(he&&(me=this.tokenizer.paragraph(te))){te=te.substring(me.raw.length),se.push(me);continue}if(me=this.tokenizer.text(te,se)){te=te.substring(me.raw.length),me.type?se.push(me):(Pe=se[se.length-1],Pe.raw+=`
|
|
`+me.raw,Pe.text+=`
|
|
`+me.text);continue}if(te){var rt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return se},Te.inline=function(te){var se,he,me,xe,Me,Pe,rt=te.length;for(se=0;se<rt;se++){Pe=te[se];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},xe=Pe.header.length,he=0;he<xe;he++)Pe.tokens.header[he]=[],this.inlineTokens(Pe.header[he],Pe.tokens.header[he]);for(xe=Pe.cells.length,he=0;he<xe;he++)for(Me=Pe.cells[he],Pe.tokens.cells[he]=[],me=0;me<Me.length;me++)Pe.tokens.cells[he][me]=[],this.inlineTokens(Me[me],Pe.tokens.cells[he][me]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(xe=Pe.items.length,he=0;he<xe;he++)this.inline(Pe.items[he].tokens);break}}}return te},Te.inlineTokens=function(te,se,he,me,xe){se===void 0&&(se=[]),he===void 0&&(he=!1),me===void 0&&(me=!1),xe===void 0&&(xe="");var Me,Pe=te,rt;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(rt=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)ft.includes(rt[0].slice(rt[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(rt=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Me=this.tokenizer.escape(te)){te=te.substring(Me.raw.length),se.push(Me);continue}if(Me=this.tokenizer.tag(te,he,me)){te=te.substring(Me.raw.length),he=Me.inLink,me=Me.inRawBlock,se.push(Me);continue}if(Me=this.tokenizer.link(te)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,me)),se.push(Me);continue}if(Me=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,me)),se.push(Me);continue}if(Me=this.tokenizer.strong(te,Pe,xe)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],he,me),se.push(Me);continue}if(Me=this.tokenizer.em(te,Pe,xe)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],he,me),se.push(Me);continue}if(Me=this.tokenizer.codespan(te)){te=te.substring(Me.raw.length),se.push(Me);continue}if(Me=this.tokenizer.br(te)){te=te.substring(Me.raw.length),se.push(Me);continue}if(Me=this.tokenizer.del(te)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],he,me),se.push(Me);continue}if(Me=this.tokenizer.autolink(te,Je)){te=te.substring(Me.raw.length),se.push(Me);continue}if(!he&&(Me=this.tokenizer.url(te,Je))){te=te.substring(Me.raw.length),se.push(Me);continue}if(Me=this.tokenizer.inlineText(te,me,xt)){te=te.substring(Me.raw.length),xe=Me.raw.slice(-1),se.push(Me);continue}if(te){var pt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(pt);break}else throw new Error(pt)}}return se},G(Re,null,[{key:"rules",get:function(){return{block:ot,inline:ut}}}]),Re}(),dt=z.defaults,de=j.cleanUrl,Ce=j.escape,Ue=function(){function Re(Se){this.options=Se||dt}var Te=Re.prototype;return Te.code=function(te,se,he){var me=(se||"").match(/\S*/)[0];if(this.options.highlight){var xe=this.options.highlight(te,me);xe!=null&&xe!==te&&(he=!0,te=xe)}return me?'<pre><code class="'+this.options.langPrefix+Ce(me,!0)+'">'+(he?te:Ce(te,!0))+`</code></pre>
|
|
`:"<pre><code>"+(he?te:Ce(te,!0))+`</code></pre>
|
|
`},Te.blockquote=function(te){return`<blockquote>
|
|
`+te+`</blockquote>
|
|
`},Te.html=function(te){return te},Te.heading=function(te,se,he,me){return this.options.headerIds?"<h"+se+' id="'+this.options.headerPrefix+me.slug(he)+'">'+te+"</h"+se+`>
|
|
`:"<h"+se+">"+te+"</h"+se+`>
|
|
`},Te.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Te.list=function(te,se,he){var me=se?"ol":"ul",xe=se&&he!==1?' start="'+he+'"':"";return"<"+me+xe+`>
|
|
`+te+"</"+me+`>
|
|
`},Te.listitem=function(te){return"<li>"+te+`</li>
|
|
`},Te.checkbox=function(te){return"<input "+(te?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(te){return"<p>"+te+`</p>
|
|
`},Te.table=function(te,se){return se&&(se="<tbody>"+se+"</tbody>"),`<table>
|
|
<thead>
|
|
`+te+`</thead>
|
|
`+se+`</table>
|
|
`},Te.tablerow=function(te){return`<tr>
|
|
`+te+`</tr>
|
|
`},Te.tablecell=function(te,se){var he=se.header?"th":"td",me=se.align?"<"+he+' align="'+se.align+'">':"<"+he+">";return me+te+"</"+he+`>
|
|
`},Te.strong=function(te){return"<strong>"+te+"</strong>"},Te.em=function(te){return"<em>"+te+"</em>"},Te.codespan=function(te){return"<code>"+te+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(te){return"<del>"+te+"</del>"},Te.link=function(te,se,he){if(te=de(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var me='<a href="'+Ce(te)+'"';return se&&(me+=' title="'+se+'"'),me+=">"+he+"</a>",me},Te.image=function(te,se,he){if(te=de(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var me='<img src="'+te+'" alt="'+he+'"';return se&&(me+=' title="'+se+'"'),me+=this.options.xhtml?"/>":">",me},Te.text=function(te){return te},Re}(),Ke=function(){function Re(){}var Te=Re.prototype;return Te.strong=function(te){return te},Te.em=function(te){return te},Te.codespan=function(te){return te},Te.del=function(te){return te},Te.html=function(te){return te},Te.text=function(te){return te},Te.link=function(te,se,he){return""+he},Te.image=function(te,se,he){return""+he},Te.br=function(){return""},Re}(),st=function(){function Re(){this.seen={}}var Te=Re.prototype;return Te.slug=function(te){var se=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(se)){var he=se;do this.seen[he]++,se=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(se))}return this.seen[se]=0,se},Re}(),ht=z.defaults,yt=j.unescape,mt=function(){function Re(Se){this.options=Se||ht,this.options.renderer=this.options.renderer||new Ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ke,this.slugger=new st}Re.parse=function(te,se){var he=new Re(se);return he.parse(te)};var Te=Re.prototype;return Te.parse=function(te,se){se===void 0&&(se=!0);var he="",me,xe,Me,Pe,rt,ft,pt,Bt,wt,Ye,en,Ge,hn,At,Ft,Gt,on,_t,tn=te.length;for(me=0;me<tn;me++){Ye=te[me];switch(Ye.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(Ye.tokens),Ye.depth,yt(this.parseInline(Ye.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(Ye.text,Ye.lang,Ye.escaped);continue}case"table":{for(Bt="",pt="",Pe=Ye.header.length,xe=0;xe<Pe;xe++)pt+=this.renderer.tablecell(this.parseInline(Ye.tokens.header[xe]),{header:!0,align:Ye.align[xe]});for(Bt+=this.renderer.tablerow(pt),wt="",Pe=Ye.cells.length,xe=0;xe<Pe;xe++){for(ft=Ye.tokens.cells[xe],pt="",rt=ft.length,Me=0;Me<rt;Me++)pt+=this.renderer.tablecell(this.parseInline(ft[Me]),{header:!1,align:Ye.align[Me]});wt+=this.renderer.tablerow(pt)}he+=this.renderer.table(Bt,wt);continue}case"blockquote":{wt=this.parse(Ye.tokens),he+=this.renderer.blockquote(wt);continue}case"list":{for(en=Ye.ordered,Ge=Ye.start,hn=Ye.loose,Pe=Ye.items.length,wt="",xe=0;xe<Pe;xe++)Ft=Ye.items[xe],Gt=Ft.checked,on=Ft.task,At="",Ft.task&&(_t=this.renderer.checkbox(Gt),hn?Ft.tokens.length>0&&Ft.tokens[0].type==="text"?(Ft.tokens[0].text=_t+" "+Ft.tokens[0].text,Ft.tokens[0].tokens&&Ft.tokens[0].tokens.length>0&&Ft.tokens[0].tokens[0].type==="text"&&(Ft.tokens[0].tokens[0].text=_t+" "+Ft.tokens[0].tokens[0].text)):Ft.tokens.unshift({type:"text",text:_t}):At+=_t),At+=this.parse(Ft.tokens,hn),wt+=this.renderer.listitem(At,on,Gt);he+=this.renderer.list(wt,en,Ge);continue}case"html":{he+=this.renderer.html(Ye.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(Ye.tokens));continue}case"text":{for(wt=Ye.tokens?this.parseInline(Ye.tokens):Ye.text;me+1<tn&&te[me+1].type==="text";)Ye=te[++me],wt+=`
|
|
`+(Ye.tokens?this.parseInline(Ye.tokens):Ye.text);he+=se?this.renderer.paragraph(wt):wt;continue}default:{var St='Token with "'+Ye.type+'" type was not found.';if(this.options.silent){console.error(St);return}else throw new Error(St)}}}return he},Te.parseInline=function(te,se){se=se||this.renderer;var he="",me,xe,Me=te.length;for(me=0;me<Me;me++){xe=te[me];switch(xe.type){case"escape":{he+=se.text(xe.text);break}case"html":{he+=se.html(xe.text);break}case"link":{he+=se.link(xe.href,xe.title,this.parseInline(xe.tokens,se));break}case"image":{he+=se.image(xe.href,xe.title,xe.text);break}case"strong":{he+=se.strong(this.parseInline(xe.tokens,se));break}case"em":{he+=se.em(this.parseInline(xe.tokens,se));break}case"codespan":{he+=se.codespan(xe.text);break}case"br":{he+=se.br();break}case"del":{he+=se.del(this.parseInline(xe.tokens,se));break}case"text":{he+=se.text(xe.text);break}default:{var Pe='Token with "'+xe.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return he},Re}(),Ot=j.merge,Tt=j.checkSanitizeDeprecation,Et=j.escape,Qe=z.getDefaults,Kt=z.changeDefaults,Ut=z.defaults;function qe(Re,Te,Se){if(typeof Re=="undefined"||Re===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Re!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Re)+", string expected");if(typeof Te=="function"&&(Se=Te,Te=null),Te=Ot({},qe.defaults,Te||{}),Tt(Te),Se){var te=Te.highlight,se;try{se=et.lex(Re,Te)}catch(Me){return Se(Me)}var he=function(Pe){var rt;if(!Pe)try{rt=mt.parse(se,Te)}catch(ft){Pe=ft}return Te.highlight=te,Pe?Se(Pe):Se(null,rt)};if(!te||te.length<3)return he();if(delete Te.highlight,!se.length)return he();var me=0;qe.walkTokens(se,function(Me){Me.type==="code"&&(me++,setTimeout(function(){te(Me.text,Me.lang,function(Pe,rt){if(Pe)return he(Pe);rt!=null&&rt!==Me.text&&(Me.text=rt,Me.escaped=!0),me--,me===0&&he()})},0))}),me===0&&he();return}try{var xe=et.lex(Re,Te);return Te.walkTokens&&qe.walkTokens(xe,Te.walkTokens),mt.parse(xe,Te)}catch(Me){if(Me.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+Et(Me.message+"",!0)+"</pre>";throw Me}}qe.options=qe.setOptions=function(Re){return Ot(qe.defaults,Re),Kt(qe.defaults),qe},qe.getDefaults=Qe,qe.defaults=Ut,qe.use=function(Re){var Te=Ot({},Re);if(Re.renderer&&function(){var te=qe.defaults.renderer||new Ue,se=function(xe){var Me=te[xe];te[xe]=function(){for(var Pe=arguments.length,rt=new Array(Pe),ft=0;ft<Pe;ft++)rt[ft]=arguments[ft];var pt=Re.renderer[xe].apply(te,rt);return pt===!1&&(pt=Me.apply(te,rt)),pt}};for(var he in Re.renderer)se(he);Te.renderer=te}(),Re.tokenizer&&function(){var te=qe.defaults.tokenizer||new Le,se=function(xe){var Me=te[xe];te[xe]=function(){for(var Pe=arguments.length,rt=new Array(Pe),ft=0;ft<Pe;ft++)rt[ft]=arguments[ft];var pt=Re.tokenizer[xe].apply(te,rt);return pt===!1&&(pt=Me.apply(te,rt)),pt}};for(var he in Re.tokenizer)se(he);Te.tokenizer=te}(),Re.walkTokens){var Se=qe.defaults.walkTokens;Te.walkTokens=function(te){Re.walkTokens(te),Se&&Se(te)}}qe.setOptions(Te)},qe.walkTokens=function(Re,Te){for(var Se=k(Re),te;!(te=Se()).done;){var se=te.value;Te(se);switch(se.type){case"table":{for(var he=k(se.tokens.header),me;!(me=he()).done;){var xe=me.value;qe.walkTokens(xe,Te)}for(var Me=k(se.tokens.cells),Pe;!(Pe=Me()).done;)for(var rt=Pe.value,ft=k(rt),pt;!(pt=ft()).done;){var Bt=pt.value;qe.walkTokens(Bt,Te)}break}case"list":{qe.walkTokens(se.items,Te);break}default:se.tokens&&qe.walkTokens(se.tokens,Te)}}},qe.Parser=mt,qe.parser=mt.parse,qe.Renderer=Ue,qe.TextRenderer=Ke,qe.Lexer=et,qe.lexer=et.lex,qe.Tokenizer=Le,qe.Slugger=st,qe.parse=qe;var tt=qe;return tt})},ELLl:function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){var G={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},P=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(c,f,o){o&&o!=ie.Init&&(c.removeKeyMap(k),c.state.closeBrackets=null),f&&(B(V(f,"pairs")),c.state.closeBrackets=f,c.addKeyMap(k))});function V(c,f){return f=="pairs"&&typeof c=="string"?c:typeof c=="object"&&c[f]!=null?c[f]:G[f]}var k={Backspace:n,Enter:M};function B(c){for(var f=0;f<c.length;f++){var o=c.charAt(f),l="'"+o+"'";k[l]||(k[l]=z(o))}}B(G.pairs+"`");function z(c){return function(f){return m(f,c)}}function K(c){var f=c.state.closeBrackets;if(!f||f.override)return f;var o=c.getModeAt(c.getCursor());return o.closeBrackets||f}function n(c){var f=K(c);if(!f||c.getOption("disableInput"))return ie.Pass;for(var o=V(f,"pairs"),l=c.listSelections(),s=0;s<l.length;s++){if(!l[s].empty())return ie.Pass;var a=g(c,l[s].head);if(!a||o.indexOf(a)%2!=0)return ie.Pass}for(var s=l.length-1;s>=0;s--){var O=l[s].head;c.replaceRange("",P(O.line,O.ch-1),P(O.line,O.ch+1),"+delete")}}function M(c){var f=K(c),o=f&&V(f,"explode");if(!o||c.getOption("disableInput"))return ie.Pass;for(var l=c.listSelections(),s=0;s<l.length;s++){if(!l[s].empty())return ie.Pass;var a=g(c,l[s].head);if(!a||o.indexOf(a)%2!=0)return ie.Pass}c.operation(function(){var O=c.lineSeparator()||`
|
|
`;c.replaceSelection(O+O,null),c.execCommand("goCharLeft"),l=c.listSelections();for(var w=0;w<l.length;w++){var S=l[w].head.line;c.indentLine(S,null,!0),c.indentLine(S+1,null,!0)}})}function y(c){var f=ie.cmpPos(c.anchor,c.head)>0;return{anchor:new P(c.anchor.line,c.anchor.ch+(f?-1:1)),head:new P(c.head.line,c.head.ch+(f?1:-1))}}function m(c,f){var o=K(c);if(!o||c.getOption("disableInput"))return ie.Pass;var l=V(o,"pairs"),s=l.indexOf(f);if(s==-1)return ie.Pass;for(var a=V(o,"closeBefore"),O=V(o,"triples"),w=l.charAt(s+1)==f,S=c.listSelections(),L=s%2==0,D,A=0;A<S.length;A++){var T=S[A],x=T.head,d,E=c.getRange(x,P(x.line,x.ch+1));if(L&&!T.empty())d="surround";else if((w||!L)&&E==f)w&&u(c,x)?d="both":O.indexOf(f)>=0&&c.getRange(x,P(x.line,x.ch+3))==f+f+f?d="skipThree":d="skip";else if(w&&x.ch>1&&O.indexOf(f)>=0&&c.getRange(P(x.line,x.ch-2),x)==f+f){if(x.ch>2&&/\bstring/.test(c.getTokenTypeAt(P(x.line,x.ch-2))))return ie.Pass;d="addFour"}else if(w){var p=x.ch==0?" ":c.getRange(P(x.line,x.ch-1),x);if(!ie.isWordChar(E)&&p!=f&&!ie.isWordChar(p))d="both";else return ie.Pass}else if(L&&(E.length===0||/\s/.test(E)||a.indexOf(E)>-1))d="both";else return ie.Pass;if(!D)D=d;else if(D!=d)return ie.Pass}var v=s%2?l.charAt(s-1):f,C=s%2?f:l.charAt(s+1);c.operation(function(){if(D=="skip")c.execCommand("goCharRight");else if(D=="skipThree")for(var F=0;F<3;F++)c.execCommand("goCharRight");else if(D=="surround"){for(var R=c.getSelections(),F=0;F<R.length;F++)R[F]=v+R[F]+C;c.replaceSelections(R,"around"),R=c.listSelections().slice();for(var F=0;F<R.length;F++)R[F]=y(R[F]);c.setSelections(R)}else D=="both"?(c.replaceSelection(v+C,null),c.triggerElectric(v+C),c.execCommand("goCharLeft")):D=="addFour"&&(c.replaceSelection(v+v+v+v,"before"),c.execCommand("goCharRight"))})}function g(c,f){var o=c.getRange(P(f.line,f.ch-1),P(f.line,f.ch+1));return o.length==2?o:null}function u(c,f){var o=c.getTokenAt(P(f.line,f.ch+1));return/\bstring/.test(o.type)&&o.start==f.ch&&(f.ch==0||!/\bstring/.test(c.getTokenTypeAt(f)))}})},FOrL:function(it,ve,W){it.exports=W.p+"static/nodata.a6b3f948.png"},FWmy:function(it,ve,W){"use strict";W.d(ve,"a",function(){return ie});function ie(G,P){if(!G)throw new Error(P?`Assertion failed (${P})`:"Assertion Failed")}},Fhpe:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___1W7Bl",flex_space_between:"flex_space_between___3S4Sp",flex_box_vertical_center:"flex_box_vertical_center___5mGEA",flex_box_center_end:"flex_box_center_end___1blqp",flex_box_column:"flex_box_column___4i1E0",CustomCss:"CustomCss___3thFA",CustomTipsModalCss:"CustomTipsModalCss___2aNwC",dropdownmenus:"dropdownmenus___19dGk",popupClassNames:"popupClassNames___3LOFQ",selectdown:"selectdown___1_utH"}},HmJG:function(it,ve,W){},JAbv:function(it,ve){it.exports="data:image/png;base64,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"},JYp7:function(it,ve,W){"use strict";W.d(ve,"a",function(){return ie});var ie;(function(G){function P(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}G.is=P;const V=Object.freeze([]);function k(){return V}G.empty=k;function*B(a){yield a}G.single=B;function z(a){return a||V}G.from=z;function K(a){return!a||a[Symbol.iterator]().next().done===!0}G.isEmpty=K;function n(a){return a[Symbol.iterator]().next().value}G.first=n;function M(a,O){for(const w of a)if(O(w))return!0;return!1}G.some=M;function y(a,O){for(const w of a)if(O(w))return w;return}G.find=y;function*m(a,O){for(const w of a)O(w)&&(yield w)}G.filter=m;function*g(a,O){let w=0;for(const S of a)yield O(S,w++)}G.map=g;function*u(...a){for(const O of a)for(const w of O)yield w}G.concat=u;function*c(a){for(const O of a)for(const w of O)yield w}G.concatNested=c;function f(a,O,w){let S=w;for(const L of a)S=O(S,L);return S}G.reduce=f;function*o(a,O,w=a.length){for(O<0&&(O+=a.length),w<0?w+=a.length:w>a.length&&(w=a.length);O<w;O++)yield a[O]}G.slice=o;function l(a,O=Number.POSITIVE_INFINITY){const w=[];if(O===0)return[w,a];const S=a[Symbol.iterator]();for(let L=0;L<O;L++){const D=S.next();if(D.done)return[w,G.empty()];w.push(D.value)}return[w,{[Symbol.iterator](){return S}}]}G.consume=l;function s(a,O,w=(S,L)=>S===L){const S=a[Symbol.iterator](),L=O[Symbol.iterator]();for(;;){const D=S.next(),A=L.next();if(D.done!==A.done)return!1;if(D.done)return!0;if(!w(D.value,A.value))return!1}}G.equals=s})(ie||(ie={}))},KOXS:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},LdHM:function(it,ve,W){"use strict";W.d(ve,"b",function(){return a}),W.d(ve,"a",function(){return w});var ie=W("1OyB"),G=W("vuIU"),P=W("Ji7U"),V=W("LK+K"),k=W("q1tI"),B=W("rePB"),z=W("Ff2n"),K=W("ODXe"),n=W("4IlW"),M=W("bX4T"),y=W("YrtM"),m=W("TSYQ"),g=W.n(m),u=W("+nKL"),c=W("8OUc"),f=function(Q,ee){var oe=Q.prefixCls,fe=Q.id,Fe=Q.flattenOptions,Le=Q.childrenAsData,Ie=Q.values,Be=Q.searchValue,We=Q.multiple,ge=Q.defaultActiveFirstOption,ue=Q.height,ke=Q.itemHeight,lt=Q.notFoundContent,ot=Q.open,ut=Q.menuItemSelectedIcon,xt=Q.virtual,Je=Q.onSelect,et=Q.onToggleOpen,dt=Q.onActiveValue,de=Q.onScroll,Ce=Q.onMouseEnter,Ue="".concat(oe,"-item"),Ke=Object(y.a)(function(){return Fe},[ot,Fe],function(tt,Re){return Re[0]&&tt[1]!==Re[1]}),st=k.useRef(null),ht=function(Re){Re.preventDefault()},yt=function(Re){st.current&&st.current.scrollTo({index:Re})},mt=function(Re){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Se=Ke.length,te=0;te<Se;te+=1){var se=(Re+te*Te+Se)%Se,he=Ke[se],me=he.group,xe=he.data;if(!me&&!xe.disabled)return se}return-1},Ot=k.useState(function(){return mt(0)}),Tt=Object(K.a)(Ot,2),Et=Tt[0],Qe=Tt[1],Kt=function(Re){Qe(Re);var Te=Ke[Re];if(!Te){dt(null,-1);return}dt(Te.data.value,Re)};k.useEffect(function(){Kt(ge!==!1?mt(0):-1)},[Ke.length,Be]),k.useEffect(function(){var tt=setTimeout(function(){if(!We&&ot&&Ie.size===1){var Re=Array.from(Ie)[0],Te=Ke.findIndex(function(Se){var te=Se.data;return te.value===Re});Kt(Te),yt(Te)}});return function(){return clearTimeout(tt)}},[ot]);var Ut=function(Re){Re!==void 0&&Je(Re,{selected:!Ie.has(Re)}),We||et(!1)};if(k.useImperativeHandle(ee,function(){return{onKeyDown:function(Re){var Te=Re.which;switch(Te){case n.a.UP:case n.a.DOWN:{var Se=0;if(Te===n.a.UP?Se=-1:Te===n.a.DOWN&&(Se=1),Se!==0){var te=mt(Et+Se,Se);yt(te),Kt(te)}break}case n.a.ENTER:{var se=Ke[Et];se&&!se.data.disabled?Ut(se.data.value):Ut(void 0),ot&&Re.preventDefault();break}case n.a.ESC:et(!1)}},onKeyUp:function(){},scrollTo:function(Re){yt(Re)}}}),Ke.length===0)return k.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),className:"".concat(Ue,"-empty"),onMouseDown:ht},lt);function qe(tt){var Re=Ke[tt];if(!Re)return null;var Te=Re.data||{},Se=Te.value,te=Te.label,se=Te.children,he=Object(M.a)(Te,!0),me=Le?se:te;return Re?k.createElement("div",Object.assign({"aria-label":typeof me=="string"?me:null},he,{key:tt,role:"option",id:"".concat(fe,"_list_").concat(tt),"aria-selected":Ie.has(Se)}),Se):null}return k.createElement(k.Fragment,null,k.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),style:{height:0,width:0,overflow:"hidden"}},qe(Et-1),qe(Et),qe(Et+1)),k.createElement(u.a,{itemKey:"key",ref:st,data:Ke,height:ue,itemHeight:ke,fullHeight:!1,onMouseDown:ht,onScroll:de,virtual:xt,onMouseEnter:Ce},function(tt,Re){var Te,Se=tt.group,te=tt.groupOption,se=tt.data,he=se.label,me=se.key;if(Se)return k.createElement("div",{className:g()(Ue,"".concat(Ue,"-group"))},he!==void 0?he:me);var xe=se.disabled,Me=se.value,Pe=se.title,rt=se.children,ft=se.style,pt=se.className,Bt=Object(z.a)(se,["disabled","value","title","children","style","className"]),wt=Ie.has(Me),Ye="".concat(Ue,"-option"),en=g()(Ue,Ye,pt,(Te={},Object(B.a)(Te,"".concat(Ye,"-grouped"),te),Object(B.a)(Te,"".concat(Ye,"-active"),Et===Re&&!xe),Object(B.a)(Te,"".concat(Ye,"-disabled"),xe),Object(B.a)(Te,"".concat(Ye,"-selected"),wt),Te)),Ge=Le?rt:he,hn=!ut||typeof ut=="function"||wt;return k.createElement("div",Object.assign({},Bt,{"aria-selected":wt,className:en,title:Pe,onMouseMove:function(){if(Et===Re||xe)return;Kt(Re)},onClick:function(){xe||Ut(Me)},style:ft}),k.createElement("div",{className:"".concat(Ye,"-content")},Ge||Me),k.isValidElement(ut)||wt,hn&&k.createElement(c.a,{className:"".concat(Ue,"-option-state"),customizeIcon:ut,customizeIconProps:{isSelected:wt}},wt?"\u2713":null))}))},o=k.forwardRef(f);o.displayName="OptionList";var l=o,s=function(){return null};s.isSelectOption=!0;var a=s,O=function(){return null};O.isSelectOptGroup=!0;var w=O,S=W("VTBJ"),L=W("Zm9Q");function D(b){var Q=b.key,ee=b.props,oe=ee.children,fe=ee.value,Fe=Object(z.a)(ee,["children","value"]);return Object(S.a)({key:Q,value:fe!==void 0?fe:Q,children:oe},Fe)}function A(b){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(b).map(function(ee,oe){if(!k.isValidElement(ee)||!ee.type)return null;var fe=ee.type.isSelectOptGroup,Fe=ee.key,Le=ee.props,Ie=Le.children,Be=Object(z.a)(Le,["children"]);return Q||!fe?D(ee):Object(S.a)(Object(S.a)({key:"__RC_SELECT_GRP__".concat(Fe===null?oe:Fe,"__"),label:Fe},Be),{},{options:A(Ie)})}).filter(function(ee){return ee})}var T=W("2Qr1"),x=W("qNPg"),d=W("U8pU"),E=W("Kwbf"),p=W("WKfj");function v(b){var Q=b.mode,ee=b.options,oe=b.children,fe=b.backfill,Fe=b.allowClear,Le=b.placeholder,Ie=b.getInputElement,Be=b.showSearch,We=b.onSearch,ge=b.defaultOpen,ue=b.autoFocus,ke=b.labelInValue,lt=b.value,ot=b.inputValue,ut=b.optionLabelProp,xt=Q==="multiple"||Q==="tags",Je=Be!==void 0?Be:xt||Q==="combobox",et=ee||A(oe);if(Object(E.a)(Q!=="tags"||et.every(function(Ue){return!Ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Q==="tags"||Q==="combobox"){var dt=et.some(function(Ue){return Ue.options?Ue.options.some(function(Ke){return typeof("value"in Ke?Ke.value:Ke.key)=="number"}):typeof("value"in Ue?Ue.value:Ue.key)=="number"});Object(E.a)(!dt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(Q!=="combobox"||!ut,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(Q==="combobox"||!fe,"`backfill` only works with `combobox` mode."),Object(E.a)(Q==="combobox"||!Ie,"`getInputElement` only work with `combobox` mode."),Object(E.b)(Q!=="combobox"||!Ie||!Fe||!Le,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),We&&!Je&&Q!=="combobox"&&Q!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!ge||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),lt!=null){var de=Object(p.d)(lt);Object(E.a)(!ke||de.every(function(Ue){return Object(d.a)(Ue)==="object"&&("key"in Ue||"value"in Ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!xt||Array.isArray(lt),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var Ce=null;Object(L.a)(oe).some(function(Ue){if(!k.isValidElement(Ue)||!Ue.type)return!1;var Ke=Ue.type;if(Ke.isSelectOption)return!1;if(Ke.isSelectOptGroup){var st=Object(L.a)(Ue.props.children).every(function(ht){return!k.isValidElement(ht)||!Ue.type||ht.type.isSelectOption?!0:(Ce=ht.type,!1)});return!st}return Ce=Ke,!0}),Ce&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ce.displayName||Ce.name||Ce,"`.")),Object(E.a)(ot===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var C=v,F=Object(x.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:A,flattenOptions:T.d,getLabeledValue:T.e,filterOptions:T.b,isValueDisabled:T.g,findValueOption:T.c,warningProps:C,fillOptionsWithMissingValue:T.a}),R=function(b){Object(P.a)(ee,b);var Q=Object(V.a)(ee);function ee(){var oe;return Object(ie.a)(this,ee),oe=Q.apply(this,arguments),oe.selectRef=k.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(G.a)(ee,[{key:"render",value:function(){return k.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),ee}(k.Component);R.Option=a,R.OptGroup=w;var j=R,U=ve.c=j},LicW:function(it,ve,W){"use strict";var ie=W("T2oS"),G=W("W9HT"),P=W("5Dmo"),V=W("3S7+"),k=W("q1tI"),B=W.n(k),z=W("ZJlW"),K=W.n(z),n=W("m3rI"),M=W("TSYQ"),y=W.n(M),m=W("1vsH"),g=W("z4EP"),u=W.n(g),c=W("+GGh"),f=W.n(c),o=W("cFMs"),l=W.n(o),s=W("BdwD"),a=function(w){var S=w.className,L=w.dataSource,D=L===void 0?[]:L,A=w.col,T=A===void 0?4:A,x=w.right,d=w.bottom,E=d===void 0?23:d,p=w.precision,v=p===void 0?0:p,C=w.wrapWidth,F=C===void 0?1200:C,R=w.trackEventItems,j=w.loading,U=Math.floor((F-(T-1)*x)/T);return B.a.createElement(G.a,{spinning:j},B.a.createElement("div",{className:y()(K.a.list,S)},!!D.length&&D.map(function(b,Q){var ee=b.name,oe=b.id,fe=b.identifier,Fe=b.featured,Le=b.school_name,Ie=b.image_url,Be=b.excellent;return B.a.createElement("div",{key:oe,className:K.a.wrap,style:{width:U,marginRight:(1+Q)%T===0?0:x+v,marginBottom:E}},B.a.createElement("a",{target:"_blank",href:"/paths/".concat(fe),className:K.a.li,onClick:function(ge){ge.preventDefault(),R&&Object(m.cb)([R]),Object(m.S)("/paths/".concat(fe))}},B.a.createElement("div",{className:K.a.img},B.a.createElement("img",{className:K.a.cover,src:"".concat(n.a.IMG_SERVER,"/").concat(Ie)}),Fe===1&&B.a.createElement("img",{className:K.a.sign,src:u.a}),Fe===2&&B.a.createElement("img",{className:K.a.sign,src:""}),Fe===3&&B.a.createElement("img",{className:K.a.sign,src:f.a}),Fe===4&&B.a.createElement("img",{className:K.a.sign,src:""}),Fe===5&&B.a.createElement("img",{className:K.a.sign,src:l.a})),B.a.createElement("div",{className:K.a.name},B.a.createElement(V.a,{title:ee},B.a.createElement("span",{className:K.a.e},ee))),B.a.createElement(V.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(Le)},B.a.createElement("div",{className:K.a.unit},B.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Le)),B.a.createElement("div",{className:K.a.tags},B.a.createElement(V.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},B.a.createElement("span",null,B.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),B.a.createElement("span",null,b.stages_count))),B.a.createElement(V.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},B.a.createElement("span",null,B.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),B.a.createElement("span",null,b.members_count))),Be&&B.a.createElement("div",{className:K.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!D.length&&B.a.createElement(s.a,null)))};ve.a=a},M8RZ:function(it,ve,W){"use strict";W.d(ve,"a",function(){return n});var ie=W("fWQN"),G=W("mtLc"),P=W("yKVA"),V=W("879j"),k=W("q1tI"),B=W.n(k),z=W("i8i4"),K=W.n(z),n=function(M){Object(P.a)(m,M);var y=Object(V.a)(m);function m(g){var u;Object(ie.a)(this,m),u=y.call(this,g);var c=window.document;return u.node=c.createElement("div"),c.body.appendChild(u.node),u}return Object(G.a)(m,[{key:"render",value:function(){var u=this.props.children;return Object(z.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(B.a.Component)},MEgm:function(it,ve){it.exports="data:image/png;base64,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"},MI8n:function(it,ve,W){"use strict";W.d(ve,"c",function(){return k}),W.d(ve,"b",function(){return n}),W.d(ve,"e",function(){return M}),W.d(ve,"a",function(){return y}),W.d(ve,"d",function(){return m}),W.d(ve,"f",function(){return g});var ie=W("/cxE"),G=W("pmY6"),P=W("24hK"),V=W("5Y4S"),k;(function(u){u.None=()=>G.a.None;function c(v){return(C,F=null,R)=>{let j=!1,U;return U=v(b=>j?void 0:(U?U.dispose():j=!0,C.call(F,b)),null,R),j&&U.dispose(),U}}u.once=c;function f(v,C){return w((F,R=null,j)=>v(U=>F.call(R,C(U)),null,j))}u.map=f;function o(v,C){return w((F,R=null,j)=>v(U=>{C(U),F.call(R,U)},null,j))}u.forEach=o;function l(v,C){return w((F,R=null,j)=>v(U=>C(U)&&F.call(R,U),null,j))}u.filter=l;function s(v){return v}u.signal=s;function a(...v){return(C,F=null,R)=>Object(G.e)(...v.map(j=>j(U=>C.call(F,U),null,R)))}u.any=a;function O(v,C,F){let R=F;return f(v,j=>(R=C(R,j),R))}u.reduce=O;function w(v){let C;const F=new n({onFirstListenerAdd(){C=v(F.fire,F)},onLastListenerRemove(){C.dispose()}});return F.event}function S(v,C,F=100,R=!1,j){let U,b,Q,ee=0;const oe=new n({leakWarningThreshold:j,onFirstListenerAdd(){U=v(fe=>{ee++,b=C(b,fe),R&&!Q&&(oe.fire(b),b=void 0),clearTimeout(Q),Q=setTimeout(()=>{const Fe=b;b=void 0,Q=void 0,(!R||ee>1)&&oe.fire(Fe),ee=0},F)})},onLastListenerRemove(){U.dispose()}});return oe.event}u.debounce=S;function L(v,C=(F,R)=>F===R){let F=!0,R;return l(v,j=>{const U=F||!C(j,R);return F=!1,R=j,U})}u.latch=L;function D(v,C){return[u.filter(v,C),u.filter(v,F=>!C(F))]}u.split=D;function A(v,C=!1,F=[]){let R=F.slice(),j=v(Q=>{R?R.push(Q):b.fire(Q)});const U=()=>{R&&R.forEach(Q=>b.fire(Q)),R=null},b=new n({onFirstListenerAdd(){j||(j=v(Q=>b.fire(Q)))},onFirstListenerDidAdd(){R&&(C?setTimeout(U):U())},onLastListenerRemove(){j&&j.dispose(),j=null}});return b.event}u.buffer=A;class T{constructor(v){this.event=v}map(v){return new T(f(this.event,v))}forEach(v){return new T(o(this.event,v))}filter(v){return new T(l(this.event,v))}reduce(v,C){return new T(O(this.event,v,C))}latch(){return new T(L(this.event))}debounce(v,C=100,F=!1,R){return new T(S(this.event,v,C,F,R))}on(v,C,F){return this.event(v,C,F)}once(v,C,F){return c(this.event)(v,C,F)}}function x(v){return new T(v)}u.chain=x;function d(v,C,F=R=>R){const R=(...Q)=>b.fire(F(...Q)),j=()=>v.on(C,R),U=()=>v.removeListener(C,R),b=new n({onFirstListenerAdd:j,onLastListenerRemove:U});return b.event}u.fromNodeEventEmitter=d;function E(v,C,F=R=>R){const R=(...Q)=>b.fire(F(...Q)),j=()=>v.addEventListener(C,R),U=()=>v.removeEventListener(C,R),b=new n({onFirstListenerAdd:j,onLastListenerRemove:U});return b.event}u.fromDOMEventEmitter=E;function p(v){return new Promise(C=>c(v)(C))}u.toPromise=p})(k||(k={}));class B{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${B._idPool++}`}start(u){this._stopWatch=new V.a(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}B._idPool=0;let z=-1;class K{constructor(u,c=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=c,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let c=z;if(typeof this.customThreshold=="number"&&(c=this.customThreshold),c<=0||u<c)return;this._stacks||(this._stacks=new Map);const f=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),o=this._stacks.get(f)||0;if(this._stacks.set(f,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=c*.5;let l,s=0;for(const[a,O]of this._stacks)(!l||s<O)&&(l=a,s=O);console.warn(`[${this.name}] potential listener LEAK detected, having ${u} listeners already. MOST frequent listener (${s}):`),console.warn(l)}return()=>{const l=this._stacks.get(f)||0;this._stacks.set(f,l-1)}}}class n{constructor(u){var c;this._disposed=!1,this._options=u,this._leakageMon=z>0?new K(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((c=this._options)===null||c===void 0?void 0:c._profName)?new B(this._options._profName):void 0}get event(){return this._event||(this._event=(u,c,f)=>{var o;this._listeners||(this._listeners=new P.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(c?[u,c]:u);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,c);const a=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),O=Object(G.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const w=this._listeners&&!this._listeners.isEmpty();w||this._options.onLastListenerRemove(this)}});return f instanceof G.b?f.add(O):Array.isArray(f)&&f.push(O),O}),this._event}fire(u){var c,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(let o of this._listeners)this._deliveryQueue.push([o,u]);for((c=this._perfMon)===null||c===void 0||c.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,l]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,l):o[0].call(o[1],l)}catch(s){Object(ie.f)(s)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var u,c,f,o,l;this._disposed||(this._disposed=!0,(u=this._listeners)===null||u===void 0||u.clear(),(c=this._deliveryQueue)===null||c===void 0||c.clear(),(o=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||o===void 0||o.call(f),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class M extends n{constructor(u){super(u);this._isPaused=0,this._eventQueue=new P.a,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}class y extends M{constructor(u){var c;super(u);this._delay=(c=u.delay)!==null&&c!==void 0?c:100}fire(u){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(u)}}class m{constructor(){this.buffers=[]}wrapEvent(u){return(c,f,o)=>u(l=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>c.call(f,l)):c.call(f,l)},void 0,o)}bufferEvents(u){const c=[];this.buffers.push(c);const f=u();return this.buffers.pop(),c.forEach(o=>o()),f}}class g{constructor(){this.listening=!1,this.inputEvent=k.None,this.inputEventListener=G.a.None,this.emitter=new n({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(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(it,ve,W){"use strict";(function(ie,G){W.d(ve,"b",function(){return f}),W.d(ve,"i",function(){return a}),W.d(ve,"f",function(){return O}),W.d(ve,"d",function(){return w}),W.d(ve,"g",function(){return S}),W.d(ve,"h",function(){return L}),W.d(ve,"c",function(){return D}),W.d(ve,"k",function(){return A}),W.d(ve,"j",function(){return T}),W.d(ve,"a",function(){return x}),W.d(ve,"e",function(){return p});var P;const V="en";let k=!1,B=!1,z=!1,K=!1,n=!1,M=!1,y=!1,m,g=V,u,c;const f=typeof self=="object"?self:typeof ie=="object"?ie:{};let o;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?o=f.vscode.process:typeof G!="undefined"&&(o=G);const l=typeof((P=o==null?void 0:o.versions)===null||P===void 0?void 0:P.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!l)c=navigator.userAgent,k=c.indexOf("Windows")>=0,B=c.indexOf("Macintosh")>=0,y=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,z=c.indexOf("Linux")>=0,M=!0,m=navigator.language,g=m;else if(typeof o=="object"){k=o.platform==="win32",B=o.platform==="darwin",z=o.platform==="linux",K=z&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,m=V,g=V;const v=o.env.VSCODE_NLS_CONFIG;if(v)try{const C=JSON.parse(v),F=C.availableLanguages["*"];m=C.locale,g=F||V,u=C._translationsConfigFile}catch(C){}n=!0}else console.error("Unable to resolve platform.");let s=0;B?s=1:k?s=3:z&&(s=2);const a=k,O=B,w=z,S=n,L=M,D=y,A=c,T=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let F=[];f.addEventListener("message",j=>{if(j.data&&j.data.vscodeSetImmediateId)for(let U=0,b=F.length;U<b;U++){const Q=F[U];if(Q.id===j.data.vscodeSetImmediateId){F.splice(U,1),Q.callback();return}}});let R=0;return j=>{const U=++R;F.push({id:U,callback:j}),f.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const C=Promise.resolve();return F=>C.then(F)}(),x=B||y?2:k?1:3;let d=!0,E=!1;function p(){if(!E){E=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const C=new Uint16Array(v.buffer);d=C[0]===(2<<8)+1}return d}}).call(this,W("IyRk"),W("Q2Ig"))},N0LK:function(it,ve,W){"use strict";W.d(ve,"C",function(){return ie}),W.d(ve,"v",function(){return P}),W.d(ve,"s",function(){return V}),W.d(ve,"t",function(){return k}),W.d(ve,"U",function(){return B}),W.d(ve,"J",function(){return z}),W.d(ve,"O",function(){return K}),W.d(ve,"p",function(){return n}),W.d(ve,"T",function(){return M}),W.d(ve,"q",function(){return y}),W.d(ve,"N",function(){return m}),W.d(ve,"M",function(){return g}),W.d(ve,"Q",function(){return u}),W.d(ve,"u",function(){return c}),W.d(ve,"x",function(){return f}),W.d(ve,"I",function(){return o}),W.d(ve,"f",function(){return l}),W.d(ve,"h",function(){return s}),W.d(ve,"g",function(){return a}),W.d(ve,"i",function(){return O}),W.d(ve,"G",function(){return w}),W.d(ve,"H",function(){return S}),W.d(ve,"r",function(){return L}),W.d(ve,"R",function(){return D}),W.d(ve,"d",function(){return A}),W.d(ve,"e",function(){return T}),W.d(ve,"E",function(){return x}),W.d(ve,"F",function(){return d}),W.d(ve,"j",function(){return E}),W.d(ve,"z",function(){return p}),W.d(ve,"K",function(){return C}),W.d(ve,"L",function(){return F}),W.d(ve,"m",function(){return j}),W.d(ve,"k",function(){return b}),W.d(ve,"A",function(){return ee}),W.d(ve,"a",function(){return oe}),W.d(ve,"n",function(){return fe}),W.d(ve,"l",function(){return Fe}),W.d(ve,"D",function(){return Le}),W.d(ve,"B",function(){return Ie}),W.d(ve,"b",function(){return Be}),W.d(ve,"S",function(){return We}),W.d(ve,"o",function(){return ge}),W.d(ve,"P",function(){return ue}),W.d(ve,"w",function(){return ke}),W.d(ve,"c",function(){return lt}),W.d(ve,"y",function(){return xt});function ie(de){return!de||typeof de!="string"?!0:de.trim().length===0}const G=/{(\d+)}/g;function P(de,...Ce){return Ce.length===0?de:de.replace(G,function(Ue,Ke){const st=parseInt(Ke,10);return isNaN(st)||st<0||st>=Ce.length?Ue:Ce[st]})}function V(de){return de.replace(/[<>&]/g,function(Ce){switch(Ce){case"<":return"<";case">":return">";case"&":return"&";default:return Ce}})}function k(de){return de.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function B(de,Ce=" "){const Ue=z(de,Ce);return K(Ue,Ce)}function z(de,Ce){if(!de||!Ce)return de;const Ue=Ce.length;if(Ue===0||de.length===0)return de;let Ke=0;for(;de.indexOf(Ce,Ke)===Ke;)Ke=Ke+Ue;return de.substring(Ke)}function K(de,Ce){if(!de||!Ce)return de;const Ue=Ce.length,Ke=de.length;if(Ue===0||Ke===0)return de;let st=Ke,ht=-1;for(;!(ht=de.lastIndexOf(Ce,st-1),ht===-1||ht+Ue!==st);){if(ht===0)return"";st=ht}return de.substring(0,st)}function n(de){return de.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function M(de){return de.replace(/\*/g,"")}function y(de,Ce,Ue={}){if(!de)throw new Error("Cannot create regex from empty string");Ce||(de=k(de)),Ue.wholeWord&&(/\B/.test(de.charAt(0))||(de="\\b"+de),/\B/.test(de.charAt(de.length-1))||(de=de+"\\b"));let Ke="";return Ue.global&&(Ke+="g"),Ue.matchCase||(Ke+="i"),Ue.multiline&&(Ke+="m"),Ue.unicode&&(Ke+="u"),new RegExp(de,Ke)}function m(de){if(de.source==="^"||de.source==="^$"||de.source==="$"||de.source==="^\\s*$")return!1;const Ce=de.exec("");return!!(Ce&&de.lastIndex===0)}function g(de){return(de.global?"g":"")+(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")}function u(de){return de.split(/\r\n|\r|\n/)}function c(de){for(let Ce=0,Ue=de.length;Ce<Ue;Ce++){const Ke=de.charCodeAt(Ce);if(Ke!==32&&Ke!==9)return Ce}return-1}function f(de,Ce=0,Ue=de.length){for(let Ke=Ce;Ke<Ue;Ke++){const st=de.charCodeAt(Ke);if(st!==32&&st!==9)return de.substring(Ce,Ke)}return de.substring(Ce,Ue)}function o(de,Ce=de.length-1){for(let Ue=Ce;Ue>=0;Ue--){const Ke=de.charCodeAt(Ue);if(Ke!==32&&Ke!==9)return Ue}return-1}function l(de,Ce){return de<Ce?-1:de>Ce?1:0}function s(de,Ce,Ue=0,Ke=de.length,st=0,ht=Ce.length){for(;Ue<Ke&&st<ht;Ue++,st++){let Ot=de.charCodeAt(Ue),Tt=Ce.charCodeAt(st);if(Ot<Tt)return-1;if(Ot>Tt)return 1}const yt=Ke-Ue,mt=ht-st;return yt<mt?-1:yt>mt?1:0}function a(de,Ce){return O(de,Ce,0,de.length,0,Ce.length)}function O(de,Ce,Ue=0,Ke=de.length,st=0,ht=Ce.length){for(;Ue<Ke&&st<ht;Ue++,st++){let Ot=de.charCodeAt(Ue),Tt=Ce.charCodeAt(st);if(Ot===Tt)continue;if(Ot>=128||Tt>=128)return s(de.toLowerCase(),Ce.toLowerCase(),Ue,Ke,st,ht);w(Ot)&&(Ot-=32),w(Tt)&&(Tt-=32);const Et=Ot-Tt;if(Et===0)continue;return Et}const yt=Ke-Ue,mt=ht-st;return yt<mt?-1:yt>mt?1:0}function w(de){return de>=97&&de<=122}function S(de){return de>=65&&de<=90}function L(de,Ce){return de.length===Ce.length&&O(de,Ce)===0}function D(de,Ce){const Ue=Ce.length;return Ce.length>de.length?!1:O(de,Ce,0,Ue)===0}function A(de,Ce){let Ue,Ke=Math.min(de.length,Ce.length);for(Ue=0;Ue<Ke;Ue++)if(de.charCodeAt(Ue)!==Ce.charCodeAt(Ue))return Ue;return Ke}function T(de,Ce){let Ue,Ke=Math.min(de.length,Ce.length);const st=de.length-1,ht=Ce.length-1;for(Ue=0;Ue<Ke;Ue++)if(de.charCodeAt(st-Ue)!==Ce.charCodeAt(ht-Ue))return Ue;return Ke}function x(de){return 55296<=de&&de<=56319}function d(de){return 56320<=de&&de<=57343}function E(de,Ce){return(de-55296<<10)+(Ce-56320)+65536}function p(de,Ce,Ue){const Ke=de.charCodeAt(Ue);if(x(Ke)&&Ue+1<Ce){const st=de.charCodeAt(Ue+1);if(d(st))return E(Ke,st)}return Ke}function v(de,Ce){const Ue=de.charCodeAt(Ce-1);if(d(Ue)&&Ce>1){const Ke=de.charCodeAt(Ce-2);if(x(Ke))return E(Ke,Ue)}return Ue}function C(de,Ce){const Ue=ot.getInstance(),Ke=Ce,st=de.length,ht=p(de,st,Ce);Ce+=ht>=65536?2:1;let yt=Ue.getGraphemeBreakType(ht);for(;Ce<st;){const mt=p(de,st,Ce),Ot=Ue.getGraphemeBreakType(mt);if(lt(yt,Ot))break;Ce+=mt>=65536?2:1,yt=Ot}return Ce-Ke}function F(de,Ce){const Ue=ot.getInstance(),Ke=Ce,st=v(de,Ce);Ce-=st>=65536?2:1;let ht=Ue.getGraphemeBreakType(st);for(;Ce>0;){const yt=v(de,Ce),mt=Ue.getGraphemeBreakType(yt);if(lt(mt,ht))break;Ce-=yt>=65536?2:1,ht=mt}return Ke-Ce}const R=/(?:[\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 j(de){return R.test(de)}const U=/(?:[\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 b(de){return U.test(de)}const Q=/^[\t\n\r\x20-\x7E]*$/;function ee(de){return Q.test(de)}const oe=/[\u2028\u2029]/;function fe(de){return oe.test(de)}function Fe(de){for(let Ce=0,Ue=de.length;Ce<Ue;Ce++)if(Le(de.charCodeAt(Ce)))return!0;return!1}function Le(de){return de=+de,de>=11904&&de<=55215||de>=63744&&de<=64255||de>=65281&&de<=65374}function Ie(de){return de>=127462&&de<=127487||de===8986||de===8987||de===9200||de===9203||de>=9728&&de<=10175||de===11088||de===11093||de>=127744&&de<=128591||de>=128640&&de<=128764||de>=128992&&de<=129003||de>=129280&&de<=129535||de>=129648&&de<=129750}const Be=String.fromCharCode(65279);function We(de){return!!(de&&de.length>0&&de.charCodeAt(0)===65279)}function ge(de,Ce=!1){return de?(Ce&&(de=de.replace(/\\./g,"")),de.toLowerCase()!==de):!1}function ue(de){const Ce=90-65+1;return de=de%(2*Ce),de<Ce?String.fromCharCode(97+de):String.fromCharCode(65+de-Ce)}function ke(de){const Ce=ot.getInstance();return Ce.getGraphemeBreakType(de)}function lt(de,Ce){return de===0?Ce!==5&&Ce!==7:de===2&&Ce===3?!1:de===4||de===2||de===3||(Ce===4||Ce===2||Ce===3)?!0:de===8&&(Ce===8||Ce===9||Ce===11||Ce===12)||((de===11||de===9)&&(Ce===9||Ce===10)||((de===12||de===10)&&Ce===10||(Ce===5||Ce===13||(Ce===7||(de===1||de===13&&Ce===14)))))?!1:!(de===6&&Ce===6)}class ot{constructor(){this._data=ut()}static getInstance(){return ot._INSTANCE||(ot._INSTANCE=new ot),ot._INSTANCE}getGraphemeBreakType(de){if(de<32)return de===10?3:de===13?2:4;if(de<127)return 0;const Ce=this._data,Ue=Ce.length/3;let Ke=1;for(;Ke<=Ue;)if(de<Ce[3*Ke])Ke=2*Ke;else if(de>Ce[3*Ke+1])Ke=2*Ke+1;else return Ce[3*Ke+2];return 0}}ot._INSTANCE=null;function ut(){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 xt(de,Ce){if(de===0)return 0;const Ue=Je(de,Ce);if(Ue!==void 0)return Ue;const Ke=v(Ce,de);return de-=et(Ke),de}function Je(de,Ce){let Ue=v(Ce,de);for(de-=et(Ue);dt(Ue)||Ue===65039||Ue===8419;){if(de===0)return;Ue=v(Ce,de),de-=et(Ue)}if(!Ie(Ue))return;if(de>=0){const Ke=v(Ce,de);Ke===8205&&(de-=et(Ke))}return de}function et(de){return de>=65536?2:1}function dt(de){return 127995<=de&&de<=127999}},NQs2:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___3K14R",flex_space_between:"flex_space_between___1KE7t",flex_box_vertical_center:"flex_box_vertical_center___3Yslx",flex_box_center_end:"flex_box_center_end___2RmV-",flex_box_column:"flex_box_column___3k3IQ",banner:"banner___3caau",content:"content___fxe_p",btns:"btns___Vv-WB"}},NcEG:function(it,ve,W){"use strict";W.r(ve);var ie=W("+L6B"),G=W("2/Rp"),P=W("5NDa"),V=W("5rEg"),k=W("Znn+"),B=W("ZTPi"),z=W("2qtc"),K=W("kLXV"),n=W("14J3"),M=W("BMrR"),y=W("jCWc"),m=W("kPKH"),g=W("sPJy"),u=W("bE4q"),c=W("/zsF"),f=W("PArb"),o=W("miYZ"),l=W("tsqr"),s=W("9og8"),a=W("k1fw"),O=W("oBTY"),w=W("y8nQ"),S=W("Vl3Y"),L=W("tJVT"),D=W("PpiC"),A=W("B9cy"),T=W("Ol7k"),x=W("lUTK"),d=W("BvKs"),E=W("WmNS"),p=W.n(E),v=W("q1tI"),C=W.n(v),F=W("Ty5D"),R=W("55Ip"),j=W("9kvl"),U=W("tgas"),b=W("jb+D"),Q=W("BdwD"),ee=W("giR+"),oe=W("fyUT"),fe=W("sRBo"),Fe=W("kaz8"),Le=W("5Dmo"),Ie=W("3S7+"),Be=W("V0Rq"),We=W("Ot1p"),ge=W("9Bee"),ue=W("xvzu"),ke=W.n(ue),lt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ot=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.onRef,en=Ye===void 0?function(){}:Ye,Ge=Pe.editData,hn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),At=Object(v.useState)([]),Ft=Object(L.a)(At,2),Gt=Ft[0],on=Ft[1],_t=Object(v.useState)(),tn=Object(L.a)(_t,2),St=tn[0],It=tn[1],Yt=Object(v.useState)([]),mn=Object(L.a)(Yt,2),ln=mn[0],Jt=mn[1],Rt=Object(v.useState)(""),Gn=Object(L.a)(Rt,2),un=Gn[0],vn=Gn[1],Qt=Object(v.useState)(5),An=Object(L.a)(Qt,2),zn=An[0],Nn=An[1],at=Object(v.useState)(!1),Wt=Object(L.a)(at,2),Vn=Wt[0],bn=Wt[1],cn=Object(F.i)();Object(v.useEffect)(function(){on(["","","",""])},[]),Object(v.useEffect)(function(){if(!(Ge!=null&&Ge.question_choices)){bn(!0);return}vn(Ge==null?void 0:Ge.question_title),Nn(parseInt(Ge==null?void 0:Ge.question_score)),on(Ge==null?void 0:Ge.question_choices.map(function(X){return X.choice_text}));var q=[];Ge==null||Ge.standard_answer.map(function(X,le){q.push(X-1)}),Jt(q)},[Ge]),Object(v.useImperativeHandle)(rt,function(){return{onSave:Mn,isEdit:Vn}});var Mn=function(){var q=Object(s.a)(p.a.mark(function X(){var le,Ve,Ze;return p.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(un){Xe.next=3;break}return l.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),Xe.abrupt("return",!1);case 3:if(le=Gt.findIndex(function(bt){return!bt}),!(le>-1)){Xe.next=7;break}return l.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(lt[le]," \u9009\u9879\u7684\u5185\u5BB9")),Xe.abrupt("return",!1);case 7:if(ln.length){Xe.next=10;break}return l.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),Xe.abrupt("return",!1);case 10:if(!(ln.length<1)){Xe.next=13;break}return l.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),Xe.abrupt("return",!1);case 13:if(Ve=Gt.map(function(bt,Zt){return{choice_text:bt,is_answer:ln.includes(Zt)?Zt+1:0}}),!Ge.question_id){Xe.next=20;break}return Xe.next=17,wt({type:"exercise/editExerciseQuestion",payload:{id:Ge.question_id,question_title:un,question_type:1,question_score:"5.0",question_choices:Ve.map(function(bt){return bt.choice_text}),standard_answers:Ve.filter(function(bt){return bt.is_answer}).map(function(bt){return bt.is_answer})}});case 17:Ze=Xe.sent,Xe.next=23;break;case 20:return Xe.next=22,wt({type:"exercise/addExerciseQuestion",payload:{categoryId:cn.categoryId,question_title:un,question_type:1,question_score:"5.0",question_choices:Ve.map(function(bt){return bt.choice_text}),standard_answers:Ve.filter(function(bt){return bt.is_answer}).map(function(bt){return bt.is_answer})}});case 22:Ze=Xe.sent;case 23:Ze.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),bn(!1),wt({type:"exercise/editExercise",payload:Object(a.a)({},cn)}));case 24:case"end":return Xe.stop()}},X)}));return function(){return q.apply(this,arguments)}}(),Y=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],_=function(){var q=Object(s.a)(p.a.mark(function X(le){return p.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:Ze.t0=le.id,Ze.next=Ze.t0==="del"?3:Ze.t0==="up"||Ze.t0==="down"?5:Ze.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function Xe(){return p.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Object(Be.n)({id:Ge.question_id});case 2:wt({type:"exercise/editExercise",payload:Object(a.a)({},cn)});case 3:case"end":return Zt.stop()}},Xe)}))()}}),Ze.abrupt("break",11);case 5:return Ze.next=7,wt({type:"exercise/exeriseMoveUpDown",payload:{id:Ge.question_id,opr:le.id}});case 7:return wt({type:"exercise/editExercise",payload:Object(a.a)({},cn)}),Ze.abrupt("break",11);case 9:return bn(!0),Ze.abrupt("break",11);case 11:case"end":return Ze.stop()}},X)}));return function(le){return q.apply(this,arguments)}}(),I=function(){var X;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ge.key,"\u3001\u591A\u9009\u9898"),"\uFF08",Ge.question_score,"\u5206\uFF09"),!Ge.hideAction&&Y.map(function(le,Ve){return le.id==="up"&&Ge.key===1||le.id==="down"&&Ge.key===Ge.len?null:C.a.createElement(Ie.a,{key:Ve,placement:"bottom",title:le.name},C.a.createElement("span",{onClick:function(){return _(le)},className:le.icon}))})),C.a.createElement("div",{className:"mt5"},C.a.createElement(ge.a,{value:Ge.question_title})),C.a.createElement("div",{className:ke.a.questionChoices},Ge==null||((X=Ge.question_choices)===null||X===void 0)?void 0:X.map(function(le,Ve){return C.a.createElement(M.a,null,C.a.createElement(m.a,null,C.a.createElement(Fe.a,{key:Ve,checked:Ge.standard_answer.includes(Ve+1),disabled:!0},lt[Ve],".")),C.a.createElement(m.a,{flex:"1"},C.a.createElement("span",{className:"c-black font14"},C.a.createElement(ge.a,{value:le.choice_text}))))})))},H=function(){return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u9898\u5E72\uFF1A")),C.a.createElement(We.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:un,onChange:function(le){return vn(le)}}),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",C.a.createElement("span",{className:ke.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Gt.map(function(X,le){return C.a.createElement("div",{className:ke.a.choiceWrap,key:le},C.a.createElement(Ie.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},C.a.createElement("div",{className:"".concat(ke.a.answer," ").concat(ln.includes(le)?ke.a.activeAnswer:""),onClick:function(){ln.includes(le)?Jt(ln.filter(function(Ze){return Ze!==le})):Jt([].concat(Object(O.a)(ln),[le]))}},lt[le])),C.a.createElement("div",{className:ke.a.editorWrap},St===le?C.a.createElement(We.a,{id:"single-question-option-".concat(le),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:X,onChange:function(Ze){Gt[le]=Ze,on(Gt)}}):C.a.createElement("div",{className:ke.a.htmlWrap,onClick:function(){return It(le)}},C.a.createElement(ge.a,{value:X}))),le>1&&C.a.createElement(Ie.a,{title:"\u5220\u9664"},C.a.createElement("i",{className:"".concat(ke.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return on(Gt.filter(function(Ze,Lt){return Lt!==le}))}})),le<7&&le===Gt.length-1&&C.a.createElement(Ie.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},C.a.createElement("i",{className:"".concat(ke.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return on([].concat(Object(O.a)(Gt),[""]))}})))}),C.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),C.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",C.a.createElement(oe.a,{value:zn,max:1e4,min:-1,onChange:function(le){Nn(le)}})," ","\u5206"),C.a.createElement("aside",{className:"tr"},Ge.question_id&&C.a.createElement(G.a,{type:"default",onClick:function(){return bn(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return Mn()}},"\u4FDD\u5B58")))};return C.a.createElement("section",{className:ke.a.wrap},!Vn&&I(),Vn&&H())},ut=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(ot)),xt=W("7Kak"),Je=W("9yH6"),et=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],dt=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.onRef,en=Ye===void 0?function(){}:Ye,Ge=Pe.editData,hn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),At=Object(v.useState)([]),Ft=Object(L.a)(At,2),Gt=Ft[0],on=Ft[1],_t=Object(v.useState)(),tn=Object(L.a)(_t,2),St=tn[0],It=tn[1],Yt=Object(v.useState)([]),mn=Object(L.a)(Yt,2),ln=mn[0],Jt=mn[1],Rt=Object(v.useState)(""),Gn=Object(L.a)(Rt,2),un=Gn[0],vn=Gn[1],Qt=Object(v.useState)(0),An=Object(L.a)(Qt,2),zn=An[0],Nn=An[1],at=Object(v.useState)(!1),Wt=Object(L.a)(at,2),Vn=Wt[0],bn=Wt[1],cn=Object(F.i)();Object(v.useEffect)(function(){on(["","","",""])},[]),Object(v.useEffect)(function(){if(!(Ge!=null&&Ge.question_choices)){bn(!0);return}vn(Ge==null?void 0:Ge.question_title),Nn(parseInt(Ge==null?void 0:Ge.question_score)),on(Ge==null?void 0:Ge.question_choices.map(function(X){return X.choice_text}));var q=[];Ge==null||Ge.standard_answer.map(function(X,le){q.push(X-1)}),Jt(q)},[Ge]),Object(v.useImperativeHandle)(rt,function(){return{onSave:Mn,isEdit:Vn}});var Mn=function(){var q=Object(s.a)(p.a.mark(function X(){var le,Ve,Ze;return p.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(un){Xe.next=3;break}return l.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),Xe.abrupt("return",!1);case 3:if(le=Gt.findIndex(function(bt){return!bt}),!(le>-1)){Xe.next=7;break}return l.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(et[le]," \u9009\u9879\u7684\u5185\u5BB9")),Xe.abrupt("return",!1);case 7:if(ln.length){Xe.next=10;break}return l.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),Xe.abrupt("return",!1);case 10:if(!(ln.length<1)){Xe.next=13;break}return l.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),Xe.abrupt("return",!1);case 13:if(Ve=Gt.map(function(bt,Zt){return{choice_text:bt,is_answer:ln.includes(Zt)?Zt+1:0}}),!Ge.question_id){Xe.next=20;break}return Xe.next=17,Object(U.u)({id:Ge.question_id,question_title:un,question_type:1,question_score:zn,question_choices:Ve.map(function(bt){return bt.choice_text}),standard_answers:Ve.filter(function(bt){return bt.is_answer}).map(function(bt){return bt.is_answer})});case 17:Ze=Xe.sent,Xe.next=23;break;case 20:return Xe.next=22,Object(U.a)({exercise_bank_id:cn.topicId,question_title:un,question_type:1,question_score:"5.0",question_choices:Ve.map(function(bt){return bt.choice_text}),standard_answers:Ve.filter(function(bt){return bt.is_answer}).map(function(bt){return bt.is_answer})});case 22:Ze=Xe.sent;case 23:return Ze.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),bn(!1)),Xe.next=26,wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},cn)});case 26:case"end":return Xe.stop()}},X)}));return function(){return q.apply(this,arguments)}}(),Y=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],_=function(){var q=Object(s.a)(p.a.mark(function X(le){return p.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:Ze.t0=le.id,Ze.next=Ze.t0==="del"?3:Ze.t0==="up"||Ze.t0==="down"?5:Ze.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function Xe(){return p.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Object(U.e)({pollsId:Ge.question_id});case 2:wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},cn)});case 3:case"end":return Zt.stop()}},Xe)}))()}}),Ze.abrupt("break",11);case 5:return Ze.next=7,Object(U.j)({exerciseId:Ge==null?void 0:Ge.question_id,opr:le.id});case 7:return wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},cn)}),Ze.abrupt("break",11);case 9:return bn(!0),Ze.abrupt("break",11);case 11:case"end":return Ze.stop()}},X)}));return function(le){return q.apply(this,arguments)}}(),I=function(){var X;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ge.key,"\u3001\u5355\u9009\u9898"),"\uFF08",Ge.question_score,"\u5206\uFF09"),!Ge.hideAction&&Y.map(function(le,Ve){return le.id==="up"&&Ge.key===1||le.id==="down"&&Ge.key===Ge.len?null:C.a.createElement(Ie.a,{key:Ve,placement:"bottom",title:le.name},C.a.createElement("span",{onClick:function(){return _(le)},className:le.icon}))})),C.a.createElement("div",{className:"mt5"},C.a.createElement(ge.a,{value:Ge.question_title})),C.a.createElement("div",{className:ke.a.questionChoices},Ge==null||((X=Ge.question_choices)===null||X===void 0)?void 0:X.map(function(le,Ve){return C.a.createElement(M.a,null,C.a.createElement(m.a,null,C.a.createElement(Je.a,{key:Ve,checked:Ge.standard_answer.includes(Ve+1),disabled:!0},et[Ve],".")),C.a.createElement(m.a,{flex:"1"},C.a.createElement("span",{className:"c-black font14"},C.a.createElement(ge.a,{value:le.choice_text}))))})))},H=function(){return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u9898\u5E72\uFF1A")),C.a.createElement(We.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:un,onChange:function(le){return vn(le)}}),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",C.a.createElement("span",{className:ke.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Gt.map(function(X,le){return C.a.createElement("div",{className:ke.a.choiceWrap,key:le},C.a.createElement(Ie.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},C.a.createElement("div",{className:"".concat(ke.a.answer," ").concat(ln.includes(le)?ke.a.activeAnswer:""),onClick:function(){ln.includes(le)?Jt(ln.filter(function(Ze){return Ze!==le})):Jt([].concat(Object(O.a)(ln),[le]))}},et[le])),C.a.createElement("div",{className:ke.a.editorWrap},St===le?C.a.createElement(We.a,{id:"single-question-option-".concat(le),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:X,onChange:function(Ze){Gt[le]=Ze,on(Gt)}}):C.a.createElement("div",{className:ke.a.htmlWrap,onClick:function(){return It(le)}},C.a.createElement(ge.a,{value:X}))),le>1&&C.a.createElement(Ie.a,{title:"\u5220\u9664"},C.a.createElement("i",{className:"".concat(ke.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return on(Gt.filter(function(Ze,Lt){return Lt!==le}))}})),le<7&&le===Gt.length-1&&C.a.createElement(Ie.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},C.a.createElement("i",{className:"".concat(ke.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return on([].concat(Object(O.a)(Gt),[""]))}})))}),C.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),C.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",C.a.createElement(oe.a,{value:zn,max:1e4,min:-1,onChange:function(le){Nn(le)}})," ","\u5206"),C.a.createElement("aside",{className:"tr"},Ge.question_id&&C.a.createElement(G.a,{type:"default",onClick:function(){return bn(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return Mn()}},"\u4FDD\u5B58")))};return C.a.createElement("section",{className:ke.a.wrap},!Vn&&I(),Vn&&H())},de=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(dt)),Ce=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ue=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.onRef,en=Ye===void 0?function(){}:Ye,Ge=Pe.editData,hn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),At=Object(v.useState)(),Ft=Object(L.a)(At,2),Gt=Ft[0],on=Ft[1],_t=Object(v.useState)(""),tn=Object(L.a)(_t,2),St=tn[0],It=tn[1],Yt=Object(v.useState)(!1),mn=Object(L.a)(Yt,2),ln=mn[0],Jt=mn[1],Rt=Object(v.useState)(5),Gn=Object(L.a)(Rt,2),un=Gn[0],vn=Gn[1],Qt=Object(F.i)();Object(v.useEffect)(function(){if(!(Ge!=null&&Ge.question_choices)){Jt(!0);return}It(Ge==null?void 0:Ge.question_title),vn(Ge==null?void 0:Ge.question_score),on(Ge.standard_answer[0]+"")},[Ge]),Object(v.useImperativeHandle)(rt,function(){return{onSave:An,isEdit:ln}});var An=function(){var Vn=Object(s.a)(p.a.mark(function bn(){var cn,Mn;return p.a.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(St){_.next=3;break}return l.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),_.abrupt("return",!1);case 3:if(Gt){_.next=6;break}return l.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),_.abrupt("return",!1);case 6:if(cn=[{choice_text:"\u6B63\u786E",is_answer:Gt==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Gt==="2"?2:0}],!Ge.question_id){_.next=13;break}return _.next=10,Object(U.u)({id:Ge.question_id,question_title:St,question_type:2,question_score:un,question_choices:cn.map(function(I){return I.choice_text}),standard_answers:cn.filter(function(I){return I.is_answer}).map(function(I){return I.is_answer})});case 10:Mn=_.sent,_.next=16;break;case 13:return _.next=15,Object(U.a)({exercise_bank_id:Qt.topicId,question_title:St,question_type:2,question_score:un,question_choices:cn.map(function(I){return I.choice_text}),standard_answers:cn.filter(function(I){return I.is_answer}).map(function(I){return I.is_answer})});case 15:Mn=_.sent;case 16:return Mn.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),Jt(!1)),wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qt)}),_.abrupt("return",{name:St,choices:cn});case 19:case"end":return _.stop()}},bn)}));return function(){return Vn.apply(this,arguments)}}(),zn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Nn=function(){var Vn=Object(s.a)(p.a.mark(function bn(cn){return p.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:Y.t0=cn.id,Y.next=Y.t0==="del"?3:Y.t0==="up"||Y.t0==="down"?5:Y.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function I(){return p.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.next=2,Object(U.e)({pollsId:Ge.question_id});case 2:wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qt)});case 3:case"end":return q.stop()}},I)}))()}}),Y.abrupt("break",11);case 5:return Y.next=7,Object(U.j)({exerciseId:Ge==null?void 0:Ge.question_id,opr:cn.id});case 7:return wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qt)}),Y.abrupt("break",11);case 9:return Jt(!0),Y.abrupt("break",11);case 11:case"end":return Y.stop()}},bn)}));return function(cn){return Vn.apply(this,arguments)}}(),at=function(){var bn;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ge.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",Ge.question_score,"\u5206\uFF09"),!Ge.hideAction&&zn.map(function(cn,Mn){return cn.id==="up"&&Ge.key===1||cn.id==="down"&&Ge.key===Ge.len?null:C.a.createElement(Ie.a,{key:Mn,placement:"bottom",title:cn.name},C.a.createElement("span",{onClick:function(){return Nn(cn)},className:cn.icon}))})),C.a.createElement("div",{className:"mt5"},Ge.question_title),C.a.createElement("div",{className:ke.a.questionChoices},Ge==null||((bn=Ge.question_choices)===null||bn===void 0)?void 0:bn.map(function(cn,Mn){return C.a.createElement(Je.a,{key:Mn,checked:Ge.standard_answer.includes(Mn+1),disabled:!0},Ce[Mn],"."," ",C.a.createElement("span",{className:"c-black font14"},cn.choice_text))})))},Wt=function(){return C.a.createElement("aside",null,C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u9898\u5E72\uFF1A")),C.a.createElement(We.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:St,onChange:function(cn){return It(cn)}}),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.required},"*"),C.a.createElement("span",{className:ke.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",C.a.createElement("span",{className:ke.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),C.a.createElement(Je.a.Group,{buttonStyle:"solid",value:Gt,onChange:function(cn){return on(cn.target.value)}},C.a.createElement(Je.a.Button,{value:"1",className:"".concat(ke.a.radio," mr40")},"\u6B63\u786E"),C.a.createElement(Je.a.Button,{value:"2",className:ke.a.radio},"\u9519\u8BEF")),C.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),C.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",C.a.createElement(oe.a,{value:un,max:1e4,min:-1,onChange:function(cn){vn(cn)}})," ","\u5206"),C.a.createElement("aside",{className:"tr"},Ge.question_id&&C.a.createElement(G.a,{type:"default",onClick:function(){return Jt(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return An()}},"\u4FDD\u5B58")))};return C.a.createElement("section",{className:ke.a.wrap},!ln&&at(),ln&&Wt())},Ke=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Ue)),st=W("kqOp"),ht=W("7qnI"),yt=W("1vsH"),mt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ot=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.editData,en=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","editData"]),Ge=Object(v.useState)(""),hn=Object(L.a)(Ge,2),At=hn[0],Ft=hn[1],Gt=Object(v.useState)(""),on=Object(L.a)(Gt,2),_t=on[0],tn=on[1],St=Object(v.useState)([]),It=Object(L.a)(St,2),Yt=It[0],mn=It[1],ln=Object(v.useState)(""),Jt=Object(L.a)(ln,2),Rt=Jt[0],Gn=Jt[1],un=Object(v.useState)(),vn=Object(L.a)(un,2),Qt=vn[0],An=vn[1],zn=Object(v.useState)(!1),Nn=Object(L.a)(zn,2),at=Nn[0],Wt=Nn[1],Vn=Object(v.useState)(5),bn=Object(L.a)(Vn,2),cn=bn[0],Mn=bn[1],Y=Object(v.useState)(!1),_=Object(L.a)(Y,2),I=_[0],H=_[1],q=Object(F.i)();Object(v.useEffect)(function(){if(!(Ye!=null&&Ye.question_title)){H(!0);return}Ft(Ye==null?void 0:Ye.question_title),An(Ye==null?void 0:Ye.is_ordered),Mn(Ye==null?void 0:Ye.question_score);var gn=Ye==null?void 0:Ye.standard_answer.map(function(Pt){return Pt.answer_text});mn(gn)},[ft.editData]),Object(v.useEffect)(function(){Wt(!1)},[I]),Object(v.useImperativeHandle)(rt,function(){return{onSave:X,isEdit:I}});var X=function(){var gn=Object(s.a)(p.a.mark(function Pt(){var jt,nn,rn;return p.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:if(jt=[],nn=!1,Yt.forEach(function(dn,ci){jt.push({choice_id:ci+1,answer_text:[]}),dn.forEach(function(cr,gr){jt[ci].answer_text.push(cr),(!cr||!Object(yt.db)(cr,1e4))&&(Gn("".concat(ci,"-").concat(gr)),l.b.info(cr?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),nn=!0)})}),!nn){$n.next=5;break}return $n.abrupt("return",!1);case 5:if(!Ye.question_id){$n.next=11;break}return $n.next=8,Object(U.u)({id:Ye.question_id,question_title:At,question_type:3,question_score:cn,is_ordered:Qt,standard_answers:jt});case 8:rn=$n.sent,$n.next=14;break;case 11:return $n.next=13,Object(U.a)({exercise_bank_id:q.topicId,question_title:At,question_type:3,question_score:cn,is_ordered:Qt,standard_answers:jt});case 13:rn=$n.sent;case 14:return rn.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),H(!1)),wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},q)}),$n.abrupt("return",{name:At,analysis:_t,standard_answers:jt,is_ordered:Qt});case 17:case"end":return $n.stop()}},Pt)}));return function(){return gn.apply(this,arguments)}}(),le=function(Pt,jt,nn){var rn=Yt.slice();if(jt&&rn.splice(Pt,jt),nn&&at)for(var En=0;En<nn;En++)rn.splice(Pt+En,0,[""]);Wt(!0),mn(rn)},Ve=function(Pt,jt,nn){Gn("");var rn=Yt.slice();rn[Pt][jt]=nn,mn(rn)},Ze=function(Pt){var jt=Yt.slice();jt[Pt]=[].concat(Object(O.a)(jt[Pt]),[""]),mn(jt)},Lt=function(Pt,jt){var nn=Yt.slice();if(!nn[Pt][jt]){nn[Pt]=nn[Pt].filter(function(rn,En){return En!==jt}),mn(nn);return}K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ke.a.modal,onOk:function(){nn[Pt]=nn[Pt].filter(function(En,$n){return $n!==jt}),mn(nn)}})},Xe=function(Pt){K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ke.a.modal,onOk:function(){var nn=Yt.slice();nn=Yt.filter(function(rn,En){return Pt!==En}),mn(nn)}})},bt=function(){return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),C.a.createElement("div",null,C.a.createElement(st.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:At,onChange:function(jt){return Ft(jt)},showNullButton:!0,onPlaceholderChange:le})),C.a.createElement("div",{className:"mt20"},Yt.map(function(Pt,jt){return C.a.createElement(ht.a,{key:jt,answers:Pt,index:jt,is_md:!0,activeOptionErrorIndex:Rt,onAnswerChange:Ve,addChildAnswer:Ze,deleteChildAnswer:Lt,deleteChildAnswermain:Xe})})),C.a.createElement("div",{className:"mt20"},Yt.length>1&&C.a.createElement("span",null,C.a.createElement(Fe.a,{checked:Qt,onChange:function(jt){return An(jt.target.checked)},className:"".concat(ke.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),C.a.createElement("span",{className:"".concat(ke.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),C.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",C.a.createElement(oe.a,{value:cn,max:1e4,min:-1,onChange:function(jt){Mn(jt)}})," ","\u5206"),C.a.createElement("aside",{className:"tr"},Ye.question_id&&C.a.createElement(G.a,{type:"default",onClick:function(){return H(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return X()}},"\u4FDD\u5B58")))},Zt=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Wn=function(){var gn=Object(s.a)(p.a.mark(function Pt(jt){return p.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:rn.t0=jt.id,rn.next=rn.t0==="del"?3:rn.t0==="up"||rn.t0==="down"?5:rn.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function $n(){return p.a.wrap(function(ci){for(;;)switch(ci.prev=ci.next){case 0:return ci.next=2,Object(U.e)({pollsId:Ye.question_id});case 2:wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},q)});case 3:case"end":return ci.stop()}},$n)}))()}}),rn.abrupt("break",11);case 5:return rn.next=7,Object(U.j)({exerciseId:Ye==null?void 0:Ye.question_id,opr:jt.id});case 7:return wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},q)}),rn.abrupt("break",11);case 9:return H(!0),rn.abrupt("break",11);case 11:case"end":return rn.stop()}},Pt)}));return function(jt){return gn.apply(this,arguments)}}(),qn=function(){var Pt;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ye.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",Ye.question_score,"\u5206\uFF09"),!Ye.hideAction&&Zt.map(function(jt,nn){return jt.id==="up"&&Ye.key===1||jt.id==="down"&&Ye.key===Ye.len?null:C.a.createElement(Ie.a,{key:nn,placement:"bottom",title:jt.name},C.a.createElement("span",{onClick:function(){return Wn(jt)},className:jt.icon}))})),C.a.createElement("div",{className:"mt5"},Ye.question_title),C.a.createElement("div",{className:ke.a.questionChoices},Ye==null||((Pt=Ye.standard_answer)===null||Pt===void 0)?void 0:Pt.map(function(jt,nn){return C.a.createElement(M.a,null,C.a.createElement(m.a,null,"\u7B54\u6848\uFF08\u586B\u7A7A",jt.choice_id,"\uFF09\uFF1A"),C.a.createElement(m.a,{flex:"1"},C.a.createElement(V.a,{key:nn,checked:Ye.standard_answer.includes(nn),disabled:!0,value:jt.answer_text})))})))};return C.a.createElement("section",{className:ke.a.wrap},!I&&qn(),I&&bt())},Tt=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Ot)),Et=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Qe=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.onRef,en=Ye===void 0?function(){}:Ye,Ge=Pe.editData,hn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),At=Object(v.useState)(""),Ft=Object(L.a)(At,2),Gt=Ft[0],on=Ft[1],_t=Object(v.useState)(""),tn=Object(L.a)(_t,2),St=tn[0],It=tn[1],Yt=Object(v.useState)(""),mn=Object(L.a)(Yt,2),ln=mn[0],Jt=mn[1],Rt=Object(v.useState)(5),Gn=Object(L.a)(Rt,2),un=Gn[0],vn=Gn[1],Qt=Object(v.useState)(!1),An=Object(L.a)(Qt,2),zn=An[0],Nn=An[1],at=Object(F.i)();Object(v.useEffect)(function(){var Y;if(!(Ge!=null&&Ge.question_title)){Nn(!0);return}on(Ge==null?void 0:Ge.question_title),Jt(Ge==null||((Y=Ge.standard_answer)===null||Y===void 0)?void 0:Y[0]),vn(Ge==null?void 0:Ge.question_score)},[ft.editData]),Object(v.useImperativeHandle)(rt,function(){return{onSave:Wt,isEdit:zn}});var Wt=function(){var Y=Object(s.a)(p.a.mark(function _(){var I;return p.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(Gt){q.next=3;break}return l.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),q.abrupt("return",!1);case 3:if(!Ge.question_id){q.next=9;break}return q.next=6,Object(U.u)({id:Ge.question_id,question_title:Gt,question_type:4,question_score:un,standard_answers:[ln]});case 6:I=q.sent,q.next=12;break;case 9:return q.next=11,Object(U.a)({exercise_bank_id:at.topicId,question_title:Gt,question_type:4,question_score:un,standard_answers:[ln]});case 11:I=q.sent;case 12:return I.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),Nn(!1),wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},at)})),q.abrupt("return",{name:Gt,answer_texts:[ln],analysis:St});case 14:case"end":return q.stop()}},_)}));return function(){return Y.apply(this,arguments)}}(),Vn=function(){return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),C.a.createElement(We.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Gt,onChange:function(I){return on(I)}}),C.a.createElement("p",{className:ke.a.titleWrap},C.a.createElement("span",{className:ke.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),C.a.createElement(We.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:ln,onChange:function(I){return Jt(I)}}),C.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",C.a.createElement(oe.a,{value:un,max:1e4,min:-1,onChange:function(I){vn(I)}})," ","\u5206"),C.a.createElement("aside",{className:"tr"},Ge.question_id&&C.a.createElement(G.a,{type:"default",onClick:function(){return Nn(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return Wt()}},"\u4FDD\u5B58")))},bn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],cn=function(){var Y=Object(s.a)(p.a.mark(function _(I){return p.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:q.t0=I.id,q.next=q.t0==="del"?3:q.t0==="up"||q.t0==="down"?5:q.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function le(){return p.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,Object(U.e)({pollsId:Ge.question_id});case 2:wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},at)});case 3:case"end":return Ze.stop()}},le)}))()}}),q.abrupt("break",11);case 5:return q.next=7,Object(U.j)({exerciseId:Ge==null?void 0:Ge.question_id,opr:I.id});case 7:return wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},at)}),q.abrupt("break",11);case 9:return Nn(!0),q.abrupt("break",11);case 11:case"end":return q.stop()}},_)}));return function(I){return Y.apply(this,arguments)}}(),Mn=function(){return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ge.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",Ge.question_score,"\u5206\uFF09"),!Ge.hideAction&&bn.map(function(_,I){return _.id==="up"&&Ge.key===1||_.id==="down"&&Ge.key===Ge.len?null:C.a.createElement(Ie.a,{key:I,placement:"bottom",title:_.name},C.a.createElement("span",{onClick:function(){return cn(_)},className:_.icon}))})),C.a.createElement("div",{className:"mt5"},Ge.question_title),C.a.createElement("div",{className:ke.a.questionChoices},C.a.createElement("p",null,C.a.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),C.a.createElement(ge.a,{value:ln})))};return C.a.createElement("section",{className:ke.a.wrap},!zn&&Mn(),zn&&Vn())},Kt=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Qe)),Ut=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],qe=function(Pe,rt){var ft=Pe.problemset,pt=Pe.globalSetting,Bt=Pe.loading,wt=Pe.dispatch,Ye=Pe.editData,en=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","editData"]),Ge=Object(v.useState)(""),hn=Object(L.a)(Ge,2),At=hn[0],Ft=hn[1],Gt=Object(v.useState)(""),on=Object(L.a)(Gt,2),_t=on[0],tn=on[1],St=Object(v.useState)(""),It=Object(L.a)(St,2),Yt=It[0],mn=It[1],ln=Object(v.useState)([]),Jt=Object(L.a)(ln,2),Rt=Jt[0],Gn=Jt[1],un=Object(v.useState)(""),vn=Object(L.a)(un,2),Qt=vn[0],An=vn[1],zn=Object(v.useState)(),Nn=Object(L.a)(zn,2),at=Nn[0],Wt=Nn[1],Vn=Object(v.useState)(!1),bn=Object(L.a)(Vn,2),cn=bn[0],Mn=bn[1],Y=Object(v.useState)([]),_=Object(L.a)(Y,2),I=_[0],H=_[1],q=Object(v.useState)(!1),X=Object(L.a)(q,2),le=X[0],Ve=X[1],Ze=Object(F.i)();Object(v.useEffect)(function(){var qn;Ye.edit&&Ve(!0),Ft(Ye.shixun_name),tn(Ye.question_title);var gn=[];(qn=Ye.shixun)===null||qn===void 0||qn.map(function(Pt){gn.push(Pt.challenge_score)}),H(gn)},[Ye]),Object(v.useEffect)(function(){Mn(!1)},[le]),Object(v.useImperativeHandle)(rt,function(){return{onSave:Lt,isEdit:le}});var Lt=function(){var qn=Object(s.a)(p.a.mark(function gn(){var Pt,jt,nn;return p.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(Pt=[],jt=!1,!jt){En.next=4;break}return En.abrupt("return",!1);case 4:if(!Ye.question_id){En.next=10;break}return En.next=7,Object(U.u)({id:Ye.question_id,question_title:_t,shixun_name:At,shixun_id:Ye.shixun_id,question_type:5,question_scores:I});case 7:nn=En.sent,En.next=13;break;case 10:return En.next=12,Object(U.a)({exercise_bank_id:Ze.topicId,question_title:_t,shixun_name:At,shixun_id:Ye.shixun_id,question_type:5,question_scores:I});case 12:nn=En.sent;case 13:return nn.status===0&&(l.b.success("\u4FDD\u5B58\u6210\u529F"),Ve(!1)),En.next=16,wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ze)});case 16:return En.abrupt("return",{name:_t,analysis:Yt,standard_answers:Pt,is_ordered:at});case 17:case"end":return En.stop()}},gn)}));return function(){return qn.apply(this,arguments)}}(),Xe=function(){var gn;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),C.a.createElement("div",{className:"mt10"},C.a.createElement(V.a,{defaultValue:At,onChange:function(jt){Ft(jt.target.value)}})),C.a.createElement("div",{className:"mt10"},C.a.createElement(We.a,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:_t,onChange:function(jt){tn(jt)}})),C.a.createElement("div",{className:"mt20"},(gn=Ye.shixun)===null||gn===void 0?void 0:gn.map(function(Pt,jt){return C.a.createElement(M.a,{gutter:[20,20]},C.a.createElement(m.a,{flex:"1"},jt+1,".",Pt.challenge_name),C.a.createElement(m.a,null,C.a.createElement(oe.a,{defaultValue:I[jt],onChange:function(rn){I[jt]=rn,H(I),console.log("srore:L",I[jt])}})))})),C.a.createElement("div",{className:"mt20"},Rt.length>1&&C.a.createElement("span",null,C.a.createElement(Fe.a,{checked:at,onChange:function(jt){return Wt(jt.target.checked)},className:"".concat(ke.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),C.a.createElement("span",{className:"".concat(ke.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),C.a.createElement("aside",{className:"tr"},!(Ye!=null&&Ye.edit)&&C.a.createElement(G.a,{type:"default",onClick:function(){return Ve(!1)}},"\u53D6\u6D88"),C.a.createElement(G.a,{className:"ml20",type:"primary",onClick:function(){return Lt()}},"\u4FDD\u5B58")))},bt=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Zt=function(){var qn=Object(s.a)(p.a.mark(function gn(Pt){return p.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:nn.t0=Pt.id,nn.next=nn.t0==="del"?3:nn.t0==="up"||nn.t0==="down"?5:nn.t0==="edit"?9:11;break;case 3:return K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(p.a.mark(function En(){return p.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(U.e)({pollsId:Ye.question_id});case 2:wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ze)});case 3:case"end":return dn.stop()}},En)}))()}}),nn.abrupt("break",11);case 5:return nn.next=7,Object(U.j)({exerciseId:Ye==null?void 0:Ye.question_id,opr:Pt.id});case 7:return wt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ze)}),nn.abrupt("break",11);case 9:return Ve(!0),nn.abrupt("break",11);case 11:case"end":return nn.stop()}},gn)}));return function(Pt){return qn.apply(this,arguments)}}(),Wn=function(){var gn;return C.a.createElement("aside",null,C.a.createElement("div",{className:ke.a.questionType},C.a.createElement("div",null,C.a.createElement("span",{className:"font16 c-blue"},Ye.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",Ye.question_score,"\u5206\uFF09"),C.a.createElement("div",{className:"tr"},C.a.createElement(R.a,{target:"_blank",to:"/shixuns/".concat(Ye.shixun_identifier,"/challenges")},"\u5B9E\u8BAD\u8BE6\u60C5"),!Ye.hideAction&&bt.map(function(Pt,jt){return Pt.id==="up"&&Ye.key===1||Pt.id==="down"&&Ye.key===Ye.len?null:C.a.createElement(Ie.a,{key:jt,placement:"bottom",title:Pt.name},C.a.createElement("span",{onClick:function(){return Zt(Pt)},className:Pt.icon}))}))),C.a.createElement("div",{className:"font16"},Ye.shixun_name),C.a.createElement("div",{className:"mt30"}),(gn=Ye.shixun)===null||gn===void 0?void 0:gn.map(function(Pt,jt){return C.a.createElement("div",{key:jt},"\u7B2C",jt+1,"\u5173"," ",C.a.createElement("span",{className:"ml10"},Pt.challenge_name)," ",C.a.createElement("span",{className:"ml10"},Pt.challenge_score))}))};return C.a.createElement("section",{className:ke.a.wrap},!le&&Wn(),le&&Xe())},tt=Object(j.a)(function(Me){var Pe=Me.problemset,rt=Me.loading,ft=Me.globalSetting;return{problemset:Pe,globalSetting:ft,loading:rt.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(qe)),Re=W("UU91"),Te=W.n(Re),Se=W("fJjg"),te=d.a.SubMenu,se=T.a.Content,he=T.a.Sider,me=function(Pe){var rt,ft,pt,Bt,wt,Ye,en,Ge,hn,At,Ft,Gt,on,_t,tn,St,It,Yt,mn,ln,Jt,Rt,Gn,un,vn,Qt,An,zn,Nn,at,Wt,Vn,bn,cn,Mn,Y,_,I,H,q,X,le,Ve,Ze,Lt,Xe,bt,Zt,Wn,qn,gn,Pt,jt,nn,rn,En,$n,dn=Pe.polls,ci=Pe.globalSetting,cr=Pe.loading,gr=Pe.user,br=Pe.dispatch,Hr=Object(D.a)(Pe,["polls","globalSetting","loading","user","dispatch"]),fi=Object(F.i)(),Di=Object(F.h)(),dr=gr.userInfo,Kr=S.a.useForm(),Ar=Object(L.a)(Kr,1),ai=Ar[0],Un=Object(v.useState)([]),pi=Object(L.a)(Un,2),yn=pi[0],mi=pi[1],Jn=Object(v.useState)(!1),nr=Object(L.a)(Jn,2),Si=nr[0],Pi=nr[1],Gr=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],Qi=Object(v.useRef)();Object(v.useEffect)(function(){var gi;if((gi=dn.exerciseBanks)!==null&&gi!==void 0&&gi.exercise_questions){var Xn,Ci,Ti,qi,Nt;mi(Object(O.a)((Xn=dn.exerciseBanks)===null||Xn===void 0?void 0:Xn.exercise_questions)),ai.setFieldsValue({exercise_name:(Ci=dn.exerciseBanks)===null||Ci===void 0||((Ti=Ci.exercise)===null||Ti===void 0)?void 0:Ti.exercise_name,exercise_description:(qi=dn.exerciseBanks)===null||qi===void 0||((Nt=qi.exercise)===null||Nt===void 0)?void 0:Nt.exercise_description})}},[dn.exerciseBanks]),Object(v.useEffect)(function(){br({type:"polls/getExerciseBanks",payload:Object(a.a)({},fi)})},[fi.categoryId]);var Sr=function(){var gi=Object(s.a)(p.a.mark(function Xn(){var Ci,Ti,qi;return p.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,ai.validateFields();case 2:return qi=ai.getFieldValue(),qi.is_md=!0,qi.topicId=(Ci=dn.exerciseBanks)===null||Ci===void 0||((Ti=Ci.exercise)===null||Ti===void 0)?void 0:Ti.id,Pi(!1),an.next=8,Object(U.v)(Object(a.a)({},qi));case 8:br({type:"polls/getExerciseBanks",payload:Object(a.a)({},fi)});case 9:case"end":return an.stop()}},Xn)}));return function(){return gi.apply(this,arguments)}}(),ir=function(){var gi=Object(s.a)(p.a.mark(function Xn(Ci){var Ti;return p.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.next=2,Qi==null?void 0:Qi.current;case 2:if(Ti=Nt.sent,!(Ti!=null&&Ti.isEdit)){Nt.next=6;break}return l.b.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898"),Nt.abrupt("return");case 6:Ci===5?br({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):mi([].concat(Object(O.a)(yn),[{question_type:Ci}]));case 7:case"end":return Nt.stop()}},Xn)}));return function(Ci){return gi.apply(this,arguments)}}(),Zi=function(){br({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[fi.topicId],object_type:"exercise"}}})},zr=function(){return yn==null?void 0:yn.map(function(Xn,Ci){if(Xn.key=Ci+1,Xn.len=yn.length,Xn.question_type===0)return C.a.createElement("aside",null,C.a.createElement(de,{ref:Qi,editData:Xn}),C.a.createElement(f.a,null));if(Xn.question_type===1)return C.a.createElement("aside",null,C.a.createElement(ut,{ref:Qi,editData:Xn}),C.a.createElement(f.a,null));if(Xn.question_type===2)return C.a.createElement("aside",null,C.a.createElement(Ke,{ref:Qi,editData:Xn}),C.a.createElement(f.a,null));if(Xn.question_type===3)return C.a.createElement("aside",null,C.a.createElement(Tt,{editData:Xn}),C.a.createElement(f.a,null));if(Xn.question_type===4)return C.a.createElement("aside",null,C.a.createElement(Kt,{editData:Xn}),C.a.createElement(f.a,null));if(Xn.question_type===5)return C.a.createElement("aside",null,C.a.createElement(tt,{editData:Xn}),C.a.createElement(f.a,null))})};return C.a.createElement("section",{className:"edu-container"},C.a.createElement("section",{className:"animated fadeIn"},C.a.createElement("aside",{className:"mt10"},dr&&C.a.createElement(u.a,{separator:">"},C.a.createElement(u.a.Item,null,C.a.createElement(R.a,{to:"/users/".concat(fi.username,"/").concat(fi.topictype==="personal"?"topics":"topicbank","/").concat(fi.topictype)},fi.topictype==="personal"?"\u6211\u7684\u9898\u5E93":"\u516C\u5171\u9898\u5E93")),C.a.createElement(u.a.Item,null,"\u8BE6\u60C5"))),C.a.createElement("aside",{className:[Te.a.title,"mt20"].join(" ")},C.a.createElement(M.a,{style:{width:"100%"},align:"middle"},C.a.createElement(m.a,{flex:"1"},C.a.createElement("strong",{className:"font20 ml5"},(rt=dn.exerciseBanks)===null||rt===void 0||((ft=rt.exercise)===null||ft===void 0)?void 0:ft.exercise_name),C.a.createElement(yt.m,{status:[(pt=dn.exerciseBanks)!==null&&pt!==void 0&&(Bt=pt.exercise)!==null&&Bt!==void 0&&Bt.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),C.a.createElement(m.a,null,C.a.createElement(R.a,{className:"font16 c-light-black",to:"/users/".concat(dr.login,"/topics/").concat(fi.topictype)},"\u8FD4\u56DE"))))),C.a.createElement("section",{className:[Te.a.bg,"pl30","pr30","pb30","mt20 relative"].join(" ")},C.a.createElement("div",{className:Te.a.export},((wt=dn.exerciseBanks)===null||wt===void 0?void 0:wt.authorize)&&C.a.createElement(C.a.Fragment,null,C.a.createElement("a",{onClick:function(Xn){Xn.preventDefault(),K.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){var Ci=Object(s.a)(p.a.mark(function qi(){var Nt;return p.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Xt.next=2,Object(b.g)({object_type:"normal",object_id:[fi.topicId]});case 2:Nt=Xt.sent,Nt.status===0&&j.d.push("/users/".concat(fi.username,"/topics/personal"));case 4:case"end":return Xt.stop()}},qi)}));function Ti(){return Ci.apply(this,arguments)}return Ti}()})}},"\u5220\u9664"),C.a.createElement(R.a,{to:"/users/".concat(dr.login,"/topics/").concat(fi.topicId,"/").concat(fi.topictype,"/exercise/edit")},"\u7F16\u8F91")),C.a.createElement("a",{onClick:function(Xn){Xn.preventDefault(),Zi()}},"\u53D1\u9001")),C.a.createElement(B.a,{className:Te.a.tabs},C.a.createElement(B.a.TabPane,{tab:C.a.createElement("span",{className:"font16 pt10 pb12"},"\u5185\u5BB9\u8BE6\u60C5"),key:"1"},C.a.createElement("div",{className:"c-light-black"},(Ye=dn.exerciseBanks)===null||Ye===void 0||((en=Ye.exercise)===null||en===void 0)?void 0:en.exercise_description))),Si&&C.a.createElement(S.a,{layout:"vertical",form:ai},C.a.createElement(S.a.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},C.a.createElement(V.a,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),C.a.createElement(S.a.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},C.a.createElement(V.a.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),C.a.createElement(S.a.Item,{className:"tr"},C.a.createElement(G.a,{type:"primary",onClick:function(){Sr()}},"\u4FDD\u5B58")))),C.a.createElement("p",{className:"mt10",style:{display:"flex"}},C.a.createElement("span",{className:"fl",style:{flex:"1"}},!!((Ge=dn.exerciseBanks)!==null&&Ge!==void 0&&(hn=Ge.exercise_types)!==null&&hn!==void 0&&hn.q_singles)&&C.a.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(At=dn.exerciseBanks)===null||At===void 0||((Ft=At.exercise_types)===null||Ft===void 0)?void 0:Ft.q_singles,"\u9898\uFF0C\u5171",(Gt=dn.exerciseBanks)===null||Gt===void 0||((on=Gt.exercise_types)===null||on===void 0)?void 0:on.q_singles_scores,"\u5206"),!!((_t=dn.exerciseBanks)!==null&&_t!==void 0&&(tn=_t.exercise_types)!==null&&tn!==void 0&&tn.q_doubles)&&C.a.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(St=dn.exerciseBanks)===null||St===void 0||((It=St.exercise_types)===null||It===void 0)?void 0:It.q_doubles,"\u9898\uFF0C\u5171",(Yt=dn.exerciseBanks)===null||Yt===void 0||((mn=Yt.exercise_types)===null||mn===void 0)?void 0:mn.q_doubles_scores,"\u5206"),!!((ln=dn.exerciseBanks)!==null&&ln!==void 0&&(Jt=ln.exercise_types)!==null&&Jt!==void 0&&Jt.q_judges)&&C.a.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(Rt=dn.exerciseBanks)===null||Rt===void 0||((Gn=Rt.exercise_types)===null||Gn===void 0)?void 0:Gn.q_judges,"\u9898\uFF0C\u5171",(un=dn.exerciseBanks)===null||un===void 0||((vn=un.exercise_types)===null||vn===void 0)?void 0:vn.q_judges_scores,"\u5206"),!!((Qt=dn.exerciseBanks)!==null&&Qt!==void 0&&(An=Qt.exercise_types)!==null&&An!==void 0&&An.q_nulls)&&C.a.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(zn=dn.exerciseBanks)===null||zn===void 0||((Nn=zn.exercise_types)===null||Nn===void 0)?void 0:Nn.q_nulls,"\u9898\uFF0C\u5171",(at=dn.exerciseBanks)===null||at===void 0||((Wt=at.exercise_types)===null||Wt===void 0)?void 0:Wt.q_nulls_scores,"\u5206"),!!((Vn=dn.exerciseBanks)!==null&&Vn!==void 0&&(bn=Vn.exercise_types)!==null&&bn!==void 0&&bn.q_mains)&&C.a.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(cn=dn.exerciseBanks)===null||cn===void 0||((Mn=cn.exercise_types)===null||Mn===void 0)?void 0:Mn.q_mains,"\u9898\uFF0C\u5171",(Y=dn.exerciseBanks)===null||Y===void 0||((_=Y.exercise_types)===null||_===void 0)?void 0:_.q_mains_scores,"\u5206"),!!((I=dn.exerciseBanks)!==null&&I!==void 0&&(H=I.exercise_types)!==null&&H!==void 0&&H.q_shixuns)&&C.a.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(q=dn.exerciseBanks)===null||q===void 0||((X=q.exercise_types)===null||X===void 0)?void 0:X.q_shixuns,"\u9898\uFF0C\u5171",(le=dn.exerciseBanks)===null||le===void 0||((Ve=le.exercise_types)===null||Ve===void 0)?void 0:Ve.q_shixuns_scores,"\u5206"),!!((Ze=dn.exerciseBanks)!==null&&Ze!==void 0&&(Lt=Ze.exercise_types)!==null&&Lt!==void 0&&Lt.q_pros)&&C.a.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(Xe=dn.exerciseBanks)===null||Xe===void 0||((bt=Xe.exercise_types)===null||bt===void 0)?void 0:bt.q_pros,"\u9898\uFF0C\u5171",(Zt=dn.exerciseBanks)===null||Zt===void 0||((Wn=Zt.exercise_types)===null||Wn===void 0)?void 0:Wn.q_pros_scores,"\u5206")),C.a.createElement("span",{className:"fr"},!!((qn=dn.exerciseBanks)!==null&&qn!==void 0&&(gn=qn.exercise_types)!==null&&gn!==void 0&&gn.q_counts)&&C.a.createElement("span",null,"\u5408\u8BA1"," ",C.a.createElement("span",{className:"color-blue"},(Pt=dn.exerciseBanks)===null||Pt===void 0||((jt=Pt.exercise_types)===null||jt===void 0)?void 0:jt.q_counts)," ","\u9898\uFF0C \u5171"," ",C.a.createElement("span",{className:"".concat(((nn=dn.exerciseBanks)===null||nn===void 0||((rn=nn.exercise_types)===null||rn===void 0)?void 0:rn.q_scores)>100?"color-red font-bd":"color-orange")},(En=dn.exerciseBanks)===null||En===void 0||(($n=En.exercise_types)===null||$n===void 0)?void 0:$n.q_scores)," ","\u5206"))),C.a.createElement("section",{className:[Te.a.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},yn!=""&&zr(),yn==""&&C.a.createElement(Q.a,null)),C.a.createElement(Se.a,null))},xe=ve.default=Object(j.a)(function(Me){var Pe=Me.polls,rt=Me.loading,ft=Me.user,pt=Me.globalSetting;return{polls:Pe,globalSetting:pt,user:ft,loading:rt.effects}})(me)},Nf5h:function(it,ve,W){"use strict";W.d(ve,"a",function(){return K}),W.d(ve,"h",function(){return c}),W.d(ve,"l",function(){return s}),W.d(ve,"e",function(){return D}),W.d(ve,"i",function(){return d}),W.d(ve,"j",function(){return ge}),W.d(ve,"c",function(){return ue.a}),W.d(ve,"b",function(){return xt}),W.d(ve,"g",function(){return de}),W.d(ve,"f",function(){return st}),W.d(ve,"k",function(){return Ut}),W.d(ve,"d",function(){return Te});var ie=W("q1tI"),G=W.n(ie),P=W("NQs2"),V=W.n(P),k=W("ygoZ"),B=W.n(k),z=function(te){var se=te.dataSource,he=se===void 0?[]:se,me=te.img,xe=te.imgWidth,Me=xe===void 0?346:xe,Pe=te.title,rt=te.sunTitle,ft=te.bannerExtraContent;return G.a.createElement("div",{className:V.a.banner},G.a.createElement("div",{className:V.a.content},G.a.createElement("aside",null,G.a.createElement("p",null,G.a.createElement("b",null,Pe),G.a.createElement("span",null,rt)),he.length>0&&G.a.createElement("div",{className:V.a.btns},he.map(function(pt,Bt){return G.a.createElement("div",{key:Bt,onClick:pt.click},pt.name,pt.sign?G.a.createElement("img",{src:B.a,width:39}):null)})),ft),G.a.createElement("img",{style:{marginTop:33,marginRight:38},src:me,width:Me})))},K=z,n=W("tJVT"),M=W("6nfa"),y=W.n(M),m=W("TSYQ"),g=W.n(m),u=function(te){var se=te.dataSource,he=se===void 0?[]:se,me=te.value,xe=te.onChange,Me=te.className,Pe=te.title,rt=te.titleWidth,ft=rt===void 0?41:rt,pt=te.style,Bt=pt===void 0?{}:pt,wt=te.fontColor,Ye=wt===void 0?"#6A7283":wt,en=Object(ie.useState)(0),Ge=Object(n.a)(en,2),hn=Ge[0],At=Ge[1],Ft=Object(ie.useState)(!1),Gt=Object(n.a)(Ft,2),on=Gt[0],_t=Gt[1],tn=Object(ie.useRef)(null);return Object(ie.useEffect)(function(){if(he.length!==0){var St;(tn==null||((St=tn.current)===null||St===void 0)?void 0:St.clientHeight)>92?At(1):At(0)}he.length===0&&At(0)},[he]),G.a.createElement("div",{className:g()(y.a.row,Me),style:Bt},G.a.createElement("div",{style:{width:ft,marginTop:on?12:4},className:y.a.title},Pe),G.a.createElement("div",{className:on?"".concat(y.a.tagsWrap," ").concat(y.a.tagsBorderWrap):y.a.tagsWrap},G.a.createElement("div",{className:y.a.bar,style:hn>0?{height:hn===1?92:"auto",overflow:hn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},G.a.createElement("div",{className:y.a.name,ref:tn},he==null?void 0:he.map(function(St){return G.a.createElement("span",{onClick:function(){return xe(St.id)},key:St.id,title:St.name,style:{color:Ye},className:me===St.id?y.a.active:""},St.name)}))),!!hn&&G.a.createElement(ie.Fragment,null,hn===1?G.a.createElement("div",{onClick:function(){var It;At(2),(tn==null||((It=tn.current)===null||It===void 0)?void 0:It.clientHeight)>205?_t(!0):_t(!1)},className:y.a.action},"\u5C55\u5F00",G.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):G.a.createElement("div",{onClick:function(){At(1),_t(!1)},className:y.a.action},"\u6536\u8D77",G.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},c=u,f=W("cz0n"),o=W.n(f),l=function(te){var se=te.dataSource,he=se===void 0?[]:se,me=te.value,xe=te.onChange,Me=te.className;return G.a.createElement("div",{className:g()(o.a.tabs,Me)},he.map(function(Pe){return G.a.createElement("span",{onClick:function(){return xe(Pe.id)},className:me===Pe.id?o.a.active:"",key:Pe.id},Pe.name)}))},s=l,a=W("5NDa"),O=W("5rEg"),w=W("KOXS"),S=W.n(w),L=function(te){var se,he=te.dataSource,me=he===void 0?[]:he,xe=te.value,Me=te.onChange,Pe=te.className,rt=te.style,ft=rt===void 0?{}:rt,pt=te.placeholder,Bt=Object(ie.useState)(""),wt=Object(n.a)(Bt,2),Ye=wt[0],en=wt[1],Ge=Object(ie.useState)(""),hn=Object(n.a)(Ge,2),At=hn[0],Ft=hn[1];Object(ie.useEffect)(function(){var _t;(_t=JSON.stringify(xe))!==null&&_t!==void 0&&_t.includes("{")?(en(xe.id),Ft(xe.value)):Ft(xe)},[xe]);var Gt=function(){Me(At||null,Ye||"")},on=function(tn){if(tn===Ye)return;en(tn),Me(At,tn)};return G.a.createElement("div",{className:g()(S.a.input,Pe),style:ft},!!me.length&&G.a.createElement("div",{className:S.a.dropdown},G.a.createElement("div",{className:S.a.text},(se=me.find(function(_t){return _t.id===Ye}))===null||se===void 0?void 0:se.name,G.a.createElement("i",{className:"iconfont icon-zhankai4"}),G.a.createElement("b",{className:S.a.b1}),G.a.createElement("b",{className:S.a.b2})),G.a.createElement("div",{className:S.a.menu},me.map(function(_t,tn){return G.a.createElement("div",{key:tn,onClick:function(){return on(_t.id)}},_t.name)}))),G.a.createElement(O.a,{onPressEnter:Gt,value:At,onChange:function(tn){return Ft(tn.target.value||"")},bordered:!1,placeholder:pt}),G.a.createElement("i",{onClick:Gt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},D=L,A=W("f9pc"),T=W.n(A),x=function(te){var se=te.value,he=te.onChange,me=te.className,xe=te.total,Me=te.pageSize,Pe=te.style,rt=Pe===void 0?{}:Pe,ft=se<2,pt=se>=Math.ceil(xe/Me);return xe<=Me?G.a.createElement(G.a.Fragment,null):G.a.createElement("div",{className:g()(T.a.quickPager,me),style:rt},G.a.createElement("div",{onClick:function(){ft||he(se-1,"prev")},className:ft?T.a.disabled:""},"\u4E0A\u4E00\u9875"),G.a.createElement("div",{onClick:function(){pt||he(se+1,"next")},className:pt?T.a.disabled:""},"\u4E0B\u4E00\u9875"))},d=x,E=W("T2oS"),p=W("W9HT"),v=W("pC0b"),C=W("GzdX"),F=W("5Dmo"),R=W("3S7+"),j=W("Oe0F"),U=W.n(j),b=W("m3rI"),Q=W("1vsH"),ee=W("JAbv"),oe=W.n(ee),fe=W("Bq7L"),Fe=W.n(fe),Le=W("MEgm"),Ie=W.n(Le),Be=W("BdwD"),We=function(te){var se=te.className,he=te.dataSource,me=he===void 0?[]:he,xe=te.col,Me=xe===void 0?4:xe,Pe=te.right,rt=te.bottom,ft=rt===void 0?23:rt,pt=te.precision,Bt=pt===void 0?0:pt,wt=te.wrapWidth,Ye=wt===void 0?1200:wt,en=te.trackEventItems,Ge=te.loading,hn=Math.floor((Ye-(Me-1)*Pe)/Me);return G.a.createElement(p.a,{spinning:Ge},G.a.createElement("div",{className:g()(U.a.list,se)},!!me.length&&me.map(function(At,Ft){var Gt=At.name,on=At.id,_t=At.identifier,tn=At.power,St=At.cover_image_id,It=At.pic;return G.a.createElement("div",{className:U.a.wrap,key:on,style:{width:hn,marginRight:(1+Ft)%Me===0?0:Pe+Bt,marginBottom:ft}},G.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(_t,"/challenges"),className:U.a.li,onClick:function(mn){mn.preventDefault(),en&&Object(Q.cb)([en]),tn&&Object(Q.S)("/shixuns/".concat(_t,"/challenges"))}},G.a.createElement("div",{className:U.a.img},G.a.createElement("img",{className:U.a.cover,src:St?"".concat(b.a.API_SERVER,"/api/attachments/").concat(St):"".concat(b.a.IMG_SERVER,"/").concat(It)}),At.is_jupyter&&G.a.createElement("img",{className:U.a.sign,src:oe.a}),At.is_jupyter_lab&&G.a.createElement("img",{className:U.a.sign,src:Fe.a}),At.is_unity_3d&&G.a.createElement("img",{className:U.a.sign,src:Ie.a})),G.a.createElement("div",{className:U.a.name},G.a.createElement(R.a,{title:Gt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},G.a.createElement("span",{className:U.a.e},Gt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),G.a.createElement("div",{className:U.a.tags},G.a.createElement(R.a,{placement:"bottom",title:"\u5173\u5361\u6570"},G.a.createElement("span",null,G.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),G.a.createElement("span",null,At.challenges_count))),!!At.myshixuns_count&&G.a.createElement(R.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},G.a.createElement("span",null,G.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),G.a.createElement("span",null,At.myshixuns_count))),G.a.createElement(R.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},G.a.createElement("span",null,G.a.createElement("span",null,At.level))),G.a.createElement("div",{className:U.a.rate},G.a.createElement(C.a,{allowHalf:!0,disabled:!0,defaultValue:At.score_info}),G.a.createElement("span",null,"\xA0",At.score_info?"".concat(At.score_info,"\u5206"):"5\u5206")))),!tn&&G.a.createElement("div",{className:U.a.lockWrap},G.a.createElement("img",{src:"".concat(b.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),G.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!me.length&&G.a.createElement(Be.a,null)))},ge=We,ue=W("LicW"),ke=W("iL++"),lt=W.n(ke),ot=W("xiVL"),ut=function(te){var se=te.className,he=te.dataSource,me=he===void 0?[]:he,xe=te.col,Me=xe===void 0?4:xe,Pe=te.right,rt=te.bottom,ft=rt===void 0?23:rt,pt=te.precision,Bt=pt===void 0?0:pt,wt=te.wrapWidth,Ye=wt===void 0?1200:wt,en=te.trackEventItems,Ge=te.loading,hn=Math.floor((Ye-(Me-1)*Pe)/Me);return G.a.createElement(p.a,{spinning:Ge},G.a.createElement("div",{className:g()(lt.a.list,se)},!!me.length&&me.map(function(At,Ft){var Gt=At.subject_identifier,on=At.id,_t=At.identifier,tn=At.power,St=At.is_public!=0&&At.is_public;return G.a.createElement("div",{className:lt.a.wrap,key:on,style:{width:hn,marginRight:(1+Ft)%Me===0?0:Pe+Bt,marginBottom:ft}},G.a.createElement("a",{className:lt.a.li,onClick:function(Yt){Yt.preventDefault()}},G.a.createElement("div",{className:lt.a.top},G.a.createElement(R.a,{title:At.name},G.a.createElement("div",{className:lt.a.name},At.name)),G.a.createElement("img",{className:lt.a.img,src:b.a.IMG_SERVER+"/images/"+At.avatar_url}),G.a.createElement("div",{className:lt.a.text},At.creator),Gt&&G.a.createElement("div",{className:lt.a.btns},G.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),G.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),St&&G.a.createElement("div",{className:lt.a.sign},"\u516C\u5F00")),G.a.createElement("div",{className:lt.a.bottom},At.visits>0&&G.a.createElement(R.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},G.a.createElement("span",null,G.a.createElement("i",{className:"iconfont icon-liulanyan"}),G.a.createElement("span",null,At.visits))),At.course_members_count>0&&G.a.createElement(R.a,{title:"\u6210\u5458",placement:"bottom"},G.a.createElement("span",null,G.a.createElement("i",{className:"iconfont icon-chengyuan"}),At.course_members_count)),At.tasks_count>0&&G.a.createElement(R.a,{title:"\u4F5C\u4E1A",placement:"bottom"},G.a.createElement("span",null,G.a.createElement("i",{className:"iconfont icon-zuoye"}),At.tasks_count)),At.is_end?G.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):G.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),G.a.createElement("div",{className:lt.a.lockWrap},At.is_accessible?G.a.createElement(G.a.Fragment,null,Gt&&G.a.createElement("div",{onClick:function(){return Object(Q.S)("/paths/".concat(Gt))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),G.a.createElement("div",{onClick:function(Yt){en&&Object(Q.cb)([en]),Object(Q.S)(At.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):G.a.createElement(G.a.Fragment,null,G.a.createElement("img",{src:"".concat(b.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),G.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!me.length&&G.a.createElement(Be.a,null)))},xt=ut,Je=W("f0W+"),et=W.n(Je),dt=function(te){var se=te.dataSource,he=se===void 0?[]:se,me=te.value,xe=te.onChange,Me=te.className,Pe=te.style,rt=Pe===void 0?{}:Pe,ft=te.tabBarExtraContent;return G.a.createElement("div",{className:g()(et.a.tabs,Me),style:rt},G.a.createElement("div",{className:et.a.tabsWrap},he.map(function(pt,Bt){return G.a.createElement("div",{onClick:function(){return xe(pt.id)},className:me===pt.id?et.a.active:"",key:Bt},pt.name)})),G.a.createElement("div",{className:et.a.tabBar},ft))},de=dt,Ce=W("9JIy"),Ue=W.n(Ce),Ke=function(te){var se=te.className,he=te.style,me=he===void 0?{}:he,xe=te.children;return G.a.createElement("div",{className:g()(Ue.a.table,se),style:me},xe)},st=Ke,ht=W("qVdP"),yt=W("jsC+"),mt=W("lUTK"),Ot=W("BvKs"),Tt=W("8WcF"),Et=W.n(Tt),Qe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],Kt=function(te){var se,he=te.sortValue,me=te.dropValue,xe=te.className,Me=te.onSort,Pe=te.onDrop,rt=te.dataSource,ft=rt===void 0?Qe:rt;return G.a.createElement("div",{className:g()(Et.a.orderWrap,xe)},G.a.createElement(yt.a,{overlay:G.a.createElement(Ot.a,null,ft.map(function(pt,Bt){return G.a.createElement(Ot.a.Item,{key:Bt,onClick:function(){return Pe(pt.id)}},pt.name)}))},G.a.createElement("span",{className:Et.a.orderTextWrap},(se=ft.find(function(pt){return me===pt.id}))===null||se===void 0?void 0:se.name)),G.a.createElement("span",{className:Et.a.orderIconWrap},G.a.createElement("span",{className:Et.a.orderAsc},G.a.createElement("i",{className:he==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(Et.a.cursorPointer," ").concat(Et.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(Et.a.cursorPointer),onClick:function(){return Me(he==="asc"?"desc":"asc")}})),G.a.createElement("span",{className:Et.a.orderDesc},G.a.createElement("i",{className:he==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(Et.a.cursorPointer," ").concat(Et.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(Et.a.cursorPointer),onClick:function(){return Me(he==="asc"?"desc":"asc")}}))))},Ut=Kt,qe=W("siWv"),tt=W.n(qe),Re=function(te){var se=te.className,he=te.style,me=te.children,xe=te.onClick;return G.a.createElement("div",{onClick:xe,className:g()(tt.a.btn,se),style:he},me)},Te=Re},Nska:function(it,ve,W){it.exports={title:"title___18s87",radioWrap:"radioWrap___3ZobS",radio:"radio___19YEl",colorFF0000:"colorFF0000___2BuLq",pagination:"pagination___18hXH"}},O2Wb:function(it,ve,W){it.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},Oe0F:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___1lU21",flex_space_between:"flex_space_between___3CfJd",flex_box_vertical_center:"flex_box_vertical_center___20q2h",flex_box_center_end:"flex_box_center_end___1jeZT",flex_box_column:"flex_box_column___2EyZF",list:"list___3Kz8E",wrap:"wrap___12_X7",lockWrap:"lockWrap___9zL4z",li:"li___2bcH1",cover:"cover___1j6mq",img:"img___3itdG",sign:"sign___1Bm21",name:"name___3H1zU",e:"e___1W7k4",tags:"tags___G1tID",rate:"rate___aZiJa"}},Ot1p:function(it,ve,W){"use strict";var ie=W("2qtc"),G=W("kLXV"),P=W("rAM+"),V=W("miYZ"),k=W("tsqr"),B=W("9og8"),z=W("tJVT"),K=W("jrin"),n=W("WmNS"),M=W.n(n),y=W("q1tI"),m=W.n(y),g=W("VrN/"),u=W.n(g),c=W("bdgK"),f=W("p77/"),o=W("Bd2K"),l=W("ELLl"),s=W("19Vz"),a=W("lZu9"),O=W("+NIl"),w=W("kSUc"),S=W("9Bee"),L=function(xe){var Me=xe.value,Pe=Me===void 0?"":Me,rt=xe.className,ft=xe.showTextOnly,pt=xe.showLines,Bt=xe.style,wt=Bt===void 0?{}:Bt,Ye=Object(y.useMemo)(function(){return""},[Pe]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ye}}))},D=W("0Owb"),A=W("dejd"),T=W("C+DQ"),x=W("1vsH"),d=W("m3rI"),E=[{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 p(xe){var Me=xe.onActionCallback,Pe=xe.title,rt=xe.icon,ft=xe.actionName,pt=xe.className,Bt=pt===void 0?"":pt,wt=xe.children;function Ye(){Me(ft)}return m.a.createElement("a",{title:Pe,className:Bt,onClick:Ye},m.a.createElement("i",{className:"md-iconfont ".concat(rt)}),wt)}var v=function(xe){var Me=xe.watch,Pe=xe.showNullButton,rt=xe.onActionCallback,ft=xe.fullScreen,pt=xe.insertTemp,Bt=xe.hidetoolBar,wt=xe.uuid,Ye=xe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.F)("_educoder_session"),"&key=").concat(wt,"&api=").concat(encodeURIComponent(d.a.PROXY_SERVER)));var en=[].concat(E,[{title:"".concat(Me?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Me?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!Bt&&en.map(function(Ge,hn){return m.a.createElement("li",{key:hn},Ge.actionName?m.a.createElement(p,Object(D.a)({},Ge,{onActionCallback:rt})):m.a.createElement("span",{className:"v-line"}))}),Pe?m.a.createElement("li",null,m.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:rt},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,pt&&m.a.createElement("li",null,m.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(pt),onActionCallback:rt},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(p,{icon:"".concat(ft?"icon-shrink":"icon-enlarge"),title:ft?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:rt})))},C=W("M8RZ"),F=W("+L6B"),R=W("2/Rp"),j=W("y8nQ"),U=W("Vl3Y"),b=W("5NDa"),Q=W("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},oe=function(xe){var Me=xe.callback,Pe=xe.onCancel;function rt(ft){Me(ft)}return m.a.createElement(U.a,Object(D.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rt}),m.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(Q.a,null)),m.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(Q.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},fe=W("7ahc"),Fe=W("HmJG"),Le=W("BjJ7"),Ie=U.a.useForm,Be={width:280,marginRight:10},We={labelCol:{span:5},wrapperCol:{span:19}},ge=function(xe){var Me=xe.callback,Pe=xe.onCancel,rt=Ie(),ft=Object(z.a)(rt,1),pt=ft[0];function Bt(en){Me(en)}function wt(en,Ge){if(en.status===-1){k.b.error(en.message);return}pt.setFieldsValue({src:"/api/attachments/".concat(en.id),type:Ge.type})}function Ye(en){var Ge=en.target.files[0];ke(Ge,wt)}return m.a.createElement(U.a,Object(D.a)({form:pt},We,{className:"upload-image-panel",onFinish:Bt}),m.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(Q.a,{style:Be})),m.a.createElement(ue,{onFileChange:Ye}))),m.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(Q.a,{style:{width:264}})),m.a.createElement(U.a.Item,{style:{textAlign:"right"}},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function ue(xe){var Me=xe.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Me}))}function ke(xe,Me){if(!xe)throw new String("\u6CA1\u6709\u6587\u4EF6");var Pe=new FormData;Pe.append("editormd-image-file",xe),Pe.append("file_param_name","editormd-image-file"),Pe.append("byxhr","true");var rt=new window.XMLHttpRequest;rt.withCredentials=!0,rt.addEventListener("load",function(ft){Me(JSON.parse(ft.target.responseText),xe)},!1),rt.addEventListener("error",function(ft){console.error(ft)},!1),rt.open("POST","".concat(Le.a,"/api/attachments.json")),rt.send(Pe)}var lt=W("giR+"),ot=W("fyUT"),ut=W("7Kak"),xt=W("9yH6"),Je=xt.a.Group,et={margin:"0 8px"},dt=function(xe){var Me=xe.callback,Pe=xe.onCancel;function rt(ft){Me(ft)}return m.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rt},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:et},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:et},"\u884C\u6570"),m.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(ot.a,null)),m.a.createElement("span",{style:et},"\u5217\u6570"),m.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(ot.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:et},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(U.a.Item,{name:"align"},m.a.createElement(Je,null,m.a.createElement(xt.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(xt.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(xt.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(xt.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},de=W("ErOA"),Ce=W("7Cbv"),Ue="link",Ke="upload-image",st="code-block",ht="add-table",yt="------------",mt={default:yt,left:":".concat(yt),center:":".concat(yt,":"),right:"".concat(yt,":")},Ot=W("9VGf"),Tt,Et;function Qe(){}var Kt=0,Ut=1e4,qe="\u2581",tt=`
|
|
**\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 Re(xe){return/^\d+$/.test(xe)?"".concat(xe,"px"):xe}var Te=navigator.platform.toUpperCase().indexOf("MAC")>=0,Se=Te?"Cmd":"Ctrl",te=["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"],se=(Tt={},Object(K.a)(Tt,Se+"-B","bold"),Object(K.a)(Tt,Se+"-I","italic"),Tt),he=(Et={},Object(K.a)(Et,Ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(K.a)(Et,st,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(K.a)(Et,Ke,"\u6DFB\u52A0\u6587\u4EF6"),Object(K.a)(Et,ht,"\u6DFB\u52A0\u8868\u683C"),Et),me=ve.a=function(xe){var Me=xe.defaultValue,Pe=Me===void 0?"":Me,rt=xe.onChange,ft=xe.width,pt=ft===void 0?"100%":ft,Bt=xe.height,wt=Bt===void 0?400:Bt,Ye=xe.miniToolbar,en=Ye===void 0?!1:Ye,Ge=xe.isFocus,hn=Ge===void 0?!1:Ge,At=xe.watch,Ft=xe.insertTemp,Gt=xe.mode,on=Gt===void 0?"markdown":Gt,_t=xe.id,tn=_t===void 0?"markdown-editor-id":_t,St=xe.showResizeBar,It=St===void 0?!1:St,Yt=xe.noStorage,mn=Yt===void 0?!1:Yt,ln=xe.showNullButton,Jt=ln===void 0?!1:ln,Rt=xe.hidetoolBar,Gn=Rt===void 0?!1:Rt,un=xe.fullScreen,vn=un===void 0?!1:un,Qt=xe.onBlur,An=xe.onCMBeforeChange,zn=xe.onFullScreen,Nn=xe.className,at=Nn===void 0?"":Nn,Wt=xe.disablePaste,Vn=Wt===void 0?!1:Wt,bn=xe.placeholder,cn=bn===void 0?"":bn,Mn=xe.values,Y=Mn===void 0?"":Mn,_=Object(y.useState)(null),I=Object(z.a)(_,2),H=I[0],q=I[1],X=Object(y.useState)(Pe),le=Object(z.a)(X,2),Ve=le[0],Ze=le[1],Lt=Object(y.useState)(At),Xe=Object(z.a)(Lt,2),bt=Xe[0],Zt=Xe[1],Wn=Object(y.useState)(vn),qn=Object(z.a)(Wn,2),gn=qn[0],Pt=qn[1],jt=Object(y.useState)(""),nn=Object(z.a)(jt,2),rn=nn[0],En=nn[1],$n=Object(y.useState)(0),dn=Object(z.a)($n,2),ci=dn[0],cr=dn[1],gr=Object(y.useState)(wt),br=Object(z.a)(gr,2),Hr=br[0],fi=br[1],Di=Object(y.useState)(!1),dr=Object(z.a)(Di,2),Kr=dr[0],Ar=dr[1],ai=Object(y.useRef)(Object(Ce.a)()),Un=Object(y.useRef)(!1),pi=Object(y.useRef)(),yn=Object(y.useRef)(),mi=Object(y.useRef)(),Jn=Object(y.useRef)(),nr=Object(y.useRef)(),Si=function(){var Nt=Object(B.a)(M.a.mark(function an(){var Xt,On;return M.a.wrap(function(ti){for(;;)switch(ti.prev=ti.next){case 0:return ti.next=2,Object(de.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ai.current}});case 2:On=ti.sent,On!=null&&(Xt=On.attachments)!==null&&Xt!==void 0&&Xt.length&&(console.log("cm:",H,yn),On.attachments.map(function(Fn){Fn.content_type.indexOf("image")>-1?H.replaceSelection(".concat(Fn.content_type,")")):Fn.content_type.indexOf("video")>-1?H.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Fn.content_type.indexOf("pdf")>-1?H.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Fn.id,"?type=").concat(Fn.content_type,'&disposition=inline" target="_blank">').concat(Fn.name,"</a>")):H.replaceSelection("[".concat(Fn.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Fn.id,"?type=").concat(Fn.content_type,")"))}));case 4:case"end":return ti.stop()}},an)}));return function(){return Nt.apply(this,arguments)}}();Object(y.useEffect)(function(){Ze(Y),H==null||H.setValue(Y)},[Y]),Object(y.useEffect)(function(){zn==null||zn(gn)},[gn]),Object(y.useEffect)(function(){if(yn.current){var Nt=u.a.fromTextArea(yn.current,{mode:on,lineNumbers:!en,lineWrapping:!0,value:Pe,autoCloseTags:!0,autoCloseBrackets:!0});hn&&Nt.focus();function an(Xt,On){if(Vn){On.preventDefault();return}var Hn=On.clipboardData;if(Hn){var ti=Hn.types.toString(),Fn=Hn.items;if(ti==="Files"||Hn.types.indexOf("Files")>-1){if(On.preventDefault(),on=="stex")return;try{var Ai,rr=Fn[1];((Ai=Fn[0])===null||Ai===void 0?void 0:Ai.kind)==="file"&&(rr=Fn[0]);var Ln=rr.getAsFile(),Or=Ln.name.split(".").pop();ke(Ln,function(Qn){if(Qn.id){var Xi,Gi,vr;(Ln==null||((Xi=Ln.type)===null||Xi===void 0)?void 0:Xi.indexOf("image"))>-1?Nt.replaceSelection(".concat(Qn.content_type,")")):(Ln==null||((Gi=Ln.type)===null||Gi===void 0)?void 0:Gi.indexOf("video"))>-1?Nt.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,'"></video>')):(Ln==null||((vr=Ln.type)===null||vr===void 0)?void 0:vr.indexOf("pdf"))>-1?Nt.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Ln.type,'&disposition=inline" target="_blank">').concat(Ln.name,"</a>")):te.includes(Or)?Nt.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,'?type=office&disposition=inline" target="_blank">').concat(Ln.name,"</a>")):Nt.replaceSelection("[".concat(Ln.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Qn.content_type,")"))}else(Qn==null?void 0:Qn.status)===401&&(document.location.href="/user/login")})}catch(Qn){k.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Nt.on("paste",an),Nt.on("dragleave",function(Xt,On){mi.current.classList.remove("mouse-hover-md")}),Nt.on("dragover",function(Xt,On){mi.current.classList.add("mouse-hover-md")}),Nt.on("drop",function(Xt,On){mi.current.classList.add("mouse-hover-md");var Hn;if(Hn=On.dataTransfer.files,Hn.length>0){On.preventDefault(),On.stopPropagation();for(var ti=function(rr){var Ln=Hn[rr],Or=Ln.name.split(".").pop();ke(Ln,function(Qn){if(Qn.id){var Xi,Gi,vr;(Ln==null||((Xi=Ln.type)===null||Xi===void 0)?void 0:Xi.indexOf("image"))>-1?Nt.replaceSelection(".concat(Qn.content_type,")")):(Ln==null||((Gi=Ln.type)===null||Gi===void 0)?void 0:Gi.indexOf("video"))>-1?Nt.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,'"></video>')):(Ln==null||((vr=Ln.type)===null||vr===void 0)?void 0:vr.indexOf("pdf"))>-1?Nt.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Ln.type,'&disposition=inline" target="_blank">').concat(Ln.name,"</a>")):te.includes(Or)?Nt.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,'?type=office&disposition=inline" target="_blank">').concat(Ln.name,"</a>")):Nt.replaceSelection("[".concat(Ln.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Qn.content_type,")"))}else(Qn==null?void 0:Qn.status)===401&&(document.location.href="/user/login")})},Fn=0;Fn<Hn.length;Fn++)ti(Fn)}}),q(Nt),function(){Nt.off("paste",an)}}},[]);var Pi=Object(y.useCallback)(function(){if(mi.current)try{}catch(Nt){console.log(Nt,"---- to set md editor body height")}},[Hr,mi,gn]);Object(y.useEffect)(function(){function Nt(){var Xt=new c.default(function(On){var Hn=Object(P.a)(On),ti;try{for(Hn.s();!(ti=Hn.n()).done;){var Fn=ti.value;(Fn.target.offsetHeight>0||Fn.target.offsetWidth>0)&&(Pi(),H.setSize("100%","100%"),H.refresh())}}catch(Ai){Hn.e(Ai)}finally{Hn.f()}});return Xt.observe(yn.current.parentElement),Xt}if(H){var an=Nt();return function(){an.unobserve(yn.current.parentElement)}}},[H,Pi]),Object(y.useEffect)(function(){if(H){for(var Nt=[],an=function(){var Fn=On[Xt];Hn=Object(z.a)(Fn,2);var Ai=Hn[0],rr=Hn[1],Ln=Object(K.a)({},Ai,function(){Gr(rr)});Nt.push(Ln),H.addKeyMap(Ln)},Xt=0,On=Object.entries(se);Xt<On.length;Xt++){var Hn;an()}return pi.current=setInterval(function(){Un.current&&Si()},4e3),function(){clearInterval(pi.current);var ti=Object(P.a)(Nt),Fn;try{for(ti.s();!(Fn=ti.n()).done;){var Ai=Fn.value;H.removeKeyMap(Ai)}}catch(rr){ti.e(rr)}finally{ti.f()}}}},[H]),Object(y.useEffect)(function(){vn!==gn&&Pt(vn)},[vn]),Object(Ot.a)(function(){if(!mn&&ci>0){var Nt=new Date().getTime(),an=window.sessionStorage.getItem(tn);Nt>=ci+Ut&&(!an||an!==Ve)&&(window.sessionStorage.setItem(tn,Ve),Ar(!0))}},Ut),Object(y.useEffect)(function(){Zt(At)},[H,At]),Object(y.useEffect)(function(){H&&(hn&&H.focus())},[H,hn]),Object(y.useEffect)(function(){if(bt&&H){var Nt=H.getScrollerElement();function an(Xt){var On=Xt.target;if(nr.current){var Hn=On.scrollTop/On.scrollHeight;nr.current.scrollTop=nr.current.scrollHeight*Hn}}return Nt.addEventListener("scroll",an),function(){Nt.removeEventListener("scroll",an)}}},[H,bt]),Object(y.useEffect)(function(){if(H&&An){function Nt(an,Xt){An(an,Xt)}return H.on("beforeChange",Nt),function(){H.off("beforeChange",Nt)}}},[H,An]),Object(y.useEffect)(function(){if(H&&Qt){function Nt(){Qt(H.getValue())}return H.on("blur",Nt),function(){H.off("blur",Nt)}}},[H,Qt]),Object(y.useEffect)(function(){if(H){function Nt(an){var Xt=an.getValue();Ze(Xt),cr(new Date().getTime()),an.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),rt&&rt(Xt)}return H.on("change",Nt),function(){H.off("change",Nt)}}},[H,rt]),Object(y.useEffect)(function(){H&&(Pe==null?(H.setValue(""),Ze("")):Pe!==H.getValue()&&(H.setValue(Pe),Ze(Pe),H.setCursor(H.lineCount(),0)))},[H,Pe]);var Gr=Object(y.useCallback)(function(Nt){var an=H.getCursor(),Xt=H.getSelection(),On=Xt.split(`
|
|
`);switch(Nt){case"bold":return H.replaceSelection("**"+Xt+"**"),Xt===""&&H.setCursor(an.line,an.ch+2),H.focus();case"italic":return H.replaceSelection("*"+Xt+"*"),Xt===""&&H.setCursor(an.line,an.ch+1),H.focus();case"code":return H.replaceSelection("`"+Xt+"`"),Xt===""&&H.setCursor(an.line,an.ch+1),H.focus();case"inline-latex":return H.replaceSelection("`$$"+Xt+"$$`"),Xt===""&&H.setCursor(an.line,an.ch+3),H.focus();case"latex":return H.replaceSelection("```latex\n"+Xt+"\n```"),H.setCursor(an.line+1,Xt.length+1),H.focus();case"line-break":return H.replaceSelection(`<br/>
|
|
`),H.focus();case"list-ul":return Xt===""?H.replaceSelection("- "+Xt):H.replaceSelection(On.map(function(Hn){return Hn===""?"":"- ".concat(Hn)}).join(`
|
|
`)),H.focus();case"list-ol":return Xt===""?H.replaceSelection("1. "+Xt):H.replaceSelection(On.map(function(Hn,ti){return Hn===""?"":"".concat(ti+1,". ").concat(Hn)}).join(`
|
|
`)),H.focus();case"add-null-ch":return Xt===""&&H.setCursor(an.line,an.ch+1),H.replaceSelection(qe),H.focus();case"inster-template-1":return Xt===""&&H.setCursor(an.line,an.ch),H.replaceSelection(tt),H.focus();case"eraser":return H.setValue(""),H.focus();case"trigger-watch":return Zt(!bt),H.focus();case"trigger-full-screen":return Pt(!gn),H.focus();case Ue:En(Ue);return;case st:En(st);return;case Ke:En(Ke);return;case ht:En(ht);return;default:throw new Error}},[H,bt,gn]),Qi=Object(y.useCallback)(function(Nt){En("");switch(rn){case Ue:var an=Nt.title,Xt=Nt.link;return H.replaceSelection("[".concat(an,"](").concat(Xt,")")),H.focus();case st:var On=Nt.language,Hn=Nt.content;return H.replaceSelection(["```"+On,Hn,"```"].join(`
|
|
`)),H.focus();case Ke:var ti=Nt.src,Fn=Nt.alt;return Fn?H.replaceSelection(".concat(ti,' "').concat(Fn,'" )')):H.replaceSelection("")),H.focus();case ht:for(var Ai=Nt.row,rr=Nt.col,Ln=Nt.align,Or=`
|
|
`,Qn=0;Qn<Ai;Qn++){for(var Xi=[],Gi=[],vr=0;vr<rr;vr++)Qn===1&&Gi.push(mt[Ln]),Xi.push(" ");Qn===1&&(Or+="| ".concat(Gi.join(" | "),` |
|
|
`)),Or+="| ".concat(Xi.join(rr===1?"":" | "),` |
|
|
`)}return H.replaceSelection(Or+`
|
|
`),H.focus();default:throw new Error}},[H,rn]),Sr=Object(y.useMemo)(function(){switch(rn){case Ue:return m.a.createElement(oe,{callback:Qi,onCancel:ir});case st:return m.a.createElement(fe.b,{callback:Qi,onCancel:ir});case Ke:return m.a.createElement(ge,{callback:Qi,onCancel:ir});case ht:return m.a.createElement(dt,{callback:Qi,onCancel:ir});default:return null}},[rn]);function ir(){En("")}Object(y.useEffect)(function(){if(Jn.current){var Nt=Jn.current,an=!1,Xt=0;function On(Fn){an=!0,Xt=Fn.pageY}function Hn(){an=!1}function ti(Fn){if(an){var Ai=Fn.pageY-Xt;Ai<0&&(Ai=0),Ai>300&&(Ai=300);var rr=wt+Ai+"px";fi(rr)}}return Nt.addEventListener("mousedown",On),document.addEventListener("mousemove",ti),document.addEventListener("mouseup",Hn),function(){Nt.removeEventListener("mousedown",On),document.removeEventListener("mousemove",ti),document.removeEventListener("mouseup",Hn)}}},[H,Jn]),Object(y.useEffect)(function(){fi(wt)},[wt]);var Zi=Re(pt),zr=Re(Hr),gi={width:Zi,height:zr},Xn=Object(y.useMemo)(function(){if(ci){var Nt=new Date(ci),an=Nt.getHours(),Xt=Nt.getMinutes(),On=Nt.getSeconds();return an=an<10?"0"+an:an,Xt=Xt<10?"0"+Xt:Xt,On=On<10?"0"+On:On,"".concat(an,":").concat(Xt,":").concat(On)}return 0},[ci]);function Ci(){window.sessionStorage.removeItem(tn),Ar(!1),cr(0)}function Ti(){Ar(!1),cr(0),H.setValue(window.sessionStorage.getItem(tn))}function qi(Nt,an){var Xt=H.getValue();Xt=Xt.replace(Nt,an),Ze(Xt),H==null||H.setValue(Xt)}return m.a.createElement(y.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:mi},m.a.createElement("div",{className:"markdown-editor-container ".concat(at," ").concat(bt?"on-preview":""," ").concat(en?"mini":""," ").concat(gn?"full-screen":""),style:gi},m.a.createElement(v,{insertTemp:Ft,watch:bt,fullScreen:gn,showNullButton:Jt,onActionCallback:Gr,hidetoolBar:Gn,uuid:ai.current,setOpenPhones:function(){Un.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:yn,placeholder:cn})),bt?m.a.createElement("div",{ref:nr,className:"preview-container"},on==="stex"&&m.a.createElement(L,{value:Ve}),on!=="stex"&&m.a.createElement(S.a,{edit:!0,value:Ve,replaces:qi})):null))),It?m.a.createElement("a",{ref:Jn,className:"editor-resize"}):null,m.a.createElement(C.a,null,he[rn]?m.a.createElement(G.a,{centered:!0,title:he[rn],visible:!0,onCancel:ir,footer:null,className:"markdown-popup-form"},Sr):null))}},SJMd:function(it,ve){/**
|
|
* @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 W,ie,G,P=!1,V,k;window.PR_SHOULD_USE_CONTINUATION=!0;var B,z;(function(){var K=window,n=["break,continue,do,else,for,if,return,while"],M=[n,"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"],y=[M,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[y,"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"],g=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[y,"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"],c="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="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",l=[n,"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=[n,"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"],a=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[m,u,g,f,o,l,s,a],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,S="str",L="kwd",D="com",A="typ",T="lit",x="pun",d="pln",E="tag",p="dec",v="src",C="atn",F="atv",R="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(Je){for(var et=0,dt=!1,de=!1,Ce=0,Ue=Je.length;Ce<Ue;++Ce){var Ke=Je[Ce];if(Ke.ignoreCase)de=!0;else if(/[a-z]/i.test(Ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){dt=!0,de=!1;break}}var st={b:8,t:9,n:10,v:11,f:12,r:13};function ht(Et){var Qe=Et.charCodeAt(0);if(Qe!==92)return Qe;var Kt=Et.charAt(1);return Qe=st[Kt],Qe||("0"<=Kt&&Kt<="7"?parseInt(Et.substring(1),8):Kt==="u"||Kt==="x"?parseInt(Et.substring(2),16):Et.charCodeAt(1))}function yt(Et){if(Et<32)return(Et<16?"\\x0":"\\x")+Et.toString(16);var Qe=String.fromCharCode(Et);return Qe==="\\"||Qe==="-"||Qe==="]"||Qe==="^"?"\\"+Qe:Qe}function mt(Et){var Qe=Et.substring(1,Et.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")),Kt=[],Ut=Qe[0]==="^",qe=["["];Ut&&qe.push("^");for(var tt=Ut?1:0,Re=Qe.length;tt<Re;++tt){var Te=Qe[tt];if(/\\[bdsw]/i.test(Te))qe.push(Te);else{var Se=ht(Te),te;tt+2<Re&&Qe[tt+1]==="-"?(te=ht(Qe[tt+2]),tt+=2):te=Se,Kt.push([Se,te]),te<65||Se>122||(te<65||Se>90||Kt.push([Math.max(65,Se)|32,Math.min(te,90)|32]),te<97||Se>122||Kt.push([Math.max(97,Se)&~32,Math.min(te,122)&~32]))}}Kt.sort(function(xe,Me){return xe[0]-Me[0]||Me[1]-xe[1]});for(var se=[],he=[],tt=0;tt<Kt.length;++tt){var me=Kt[tt];me[0]<=he[1]+1?he[1]=Math.max(he[1],me[1]):se.push(he=me)}for(var tt=0;tt<se.length;++tt){var me=se[tt];qe.push(yt(me[0])),me[1]>me[0]&&(me[1]+1>me[0]&&qe.push("-"),qe.push(yt(me[1])))}return qe.push("]"),qe.join("")}function Ot(Et){for(var Qe=Et.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")),Kt=Qe.length,Ut=[],qe=0,tt=0;qe<Kt;++qe){var Re=Qe[qe];if(Re==="(")++tt;else if(Re.charAt(0)==="\\"){var Te=+Re.substring(1);Te&&(Te<=tt?Ut[Te]=-1:Qe[qe]=yt(Te))}}for(var qe=1;qe<Ut.length;++qe)Ut[qe]===-1&&(Ut[qe]=++et);for(var qe=0,tt=0;qe<Kt;++qe){var Re=Qe[qe];if(Re==="(")++tt,Ut[tt]||(Qe[qe]="(?:");else if(Re.charAt(0)==="\\"){var Te=+Re.substring(1);Te&&Te<=tt&&(Qe[qe]="\\"+Ut[Te])}}for(var qe=0;qe<Kt;++qe)Qe[qe]==="^"&&Qe[qe+1]!=="^"&&(Qe[qe]="");if(Et.ignoreCase&&dt)for(var qe=0;qe<Kt;++qe){var Re=Qe[qe],Se=Re.charAt(0);Re.length>=2&&Se==="["?Qe[qe]=mt(Re):Se!=="\\"&&(Qe[qe]=Re.replace(/[a-zA-Z]/g,function(he){var me=he.charCodeAt(0);return"["+String.fromCharCode(me&~32,me|32)+"]"}))}return Qe.join("")}for(var Tt=[],Ce=0,Ue=Je.length;Ce<Ue;++Ce){var Ke=Je[Ce];if(Ke.global||Ke.multiline)throw new Error(""+Ke);Tt.push("(?:"+Ot(Ke)+")")}return new RegExp(Tt.join("|"),de?"gi":"g")}function b(Je,et){var dt=/(?:^|\s)nocode(?:\s|$)/,de=[],Ce=0,Ue=[],Ke=0;function st(ht){var yt=ht.nodeType;if(yt==1){if(dt.test(ht.className))return;for(var mt=ht.firstChild;mt;mt=mt.nextSibling)st(mt);var Ot=ht.nodeName.toLowerCase();(Ot==="br"||Ot==="li")&&(de[Ke]=`
|
|
`,Ue[Ke<<1]=Ce++,Ue[Ke++<<1|1]=ht)}else if(yt==3||yt==4){var Tt=ht.nodeValue;Tt.length&&(et?Tt=Tt.replace(/\r\n?/g,`
|
|
`):Tt=Tt.replace(/[ \t\r\n]+/g," "),de[Ke]=Tt,Ue[Ke<<1]=Ce,Ce+=Tt.length,Ue[Ke++<<1|1]=ht)}}return st(Je),{sourceCode:de.join("").replace(/\n$/,""),spans:Ue}}function Q(Je,et,dt,de,Ce){if(!dt)return;var Ue={sourceNode:Je,pre:1,langExtension:null,numberLines:null,sourceCode:dt,spans:null,basePos:et,decorations:null};de(Ue),Ce.push.apply(Ce,Ue.decorations)}var ee=/\S/;function oe(Je){for(var et=void 0,dt=Je.firstChild;dt;dt=dt.nextSibling){var de=dt.nodeType;et=de===1?et?Je:dt:de===3&&ee.test(dt.nodeValue)?Je:et}return et===Je?void 0:et}function fe(Je,et){var dt={},de;(function(){for(var Ke=Je.concat(et),st=[],ht={},yt=0,mt=Ke.length;yt<mt;++yt){var Ot=Ke[yt],Tt=Ot[3];if(Tt)for(var Et=Tt.length;--Et>=0;)dt[Tt.charAt(Et)]=Ot;var Qe=Ot[1],Kt=""+Qe;ht.hasOwnProperty(Kt)||(st.push(Qe),ht[Kt]=null)}st.push(/[\0-\uffff]/),de=U(st)})();var Ce=et.length,Ue=function(Ke){for(var st=Ke.sourceCode,ht=Ke.basePos,yt=Ke.sourceNode,mt=[ht,d],Ot=0,Tt=st.match(de)||[],Et={},Qe=0,Kt=Tt.length;Qe<Kt;++Qe){var Ut=Tt[Qe],qe=Et[Ut],tt=void 0,Re;if(typeof qe=="string")Re=!1;else{var Te=dt[Ut.charAt(0)];if(Te)tt=Ut.match(Te[1]),qe=Te[0];else{for(var Se=0;Se<Ce;++Se)if(Te=et[Se],tt=Ut.match(Te[1]),tt){qe=Te[0];break}tt||(qe=d)}Re=qe.length>=5&&qe.substring(0,5)==="lang-",Re&&!(tt&&typeof tt[1]=="string")&&(Re=!1,qe=v),Re||(Et[Ut]=qe)}var te=Ot;if(Ot+=Ut.length,!Re)mt.push(ht+te,qe);else{var se=tt[1],he=Ut.indexOf(se),me=he+se.length;tt[2]&&(me=Ut.length-tt[2].length,he=me-se.length);var xe=qe.substring(5);Q(yt,ht+te,Ut.substring(0,he),Ue,mt),Q(yt,ht+te+he,se,ue(xe,se),mt),Q(yt,ht+te+me,Ut.substring(me),Ue,mt)}}Ke.decorations=mt};return Ue}function Fe(Je){var et=[],dt=[];Je.tripleQuotedStrings?et.push([S,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Je.multiLineStrings?et.push([S,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):et.push([S,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Je.verbatimStrings&&dt.push([S,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var de=Je.hashComments;de&&(Je.cStyleComments?(de>1?et.push([D,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):et.push([D,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),dt.push([S,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):et.push([D,/^#[^\r\n]*/,null,"#"])),Je.cStyleComments&&(dt.push([D,/^\/\/[^\r\n]*/,null]),dt.push([D,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ce=Je.regexLiterals;if(Ce){var Ue=Ce>1?"":`
|
|
\r`,Ke=Ue?".":"[\\S\\s]",st="/(?=[^/*"+Ue+"])(?:[^/\\x5B\\x5C"+Ue+"]|\\x5C"+Ke+"|\\x5B(?:[^\\x5C\\x5D"+Ue+"]|\\x5C"+Ke+")*(?:\\x5D|$))+/";dt.push(["lang-regex",RegExp("^"+j+"("+st+")")])}var ht=Je.types;ht&&dt.push([A,ht]);var yt=(""+Je.keywords).replace(/^ | $/g,"");yt.length&&dt.push([L,new RegExp("^(?:"+yt.replace(/[\s,]+/g,"|")+")\\b"),null]),et.push([d,/^\s+/,null,` \r
|
|
\xA0`]);var mt="^.[^\\s\\w.$@'\"`/\\\\]*";return Je.regexLiterals&&(mt+="(?!s*/)"),dt.push([T,/^@[a-z_$][a-z_$@0-9]*/i,null],[A,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[T,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[x,new RegExp(mt),null]),fe(et,dt)}var Le=Fe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ie(Je,et,dt){for(var de=/(?:^|\s)nocode(?:\s|$)/,Ce=/\r\n?|\n/,Ue=Je.ownerDocument,Ke=Ue.createElement("li");Je.firstChild;)Ke.appendChild(Je.firstChild);var st=[Ke];function ht(Qe){var Kt=Qe.nodeType;if(Kt==1&&!de.test(Qe.className))if(Qe.nodeName==="br")yt(Qe),Qe.parentNode&&Qe.parentNode.removeChild(Qe);else for(var Ut=Qe.firstChild;Ut;Ut=Ut.nextSibling)ht(Ut);else if((Kt==3||Kt==4)&&dt){var qe=Qe.nodeValue,tt=qe.match(Ce);if(tt){var Re=qe.substring(0,tt.index);Qe.nodeValue=Re;var Te=qe.substring(tt.index+tt[0].length);if(Te){var Se=Qe.parentNode;Se.insertBefore(Ue.createTextNode(Te),Qe.nextSibling)}yt(Qe),Re||Qe.parentNode.removeChild(Qe)}}}function yt(Qe){for(;!Qe.nextSibling;)if(Qe=Qe.parentNode,!Qe)return;function Kt(tt,Re){var Te=Re?tt.cloneNode(!1):tt,Se=tt.parentNode;if(Se){var te=Kt(Se,1),se=tt.nextSibling;te.appendChild(Te);for(var he=se;he;he=se)se=he.nextSibling,te.appendChild(he)}return Te}for(var Ut=Kt(Qe.nextSibling,0),qe;(qe=Ut.parentNode)&&qe.nodeType===1;)Ut=qe;st.push(Ut)}for(var mt=0;mt<st.length;++mt)ht(st[mt]);et===(et|0)&&st[0].setAttribute("value",et);var Ot=Ue.createElement("ol");Ot.className="linenums";for(var Tt=Math.max(0,et-1|0)||0,mt=0,Et=st.length;mt<Et;++mt)Ke=st[mt],Ke.className="L"+(mt+Tt)%10,Ke.firstChild||Ke.appendChild(Ue.createTextNode("\xA0")),Ot.appendChild(Ke);Je.appendChild(Ot)}function Be(Je){var et=/\bMSIE\s(\d+)/.exec(navigator.userAgent);et=et&&+et[1]<=8;var dt=/\n/g,de=Je.sourceCode,Ce=de.length,Ue=0,Ke=Je.spans,st=Ke.length,ht=0,yt=Je.decorations,mt=yt.length,Ot=0;yt[mt]=Ce;var Tt,Et;for(Et=Tt=0;Et<mt;)yt[Et]!==yt[Et+2]?(yt[Tt++]=yt[Et++],yt[Tt++]=yt[Et++]):Et+=2;for(mt=Tt,Et=Tt=0;Et<mt;){for(var Qe=yt[Et],Kt=yt[Et+1],Ut=Et+2;Ut+2<=mt&&yt[Ut+1]===Kt;)Ut+=2;yt[Tt++]=Qe,yt[Tt++]=Kt,Et=Ut}mt=yt.length=Tt;var qe=Je.sourceNode,tt="";qe&&(tt=qe.style.display,qe.style.display="none");try{for(var Re=null;ht<st;){var Te=Ke[ht],Se=Ke[ht+2]||Ce,te=yt[Ot+2]||Ce,Ut=Math.min(Se,te),se=Ke[ht+1],he;if(se.nodeType!==1&&(he=de.substring(Ue,Ut))){et&&(he=he.replace(dt,"\r")),se.nodeValue=he;var me=se.ownerDocument,xe=me.createElement("span");xe.className=yt[Ot+1];var Me=se.parentNode;Me.replaceChild(xe,se),xe.appendChild(se),Ue<Se&&(Ke[ht+1]=se=me.createTextNode(de.substring(Ut,Se)),Me.insertBefore(se,xe.nextSibling))}Ue=Ut,Ue>=Se&&(ht+=2),Ue>=te&&(Ot+=2)}}finally{qe&&(qe.style.display=tt)}}var We={};function ge(Je,et){for(var dt=et.length;--dt>=0;){var de=et[dt];We.hasOwnProperty(de)?K.console&&console.warn("cannot override language handler %s",de):We[de]=Je}}function ue(Je,et){return Je&&We.hasOwnProperty(Je)||(Je=/^\s*</.test(et)?"default-markup":"default-code"),We[Je]}ge(Le,["default-code"]),ge(fe([],[[d,/^[^<?]+/],[p,/^<!\w[^>]*(?:>|$)/],[D,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["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(fe([[d,/^[\s]+/,null,` \r
|
|
`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[C,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[x,/^[=<>\/]+/],["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(fe([],[[F,/^[\s\S]+/]]),["uq.val"]),ge(Fe({keywords:m,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),ge(Fe({keywords:"null,true,false"}),["json"]),ge(Fe({keywords:u,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),ge(Fe({keywords:g,cStyleComments:!0}),["java"]),ge(Fe({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ge(Fe({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ge(Fe({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ge(Fe({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ge(Fe({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ge(Fe({keywords:c,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ge(fe([],[[S,/^[\s\S]+/]]),["regex"]);function ke(Je){var et=Je.langExtension;try{var dt=b(Je.sourceNode,Je.pre),de=dt.sourceCode;Je.sourceCode=de,Je.spans=dt.spans,Je.basePos=0,ue(et,de)(Je),Be(Je)}catch(Ce){K.console&&console.log(Ce&&Ce.stack||Ce)}}function lt(Je,et,dt){var de=dt||!1,Ce=et||null,Ue=document.createElement("div");Ue.innerHTML="<pre>"+Je+"</pre>",Ue=Ue.firstChild,de&&Ie(Ue,de,!0);var Ke={langExtension:Ce,numberLines:de,sourceNode:Ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ke(Ke),Ue.innerHTML}function ot(Je,et){var dt=et||document.body,de=dt.ownerDocument||document;function Ce(Te){return dt.getElementsByTagName(Te)}for(var Ue=[Ce("pre"),Ce("code"),Ce("xmp")],Ke=[],st=0;st<Ue.length;++st)for(var ht=0,yt=Ue[st].length;ht<yt;++ht)Ke.push(Ue[st][ht]);Ue=null;var mt=Date;mt.now||(mt={now:function(){return+new Date}});var Ot=0,Tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Et=/\bprettyprint\b/,Qe=/\bprettyprinted\b/,Kt=/pre|xmp/i,Ut=/^code$/i,qe=/^(?:pre|code|xmp)$/i,tt={};function Re(){for(var Te=K.PR_SHOULD_USE_CONTINUATION?mt.now()+250:Infinity;Ot<Ke.length&&mt.now()<Te;Ot++){for(var Se=Ke[Ot],te=tt,se=Se;se=se.previousSibling;){var he=se.nodeType,me=(he===7||he===8)&&se.nodeValue;if(me?!/^\??prettify\b/.test(me):he!==3||/\S/.test(se.nodeValue))break;if(me){te={},me.replace(/\b(\w+)=([\w:.%+-]+)/g,function(At,Ft,Gt){te[Ft]=Gt});break}}var xe=Se.className;if((te!==tt||Et.test(xe))&&!Qe.test(xe)){for(var Me=!1,Pe=Se.parentNode;Pe;Pe=Pe.parentNode){var rt=Pe.tagName;if(qe.test(rt)&&Pe.className&&Et.test(Pe.className)){Me=!0;break}}if(!Me){Se.className+=" prettyprinted";var ft=te.lang;if(!ft){ft=xe.match(Tt);var pt;!ft&&(pt=oe(Se))&&Ut.test(pt.tagName)&&(ft=pt.className.match(Tt)),ft&&(ft=ft[1])}var Bt;if(Kt.test(Se.tagName))Bt=1;else{var wt=Se.currentStyle,Ye=de.defaultView,en=wt?wt.whiteSpace:Ye&&Ye.getComputedStyle?Ye.getComputedStyle(Se,null).getPropertyValue("white-space"):0;Bt=en&&en.substring(0,3)==="pre"}var Ge=te.linenums;(Ge=Ge==="true"||+Ge)||(Ge=xe.match(/\blinenums\b(?::(\d+))?/),Ge=Ge?Ge[1]&&Ge[1].length?+Ge[1]:!0:!1),Ge&&Ie(Se,Ge,Bt);var hn={langExtension:ft,sourceNode:Se,numberLines:Ge,pre:Bt,sourceCode:null,basePos:null,spans:null,decorations:null};ke(hn)}}}Ot<Ke.length?K.setTimeout(Re,250):typeof Je=="function"&&Je()}Re()}var ut=K.PR={createSimpleLexer:fe,registerLangHandler:ge,sourceDecorator:Fe,PR_ATTRIB_NAME:C,PR_ATTRIB_VALUE:F,PR_COMMENT:D,PR_DECLARATION:p,PR_KEYWORD:L,PR_LITERAL:T,PR_NOCODE:R,PR_PLAIN:d,PR_PUNCTUATION:x,PR_SOURCE:v,PR_STRING:S,PR_TAG:E,PR_TYPE:A,prettyPrintOne:P?K.prettyPrintOne=lt:B=lt,prettyPrint:z=P?K.prettyPrint=ot:z=ot},xt=K.define;typeof xt=="function"&&xt.amd&&xt("google-code-prettify",[],function(){return ut})})()},T8No:function(it,ve,W){"use strict";W.d(ve,"a",function(){return z}),W.d(ve,"e",function(){return K}),W.d(ve,"c",function(){return x}),W.d(ve,"b",function(){return d}),W.d(ve,"d",function(){return E}),W.d(ve,"f",function(){return C});var ie=W("MNsG"),G=W("N0LK"),P=W("Cg/j");let V=ie.k||"";const k=new Map;k.set("false",!1),k.set("true",!0),k.set("isMac",ie.f),k.set("isLinux",ie.d),k.set("isWindows",ie.i),k.set("isWeb",ie.h),k.set("isMacNative",ie.f&&!ie.h),k.set("isEdge",V.indexOf("Edg/")>=0),k.set("isFirefox",V.indexOf("Firefox")>=0),k.set("isChrome",V.indexOf("Chrome")>=0),k.set("isSafari",V.indexOf("Safari")>=0);const B=Object.prototype.hasOwnProperty;class z{static has(R){return m.create(R)}static equals(R,j){return g.create(R,j)}static regex(R,j){return S.create(R,j)}static not(R){return o.create(R)}static and(...R){return A.create(R,null)}static or(...R){return T.create(R,null,!0)}static deserialize(R,j=!1){return R?this._deserializeOrExpression(R,j):void 0}static _deserializeOrExpression(R,j){let U=R.split("||");return T.create(U.map(b=>this._deserializeAndExpression(b,j)),null,!0)}static _deserializeAndExpression(R,j){let U=R.split("&&");return A.create(U.map(b=>this._deserializeOne(b,j)),null)}static _deserializeOne(R,j){if(R=R.trim(),R.indexOf("!=")>=0){let U=R.split("!=");return f.create(U[0].trim(),this._deserializeValue(U[1],j))}if(R.indexOf("==")>=0){let U=R.split("==");return g.create(U[0].trim(),this._deserializeValue(U[1],j))}if(R.indexOf("=~")>=0){let U=R.split("=~");return S.create(U[0].trim(),this._deserializeRegexValue(U[1],j))}if(R.indexOf(" in ")>=0){let U=R.split(" in ");return u.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(R)){const U=R.split(">=");return a.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(R)){const U=R.split(">");return s.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(R)){const U=R.split("<=");return w.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(R)){const U=R.split("<");return O.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(R)?o.create(R.substr(1).trim()):m.create(R)}static _deserializeValue(R,j){if(R=R.trim(),R==="true")return!0;if(R==="false")return!1;let U=/^'([^']*)'$/.exec(R);return U?U[1].trim():R}static _deserializeRegexValue(R,j){if(Object(G.C)(R)){if(j)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=R.indexOf("/"),b=R.lastIndexOf("/");if(U===b||U<0){if(j)throw new Error(`bad regexp-value '${R}', missing /-enclosure`);return console.warn(`bad regexp-value '${R}', missing /-enclosure`),null}let Q=R.slice(U+1,b),ee=R[b+1]==="i"?"i":"";try{return new RegExp(Q,ee)}catch(oe){if(j)throw new Error(`bad regexp-value '${R}', parse error: ${oe}`);return console.warn(`bad regexp-value '${R}', parse error: ${oe}`),null}}}function K(R,j){const U=R?R.substituteConstants():void 0,b=j?j.substituteConstants():void 0;return!U&&!b?!0:!U||!b?!1:U.equals(b)}function n(R,j){return R.cmp(j)}class M{constructor(){this.type=0}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!1}serialize(){return"false"}keys(){return[]}negate(){return y.INSTANCE}}M.INSTANCE=new M;class y{constructor(){this.type=1}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!0}serialize(){return"true"}keys(){return[]}negate(){return M.INSTANCE}}y.INSTANCE=new y;class m{constructor(R,j){this.key=R,this.negated=j,this.type=2}static create(R,j=null){const U=k.get(R);return typeof U=="boolean"?U?y.INSTANCE:M.INSTANCE:new m(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:p(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=k.get(this.key);return typeof R=="boolean"?R?y.INSTANCE:M.INSTANCE:this}evaluate(R){return!!R.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class g{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=4}static create(R,j,U=null){if(typeof j=="boolean")return j?m.create(R,U):o.create(R,U);const b=k.get(R);if(typeof b=="boolean"){const Q=b?"true":"false";return j===Q?y.INSTANCE:M.INSTANCE}return new g(R,j,U)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=k.get(this.key);if(typeof R=="boolean"){const j=R?"true":"false";return this.value===j?y.INSTANCE:M.INSTANCE}return this}evaluate(R){return R.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 u{constructor(R,j){this.key=R,this.valueKey=j,this.type=10,this.negated=null}static create(R,j){return new u(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.valueKey,R.key,R.valueKey)}equals(R){return R.type===this.type?this.key===R.key&&this.valueKey===R.valueKey:!1}substituteConstants(){return this}evaluate(R){const j=R.getValue(this.valueKey),U=R.getValue(this.key);return Array.isArray(j)?j.indexOf(U)>=0:typeof U=="string"&&typeof j=="object"&&j!==null?B.call(j,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=c.create(this)),this.negated}}class c{constructor(R){this._actual=R,this.type=11}static create(R){return new c(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=5}static create(R,j,U=null){if(typeof j=="boolean")return j?o.create(R,U):m.create(R,U);const b=k.get(R);if(typeof b=="boolean"){const Q=b?"true":"false";return j===Q?M.INSTANCE:y.INSTANCE}return new f(R,j,U)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=k.get(this.key);if(typeof R=="boolean"){const j=R?"true":"false";return this.value===j?M.INSTANCE:y.INSTANCE}return this}evaluate(R){return R.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}class o{constructor(R,j){this.key=R,this.negated=j,this.type=3}static create(R,j=null){const U=k.get(R);return typeof U=="boolean"?U?M.INSTANCE:y.INSTANCE:new o(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:p(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=k.get(this.key);return typeof R=="boolean"?R?M.INSTANCE:y.INSTANCE:this}evaluate(R){return!R.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function l(R,j){if(typeof R=="string"){const U=parseFloat(R);isNaN(U)||(R=U)}return typeof R=="string"||typeof R=="number"?j(R):M.INSTANCE}class s{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=12}static create(R,j,U=null){return l(j,b=>new s(R,b,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this.value,this)),this.negated}}class a{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=13}static create(R,j,U=null){return l(j,b=>new a(R,b,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class O{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=14}static create(R,j,U=null){return l(j,b=>new O(R,b,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.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 w{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=15}static create(R,j,U=null){return l(j,b=>new w(R,b,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.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 S{constructor(R,j){this.key=R,this.regexp=j,this.type=7,this.negated=null}static create(R,j){return new S(R,j)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.key<R.key)return-1;if(this.key>R.key)return 1;const j=this.regexp?this.regexp.source:"",U=R.regexp?R.regexp.source:"";return j<U?-1:j>U?1:0}equals(R){if(R.type===this.type){const j=this.regexp?this.regexp.source:"",U=R.regexp?R.regexp.source:"";return this.key===R.key&&j===U}return!1}substituteConstants(){return this}evaluate(R){let j=R.getValue(this.key);return this.regexp?this.regexp.test(j):!1}serialize(){const R=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${R}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(R){this._actual=R,this.type=8}static create(R){return new L(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function D(R){let j=null;for(let U=0,b=R.length;U<b;U++){const Q=R[U].substituteConstants();if(R[U]!==Q&&j===null){j=[];for(let ee=0;ee<U;ee++)j[ee]=R[ee]}j!==null&&(j[U]=Q)}return j===null?R:j}class A{constructor(R,j){this.expr=R,this.negated=j,this.type=6}static create(R,j){return A._normalizeArr(R,j)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let j=0,U=this.expr.length;j<U;j++){const b=n(this.expr[j],R.expr[j]);if(b!==0)return b}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].equals(R.expr[j]))return!1;return!0}return!1}substituteConstants(){const R=D(this.expr);return R===this.expr?this:A.create(R,this.negated)}evaluate(R){for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].evaluate(R))return!1;return!0}static _normalizeArr(R,j){const U=[];let b=!1;for(const Q of R){if(!Q)continue;if(Q.type===1){b=!0;continue}if(Q.type===0)return M.INSTANCE;if(Q.type===6){U.push(...Q.expr);continue}U.push(Q)}if(U.length===0&&b)return y.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(n);for(let Q=1;Q<U.length;Q++)U[Q-1].equals(U[Q])&&(U.splice(Q,1),Q--);if(U.length===1)return U[0];for(;U.length>1;){const Q=U[U.length-1];if(Q.type!==9)break;U.pop();const ee=U.pop(),oe=U.length===0,fe=T.create(Q.expr.map(Fe=>A.create([Fe,ee],null)),null,oe);fe&&(U.push(fe),U.sort(n))}return U.length===1?U[0]:new A(U,j)}serialize(){return this.expr.map(R=>R.serialize()).join(" && ")}keys(){const R=[];for(let j of this.expr)R.push(...j.keys());return R}negate(){if(!this.negated){const R=[];for(let j of this.expr)R.push(j.negate());this.negated=T.create(R,this,!0)}return this.negated}}class T{constructor(R,j){this.expr=R,this.negated=j,this.type=9}static create(R,j,U){return T._normalizeArr(R,j,U)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let j=0,U=this.expr.length;j<U;j++){const b=n(this.expr[j],R.expr[j]);if(b!==0)return b}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].equals(R.expr[j]))return!1;return!0}return!1}substituteConstants(){const R=D(this.expr);return R===this.expr?this:T.create(R,this.negated,!1)}evaluate(R){for(let j=0,U=this.expr.length;j<U;j++)if(this.expr[j].evaluate(R))return!0;return!1}static _normalizeArr(R,j,U){let b=[],Q=!1;if(R){for(let ee=0,oe=R.length;ee<oe;ee++){const fe=R[ee];if(!fe)continue;if(fe.type===0){Q=!0;continue}if(fe.type===1)return y.INSTANCE;if(fe.type===9){b=b.concat(fe.expr);continue}b.push(fe)}if(b.length===0&&Q)return M.INSTANCE;b.sort(n)}if(b.length===0)return;if(b.length===1)return b[0];for(let ee=1;ee<b.length;ee++)b[ee-1].equals(b[ee])&&(b.splice(ee,1),ee--);if(b.length===1)return b[0];if(U){for(let ee=0;ee<b.length;ee++)for(let oe=ee+1;oe<b.length;oe++)C(b[ee],b[oe])&&(b.splice(oe,1),oe--);if(b.length===1)return b[0]}return new T(b,j)}serialize(){return this.expr.map(R=>R.serialize()).join(" || ")}keys(){const R=[];for(let j of this.expr)R.push(...j.keys());return R}negate(){if(!this.negated){let R=[];for(let j of this.expr)R.push(j.negate());for(;R.length>1;){const j=R.shift(),U=R.shift(),b=[];for(const ee of F(j))for(const oe of F(U))b.push(A.create([ee,oe],null));const Q=R.length===0;R.unshift(T.create(b,null,Q))}this.negated=R[0]}return this.negated}}class x extends m{constructor(R,j,U){super(R,null);this._defaultValue=j,typeof U=="object"?x._info.push(Object.assign(Object.assign({},U),{key:R})):U!==!0&&x._info.push({key:R,description:U,type:j!=null?typeof j:void 0})}static all(){return x._info.values()}bindTo(R){return R.createKey(this.key,this._defaultValue)}getValue(R){return R.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(R){return g.create(this.key,R)}}x._info=[];const d=Object(P.c)("contextKeyService"),E="setContext";function p(R,j){return R<j?-1:R>j?1:0}function v(R,j,U,b){return R<U?-1:R>U?1:j<b?-1:j>b?1:0}function C(R,j){if(j.type===6&&R.type!==9&&R.type!==6){for(const Q of j.expr)if(R.equals(Q))return!0}const U=R.negate(),b=F(U).concat(F(j));b.sort(n);for(let Q=0;Q<b.length;Q++){const ee=b[Q],oe=ee.negate();for(let fe=Q+1;fe<b.length;fe++){const Fe=b[fe];if(oe.equals(Fe))return!0}}return!1}function F(R){return R.type===9?R.expr:[R]}},TXwP:function(it,ve,W){var ie,G;(function(){var P;(function(){"use strict";var k=[,,function(n){function M(g){this.__parent=g,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=[]}M.prototype.clone_empty=function(){var g=new M(this.__parent);return g.set_indent(this.__indent_count,this.__alignment_count),g},M.prototype.item=function(g){return g<0?this.__items[this.__items.length+g]:this.__items[g]},M.prototype.has_match=function(g){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(g))return!0;return!1},M.prototype.set_indent=function(g,u){this.is_empty()&&(this.__indent_count=g||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},M.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)},M.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},M.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var g=this.__parent.current_line;return g.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),g.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),g.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,g.__items[0]===" "&&(g.__items.splice(0,1),g.__character_count-=1),!0}return!1},M.prototype.is_empty=function(){return this.__items.length===0},M.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},M.prototype.push=function(g){this.__items.push(g);var u=g.lastIndexOf(`
|
|
`);u!==-1?this.__character_count=g.length-u:this.__character_count+=g.length},M.prototype.pop=function(){var g=null;return this.is_empty()||(g=this.__items.pop(),this.__character_count-=g.length),g},M.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},M.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},M.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},M.prototype.toString=function(){var g="";return this.is_empty()?this.__parent.indent_empty_lines&&(g=this.__parent.get_indent_string(this.__indent_count)):(g=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),g+=this.__items.join("")),g};function y(g,u){this.__cache=[""],this.__indent_size=g.indent_size,this.__indent_string=g.indent_char,g.indent_with_tabs||(this.__indent_string=new Array(g.indent_size+1).join(g.indent_char)),u=u||"",g.indent_level>0&&(u=new Array(g.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}y.prototype.get_indent_size=function(g,u){var c=this.__base_string_length;return u=u||0,g<0&&(c=0),c+=g*this.__indent_size,c+=u,c},y.prototype.get_indent_string=function(g,u){var c=this.__base_string;return u=u||0,g<0&&(g=0,c=""),u+=g*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},y.prototype.__ensure_cache=function(g){for(;g>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var g=this.__cache.length,u=0,c="";this.__indent_size&&g>=this.__indent_size&&(u=Math.floor(g/this.__indent_size),g-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),g&&(c+=new Array(g+1).join(" ")),this.__cache.push(c)};function m(g,u){this.__indent_cache=new y(g,u),this.raw=!1,this._end_with_newline=g.end_with_newline,this.indent_size=g.indent_size,this.wrap_line_length=g.wrap_line_length,this.indent_empty_lines=g.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new M(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(g,u){return this.__indent_cache.get_indent_string(g,u)},m.prototype.get_indent_size=function(g,u){return this.__indent_cache.get_indent_size(g,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(g){return this.is_empty()||!g&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(g){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
|
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
`);return g!==`
|
|
`&&(c=c.replace(/[\n]/g,g)),c},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(g,u){return g=g||0,u=u||0,this.next_line.set_indent(g,u),this.__lines.length>1?(this.current_line.set_indent(g,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(g){for(var u=0;u<g.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(g.whitespace_before),this.current_line.push(g.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(g){this.__add_space_before_token(),this.current_line.push(g),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(g){for(var u=this.__lines.length;g<u;)this.__lines[g]._remove_indent(),g++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(g){for(g=g===void 0?!1:g,this.current_line.trim();g&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(g,u){for(var c=this.__lines.length-2;c>=0;){var f=this.__lines[c];if(f.is_empty())break;if(f.item(0).indexOf(g)!==0&&f.item(-1)!==u){this.__lines.splice(c+1,0,new M(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=m},,,,function(n){function M(g,u){this.raw_options=y(g,u),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"])}M.prototype._get_array=function(g,u){var c=this.raw_options[g],f=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(f=c.concat()):typeof c=="string"&&(f=c.split(/[^a-zA-Z0-9_\/\-]+/)),f},M.prototype._get_boolean=function(g,u){var c=this.raw_options[g],f=c===void 0?!!u:!!c;return f},M.prototype._get_characters=function(g,u){var c=this.raw_options[g],f=u||"";return typeof c=="string"&&(f=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),f},M.prototype._get_number=function(g,u){var c=this.raw_options[g];u=parseInt(u,10),isNaN(u)&&(u=0);var f=parseInt(c,10);return isNaN(f)&&(f=u),f},M.prototype._get_selection=function(g,u,c){var f=this._get_selection_list(g,u,c);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+g+`' can only be one of the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return f[0]},M.prototype._get_selection_list=function(g,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var f=this._get_array(g,c);if(!this._is_valid_selection(f,u))throw new Error("Invalid Option Value: The option '"+g+`' can contain only the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return f},M.prototype._is_valid_selection=function(g,u){return g.length&&u.length&&!g.some(function(c){return u.indexOf(c)===-1})};function y(g,u){var c={};g=m(g);var f;for(f in g)f!==u&&(c[f]=g[f]);if(u&&g[u])for(f in g[u])c[f]=g[u][f];return c}function m(g){var u={},c;for(c in g){var f=c.replace(/-/g,"_");u[f]=g[c]}return u}n.exports.Options=M,n.exports.normalizeOpts=m,n.exports.mergeOpts=y},,function(n){var M=RegExp.prototype.hasOwnProperty("sticky");function y(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},y.prototype.peek=function(m){var g=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(g=this.__input.charAt(m)),g},y.prototype.__match=function(m,g){m.lastIndex=g;var u=m.exec(this.__input);return u&&!(M&&m.sticky)&&(u.index!==g&&(u=null)),u},y.prototype.test=function(m,g){return g=g||0,g+=this.__position,g>=0&&g<this.__input_length?!!this.__match(m,g):!1},y.prototype.testChar=function(m,g){var u=this.peek(g);return m.lastIndex=0,u!==null&&m.test(u)},y.prototype.match=function(m){var g=this.__match(m,this.__position);return g?this.__position+=g[0].length:g=null,g},y.prototype.read=function(m,g,u){var c="",f;return m&&(f=this.match(m),f&&(c+=f[0])),g&&(f||!m)&&(c+=this.readUntil(g,u)),c},y.prototype.readUntil=function(m,g){var u="",c=this.__position;m.lastIndex=this.__position;var f=m.exec(this.__input);return f?(c=f.index,g&&(c+=f[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},y.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},y.prototype.get_regexp=function(m,g){var u=null,c="g";return g&&M&&(c="y"),typeof m=="string"&&m!==""?u=new RegExp(m,c):m&&(u=new RegExp(m.source,c)),u},y.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(m){var g=this.__position,u=this.readUntilAfter(m);return this.__position=g,u},y.prototype.lookBack=function(m){var g=this.__position-1;return g>=m.length&&this.__input.substring(g-m.length,g).toLowerCase()===m},n.exports.InputScanner=y},,,,,function(n){function M(y,m){y=typeof y=="string"?y:y.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+m,"g")}M.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var g=this.__directive_pattern.exec(y);g;)m[g[1]]=g[2],g=this.__directive_pattern.exec(y);return m},M.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=M},,function(n,M,y){var m=y(16).Beautifier,g=y(17).Options;function u(c,f){var o=new m(c,f);return o.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new g}},function(n,M,y){var m=y(17).Options,g=y(2).Output,u=y(8).InputScanner,c=y(13).Directives,f=new c(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,s=/\s/,a=/(?:\s|\n)+/g,O=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,w=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(L,D){this._source_text=L||"",this._options=new m(D),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"]}S.prototype.eatString=function(L){var D="";for(this._ch=this._input.next();this._ch;){if(D+=this._ch,this._ch==="\\")D+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return D},S.prototype.eatWhitespace=function(L){for(var D=s.test(this._input.peek()),A=0;s.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
|
|
`&&((A===0||A<this._options.max_preserve_newlines)&&(A++,this._output.add_new_line(!0)));return D},S.prototype.foundNestedPseudoClass=function(){for(var L=0,D=1,A=this._input.peek(D);A;){if(A==="{")return!0;if(A==="(")L+=1;else if(A===")"){if(L===0)return!1;L-=1}else if(A===";"||A==="}")return!1;D++,A=this._input.peek(D)}return!1},S.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},S.prototype.preserveSingleSpace=function(L){L&&(this._output.space_before_token=!0)},S.prototype.indent=function(){this._indentLevel++},S.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,D=this._options.eol;D==="auto"&&(D=`
|
|
`,L&&o.test(L||"")&&(D=L.match(o)[0])),L=L.replace(l,`
|
|
`);var A=L.match(/^[\t ]*/)[0];this._output=new g(this._options,A),this._input=new u(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var T=0,x=!1,d=!1,E=!1,p=!1,v=!1,C=!1,F=this._ch,R=!1,j,U,b;j=this._input.read(a),U=j!=="",b=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Q=this._input.read(O),ee=f.get_directives(Q);ee&&ee.ignore==="start"&&(Q+=f.readIgnored(this._input)),this.print_string(Q),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(w)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?p=!0:oe==="import"&&(v=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(E=!0)):!x&&T===0&&oe.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),E?(E=!1,x=this._indentLevel>=this._nestedLevel):x=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&x&&(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)):(b==="("?this._output.space_before_token=!1:b!==","&&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(),b==="{"&&this._output.trim(!0),v=!1,p=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),x=!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 fe=0;fe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;fe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[fe])){R=!0;break}(x||E)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!p&&T===0?(this.print_string(":"),d||(d=!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 Fe=b==='"'||b==="'";this.preserveSingleSpace(Fe||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")R=!1,T===0?(d&&(this.outdent(),d=!1),p=!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(),T++,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(")")),T&&(T--,this.outdent()));else{var Le=!1;this._input.lookBack("with")&&(Le=!0),this.preserveSingleSpace(U||Le),this.print_string(this._ch),d&&b==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),C=!0):(this.eatWhitespace(),T++,this.indent())}else if(this._ch===")")T&&(T--,this.outdent()),C&&this._input.peek()===";"&&this._options.selector_separator_newline&&(C=!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&&(!d||C)&&T===0&&!v&&!p?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!d&&T===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(U),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 Ie=b==='"'||b==="'";this.preserveSingleSpace(Ie||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&R&&this._output.add_new_line()}var Be=this._output.get_code(D);return Be},n.exports.Beautifier=S},function(n,M,y){var m=y(6).Options;function g(u){m.call(this,u,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<f.length;o++)f[o]!=="expand"?this.brace_style="collapse":this.brace_style=f[o]}g.prototype=new m,n.exports.Options=g}],B={};function z(n){var M=B[n];if(M!==void 0)return M.exports;var y=B[n]={exports:{}};return k[n](y,y.exports,z),y.exports}var K=z(15);P=K})();var V=P;!(ie=[],G=function(){return{css_beautify:V}}.apply(ve,ie),G!==void 0&&(it.exports=G))})()},UU91:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___W-luD",flex_space_between:"flex_space_between___MDZOl",flex_box_vertical_center:"flex_box_vertical_center___GF3w8",flex_box_center_end:"flex_box_center_end___UZLKo",flex_box_column:"flex_box_column___26ZEG",bg:"bg___Lrg3h",containerTitle:"containerTitle___36aFc",containerDesc:"containerDesc___1ITIo",listItem:"listItem___3yIgk",info:"info___1J349",title:"title___1poFp",titleLeft:"titleLeft___1G4yJ",titleRight:"titleRight___3ZAtk",acitons:"acitons___rsUze",export:"export___23Ina"}},Vhoy:function(it,ve,W){"use strict";W.d(ve,"d",function(){return V}),W.d(ve,"e",function(){return k}),W.d(ve,"c",function(){return B}),W.d(ve,"b",function(){return z}),W.d(ve,"a",function(){return K});var ie=W("MI8n");class G{constructor(){this._icons=new Map,this._onDidRegister=new ie.b}add(n){const M=this._icons.get(n.id);M?n.description?M.description=n.description:console.error(`Duplicate registration of codicon ${n.id}`):(this._icons.set(n.id,n),this._onDidRegister.fire(n))}get(n){return this._icons.get(n)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const P=new G,V=P;function k(n,M){return new z(n,M)}function B(n){return n?n.replace(/\$\((.*?)\)/g,(M,y)=>` ${y} `).trim():""}class z{constructor(n,M,y){this.id=n,this.definition=M,this.description=y,P.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var K;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const M=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function y(u){if(u instanceof z)return["codicon","codicon-"+u.id];const c=M.exec(u.id);if(!c)return y(z.error);let[,f,o]=c;const l=["codicon","codicon-"+f];return o&&l.push("codicon-modifier-"+o.substr(1)),l}n.asClassNameArray=y;function m(u){return y(u).join(" ")}n.asClassName=m;function g(u){return"."+y(u).join(".")}n.asCSSSelector=g})(K||(K={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(z||(z={}))},"VrN/":function(it,ve,W){(function(ie,G){it.exports=G()})(this,function(){"use strict";var ie=navigator.userAgent,G=navigator.platform,P=/gecko\/\d/i.test(ie),V=/MSIE \d/.test(ie),k=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),B=/Edge\/(\d+)/.exec(ie),z=V||k||B,K=z&&(V?document.documentMode||6:+(B||k)[1]),n=!B&&/WebKit\//.test(ie),M=n&&/Qt\/\d+\.\d+/.test(ie),y=!B&&/Chrome\//.test(ie),m=/Opera\//.test(ie),g=/Apple Computer/.test(navigator.vendor),u=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),c=/PhantomJS/.test(ie),f=!B&&/AppleWebKit/.test(ie)&&/Mobile\/\w+/.test(ie),o=/Android/.test(ie),l=f||o||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),s=f||/Mac/.test(G),a=/\bCrOS\b/.test(ie),O=/win/i.test(G),w=m&&ie.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(m=!1,n=!0);var S=s&&(M||m&&(w==null||w<12.11)),L=P||z&&K>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var A=function(e,t){var r=e.className,i=D(t).exec(r);if(i){var h=r.slice(i.index+i[0].length);e.className=r.slice(0,i.index)+(h?i[1]+h:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return T(e).appendChild(t)}function d(e,t,r,i){var h=document.createElement(e);if(r&&(h.className=r),i&&(h.style.cssText=i),typeof t=="string")h.appendChild(document.createTextNode(t));else if(t)for(var N=0;N<t.length;++N)h.appendChild(t[N]);return h}function E(e,t,r,i){var h=d(e,t,r,i);return h.setAttribute("role","presentation"),h}var p;document.createRange?p=function(e,t,r,i){var h=document.createRange();return h.setEnd(i||e,r),h.setStart(e,t),h}:p=function(e,t,r){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(h){return i}return i.collapse(!0),i.moveEnd("character",r),i.moveStart("character",t),i};function v(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function C(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function F(e,t){var r=e.className;D(t).test(r)||(e.className+=(r?" ":"")+t)}function R(e,t){for(var r=e.split(" "),i=0;i<r.length;i++)r[i]&&!D(r[i]).test(t)&&(t+=" "+r[i]);return t}var j=function(e){e.select()};f?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:z&&(j=function(e){try{e.select()}catch(t){}});function U(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function b(e,t,r){t||(t={});for(var i in e)e.hasOwnProperty(i)&&(r!==!1||!t.hasOwnProperty(i))&&(t[i]=e[i]);return t}function Q(e,t,r,i,h){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var N=i||0,J=h||0;;){var Z=e.indexOf(" ",N);if(Z<0||Z>=t)return J+(t-N);J+=Z-N,J+=r-J%r,N=Z+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function oe(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var fe=50,Fe={toString:function(){return"CodeMirror.Pass"}},Le={scroll:!1},Ie={origin:"*mouse"},Be={origin:"+move"};function We(e,t,r){for(var i=0,h=0;;){var N=e.indexOf(" ",i);N==-1&&(N=e.length);var J=N-i;if(N==e.length||h+J>=t)return i+Math.min(J,t-h);if(h+=N-i,h+=r-h%r,i=N+1,h>=t)return i}}var ge=[""];function ue(e){for(;ge.length<=e;)ge.push(ke(ge)+" ");return ge[e]}function ke(e){return e[e.length-1]}function lt(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=t(e[i],i);return r}function ot(e,t,r){for(var i=0,h=r(t);i<e.length&&r(e[i])<=h;)i++;e.splice(i,0,t)}function ut(){}function xt(e,t){var r;return Object.create?r=Object.create(e):(ut.prototype=e,r=new ut),t&&b(t,r),r}var Je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Je.test(e))}function dt(e,t){return t?t.source.indexOf("\\w")>-1&&et(e)?!0:t.test(e):et(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ce=/[\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 Ue(e){return e.charCodeAt(0)>=768&&Ce.test(e)}function Ke(e,t,r){for(;(r<0?t>0:t<e.length)&&Ue(e.charAt(t));)t+=r;return t}function st(e,t,r){for(var i=t>r?-1:1;;){if(t==r)return t;var h=(t+r)/2,N=i<0?Math.ceil(h):Math.floor(h);if(N==t)return e(N)?t:r;e(N)?r=N:t=N+i}}function ht(e,t,r,i){if(!e)return i(t,r,"ltr",0);for(var h=!1,N=0;N<e.length;++N){var J=e[N];(J.from<r&&J.to>t||t==r&&J.to==t)&&(i(Math.max(J.from,t),Math.min(J.to,r),J.level==1?"rtl":"ltr",N),h=!0)}h||i(t,r,"ltr")}var yt=null;function mt(e,t,r){var i;yt=null;for(var h=0;h<e.length;++h){var N=e[h];if(N.from<t&&N.to>t)return h;N.to==t&&(N.from!=N.to&&r=="before"?i=h:yt=h),N.from==t&&(N.from!=N.to&&r!="before"?i=h:yt=h)}return i!=null?i:yt}var Ot=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(re){return re<=247?e.charAt(re):1424<=re&&re<=1524?"R":1536<=re&&re<=1785?t.charAt(re-1536):1774<=re&&re<=2220?"r":8192<=re&&re<=8203?"w":re==8204?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,h=/[stwN]/,N=/[LRr]/,J=/[Lb1n]/,Z=/[1n]/;function $(re,be,we){this.level=re,this.from=be,this.to=we}return function(re,be){var we=be=="ltr"?"L":"R";if(re.length==0||be=="ltr"&&!i.test(re))return!1;for(var ze=re.length,je=[],nt=0;nt<ze;++nt)je.push(r(re.charCodeAt(nt)));for(var ct=0,Ct=we;ct<ze;++ct){var Mt=je[ct];Mt=="m"?je[ct]=Ct:Ct=Mt}for(var Ht=0,kt=we;Ht<ze;++Ht){var zt=je[Ht];zt=="1"&&kt=="r"?je[Ht]="n":N.test(zt)&&(kt=zt,zt=="r"&&(je[Ht]="R"))}for(var pn=1,$t=je[0];pn<ze-1;++pn){var Rn=je[pn];Rn=="+"&&$t=="1"&&je[pn+1]=="1"?je[pn]="1":Rn==","&&$t==je[pn+1]&&($t=="1"||$t=="n")&&(je[pn]=$t),$t=Rn}for(var hi=0;hi<ze;++hi){var zi=je[hi];if(zi==",")je[hi]="N";else if(zi=="%"){var wi=void 0;for(wi=hi+1;wi<ze&&je[wi]=="%";++wi);for(var yr=hi&&je[hi-1]=="!"||wi<ze&&je[wi]=="1"?"1":"N",fr=hi;fr<wi;++fr)je[fr]=yr;hi=wi-1}}for(var Ni=0,pr=we;Ni<ze;++Ni){var Ji=je[Ni];pr=="L"&&Ji=="1"?je[Ni]="L":N.test(Ji)&&(pr=Ji)}for(var Ki=0;Ki<ze;++Ki)if(h.test(je[Ki])){var Ui=void 0;for(Ui=Ki+1;Ui<ze&&h.test(je[Ui]);++Ui);for(var Li=(Ki?je[Ki-1]:we)=="L",mr=(Ui<ze?je[Ui]:we)=="L",Ua=Li==mr?Li?"L":"R":we,ca=Ki;ca<Ui;++ca)je[ca]=Ua;Ki=Ui-1}for(var tr=[],Wr,Vi=0;Vi<ze;)if(J.test(je[Vi])){var po=Vi;for(++Vi;Vi<ze&&J.test(je[Vi]);++Vi);tr.push(new $(0,po,Vi))}else{var qr=Vi,va=tr.length,ya=be=="rtl"?1:0;for(++Vi;Vi<ze&&je[Vi]!="L";++Vi);for(var ur=qr;ur<Vi;)if(Z.test(je[ur])){qr<ur&&(tr.splice(va,0,new $(1,qr,ur)),va+=ya);var Fa=ur;for(++ur;ur<Vi&&Z.test(je[ur]);++ur);tr.splice(va,0,new $(2,Fa,ur)),va+=ya,qr=ur}else++ur;qr<Vi&&tr.splice(va,0,new $(1,qr,Vi))}return be=="ltr"&&(tr[0].level==1&&(Wr=re.match(/^\s+/))&&(tr[0].from=Wr[0].length,tr.unshift(new $(0,0,Wr[0].length))),ke(tr).level==1&&(Wr=re.match(/\s+$/))&&(ke(tr).to-=Wr[0].length,tr.push(new $(0,ze-Wr[0].length,ze)))),be=="rtl"?tr.reverse():tr}}();function Tt(e,t){var r=e.order;return r==null&&(r=e.order=Ot(e.text,t)),r}var Et=[],Qe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||Et).concat(r)}};function Kt(e,t){return e._handlers&&e._handlers[t]||Et}function Ut(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var i=e._handlers,h=i&&i[t];if(h){var N=oe(h,r);N>-1&&(i[t]=h.slice(0,N).concat(h.slice(N+1)))}}}function qe(e,t){var r=Kt(e,t);if(!r.length)return;for(var i=Array.prototype.slice.call(arguments,2),h=0;h<r.length;++h)r[h].apply(null,i)}function tt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),qe(e,r||t.type,e,t),he(t)||t.codemirrorIgnore}function Re(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)oe(r,t[i])==-1&&r.push(t[i])}function Te(e,t){return Kt(e,t).length>0}function Se(e){e.prototype.on=function(t,r){Qe(this,t,r)},e.prototype.off=function(t,r){Ut(this,t,r)}}function te(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function he(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function me(e){te(e),se(e)}function xe(e){return e.target||e.srcElement}function Me(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var Pe=function(){if(z&&K<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),rt;function ft(e){if(rt==null){var t=d("span","\u200B");x(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(rt=t.offsetWidth<=1&&t.offsetHeight>2&&!(z&&K<8))}var r=rt?d("span","\u200B"):d("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var pt;function Bt(e){if(pt!=null)return pt;var t=x(e,document.createTextNode("A\u062EA")),r=p(t,0,1).getBoundingClientRect(),i=p(t,1,2).getBoundingClientRect();return T(e),!r||r.left==r.right?!1:pt=i.right-r.right<3}var wt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],i=e.length;t<=i;){var h=e.indexOf(`
|
|
`,t);h==-1&&(h=e.length);var N=e.slice(t,e.charAt(h-1)=="\r"?h-1:h),J=N.indexOf("\r");J!=-1?(r.push(N.slice(0,J)),t+=J+1):(r.push(N),t=h+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ye=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},en=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ge=null;function hn(e){if(Ge!=null)return Ge;var t=x(e,d("span","x")),r=t.getBoundingClientRect(),i=p(t,0,1).getBoundingClientRect();return Ge=Math.abs(r.left-i.left)>1}var At={},Ft={};function Gt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),At[e]=t}function on(e,t){Ft[e]=t}function _t(e){if(typeof e=="string"&&Ft.hasOwnProperty(e))e=Ft[e];else if(e&&typeof e.name=="string"&&Ft.hasOwnProperty(e.name)){var t=Ft[e.name];typeof t=="string"&&(t={name:t}),e=xt(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _t("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _t("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function tn(e,t){t=_t(t);var r=At[t.name];if(!r)return tn(e,"text/plain");var i=r(e,t);if(St.hasOwnProperty(t.name)){var h=St[t.name];for(var N in h){if(!h.hasOwnProperty(N))continue;i.hasOwnProperty(N)&&(i["_"+N]=i[N]),i[N]=h[N]}}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var J in t.modeProps)i[J]=t.modeProps[J];return i}var St={};function It(e,t){var r=St.hasOwnProperty(e)?St[e]:St[e]={};b(t,r)}function Yt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var i in t){var h=t[i];h instanceof Array&&(h=h.concat([])),r[i]=h}return r}function mn(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function ln(e,t,r){return e.startState?e.startState(t,r):!0}var Jt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Jt.prototype.eol=function(){return this.pos>=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jt.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Jt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Jt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Jt.prototype.backUp=function(e){this.pos-=e},Jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Q(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Q(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.indentation=function(){return Q(this.string,null,this.tabSize)-(this.lineStart?Q(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.match=function(e,t,r){if(typeof e=="string"){var i=function(J){return r?J.toLowerCase():J},h=this.string.substr(this.pos,e.length);if(i(h)==i(e))return t!==!1&&(this.pos+=e.length),!0}else{var N=this.string.slice(this.pos).match(e);return N&&N.index>0?null:(N&&t!==!1&&(this.pos+=N[0].length),N)}},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Jt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Jt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Rt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var i=0;;++i){var h=r.children[i],N=h.chunkSize();if(t<N){r=h;break}t-=N}return r.lines[t]}function Gn(e,t,r){var i=[],h=t.line;return e.iter(t.line,r.line+1,function(N){var J=N.text;h==r.line&&(J=J.slice(0,r.ch)),h==t.line&&(J=J.slice(t.ch)),i.push(J),++h}),i}function un(e,t,r){var i=[];return e.iter(t,r,function(h){i.push(h.text)}),i}function vn(e,t){var r=t-e.height;if(r)for(var i=e;i;i=i.parent)i.height+=r}function Qt(e){if(e.parent==null)return null;for(var t=e.parent,r=oe(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var h=0;!(i.children[h]==t);++h)r+=i.children[h].chunkSize();return r+t.first}function An(e,t){var r=e.first;e:do{for(var i=0;i<e.children.length;++i){var h=e.children[i],N=h.height;if(t<N){e=h;continue e}t-=N,r+=h.chunkSize()}return r}while(!e.lines);for(var J=0;J<e.lines.length;++J){var Z=e.lines[J],$=Z.height;if(t<$)break;t-=$}return r+J}function zn(e,t){return t>=e.first&&t<e.first+e.size}function Nn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function at(e,t,r){if(r===void 0&&(r=null),!(this instanceof at))return new at(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Wt(e,t){return e.line-t.line||e.ch-t.ch}function Vn(e,t){return e.sticky==t.sticky&&Wt(e,t)==0}function bn(e){return at(e.line,e.ch)}function cn(e,t){return Wt(e,t)<0?t:e}function Mn(e,t){return Wt(e,t)<0?e:t}function Y(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function _(e,t){if(t.line<e.first)return at(e.first,0);var r=e.first+e.size-1;return t.line>r?at(r,Rt(e,r).text.length):I(t,Rt(e,t.line).text.length)}function I(e,t){var r=e.ch;return r==null||r>t?at(e.line,t):r<0?at(e.line,0):e}function H(e,t){for(var r=[],i=0;i<t.length;i++)r[i]=_(e,t[i]);return r}var q=function(e,t){this.state=e,this.lookAhead=t},X=function(e,t,r,i){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};X.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},X.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},X.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},X.fromSaved=function(e,t,r){return t instanceof q?new X(e,Yt(e.mode,t.state),r,t.lookAhead):new X(e,Yt(e.mode,t),r)},X.prototype.save=function(e){var t=e!==!1?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new q(t,this.maxLookAhead):t};function le(e,t,r,i){var h=[e.state.modeGen],N={};gn(e,t.text,e.doc.mode,r,function(re,be){return h.push(re,be)},N,i);for(var J=r.state,Z=function(re){r.baseTokens=h;var be=e.state.overlays[re],we=1,ze=0;r.state=!0,gn(e,t.text,be.mode,r,function(je,nt){for(var ct=we;ze<je;){var Ct=h[we];Ct>je&&h.splice(we,1,je,h[we+1],Ct),we+=2,ze=Math.min(je,Ct)}if(!nt)return;if(be.opaque)h.splice(ct,we-ct,je,"overlay "+nt),we=ct+2;else for(;ct<we;ct+=2){var Mt=h[ct+1];h[ct+1]=(Mt?Mt+" ":"")+"overlay "+nt}},N),r.state=J,r.baseTokens=null,r.baseTokenPos=1},$=0;$<e.state.overlays.length;++$)Z($);return{styles:h,classes:N.bgClass||N.textClass?N:null}}function Ve(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=Ze(e,Qt(t)),h=t.text.length>e.options.maxHighlightLength&&Yt(e.doc.mode,i.state),N=le(e,t,i);h&&(i.state=h),t.stateAfter=i.save(!h),t.styles=N.styles,N.classes?t.styleClasses=N.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ze(e,t,r){var i=e.doc,h=e.display;if(!i.mode.startState)return new X(i,!0,t);var N=Pt(e,t,r),J=N>i.first&&Rt(i,N-1).stateAfter,Z=J?X.fromSaved(i,J,N):new X(i,ln(i.mode),N);return i.iter(N,t,function($){Lt(e,$.text,Z);var re=Z.line;$.stateAfter=re==t-1||re%5==0||re>=h.viewFrom&&re<h.viewTo?Z.save():null,Z.nextLine()}),r&&(i.modeFrontier=Z.line),Z}function Lt(e,t,r,i){var h=e.doc.mode,N=new Jt(t,e.options.tabSize,r);for(N.start=N.pos=i||0,t==""&&Xe(h,r.state);!N.eol();)bt(h,N,r.state),N.start=N.pos}function Xe(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=mn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function bt(e,t,r,i){for(var h=0;h<10;h++){i&&(i[0]=mn(e,r).mode);var N=e.token(t,r);if(t.pos>t.start)return N}throw new Error("Mode "+e.name+" failed to advance stream.")}var Zt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Wn(e,t,r,i){var h=e.doc,N=h.mode,J;t=_(h,t);var Z=Rt(h,t.line),$=Ze(e,t.line,r),re=new Jt(Z.text,e.options.tabSize,$),be;for(i&&(be=[]);(i||re.pos<t.ch)&&!re.eol();)re.start=re.pos,J=bt(N,re,$.state),i&&be.push(new Zt(re,J,Yt(h.mode,$.state)));return i?be:new Zt(re,J,$.state)}function qn(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var i=r[1]?"bgClass":"textClass";t[i]==null?t[i]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+r[2])}return e}function gn(e,t,r,i,h,N,J){var Z=r.flattenSpans;Z==null&&(Z=e.options.flattenSpans);var $=0,re=null,be=new Jt(t,e.options.tabSize,i),we,ze=e.options.addModeClass&&[null];for(t==""&&qn(Xe(r,i.state),N);!be.eol();){if(be.pos>e.options.maxHighlightLength?(Z=!1,J&&Lt(e,t,i,be.pos),be.pos=t.length,we=null):we=qn(bt(r,be,i.state,ze),N),ze){var je=ze[0].name;je&&(we="m-"+(we?je+" "+we:je))}if(!Z||re!=we){for(;$<be.start;)$=Math.min(be.start,$+5e3),h($,re);re=we}be.start=be.pos}for(;$<be.pos;){var nt=Math.min(be.pos,$+5e3);h(nt,re),$=nt}}function Pt(e,t,r){for(var i,h,N=e.doc,J=r?-1:t-(e.doc.mode.innerMode?1e3:100),Z=t;Z>J;--Z){if(Z<=N.first)return N.first;var $=Rt(N,Z-1),re=$.stateAfter;if(re&&(!r||Z+(re instanceof q?re.lookAhead:0)<=N.modeFrontier))return Z;var be=Q($.text,null,e.options.tabSize);(h==null||i>be)&&(h=Z-1,i=be)}return h}function jt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,i=t-1;i>r;i--){var h=Rt(e,i).stateAfter;if(h&&(!(h instanceof q)||i+h.lookAhead<t)){r=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var nn=!1,rn=!1;function En(){nn=!0}function $n(){rn=!0}function dn(e,t,r){this.marker=e,this.from=t,this.to=r}function ci(e,t){if(e)for(var r=0;r<e.length;++r){var i=e[r];if(i.marker==t)return i}}function cr(e,t){for(var r,i=0;i<e.length;++i)e[i]!=t&&(r||(r=[])).push(e[i]);return r}function gr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function br(e,t,r){var i;if(e)for(var h=0;h<e.length;++h){var N=e[h],J=N.marker,Z=N.from==null||(J.inclusiveLeft?N.from<=t:N.from<t);if(Z||N.from==t&&J.type=="bookmark"&&(!r||!N.marker.insertLeft)){var $=N.to==null||(J.inclusiveRight?N.to>=t:N.to>t);(i||(i=[])).push(new dn(J,N.from,$?null:N.to))}}return i}function Hr(e,t,r){var i;if(e)for(var h=0;h<e.length;++h){var N=e[h],J=N.marker,Z=N.to==null||(J.inclusiveRight?N.to>=t:N.to>t);if(Z||N.from==t&&J.type=="bookmark"&&(!r||N.marker.insertLeft)){var $=N.from==null||(J.inclusiveLeft?N.from<=t:N.from<t);(i||(i=[])).push(new dn(J,$?null:N.from-t,N.to==null?null:N.to-t))}}return i}function fi(e,t){if(t.full)return null;var r=zn(e,t.from.line)&&Rt(e,t.from.line).markedSpans,i=zn(e,t.to.line)&&Rt(e,t.to.line).markedSpans;if(!r&&!i)return null;var h=t.from.ch,N=t.to.ch,J=Wt(t.from,t.to)==0,Z=br(r,h,J),$=Hr(i,N,J),re=t.text.length==1,be=ke(t.text).length+(re?h:0);if(Z)for(var we=0;we<Z.length;++we){var ze=Z[we];if(ze.to==null){var je=ci($,ze.marker);je?re&&(ze.to=je.to==null?null:je.to+be):ze.to=h}}if($)for(var nt=0;nt<$.length;++nt){var ct=$[nt];if(ct.to!=null&&(ct.to+=be),ct.from==null){var Ct=ci(Z,ct.marker);Ct||(ct.from=be,re&&(Z||(Z=[])).push(ct))}else ct.from+=be,re&&(Z||(Z=[])).push(ct)}Z&&(Z=Di(Z)),$&&$!=Z&&($=Di($));var Mt=[Z];if(!re){var Ht=t.text.length-2,kt;if(Ht>0&&Z)for(var zt=0;zt<Z.length;++zt)Z[zt].to==null&&(kt||(kt=[])).push(new dn(Z[zt].marker,null,null));for(var pn=0;pn<Ht;++pn)Mt.push(kt);Mt.push($)}return Mt}function Di(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function dr(e,t,r){var i=null;if(e.iter(t.line,r.line+1,function(je){if(je.markedSpans)for(var nt=0;nt<je.markedSpans.length;++nt){var ct=je.markedSpans[nt].marker;ct.readOnly&&(!i||oe(i,ct)==-1)&&(i||(i=[])).push(ct)}}),!i)return null;for(var h=[{from:t,to:r}],N=0;N<i.length;++N)for(var J=i[N],Z=J.find(0),$=0;$<h.length;++$){var re=h[$];if(Wt(re.to,Z.from)<0||Wt(re.from,Z.to)>0)continue;var be=[$,1],we=Wt(re.from,Z.from),ze=Wt(re.to,Z.to);(we<0||!J.inclusiveLeft&&!we)&&be.push({from:re.from,to:Z.from}),(ze>0||!J.inclusiveRight&&!ze)&&be.push({from:Z.to,to:re.to}),h.splice.apply(h,be),$+=be.length-3}return h}function Kr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function Ar(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function ai(e){return e.inclusiveLeft?-1:0}function Un(e){return e.inclusiveRight?1:0}function pi(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var i=e.find(),h=t.find(),N=Wt(i.from,h.from)||ai(e)-ai(t);if(N)return-N;var J=Wt(i.to,h.to)||Un(e)-Un(t);return J||t.id-e.id}function yn(e,t){var r=rn&&e.markedSpans,i;if(r)for(var h=void 0,N=0;N<r.length;++N)h=r[N],h.marker.collapsed&&(t?h.from:h.to)==null&&(!i||pi(i,h.marker)<0)&&(i=h.marker);return i}function mi(e){return yn(e,!0)}function Jn(e){return yn(e,!1)}function nr(e,t){var r=rn&&e.markedSpans,i;if(r)for(var h=0;h<r.length;++h){var N=r[h];N.marker.collapsed&&(N.from==null||N.from<t)&&(N.to==null||N.to>t)&&(!i||pi(i,N.marker)<0)&&(i=N.marker)}return i}function Si(e,t,r,i,h){var N=Rt(e,t),J=rn&&N.markedSpans;if(J)for(var Z=0;Z<J.length;++Z){var $=J[Z];if(!$.marker.collapsed)continue;var re=$.marker.find(0),be=Wt(re.from,r)||ai($.marker)-ai(h),we=Wt(re.to,i)||Un($.marker)-Un(h);if(be>=0&&we<=0||be<=0&&we>=0)continue;if(be<=0&&($.marker.inclusiveRight&&h.inclusiveLeft?Wt(re.to,r)>=0:Wt(re.to,r)>0)||be>=0&&($.marker.inclusiveRight&&h.inclusiveLeft?Wt(re.from,i)<=0:Wt(re.from,i)<0))return!0}}function Pi(e){for(var t;t=mi(e);)e=t.find(-1,!0).line;return e}function Gr(e){for(var t;t=Jn(e);)e=t.find(1,!0).line;return e}function Qi(e){for(var t,r;t=Jn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Sr(e,t){var r=Rt(e,t),i=Pi(r);return r==i?t:Qt(i)}function ir(e,t){if(t>e.lastLine())return t;var r=Rt(e,t),i;if(!Zi(e,r))return t;for(;i=Jn(r);)r=i.find(1,!0).line;return Qt(r)+1}function Zi(e,t){var r=rn&&t.markedSpans;if(r)for(var i=void 0,h=0;h<r.length;++h){if(i=r[h],!i.marker.collapsed)continue;if(i.from==null)return!0;if(i.marker.widgetNode)continue;if(i.from==0&&i.marker.inclusiveLeft&&zr(e,t,i))return!0}}function zr(e,t,r){if(r.to==null){var i=r.marker.find(1,!0);return zr(e,i.line,ci(i.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var h=void 0,N=0;N<t.markedSpans.length;++N)if(h=t.markedSpans[N],h.marker.collapsed&&!h.marker.widgetNode&&h.from==r.to&&(h.to==null||h.to!=r.from)&&(h.marker.inclusiveLeft||r.marker.inclusiveRight)&&zr(e,t,h))return!0}function gi(e){e=Pi(e);for(var t=0,r=e.parent,i=0;i<r.lines.length;++i){var h=r.lines[i];if(h==e)break;t+=h.height}for(var N=r.parent;N;r=N,N=r.parent)for(var J=0;J<N.children.length;++J){var Z=N.children[J];if(Z==r)break;t+=Z.height}return t}function Xn(e){if(e.height==0)return 0;for(var t=e.text.length,r,i=e;r=mi(i);){var h=r.find(0,!0);i=h.from.line,t+=h.from.ch-h.to.ch}for(i=e;r=Jn(i);){var N=r.find(0,!0);t-=i.text.length-N.from.ch,i=N.to.line,t+=i.text.length-N.to.ch}return t}function Ci(e){var t=e.display,r=e.doc;t.maxLine=Rt(r,r.first),t.maxLineLength=Xn(t.maxLine),t.maxLineChanged=!0,r.iter(function(i){var h=Xn(i);h>t.maxLineLength&&(t.maxLineLength=h,t.maxLine=i)})}var Ti=function(e,t,r){this.text=e,Ar(this,t),this.height=r?r(this):1};Ti.prototype.lineNo=function(){return Qt(this)},Se(Ti);function qi(e,t,r,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Kr(e),Ar(e,r);var h=i?i(e):1;h!=e.height&&vn(e,h)}function Nt(e){e.parent=null,Kr(e)}var an={},Xt={};function On(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xt:an;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Hn(e,t){var r=E("span",null,null,n?"padding-right: .1px":null),i={pre:E("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var h=0;h<=(t.rest?t.rest.length:0);h++){var N=h?t.rest[h-1]:t.line,J=void 0;i.pos=0,i.addToken=Fn,Bt(e.display.measure)&&(J=Tt(N,e.doc.direction))&&(i.addToken=rr(i.addToken,J)),i.map=[];var Z=t!=e.display.externalMeasured&&Qt(N);Or(N,i,Ve(e,N,Z)),N.styleClasses&&(N.styleClasses.bgClass&&(i.bgClass=R(N.styleClasses.bgClass,i.bgClass||"")),N.styleClasses.textClass&&(i.textClass=R(N.styleClasses.textClass,i.textClass||""))),i.map.length==0&&i.map.push(0,0,i.content.appendChild(ft(e.display.measure))),h==0?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var $=i.content.lastChild;(/\bcm-tab\b/.test($.className)||$.querySelector&&$.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return qe(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=R(i.pre.className,i.textClass||"")),i}function ti(e){var t=d("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fn(e,t,r,i,h,N,J){if(!t)return;var Z=e.splitSpaces?Ai(t,e.trailingSpace):t,$=e.cm.state.specialChars,re=!1,be;if(!$.test(t))e.col+=t.length,be=document.createTextNode(Z),e.map.push(e.pos,e.pos+t.length,be),z&&K<9&&(re=!0),e.pos+=t.length;else{be=document.createDocumentFragment();for(var we=0;;){$.lastIndex=we;var ze=$.exec(t),je=ze?ze.index-we:t.length-we;if(je){var nt=document.createTextNode(Z.slice(we,we+je));z&&K<9?be.appendChild(d("span",[nt])):be.appendChild(nt),e.map.push(e.pos,e.pos+je,nt),e.col+=je,e.pos+=je}if(!ze)break;we+=je+1;var ct=void 0;if(ze[0]==" "){var Ct=e.cm.options.tabSize,Mt=Ct-e.col%Ct;ct=be.appendChild(d("span",ue(Mt),"cm-tab")),ct.setAttribute("role","presentation"),ct.setAttribute("cm-text"," "),e.col+=Mt}else ze[0]=="\r"||ze[0]==`
|
|
`?(ct=be.appendChild(d("span",ze[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ct.setAttribute("cm-text",ze[0]),e.col+=1):(ct=e.cm.options.specialCharPlaceholder(ze[0]),ct.setAttribute("cm-text",ze[0]),z&&K<9?be.appendChild(d("span",[ct])):be.appendChild(ct),e.col+=1);e.map.push(e.pos,e.pos+1,ct),e.pos++}}if(e.trailingSpace=Z.charCodeAt(t.length-1)==32,r||i||h||re||N||J){var Ht=r||"";i&&(Ht+=i),h&&(Ht+=h);var kt=d("span",[be],Ht,N);if(J)for(var zt in J)J.hasOwnProperty(zt)&&zt!="style"&&zt!="class"&&kt.setAttribute(zt,J[zt]);return e.content.appendChild(kt)}e.content.appendChild(be)}function Ai(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,i="",h=0;h<e.length;h++){var N=e.charAt(h);N==" "&&r&&(h==e.length-1||e.charCodeAt(h+1)==32)&&(N="\xA0"),i+=N,r=N==" "}return i}function rr(e,t){return function(r,i,h,N,J,Z,$){h=h?h+" cm-force-border":"cm-force-border";for(var re=r.pos,be=re+i.length;;){for(var we=void 0,ze=0;ze<t.length&&!(we=t[ze],we.to>re&&we.from<=re);ze++);if(we.to>=be)return e(r,i,h,N,J,Z,$);e(r,i.slice(0,we.to-re),h,N,null,Z,$),N=null,i=i.slice(we.to-re),re=we.to}}}function Ln(e,t,r,i){var h=!i&&r.widgetNode;h&&e.map.push(e.pos,e.pos+t,h),!i&&e.cm.display.input.needsContentAttribute&&(h||(h=e.content.appendChild(document.createElement("span"))),h.setAttribute("cm-marker",r.id)),h&&(e.cm.display.input.setUneditable(h),e.content.appendChild(h)),e.pos+=t,e.trailingSpace=!1}function Or(e,t,r){var i=e.markedSpans,h=e.text,N=0;if(!i){for(var J=1;J<r.length;J+=2)t.addToken(t,h.slice(N,N=r[J]),On(r[J+1],t.cm.options));return}for(var Z=h.length,$=0,re=1,be="",we,ze,je=0,nt,ct,Ct,Mt,Ht;;){if(je==$){nt=ct=Ct=ze="",Ht=null,Mt=null,je=Infinity;for(var kt=[],zt=void 0,pn=0;pn<i.length;++pn){var $t=i[pn],Rn=$t.marker;if(Rn.type=="bookmark"&&$t.from==$&&Rn.widgetNode)kt.push(Rn);else if($t.from<=$&&($t.to==null||$t.to>$||Rn.collapsed&&$t.to==$&&$t.from==$)){if($t.to!=null&&$t.to!=$&&je>$t.to&&(je=$t.to,ct=""),Rn.className&&(nt+=" "+Rn.className),Rn.css&&(ze=(ze?ze+";":"")+Rn.css),Rn.startStyle&&$t.from==$&&(Ct+=" "+Rn.startStyle),Rn.endStyle&&$t.to==je&&(zt||(zt=[])).push(Rn.endStyle,$t.to),Rn.title&&((Ht||(Ht={})).title=Rn.title),Rn.attributes)for(var hi in Rn.attributes)(Ht||(Ht={}))[hi]=Rn.attributes[hi];Rn.collapsed&&(!Mt||pi(Mt.marker,Rn)<0)&&(Mt=$t)}else $t.from>$&&je>$t.from&&(je=$t.from)}if(zt)for(var zi=0;zi<zt.length;zi+=2)zt[zi+1]==je&&(ct+=" "+zt[zi]);if(!Mt||Mt.from==$)for(var wi=0;wi<kt.length;++wi)Ln(t,0,kt[wi]);if(Mt&&(Mt.from||0)==$){if(Ln(t,(Mt.to==null?Z+1:Mt.to)-$,Mt.marker,Mt.from==null),Mt.to==null)return;Mt.to==$&&(Mt=!1)}}if($>=Z)break;for(var yr=Math.min(Z,je);;){if(be){var fr=$+be.length;if(!Mt){var Ni=fr>yr?be.slice(0,yr-$):be;t.addToken(t,Ni,we?we+nt:nt,Ct,$+Ni.length==je?ct:"",ze,Ht)}if(fr>=yr){be=be.slice(yr-$),$=yr;break}$=fr,Ct=""}be=h.slice(N,N=r[re++]),we=On(r[re++],t.cm.options)}}}function Qn(e,t,r){this.line=t,this.rest=Qi(t),this.size=this.rest?Qt(ke(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Zi(e,t)}function Xi(e,t,r){for(var i=[],h,N=t;N<r;N=h){var J=new Qn(e.doc,Rt(e.doc,N),N);h=N+J.size,i.push(J)}return i}var Gi=null;function vr(e){Gi?Gi.ops.push(e):e.ownsGroup=Gi={ops:[e],delayedCallbacks:[]}}function Ba(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var i=0;i<e.ops.length;i++){var h=e.ops[i];if(h.cursorActivityHandlers)for(;h.cursorActivityCalled<h.cursorActivityHandlers.length;)h.cursorActivityHandlers[h.cursorActivityCalled++].call(null,h.cm)}}while(r<t.length)}function Hs(e,t){var r=e.ownsGroup;if(!r)return;try{Ba(r)}finally{Gi=null,t(r)}}var $r=null;function Oi(e,t){var r=Kt(e,t);if(!r.length)return;var i=Array.prototype.slice.call(arguments,2),h;Gi?h=Gi.delayedCallbacks:$r?h=$r:(h=$r=[],setTimeout(ms,0));for(var N=function(Z){h.push(function(){return r[Z].apply(null,i)})},J=0;J<r.length;++J)N(J)}function ms(){var e=$r;$r=null;for(var t=0;t<e.length;++t)e[t]()}function gs(e,t,r,i){for(var h=0;h<t.changes.length;h++){var N=t.changes[h];N=="text"?vs(e,t):N=="gutter"?Ha(e,t,r,i):N=="class"?Wa(e,t):N=="widget"&&Gs(e,t,i)}t.changes=null}function da(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),z&&K<8&&(e.node.style.zIndex=2)),e.node}function Ks(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=da(t);t.background=i.insertBefore(d("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function ja(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Hn(e,t)}function vs(e,t){var r=t.text.className,i=ja(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,Wa(e,t)):r&&(t.text.className=r)}function Wa(e,t){Ks(e,t),t.line.wrapClass?da(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ha(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var h=da(t);t.gutterBackground=d("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),h.insertBefore(t.gutterBackground,t.text)}var N=t.line.gutterMarkers;if(e.options.lineNumbers||N){var J=da(t),Z=t.gutter=d("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(Z),J.insertBefore(Z,t.text),t.line.gutterClass&&(Z.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!N||!N["CodeMirror-linenumbers"])&&(t.lineNumber=Z.appendChild(d("div",Nn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),N)for(var $=0;$<e.display.gutterSpecs.length;++$){var re=e.display.gutterSpecs[$].className,be=N.hasOwnProperty(re)&&N[re];be&&Z.appendChild(d("div",[be],"CodeMirror-gutter-elt","left: "+i.gutterLeft[re]+"px; width: "+i.gutterWidth[re]+"px"))}}}function Gs(e,t,r){t.alignable&&(t.alignable=null);for(var i=D("CodeMirror-linewidget"),h=t.node.firstChild,N=void 0;h;h=N)N=h.nextSibling,i.test(h.className)&&t.node.removeChild(h);Ka(e,t,r)}function ys(e,t,r,i){var h=ja(e,t);return t.text=t.node=h.pre,h.bgClass&&(t.bgClass=h.bgClass),h.textClass&&(t.textClass=h.textClass),Wa(e,t),Ha(e,t,r,i),Ka(e,t,i),t.node}function Ka(e,t,r){if(bs(e,t.line,t,r,!0),t.rest)for(var i=0;i<t.rest.length;i++)bs(e,t.rest[i],t,r,!1)}function bs(e,t,r,i,h){if(!t.widgets)return;for(var N=da(r),J=0,Z=t.widgets;J<Z.length;++J){var $=Z[J],re=d("div",[$.node],"CodeMirror-linewidget"+($.className?" "+$.className:""));$.handleMouseEvents||re.setAttribute("cm-ignore-events","true"),zs($,re,r,i),e.display.input.setUneditable(re),h&&$.above?N.insertBefore(re,r.gutter||r.text):N.appendChild(re),Oi($,"redraw")}}function zs(e,t,r,i){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var h=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(h-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=h+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function ea(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!v(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),x(t.display.measure,d("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Rr(e,t){for(var r=xe(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ga(e){return e.lineSpace.offsetTop}function pe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ae(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=x(e.measure,d("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(i.left)&&!isNaN(i.right)&&(e.cachedPaddingH=i),i}function De(e){return fe-e.display.nativeBarWidth}function ye(e){return e.display.scroller.clientWidth-De(e)-e.display.barWidth}function ne(e){return e.display.scroller.clientHeight-De(e)-e.display.barHeight}function ce(e,t,r){var i=e.options.lineWrapping,h=i&&ye(e);if(!t.measure.heights||i&&t.measure.width!=h){var N=t.measure.heights=[];if(i){t.measure.width=h;for(var J=t.text.firstChild.getClientRects(),Z=0;Z<J.length-1;Z++){var $=J[Z],re=J[Z+1];Math.abs($.bottom-re.bottom)>2&&N.push(($.bottom+re.top)/2-r.top)}}N.push(r.bottom-r.top)}}function ae(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var h=0;h<e.rest.length;h++)if(Qt(e.rest[h])>r)return{map:e.measure.maps[h],cache:e.measure.caches[h],before:!0}}function _e(e,t){t=Pi(t);var r=Qt(t),i=e.display.externalMeasured=new Qn(e.doc,t,r);i.lineN=r;var h=i.built=Hn(e,i);return i.text=h.pre,x(e.display.lineMeasure,h.pre),i}function Ee(e,t,r,i){return He(e,Oe(e,t),r,i)}function Ne(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[di(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Oe(e,t){var r=Qt(t),i=Ne(e,r);i&&!i.text?i=null:i&&i.changes&&(gs(e,i,r,_i(e)),e.curOp.forceUpdate=!0),i||(i=_e(e,t));var h=ae(i,t,r);return{line:t,view:i,rect:null,map:h.map,cache:h.cache,before:h.before,hasHeights:!1}}function He(e,t,r,i,h){t.before&&(r=-1);var N=r+(i||""),J;return t.cache.hasOwnProperty(N)?J=t.cache[N]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(ce(e,t.view,t.rect),t.hasHeights=!0),J=Dt(e,t,r,i),J.bogus||(t.cache[N]=J)),{left:J.left,right:J.right,top:h?J.rtop:J.top,bottom:h?J.rbottom:J.bottom}}var $e={left:0,right:0,top:0,bottom:0};function vt(e,t,r){for(var i,h,N,J,Z,$,re=0;re<e.length;re+=3)if(Z=e[re],$=e[re+1],t<Z?(h=0,N=1,J="left"):t<$?(h=t-Z,N=h+1):(re==e.length-3||t==$&&e[re+3]>t)&&(N=$-Z,h=N-1,t>=$&&(J="right")),h!=null){if(i=e[re+2],Z==$&&r==(i.insertLeft?"left":"right")&&(J=r),r=="left"&&h==0)for(;re&&e[re-2]==e[re-3]&&e[re-1].insertLeft;)i=e[(re-=3)+2],J="left";if(r=="right"&&h==$-Z)for(;re<e.length-3&&e[re+3]==e[re+4]&&!e[re+5].insertLeft;)i=e[(re+=3)+2],J="right";break}return{node:i,start:h,end:N,collapse:J,coverStart:Z,coverEnd:$}}function gt(e,t){var r=$e;if(t=="left")for(var i=0;i<e.length&&!((r=e[i]).left!=r.right);i++);else for(var h=e.length-1;h>=0&&!((r=e[h]).left!=r.right);h--);return r}function Dt(e,t,r,i){var h=vt(t.map,r,i),N=h.node,J=h.start,Z=h.end,$=h.collapse,re;if(N.nodeType==3){for(var be=0;be<4;be++){for(;J&&Ue(t.line.text.charAt(h.coverStart+J));)--J;for(;h.coverStart+Z<h.coverEnd&&Ue(t.line.text.charAt(h.coverStart+Z));)++Z;if(z&&K<9&&J==0&&Z==h.coverEnd-h.coverStart?re=N.parentNode.getBoundingClientRect():re=gt(p(N,J,Z).getClientRects(),i),re.left||re.right||J==0)break;Z=J,J=J-1,$="right"}z&&K<11&&(re=fn(e.display.measure,re))}else{J>0&&($=i="right");var we;e.options.lineWrapping&&(we=N.getClientRects()).length>1?re=we[i=="right"?we.length-1:0]:re=N.getBoundingClientRect()}if(z&&K<9&&!J&&(!re||!re.left&&!re.right)){var ze=N.parentNode.getClientRects()[0];ze?re={left:ze.left,right:ze.left+Fi(e.display),top:ze.top,bottom:ze.bottom}:re=$e}for(var je=re.top-t.rect.top,nt=re.bottom-t.rect.top,ct=(je+nt)/2,Ct=t.view.measure.heights,Mt=0;Mt<Ct.length-1&&!(ct<Ct[Mt]);Mt++);var Ht=Mt?Ct[Mt-1]:0,kt=Ct[Mt],zt={left:($=="right"?re.right:re.left)-t.rect.left,right:($=="left"?re.left:re.right)-t.rect.left,top:Ht,bottom:kt};return!re.left&&!re.right&&(zt.bogus=!0),e.options.singleCursorHeightPerLine||(zt.rtop=je,zt.rbottom=nt),zt}function fn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!hn(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*i,bottom:t.bottom*i}}function Sn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function _n(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Sn(e.display.view[t])}function xn(e){_n(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Cn(){return y&&o?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wn(){return y&&o?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Tn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ea(e.widgets[r]));return t}function Bn(e,t,r,i,h){if(!h){var N=Tn(t);r.top+=N,r.bottom+=N}if(i=="line")return r;i||(i="local");var J=gi(t);if(i=="local"?J+=Ga(e.display):J-=e.display.viewOffset,i=="page"||i=="window"){var Z=e.display.lineSpace.getBoundingClientRect();J+=Z.top+(i=="window"?0:wn());var $=Z.left+(i=="window"?0:Cn());r.left+=$,r.right+=$}return r.top+=J,r.bottom+=J,r}function Dn(e,t,r){if(r=="div")return t;var i=t.left,h=t.top;if(r=="page")i-=Cn(),h-=wn();else if(r=="local"||!r){var N=e.display.sizer.getBoundingClientRect();i+=N.left,h+=N.top}var J=e.display.lineSpace.getBoundingClientRect();return{left:i-J.left,top:h-J.top}}function vi(e,t,r,i,h){return i||(i=Rt(e.doc,t.line)),Bn(e,i,Ee(e,i,t.ch,h),r)}function In(e,t,r,i,h,N){i=i||Rt(e.doc,t.line),h||(h=Oe(e,i));function J(nt,ct){var Ct=He(e,h,nt,ct?"right":"left",N);return ct?Ct.left=Ct.right:Ct.right=Ct.left,Bn(e,i,Ct,r)}var Z=Tt(i,e.doc.direction),$=t.ch,re=t.sticky;if($>=i.text.length?($=i.text.length,re="before"):$<=0&&($=0,re="after"),!Z)return J(re=="before"?$-1:$,re=="before");function be(nt,ct,Ct){var Mt=Z[ct],Ht=Mt.level==1;return J(Ct?nt-1:nt,Ht!=Ct)}var we=mt(Z,$,re),ze=yt,je=be($,we,re=="before");return ze!=null&&(je.other=be($,ze,re!="before")),je}function sn(e,t){var r=0;t=_(e.doc,t),e.options.lineWrapping||(r=Fi(e.display)*t.ch);var i=Rt(e.doc,t.line),h=gi(i)+Ga(e.display);return{left:r,right:r,top:h,bottom:h+i.height}}function qt(e,t,r,i,h){var N=at(e,t,r);return N.xRel=h,i&&(N.outside=i),N}function kn(e,t,r){var i=e.doc;if(r+=e.display.viewOffset,r<0)return qt(i.first,0,null,-1,-1);var h=An(i,r),N=i.first+i.size-1;if(h>N)return qt(i.first+i.size-1,Rt(i,N).text.length,null,1,1);t<0&&(t=0);for(var J=Rt(i,h);;){var Z=yi(e,J,h,t,r),$=nr(J,Z.ch+(Z.xRel>0||Z.outside>0?1:0));if(!$)return Z;var re=$.find(1);if(re.line==h)return re;J=Rt(i,h=re.line)}}function jn(e,t,r,i){i-=Tn(t);var h=t.text.length,N=st(function(J){return He(e,r,J-1).bottom<=i},h,0);return h=st(function(J){return He(e,r,J).top>i},N,h),{begin:N,end:h}}function Vt(e,t,r,i){r||(r=Oe(e,t));var h=Bn(e,t,He(e,r,i),"line").top;return jn(e,t,r,h)}function Kn(e,t,r,i){return e.bottom<=r?!1:e.top>r?!0:(i?e.left:e.right)>t}function yi(e,t,r,i,h){h-=gi(t);var N=Oe(e,t),J=Tn(t),Z=0,$=t.text.length,re=!0,be=Tt(t,e.doc.direction);if(be){var we=(e.options.lineWrapping?si:Yn)(e,t,r,N,be,i,h);re=we.level!=1,Z=re?we.from:we.to-1,$=re?we.to:we.from-1}var ze=null,je=null,nt=st(function(pn){var $t=He(e,N,pn);return $t.top+=J,$t.bottom+=J,Kn($t,i,h,!1)?($t.top<=h&&$t.left<=i&&(ze=pn,je=$t),!0):!1},Z,$),ct,Ct,Mt=!1;if(je){var Ht=i-je.left<je.right-i,kt=Ht==re;nt=ze+(kt?0:1),Ct=kt?"after":"before",ct=Ht?je.left:je.right}else{!re&&(nt==$||nt==Z)&&nt++,Ct=nt==0?"after":nt==t.text.length?"before":He(e,N,nt-(re?1:0)).bottom+J<=h==re?"after":"before";var zt=In(e,at(r,nt,Ct),"line",t,N);ct=zt.left,Mt=h<zt.top?-1:h>=zt.bottom?1:0}return nt=Ke(t.text,nt,1),qt(r,nt,Ct,Mt,i-ct)}function Yn(e,t,r,i,h,N,J){var Z=st(function(we){var ze=h[we],je=ze.level!=1;return Kn(In(e,at(r,je?ze.to:ze.from,je?"before":"after"),"line",t,i),N,J,!0)},0,h.length-1),$=h[Z];if(Z>0){var re=$.level!=1,be=In(e,at(r,re?$.from:$.to,re?"after":"before"),"line",t,i);Kn(be,N,J,!0)&&be.top>J&&($=h[Z-1])}return $}function si(e,t,r,i,h,N,J){var Z=jn(e,t,i,J),$=Z.begin,re=Z.end;/\s/.test(t.text.charAt(re-1))&&re--;for(var be=null,we=null,ze=0;ze<h.length;ze++){var je=h[ze];if(je.from>=re||je.to<=$)continue;var nt=je.level!=1,ct=He(e,i,nt?Math.min(re,je.to)-1:Math.max($,je.from)).right,Ct=ct<N?N-ct+1e9:ct-N;(!be||we>Ct)&&(be=je,we=Ct)}return be||(be=h[h.length-1]),be.from<$&&(be={from:$,to:be.to,level:be.level}),be.to>re&&(be={from:be.from,to:re,level:be.level}),be}var ii;function Ri(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ii==null){ii=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ii.appendChild(document.createTextNode("x")),ii.appendChild(d("br"));ii.appendChild(document.createTextNode("x"))}x(e.measure,ii);var r=ii.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),T(e.measure),r||1}function Fi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),r=d("pre",[t],"CodeMirror-line-like");x(e.measure,r);var i=t.getBoundingClientRect(),h=(i.right-i.left)/10;return h>2&&(e.cachedCharWidth=h),h||10}function _i(e){for(var t=e.display,r={},i={},h=t.gutters.clientLeft,N=t.gutters.firstChild,J=0;N;N=N.nextSibling,++J){var Z=e.display.gutterSpecs[J].className;r[Z]=N.offsetLeft+N.clientLeft+h,i[Z]=N.clientWidth}return{fixedPos:$i(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function $i(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _r(e){var t=Ri(e.display),r=e.options.lineWrapping,i=r&&Math.max(5,e.display.scroller.clientWidth/Fi(e.display)-3);return function(h){if(Zi(e.doc,h))return 0;var N=0;if(h.widgets)for(var J=0;J<h.widgets.length;J++)h.widgets[J].height&&(N+=h.widgets[J].height);return r?N+(Math.ceil(h.text.length/i)||1)*t:N+t}}function ar(e){var t=e.doc,r=_r(e);t.iter(function(i){var h=r(i);h!=i.height&&vn(i,h)})}function Bi(e,t,r,i){var h=e.display;if(!r&&xe(t).getAttribute("cm-not-content")=="true")return null;var N,J,Z=h.lineSpace.getBoundingClientRect();try{N=t.clientX-Z.left,J=t.clientY-Z.top}catch(we){return null}var $=kn(e,N,J),re;if(i&&$.xRel>0&&(re=Rt(e.doc,$.line).text).length==$.ch){var be=Q(re,re.length,e.options.tabSize)-re.length;$=at($.line,Math.max(0,Math.round((N-Ae(e.display).left)/Fi(e.display))-be))}return $}function di(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,i=0;i<r.length;i++)if(t-=r[i].size,t<0)return i}function oi(e,t,r,i){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),i||(i=0);var h=e.display;if(i&&r<h.viewTo&&(h.updateLineNumbers==null||h.updateLineNumbers>t)&&(h.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=h.viewTo)rn&&Sr(e.doc,t)<h.viewTo&&bi(e);else if(r<=h.viewFrom)rn&&ir(e.doc,r+i)>h.viewFrom?bi(e):(h.viewFrom+=i,h.viewTo+=i);else if(t<=h.viewFrom&&r>=h.viewTo)bi(e);else if(t<=h.viewFrom){var N=Er(e,r,r+i,1);N?(h.view=h.view.slice(N.index),h.viewFrom=N.lineN,h.viewTo+=i):bi(e)}else if(r>=h.viewTo){var J=Er(e,t,t,-1);J?(h.view=h.view.slice(0,J.index),h.viewTo=J.lineN):bi(e)}else{var Z=Er(e,t,t,-1),$=Er(e,r,r+i,1);Z&&$?(h.view=h.view.slice(0,Z.index).concat(Xi(e,Z.lineN,$.lineN)).concat(h.view.slice($.index)),h.viewTo+=i):bi(e)}var re=h.externalMeasured;re&&(r<re.lineN?re.lineN+=i:t<re.lineN+re.size&&(h.externalMeasured=null))}function Ei(e,t,r){e.curOp.viewChanged=!0;var i=e.display,h=e.display.externalMeasured;if(h&&t>=h.lineN&&t<h.lineN+h.size&&(i.externalMeasured=null),t<i.viewFrom||t>=i.viewTo)return;var N=i.view[di(e,t)];if(N.node==null)return;var J=N.changes||(N.changes=[]);oe(J,r)==-1&&J.push(r)}function bi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Er(e,t,r,i){var h=di(e,t),N,J=e.display.view;if(!rn||r==e.doc.first+e.doc.size)return{index:h,lineN:r};for(var Z=e.display.viewFrom,$=0;$<h;$++)Z+=J[$].size;if(Z!=t){if(i>0){if(h==J.length-1)return null;N=Z+J[h].size-t,h++}else N=Z-t;t+=N,r+=N}for(;Sr(e.doc,r)!=r;){if(h==(i<0?0:J.length-1))return null;r+=i*J[h-(i<0?1:0)].size,h+=i}return{index:h,lineN:r}}function kr(e,t,r){var i=e.display,h=i.view;h.length==0||t>=i.viewTo||r<=i.viewFrom?(i.view=Xi(e,t,r),i.viewFrom=t):(i.viewFrom>t?i.view=Xi(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(di(e,t))),i.viewFrom=t,i.viewTo<r?i.view=i.view.concat(Xi(e,i.viewTo,r)):i.viewTo>r&&(i.view=i.view.slice(0,di(e,r)))),i.viewTo=r}function Pr(e){for(var t=e.display.view,r=0,i=0;i<t.length;i++){var h=t[i];!h.hidden&&(!h.node||h.changes)&&++r}return r}function ri(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Cr(e,t){t===void 0&&(t=!0);for(var r=e.doc,i={},h=i.cursors=document.createDocumentFragment(),N=i.selection=document.createDocumentFragment(),J=0;J<r.sel.ranges.length;J++){if(!t&&J==r.sel.primIndex)continue;var Z=r.sel.ranges[J];if(Z.from().line>=e.display.viewTo||Z.to().line<e.display.viewFrom)continue;var $=Z.empty();($||e.options.showCursorWhenSelecting)&&Nr(e,Z.head,h),$||ni(e,Z,N)}return i}function Nr(e,t,r){var i=In(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),h=r.appendChild(d("div","\xA0","CodeMirror-cursor"));if(h.style.left=i.left+"px",h.style.top=i.top+"px",h.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var N=r.appendChild(d("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));N.style.display="",N.style.left=i.other.left+"px",N.style.top=i.other.top+"px",N.style.height=(i.other.bottom-i.other.top)*.85+"px"}}function ui(e,t){return e.top-t.top||e.left-t.left}function ni(e,t,r){var i=e.display,h=e.doc,N=document.createDocumentFragment(),J=Ae(e.display),Z=J.left,$=Math.max(i.sizerWidth,ye(e)-i.sizer.offsetLeft)-J.right,re=h.direction=="ltr";function be(kt,zt,pn,$t){zt<0&&(zt=0),zt=Math.round(zt),$t=Math.round($t),N.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+kt+`px;
|
|
top: `+zt+"px; width: "+(pn==null?$-kt:pn)+`px;
|
|
height: `+($t-zt)+"px"))}function we(kt,zt,pn){var $t=Rt(h,kt),Rn=$t.text.length,hi,zi;function wi(Ni,pr){return vi(e,at(kt,Ni),"div",$t,pr)}function yr(Ni,pr,Ji){var Ki=Vt(e,$t,null,Ni),Ui=pr=="ltr"==(Ji=="after")?"left":"right",Li=Ji=="after"?Ki.begin:Ki.end-(/\s/.test($t.text.charAt(Ki.end-1))?2:1);return wi(Li,Ui)[Ui]}var fr=Tt($t,h.direction);return ht(fr,zt||0,pn==null?Rn:pn,function(Ni,pr,Ji,Ki){var Ui=Ji=="ltr",Li=wi(Ni,Ui?"left":"right"),mr=wi(pr-1,Ui?"right":"left"),Ua=zt==null&&Ni==0,ca=pn==null&&pr==Rn,tr=Ki==0,Wr=!fr||Ki==fr.length-1;if(mr.top-Li.top<=3){var Vi=(re?Ua:ca)&&tr,po=(re?ca:Ua)&&Wr,qr=Vi?Z:(Ui?Li:mr).left,va=po?$:(Ui?mr:Li).right;be(qr,Li.top,va-qr,Li.bottom)}else{var ya,ur,Fa,mo;Ui?(ya=re&&Ua&&tr?Z:Li.left,ur=re?$:yr(Ni,Ji,"before"),Fa=re?Z:yr(pr,Ji,"after"),mo=re&&ca&&Wr?$:mr.right):(ya=re?yr(Ni,Ji,"before"):Z,ur=!re&&Ua&&tr?$:Li.right,Fa=!re&&ca&&Wr?Z:mr.left,mo=re?yr(pr,Ji,"after"):$),be(ya,Li.top,ur-ya,Li.bottom),Li.bottom<mr.top&&be(Z,Li.bottom,null,mr.top),be(Fa,mr.top,mo-Fa,mr.bottom)}(!hi||ui(Li,hi)<0)&&(hi=Li),ui(mr,hi)<0&&(hi=mr),(!zi||ui(Li,zi)<0)&&(zi=Li),ui(mr,zi)<0&&(zi=mr)}),{start:hi,end:zi}}var ze=t.from(),je=t.to();if(ze.line==je.line)we(ze.line,ze.ch,je.ch);else{var nt=Rt(h,ze.line),ct=Rt(h,je.line),Ct=Pi(nt)==Pi(ct),Mt=we(ze.line,ze.ch,Ct?nt.text.length+1:null).end,Ht=we(je.line,Ct?0:null,je.ch).start;Ct&&(Mt.top<Ht.top-2?(be(Mt.right,Mt.top,null,Mt.bottom),be(Z,Ht.top,Ht.left,Ht.bottom)):be(Mt.right,Mt.top,Ht.left-Mt.right,Mt.bottom)),Mt.bottom<Ht.top&&be(Z,Mt.bottom,null,Ht.top)}r.appendChild(N)}function ji(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ta(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function _s(e){e.state.focused||(e.display.input.focus(),Ur(e))}function za(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ta(e))},100)}function Ur(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(qe(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ji(e)}function ta(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(qe(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ba(e){for(var t=e.display,r=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var h=t.view[i],N=e.options.lineWrapping,J=void 0,Z=0;if(h.hidden)continue;if(z&&K<8){var $=h.node.offsetTop+h.node.offsetHeight;J=$-r,r=$}else{var re=h.node.getBoundingClientRect();J=re.bottom-re.top,!N&&h.text.firstChild&&(Z=h.text.firstChild.getBoundingClientRect().right-re.left-1)}var be=h.line.height-J;if((be>.005||be<-.005)&&(vn(h.line,J),Va(h.line),h.rest))for(var we=0;we<h.rest.length;we++)Va(h.rest[we]);if(Z>e.display.sizerWidth){var ze=Math.ceil(Z/Fi(e.display));ze>e.display.maxLineLength&&(e.display.maxLineLength=ze,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],i=r.node.parentNode;i&&(r.height=i.offsetHeight)}}function _a(e,t,r){var i=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;i=Math.floor(i-Ga(e));var h=r&&r.bottom!=null?r.bottom:i+e.wrapper.clientHeight,N=An(t,i),J=An(t,h);if(r&&r.ensure){var Z=r.ensure.from.line,$=r.ensure.to.line;Z<N?(N=Z,J=An(t,gi(Rt(t,Z))+e.wrapper.clientHeight)):Math.min($,t.lastLine())>=J&&(N=An(t,gi(Rt(t,$))-e.wrapper.clientHeight),J=$)}return{from:N,to:Math.max(J,N+1)}}function Vs(e,t){if(tt(e,"scrollCursorIntoView"))return;var r=e.display,i=r.sizer.getBoundingClientRect(),h=null;if(t.top+i.top<0?h=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(h=!1),h!=null&&!c){var N=d("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Ga(e.display))+`px;
|
|
height: `+(t.bottom-t.top+De(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(N),N.scrollIntoView(h),e.display.lineSpace.removeChild(N)}}function Xs(e,t,r,i){i==null&&(i=0);var h;!e.options.lineWrapping&&t==r&&(t=t.ch?at(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?at(t.line,t.ch+1,"before"):t);for(var N=0;N<5;N++){var J=!1,Z=In(e,t),$=!r||r==t?Z:In(e,r);h={left:Math.min(Z.left,$.left),top:Math.min(Z.top,$.top)-i,right:Math.max(Z.left,$.left),bottom:Math.max(Z.bottom,$.bottom)+i};var re=Xa(e,h),be=e.doc.scrollTop,we=e.doc.scrollLeft;if(re.scrollTop!=null&&(ra(e,re.scrollTop),Math.abs(e.doc.scrollTop-be)>1&&(J=!0)),re.scrollLeft!=null&&(xr(e,re.scrollLeft),Math.abs(e.doc.scrollLeft-we)>1&&(J=!0)),!J)break}return h}function Es(e,t){var r=Xa(e,t);r.scrollTop!=null&&ra(e,r.scrollTop),r.scrollLeft!=null&&xr(e,r.scrollLeft)}function Xa(e,t){var r=e.display,i=Ri(e.display);t.top<0&&(t.top=0);var h=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,N=ne(e),J={};t.bottom-t.top>N&&(t.bottom=t.top+N);var Z=e.doc.height+pe(r),$=t.top<i,re=t.bottom>Z-i;if(t.top<h)J.scrollTop=$?0:t.top;else if(t.bottom>h+N){var be=Math.min(t.top,(re?Z:t.bottom)-N);be!=h&&(J.scrollTop=be)}var we=e.options.fixedGutter?0:r.gutters.offsetWidth,ze=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-we,je=ye(e)-r.gutters.offsetWidth,nt=t.right-t.left>je;return nt&&(t.right=t.left+je),t.left<10?J.scrollLeft=0:t.left<ze?J.scrollLeft=Math.max(0,t.left+we-(nt?0:10)):t.right>je+ze-3&&(J.scrollLeft=t.right+(nt?0:10)-je),J}function Ya(e,t){if(t==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function na(e){Ea(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ia(e,t,r){(t!=null||r!=null)&&Ea(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Ys(e,t){Ea(e),e.curOp.scrollToPos=t}function Ea(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=sn(e,t.from),i=sn(e,t.to);ha(e,r,i,t.margin)}}function ha(e,t,r,i){var h=Xa(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-i,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+i});ia(e,h.scrollLeft,h.scrollTop)}function ra(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;P||ma(e,{top:t}),aa(e,t,!0),P&&ma(e),pa(e,100)}function aa(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function xr(e,t,r,i){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i)return;e.doc.scrollLeft=t,Pn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Vr(e){var t=e.display,r=t.gutters.offsetWidth,i=Math.round(e.doc.height+pe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:i,scrollHeight:i+De(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fr=function(e,t,r){this.cm=r;var i=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),h=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=h.tabIndex=-1,e(i),e(h),Qe(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Qe(h,"scroll",function(){h.clientWidth&&t(h.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,z&&K<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var h=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+h)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var N=e.viewWidth-e.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+N)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(i==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?i:0,bottom:t?i:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=s&&!u?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},Fr.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function i(){var h=e.getBoundingClientRect(),N=r=="vert"?document.elementFromPoint(h.right-1,(h.top+h.bottom)/2):document.elementFromPoint((h.right+h.left)/2,h.bottom-1);N!=e?e.style.pointerEvents="none":t.set(1e3,i)}t.set(1e3,i)},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var fa=function(){};fa.prototype.update=function(){return{bottom:0,right:0}},fa.prototype.setScrollLeft=function(){},fa.prototype.setScrollTop=function(){},fa.prototype.clear=function(){};function Xr(e,t){t||(t=Vr(e));var r=e.display.barWidth,i=e.display.barHeight;xa(e,t);for(var h=0;h<4&&r!=e.display.barWidth||i!=e.display.barHeight;h++)r!=e.display.barWidth&&e.options.lineWrapping&&ba(e),xa(e,Vr(e)),r=e.display.barWidth,i=e.display.barHeight}function xa(e,t){var r=e.display,i=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=i.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=i.bottom)+"px",r.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=i.bottom+"px",r.scrollbarFiller.style.width=i.right+"px"):r.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=i.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Ja={native:Fr,null:fa};function Ta(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ja[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Qe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?xr(e,t):ra(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Qa=0;function Br(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:++Qa},vr(e.curOp)}function Yr(e){var t=e.curOp;t&&Hs(t,function(r){for(var i=0;i<r.ops.length;i++)r.ops[i].cm.curOp=null;xs(r)})}function xs(e){for(var t=e.ops,r=0;r<t.length;r++)Js(t[r]);for(var i=0;i<t.length;i++)Qs(t[i]);for(var h=0;h<t.length;h++)Zs(t[h]);for(var N=0;N<t.length;N++)Za(t[N]);for(var J=0;J<t.length;J++)qs(t[J])}function Js(e){var t=e.cm,r=t.display;Ts(t),e.updateMaxLine&&Ci(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Tr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qs(e){e.updatedDisplay=e.mustUpdate&&Jr(e.cm,e.update)}function Zs(e){var t=e.cm,r=t.display;e.updatedDisplay&&ba(t),e.barMeasure=Vr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ee(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+De(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ye(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Za(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&xr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==C();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Xr(t,e.barMeasure),e.updatedDisplay&&ei(t,e.barMeasure),e.selectionChanged&&ji(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_s(e.cm)}function qs(e){var t=e.cm,r=t.display,i=t.doc;if(e.updatedDisplay&&wa(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&aa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&xr(t,e.scrollLeft,!0,!0),e.scrollToPos){var h=Xs(t,_(i,e.scrollToPos.from),_(i,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,h)}var N=e.maybeHiddenMarkers,J=e.maybeUnhiddenMarkers;if(N)for(var Z=0;Z<N.length;++Z)N[Z].lines.length||qe(N[Z],"hide");if(J)for(var $=0;$<J.length;++$)J[$].lines.length&&qe(J[$],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&qe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function sr(e,t){if(e.curOp)return t();Br(e);try{return t()}finally{Yr(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Br(e);try{return t.apply(e,arguments)}finally{Yr(e)}}}function Yi(e){return function(){if(this.curOp)return e.apply(this,arguments);Br(this);try{return e.apply(this,arguments)}finally{Yr(this)}}}function Mi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Br(t);try{return e.apply(this,arguments)}finally{Yr(t)}}}function pa(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,U($s,e))}function $s(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,i=Ze(e,t.highlightFrontier),h=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),function(N){if(i.line>=e.display.viewFrom){var J=N.styles,Z=N.text.length>e.options.maxHighlightLength?Yt(t.mode,i.state):null,$=le(e,N,i,!0);Z&&(i.state=Z),N.styles=$.styles;var re=N.styleClasses,be=$.classes;be?N.styleClasses=be:re&&(N.styleClasses=null);for(var we=!J||J.length!=N.styles.length||re!=be&&(!re||!be||re.bgClass!=be.bgClass||re.textClass!=be.textClass),ze=0;!we&&ze<J.length;++ze)we=J[ze]!=N.styles[ze];we&&h.push(i.line),N.stateAfter=i.save(),i.nextLine()}else N.text.length<=e.options.maxHighlightLength&&Lt(e,N.text,i),N.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>r)return pa(e,e.options.workDelay),!0}),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),h.length&&sr(e,function(){for(var N=0;N<h.length;N++)Ei(e,h[N],"text")})}var Tr=function(e,t,r){var i=e.display;this.viewport=t,this.visible=_a(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=ye(e),this.force=r,this.dims=_i(e),this.events=[]};Tr.prototype.signal=function(e,t){Te(e,t)&&this.events.push(arguments)},Tr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)qe.apply(null,this.events[e])};function Ts(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=De(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=De(e)+"px",t.scrollbarsClipped=!0)}function ws(e){if(e.hasFocus())return null;var t=C();if(!t||!v(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&v(e.display.lineDiv,i.anchorNode)&&(r.anchorNode=i.anchorNode,r.anchorOffset=i.anchorOffset,r.focusNode=i.focusNode,r.focusOffset=i.focusOffset)}return r}function Ss(e){if(!e||!e.activeElt||e.activeElt==C())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&v(document.body,e.anchorNode)&&v(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Jr(e,t){var r=e.display,i=e.doc;if(t.editorIsHidden)return bi(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Pr(e)==0)return!1;Wi(e)&&(bi(e),t.dims=_i(e));var h=i.first+i.size,N=Math.max(t.visible.from-e.options.viewportMargin,i.first),J=Math.min(h,t.visible.to+e.options.viewportMargin);r.viewFrom<N&&N-r.viewFrom<20&&(N=Math.max(i.first,r.viewFrom)),r.viewTo>J&&r.viewTo-J<20&&(J=Math.min(h,r.viewTo)),rn&&(N=Sr(e.doc,N),J=ir(e.doc,J));var Z=N!=r.viewFrom||J!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;kr(e,N,J),r.viewOffset=gi(Rt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var $=Pr(e);if(!Z&&$==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var re=ws(e);return $>4&&(r.lineDiv.style.display="none"),Cs(e,r.updateLineNumbers,t.dims),$>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ss(re),T(r.cursorDiv),T(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,Z&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,pa(e,400)),r.updateLineNumbers=null,!0}function wa(e,t){for(var r=t.viewport,i=!0;;i=!1){if(!i||!e.options.lineWrapping||t.oldDisplayWidth==ye(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+pe(e.display)-ne(e),r.top)}),t.visible=_a(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else i&&(t.visible=_a(e.display,e.doc,r));if(!Jr(e,t))break;ba(e);var h=Vr(e);ri(e),Xr(e,h),ei(e,h),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ma(e,t){var r=new Tr(e,t);if(Jr(e,r)){ba(e),wa(e,r);var i=Vr(e);ri(e),Xr(e,i),ei(e,i),r.finish()}}function Cs(e,t,r){var i=e.display,h=e.options.lineNumbers,N=i.lineDiv,J=N.firstChild;function Z(nt){var ct=nt.nextSibling;return n&&s&&e.display.currentWheelTarget==nt?nt.style.display="none":nt.parentNode.removeChild(nt),ct}for(var $=i.view,re=i.viewFrom,be=0;be<$.length;be++){var we=$[be];if(!we.hidden)if(!we.node||we.node.parentNode!=N){var ze=ys(e,we,re,r);N.insertBefore(ze,J)}else{for(;J!=we.node;)J=Z(J);var je=h&&t!=null&&t<=re&&we.lineNumber;we.changes&&(oe(we.changes,"gutter")>-1&&(je=!1),gs(e,we,re,r)),je&&(T(we.lineNumber),we.lineNumber.appendChild(document.createTextNode(Nn(e.options,re)))),J=we.node.nextSibling}re+=we.size}for(;J;)J=Z(J)}function Sa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ei(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+De(e)+"px"}function Pn(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var i=$i(t)-t.scroller.scrollLeft+e.doc.scrollLeft,h=t.gutters.offsetWidth,N=i+"px",J=0;J<r.length;J++)if(!r[J].hidden){e.options.fixedGutter&&(r[J].gutter&&(r[J].gutter.style.left=N),r[J].gutterBackground&&(r[J].gutterBackground.style.left=N));var Z=r[J].alignable;if(Z)for(var $=0;$<Z.length;$++)Z[$].style.left=N}e.options.fixedGutter&&(t.gutters.style.left=i+h+"px")}function Wi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Nn(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var h=i.measure.appendChild(d("div",[d("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),N=h.firstChild.offsetWidth,J=h.offsetWidth-N;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(N,i.lineGutter.offsetWidth-J)+1,i.lineNumWidth=i.lineNumInnerWidth+J,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Sa(e.display),!0}return!1}function or(e,t){for(var r=[],i=!1,h=0;h<e.length;h++){var N=e[h],J=null;if(typeof N!="string"&&(J=N.style,N=N.className),N=="CodeMirror-linenumbers")if(t)i=!0;else continue;r.push({className:N,style:J})}return t&&!i&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function sa(e){var t=e.gutters,r=e.gutterSpecs;T(t),e.lineGutter=null;for(var i=0;i<r.length;++i){var h=r[i],N=h.className,J=h.style,Z=t.appendChild(d("div",null,"CodeMirror-gutter "+N));J&&(Z.style.cssText=J),N=="CodeMirror-linenumbers"&&(e.lineGutter=Z,Z.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Sa(e)}function Lr(e){sa(e.display),oi(e),Pn(e)}function ga(e,t,r,i){var h=this;this.input=r,h.scrollbarFiller=d("div",null,"CodeMirror-scrollbar-filler"),h.scrollbarFiller.setAttribute("cm-not-content","true"),h.gutterFiller=d("div",null,"CodeMirror-gutter-filler"),h.gutterFiller.setAttribute("cm-not-content","true"),h.lineDiv=E("div",null,"CodeMirror-code"),h.selectionDiv=d("div",null,null,"position: relative; z-index: 1"),h.cursorDiv=d("div",null,"CodeMirror-cursors"),h.measure=d("div",null,"CodeMirror-measure"),h.lineMeasure=d("div",null,"CodeMirror-measure"),h.lineSpace=E("div",[h.measure,h.lineMeasure,h.selectionDiv,h.cursorDiv,h.lineDiv],null,"position: relative; outline: none");var N=E("div",[h.lineSpace],"CodeMirror-lines");h.mover=d("div",[N],null,"position: relative"),h.sizer=d("div",[h.mover],"CodeMirror-sizer"),h.sizerWidth=null,h.heightForcer=d("div",null,null,"position: absolute; height: "+fe+"px; width: 1px;"),h.gutters=d("div",null,"CodeMirror-gutters"),h.lineGutter=null,h.scroller=d("div",[h.sizer,h.heightForcer,h.gutters],"CodeMirror-scroll"),h.scroller.setAttribute("tabIndex","-1"),h.wrapper=d("div",[h.scrollbarFiller,h.gutterFiller,h.scroller],"CodeMirror"),z&&K<8&&(h.gutters.style.zIndex=-1,h.scroller.style.paddingRight=0),!n&&!(P&&l)&&(h.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(h.wrapper):e(h.wrapper)),h.viewFrom=h.viewTo=t.first,h.reportedViewFrom=h.reportedViewTo=t.first,h.view=[],h.renderedView=null,h.externalMeasured=null,h.viewOffset=0,h.lastWrapHeight=h.lastWrapWidth=0,h.updateLineNumbers=null,h.nativeBarWidth=h.barHeight=h.barWidth=0,h.scrollbarsClipped=!1,h.lineNumWidth=h.lineNumInnerWidth=h.lineNumChars=null,h.alignWidgets=!1,h.cachedCharWidth=h.cachedTextHeight=h.cachedPaddingH=null,h.maxLine=null,h.maxLineLength=0,h.maxLineChanged=!1,h.wheelDX=h.wheelDY=h.wheelStartX=h.wheelStartY=null,h.shift=!1,h.selForContextMenu=null,h.activeTouch=null,h.gutterSpecs=or(i.gutters,i.lineNumbers),sa(h),r.init(h)}var jr=0,Hi=null;z?Hi=-.53:P?Hi=15:y?Hi=-.7:g&&(Hi=-1/3);function Ca(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function qa(e){var t=Ca(e);return t.x*=Hi,t.y*=Hi,t}function $a(e,t){var r=Ca(t),i=r.x,h=r.y,N=e.display,J=N.scroller,Z=J.scrollWidth>J.clientWidth,$=J.scrollHeight>J.clientHeight;if(!(i&&Z||h&&$))return;if(h&&s&&n){e:for(var re=t.target,be=N.view;re!=J;re=re.parentNode)for(var we=0;we<be.length;we++)if(be[we].node==re){e.display.currentWheelTarget=re;break e}}if(i&&!P&&!m&&Hi!=null){h&&$&&ra(e,Math.max(0,J.scrollTop+h*Hi)),xr(e,Math.max(0,J.scrollLeft+i*Hi)),(!h||h&&$)&&te(t),N.wheelStartX=null;return}if(h&&Hi!=null){var ze=h*Hi,je=e.doc.scrollTop,nt=je+N.wrapper.clientHeight;ze<0?je=Math.max(0,je+ze-50):nt=Math.min(e.doc.height,nt+ze+50),ma(e,{top:je,bottom:nt})}jr<20&&(N.wheelStartX==null?(N.wheelStartX=J.scrollLeft,N.wheelStartY=J.scrollTop,N.wheelDX=i,N.wheelDY=h,setTimeout(function(){if(N.wheelStartX==null)return;var ct=J.scrollLeft-N.wheelStartX,Ct=J.scrollTop-N.wheelStartY,Mt=Ct&&N.wheelDY&&Ct/N.wheelDY||ct&&N.wheelDX&&ct/N.wheelDX;if(N.wheelStartX=N.wheelStartY=null,!Mt)return;Hi=(Hi*jr+Mt)/(jr+1),++jr},200)):(N.wheelDX+=i,N.wheelDY+=h))}var lr=function(e,t){this.ranges=e,this.primIndex=t};lr.prototype.primary=function(){return this.ranges[this.primIndex]},lr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],i=e.ranges[t];if(!Vn(r.anchor,i.anchor)||!Vn(r.head,i.head))return!1}return!0},lr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Zn(bn(this.ranges[t].anchor),bn(this.ranges[t].head));return new lr(e,this.primIndex)},lr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},lr.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var i=this.ranges[r];if(Wt(t,i.from())>=0&&Wt(e,i.to())<=0)return r}return-1};var Zn=function(e,t){this.anchor=e,this.head=t};Zn.prototype.from=function(){return Mn(this.anchor,this.head)},Zn.prototype.to=function(){return cn(this.anchor,this.head)},Zn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wr(e,t,r){var i=e&&e.options.selectionsMayTouch,h=t[r];t.sort(function(ze,je){return Wt(ze.from(),je.from())}),r=oe(t,h);for(var N=1;N<t.length;N++){var J=t[N],Z=t[N-1],$=Wt(Z.to(),J.from());if(i&&!J.empty()?$>0:$>=0){var re=Mn(Z.from(),J.from()),be=cn(Z.to(),J.to()),we=Z.empty()?J.from()==J.head:Z.from()==Z.head;N<=r&&--r,t.splice(--N,2,new Zn(we?be:re,we?re:be))}}return new lr(t,r)}function Dr(e,t){return new lr([new Zn(e,t||e)],0)}function Ir(e){return e.text?at(e.from.line+e.text.length-1,ke(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function es(e,t){if(Wt(e,t.from)<0)return e;if(Wt(e,t.to)<=0)return Ir(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Ir(t).ch-t.to.ch),at(r,i)}function Aa(e,t){for(var r=[],i=0;i<e.sel.ranges.length;i++){var h=e.sel.ranges[i];r.push(new Zn(es(h.anchor,t),es(h.head,t)))}return wr(e.cm,r,e.sel.primIndex)}function As(e,t,r){return e.line==t.line?at(r.line,e.ch-t.ch+r.ch):at(r.line+(e.line-t.line),e.ch)}function Os(e,t,r){for(var i=[],h=at(e.first,0),N=h,J=0;J<t.length;J++){var Z=t[J],$=As(Z.from,h,N),re=As(Ir(Z),h,N);if(h=Z.to,N=re,r=="around"){var be=e.sel.ranges[J],we=Wt(be.head,be.anchor)<0;i[J]=new Zn(we?re:$,we?$:re)}else i[J]=new Zn($,$)}return new lr(i,e.sel.primIndex)}function Qr(e){e.doc.mode=tn(e.options,e.doc.modeOption),ts(e)}function ts(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,pa(e,100),e.state.modeGen++,e.curOp&&oi(e)}function go(e,t){return t.from.ch==0&&t.to.ch==0&&ke(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function eo(e,t,r,i){function h(Ht){return r?r[Ht]:null}function N(Ht,kt,zt){qi(Ht,kt,zt,i),Oi(Ht,"change",Ht,t)}function J(Ht,kt){for(var zt=[],pn=Ht;pn<kt;++pn)zt.push(new Ti(re[pn],h(pn),i));return zt}var Z=t.from,$=t.to,re=t.text,be=Rt(e,Z.line),we=Rt(e,$.line),ze=ke(re),je=h(re.length-1),nt=$.line-Z.line;if(t.full)e.insert(0,J(0,re.length)),e.remove(re.length,e.size-re.length);else if(go(e,t)){var ct=J(0,re.length-1);N(we,we.text,je),nt&&e.remove(Z.line,nt),ct.length&&e.insert(Z.line,ct)}else if(be==we)if(re.length==1)N(be,be.text.slice(0,Z.ch)+ze+be.text.slice($.ch),je);else{var Ct=J(1,re.length-1);Ct.push(new Ti(ze+be.text.slice($.ch),je,i)),N(be,be.text.slice(0,Z.ch)+re[0],h(0)),e.insert(Z.line+1,Ct)}else if(re.length==1)N(be,be.text.slice(0,Z.ch)+re[0]+we.text.slice($.ch),h(0)),e.remove(Z.line+1,nt);else{N(be,be.text.slice(0,Z.ch)+re[0],h(0)),N(we,ze+we.text.slice($.ch),je);var Mt=J(1,re.length-1);nt>1&&e.remove(Z.line+1,nt-1),e.insert(Z.line+1,Mt)}Oi(e,"change",e,t)}function oa(e,t,r){function i(h,N,J){if(h.linked)for(var Z=0;Z<h.linked.length;++Z){var $=h.linked[Z];if($.doc==N)continue;var re=J&&$.sharedHist;if(r&&!re)continue;t($.doc,re),i($.doc,h,re)}}i(e,null,!0)}function vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ar(e),Qr(e),yo(e),e.options.lineWrapping||Ci(e),e.options.mode=t.modeOption,oi(e)}function yo(e){(e.doc.direction=="rtl"?F:A)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){sr(e,function(){yo(e),oi(e)})}function Rs(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 to(e,t){var r={from:bn(t.from),to:Ir(t),text:Gn(e,t.from,t.to)};return Eo(e,r,t.from.line,t.to.line+1),oa(e,function(i){return Eo(i,r,t.from.line,t.to.line+1)},!0),r}function bo(e){for(;e.length;){var t=ke(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return bo(e.done),ke(e.done);if(e.done.length&&!ke(e.done).ranges)return ke(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ke(e.done)}function _o(e,t,r,i){var h=e.history;h.undone.length=0;var N=+new Date,J,Z;if((h.lastOp==i||h.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&h.lastModTime>N-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(J=pl(h,h.lastOp==i)))Z=ke(J.changes),Wt(t.from,t.to)==0&&Wt(t.from,Z.to)==0?Z.to=Ir(t):J.changes.push(to(e,t));else{var $=ke(h.done);for((!$||!$.ranges)&&Ls(e.sel,h.done),J={changes:[to(e,t)],generation:h.generation},h.done.push(J);h.done.length>h.undoDepth;)h.done.shift(),h.done[0].ranges||h.done.shift()}h.done.push(r),h.generation=++h.maxGeneration,h.lastModTime=h.lastSelTime=N,h.lastOp=h.lastSelOp=i,h.lastOrigin=h.lastSelOrigin=t.origin,Z||qe(e,"historyAdded")}function ml(e,t,r,i){var h=t.charAt(0);return h=="*"||h=="+"&&r.ranges.length==i.ranges.length&&r.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,i){var h=e.history,N=i&&i.origin;r==h.lastSelOp||N&&h.lastSelOrigin==N&&(h.lastModTime==h.lastSelTime&&h.lastOrigin==N||ml(e,N,ke(h.done),t))?h.done[h.done.length-1]=t:Ls(t,h.done),h.lastSelTime=+new Date,h.lastSelOrigin=N,h.lastSelOp=r,i&&i.clearRedo!==!1&&bo(h.undone)}function Ls(e,t){var r=ke(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Eo(e,t,r,i){var h=t["spans_"+e.id],N=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,i),function(J){J.markedSpans&&((h||(h=t["spans_"+e.id]={}))[N]=J.markedSpans),++N})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function yl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var i=[],h=0;h<t.text.length;++h)i.push(vl(r[h]));return i}function xo(e,t){var r=yl(e,t),i=fi(e,t);if(!r)return i;if(!i)return r;for(var h=0;h<r.length;++h){var N=r[h],J=i[h];if(N&&J){e:for(var Z=0;Z<J.length;++Z){for(var $=J[Z],re=0;re<N.length;++re)if(N[re].marker==$.marker)continue e;N.push($)}}else J&&(r[h]=J)}return r}function Oa(e,t,r){for(var i=[],h=0;h<e.length;++h){var N=e[h];if(N.ranges){i.push(r?lr.prototype.deepCopy.call(N):N);continue}var J=N.changes,Z=[];i.push({changes:Z});for(var $=0;$<J.length;++$){var re=J[$],be=void 0;if(Z.push({from:re.from,to:re.to,text:re.text}),t)for(var we in re)(be=we.match(/^spans_(\d+)$/))&&(oe(t,Number(be[1]))>-1&&(ke(Z)[we]=re[we],delete re[we]))}}return i}function no(e,t,r,i){if(i){var h=e.anchor;if(r){var N=Wt(t,h)<0;N!=Wt(r,h)<0?(h=t,t=r):N!=Wt(t,r)<0&&(t=r)}return new Zn(h,t)}else return new Zn(r||t,t)}function Ds(e,t,r,i,h){h==null&&(h=e.cm&&(e.cm.display.shift||e.extend)),er(e,new lr([no(e.sel.primary(),t,r,h)],0),i)}function To(e,t,r){for(var i=[],h=e.cm&&(e.cm.display.shift||e.extend),N=0;N<e.sel.ranges.length;N++)i[N]=no(e.sel.ranges[N],t[N],null,h);var J=wr(e.cm,i,e.sel.primIndex);er(e,J,r)}function io(e,t,r,i){var h=e.sel.ranges.slice(0);h[t]=r,er(e,wr(e.cm,h,e.sel.primIndex),i)}function wo(e,t,r,i){er(e,Dr(t,r),i)}function bl(e,t,r){var i={ranges:t.ranges,update:function(h){this.ranges=[];for(var N=0;N<h.length;N++)this.ranges[N]=new Zn(_(e,h[N].anchor),_(e,h[N].head))},origin:r&&r.origin};return qe(e,"beforeSelectionChange",e,i),e.cm&&qe(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?wr(e.cm,i.ranges,i.ranges.length-1):t}function So(e,t,r){var i=e.history.done,h=ke(i);h&&h.ranges?(i[i.length-1]=t,Is(e,t,r)):er(e,t,r)}function er(e,t,r){Is(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Is(e,t,r){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,r));var i=r&&r.bias||(Wt(t.primary().head,e.sel.primary().head)<0?-1:1);Co(e,Oo(e,t,i,!0)),!(r&&r.scroll===!1)&&e.cm&&na(e.cm)}function Co(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Re(e.cm)),Oi(e,"cursorActivity",e)}function Ao(e){Co(e,Oo(e,e.sel,null,!1))}function Oo(e,t,r,i){for(var h,N=0;N<t.ranges.length;N++){var J=t.ranges[N],Z=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[N],$=Ms(e,J.anchor,Z&&Z.anchor,r,i),re=Ms(e,J.head,Z&&Z.head,r,i);(h||$!=J.anchor||re!=J.head)&&(h||(h=t.ranges.slice(0,N)),h[N]=new Zn($,re))}return h?wr(e.cm,h,t.primIndex):t}function Ra(e,t,r,i,h){var N=Rt(e,t.line);if(N.markedSpans)for(var J=0;J<N.markedSpans.length;++J){var Z=N.markedSpans[J],$=Z.marker,re="selectLeft"in $?!$.selectLeft:$.inclusiveLeft,be="selectRight"in $?!$.selectRight:$.inclusiveRight;if((Z.from==null||(re?Z.from<=t.ch:Z.from<t.ch))&&(Z.to==null||(be?Z.to>=t.ch:Z.to>t.ch))){if(h&&(qe($,"beforeCursorEnter"),$.explicitlyCleared))if(N.markedSpans){--J;continue}else break;if(!$.atomic)continue;if(r){var we=$.find(i<0?1:-1),ze=void 0;if((i<0?be:re)&&(we=Ro(e,we,-i,we&&we.line==t.line?N:null)),we&&we.line==t.line&&(ze=Wt(we,r))&&(i<0?ze<0:ze>0))return Ra(e,we,t,i,h)}var je=$.find(i<0?-1:1);return(i<0?re:be)&&(je=Ro(e,je,i,je.line==t.line?N:null)),je?Ra(e,je,t,i,h):null}}return t}function Ms(e,t,r,i,h){var N=i||1,J=Ra(e,t,r,N,h)||!h&&Ra(e,t,r,N,!0)||Ra(e,t,r,-N,h)||!h&&Ra(e,t,r,-N,!0);return J||(e.cantEdit=!0,at(e.first,0))}function Ro(e,t,r,i){return r<0&&t.ch==0?t.line>e.first?_(e,at(t.line-1)):null:r>0&&t.ch==(i||Rt(e,t.line)).text.length?t.line<e.first+e.size-1?at(t.line+1,0):null:new at(t.line,t.ch+r)}function Lo(e){e.setSelection(at(e.firstLine(),0),at(e.lastLine()),Le)}function Do(e,t,r){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return r&&(i.update=function(h,N,J,Z){h&&(i.from=_(e,h)),N&&(i.to=_(e,N)),J&&(i.text=J),Z!==void 0&&(i.origin=Z)}),qe(e,"beforeChange",e,i),e.cm&&qe(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function La(e,t,r){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,La)(e,t,r);if(e.cm.state.suppressEdits)return}if((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(t=Do(e,t,!0),!t))return;var i=nn&&!r&&dr(e,t.from,t.to);if(i)for(var h=i.length-1;h>=0;--h)Io(e,{from:i[h].from,to:i[h].to,text:h?[""]:t.text,origin:t.origin});else Io(e,t)}function Io(e,t){if(t.text.length==1&&t.text[0]==""&&Wt(t.from,t.to)==0)return;var r=Aa(e,t);_o(e,t,r,e.cm?e.cm.curOp.id:NaN),ns(e,t,r,fi(e,t));var i=[];oa(e,function(h,N){!N&&oe(i,h.history)==-1&&(No(h.history,t),i.push(h.history)),ns(h,t,null,fi(h,t))})}function ks(e,t,r){var i=e.cm&&e.cm.state.suppressEdits;if(i&&!r)return;for(var h=e.history,N,J=e.sel,Z=t=="undo"?h.done:h.undone,$=t=="undo"?h.undone:h.done,re=0;re<Z.length&&!(N=Z[re],r?N.ranges&&!N.equals(e.sel):!N.ranges);re++);if(re==Z.length)return;for(h.lastOrigin=h.lastSelOrigin=null;;)if(N=Z.pop(),N.ranges){if(Ls(N,$),r&&!N.equals(e.sel)){er(e,N,{clearRedo:!1});return}J=N}else if(i){Z.push(N);return}else break;var be=[];Ls(J,$),$.push({changes:be,generation:h.generation}),h.generation=N.generation||++h.maxGeneration;for(var we=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),ze=function(ct){var Ct=N.changes[ct];if(Ct.origin=t,we&&!Do(e,Ct,!1))return Z.length=0,{};be.push(to(e,Ct));var Mt=ct?Aa(e,Ct):ke(Z);ns(e,Ct,Mt,xo(e,Ct)),!ct&&e.cm&&e.cm.scrollIntoView({from:Ct.from,to:Ir(Ct)});var Ht=[];oa(e,function(kt,zt){!zt&&oe(Ht,kt.history)==-1&&(No(kt.history,Ct),Ht.push(kt.history)),ns(kt,Ct,null,xo(kt,Ct))})},je=N.changes.length-1;je>=0;--je){var nt=ze(je);if(nt)return nt.v}}function Mo(e,t){if(t==0)return;if(e.first+=t,e.sel=new lr(lt(e.sel.ranges,function(h){return new Zn(at(h.anchor.line+t,h.anchor.ch),at(h.head.line+t,h.head.ch))}),e.sel.primIndex),e.cm){oi(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,i=r.viewFrom;i<r.viewTo;i++)Ei(e.cm,i,"gutter")}}function ns(e,t,r,i){if(e.cm&&!e.cm.curOp)return Ii(e.cm,ns)(e,t,r,i);if(t.to.line<e.first){Mo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var h=t.text.length-1-(e.first-t.from.line);Mo(e,h),t={from:at(e.first,0),to:at(t.to.line+h,t.to.ch),text:[ke(t.text)],origin:t.origin}}var N=e.lastLine();t.to.line>N&&(t={from:t.from,to:at(N,Rt(e,N).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Gn(e,t.from,t.to),r||(r=Aa(e,t)),e.cm?_l(e.cm,t,i):eo(e,t,i),Is(e,r,Le),e.cantEdit&&Ms(e,at(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var i=e.doc,h=e.display,N=t.from,J=t.to,Z=!1,$=N.line;e.options.lineWrapping||($=Qt(Pi(Rt(i,N.line))),i.iter($,J.line+1,function(je){if(je==h.maxLine)return Z=!0,!0})),i.sel.contains(t.from,t.to)>-1&&Re(e),eo(i,t,r,_r(e)),e.options.lineWrapping||(i.iter($,N.line+t.text.length,function(je){var nt=Xn(je);nt>h.maxLineLength&&(h.maxLine=je,h.maxLineLength=nt,h.maxLineChanged=!0,Z=!1)}),Z&&(e.curOp.updateMaxLine=!0)),jt(i,N.line),pa(e,400);var re=t.text.length-(J.line-N.line)-1;t.full?oi(e):N.line==J.line&&t.text.length==1&&!go(e.doc,t)?Ei(e,N.line,"text"):oi(e,N.line,J.line+1,re);var be=Te(e,"changes"),we=Te(e,"change");if(we||be){var ze={from:N,to:J,text:t.text,removed:t.removed,origin:t.origin};we&&Oi(e,"change",e,ze),be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ze)}e.display.selForContextMenu=null}function Da(e,t,r,i,h){var N;i||(i=r),Wt(i,r)<0&&(N=[i,r],r=N[0],i=N[1]),typeof t=="string"&&(t=e.splitLines(t)),La(e,{from:r,to:i,text:t,origin:h})}function ko(e,t,r,i){r<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function Po(e,t,r,i){for(var h=0;h<e.length;++h){var N=e[h],J=!0;if(N.ranges){N.copied||(N=e[h]=N.deepCopy(),N.copied=!0);for(var Z=0;Z<N.ranges.length;Z++)ko(N.ranges[Z].anchor,t,r,i),ko(N.ranges[Z].head,t,r,i);continue}for(var $=0;$<N.changes.length;++$){var re=N.changes[$];if(r<re.from.line)re.from=at(re.from.line+i,re.from.ch),re.to=at(re.to.line+i,re.to.ch);else if(t<=re.to.line){J=!1;break}}J||(e.splice(0,h+1),h=0)}}function No(e,t){var r=t.from.line,i=t.to.line,h=t.text.length-(i-r)-1;Po(e.done,r,i,h),Po(e.undone,r,i,h)}function is(e,t,r,i){var h=t,N=t;return typeof t=="number"?N=Rt(e,Y(e,t)):h=Qt(t),h==null?null:(i(N,h)&&e.cm&&Ei(e.cm,h,r),N)}function rs(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}rs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,i=e+t;r<i;++r){var h=this.lines[r];this.height-=h.height,Nt(h),Oi(h,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,r){for(var i=e+t;e<i;++e)if(r(this.lines[e]))return!0}};function as(e){this.children=e;for(var t=0,r=0,i=0;i<e.length;++i){var h=e[i];t+=h.chunkSize(),r+=h.height,h.parent=this}this.size=t,this.height=r,this.parent=null}as.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],h=i.chunkSize();if(e<h){var N=Math.min(t,h-e),J=i.height;if(i.removeInner(e,N),this.height-=J-i.height,h==N&&(this.children.splice(r--,1),i.parent=null),(t-=N)==0)break;e=0}else e-=h}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof rs))){var Z=[];this.collapse(Z),this.children=[new rs(Z)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var h=this.children[i],N=h.chunkSize();if(e<=N){if(h.insertInner(e,t,r),h.lines&&h.lines.length>50){for(var J=h.lines.length%25+25,Z=J;Z<h.lines.length;){var $=new rs(h.lines.slice(Z,Z+=25));h.height-=$.height,this.children.splice(++i,0,$),$.parent=this}h.lines=h.lines.slice(0,J),this.maybeSpill()}break}e-=N}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new as(t);if(e.parent){e.size-=r.size,e.height-=r.height;var h=oe(e.parent.children,e);e.parent.children.splice(h+1,0,r)}else{var i=new as(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var i=0;i<this.children.length;++i){var h=this.children[i],N=h.chunkSize();if(e<N){var J=Math.min(t,N-e);if(h.iterN(e,J,r))return!0;if((t-=J)==0)break;e=0}else e-=N}}};var ss=function(e,t,r){if(r)for(var i in r)r.hasOwnProperty(i)&&(this[i]=r[i]);this.doc=e,this.node=t};ss.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,i=Qt(r);if(i==null||!t)return;for(var h=0;h<t.length;++h)t[h]==this&&t.splice(h--,1);t.length||(r.widgets=null);var N=ea(this);vn(r,Math.max(0,r.height-N)),e&&(sr(e,function(){Uo(e,r,-N),Ei(e,i,"widget")}),Oi(e,"lineWidgetCleared",e,this,i))},ss.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,i=this.line;this.height=null;var h=ea(this)-t;if(!h)return;Zi(this.doc,i)||vn(i,i.height+h),r&&sr(r,function(){r.curOp.forceUpdate=!0,Uo(r,i,h),Oi(r,"lineWidgetChanged",r,e,Qt(i))})},Se(ss);function Uo(e,t,r){gi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ya(e,r)}function El(e,t,r,i){var h=new ss(e,r,i),N=e.cm;return N&&h.noHScroll&&(N.display.alignWidgets=!0),is(e,t,"widget",function(J){var Z=J.widgets||(J.widgets=[]);if(h.insertAt==null?Z.push(h):Z.splice(Math.min(Z.length-1,Math.max(0,h.insertAt)),0,h),h.line=J,N&&!Zi(e,J)){var $=gi(J)<e.scrollTop;vn(J,J.height+ea(h)),$&&Ya(N,h.height),N.curOp.forceUpdate=!0}return!0}),N&&Oi(N,"lineWidgetAdded",N,h,typeof t=="number"?t:Qt(t)),h}var Fo=0,la=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Fo};la.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Br(e),Te(this,"clear")){var r=this.find();r&&Oi(this,"clear",r.from,r.to)}for(var i=null,h=null,N=0;N<this.lines.length;++N){var J=this.lines[N],Z=ci(J.markedSpans,this);e&&!this.collapsed?Ei(e,Qt(J),"text"):e&&(Z.to!=null&&(h=Qt(J)),Z.from!=null&&(i=Qt(J))),J.markedSpans=cr(J.markedSpans,Z),Z.from==null&&this.collapsed&&!Zi(this.doc,J)&&e&&vn(J,Ri(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var $=0;$<this.lines.length;++$){var re=Pi(this.lines[$]),be=Xn(re);be>e.display.maxLineLength&&(e.display.maxLine=re,e.display.maxLineLength=be,e.display.maxLineChanged=!0)}i!=null&&e&&this.collapsed&&oi(e,i,h+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ao(e.doc)),e&&Oi(e,"markerCleared",e,this,i,h),t&&Yr(e),this.parent&&this.parent.clear()},la.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,i,h=0;h<this.lines.length;++h){var N=this.lines[h],J=ci(N.markedSpans,this);if(J.from!=null&&(r=at(t?N:Qt(N),J.from),e==-1))return r;if(J.to!=null&&(i=at(t?N:Qt(N),J.to),e==1))return i}return r&&{from:r,to:i}},la.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,i=this.doc.cm;if(!t||!i)return;sr(i,function(){var h=t.line,N=Qt(t.line),J=Ne(i,N);if(J&&(Sn(J),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Zi(r.doc,h)&&r.height!=null){var Z=r.height;r.height=null;var $=ea(r)-Z;$&&vn(h,h.height+$)}Oi(i,"markerChanged",i,e)})},la.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||oe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},la.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Se(la);function Ia(e,t,r,i,h){if(i&&i.shared)return xl(e,t,r,i,h);if(e.cm&&!e.cm.curOp)return Ii(e.cm,Ia)(e,t,r,i,h);var N=new la(e,h),J=Wt(t,r);if(i&&b(i,N,!1),J>0||J==0&&N.clearWhenEmpty!==!1)return N;if(N.replacedWith&&(N.collapsed=!0,N.widgetNode=E("span",[N.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||N.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(N.widgetNode.insertLeft=!0)),N.collapsed){if(Si(e,t.line,t,r,N)||t.line!=r.line&&Si(e,r.line,t,r,N))throw new Error("Inserting collapsed marker partially overlapping an existing one");$n()}N.addToHistory&&_o(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var Z=t.line,$=e.cm,re;if(e.iter(Z,r.line+1,function(we){$&&N.collapsed&&!$.options.lineWrapping&&Pi(we)==$.display.maxLine&&(re=!0),N.collapsed&&Z!=t.line&&vn(we,0),gr(we,new dn(N,Z==t.line?t.ch:null,Z==r.line?r.ch:null)),++Z}),N.collapsed&&e.iter(t.line,r.line+1,function(we){Zi(e,we)&&vn(we,0)}),N.clearOnEnter&&Qe(N,"beforeCursorEnter",function(){return N.clear()}),N.readOnly&&(En(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),N.collapsed&&(N.id=++Fo,N.atomic=!0),$){if(re&&($.curOp.updateMaxLine=!0),N.collapsed)oi($,t.line,r.line+1);else if(N.className||N.startStyle||N.endStyle||N.css||N.attributes||N.title)for(var be=t.line;be<=r.line;be++)Ei($,be,"text");N.atomic&&Ao($.doc),Oi($,"markerAdded",$,N)}return N}var os=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};os.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Oi(this,"clear")},os.prototype.find=function(e,t){return this.primary.find(e,t)},Se(os);function xl(e,t,r,i,h){i=b(i),i.shared=!1;var N=[Ia(e,t,r,i,h)],J=N[0],Z=i.widgetNode;return oa(e,function($){Z&&(i.widgetNode=Z.cloneNode(!0)),N.push(Ia($,_($,t),_($,r),i,h));for(var re=0;re<$.linked.length;++re)if($.linked[re].isParent)return;J=ke(N)}),new os(N,J)}function Bo(e){return e.findMarks(at(e.first,0),e.clipPos(at(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var r=0;r<t.length;r++){var i=t[r],h=i.find(),N=e.clipPos(h.from),J=e.clipPos(h.to);if(Wt(N,J)){var Z=Ia(e,N,J,i.primary,i.primary.type);i.markers.push(Z),Z.parent=i}}}function wl(e){for(var t=function(i){var h=e[i],N=[h.primary.doc];oa(h.primary.doc,function($){return N.push($)});for(var J=0;J<h.markers.length;J++){var Z=h.markers[J];oe(N,Z.doc)==-1&&(Z.parent=null,h.markers.splice(J--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,hr=function(e,t,r,i,h){if(!(this instanceof hr))return new hr(e,t,r,i,h);r==null&&(r=0),as.call(this,[new rs([new Ti("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var N=at(r,0);this.sel=Dr(N),this.history=new Rs(null),this.id=++Sl,this.modeOption=t,this.lineSep=i,this.direction=h=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),eo(this,{from:N,to:N,text:e}),er(this,Dr(N),Le)};hr.prototype=xt(as.prototype,{constructor:hr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,i=0;i<t.length;++i)r+=t[i].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=un(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Mi(function(e){var t=at(this.first,0),r=this.first+this.size-1;La(this,{from:t,to:at(r,Rt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ia(this.cm,0,0),er(this,Dr(t),Le)}),replaceRange:function(e,t,r,i){t=_(this,t),r=r?_(this,r):t,Da(this,e,t,r,i)},getRange:function(e,t,r){var i=Gn(this,_(this,e),_(this,t));return r===!1?i:i.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(zn(this,e))return Rt(this,e)},getLineNumber:function(e){return Qt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Rt(this,e)),Pi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return _(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mi(function(e,t,r){wo(this,_(this,typeof e=="number"?at(e,t||0):e),null,r)}),setSelection:Mi(function(e,t,r){wo(this,_(this,e),_(this,t||e),r)}),extendSelection:Mi(function(e,t,r){Ds(this,_(this,e),t&&_(this,t),r)}),extendSelections:Mi(function(e,t){To(this,H(this,e),t)}),extendSelectionsBy:Mi(function(e,t){var r=lt(this.sel.ranges,e);To(this,H(this,r),t)}),setSelections:Mi(function(e,t,r){if(!e.length)return;for(var i=[],h=0;h<e.length;h++)i[h]=new Zn(_(this,e[h].anchor),_(this,e[h].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),er(this,wr(this.cm,i,t),r)}),addSelection:Mi(function(e,t,r){var i=this.sel.ranges.slice(0);i.push(new Zn(_(this,e),_(this,t||e))),er(this,wr(this.cm,i,i.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,i=0;i<t.length;i++){var h=Gn(this,t[i].from(),t[i].to());r=r?r.concat(h):h}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,i=0;i<r.length;i++){var h=Gn(this,r[i].from(),r[i].to());e!==!1&&(h=h.join(e||this.lineSeparator())),t[i]=h}return t},replaceSelection:function(e,t,r){for(var i=[],h=0;h<this.sel.ranges.length;h++)i[h]=e;this.replaceSelections(i,t,r||"+input")},replaceSelections:Mi(function(e,t,r){for(var i=[],h=this.sel,N=0;N<h.ranges.length;N++){var J=h.ranges[N];i[N]={from:J.from(),to:J.to(),text:this.splitLines(e[N]),origin:r}}for(var Z=t&&t!="end"&&Os(this,i,t),$=i.length-1;$>=0;$--)La(this,i[$]);Z?So(this,Z):this.cm&&na(this.cm)}),undo:Mi(function(){ks(this,"undo")}),redo:Mi(function(){ks(this,"redo")}),undoSelection:Mi(function(){ks(this,"undo",!0)}),redoSelection:Mi(function(){ks(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var h=0;h<e.undone.length;h++)e.undone[h].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Rs(this.history.maxGeneration),oa(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Oa(this.history.done),undone:Oa(this.history.undone)}},setHistory:function(e){var t=this.history=new Rs(this.history.maxGeneration);t.done=Oa(e.done.slice(0),null,!0),t.undone=Oa(e.undone.slice(0),null,!0)},setGutterMarker:Mi(function(e,t,r){return is(this,e,"gutter",function(i){var h=i.gutterMarkers||(i.gutterMarkers={});return h[t]=r,!r&&de(h)&&(i.gutterMarkers=null),!0})}),clearGutter:Mi(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&is(t,r,"gutter",function(){return r.gutterMarkers[e]=null,de(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!zn(this,e))return null;if(t=e,e=Rt(this,e),!e)return null}else if(t=Qt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Mi(function(e,t,r){return is(this,e,t=="gutter"?"gutter":"class",function(i){var h=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!i[h])i[h]=r;else{if(D(r).test(i[h]))return!1;i[h]+=" "+r}return!0})}),removeLineClass:Mi(function(e,t,r){return is(this,e,t=="gutter"?"gutter":"class",function(i){var h=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",N=i[h];if(N)if(r==null)i[h]=null;else{var J=N.match(D(r));if(!J)return!1;var Z=J.index+J[0].length;i[h]=N.slice(0,J.index)+(!J.index||Z==N.length?"":" ")+N.slice(Z)||null}else return!1;return!0})}),addLineWidget:Mi(function(e,t,r){return El(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ia(this,_(this,e),_(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=_(this,e),Ia(this,e,e,r,"bookmark")},findMarksAt:function(e){e=_(this,e);var t=[],r=Rt(this,e.line).markedSpans;if(r)for(var i=0;i<r.length;++i){var h=r[i];(h.from==null||h.from<=e.ch)&&(h.to==null||h.to>=e.ch)&&t.push(h.marker.parent||h.marker)}return t},findMarks:function(e,t,r){e=_(this,e),t=_(this,t);var i=[],h=e.line;return this.iter(e.line,t.line+1,function(N){var J=N.markedSpans;if(J)for(var Z=0;Z<J.length;Z++){var $=J[Z];!($.to!=null&&h==e.line&&e.ch>=$.to||$.from==null&&h!=e.line||$.from!=null&&h==t.line&&$.from>=t.ch)&&(!r||r($.marker))&&i.push($.marker.parent||$.marker)}++h}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var i=0;i<r.length;++i)r[i].from!=null&&e.push(r[i].marker)}),e},posFromIndex:function(e){var t,r=this.first,i=this.lineSeparator().length;return this.iter(function(h){var N=h.text.length+i;if(N>e)return t=e,!0;e-=N,++r}),_(this,at(r,t))},indexFromPos:function(e){e=_(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(i){t+=i.text.length+r}),t},copy:function(e){var t=new hr(un(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var i=new hr(un(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(i,Bo(this)),i},unlinkDoc:function(e){if(e instanceof xi&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(Bo(this));break}if(e.history==this.history){var i=[e.id];oa(e,function(h){return i.push(h.id)},!0),e.history=new Rs(null),e.history.done=Oa(this.history.done,i),e.history.undone=Oa(this.history.undone,i)}},iterLinkedDocs:function(e){oa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Mi(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),hr.prototype.eachLine=hr.prototype.iter;var jo=0;function Cl(e){var t=this;if(Wo(t),tt(t,e)||Rr(t.display,e))return;te(e),z&&(jo=+new Date);var r=Bi(t,e,!0),i=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(i&&i.length&&window.FileReader&&window.File)for(var h=i.length,N=Array(h),J=0,Z=function(){++J==h&&Ii(t,function(){r=_(t.doc,r);var je={from:r,to:r,text:t.doc.splitLines(N.filter(function(nt){return nt!=null}).join(t.doc.lineSeparator())),origin:"paste"};La(t.doc,je),So(t.doc,Dr(_(t.doc,r),_(t.doc,Ir(je))))})()},$=function(je,nt){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,je.type)==-1){Z();return}var ct=new FileReader;ct.onerror=function(){return Z()},ct.onload=function(){var Ct=ct.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ct)){Z();return}N[nt]=Ct,Z()},ct.readAsText(je)},re=0;re<i.length;re++)$(i[re],re);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var be=e.dataTransfer.getData("Text");if(be){var we;if(t.state.draggingText&&!t.state.draggingText.copy&&(we=t.listSelections()),Is(t.doc,Dr(r,r)),we)for(var ze=0;ze<we.length;++ze)Da(t.doc,"",we[ze].anchor,we[ze].head,"drag");t.replaceSelection(be,"around","paste"),t.display.input.focus()}}catch(je){}}}function Al(e,t){if(z&&(!e.state.draggingText||+new Date-jo<100)){me(t);return}if(tt(e,t)||Rr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!g){var r=d("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),m&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=Bi(e,t);if(!r)return;var i=document.createDocumentFragment();Nr(e,r,i),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),x(e.display.dragCursor,i)}function Wo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ho(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],i=0;i<t.length;i++){var h=t[i].CodeMirror;h&&r.push(h)}r.length&&r[0].operation(function(){for(var N=0;N<r.length;N++)e(r[N])})}var Ko=!1;function Rl(){if(Ko)return;Ll(),Ko=!0}function Ll(){var e;Qe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ho(Dl)},100))}),Qe(window,"blur",function(){return Ho(ta)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ua={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"},ls=0;ls<10;ls++)ua[ls+48]=ua[ls+96]=String(ls);for(var Ps=65;Ps<=90;Ps++)ua[Ps]=String.fromCharCode(Ps);for(var us=1;us<=12;us++)ua[us+111]=ua[us+63235]="F"+us;var Zr={};Zr.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"},Zr.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"},Zr.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"},Zr.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"]},Zr.default=s?Zr.macDefault:Zr.pcDefault;function Il(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,i,h,N,J=0;J<t.length-1;J++){var Z=t[J];if(/^(cmd|meta|m)$/i.test(Z))N=!0;else if(/^a(lt)?$/i.test(Z))r=!0;else if(/^(c|ctrl|control)$/i.test(Z))i=!0;else if(/^s(hift)?$/i.test(Z))h=!0;else throw new Error("Unrecognized modifier name: "+Z)}return r&&(e="Alt-"+e),i&&(e="Ctrl-"+e),N&&(e="Cmd-"+e),h&&(e="Shift-"+e),e}function Ml(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(i=="..."){delete e[r];continue}for(var h=lt(r.split(" "),Il),N=0;N<h.length;N++){var J=void 0,Z=void 0;N==h.length-1?(Z=h.join(" "),J=i):(Z=h.slice(0,N+1).join(" "),J="...");var $=t[Z];if(!$)t[Z]=J;else if($!=J)throw new Error("Inconsistent bindings for "+Z)}delete e[r]}for(var re in t)e[re]=t[re];return e}function Ma(e,t,r,i){t=Ns(t);var h=t.call?t.call(e,i):t[e];if(h===!1)return"nothing";if(h==="...")return"multi";if(h!=null&&r(h))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ma(e,t.fallthrough,r,i);for(var N=0;N<t.fallthrough.length;N++){var J=Ma(e,t.fallthrough[N],r,i);if(J)return J}}}function Go(e){var t=typeof e=="string"?e:ua[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function zo(e,t,r){var i=e;return t.altKey&&i!="Alt"&&(e="Alt-"+e),(S?t.metaKey:t.ctrlKey)&&i!="Ctrl"&&(e="Ctrl-"+e),(S?t.ctrlKey:t.metaKey)&&i!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&i!="Shift"&&(e="Shift-"+e),e}function Vo(e,t){if(m&&e.keyCode==34&&e.char)return!1;var r=ua[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),zo(r,e,t))}function Ns(e){return typeof e=="string"?Zr[e]:e}function ka(e,t){for(var r=e.doc.sel.ranges,i=[],h=0;h<r.length;h++){for(var N=t(r[h]);i.length&&Wt(N.from,ke(i).to)<=0;){var J=i.pop();if(Wt(J.from,N.from)<0){N.from=J.from;break}}i.push(N)}sr(e,function(){for(var Z=i.length-1;Z>=0;Z--)Da(e.doc,"",i[Z].from,i[Z].to,"+delete");na(e)})}function ro(e,t,r){var i=Ke(e.text,t+r,r);return i<0||i>e.text.length?null:i}function ao(e,t,r){var i=ro(e,t.ch,r);return i==null?null:new at(t.line,i,r<0?"after":"before")}function so(e,t,r,i,h){if(e){t.doc.direction=="rtl"&&(h=-h);var N=Tt(r,t.doc.direction);if(N){var J=h<0?ke(N):N[0],Z=h<0==(J.level==1),$=Z?"after":"before",re;if(J.level>0||t.doc.direction=="rtl"){var be=Oe(t,r);re=h<0?r.text.length-1:0;var we=He(t,be,re).top;re=st(function(ze){return He(t,be,ze).top==we},h<0==(J.level==1)?J.from:J.to-1,re),$=="before"&&(re=ro(r,re,1))}else re=h<0?J.to:J.from;return new at(i,re,$)}}return new at(i,h<0?r.text.length:0,h<0?"before":"after")}function kl(e,t,r,i){var h=Tt(t,e.doc.direction);if(!h)return ao(t,r,i);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var N=mt(h,r.ch,r.sticky),J=h[N];if(e.doc.direction=="ltr"&&J.level%2==0&&(i>0?J.to>r.ch:J.from<r.ch))return ao(t,r,i);var Z=function(Mt,Ht){return ro(t,Mt instanceof at?Mt.ch:Mt,Ht)},$,re=function(Mt){return e.options.lineWrapping?($=$||Oe(e,t),Vt(e,t,$,Mt)):{begin:0,end:t.text.length}},be=re(r.sticky=="before"?Z(r,-1):r.ch);if(e.doc.direction=="rtl"||J.level==1){var we=J.level==1==i<0,ze=Z(r,we?1:-1);if(ze!=null&&(we?ze<=J.to&&ze<=be.end:ze>=J.from&&ze>=be.begin)){var je=we?"before":"after";return new at(r.line,ze,je)}}var nt=function(Mt,Ht,kt){for(var zt=function(hi,zi){return zi?new at(r.line,Z(hi,1),"before"):new at(r.line,hi,"after")};Mt>=0&&Mt<h.length;Mt+=Ht){var pn=h[Mt],$t=Ht>0==(pn.level!=1),Rn=$t?kt.begin:Z(kt.end,-1);if(pn.from<=Rn&&Rn<pn.to)return zt(Rn,$t);if(Rn=$t?pn.from:Z(pn.to,-1),kt.begin<=Rn&&Rn<kt.end)return zt(Rn,$t)}},ct=nt(N+i,i,be);if(ct)return ct;var Ct=i>0?be.end:Z(be.begin,-1);return Ct!=null&&!(i>0&&Ct==t.text.length)&&(ct=nt(i>0?0:h.length-1,i,re(Ct)),ct)?ct:null}var cs={selectAll:Lo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Le)},killLine:function(e){return ka(e,function(t){if(t.empty()){var r=Rt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:at(t.head.line+1,0)}:{from:t.head,to:at(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ka(e,function(t){return{from:at(t.from().line,0),to:_(e.doc,at(t.to().line+1,0))}})},delLineLeft:function(e){return ka(e,function(t){return{from:at(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ka(e,function(t){var r=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:r},"div");return{from:i,to:t.from()}})},delWrappedLineRight:function(e){return ka(e,function(t){var r=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:i}})},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(at(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(at(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Xo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Yo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Be)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Be)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:r},"div");return i.ch<e.getLine(i.line).search(/\S/)?Yo(e,t.head):i},Be)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),i=e.options.tabSize,h=0;h<r.length;h++){var N=r[h].from(),J=Q(e.getLine(N.line),N.ch,i);t.push(ue(i-J%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return sr(e,function(){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){if(!t[i].empty())continue;var h=t[i].head,N=Rt(e.doc,h.line).text;if(N){if(h.ch==N.length&&(h=new at(h.line,h.ch-1)),h.ch>0)h=new at(h.line,h.ch+1),e.replaceRange(N.charAt(h.ch-1)+N.charAt(h.ch-2),at(h.line,h.ch-2),h,"+transpose");else if(h.line>e.doc.first){var J=Rt(e.doc,h.line-1).text;J&&(h=new at(h.line,1),e.replaceRange(N.charAt(0)+e.doc.lineSeparator()+J.charAt(J.length-1),at(h.line-1,J.length-1),h,"+transpose"))}}r.push(new Zn(h,h))}e.setSelections(r)})},newlineAndIndent:function(e){return sr(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);na(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xo(e,t){var r=Rt(e.doc,t),i=Pi(r);return i!=r&&(t=Qt(i)),so(!0,e,i,t,1)}function Pl(e,t){var r=Rt(e.doc,t),i=Gr(r);return i!=r&&(t=Qt(i)),so(!0,e,r,t,-1)}function Yo(e,t){var r=Xo(e,t.line),i=Rt(e.doc,r.line),h=Tt(i,e.doc.direction);if(!h||h[0].level==0){var N=Math.max(r.ch,i.text.search(/\S/)),J=t.line==r.line&&t.ch<=N&&t.ch;return at(r.line,J?0:N,r.sticky)}return r}function Us(e,t,r){if(typeof t=="string"&&(t=cs[t],!t))return!1;e.display.input.ensurePolled();var i=e.display.shift,h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),h=t(e)!=Fe}finally{e.display.shift=i,e.state.suppressEdits=!1}return h}function Nl(e,t,r){for(var i=0;i<e.state.keyMaps.length;i++){var h=Ma(t,e.state.keyMaps[i],r,e);if(h)return h}return e.options.extraKeys&&Ma(t,e.options.extraKeys,r,e)||Ma(t,e.options.keyMap,r,e)}var Ul=new ee;function ds(e,t,r,i){var h=e.state.keySeq;if(h){if(Go(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==h&&(e.state.keySeq=null,e.display.input.reset())}),Jo(e,h+" "+t,r,i))return!0}return Jo(e,t,r,i)}function Jo(e,t,r,i){var h=Nl(e,t,i);return h=="multi"&&(e.state.keySeq=t),h=="handled"&&Oi(e,"keyHandled",e,t,r),(h=="handled"||h=="multi")&&(te(r),ji(e)),!!h}function Qo(e,t){var r=Vo(t,!0);return r?t.shiftKey&&!e.state.keySeq?ds(e,"Shift-"+r,t,function(i){return Us(e,i,!0)})||ds(e,r,t,function(i){if(typeof i=="string"?/^go[A-Z]/.test(i):i.motion)return Us(e,i)}):ds(e,r,t,function(i){return Us(e,i)}):!1}function Fl(e,t,r){return ds(e,"'"+r+"'",t,function(i){return Us(e,i,!0)})}var oo=null;function Zo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=C(),tt(t,e))return;z&&K<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=Qo(t,e);m&&(oo=i?r:null,!i&&r==88&&!en&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),P&&!s&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;F(t,"CodeMirror-crosshair");function r(i){(i.keyCode==18||!i.altKey)&&(A(t,"CodeMirror-crosshair"),Ut(document,"keyup",r),Ut(document,"mouseover",r))}Qe(document,"keyup",r),Qe(document,"mouseover",r)}function qo(e){e.keyCode==16&&(this.doc.sel.shift=!1),tt(this,e)}function $o(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Rr(t.display,e)||tt(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var r=e.keyCode,i=e.charCode;if(m&&r==oo){oo=null,te(e);return}if(m&&(!e.which||e.which<10)&&Qo(t,e))return;var h=String.fromCharCode(i==null?r:i);if(h=="\b")return;if(Fl(t,e,h))return;t.display.input.onKeyPress(e)}var jl=400,lo=function(e,t,r){this.time=e,this.pos=t,this.button=r};lo.prototype.compare=function(e,t,r){return this.time+jl>e&&Wt(t,this.pos)==0&&r==this.button};var hs,fs;function Wl(e,t){var r=+new Date;return fs&&fs.compare(r,e,t)?(hs=fs=null,"triple"):hs&&hs.compare(r,e,t)?(fs=new lo(r,e,t),hs=null,"double"):(hs=new lo(r,e,t),fs=null,"single")}function el(e){var t=this,r=t.display;if(tt(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Rr(r,e)){n||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(uo(t,e))return;var i=Bi(t,e),h=Me(e),N=i?Wl(i,h):"single";if(window.focus(),h==1&&t.state.selectingText&&t.state.selectingText(e),i&&Hl(t,h,i,N,e))return;h==1?i?Gl(t,i,N,e):xe(e)==r.scroller&&te(e):h==2?(i&&Ds(t.doc,i),setTimeout(function(){return r.input.focus()},20)):h==3&&(L?t.display.input.onContextMenu(e):za(t))}function Hl(e,t,r,i,h){var N="Click";return i=="double"?N="Double"+N:i=="triple"&&(N="Triple"+N),N=(t==1?"Left":t==2?"Middle":"Right")+N,ds(e,zo(N,h),h,function(J){if(typeof J=="string"&&(J=cs[J]),!J)return!1;var Z=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),Z=J(e,r)!=Fe}finally{e.state.suppressEdits=!1}return Z})}function Kl(e,t,r){var i=e.getOption("configureMouse"),h=i?i(e,t,r):{};if(h.unit==null){var N=a?r.shiftKey&&r.metaKey:r.altKey;h.unit=N?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(h.extend==null||e.doc.extend)&&(h.extend=e.doc.extend||r.shiftKey),h.addNew==null&&(h.addNew=s?r.metaKey:r.ctrlKey),h.moveOnDrag==null&&(h.moveOnDrag=!(s?r.altKey:r.ctrlKey)),h}function Gl(e,t,r,i){z?setTimeout(U(_s,e),0):e.curOp.focus=C();var h=Kl(e,r,i),N=e.doc.sel,J;e.options.dragDrop&&Pe&&!e.isReadOnly()&&r=="single"&&(J=N.contains(t))>-1&&(Wt((J=N.ranges[J]).from(),t)<0||t.xRel>0)&&(Wt(J.to(),t)>0||t.xRel<0)?zl(e,i,t,h):Vl(e,i,t,h)}function zl(e,t,r,i){var h=e.display,N=!1,J=Ii(e,function(re){n&&(h.scroller.draggable=!1),e.state.draggingText=!1,Ut(h.wrapper.ownerDocument,"mouseup",J),Ut(h.wrapper.ownerDocument,"mousemove",Z),Ut(h.scroller,"dragstart",$),Ut(h.scroller,"drop",J),N||(te(re),i.addNew||Ds(e.doc,r,null,null,i.extend),n&&!g||z&&K==9?setTimeout(function(){h.wrapper.ownerDocument.body.focus({preventScroll:!0}),h.input.focus()},20):h.input.focus())}),Z=function(re){N=N||Math.abs(t.clientX-re.clientX)+Math.abs(t.clientY-re.clientY)>=10},$=function(){return N=!0};n&&(h.scroller.draggable=!0),e.state.draggingText=J,J.copy=!i.moveOnDrag,h.scroller.dragDrop&&h.scroller.dragDrop(),Qe(h.wrapper.ownerDocument,"mouseup",J),Qe(h.wrapper.ownerDocument,"mousemove",Z),Qe(h.scroller,"dragstart",$),Qe(h.scroller,"drop",J),za(e),setTimeout(function(){return h.input.focus()},20)}function tl(e,t,r){if(r=="char")return new Zn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Zn(at(t.line,0),_(e.doc,at(t.line+1,0)));var i=r(e,t);return new Zn(i.from,i.to)}function Vl(e,t,r,i){var h=e.display,N=e.doc;te(t);var J,Z,$=N.sel,re=$.ranges;if(i.addNew&&!i.extend?(Z=N.sel.contains(r),Z>-1?J=re[Z]:J=new Zn(r,r)):(J=N.sel.primary(),Z=N.sel.primIndex),i.unit=="rectangle")i.addNew||(J=new Zn(r,r)),r=Bi(e,t,!0,!0),Z=-1;else{var be=tl(e,r,i.unit);i.extend?J=no(J,be.anchor,be.head,i.extend):J=be}i.addNew?Z==-1?(Z=re.length,er(N,wr(e,re.concat([J]),Z),{scroll:!1,origin:"*mouse"})):re.length>1&&re[Z].empty()&&i.unit=="char"&&!i.extend?(er(N,wr(e,re.slice(0,Z).concat(re.slice(Z+1)),0),{scroll:!1,origin:"*mouse"}),$=N.sel):io(N,Z,J,Ie):(Z=0,er(N,new lr([J],0),Ie),$=N.sel);var we=r;function ze(kt){if(Wt(we,kt)==0)return;if(we=kt,i.unit=="rectangle"){for(var zt=[],pn=e.options.tabSize,$t=Q(Rt(N,r.line).text,r.ch,pn),Rn=Q(Rt(N,kt.line).text,kt.ch,pn),hi=Math.min($t,Rn),zi=Math.max($t,Rn),wi=Math.min(r.line,kt.line),yr=Math.min(e.lastLine(),Math.max(r.line,kt.line));wi<=yr;wi++){var fr=Rt(N,wi).text,Ni=We(fr,hi,pn);hi==zi?zt.push(new Zn(at(wi,Ni),at(wi,Ni))):fr.length>Ni&&zt.push(new Zn(at(wi,Ni),at(wi,We(fr,zi,pn))))}zt.length||zt.push(new Zn(r,r)),er(N,wr(e,$.ranges.slice(0,Z).concat(zt),Z),{origin:"*mouse",scroll:!1}),e.scrollIntoView(kt)}else{var pr=J,Ji=tl(e,kt,i.unit),Ki=pr.anchor,Ui;Wt(Ji.anchor,Ki)>0?(Ui=Ji.head,Ki=Mn(pr.from(),Ji.anchor)):(Ui=Ji.anchor,Ki=cn(pr.to(),Ji.head));var Li=$.ranges.slice(0);Li[Z]=Xl(e,new Zn(_(N,Ki),Ui)),er(N,wr(e,Li,Z),Ie)}}var je=h.wrapper.getBoundingClientRect(),nt=0;function ct(kt){var zt=++nt,pn=Bi(e,kt,!0,i.unit=="rectangle");if(!pn)return;if(Wt(pn,we)!=0){e.curOp.focus=C(),ze(pn);var $t=_a(h,N);(pn.line>=$t.to||pn.line<$t.from)&&setTimeout(Ii(e,function(){nt==zt&&ct(kt)}),150)}else{var Rn=kt.clientY<je.top?-20:kt.clientY>je.bottom?20:0;Rn&&setTimeout(Ii(e,function(){if(nt!=zt)return;h.scroller.scrollTop+=Rn,ct(kt)}),50)}}function Ct(kt){e.state.selectingText=!1,nt=Infinity,kt&&(te(kt),h.input.focus()),Ut(h.wrapper.ownerDocument,"mousemove",Mt),Ut(h.wrapper.ownerDocument,"mouseup",Ht),N.history.lastSelOrigin=null}var Mt=Ii(e,function(kt){kt.buttons===0||!Me(kt)?Ct(kt):ct(kt)}),Ht=Ii(e,Ct);e.state.selectingText=Ht,Qe(h.wrapper.ownerDocument,"mousemove",Mt),Qe(h.wrapper.ownerDocument,"mouseup",Ht)}function Xl(e,t){var r=t.anchor,i=t.head,h=Rt(e.doc,r.line);if(Wt(r,i)==0&&r.sticky==i.sticky)return t;var N=Tt(h);if(!N)return t;var J=mt(N,r.ch,r.sticky),Z=N[J];if(Z.from!=r.ch&&Z.to!=r.ch)return t;var $=J+(Z.from==r.ch==(Z.level!=1)?0:1);if($==0||$==N.length)return t;var re;if(i.line!=r.line)re=(i.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var be=mt(N,i.ch,i.sticky),we=be-J||(i.ch-r.ch)*(Z.level==1?-1:1);be==$-1||be==$?re=we<0:re=we>0}var ze=N[$+(re?-1:0)],je=re==(ze.level==1),nt=je?ze.from:ze.to,ct=je?"after":"before";return r.ch==nt&&r.sticky==ct?t:new Zn(new at(r.line,nt,ct),i)}function nl(e,t,r,i){var h,N;if(t.touches)h=t.touches[0].clientX,N=t.touches[0].clientY;else try{h=t.clientX,N=t.clientY}catch(ze){return!1}if(h>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&te(t);var J=e.display,Z=J.lineDiv.getBoundingClientRect();if(N>Z.bottom||!Te(e,r))return he(t);N-=Z.top-J.viewOffset;for(var $=0;$<e.display.gutterSpecs.length;++$){var re=J.gutters.childNodes[$];if(re&&re.getBoundingClientRect().right>=h){var be=An(e.doc,N),we=e.display.gutterSpecs[$];return qe(e,r,e,be,we.className,t),he(t)}}}function uo(e,t){return nl(e,t,"gutterClick",!0)}function il(e,t){if(Rr(e.display,t)||Yl(e,t))return;if(tt(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Yl(e,t){return Te(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xn(e)}var Pa={toString:function(){return"CodeMirror.Init"}},al={},Fs={};function Jl(e){var t=e.optionHandlers;function r(i,h,N,J){e.defaults[i]=h,N&&(t[i]=J?function(Z,$,re){re!=Pa&&N(Z,$,re)}:N)}e.defineOption=r,e.Init=Pa,r("value","",function(i,h){return i.setValue(h)},!0),r("mode",null,function(i,h){i.doc.modeOption=h,Qr(i)},!0),r("indentUnit",2,Qr,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(i){ts(i),xn(i),oi(i)},!0),r("lineSeparator",null,function(i,h){if(i.doc.lineSep=h,!h)return;var N=[],J=i.doc.first;i.doc.iter(function($){for(var re=0;;){var be=$.text.indexOf(h,re);if(be==-1)break;re=be+h.length,N.push(at(J,be))}J++});for(var Z=N.length-1;Z>=0;Z--)Da(i.doc,h,N[Z],at(N[Z].line,N[Z].ch+h.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(i,h,N){i.state.specialChars=new RegExp(h.source+(h.test(" ")?"":"| "),"g"),N!=Pa&&i.refresh()}),r("specialCharPlaceholder",ti,function(i){return i.refresh()},!0),r("electricChars",!0),r("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(i,h){return i.getInputField().spellcheck=h},!0),r("autocorrect",!1,function(i,h){return i.getInputField().autocorrect=h},!0),r("autocapitalize",!1,function(i,h){return i.getInputField().autocapitalize=h},!0),r("rtlMoveVisually",!O),r("wholeLineUpdateBefore",!0),r("theme","default",function(i){rl(i),Lr(i)},!0),r("keyMap","default",function(i,h,N){var J=Ns(h),Z=N!=Pa&&Ns(N);Z&&Z.detach&&Z.detach(i,J),J.attach&&J.attach(i,Z||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(i,h){i.display.gutterSpecs=or(h,i.options.lineNumbers),Lr(i)},!0),r("fixedGutter",!0,function(i,h){i.display.gutters.style.left=h?$i(i.display)+"px":"0",i.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(i){return Xr(i)},!0),r("scrollbarStyle","native",function(i){Ta(i),Xr(i),i.display.scrollbars.setScrollTop(i.doc.scrollTop),i.display.scrollbars.setScrollLeft(i.doc.scrollLeft)},!0),r("lineNumbers",!1,function(i,h){i.display.gutterSpecs=or(i.options.gutters,h),Lr(i)},!0),r("firstLineNumber",1,Lr,!0),r("lineNumberFormatter",function(i){return i},Lr,!0),r("showCursorWhenSelecting",!1,ri,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(i,h){h=="nocursor"&&(ta(i),i.display.input.blur()),i.display.input.readOnlyChanged(h)}),r("screenReaderLabel",null,function(i,h){h=h===""?null:h,i.display.input.screenReaderLabelChanged(h)}),r("disableInput",!1,function(i,h){h||i.display.input.reset()},!0),r("dragDrop",!0,Ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ri,!0),r("singleCursorHeightPerLine",!0,ri,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ts,!0),r("addModeClass",!1,ts,!0),r("pollInterval",100),r("undoDepth",200,function(i,h){return i.doc.history.undoDepth=h}),r("historyEventDelay",1250),r("viewportMargin",10,function(i){return i.refresh()},!0),r("maxHighlightLength",1e4,ts,!0),r("moveInputWithCursor",!0,function(i,h){h||i.display.input.resetPosition()}),r("tabindex",null,function(i,h){return i.display.input.getField().tabIndex=h||""}),r("autofocus",null),r("direction","ltr",function(i,h){return i.doc.setDirection(h)},!0),r("phrases",null)}function Ql(e,t,r){var i=r&&r!=Pa;if(!t!=!i){var h=e.display.dragFunctions,N=t?Qe:Ut;N(e.display.scroller,"dragstart",h.start),N(e.display.scroller,"dragenter",h.enter),N(e.display.scroller,"dragover",h.over),N(e.display.scroller,"dragleave",h.leave),N(e.display.scroller,"drop",h.drop)}}function Zl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),Ci(e)),ar(e),oi(e),xn(e),setTimeout(function(){return Xr(e)},100)}function xi(e,t){var r=this;if(!(this instanceof xi))return new xi(e,t);this.options=t=t?b(t):{},b(al,t,!1);var i=t.value;typeof i=="string"?i=new hr(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var h=new xi.inputStyles[t.inputStyle](this),N=this.display=new ga(e,i,h,t);N.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ta(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 ee,keySeq:null,specialChars:null},t.autofocus&&!l&&N.input.focus(),z&&K<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Rl(),Br(this),this.curOp.forceUpdate=!0,vo(this,i),t.autofocus&&!l||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ur(r)},20):ta(this);for(var J in Fs)Fs.hasOwnProperty(J)&&Fs[J](this,t[J],Pa);Wi(this),t.finishInit&&t.finishInit(this);for(var Z=0;Z<co.length;++Z)co[Z](this);Yr(this),n&&t.lineWrapping&&getComputedStyle(N.lineDiv).textRendering=="optimizelegibility"&&(N.lineDiv.style.textRendering="auto")}xi.defaults=al,xi.optionHandlers=Fs;function ql(e){var t=e.display;Qe(t.scroller,"mousedown",Ii(e,el)),z&&K<11?Qe(t.scroller,"dblclick",Ii(e,function($){if(tt(e,$))return;var re=Bi(e,$);if(!re||uo(e,$)||Rr(e.display,$))return;te($);var be=e.findWordAt(re);Ds(e.doc,be.anchor,be.head)})):Qe(t.scroller,"dblclick",function($){return tt(e,$)||te($)}),Qe(t.scroller,"contextmenu",function($){return il(e,$)}),Qe(t.input.getField(),"contextmenu",function($){t.scroller.contains($.target)||il(e,$)});var r,i={end:0};function h(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),i=t.activeTouch,i.end=+new Date)}function N($){if($.touches.length!=1)return!1;var re=$.touches[0];return re.radiusX<=1&&re.radiusY<=1}function J($,re){if(re.left==null)return!0;var be=re.left-$.left,we=re.top-$.top;return be*be+we*we>20*20}Qe(t.scroller,"touchstart",function($){if(!tt(e,$)&&!N($)&&!uo(e,$)){t.input.ensurePolled(),clearTimeout(r);var re=+new Date;t.activeTouch={start:re,moved:!1,prev:re-i.end<=300?i:null},$.touches.length==1&&(t.activeTouch.left=$.touches[0].pageX,t.activeTouch.top=$.touches[0].pageY)}}),Qe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Qe(t.scroller,"touchend",function($){var re=t.activeTouch;if(re&&!Rr(t,$)&&re.left!=null&&!re.moved&&new Date-re.start<300){var be=e.coordsChar(t.activeTouch,"page"),we;!re.prev||J(re,re.prev)?we=new Zn(be,be):!re.prev.prev||J(re,re.prev.prev)?we=e.findWordAt(be):we=new Zn(at(be.line,0),_(e.doc,at(be.line+1,0))),e.setSelection(we.anchor,we.head),e.focus(),te($)}h()}),Qe(t.scroller,"touchcancel",h),Qe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ra(e,t.scroller.scrollTop),xr(e,t.scroller.scrollLeft,!0),qe(e,"scroll",e))}),Qe(t.scroller,"mousewheel",function($){return $a(e,$)}),Qe(t.scroller,"DOMMouseScroll",function($){return $a(e,$)}),Qe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function($){tt(e,$)||me($)},over:function($){tt(e,$)||(Ol(e,$),me($))},start:function($){return Al(e,$)},drop:Ii(e,Cl),leave:function($){tt(e,$)||Wo(e)}};var Z=t.input.getField();Qe(Z,"keyup",function($){return qo.call(e,$)}),Qe(Z,"keydown",Ii(e,Zo)),Qe(Z,"keypress",Ii(e,$o)),Qe(Z,"focus",function($){return Ur(e,$)}),Qe(Z,"blur",function($){return ta(e,$)})}var co=[];xi.defineInitHook=function(e){return co.push(e)};function ps(e,t,r,i){var h=e.doc,N;r==null&&(r="add"),r=="smart"&&(h.mode.indent?N=Ze(e,t).state:r="prev");var J=e.options.tabSize,Z=Rt(h,t),$=Q(Z.text,null,J);Z.stateAfter&&(Z.stateAfter=null);var re=Z.text.match(/^\s*/)[0],be;if(!i&&!/\S/.test(Z.text))be=0,r="not";else if(r=="smart"&&(be=h.mode.indent(N,Z.text.slice(re.length),Z.text),be==Fe||be>150)){if(!i)return;r="prev"}r=="prev"?t>h.first?be=Q(Rt(h,t-1).text,null,J):be=0:r=="add"?be=$+e.options.indentUnit:r=="subtract"?be=$-e.options.indentUnit:typeof r=="number"&&(be=$+r),be=Math.max(0,be);var we="",ze=0;if(e.options.indentWithTabs)for(var je=Math.floor(be/J);je;--je)ze+=J,we+=" ";if(ze<be&&(we+=ue(be-ze)),we!=re)return Da(h,we,at(t,0),at(t,re.length),"+input"),Z.stateAfter=null,!0;for(var nt=0;nt<h.sel.ranges.length;nt++){var ct=h.sel.ranges[nt];if(ct.head.line==t&&ct.head.ch<re.length){var Ct=at(t,re.length);io(h,nt,new Zn(Ct,Ct));break}}}var Mr=null;function Bs(e){Mr=e}function ho(e,t,r,i,h){var N=e.doc;e.display.shift=!1,i||(i=N.sel);var J=+new Date-200,Z=h=="paste"||e.state.pasteIncoming>J,$=wt(t),re=null;if(Z&&i.ranges.length>1)if(Mr&&Mr.text.join(`
|
|
`)==t){if(i.ranges.length%Mr.text.length==0){re=[];for(var be=0;be<Mr.text.length;be++)re.push(N.splitLines(Mr.text[be]))}}else $.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(re=lt($,function(Mt){return[Mt]}));for(var we=e.curOp.updateInput,ze=i.ranges.length-1;ze>=0;ze--){var je=i.ranges[ze],nt=je.from(),ct=je.to();je.empty()&&(r&&r>0?nt=at(nt.line,nt.ch-r):e.state.overwrite&&!Z?ct=at(ct.line,Math.min(Rt(N,ct.line).text.length,ct.ch+ke($).length)):Z&&Mr&&Mr.lineWise&&Mr.text.join(`
|
|
`)==$.join(`
|
|
`)&&(nt=ct=at(nt.line,0)));var Ct={from:nt,to:ct,text:re?re[ze%re.length]:$,origin:h||(Z?"paste":e.state.cutIncoming>J?"cut":"+input")};La(e.doc,Ct),Oi(e,"inputRead",e,Ct)}t&&!Z&&ol(e,t),na(e),e.curOp.updateInput<2&&(e.curOp.updateInput=we),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&sr(t,function(){return ho(t,r,0,null,"paste")}),!0}function ol(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,i=r.ranges.length-1;i>=0;i--){var h=r.ranges[i];if(h.head.ch>100||i&&r.ranges[i-1].head.line==h.head.line)continue;var N=e.getModeAt(h.head),J=!1;if(N.electricChars){for(var Z=0;Z<N.electricChars.length;Z++)if(t.indexOf(N.electricChars.charAt(Z))>-1){J=ps(e,h.head.line,"smart");break}}else N.electricInput&&(N.electricInput.test(Rt(e.doc,h.head.line).text.slice(0,h.head.ch))&&(J=ps(e,h.head.line,"smart")));J&&Oi(e,"electricInput",e,h.head.line)}}function ll(e){for(var t=[],r=[],i=0;i<e.doc.sel.ranges.length;i++){var h=e.doc.sel.ranges[i].head.line,N={anchor:at(h,0),head:at(h+1,0)};r.push(N),t.push(e.getRange(N.anchor,N.head))}return{text:t,ranges:r}}function ul(e,t,r,i){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function cl(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return n?e.style.width="1000px":e.setAttribute("wrap","off"),f&&(e.style.border="1px solid black"),ul(e),t}function $l(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(i,h){var N=this.options,J=N[i];if(N[i]==h&&i!="mode")return;N[i]=h,t.hasOwnProperty(i)&&Ii(this,t[i])(this,h,J),qe(this,"optionChange",this,i)},getOption:function(i){return this.options[i]},getDoc:function(){return this.doc},addKeyMap:function(i,h){this.state.keyMaps[h?"push":"unshift"](Ns(i))},removeKeyMap:function(i){for(var h=this.state.keyMaps,N=0;N<h.length;++N)if(h[N]==i||h[N].name==i)return h.splice(N,1),!0},addOverlay:Yi(function(i,h){var N=i.token?i:e.getMode(this.options,i);if(N.startState)throw new Error("Overlays may not be stateful.");ot(this.state.overlays,{mode:N,modeSpec:i,opaque:h&&h.opaque,priority:h&&h.priority||0},function(J){return J.priority}),this.state.modeGen++,oi(this)}),removeOverlay:Yi(function(i){for(var h=this.state.overlays,N=0;N<h.length;++N){var J=h[N].modeSpec;if(J==i||typeof i=="string"&&J.name==i){h.splice(N,1),this.state.modeGen++,oi(this);return}}}),indentLine:Yi(function(i,h,N){typeof h!="string"&&typeof h!="number"&&(h==null?h=this.options.smartIndent?"smart":"prev":h=h?"add":"subtract"),zn(this.doc,i)&&ps(this,i,h,N)}),indentSelection:Yi(function(i){for(var h=this.doc.sel.ranges,N=-1,J=0;J<h.length;J++){var Z=h[J];if(Z.empty())Z.head.line>N&&(ps(this,Z.head.line,i,!0),N=Z.head.line,J==this.doc.sel.primIndex&&na(this));else{var $=Z.from(),re=Z.to(),be=Math.max(N,$.line);N=Math.min(this.lastLine(),re.line-(re.ch?0:1))+1;for(var we=be;we<N;++we)ps(this,we,i);var ze=this.doc.sel.ranges;$.ch==0&&h.length==ze.length&&ze[J].from().ch>0&&io(this.doc,J,new Zn($,ze[J].to()),Le)}}}),getTokenAt:function(i,h){return Wn(this,i,h)},getLineTokens:function(i,h){return Wn(this,at(i),h,!0)},getTokenTypeAt:function(i){i=_(this.doc,i);var h=Ve(this,Rt(this.doc,i.line)),N=0,J=(h.length-1)/2,Z=i.ch,$;if(Z==0)$=h[2];else for(;;){var re=N+J>>1;if((re?h[re*2-1]:0)>=Z)J=re;else if(h[re*2+1]<Z)N=re+1;else{$=h[re*2+2];break}}var be=$?$.indexOf("overlay "):-1;return be<0?$:be==0?null:$.slice(0,be-1)},getModeAt:function(i){var h=this.doc.mode;return h.innerMode?e.innerMode(h,this.getTokenAt(i).state).mode:h},getHelper:function(i,h){return this.getHelpers(i,h)[0]},getHelpers:function(i,h){var N=[];if(!r.hasOwnProperty(h))return N;var J=r[h],Z=this.getModeAt(i);if(typeof Z[h]=="string")J[Z[h]]&&N.push(J[Z[h]]);else if(Z[h])for(var $=0;$<Z[h].length;$++){var re=J[Z[h][$]];re&&N.push(re)}else Z.helperType&&J[Z.helperType]?N.push(J[Z.helperType]):J[Z.name]&&N.push(J[Z.name]);for(var be=0;be<J._global.length;be++){var we=J._global[be];we.pred(Z,this)&&oe(N,we.val)==-1&&N.push(we.val)}return N},getStateAfter:function(i,h){var N=this.doc;return i=Y(N,i==null?N.first+N.size-1:i),Ze(this,i+1,h).state},cursorCoords:function(i,h){var N,J=this.doc.sel.primary();return i==null?N=J.head:typeof i=="object"?N=_(this.doc,i):N=i?J.from():J.to(),In(this,N,h||"page")},charCoords:function(i,h){return vi(this,_(this.doc,i),h||"page")},coordsChar:function(i,h){return i=Dn(this,i,h||"page"),kn(this,i.left,i.top)},lineAtHeight:function(i,h){return i=Dn(this,{top:i,left:0},h||"page").top,An(this.doc,i+this.display.viewOffset)},heightAtLine:function(i,h,N){var J=!1,Z;if(typeof i=="number"){var $=this.doc.first+this.doc.size-1;i<this.doc.first?i=this.doc.first:i>$&&(i=$,J=!0),Z=Rt(this.doc,i)}else Z=i;return Bn(this,Z,{top:0,left:0},h||"page",N||J).top+(J?this.doc.height-gi(Z):0)},defaultTextHeight:function(){return Ri(this.display)},defaultCharWidth:function(){return Fi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(i,h,N,J,Z){var $=this.display;i=In(this,_(this.doc,i));var re=i.bottom,be=i.left;if(h.style.position="absolute",h.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(h),$.sizer.appendChild(h),J=="over")re=i.top;else if(J=="above"||J=="near"){var we=Math.max($.wrapper.clientHeight,this.doc.height),ze=Math.max($.sizer.clientWidth,$.lineSpace.clientWidth);(J=="above"||i.bottom+h.offsetHeight>we)&&i.top>h.offsetHeight?re=i.top-h.offsetHeight:i.bottom+h.offsetHeight<=we&&(re=i.bottom),be+h.offsetWidth>ze&&(be=ze-h.offsetWidth)}h.style.top=re+"px",h.style.left=h.style.right="",Z=="right"?(be=$.sizer.clientWidth-h.offsetWidth,h.style.right="0px"):(Z=="left"?be=0:Z=="middle"&&(be=($.sizer.clientWidth-h.offsetWidth)/2),h.style.left=be+"px"),N&&Es(this,{left:be,top:re,right:be+h.offsetWidth,bottom:re+h.offsetHeight})},triggerOnKeyDown:Yi(Zo),triggerOnKeyPress:Yi($o),triggerOnKeyUp:qo,triggerOnMouseDown:Yi(el),execCommand:function(i){if(cs.hasOwnProperty(i))return cs[i].call(null,this)},triggerElectric:Yi(function(i){ol(this,i)}),findPosH:function(i,h,N,J){var Z=1;h<0&&(Z=-1,h=-h);for(var $=_(this.doc,i),re=0;re<h&&!($=fo(this.doc,$,Z,N,J),$.hitSide);++re);return $},moveH:Yi(function(i,h){var N=this;this.extendSelectionsBy(function(J){return N.display.shift||N.doc.extend||J.empty()?fo(N.doc,J.head,i,h,N.options.rtlMoveVisually):i<0?J.from():J.to()},Be)}),deleteH:Yi(function(i,h){var N=this.doc.sel,J=this.doc;N.somethingSelected()?J.replaceSelection("",null,"+delete"):ka(this,function(Z){var $=fo(J,Z.head,i,h,!1);return i<0?{from:$,to:Z.head}:{from:Z.head,to:$}})}),findPosV:function(i,h,N,J){var Z=1,$=J;h<0&&(Z=-1,h=-h);for(var re=_(this.doc,i),be=0;be<h;++be){var we=In(this,re,"div");if($==null?$=we.left:we.left=$,re=dl(this,we,Z,N),re.hitSide)break}return re},moveV:Yi(function(i,h){var N=this,J=this.doc,Z=[],$=!this.display.shift&&!J.extend&&J.sel.somethingSelected();if(J.extendSelectionsBy(function(be){if($)return i<0?be.from():be.to();var we=In(N,be.head,"div");be.goalColumn!=null&&(we.left=be.goalColumn),Z.push(we.left);var ze=dl(N,we,i,h);return h=="page"&&be==J.sel.primary()&&Ya(N,vi(N,ze,"div").top-we.top),ze},Be),Z.length)for(var re=0;re<J.sel.ranges.length;re++)J.sel.ranges[re].goalColumn=Z[re]}),findWordAt:function(i){var h=this.doc,N=Rt(h,i.line).text,J=i.ch,Z=i.ch;if(N){var $=this.getHelper(i,"wordChars");(i.sticky=="before"||Z==N.length)&&J?--J:++Z;for(var re=N.charAt(J),be=dt(re,$)?function(we){return dt(we,$)}:/\s/.test(re)?function(we){return/\s/.test(we)}:function(we){return!/\s/.test(we)&&!dt(we)};J>0&&be(N.charAt(J-1));)--J;for(;Z<N.length&&be(N.charAt(Z));)++Z}return new Zn(at(i.line,J),at(i.line,Z))},toggleOverwrite:function(i){if(i!=null&&i==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),qe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==C()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yi(function(i,h){ia(this,i,h)}),getScrollInfo:function(){var i=this.display.scroller;return{left:i.scrollLeft,top:i.scrollTop,height:i.scrollHeight-De(this)-this.display.barHeight,width:i.scrollWidth-De(this)-this.display.barWidth,clientHeight:ne(this),clientWidth:ye(this)}},scrollIntoView:Yi(function(i,h){i==null?(i={from:this.doc.sel.primary().head,to:null},h==null&&(h=this.options.cursorScrollMargin)):typeof i=="number"?i={from:at(i,0),to:null}:i.from==null&&(i={from:i,to:null}),i.to||(i.to=i.from),i.margin=h||0,i.from.line!=null?Ys(this,i):ha(this,i.from,i.to,i.margin)}),setSize:Yi(function(i,h){var N=this,J=function($){return typeof $=="number"||/^\d+$/.test(String($))?$+"px":$};i!=null&&(this.display.wrapper.style.width=J(i)),h!=null&&(this.display.wrapper.style.height=J(h)),this.options.lineWrapping&&_n(this);var Z=this.display.viewFrom;this.doc.iter(Z,this.display.viewTo,function($){if($.widgets){for(var re=0;re<$.widgets.length;re++)if($.widgets[re].noHScroll){Ei(N,Z,"widget");break}}++Z}),this.curOp.forceUpdate=!0,qe(this,"refresh",this)}),operation:function(i){return sr(this,i)},startOperation:function(){return Br(this)},endOperation:function(){return Yr(this)},refresh:Yi(function(){var i=this.display.cachedTextHeight;oi(this),this.curOp.forceUpdate=!0,xn(this),ia(this,this.doc.scrollLeft,this.doc.scrollTop),Sa(this.display),(i==null||Math.abs(i-Ri(this.display))>.5||this.options.lineWrapping)&&ar(this),qe(this,"refresh",this)}),swapDoc:Yi(function(i){var h=this.doc;return h.cm=null,this.state.selectingText&&this.state.selectingText(),vo(this,i),xn(this),this.display.input.reset(),ia(this,i.scrollLeft,i.scrollTop),this.curOp.forceScroll=!0,Oi(this,"swapDoc",this,h),h}),phrase:function(i){var h=this.options.phrases;return h&&Object.prototype.hasOwnProperty.call(h,i)?h[i]:i},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}},Se(e),e.registerHelper=function(i,h,N){r.hasOwnProperty(i)||(r[i]=e[i]={_global:[]}),r[i][h]=N},e.registerGlobalHelper=function(i,h,N,J){e.registerHelper(i,h,J),r[i]._global.push({pred:N,val:J})}}function fo(e,t,r,i,h){var N=t,J=r,Z=Rt(e,t.line),$=h&&e.direction=="rtl"?-r:r;function re(){var Ht=t.line+$;return Ht<e.first||Ht>=e.first+e.size?!1:(t=new at(Ht,t.ch,t.sticky),Z=Rt(e,Ht))}function be(Ht){var kt;if(i=="codepoint"){var zt=Z.text.charCodeAt(t.ch+(i>0?0:-1));isNaN(zt)?kt=null:kt=new at(t.line,Math.max(0,Math.min(Z.text.length,t.ch+r*(zt>=55296&&zt<56320?2:1))),-r)}else h?kt=kl(e.cm,Z,t,r):kt=ao(Z,t,r);if(kt==null)if(!Ht&&re())t=so(h,e.cm,Z,t.line,$);else return!1;else t=kt;return!0}if(i=="char"||i=="codepoint")be();else if(i=="column")be(!0);else if(i=="word"||i=="group")for(var we=null,ze=i=="group",je=e.cm&&e.cm.getHelper(t,"wordChars"),nt=!0;!(r<0&&!be(!nt));nt=!1){var ct=Z.text.charAt(t.ch)||`
|
|
`,Ct=dt(ct,je)?"w":ze&&ct==`
|
|
`?"n":!ze||/\s/.test(ct)?null:"p";if(ze&&!nt&&!Ct&&(Ct="s"),we&&we!=Ct){r<0&&(r=1,be(),t.sticky="after");break}if(Ct&&(we=Ct),r>0&&!be(!nt))break}var Mt=Ms(e,t,N,J,!0);return Vn(N,Mt)&&(Mt.hitSide=!0),Mt}function dl(e,t,r,i){var h=e.doc,N=t.left,J;if(i=="page"){var Z=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$=Math.max(Z-.5*Ri(e.display),3);J=(r>0?t.bottom:t.top)+r*$}else i=="line"&&(J=r>0?t.bottom+3:t.top-3);for(var re;!(re=kn(e,N,J),!re.outside);){if(r<0?J<=0:J>=h.height){re.hitSide=!0;break}J+=r*5}return re}var li=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};li.prototype.init=function(e){var t=this,r=this,i=r.cm,h=r.div=e.lineDiv;ul(h,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize);function N(Z){for(var $=Z.target;$;$=$.parentNode){if($==h)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($.className))break}return!1}Qe(h,"paste",function(Z){if(!N(Z)||tt(i,Z)||sl(Z,i))return;K<=11&&setTimeout(Ii(i,function(){return t.updateFromDOM()}),20)}),Qe(h,"compositionstart",function(Z){t.composing={data:Z.data,done:!1}}),Qe(h,"compositionupdate",function(Z){t.composing||(t.composing={data:Z.data,done:!1})}),Qe(h,"compositionend",function(Z){t.composing&&(Z.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Qe(h,"touchstart",function(){return r.forceCompositionEnd()}),Qe(h,"input",function(){t.composing||t.readFromDOMSoon()});function J(Z){if(!N(Z)||tt(i,Z))return;if(i.somethingSelected())Bs({lineWise:!1,text:i.getSelections()}),Z.type=="cut"&&i.replaceSelection("",null,"cut");else if(i.options.lineWiseCopyCut){var $=ll(i);Bs({lineWise:!0,text:$.text}),Z.type=="cut"&&i.operation(function(){i.setSelections($.ranges,0,Le),i.replaceSelection("",null,"cut")})}else return;if(Z.clipboardData){Z.clipboardData.clearData();var re=Mr.text.join(`
|
|
`);if(Z.clipboardData.setData("Text",re),Z.clipboardData.getData("Text")==re){Z.preventDefault();return}}var be=cl(),we=be.firstChild;i.display.lineSpace.insertBefore(be,i.display.lineSpace.firstChild),we.value=Mr.text.join(`
|
|
`);var ze=document.activeElement;j(we),setTimeout(function(){i.display.lineSpace.removeChild(be),ze.focus(),ze==h&&r.showPrimarySelection()},50)}Qe(h,"copy",J),Qe(h,"cut",J)},li.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},li.prototype.prepareSelection=function(){var e=Cr(this.cm,!1);return e.focus=document.activeElement==this.div,e},li.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},li.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},li.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),h=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||h.line<t.display.viewFrom){e.removeAllRanges();return}var N=js(t,e.anchorNode,e.anchorOffset),J=js(t,e.focusNode,e.focusOffset);if(N&&!N.bad&&J&&!J.bad&&Wt(Mn(N,J),i)==0&&Wt(cn(N,J),h)==0)return;var Z=t.display.view,$=i.line>=t.display.viewFrom&&hl(t,i)||{node:Z[0].measure.map[2],offset:0},re=h.line<t.display.viewTo&&hl(t,h);if(!re){var be=Z[Z.length-1].measure,we=be.maps?be.maps[be.maps.length-1]:be.map;re={node:we[we.length-1],offset:we[we.length-2]-we[we.length-3]}}if(!$||!re){e.removeAllRanges();return}var ze=e.rangeCount&&e.getRangeAt(0),je;try{je=p($.node,$.offset,re.offset,re.node)}catch(nt){}je&&(!P&&t.state.focused?(e.collapse($.node,$.offset),je.collapsed||(e.removeAllRanges(),e.addRange(je))):(e.removeAllRanges(),e.addRange(je)),ze&&e.anchorNode==null?e.addRange(ze):P&&this.startGracePeriod()),this.rememberSelection()},li.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)},li.prototype.showMultipleSelections=function(e){x(this.cm.display.cursorDiv,e.cursors),x(this.cm.display.selectionDiv,e.selection)},li.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},li.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return v(this.div,t)},li.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},li.prototype.blur=function(){this.div.blur()},li.prototype.getField=function(){return this.div},li.prototype.supportsTouch=function(){return!0},li.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():sr(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},li.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},li.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(o&&y&&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 r=js(t,e.anchorNode,e.anchorOffset),i=js(t,e.focusNode,e.focusOffset);r&&i&&sr(t,function(){er(t.doc,Dr(r,i),Le),(r.bad||i.bad)&&(t.curOp.selectionChanged=!0)})},li.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),i=r.from(),h=r.to();if(i.ch==0&&i.line>e.firstLine()&&(i=at(i.line-1,Rt(e.doc,i.line-1).length)),h.ch==Rt(e.doc,h.line).text.length&&h.line<e.lastLine()&&(h=at(h.line+1,0)),i.line<t.viewFrom||h.line>t.viewTo-1)return!1;var N,J,Z;i.line==t.viewFrom||(N=di(e,i.line))==0?(J=Qt(t.view[0].line),Z=t.view[0].node):(J=Qt(t.view[N].line),Z=t.view[N-1].node.nextSibling);var $=di(e,h.line),re,be;if($==t.view.length-1?(re=t.viewTo-1,be=t.lineDiv.lastChild):(re=Qt(t.view[$+1].line)-1,be=t.view[$+1].node.previousSibling),!Z)return!1;for(var we=e.doc.splitLines(tu(e,Z,be,J,re)),ze=Gn(e.doc,at(J,0),at(re,Rt(e.doc,re).text.length));we.length>1&&ze.length>1;)if(ke(we)==ke(ze))we.pop(),ze.pop(),re--;else if(we[0]==ze[0])we.shift(),ze.shift(),J++;else break;for(var je=0,nt=0,ct=we[0],Ct=ze[0],Mt=Math.min(ct.length,Ct.length);je<Mt&&ct.charCodeAt(je)==Ct.charCodeAt(je);)++je;for(var Ht=ke(we),kt=ke(ze),zt=Math.min(Ht.length-(we.length==1?je:0),kt.length-(ze.length==1?je:0));nt<zt&&Ht.charCodeAt(Ht.length-nt-1)==kt.charCodeAt(kt.length-nt-1);)++nt;if(we.length==1&&ze.length==1&&J==i.line)for(;je&&je>i.ch&&Ht.charCodeAt(Ht.length-nt-1)==kt.charCodeAt(kt.length-nt-1);)je--,nt++;we[we.length-1]=Ht.slice(0,Ht.length-nt).replace(/^\u200b+/,""),we[0]=we[0].slice(je).replace(/\u200b+$/,"");var pn=at(J,je),$t=at(re,ze.length?ke(ze).length-nt:0);if(we.length>1||we[0]||Wt(pn,$t))return Da(e.doc,we,pn,$t,"+input"),!0},li.prototype.ensurePolled=function(){this.forceCompositionEnd()},li.prototype.reset=function(){this.forceCompositionEnd()},li.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},li.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)},li.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&sr(this.cm,function(){return oi(e.cm)})},li.prototype.setUneditable=function(e){e.contentEditable="false"},li.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,ho)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},li.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},li.prototype.onContextMenu=function(){},li.prototype.resetPosition=function(){},li.prototype.needsContentAttribute=!0;function hl(e,t){var r=Ne(e,t.line);if(!r||r.hidden)return null;var i=Rt(e.doc,t.line),h=ae(r,i,t.line),N=Tt(i,e.doc.direction),J="left";if(N){var Z=mt(N,t.ch);J=Z%2?"right":"left"}var $=vt(h.map,t.ch,J);return $.offset=$.collapse=="right"?$.end:$.start,$}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Na(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,i,h){var N="",J=!1,Z=e.doc.lineSeparator(),$=!1;function re(je){return function(nt){return nt.id==je}}function be(){J&&(N+=Z,$&&(N+=Z),J=$=!1)}function we(je){je&&(be(),N+=je)}function ze(je){if(je.nodeType==1){var nt=je.getAttribute("cm-text");if(nt){we(nt);return}var ct=je.getAttribute("cm-marker"),Ct;if(ct){var Mt=e.findMarks(at(i,0),at(h+1,0),re(+ct));Mt.length&&(Ct=Mt[0].find(0))&&we(Gn(e.doc,Ct.from,Ct.to).join(Z));return}if(je.getAttribute("contenteditable")=="false")return;var Ht=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;Ht&&be();for(var kt=0;kt<je.childNodes.length;kt++)ze(je.childNodes[kt]);/^(pre|p)$/i.test(je.nodeName)&&($=!0),Ht&&(J=!0)}else je.nodeType==3&&we(je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ze(t),t==r);)t=t.nextSibling,$=!1;return N}function js(e,t,r){var i;if(t==e.display.lineDiv){if(i=e.display.lineDiv.childNodes[r],!i)return Na(e.clipPos(at(e.display.viewTo-1)),!0);t=null,r=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var h=0;h<e.display.view.length;h++){var N=e.display.view[h];if(N.node==i)return nu(N,t,r)}}function nu(e,t,r){var i=e.text.firstChild,h=!1;if(!t||!v(i,t))return Na(at(Qt(e.line),0),!0);if(t==i&&(h=!0,t=i.childNodes[r],r=0,!t)){var N=e.rest?ke(e.rest):e.line;return Na(at(Qt(N),N.text.length),h)}var J=t.nodeType==3?t:null,Z=t;for(!J&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(J=t.firstChild,r&&(r=J.nodeValue.length));Z.parentNode!=i;)Z=Z.parentNode;var $=e.measure,re=$.maps;function be(Ct,Mt,Ht){for(var kt=-1;kt<(re?re.length:0);kt++)for(var zt=kt<0?$.map:re[kt],pn=0;pn<zt.length;pn+=3){var $t=zt[pn+2];if($t==Ct||$t==Mt){var Rn=Qt(kt<0?e.line:e.rest[kt]),hi=zt[pn]+Ht;return(Ht<0||$t!=Ct)&&(hi=zt[pn+(Ht?1:0)]),at(Rn,hi)}}}var we=be(J,Z,r);if(we)return Na(we,h);for(var ze=Z.nextSibling,je=J?J.nodeValue.length-r:0;ze;ze=ze.nextSibling){if(we=be(ze,ze.firstChild,0),we)return Na(at(we.line,we.ch-je),h);je+=ze.textContent.length}for(var nt=Z.previousSibling,ct=r;nt;nt=nt.previousSibling){if(we=be(nt,nt.firstChild,-1),we)return Na(at(we.line,we.ch+ct),h);ct+=nt.textContent.length}}var ki=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};ki.prototype.init=function(e){var t=this,r=this,i=this.cm;this.createField(e);var h=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),f&&(h.style.width="0px"),Qe(h,"input",function(){z&&K>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Qe(h,"paste",function(J){if(tt(i,J)||sl(J,i))return;i.state.pasteIncoming=+new Date,r.fastPoll()});function N(J){if(tt(i,J))return;if(i.somethingSelected())Bs({lineWise:!1,text:i.getSelections()});else if(i.options.lineWiseCopyCut){var Z=ll(i);Bs({lineWise:!0,text:Z.text}),J.type=="cut"?i.setSelections(Z.ranges,null,Le):(r.prevInput="",h.value=Z.text.join(`
|
|
`),j(h))}else return;J.type=="cut"&&(i.state.cutIncoming=+new Date)}Qe(h,"cut",N),Qe(h,"copy",N),Qe(e.scroller,"paste",function(J){if(Rr(e,J)||tt(i,J))return;if(!h.dispatchEvent){i.state.pasteIncoming=+new Date,r.focus();return}var Z=new Event("paste");Z.clipboardData=J.clipboardData,h.dispatchEvent(Z)}),Qe(e.lineSpace,"selectstart",function(J){Rr(e,J)||te(J)}),Qe(h,"compositionstart",function(){var J=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:J,range:i.markText(J,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Qe(h,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ki.prototype.createField=function(e){this.wrapper=cl(),this.textarea=this.wrapper.firstChild},ki.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ki.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,i=Cr(e);if(e.options.moveInputWithCursor){var h=In(e,r.sel.primary().head,"div"),N=t.wrapper.getBoundingClientRect(),J=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,h.top+J.top-N.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,h.left+J.left-N.left))}return i},ki.prototype.showSelection=function(e){var t=this.cm,r=t.display;x(r.cursorDiv,e.cursors),x(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ki.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&j(this.textarea),z&&K>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",z&&K>=9&&(this.hasSelection=null))},ki.prototype.getField=function(){return this.textarea},ki.prototype.supportsTouch=function(){return!1},ki.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||C()!=this.textarea))try{this.textarea.focus()}catch(e){}},ki.prototype.blur=function(){this.textarea.blur()},ki.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ki.prototype.receivedFocus=function(){this.slowPoll()},ki.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()})},ki.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var i=t.poll();!i&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},ki.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ye(r)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var h=r.value;if(h==i&&!t.somethingSelected())return!1;if(z&&K>=9&&this.hasSelection===h||s&&/[\uf700-\uf7ff]/.test(h))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var N=h.charCodeAt(0);if(N==8203&&!i&&(i="\u200B"),N==8666)return this.reset(),this.cm.execCommand("undo")}for(var J=0,Z=Math.min(i.length,h.length);J<Z&&i.charCodeAt(J)==h.charCodeAt(J);)++J;return sr(t,function(){ho(t,h.slice(J),i.length-J,null,e.composing?"*compose":null),h.length>1e3||h.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=h,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ki.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ki.prototype.onKeyPress=function(){z&&K>=9&&(this.hasSelection=null),this.fastPoll()},ki.prototype.onContextMenu=function(e){var t=this,r=t.cm,i=r.display,h=t.textarea;t.contextMenuPending&&t.contextMenuPending();var N=Bi(r,e),J=i.scroller.scrollTop;if(!N||m)return;var Z=r.options.resetSelectionOnContextMenu;Z&&r.doc.sel.contains(N)==-1&&Ii(r,er)(r.doc,Dr(N),Le);var $=h.style.cssText,re=t.wrapper.style.cssText,be=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",h.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-be.top-5)+"px; left: "+(e.clientX-be.left-5)+`px;
|
|
z-index: 1000; background: `+(z?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var we;n&&(we=window.scrollY),i.input.focus(),n&&window.scrollTo(null,we),i.input.reset(),r.somethingSelected()||(h.value=t.prevInput=" "),t.contextMenuPending=je,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll);function ze(){if(h.selectionStart!=null){var ct=r.somethingSelected(),Ct="\u200B"+(ct?h.value:"");h.value="\u21DA",h.value=Ct,t.prevInput=ct?"":"\u200B",h.selectionStart=1,h.selectionEnd=Ct.length,i.selForContextMenu=r.doc.sel}}function je(){if(t.contextMenuPending!=je)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=re,h.style.cssText=$,z&&K<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=J),h.selectionStart!=null){(!z||z&&K<9)&&ze();var ct=0,Ct=function(){i.selForContextMenu==r.doc.sel&&h.selectionStart==0&&h.selectionEnd>0&&t.prevInput=="\u200B"?Ii(r,Lo)(r):ct++<10?i.detectingSelectAll=setTimeout(Ct,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(Ct,200)}}if(z&&K>=9&&ze(),L){me(e);var nt=function(){Ut(window,"mouseup",nt),setTimeout(je,20)};Qe(window,"mouseup",nt)}else setTimeout(je,50)},ki.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ki.prototype.setUneditable=function(){},ki.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?b(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=C();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function i(){e.value=Z.getValue()}var h;if(e.form&&(Qe(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var N=e.form;h=N.submit;try{var J=N.submit=function(){i(),N.submit=h,N.submit(),N.submit=J}}catch($){}}t.finishInit=function($){$.save=i,$.getTextArea=function(){return e},$.toTextArea=function(){$.toTextArea=isNaN,i(),e.parentNode.removeChild($.getWrapperElement()),e.style.display="",e.form&&(Ut(e.form,"submit",i),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=h))}},e.style.display="none";var Z=xi(function($){return e.parentNode.insertBefore($,e.nextSibling)},t);return Z}function ru(e){e.off=Ut,e.on=Qe,e.wheelEventPixels=qa,e.Doc=hr,e.splitLines=wt,e.countColumn=Q,e.findColumn=We,e.isWordChar=et,e.Pass=Fe,e.signal=qe,e.Line=Ti,e.changeEnd=Ir,e.scrollbarModel=Ja,e.Pos=at,e.cmpPos=Wt,e.modes=At,e.mimeModes=Ft,e.resolveMode=_t,e.getMode=tn,e.modeExtensions=St,e.extendMode=It,e.copyState=Yt,e.startState=ln,e.innerMode=mn,e.commands=cs,e.keyMap=Zr,e.keyName=Vo,e.isModifierKey=Go,e.lookupKey=Ma,e.normalizeKeyMap=Ml,e.StringStream=Jt,e.SharedTextMarker=os,e.TextMarker=la,e.LineWidget=ss,e.e_preventDefault=te,e.e_stopPropagation=se,e.e_stop=me,e.addClass=F,e.contains=v,e.rmClass=A,e.keyNames=ua}Jl(xi),$l(xi);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ws in hr.prototype)hr.prototype.hasOwnProperty(Ws)&&oe(au,Ws)<0&&(xi.prototype[Ws]=function(e){return function(){return e.apply(this.doc,arguments)}}(hr.prototype[Ws]));return Se(hr),xi.inputStyles={textarea:ki,contenteditable:li},xi.defineMode=function(e){!xi.defaults.mode&&e!="null"&&(xi.defaults.mode=e),Gt.apply(this,arguments)},xi.defineMIME=on,xi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),xi.defineMIME("text/plain","null"),xi.defineExtension=function(e,t){xi.prototype[e]=t},xi.defineDocExtension=function(e,t){hr.prototype[e]=t},xi.fromTextArea=iu,ru(xi),xi.version="5.58.2",xi})},Y1PL:function(it,ve,W){"use strict";W.r(ve),W.d(ve,"ResizableTextArea",function(){return oe});var ie=W("wx14"),G=W("1OyB"),P=W("vuIU"),V=W("Ji7U"),k=W("LK+K"),B=W("q1tI"),z=W("VTBJ"),K=W("rePB"),n=W("Zm9Q"),M=W("Kwbf"),y=W("c+Xe"),m=W("m+aA"),g=W("bdgK"),u=new Map;function c(Le){Le.forEach(function(Ie){var Be,We=Ie.target;(Be=u.get(We))===null||Be===void 0||Be.forEach(function(ge){return ge(We)})})}var f=new g.default(c),o=null,l=null;function s(Le,Ie){u.has(Le)||(u.set(Le,new Set),f.observe(Le)),u.get(Le).add(Ie)}function a(Le,Ie){u.has(Le)&&(u.get(Le).delete(Ie),u.get(Le).size||(f.unobserve(Le),u.delete(Le)))}var O=function(Le){Object(V.a)(Be,Le);var Ie=Object(k.a)(Be);function Be(){return Object(G.a)(this,Be),Ie.apply(this,arguments)}return Object(P.a)(Be,[{key:"render",value:function(){return this.props.children}}]),Be}(B.Component),w=B.createContext(null);function S(Le){var Ie=Le.children,Be=Le.onBatchResize,We=B.useRef(0),ge=B.useRef([]),ue=B.useContext(w),ke=B.useCallback(function(lt,ot,ut){We.current+=1;var xt=We.current;ge.current.push({size:lt,element:ot,data:ut}),Promise.resolve().then(function(){xt===We.current&&(Be==null||Be(ge.current),ge.current=[])}),ue==null||ue(lt,ot,ut)},[Be,ue]);return B.createElement(w.Provider,{value:ke},Ie)}function L(Le){var Ie=Le.children,Be=Le.disabled,We=B.useRef(null),ge=B.useRef(null),ue=B.useContext(w),ke=B.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),lt=B.isValidElement(Ie)&&Object(y.c)(Ie),ot=lt?Ie.ref:null,ut=B.useMemo(function(){return Object(y.a)(ot,We)},[ot,We]),xt=B.useRef(Le);xt.current=Le;var Je=B.useCallback(function(et){var dt=xt.current,de=dt.onResize,Ce=dt.data,Ue=et.getBoundingClientRect(),Ke=Ue.width,st=Ue.height,ht=et.offsetWidth,yt=et.offsetHeight,mt=Math.floor(Ke),Ot=Math.floor(st);if(ke.current.width!==mt||ke.current.height!==Ot||ke.current.offsetWidth!==ht||ke.current.offsetHeight!==yt){var Tt={width:mt,height:Ot,offsetWidth:ht,offsetHeight:yt};ke.current=Tt;var Et=ht===Math.round(Ke)?Ke:ht,Qe=yt===Math.round(st)?st:yt,Kt=Object(z.a)(Object(z.a)({},Tt),{},{offsetWidth:Et,offsetHeight:Qe});ue==null||ue(Kt,et,Ce),de&&Promise.resolve().then(function(){de(Kt,et)})}},[]);return B.useEffect(function(){var et=Object(m.a)(We.current)||Object(m.a)(ge.current);return et&&!Be&&s(et,Je),function(){return a(et,Je)}},[We.current,Be]),B.createElement(O,{ref:ge},lt?B.cloneElement(Ie,{ref:ut}):Ie)}var D="rc-observer-key";function A(Le){var Ie=Le.children,Be=Object(n.a)(Ie);return Be.map(function(We,ge){var ue=(We==null?void 0:We.key)||"".concat(D,"-").concat(ge);return B.createElement(L,Object(ie.a)({},Le,{key:ue}),We)})}A.Collection=S;var T=A,x=W("bT9E"),d=W("TSYQ"),E=W.n(d),p=`
|
|
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"],C={},F;function R(Le){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=Le.getAttribute("id")||Le.getAttribute("data-reactid")||Le.getAttribute("name");if(Ie&&C[Be])return C[Be];var We=window.getComputedStyle(Le),ge=We.getPropertyValue("box-sizing")||We.getPropertyValue("-moz-box-sizing")||We.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(We.getPropertyValue("padding-bottom"))+parseFloat(We.getPropertyValue("padding-top")),ke=parseFloat(We.getPropertyValue("border-bottom-width"))+parseFloat(We.getPropertyValue("border-top-width")),lt=v.map(function(ut){return"".concat(ut,":").concat(We.getPropertyValue(ut))}).join(";"),ot={sizingStyle:lt,paddingSize:ue,borderSize:ke,boxSizing:ge};return Ie&&Be&&(C[Be]=ot),ot}function j(Le){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,We=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),Le.getAttribute("wrap")?F.setAttribute("wrap",Le.getAttribute("wrap")):F.removeAttribute("wrap");var ge=R(Le,Ie),ue=ge.paddingSize,ke=ge.borderSize,lt=ge.boxSizing,ot=ge.sizingStyle;F.setAttribute("style","".concat(ot,";").concat(p)),F.value=Le.value||Le.placeholder||"";var ut=Number.MIN_SAFE_INTEGER,xt=Number.MAX_SAFE_INTEGER,Je=F.scrollHeight,et;if(lt==="border-box"?Je+=ke:lt==="content-box"&&(Je-=ue),Be!==null||We!==null){F.value=" ";var dt=F.scrollHeight-ue;Be!==null&&(ut=dt*Be,lt==="border-box"&&(ut=ut+ue+ke),Je=Math.max(ut,Je)),We!==null&&(xt=dt*We,lt==="border-box"&&(xt=xt+ue+ke),et=Je>xt?"":"hidden",Je=Math.min(xt,Je))}return{height:Je,minHeight:ut,maxHeight:xt,overflowY:et,resize:"none"}}var U=W("Gytx"),b=W.n(U),Q;(function(Le){Le[Le.NONE=0]="NONE",Le[Le.RESIZING=1]="RESIZING",Le[Le.RESIZED=2]="RESIZED"})(Q||(Q={}));var ee=function(Le){Object(V.a)(Be,Le);var Ie=Object(k.a)(Be);function Be(We){var ge;return Object(G.a)(this,Be),ge=Ie.call(this,We),ge.nextFrameActionId=void 0,ge.resizeFrameId=void 0,ge.textArea=void 0,ge.saveTextArea=function(ue){ge.textArea=ue},ge.handleResize=function(ue){var ke=ge.state.resizeStatus,lt=ge.props,ot=lt.autoSize,ut=lt.onResize;if(ke!==Q.NONE)return;typeof ut=="function"&&ut(ue),ot&&ge.resizeOnNextFrame()},ge.resizeOnNextFrame=function(){cancelAnimationFrame(ge.nextFrameActionId),ge.nextFrameActionId=requestAnimationFrame(ge.resizeTextarea)},ge.resizeTextarea=function(){var ue=ge.props.autoSize;if(!ue||!ge.textArea)return;var ke=ue.minRows,lt=ue.maxRows,ot=j(ge.textArea,!1,ke,lt);ge.setState({textareaStyles:ot,resizeStatus:Q.RESIZING},function(){cancelAnimationFrame(ge.resizeFrameId),ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:Q.RESIZED},function(){ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:Q.NONE}),ge.fixFirefoxAutoScroll()})})})})},ge.renderTextArea=function(){var ue=ge.props,ke=ue.prefixCls,lt=ke===void 0?"rc-textarea":ke,ot=ue.autoSize,ut=ue.onResize,xt=ue.className,Je=ue.disabled,et=ge.state,dt=et.textareaStyles,de=et.resizeStatus,Ce=Object(x.a)(ge.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ue=E()(lt,xt,Object(K.a)({},"".concat(lt,"-disabled"),Je));"value"in Ce&&(Ce.value=Ce.value||"");var Ke=Object(z.a)(Object(z.a)(Object(z.a)({},ge.props.style),dt),de===Q.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return B.createElement(T,{onResize:ge.handleResize,disabled:!(ot||ut)},B.createElement("textarea",Object(ie.a)({},Ce,{className:Ue,style:Ke,ref:ge.saveTextArea})))},ge.state={textareaStyles:{},resizeStatus:Q.NONE},ge}return Object(P.a)(Be,[{key:"componentDidUpdate",value:function(ge){(ge.value!==this.props.value||!b()(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,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(ge,ue)}}catch(ke){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Be}(B.Component),oe=ee,fe=function(Le){Object(V.a)(Be,Le);var Ie=Object(k.a)(Be);function Be(We){var ge;Object(G.a)(this,Be),ge=Ie.call(this,We),ge.resizableTextArea=void 0,ge.focus=function(){ge.resizableTextArea.textArea.focus()},ge.saveTextArea=function(ke){ge.resizableTextArea=ke},ge.handleChange=function(ke){var lt=ge.props.onChange;ge.setValue(ke.target.value,function(){ge.resizableTextArea.resizeTextarea()}),lt&<(ke)},ge.handleKeyDown=function(ke){var lt=ge.props,ot=lt.onPressEnter,ut=lt.onKeyDown;ke.keyCode===13&&ot&&ot(ke),ut&&ut(ke)};var ue=typeof We.value=="undefined"||We.value===null?We.defaultValue:We.value;return ge.state={value:ue},ge}return Object(P.a)(Be,[{key:"setValue",value:function(ge,ue){"value"in this.props||this.setState({value:ge},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return B.createElement(oe,Object(ie.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}}]),Be}(B.Component),Fe=ve.default=fe},ZJlW:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___XZ1Hd",flex_space_between:"flex_space_between___2oG4i",flex_box_vertical_center:"flex_box_vertical_center___1UWtb",flex_box_center_end:"flex_box_center_end___1o2xT",flex_box_column:"flex_box_column___SlAE0",list:"list___1HvWe",wrap:"wrap___10sri",lockWrap:"lockWrap___2djiu",li:"li___2W_zn",cover:"cover___2FS3L",img:"img___cyxrw",sign:"sign___1cxDK",name:"name___3tYlu",e:"e___1-orw",unit:"unit___ycOgg",tags:"tags___2FRpJ",tag:"tag___1e0XO"}},ZW9T:function(it,ve,W){"use strict";W.d(ve,"a",function(){return U});var ie=W("k1fw"),G=W("oBTY"),P=W("miYZ"),V=W("tsqr"),k=W("rAM+"),B=W("tJVT"),z=W("PpiC"),K=W("q1tI"),n=W.n(K),M=W("bdgK"),y=W("9og8"),m=W("WmNS"),g=W.n(m),u={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"]},c={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},o={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(`
|
|
`)}]},l=W("5VLF"),s=W.n(l),a={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"]}},O=function(Q,ee){return ee.map(function(oe){return{label:oe,kind:Q.languages.CompletionItemKind.Keyword,insertText:oe}})},w=function(Q){return Object.keys(a.tables).map(function(ee){return{label:ee,kind:Q.languages.CompletionItemKind.Variable,insertText:ee}})},S=function(Q,ee){var oe=a.tables[Q];return oe?oe.map(function(fe){return{label:fe,kind:ee.languages.CompletionItemKind.Field,insertText:fe}}):[]};function L(b,Q,ee,oe,fe){var Fe=Q.getWordUntilPosition(ee),Le={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:Fe.startColumn,endColumn:Fe.endColumn},Ie=oe.map(function(Be){return{label:Be,kind:b.languages.CompletionItemKind.Keyword,insertText:Be,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}});return fe.map(function(Be){Ie.push(Object(ie.a)(Object(ie.a)({},Be),{},{range:Le}))}),Ie}var D=function(b){a.languages.map(function(fe){return b.languages.registerDocumentFormattingEditProvider(fe,{provideDocumentFormattingEdits:function(Le,Ie,Be){return Object(y.a)(g.a.mark(function We(){var ge;return g.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ge=s()(Le.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}),ke.abrupt("return",[{range:Le.getFullModelRange(),text:ge}]);case 2:case"end":return ke.stop()}},We)}))()}}),fe});var Q=f.quickKey.map(function(fe){return{label:fe.label,kind:b.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=o.quickKey.map(function(fe){return{label:fe.label,kind:b.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=c.quickKey.map(function(fe){return{label:fe.label,kind:b.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet}});b.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Fe,Le){var Ie=Fe.getWordUntilPosition(Le),Be={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},We=Fe.getLineContent(Le.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(G.a)(f.keywords.map(function(ge){return{label:ge,kind:b.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(G.a)(f.quickKey.map(function(ge){return{label:ge.label,kind:b.languages.CompletionItemKind.Function,documentation:ge.content,insertText:We.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}}),b.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Fe,Le){var Ie=Fe.getWordUntilPosition(Le),Be={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn};return{suggestions:Object(G.a)(u.keywords.map(function(We){return{label:We,kind:b.languages.CompletionItemKind.Function,documentation:We,insertText:We,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}}))}}}),b.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Fe,Le){var Ie=Fe.getWordUntilPosition(Le),Be={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},We=Fe.getLineContent(Le.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(G.a)(c.keywords.map(function(ge){return{label:ge,kind:b.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(G.a)(c.quickKey.map(function(ge){return{label:ge.label,kind:b.languages.CompletionItemKind.Function,documentation:ge.content,insertText:We.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}}),b.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Fe,Le){var Ie=Fe.getWordUntilPosition(Le),Be={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},We=Fe.getLineContent(Le.lineNumber).substring(Ie.startColumn-2,Ie.endColumn);return{suggestions:[].concat(Object(G.a)(o.keywords.map(function(ge){return{label:ge,kind:b.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(G.a)(o.quickKey.map(function(ge){return{label:ge.label,kind:b.languages.CompletionItemKind.Function,documentation:ge.content,insertText:We.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:b.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}})},A="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",T=W("fjLI"),x=W("LvDl"),d=W("+ua5");function E(b){return/^\d+$/.test(b)?"".concat(b,"px"):b}function p(){}var v=!1,C={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function F(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=b;if(Array.isArray(b)){for(var ee=0;ee<b.length;ee++){var oe=C[b[ee]];if(oe)return oe}return Q[0]}return C[Q]||Q}var R=null,j=ve.b=function(b){var Q=b.width,ee=Q===void 0?"100%":Q,oe=b.height,fe=oe===void 0?"100%":oe,Fe=b.value,Le=b.language,Ie=Le===void 0?"javascript":Le,Be=b.style,We=Be===void 0?{}:Be,ge=b.options,ue=ge===void 0?{}:ge,ke=b.overrideServices,lt=ke===void 0?{}:ke,ot=b.theme,ut=ot===void 0?"vs-dark":ot,xt=b.onEditBlur,Je=b.onSave,et=b.autoHeight,dt=et===void 0?!1:et,de=b.forbidCopy,Ce=de===void 0?!1:de,Ue=b.onChange,Ke=Ue===void 0?p:Ue,st=b.editorDidMount,ht=st===void 0?p:st,yt=b.onFocus,mt=yt===void 0?p:yt,Ot=b.filename,Tt=Ot===void 0?"educoder.txt":Ot,Et=b.errorLine,Qe=b.errorContent,Kt=Qe===void 0?"":Qe,Ut=Object(z.a)(b,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),qe=Object(K.useRef)(),tt=Object(K.useRef)({}),Re=Object(K.useRef)(),Te=Object(K.useRef)(),Se=Object(K.useRef)(!1),te=Object(K.useRef)(),se=Object(K.useState)(!1),he=Object(B.a)(se,2),me=he[0],xe=he[1];function Me(){var St;return qe.current&&(St=new M.default(function(It){var Yt=Object(k.a)(It),mn;try{for(Yt.s();!(mn=Yt.n()).done;){var ln=mn.value;(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&tt.current.instance.layout()}}catch(Jt){Yt.e(Jt)}finally{Yt.f()}}),St.observe(qe.current)),St}function Pe(){V.b.warn(decodeURIComponent(A))}var rt=function(){var It=tt.current.instance;if(Fe!=null&&It&&me){var Yt=It.getModel();Yt&&Fe!==Yt.getValue()&&(v=!0,Yt.setValue(Fe),It.layout(),v=!1)}};Object(K.useEffect)(function(){Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){rt()},500)},[Fe,me,tt.current]),Object(K.useEffect)(function(){if(Et&&tt.current&&tt.current.instance){var St=tt.current.instance;St.changeViewZones(function(Yt){var mn=document.createElement("div");mn.style.padding="10px 20px",mn.style.width="calc(100% - 20px)",mn.className="my-error-line-wrp",mn.innerHTML=Kt,Yt.addZone({afterLineNumber:Et||11,heightInLines:3,domNode:mn})});var It={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}};St.addOverlayWidget(It),St.revealPositionInCenter({lineNumber:20,column:1})}},[Et,tt.current,me]);function ft(){var St=tt.current.instance;if(St){var It=St.getSelection(),Yt=tt.current.pastePos||{},mn=new R.Range(Yt.startLineNumber||It.endLineNumber,Yt.startColumn||It.endColumn,Yt.endLineNumber||It.endLineNumber,Yt.endColumn||It.endColumn);setTimeout(function(){St.executeEdits("",[{range:mn,text:""}])},300)}}function pt(St){(window.navigator.platform.match("Mac")?St.metaKey:St.ctrlKey)&&St.keyCode==83&&(St.preventDefault(),Je())}var Bt=function(){if(dt&&tt.current.instance){var It=tt.current.instance.getContentHeight();_t(It<fe?fe:It)}else _t(fe)};function wt(St){var It=document.createEvent("MouseEvents");It.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),St.dispatchEvent(It)}function Ye(St,It){var Yt=window.URL||window.webkitURL||window,mn=new Blob([It]),ln=document.createElementNS("http://www.w3.org/1999/xhtml","a");ln.href=Yt.createObjectURL(mn),ln.download=St,wt(ln)}Object(K.useEffect)(function(){Bt()},[Bt]),Object(K.useEffect)(function(){qe.current&&!me&&Promise.all([W.e(16),W.e(28)]).then(W.t.bind(null,"M/lh",7)).then(function(St){try{R=St,tt.current.instance=R.editor.create(qe.current,{value:Fe,language:F(Ie),theme:ut,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},lt);var It=tt.current.instance,Yt=T.d._menuItems,mn=Object(G.a)(Yt).find(function(un){return un[0]._debugName=="EditorContext"}),ln=mn[1],Jt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rt=function(vn,Qt){var An=vn._first;do{var zn,Nn,at=Qt.includes((zn=An.element)===null||zn===void 0||((Nn=zn.command)===null||Nn===void 0)?void 0:Nn.id);at&&vn._remove(An)}while(An=An.next)};if(ht(It,R),setTimeout(function(){Bt(),tt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ye(Tt||"educoder.txt",It.getValue())}}),It.getDomNode().addEventListener("input",function(){Re.current.autoFormat&&It.getAction("editor.action.formatDocument").run()})},500),tt.current.subscription=It.onDidChangeModelContent(function(un){Se.current?clearTimeout(te.current):(Bt(),Ke(It.getValue(),un)),te.current=setTimeout(function(){Se.current=!1},500)}),window.Monaco||D(R,F(Ie)),Ce&&(Rt(ln,Jt),qe.current.classList.add("noCopyPaste"),It.onKeyDown(function(un){var vn=un.keyCode,Qt=un.ctrlKey,An=un.metaKey;(vn===33||vn===52)&&(An||Qt)&&(Pe(),un.preventDefault())})),window.Monaco=R,xt&&It.onDidBlurEditorWidget(function(){xt(It.getValue())}),mt&&It.onDidFocusEditorText(function(){mt(It.getValue())}),Ce){It.addCommand(R.KeyMod.CtrlCmd|R.KeyCode.KEY_V,function(){return Pe(),null}),It.onDidPaste(function(un){tt.current.pastePos=un});try{window.addEventListener("paste",ft)}catch(un){}}var Gn=Me();return xe(!0),function(){var un=tt.current.instance;un.dispose();var vn=un.getModel();vn&&vn.dispose(),tt.current.subscription&&tt.current.subscription.dispose(),Ce&&window.removeEventListener("paste",ft),Gn.unobserve(qe.current)}}catch(un){}})},[]),Object(K.useEffect)(function(){var St=tt.current.instance;if(St&&me)return document.addEventListener("keydown",pt,!1),function(){document.removeEventListener("keydown",pt)}},[Je,me]),Object(K.useEffect)(function(){var St=tt.current.instance;if(St&&me){var It=F(Ie);R.editor.setModelLanguage(St.getModel(),It),console.log("language:",Ie,St.getModel(),It)}},[Ie,me]),Object(K.useEffect)(function(){var St=tt.current.instance;St&&me&&R.editor.setTheme(ut)},[ut,me]),Object(K.useEffect)(function(){var St=tt.current.instance;Re.current=ue,St&&me&&(St.updateOptions(Object(ie.a)({},ue)),setTimeout(function(){St.getModel().updateOptions(Object(ie.a)({},ue))},200))},[JSON.stringify(ue),me]),Object(K.useEffect)(function(){var St=tt.current.instance;St&&me&&St.layout()},[ee,fe,me]);var en=Object(K.useState)(E(ee)),Ge=Object(B.a)(en,2),hn=Ge[0],At=Ge[1],Ft=Object(K.useState)(E(fe)),Gt=Object(B.a)(Ft,2),on=Gt[0],_t=Gt[1],tn=Object(ie.a)(Object(ie.a)({},We),{},{width:hn,height:on});return n.a.createElement("div",{className:"my-monaco-editor",ref:qe,style:tn})};function U(b){var Q=b.width,ee=Q===void 0?"100%":Q,oe=b.height,fe=oe===void 0?"100%":oe,Fe=b.original,Le=b.modified,Ie=b.language,Be=b.options,We=Be===void 0?{}:Be,ge=Object(K.useRef)(),ue=Object(K.useState)(null),ke=Object(B.a)(ue,2),lt=ke[0],ot=ke[1];function ut(dt){var de;return ge.current&&(de=new M.default(function(Ce){var Ue=Object(k.a)(Ce),Ke;try{for(Ue.s();!(Ke=Ue.n()).done;){var st=Ke.value;(st.target.offsetHeight>0||st.target.offsetWidth>0)&&dt.layout()}}catch(ht){Ue.e(ht)}finally{Ue.f()}}),de.observe(ge.current)),de}Object(K.useEffect)(function(){ge.current&&Promise.all([W.e(16),W.e(28)]).then(W.t.bind(null,"M/lh",7)).then(function(dt){R=dt;var de=R.editor.createDiffEditor(ge.current,Object(ie.a)(Object(ie.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},We),{},{wordWrap:!0}));ot(de);var Ce=ut(de);return function(){de.dispose();var Ue=de.getModel();Ue&&Ue.dispose(),Ce.unobserve(ge.current)}})},[]),Object(K.useEffect)(function(){lt&<.setModel({original:R.editor.createModel(Fe,Ie),modified:R.editor.createModel(Le,Ie)})},[Fe,Le,Ie,lt]);var xt=E(ee),Je=E(fe),et={width:xt,height:Je};return n.a.createElement("div",{className:"my-diff-editor",ref:ge,style:et})}},ZpRC:function(it,ve,W){"use strict";function ie(y){return typeof y=="object"&&y!=null&&y.nodeType===1}function G(y,m){return(!m||y!=="hidden")&&y!=="visible"&&y!=="clip"}function P(y,m){if(y.clientHeight<y.scrollHeight||y.clientWidth<y.scrollWidth){var g=getComputedStyle(y,null);return G(g.overflowY,m)||G(g.overflowX,m)||function(u){var c=function(f){if(!f.ownerDocument||!f.ownerDocument.defaultView)return null;try{return f.ownerDocument.defaultView.frameElement}catch(o){return null}}(u);return!!c&&(c.clientHeight<u.scrollHeight||c.clientWidth<u.scrollWidth)}(y)}return!1}function V(y,m,g,u,c,f,o,l){return f<y&&o>m||f>y&&o<m?0:f<=y&&l<=g||o>=m&&l>=g?f-y-u:o>m&&l<g||f<y&&l>g?o-m+c:0}var k=function(y,m){var g=window,u=m.scrollMode,c=m.block,f=m.inline,o=m.boundary,l=m.skipOverflowHiddenElements,s=typeof o=="function"?o:function(dt){return dt!==o};if(!ie(y))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,O=[],w=y;ie(w)&&s(w);){if((w=w.parentElement)===a){O.push(w);break}w!=null&&w===document.body&&P(w)&&!P(document.documentElement)||w!=null&&P(w,l)&&O.push(w)}for(var S=g.visualViewport?g.visualViewport.width:innerWidth,L=g.visualViewport?g.visualViewport.height:innerHeight,D=window.scrollX||pageXOffset,A=window.scrollY||pageYOffset,T=y.getBoundingClientRect(),x=T.height,d=T.width,E=T.top,p=T.right,v=T.bottom,C=T.left,F=c==="start"||c==="nearest"?E:c==="end"?v:E+x/2,R=f==="center"?C+d/2:f==="end"?p:C,j=[],U=0;U<O.length;U++){var b=O[U],Q=b.getBoundingClientRect(),ee=Q.height,oe=Q.width,fe=Q.top,Fe=Q.right,Le=Q.bottom,Ie=Q.left;if(u==="if-needed"&&E>=0&&C>=0&&v<=L&&p<=S&&E>=fe&&v<=Le&&C>=Ie&&p<=Fe)return j;var Be=getComputedStyle(b),We=parseInt(Be.borderLeftWidth,10),ge=parseInt(Be.borderTopWidth,10),ue=parseInt(Be.borderRightWidth,10),ke=parseInt(Be.borderBottomWidth,10),lt=0,ot=0,ut="offsetWidth"in b?b.offsetWidth-b.clientWidth-We-ue:0,xt="offsetHeight"in b?b.offsetHeight-b.clientHeight-ge-ke:0;if(a===b)lt=c==="start"?F:c==="end"?F-L:c==="nearest"?V(A,A+L,L,ge,ke,A+F,A+F+x,x):F-L/2,ot=f==="start"?R:f==="center"?R-S/2:f==="end"?R-S:V(D,D+S,S,We,ue,D+R,D+R+d,d),lt=Math.max(0,lt+A),ot=Math.max(0,ot+D);else{lt=c==="start"?F-fe-ge:c==="end"?F-Le+ke+xt:c==="nearest"?V(fe,Le,ee,ge,ke+xt,F,F+x,x):F-(fe+ee/2)+xt/2,ot=f==="start"?R-Ie-We:f==="center"?R-(Ie+oe/2)+ut/2:f==="end"?R-Fe+ue+ut:V(Ie,Fe,oe,We,ue+ut,R,R+d,d);var Je=b.scrollLeft,et=b.scrollTop;F+=et-(lt=Math.max(0,Math.min(et+lt,b.scrollHeight-ee+xt))),R+=Je-(ot=Math.max(0,Math.min(Je+ot,b.scrollWidth-oe+ut)))}j.push({el:b,top:lt,left:ot})}return j};function B(y){return y===Object(y)&&Object.keys(y).length!==0}function z(y,m){m===void 0&&(m="auto");var g="scrollBehavior"in document.body.style;y.forEach(function(u){var c=u.el,f=u.top,o=u.left;c.scroll&&g?c.scroll({top:f,left:o,behavior:m}):(c.scrollTop=f,c.scrollLeft=o)})}function K(y){return y===!1?{block:"end",inline:"nearest"}:B(y)?y:{block:"start",inline:"nearest"}}function n(y,m){var g=!y.ownerDocument.documentElement.contains(y);if(B(m)&&typeof m.behavior=="function")return m.behavior(g?[]:k(y,m));if(g)return;var u=K(m);return z(k(y,u),u.behavior)}var M=ve.a=n},bT9E:function(it,ve,W){"use strict";W.d(ve,"a",function(){return G});var ie=W("VTBJ");function G(P,V){var k=Object(ie.a)({},P);return Array.isArray(V)&&V.forEach(function(B){delete k[B]}),k}},c5Ni:function(it,ve,W){},cFMs:function(it,ve){it.exports="data:image/png;base64,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"},cz0n:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___G8W6i",flex_space_between:"flex_space_between___1p_ZB",flex_box_vertical_center:"flex_box_vertical_center___2wivF",flex_box_center_end:"flex_box_center_end___y5a20",flex_box_column:"flex_box_column___6oXp3",tabs:"tabs___sKski",active:"active___10xGM"}},dejd:function(it,ve,W){},dmUQ:function(it,ve,W){"use strict";var ie=W("Ff2n"),G=W("rePB"),P=W("1OyB"),V=W("vuIU"),k=W("Ji7U"),B=W("md7G"),z=W("foSv"),K=W("q1tI"),n=W.n(K),M=W("TSYQ"),y=W.n(M),m=W("4IlW");function g(x,d){var E=Object.keys(x);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(x);d&&(p=p.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),E.push.apply(E,p)}return E}function u(x){for(var d=1;d<arguments.length;d++){var E=arguments[d]!=null?arguments[d]:{};d%2?g(Object(E),!0).forEach(function(p){Object(G.a)(x,p,E[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(E)):g(Object(E)).forEach(function(p){Object.defineProperty(x,p,Object.getOwnPropertyDescriptor(E,p))})}return x}function c(x){var d=f();return function(){var p=Object(z.a)(x),v;if(d){var C=Object(z.a)(this).constructor;v=Reflect.construct(p,arguments,C)}else v=p.apply(this,arguments);return Object(B.a)(this,v)}}function f(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(x){return!1}}function o(){}function l(x){x.preventDefault()}var s=function(d){return d.replace(/[^\w.-]+/g,"")},a=200,O=600,w=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,S=function(d){return d!=null},L=function(d,E){return E===d||typeof E=="number"&&typeof d=="number"&&isNaN(E)&&isNaN(d)},D=function(x){Object(k.a)(E,x);var d=c(E);function E(p){var v;Object(P.a)(this,E),v=d.call(this,p),v.onKeyDown=function(R){var j=v.props,U=j.onKeyDown,b=j.onPressEnter;if(R.keyCode===m.a.UP){var Q=v.getRatio(R);v.up(R,Q,null),v.stop()}else if(R.keyCode===m.a.DOWN){var ee=v.getRatio(R);v.down(R,ee,null),v.stop()}else R.keyCode===m.a.ENTER&&b&&b(R);if(v.recordCursorPosition(),v.lastKeyCode=R.keyCode,U){for(var oe=arguments.length,fe=new Array(oe>1?oe-1:0),Fe=1;Fe<oe;Fe++)fe[Fe-1]=arguments[Fe];U.apply(void 0,[R].concat(fe))}},v.onKeyUp=function(R){var j=v.props.onKeyUp;if(v.stop(),v.recordCursorPosition(),j){for(var U=arguments.length,b=new Array(U>1?U-1:0),Q=1;Q<U;Q++)b[Q-1]=arguments[Q];j.apply(void 0,[R].concat(b))}},v.onChange=function(R){var j=v.props.onChange;v.state.focused&&(v.inputting=!0),v.rawInput=v.props.parser(v.getValueFromEvent(R)),v.setState({inputValue:v.rawInput}),j(v.toNumber(v.rawInput))},v.onMouseUp=function(){var R=v.props.onMouseUp;v.recordCursorPosition(),R&&R.apply(void 0,arguments)},v.onFocus=function(){var R;v.setState({focused:!0}),(R=v.props).onFocus.apply(R,arguments)},v.onBlur=function(){var R=v.props.onBlur;v.inputting=!1,v.setState({focused:!1});var j=v.getCurrentValidValue(v.state.inputValue),U=v.setValue(j,o);if(R){var b=v.input.value,Q=v.getInputDisplayValue({focus:!1,value:U});v.input.value=Q&&Number(Q),R.apply(void 0,arguments),v.input.value=b}},v.getRatio=function(R){var j=1;return R.metaKey||R.ctrlKey?j=.1:R.shiftKey&&(j=10),j},v.getFullNum=function(R){return isNaN(R)?R:/e/i.test(String(R))?Number(R).toFixed(18).replace(/\.?0+$/,""):R},v.getPrecision=function(R){if(S(v.props.precision))return v.props.precision;var j=String(R);if(j.indexOf("e-")>=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var U=0;return j.indexOf(".")>=0&&(U=j.length-j.indexOf(".")-1),U},v.getInputDisplayValue=function(R){var j=R||v.state,U=j.focused,b=j.inputValue,Q=j.value,ee;U?ee=b:ee=v.toPrecisionAsStep(Q),ee==null&&(ee="");var oe=v.formatWrapper(ee);return S(v.props.decimalSeparator)&&(oe=oe.toString().replace(".",v.props.decimalSeparator)),oe},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(R){}},v.restoreByAfter=function(R){if(R===void 0)return!1;var j=v.input.value,U=j.lastIndexOf(R);if(U===-1)return!1;var b=v.cursorBefore.length;return v.lastKeyCode===m.a.DELETE&&v.cursorBefore.charAt(b-1)===R[0]?(v.fixCaret(b,b),!0):U+R.length===j.length?(v.fixCaret(U,U),!0):!1},v.partRestoreByAfter=function(R){return R===void 0?!1:Array.prototype.some.call(R,function(j,U){var b=R.substring(U);return v.restoreByAfter(b)})},v.isNotCompleteNumber=function(R){return isNaN(R)||R===""||R===null||R&&R.toString().indexOf(".")===R.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(R,j,U){v.pressingUpOrDown=!0,v.step("down",R,j,U)},v.up=function(R,j,U){v.pressingUpOrDown=!0,v.step("up",R,j,U)},v.saveInput=function(R){v.input=R};var C=p.value;C===void 0&&(C=p.defaultValue),v.state={focused:p.autoFocus};var F=v.getValidValue(v.toNumber(C));return v.state=u(u({},v.state),{},{inputValue:v.toPrecisionAsStep(F),value:F}),v}return Object(V.a)(E,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var C=this.props,F=C.value,R=C.onChange,j=C.max,U=C.min,b=this.state.focused;if(v){if(!L(v.value,F)||!L(v.max,j)||!L(v.min,U)){var Q=b?F:this.getValidValue(F),ee;this.pressingUpOrDown?ee=Q:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(Q),this.setState({value:Q,inputValue:ee})}var oe="value"in this.props?F:this.state.value;"max"in this.props&&v.max!==j&&typeof oe=="number"&&oe>j&&R&&R(j),"min"in this.props&&v.min!==U&&typeof oe=="number"&&oe<U&&R&&R(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var fe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===m.a.BACKSPACE?fe=this.cursorStart-1:this.lastKeyCode===m.a.DELETE&&(fe=this.cursorStart):fe=this.input.value.length,this.fixCaret(fe,fe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case m.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case m.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Fe){}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 C=v;return C===""?C="":this.isNotCompleteNumber(parseFloat(C))?C=this.state.value:C=this.getValidValue(C),this.toNumber(C)}},{key:"getValueFromEvent",value:function(v){var C=v.target.value.trim().replace(/。/g,".");return S(this.props.decimalSeparator)&&(C=C.replace(this.props.decimalSeparator,".")),C}},{key:"getValidValue",value:function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,R=parseFloat(v);return isNaN(R)?v:(R<C&&(R=C),R>F&&(R=F),R)}},{key:"setValue",value:function(v,C){var F=this.props.precision,R=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),j=this.state.value,U=j===void 0?null:j,b=this.state.inputValue,Q=b===void 0?null:b,ee=typeof R=="number"?R.toFixed(F):"".concat(R),oe=R!==U||ee!=="".concat(Q);return"value"in this.props?(Q=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Q},C)):this.setState({value:R,inputValue:this.toPrecisionAsStep(v)},C),oe&&this.props.onChange(R),R}},{key:"getMaxPrecision",value:function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,R=F.precision,j=F.step;if(S(R))return R;var U=this.getPrecision(C),b=this.getPrecision(j),Q=this.getPrecision(v);return v?Math.max(Q,U+b):U+b}},{key:"getPrecisionFactor",value:function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(v,C);return Math.pow(10,F)}},{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 C=Math.abs(this.getMaxPrecision(v));return isNaN(C)?v.toString():Number(v).toFixed(C)}},{key:"toNumber",value:function(v){var C=this.props.precision,F=this.state.focused,R=v&&v.length>16&&F;return this.isNotCompleteNumber(v)||R?v:S(C)?Math.round(v*Math.pow(10,C))/Math.pow(10,C):Number(v)}},{key:"upStep",value:function(v,C){var F=this.props.step,R=this.getPrecisionFactor(v,C),j=Math.abs(this.getMaxPrecision(v,C)),U=((R*v+R*F*C)/R).toFixed(j);return this.toNumber(U)}},{key:"downStep",value:function(v,C){var F=this.props.step,R=this.getPrecisionFactor(v,C),j=Math.abs(this.getMaxPrecision(v,C)),U=((R*v-R*F*C)/R).toFixed(j);return this.toNumber(U)}},{key:"step",value:function(v,C){var F=this,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),C&&(C.persist(),C.preventDefault());var U=this.props;if(U.disabled)return;var b=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(b))return;var Q=this["".concat(v,"Step")](b,R),ee=Q>U.max||Q<U.min;if(Q>U.max?Q=U.max:Q<U.min&&(Q=U.min),this.setValue(Q,null),this.setState({focused:!0},function(){F.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){F[v](C,R,!0)},j?a:O)}},{key:"fixCaret",value:function(v,C){if(v===void 0||C===void 0||!this.input||!this.input.value)return;try{var F=this.input.selectionStart,R=this.input.selectionEnd;(v!==F||C!==R)&&this.input.setSelectionRange(v,C)}catch(j){}}},{key:"render",value:function(){var v,C=this.props,F=C.prefixCls,R=C.disabled,j=C.readOnly,U=C.useTouch,b=C.autoComplete,Q=C.upHandler,ee=C.downHandler,oe=C.className,fe=C.max,Fe=C.min,Le=C.style,Ie=C.title,Be=C.onMouseEnter,We=C.onMouseLeave,ge=C.onMouseOver,ue=C.onMouseOut,ke=C.required,lt=C.onClick,ot=C.tabIndex,ut=C.type,xt=C.placeholder,Je=C.id,et=C.inputMode,dt=C.pattern,de=C.step,Ce=C.maxLength,Ue=C.autoFocus,Ke=C.name,st=C.onPaste,ht=C.onInput,yt=Object(ie.a)(C,["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"]),mt=this.state,Ot=mt.value,Tt=mt.focused,Et=y()(F,(v={},Object(G.a)(v,oe,!!oe),Object(G.a)(v,"".concat(F,"-disabled"),R),Object(G.a)(v,"".concat(F,"-focused"),Tt),v)),Qe={};Object.keys(yt).forEach(function(me){(me.substr(0,5)==="data-"||me.substr(0,5)==="aria-"||me==="role")&&(Qe[me]=yt[me])});var Kt=!j&&!R,Ut=this.getInputDisplayValue(null),qe=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)>=fe),tt=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)<=Fe),Re=qe||R||j,Te=tt||R||j,Se=y()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(G.a)({},"".concat(F,"-handler-up-disabled"),Re)),te=y()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(G.a)({},"".concat(F,"-handler-down-disabled"),Te)),se=U?{onTouchStart:Re?o:this.up,onTouchEnd:this.stop}:{onMouseDown:Re?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},he=U?{onTouchStart:Te?o:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:Et,style:Le,title:Ie,onMouseEnter:Be,onMouseLeave:We,onMouseOver:ge,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(F,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},se,{role:"button","aria-label":"Increase Value","aria-disabled":Re,className:Se}),Q||n.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:l})),n.a.createElement("span",Object.assign({unselectable:"on"},he,{role:"button","aria-label":"Decrease Value","aria-disabled":Te,className:te}),ee||n.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:l}))),n.a.createElement("div",{className:"".concat(F,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Fe,"aria-valuemax":fe,"aria-valuenow":Ot,required:ke,type:ut,placeholder:xt,onPaste:st,onClick:lt,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:ot,autoComplete:b,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Kt?this.onKeyDown:o,onKeyUp:Kt?this.onKeyUp:o,autoFocus:Ue,maxLength:Ce,readOnly:j,disabled:R,max:fe,min:Fe,step:de,name:Ke,title:Ie,id:Je,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ut),pattern:dt,inputMode:et,onInput:ht},Qe))))}}]),E}(n.a.Component);D.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:s,required:!1,autoComplete:"off"};var A=D,T=ve.a=A},"f0W+":function(it,ve,W){it.exports={flex_box_center:"flex_box_center___2AWuG",flex_space_between:"flex_space_between___4j1zo",flex_box_vertical_center:"flex_box_vertical_center___3dWcm",flex_box_center_end:"flex_box_center_end___qvHJi",flex_box_column:"flex_box_column___3Eier",tabs:"tabs___25WKT",tabsWrap:"tabsWrap___2lPJE",active:"active___gGp9s"}},f9pc:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___fO1Sq",flex_space_between:"flex_space_between___2MANs",flex_box_vertical_center:"flex_box_vertical_center___2x-su",flex_box_center_end:"flex_box_center_end___6bZNq",flex_box_column:"flex_box_column___CGTHC",quickPager:"quickPager___2XH6F",disabled:"disabled___2gPWV"}},fJjg:function(it,ve,W){"use strict";var ie=W("2qtc"),G=W("kLXV"),P=W("7Kak"),V=W("9yH6"),k=W("k1fw"),B=W("miYZ"),z=W("tsqr"),K=W("9og8"),n=W("tJVT"),M=W("PpiC"),y=W("5NDa"),m=W("5rEg"),g=W("WmNS"),u=W.n(g),c=W("q1tI"),f=W.n(c),o=W("9kvl"),l=W("Nska"),s=W.n(l),a=W("1vsH"),O=W("Nf5h"),w=W("Fhpe"),S=W.n(w),L=m.a.Search,D=function(T){var x=T.userDetail,d=T.globalSetting,E=T.loading,p=T.dispatch,v=Object(M.a)(T,["userDetail","globalSetting","loading","dispatch"]),C=Object(c.useState)(""),F=Object(n.a)(C,2),R=F[0],j=F[1],U=Object(c.useState)([]),b=Object(n.a)(U,2),Q=b[0],ee=b[1],oe=Object(c.useState)(),fe=Object(n.a)(oe,2),Fe=fe[0],Le=fe[1],Ie=Object(c.useState)(!1),Be=Object(n.a)(Ie,2),We=Be[0],ge=Be[1];Object(c.useEffect)(function(){ue()},[]);var ue=function(){var lt=Object(K.a)(u.a.mark(function ot(){var ut;return u.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,p({type:"userDetail/topicGetCourseList",payload:{search:R}});case 2:ut=Je.sent,ut&&ee((ut==null?void 0:ut.courses)||[]);case 4:case"end":return Je.stop()}},ot)}));return function(){return lt.apply(this,arguments)}}(),ke=function(){var lt=Object(K.a)(u.a.mark(function ot(){var ut,xt,Je,et,dt;return u.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(Fe){Ce.next=4;break}return z.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),ge(!0),Ce.abrupt("return");case 4:return Ce.next=6,p({type:"userDetail/topicSendToClass",payload:Object(k.a)({course_id:Fe},(ut=x.actionTabs)===null||ut===void 0?void 0:ut.params)});case 6:xt=Ce.sent,p({type:"userDetail/setActionTabs",payload:{}}),xt&&xt.status===0&&(dt={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll"},Object(a.S)("/classrooms/".concat(Fe,"/").concat(dt[(Je=x.actionTabs)===null||Je===void 0||((et=Je.params)===null||et===void 0)?void 0:et.object_type])));case 9:case"end":return Ce.stop()}},ot)}));return function(){return lt.apply(this,arguments)}}();return f.a.createElement(G.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:x.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:E["userDetail/sendToClass"],width:600,onOk:ke,wrapClassName:S.a.CustomCss,onCancel:function(){p({type:"userDetail/setActionTabs",payload:{}})}},f.a.createElement("div",{className:s.a.wrap},f.a.createElement("div",{className:"mb10"},f.a.createElement(O.e,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:R,style:{width:500},onChange:function(ot){j(ot),ue()}})),f.a.createElement("div",{className:s.a.radioWrap},f.a.createElement(V.a.Group,{value:Fe,onChange:function(ot){Le(ot.target.value),ge(!1)}},Q.map(function(lt,ot){return f.a.createElement(V.a,{className:s.a.radio,value:lt.course_id,key:lt.course_id},lt.course_name)}))),f.a.createElement("div",{className:s.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),We&&f.a.createElement("div",{className:s.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")))};ve.a=Object(o.a)(function(A){var T=A.userDetail,x=A.loading,d=A.globalSetting;return{userDetail:T,globalSetting:d,loading:x.effects}})(D)},fjLI:function(it,ve,W){"use strict";W.d(ve,"f",function(){return g}),W.d(ve,"b",function(){return u}),W.d(ve,"a",function(){return c}),W.d(ve,"d",function(){return f}),W.d(ve,"e",function(){return o}),W.d(ve,"c",function(){return l});var ie=W("8HAY"),G=W("Vhoy"),P=W("MI8n"),V=W("JYp7"),k=W("pmY6"),B=W("24hK"),z=W("nnTU"),K=W("T8No"),n=W("Cg/j"),M=W("t9D7"),y=function(s,a,O,w){var S=arguments.length,L=S<3?a:w===null?w=Object.getOwnPropertyDescriptor(a,O):w,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(s,a,O,w);else for(var A=s.length-1;A>=0;A--)(D=s[A])&&(L=(S<3?D(L):S>3?D(a,O,L):D(a,O))||L);return S>3&&L&&Object.defineProperty(a,O,L),L},m=function(s,a){return function(O,w){a(O,w,s)}};function g(s){return s.command!==void 0}class u{constructor(s){this.id=u._idPool++,this._debugName=s}}u._idPool=0,u.CommandPalette=new u("CommandPalette"),u.EditorContext=new u("EditorContext"),u.SimpleEditorContext=new u("SimpleEditorContext"),u.EditorContextCopy=new u("EditorContextCopy"),u.EditorContextPeek=new u("EditorContextPeek"),u.MenubarEditMenu=new u("MenubarEditMenu"),u.MenubarCopy=new u("MenubarCopy"),u.MenubarGoMenu=new u("MenubarGoMenu"),u.MenubarSelectionMenu=new u("MenubarSelectionMenu"),u.InlineCompletionsActions=new u("InlineCompletionsActions");const c=Object(n.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new P.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===u.CommandPalette}}addCommand(s){return this.addCommands(V.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(k.i)(()=>{let a=!1;for(const O of s)a=this._commands.delete(O.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,O)=>s.set(O,a)),s}appendMenuItem(s,a){return this.appendMenuItems(V.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,O=new B.a;for(const{id:w,item:S}of s){let L=this._menuItems.get(w);L||(L=new B.a,this._menuItems.set(w,L)),O.push(L.push(S)),a.add(w)}return this._onDidChangeMenu.fire(a),Object(k.i)(()=>{if(O.size>0){for(let w of O)w();this._onDidChangeMenu.fire(a),O.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===u.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const O of s)g(O)&&(a.add(O.command.id),O.alt&&a.add(O.alt.id));this._commands.forEach((O,w)=>{a.has(w)||s.push({command:O})})}};class o extends ie.e{constructor(s,a,O,w){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=O,this._options=w}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),O=a.getActions(this._options);a.dispose();for(const[,w]of O)w.length>0&&(s.push(...w),s.push(new ie.d));return s.length&&s.pop(),s}}let l=class s{constructor(a,O,w,S,L){var D,A;if(this._commandService=L,this.id=a.id,this.label=(w==null?void 0:w.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(A=typeof a.tooltip=="string"?a.tooltip:(D=a.tooltip)===null||D===void 0?void 0:D.value)!==null&&A!==void 0?A:"",this.enabled=!a.precondition||S.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const T=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=S.contextMatchesRules(T.condition),this.checked&&T.tooltip&&(this.tooltip=typeof T.tooltip=="string"?T.tooltip:T.tooltip.value),T.title&&(this.label=typeof T.title=="string"?T.title:T.title.value)}this.item=a,this.alt=O?new s(O,void 0,w,S,L):void 0,this._options=w,M.d.isThemeIcon(a.icon)&&(this.class=G.a.asClassName(a.icon))}dispose(){}run(...a){var O,w;let S=[];return((O=this._options)===null||O===void 0?void 0:O.arg)&&(S=[...S,this._options.arg]),((w=this._options)===null||w===void 0?void 0:w.shouldForwardArgs)&&(S=[...S,...a]),this._commandService.executeCommand(this.id,...S)}};l=y([m(3,K.b),m(4,z.b)],l)},"iL++":function(it,ve,W){it.exports={flex_box_center:"flex_box_center___2pHUo",flex_space_between:"flex_space_between___3Bfes",flex_box_vertical_center:"flex_box_vertical_center___1thiW",flex_box_center_end:"flex_box_center_end___3Zr7k",flex_box_column:"flex_box_column___3xe1a",list:"list___3rlGv",wrap:"wrap____oZzM",lockWrap:"lockWrap___24eY2",top:"top___3SCOc",sign:"sign____uZ_B",name:"name___2nHyM",img:"img___3Spn7",text:"text___1Pg2L",btns:"btns___Kr_Ti",bottom:"bottom___2_iOx"}},ic2d:function(it,ve,W){"use strict";W.d(ve,"a",function(){return V});var ie=W("FWmy"),G=W("746U");class P{constructor(){this.data=new Map}add(k,B){ie.a(G.l(k)),ie.a(G.k(B)),ie.a(!this.data.has(k),"There is already an extension with this id"),this.data.set(k,B)}as(k){return this.data.get(k)||null}}const V=new P},k3GJ:function(it,ve,W){"use strict";W.d(ve,"a",function(){return ys});var ie=W("rePB"),G=W("ODXe"),P=W("Ff2n"),V=W("VTBJ"),k=W("q1tI"),B=W("TSYQ"),z=W.n(B),K=W("Zm9Q"),n=W("6cGi"),M=W("KQm4"),y=W("xEkU"),m=W.n(y),g=W("t23M");function u(pe){var Ae=Object(k.useRef)(),De=Object(k.useRef)(!1);function ye(){for(var ne=arguments.length,ce=new Array(ne),ae=0;ae<ne;ae++)ce[ae]=arguments[ae];De.current||(m.a.cancel(Ae.current),Ae.current=m()(function(){pe.apply(void 0,ce)}))}return Object(k.useEffect)(function(){return function(){De.current=!0,m.a.cancel(Ae.current)}},[]),ye}function c(pe){var Ae=Object(k.useRef)([]),De=Object(k.useState)({}),ye=Object(G.a)(De,2),ne=ye[1],ce=Object(k.useRef)(typeof pe=="function"?pe():pe),ae=u(function(){var Ee=ce.current;Ae.current.forEach(function(Ne){Ee=Ne(Ee)}),Ae.current=[],ce.current=Ee,ne({})});function _e(Ee){Ae.current.push(Ee),ae()}return[ce.current,_e]}var f=W("4IlW");function o(pe,Ae){var De,ye=pe.prefixCls,ne=pe.id,ce=pe.active,ae=pe.rtl,_e=pe.tab,Ee=_e.key,Ne=_e.tab,Oe=_e.disabled,He=_e.closeIcon,$e=pe.tabBarGutter,vt=pe.tabPosition,gt=pe.closable,Dt=pe.renderWrapper,fn=pe.removeAriaLabel,Sn=pe.editable,_n=pe.onClick,xn=pe.onRemove,Cn=pe.onFocus,wn="".concat(ye,"-tab");k.useEffect(function(){return xn},[]);var Tn={};vt==="top"||vt==="bottom"?Tn[ae?"marginLeft":"marginRight"]=$e:Tn.marginBottom=$e;var Bn=Sn&>!==!1&&!Oe;function Dn(sn){if(Oe)return;_n(sn)}function vi(sn){sn.preventDefault(),sn.stopPropagation(),Sn.onEdit("remove",{key:Ee,event:sn})}var In=k.createElement("div",{key:Ee,ref:Ae,className:z()(wn,(De={},Object(ie.a)(De,"".concat(wn,"-with-remove"),Bn),Object(ie.a)(De,"".concat(wn,"-active"),ce),Object(ie.a)(De,"".concat(wn,"-disabled"),Oe),De)),style:Tn,onClick:Dn},k.createElement("div",{role:"tab","aria-selected":ce,id:ne&&"".concat(ne,"-tab-").concat(Ee),className:"".concat(wn,"-btn"),"aria-controls":ne&&"".concat(ne,"-panel-").concat(Ee),"aria-disabled":Oe,tabIndex:Oe?null:0,onClick:function(qt){qt.stopPropagation(),Dn(qt)},onKeyDown:function(qt){[f.a.SPACE,f.a.ENTER].includes(qt.which)&&(qt.preventDefault(),Dn(qt))},onFocus:Cn},Ne),Bn&&k.createElement("button",{type:"button","aria-label":fn||"remove",tabIndex:0,className:"".concat(wn,"-remove"),onClick:function(qt){qt.stopPropagation(),vi(qt)}},He||Sn.removeIcon||"\xD7"));return Dt&&(In=Dt(In)),In}var l=k.forwardRef(o),s={width:0,height:0,left:0,top:0};function a(pe,Ae,De){return Object(k.useMemo)(function(){for(var ye,ne=new Map,ce=Ae.get((ye=pe[0])===null||ye===void 0?void 0:ye.key)||s,ae=ce.left+ce.width,_e=0;_e<pe.length;_e+=1){var Ee=pe[_e].key,Ne=Ae.get(Ee);if(!Ne){var Oe;Ne=Ae.get((Oe=pe[_e-1])===null||Oe===void 0?void 0:Oe.key)||s}var He=ne.get(Ee)||Object(V.a)({},Ne);He.right=ae-He.left-He.width,ne.set(Ee,He)}return ne},[pe.map(function(ye){return ye.key}).join("_"),Ae,De])}var O={width:0,height:0,left:0,top:0,right:0};function w(pe,Ae,De,ye,ne){var ce=ne.tabs,ae=ne.tabPosition,_e=ne.rtl,Ee,Ne,Oe;["top","bottom"].includes(ae)?(Ee="width",Ne=_e?"right":"left",Oe=Math.abs(Ae.left)):(Ee="height",Ne="top",Oe=-Ae.top);var He=Ae[Ee],$e=De[Ee],vt=ye[Ee],gt=He;return $e+vt>He&&(gt=He-vt),Object(k.useMemo)(function(){if(!ce.length)return[0,0];for(var Dt=ce.length,fn=Dt,Sn=0;Sn<Dt;Sn+=1){var _n=pe.get(ce[Sn].key)||O;if(_n[Ne]+_n[Ee]>Oe+gt){fn=Sn-1;break}}for(var xn=0,Cn=Dt-1;Cn>=0;Cn-=1){var wn=pe.get(ce[Cn].key)||O;if(wn[Ne]<Oe){xn=Cn+1;break}}return[xn,fn]},[pe,Oe,gt,ae,ce.map(function(Dt){return Dt.key}).join("_"),_e])}var S=W("wx14"),L=W("1OyB"),D=W("vuIU"),A=W("JX7q"),T=W("Ji7U"),x=W("LK+K"),d=W("I8Z2"),E=W("bT9E"),p=W("2GS6"),v=W("Gytx"),C=W.n(v),F=W("U8pU"),R=/iPhone/i,j=/iPod/i,U=/iPad/i,b=/\bAndroid(?:.+)Mobile\b/i,Q=/Android/i,ee=/\bAndroid(?:.+)SD4930UR\b/i,oe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,fe=/Windows Phone/i,Fe=/\bWindows(?:.+)ARM\b/i,Le=/BlackBerry/i,Ie=/BB10/i,Be=/Opera Mini/i,We=/\b(CriOS|Chrome)(?:.+)Mobile/i,ge=/Mobile(?:.+)Firefox\b/i;function ue(pe,Ae){return pe.test(Ae)}function ke(pe){var Ae=pe||(typeof navigator!="undefined"?navigator.userAgent:""),De=(Ae||"").split("[FBAN");if(typeof De[1]!="undefined"){var ye=De,ne=Object(G.a)(ye,1);Ae=ne[0]}if(De=Ae.split("Twitter"),typeof De[1]!="undefined"){var ce=De,ae=Object(G.a)(ce,1);Ae=ae[0]}var _e={apple:{phone:ue(R,Ae)&&!ue(fe,Ae),ipod:ue(j,Ae),tablet:!ue(R,Ae)&&ue(U,Ae)&&!ue(fe,Ae),device:(ue(R,Ae)||ue(j,Ae)||ue(U,Ae))&&!ue(fe,Ae)},amazon:{phone:ue(ee,Ae),tablet:!ue(ee,Ae)&&ue(oe,Ae),device:ue(ee,Ae)||ue(oe,Ae)},android:{phone:!ue(fe,Ae)&&ue(ee,Ae)||!ue(fe,Ae)&&ue(b,Ae),tablet:!ue(fe,Ae)&&!ue(ee,Ae)&&!ue(b,Ae)&&(ue(oe,Ae)||ue(Q,Ae)),device:!ue(fe,Ae)&&(ue(ee,Ae)||ue(oe,Ae)||ue(b,Ae)||ue(Q,Ae))||ue(/\bokhttp\b/i,Ae)},windows:{phone:ue(fe,Ae),tablet:ue(Fe,Ae),device:ue(fe,Ae)||ue(Fe,Ae)},other:{blackberry:ue(Le,Ae),blackberry10:ue(Ie,Ae),opera:ue(Be,Ae),firefox:ue(ge,Ae),chrome:ue(We,Ae),device:ue(Le,Ae)||ue(Ie,Ae)||ue(Be,Ae)||ue(ge,Ae)||ue(We,Ae)},any:null,phone:null,tablet:null};return _e.any=_e.apple.device||_e.android.device||_e.windows.device||_e.other.device,_e.phone=_e.apple.phone||_e.android.phone||_e.windows.phone,_e.tablet=_e.apple.tablet||_e.android.tablet||_e.windows.tablet,_e}var lt=Object(V.a)(Object(V.a)({},ke()),{},{isMobile:ke}),ot=lt;function ut(){}function xt(pe,Ae,De){var ye=Ae||"";return pe.key||"".concat(ye,"item_").concat(De)}function Je(pe){return"".concat(pe,"-menu-")}function et(pe,Ae){var De=-1;k.Children.forEach(pe,function(ye){De+=1,ye&&ye.type&&ye.type.isMenuItemGroup?k.Children.forEach(ye.props.children,function(ne){De+=1,Ae(ne,De)}):Ae(ye,De)})}function dt(pe,Ae,De){if(!pe||De.find)return;k.Children.forEach(pe,function(ye){if(ye){var ne=ye.type;if(!ne||!(ne.isSubMenu||ne.isMenuItem||ne.isMenuItemGroup))return;Ae.indexOf(ye.key)!==-1?De.find=!0:ye.props.children&&dt(ye.props.children,Ae,De)}})}var de=["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"],Ce=function(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=Ae&&typeof Ae.getBoundingClientRect=="function"&&Ae.getBoundingClientRect().width;if(ye){if(De){var ne=getComputedStyle(Ae),ce=ne.marginLeft,ae=ne.marginRight;ye+=+ce.replace("px","")+ +ae.replace("px","")}ye=+ye.toFixed(6)}return ye||0},Ue=function(Ae,De,ye){Ae&&Object(F.a)(Ae.style)==="object"&&(Ae.style[De]=ye)},Ke=function(){return ot.any},st=W("bdgK"),ht=W("i8i4"),yt=W.n(ht),mt=W("wgJM"),Ot=W("l4aY"),Tt=W("m+aA"),Et=W("c+Xe"),Qe=W("zT1h"),Kt=W("QC+M");function Ut(pe,Ae,De){return De?pe[0]===Ae[0]:pe[0]===Ae[0]&&pe[1]===Ae[1]}function qe(pe,Ae,De){var ye=pe[Ae]||{};return Object(V.a)(Object(V.a)({},ye),De)}function tt(pe,Ae,De,ye){for(var ne=De.points,ce=Object.keys(pe),ae=0;ae<ce.length;ae+=1){var _e=ce[ae];if(Ut(pe[_e].points,ne,ye))return"".concat(Ae,"-placement-").concat(_e)}return""}var Re=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var pe=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(pe)||/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(pe==null?void 0:pe.substr(0,4)))},Te=W("MNnm");function Se(pe,Ae){var De={};return De[pe.toLowerCase()]=Ae.toLowerCase(),De["Webkit".concat(pe)]="webkit".concat(Ae),De["Moz".concat(pe)]="moz".concat(Ae),De["ms".concat(pe)]="MS".concat(Ae),De["O".concat(pe)]="o".concat(Ae.toLowerCase()),De}function te(pe,Ae){var De={animationend:Se("Animation","AnimationEnd"),transitionend:Se("Transition","TransitionEnd")};return pe&&("AnimationEvent"in Ae||delete De.animationend.animation,"TransitionEvent"in Ae||delete De.transitionend.transition),De}var se=te(Object(Te.a)(),typeof window!="undefined"?window:{}),he={};if(Object(Te.a)()){var me=document.createElement("div");he=me.style}var xe={};function Me(pe){if(xe[pe])return xe[pe];var Ae=se[pe];if(Ae)for(var De=Object.keys(Ae),ye=De.length,ne=0;ne<ye;ne+=1){var ce=De[ne];if(Object.prototype.hasOwnProperty.call(Ae,ce)&&ce in he)return xe[pe]=Ae[ce],xe[pe]}return""}var Pe=Me("animationend"),rt=Me("transitionend"),ft=!!(Pe&&rt),pt=Pe||"animationend",Bt=rt||"transitionend";function wt(pe,Ae){if(!pe)return null;if(Object(F.a)(pe)==="object"){var De=Ae.replace(/-\w/g,function(ye){return ye[1].toUpperCase()});return pe[De]}return"".concat(pe,"-").concat(Ae)}var Ye="none",en="appear",Ge="enter",hn="leave",At="none",Ft="prepare",Gt="start",on="active",_t="end";function tn(pe){var Ae=Object(k.useRef)(!1),De=Object(k.useState)(pe),ye=Object(G.a)(De,2),ne=ye[0],ce=ye[1];function ae(_e){Ae.current||ce(_e)}return Object(k.useEffect)(function(){return function(){Ae.current=!0}},[]),[ne,ae]}var St=Object(Te.a)()?k.useLayoutEffect:k.useEffect,It=St,Yt=function(){var pe=k.useRef(null);function Ae(){mt.a.cancel(pe.current)}function De(ye){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ae();var ce=Object(mt.a)(function(){ne<=1?ye({isCanceled:function(){return ce!==pe.current}}):De(ye,ne-1)});pe.current=ce}return k.useEffect(function(){return function(){Ae()}},[]),[De,Ae]},mn=[Ft,Gt,on,_t],ln=!1,Jt=!0;function Rt(pe){return pe===on||pe===_t}var Gn=function(pe,Ae){var De=k.useState(At),ye=Object(G.a)(De,2),ne=ye[0],ce=ye[1],ae=Yt(),_e=Object(G.a)(ae,2),Ee=_e[0],Ne=_e[1];function Oe(){ce(Ft)}return It(function(){if(ne!==At&&ne!==_t){var He=mn.indexOf(ne),$e=mn[He+1],vt=Ae(ne);vt===ln?ce($e):Ee(function(gt){function Dt(){if(gt.isCanceled())return;ce($e)}vt===!0?Dt():Promise.resolve(vt).then(Dt)})}},[pe,ne]),k.useEffect(function(){return function(){Ne()}},[]),[Oe,ne]},un=function(pe){var Ae=Object(k.useRef)(),De=Object(k.useRef)(pe);De.current=pe;var ye=k.useCallback(function(ae){De.current(ae)},[]);function ne(ae){ae&&(ae.removeEventListener(Bt,ye),ae.removeEventListener(pt,ye))}function ce(ae){Ae.current&&Ae.current!==ae&&ne(Ae.current),ae&&ae!==Ae.current&&(ae.addEventListener(Bt,ye),ae.addEventListener(pt,ye),Ae.current=ae)}return k.useEffect(function(){return function(){ne(Ae.current)}},[]),[ce,ne]};function vn(pe,Ae,De,ye){var ne=ye.motionEnter,ce=ne===void 0?!0:ne,ae=ye.motionAppear,_e=ae===void 0?!0:ae,Ee=ye.motionLeave,Ne=Ee===void 0?!0:Ee,Oe=ye.motionDeadline,He=ye.motionLeaveImmediately,$e=ye.onAppearPrepare,vt=ye.onEnterPrepare,gt=ye.onLeavePrepare,Dt=ye.onAppearStart,fn=ye.onEnterStart,Sn=ye.onLeaveStart,_n=ye.onAppearActive,xn=ye.onEnterActive,Cn=ye.onLeaveActive,wn=ye.onAppearEnd,Tn=ye.onEnterEnd,Bn=ye.onLeaveEnd,Dn=ye.onVisibleChanged,vi=tn(),In=Object(G.a)(vi,2),sn=In[0],qt=In[1],kn=tn(Ye),jn=Object(G.a)(kn,2),Vt=jn[0],Kn=jn[1],yi=tn(null),Yn=Object(G.a)(yi,2),si=Yn[0],ii=Yn[1],Ri=Object(k.useRef)(!1),Fi=Object(k.useRef)(null),_i=Object(k.useRef)(!1),$i=Object(k.useRef)(null);function _r(){var ui=De();return ui||$i.current}var ar=Object(k.useRef)(!1);function Bi(ui){var ni=_r();if(ui&&!ui.deadline&&ui.target!==ni)return;var ji;Vt===en&&ar.current?ji=wn==null?void 0:wn(ni,ui):Vt===Ge&&ar.current?ji=Tn==null?void 0:Tn(ni,ui):Vt===hn&&ar.current&&(ji=Bn==null?void 0:Bn(ni,ui)),ji!==!1&&!_i.current&&(Kn(Ye),ii(null))}var di=un(Bi),oi=Object(G.a)(di,1),Ei=oi[0],bi=k.useMemo(function(){var ui,ni,ji;switch(Vt){case"appear":return ui={},Object(ie.a)(ui,Ft,$e),Object(ie.a)(ui,Gt,Dt),Object(ie.a)(ui,on,_n),ui;case"enter":return ni={},Object(ie.a)(ni,Ft,vt),Object(ie.a)(ni,Gt,fn),Object(ie.a)(ni,on,xn),ni;case"leave":return ji={},Object(ie.a)(ji,Ft,gt),Object(ie.a)(ji,Gt,Sn),Object(ie.a)(ji,on,Cn),ji;default:return{}}},[Vt]),Er=Gn(Vt,function(ui){if(ui===Ft){var ni=bi[Ft];return ni?ni(_r()):ln}if(ri in bi){var ji;ii(((ji=bi[ri])===null||ji===void 0?void 0:ji.call(bi,_r(),null))||null)}return ri===on&&(Ei(_r()),Oe>0&&(clearTimeout(Fi.current),Fi.current=setTimeout(function(){Bi({deadline:!0})},Oe))),Jt}),kr=Object(G.a)(Er,2),Pr=kr[0],ri=kr[1],Cr=Rt(ri);ar.current=Cr,It(function(){qt(Ae);var ui=Ri.current;if(Ri.current=!0,!pe)return;var ni;!ui&&Ae&&_e&&(ni=en),ui&&Ae&&ce&&(ni=Ge),(ui&&!Ae&&Ne||!ui&&He&&!Ae&&Ne)&&(ni=hn),ni&&(Kn(ni),Pr())},[Ae]),Object(k.useEffect)(function(){(Vt===en&&!_e||Vt===Ge&&!ce||Vt===hn&&!Ne)&&Kn(Ye)},[_e,ce,Ne]),Object(k.useEffect)(function(){return function(){clearTimeout(Fi.current),_i.current=!0}},[]),Object(k.useEffect)(function(){sn!==void 0&&Vt===Ye&&(Dn==null||Dn(sn))},[sn,Vt]);var Nr=si;return bi[Ft]&&ri===Gt&&(Nr=Object(V.a)({transition:"none"},Nr)),[Vt,ri,Nr,sn!=null?sn:Ae]}var Qt=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(){return Object(L.a)(this,De),Ae.apply(this,arguments)}return Object(D.a)(De,[{key:"render",value:function(){return this.props.children}}]),De}(k.Component),An=Qt;function zn(pe){var Ae=pe;Object(F.a)(pe)==="object"&&(Ae=pe.transitionSupport);function De(ne){return!!(ne.motionName&&Ae)}var ye=k.forwardRef(function(ne,ce){var ae=ne.visible,_e=ae===void 0?!0:ae,Ee=ne.removeOnLeave,Ne=Ee===void 0?!0:Ee,Oe=ne.forceRender,He=ne.children,$e=ne.motionName,vt=ne.leavedClassName,gt=ne.eventProps,Dt=De(ne),fn=Object(k.useRef)(),Sn=Object(k.useRef)();function _n(){try{return Object(Tt.a)(fn.current||Sn.current)}catch(Kn){return null}}var xn=vn(Dt,_e,_n,ne),Cn=Object(G.a)(xn,4),wn=Cn[0],Tn=Cn[1],Bn=Cn[2],Dn=Cn[3],vi=k.useRef(Dn);Dn&&(vi.current=!0);var In=Object(k.useRef)(ce);In.current=ce;var sn=k.useCallback(function(Kn){fn.current=Kn,Object(Et.b)(In.current,Kn)},[]),qt,kn=Object(V.a)(Object(V.a)({},gt),{},{visible:_e});if(!He)qt=null;else if(wn===Ye||!De(ne))Dn?qt=He(Object(V.a)({},kn),sn):!Ne&&vi.current?qt=He(Object(V.a)(Object(V.a)({},kn),{},{className:vt}),sn):Oe?qt=He(Object(V.a)(Object(V.a)({},kn),{},{style:{display:"none"}}),sn):qt=null;else{var jn,Vt;Tn===Ft?Vt="prepare":Rt(Tn)?Vt="active":Tn===Gt&&(Vt="start"),qt=He(Object(V.a)(Object(V.a)({},kn),{},{className:z()(wt($e,wn),(jn={},Object(ie.a)(jn,wt($e,"".concat(wn,"-").concat(Vt)),Vt),Object(ie.a)(jn,$e,typeof $e=="string"),jn)),style:Bn}),sn)}return k.createElement(An,{ref:Sn},qt)});return ye.displayName="CSSMotion",ye}var Nn=zn(ft),at="add",Wt="keep",Vn="remove",bn="removed";function cn(pe){var Ae;return pe&&Object(F.a)(pe)==="object"&&"key"in pe?Ae=pe:Ae={key:pe},Object(V.a)(Object(V.a)({},Ae),{},{key:String(Ae.key)})}function Mn(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return pe.map(cn)}function Y(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],De=[],ye=0,ne=Ae.length,ce=Mn(pe),ae=Mn(Ae);ce.forEach(function(Ne){for(var Oe=!1,He=ye;He<ne;He+=1){var $e=ae[He];if($e.key===Ne.key){ye<He&&(De=De.concat(ae.slice(ye,He).map(function(vt){return Object(V.a)(Object(V.a)({},vt),{},{status:at})})),ye=He),De.push(Object(V.a)(Object(V.a)({},$e),{},{status:Wt})),ye+=1,Oe=!0;break}}Oe||De.push(Object(V.a)(Object(V.a)({},Ne),{},{status:Vn}))}),ye<ne&&(De=De.concat(ae.slice(ye).map(function(Ne){return Object(V.a)(Object(V.a)({},Ne),{},{status:at})})));var _e={};De.forEach(function(Ne){var Oe=Ne.key;_e[Oe]=(_e[Oe]||0)+1});var Ee=Object.keys(_e).filter(function(Ne){return _e[Ne]>1});return Ee.forEach(function(Ne){De=De.filter(function(Oe){var He=Oe.key,$e=Oe.status;return He!==Ne||$e!==Vn}),De.forEach(function(Oe){Oe.key===Ne&&(Oe.status=Wt)})}),De}var _=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function I(pe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nn,De=function(ye){Object(T.a)(ce,ye);var ne=Object(x.a)(ce);function ce(){var ae;return Object(L.a)(this,ce),ae=ne.apply(this,arguments),ae.state={keyEntities:[]},ae.removeKey=function(_e){ae.setState(function(Ee){var Ne=Ee.keyEntities;return{keyEntities:Ne.map(function(Oe){return Oe.key!==_e?Oe:Object(V.a)(Object(V.a)({},Oe),{},{status:bn})})}})},ae}return Object(D.a)(ce,[{key:"render",value:function(){var _e=this,Ee=this.state.keyEntities,Ne=this.props,Oe=Ne.component,He=Ne.children,$e=Ne.onVisibleChanged,vt=Object(P.a)(Ne,["component","children","onVisibleChanged"]),gt=Oe||k.Fragment,Dt={};return _.forEach(function(fn){Dt[fn]=vt[fn],delete vt[fn]}),delete vt.keys,k.createElement(gt,vt,Ee.map(function(fn){var Sn=fn.status,_n=Object(P.a)(fn,["status"]),xn=Sn===at||Sn===Wt;return k.createElement(Ae,Object(S.a)({},Dt,{key:_n.key,visible:xn,eventProps:_n,onVisibleChanged:function(wn){$e==null||$e(wn,{key:_n.key}),wn||_e.removeKey(_n.key)}}),He)}))}}],[{key:"getDerivedStateFromProps",value:function(_e,Ee){var Ne=_e.keys,Oe=Ee.keyEntities,He=Mn(Ne),$e=Y(Oe,He);return{keyEntities:$e.filter(function(vt){var gt=Oe.find(function(Dt){var fn=Dt.key;return vt.key===fn});return!(gt&>.status===bn&&vt.status===Vn)})}}}]),ce}(k.Component);return De.defaultProps={component:"div"},De}var H=I(ft),q=Nn;function X(pe){var Ae=pe.prefixCls,De=pe.motion,ye=pe.animation,ne=pe.transitionName;return De||(ye?{motionName:"".concat(Ae,"-").concat(ye)}:ne?{motionName:ne}:null)}function le(pe){var Ae=pe.prefixCls,De=pe.visible,ye=pe.zIndex,ne=pe.mask,ce=pe.maskMotion,ae=pe.maskAnimation,_e=pe.maskTransitionName;if(!ne)return null;var Ee={};return(ce||_e||ae)&&(Ee=Object(V.a)({motionAppear:!0},X({motion:ce,prefixCls:Ae,transitionName:_e,animation:ae}))),k.createElement(q,Object(S.a)({},Ee,{visible:De,removeOnLeave:!0}),function(Ne){var Oe=Ne.className;return k.createElement("div",{style:{zIndex:ye},className:z()("".concat(Ae,"-mask"),Oe)})})}var Ve=W("9mu1"),Ze=W("o0o1"),Lt=W.n(Ze),Xe=W("HaE+"),bt=["measure","align",null,"motion"],Zt=function(pe,Ae){var De=Object(k.useState)(null),ye=Object(G.a)(De,2),ne=ye[0],ce=ye[1],ae=Object(k.useRef)(),_e=Object(k.useRef)(!1);function Ee(He){_e.current||ce(He)}function Ne(){mt.a.cancel(ae.current)}function Oe(He){Ne(),ae.current=Object(mt.a)(function(){Ee(function($e){switch(ne){case"align":return"motion";case"motion":return"stable";default:}return $e}),He==null||He()})}return Object(k.useEffect)(function(){Ee("measure")},[pe]),Object(k.useEffect)(function(){switch(ne){case"measure":Ae();break;default:}ne&&(ae.current=Object(mt.a)(Object(Xe.a)(Lt.a.mark(function He(){var $e,vt;return Lt.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:$e=bt.indexOf(ne),vt=bt[$e+1],vt&&$e!==-1&&Ee(vt);case 3:case"end":return Dt.stop()}},He)}))))},[ne]),Object(k.useEffect)(function(){return function(){_e.current=!0,Ne()}},[]),[ne,Oe]},Wn=function(pe){var Ae=k.useState({width:0,height:0}),De=Object(G.a)(Ae,2),ye=De[0],ne=De[1];function ce(_e){ne({width:_e.offsetWidth,height:_e.offsetHeight})}var ae=k.useMemo(function(){var _e={};if(pe){var Ee=ye.width,Ne=ye.height;pe.indexOf("height")!==-1&&Ne?_e.height=Ne:pe.indexOf("minHeight")!==-1&&Ne&&(_e.minHeight=Ne),pe.indexOf("width")!==-1&&Ee?_e.width=Ee:pe.indexOf("minWidth")!==-1&&Ee&&(_e.minWidth=Ee)}return _e},[pe,ye]);return[ae,ce]},qn=k.forwardRef(function(pe,Ae){var De=pe.visible,ye=pe.prefixCls,ne=pe.className,ce=pe.style,ae=pe.children,_e=pe.zIndex,Ee=pe.stretch,Ne=pe.destroyPopupOnHide,Oe=pe.forceRender,He=pe.align,$e=pe.point,vt=pe.getRootDomNode,gt=pe.getClassNameFromAlign,Dt=pe.onAlign,fn=pe.onMouseEnter,Sn=pe.onMouseLeave,_n=pe.onMouseDown,xn=pe.onTouchStart,Cn=Object(k.useRef)(),wn=Object(k.useRef)(),Tn=Object(k.useState)(),Bn=Object(G.a)(Tn,2),Dn=Bn[0],vi=Bn[1],In=Wn(Ee),sn=Object(G.a)(In,2),qt=sn[0],kn=sn[1];function jn(){Ee&&kn(vt())}var Vt=Zt(De,jn),Kn=Object(G.a)(Vt,2),yi=Kn[0],Yn=Kn[1],si=Object(k.useRef)();function ii(){return $e||vt}function Ri(){var di;(di=Cn.current)===null||di===void 0||di.forceAlign()}function Fi(di,oi){var Ei=gt(oi);Dn!==Ei&&vi(Ei),yi==="align"&&(Dn!==Ei?Promise.resolve().then(function(){Ri()}):Yn(function(){var bi;(bi=si.current)===null||bi===void 0||bi.call(si)}),Dt==null||Dt(di,oi))}var _i=Object(V.a)({},X(pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(di){var oi=_i[di];_i[di]=function(Ei,bi){return Yn(),oi==null?void 0:oi(Ei,bi)}});function $i(){return new Promise(function(di){si.current=di})}k.useEffect(function(){!_i.motionName&&yi==="motion"&&Yn()},[_i.motionName,yi]),k.useImperativeHandle(Ae,function(){return{forceAlign:Ri,getElement:function(){return wn.current}}});var _r=Object(V.a)(Object(V.a)({},qt),{},{zIndex:_e,opacity:yi==="motion"||yi==="stable"||!De?void 0:0,pointerEvents:yi==="stable"?void 0:"none"},ce),ar=!0;(He==null?void 0:He.points)&&(yi==="align"||yi==="stable")&&(ar=!1);var Bi=ae;return k.Children.count(ae)>1&&(Bi=k.createElement("div",{className:"".concat(ye,"-content")},ae)),k.createElement(q,Object(S.a)({visible:De,ref:wn,leavedClassName:"".concat(ye,"-hidden")},_i,{onAppearPrepare:$i,onEnterPrepare:$i,removeOnLeave:Ne,forceRender:Oe}),function(di,oi){var Ei=di.className,bi=di.style,Er=z()(ye,ne,Dn,Ei);return k.createElement(Ve.a,{target:ii(),key:"popup",ref:Cn,monitorWindowResize:!0,disabled:ar,align:He,onAlign:Fi},k.createElement("div",{ref:oi,className:Er,onMouseEnter:fn,onMouseLeave:Sn,onMouseDownCapture:_n,onTouchStartCapture:xn,style:Object(V.a)(Object(V.a)({},bi),_r)},Bi))})});qn.displayName="PopupInner";var gn=qn,Pt=k.forwardRef(function(pe,Ae){var De=pe.prefixCls,ye=pe.visible,ne=pe.zIndex,ce=pe.children,ae=pe.mobile;ae=ae===void 0?{}:ae;var _e=ae.popupClassName,Ee=ae.popupStyle,Ne=ae.popupMotion,Oe=Ne===void 0?{}:Ne,He=ae.popupRender,$e=k.useRef();k.useImperativeHandle(Ae,function(){return{forceAlign:function(){},getElement:function(){return $e.current}}});var vt=Object(V.a)({zIndex:ne},Ee),gt=ce;return k.Children.count(ce)>1&&(gt=k.createElement("div",{className:"".concat(De,"-content")},ce)),He&&(gt=He(gt)),k.createElement(q,Object(S.a)({visible:ye,ref:$e,removeOnLeave:!0},Oe),function(Dt,fn){var Sn=Dt.className,_n=Dt.style,xn=z()(De,_e,Sn);return k.createElement("div",{ref:fn,className:xn,style:Object(V.a)(Object(V.a)({},_n),vt)},gt)})});Pt.displayName="MobilePopupInner";var jt=Pt,nn=["visible","mobile"],rn=k.forwardRef(function(pe,Ae){var De=pe.visible,ye=pe.mobile,ne=Object(P.a)(pe,nn),ce=Object(k.useState)(De),ae=Object(G.a)(ce,2),_e=ae[0],Ee=ae[1],Ne=Object(k.useState)(!1),Oe=Object(G.a)(Ne,2),He=Oe[0],$e=Oe[1],vt=Object(V.a)(Object(V.a)({},ne),{},{visible:_e});Object(k.useEffect)(function(){Ee(De),De&&ye&&$e(Re())},[De,ye]);var gt=He?k.createElement(jt,Object(S.a)({},vt,{mobile:ye,ref:Ae})):k.createElement(gn,Object(S.a)({},vt,{ref:Ae}));return k.createElement("div",null,k.createElement(le,vt),gt)});rn.displayName="Popup";var En=rn,$n=k.createContext(null),dn=$n;function ci(){}function cr(){return""}function gr(pe){return pe?pe.ownerDocument:window.document}var br=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Hr(pe){var Ae=function(De){Object(T.a)(ne,De);var ye=Object(x.a)(ne);function ne(ce){var ae;Object(L.a)(this,ne),ae=ye.call(this,ce),ae.popupRef=k.createRef(),ae.triggerRef=k.createRef(),ae.attachId=void 0,ae.clickOutsideHandler=void 0,ae.touchOutsideHandler=void 0,ae.contextMenuOutsideHandler1=void 0,ae.contextMenuOutsideHandler2=void 0,ae.mouseDownTimeout=void 0,ae.focusTime=void 0,ae.preClickTime=void 0,ae.preTouchTime=void 0,ae.delayTimer=void 0,ae.hasPopupMouseDown=void 0,ae.onMouseEnter=function(Ee){var Ne=ae.props.mouseEnterDelay;ae.fireEvents("onMouseEnter",Ee),ae.delaySetPopupVisible(!0,Ne,Ne?null:Ee)},ae.onMouseMove=function(Ee){ae.fireEvents("onMouseMove",Ee),ae.setPoint(Ee)},ae.onMouseLeave=function(Ee){ae.fireEvents("onMouseLeave",Ee),ae.delaySetPopupVisible(!1,ae.props.mouseLeaveDelay)},ae.onPopupMouseEnter=function(){ae.clearDelayTimer()},ae.onPopupMouseLeave=function(Ee){var Ne;if(Ee.relatedTarget&&!Ee.relatedTarget.setTimeout&&Object(Ot.a)((Ne=ae.popupRef.current)===null||Ne===void 0?void 0:Ne.getElement(),Ee.relatedTarget))return;ae.delaySetPopupVisible(!1,ae.props.mouseLeaveDelay)},ae.onFocus=function(Ee){ae.fireEvents("onFocus",Ee),ae.clearDelayTimer(),ae.isFocusToShow()&&(ae.focusTime=Date.now(),ae.delaySetPopupVisible(!0,ae.props.focusDelay))},ae.onMouseDown=function(Ee){ae.fireEvents("onMouseDown",Ee),ae.preClickTime=Date.now()},ae.onTouchStart=function(Ee){ae.fireEvents("onTouchStart",Ee),ae.preTouchTime=Date.now()},ae.onBlur=function(Ee){ae.fireEvents("onBlur",Ee),ae.clearDelayTimer(),ae.isBlurToHide()&&ae.delaySetPopupVisible(!1,ae.props.blurDelay)},ae.onContextMenu=function(Ee){Ee.preventDefault(),ae.fireEvents("onContextMenu",Ee),ae.setPopupVisible(!0,Ee)},ae.onContextMenuClose=function(){ae.isContextMenuToShow()&&ae.close()},ae.onClick=function(Ee){if(ae.fireEvents("onClick",Ee),ae.focusTime){var Ne;if(ae.preClickTime&&ae.preTouchTime?Ne=Math.min(ae.preClickTime,ae.preTouchTime):ae.preClickTime?Ne=ae.preClickTime:ae.preTouchTime&&(Ne=ae.preTouchTime),Math.abs(Ne-ae.focusTime)<20)return;ae.focusTime=0}ae.preClickTime=0,ae.preTouchTime=0,ae.isClickToShow()&&(ae.isClickToHide()||ae.isBlurToHide())&&Ee&&Ee.preventDefault&&Ee.preventDefault();var Oe=!ae.state.popupVisible;(ae.isClickToHide()&&!Oe||Oe&&ae.isClickToShow())&&ae.setPopupVisible(!ae.state.popupVisible,Ee)},ae.onPopupMouseDown=function(){if(ae.hasPopupMouseDown=!0,clearTimeout(ae.mouseDownTimeout),ae.mouseDownTimeout=window.setTimeout(function(){ae.hasPopupMouseDown=!1},0),ae.context){var Ee;(Ee=ae.context).onPopupMouseDown.apply(Ee,arguments)}},ae.onDocumentClick=function(Ee){if(ae.props.mask&&!ae.props.maskClosable)return;var Ne=Ee.target,Oe=ae.getRootDomNode(),He=ae.getPopupDomNode();(!Object(Ot.a)(Oe,Ne)||ae.isContextMenuOnly())&&!Object(Ot.a)(He,Ne)&&!ae.hasPopupMouseDown&&ae.close()},ae.getRootDomNode=function(){var Ee=ae.props.getTriggerDOMNode;if(Ee)return Ee(ae.triggerRef.current);try{var Ne=Object(Tt.a)(ae.triggerRef.current);if(Ne)return Ne}catch(Oe){}return yt.a.findDOMNode(Object(A.a)(ae))},ae.getPopupClassNameFromAlign=function(Ee){var Ne=[],Oe=ae.props,He=Oe.popupPlacement,$e=Oe.builtinPlacements,vt=Oe.prefixCls,gt=Oe.alignPoint,Dt=Oe.getPopupClassNameFromAlign;return He&&$e&&Ne.push(tt($e,vt,Ee,gt)),Dt&&Ne.push(Dt(Ee)),Ne.join(" ")},ae.getComponent=function(){var Ee=ae.props,Ne=Ee.prefixCls,Oe=Ee.destroyPopupOnHide,He=Ee.popupClassName,$e=Ee.onPopupAlign,vt=Ee.popupMotion,gt=Ee.popupAnimation,Dt=Ee.popupTransitionName,fn=Ee.popupStyle,Sn=Ee.mask,_n=Ee.maskAnimation,xn=Ee.maskTransitionName,Cn=Ee.maskMotion,wn=Ee.zIndex,Tn=Ee.popup,Bn=Ee.stretch,Dn=Ee.alignPoint,vi=Ee.mobile,In=Ee.forceRender,sn=ae.state,qt=sn.popupVisible,kn=sn.point,jn=ae.getPopupAlign(),Vt={};return ae.isMouseEnterToShow()&&(Vt.onMouseEnter=ae.onPopupMouseEnter),ae.isMouseLeaveToHide()&&(Vt.onMouseLeave=ae.onPopupMouseLeave),Vt.onMouseDown=ae.onPopupMouseDown,Vt.onTouchStart=ae.onPopupMouseDown,k.createElement(En,Object(S.a)({prefixCls:Ne,destroyPopupOnHide:Oe,visible:qt,point:Dn&&kn,className:He,align:jn,onAlign:$e,animation:gt,getClassNameFromAlign:ae.getPopupClassNameFromAlign},Vt,{stretch:Bn,getRootDomNode:ae.getRootDomNode,style:fn,mask:Sn,zIndex:wn,transitionName:Dt,maskAnimation:_n,maskTransitionName:xn,maskMotion:Cn,ref:ae.popupRef,motion:vt,mobile:vi,forceRender:In}),typeof Tn=="function"?Tn():Tn)},ae.attachParent=function(Ee){mt.a.cancel(ae.attachId);var Ne=ae.props,Oe=Ne.getPopupContainer,He=Ne.getDocument,$e=ae.getRootDomNode(),vt;Oe?($e||Oe.length===0)&&(vt=Oe($e)):vt=He(ae.getRootDomNode()).body,vt?vt.appendChild(Ee):ae.attachId=Object(mt.a)(function(){ae.attachParent(Ee)})},ae.getContainer=function(){var Ee=ae.props.getDocument,Ne=Ee(ae.getRootDomNode()).createElement("div");return Ne.style.position="absolute",Ne.style.top="0",Ne.style.left="0",Ne.style.width="100%",ae.attachParent(Ne),Ne},ae.setPoint=function(Ee){var Ne=ae.props.alignPoint;if(!Ne||!Ee)return;ae.setState({point:{pageX:Ee.pageX,pageY:Ee.pageY}})},ae.handlePortalUpdate=function(){ae.state.prevPopupVisible!==ae.state.popupVisible&&ae.props.afterPopupVisibleChange(ae.state.popupVisible)},ae.triggerContextValue={onPopupMouseDown:ae.onPopupMouseDown};var _e;return"popupVisible"in ce?_e=!!ce.popupVisible:_e=!!ce.defaultPopupVisible,ae.state={prevPopupVisible:_e,popupVisible:_e},br.forEach(function(Ee){ae["fire".concat(Ee)]=function(Ne){ae.fireEvents(Ee,Ne)}}),ae}return Object(D.a)(ne,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ae=this.props,_e=this.state;if(_e.popupVisible){var Ee;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ee=ae.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Qe.a)(Ee,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ee=Ee||ae.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Qe.a)(Ee,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ee=Ee||ae.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Qe.a)(Ee,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Qe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),mt.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ae;return((ae=this.popupRef.current)===null||ae===void 0?void 0:ae.getElement())||null}},{key:"getPopupAlign",value:function(){var ae=this.props,_e=ae.popupPlacement,Ee=ae.popupAlign,Ne=ae.builtinPlacements;return _e&&Ne?qe(Ne,_e,Ee):Ee}},{key:"setPopupVisible",value:function(ae,_e){var Ee=this.props.alignPoint,Ne=this.state.popupVisible;this.clearDelayTimer(),Ne!==ae&&("popupVisible"in this.props||this.setState({popupVisible:ae,prevPopupVisible:Ne}),this.props.onPopupVisibleChange(ae)),Ee&&_e&&ae&&this.setPoint(_e)}},{key:"delaySetPopupVisible",value:function(ae,_e,Ee){var Ne=this,Oe=_e*1e3;if(this.clearDelayTimer(),Oe){var He=Ee?{pageX:Ee.pageX,pageY:Ee.pageY}:null;this.delayTimer=window.setTimeout(function(){Ne.setPopupVisible(ae,He),Ne.clearDelayTimer()},Oe)}else this.setPopupVisible(ae,Ee)}},{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(ae){var _e=this.props.children.props,Ee=this.props;return _e[ae]&&Ee[ae]?this["fire".concat(ae)]:_e[ae]||Ee[ae]}},{key:"isClickToShow",value:function(){var ae=this.props,_e=ae.action,Ee=ae.showAction;return _e.indexOf("click")!==-1||Ee.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ae=this.props.action;return ae==="contextMenu"||ae.length===1&&ae[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ae=this.props,_e=ae.action,Ee=ae.showAction;return _e.indexOf("contextMenu")!==-1||Ee.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ae=this.props,_e=ae.action,Ee=ae.hideAction;return _e.indexOf("click")!==-1||Ee.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ae=this.props,_e=ae.action,Ee=ae.showAction;return _e.indexOf("hover")!==-1||Ee.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ae=this.props,_e=ae.action,Ee=ae.hideAction;return _e.indexOf("hover")!==-1||Ee.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ae=this.props,_e=ae.action,Ee=ae.showAction;return _e.indexOf("focus")!==-1||Ee.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ae=this.props,_e=ae.action,Ee=ae.hideAction;return _e.indexOf("focus")!==-1||Ee.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ae;(ae=this.popupRef.current)===null||ae===void 0||ae.forceAlign()}}},{key:"fireEvents",value:function(ae,_e){var Ee=this.props.children.props[ae];Ee&&Ee(_e);var Ne=this.props[ae];Ne&&Ne(_e)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ae=this.state.popupVisible,_e=this.props,Ee=_e.children,Ne=_e.forceRender,Oe=_e.alignPoint,He=_e.className,$e=_e.autoDestroy,vt=k.Children.only(Ee),gt={key:"trigger"};this.isContextMenuToShow()?gt.onContextMenu=this.onContextMenu:gt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(gt.onClick=this.onClick,gt.onMouseDown=this.onMouseDown,gt.onTouchStart=this.onTouchStart):(gt.onClick=this.createTwoChains("onClick"),gt.onMouseDown=this.createTwoChains("onMouseDown"),gt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(gt.onMouseEnter=this.onMouseEnter,Oe&&(gt.onMouseMove=this.onMouseMove)):gt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?gt.onMouseLeave=this.onMouseLeave:gt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(gt.onFocus=this.onFocus,gt.onBlur=this.onBlur):(gt.onFocus=this.createTwoChains("onFocus"),gt.onBlur=this.createTwoChains("onBlur"));var Dt=z()(vt&&vt.props&&vt.props.className,He);Dt&&(gt.className=Dt);var fn=Object(V.a)({},gt);Object(Et.c)(vt)&&(fn.ref=Object(Et.a)(this.triggerRef,vt.ref));var Sn=k.cloneElement(vt,fn),_n;return(ae||this.popupRef.current||Ne)&&(_n=k.createElement(pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ae&&$e&&(_n=null),k.createElement(dn.Provider,{value:this.triggerContextValue},Sn,_n)}}],[{key:"getDerivedStateFromProps",value:function(ae,_e){var Ee=ae.popupVisible,Ne={};return Ee!==void 0&&_e.popupVisible!==Ee&&(Ne.popupVisible=Ee,Ne.prevPopupVisible=_e.popupVisible),Ne}}]),ne}(k.Component);return Ae.contextType=dn,Ae.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:cr,getDocument:gr,onPopupVisibleChange:ci,afterPopupVisibleChange:ci,onPopupAlign:ci,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ae}var fi=Hr(Kt.a),Di={adjustX:1,adjustY:1},dr={topLeft:{points:["bl","tl"],overflow:Di,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Di,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Di,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Di,offset:[4,0]}},Kr={topLeft:{points:["bl","tl"],overflow:Di,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Di,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Di,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Di,offset:[4,0]}},Ar=dr,ai=0,Un={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},pi=function(Ae,De,ye){var ne=Je(De),ce=Ae.getState();Ae.setState({defaultActiveFirst:Object(V.a)(Object(V.a)({},ce.defaultActiveFirst),{},Object(ie.a)({},ne,ye))})},yn=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(ye){var ne;Object(L.a)(this,De),ne=Ae.call(this,ye),ne.onDestroy=function(Oe){ne.props.onDestroy(Oe)},ne.onKeyDown=function(Oe){var He=Oe.keyCode,$e=ne.menuInstance,vt=ne.props.store,gt=ne.getVisible();if(He===f.a.ENTER)return ne.onTitleClick(Oe),pi(vt,ne.props.eventKey,!0),!0;if(He===f.a.RIGHT)return gt?$e.onKeyDown(Oe):(ne.triggerOpenChange(!0),pi(vt,ne.props.eventKey,!0)),!0;if(He===f.a.LEFT){var Dt;if(gt)Dt=$e.onKeyDown(Oe);else return;return Dt||(ne.triggerOpenChange(!1),Dt=!0),Dt}return gt&&(He===f.a.UP||He===f.a.DOWN)?$e.onKeyDown(Oe):void 0},ne.onOpenChange=function(Oe){ne.props.onOpenChange(Oe)},ne.onPopupVisibleChange=function(Oe){ne.triggerOpenChange(Oe,Oe?"mouseenter":"mouseleave")},ne.onMouseEnter=function(Oe){var He=ne.props,$e=He.eventKey,vt=He.onMouseEnter,gt=He.store;pi(gt,ne.props.eventKey,!1),vt({key:$e,domEvent:Oe})},ne.onMouseLeave=function(Oe){var He=ne.props,$e=He.parentMenu,vt=He.eventKey,gt=He.onMouseLeave;$e.subMenuInstance=Object(A.a)(ne),gt({key:vt,domEvent:Oe})},ne.onTitleMouseEnter=function(Oe){var He=ne.props,$e=He.eventKey,vt=He.onItemHover,gt=He.onTitleMouseEnter;vt({key:$e,hover:!0}),gt({key:$e,domEvent:Oe})},ne.onTitleMouseLeave=function(Oe){var He=ne.props,$e=He.parentMenu,vt=He.eventKey,gt=He.onItemHover,Dt=He.onTitleMouseLeave;$e.subMenuInstance=Object(A.a)(ne),gt({key:vt,hover:!1}),Dt({key:vt,domEvent:Oe})},ne.onTitleClick=function(Oe){var He=Object(A.a)(ne),$e=He.props;if($e.onTitleClick({key:$e.eventKey,domEvent:Oe}),$e.triggerSubMenuAction==="hover")return;ne.triggerOpenChange(!ne.getVisible(),"click"),pi($e.store,ne.props.eventKey,!1)},ne.onSubMenuClick=function(Oe){typeof ne.props.onClick=="function"&&ne.props.onClick(ne.addKeyPath(Oe))},ne.onSelect=function(Oe){ne.props.onSelect(Oe)},ne.onDeselect=function(Oe){ne.props.onDeselect(Oe)},ne.getPrefixCls=function(){return"".concat(ne.props.rootPrefixCls,"-submenu")},ne.getActiveClassName=function(){return"".concat(ne.getPrefixCls(),"-active")},ne.getDisabledClassName=function(){return"".concat(ne.getPrefixCls(),"-disabled")},ne.getSelectedClassName=function(){return"".concat(ne.getPrefixCls(),"-selected")},ne.getOpenClassName=function(){return"".concat(ne.props.rootPrefixCls,"-submenu-open")},ne.getVisible=function(){return ne.state.isOpen},ne.getMode=function(){return ne.state.mode},ne.saveMenuInstance=function(Oe){ne.menuInstance=Oe},ne.addKeyPath=function(Oe){return Object(V.a)(Object(V.a)({},Oe),{},{keyPath:(Oe.keyPath||[]).concat(ne.props.eventKey)})},ne.triggerOpenChange=function(Oe,He){var $e=ne.props.eventKey,vt=function(){ne.onOpenChange({key:$e,item:Object(A.a)(ne),trigger:He,open:Oe})};He==="mouseenter"?ne.mouseenterTimeout=setTimeout(function(){vt()},0):vt()},ne.isChildrenSelected=function(){var Oe={find:!1};return dt(ne.props.children,ne.props.selectedKeys,Oe),Oe.find},ne.isInlineMode=function(){return ne.getMode()==="inline"},ne.adjustWidth=function(){if(!ne.subMenuTitle||!ne.menuInstance)return;var Oe=ht.findDOMNode(ne.menuInstance);if(Oe.offsetWidth>=ne.subMenuTitle.offsetWidth)return;Oe.style.minWidth="".concat(ne.subMenuTitle.offsetWidth,"px")},ne.saveSubMenuTitle=function(Oe){ne.subMenuTitle=Oe},ne.getBaseProps=function(){var Oe=Object(A.a)(ne),He=Oe.props,$e=ne.getMode();return{mode:$e==="horizontal"?"vertical":$e,visible:ne.getVisible(),level:He.level+1,inlineIndent:He.inlineIndent,focusable:!1,onClick:ne.onSubMenuClick,onSelect:ne.onSelect,onDeselect:ne.onDeselect,onDestroy:ne.onDestroy,selectedKeys:He.selectedKeys,eventKey:"".concat(He.eventKey,"-menu-"),openKeys:He.openKeys,motion:He.motion,onOpenChange:ne.onOpenChange,subMenuOpenDelay:He.subMenuOpenDelay,parentMenu:Object(A.a)(ne),subMenuCloseDelay:He.subMenuCloseDelay,forceSubMenuRender:He.forceSubMenuRender,triggerSubMenuAction:He.triggerSubMenuAction,builtinPlacements:He.builtinPlacements,defaultActiveFirst:He.store.getState().defaultActiveFirst[Je(He.eventKey)],multiple:He.multiple,prefixCls:He.rootPrefixCls,id:ne.internalMenuId,manualRef:ne.saveMenuInstance,itemIcon:He.itemIcon,expandIcon:He.expandIcon,direction:He.direction}},ne.getMotion=function(Oe,He){var $e=Object(A.a)(ne),vt=$e.haveRendered,gt=ne.props,Dt=gt.motion,fn=gt.rootPrefixCls,Sn=Object(V.a)(Object(V.a)({},Dt),{},{leavedClassName:"".concat(fn,"-hidden"),removeOnLeave:!1,motionAppear:vt||!He||Oe!=="inline"});return Sn};var ce=ye.store,ae=ye.eventKey,_e=ce.getState(),Ee=_e.defaultActiveFirst;ne.isRootMenu=!1;var Ne=!1;return Ee&&(Ne=Ee[ae]),pi(ce,ae,Ne),ne.state={mode:ye.mode,isOpen:ye.isOpen},ne}return Object(D.a)(De,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ne=this,ce=this.props,ae=ce.mode,_e=ce.parentMenu,Ee=ce.manualRef,Ne=ce.isOpen,Oe=function(){ne.setState({mode:ae,isOpen:Ne})},He=Ne!==this.state.isOpen,$e=ae!==this.state.mode;if(($e||He)&&(mt.a.cancel(this.updateStateRaf),$e?this.updateStateRaf=Object(mt.a)(Oe):Oe()),Ee&&Ee(this),ae!=="horizontal"||!(_e==null?void 0:_e.isRootMenu)||!Ne)return;this.minWidthTimeout=setTimeout(function(){return ne.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ne=this.props,ce=ne.onDestroy,ae=ne.eventKey;ce&&ce(ae),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),mt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ne,ce){var ae=this.getBaseProps();return k.createElement(Ci,Object(S.a)({},ae,{id:this.internalMenuId,className:ne,style:ce}),this.props.children)}},{key:"renderChildren",value:function(){var ne=this,ce=this.getBaseProps(),ae=ce.mode,_e=ce.visible,Ee=ce.forceSubMenuRender,Ne=ce.direction,Oe=this.getMotion(ae,_e);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||_e||Ee,!this.haveOpened)return k.createElement("div",null);var He=z()("".concat(ce.prefixCls,"-sub"),Object(ie.a)({},"".concat(ce.prefixCls,"-rtl"),Ne==="rtl"));return this.isInlineMode()?k.createElement(q,Object(S.a)({visible:ce.visible,forceRender:Ee},Oe),function($e){var vt=$e.className,gt=$e.style,Dt=z()(He,vt);return ne.renderPopupMenu(Dt,gt)}):this.renderPopupMenu(He)}},{key:"render",value:function(){var ne,ce,ae,_e=Object(V.a)({},this.props),Ee=this.getVisible(),Ne=this.getPrefixCls(),Oe=this.isInlineMode(),He=this.getMode(),$e=z()(Ne,"".concat(Ne,"-").concat(He),(ne={},Object(ie.a)(ne,_e.className,!!_e.className),Object(ie.a)(ne,this.getOpenClassName(),Ee),Object(ie.a)(ne,this.getActiveClassName(),_e.active||Ee&&!Oe),Object(ie.a)(ne,this.getDisabledClassName(),_e.disabled),Object(ie.a)(ne,this.getSelectedClassName(),this.isChildrenSelected()),ne));this.internalMenuId||(_e.eventKey?this.internalMenuId="".concat(_e.eventKey,"$Menu"):(ai+=1,this.internalMenuId="$__$".concat(ai,"$Menu")));var vt={},gt={},Dt={};_e.disabled||(vt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},Dt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var fn={},Sn=_e.direction,_n=Sn==="rtl";Oe&&(_n?fn.paddingRight=_e.inlineIndent*_e.level:fn.paddingLeft=_e.inlineIndent*_e.level);var xn={};this.getVisible()&&(xn={"aria-owns":this.internalMenuId});var Cn=null;He!=="horizontal"&&(Cn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Cn=k.createElement(this.props.expandIcon,Object(V.a)({},this.props))));var wn=k.createElement("div",Object(S.a)({ref:this.saveSubMenuTitle,style:fn,className:"".concat(Ne,"-title"),role:"button"},Dt,gt,{"aria-expanded":Ee},xn,{"aria-haspopup":"true",title:typeof _e.title=="string"?_e.title:void 0}),_e.title,Cn||k.createElement("i",{className:"".concat(Ne,"-arrow")})),Tn=this.renderChildren(),Bn=((ce=_e.parentMenu)===null||ce===void 0?void 0:ce.isRootMenu)?_e.parentMenu.props.getPopupContainer:function(ii){return ii.parentNode},Dn=Un[He],vi=_e.popupOffset?{offset:_e.popupOffset}:{},In=z()((ae={},Object(ie.a)(ae,_e.popupClassName,_e.popupClassName&&!Oe),Object(ie.a)(ae,"".concat(Ne,"-rtl"),_n),ae)),sn=_e.disabled,qt=_e.triggerSubMenuAction,kn=_e.subMenuOpenDelay,jn=_e.forceSubMenuRender,Vt=_e.subMenuCloseDelay,Kn=_e.builtinPlacements;de.forEach(function(ii){return delete _e[ii]}),delete _e.onClick;var yi=_n?Object(V.a)(Object(V.a)({},Kr),Kn):Object(V.a)(Object(V.a)({},dr),Kn);delete _e.direction;var Yn=this.getBaseProps(),si=Oe?null:this.getMotion(Yn.mode,Yn.visible);return k.createElement("li",Object(S.a)({},_e,vt,{className:$e,role:"menuitem"}),k.createElement(fi,{prefixCls:Ne,popupClassName:z()("".concat(Ne,"-popup"),In),getPopupContainer:Bn,builtinPlacements:yi,popupPlacement:Dn,popupVisible:Oe?!1:Ee,popupAlign:vi,popup:Oe?null:Tn,action:sn||Oe?[]:[qt],mouseEnterDelay:kn,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:jn,popupMotion:si},wn),Oe?Tn:null)}}]),De}(k.Component);yn.defaultProps={onMouseEnter:ut,onMouseLeave:ut,onTitleMouseEnter:ut,onTitleMouseLeave:ut,onTitleClick:ut,manualRef:ut,mode:"vertical",title:""};var mi=Object(d.b)(function(pe,Ae){var De=pe.openKeys,ye=pe.activeKey,ne=pe.selectedKeys,ce=Ae.eventKey,ae=Ae.subMenuKey;return{isOpen:De.indexOf(ce)>-1,active:ye[ae]===ce,selectedKeys:ne}})(yn);mi.isSubMenu=!0;var Jn=mi,nr="menuitem-overflowed",Si=.5,Pi=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(){var ye;return Object(L.a)(this,De),ye=Ae.apply(this,arguments),ye.resizeObserver=null,ye.mutationObserver=null,ye.originalTotalWidth=0,ye.overflowedItems=[],ye.menuItemSizes=[],ye.cancelFrameId=null,ye.state={lastVisibleIndex:void 0},ye.childRef=k.createRef(),ye.getMenuItemNodes=function(){var ne=ye.props.prefixCls,ce=ye.childRef.current;return ce?[].slice.call(ce.children).filter(function(ae){return ae.className.split(" ").indexOf("".concat(ne,"-overflowed-submenu"))<0}):[]},ye.getOverflowedSubMenuItem=function(ne,ce,ae){var _e=ye.props,Ee=_e.overflowedIndicator,Ne=_e.level,Oe=_e.mode,He=_e.prefixCls,$e=_e.theme;if(Ne!==1||Oe!=="horizontal")return null;var vt=ye.props.children[0],gt=vt.props,Dt=gt.children,fn=gt.title,Sn=gt.style,_n=Object(P.a)(gt,["children","title","style"]),xn=Object(V.a)({},Sn),Cn="".concat(ne,"-overflowed-indicator"),wn="".concat(ne,"-overflowed-indicator");ce.length===0&&ae!==!0?xn=Object(V.a)(Object(V.a)({},xn),{},{display:"none"}):ae&&(xn=Object(V.a)(Object(V.a)({},xn),{},{visibility:"hidden",position:"absolute"}),Cn="".concat(Cn,"-placeholder"),wn="".concat(wn,"-placeholder"));var Tn=$e?"".concat(He,"-").concat($e):"",Bn={};return de.forEach(function(Dn){_n[Dn]!==void 0&&(Bn[Dn]=_n[Dn])}),k.createElement(Jn,Object(S.a)({title:Ee,className:"".concat(He,"-overflowed-submenu"),popupClassName:Tn},Bn,{key:Cn,eventKey:wn,disabled:!1,style:xn}),ce)},ye.setChildrenWidthAndResize=function(){if(ye.props.mode!=="horizontal")return;var ne=ye.childRef.current;if(!ne)return;var ce=ne.children;if(!ce||ce.length===0)return;var ae=ne.children[ce.length-1];Ue(ae,"display","inline-block");var _e=ye.getMenuItemNodes(),Ee=_e.filter(function(Ne){return Ne.className.split(" ").indexOf(nr)>=0});Ee.forEach(function(Ne){Ue(Ne,"display","inline-block")}),ye.menuItemSizes=_e.map(function(Ne){return Ce(Ne,!0)}),Ee.forEach(function(Ne){Ue(Ne,"display","none")}),ye.overflowedIndicatorWidth=Ce(ne.children[ne.children.length-1],!0),ye.originalTotalWidth=ye.menuItemSizes.reduce(function(Ne,Oe){return Ne+Oe},0),ye.handleResize(),Ue(ae,"display","none")},ye.handleResize=function(){if(ye.props.mode!=="horizontal")return;var ne=ye.childRef.current;if(!ne)return;var ce=Ce(ne);ye.overflowedItems=[];var ae=0,_e;ye.originalTotalWidth>ce+Si&&(_e=-1,ye.menuItemSizes.forEach(function(Ee){ae+=Ee,ae+ye.overflowedIndicatorWidth<=ce&&(_e+=1)})),ye.setState({lastVisibleIndex:_e})},ye}return Object(D.a)(De,[{key:"componentDidMount",value:function(){var ne=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ce=this.childRef.current;if(!ce)return;this.resizeObserver=new st.default(function(ae){ae.forEach(function(){var _e=ne.cancelFrameId;cancelAnimationFrame(_e),ne.cancelFrameId=requestAnimationFrame(ne.setChildrenWidthAndResize)})}),[].slice.call(ce.children).concat(ce).forEach(function(ae){ne.resizeObserver.observe(ae)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ne.resizeObserver.disconnect(),[].slice.call(ce.children).concat(ce).forEach(function(ae){ne.resizeObserver.observe(ae)}),ne.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(ne){var ce=this,ae=this.state.lastVisibleIndex;return(ne||[]).reduce(function(_e,Ee,Ne){var Oe=Ee;if(ce.props.mode==="horizontal"){var He=ce.getOverflowedSubMenuItem(Ee.props.eventKey,[]);ae!==void 0&&ce.props.className.indexOf("".concat(ce.props.prefixCls,"-root"))!==-1&&(Ne>ae&&(Oe=k.cloneElement(Ee,{style:{display:"none"},eventKey:"".concat(Ee.props.eventKey,"-hidden"),className:"".concat(nr)})),Ne===ae+1&&(ce.overflowedItems=ne.slice(ae+1).map(function(vt){return k.cloneElement(vt,{key:vt.props.eventKey,mode:"vertical-left"})}),He=ce.getOverflowedSubMenuItem(Ee.props.eventKey,ce.overflowedItems)));var $e=[].concat(Object(M.a)(_e),[He,Oe]);return Ne===ne.length-1&&$e.push(ce.getOverflowedSubMenuItem(Ee.props.eventKey,[],!0)),$e}return[].concat(Object(M.a)(_e),[Oe])},[])}},{key:"render",value:function(){var ne=this.props,ce=ne.visible,ae=ne.prefixCls,_e=ne.overflowedIndicator,Ee=ne.mode,Ne=ne.level,Oe=ne.tag,He=ne.children,$e=ne.theme,vt=Object(P.a)(ne,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),gt=Oe;return k.createElement(gt,Object(S.a)({ref:this.childRef},vt),this.renderChildren(He))}}]),De}(k.Component);Pi.defaultProps={tag:"div",className:""};var Gr=Pi;function Qi(pe){return pe.length?pe.every(function(Ae){return!!Ae.props.disabled}):!0}function Sr(pe,Ae,De){var ye=pe.getState();pe.setState({activeKey:Object(V.a)(Object(V.a)({},ye.activeKey),{},Object(ie.a)({},Ae,De))})}function ir(pe){return pe.eventKey||"0-menu-"}function Zi(pe,Ae){var De=Ae,ye=pe.children,ne=pe.eventKey;if(De){var ce;if(et(ye,function(ae,_e){ae&&ae.props&&!ae.props.disabled&&De===xt(ae,ne,_e)&&(ce=!0)}),ce)return De}return De=null,pe.defaultActiveFirst&&et(ye,function(ae,_e){!De&&ae&&!ae.props.disabled&&(De=xt(ae,ne,_e))}),De}function zr(pe){if(!pe)return;var Ae=this.instanceArray.indexOf(pe);Ae!==-1?this.instanceArray[Ae]=pe:this.instanceArray.push(pe)}var gi=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(ye){var ne;return Object(L.a)(this,De),ne=Ae.call(this,ye),ne.onKeyDown=function(ce,ae){var _e=ce.keyCode,Ee;if(ne.getFlatInstanceArray().forEach(function(Oe){Oe&&Oe.props.active&&Oe.onKeyDown&&(Ee=Oe.onKeyDown(ce))}),Ee)return 1;var Ne=null;return(_e===f.a.UP||_e===f.a.DOWN)&&(Ne=ne.step(_e===f.a.UP?-1:1)),Ne?(ce.preventDefault(),Sr(ne.props.store,ir(ne.props),Ne.props.eventKey),typeof ae=="function"&&ae(Ne),1):void 0},ne.onItemHover=function(ce){var ae=ce.key,_e=ce.hover;Sr(ne.props.store,ir(ne.props),_e?ae:null)},ne.onDeselect=function(ce){ne.props.onDeselect(ce)},ne.onSelect=function(ce){ne.props.onSelect(ce)},ne.onClick=function(ce){ne.props.onClick(ce)},ne.onOpenChange=function(ce){ne.props.onOpenChange(ce)},ne.onDestroy=function(ce){ne.props.onDestroy(ce)},ne.getFlatInstanceArray=function(){return ne.instanceArray},ne.step=function(ce){var ae=ne.getFlatInstanceArray(),_e=ne.props.store.getState().activeKey[ir(ne.props)],Ee=ae.length;if(!Ee)return null;ce<0&&(ae=ae.concat().reverse());var Ne=-1;if(ae.every(function(vt,gt){return vt&&vt.props.eventKey===_e?(Ne=gt,!1):!0}),!ne.props.defaultActiveFirst&&Ne!==-1&&Qi(ae.slice(Ne,Ee-1)))return;var Oe=(Ne+1)%Ee,He=Oe;do{var $e=ae[He];if(!$e||$e.props.disabled)He=(He+1)%Ee;else return $e}while(He!==Oe);return null},ne.renderCommonMenuItem=function(ce,ae,_e){var Ee=ne.props.store.getState(),Ne=Object(A.a)(ne),Oe=Ne.props,He=xt(ce,Oe.eventKey,ae),$e=ce.props;if(!$e||typeof ce.type=="string")return ce;var vt=He===Ee.activeKey,gt=Object(V.a)(Object(V.a)({mode:$e.mode||Oe.mode,level:Oe.level,inlineIndent:Oe.inlineIndent,renderMenuItem:ne.renderMenuItem,rootPrefixCls:Oe.prefixCls,index:ae,parentMenu:Oe.parentMenu,manualRef:$e.disabled?void 0:Object(p.a)(ce.ref,zr.bind(Object(A.a)(ne))),eventKey:He,active:!$e.disabled&&vt,multiple:Oe.multiple,onClick:function(fn){($e.onClick||ut)(fn),ne.onClick(fn)},onItemHover:ne.onItemHover,motion:Oe.motion,subMenuOpenDelay:Oe.subMenuOpenDelay,subMenuCloseDelay:Oe.subMenuCloseDelay,forceSubMenuRender:Oe.forceSubMenuRender,onOpenChange:ne.onOpenChange,onDeselect:ne.onDeselect,onSelect:ne.onSelect,builtinPlacements:Oe.builtinPlacements,itemIcon:$e.itemIcon||ne.props.itemIcon,expandIcon:$e.expandIcon||ne.props.expandIcon},_e),{},{direction:Oe.direction});return(Oe.mode==="inline"||Ke())&&(gt.triggerSubMenuAction="click"),k.cloneElement(ce,Object(V.a)(Object(V.a)({},gt),{},{key:He||ae}))},ne.renderMenuItem=function(ce,ae,_e){if(!ce)return null;var Ee=ne.props.store.getState(),Ne={openKeys:Ee.openKeys,selectedKeys:Ee.selectedKeys,triggerSubMenuAction:ne.props.triggerSubMenuAction,subMenuKey:_e};return ne.renderCommonMenuItem(ce,ae,Ne)},ye.store.setState({activeKey:Object(V.a)(Object(V.a)({},ye.store.getState().activeKey),{},Object(ie.a)({},ye.eventKey,Zi(ye,ye.activeKey)))}),ne.instanceArray=[],ne}return Object(D.a)(De,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ne){return this.props.visible||ne.visible||this.props.className!==ne.className||!C()(this.props.style,ne.style)}},{key:"componentDidUpdate",value:function(ne){var ce=this.props,ae="activeKey"in ce?ce.activeKey:ce.store.getState().activeKey[ir(ce)],_e=Zi(ce,ae);if(_e!==ae)Sr(ce.store,ir(ce),_e);else if("activeKey"in ne){var Ee=Zi(ne,ne.activeKey);_e!==Ee&&Sr(ce.store,ir(ce),_e)}}},{key:"render",value:function(){var ne=this,ce=Object(S.a)({},this.props);this.instanceArray=[];var ae=z()(ce.prefixCls,ce.className,"".concat(ce.prefixCls,"-").concat(ce.mode)),_e={className:ae,role:ce.role||"menu"};ce.id&&(_e.id=ce.id),ce.focusable&&(_e.tabIndex=0,_e.onKeyDown=this.onKeyDown);var Ee=ce.prefixCls,Ne=ce.eventKey,Oe=ce.visible,He=ce.level,$e=ce.mode,vt=ce.overflowedIndicator,gt=ce.theme;return de.forEach(function(Dt){return delete ce[Dt]}),delete ce.onClick,k.createElement(Gr,Object(S.a)({},ce,{prefixCls:Ee,mode:$e,tag:"ul",level:He,theme:gt,visible:Oe,overflowedIndicator:vt},_e),Object(K.a)(ce.children).map(function(Dt,fn){return ne.renderMenuItem(Dt,fn,Ne||"0-menu-")}))}}]),De}(k.Component);gi.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ut};var Xn=Object(d.b)()(gi),Ci=Xn,Ti=W("Kwbf");function qi(pe,Ae,De){var ye=pe.prefixCls,ne=pe.motion,ce=pe.defaultMotions,ae=ce===void 0?{}:ce,_e=pe.openAnimation,Ee=pe.openTransitionName,Ne=Ae.switchingModeFromInline;if(ne)return ne;if(Object(F.a)(_e)==="object"&&_e)Object(Ti.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof _e=="string")return{motionName:"".concat(ye,"-open-").concat(_e)};if(Ee)return{motionName:Ee};var Oe=ae[De];return Oe||(Ne?null:ae.other)}var Nt=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(ye){var ne;Object(L.a)(this,De),ne=Ae.call(this,ye),ne.onSelect=function(_e){var Ee=Object(A.a)(ne),Ne=Ee.props;if(Ne.selectable){var Oe=ne.store.getState(),He=Oe.selectedKeys,$e=_e.key;Ne.multiple?He=He.concat([$e]):He=[$e],"selectedKeys"in Ne||ne.store.setState({selectedKeys:He}),Ne.onSelect(Object(V.a)(Object(V.a)({},_e),{},{selectedKeys:He}))}},ne.onClick=function(_e){var Ee=ne.getRealMenuMode(),Ne=Object(A.a)(ne),Oe=Ne.store,He=Ne.props.onOpenChange;Ee!=="inline"&&!("openKeys"in ne.props)&&(Oe.setState({openKeys:[]}),He([])),ne.props.onClick(_e)},ne.onKeyDown=function(_e,Ee){ne.innerMenu.getWrappedInstance().onKeyDown(_e,Ee)},ne.onOpenChange=function(_e){var Ee=Object(A.a)(ne),Ne=Ee.props,Oe=ne.store.getState().openKeys.concat(),He=!1,$e=function(gt){var Dt=!1;if(gt.open)Dt=Oe.indexOf(gt.key)===-1,Dt&&Oe.push(gt.key);else{var fn=Oe.indexOf(gt.key);Dt=fn!==-1,Dt&&Oe.splice(fn,1)}He=He||Dt};Array.isArray(_e)?_e.forEach($e):$e(_e),He&&("openKeys"in ne.props||ne.store.setState({openKeys:Oe}),Ne.onOpenChange(Oe))},ne.onDeselect=function(_e){var Ee=Object(A.a)(ne),Ne=Ee.props;if(Ne.selectable){var Oe=ne.store.getState().selectedKeys.concat(),He=_e.key,$e=Oe.indexOf(He);$e!==-1&&Oe.splice($e,1),"selectedKeys"in Ne||ne.store.setState({selectedKeys:Oe}),Ne.onDeselect(Object(V.a)(Object(V.a)({},_e),{},{selectedKeys:Oe}))}},ne.onMouseEnter=function(_e){ne.restoreModeVerticalFromInline();var Ee=ne.props.onMouseEnter;Ee&&Ee(_e)},ne.onTransitionEnd=function(_e){var Ee=_e.propertyName==="width"&&_e.target===_e.currentTarget,Ne=_e.target.className,Oe=Object.prototype.toString.call(Ne)==="[object SVGAnimatedString]"?Ne.animVal:Ne,He=_e.propertyName==="font-size"&&Oe.indexOf("anticon")>=0;(Ee||He)&&ne.restoreModeVerticalFromInline()},ne.setInnerMenu=function(_e){ne.innerMenu=_e},ne.isRootMenu=!0;var ce=ye.defaultSelectedKeys,ae=ye.defaultOpenKeys;return"selectedKeys"in ye&&(ce=ye.selectedKeys||[]),"openKeys"in ye&&(ae=ye.openKeys||[]),ne.store=Object(d.c)({selectedKeys:ce,openKeys:ae,activeKey:{"0-menu-":Zi(ye,ye.activeKey)}}),ne.state={switchingModeFromInline:!1,prevProps:ye,inlineOpenKeys:[],store:ne.store},ne}return Object(D.a)(De,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ne){var ce=this.props,ae=ce.siderCollapsed,_e=ce.inlineCollapsed,Ee=ce.onOpenChange;(!ne.inlineCollapsed&&_e||!ne.siderCollapsed&&ae)&&Ee([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ne=this.props.collapsedWidth,ce=this.store,ae=this.prevOpenKeys,_e=this.getInlineCollapsed()&&(ne===0||ne==="0"||ne==="0px");_e?(this.prevOpenKeys=ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ae&&(this.store.setState({openKeys:ae}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ne=this.props.mode,ce=this.state.switchingModeFromInline,ae=this.getInlineCollapsed();return ce&&ae?"inline":ae?"vertical":ne}},{key:"getInlineCollapsed",value:function(){var ne=this.props,ce=ne.inlineCollapsed,ae=ne.siderCollapsed;return ae!==void 0?ae:ce}},{key:"restoreModeVerticalFromInline",value:function(){var ne=this.state.switchingModeFromInline;ne&&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 ne=Object(V.a)({},Object(E.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ce=this.getRealMenuMode();return ne.className+=" ".concat(ne.prefixCls,"-root"),ne.direction==="rtl"&&(ne.className+=" ".concat(ne.prefixCls,"-rtl")),ne=Object(V.a)(Object(V.a)({},ne),{},{mode:ce,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:qi(this.props,this.state,ce)}),delete ne.openAnimation,delete ne.openTransitionName,k.createElement(d.a,{store:this.store},k.createElement(Ci,Object(S.a)({},ne,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ne,ce){var ae=ce.prevProps,_e=ce.store,Ee=_e.getState(),Ne={},Oe={prevProps:ne};return ae.mode==="inline"&&ne.mode!=="inline"&&(Oe.switchingModeFromInline=!0),"openKeys"in ne?Ne.openKeys=ne.openKeys||[]:((ne.inlineCollapsed&&!ae.inlineCollapsed||ne.siderCollapsed&&!ae.siderCollapsed)&&(Oe.switchingModeFromInline=!0,Oe.inlineOpenKeys=Ee.openKeys,Ne.openKeys=[]),(!ne.inlineCollapsed&&ae.inlineCollapsed||!ne.siderCollapsed&&ae.siderCollapsed)&&(Ne.openKeys=ce.inlineOpenKeys,Oe.inlineOpenKeys=[])),Object.keys(Ne).length&&_e.setState(Ne),Oe}}]),De}(k.Component);Nt.defaultProps={selectable:!0,onClick:ut,onSelect:ut,onOpenChange:ut,onDeselect:ut,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:k.createElement("span",null,"\xB7\xB7\xB7")};var an=Nt,Xt=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(){var ye;return Object(L.a)(this,De),ye=Ae.apply(this,arguments),ye.onKeyDown=function(ne){var ce=ne.keyCode;return ce===f.a.ENTER?(ye.onClick(ne),!0):void 0},ye.onMouseLeave=function(ne){var ce=ye.props,ae=ce.eventKey,_e=ce.onItemHover,Ee=ce.onMouseLeave;_e({key:ae,hover:!1}),Ee({key:ae,domEvent:ne})},ye.onMouseEnter=function(ne){var ce=ye.props,ae=ce.eventKey,_e=ce.onItemHover,Ee=ce.onMouseEnter;_e({key:ae,hover:!0}),Ee({key:ae,domEvent:ne})},ye.onClick=function(ne){var ce=ye.props,ae=ce.eventKey,_e=ce.multiple,Ee=ce.onClick,Ne=ce.onSelect,Oe=ce.onDeselect,He=ce.isSelected,$e={key:ae,keyPath:[ae],item:Object(A.a)(ye),domEvent:ne};Ee($e),_e?He?Oe($e):Ne($e):He||Ne($e)},ye.saveNode=function(ne){ye.node=ne},ye}return Object(D.a)(De,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ne=this.props;ne.onDestroy&&ne.onDestroy(ne.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 ne,ce=Object(V.a)({},this.props),ae=z()(this.getPrefixCls(),ce.className,(ne={},Object(ie.a)(ne,this.getActiveClassName(),!ce.disabled&&ce.active),Object(ie.a)(ne,this.getSelectedClassName(),ce.isSelected),Object(ie.a)(ne,this.getDisabledClassName(),ce.disabled),ne)),_e=Object(V.a)(Object(V.a)({},ce.attribute),{},{title:typeof ce.title=="string"?ce.title:void 0,className:ae,role:ce.role||"menuitem","aria-disabled":ce.disabled});ce.role==="option"?_e=Object(V.a)(Object(V.a)({},_e),{},{role:"option","aria-selected":ce.isSelected}):(ce.role===null||ce.role==="none")&&(_e.role="none");var Ee={onClick:ce.disabled?null:this.onClick,onMouseLeave:ce.disabled?null:this.onMouseLeave,onMouseEnter:ce.disabled?null:this.onMouseEnter},Ne=Object(V.a)({},ce.style);ce.mode==="inline"&&(ce.direction==="rtl"?Ne.paddingRight=ce.inlineIndent*ce.level:Ne.paddingLeft=ce.inlineIndent*ce.level),de.forEach(function(He){return delete ce[He]}),delete ce.direction;var Oe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Oe=k.createElement(this.props.itemIcon,this.props)),k.createElement("li",Object(S.a)({},Object(E.a)(ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),_e,Ee,{style:Ne,ref:this.saveNode}),ce.children,Oe)}}]),De}(k.Component);Xt.isMenuItem=!0,Xt.defaultProps={onSelect:ut,onMouseEnter:ut,onMouseLeave:ut,manualRef:ut};var On=Object(d.b)(function(pe,Ae){var De=pe.activeKey,ye=pe.selectedKeys,ne=Ae.eventKey,ce=Ae.subMenuKey;return{active:De[ce]===ne,isSelected:Array.isArray(ye)?ye.indexOf(ne)!==-1:ye===ne}})(Xt),Hn=On,ti=function(pe){Object(T.a)(De,pe);var Ae=Object(x.a)(De);function De(){var ye;return Object(L.a)(this,De),ye=Ae.apply(this,arguments),ye.renderInnerMenuItem=function(ne){var ce=ye.props,ae=ce.renderMenuItem,_e=ce.index;return ae(ne,_e,ye.props.subMenuKey)},ye}return Object(D.a)(De,[{key:"render",value:function(){var ne=Object(S.a)({},this.props),ce=ne.className,ae=ce===void 0?"":ce,_e=ne.rootPrefixCls,Ee="".concat(_e,"-item-group-title"),Ne="".concat(_e,"-item-group-list"),Oe=ne.title,He=ne.children;return de.forEach(function($e){return delete ne[$e]}),delete ne.direction,k.createElement("li",Object(S.a)({},ne,{onClick:function(vt){return vt.stopPropagation()},className:"".concat(ae," ").concat(_e,"-item-group")}),k.createElement("div",{className:Ee,title:typeof Oe=="string"?Oe:void 0},Oe),k.createElement("ul",{className:Ne},k.Children.map(He,this.renderInnerMenuItem)))}}]),De}(k.Component);ti.isMenuItemGroup=!0,ti.defaultProps={disabled:!0};var Fn=ti,Ai=function(Ae){var De=Ae.className,ye=Ae.rootPrefixCls,ne=Ae.style;return k.createElement("li",{className:"".concat(De," ").concat(ye,"-item-divider"),style:ne})};Ai.defaultProps={disabled:!0,className:"",style:{}};var rr=Ai,Ln=an,Or=W("eDIo");function Qn(pe,Ae){var De=pe.prefixCls,ye=pe.editable,ne=pe.locale,ce=pe.style;return!ye||ye.showAdd===!1?null:k.createElement("button",{ref:Ae,type:"button",className:"".concat(De,"-nav-add"),style:ce,"aria-label":(ne==null?void 0:ne.addAriaLabel)||"Add tab",onClick:function(_e){ye.onEdit("add",{event:_e})}},ye.addIcon||"+")}var Xi=k.forwardRef(Qn);function Gi(pe,Ae){var De=pe.prefixCls,ye=pe.id,ne=pe.tabs,ce=pe.locale,ae=pe.mobile,_e=pe.moreIcon,Ee=_e===void 0?"More":_e,Ne=pe.moreTransitionName,Oe=pe.style,He=pe.className,$e=pe.editable,vt=pe.tabBarGutter,gt=pe.rtl,Dt=pe.onTabClick,fn=Object(k.useState)(!1),Sn=Object(G.a)(fn,2),_n=Sn[0],xn=Sn[1],Cn=Object(k.useState)(null),wn=Object(G.a)(Cn,2),Tn=wn[0],Bn=wn[1],Dn="".concat(ye,"-more-popup"),vi="".concat(De,"-dropdown"),In=Tn!==null?"".concat(Dn,"-").concat(Tn):null,sn=ce==null?void 0:ce.dropdownAriaLabel,qt=k.createElement(Ln,{onClick:function(si){var ii=si.key,Ri=si.domEvent;Dt(ii,Ri),xn(!1)},id:Dn,tabIndex:-1,role:"listbox","aria-activedescendant":In,selectedKeys:[Tn],"aria-label":sn!==void 0?sn:"expanded dropdown"},ne.map(function(Yn){return k.createElement(Hn,{key:Yn.key,id:"".concat(Dn,"-").concat(Yn.key),role:"option","aria-controls":ye&&"".concat(ye,"-panel-").concat(Yn.key),disabled:Yn.disabled},Yn.tab)}));function kn(Yn){for(var si=ne.filter(function($i){return!$i.disabled}),ii=si.findIndex(function($i){return $i.key===Tn})||0,Ri=si.length,Fi=0;Fi<Ri;Fi+=1){ii=(ii+Yn+Ri)%Ri;var _i=si[ii];if(!_i.disabled){Bn(_i.key);return}}}function jn(Yn){var si=Yn.which;if(!_n){[f.a.DOWN,f.a.SPACE,f.a.ENTER].includes(si)&&(xn(!0),Yn.preventDefault());return}switch(si){case f.a.UP:kn(-1),Yn.preventDefault();break;case f.a.DOWN:kn(1),Yn.preventDefault();break;case f.a.ESC:xn(!1);break;case f.a.SPACE:case f.a.ENTER:Tn!==null&&Dt(Tn,Yn);break}}Object(k.useEffect)(function(){var Yn=document.getElementById(In);Yn&&Yn.scrollIntoView&&Yn.scrollIntoView(!1)},[Tn]),Object(k.useEffect)(function(){_n||Bn(null)},[_n]);var Vt=Object(ie.a)({},gt?"marginLeft":"marginRight",vt);ne.length||(Vt.visibility="hidden",Vt.order=1);var Kn=z()(Object(ie.a)({},"".concat(vi,"-rtl"),gt)),yi=ae?null:k.createElement(Or.a,{prefixCls:vi,overlay:qt,trigger:["hover"],visible:_n,transitionName:Ne,onVisibleChange:xn,overlayClassName:Kn,mouseEnterDelay:.1,mouseLeaveDelay:.1},k.createElement("button",{type:"button",className:"".concat(De,"-nav-more"),style:Vt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Dn,id:"".concat(ye,"-more"),"aria-expanded":_n,onKeyDown:jn},Ee));return k.createElement("div",{className:z()("".concat(De,"-nav-operations"),He),style:Oe,ref:Ae},yi,k.createElement(Xi,{prefixCls:De,locale:ce,editable:$e}))}var vr=k.forwardRef(Gi),Ba=Object(k.createContext)(null),Hs=.1,$r=.01,Oi=20,ms=Math.pow(.995,Oi);function gs(){var pe=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(pe)||/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(pe.substr(0,4)))}function da(pe,Ae){var De=Object(k.useState)(),ye=Object(G.a)(De,2),ne=ye[0],ce=ye[1],ae=Object(k.useState)(0),_e=Object(G.a)(ae,2),Ee=_e[0],Ne=_e[1],Oe=Object(k.useState)(0),He=Object(G.a)(Oe,2),$e=He[0],vt=He[1],gt=Object(k.useState)(),Dt=Object(G.a)(gt,2),fn=Dt[0],Sn=Dt[1],_n=Object(k.useRef)();function xn(sn){var qt=sn.touches[0],kn=qt.screenX,jn=qt.screenY;ce({x:kn,y:jn}),window.clearInterval(_n.current)}function Cn(sn){if(!ne)return;sn.preventDefault();var qt=sn.touches[0],kn=qt.screenX,jn=qt.screenY;ce({x:kn,y:jn});var Vt=kn-ne.x,Kn=jn-ne.y;Ae(Vt,Kn);var yi=Date.now();Ne(yi),vt(yi-Ee),Sn({x:Vt,y:Kn})}function wn(){if(!ne)return;if(ce(null),Sn(null),fn){var sn=fn.x/$e,qt=fn.y/$e,kn=Math.abs(sn),jn=Math.abs(qt);if(Math.max(kn,jn)<Hs)return;var Vt=sn,Kn=qt;_n.current=window.setInterval(function(){if(Math.abs(Vt)<$r&&Math.abs(Kn)<$r){window.clearInterval(_n.current);return}Vt*=ms,Kn*=ms,Ae(Vt*Oi,Kn*Oi)},Oi)}}var Tn=Object(k.useRef)(0),Bn=Object(k.useRef)(!1),Dn=Object(k.useRef)();function vi(sn){var qt=sn.deltaX,kn=sn.deltaY,jn=0,Vt=Math.abs(qt),Kn=Math.abs(kn);Vt===Kn?jn=Dn.current==="x"?qt:kn:Vt>Kn?(jn=qt,Dn.current="x"):(jn=kn,Dn.current="y");var yi=Date.now();yi-Tn.current>100&&(Bn.current=!1),(Ae(-jn,-jn)||Bn.current)&&(sn.preventDefault(),Bn.current=!0),Tn.current=yi}var In=Object(k.useRef)(null);In.current={onTouchStart:xn,onTouchMove:Cn,onTouchEnd:wn,onWheel:vi},k.useEffect(function(){function sn(Vt){In.current.onTouchStart(Vt)}function qt(Vt){In.current.onTouchMove(Vt)}function kn(Vt){In.current.onTouchEnd(Vt)}function jn(Vt){In.current.onWheel(Vt)}return document.addEventListener("touchmove",qt,{passive:!1}),document.addEventListener("touchend",kn,{passive:!1}),pe.current.addEventListener("touchstart",sn,{passive:!1}),pe.current.addEventListener("wheel",jn),function(){document.removeEventListener("touchmove",qt),document.removeEventListener("touchend",kn)}},[])}function Ks(){var pe=Object(k.useRef)(new Map);function Ae(ye){return pe.current.has(ye)||pe.current.set(ye,k.createRef()),pe.current.get(ye)}function De(ye){pe.current.delete(ye)}return[Ae,De]}function ja(pe,Ae){var De=k.useRef(pe),ye=k.useState({}),ne=Object(G.a)(ye,2),ce=ne[1];function ae(_e){var Ee=typeof _e=="function"?_e(De.current):_e;Ee!==De.current&&Ae(Ee,De.current),De.current=Ee,ce({})}return[De.current,ae]}var vs=function(Ae){var De=Ae.position,ye=Ae.prefixCls,ne=Ae.extra;if(!ne)return null;var ce,ae=ne;return De==="right"&&(ce=ae.right||!ae.left&&ae||null),De==="left"&&(ce=ae.left||null),ce?k.createElement("div",{className:"".concat(ye,"-extra-content")},ce):null};function Wa(pe,Ae){var De,ye=k.useContext(Ba),ne=ye.prefixCls,ce=ye.tabs,ae=pe.className,_e=pe.style,Ee=pe.id,Ne=pe.animated,Oe=pe.activeKey,He=pe.rtl,$e=pe.extra,vt=pe.editable,gt=pe.locale,Dt=pe.tabPosition,fn=pe.tabBarGutter,Sn=pe.children,_n=pe.onTabClick,xn=pe.onTabScroll,Cn=Object(k.useRef)(),wn=Object(k.useRef)(),Tn=Object(k.useRef)(),Bn=Object(k.useRef)(),Dn=Ks(),vi=Object(G.a)(Dn,2),In=vi[0],sn=vi[1],qt=Dt==="top"||Dt==="bottom",kn=ja(0,function(ei,Pn){qt&&xn&&xn({direction:ei>Pn?"left":"right"})}),jn=Object(G.a)(kn,2),Vt=jn[0],Kn=jn[1],yi=ja(0,function(ei,Pn){!qt&&xn&&xn({direction:ei>Pn?"top":"bottom"})}),Yn=Object(G.a)(yi,2),si=Yn[0],ii=Yn[1],Ri=Object(k.useState)(0),Fi=Object(G.a)(Ri,2),_i=Fi[0],$i=Fi[1],_r=Object(k.useState)(0),ar=Object(G.a)(_r,2),Bi=ar[0],di=ar[1],oi=Object(k.useState)(0),Ei=Object(G.a)(oi,2),bi=Ei[0],Er=Ei[1],kr=Object(k.useState)(0),Pr=Object(G.a)(kr,2),ri=Pr[0],Cr=Pr[1],Nr=Object(k.useState)(null),ui=Object(G.a)(Nr,2),ni=ui[0],ji=ui[1],_s=Object(k.useState)(null),za=Object(G.a)(_s,2),Ur=za[0],ta=za[1],ba=Object(k.useState)(0),Va=Object(G.a)(ba,2),_a=Va[0],Vs=Va[1],Xs=Object(k.useState)(0),Es=Object(G.a)(Xs,2),Xa=Es[0],Ya=Es[1],na=c(new Map),ia=Object(G.a)(na,2),Ys=ia[0],Ea=ia[1],ha=a(ce,Ys,_i),ra="".concat(ne,"-nav-operations-hidden"),aa=0,xr=0;qt?He?(aa=0,xr=Math.max(0,_i-ni)):(aa=Math.min(0,ni-_i),xr=0):(aa=Math.min(0,Ur-Bi),xr=0);function Vr(ei){return ei<aa?[aa,!1]:ei>xr?[xr,!1]:[ei,!0]}var Fr=Object(k.useRef)(),fa=Object(k.useState)(),Xr=Object(G.a)(fa,2),xa=Xr[0],Ja=Xr[1];function Ta(){Ja(Date.now())}function Qa(){window.clearTimeout(Fr.current)}da(Cn,function(ei,Pn){var Wi=!1;function or(sa,Lr){sa(function(ga){var jr=Vr(ga+Lr),Hi=Object(G.a)(jr,2),Ca=Hi[0],qa=Hi[1];return Wi=qa,Ca})}if(qt){if(ni>=_i)return Wi;or(Kn,ei)}else{if(Ur>=Bi)return Wi;or(ii,Pn)}return Qa(),Ta(),Wi}),Object(k.useEffect)(function(){return Qa(),xa&&(Fr.current=window.setTimeout(function(){Ja(0)},100)),Qa},[xa]);function Br(){var ei=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oe,Pn=ha.get(ei);if(!Pn)return;if(qt){var Wi=Vt;He?Pn.right<Vt?Wi=Pn.right:Pn.right+Pn.width>Vt+ni&&(Wi=Pn.right+Pn.width-ni):Pn.left<-Vt?Wi=-Pn.left:Pn.left+Pn.width>-Vt+ni&&(Wi=-(Pn.left+Pn.width-ni)),ii(0),Kn(Vr(Wi)[0])}else{var or=si;Pn.top<-si?or=-Pn.top:Pn.top+Pn.height>-si+Ur&&(or=-(Pn.top+Pn.height-Ur)),Kn(0),ii(Vr(or)[0])}}var Yr=w(ha,{width:ni,height:Ur,left:Vt,top:si},{width:bi,height:ri},{width:_a,height:Xa},Object(V.a)(Object(V.a)({},pe),{},{tabs:ce})),xs=Object(G.a)(Yr,2),Js=xs[0],Qs=xs[1],Zs=ce.map(function(ei){var Pn=ei.key;return k.createElement(l,{id:Ee,prefixCls:ne,key:Pn,rtl:He,tab:ei,closable:ei.closable,editable:vt,active:Pn===Oe,tabPosition:Dt,tabBarGutter:fn,renderWrapper:Sn,removeAriaLabel:gt==null?void 0:gt.removeAriaLabel,ref:In(Pn),onClick:function(or){_n(Pn,or)},onRemove:function(){sn(Pn)},onFocus:function(){Br(Pn),Ta(),He||(Cn.current.scrollLeft=0),Cn.current.scrollTop=0}})}),Za=u(function(){var ei,Pn,Wi,or,sa,Lr,ga,jr,Hi,Ca=((ei=Cn.current)===null||ei===void 0?void 0:ei.offsetWidth)||0,qa=((Pn=Cn.current)===null||Pn===void 0?void 0:Pn.offsetHeight)||0,$a=((Wi=Bn.current)===null||Wi===void 0?void 0:Wi.offsetWidth)||0,lr=((or=Bn.current)===null||or===void 0?void 0:or.offsetHeight)||0,Zn=((sa=Tn.current)===null||sa===void 0?void 0:sa.offsetWidth)||0,wr=((Lr=Tn.current)===null||Lr===void 0?void 0:Lr.offsetHeight)||0;ji(Ca),ta(qa),Vs($a),Ya(lr);var Dr=(((ga=wn.current)===null||ga===void 0?void 0:ga.offsetWidth)||0)-$a,Ir=(((jr=wn.current)===null||jr===void 0?void 0:jr.offsetHeight)||0)-lr;$i(Dr),di(Ir);var es=(Hi=Tn.current)===null||Hi===void 0?void 0:Hi.className.includes(ra);Er(Dr-(es?0:Zn)),Cr(Ir-(es?0:wr)),Ea(function(){var Aa=new Map;return ce.forEach(function(As){var Os=As.key,Qr=In(Os).current;Qr&&Aa.set(Os,{width:Qr.offsetWidth,height:Qr.offsetHeight,left:Qr.offsetLeft,top:Qr.offsetTop})}),Aa})}),qs=ce.slice(0,Js),sr=ce.slice(Qs+1),Ii=[].concat(Object(M.a)(qs),Object(M.a)(sr)),Yi=Object(k.useState)(),Mi=Object(G.a)(Yi,2),pa=Mi[0],$s=Mi[1],Tr=ha.get(Oe),Ts=Object(k.useRef)();function ws(){m.a.cancel(Ts.current)}Object(k.useEffect)(function(){var ei={};return Tr&&(qt?(He?ei.right=Tr.right:ei.left=Tr.left,ei.width=Tr.width):(ei.top=Tr.top,ei.height=Tr.height)),ws(),Ts.current=m()(function(){$s(ei)}),ws},[Tr,qt,He]),Object(k.useEffect)(function(){Br()},[Oe,Tr,ha,qt]),Object(k.useEffect)(function(){Za()},[He,fn,Oe,ce.map(function(ei){return ei.key}).join("_")]);var Ss=!!Ii.length,Jr="".concat(ne,"-nav-wrap"),wa,ma,Cs,Sa;return qt?He?(ma=Vt>0,wa=Vt+ni<_i):(wa=Vt<0,ma=-Vt+ni<_i):(Cs=si<0,Sa=-si+Ur<Bi),k.createElement("div",{ref:Ae,role:"tablist",className:z()("".concat(ne,"-nav"),ae),style:_e,onKeyDown:function(){Ta()}},k.createElement(vs,{position:"left",extra:$e,prefixCls:ne}),k.createElement(g.a,{onResize:Za},k.createElement("div",{className:z()(Jr,(De={},Object(ie.a)(De,"".concat(Jr,"-ping-left"),wa),Object(ie.a)(De,"".concat(Jr,"-ping-right"),ma),Object(ie.a)(De,"".concat(Jr,"-ping-top"),Cs),Object(ie.a)(De,"".concat(Jr,"-ping-bottom"),Sa),De)),ref:Cn},k.createElement(g.a,{onResize:Za},k.createElement("div",{ref:wn,className:"".concat(ne,"-nav-list"),style:{transform:"translate(".concat(Vt,"px, ").concat(si,"px)"),transition:xa?"none":void 0}},Zs,k.createElement(Xi,{ref:Bn,prefixCls:ne,locale:gt,editable:vt,style:{visibility:Ss?"hidden":null}}),k.createElement("div",{className:z()("".concat(ne,"-ink-bar"),Object(ie.a)({},"".concat(ne,"-ink-bar-animated"),Ne.inkBar)),style:pa}))))),k.createElement(vr,Object.assign({},pe,{ref:Tn,prefixCls:ne,tabs:Ii,className:!Ss&&ra})),k.createElement(vs,{position:"right",extra:$e,prefixCls:ne}))}var Ha=k.forwardRef(Wa);function Gs(pe){var Ae=pe.id,De=pe.activeKey,ye=pe.animated,ne=pe.tabPosition,ce=pe.rtl,ae=pe.destroyInactiveTabPane,_e=k.useContext(Ba),Ee=_e.prefixCls,Ne=_e.tabs,Oe=ye.tabPane,He=Ne.findIndex(function($e){return $e.key===De});return k.createElement("div",{className:z()("".concat(Ee,"-content-holder"))},k.createElement("div",{className:z()("".concat(Ee,"-content"),"".concat(Ee,"-content-").concat(ne),Object(ie.a)({},"".concat(Ee,"-content-animated"),Oe)),style:He&&Oe?Object(ie.a)({},ce?"marginRight":"marginLeft","-".concat(He,"00%")):null},Ne.map(function($e){return k.cloneElement($e.node,{key:$e.key,prefixCls:Ee,tabKey:$e.key,id:Ae,animated:Oe,active:$e.key===De,destroyInactiveTabPane:ae})})))}function ys(pe){var Ae=pe.prefixCls,De=pe.forceRender,ye=pe.className,ne=pe.style,ce=pe.id,ae=pe.active,_e=pe.animated,Ee=pe.destroyInactiveTabPane,Ne=pe.tabKey,Oe=pe.children,He=k.useState(De),$e=Object(G.a)(He,2),vt=$e[0],gt=$e[1];k.useEffect(function(){ae?gt(!0):Ee&>(!1)},[ae,Ee]);var Dt={};return ae||(_e?(Dt.visibility="hidden",Dt.height=0,Dt.overflowY="hidden"):Dt.display="none"),k.createElement("div",{id:ce&&"".concat(ce,"-panel-").concat(Ne),role:"tabpanel",tabIndex:ae?0:-1,"aria-labelledby":ce&&"".concat(ce,"-tab-").concat(Ne),"aria-hidden":!ae,style:Object(V.a)(Object(V.a)({},Dt),ne),className:z()("".concat(Ae,"-tabpane"),ae&&"".concat(Ae,"-tabpane-active"),ye)},(ae||vt||De)&&Oe)}var Ka=0;function bs(pe){return Object(K.a)(pe).map(function(Ae){if(k.isValidElement(Ae)){var De=Ae.key!==void 0?String(Ae.key):void 0;return Object(V.a)(Object(V.a)({key:De},Ae.props),{},{node:Ae})}return null}).filter(function(Ae){return Ae})}function zs(pe,Ae){var De,ye=pe.id,ne=pe.prefixCls,ce=ne===void 0?"rc-tabs":ne,ae=pe.className,_e=pe.children,Ee=pe.direction,Ne=pe.activeKey,Oe=pe.defaultActiveKey,He=pe.editable,$e=pe.animated,vt=pe.tabPosition,gt=vt===void 0?"top":vt,Dt=pe.tabBarGutter,fn=pe.tabBarStyle,Sn=pe.tabBarExtraContent,_n=pe.locale,xn=pe.moreIcon,Cn=pe.moreTransitionName,wn=pe.destroyInactiveTabPane,Tn=pe.renderTabBar,Bn=pe.onChange,Dn=pe.onTabClick,vi=pe.onTabScroll,In=Object(P.a)(pe,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),sn=bs(_e),qt=Ee==="rtl",kn;$e===!1?kn={inkBar:!1,tabPane:!1}:kn=Object(V.a)({inkBar:!0,tabPane:!1},$e!==!0?$e:null);var jn=Object(k.useState)(!1),Vt=Object(G.a)(jn,2),Kn=Vt[0],yi=Vt[1];Object(k.useEffect)(function(){yi(gs())},[]);var Yn=Object(n.a)(function(){var ri;return(ri=sn[0])===null||ri===void 0?void 0:ri.key},{value:Ne,defaultValue:Oe}),si=Object(G.a)(Yn,2),ii=si[0],Ri=si[1],Fi=Object(k.useState)(function(){return sn.findIndex(function(ri){return ri.key===ii})}),_i=Object(G.a)(Fi,2),$i=_i[0],_r=_i[1];Object(k.useEffect)(function(){var ri=sn.findIndex(function(Nr){return Nr.key===ii});if(ri===-1){var Cr;ri=Math.max(0,Math.min($i,sn.length-1)),Ri((Cr=sn[ri])===null||Cr===void 0?void 0:Cr.key)}_r(ri)},[sn.map(function(ri){return ri.key}).join("_"),ii,$i]);var ar=Object(n.a)(null,{value:ye}),Bi=Object(G.a)(ar,2),di=Bi[0],oi=Bi[1],Ei=gt;Kn&&!["left","right"].includes(gt)&&(Ei="top"),Object(k.useEffect)(function(){ye||(oi("rc-tabs-".concat(Ka)),Ka+=1)},[]);function bi(ri,Cr){Dn==null||Dn(ri,Cr),Ri(ri),Bn==null||Bn(ri)}var Er={id:di,activeKey:ii,animated:kn,tabPosition:Ei,rtl:qt,mobile:Kn},kr,Pr=Object(V.a)(Object(V.a)({},Er),{},{editable:He,locale:_n,moreIcon:xn,moreTransitionName:Cn,tabBarGutter:Dt,onTabClick:bi,onTabScroll:vi,extra:Sn,style:fn,panes:_e});return Tn?kr=Tn(Pr,Ha):kr=k.createElement(Ha,Object.assign({},Pr)),k.createElement(Ba.Provider,{value:{tabs:sn,prefixCls:ce}},k.createElement("div",Object.assign({ref:Ae,id:ye,className:z()(ce,"".concat(ce,"-").concat(Ei),(De={},Object(ie.a)(De,"".concat(ce,"-mobile"),Kn),Object(ie.a)(De,"".concat(ce,"-editable"),He),Object(ie.a)(De,"".concat(ce,"-rtl"),qt),De),ae)},In),kr,k.createElement(Gs,Object.assign({destroyInactiveTabPane:wn},Er,{animated:kn}))))}var ea=k.forwardRef(zs);ea.TabPane=ys;var Rr=ea,Ga=ve.b=Rr},kSUc:function(it,ve,W){},kqOp:function(it,ve,W){"use strict";W.d(ve,"a",function(){return M});var ie=W("0Owb"),G=W("fWQN"),P=W("mtLc"),V=W("yKVA"),k=W("879j"),B=W("q1tI"),z=W.n(B),K=W("Ot1p"),n="\u2581",M=function(y){Object(V.a)(g,y);var m=Object(k.a)(g);function g(){var u;Object(G.a)(this,g);for(var c=arguments.length,f=new Array(c),o=0;o<c;o++)f[o]=arguments[o];return u=m.call.apply(m,[this].concat(f)),u.getChCountBeforeCursor=function(l,s){for(var a=s.line,O=0,w=0;w<a;w++)O+=l.getLine(w).split(n).length-1;var S=l.getLine(a).substring(0,s.ch);return O+=S.split(n).length-1,O},u.onCMBeforeChange=function(l,s){var a=l.getRange(s.from,s.to),O=0;if(s.text.forEach(function(D){O+=D.split(n).length-1}),a&&a.indexOf(n)!=-1){var w=a.split(n).length-1,S=u.getChCountBeforeCursor(l,s.from);console.log("\u5220\u9664".concat(w,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(S,"\u4E2A\uFF0C\u65B0\u589E").concat(O,"\u4E2A")),u.props.deleteEmptyDisabled?s.cancel():u.props.onPlaceholderChange&&u.props.onPlaceholderChange(S,w,O)}else if(O){var L=u.getChCountBeforeCursor(l,s.from);console.log("\u65B0\u589E".concat(O,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(L,"\u4E2A")),u.props.onPlaceholderChange&&u.props.onPlaceholderChange(L,0,O)}},u}return Object(P.a)(g,[{key:"render",value:function(){return z.a.createElement(K.a,Object(ie.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),g}(B.Component)},lZu9:function(it,ve,W){(function(ie){ie(W("VrN/"),W("1eCo"),W("8EBN"))})(function(ie){"use strict";ie.defineMode("markdown",function(G,P){var V=ie.getMode(G,"text/html"),k=V.name=="null";function B(U){if(ie.findModeByName){var b=ie.findModeByName(U);b&&(U=b.mime||b.mimes[0])}var Q=ie.getMode(G,U);return Q.name=="null"?null:Q}P.highlightFormatting===void 0&&(P.highlightFormatting=!1),P.maxBlockquoteDepth===void 0&&(P.maxBlockquoteDepth=0),P.taskLists===void 0&&(P.taskLists=!1),P.strikethrough===void 0&&(P.strikethrough=!1),P.emoji===void 0&&(P.emoji=!1),P.fencedCodeBlockHighlighting===void 0&&(P.fencedCodeBlockHighlighting=!0),P.fencedCodeBlockDefaultMode===void 0&&(P.fencedCodeBlockDefaultMode="text/plain"),P.xml===void 0&&(P.xml=!0),P.tokenTypeOverrides===void 0&&(P.tokenTypeOverrides={});var z={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 K in z)z.hasOwnProperty(K)&&P.tokenTypeOverrides[K]&&(z[K]=P.tokenTypeOverrides[K]);var n=/^([*\-_])(?:\s*\1){2,}\s*$/,M=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=P.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,g=/^ {0,3}(?:\={1,}|-{2,})\s*$/,u=/^[^#!\[\]*_\\<>` "'(~:]+/,c=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,o=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,l=" ";function s(U,b,Q){return b.f=b.inline=Q,Q(U,b)}function a(U,b,Q){return b.f=b.block=Q,Q(U,b)}function O(U){return!U||!/\S/.test(U.string)}function w(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==L){var b=k;if(!b){var Q=ie.innerMode(V,U.htmlState);b=Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText}b&&(U.f=x,U.block=S,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function S(U,b){var Q=U.column()===b.indentation,ee=O(b.prevLine.stream),oe=b.indentedCode,fe=b.prevLine.hr,Fe=b.list!==!1,Le=(b.listStack[b.listStack.length-1]||0)+3;b.indentedCode=!1;var Ie=b.indentation;if(b.indentationDiff===null&&(b.indentationDiff=b.indentation,Fe)){for(b.list=null;Ie<b.listStack[b.listStack.length-1];)b.listStack.pop(),b.listStack.length?b.indentation=b.listStack[b.listStack.length-1]:b.list=!1;b.list!==!1&&(b.indentationDiff=Ie-b.listStack[b.listStack.length-1])}var Be=!ee&&!fe&&!b.prevLine.header&&(!Fe||!oe)&&!b.prevLine.fencedCodeEnd,We=(b.list===!1||fe||ee)&&b.indentation<=Le&&U.match(n),ge=null;if(b.indentationDiff>=4&&(oe||b.prevLine.fencedCodeEnd||b.prevLine.header||ee))return U.skipToEnd(),b.indentedCode=!0,z.code;if(U.eatSpace())return null;if(Q&&b.indentation<=Le&&(ge=U.match(m))&&ge[1].length<=6)return b.quote=0,b.header=ge[1].length,b.thisLine.header=!0,P.highlightFormatting&&(b.formatting="header"),b.f=b.inline,A(b);if(b.indentation<=Le&&U.eat(">"))return b.quote=Q?1:b.quote+1,P.highlightFormatting&&(b.formatting="quote"),U.eatSpace(),A(b);if(!We&&!b.setext&&Q&&b.indentation<=Le&&(ge=U.match(M))){var ue=ge[1]?"ol":"ul";return b.indentation=Ie+U.current().length,b.list=!0,b.quote=0,b.listStack.push(b.indentation),b.em=!1,b.strong=!1,b.code=!1,b.strikethrough=!1,P.taskLists&&U.match(y,!1)&&(b.taskList=!0),b.f=b.inline,P.highlightFormatting&&(b.formatting=["list","list-"+ue]),A(b)}else{if(Q&&b.indentation<=Le&&(ge=U.match(c,!0)))return b.quote=0,b.fencedEndRE=new RegExp(ge[1]+"+ *$"),b.localMode=P.fencedCodeBlockHighlighting&&B(ge[2]||P.fencedCodeBlockDefaultMode),b.localMode&&(b.localState=ie.startState(b.localMode)),b.f=b.block=D,P.highlightFormatting&&(b.formatting="code-block"),b.code=-1,A(b);if(b.setext||(!Be||!Fe)&&!b.quote&&b.list===!1&&!b.code&&!We&&!f.test(U.string)&&(ge=U.lookAhead(1))&&(ge=ge.match(g)))return b.setext?(b.header=b.setext,b.setext=0,U.skipToEnd(),P.highlightFormatting&&(b.formatting="header")):(b.header=ge[0].charAt(0)=="="?1:2,b.setext=b.header),b.thisLine.header=!0,b.f=b.inline,A(b);if(We)return U.skipToEnd(),b.hr=!0,b.thisLine.hr=!0,z.hr;if(U.peek()==="[")return s(U,b,C)}return s(U,b,b.inline)}function L(U,b){var Q=V.token(U,b.htmlState);if(!k){var ee=ie.innerMode(V,b.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||b.md_inside&&U.current().indexOf(">")>-1)&&(b.f=x,b.block=S,b.htmlState=null)}return Q}function D(U,b){var Q=b.listStack[b.listStack.length-1]||0,ee=b.indentation<Q,oe=Q+3;if(b.fencedEndRE&&b.indentation<=oe&&(ee||U.match(b.fencedEndRE))){P.highlightFormatting&&(b.formatting="code-block");var fe;return ee||(fe=A(b)),b.localMode=b.localState=null,b.block=S,b.f=x,b.fencedEndRE=null,b.code=0,b.thisLine.fencedCodeEnd=!0,ee?a(U,b,b.block):fe}else return b.localMode?b.localMode.token(U,b.localState):(U.skipToEnd(),z.code)}function A(U){var b=[];if(U.formatting){b.push(z.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var Q=0;Q<U.formatting.length;Q++)b.push(z.formatting+"-"+U.formatting[Q]),U.formatting[Q]==="header"&&b.push(z.formatting+"-"+U.formatting[Q]+"-"+U.header),U.formatting[Q]==="quote"&&(!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=U.quote?b.push(z.formatting+"-"+U.formatting[Q]+"-"+U.quote):b.push("error"))}if(U.taskOpen)return b.push("meta"),b.length?b.join(" "):null;if(U.taskClosed)return b.push("property"),b.length?b.join(" "):null;if(U.linkHref?b.push(z.linkHref,"url"):(U.strong&&b.push(z.strong),U.em&&b.push(z.em),U.strikethrough&&b.push(z.strikethrough),U.emoji&&b.push(z.emoji),U.linkText&&b.push(z.linkText),U.code&&b.push(z.code),U.image&&b.push(z.image),U.imageAltText&&b.push(z.imageAltText,"link"),U.imageMarker&&b.push(z.imageMarker)),U.header&&b.push(z.header,z.header+"-"+U.header),U.quote&&(b.push(z.quote),!P.maxBlockquoteDepth||P.maxBlockquoteDepth>=U.quote?b.push(z.quote+"-"+U.quote):b.push(z.quote+"-"+P.maxBlockquoteDepth)),U.list!==!1){var ee=(U.listStack.length-1)%3;ee?ee===1?b.push(z.list2):b.push(z.list3):b.push(z.list1)}return U.trailingSpaceNewLine?b.push("trailing-space-new-line"):U.trailingSpace&&b.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function T(U,b){return U.match(u,!0)?A(b):void 0}function x(U,b){var Q=b.text(U,b);if(typeof Q!="undefined")return Q;if(b.list)return b.list=null,A(b);if(b.taskList){var ee=U.match(y,!0)[1]===" ";return ee?b.taskOpen=!0:b.taskClosed=!0,P.highlightFormatting&&(b.formatting="task"),b.taskList=!1,A(b)}if(b.taskOpen=!1,b.taskClosed=!1,b.header&&U.match(/^#+$/,!0))return P.highlightFormatting&&(b.formatting="header"),A(b);var oe=U.next();if(b.linkTitle){b.linkTitle=!1;var fe=oe;oe==="("&&(fe=")"),fe=(fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Fe="^\\s*(?:[^"+fe+"\\\\]+|\\\\\\\\|\\\\.)"+fe;if(U.match(new RegExp(Fe),!0))return z.linkHref}if(oe==="`"){var Le=b.formatting;P.highlightFormatting&&(b.formatting="code"),U.eatWhile("`");var Ie=U.current().length;if(b.code==0&&(!b.quote||Ie==1))return b.code=Ie,A(b);if(Ie==b.code){var Be=A(b);return b.code=0,Be}else return b.formatting=Le,A(b)}else if(b.code)return A(b);if(oe==="\\"&&(U.next(),P.highlightFormatting)){var We=A(b),ge=z.formatting+"-escape";return We?We+" "+ge:ge}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return b.imageMarker=!0,b.image=!0,P.highlightFormatting&&(b.formatting="image"),A(b);if(oe==="["&&b.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return b.imageMarker=!1,b.imageAltText=!0,P.highlightFormatting&&(b.formatting="image"),A(b);if(oe==="]"&&b.imageAltText){P.highlightFormatting&&(b.formatting="image");var We=A(b);return b.imageAltText=!1,b.image=!1,b.inline=b.f=E,We}if(oe==="["&&!b.image)return b.linkText&&U.match(/^.*?\]/)||(b.linkText=!0,P.highlightFormatting&&(b.formatting="link")),A(b);if(oe==="]"&&b.linkText){P.highlightFormatting&&(b.formatting="link");var We=A(b);return b.linkText=!1,b.inline=b.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?E:x,We}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=d,P.highlightFormatting&&(b.formatting="link");var We=A(b);return We?We+=" ":We="",We+z.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){b.f=b.inline=d,P.highlightFormatting&&(b.formatting="link");var We=A(b);return We?We+=" ":We="",We+z.linkEmail}if(P.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ue=U.string.indexOf(">",U.pos);if(ue!=-1){var ke=U.string.substring(U.start,ue);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ke)&&(b.md_inside=!0)}return U.backUp(1),b.htmlState=ie.startState(V),a(U,b,L)}if(P.xml&&oe==="<"&&U.match(/^\/\w*?>/))return b.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var lt=1,ot=U.pos==1?" ":U.string.charAt(U.pos-2);lt<3&&U.eat(oe);)lt++;var ut=U.peek()||" ",xt=!/\s/.test(ut)&&(!o.test(ut)||/\s/.test(ot)||o.test(ot)),Je=!/\s/.test(ot)&&(!o.test(ot)||/\s/.test(ut)||o.test(ut)),et=null,dt=null;if(lt%2&&(!b.em&&xt&&(oe==="*"||!Je||o.test(ot))?et=!0:b.em==oe&&Je&&(oe==="*"||!xt||o.test(ut))&&(et=!1)),lt>1&&(!b.strong&&xt&&(oe==="*"||!Je||o.test(ot))?dt=!0:b.strong==oe&&Je&&(oe==="*"||!xt||o.test(ut))&&(dt=!1)),dt!=null||et!=null){P.highlightFormatting&&(b.formatting=et==null?"strong":dt==null?"em":"strong em"),et===!0&&(b.em=oe),dt===!0&&(b.strong=oe);var Be=A(b);return et===!1&&(b.em=!1),dt===!1&&(b.strong=!1),Be}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return A(b);U.backUp(1)}if(P.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(b.strikethrough){P.highlightFormatting&&(b.formatting="strikethrough");var Be=A(b);return b.strikethrough=!1,Be}else if(U.match(/^[^\s]/,!1))return b.strikethrough=!0,P.highlightFormatting&&(b.formatting="strikethrough"),A(b)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return A(b);U.backUp(2)}}if(P.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){b.emoji=!0,P.highlightFormatting&&(b.formatting="emoji");var de=A(b);return b.emoji=!1,de}return oe===" "&&(U.match(/^ +$/,!1)?b.trailingSpace++:b.trailingSpace&&(b.trailingSpaceNewLine=!0)),A(b)}function d(U,b){var Q=U.next();if(Q===">"){b.f=b.inline=x,P.highlightFormatting&&(b.formatting="link");var ee=A(b);return ee?ee+=" ":ee="",ee+z.linkInline}return U.match(/^[^>]+/,!0),z.linkInline}function E(U,b){if(U.eatSpace())return null;var Q=U.next();return Q==="("||Q==="["?(b.f=b.inline=v(Q==="("?")":"]"),P.highlightFormatting&&(b.formatting="link-string"),b.linkHref=!0,A(b)):"error"}var p={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(U){return function(b,Q){var ee=b.next();if(ee===U){Q.f=Q.inline=x,P.highlightFormatting&&(Q.formatting="link-string");var oe=A(Q);return Q.linkHref=!1,oe}return b.match(p[U]),Q.linkHref=!0,A(Q)}}function C(U,b){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(b.f=F,U.next(),P.highlightFormatting&&(b.formatting="link"),b.linkText=!0,A(b)):s(U,b,x)}function F(U,b){if(U.match(/^\]:/,!0)){b.f=b.inline=R,P.highlightFormatting&&(b.formatting="link");var Q=A(b);return b.linkText=!1,Q}return U.match(/^([^\]\\]|\\.)+/,!0),z.linkText}function R(U,b){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?b.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=x,z.linkHref+" url")}var j={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:x,text:T,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&ie.copyState(V,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?ie.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,b){if(b.formatting=!1,U!=b.thisLine.stream){if(b.header=0,b.hr=!1,U.match(/^\s*$/,!0))return w(b),null;if(b.prevLine=b.thisLine,b.thisLine={stream:U},b.taskList=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,!b.localState&&(b.f=b.block,b.f!=L)){var Q=U.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(b.indentation=Q,b.indentationDiff=null,Q>0)return null}}return b.f(U,b)},innerMode:function(U){return U.block==L?{state:U.htmlState,mode:V}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:j}},indent:function(U,b,Q){return U.block==L&&V.indent?V.indent(U.htmlState,b,Q):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,b,Q):ie.Pass},blankLine:w,getType:A,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return j},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},nEHx:function(it,ve,W){"use strict";W.d(ve,"a",function(){return ie});var ie;(function(G){G.DARK="dark",G.LIGHT="light",G.HIGH_CONTRAST="hc"})(ie||(ie={}))},nnTU:function(it,ve,W){"use strict";W.d(ve,"b",function(){return z}),W.d(ve,"a",function(){return K});var ie=W("MI8n"),G=W("JYp7"),P=W("pmY6"),V=W("24hK"),k=W("746U"),B=W("Cg/j");const z=Object(B.c)("commandService"),K=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ie.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,M){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!M)throw new Error("invalid command");return this.registerCommand({id:n,handler:M})}if(n.description){const c=[];for(let o of n.description.args)c.push(o.constraint);const f=n.handler;n.handler=function(o,...l){return Object(k.o)(l,c),f(o,...l)}}const{id:y}=n;let m=this._commands.get(y);m||(m=new V.a,this._commands.set(y,m));let g=m.unshift(n),u=Object(P.i)(()=>{g();const c=this._commands.get(y);(c==null?void 0:c.isEmpty())&&this._commands.delete(y)});return this._onDidRegisterCommand.fire(y),u}registerCommandAlias(n,M){return K.registerCommand(n,(y,...m)=>y.get(z).executeCommand(M,...m))}getCommand(n){const M=this._commands.get(n);return!M||M.isEmpty()?void 0:G.a.first(M)}getCommands(){const n=new Map;for(const M of this._commands.keys()){const y=this.getCommand(M);y&&n.set(M,y)}return n}};K.registerCommand("noop",()=>{})},osHv:function(it,ve,W){(function(ie){ie(W("VrN/"))})(function(ie){"use strict";var G=ie.Pos;function P(o,l){return o.line-l.line||o.ch-l.ch}var V="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",k=V+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B=new RegExp("<(/?)(["+V+"]["+k+"]*)","g");function z(o,l,s,a){this.line=l,this.ch=s,this.cm=o,this.text=o.getLine(l),this.min=a?Math.max(a.from,o.firstLine()):o.firstLine(),this.max=a?Math.min(a.to-1,o.lastLine()):o.lastLine()}function K(o,l){var s=o.cm.getTokenTypeAt(G(o.line,l));return s&&/\btag\b/.test(s)}function n(o){return o.line>=o.max?void 0:(o.ch=0,o.text=o.cm.getLine(++o.line),!0)}function M(o){return o.line<=o.min?void 0:(o.text=o.cm.getLine(--o.line),o.ch=o.text.length,!0)}function y(o){for(;;){var l=o.text.indexOf(">",o.ch);if(l==-1){if(n(o))continue;return}if(!K(o,l+1)){o.ch=l+1;continue}var s=o.text.lastIndexOf("/",l),a=s>-1&&!/\S/.test(o.text.slice(s+1,l));return o.ch=l+1,a?"selfClose":"regular"}}function m(o){for(;;){var l=o.ch?o.text.lastIndexOf("<",o.ch-1):-1;if(l==-1){if(M(o))continue;return}if(!K(o,l+1)){o.ch=l;continue}B.lastIndex=l,o.ch=l;var s=B.exec(o.text);if(s&&s.index==l)return s}}function g(o){for(;;){B.lastIndex=o.ch;var l=B.exec(o.text);if(!l){if(n(o))continue;return}if(!K(o,l.index+1)){o.ch=l.index+1;continue}return o.ch=l.index+l[0].length,l}}function u(o){for(;;){var l=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(l==-1){if(M(o))continue;return}if(!K(o,l+1)){o.ch=l;continue}var s=o.text.lastIndexOf("/",l),a=s>-1&&!/\S/.test(o.text.slice(s+1,l));return o.ch=l+1,a?"selfClose":"regular"}}function c(o,l){for(var s=[];;){var a=g(o),O,w=o.line,S=o.ch-(a?a[0].length:0);if(!a||!(O=y(o)))return;if(O=="selfClose")continue;if(a[1]){for(var L=s.length-1;L>=0;--L)if(s[L]==a[2]){s.length=L;break}if(L<0&&(!l||l==a[2]))return{tag:a[2],from:G(w,S),to:G(o.line,o.ch)}}else s.push(a[2])}}function f(o,l){for(var s=[];;){var a=u(o);if(!a)return;if(a=="selfClose"){m(o);continue}var O=o.line,w=o.ch,S=m(o);if(!S)return;if(S[1])s.push(S[2]);else{for(var L=s.length-1;L>=0;--L)if(s[L]==S[2]){s.length=L;break}if(L<0&&(!l||l==S[2]))return{tag:S[2],from:G(o.line,o.ch),to:G(O,w)}}}}ie.registerHelper("fold","xml",function(o,l){for(var s=new z(o,l.line,0);;){var a=g(s);if(!a||s.line!=l.line)return;var O=y(s);if(!O)return;if(!a[1]&&O!="selfClose"){var w=G(s.line,s.ch),S=c(s,a[2]);return S&&P(S.from,w)>0?{from:w,to:S.from}:null}}}),ie.findMatchingTag=function(o,l,s){var a=new z(o,l.line,l.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var O=y(a),w=O&&G(a.line,a.ch),S=O&&m(a);if(!O||!S||P(a,l)>0)return;var L={from:G(a.line,a.ch),to:w,tag:S[2]};return O=="selfClose"?{open:L,close:null,at:"open"}:S[1]?{open:f(a,S[2]),close:L,at:"close"}:(a=new z(o,w.line,w.ch,s),{open:L,close:c(a,S[2]),at:"open"})},ie.findEnclosingTag=function(o,l,s,a){for(var O=new z(o,l.line,l.ch,s);;){var w=f(O,a);if(!w)break;var S=new z(o,l.line,l.ch,s),L=c(S,w.tag);if(L)return{open:w,close:L}}},ie.scanForClosingTag=function(o,l,s,a){var O=new z(o,l.line,l.ch,a?{from:0,to:a}:null);return c(O,s)}})},p5ED:function(it,ve,W){"use strict";var ie=W("+L6B"),G=W("2/Rp"),P=W("5Dmo"),V=W("3S7+"),k=W("k1fw"),B=W("9og8"),z=W("tJVT"),K=W("WmNS"),n=W.n(K),M=W("q1tI"),y=W.n(M),m=W("vHTk"),g=W.n(m),u=W("yEEn"),c=W("ZW9T"),f=W("1vsH"),o=W("V0Rq"),l=W("m3rI");ve.a=function(s){var a,O,w,S,L,D,A,T=s.editOffice,x=T===void 0?"view":T,d=s.data,E=s.theme,p=s.type,v=s.filename,C=s.monacoEditor,F=s.className,R=s.style,j=s.close,U=s.onClose,b=s.hasMask,Q=s.disabledDownload,ee=Object(M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(z.a)(ee,2),fe=oe[0],Fe=oe[1],Le=Object(M.useState)(""),Ie=Object(z.a)(Le,2),Be=Ie[0],We=Ie[1],ge=Object(M.useState)(),ue=Object(z.a)(ge,2),ke=ue[0],lt=ue[1],ot=window.ENV==="build"?"/react/build":"",ut=l.a.PROXY_SERVER||location.origin,xt,Je=1024*1024,et=10*Je,dt=Object(M.useRef)();(a=d)!==null&&a!==void 0&&a.startsWith("/api")&&p!=="txt"&&(d=l.a.API_SERVER+d),p==="office"&&(xt=Object(f.T)(d).filesize,xt>et&&(p="other")),v&&C&&(C.filename=v),Object(M.useEffect)(function(){var Ke,st,ht=(Ke=document.cookie)===null||Ke===void 0||((st=Ke.replace(/\s/g,""))===null||st===void 0)?void 0:st.split(";");ht==null||ht.map(function(yt){var mt=yt.split("=");mt[0]==="_educoder_session"&&We(mt[1])})},[]),Object(M.useEffect)(function(){p==="office"&&de()},[p,d]);var de=function(){var Ke=Object(B.a)(n.a.mark(function st(){var ht,yt,mt;return n.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return console.log("data:",d),ht=d,d.startsWith("http")||(ht=location.origin+ht),yt=new URL(ht).pathname.split("/").pop(),Tt.next=6,Object(o.W)({attachment_id:yt});case 6:mt=Tt.sent,lt(mt);case 8:case"end":return Tt.stop()}},st)}));return function(){return Ke.apply(this,arguments)}}(),Ce=function(){if(d.startsWith("http")||d.startsWith("blob:")){Ue();return}Object(f.z)(v||"educoder",d,v)},Ue=function(){Object(f.x)(v||"educoder",decodeURIComponent(d))};return y.a.createElement("div",{style:Object(k.a)({},R||{}),className:"".concat(b&&g.a.bgBlack," ").concat(p?g.a.wrp:"hide")},j&&y.a.createElement("div",{className:g.a.close,ref:dt},!Q&&y.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return dt.current}},y.a.createElement("span",{onClick:Ue},y.a.createElement("i",{className:"icon-quxiaozhiding"}))),y.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return dt.current}},y.a.createElement("span",{className:"",onClick:U},y.a.createElement("i",{className:"icon-guanbi1"})))),y.a.createElement("div",{className:"".concat(g.a[F]," ").concat(F," ").concat(g.a.monaco," ").concat(p==="txt"?"show":"hide")},p==="txt"&&y.a.createElement(c.b,C)),p==="audio"&&y.a.createElement("audio",{src:"".concat(((O=d)===null||O===void 0?void 0:O.indexOf("http://"))>-1||((w=d)===null||w===void 0?void 0:w.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(d),autoPlay:!0}),p==="video"&&y.a.createElement(y.a.Fragment,null,((S=d)===null||S===void 0?void 0:S.indexOf("http"))>-1?y.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):y.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),p==="office"&&ke&&y.a.createElement("iframe",{src:"".concat(ot,"/office.html?key=").concat(ke.key,"&url=").concat(ut+ke.url,"&callbackUrl=").concat(ut+ke.callbackUrl,"&fileType=").concat(ke.fileType,"&title=").concat(ke.title,"&model=").concat(x,"&officeServer=").concat(l.a.OFFICE_SERVER,"&disabledDownload=").concat(!!Q)}),p==="html"&&y.a.createElement("iframe",{src:d+"&disposition=inline"}),p==="pdf"&&y.a.createElement("iframe",{src:"".concat(ot,"/js/pdfview/index.html?url=").concat(d,"&disabledDownload=").concat(!!Q)}),p==="image"&&y.a.createElement("img",{src:"".concat(((L=d)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((D=d)===null||D===void 0?void 0:D.indexOf("https://"))>-1||(A=d)!==null&&A!==void 0&&A.startsWith("/api")?"":"data:image/png;base64,").concat(d)}),p==="other"&&y.a.createElement("div",null,y.a.createElement(G.a,{type:"primary",size:"large",onClick:Ce},y.a.createElement(u.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),p==="download"&&y.a.createElement(G.a,{type:"primary",size:"large",onClick:Ce},y.a.createElement(u.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(it,ve,W){},pmY6:function(it,ve,W){"use strict";W.d(ve,"h",function(){return M}),W.d(ve,"g",function(){return m}),W.d(ve,"f",function(){return g}),W.d(ve,"e",function(){return u}),W.d(ve,"i",function(){return c}),W.d(ve,"b",function(){return f}),W.d(ve,"a",function(){return o}),W.d(ve,"d",function(){return l}),W.d(ve,"c",function(){return s});var ie=W("C/vA"),G=W("JYp7");const P=!1;let V=null;function k(a){V=a}if(P){const a="__is_disposable_tracked__";k(new class{trackDisposable(O){const w=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[a]||console.log(w)},3e3)}setParent(O,w){if(O&&O!==o.None)try{O[a]=!0}catch(S){}}markAsDisposed(O){if(O&&O!==o.None)try{O[a]=!0}catch(w){}}markAsSingleton(O){}})}function B(a){return V==null||V.trackDisposable(a),a}function z(a){V==null||V.markAsDisposed(a)}function K(a,O){V==null||V.setParent(a,O)}function n(a,O){if(!V)return;for(const w of a)V.setParent(w,O)}function M(a){return V==null||V.markAsSingleton(a),a}class y extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function g(a){if(G.a.is(a)){let O=[];for(const w of a)if(w)try{w.dispose()}catch(S){O.push(S)}if(O.length===1)throw O[0];if(O.length>1)throw new y(O);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function u(...a){const O=c(()=>g(a));return n(a,O),O}function c(a){const O=B({dispose:Object(ie.a)(()=>{z(O),a()})});return O}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,B(this)}dispose(){if(this._isDisposed)return;z(this),this._isDisposed=!0,this.clear()}clear(){try{g(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return K(a,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(a),a}}f.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new f,B(this),K(this._store,this)}dispose(){z(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}o.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,B(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var O;if(this._isDisposed||a===this._value)return;(O=this._value)===null||O===void 0||O.dispose(),a&&K(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,z(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&K(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(it,ve,W){var ie,G;(function(){var P;(function(){"use strict";var z=[,,function(y){function m(c){this.__parent=c,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}m.prototype.clone_empty=function(){var c=new m(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},m.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},m.prototype.has_match=function(c){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(c))return!0;return!1},m.prototype.set_indent=function(c,f){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.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)},m.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},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(c){this.__items.push(c);var f=c.lastIndexOf(`
|
|
`);f!==-1?this.__character_count=c.length-f:this.__character_count+=c.length},m.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function g(c,f){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),f=f||"",c.indent_level>0&&(f=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}g.prototype.get_indent_size=function(c,f){var o=this.__base_string_length;return f=f||0,c<0&&(o=0),o+=c*this.__indent_size,o+=f,o},g.prototype.get_indent_string=function(c,f){var o=this.__base_string;return f=f||0,c<0&&(c=0,o=""),f+=c*this.__indent_size,this.__ensure_cache(f),o+=this.__cache[f],o},g.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var c=this.__cache.length,f=0,o="";this.__indent_size&&c>=this.__indent_size&&(f=Math.floor(c/this.__indent_size),c-=f*this.__indent_size,o=new Array(f+1).join(this.__indent_string)),c&&(o+=new Array(c+1).join(" ")),this.__cache.push(o)};function u(c,f){this.__indent_cache=new g(c,f),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(c,f){return this.__indent_cache.get_indent_string(c,f)},u.prototype.get_indent_size=function(c,f){return this.__indent_cache.get_indent_size(c,f)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(c){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return c!==`
|
|
`&&(o=o.replace(/[\n]/g,c)),o},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(c,f){return c=c||0,f=f||0,this.next_line.set_indent(c,f),this.__lines.length>1?(this.current_line.set_indent(c,f),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(c){for(var f=0;f<c.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},u.prototype.remove_indent=function(c){for(var f=this.__lines.length;c<f;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(c,f){for(var o=this.__lines.length-2;o>=0;){var l=this.__lines[o];if(l.is_empty())break;if(l.item(0).indexOf(c)!==0&&l.item(-1)!==f){this.__lines.splice(o+1,0,new m(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},y.exports.Output=u},function(y){function m(g,u,c,f){this.type=g,this.text=u,this.comments_before=null,this.newlines=c||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}y.exports.Token=m},,,function(y){function m(c,f){this.raw_options=g(c,f),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}m.prototype._get_array=function(c,f){var o=this.raw_options[c],l=f||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(l=o.concat()):typeof o=="string"&&(l=o.split(/[^a-zA-Z0-9_\/\-]+/)),l},m.prototype._get_boolean=function(c,f){var o=this.raw_options[c],l=o===void 0?!!f:!!o;return l},m.prototype._get_characters=function(c,f){var o=this.raw_options[c],l=f||"";return typeof o=="string"&&(l=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),l},m.prototype._get_number=function(c,f){var o=this.raw_options[c];f=parseInt(f,10),isNaN(f)&&(f=0);var l=parseInt(o,10);return isNaN(l)&&(l=f),l},m.prototype._get_selection=function(c,f,o){var l=this._get_selection_list(c,f,o);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values:
|
|
`+f+`
|
|
You passed in: '`+this.raw_options[c]+"'");return l[0]},m.prototype._get_selection_list=function(c,f,o){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[f[0]],!this._is_valid_selection(o,f))throw new Error("Invalid Default Value!");var l=this._get_array(c,o);if(!this._is_valid_selection(l,f))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values:
|
|
`+f+`
|
|
You passed in: '`+this.raw_options[c]+"'");return l},m.prototype._is_valid_selection=function(c,f){return c.length&&f.length&&!c.some(function(o){return f.indexOf(o)===-1})};function g(c,f){var o={};c=u(c);var l;for(l in c)l!==f&&(o[l]=c[l]);if(f&&c[f])for(l in c[f])o[l]=c[f][l];return o}function u(c){var f={},o;for(o in c){var l=o.replace(/-/g,"_");f[l]=c[o]}return f}y.exports.Options=m,y.exports.normalizeOpts=u,y.exports.mergeOpts=g},,function(y){var m=RegExp.prototype.hasOwnProperty("sticky");function g(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},g.prototype.peek=function(u){var c=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(c=this.__input.charAt(u)),c},g.prototype.__match=function(u,c){u.lastIndex=c;var f=u.exec(this.__input);return f&&!(m&&u.sticky)&&(f.index!==c&&(f=null)),f},g.prototype.test=function(u,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(u,c):!1},g.prototype.testChar=function(u,c){var f=this.peek(c);return u.lastIndex=0,f!==null&&u.test(f)},g.prototype.match=function(u){var c=this.__match(u,this.__position);return c?this.__position+=c[0].length:c=null,c},g.prototype.read=function(u,c,f){var o="",l;return u&&(l=this.match(u),l&&(o+=l[0])),c&&(l||!u)&&(o+=this.readUntil(c,f)),o},g.prototype.readUntil=function(u,c){var f="",o=this.__position;u.lastIndex=this.__position;var l=u.exec(this.__input);return l?(o=l.index,c&&(o+=l[0].length)):o=this.__input_length,f=this.__input.substring(this.__position,o),this.__position=o,f},g.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},g.prototype.get_regexp=function(u,c){var f=null,o="g";return c&&m&&(o="y"),typeof u=="string"&&u!==""?f=new RegExp(u,o):u&&(f=new RegExp(u.source,o)),f},g.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(u){var c=this.__position,f=this.readUntilAfter(u);return this.__position=c,f},g.prototype.lookBack=function(u){var c=this.__position-1;return c>=u.length&&this.__input.substring(c-u.length,c).toLowerCase()===u},y.exports.InputScanner=g},function(y,m,g){var u=g(8).InputScanner,c=g(3).Token,f=g(10).TokenStream,o=g(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(a,O){this._input=new u(a),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var a,O=new c(l.START,""),w=null,S=[],L=new f;O.type!==l.EOF;){for(a=this._get_next_token(O,w);this._is_comment(a);)L.add(a),a=this._get_next_token(O,w);L.isEmpty()||(a.comments_before=L,L=new f),a.parent=w,this._is_opening(a)?(S.push(w),w=a):w&&this._is_closing(a,w)&&(a.opened=w,w.closed=a,w=S.pop(),a.parent=w),a.previous=O,O.next=a,this.__tokens.add(a),O=a}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(a,O){this._readWhitespace();var w=this._input.read(/.+/g);return w?this._create_token(l.RAW,w):this._create_token(l.EOF,"")},s.prototype._is_comment=function(a){return!1},s.prototype._is_opening=function(a){return!1},s.prototype._is_closing=function(a,O){return!1},s.prototype._create_token=function(a,O){var w=new c(a,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return w},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},y.exports.Tokenizer=s,y.exports.TOKEN=l},function(y){function m(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}m.prototype.restart=function(){this.__position=0},m.prototype.isEmpty=function(){return this.__tokens_length===0},m.prototype.hasNext=function(){return this.__position<this.__tokens_length},m.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},m.prototype.peek=function(g){var u=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(u=this.__tokens[g]),u},m.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},y.exports.TokenStream=m},function(y,m,g){var u=g(12).Pattern;function c(f,o){u.call(this,f,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}c.prototype=new u,c.prototype.__set_whitespace_patterns=function(f,o){f+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},c.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var o=this.__split(this._newline_regexp,f);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return f},c.prototype.matching=function(f,o){var l=this._create();return l.__set_whitespace_patterns(f,o),l._update(),l},c.prototype._create=function(){return new c(this._input,this)},c.prototype.__split=function(f,o){f.lastIndex=0;for(var l=0,s=[],a=f.exec(o);a;)s.push(o.substring(l,a.index)),l=a.index+a[0].length,a=f.exec(o);return l<o.length?s.push(o.substring(l,o.length)):s.push(""),s},y.exports.WhitespacePattern=c},function(y){function m(g,u){this._input=g,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)}m.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},m.prototype.read_match=function(){return this._input.match(this._match_pattern)},m.prototype.until_after=function(g){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(g),u._update(),u},m.prototype.until=function(g){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(g),u._update(),u},m.prototype.starting_with=function(g){var u=this._create();return u._starting_pattern=this._input.get_regexp(g,!0),u._update(),u},m.prototype.matching=function(g){var u=this._create();return u._match_pattern=this._input.get_regexp(g,!0),u._update(),u},m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){},y.exports.Pattern=m},function(y){function m(g,u){g=typeof g=="string"?g:g.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+u,"g")}m.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(g);c;)u[c[1]]=c[2],c=this.__directive_pattern.exec(g);return u},m.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},y.exports.Directives=m},function(y,m,g){var u=g(12).Pattern,c={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function f(o,l){u.call(this,o,l),this.__template_pattern=null,this._disabled=Object.assign({},c),this._excluded=Object.assign({},c),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var s=new u(o);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}/)}}f.prototype=new u,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(o){var l=this._create();return l._disabled[o]=!0,l._update(),l},f.prototype.read_options=function(o){var l=this._create();for(var s in c)l._disabled[s]=o.templating.indexOf(s)===-1;return l._update(),l},f.prototype.exclude=function(o){var l=this._create();return l._excluded[o]=!0,l._update(),l},f.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 l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),o+=l,l=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},f.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("|")+")")},f.prototype._read_template=function(){var o="",l=this._input.peek();if(l==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(o=o||this.__patterns.erb.read())}else l==="{"&&(!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},y.exports.TemplatablePattern=f},,,,function(y,m,g){var u=g(19).Beautifier,c=g(20).Options;function f(o,l,s,a){var O=new u(o,l,s,a);return O.beautify()}y.exports=f,y.exports.defaultOptions=function(){return new c}},function(y,m,g){var u=g(20).Options,c=g(2).Output,f=g(21).Tokenizer,o=g(21).TOKEN,l=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,a=function(E,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=E.max_preserve_newlines,this.preserve_newlines=E.preserve_newlines,this._output=new c(E,p)};a.prototype.current_line_has_match=function(E){return this._output.current_line.has_match(E)},a.prototype.set_space_before_token=function(E,p){this._output.space_before_token=E,this._output.non_breaking_space=p},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(E){this._output.add_raw_token(E)},a.prototype.print_preserved_newlines=function(E){var p=0;E.type!==o.TEXT&&E.previous.type!==o.TEXT&&(p=E.newlines?1:0),this.preserve_newlines&&(p=E.newlines<this.max_preserve_newlines+1?E.newlines:this.max_preserve_newlines+1);for(var v=0;v<p;v++)this.print_newline(v>0);return p!==0},a.prototype.traverse_whitespace=function(E){return E.whitespace_before||E.newlines?(this.print_preserved_newlines(E)||(this._output.space_before_token=!0),!0):!1},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(E){this._output.add_new_line(E)},a.prototype.print_token=function(E){E.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(E.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.get_full_indent=function(E){return E=this.indent_level+(E||0),E<1?"":this._output.get_indent_string(E)};var O=function(E){for(var p=null,v=E.next;v.type!==o.EOF&&E.closed!==v;){if(v.type===o.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===o.EQUALS&&v.next.next&&v.next.next.type===o.VALUE&&(p=v.next.next.text);break}v=v.next}return p},w=function(E,p){var v=null,C=null;return p.closed?(E==="script"?v="text/javascript":E==="style"&&(v="text/css"),v=O(p)||v,v.search("text/css")>-1?C="css":v.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?C="javascript":v.search(/(text|application|dojo)\/(x-)?(html)/)>-1?C="html":v.search(/test\/null/)>-1&&(C="null"),C):null};function S(E,p){return p.indexOf(E)!==-1}function L(E,p,v){this.parent=E||null,this.tag=p?p.tag_name:"",this.indent_level=v||0,this.parser_token=p||null}function D(E){this._printer=E,this._current_frame=null}D.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},D.prototype.record_tag=function(E){var p=new L(this._current_frame,E,this._printer.indent_level);this._current_frame=p},D.prototype._try_pop_frame=function(E){var p=null;return E&&(p=E.parser_token,this._printer.indent_level=E.indent_level,this._current_frame=E.parent),p},D.prototype._get_frame=function(E,p){for(var v=this._current_frame;v&&!(E.indexOf(v.tag)!==-1);){if(p&&p.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},D.prototype.try_pop=function(E,p){var v=this._get_frame([E],p);return this._try_pop_frame(v)},D.prototype.indent_to_tag=function(E){var p=this._get_frame(E);p&&(this._printer.indent_level=p.indent_level)};function A(E,p,v,C){this._source_text=E||"",p=p||{},this._js_beautify=v,this._css_beautify=C,this._tag_stack=null;var F=new u(p,"html");this._options=F,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"}A.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
|
|
`,E&&l.test(E)&&(p=E.match(l)[0])),E=E.replace(s,`
|
|
`);var v=E.match(/^[\t ]*/)[0],C={text:"",type:""},F=new T,R=new a(this._options,v),j=new f(E,this._options).tokenize();this._tag_stack=new D(R);for(var U=null,b=j.next();b.type!==o.EOF;)b.type===o.TAG_OPEN||b.type===o.COMMENT?(U=this._handle_tag_open(R,b,F,C),F=U):b.type===o.ATTRIBUTE||b.type===o.EQUALS||b.type===o.VALUE||b.type===o.TEXT&&!F.tag_complete?U=this._handle_inside_tag(R,b,F,j):b.type===o.TAG_CLOSE?U=this._handle_tag_close(R,b,F):b.type===o.TEXT?U=this._handle_text(R,b,F):R.add_raw_token(b),C=U,b=j.next();var Q=R._output.get_code(p);return Q},A.prototype._handle_tag_close=function(E,p,v){var C={text:p.text,type:p.type};return E.alignment_size=0,v.tag_complete=!0,E.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),v.is_unformatted?E.add_raw_token(p):(v.tag_start_char==="<"&&(E.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&E.print_newline(!1)),E.print_token(p)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(E.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&E.set_wrap_point(),C},A.prototype._handle_inside_tag=function(E,p,v,C){var F=v.has_wrapped_attrs,R={text:p.text,type:p.type};if(E.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),v.is_unformatted)E.add_raw_token(p);else if(v.tag_start_char==="{"&&p.type===o.TEXT)E.print_preserved_newlines(p)?(p.newlines=0,E.add_raw_token(p)):E.print_token(p);else{if(p.type===o.ATTRIBUTE?(E.set_space_before_token(!0),v.attr_count+=1):(p.type===o.EQUALS||p.type===o.VALUE&&p.previous.type===o.EQUALS)&&E.set_space_before_token(!1),p.type===o.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(E.traverse_whitespace(p),F=F||p.newlines!==0),this._is_wrap_attributes_force)){var j=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var U=!0,b=0,Q;do{if(Q=C.peek(b),Q.type===o.ATTRIBUTE){U=!1;break}b+=1}while(b<4&&Q.type!==o.EOF&&Q.type!==o.TAG_CLOSE);j=!U}j&&(E.print_newline(!1),F=!0)}E.print_token(p),F=F||E.previous_token_wrapped(),v.has_wrapped_attrs=F}return R},A.prototype._handle_text=function(E,p,v){var C={text:p.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(E,p,v):v.is_unformatted||v.is_content_unformatted?E.add_raw_token(p):(E.traverse_whitespace(p),E.print_token(p)),C},A.prototype._print_custom_beatifier_text=function(E,p,v){var C=this;if(p.text!==""){var F=p.text,R,j=1,U="",b="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?R=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?R=this._css_beautify:v.custom_beautifier_name==="html"&&(R=function(Le,Ie){var Be=new A(Le,Ie,C._js_beautify,C._css_beautify);return Be.beautify()}),this._options.indent_scripts==="keep"?j=0:this._options.indent_scripts==="separate"&&(j=-E.indent_level);var Q=E.get_full_indent(j);if(F=F.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&F[0]==="<"&&F.match(/^(<!--|<!\[CDATA\[)/)){var ee=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(F);if(!ee){E.add_raw_token(p);return}U=Q+ee[1]+`
|
|
`,F=ee[4],ee[5]&&(b=Q+ee[5]),F=F.replace(/\n[ \t]*$/,""),(ee[2]||ee[3].indexOf(`
|
|
`)!==-1)&&(ee=ee[3].match(/[ \t]+$/),ee&&(p.whitespace_before=ee[0]))}if(F)if(R){var oe=function(){this.eol=`
|
|
`};oe.prototype=this._options.raw_options;var fe=new oe;F=R(Q+F,fe)}else{var Fe=p.whitespace_before;Fe&&(F=F.replace(new RegExp(`
|
|
(`+Fe+")?","g"),`
|
|
`)),F=Q+F.replace(/\n/g,`
|
|
`+Q)}U&&(F?F=U+F+`
|
|
`+b:F=U+b),E.print_newline(!1),F&&(p.text=F,p.whitespace_before="",p.newlines=0,E.add_raw_token(p),E.print_newline(!0))}},A.prototype._handle_tag_open=function(E,p,v,C){var F=this._get_tag_open_token(p);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&p.type===o.TAG_OPEN&&p.text.indexOf("</")===0?(E.add_raw_token(p),F.start_tag_token=this._tag_stack.try_pop(F.tag_name)):(E.traverse_whitespace(p),this._set_tag_position(E,p,F,v,C),F.is_inline_element||E.set_wrap_point(),E.print_token(p)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(F.alignment_size=p.text.length+1),!F.tag_complete&&!F.is_unformatted&&(E.alignment_size=F.alignment_size),F};var T=function(E,p){if(this.parent=E||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="",!p)this.tag_complete=!0;else{var v;this.tag_start_char=p.text[0],this.text=p.text,this.tag_start_char==="<"?(v=p.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=p.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(p.text.startsWith("{{#>")||p.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&p.next!==null?this.tag_check=p.next.text.split(" ")[0]:this.tag_check=p.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),p.type===o.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||p.closed&&p.closed.text==="/>";var C=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(C=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(C)))}};A.prototype._get_tag_open_token=function(E){var p=new T(this._tag_stack.get_parser_token(),E);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||S(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&S(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&S(p.tag_check,this._options.content_unformatted),p.is_inline_element=S(p.tag_name,this._options.inline)||p.tag_name.includes("-")||p.tag_start_char==="{",p},A.prototype._set_tag_position=function(E,p,v,C,F){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||E.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=w(v.tag_check,p)))),S(v.tag_check,this._options.extra_liners)&&(E.print_newline(!1),E._output.just_added_blankline()||E.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 R=E.current_line_has_match(/{{#if/);R||E.print_newline(!1)}v.tag_name==="!--"&&F.type===o.TAG_CLOSE&&C.is_end_tag&&v.text.indexOf(`
|
|
`)===-1||(v.is_inline_element||v.is_unformatted||E.print_newline(!1),this._calcluate_parent_multiline(E,v))}else if(v.is_end_tag){var j=!1;j=v.start_tag_token&&v.start_tag_token.multiline_content,j=j||!v.is_inline_element&&!(C.is_inline_element||C.is_unformatted)&&!(F.type===o.TAG_CLOSE&&v.start_tag_token===C)&&F.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(j=!1),j&&E.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)&&(F.type!=="TK_CONTENT"||v.is_content_unformatted)&&E.print_newline(!1),this._calcluate_parent_multiline(E,v)},A.prototype._calcluate_parent_multiline=function(E,p){p.parent&&E._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var x=["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"],d=["a","audio","del","ins","map","noscript","video"];A.prototype._do_optional_end_element=function(E){var p=null;if(E.is_empty_element||!E.is_start_tag||!E.parent)return;if(E.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(E.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul"]);else if(E.tag_name==="dd"||E.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(E.parent.tag_name==="p"&&x.indexOf(E.tag_name)!==-1){var v=E.parent.parent;(!v||d.indexOf(v.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else E.tag_name==="rp"||E.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):E.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):E.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):E.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):E.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):E.tag_name==="tbody"||E.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):E.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(E.tag_name==="th"||E.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return E.parent=this._tag_stack.get_parser_token(),p},y.exports.Beautifier=A},function(y,m,g){var u=g(6).Options;function c(f){u.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}c.prototype=new u,y.exports.Options=c},function(y,m,g){var u=g(9).Tokenizer,c=g(9).TOKEN,f=g(13).Directives,o=g(14).TemplatablePattern,l=g(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:c.START,RAW:c.RAW,EOF:c.EOF},a=new f(/<\!--/,/-->/),O=function(w,S){u.call(this,w,S),this._current_tag_name="";var L=new o(this._input).read_options(this._options),D=new l(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.until(/[\n\r\t >\/]/),handlebars_comment:D.starting_with(/{{!--/).until_after(/--}}/),handlebars:D.starting_with(/{{/).until_after(/}}/),handlebars_open:D.until(/[\n\r\t }]/),handlebars_raw_close:D.until(/}}/),comment:D.starting_with(/<!--/).until_after(/-->/),cdata:D.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:D.starting_with(/<!\[/).until_after(/]>/),processing:D.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 A=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=D.matching(A).until_after(A)}};O.prototype=new u,O.prototype._is_comment=function(w){return!1},O.prototype._is_opening=function(w){return w.type===s.TAG_OPEN},O.prototype._is_closing=function(w,S){return w.type===s.TAG_CLOSE&&S&&((w.text===">"||w.text==="/>")&&S.text[0]==="<"||w.text==="}}"&&S.text[0]==="{"&&S.text[1]==="{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(w,S){var L=null;this._readWhitespace();var D=this._input.peek();return D===null?this._create_token(s.EOF,""):(L=L||this._read_open_handlebars(D,S),L=L||this._read_attribute(D,w,S),L=L||this._read_close(D,S),L=L||this._read_raw_content(D,w,S),L=L||this._read_content_word(D),L=L||this._read_comment_or_cdata(D),L=L||this._read_processing(D),L=L||this._read_open(D,S),L=L||this._create_token(s.UNKNOWN,this._input.next()),L)},O.prototype._read_comment_or_cdata=function(w){var S=null,L=null,D=null;if(w==="<"){var A=this._input.peek(1);A==="!"&&(L=this.__patterns.comment.read(),L?(D=a.get_directives(L),D&&D.ignore==="start"&&(L+=a.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(S=this._create_token(s.COMMENT,L),S.directives=D)}return S},O.prototype._read_processing=function(w){var S=null,L=null,D=null;if(w==="<"){var A=this._input.peek(1);(A==="!"||A==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(S=this._create_token(s.COMMENT,L),S.directives=D)}return S},O.prototype._read_open=function(w,S){var L=null,D=null;return S||w==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),D=this._create_token(s.TAG_OPEN,L)),D},O.prototype._read_open_handlebars=function(w,S){var L=null,D=null;return S||this._options.indent_handlebars&&w==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),D=this._create_token(s.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),D=this._create_token(s.TAG_OPEN,L))),D},O.prototype._read_close=function(w,S){var L=null,D=null;return S&&(S.text[0]==="<"&&(w===">"||w==="/"&&this._input.peek(1)===">")?(L=this._input.next(),w==="/"&&(L+=this._input.next()),D=this._create_token(s.TAG_CLOSE,L)):S.text[0]==="{"&&w==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),D=this._create_token(s.TAG_CLOSE,"}}"))),D},O.prototype._read_attribute=function(w,S,L){var D=null,A="";if(L&&L.text[0]==="<")if(w==="=")D=this._create_token(s.EQUALS,this._input.next());else if(w==='"'||w==="'"){var T=this._input.next();w==='"'?T+=this.__patterns.double_quote.read():T+=this.__patterns.single_quote.read(),D=this._create_token(s.VALUE,T)}else A=this.__patterns.attribute.read(),A&&(S.type===s.EQUALS?D=this._create_token(s.VALUE,A):D=this._create_token(s.ATTRIBUTE,A));return D},O.prototype._is_content_unformatted=function(w){return this._options.void_elements.indexOf(w)===-1&&(this._options.content_unformatted.indexOf(w)!==-1||this._options.unformatted.indexOf(w)!==-1)},O.prototype._read_raw_content=function(w,S,L){var D="";if(L&&L.text[0]==="{")D=this.__patterns.handlebars_raw_close.read();else if(S.type===s.TAG_CLOSE&&S.opened.text[0]==="<"&&S.text[0]!=="/"){var A=S.opened.text.substr(1).toLowerCase();if(A==="script"||A==="style"){var T=this._read_comment_or_cdata(w);if(T)return T.type=s.TEXT,T;D=this._input.readUntil(new RegExp("</"+A+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(A)&&(D=this._input.readUntil(new RegExp("</"+A+"[\\n\\r\\t ]*?>","ig")))}return D?this._create_token(s.TEXT,D):null},O.prototype._read_content_word=function(w){var S="";if(this._options.unformatted_content_delimiter&&(w===this._options.unformatted_content_delimiter[0]&&(S=this.__patterns.unformatted_content_delimiter.read())),S||(S=this.__patterns.word.read()),S)return this._create_token(s.TEXT,S)},y.exports.Tokenizer=O,y.exports.TOKEN=s}],K={};function n(y){var m=K[y];if(m!==void 0)return m.exports;var g=K[y]={exports:{}};return z[y](g,g.exports,n),g.exports}var M=n(18);P=M})();var V=P;if(!0)!(ie=[W,W("6UM0"),W("TXwP")],G=function(z){var K=W("6UM0"),n=W("TXwP");return{html_beautify:function(M,y){return V(M,y,K.js_beautify,n.css_beautify)}}}.apply(ve,ie),G!==void 0&&(it.exports=G));else var k,B})()},"rAM+":function(it,ve,W){"use strict";W.d(ve,"a",function(){return G});var ie=W("Qw5x");function G(P,V){var k;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(k=Object(ie.a)(P))||V&&P&&typeof P.length=="number"){k&&(P=k);var B=0,z=function(){};return{s:z,n:function(){return B>=P.length?{done:!0}:{done:!1,value:P[B++]}},e:function(m){throw m},f:z}}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 K=!0,n=!1,M;return{s:function(){k=P[Symbol.iterator]()},n:function(){var m=k.next();return K=m.done,m},e:function(m){n=!0,M=m},f:function(){try{!K&&k.return!=null&&k.return()}finally{if(n)throw M}}}}},rUJ1:function(it,ve){const W=/[&<>"']/,ie=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,P=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},k=D=>V[D];function B(D,A){if(A){if(W.test(D))return D.replace(ie,k)}else if(G.test(D))return D.replace(P,k);return D}const z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function K(D){return D.replace(z,(A,T)=>(T=T.toLowerCase(),T==="colon"?":":T.charAt(0)==="#"?T.charAt(1)==="x"?String.fromCharCode(parseInt(T.substring(2),16)):String.fromCharCode(+T.substring(1)):""))}const n=/(^|[^\[])\^/g;function M(D,A){D=D.source||D,A=A||"";const T={replace:(x,d)=>(d=d.source||d,d=d.replace(n,"$1"),D=D.replace(x,d),T),getRegex:()=>new RegExp(D,A)};return T}const y=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(D,A,T){if(D){let x;try{x=decodeURIComponent(K(T)).replace(y,"").toLowerCase()}catch(d){return null}if(x.indexOf("javascript:")===0||x.indexOf("vbscript:")===0||x.indexOf("data:")===0)return null}A&&!m.test(T)&&(T=l(A,T));try{T=encodeURI(T).replace(/%25/g,"%")}catch(x){return null}return T}const u={},c=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(D,A){u[" "+D]||(c.test(D)?u[" "+D]=D+"/":u[" "+D]=w(D,"/",!0)),D=u[" "+D];const T=D.indexOf(":")===-1;return A.substring(0,2)==="//"?T?A:D.replace(f,"$1")+A:A.charAt(0)==="/"?T?A:D.replace(o,"$1")+A:D+A}const s={exec:function(){}};function a(D){let A=1,T,x;for(;A<arguments.length;A++){T=arguments[A];for(x in T)Object.prototype.hasOwnProperty.call(T,x)&&(D[x]=T[x])}return D}function O(D,A){const T=D.replace(/\|/g,(E,p,v)=>{let C=!1,F=p;for(;--F>=0&&v[F]==="\\";)C=!C;return C?"|":" |"}),x=T.split(/ \|/);let d=0;if(x.length>A)x.splice(A);else for(;x.length<A;)x.push("");for(;d<x.length;d++)x[d]=x[d].trim().replace(/\\\|/g,"|");return x}function w(D,A,T){const x=D.length;if(x===0)return"";let d=0;for(;d<x;){const E=D.charAt(x-d-1);if(E===A&&!T)d++;else if(E!==A&&T)d++;else break}return D.substr(0,x-d)}function S(D,A){if(D.indexOf(A[1])===-1)return-1;const T=D.length;let x=0,d=0;for(;d<T;d++)if(D[d]==="\\")d++;else if(D[d]===A[0])x++;else if(D[d]===A[1]&&(x--,x<0))return d;return-1}function L(D){D&&D.sanitize&&!D.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")}it.exports={escape:B,unescape:K,edit:M,cleanUrl:g,resolveUrl:l,noopTest:s,merge:a,splitCells:O,rtrim:w,findClosingBracket:S,checkSanitizeDeprecation:L}},siWv:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___3IH6S",flex_space_between:"flex_space_between___3AU-S",flex_box_vertical_center:"flex_box_vertical_center___1ykIO",flex_box_center_end:"flex_box_center_end___1aIQB",flex_box_column:"flex_box_column___2A_ra",btn:"btn___23gjd"}},t23M:function(it,ve,W){"use strict";var ie=W("VTBJ"),G=W("1OyB"),P=W("vuIU"),V=W("Ji7U"),k=W("LK+K"),B=W("q1tI"),z=W.n(B),K=W("m+aA"),n=W("Zm9Q"),M=W("Kwbf"),y=W("c+Xe"),m=W("bdgK"),g="rc-observer-key",u=function(c){Object(V.a)(o,c);var f=Object(k.a)(o);function o(){var l;return Object(G.a)(this,o),l=f.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(s){var a=l.props.onResize,O=s[0].target,w=O.getBoundingClientRect(),S=w.width,L=w.height,D=O.offsetWidth,A=O.offsetHeight,T=Math.floor(S),x=Math.floor(L);if(l.state.width!==T||l.state.height!==x||l.state.offsetWidth!==D||l.state.offsetHeight!==A){var d={width:T,height:x,offsetWidth:D,offsetHeight:A};l.setState(d),a&&Promise.resolve().then(function(){a(Object(ie.a)(Object(ie.a)({},d),{},{offsetWidth:D,offsetHeight:A}))})}},l.setChildNode=function(s){l.childNode=s},l}return Object(P.a)(o,[{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 a=Object(K.a)(this.childNode||this),O=a!==this.currentElement;O&&(this.destroyObserver(),this.currentElement=a),!this.resizeObserver&&a&&(this.resizeObserver=new m.default(this.onResize),this.resizeObserver.observe(a))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,a=Object(n.a)(s);if(a.length>1)Object(M.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(a.length===0)return Object(M.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var O=a[0];if(B.isValidElement(O)&&Object(y.c)(O)){var w=O.ref;a[0]=B.cloneElement(O,{ref:Object(y.a)(w,this.setChildNode)})}return a.length===1?a[0]:a.map(function(S,L){return!B.isValidElement(S)||"key"in S&&S.key!==null?S:B.cloneElement(S,{key:"".concat(g,"-").concat(L)})})}}]),o}(B.Component);u.displayName="ResizeObserver",ve.a=u},t9D7:function(it,ve,W){"use strict";W.d(ve,"b",function(){return z}),W.d(ve,"g",function(){return n}),W.d(ve,"d",function(){return M}),W.d(ve,"e",function(){return y}),W.d(ve,"a",function(){return m}),W.d(ve,"f",function(){return c}),W.d(ve,"c",function(){return f});var ie=W("Vhoy"),G=W("MI8n"),P=W("pmY6"),V=W("Cg/j"),k=W("ic2d"),B=W("nEHx");const z=Object(V.c)("themeService");var K;(function(o){function l(s){return s&&typeof s=="object"&&typeof s.id=="string"}o.isThemeColor=l})(K||(K={}));function n(o){return{id:o}}var M;(function(o){function l(L){return L&&typeof L=="object"&&typeof L.id=="string"&&(typeof L.color=="undefined"||K.isThemeColor(L.color))}o.isThemeIcon=l;const s=new RegExp(`^\\$\\((${ie.a.iconNameExpression}(?:${ie.a.iconModifierExpression})?)\\)$`);function a(L){const D=s.exec(L);if(!D)return;let[,A]=D;return{id:A}}o.fromString=a;function O(L,D){let A=L.id;const T=A.lastIndexOf("~");return T!==-1&&(A=A.substring(0,T)),D&&(A=`${A}~${D}`),{id:A}}o.modify=O;function w(L,D){var A,T;return L.id===D.id&&((A=L.color)===null||A===void 0?void 0:A.id)===((T=D.color)===null||T===void 0?void 0:T.id)}o.isEqual=w;function S(L,D){return{id:L.id,color:D?n(D):void 0}}o.asThemeIcon=S,o.asClassNameArray=ie.a.asClassNameArray,o.asClassName=ie.a.asClassName,o.asCSSSelector=ie.a.asCSSSelector})(M||(M={}));function y(o){switch(o){case B.a.DARK:return"vs-dark";case B.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const m={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new G.b}onColorThemeChange(o){return this.themingParticipants.push(o),this.onThemingParticipantAddedEmitter.fire(o),Object(P.i)(()=>{const l=this.themingParticipants.indexOf(o);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let u=new g;k.a.add(m.ThemingContribution,u);function c(o){return u.onColorThemeChange(o)}class f extends P.a{constructor(o){super();this.themeService=o,this.theme=o.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},ulZh:function(it,ve,W){typeof window!="undefined"&&function(G,P){it.exports=P()}(this,function(){return function(ie){var G={};function P(V){if(G[V])return G[V].exports;var k=G[V]={i:V,l:!1,exports:{}};return ie[V].call(k.exports,k,k.exports,P),k.l=!0,k.exports}return P.m=ie,P.c=G,P.d=function(V,k,B){P.o(V,k)||Object.defineProperty(V,k,{enumerable:!0,get:B})},P.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},P.t=function(V,k){if(k&1&&(V=P(V)),k&8)return V;if(k&4&&typeof V=="object"&&V&&V.__esModule)return V;var B=Object.create(null);if(P.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:V}),k&2&&typeof V!="string")for(var z in V)P.d(B,z,function(K){return V[K]}.bind(null,z));return B},P.n=function(V){var k=V&&V.__esModule?function(){return V.default}:function(){return V};return P.d(k,"a",k),k},P.o=function(V,k){return Object.prototype.hasOwnProperty.call(V,k)},P.p="/dist/",P(P.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ie,G,P){"use strict";var V=Object.prototype.hasOwnProperty,k="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(k=!1));function z(y,m,g){this.fn=y,this.context=m,this.once=g||!1}function K(y,m,g,u,c){if(typeof g!="function")throw new TypeError("The listener must be a function");var f=new z(g,u||y,c),o=k?k+m:m;return y._events[o]?y._events[o].fn?y._events[o]=[y._events[o],f]:y._events[o].push(f):(y._events[o]=f,y._eventsCount++),y}function n(y,m){--y._eventsCount===0?y._events=new B:delete y._events[m]}function M(){this._events=new B,this._eventsCount=0}M.prototype.eventNames=function(){var m=[],g,u;if(this._eventsCount===0)return m;for(u in g=this._events)V.call(g,u)&&m.push(k?u.slice(1):u);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},M.prototype.listeners=function(m){var g=k?k+m:m,u=this._events[g];if(!u)return[];if(u.fn)return[u.fn];for(var c=0,f=u.length,o=new Array(f);c<f;c++)o[c]=u[c].fn;return o},M.prototype.listenerCount=function(m){var g=k?k+m:m,u=this._events[g];return u?u.fn?1:u.length:0},M.prototype.emit=function(m,g,u,c,f,o){var l=k?k+m:m;if(!this._events[l])return!1;var s=this._events[l],a=arguments.length,O,w;if(s.fn){s.once&&this.removeListener(m,s.fn,void 0,!0);switch(a){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,g),!0;case 3:return s.fn.call(s.context,g,u),!0;case 4:return s.fn.call(s.context,g,u,c),!0;case 5:return s.fn.call(s.context,g,u,c,f),!0;case 6:return s.fn.call(s.context,g,u,c,f,o),!0}for(w=1,O=new Array(a-1);w<a;w++)O[w-1]=arguments[w];s.fn.apply(s.context,O)}else{var S=s.length,L;for(w=0;w<S;w++){s[w].once&&this.removeListener(m,s[w].fn,void 0,!0);switch(a){case 1:s[w].fn.call(s[w].context);break;case 2:s[w].fn.call(s[w].context,g);break;case 3:s[w].fn.call(s[w].context,g,u);break;case 4:s[w].fn.call(s[w].context,g,u,c);break;default:if(!O)for(L=1,O=new Array(a-1);L<a;L++)O[L-1]=arguments[L];s[w].fn.apply(s[w].context,O)}}}return!0},M.prototype.on=function(m,g,u){return K(this,m,g,u,!1)},M.prototype.once=function(m,g,u){return K(this,m,g,u,!0)},M.prototype.removeListener=function(m,g,u,c){var f=k?k+m:m;if(!this._events[f])return this;if(!g)return n(this,f),this;var o=this._events[f];if(o.fn)o.fn===g&&(!c||o.once)&&(!u||o.context===u)&&n(this,f);else{for(var l=0,s=[],a=o.length;l<a;l++)(o[l].fn!==g||c&&!o[l].once||u&&o[l].context!==u)&&s.push(o[l]);s.length?this._events[f]=s.length===1?s[0]:s:n(this,f)}return this},M.prototype.removeAllListeners=function(m){var g;return m?(g=k?k+m:m,this._events[g]&&n(this,g)):(this._events=new B,this._eventsCount=0),this},M.prototype.off=M.prototype.removeListener,M.prototype.addListener=M.prototype.on,M.prefixed=k,M.EventEmitter=M,ie.exports=M},"./node_modules/url-toolkit/src/url-toolkit.js":function(ie,G,P){(function(V){var k=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,B=/^([^\/?#]*)([^]*)$/,z=/(?:\/|^)\.(?=\/)/g,K=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,n={buildAbsoluteURL:function(M,y,m){if(m=m||{},M=M.trim(),y=y.trim(),!y){if(!m.alwaysNormalize)return M;var g=n.parseURL(M);if(!g)throw new Error("Error trying to parse base URL.");return g.path=n.normalizePath(g.path),n.buildURLFromParts(g)}var u=n.parseURL(y);if(!u)throw new Error("Error trying to parse relative URL.");if(u.scheme)return m.alwaysNormalize?(u.path=n.normalizePath(u.path),n.buildURLFromParts(u)):y;var c=n.parseURL(M);if(!c)throw new Error("Error trying to parse base URL.");if(!c.netLoc&&c.path&&c.path[0]!=="/"){var f=B.exec(c.path);c.netLoc=f[1],c.path=f[2]}c.netLoc&&!c.path&&(c.path="/");var o={scheme:c.scheme,netLoc:u.netLoc,path:null,params:u.params,query:u.query,fragment:u.fragment};if(!u.netLoc&&(o.netLoc=c.netLoc,u.path[0]!=="/"))if(!u.path)o.path=c.path,u.params||(o.params=c.params,u.query||(o.query=c.query));else{var l=c.path,s=l.substring(0,l.lastIndexOf("/")+1)+u.path;o.path=n.normalizePath(s)}return o.path===null&&(o.path=m.alwaysNormalize?n.normalizePath(u.path):u.path),n.buildURLFromParts(o)},parseURL:function(M){var y=k.exec(M);return y?{scheme:y[1]||"",netLoc:y[2]||"",path:y[3]||"",params:y[4]||"",query:y[5]||"",fragment:y[6]||""}:null},normalizePath:function(M){for(M=M.split("").reverse().join("").replace(z,"");M.length!==(M=M.replace(K,"")).length;);return M.split("").reverse().join("")},buildURLFromParts:function(M){return M.scheme+M.netLoc+M.path+M.params+M.query+M.fragment}};ie.exports=n})(this)},"./node_modules/webworkify-webpack/index.js":function(ie,G,P){function V(m){var g={};function u(f){if(g[f])return g[f].exports;var o=g[f]={i:f,l:!1,exports:{}};return m[f].call(o.exports,o,o.exports,u),o.l=!0,o.exports}u.m=m,u.c=g,u.i=function(f){return f},u.d=function(f,o,l){u.o(f,o)||Object.defineProperty(f,o,{configurable:!1,enumerable:!0,get:l})},u.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},u.n=function(f){var o=f&&f.__esModule?function(){return f.default}:function(){return f};return u.d(o,"a",o),o},u.o=function(f,o){return Object.prototype.hasOwnProperty.call(f,o)},u.p="/",u.oe=function(f){throw console.error(f),f};var c=u(u.s=ENTRY_MODULE);return c.default||c}var k="[\\.|\\-|\\+|\\w|/|@]+",B="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+k+").*?\\)";function z(m){return(m+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function K(m){return!isNaN(1*m)}function n(m,g,u){var c={};c[u]=[];var f=g.toString(),o=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return c;for(var l=o[1],s=new RegExp("(\\\\n|\\W)"+z(l)+B,"g"),a;a=s.exec(f);){if(a[3]==="dll-reference")continue;c[u].push(a[3])}for(s=new RegExp("\\("+z(l)+'\\("(dll-reference\\s('+k+'))"\\)\\)'+B,"g");a=s.exec(f);)m[a[2]]||(c[u].push(a[1]),m[a[2]]=P(a[1]).m),c[a[2]]=c[a[2]]||[],c[a[2]].push(a[4]);for(var O=Object.keys(c),w=0;w<O.length;w++)for(var S=0;S<c[O[w]].length;S++)K(c[O[w]][S])&&(c[O[w]][S]=1*c[O[w]][S]);return c}function M(m){var g=Object.keys(m);return g.reduce(function(u,c){return u||m[c].length>0},!1)}function y(m,g){for(var u={main:[g]},c={main:[]},f={main:{}};M(u);)for(var o=Object.keys(u),l=0;l<o.length;l++){var s=o[l],a=u[s],O=a.pop();if(f[s]=f[s]||{},f[s][O]||!m[s][O])continue;f[s][O]=!0,c[s]=c[s]||[],c[s].push(O);for(var w=n(m,m[s][O],s),S=Object.keys(w),L=0;L<S.length;L++)u[S[L]]=u[S[L]]||[],u[S[L]]=u[S[L]].concat(w[S[L]])}return c}ie.exports=function(m,g){g=g||{};var u={main:P.m},c=g.all?{main:Object.keys(u.main)}:y(u,m),f="";Object.keys(c).filter(function(O){return O!=="main"}).forEach(function(O){for(var w=0;c[O][w];)w++;c[O].push(w),u[O][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+O+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+c[O].map(function(S){return""+JSON.stringify(S)+": "+u[O][S].toString()}).join(",")+`});
|
|
`}),f=f+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+c.main.map(function(O){return""+JSON.stringify(O)+": "+u.main[O].toString()}).join(",")+"}))(self);";var o=new window.Blob([f],{type:"text/javascript"});if(g.bare)return o;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,s=l.createObjectURL(o),a=new window.Worker(s);return a.objectURL=s,a}},"./src/config.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"hlsDefaultConfig",function(){return L}),P.d(G,"mergeConfig",function(){return A}),P.d(G,"enableStreamingMode",function(){return T});var V=P("./src/controller/abr-controller.ts"),k=P("./src/controller/audio-stream-controller.ts"),B=P("./src/controller/audio-track-controller.ts"),z=P("./src/controller/subtitle-stream-controller.ts"),K=P("./src/controller/subtitle-track-controller.ts"),n=P("./src/controller/buffer-controller.ts"),M=P("./src/controller/timeline-controller.ts"),y=P("./src/controller/cap-level-controller.ts"),m=P("./src/controller/fps-controller.ts"),g=P("./src/controller/eme-controller.ts"),u=P("./src/controller/cmcd-controller.ts"),c=P("./src/utils/xhr-loader.ts"),f=P("./src/utils/fetch-loader.ts"),o=P("./src/utils/cues.ts"),l=P("./src/utils/mediakeys-helper.ts"),s=P("./src/utils/logger.ts");function a(){return a=Object.assign||function(x){for(var d=1;d<arguments.length;d++){var E=arguments[d];for(var p in E)Object.prototype.hasOwnProperty.call(E,p)&&(x[p]=E[p])}return x},a.apply(this,arguments)}function O(x,d){var E=Object.keys(x);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(x);d&&(p=p.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),E.push.apply(E,p)}return E}function w(x){for(var d=1;d<arguments.length;d++){var E=arguments[d]!=null?arguments[d]:{};d%2?O(Object(E),!0).forEach(function(p){S(x,p,E[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(E)):O(Object(E)).forEach(function(p){Object.defineProperty(x,p,Object.getOwnPropertyDescriptor(E,p))})}return x}function S(x,d,E){return d in x?Object.defineProperty(x,d,{value:E,enumerable:!0,configurable:!0,writable:!0}):x[d]=E,x}var L=w(w({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:c.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:n.default,capLevelController:y.default,fpsController:m.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:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},D()),{},{subtitleStreamController:z.SubtitleStreamController,subtitleTrackController:K.default,timelineController:M.TimelineController,audioStreamController:k.default,audioTrackController:B.default,emeController:g.default,cmcdController:u.default});function D(){return{cueHandler:o.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 A(x,d){if((d.liveSyncDurationCount||d.liveMaxLatencyDurationCount)&&(d.liveSyncDuration||d.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(d.liveMaxLatencyDurationCount!==void 0&&(d.liveSyncDurationCount===void 0||d.liveMaxLatencyDurationCount<=d.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(d.liveMaxLatencyDuration!==void 0&&(d.liveSyncDuration===void 0||d.liveMaxLatencyDuration<=d.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return a({},x,d)}function T(x){var d=x.loader;if(d!==f.default&&d!==c.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),x.progressive=!1;else{var E=Object(f.fetchSupported)();E&&(x.loader=f.default,x.progressive=!0,x.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/polyfills/number.ts"),k=P("./src/utils/ewma-bandwidth-estimator.ts"),B=P("./src/events.ts"),z=P("./src/utils/buffer-helper.ts"),K=P("./src/errors.ts"),n=P("./src/types/loader.ts"),M=P("./src/utils/logger.ts");function y(u,c){for(var f=0;f<c.length;f++){var o=c[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function m(u,c,f){return c&&y(u.prototype,c),f&&y(u,f),u}var g=function(){function u(f){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=f;var o=f.config;this.bwEstimator=new k.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var c=u.prototype;return c.registerListeners=function(){var o=this.hls;o.on(B.Events.FRAG_LOADING,this.onFragLoading,this),o.on(B.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(B.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var o=this.hls;o.off(B.Events.FRAG_LOADING,this.onFragLoading,this),o.off(B.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(B.Events.ERROR,this.onError,this)},c.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},c.onFragLoading=function(o,l){var s=l.frag;if(s.type===n.PlaylistLevelType.MAIN&&!this.timer){var a;this.fragCurrent=s,this.partCurrent=(a=l.part)!=null?a:null,this.timer=self.setInterval(this.onCheck,100)}},c.onLevelLoaded=function(o,l){var s=this.hls.config;l.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},c._abandonRulesCheck=function(){var o=this.fragCurrent,l=this.partCurrent,s=this.hls,a=s.autoLevelEnabled,O=s.config,w=s.media;if(!o||!w)return;var S=l?l.stats:o.stats,L=l?l.duration:o.duration;if(S.aborted){M.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!a||w.paused||!w.playbackRate||!w.readyState)return;var D=performance.now()-S.loading.start,A=Math.abs(w.playbackRate);if(D<=500*L/A)return;var T=s.levels,x=s.minAutoLevel,d=T[o.level],E=S.total||Math.max(S.loaded,Math.round(L*d.maxBitrate/8)),p=Math.max(1,S.bwEstimate?S.bwEstimate/8:S.loaded*1e3/D),v=(E-S.loaded)/p,C=w.currentTime,F=(z.BufferHelper.bufferInfo(w,C,O.maxBufferHole).end-C)/A;if(F>=2*L/A||v<=F)return;var R=Number.POSITIVE_INFINITY,j;for(j=o.level-1;j>x;j--){var U=T[j].maxBitrate;if(R=L*U/(8*.8*p),R<F)break}if(R>=v)return;var b=this.bwEstimator.getEstimate();M.logger.warn("Fragment "+o.sn+(l?" part "+l.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+j+`
|
|
Current BW estimate: `+(Object(V.isFiniteNumber)(b)?(b/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+v.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+R.toFixed(3)+` s
|
|
Time to underbuffer: `+F.toFixed(3)+" s"),s.nextLoadLevel=j,this.bwEstimator.sample(D,S.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),s.trigger(B.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:l,stats:S})},c.onFragLoaded=function(o,l){var s=l.frag,a=l.part;if(s.type===n.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(s.sn)){var O=a?a.stats:s.stats,w=a?a.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var S=this.hls.levels[s.level],L=(S.loaded?S.loaded.bytes:0)+O.loaded,D=(S.loaded?S.loaded.duration:0)+w;S.loaded={bytes:L,duration:D},S.realBitrate=Math.round(8*L/D)}if(s.bitrateTest){var A={stats:O,frag:s,part:a,id:s.type};this.onFragBuffered(B.Events.FRAG_BUFFERED,A),s.bitrateTest=!1}}},c.onFragBuffered=function(o,l){var s=l.frag,a=l.part,O=a?a.stats:s.stats;if(O.aborted)return;if(s.type!==n.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var w=O.parsing.end-O.loading.start;this.bwEstimator.sample(w,O.loaded),O.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=w/1e3:this.bitrateTestDelay=0},c.onError=function(o,l){switch(l.details){case K.ErrorDetails.FRAG_LOAD_ERROR:case K.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},c.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},c.getNextABRAutoLevel=function(){var o=this.fragCurrent,l=this.partCurrent,s=this.hls,a=s.maxAutoLevel,O=s.config,w=s.minAutoLevel,S=s.media,L=l?l.duration:o?o.duration:0,D=S?S.currentTime:0,A=S&&S.playbackRate!==0?Math.abs(S.playbackRate):1,T=this.bwEstimator?this.bwEstimator.getEstimate():O.abrEwmaDefaultEstimate,x=(z.BufferHelper.bufferInfo(S,D,O.maxBufferHole).end-D)/A,d=this.findBestLevel(T,w,a,x,O.abrBandWidthFactor,O.abrBandWidthUpFactor);if(d>=0)return d;M.logger.trace((x?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var E=L?Math.min(L,O.maxStarvationDelay):O.maxStarvationDelay,p=O.abrBandWidthFactor,v=O.abrBandWidthUpFactor;if(!x){var C=this.bitrateTestDelay;if(C){var F=L?Math.min(L,O.maxLoadingDelay):O.maxLoadingDelay;E=F-C,M.logger.trace("bitrate test took "+Math.round(1e3*C)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*E)+" ms"),p=v=1}}return d=this.findBestLevel(T,w,a,x+E,p,v),Math.max(d,0)},c.findBestLevel=function(o,l,s,a,O,w){for(var S,L=this.fragCurrent,D=this.partCurrent,A=this.lastLoadedFragLevel,T=this.hls.levels,x=T[A],d=!!(x!=null&&(S=x.details)!==null&&S!==void 0&&S.live),E=x==null?void 0:x.codecSet,p=D?D.duration:L?L.duration:0,v=s;v>=l;v--){var C=T[v];if(!C||E&&C.codecSet!==E)continue;var F=C.details,R=(D?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||p,j=void 0;v<=A?j=O*o:j=w*o;var U=T[v].maxBitrate,b=U*R/j;if(M.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(j)+"/"+U+"/"+R+"/"+a+"/"+b),j>U&&(!b||d&&!this.bitrateTestDelay||b<a))return v}return-1},m(u,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,l=this.bwEstimator;if(o!==-1&&(!l||!l.canEstimate()))return o;var s=this.getNextABRAutoLevel();return o!==-1&&(s=Math.min(o,s)),s},set:function(o){this._nextAutoLevel=o}}]),u}();G.default=g},"./src/controller/audio-stream-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/polyfills/number.ts"),k=P("./src/controller/base-stream-controller.ts"),B=P("./src/events.ts"),z=P("./src/utils/buffer-helper.ts"),K=P("./src/controller/fragment-tracker.ts"),n=P("./src/types/level.ts"),M=P("./src/types/loader.ts"),y=P("./src/loader/fragment.ts"),m=P("./src/demux/chunk-cache.ts"),g=P("./src/demux/transmuxer-interface.ts"),u=P("./src/types/transmuxer.ts"),c=P("./src/controller/fragment-finders.ts"),f=P("./src/utils/discontinuities.ts"),o=P("./src/errors.ts"),l=P("./src/utils/logger.ts");function s(){return s=Object.assign||function(L){for(var D=1;D<arguments.length;D++){var A=arguments[D];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(L[T]=A[T])}return L},s.apply(this,arguments)}function a(L,D){L.prototype=Object.create(D.prototype),L.prototype.constructor=L,O(L,D)}function O(L,D){return O=Object.setPrototypeOf||function(T,x){return T.__proto__=x,T},O(L,D)}var w=100,S=function(L){a(D,L);function D(T,x){var d;return d=L.call(this,T,x,"[audio-stream-controller]")||this,d.videoBuffer=null,d.videoTrackCC=-1,d.waitingVideoCC=-1,d.audioSwitch=!1,d.trackId=-1,d.waitingData=null,d.mainDetails=null,d.bufferFlushed=!1,d._registerListeners(),d}var A=D.prototype;return A.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},A._registerListeners=function(){var x=this.hls;x.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.on(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.on(B.Events.ERROR,this.onError,this),x.on(B.Events.BUFFER_RESET,this.onBufferReset,this),x.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A._unregisterListeners=function(){var x=this.hls;x.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.off(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.off(B.Events.ERROR,this.onError,this),x.off(B.Events.BUFFER_RESET,this.onBufferReset,this),x.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A.onInitPtsFound=function(x,d){var E=d.frag,p=d.id,v=d.initPTS;if(p==="main"){var C=E.cc;this.initPTS[E.cc]=v,this.log("InitPTS for cc: "+C+" found from main: "+v),this.videoTrackCC=C,this.state===k.State.WAITING_INIT_PTS&&this.tick()}},A.startLoad=function(x){if(!this.levels){this.startPosition=x,this.state=k.State.STOPPED;return}var d=this.lastCurrentTime;this.stopLoad(),this.setInterval(w),this.fragLoadError=0,d>0&&x===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=k.State.IDLE):(this.loadedmetadata=!1,this.state=k.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()},A.doTick=function(){switch(this.state){case k.State.IDLE:this.doTickIdle();break;case k.State.WAITING_TRACK:{var x,d=this.levels,E=this.trackId,p=d==null||((x=d[E])===null||x===void 0)?void 0:x.details;if(p){if(this.waitForCdnTuneIn(p))break;this.state=k.State.WAITING_INIT_PTS}break}case k.State.FRAG_LOADING_WAITING_RETRY:{var v,C=performance.now(),F=this.retryDate;(!F||C>=F||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=k.State.IDLE);break}case k.State.WAITING_INIT_PTS:{var R=this.waitingData;if(R){var j=R.frag,U=R.part,b=R.cache,Q=R.complete;if(this.initPTS[j.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=k.State.FRAG_LOADING;var ee=b.flush(),oe={frag:j,part:U,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(oe),Q&&L.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+j.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var fe=this.getLoadPosition(),Fe=z.BufferHelper.bufferInfo(this.mediaBuffer,fe,this.config.maxBufferHole),Le=Object(c.fragmentWithinToleranceTest)(Fe.end,this.config.maxFragLookUpTolerance,j);Le<0&&(l.logger.log("Waiting fragment cc ("+j.cc+") @ "+j.start+" cancelled because another fragment at "+Fe.end+" is needed"),this.clearWaitingFragment())}}else this.state=k.State.IDLE}}this.onTickEnd()},A.clearWaitingFragment=function(){var x=this.waitingData;x&&(this.fragmentTracker.removeFragment(x.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=k.State.IDLE)},A.onTickEnd=function(){var x=this.media;if(!x||!x.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:x,E=d.buffered;!this.loadedmetadata&&E.length&&(this.loadedmetadata=!0),this.lastCurrentTime=x.currentTime},A.doTickIdle=function(){var x,d,E=this.hls,p=this.levels,v=this.media,C=this.trackId,F=E.config;if(!p||!p[C])return;if(!v&&(this.startFragRequested||!F.startFragPrefetch))return;var R=p[C],j=R.details;if(!j||j.live&&this.levelLastLoaded!==C||this.waitForCdnTuneIn(j)){this.state=k.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,y.ElementaryStreamTypes.AUDIO,M.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,M.PlaylistLevelType.AUDIO);if(U===null)return;var b=U.len,Q=this.getMaxBufferLength(),ee=this.audioSwitch;if(b>=Q&&!ee)return;if(!ee&&this._streamEnded(U,j)){E.trigger(B.Events.BUFFER_EOS,{type:"audio"}),this.state=k.State.ENDED;return}var oe=j.fragments,fe=oe[0].start,Fe=U.end;if(ee){var Le=this.getLoadPosition();Fe=Le,j.PTSKnown&&Le<fe&&((U.end>fe||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),v.currentTime=fe+.05))}var Ie=this.getNextFragment(Fe,j);if(!Ie){this.bufferFlushed=!0;return}((x=Ie.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((d=Ie.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(Ie,j):this.loadFragment(Ie,j,Fe)},A.getMaxBufferLength=function(){var x=L.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,M.PlaylistLevelType.MAIN);return d===null?x:Math.max(x,d.len)},A.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},A.onAudioTracksUpdated=function(x,d){var E=d.audioTracks;this.resetTransmuxer(),this.levels=E.map(function(p){return new n.Level(p)})},A.onAudioTrackSwitching=function(x,d){var E=!!d.url;this.trackId=d.id;var p=this.fragCurrent;p!=null&&p.loader&&p.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),E?this.setInterval(w):this.resetTransmuxer(),E?(this.audioSwitch=!0,this.state=k.State.IDLE):this.state=k.State.STOPPED,this.tick()},A.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},A.onLevelLoaded=function(x,d){this.mainDetails=d.details},A.onAudioTrackLoaded=function(x,d){var E,p=this.levels,v=d.details,C=d.id;if(!p){this.warn("Audio tracks were reset while loading level "+C);return}this.log("Track "+C+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var F=p[C],R=0;if(v.live||(E=F.details)!==null&&E!==void 0&&E.live){var j=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!j)return;!F.details&&v.hasProgramDateTime&&j.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(v,j),R=v.fragments[0].start):R=this.alignPlaylists(v,F.details)}F.details=v,this.levelLastLoaded=C,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(F.details,R),this.state===k.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=k.State.IDLE),this.tick()},A._handleFragmentLoadProgress=function(x){var d,E=x.frag,p=x.part,v=x.payload,C=this.config,F=this.trackId,R=this.levels;if(!R){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+E.sn+" of level "+E.level+" will not be buffered");return}var j=R[F];console.assert(j,"Audio track is defined on fragment load progress");var U=j.details;console.assert(U,"Audio track details are defined on fragment load progress");var b=C.defaultAudioCodec||j.audioCodec||"mp4a.40.2",Q=this.transmuxer;Q||(Q=this.transmuxer=new g.default(this.hls,M.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[E.cc],oe=(d=E.initSegment)===null||d===void 0?void 0:d.data;if(ee!==void 0){var fe=!1,Fe=p?p.index:-1,Le=Fe!==-1,Ie=new u.ChunkMetadata(E.level,E.sn,E.stats.chunkCount,v.byteLength,Fe,Le);Q.push(v,oe,b,"",E,p,U.totalduration,fe,Ie,ee)}else{l.logger.log("Unknown video PTS for cc "+E.cc+", waiting for video PTS before demuxing audio frag "+E.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+F);var Be=this.waitingData=this.waitingData||{frag:E,part:p,cache:new m.default,complete:!1},We=Be.cache;We.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=k.State.WAITING_INIT_PTS}},A._handleFragmentLoadComplete=function(x){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,x)},A.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},A.onBufferCreated=function(x,d){var E=d.tracks.audio;E&&(this.mediaBuffer=E.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},A.onFragBuffered=function(x,d){var E=d.frag,p=d.part;if(E.type!==M.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(E)){this.warn("Fragment "+E.sn+(p?" p: "+p.index:"")+" of level "+E.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}E.sn!=="initSegment"&&(this.fragPrevious=E,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(E,p)},A.onError=function(x,d){switch(d.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(M.PlaylistLevelType.AUDIO,d);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==k.State.ERROR&&this.state!==k.State.STOPPED&&(this.state=d.fatal?k.State.ERROR:k.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===k.State.PARSING||this.state===k.State.PARSED)){var E=!0,p=this.getFwdBufferInfo(this.mediaBuffer,M.PlaylistLevelType.AUDIO);p&&p.len>.5&&(E=!this.reduceMaxBufferLength(p.len)),E&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},A.onBufferFlushed=function(x,d){var E=d.type;E===y.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},A._handleTransmuxComplete=function(x){var d,E="audio",p=this.hls,v=x.remuxResult,C=x.chunkMeta,F=this.getCurrentContext(C);if(!F){this.warn("The loading context changed while buffering fragment "+C.sn+" of level "+C.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(C.level);return}var R=F.frag,j=F.part,U=v.audio,b=v.text,Q=v.id3,ee=v.initSegment;if(this.fragContextChanged(R))return;if(this.state=k.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,R,C),p.trigger(B.Events.FRAG_PARSING_INIT_SEGMENT,{frag:R,id:E,tracks:ee.tracks})),U){var oe=U.startPTS,fe=U.endPTS,Fe=U.startDTS,Le=U.endDTS;j&&(j.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:fe,startDTS:Fe,endDTS:Le}),R.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,oe,fe,Fe,Le),this.bufferFragmentData(U,R,j,C)}if(Q!=null&&(d=Q.samples)!==null&&d!==void 0&&d.length){var Ie=s({frag:R,id:E},Q);p.trigger(B.Events.FRAG_PARSING_METADATA,Ie)}if(b){var Be=s({frag:R,id:E},b);p.trigger(B.Events.FRAG_PARSING_USERDATA,Be)}},A._bufferInitSegment=function(x,d,E){if(this.state!==k.State.PARSING)return;x.video&&delete x.video;var p=x.audio;if(!p)return;p.levelCodec=p.codec,p.id="audio",this.log("Init audio buffer, container:"+p.container+", codecs[parsed]=["+p.codec+"]"),this.hls.trigger(B.Events.BUFFER_CODECS,x);var v=p.initSegment;if(v!=null&&v.byteLength){var C={type:"audio",frag:d,part:null,chunkMeta:E,parent:d.type,data:v};this.hls.trigger(B.Events.BUFFER_APPENDING,C)}this.tick()},A.loadFragment=function(x,d,E){var p=this.fragmentTracker.getState(x);this.fragCurrent=x,(this.audioSwitch||p===K.FragmentState.NOT_LOADED||p===K.FragmentState.PARTIAL)&&(x.sn==="initSegment"?this._loadInitSegment(x):d.live&&!Object(V.isFiniteNumber)(this.initPTS[x.cc])?(this.log("Waiting for video PTS in continuity counter "+x.cc+" of live stream before loading audio fragment "+x.sn+" of level "+this.trackId),this.state=k.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,x,d,E)))},A.completeAudioSwitch=function(){var x=this.hls,d=this.media,E=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,x.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:E})},D}(k.default);G.default=S},"./src/controller/audio-track-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts"),k=P("./src/errors.ts"),B=P("./src/controller/base-playlist-controller.ts"),z=P("./src/types/loader.ts");function K(g,u){for(var c=0;c<u.length;c++){var f=u[c];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(g,f.key,f)}}function n(g,u,c){return u&&K(g.prototype,u),c&&K(g,c),g}function M(g,u){g.prototype=Object.create(u.prototype),g.prototype.constructor=g,y(g,u)}function y(g,u){return y=Object.setPrototypeOf||function(f,o){return f.__proto__=o,f},y(g,u)}var m=function(g){M(u,g);function u(f){var o;return o=g.call(this,f,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var c=u.prototype;return c.registerListeners=function(){var o=this.hls;o.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(V.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(V.Events.ERROR,this.onError,this)},c.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,g.prototype.destroy.call(this)},c.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},c.onManifestParsed=function(o,l){this.tracks=l.audioTracks||[]},c.onAudioTrackLoaded=function(o,l){var s=l.id,a=l.details,O=this.tracksInGroup[s];if(!O){this.warn("Invalid audio track id "+s);return}var w=O.details;O.details=l.details,this.log("audioTrack "+s+" loaded ["+a.startSN+"-"+a.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,l,w))},c.onLevelLoading=function(o,l){this.switchLevel(l.level)},c.onLevelSwitching=function(o,l){this.switchLevel(l.level)},c.switchLevel=function(o){var l=this.hls.levels[o];if(!(l!=null&&l.audioGroupIds))return;var s=l.audioGroupIds[l.urlId];if(this.groupId!==s){this.groupId=s;var a=this.tracks.filter(function(w){return!s||w.groupId===s});this.selectDefaultTrack&&!a.some(function(w){return w.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=a;var O={audioTracks:a};this.log("Updating audio tracks, "+a.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,O),this.selectInitialTrack()}},c.onError=function(o,l){if(g.prototype.onError.call(this,o,l),l.fatal||!l.context)return;l.context.type===z.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},c.setAudioTrack=function(o){var l=this.tracksInGroup;if(o<0||o>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=l[this.trackId];this.log("Now switching to audio-track index "+o);var a=l[o],O=a.id,w=a.groupId,S=w===void 0?"":w,L=a.name,D=a.type,A=a.url;if(this.trackId=o,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:O,groupId:S,name:L,type:D,url:A}),a.details&&!a.details.live)return;var T=this.switchParams(a.url,s==null?void 0:s.details);this.loadPlaylist(T)},c.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,s=this.findTrackId(l)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},c.findTrackId=function(o){for(var l=this.tracksInGroup,s=0;s<l.length;s++){var a=l[s];if((!this.selectDefaultTrack||a.default)&&(!o||o===a.name))return a.id}return-1},c.loadPlaylist=function(o){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var s=l.id,a=l.groupId,O=l.url;if(o)try{O=o.addDirectives(O)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:O,id:s,groupId:a,deliveryDirectives:o||null})}},n(u,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),u}(B.default);G.default=m},"./src/controller/base-playlist-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return n});var V=P("./src/polyfills/number.ts"),k=P("./src/types/level.ts"),B=P("./src/controller/level-helper.ts"),z=P("./src/utils/logger.ts"),K=P("./src/errors.ts"),n=function(){function M(m,g){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=z.logger.log.bind(z.logger,g+":"),this.warn=z.logger.warn.bind(z.logger,g+":"),this.hls=m}var y=M.prototype;return y.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},y.onError=function(g,u){u.fatal&&u.type===K.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},y.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},y.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},y.stopLoad=function(){this.canLoad=!1,this.clearTimer()},y.switchParams=function(g,u){var c=u==null?void 0:u.renditionReports;if(c)for(var f=0;f<c.length;f++){var o=c[f],l=""+o.URI;if(l===g.substr(-l.length)){var s=parseInt(o["LAST-MSN"]),a=parseInt(o["LAST-PART"]);if(u&&this.hls.config.lowLatencyMode){var O=Math.min(u.age-u.partTarget,u.targetduration);a!==void 0&&O>u.partTarget&&(a+=1)}if(Object(V.isFiniteNumber)(s))return new k.HlsUrlParameters(s,Object(V.isFiniteNumber)(a)?a:void 0,k.HlsSkip.No)}}},y.loadPlaylist=function(g){},y.shouldLoadTrack=function(g){return this.canLoad&&g&&!!g.url&&(!g.details||g.details.live)},y.playlistLoaded=function(g,u,c){var f=this,o=u.details,l=u.stats,s=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(o.advancedDateTime=Date.now()-s,o.live||c!=null&&c.live){if(o.reloaded(c),c&&this.log("live playlist "+g+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),c&&o.fragments.length>0&&Object(B.mergeDetails)(c,o),!this.canLoad||!o.live)return;var a,O=void 0,w=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var S=this.hls.config.lowLatencyMode,L=o.lastPartSn,D=o.endSN,A=o.lastPartIndex,T=A!==-1,x=L===D,d=S?0:A;T?(O=x?D+1:L,w=x?d:A+1):O=D+1;var E=o.age,p=E+o.ageHeader,v=Math.min(p-o.partTarget,o.targetduration*1.5);if(v>0){if(c&&v>c.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+c.tuneInGoal+" to: "+v+" with playlist age: "+o.age),v=0;else{var C=Math.floor(v/o.targetduration);if(O+=C,w!==void 0){var F=Math.round(v%o.targetduration/o.partTarget);w+=F}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+E.toFixed(2)+"s goal: "+v+" skip sn "+C+" to part "+w)}o.tuneInGoal=v}if(a=this.getDeliveryDirectives(o,u.deliveryDirectives,O,w),S||!x){this.loadPlaylist(a);return}}else a=this.getDeliveryDirectives(o,u.deliveryDirectives,O,w);var R=Object(B.computeReloadInterval)(o,l);O!==void 0&&o.canBlockReload&&(R-=o.partTarget||1),this.log("reload live playlist "+g+" in "+Math.round(R)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(a)},R)}else this.clearTimer()},y.getDeliveryDirectives=function(g,u,c,f){var o=Object(k.getSkipValue)(g,c);return u!=null&&u.skip&&g.deltaUpdateFailed&&(c=u.msn,f=u.part,o=k.HlsSkip.No),new k.HlsUrlParameters(c,f,o)},y.retryLoadingOrFail=function(g){var u=this,c=this.hls.config,f=this.retryCount<c.levelLoadingMaxRetry;if(f){var o;if(this.retryCount++,g.details.indexOf("LoadTimeOut")>-1&&(o=g.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+g.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*c.levelLoadingRetryDelay,c.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return u.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+g.details+'"')}}else this.warn('cannot recover from error "'+g.details+'"'),this.clearTimer(),g.fatal=!0;return f},M}()},"./src/controller/base-stream-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"State",function(){return D}),P.d(G,"default",function(){return A});var V=P("./src/polyfills/number.ts"),k=P("./src/task-loop.ts"),B=P("./src/controller/fragment-tracker.ts"),z=P("./src/utils/buffer-helper.ts"),K=P("./src/utils/logger.ts"),n=P("./src/events.ts"),M=P("./src/errors.ts"),y=P("./src/types/transmuxer.ts"),m=P("./src/utils/mp4-tools.ts"),g=P("./src/utils/discontinuities.ts"),u=P("./src/controller/fragment-finders.ts"),c=P("./src/controller/level-helper.ts"),f=P("./src/loader/fragment-loader.ts"),o=P("./src/crypt/decrypter.ts"),l=P("./src/utils/time-ranges.ts"),s=P("./src/types/loader.ts");function a(T,x){for(var d=0;d<x.length;d++){var E=x[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(T,E.key,E)}}function O(T,x,d){return x&&a(T.prototype,x),d&&a(T,d),T}function w(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function S(T,x){T.prototype=Object.create(x.prototype),T.prototype.constructor=T,L(T,x)}function L(T,x){return L=Object.setPrototypeOf||function(E,p){return E.__proto__=p,E},L(T,x)}var D={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"},A=function(T){S(x,T);function x(E,p,v){var C;return C=T.call(this)||this,C.hls=void 0,C.fragPrevious=null,C.fragCurrent=null,C.fragmentTracker=void 0,C.transmuxer=null,C._state=D.STOPPED,C.media=void 0,C.mediaBuffer=void 0,C.config=void 0,C.bitrateTest=!1,C.lastCurrentTime=0,C.nextLoadPosition=0,C.startPosition=0,C.loadedmetadata=!1,C.fragLoadError=0,C.retryDate=0,C.levels=null,C.fragmentLoader=void 0,C.levelLastLoaded=null,C.startFragRequested=!1,C.decrypter=void 0,C.initPTS=[],C.onvseeking=null,C.onvended=null,C.logPrefix="",C.log=void 0,C.warn=void 0,C.logPrefix=v,C.log=K.logger.log.bind(K.logger,v+":"),C.warn=K.logger.warn.bind(K.logger,v+":"),C.hls=E,C.fragmentLoader=new f.default(E.config),C.fragmentTracker=p,C.config=E.config,C.decrypter=new o.default(E,E.config),E.on(n.Events.KEY_LOADED,C.onKeyLoaded,w(C)),C}var d=x.prototype;return d.doTick=function(){this.onTickEnd()},d.onTickEnd=function(){},d.startLoad=function(p){},d.stopLoad=function(){this.fragmentLoader.abort();var p=this.fragCurrent;p&&this.fragmentTracker.removeFragment(p),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=D.STOPPED},d._streamEnded=function(p,v){var C=this.fragCurrent,F=this.fragmentTracker;if(!v.live&&C&&C.sn===v.endSN&&!p.nextStart){var R=F.getState(C);return R===B.FragmentState.PARTIAL||R===B.FragmentState.OK}return!1},d.onMediaAttached=function(p,v){var C=this.media=this.mediaBuffer=v.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),C.addEventListener("seeking",this.onvseeking),C.addEventListener("ended",this.onvended);var F=this.config;this.levels&&F.autoStartLoad&&this.state===D.STOPPED&&this.startLoad(F.startPosition)},d.onMediaDetaching=function(){var p=this.media;p!=null&&p.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),p&&(p.removeEventListener("seeking",this.onvseeking),p.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onMediaSeeking=function(){var p=this.config,v=this.fragCurrent,C=this.media,F=this.mediaBuffer,R=this.state,j=C?C.currentTime:0,U=z.BufferHelper.bufferInfo(F||C,j,p.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(j)?j.toFixed(3):j)+", state: "+R),R===D.ENDED)this.resetLoadingState();else if(v&&!U.len){var b=p.maxFragLookUpTolerance,Q=v.start-b,ee=v.start+v.duration+b,oe=j>ee;(j<Q||oe)&&(oe&&v.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),v.loader.abort()),this.resetLoadingState())}C&&(this.lastCurrentTime=j),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=j),this.tickImmediate()},d.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},d.onKeyLoaded=function(p,v){if(this.state!==D.KEY_LOADING||v.frag!==this.fragCurrent||!this.levels)return;this.state=D.IDLE;var C=this.levels[v.frag.level].details;C&&this.loadFragment(v.frag,C,v.frag.start)},d.onHandlerDestroying=function(){this.stopLoad(),T.prototype.onHandlerDestroying.call(this)},d.onHandlerDestroyed=function(){this.state=D.STOPPED,this.hls.off(n.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,T.prototype.onHandlerDestroyed.call(this)},d.loadKey=function(p,v){this.log("Loading key for "+p.sn+" of ["+v.startSN+"-"+v.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level),this.state=D.KEY_LOADING,this.fragCurrent=p,this.hls.trigger(n.Events.KEY_LOADING,{frag:p})},d.loadFragment=function(p,v,C){this._loadFragForPlayback(p,v,C)},d._loadFragForPlayback=function(p,v,C){var F=this,R=function(U){if(F.fragContextChanged(p)){F.warn("Fragment "+p.sn+(U.part?" p: "+U.part.index:"")+" of level "+p.level+" was dropped during download."),F.fragmentTracker.removeFragment(p);return}p.stats.chunkCount++,F._handleFragmentLoadProgress(U)};this._doFragLoad(p,v,C,R).then(function(j){if(!j)return;F.fragLoadError=0;var U=F.state;if(F.fragContextChanged(p)){(U===D.FRAG_LOADING||U===D.BACKTRACKING||!F.fragCurrent&&U===D.PARSING)&&(F.fragmentTracker.removeFragment(p),F.state=D.IDLE);return}if("payload"in j&&(F.log("Loaded fragment "+p.sn+" of level "+p.level),F.hls.trigger(n.Events.FRAG_LOADED,j),F.state===D.BACKTRACKING)){F.fragmentTracker.backtrack(p,j),F.resetFragmentLoading(p);return}F._handleFragmentLoadComplete(j)}).catch(function(j){F.warn(j),F.resetFragmentLoading(p)})},d.flushMainBuffer=function(p,v,C){if(C===void 0&&(C=null),!(p-v))return;var F={startOffset:p,endOffset:v,type:C};this.fragLoadError=0,this.hls.trigger(n.Events.BUFFER_FLUSHING,F)},d._loadInitSegment=function(p){var v=this;this._doFragLoad(p).then(function(C){if(!C||v.fragContextChanged(p)||!v.levels)throw new Error("init load aborted");return C}).then(function(C){var F=v.hls,R=C.payload,j=p.decryptdata;if(R&&R.byteLength>0&&j&&j.key&&j.iv&&j.method==="AES-128"){var U=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(R),j.key.buffer,j.iv.buffer).then(function(b){var Q=self.performance.now();return F.trigger(n.Events.FRAG_DECRYPTED,{frag:p,payload:b,stats:{tstart:U,tdecrypt:Q}}),C.payload=b,C})}return C}).then(function(C){var F=v.fragCurrent,R=v.hls,j=v.levels;if(!j)throw new Error("init load aborted, missing levels");var U=j[p.level].details;console.assert(U,"Level details are defined when init segment is loaded");var b=p.stats;v.state=D.IDLE,v.fragLoadError=0,p.data=new Uint8Array(C.payload),b.parsing.start=b.buffering.start=self.performance.now(),b.parsing.end=b.buffering.end=self.performance.now(),C.frag===F&&R.trigger(n.Events.FRAG_BUFFERED,{stats:b,frag:F,part:null,id:p.type}),v.tick()}).catch(function(C){v.warn(C),v.resetFragmentLoading(p)})},d.fragContextChanged=function(p){var v=this.fragCurrent;return!p||!v||p.level!==v.level||p.sn!==v.sn||p.urlId!==v.urlId},d.fragBufferedComplete=function(p,v){var C=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+p.type+" sn: "+p.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level+" "+l.default.toString(z.BufferHelper.getBuffered(C))),this.state=D.IDLE,this.tick()},d._handleFragmentLoadComplete=function(p){var v=this.transmuxer;if(!v)return;var C=p.frag,F=p.part,R=p.partsLoaded,j=!R||R.length===0||R.some(function(b){return!b}),U=new y.ChunkMetadata(C.level,C.sn,C.stats.chunkCount+1,0,F?F.index:-1,!j);v.flush(U)},d._handleFragmentLoadProgress=function(p){},d._doFragLoad=function(p,v,C,F){var R=this;if(C===void 0&&(C=null),!this.levels)throw new Error("frag load aborted, missing levels");if(C=Math.max(p.start,C||0),this.config.lowLatencyMode&&v){var j=v.partList;if(j&&F){C>p.end&&v.fragmentHint&&(p=v.fragmentHint);var U=this.getNextPart(j,p,C);if(U>-1){var b=j[U];return this.log("Loading part sn: "+p.sn+" p: "+b.index+" cc: "+p.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+U+"-"+(j.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(C.toFixed(3))),this.nextLoadPosition=b.start+b.duration,this.state=D.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:p,part:j[U],targetBufferTime:C}),this.doFragPartsLoad(p,j,U,F).catch(function(Q){return R.handleFragLoadError(Q)})}else if(!p.url||this.loadedEndOfParts(j,C))return Promise.resolve(null)}}return this.log("Loading fragment "+p.sn+" cc: "+p.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(C.toFixed(3))),Object(V.isFiniteNumber)(p.sn)&&!this.bitrateTest&&(this.nextLoadPosition=p.start+p.duration),this.state=D.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:p,targetBufferTime:C}),this.fragmentLoader.load(p,F).catch(function(Q){return R.handleFragLoadError(Q)})},d.doFragPartsLoad=function(p,v,C,F){var R=this;return new Promise(function(j,U){var b=[],Q=function ee(oe){var fe=v[oe];R.fragmentLoader.loadPart(p,fe,F).then(function(Fe){b[fe.index]=Fe;var Le=Fe.part;R.hls.trigger(n.Events.FRAG_LOADED,Fe);var Ie=v[oe+1];if(Ie&&Ie.fragment===p)ee(oe+1);else return j({frag:p,part:Le,partsLoaded:b})}).catch(U)};Q(C)})},d.handleFragLoadError=function(p){var v=p.data;return v&&v.details===M.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(n.Events.ERROR,v),null},d._handleTransmuxerFlush=function(p){var v=this.getCurrentContext(p);if(!v||this.state!==D.PARSING){this.fragCurrent||(this.state=D.IDLE);return}var C=v.frag,F=v.part,R=v.level,j=self.performance.now();C.stats.parsing.end=j,F&&(F.stats.parsing.end=j),this.updateLevelTiming(C,F,R,p.partial)},d.getCurrentContext=function(p){var v=this.levels,C=p.level,F=p.sn,R=p.part;if(!v||!v[C])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+C+". The current chunk will not be buffered."),null;var j=v[C],U=R>-1?Object(c.getPartWith)(j,F,R):null,b=U?U.fragment:Object(c.getFragmentWithSN)(j,F,this.fragCurrent);return b?{frag:b,part:U,level:j}:null},d.bufferFragmentData=function(p,v,C,F){if(!p||this.state!==D.PARSING)return;var R=p.data1,j=p.data2,U=R;if(R&&j&&(U=Object(m.appendUint8Array)(R,j)),!U||!U.length)return;var b={type:p.type,frag:v,part:C,chunkMeta:F,parent:v.type,data:U};this.hls.trigger(n.Events.BUFFER_APPENDING,b),p.dropped&&p.independent&&!C&&this.flushBufferGap(v)},d.flushBufferGap=function(p){var v=this.media;if(!v)return;if(!z.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,p.start);return}var C=v.currentTime,F=z.BufferHelper.bufferInfo(v,C,0),R=p.duration,j=Math.min(this.config.maxFragLookUpTolerance*2,R*.25),U=Math.max(Math.min(p.start-j,F.end-j),C+j);p.start-U>j&&this.flushMainBuffer(U,p.start)},d.getFwdBufferInfo=function(p,v){var C=this.config,F=this.getLoadPosition();if(!Object(V.isFiniteNumber)(F))return null;var R=z.BufferHelper.bufferInfo(p,F,C.maxBufferHole);if(R.len===0&&R.nextStart!==void 0){var j=this.fragmentTracker.getBufferedFrag(F,v);if(j&&R.nextStart<j.end)return z.BufferHelper.bufferInfo(p,F,Math.max(R.nextStart,C.maxBufferHole))}return R},d.getMaxBufferLength=function(p){var v=this.config,C;return p?C=Math.max(8*v.maxBufferSize/p,v.maxBufferLength):C=v.maxBufferLength,Math.min(C,v.maxMaxBufferLength)},d.reduceMaxBufferLength=function(p){var v=this.config,C=p||v.maxBufferLength;return v.maxMaxBufferLength>=C?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(p,v){var C,F,R=v.fragments,j=R.length;if(!j)return null;var U=this.config,b=R[0].start,Q;if(v.live){var ee=U.initialLiveManifestSize;if(j<ee)return this.warn("Not enough fragments to start playback (have: "+j+", need: "+ee+")"),null;!v.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Q=this.getInitialLiveFragment(v,R),this.startPosition=Q?this.hls.liveSyncPosition||Q.start:p)}else p<=b&&(Q=R[0]);if(!Q){var oe=U.lowLatencyMode?v.partEnd:v.fragmentEnd;Q=this.getFragmentAtPosition(p,oe,v)}return(C=Q)!==null&&C!==void 0&&C.initSegment&&!((F=Q)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(Q=Q.initSegment),Q},d.getNextPart=function(p,v,C){for(var F=-1,R=!1,j=!0,U=0,b=p.length;U<b;U++){var Q=p[U];if(j=j&&!Q.independent,F>-1&&C<Q.start)break;var ee=Q.loaded;!ee&&(R||Q.independent||j)&&Q.fragment===v&&(F=U),R=ee}return F},d.loadedEndOfParts=function(p,v){var C=p[p.length-1];return C&&v>C.start&&C.loaded},d.getInitialLiveFragment=function(p,v){var C=this.fragPrevious,F=null;if(C){if(p.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+C.programDateTime),F=Object(u.findFragmentByPDT)(v,C.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var R=C.sn+1;if(R>=p.startSN&&R<=p.endSN){var j=v[R-p.startSN];C.cc===j.cc&&(F=j,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(u.findFragWithCC)(v,C.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(F=this.getFragmentAtPosition(U,this.bitrateTest?p.fragmentEnd:p.edge,p))}return F},d.getFragmentAtPosition=function(p,v,C){var F=this.config,R=this.fragPrevious,j=C.fragments,U=C.endSN,b=C.fragmentHint,Q=F.maxFragLookUpTolerance,ee=!!(F.lowLatencyMode&&C.partList&&b);ee&&b&&!this.bitrateTest&&(j=j.concat(b),U=b.sn);var oe;if(p<v){var fe=p>v-Q?0:Q;oe=Object(u.findFragmentByPTS)(R,j,p,fe)}else oe=j[j.length-1];if(oe){var Fe=oe.sn-C.startSN,Le=R&&oe.level===R.level,Ie=j[Fe+1],Be=this.fragmentTracker.getState(oe);if(Be===B.FragmentState.BACKTRACKED){oe=null;for(var We=Fe;j[We]&&this.fragmentTracker.getState(j[We])===B.FragmentState.BACKTRACKED;)R?oe=j[We--]:oe=j[--We];oe||(oe=Ie)}else R&&oe.sn===R.sn&&!ee&&(Le&&(oe.sn<U&&this.fragmentTracker.getState(Ie)!==B.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+Ie.sn),oe=Ie):oe=null))}return oe},d.synchronizeToLiveEdge=function(p){var v=this.config,C=this.media;if(!C)return;var F=this.hls.liveSyncPosition,R=C.currentTime,j=p.fragments[0].start,U=p.edge,b=R>=j-v.maxFragLookUpTolerance&&R<=U;if(F!==null&&C.duration>F&&(R<F||!b)){var Q=v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:v.liveMaxLatencyDurationCount*p.targetduration;(!b&&C.readyState<4||R<U-Q)&&(this.loadedmetadata||(this.nextLoadPosition=F),C.readyState&&(this.warn("Playback: "+R.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+F.toFixed(3)),C.currentTime=F))}},d.alignPlaylists=function(p,v){var C=this.levels,F=this.levelLastLoaded,R=this.fragPrevious,j=F!==null?C[F]:null,U=p.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var b=p.fragments[0].start,Q=!v,ee=p.alignedSliding&&Object(V.isFiniteNumber)(b);if(Q||!ee&&!b){Object(g.alignStream)(R,j,p);var oe=p.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(v?v.startSN:"na")+"->"+p.startSN+" prev-sn: "+(R?R.sn:"na")+" fragments: "+U),oe}return b},d.waitForCdnTuneIn=function(p){var v=3;return p.live&&p.canBlockReload&&p.tuneInGoal>Math.max(p.partHoldBack,p.partTarget*v)},d.setStartPosition=function(p,v){var C=this.startPosition;if(C<v&&(C=-1),C===-1||this.lastCurrentTime===-1){var F=p.startTimeOffset;Object(V.isFiniteNumber)(F)?(C=v+F,F<0&&(C+=p.totalduration),C=Math.min(Math.max(v,C),v+p.totalduration),this.log("Start time offset "+F+" found in playlist, adjust startPosition to "+C),this.startPosition=C):p.live?C=this.hls.liveSyncPosition||v:this.startPosition=C=0,this.lastCurrentTime=C}this.nextLoadPosition=C},d.getLoadPosition=function(){var p=this.media,v=0;return this.loadedmetadata&&p?v=p.currentTime:this.nextLoadPosition&&(v=this.nextLoadPosition),v},d.handleFragLoadAborted=function(p,v){this.transmuxer&&p.sn!=="initSegment"&&p.stats.aborted&&(this.warn("Fragment "+p.sn+(v?" part"+v.index:"")+" of level "+p.level+" was aborted"),this.resetFragmentLoading(p))},d.resetFragmentLoading=function(p){(!this.fragCurrent||!this.fragContextChanged(p))&&(this.state=D.IDLE)},d.onFragmentOrKeyLoadError=function(p,v){if(v.fatal)return;var C=v.frag;if(!C||C.type!==p)return;var F=this.fragCurrent;console.assert(F&&C.sn===F.sn&&C.level===F.level&&C.urlId===F.urlId,"Frag load error must match current frag to retry");var R=this.config;if(this.fragLoadError+1<=R.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(C.level))return;var j=Math.min(Math.pow(2,this.fragLoadError)*R.fragLoadingRetryDelay,R.fragLoadingMaxRetryTimeout);this.warn("Fragment "+C.sn+" of "+p+" "+C.level+" failed to load, retrying in "+j+"ms"),this.retryDate=self.performance.now()+j,this.fragLoadError++,this.state=D.FRAG_LOADING_WAITING_RETRY}else v.levelRetry?(p===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=D.IDLE):(K.logger.error(v.details+" reaches max retry, redispatch as fatal ..."),v.fatal=!0,this.hls.stopLoad(),this.state=D.ERROR)},d.afterBufferFlushed=function(p,v,C){if(!p)return;var F=z.BufferHelper.getBuffered(p);this.fragmentTracker.detectEvictedFragments(v,F,C),this.state===D.ENDED&&this.resetLoadingState()},d.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=D.IDLE},d.resetLiveStartWhenNotLoaded=function(p){if(!this.loadedmetadata){this.startFragRequested=!1;var v=this.levels?this.levels[p].details:null;if(v!=null&&v.live)return this.startPosition=-1,this.setStartPosition(v,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},d.updateLevelTiming=function(p,v,C,F){var R=this,j=C.details;console.assert(!!j,"level.details must be defined");var U=Object.keys(p.elementaryStreams).reduce(function(b,Q){var ee=p.elementaryStreams[Q];if(ee){var oe=ee.endPTS-ee.startPTS;if(oe<=0)return R.warn("Could not parse fragment "+p.sn+" "+Q+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),R.resetTransmuxer(),b||!1;var fe=F?0:Object(c.updateFragPTSDTS)(j,p,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return R.hls.trigger(n.Events.LEVEL_PTS_UPDATED,{details:j,level:C,drift:fe,type:Q,frag:p,start:ee.startPTS,end:ee.endPTS}),!0}return b},!1);U?(this.state=D.PARSED,this.hls.trigger(n.Events.FRAG_PARSED,{frag:p,part:v})):this.resetLoadingState()},d.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},O(x,[{key:"state",get:function(){return this._state},set:function(p){var v=this._state;v!==p&&(this._state=p,this.log(v+"->"+p))}}]),x}(k.default)},"./src/controller/buffer-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return u});var V=P("./src/polyfills/number.ts"),k=P("./src/events.ts"),B=P("./src/utils/logger.ts"),z=P("./src/errors.ts"),K=P("./src/utils/buffer-helper.ts"),n=P("./src/utils/mediasource-helper.ts"),M=P("./src/loader/fragment.ts"),y=P("./src/controller/buffer-operation-queue.ts"),m=Object(n.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,u=function(){function c(o){var l=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=l.hls,a=l.media,O=l.mediaSource;B.logger.log("[buffer-controller]: Media source opened"),a&&(l.updateMediaElementDuration(),s.trigger(k.Events.MEDIA_ATTACHED,{media:a})),O&&O.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){B.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.logger.log("[buffer-controller]: Media source ended")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var f=c.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var l=this.hls;l.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(k.Events.BUFFER_RESET,this.onBufferReset,this),l.on(k.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(k.Events.BUFFER_EOS,this.onBufferEos,this),l.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(k.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(k.Events.FRAG_PARSED,this.onFragParsed,this),l.on(k.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var l=this.hls;l.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(k.Events.BUFFER_RESET,this.onBufferReset,this),l.off(k.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(k.Events.BUFFER_EOS,this.onBufferEos,this),l.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(k.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(k.Events.FRAG_PARSED,this.onFragParsed,this),l.off(k.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new y.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(l,s){var a=2;(s.audio&&!s.video||!s.altAudio)&&(a=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=a,this.details=null,B.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(l,s){var a=this.media=s.media;if(a&&m){var O=this.mediaSource=new m;O.addEventListener("sourceopen",this._onMediaSourceOpen),O.addEventListener("sourceended",this._onMediaSourceEnded),O.addEventListener("sourceclose",this._onMediaSourceClose),a.src=self.URL.createObjectURL(O),this._objectUrl=a.src}},f.onMediaDetaching=function(){var l=this.media,s=this.mediaSource,a=this._objectUrl;if(s){if(B.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(O){B.logger.warn("[buffer-controller]: onMediaDetaching: "+O.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(a&&self.URL.revokeObjectURL(a),l.src===a?(l.removeAttribute("src"),l.load()):B.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(k.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var l=this;this.getSourceBufferTypes().forEach(function(s){var a=l.sourceBuffer[s];try{a&&(l.removeBufferListeners(s),l.mediaSource&&l.mediaSource.removeSourceBuffer(a),l.sourceBuffer[s]=void 0)}catch(O){B.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",O)}}),this._initSourceBuffer()},f.onBufferCodecs=function(l,s){var a=this,O=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(w){if(O){var S=a.tracks[w];if(S&&typeof S.buffer.changeType=="function"){var L=s[w],D=L.codec,A=L.levelCodec,T=L.container,x=(S.levelCodec||S.codec).replace(g,"$1"),d=(A||D).replace(g,"$1");if(x!==d){var E=T+";codecs="+(A||D);a.appendChangeType(w,E)}}}else a.pendingTracks[w]=s[w]}),O)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(l,s){var a=this,O=this.operationQueue,w={execute:function(){var L=a.sourceBuffer[l];L&&(B.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+s),L.changeType(s)),O.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(L){B.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",L)}};O.append(w,l)},f.onBufferAppending=function(l,s){var a=this,O=this.hls,w=this.operationQueue,S=this.tracks,L=s.data,D=s.type,A=s.frag,T=s.part,x=s.chunkMeta,d=x.buffering[D],E=self.performance.now();d.start=E;var p=A.stats.buffering,v=T?T.stats.buffering:null;p.start===0&&(p.start=E),v&&v.start===0&&(v.start=E);var C=S.audio,F=D==="audio"&&x.id===1&&(C==null?void 0:C.container)==="audio/mpeg",R={execute:function(){if(d.executeStart=self.performance.now(),F){var U=a.sourceBuffer[D];if(U){var b=A.start-U.timestampOffset;Math.abs(b)>=.1&&(B.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+A.start+" (delta: "+b+") sn: "+A.sn+")"),U.timestampOffset=A.start)}}a.appendExecutor(L,D)},onStart:function(){},onComplete:function(){var U=self.performance.now();d.executeEnd=d.end=U,p.first===0&&(p.first=U),v&&v.first===0&&(v.first=U);var b=a.sourceBuffer,Q={};for(var ee in b)Q[ee]=K.BufferHelper.getBuffered(b[ee]);a.appendError=0,a.hls.trigger(k.Events.BUFFER_APPENDED,{type:D,frag:A,part:T,chunkMeta:x,parent:A.type,timeRanges:Q})},onError:function(U){B.logger.error("[buffer-controller]: Error encountered while trying to append to the "+D+" SourceBuffer",U);var b={type:z.ErrorTypes.MEDIA_ERROR,parent:A.type,details:z.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?b.details=z.ErrorDetails.BUFFER_FULL_ERROR:(a.appendError++,b.details=z.ErrorDetails.BUFFER_APPEND_ERROR,a.appendError>O.config.appendErrorMaxRetry&&(B.logger.error("[buffer-controller]: Failed "+O.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),b.fatal=!0)),O.trigger(k.Events.ERROR,b)}};w.append(R,D)},f.onBufferFlushing=function(l,s){var a=this,O=this.operationQueue,w=function(L){return{execute:a.removeExecutor.bind(a,L,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){a.hls.trigger(k.Events.BUFFER_FLUSHED,{type:L})},onError:function(A){B.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",A)}}};s.type?O.append(w(s.type),s.type):this.getSourceBufferTypes().forEach(function(S){O.append(w(S),S)})},f.onFragParsed=function(l,s){var a=this,O=s.frag,w=s.part,S=[],L=w?w.elementaryStreams:O.elementaryStreams;L[M.ElementaryStreamTypes.AUDIOVIDEO]?S.push("audiovideo"):(L[M.ElementaryStreamTypes.AUDIO]&&S.push("audio"),L[M.ElementaryStreamTypes.VIDEO]&&S.push("video"));var D=function(){var T=self.performance.now();O.stats.buffering.end=T,w&&(w.stats.buffering.end=T);var x=w?w.stats:O.stats;a.hls.trigger(k.Events.FRAG_BUFFERED,{frag:O,part:w,stats:x,id:O.type})};S.length===0&&B.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+O.type+" level: "+O.level+" sn: "+O.sn),this.blockBuffers(D,S)},f.onFragChanged=function(l,s){this.flushBackBuffer()},f.onBufferEos=function(l,s){var a=this,O=this.getSourceBufferTypes().reduce(function(w,S){var L=a.sourceBuffer[S];return(!s.type||s.type===S)&&(L&&!L.ended&&(L.ended=!0,B.logger.log("[buffer-controller]: "+S+" sourceBuffer now EOS"))),w&&!!(!L||L.ended)},!0);O&&this.blockBuffers(function(){var w=a.mediaSource;if(!w||w.readyState!=="open")return;w.endOfStream()})},f.onLevelUpdated=function(l,s){var a=s.details;if(!a.fragments.length)return;this.details=a,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var l=this.hls,s=this.details,a=this.media,O=this.sourceBuffer;if(!a||s===null)return;var w=this.getSourceBufferTypes();if(!w.length)return;var S=s.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(V.isFiniteNumber)(S)||S<0)return;var L=a.currentTime,D=s.levelTargetDuration,A=Math.max(S,D),T=Math.floor(L/D)*D-A;w.forEach(function(x){var d=O[x];if(d){var E=K.BufferHelper.getBuffered(d);E.length>0&&T>E.start(0)&&(l.trigger(k.Events.BACK_BUFFER_REACHED,{bufferEnd:T}),s.live&&l.trigger(k.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:T}),l.trigger(k.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:T,type:x}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,s=this.hls,a=this.media,O=this.mediaSource,w=l.fragments[0].start+l.totalduration,S=a.duration,L=Object(V.isFiniteNumber)(O.duration)?O.duration:0;l.live&&s.config.liveDurationInfinity?(B.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),O.duration=Infinity,this.updateSeekableRange(l)):(w>L&&w>S||!Object(V.isFiniteNumber)(S))&&(B.logger.log("[buffer-controller]: Updating Media Source duration to "+w.toFixed(3)),O.duration=w)},f.updateSeekableRange=function(l){var s=this.mediaSource,a=l.fragments,O=a.length;if(O&&l.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var w=Math.max(0,a[0].start),S=Math.max(w,w+l.totalduration);s.setLiveSeekableRange(w,S)}},f.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,s=this.operationQueue,a=this.pendingTracks,O=Object.keys(a).length;if(O&&!l||O===2){this.createSourceBuffers(a),this.pendingTracks={};var w=this.getSourceBufferTypes();if(w.length===0){this.hls.trigger(k.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}w.forEach(function(S){s.executeNext(S)})}},f.createSourceBuffers=function(l){var s=this.sourceBuffer,a=this.mediaSource;if(!a)throw Error("createSourceBuffers called when mediaSource was null");var O=0;for(var w in l)if(!s[w]){var S=l[w];if(!S)throw Error("source buffer exists for track "+w+", however track does not");var L=S.levelCodec||S.codec,D=S.container+";codecs="+L;B.logger.log("[buffer-controller]: creating sourceBuffer("+D+")");try{var A=s[w]=a.addSourceBuffer(D),T=w;this.addBufferListener(T,"updatestart",this._onSBUpdateStart),this.addBufferListener(T,"updateend",this._onSBUpdateEnd),this.addBufferListener(T,"error",this._onSBUpdateError),this.tracks[w]={buffer:A,codec:L,container:S.container,levelCodec:S.levelCodec,id:S.id},O++}catch(x){B.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+x.message),this.hls.trigger(k.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:x,mimeType:D})}}O&&this.hls.trigger(k.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(l){var s=this.operationQueue,a=s.current(l);a.onStart()},f._onSBUpdateEnd=function(l){var s=this.operationQueue,a=s.current(l);a.onComplete(),s.shiftAndExecuteNext(l)},f._onSBUpdateError=function(l,s){B.logger.error("[buffer-controller]: "+l+" SourceBuffer error",s),this.hls.trigger(k.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var a=this.operationQueue.current(l);a&&a.onError(s)},f.removeExecutor=function(l,s,a){var O=this.media,w=this.mediaSource,S=this.operationQueue,L=this.sourceBuffer,D=L[l];if(!O||!w||!D){B.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),S.shiftAndExecuteNext(l);return}var A=Object(V.isFiniteNumber)(O.duration)?O.duration:Infinity,T=Object(V.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Math.max(0,s),d=Math.min(a,A,T);d>x?(B.logger.log("[buffer-controller]: Removing ["+x+","+d+"] from the "+l+" SourceBuffer"),console.assert(!D.updating,l+" sourceBuffer must not be updating"),D.remove(x,d)):S.shiftAndExecuteNext(l)},f.appendExecutor=function(l,s){var a=this.operationQueue,O=this.sourceBuffer,w=O[s];if(!w){B.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(s);return}w.ended=!1,console.assert(!w.updating,s+" sourceBuffer must not be updating"),w.appendBuffer(l)},f.blockBuffers=function(l,s){var a=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){B.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var O=this.operationQueue,w=s.map(function(S){return O.appendBlocker(S)});Promise.all(w).then(function(){l(),s.forEach(function(S){var L=a.sourceBuffer[S];(!L||!L.updating)&&O.shiftAndExecuteNext(S)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(l,s,a){var O=this.sourceBuffer[l];if(!O)return;var w=a.bind(this,l);this.listeners[l].push({event:s,listener:w}),O.addEventListener(s,w)},f.removeBufferListeners=function(l){var s=this.sourceBuffer[l];if(!s)return;this.listeners[l].forEach(function(a){s.removeEventListener(a.event,a.listener)})},c}()},"./src/controller/buffer-operation-queue.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return k});var V=P("./src/utils/logger.ts"),k=function(){function B(K){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=K}var z=B.prototype;return z.append=function(n,M){var y=this.queues[M];y.push(n),y.length===1&&this.buffers[M]&&this.executeNext(M)},z.insertAbort=function(n,M){var y=this.queues[M];y.unshift(n),this.executeNext(M)},z.appendBlocker=function(n){var M,y=new Promise(function(g){M=g}),m={execute:M,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,n),y},z.executeNext=function(n){var M=this.buffers,y=this.queues,m=M[n],g=y[n];if(g.length){var u=g[0];try{u.execute()}catch(c){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),u.onError(c),(!m||!m.updating)&&(g.shift(),this.executeNext(n))}}},z.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},z.current=function(n){return this.queues[n][0]},B}()},"./src/controller/cap-level-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts");function k(K,n){for(var M=0;M<n.length;M++){var y=n[M];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(K,y.key,y)}}function B(K,n,M){return n&&k(K.prototype,n),M&&k(K,M),K}var z=function(){function K(M){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=M,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var n=K.prototype;return n.setStreamController=function(y){this.streamController=y},n.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},n.registerListeners=function(){var y=this.hls;y.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.unregisterListener=function(){var y=this.hls;y.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.onFpsDropLevelCapping=function(y,m){K.isLevelAllowed(m.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(m.droppedLevel)},n.onMediaAttaching=function(y,m){this.media=m.media instanceof HTMLVideoElement?m.media:null},n.onManifestParsed=function(y,m){var g=this.hls;this.restrictedLevels=[],this.firstLevel=m.firstLevel,g.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onBufferCodecs=function(y,m){var g=this.hls;g.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onMediaDetaching=function(){this.stopCapping()},n.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var y=this.hls.levels;if(y.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(y.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},n.getMaxLevel=function(y){var m=this,g=this.hls.levels;if(!g.length)return-1;var u=g.filter(function(c,f){return K.isLevelAllowed(f,m.restrictedLevels)&&f<=y});return this.clientRect=null,K.getMaxLevelByMediaSize(u,this.mediaWidth,this.mediaHeight)},n.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()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var y=this.media,m={width:0,height:0};if(y){var g=y.getBoundingClientRect();m.width=g.width,m.height=g.height,!m.width&&!m.height&&(m.width=g.right-g.left||y.width||0,m.height=g.bottom-g.top||y.height||0)}return this.clientRect=m,m},K.isLevelAllowed=function(y,m){return m===void 0&&(m=[]),m.indexOf(y)===-1},K.getMaxLevelByMediaSize=function(y,m,g){if(!y||!y.length)return-1;for(var u=function(s,a){return a?s.width!==a.width||s.height!==a.height:!0},c=y.length-1,f=0;f<y.length;f+=1){var o=y[f];if((o.width>=m||o.height>=g)&&u(o,y[f+1])){c=f;break}}return c},B(K,[{key:"mediaWidth",get:function(){return this.getDimensions().width*K.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*K.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var y=1;try{y=self.devicePixelRatio}catch(m){}return y}}]),K}();G.default=z},"./src/controller/cmcd-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return u});var V=P("./src/events.ts"),k=P("./src/types/cmcd.ts"),B=P("./src/utils/buffer-helper.ts"),z=P("./src/utils/logger.ts");function K(c,f){for(var o=0;o<f.length;o++){var l=f[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(c,l.key,l)}}function n(c,f,o){return f&&K(c.prototype,f),o&&K(c,o),c}function M(c,f){var o=typeof Symbol!="undefined"&&c[Symbol.iterator]||c["@@iterator"];if(o)return(o=o.call(c)).next.bind(o);if(Array.isArray(c)||(o=y(c))||f&&c&&typeof c.length=="number"){o&&(c=o);var l=0;return function(){return l>=c.length?{done:!0}:{done:!1,value:c[l++]}}}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 y(c,f){if(!c)return;if(typeof c=="string")return m(c,f);var o=Object.prototype.toString.call(c).slice(8,-1);if(o==="Object"&&c.constructor&&(o=c.constructor.name),o==="Map"||o==="Set")return Array.from(c);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return m(c,f)}function m(c,f){(f==null||f>c.length)&&(f=c.length);for(var o=0,l=new Array(f);o<f;o++)l[o]=c[o];return l}function g(){return g=Object.assign||function(c){for(var f=1;f<arguments.length;f++){var o=arguments[f];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c[l]=o[l])}return c},g.apply(this,arguments)}var u=function(){function c(o){var l=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(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(O){try{l.apply(O,{ot:k.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(w){z.logger.warn("Could not generate manifest CMCD data.",w)}},this.applyFragmentData=function(O){try{var w=O.frag,S=l.hls.levels[w.level],L=l.getObjectType(w),D={d:w.duration*1e3,ot:L};(L===k.CMCDObjectType.VIDEO||L===k.CMCDObjectType.AUDIO||L==k.CMCDObjectType.MUXED)&&(D.br=S.bitrate/1e3,D.tb=l.getTopBandwidth(L),D.bl=l.getBufferLength(L)),l.apply(O,D)}catch(A){z.logger.warn("Could not generate segment CMCD data.",A)}},this.hls=o;var s=this.config=o.config,a=s.cmcd;a!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||c.uuid(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.registerListeners())}var f=c.prototype;return f.registerListeners=function(){var l=this.hls;l.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var l=this.hls;l.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(V.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(l,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(l,s){var a,O;this.audioBuffer=(a=s.tracks.audio)===null||a===void 0?void 0:a.buffer,this.videoBuffer=(O=s.tracks.video)===null||O===void 0?void 0:O.buffer},f.createData=function(){var l;return{v:k.CMCDVersion,sf:k.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(l,s){s===void 0&&(s={}),g(s,this.createData());var a=s.ot===k.CMCDObjectType.INIT||s.ot===k.CMCDObjectType.VIDEO||s.ot===k.CMCDObjectType.MUXED;if(this.starved&&a&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var O=c.toHeaders(s);if(!Object.keys(O).length)return;l.headers||(l.headers={}),g(l.headers,O)}else{var w=c.toQuery(s);if(!w)return;l.url=c.appendQueryToUri(l.url,w)}},f.getObjectType=function(l){var s=l.type;return s==="subtitle"?k.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?k.CMCDObjectType.INIT:s==="audio"?k.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?k.CMCDObjectType.VIDEO:k.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(l){for(var s=0,a=l===k.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,O=M(a),w;!(w=O()).done;){var S=w.value;S.bitrate>s&&(s=S.bitrate)}return s>0?s:NaN},f.getBufferLength=function(l){var s=this.hls.media,a=l===k.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!a||!s)return NaN;var O=B.BufferHelper.bufferInfo(a,s.currentTime,this.config.maxBufferHole);return O.len*1e3},f.createPlaylistLoader=function(){var l=this.config.pLoader,s=this.applyPlaylistData,a=l||this.config.loader;return function(){function O(S){this.loader=void 0,this.loader=new a(S)}var w=O.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,D,A){s(L),this.loader.load(L,D,A)},n(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},f.createFragmentLoader=function(){var l=this.config.fLoader,s=this.applyFragmentData,a=l||this.config.loader;return function(){function O(S){this.loader=void 0,this.loader=new a(S)}var w=O.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(L,D,A){s(L),this.loader.load(L,D,A)},n(O,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),O}()},c.uuid=function(){var l=URL.createObjectURL(new Blob),s=l.toString();return URL.revokeObjectURL(l),s.substr(s.lastIndexOf("/")+1)},c.serialize=function(l){for(var s=[],a=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},O=function(F){return Math.round(F)},w=function(F){return O(F/100)*100},S=function(F){return encodeURIComponent(F)},L={br:O,d:O,bl:w,dl:w,mtp:w,nor:S,rtp:w,tb:O},D=Object.keys(l||{}).sort(),A=M(D),T;!(T=A()).done;){var x=T.value,d=l[x];if(!a(d))continue;if(x==="v"&&d===1)continue;if(x=="pr"&&d===1)continue;var E=L[x];E&&(d=E(d));var p=typeof d,v=void 0;x==="ot"||x==="sf"||x==="st"?v=x+"="+d:p==="boolean"?v=x:p==="number"?v=x+"="+d:v=x+"="+JSON.stringify(d),s.push(v)}return s.join(",")},c.toHeaders=function(l){for(var s=Object.keys(l),a={},O=["Object","Request","Session","Status"],w=[{},{},{},{}],S={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},L=0,D=s;L<D.length;L++){var A=D[L],T=S[A]!=null?S[A]:1;w[T][A]=l[A]}for(var x=0;x<w.length;x++){var d=c.serialize(w[x]);d&&(a["CMCD-"+O[x]]=d)}return a},c.toQuery=function(l){return"CMCD="+encodeURIComponent(c.serialize(l))},c.appendQueryToUri=function(l,s){if(!s)return l;var a=l.includes("?")?"&":"?";return""+l+a+s},c}()},"./src/controller/eme-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts"),k=P("./src/errors.ts"),B=P("./src/utils/logger.ts"),z=P("./src/utils/mediakeys-helper.ts");function K(u,c){for(var f=0;f<c.length;f++){var o=c[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function n(u,c,f){return c&&K(u.prototype,c),f&&K(u,f),u}var M=3,y=function(c,f,o){var l={audioCapabilities:[],videoCapabilities:[]};return c.forEach(function(s){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:o.audioRobustness||""})}),f.forEach(function(s){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:o.videoRobustness||""})}),[l]},m=function(c,f,o,l){switch(c){case z.KeySystems.WIDEVINE:return y(f,o,l);default:throw new Error("Unknown key-system: "+c)}},g=function(){function u(f){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=f,this._config=f.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var c=u.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(o){switch(o){case z.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},c._attemptKeySystemAccess=function(o,l,s){var a=this,O=m(o,l,s,this._drmSystemOptions);B.logger.log("Requesting encrypted media key-system access");var w=this.requestMediaKeySystemAccess(o,O);this.mediaKeysPromise=w.then(function(S){return a._onMediaKeySystemAccessObtained(o,S)}),w.catch(function(S){B.logger.error('Failed to obtain key-system "'+o+'" access:',S)})},c._onMediaKeySystemAccessObtained=function(o,l){var s=this;B.logger.log('Access for key-system "'+o+'" obtained');var a={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:o};this._mediaKeysList.push(a);var O=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(w){return a.mediaKeys=w,B.logger.log('Media-keys created for key-system "'+o+'"'),s._onMediaKeysCreated(),w});return O.catch(function(w){B.logger.error("Failed to create media-keys:",w)}),O},c._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),o._onNewMediaKeySession(l.mediaKeysSession))})},c._onNewMediaKeySession=function(o){var l=this;B.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(s){l._onKeySessionMessage(o,s.message)},!1)},c._onKeySessionMessage=function(o,l){B.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(s){B.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),o.update(s)})},c.onMediaEncrypted=function(o){var l=this;if(B.logger.log('Media is encrypted using "'+o.initDataType+'" init data type'),!this.mediaKeysPromise){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(O){if(!l._media)return;l._attemptSetMediaKeys(O),l._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(s).catch(s)},c._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}B.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(o,l){var s=this,a=this._mediaKeysList[0];if(!a){B.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(a.mediaKeysSessionInitialized){B.logger.warn("Key-Session already initialized but requested again");return}var O=a.mediaKeysSession;if(!O){B.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){B.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}B.logger.log('Generating key-session request for "'+o+'" init data type'),a.mediaKeysSessionInitialized=!0,O.generateRequest(o,l).then(function(){B.logger.debug("Key-session generation succeeded")}).catch(function(w){B.logger.error("Error generating key-session request:",w),s.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},c._createLicenseXhr=function(o,l,s){var a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,a,o,l,s);var O=this._licenseXhrSetup;if(O)try{O.call(this.hls,a,o),O=void 0}catch(w){B.logger.error(w)}try{a.readyState||a.open("POST",o,!0),O&&O.call(this.hls,a,o)}catch(w){throw new Error("issue setting up KeySystem license XHR "+w)}return a},c._onLicenseRequestReadyStageChange=function(o,l,s,a){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,B.logger.log("License request succeeded");var O=o.response,w=this._licenseResponseCallback;if(w)try{O=w.call(this.hls,o,l)}catch(L){B.logger.error(L)}a(O)}else{if(B.logger.error("License Request XHR failed ("+l+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>M){this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var S=M-this._requestLicenseFailureCount+1;B.logger.warn("Retrying license request, "+S+" attempts left"),this._requestLicense(s,a)}break}},c._generateLicenseRequestChallenge=function(o,l){switch(o.mediaKeySystemDomain){case z.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},c._requestLicense=function(o,l){B.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){B.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var a=this.getLicenseServerUrl(s.mediaKeySystemDomain),O=this._createLicenseXhr(a,o,l);B.logger.log("Sending license request to URL: "+a);var w=this._generateLicenseRequestChallenge(s,o);O.send(w)}catch(S){B.logger.error("Failure requesting DRM license: "+S),this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.KEY_SYSTEM_ERROR,details:k.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(o,l){if(!this._emeEnabled)return;var s=l.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},c.onMediaDetached=function(){var o=this._media,l=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},c.onManifestParsed=function(o,l){if(!this._emeEnabled)return;var s=l.levels.map(function(O){return O.audioCodec}).filter(function(O){return!!O}),a=l.levels.map(function(O){return O.videoCodec}).filter(function(O){return!!O});this._attemptKeySystemAccess(z.KeySystems.WIDEVINE,s,a)},n(u,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),u}();G.default=g},"./src/controller/fps-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts"),k=P("./src/utils/logger.ts"),B=function(){function z(n){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=n,this.registerListeners()}var K=z.prototype;return K.setStreamController=function(M){this.streamController=M},K.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},K.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},K.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},K.onMediaAttaching=function(M,y){var m=this.hls.config;if(m.capLevelOnFPSDrop){var g=y.media instanceof self.HTMLVideoElement?y.media:null;this.media=g,g&&typeof g.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},K.checkFPS=function(M,y,m){var g=performance.now();if(y){if(this.lastTime){var u=g-this.lastTime,c=m-this.lastDroppedFrames,f=y-this.lastDecodedFrames,o=1e3*c/u,l=this.hls;if(l.trigger(V.Events.FPS_DROP,{currentDropped:c,currentDecoded:f,totalDroppedFrames:m}),o>0&&c>l.config.fpsDroppedMonitoringThreshold*f){var s=l.currentLevel;k.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=s)&&(s=s-1,l.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:l.currentLevel}),l.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=g,this.lastDroppedFrames=m,this.lastDecodedFrames=y}},K.checkFPSInterval=function(){var M=this.media;if(M)if(this.isVideoPlaybackQualityAvailable){var y=M.getVideoPlaybackQuality();this.checkFPS(M,y.totalVideoFrames,y.droppedVideoFrames)}else this.checkFPS(M,M.webkitDecodedFrameCount,M.webkitDroppedFrameCount)},z}();G.default=B},"./src/controller/fragment-finders.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"findFragmentByPDT",function(){return B}),P.d(G,"findFragmentByPTS",function(){return z}),P.d(G,"fragmentWithinToleranceTest",function(){return K}),P.d(G,"pdtWithinToleranceTest",function(){return n}),P.d(G,"findFragWithCC",function(){return M});var V=P("./src/polyfills/number.ts"),k=P("./src/utils/binary-search.ts");function B(y,m,g){if(m===null||!Array.isArray(y)||!y.length||!Object(V.isFiniteNumber)(m))return null;var u=y[0].programDateTime;if(m<(u||0))return null;var c=y[y.length-1].endProgramDateTime;if(m>=(c||0))return null;g=g||0;for(var f=0;f<y.length;++f){var o=y[f];if(n(m,g,o))return o}return null}function z(y,m,g,u){g===void 0&&(g=0),u===void 0&&(u=0);var c=null;if(y?c=m[y.sn-m[0].sn+1]||null:g===0&&m[0].start===0&&(c=m[0]),c&&K(g,u,c)===0)return c;var f=k.default.search(m,K.bind(null,g,u));return f||c}function K(y,m,g){y===void 0&&(y=0),m===void 0&&(m=0);var u=Math.min(m,g.duration+(g.deltaPTS?g.deltaPTS:0));return g.start+g.duration-u<=y?1:g.start-u>y&&g.start?-1:0}function n(y,m,g){var u=Math.min(m,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,c=g.endProgramDateTime||0;return c-u>y}function M(y,m){return k.default.search(y,function(g){return g.cc<m?1:g.cc>m?-1:0})}},"./src/controller/fragment-tracker.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"FragmentState",function(){return B}),P.d(G,"FragmentTracker",function(){return z});var V=P("./src/events.ts"),k=P("./src/types/loader.ts"),B;(function(M){M.NOT_LOADED="NOT_LOADED",M.BACKTRACKED="BACKTRACKED",M.APPENDING="APPENDING",M.PARTIAL="PARTIAL",M.OK="OK"})(B||(B={}));var z=function(){function M(m){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=m,this._registerListeners()}var y=M.prototype;return y._registerListeners=function(){var g=this.hls;g.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},y._unregisterListeners=function(){var g=this.hls;g.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},y.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},y.getAppendedFrag=function(g,u){if(u===k.PlaylistLevelType.MAIN){var c=this.activeFragment,f=this.activeParts;if(!c)return null;if(f)for(var o=f.length;o--;){var l=f[o],s=l?l.end:c.appendedPTS;if(l.start<=g&&s!==void 0&&g<=s)return o>9&&(this.activeParts=f.slice(o-9)),l}else if(c.start<=g&&c.appendedPTS!==void 0&&g<=c.appendedPTS)return c}return this.getBufferedFrag(g,u)},y.getBufferedFrag=function(g,u){for(var c=this.fragments,f=Object.keys(c),o=f.length;o--;){var l=c[f[o]];if((l==null?void 0:l.body.type)===u&&l.buffered){var s=l.body;if(s.start<=g&&g<=s.end)return s}}return null},y.detectEvictedFragments=function(g,u,c){var f=this;Object.keys(this.fragments).forEach(function(o){var l=f.fragments[o];if(!l)return;if(!l.buffered){l.body.type===c&&f.removeFragment(l.body);return}var s=l.range[g];if(!s)return;s.time.some(function(a){var O=!f.isTimeBuffered(a.startPTS,a.endPTS,u);return O&&f.removeFragment(l.body),O})})},y.detectPartialFragments=function(g){var u=this,c=this.timeRanges,f=g.frag,o=g.part;if(!c||f.sn==="initSegment")return;var l=n(f),s=this.fragments[l];if(!s)return;Object.keys(c).forEach(function(a){var O=f.elementaryStreams[a];if(!O)return;var w=c[a],S=o!==null||O.partial===!0;s.range[a]=u.getBufferedTimes(f,o,S,w)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},y.fragBuffered=function(g){var u=n(g),c=this.fragments[u];c&&(c.backtrack=c.loaded=null,c.buffered=!0)},y.getBufferedTimes=function(g,u,c,f){for(var o={time:[],partial:c},l=u?u.start:g.start,s=u?u.end:g.end,a=g.minEndPTS||s,O=g.maxStartPTS||l,w=0;w<f.length;w++){var S=f.start(w)-this.bufferPadding,L=f.end(w)+this.bufferPadding;if(O>=S&&a<=L){o.time.push({startPTS:Math.max(l,f.start(w)),endPTS:Math.min(s,f.end(w))});break}else if(l<L&&s>S)o.partial=!0,o.time.push({startPTS:Math.max(l,f.start(w)),endPTS:Math.min(s,f.end(w))});else if(s<=S)break}return o},y.getPartialFragment=function(g){var u=null,c,f,o,l=0,s=this.bufferPadding,a=this.fragments;return Object.keys(a).forEach(function(O){var w=a[O];if(!w)return;K(w)&&(f=w.body.start-s,o=w.body.end+s,g>=f&&g<=o&&(c=Math.min(g-f,o-g),l<=c&&(u=w.body,l=c)))}),u},y.getState=function(g){var u=n(g),c=this.fragments[u];return c?c.buffered?K(c)?B.PARTIAL:B.OK:c.backtrack?B.BACKTRACKED:B.APPENDING:B.NOT_LOADED},y.backtrack=function(g,u){var c=n(g),f=this.fragments[c];if(!f||f.backtrack)return null;var o=f.backtrack=u||f.loaded;return f.loaded=null,o},y.getBacktrackData=function(g){var u=n(g),c=this.fragments[u];if(c){var f,o=c.backtrack;if(o!=null&&(f=o.payload)!==null&&f!==void 0&&f.byteLength)return o;this.removeFragment(g)}return null},y.isTimeBuffered=function(g,u,c){for(var f,o,l=0;l<c.length;l++){if(f=c.start(l)-this.bufferPadding,o=c.end(l)+this.bufferPadding,g>=f&&u<=o)return!0;if(u<=f)return!1}return!1},y.onFragLoaded=function(g,u){var c=u.frag,f=u.part;if(c.sn==="initSegment"||c.bitrateTest||f)return;var o=n(c);this.fragments[o]={body:c,loaded:u,backtrack:null,buffered:!1,range:Object.create(null)}},y.onBufferAppended=function(g,u){var c=this,f=u.frag,o=u.part,l=u.timeRanges;if(f.type===k.PlaylistLevelType.MAIN)if(this.activeFragment=f,o){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(o)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(a){var O=l[a];if(c.detectEvictedFragments(a,O),!o)for(var w=0;w<O.length;w++)f.appendedPTS=Math.max(O.end(w),f.appendedPTS||0)})},y.onFragBuffered=function(g,u){this.detectPartialFragments(u)},y.hasFragment=function(g){var u=n(g);return!!this.fragments[u]},y.removeFragmentsInRange=function(g,u,c){var f=this;Object.keys(this.fragments).forEach(function(o){var l=f.fragments[o];if(!l)return;if(l.buffered){var s=l.body;s.type===c&&s.start<u&&s.end>g&&f.removeFragment(s)}})},y.removeFragment=function(g){var u=n(g);g.stats.loaded=0,g.clearElementaryStreamInfo(),delete this.fragments[u]},y.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},M}();function K(M){var y,m;return M.buffered&&(((y=M.range.video)===null||y===void 0?void 0:y.partial)||((m=M.range.audio)===null||m===void 0?void 0:m.partial))}function n(M){return M.type+"_"+M.level+"_"+M.urlId+"_"+M.sn}},"./src/controller/gap-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"STALL_MINIMUM_DURATION_MS",function(){return K}),P.d(G,"MAX_START_GAP_JUMP",function(){return n}),P.d(G,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return M}),P.d(G,"SKIP_BUFFER_RANGE_START",function(){return y}),P.d(G,"default",function(){return m});var V=P("./src/utils/buffer-helper.ts"),k=P("./src/errors.ts"),B=P("./src/events.ts"),z=P("./src/utils/logger.ts"),K=250,n=2,M=.1,y=.05,m=function(){function g(c,f,o,l){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=c,this.media=f,this.fragmentTracker=o,this.hls=l}var u=g.prototype;return u.destroy=function(){this.hls=this.fragmentTracker=this.media=null},u.poll=function(f){var o=this.config,l=this.media,s=this.stalled,a=l.currentTime,O=l.seeking,w=this.seeking&&!O,S=!this.seeking&&O;if(this.seeking=O,a!==f){if(this.moved=!0,s!==null){if(this.stallReported){var L=self.performance.now()-s;z.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((S||w)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!V.BufferHelper.getBuffered(l).length)return;var D=V.BufferHelper.bufferInfo(l,a,0),A=D.len>0,T=D.nextStart||0;if(!A&&!T)return;if(O){var x=D.len>n,d=!T||T-a>n&&!this.fragmentTracker.getPartialFragment(a);if(x||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var E,p=Math.max(T,D.start||0)-a,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,C=v==null||((E=v.details)===null||E===void 0)?void 0:E.live,F=C?v.details.targetduration*2:n;if(p>0&&p<=F){this._trySkipBufferHole(null);return}}var R=self.performance.now();if(s===null){this.stalled=R;return}var j=R-s;!O&&j>=K&&this._reportStall(D.len);var U=V.BufferHelper.bufferInfo(l,a,o.maxBufferHole);this._tryFixBufferStall(U,j)},u._tryFixBufferStall=function(f,o){var l=this.config,s=this.fragmentTracker,a=this.media,O=a.currentTime,w=s.getPartialFragment(O);if(w){var S=this._trySkipBufferHole(w);if(S)return}f.len>l.maxBufferHole&&o>l.highBufferWatchdogPeriod*1e3&&(z.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},u._reportStall=function(f){var o=this.hls,l=this.media,s=this.stallReported;s||(this.stallReported=!0,z.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+f+")"),o.trigger(B.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},u._trySkipBufferHole=function(f){for(var o=this.config,l=this.hls,s=this.media,a=s.currentTime,O=0,w=V.BufferHelper.getBuffered(s),S=0;S<w.length;S++){var L=w.start(S);if(a+o.maxBufferHole>=O&&a<L){var D=Math.max(L+y,s.currentTime+M);return z.logger.warn("skipping hole, adjusting currentTime from "+a+" to "+D),this.moved=!0,this.stalled=null,s.currentTime=D,f&&l.trigger(B.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+D,frag:f}),D}O=w.end(S)}return 0},u._tryNudgeBuffer=function(){var f=this.config,o=this.hls,l=this.media,s=l.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<f.nudgeMaxRetry){var O=s+a*f.nudgeOffset;z.logger.warn("Nudging 'currentTime' from "+s+" to "+O),l.currentTime=O,o.trigger(B.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else z.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+f.nudgeMaxRetry+" nudges"),o.trigger(B.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},g}()},"./src/controller/id3-track-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts"),k=P("./src/utils/texttrack-utils.ts"),B=P("./src/demux/id3.ts"),z=.25,K=function(){function n(y){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=y,this._registerListeners()}var M=n.prototype;return M.destroy=function(){this._unregisterListeners()},M._registerListeners=function(){var m=this.hls;m.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},M._unregisterListeners=function(){var m=this.hls;m.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},M.onMediaAttached=function(m,g){this.media=g.media},M.onMediaDetaching=function(){if(!this.id3Track)return;Object(k.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},M.getID3Track=function(m){if(!this.media)return;for(var g=0;g<m.length;g++){var u=m[g];if(u.kind==="metadata"&&u.label==="id3")return Object(k.sendAddTrackEvent)(u,this.media),u}return this.media.addTextTrack("metadata","id3")},M.onFragParsingMetadata=function(m,g){if(!this.media)return;var u=g.frag,c=g.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<c.length;o++){var l=B.getID3Frames(c[o].data);if(l){var s=c[o].pts,a=o<c.length-1?c[o+1].pts:u.end,O=a-s;O<=0&&(a=s+z);for(var w=0;w<l.length;w++){var S=l[w];if(!B.isTimeStampFrame(S)){var L=new f(s,a,"");L.value=S,this.id3Track.addCue(L)}}}}},M.onBufferFlushing=function(m,g){var u=g.startOffset,c=g.endOffset,f=g.type;if(!f||f==="audio"){var o=this.id3Track;o&&Object(k.removeCuesInRange)(o,u,c)}},n}();G.default=K},"./src/controller/latency-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return n});var V=P("./src/errors.ts"),k=P("./src/events.ts"),B=P("./src/utils/logger.ts");function z(M,y){for(var m=0;m<y.length;m++){var g=y[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(M,g.key,g)}}function K(M,y,m){return y&&z(M.prototype,y),m&&z(M,m),M}var n=function(){function M(m){var g=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 g.timeupdate()},this.hls=m,this.config=m.config,this.registerListeners()}var y=M.prototype;return y.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},y.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(k.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(k.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(k.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(k.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(k.Events.ERROR,this.onError)},y.onMediaAttached=function(g,u){this.media=u.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},y.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},y.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},y.onLevelUpdated=function(g,u){var c=u.details;this.levelDetails=c,c.advanced&&this.timeupdate(),!c.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},y.onError=function(g,u){if(u.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,B.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},y.timeupdate=function(){var g=this.media,u=this.levelDetails;if(!g||!u)return;this.currentTime=g.currentTime;var c=this.computeLatency();if(c===null)return;this._latency=c;var f=this.config,o=f.lowLatencyMode,l=f.maxLiveSyncPlaybackRate;if(!o||l===1)return;var s=this.targetLatency;if(s===null)return;var a=c-s,O=Math.min(this.maxLatency,s+u.targetduration),w=a<O;if(u.live&&w&&a>.05&&this.forwardBufferLength>1){var S=Math.min(2,Math.max(1,l)),L=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;g.playbackRate=Math.min(S,Math.max(1,L))}else g.playbackRate!==1&&g.playbackRate!==0&&(g.playbackRate=1)},y.estimateLiveEdge=function(){var g=this.levelDetails;return g===null?null:g.edge+g.age},y.computeLatency=function(){var g=this.estimateLiveEdge();return g===null?null:g-this.currentTime},K(M,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var g=this.config,u=this.levelDetails;return g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:u?g.liveMaxLatencyDurationCount*u.targetduration:0}},{key:"targetLatency",get:function(){var g=this.levelDetails;if(g===null)return null;var u=g.holdBack,c=g.partHoldBack,f=g.targetduration,o=this.config,l=o.liveSyncDuration,s=o.liveSyncDurationCount,a=o.lowLatencyMode,O=this.hls.userConfig,w=a&&c||u;(O.liveSyncDuration||O.liveSyncDurationCount||w===0)&&(w=l!==void 0?l:s*f);var S=f,L=1;return w+Math.min(this.stallCount*L,S)}},{key:"liveSyncPosition",get:function(){var g=this.estimateLiveEdge(),u=this.targetLatency,c=this.levelDetails;if(g===null||u===null||c===null)return null;var f=c.edge,o=g-u-this.edgeStalled,l=f-c.totalduration,s=f-(this.config.lowLatencyMode&&c.partTarget||c.targetduration);return Math.min(Math.max(l,o),s)}},{key:"drift",get:function(){var g=this.levelDetails;return g===null?1:g.drift}},{key:"edgeStalled",get:function(){var g=this.levelDetails;if(g===null)return 0;var u=(this.config.lowLatencyMode&&g.partTarget||g.targetduration)*3;return Math.max(g.age-u,0)}},{key:"forwardBufferLength",get:function(){var g=this.media,u=this.levelDetails;if(!g||!u)return 0;var c=g.buffered.length;return c?g.buffered.end(c-1):u.edge-this.currentTime}}]),M}()},"./src/controller/level-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return o});var V=P("./src/types/level.ts"),k=P("./src/events.ts"),B=P("./src/errors.ts"),z=P("./src/utils/codecs.ts"),K=P("./src/controller/level-helper.ts"),n=P("./src/controller/base-playlist-controller.ts"),M=P("./src/types/loader.ts");function y(){return y=Object.assign||function(l){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var O in a)Object.prototype.hasOwnProperty.call(a,O)&&(l[O]=a[O])}return l},y.apply(this,arguments)}function m(l,s){for(var a=0;a<s.length;a++){var O=s[a];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(l,O.key,O)}}function g(l,s,a){return s&&m(l.prototype,s),a&&m(l,a),l}function u(l,s){l.prototype=Object.create(s.prototype),l.prototype.constructor=l,c(l,s)}function c(l,s){return c=Object.setPrototypeOf||function(O,w){return O.__proto__=w,O},c(l,s)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(l){u(s,l);function s(O){var w;return w=l.call(this,O,"[level-controller]")||this,w._levels=[],w._firstLevel=-1,w._startLevel=void 0,w.currentLevelIndex=-1,w.manualLevelIndex=-1,w.onParsedComplete=void 0,w._registerListeners(),w}var a=s.prototype;return a._registerListeners=function(){var w=this.hls;w.on(k.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(k.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.on(k.Events.FRAG_LOADED,this.onFragLoaded,this),w.on(k.Events.ERROR,this.onError,this)},a._unregisterListeners=function(){var w=this.hls;w.off(k.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(k.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.off(k.Events.FRAG_LOADED,this.onFragLoaded,this),w.off(k.Events.ERROR,this.onError,this)},a.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},a.startLoad=function(){var w=this._levels;w.forEach(function(S){S.loadError=0}),l.prototype.startLoad.call(this)},a.onManifestLoaded=function(w,S){var L=[],D=[],A=[],T,x={},d,E=!1,p=!1,v=!1;if(S.levels.forEach(function(j){var U=j.attrs;E=E||!!(j.width&&j.height),p=p||!!j.videoCodec,v=v||!!j.audioCodec,f&&j.audioCodec&&j.audioCodec.indexOf("mp4a.40.34")!==-1&&(j.audioCodec=void 0);var b=j.bitrate+"-"+j.attrs.RESOLUTION+"-"+j.attrs.CODECS;d=x[b],d?d.url.push(j.url):(d=new V.Level(j),x[b]=d,L.push(d)),U&&(U.AUDIO&&Object(K.addGroupId)(d,"audio",U.AUDIO),U.SUBTITLES&&Object(K.addGroupId)(d,"text",U.SUBTITLES))}),(E||p)&&v&&(L=L.filter(function(j){var U=j.videoCodec,b=j.width,Q=j.height;return!!U||!!(b&&Q)})),L=L.filter(function(j){var U=j.audioCodec,b=j.videoCodec;return(!U||Object(z.isCodecSupportedInMp4)(U,"audio"))&&(!b||Object(z.isCodecSupportedInMp4)(b,"video"))}),S.audioTracks&&(D=S.audioTracks.filter(function(j){return!j.audioCodec||Object(z.isCodecSupportedInMp4)(j.audioCodec,"audio")}),Object(K.assignTrackIdsByGroup)(D)),S.subtitles&&(A=S.subtitles,Object(K.assignTrackIdsByGroup)(A)),L.length>0){T=L[0].bitrate,L.sort(function(j,U){return j.bitrate-U.bitrate}),this._levels=L;for(var C=0;C<L.length;C++)if(L[C].bitrate===T){this._firstLevel=C,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+T);break}var F=v&&!p,R={levels:L,audioTracks:D,subtitleTracks:A,firstLevel:this._firstLevel,stats:S.stats,audio:v,video:p,altAudio:!F&&D.some(function(j){return!!j.url})};this.hls.trigger(k.Events.MANIFEST_PARSED,R),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(k.Events.ERROR,{type:B.ErrorTypes.MEDIA_ERROR,details:B.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:S.url,reason:"no level with compatible codecs found in manifest"})},a.onError=function(w,S){if(l.prototype.onError.call(this,w,S),S.fatal)return;var L=S.context,D=this._levels[this.currentLevelIndex];if(L&&(L.type===M.PlaylistContextType.AUDIO_TRACK&&D.audioGroupIds&&L.groupId===D.audioGroupIds[D.urlId]||L.type===M.PlaylistContextType.SUBTITLE_TRACK&&D.textGroupIds&&L.groupId===D.textGroupIds[D.urlId])){this.redundantFailover(this.currentLevelIndex);return}var A=!1,T=!0,x;switch(S.details){case B.ErrorDetails.FRAG_LOAD_ERROR:case B.ErrorDetails.FRAG_LOAD_TIMEOUT:case B.ErrorDetails.KEY_LOAD_ERROR:case B.ErrorDetails.KEY_LOAD_TIMEOUT:if(S.frag){var d=this._levels[S.frag.level];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(x=S.frag.level)):x=S.frag.level}break;case B.ErrorDetails.LEVEL_LOAD_ERROR:case B.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(T=!1),x=L.level),A=!0;break;case B.ErrorDetails.REMUX_ALLOC_ERROR:x=S.level,A=!0;break}x!==void 0&&this.recoverLevel(S,x,A,T)},a.recoverLevel=function(w,S,L,D){var A=w.details,T=this._levels[S];if(T.loadError++,L){var x=this.retryLoadingOrFail(w);if(x)w.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(D){var d=T.url.length;if(d>1&&T.loadError<d)w.levelRetry=!0,this.redundantFailover(S);else if(this.manualLevelIndex===-1){var E=S===0?this._levels.length-1:S-1;this.currentLevelIndex!==E&&this._levels[E].loadError===0&&(this.warn(A+": switch to "+E),w.levelRetry=!0,this.hls.nextAutoLevel=E)}}},a.redundantFailover=function(w){var S=this._levels[w],L=S.url.length;if(L>1){var D=(S.urlId+1)%L;this.warn("Switching to redundant URL-id "+D),this._levels.forEach(function(A){A.urlId=D}),this.level=w}},a.onFragLoaded=function(w,S){var L=S.frag;if(L!==void 0&&L.type===M.PlaylistLevelType.MAIN){var D=this._levels[L.level];D!==void 0&&(D.fragmentError=0,D.loadError=0)}},a.onLevelLoaded=function(w,S){var L,D=S.level,A=S.details,T=this._levels[D];if(!T){var x;this.warn("Invalid level index "+D),(x=S.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(A.deltaUpdateFailed=!0);return}D===this.currentLevelIndex?(T.fragmentError===0&&(T.loadError=0,this.retryCount=0),this.playlistLoaded(D,S,T.details)):(L=S.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(A.deltaUpdateFailed=!0)},a.onAudioTrackSwitched=function(w,S){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var D=-1,A=this.hls.audioTracks[S.id].groupId,T=0;T<L.audioGroupIds.length;T++)if(L.audioGroupIds[T]===A){D=T;break}D!==L.urlId&&(L.urlId=D,this.startLoad())}},a.loadPlaylist=function(w){var S=this.currentLevelIndex,L=this._levels[S];if(this.canLoad&&L&&L.url.length>0){var D=L.urlId,A=L.url[D];if(w)try{A=w.addDirectives(A)}catch(T){this.warn("Could not construct new URL with HLS Delivery Directives: "+T)}this.log("Attempt loading level index "+S+(w?" at sn "+w.msn+" part "+w.part:"")+" with URL-id "+D+" "+A),this.clearTimer(),this.hls.trigger(k.Events.LEVEL_LOADING,{url:A,level:S,id:D,deliveryDirectives:w||null})}},a.removeLevel=function(w,S){var L=function(T,x){return x!==S},D=this._levels.filter(function(A,T){return T!==w?!0:A.url.length>1&&S!==void 0?(A.url=A.url.filter(L),A.audioGroupIds&&(A.audioGroupIds=A.audioGroupIds.filter(L)),A.textGroupIds&&(A.textGroupIds=A.textGroupIds.filter(L)),A.urlId=0,!0):!1}).map(function(A,T){var x=A.details;return x!=null&&x.fragments&&x.fragments.forEach(function(d){d.level=T}),A});this._levels=D,this.hls.trigger(k.Events.LEVELS_UPDATED,{levels:D})},g(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(w){var S,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===w&&(S=L[w])!==null&&S!==void 0&&S.details)return;if(w<0||w>=L.length){var D=w<0;if(this.hls.trigger(k.Events.ERROR,{type:B.ErrorTypes.OTHER_ERROR,details:B.ErrorDetails.LEVEL_SWITCH_ERROR,level:w,fatal:D,reason:"invalid level idx"}),D)return;w=Math.min(w,L.length-1)}this.clearTimer();var A=this.currentLevelIndex,T=L[A],x=L[w];this.log("switching to level "+w+" from "+A),this.currentLevelIndex=w;var d=y({},x,{level:w,maxBitrate:x.maxBitrate,uri:x.uri,urlId:x.urlId});delete d._urlId,this.hls.trigger(k.Events.LEVEL_SWITCHING,d);var E=x.details;if(!E||E.live){var p=this.switchParams(x.uri,T==null?void 0:T.details);this.loadPlaylist(p)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(w){this.manualLevelIndex=w,this._startLevel===void 0&&(this._startLevel=w),w!==-1&&(this.level=w)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(w){this._firstLevel=w}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var w=this.hls.config.startLevel;return w!==void 0?w:this._firstLevel}else return this._startLevel},set:function(w){this._startLevel=w}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(w){this.level=w,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=w)}}]),s}(n.default)},"./src/controller/level-helper.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"addGroupId",function(){return B}),P.d(G,"assignTrackIdsByGroup",function(){return z}),P.d(G,"updatePTS",function(){return K}),P.d(G,"updateFragPTSDTS",function(){return M}),P.d(G,"mergeDetails",function(){return y}),P.d(G,"mapPartIntersection",function(){return m}),P.d(G,"mapFragmentIntersection",function(){return g}),P.d(G,"adjustSliding",function(){return u}),P.d(G,"addSliding",function(){return c}),P.d(G,"computeReloadInterval",function(){return f}),P.d(G,"getFragmentWithSN",function(){return o}),P.d(G,"getPartWith",function(){return l});var V=P("./src/polyfills/number.ts"),k=P("./src/utils/logger.ts");function B(s,a,O){switch(a){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(O);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(O);break}}function z(s){var a={};s.forEach(function(O){var w=O.groupId||"";O.id=a[w]=a[w]||0,a[w]++})}function K(s,a,O){var w=s[a],S=s[O];n(w,S)}function n(s,a){var O=a.startPTS;if(Object(V.isFiniteNumber)(O)){var w=0,S;a.sn>s.sn?(w=O-s.start,S=s):(w=s.start-O,S=a),S.duration!==w&&(S.duration=w)}else if(a.sn>s.sn){var L=s.cc===a.cc;L&&s.minEndPTS?a.start=s.start+(s.minEndPTS-s.start):a.start=s.start+s.duration}else a.start=Math.max(s.start-a.duration,0)}function M(s,a,O,w,S,L){var D=w-O;D<=0&&(k.logger.warn("Fragment should have a positive duration",a),w=O+a.duration,L=S+a.duration);var A=O,T=w,x=a.startPTS,d=a.endPTS;if(Object(V.isFiniteNumber)(x)){var E=Math.abs(x-O);Object(V.isFiniteNumber)(a.deltaPTS)?a.deltaPTS=Math.max(E,a.deltaPTS):a.deltaPTS=E,A=Math.max(O,x),O=Math.min(O,x),S=Math.min(S,a.startDTS),T=Math.min(w,d),w=Math.max(w,d),L=Math.max(L,a.endDTS)}a.duration=w-O;var p=O-a.start;a.appendedPTS=w,a.start=a.startPTS=O,a.maxStartPTS=A,a.startDTS=S,a.endPTS=w,a.minEndPTS=T,a.endDTS=L;var v=a.sn;if(!s||v<s.startSN||v>s.endSN)return 0;var C,F=v-s.startSN,R=s.fragments;for(R[F]=a,C=F;C>0;C--)n(R[C],R[C-1]);for(C=F;C<R.length-1;C++)n(R[C],R[C+1]);return s.fragmentHint&&n(R[R.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,p}function y(s,a){for(var O=null,w=s.fragments,S=w.length-1;S>=0;S--){var L=w[S].initSegment;if(L){O=L;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var D=0,A;if(g(s,a,function(C,F){C.relurl&&(D=C.cc-F.cc),Object(V.isFiniteNumber)(C.startPTS)&&Object(V.isFiniteNumber)(C.endPTS)&&(F.start=F.startPTS=C.startPTS,F.startDTS=C.startDTS,F.appendedPTS=C.appendedPTS,F.maxStartPTS=C.maxStartPTS,F.endPTS=C.endPTS,F.endDTS=C.endDTS,F.minEndPTS=C.minEndPTS,F.duration=C.endPTS-C.startPTS,F.duration&&(A=F),a.PTSKnown=a.alignedSliding=!0),F.elementaryStreams=C.elementaryStreams,F.loader=C.loader,F.stats=C.stats,F.urlId=C.urlId,C.initSegment&&(F.initSegment=C.initSegment,O=C.initSegment)}),O){var T=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;T.forEach(function(C){var F;(!C.initSegment||C.initSegment.relurl===((F=O)===null||F===void 0?void 0:F.relurl))&&(C.initSegment=O)})}if(a.skippedSegments&&(a.deltaUpdateFailed=a.fragments.some(function(C){return!C}),a.deltaUpdateFailed)){k.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var x=a.skippedSegments;x--;)a.fragments.shift();a.startSN=a.fragments[0].sn,a.startCC=a.fragments[0].cc}var d=a.fragments;if(D){k.logger.warn("discontinuity sliding from playlist, take drift into account");for(var E=0;E<d.length;E++)d[E].cc+=D}a.skippedSegments&&(a.startCC=a.fragments[0].cc),m(s.partList,a.partList,function(C,F){F.elementaryStreams=C.elementaryStreams,F.stats=C.stats}),A?M(a,A,A.startPTS,A.endPTS,A.startDTS,A.endDTS):u(s,a),d.length&&(a.totalduration=a.edge-d[0].start),a.driftStartTime=s.driftStartTime,a.driftStart=s.driftStart;var p=a.advancedDateTime;if(a.advanced&&p){var v=a.edge;a.driftStart||(a.driftStartTime=p,a.driftStart=v),a.driftEndTime=p,a.driftEnd=v}else a.driftEndTime=s.driftEndTime,a.driftEnd=s.driftEnd,a.advancedDateTime=s.advancedDateTime}function m(s,a,O){if(s&&a)for(var w=0,S=0,L=s.length;S<=L;S++){var D=s[S],A=a[S+w];D&&A&&D.index===A.index&&D.fragment.sn===A.fragment.sn?O(D,A):w--}}function g(s,a,O){for(var w=a.skippedSegments,S=Math.max(s.startSN,a.startSN)-a.startSN,L=(s.fragmentHint?1:0)+(w?a.endSN:Math.min(s.endSN,a.endSN))-a.startSN,D=a.startSN-s.startSN,A=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,T=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,x=S;x<=L;x++){var d=T[D+x],E=A[x];w&&!E&&x<w&&(E=a.fragments[x]=d),d&&E&&O(d,E)}}function u(s,a){var O=a.startSN+a.skippedSegments-s.startSN,w=s.fragments;if(O<0||O>=w.length)return;c(a,w[O].start)}function c(s,a){if(a){for(var O=s.fragments,w=s.skippedSegments;w<O.length;w++)O[w].start+=a;s.fragmentHint&&(s.fragmentHint.start+=a)}}function f(s,a){var O=1e3*s.levelTargetDuration,w=O/2,S=s.age,L=S>0&&S<O*3,D=a.loading.end-a.loading.start,A,T=s.availabilityDelay;if(s.updated===!1)if(L){var x=333*s.misses;A=Math.max(Math.min(w,D*2),x),s.availabilityDelay=(s.availabilityDelay||0)+A}else A=w;else L?(T=Math.min(T||O/2,S),s.availabilityDelay=T,A=T+O-S):A=O-D;return Math.round(A)}function o(s,a,O){if(!s||!s.details)return null;var w=s.details,S=w.fragments[a-w.startSN];return S||(S=w.fragmentHint,S&&S.sn===a?S:a<w.startSN&&O&&O.sn===a?O:null)}function l(s,a,O){if(!s||!s.details)return null;var w=s.details.partList;if(w)for(var S=w.length;S--;){var L=w[S];if(L.index===O&&L.fragment.sn===a)return L}return null}},"./src/controller/stream-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return w});var V=P("./src/polyfills/number.ts"),k=P("./src/controller/base-stream-controller.ts"),B=P("./src/is-supported.ts"),z=P("./src/events.ts"),K=P("./src/utils/buffer-helper.ts"),n=P("./src/controller/fragment-tracker.ts"),M=P("./src/types/loader.ts"),y=P("./src/loader/fragment.ts"),m=P("./src/demux/transmuxer-interface.ts"),g=P("./src/types/transmuxer.ts"),u=P("./src/controller/gap-controller.ts"),c=P("./src/errors.ts"),f=P("./src/utils/logger.ts");function o(S,L){for(var D=0;D<L.length;D++){var A=L[D];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(S,A.key,A)}}function l(S,L,D){return L&&o(S.prototype,L),D&&o(S,D),S}function s(S,L){S.prototype=Object.create(L.prototype),S.prototype.constructor=S,a(S,L)}function a(S,L){return a=Object.setPrototypeOf||function(A,T){return A.__proto__=T,A},a(S,L)}var O=100,w=function(S){s(L,S);function L(A,T){var x;return x=S.call(this,A,T,"[stream-controller]")||this,x.audioCodecSwap=!1,x.gapController=null,x.level=-1,x._forceStartLoad=!1,x.altAudio=!1,x.audioOnly=!1,x.fragPlaying=null,x.onvplaying=null,x.onvseeked=null,x.fragLastKbps=0,x.stalled=!1,x.couldBacktrack=!1,x.audioCodecSwitch=!1,x.videoBuffer=null,x._registerListeners(),x}var D=L.prototype;return D._registerListeners=function(){var T=this.hls;T.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),T.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),T.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),T.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),T.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),T.on(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),T.on(z.Events.ERROR,this.onError,this),T.on(z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),T.on(z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.on(z.Events.BUFFER_CREATED,this.onBufferCreated,this),T.on(z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),T.on(z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),T.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D._unregisterListeners=function(){var T=this.hls;T.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),T.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),T.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),T.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),T.off(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),T.off(z.Events.ERROR,this.onError,this),T.off(z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),T.off(z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),T.off(z.Events.BUFFER_CREATED,this.onBufferCreated,this),T.off(z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),T.off(z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),T.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},D.startLoad=function(T){if(this.levels){var x=this.lastCurrentTime,d=this.hls;if(this.stopLoad(),this.setInterval(O),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var E=d.startLevel;E===-1&&(d.config.testBandwidth?(E=0,this.bitrateTest=!0):E=d.nextAutoLevel),this.level=d.nextLoadLevel=E,this.loadedmetadata=!1}x>0&&T===-1&&(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),T=x),this.state=k.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=T,this.tick()}else this._forceStartLoad=!0,this.state=k.State.STOPPED},D.stopLoad=function(){this._forceStartLoad=!1,S.prototype.stopLoad.call(this)},D.doTick=function(){switch(this.state){case k.State.IDLE:this.doTickIdle();break;case k.State.WAITING_LEVEL:{var T,x=this.levels,d=this.level,E=x==null||((T=x[d])===null||T===void 0)?void 0:T.details;if(E&&(!E.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(E))break;this.state=k.State.IDLE;break}break}case k.State.FRAG_LOADING_WAITING_RETRY:{var p,v=self.performance.now(),C=this.retryDate;(!C||v>=C||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=k.State.IDLE)}break;default:break}this.onTickEnd()},D.onTickEnd=function(){S.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},D.doTickIdle=function(){var T,x,d=this.hls,E=this.levelLastLoaded,p=this.levels,v=this.media,C=d.config,F=d.nextLoadLevel;if(E===null||!v&&(this.startFragRequested||!C.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!p||!p[F])return;var R=p[F];this.level=d.nextLoadLevel=F;var j=R.details;if(!j||this.state===k.State.WAITING_LEVEL||j.live&&this.levelLastLoaded!==F){this.state=k.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,M.PlaylistLevelType.MAIN);if(U===null)return;var b=U.len,Q=this.getMaxBufferLength(R.maxBitrate);if(b>=Q)return;if(this._streamEnded(U,j)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(z.Events.BUFFER_EOS,ee),this.state=k.State.ENDED;return}var oe=U.end,fe=this.getNextFragment(oe,j);if(this.couldBacktrack&&!this.fragPrevious&&fe&&fe.sn!=="initSegment"){var Fe=fe.sn-j.startSN;Fe>1&&(fe=j.fragments[Fe-1],this.fragmentTracker.removeFragment(fe))}if(fe&&this.fragmentTracker.getState(fe)===n.FragmentState.OK&&this.nextLoadPosition>oe){var Le=this.audioOnly&&!this.altAudio?y.ElementaryStreamTypes.AUDIO:y.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,Le,M.PlaylistLevelType.MAIN),fe=this.getNextFragment(this.nextLoadPosition,j)}if(!fe)return;fe.initSegment&&!fe.initSegment.data&&!this.bitrateTest&&(fe=fe.initSegment),((T=fe.decryptdata)===null||T===void 0?void 0:T.keyFormat)==="identity"&&!((x=fe.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(fe,j):this.loadFragment(fe,j,oe)},D.loadFragment=function(T,x,d){var E,p=this.fragmentTracker.getState(T);if(this.fragCurrent=T,p===n.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(T);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else p=n.FragmentState.NOT_LOADED}p===n.FragmentState.NOT_LOADED||p===n.FragmentState.PARTIAL?T.sn==="initSegment"?this._loadInitSegment(T):this.bitrateTest?(T.bitrateTest=!0,this.log("Fragment "+T.sn+" of level "+T.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(T)):(this.startFragRequested=!0,S.prototype.loadFragment.call(this,T,x,d)):p===n.FragmentState.APPENDING?this.reduceMaxBufferLength(T.duration)&&this.fragmentTracker.removeFragment(T):((E=this.media)===null||E===void 0?void 0:E.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},D.getAppendedFrag=function(T){var x=this.fragmentTracker.getAppendedFrag(T,M.PlaylistLevelType.MAIN);return x&&"fragment"in x?x.fragment:x},D.getBufferedFrag=function(T){return this.fragmentTracker.getBufferedFrag(T,M.PlaylistLevelType.MAIN)},D.followingBufferedFrag=function(T){return T?this.getBufferedFrag(T.end+.5):null},D.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},D.nextLevelSwitch=function(){var T=this.levels,x=this.media;if(x!=null&&x.readyState){var d,E=this.getAppendedFrag(x.currentTime);if(E&&E.start>1&&this.flushMainBuffer(0,E.start-1),!x.paused&&T){var p=this.hls.nextLoadLevel,v=T[p],C=this.fragLastKbps;C&&this.fragCurrent?d=this.fragCurrent.duration*v.maxBitrate/(1e3*C)+1:d=0}else d=0;var F=this.getBufferedFrag(x.currentTime+d);if(F){var R=this.followingBufferedFrag(F);if(R){this.abortCurrentFrag();var j=R.maxStartPTS?R.maxStartPTS:R.start,U=R.duration,b=Math.max(F.end,j+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(b,Number.POSITIVE_INFINITY)}}}},D.abortCurrentFrag=function(){var T=this.fragCurrent;this.fragCurrent=null,T!=null&&T.loader&&T.loader.abort(),this.state===k.State.KEY_LOADING&&(this.state=k.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},D.flushMainBuffer=function(T,x){S.prototype.flushMainBuffer.call(this,T,x,this.altAudio?"video":null)},D.onMediaAttached=function(T,x){S.prototype.onMediaAttached.call(this,T,x);var d=x.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new u.default(this.config,d,this.fragmentTracker,this.hls)},D.onMediaDetaching=function(){var T=this.media;T&&(T.removeEventListener("playing",this.onvplaying),T.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),S.prototype.onMediaDetaching.call(this)},D.onMediaPlaying=function(){this.tick()},D.onMediaSeeked=function(){var T=this.media,x=T?T.currentTime:null;Object(V.isFiniteNumber)(x)&&this.log("Media seeked to "+x.toFixed(3)),this.tick()},D.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(z.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},D.onManifestParsed=function(T,x){var d=!1,E=!1,p;x.levels.forEach(function(v){p=v.audioCodec,p&&(p.indexOf("mp4a.40.2")!==-1&&(d=!0),p.indexOf("mp4a.40.5")!==-1&&(E=!0))}),this.audioCodecSwitch=d&&E&&!Object(B.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=x.levels,this.startFragRequested=!1},D.onLevelLoading=function(T,x){var d=this.levels;if(!d||this.state!==k.State.IDLE)return;var E=d[x.level];(!E.details||E.details.live&&this.levelLastLoaded!==x.level||this.waitForCdnTuneIn(E.details))&&(this.state=k.State.WAITING_LEVEL)},D.onLevelLoaded=function(T,x){var d,E=this.levels,p=x.level,v=x.details,C=v.totalduration;if(!E){this.warn("Levels were reset while loading level "+p);return}this.log("Level "+p+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+C);var F=this.fragCurrent;F&&(this.state===k.State.FRAG_LOADING||this.state===k.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==x.level&&F.loader&&(this.state=k.State.IDLE,F.loader.abort()));var R=E[p],j=0;if(v.live||(d=R.details)!==null&&d!==void 0&&d.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;j=this.alignPlaylists(v,R.details)}if(R.details=v,this.levelLastLoaded=p,this.hls.trigger(z.Events.LEVEL_UPDATED,{details:v,level:p}),this.state===k.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=k.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,j),this.tick()},D._handleFragmentLoadProgress=function(T){var x,d=T.frag,E=T.part,p=T.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var C=v[d.level],F=C.details;if(!F){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var R=C.videoCodec,j=F.PTSKnown||!F.live,U=(x=d.initSegment)===null||x===void 0?void 0:x.data,b=this._getAudioCodec(C),Q=this.transmuxer=this.transmuxer||new m.default(this.hls,M.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=E?E.index:-1,oe=ee!==-1,fe=new g.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,p.byteLength,ee,oe),Fe=this.initPTS[d.cc];Q.push(p,U,b,R,d,E,F.totalduration,j,fe,Fe)},D.onAudioTrackSwitching=function(T,x){var d=this.altAudio,E=!!x.url,p=x.id;if(!E){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 C=this.hls;d&&C.trigger(z.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),C.trigger(z.Events.AUDIO_TRACK_SWITCHED,{id:p})}},D.onAudioTrackSwitched=function(T,x){var d=x.id,E=!!this.hls.audioTracks[d].url;if(E){var p=this.videoBuffer;p&&this.mediaBuffer!==p&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=p)}this.altAudio=E,this.tick()},D.onBufferCreated=function(T,x){var d=x.tracks,E,p,v=!1;for(var C in d){var F=d[C];if(F.id==="main"){if(p=C,E=F,C==="video"){var R=d[C];R&&(this.videoBuffer=R.buffer)}}else v=!0}v&&E?(this.log("Alternate track found, use "+p+".buffered to schedule main fragment loading"),this.mediaBuffer=E.buffer):this.mediaBuffer=this.media},D.onFragBuffered=function(T,x){var d=x.frag,E=x.part;if(d&&d.type!==M.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(E?" p: "+E.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===k.State.PARSED&&(this.state=k.State.IDLE);return}var p=E?E.stats:d.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,E)},D.onError=function(T,x){switch(x.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(M.PlaylistLevelType.MAIN,x);break;case c.ErrorDetails.LEVEL_LOAD_ERROR:case c.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==k.State.ERROR&&(x.fatal?(this.warn(""+x.details),this.state=k.State.ERROR):!x.levelRetry&&this.state===k.State.WAITING_LEVEL&&(this.state=k.State.IDLE));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="main"&&(this.state===k.State.PARSING||this.state===k.State.PARSED)){var d=!0,E=this.getFwdBufferInfo(this.media,M.PlaylistLevelType.MAIN);E&&E.len>.5&&(d=!this.reduceMaxBufferLength(E.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},D.checkBuffer=function(){var T=this.media,x=this.gapController;if(!T||!x||!T.readyState)return;var d=K.BufferHelper.getBuffered(T);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):x.poll(this.lastCurrentTime),this.lastCurrentTime=T.currentTime},D.onFragLoadEmergencyAborted=function(){this.state=k.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},D.onBufferFlushed=function(T,x){var d=x.type;if(d!==y.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var E=(d===y.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(E,d,M.PlaylistLevelType.MAIN)}},D.onLevelsUpdated=function(T,x){this.levels=x.levels},D.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},D.seekToStartPos=function(){var T=this.media,x=T.currentTime,d=this.startPosition;if(d>=0&&x<d){if(T.seeking){f.logger.log("could not seek to "+d+", already seeking at "+x);return}var E=K.BufferHelper.getBuffered(T),p=E.length?E.start(0):0,v=p-d;v>0&&(v<this.config.maxBufferHole||v<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+v+" to match buffer start"),d+=v,this.startPosition=d),this.log("seek to target start position "+d+" from current time "+x),T.currentTime=d}},D._getAudioCodec=function(T){var x=this.config.defaultAudioCodec||T.audioCodec;return this.audioCodecSwap&&x&&(this.log("Swapping audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),x},D._loadBitrateTestFrag=function(T){var x=this;this._doFragLoad(T).then(function(d){var E=x.hls;if(!d||E.nextLoadLevel||x.fragContextChanged(T))return;x.fragLoadError=0,x.state=k.State.IDLE,x.startFragRequested=!1,x.bitrateTest=!1;var p=T.stats;p.parsing.start=p.parsing.end=p.buffering.start=p.buffering.end=self.performance.now(),E.trigger(z.Events.FRAG_LOADED,d)})},D._handleTransmuxComplete=function(T){var x,d="main",E=this.hls,p=T.remuxResult,v=T.chunkMeta,C=this.getCurrentContext(v);if(!C){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 F=C.frag,R=C.part,j=C.level,U=p.video,b=p.text,Q=p.id3,ee=p.initSegment,oe=this.altAudio?void 0:p.audio;if(this.fragContextChanged(F))return;if(this.state=k.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(j,ee.tracks,F,v),E.trigger(z.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:d,tracks:ee.tracks}));var fe=ee.initPTS,Fe=ee.timescale;Object(V.isFiniteNumber)(fe)&&(this.initPTS[F.cc]=fe,E.trigger(z.Events.INIT_PTS_FOUND,{frag:F,id:d,initPTS:fe,timescale:Fe}))}if(U&&p.independent!==!1){if(j.details){var Le=U.startPTS,Ie=U.endPTS,Be=U.startDTS,We=U.endDTS;if(R)R.elementaryStreams[U.type]={startPTS:Le,endPTS:Ie,startDTS:Be,endDTS:We};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ge=this.getLoadPosition()+this.config.maxBufferHole;if(ge<Le){this.backtrack(F);return}F.setElementaryStreamInfo(U.type,F.start,Ie,F.start,We,!0)}F.setElementaryStreamInfo(U.type,Le,Ie,Be,We),this.bufferFragmentData(U,F,R,v)}}else if(p.independent===!1){this.backtrack(F);return}if(oe){var ue=oe.startPTS,ke=oe.endPTS,lt=oe.startDTS,ot=oe.endDTS;R&&(R.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:ke,startDTS:lt,endDTS:ot}),F.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,ue,ke,lt,ot),this.bufferFragmentData(oe,F,R,v)}if(Q!=null&&(x=Q.samples)!==null&&x!==void 0&&x.length){var ut={frag:F,id:d,samples:Q.samples};E.trigger(z.Events.FRAG_PARSING_METADATA,ut)}if(b){var xt={frag:F,id:d,samples:b.samples};E.trigger(z.Events.FRAG_PARSING_USERDATA,xt)}},D._bufferInitSegment=function(T,x,d,E){var p=this;if(this.state!==k.State.PARSING)return;this.audioOnly=!!x.audio&&!x.video,this.altAudio&&!this.audioOnly&&delete x.audio;var v=x.audio,C=x.video,F=x.audiovideo;if(v){var R=T.audioCodec,j=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(R&&(R.indexOf("mp4a.40.5")!==-1?R="mp4a.40.2":R="mp4a.40.5"),v.metadata.channelCount!==1&&j.indexOf("firefox")===-1&&(R="mp4a.40.5")),j.indexOf("android")!==-1&&v.container!=="audio/mpeg"&&(R="mp4a.40.2",this.log("Android: force audio codec to "+R)),T.audioCodec&&T.audioCodec!==R&&this.log('Swapping manifest audio codec "'+T.audioCodec+'" for "'+R+'"'),v.levelCodec=R,v.id="main",this.log("Init audio buffer, container:"+v.container+", codecs[selected/level/parsed]=["+(R||"")+"/"+(T.audioCodec||"")+"/"+v.codec+"]")}C&&(C.levelCodec=T.videoCodec,C.id="main",this.log("Init video buffer, container:"+C.container+", codecs[level/parsed]=["+(T.videoCodec||"")+"/"+C.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(T.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(z.Events.BUFFER_CODECS,x),Object.keys(x).forEach(function(U){var b=x[U],Q=b.initSegment;Q!=null&&Q.byteLength&&p.hls.trigger(z.Events.BUFFER_APPENDING,{type:U,data:Q,frag:d,part:null,chunkMeta:E,parent:d.type})}),this.tick()},D.backtrack=function(T){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(T);var x=this.fragmentTracker.backtrack(T);this.fragPrevious=null,this.nextLoadPosition=T.start,x?this.resetFragmentLoading(T):this.state=k.State.BACKTRACKING},D.checkFragmentChanged=function(){var T=this.media,x=null;if(T&&T.readyState>1&&T.seeking===!1){var d=T.currentTime;if(K.BufferHelper.isBuffered(T,d)?x=this.getAppendedFrag(d):K.BufferHelper.isBuffered(T,d+.1)&&(x=this.getAppendedFrag(d+.1)),x){var E=this.fragPlaying,p=x.level;(!E||x.sn!==E.sn||E.level!==p||x.urlId!==E.urlId)&&(this.hls.trigger(z.Events.FRAG_CHANGED,{frag:x}),(!E||E.level!==p)&&this.hls.trigger(z.Events.LEVEL_SWITCHED,{level:p}),this.fragPlaying=x)}}},l(L,[{key:"nextLevel",get:function(){var T=this.nextBufferedFrag;return T?T.level:-1}},{key:"currentLevel",get:function(){var T=this.media;if(T){var x=this.getAppendedFrag(T.currentTime);if(x)return x.level}return-1}},{key:"nextBufferedFrag",get:function(){var T=this.media;if(T){var x=this.getAppendedFrag(T.currentTime);return this.followingBufferedFrag(x)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(k.default)},"./src/controller/subtitle-stream-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"SubtitleStreamController",function(){return s});var V=P("./src/events.ts"),k=P("./src/utils/logger.ts"),B=P("./src/utils/buffer-helper.ts"),z=P("./src/controller/fragment-finders.ts"),K=P("./src/utils/discontinuities.ts"),n=P("./src/controller/level-helper.ts"),M=P("./src/controller/fragment-tracker.ts"),y=P("./src/controller/base-stream-controller.ts"),m=P("./src/types/loader.ts"),g=P("./src/types/level.ts");function u(a,O){for(var w=0;w<O.length;w++){var S=O[w];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(a,S.key,S)}}function c(a,O,w){return O&&u(a.prototype,O),w&&u(a,w),a}function f(a,O){a.prototype=Object.create(O.prototype),a.prototype.constructor=a,o(a,O)}function o(a,O){return o=Object.setPrototypeOf||function(S,L){return S.__proto__=L,S},o(a,O)}var l=500,s=function(a){f(O,a);function O(S,L){var D;return D=a.call(this,S,L,"[subtitle-stream-controller]")||this,D.levels=[],D.currentTrackId=-1,D.tracksBuffered=[],D.mainDetails=null,D._registerListeners(),D}var w=O.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var L=this.hls;L.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(V.Events.ERROR,this.onError,this),L.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w._unregisterListeners=function(){var L=this.hls;L.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(V.Events.ERROR,this.onError,this),L.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w.startLoad=function(){this.stopLoad(),this.state=y.State.IDLE,this.setInterval(l),this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},w.onLevelLoaded=function(L,D){this.mainDetails=D.details},w.onSubtitleFragProcessed=function(L,D){var A=D.frag,T=D.success;if(this.fragPrevious=A,this.state=y.State.IDLE,!T)return;var x=this.tracksBuffered[this.currentTrackId];if(!x)return;for(var d,E=A.start,p=0;p<x.length;p++)if(E>=x[p].start&&E<=x[p].end){d=x[p];break}var v=A.start+A.duration;d?d.end=v:(d={start:E,end:v},x.push(d)),this.fragmentTracker.fragBuffered(A)},w.onBufferFlushing=function(L,D){var A=D.startOffset,T=D.endOffset;if(A===0&&T!==Number.POSITIVE_INFINITY){var x=this.currentTrackId,d=this.levels;if(!d.length||!d[x]||!d[x].details)return;var E=d[x].details,p=E.targetduration,v=T-p;if(v<=0)return;D.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(C){for(var F=0;F<C.length;){if(C[F].end<=v){C.shift();continue}else if(C[F].start<v)C[F].start=v;else break;F++}}),this.fragmentTracker.removeFragmentsInRange(A,v,m.PlaylistLevelType.SUBTITLE)}},w.onError=function(L,D){var A,T=D.frag;if(!T||T.type!==m.PlaylistLevelType.SUBTITLE)return;(A=this.fragCurrent)!==null&&A!==void 0&&A.loader&&this.fragCurrent.loader.abort(),this.state=y.State.IDLE},w.onSubtitleTracksUpdated=function(L,D){var A=this,T=D.subtitleTracks;this.tracksBuffered=[],this.levels=T.map(function(x){return new g.Level(x)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(x){A.tracksBuffered[x.id]=[]}),this.mediaBuffer=null},w.onSubtitleTrackSwitch=function(L,D){if(this.currentTrackId=D.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var A=this.levels[this.currentTrackId];A!=null&&A.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,A&&this.setInterval(l)},w.onSubtitleTrackLoaded=function(L,D){var A,T=D.details,x=D.id,d=this.currentTrackId,E=this.levels;if(!E.length)return;var p=E[d];if(x>=E.length||x!==d||!p)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,T.live||(A=p.details)!==null&&A!==void 0&&A.live){var v=this.mainDetails;if(T.deltaUpdateFailed||!v)return;var C=v.fragments[0];if(!p.details)T.hasProgramDateTime&&v.hasProgramDateTime?Object(K.alignMediaPlaylistByPDT)(T,v):C&&Object(n.addSliding)(T,C.start);else{var F=this.alignPlaylists(T,p.details);F===0&&C&&Object(n.addSliding)(T,C.start)}}if(p.details=T,this.levelLastLoaded=x,this.tick(),T.live&&!this.fragCurrent&&this.media&&this.state===y.State.IDLE){var R=Object(z.findFragmentByPTS)(null,T.fragments,this.media.currentTime,0);R||(this.warn("Subtitle playlist not aligned with playback"),p.details=void 0)}},w._handleFragmentLoadComplete=function(L){var D=L.frag,A=L.payload,T=D.decryptdata,x=this.hls;if(this.fragContextChanged(D))return;if(A&&A.byteLength>0&&T&&T.key&&T.iv&&T.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(A),T.key.buffer,T.iv.buffer).then(function(E){var p=performance.now();x.trigger(V.Events.FRAG_DECRYPTED,{frag:D,payload:E,stats:{tstart:d,tdecrypt:p}})})}},w.doTick=function(){if(!this.media){this.state=y.State.IDLE;return}if(this.state===y.State.IDLE){var L,D=this.currentTrackId,A=this.levels;if(!A.length||!A[D]||!A[D].details)return;var T=A[D].details,x=T.targetduration,d=this.config,E=this.media,p=B.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,E.currentTime-x,d.maxBufferHole),v=p.end,C=p.len,F=this.getMaxBufferLength()+x;if(C>F)return;console.assert(T,"Subtitle track details are defined on idle subtitle stream controller tick");var R=T.fragments,j=R.length,U=T.edge,b,Q=this.fragPrevious;if(v<U){var ee=d.maxFragLookUpTolerance;Q&&T.hasProgramDateTime&&(b=Object(z.findFragmentByPDT)(R,Q.endProgramDateTime,ee)),b||(b=Object(z.findFragmentByPTS)(Q,R,v,ee),!b&&Q&&Q.start<R[0].start&&(b=R[0]))}else b=R[j-1];(L=b)!==null&&L!==void 0&&L.encrypted?(k.logger.log("Loading key for "+b.sn),this.state=y.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:b})):b&&this.fragmentTracker.getState(b)===M.FragmentState.NOT_LOADED&&this.loadFragment(b,T,v)}},w.loadFragment=function(L,D,A){this.fragCurrent=L,a.prototype.loadFragment.call(this,L,D,A)},c(O,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),O}(y.default)},"./src/controller/subtitle-track-controller.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/events.ts"),k=P("./src/utils/texttrack-utils.ts"),B=P("./src/controller/base-playlist-controller.ts"),z=P("./src/types/loader.ts");function K(u,c){for(var f=0;f<c.length;f++){var o=c[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function n(u,c,f){return c&&K(u.prototype,c),f&&K(u,f),u}function M(u,c){u.prototype=Object.create(c.prototype),u.prototype.constructor=u,y(u,c)}function y(u,c){return y=Object.setPrototypeOf||function(o,l){return o.__proto__=l,o},y(u,c)}var m=function(u){M(c,u);function c(o){var l;return l=u.call(this,o,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var f=c.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,u.prototype.destroy.call(this)},f.registerListeners=function(){var l=this.hls;l.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(V.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var l=this.hls;l.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(V.Events.ERROR,this.onError,this)},f.onMediaAttached=function(l,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)},f.pollTrackChange=function(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var l=g(this.media.textTracks);l.forEach(function(s){Object(k.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(l,s){this.tracks=s.subtitleTracks},f.onSubtitleTrackLoaded=function(l,s){var a=s.id,O=s.details,w=this.trackId,S=this.tracksInGroup[w];if(!S){this.warn("Invalid subtitle track id "+a);return}var L=S.details;S.details=s.details,this.log("subtitle track "+a+" loaded ["+O.startSN+"-"+O.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,s,L))},f.onLevelLoading=function(l,s){this.switchLevel(s.level)},f.onLevelSwitching=function(l,s){this.switchLevel(s.level)},f.switchLevel=function(l){var s=this.hls.levels[l];if(!(s!=null&&s.textGroupIds))return;var a=s.textGroupIds[s.urlId];if(this.groupId!==a){var O=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(D){return!a||D.groupId===a});this.tracksInGroup=w;var S=this.findTrackId(O==null?void 0:O.name)||this.findTrackId();this.groupId=a;var L={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,L),S!==-1&&this.setSubtitleTrack(S,O)}},f.findTrackId=function(l){for(var s=this.tracksInGroup,a=0;a<s.length;a++){var O=s[a];if((!this.selectDefaultTrack||O.default)&&(!l||l===O.name))return O.id}return-1},f.onError=function(l,s){if(u.prototype.onError.call(this,l,s),s.fatal||!s.context)return;s.context.type===z.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},f.loadPlaylist=function(l){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var a=s.id,O=s.groupId,w=s.url;if(l)try{w=l.addDirectives(w)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("Loading subtitle playlist for id "+a),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:w,id:a,groupId:O,deliveryDirectives:l||null})}},f.toggleTrackModes=function(l){var s=this,a=this.media,O=this.subtitleDisplay,w=this.trackId;if(!a)return;var S=g(a.textTracks),L=S.filter(function(T){return T.groupId===s.groupId});if(l===-1)[].slice.call(S).forEach(function(T){T.mode="disabled"});else{var D=L[w];D&&(D.mode="disabled")}var A=L[l];A&&(A.mode=O?"showing":"hidden")},f.setSubtitleTrack=function(l,s){var a,O=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(a=O[l])!==null&&a!==void 0&&a.details)||l<-1||l>=O.length)return;this.clearTimer();var w=O[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,w){var S=w.id,L=w.groupId,D=L===void 0?"":L,A=w.name,T=w.type,x=w.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:S,groupId:D,name:A,type:T,url:x});var d=this.switchParams(w.url,s==null?void 0:s.details);this.loadPlaylist(d)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:l})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,s=g(this.media.textTracks),a=0;a<s.length;a++)if(s[a].mode==="hidden")l=a;else if(s[a].mode==="showing"){l=a;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},n(c,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,s)}}]),c}(B.default);function g(u){for(var c=[],f=0;f<u.length;f++){var o=u[f];o.kind==="subtitles"&&o.label&&c.push(u[f])}return c}G.default=m},"./src/controller/timeline-controller.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"TimelineController",function(){return g});var V=P("./src/polyfills/number.ts"),k=P("./src/events.ts"),B=P("./src/utils/cea-608-parser.ts"),z=P("./src/utils/output-filter.ts"),K=P("./src/utils/webvtt-parser.ts"),n=P("./src/utils/texttrack-utils.ts"),M=P("./src/utils/imsc1-ttml-parser.ts"),y=P("./src/types/loader.ts"),m=P("./src/utils/logger.ts"),g=function(){function o(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=f(),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 a=new z.default(this,"textTrack1"),O=new z.default(this,"textTrack2"),w=new z.default(this,"textTrack3"),S=new z.default(this,"textTrack4");this.cea608Parser1=new B.default(1,a,O),this.cea608Parser2=new B.default(3,w,S)}s.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(k.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(k.Events.FRAG_LOADING,this.onFragLoading,this),s.on(k.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(k.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(k.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(k.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=o.prototype;return l.destroy=function(){var a=this.hls;a.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(k.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.off(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.off(k.Events.FRAG_LOADING,this.onFragLoading,this),a.off(k.Events.FRAG_LOADED,this.onFragLoaded,this),a.off(k.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.off(k.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.off(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(k.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(a,O,w,S,L){for(var D=!1,A=L.length;A--;){var T=L[A],x=c(T[0],T[1],O,w);if(x>=0&&(T[0]=Math.min(T[0],O),T[1]=Math.max(T[1],w),D=!0,x/(w-O)>.5))return}if(D||L.push([O,w]),this.config.renderTextTracksNatively){var d=this.captionsTracks[a];this.Cues.newCue(d,O,w,S)}else{var E=this.Cues.newCue(null,O,w,S);this.hls.trigger(k.Events.CUES_PARSED,{type:"captions",cues:E,track:a})}},l.onInitPtsFound=function(a,O){var w=this,S=O.frag,L=O.id,D=O.initPTS,A=O.timescale,T=this.unparsedVttFrags;L==="main"&&(this.initPTS[S.cc]=D,this.timescale[S.cc]=A),T.length&&(this.unparsedVttFrags=[],T.forEach(function(x){w.onFragLoaded(k.Events.FRAG_LOADED,x)}))},l.getExistingTrack=function(a){var O=this.media;if(O)for(var w=0;w<O.textTracks.length;w++){var S=O.textTracks[w];if(S[a])return S}return null},l.createCaptionsTrack=function(a){this.config.renderTextTracksNatively?this.createNativeTrack(a):this.createNonNativeTrack(a)},l.createNativeTrack=function(a){if(this.captionsTracks[a])return;var O=this.captionsProperties,w=this.captionsTracks,S=this.media,L=O[a],D=L.label,A=L.languageCode,T=this.getExistingTrack(a);if(T)w[a]=T,Object(n.clearCurrentCues)(w[a]),Object(n.sendAddTrackEvent)(w[a],S);else{var x=this.createTextTrack("captions",D,A);x&&(x[a]=!0,w[a]=x)}},l.createNonNativeTrack=function(a){if(this.nonNativeCaptionsTracks[a])return;var O=this.captionsProperties[a];if(!O)return;var w=O.label,S={_id:a,label:w,kind:"captions",default:O.media?!!O.media.default:!1,closedCaptions:O.media};this.nonNativeCaptionsTracks[a]=S,this.hls.trigger(k.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[S]})},l.createTextTrack=function(a,O,w){var S=this.media;return S?S.addTextTrack(a,O,w):void 0},l.onMediaAttaching=function(a,O){this.media=O.media,this._cleanTracks()},l.onMediaDetaching=function(){var a=this.captionsTracks;Object.keys(a).forEach(function(O){Object(n.clearCurrentCues)(a[O]),delete a[O]}),this.nonNativeCaptionsTracks={}},l.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},l._cleanTracks=function(){var a=this.media;if(!a)return;var O=a.textTracks;if(O)for(var w=0;w<O.length;w++)Object(n.clearCurrentCues)(O[w])},l.onSubtitleTracksUpdated=function(a,O){var w=this;this.textTracks=[];var S=O.subtitleTracks||[],L=S.some(function(x){return x.textCodec===M.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var D=this.tracks&&S&&this.tracks.length===S.length;if(this.tracks=S||[],this.config.renderTextTracksNatively){var A=this.media?this.media.textTracks:[];this.tracks.forEach(function(x,d){var E;if(d<A.length){for(var p=null,v=0;v<A.length;v++)if(u(A[v],x)){p=A[v];break}p&&(E=p)}E?Object(n.clearCurrentCues)(E):(E=w.createTextTrack("subtitles",x.name,x.lang),E&&(E.mode="disabled")),E&&(E.groupId=x.groupId,w.textTracks.push(E))})}else if(!D&&this.tracks&&this.tracks.length){var T=this.tracks.map(function(x){return{label:x.name,kind:x.type.toLowerCase(),default:x.default,subtitleTrack:x}});this.hls.trigger(k.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:T})}}},l.onManifestLoaded=function(a,O){var w=this;this.config.enableCEA708Captions&&O.captions&&O.captions.forEach(function(S){var L=/(?:CC|SERVICE)([1-4])/.exec(S.instreamId);if(!L)return;var D="textTrack"+L[1],A=w.captionsProperties[D];if(!A)return;A.label=S.name,S.lang&&(A.languageCode=S.lang),A.media=S})},l.onFragLoading=function(a,O){var w=this.cea608Parser1,S=this.cea608Parser2,L=this.lastSn,D=this.lastPartIndex;if(!this.enabled||!(w&&S))return;if(O.frag.type===y.PlaylistLevelType.MAIN){var A,T,x=O.frag.sn,d=(A=O==null||((T=O.part)===null||T===void 0)?void 0:T.index)!=null?A:-1;x===L+1||x===L&&d===D+1||(w.reset(),S.reset()),this.lastSn=x,this.lastPartIndex=d}},l.onFragLoaded=function(a,O){var w=O.frag,S=O.payload,L=this.initPTS,D=this.unparsedVttFrags;if(w.type===y.PlaylistLevelType.SUBTITLE)if(S.byteLength){if(!Object(V.isFiniteNumber)(L[w.cc])){D.push(O),L.length&&this.hls.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Missing initial subtitle PTS")});return}var A=w.decryptdata;if(A==null||A.key==null||A.method!=="AES-128"){var T=this.tracks[w.level],x=this.vttCCs;x[w.cc]||(x[w.cc]={start:w.start,prevCC:this.prevCC,new:!0},this.prevCC=w.cc),T&&T.textCodec===M.IMSC1_CODEC?this._parseIMSC1(w,S):this._parseVTTs(w,S,x)}}else this.hls.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(a,O){var w=this,S=this.hls;Object(M.parseIMSC1)(O,this.initPTS[a.cc],this.timescale[a.cc],function(L){w._appendCues(L,a.level),S.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(L){m.logger.log("Failed to parse IMSC1: "+L),S.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:L})})},l._parseVTTs=function(a,O,w){var S=this,L=this.hls;Object(K.parseWebVTT)(O,this.initPTS[a.cc],this.timescale[a.cc],w,a.cc,a.start,function(D){S._appendCues(D,a.level),L.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(D){S._fallbackToIMSC1(a,O),m.logger.log("Failed to parse VTT cue: "+D),L.trigger(k.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:D})})},l._fallbackToIMSC1=function(a,O){var w=this,S=this.tracks[a.level];S.textCodec||Object(M.parseIMSC1)(O,this.initPTS[a.cc],this.timescale[a.cc],function(){S.textCodec=M.IMSC1_CODEC,w._parseIMSC1(a,O)},function(){S.textCodec="wvtt"})},l._appendCues=function(a,O){var w=this.hls;if(this.config.renderTextTracksNatively){var S=this.textTracks[O];if(S.mode==="disabled")return;a.forEach(function(A){return Object(n.addCueToTrack)(S,A)})}else{var L=this.tracks[O],D=L.default?"default":"subtitles"+O;w.trigger(k.Events.CUES_PARSED,{type:"subtitles",cues:a,track:D})}},l.onFragDecrypted=function(a,O){var w=O.frag;if(w.type===y.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[w.cc])){this.unparsedVttFrags.push(O);return}this.onFragLoaded(k.Events.FRAG_LOADED,O)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(a,O){var w=this.cea608Parser1,S=this.cea608Parser2;if(!this.enabled||!(w&&S))return;for(var L=0;L<O.samples.length;L++){var D=O.samples[L].bytes;if(D){var A=this.extractCea608Data(D);w.addData(O.samples[L].pts,A[0]),S.addData(O.samples[L].pts,A[1])}}},l.onBufferFlushing=function(a,O){var w=O.startOffset,S=O.endOffset,L=O.endOffsetSubtitles,D=O.type,A=this.media;if(!A||A.currentTime<S)return;if(!D||D==="video"){var T=this.captionsTracks;Object.keys(T).forEach(function(d){return Object(n.removeCuesInRange)(T[d],w,S)})}if(this.config.renderTextTracksNatively&&(w===0&&L!==void 0)){var x=this.textTracks;Object.keys(x).forEach(function(d){return Object(n.removeCuesInRange)(x[d],w,L)})}},l.extractCea608Data=function(a){for(var O=a[0]&31,w=2,S=[[],[]],L=0;L<O;L++){var D=a[w++],A=127&a[w++],T=127&a[w++],x=(4&D)!==0,d=3&D;if(A===0&&T===0)continue;x&&((d===0||d===1)&&(S[d].push(A),S[d].push(T)))}return S},o}();function u(o,l){return o&&o.label===l.name&&!(o.textTrack1||o.textTrack2)}function c(o,l,s,a){return Math.min(l,a)-Math.max(o,s)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return V});var V=function(){function k(z,K){this.subtle=void 0,this.aesIV=void 0,this.subtle=z,this.aesIV=K}var B=k.prototype;return B.decrypt=function(K,n){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,K)},k}()},"./src/crypt/aes-decryptor.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"removePadding",function(){return k}),P.d(G,"default",function(){return B});var V=P("./src/utils/typed-array.ts");function k(z){var K=z.byteLength,n=K&&new DataView(z.buffer).getUint8(K-1);return n?Object(V.sliceUint8)(z,0,K-n):z}var B=function(){function z(){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 K=z.prototype;return K.uint8ArrayToUint32Array_=function(M){for(var y=new DataView(M),m=new Uint32Array(4),g=0;g<4;g++)m[g]=y.getUint32(g*4);return m},K.initTable=function(){var M=this.sBox,y=this.invSBox,m=this.subMix,g=m[0],u=m[1],c=m[2],f=m[3],o=this.invSubMix,l=o[0],s=o[1],a=o[2],O=o[3],w=new Uint32Array(256),S=0,L=0,D=0;for(D=0;D<256;D++)D<128?w[D]=D<<1:w[D]=D<<1^283;for(D=0;D<256;D++){var A=L^L<<1^L<<2^L<<3^L<<4;A=A>>>8^A&255^99,M[S]=A,y[A]=S;var T=w[S],x=w[T],d=w[x],E=w[A]*257^A*16843008;g[S]=E<<24|E>>>8,u[S]=E<<16|E>>>16,c[S]=E<<8|E>>>24,f[S]=E,E=d*16843009^x*65537^T*257^S*16843008,l[A]=E<<24|E>>>8,s[A]=E<<16|E>>>16,a[A]=E<<8|E>>>24,O[A]=E,S?(S=T^w[w[w[d^T]]],L^=w[w[L]]):S=L=1}},K.expandKey=function(M){for(var y=this.uint8ArrayToUint32Array_(M),m=!0,g=0;g<y.length&&m;)m=y[g]===this.key[g],g++;if(m)return;this.key=y;var u=this.keySize=y.length;if(u!==4&&u!==6&&u!==8)throw new Error("Invalid aes key size="+u);var c=this.ksRows=(u+6+1)*4,f,o,l=this.keySchedule=new Uint32Array(c),s=this.invKeySchedule=new Uint32Array(c),a=this.sBox,O=this.rcon,w=this.invSubMix,S=w[0],L=w[1],D=w[2],A=w[3],T,x;for(f=0;f<c;f++){if(f<u){T=l[f]=y[f];continue}x=T,f%u===0?(x=x<<8|x>>>24,x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255],x^=O[f/u|0]<<24):u>6&&f%u===4&&(x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255]),l[f]=T=(l[f-u]^x)>>>0}for(o=0;o<c;o++)f=c-o,o&3?x=l[f]:x=l[f-4],o<4||f<=4?s[o]=x:s[o]=S[a[x>>>24]]^L[a[x>>>16&255]]^D[a[x>>>8&255]]^A[a[x&255]],s[o]=s[o]>>>0},K.networkToHostOrderSwap=function(M){return M<<24|(M&65280)<<8|(M&16711680)>>8|M>>>24},K.decrypt=function(M,y,m){for(var g=this.keySize+6,u=this.invKeySchedule,c=this.invSBox,f=this.invSubMix,o=f[0],l=f[1],s=f[2],a=f[3],O=this.uint8ArrayToUint32Array_(m),w=O[0],S=O[1],L=O[2],D=O[3],A=new Int32Array(M),T=new Int32Array(A.length),x,d,E,p,v,C,F,R,j,U,b,Q,ee,oe,fe=this.networkToHostOrderSwap;y<A.length;){for(j=fe(A[y]),U=fe(A[y+1]),b=fe(A[y+2]),Q=fe(A[y+3]),v=j^u[0],C=Q^u[1],F=b^u[2],R=U^u[3],ee=4,oe=1;oe<g;oe++)x=o[v>>>24]^l[C>>16&255]^s[F>>8&255]^a[R&255]^u[ee],d=o[C>>>24]^l[F>>16&255]^s[R>>8&255]^a[v&255]^u[ee+1],E=o[F>>>24]^l[R>>16&255]^s[v>>8&255]^a[C&255]^u[ee+2],p=o[R>>>24]^l[v>>16&255]^s[C>>8&255]^a[F&255]^u[ee+3],v=x,C=d,F=E,R=p,ee=ee+4;x=c[v>>>24]<<24^c[C>>16&255]<<16^c[F>>8&255]<<8^c[R&255]^u[ee],d=c[C>>>24]<<24^c[F>>16&255]<<16^c[R>>8&255]<<8^c[v&255]^u[ee+1],E=c[F>>>24]<<24^c[R>>16&255]<<16^c[v>>8&255]<<8^c[C&255]^u[ee+2],p=c[R>>>24]<<24^c[v>>16&255]<<16^c[C>>8&255]<<8^c[F&255]^u[ee+3],T[y]=fe(x^w),T[y+1]=fe(p^S),T[y+2]=fe(E^L),T[y+3]=fe(d^D),w=j,S=U,L=b,D=Q,y=y+4}return T.buffer},z}()},"./src/crypt/decrypter.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return y});var V=P("./src/crypt/aes-crypto.ts"),k=P("./src/crypt/fast-aes-key.ts"),B=P("./src/crypt/aes-decryptor.ts"),z=P("./src/utils/logger.ts"),K=P("./src/utils/mp4-tools.ts"),n=P("./src/utils/typed-array.ts"),M=16,y=function(){function m(u,c,f){var o=f===void 0?{}:f,l=o.removePKCS7Padding,s=l===void 0?!0:l;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=u,this.config=c,this.removePKCS7Padding=s,s)try{var a=self.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(O){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var g=m.prototype;return g.destroy=function(){this.observer=null},g.isSync=function(){return this.config.enableSoftwareAES},g.flush=function(){var c=this.currentResult;if(!c){this.reset();return}var f=new Uint8Array(c);return this.reset(),this.removePKCS7Padding?Object(B.removePadding)(f):f},g.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},g.decrypt=function(c,f,o,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(c),f,o);var s=this.flush();s&&l(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(c),f,o).then(l)},g.softwareDecrypt=function(c,f,o){var l=this.currentIV,s=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(c=Object(K.appendUint8Array)(a,c),this.remainderData=null);var O=this.getValidChunk(c);if(!O.length)return null;l&&(o=l);var w=this.softwareDecrypter;w||(w=this.softwareDecrypter=new B.default),w.expandKey(f);var S=s;return this.currentResult=w.decrypt(O.buffer,0,o),this.currentIV=Object(n.sliceUint8)(O,-16).buffer,S||null},g.webCryptoDecrypt=function(c,f,o){var l=this,s=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new k.default(s,f)),this.fastAesKey.expandKey().then(function(a){if(!s)return Promise.reject(new Error("web crypto not initialized"));var O=new V.default(s,o);return O.decrypt(c.buffer,a)}).catch(function(a){return l.onWebCryptoError(a,c,f,o)})},g.onWebCryptoError=function(c,f,o,l){return z.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",c),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,o,l)},g.getValidChunk=function(c){var f=c,o=c.length-c.length%M;return o!==c.length&&(f=Object(n.sliceUint8)(c,0,o),this.remainderData=Object(n.sliceUint8)(c,o)),f},g.logOnce=function(c){if(!this.logEnabled)return;z.logger.log("[decrypter.ts]: "+c),this.logEnabled=!1},m}()},"./src/crypt/fast-aes-key.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return V});var V=function(){function k(z,K){this.subtle=void 0,this.key=void 0,this.subtle=z,this.key=K}var B=k.prototype;return B.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},k}()},"./src/demux/aacdemuxer.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/demux/base-audio-demuxer.ts"),k=P("./src/demux/adts.ts"),B=P("./src/utils/logger.ts"),z=P("./src/demux/id3.ts");function K(y,m){y.prototype=Object.create(m.prototype),y.prototype.constructor=y,n(y,m)}function n(y,m){return n=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},n(y,m)}var M=function(y){K(m,y);function m(u,c){var f;return f=y.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=u,f.config=c,f}var g=m.prototype;return g.resetInitSegment=function(c,f,o){y.prototype.resetInitSegment.call(this,c,f,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:c,duration:o,inputTimeScale:9e4,dropped:0}},m.probe=function(c){if(!c)return!1;for(var f=z.getID3Data(c,0)||[],o=f.length,l=c.length;o<l;o++)if(k.probe(c,o))return B.logger.log("ADTS sync word found !"),!0;return!1},g.canParse=function(c,f){return k.canParse(c,f)},g.appendFrame=function(c,f,o){k.initTrackConfig(c,this.observer,f,o,c.manifestCodec);var l=k.appendFrame(c,f,o,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},m}(V.default);M.minProbeByteLength=9,G.default=M},"./src/demux/adts.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"getAudioConfig",function(){return z}),P.d(G,"isHeaderPattern",function(){return K}),P.d(G,"getHeaderLength",function(){return n}),P.d(G,"getFullFrameLength",function(){return M}),P.d(G,"canGetFrameLength",function(){return y}),P.d(G,"isHeader",function(){return m}),P.d(G,"canParse",function(){return g}),P.d(G,"probe",function(){return u}),P.d(G,"initTrackConfig",function(){return c}),P.d(G,"getFrameDuration",function(){return f}),P.d(G,"parseFrameHeader",function(){return o}),P.d(G,"appendFrame",function(){return l});var V=P("./src/utils/logger.ts"),k=P("./src/errors.ts"),B=P("./src/events.ts");function z(s,a,O,w){var S,L,D,A,T=navigator.userAgent.toLowerCase(),x=w,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];S=((a[O+2]&192)>>>6)+1;var E=(a[O+2]&60)>>>2;if(E>d.length-1){s.trigger(B.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+E});return}return D=(a[O+2]&1)<<2,D|=(a[O+3]&192)>>>6,V.logger.log("manifest codec:"+w+", ADTS type:"+S+", samplingIndex:"+E),/firefox/i.test(T)?E>=6?(S=5,A=new Array(4),L=E-3):(S=2,A=new Array(2),L=E):T.indexOf("android")!==-1?(S=2,A=new Array(2),L=E):(S=5,A=new Array(4),w&&(w.indexOf("mp4a.40.29")!==-1||w.indexOf("mp4a.40.5")!==-1)||!w&&E>=6?L=E-3:((w&&w.indexOf("mp4a.40.2")!==-1&&(E>=6&&D===1||/vivaldi/i.test(T))||!w&&D===1)&&(S=2,A=new Array(2)),L=E)),A[0]=S<<3,A[0]|=(E&14)>>1,A[1]|=(E&1)<<7,A[1]|=D<<3,S===5&&(A[1]|=(L&14)>>1,A[2]=(L&1)<<7,A[2]|=2<<2,A[3]=0),{config:A,samplerate:d[E],channelCount:D,codec:"mp4a.40."+S,manifestCodec:x}}function K(s,a){return s[a]===255&&(s[a+1]&246)===240}function n(s,a){return s[a+1]&1?7:9}function M(s,a){return(s[a+3]&3)<<11|s[a+4]<<3|(s[a+5]&224)>>>5}function y(s,a){return a+5<s.length}function m(s,a){return a+1<s.length&&K(s,a)}function g(s,a){return y(s,a)&&K(s,a)&&M(s,a)<=s.length-a}function u(s,a){if(m(s,a)){var O=n(s,a);if(a+O>=s.length)return!1;var w=M(s,a);if(w<=O)return!1;var S=a+w;return S===s.length||m(s,S)}return!1}function c(s,a,O,w,S){if(!s.samplerate){var L=z(a,O,w,S);if(!L)return;s.config=L.config,s.samplerate=L.samplerate,s.channelCount=L.channelCount,s.codec=L.codec,s.manifestCodec=L.manifestCodec,V.logger.log("parsed codec:"+s.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function f(s){return 1024*9e4/s}function o(s,a,O,w,S){var L=n(s,a),D=M(s,a);if(D-=L,D>0){var A=O+w*S;return{headerLength:L,frameLength:D,stamp:A}}}function l(s,a,O,w,S){var L=f(s.samplerate),D=o(a,O,w,S,L);if(D){var A=D.frameLength,T=D.headerLength,x=D.stamp,d=T+A,E=Math.max(0,O+d-a.length),p;E?(p=new Uint8Array(d-T),p.set(a.subarray(O+T,a.length),0)):p=a.subarray(O+T,O+d);var v={unit:p,pts:x};return E||s.samples.push(v),{sample:v,length:d,missing:E}}}},"./src/demux/base-audio-demuxer.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"initPTSFn",function(){return M});var V=P("./src/polyfills/number.ts"),k=P("./src/demux/id3.ts"),B=P("./src/demux/dummy-demuxed-track.ts"),z=P("./src/utils/mp4-tools.ts"),K=P("./src/utils/typed-array.ts"),n=function(){function y(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=y.prototype;return m.resetInitSegment=function(u,c,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(u,c){return!1},m.appendFrame=function(u,c,f){},m.demux=function(u,c){this.cachedData&&(u=Object(z.appendUint8Array)(this.cachedData,u),this.cachedData=null);var f=k.getID3Data(u,0),o=f?f.length:0,l,s,a=this._audioTrack,O=this._id3Track,w=f?k.getTimeStamp(f):void 0,S=u.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=M(w,c)),f&&f.length>0&&O.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),s=this.initPTS;o<S;){if(this.canParse(u,o)){var L=this.appendFrame(a,u,o);L?(this.frameIndex++,s=L.sample.pts,o+=L.length,l=o):o=S}else k.canParse(u,o)?(f=k.getID3Data(u,o),O.samples.push({pts:s,dts:s,data:f}),o+=f.length,l=o):o++;if(o===S&&l!==S){var D=Object(K.sliceUint8)(u,l);this.cachedData?this.cachedData=Object(z.appendUint8Array)(this.cachedData,D):this.cachedData=D}}return{audioTrack:a,avcTrack:Object(B.dummyTrack)(),id3Track:O,textTrack:Object(B.dummyTrack)()}},m.demuxSampleAes=function(u,c,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},m.flush=function(u){var c=this.cachedData;return c&&(this.cachedData=null,this.demux(c,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(B.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(B.dummyTrack)()}},m.destroy=function(){},y}(),M=function(m,g){return Object(V.isFiniteNumber)(m)?m*90:g*9e4};G.default=n},"./src/demux/chunk-cache.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return V});var V=function(){function B(){this.chunks=[],this.dataLength=0}var z=B.prototype;return z.push=function(n){this.chunks.push(n),this.dataLength+=n.length},z.flush=function(){var n=this.chunks,M=this.dataLength,y;if(n.length)n.length===1?y=n[0]:y=k(n,M);else return new Uint8Array(0);return this.reset(),y},z.reset=function(){this.chunks.length=0,this.dataLength=0},B}();function k(B,z){for(var K=new Uint8Array(z),n=0,M=0;M<B.length;M++){var y=B[M];K.set(y,n),n+=y.length}return K}},"./src/demux/dummy-demuxed-track.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/utils/logger.ts"),k=function(){function B(K){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=K,this.bytesAvailable=K.byteLength,this.word=0,this.bitsAvailable=0}var z=B.prototype;return z.loadWord=function(){var n=this.data,M=this.bytesAvailable,y=n.byteLength-M,m=new Uint8Array(4),g=Math.min(4,M);if(g===0)throw new Error("no bytes available");m.set(n.subarray(y,y+g)),this.word=new DataView(m.buffer).getUint32(0),this.bitsAvailable=g*8,this.bytesAvailable-=g},z.skipBits=function(n){var M;this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,M=n>>3,n-=M>>3,this.bytesAvailable-=M,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},z.readBits=function(n){var M=Math.min(this.bitsAvailable,n),y=this.word>>>32-M;return n>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=M,this.bitsAvailable>0?this.word<<=M:this.bytesAvailable>0&&this.loadWord(),M=n-M,M>0&&this.bitsAvailable?y<<M|this.readBits(M):y},z.skipLZ=function(){var n;for(n=0;n<this.bitsAvailable;++n)if((this.word&2147483648>>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},z.skipUEG=function(){this.skipBits(1+this.skipLZ())},z.skipEG=function(){this.skipBits(1+this.skipLZ())},z.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},z.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},z.readBoolean=function(){return this.readBits(1)===1},z.readUByte=function(){return this.readBits(8)},z.readUShort=function(){return this.readBits(16)},z.readUInt=function(){return this.readBits(32)},z.skipScalingList=function(n){for(var M=8,y=8,m,g=0;g<n;g++)y!==0&&(m=this.readEG(),y=(M+m+256)%256),M=y===0?M:y},z.readSPS=function(){var n=0,M=0,y=0,m=0,g,u,c,f=this.readUByte.bind(this),o=this.readBits.bind(this),l=this.readUEG.bind(this),s=this.readBoolean.bind(this),a=this.skipBits.bind(this),O=this.skipEG.bind(this),w=this.skipUEG.bind(this),S=this.skipScalingList.bind(this);f();var L=f();if(o(5),a(3),f(),w(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var D=l();if(D===3&&a(1),w(),w(),a(1),s())for(u=D!==3?8:12,c=0;c<u;c++)s()&&(c<6?S(16):S(64))}w();var A=l();if(A===0)l();else if(A===1)for(a(1),O(),O(),g=l(),c=0;c<g;c++)O();w(),a(1);var T=l(),x=l(),d=o(1);d===0&&a(1),a(1),s()&&(n=l(),M=l(),y=l(),m=l());var E=[1,1];if(s()&&s()){var p=f();switch(p){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:{E=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((T+1)*16-n*2-M*2),height:(2-d)*(x+1)*16-(d?2:4)*(y+m),pixelRatio:E}},z.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},B}();G.default=k},"./src/demux/id3.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"isHeader",function(){return V}),P.d(G,"isFooter",function(){return k}),P.d(G,"getID3Data",function(){return B}),P.d(G,"canParse",function(){return K}),P.d(G,"getTimeStamp",function(){return n}),P.d(G,"isTimeStampFrame",function(){return M}),P.d(G,"getID3Frames",function(){return m}),P.d(G,"decodeFrame",function(){return g}),P.d(G,"utf8ArrayToStr",function(){return l}),P.d(G,"testables",function(){return s});var V=function(S,L){return L+10<=S.length&&(S[L]===73&&S[L+1]===68&&S[L+2]===51&&(S[L+3]<255&&S[L+4]<255&&(S[L+6]<128&&S[L+7]<128&&S[L+8]<128&&S[L+9]<128)))},k=function(S,L){return L+10<=S.length&&(S[L]===51&&S[L+1]===68&&S[L+2]===73&&(S[L+3]<255&&S[L+4]<255&&(S[L+6]<128&&S[L+7]<128&&S[L+8]<128&&S[L+9]<128)))},B=function(S,L){for(var D=L,A=0;V(S,L);){A+=10;var T=z(S,L+6);A+=T,k(S,L+10)&&(A+=10),L+=A}return A>0?S.subarray(D,D+A):void 0},z=function(S,L){var D=0;return D=(S[L]&127)<<21,D|=(S[L+1]&127)<<14,D|=(S[L+2]&127)<<7,D|=S[L+3]&127,D},K=function(S,L){return V(S,L)&&z(S,L+6)+10<=S.length-L},n=function(S){for(var L=m(S),D=0;D<L.length;D++){var A=L[D];if(M(A))return o(A)}return},M=function(S){return S&&S.key==="PRIV"&&S.info==="com.apple.streaming.transportStreamTimestamp"},y=function(S){var L=String.fromCharCode(S[0],S[1],S[2],S[3]),D=z(S,4),A=10;return{type:L,size:D,data:S.subarray(A,A+D)}},m=function(S){for(var L=0,D=[];V(S,L);){var A=z(S,L+6);L+=10;for(var T=L+A;L+8<T;){var x=y(S.subarray(L)),d=g(x);d&&D.push(d),L+=x.size+10}k(S,L)&&(L+=10)}return D},g=function(S){return S.type==="PRIV"?u(S):S.type[0]==="W"?f(S):c(S)},u=function(S){if(S.size<2)return;var L=l(S.data,!0),D=new Uint8Array(S.data.subarray(L.length+1));return{key:S.type,info:L,data:D.buffer}},c=function(S){if(S.size<2)return;if(S.type==="TXXX"){var L=1,D=l(S.data.subarray(L),!0);L+=D.length+1;var A=l(S.data.subarray(L));return{key:S.type,info:D,data:A}}var T=l(S.data.subarray(1));return{key:S.type,data:T}},f=function(S){if(S.type==="WXXX"){if(S.size<2)return;var L=1,D=l(S.data.subarray(L),!0);L+=D.length+1;var A=l(S.data.subarray(L));return{key:S.type,info:D,data:A}}var T=l(S.data);return{key:S.type,data:T}},o=function(S){if(S.data.byteLength===8){var L=new Uint8Array(S.data),D=L[3]&1,A=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return A/=45,D&&(A+=4772185884e-2),Math.round(A)}return},l=function(S,L){L===void 0&&(L=!1);var D=O();if(D){var A=D.decode(S);if(L){var T=A.indexOf("\0");return T!==-1?A.substring(0,T):A}return A.replace(/\0/g,"")}for(var x=S.length,d,E,p,v="",C=0;C<x;){if(d=S[C++],d===0&&L)return v;if(d===0||d===3)continue;switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(d);break;case 12:case 13:E=S[C++],v+=String.fromCharCode((d&31)<<6|E&63);break;case 14:E=S[C++],p=S[C++],v+=String.fromCharCode((d&15)<<12|(E&63)<<6|(p&63)<<0);break;default:}}return v},s={decodeTextFrame:c},a;function O(){return!a&&typeof self.TextDecoder!="undefined"&&(a=new self.TextDecoder("utf-8")),a}},"./src/demux/mp3demuxer.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/demux/base-audio-demuxer.ts"),k=P("./src/demux/id3.ts"),B=P("./src/utils/logger.ts"),z=P("./src/demux/mpegaudio.ts");function K(y,m){y.prototype=Object.create(m.prototype),y.prototype.constructor=y,n(y,m)}function n(y,m){return n=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},n(y,m)}var M=function(y){K(m,y);function m(){return y.apply(this,arguments)||this}var g=m.prototype;return g.resetInitSegment=function(c,f,o){y.prototype.resetInitSegment.call(this,c,f,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:c,duration:o,inputTimeScale:9e4,dropped:0}},m.probe=function(c){if(!c)return!1;for(var f=k.getID3Data(c,0)||[],o=f.length,l=c.length;o<l;o++)if(z.probe(c,o))return B.logger.log("MPEG Audio sync word found !"),!0;return!1},g.canParse=function(c,f){return z.canParse(c,f)},g.appendFrame=function(c,f,o){return this.initPTS===null?void 0:z.appendFrame(c,f,o,this.initPTS,this.frameIndex)},m}(V.default);M.minProbeByteLength=4,G.default=M},"./src/demux/mp4demuxer.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/utils/mp4-tools.ts"),k=P("./src/demux/dummy-demuxed-track.ts"),B=function(){function z(n,M){this.remainderData=null,this.config=void 0,this.config=M}var K=z.prototype;return K.resetTimeStamp=function(){},K.resetInitSegment=function(){},K.resetContiguity=function(){},z.probe=function(M){return Object(V.findBox)({data:M,start:0,end:Math.min(M.length,16384)},["moof"]).length>0},K.demux=function(M){var y=M,m=Object(k.dummyTrack)();if(this.config.progressive){this.remainderData&&(y=Object(V.appendUint8Array)(this.remainderData,M));var g=Object(V.segmentValidRange)(y);this.remainderData=g.remainder,m.samples=g.valid||new Uint8Array}else m.samples=y;return{audioTrack:Object(k.dummyTrack)(),avcTrack:m,id3Track:Object(k.dummyTrack)(),textTrack:Object(k.dummyTrack)()}},K.flush=function(){var M=Object(k.dummyTrack)();return M.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(k.dummyTrack)(),avcTrack:M,id3Track:Object(k.dummyTrack)(),textTrack:Object(k.dummyTrack)()}},K.demuxSampleAes=function(M,y,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},K.destroy=function(){},z}();B.minProbeByteLength=1024,G.default=B},"./src/demux/mpegaudio.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"appendFrame",function(){return n}),P.d(G,"parseHeader",function(){return M}),P.d(G,"isHeaderPattern",function(){return y}),P.d(G,"isHeader",function(){return m}),P.d(G,"canParse",function(){return g}),P.d(G,"probe",function(){return u});var V=null,k=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],B=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],z=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],K=[0,1,1,4];function n(c,f,o,l,s){if(o+24>f.length)return;var a=M(f,o);if(a&&o+a.frameLength<=f.length){var O=a.samplesPerFrame*9e4/a.sampleRate,w=l+s*O,S={unit:f.subarray(o,o+a.frameLength),pts:w,dts:w};return c.config=[],c.channelCount=a.channelCount,c.samplerate=a.sampleRate,c.samples.push(S),{sample:S,length:a.frameLength,missing:0}}}function M(c,f){var o=c[f+1]>>3&3,l=c[f+1]>>1&3,s=c[f+2]>>4&15,a=c[f+2]>>2&3;if(o!==1&&s!==0&&s!==15&&a!==3){var O=c[f+2]>>1&1,w=c[f+3]>>6,S=o===3?3-l:l===3?3:4,L=k[S*14+s-1]*1e3,D=o===3?0:o===2?1:2,A=B[D*3+a],T=w===3?1:2,x=z[o][l],d=K[l],E=x*8*d,p=Math.floor(x*L/A+O)*d;if(V===null){var v=navigator.userAgent||"",C=v.match(/Chrome\/(\d+)/i);V=C?parseInt(C[1]):0}var F=!!V&&V<=87;return F&&l===2&&L>=224e3&&w===0&&(c[f+3]=c[f+3]|128),{sampleRate:A,channelCount:T,frameLength:p,samplesPerFrame:E}}}function y(c,f){return c[f]===255&&(c[f+1]&224)===224&&(c[f+1]&6)!==0}function m(c,f){return f+1<c.length&&y(c,f)}function g(c,f){var o=4;return y(c,f)&&o<=c.length-f}function u(c,f){if(f+1<c.length&&y(c,f)){var o=4,l=M(c,f),s=o;l!=null&&l.frameLength&&(s=l.frameLength);var a=f+s;return a===c.length||m(c,a)}return!1}},"./src/demux/sample-aes.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/crypt/decrypter.ts"),k=P("./src/demux/tsdemuxer.ts"),B=function(){function z(n,M,y){this.keyData=void 0,this.decrypter=void 0,this.keyData=y,this.decrypter=new V.default(n,M,{removePKCS7Padding:!1})}var K=z.prototype;return K.decryptBuffer=function(M,y){this.decrypter.decrypt(M,this.keyData.key.buffer,this.keyData.iv.buffer,y)},K.decryptAacSample=function(M,y,m,g){var u=M[y].unit,c=u.subarray(16,u.length-u.length%16),f=c.buffer.slice(c.byteOffset,c.byteOffset+c.length),o=this;this.decryptBuffer(f,function(l){var s=new Uint8Array(l);u.set(s,16),g||o.decryptAacSamples(M,y+1,m)})},K.decryptAacSamples=function(M,y,m){for(;;y++){if(y>=M.length){m();return}if(M[y].unit.length<32)continue;var g=this.decrypter.isSync();if(this.decryptAacSample(M,y,m,g),!g)return}},K.getAvcEncryptedData=function(M){for(var y=Math.floor((M.length-48)/160)*16+16,m=new Int8Array(y),g=0,u=32;u<=M.length-16;u+=160,g+=16)m.set(M.subarray(u,u+16),g);return m},K.getAvcDecryptedUnit=function(M,y){for(var m=new Uint8Array(y),g=0,u=32;u<=M.length-16;u+=160,g+=16)M.set(m.subarray(g,g+16),u);return M},K.decryptAvcSample=function(M,y,m,g,u,c){var f=Object(k.discardEPB)(u.data),o=this.getAvcEncryptedData(f),l=this;this.decryptBuffer(o.buffer,function(s){u.data=l.getAvcDecryptedUnit(f,s),c||l.decryptAvcSamples(M,y,m+1,g)})},K.decryptAvcSamples=function(M,y,m,g){if(M instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;y++,m=0){if(y>=M.length){g();return}for(var u=M[y].units;!(m>=u.length);m++){var c=u[m];if(c.data.length<=48||c.type!==1&&c.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(M,y,m,g,c,f),!f)return}}},z}();G.default=B},"./src/demux/transmuxer-interface.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return u});var V=P("./node_modules/webworkify-webpack/index.js"),k=P.n(V),B=P("./src/events.ts"),z=P("./src/demux/transmuxer.ts"),K=P("./src/utils/logger.ts"),n=P("./src/errors.ts"),M=P("./src/utils/mediasource-helper.ts"),y=P("./node_modules/eventemitter3/index.js"),m=P.n(y),g=Object(M.getMediaSource)()||{isTypeSupported:function(){return!1}},u=function(){function c(o,l,s,a){var O=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=o,this.id=l,this.onTransmuxComplete=s,this.onFlush=a;var w=o.config,S=function(x,d){d=d||{},d.frag=O.frag,d.id=O.id,o.trigger(x,d)};this.observer=new y.EventEmitter,this.observer.on(B.Events.FRAG_DECRYPTED,S),this.observer.on(B.Events.ERROR,S);var L={mp4:g.isTypeSupported("video/mp4"),mpeg:g.isTypeSupported("audio/mpeg"),mp3:g.isTypeSupported('audio/mp4; codecs="mp3"')},D=navigator.vendor;if(w.enableWorker&&typeof Worker!="undefined"){K.logger.log("demuxing in webworker");var A;try{A=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),A.addEventListener("message",this.onwmsg),A.onerror=function(T){o.trigger(B.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(T.message+" ("+T.filename+":"+T.lineno+")")})},A.postMessage({cmd:"init",typeSupported:L,vendor:D,id:l,config:JSON.stringify(w)})}catch(T){K.logger.warn("Error in worker:",T),K.logger.error("Error while initializing DemuxerWorker, fallback to inline"),A&&self.URL.revokeObjectURL(A.objectURL),this.transmuxer=new z.default(this.observer,L,w,D,l),this.worker=null}}else this.transmuxer=new z.default(this.observer,L,w,D,l)}var f=c.prototype;return f.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var a=this.observer;a&&a.removeAllListeners(),this.observer=null},f.push=function(l,s,a,O,w,S,L,D,A,T){var x=this;A.transmuxing.start=self.performance.now();var d=this.transmuxer,E=this.worker,p=S?S.start:w.start,v=w.decryptdata,C=this.frag,F=!(C&&w.cc===C.cc),R=!(C&&A.level===C.level),j=C?A.sn-C.sn:-1,U=this.part?A.part-this.part.index:1,b=!R&&(j===1||j===0&&U===1),Q=self.performance.now();(R||j||w.stats.parsing.start===0)&&(w.stats.parsing.start=Q),S&&(U||!b)&&(S.stats.parsing.start=Q);var ee=new z.TransmuxState(F,b,D,R,p);if(!b||F){K.logger.log("[transmuxer-interface, "+w.type+"]: Starting new transmux session for sn: "+A.sn+" p: "+A.part+" level: "+A.level+" id: "+A.id+`
|
|
discontinuity: `+F+`
|
|
trackSwitch: `+R+`
|
|
contiguous: `+b+`
|
|
accurateTimeOffset: `+D+`
|
|
timeOffset: `+p);var oe=new z.TransmuxConfig(a,O,s,L,T);this.configureTransmuxer(oe)}if(this.frag=w,this.part=S,E)E.postMessage({cmd:"demux",data:l,decryptdata:v,chunkMeta:A,state:ee},l instanceof ArrayBuffer?[l]:[]);else if(d){var fe=d.push(l,v,A,ee);Object(z.isPromise)(fe)?fe.then(function(Fe){x.handleTransmuxComplete(Fe)}):this.handleTransmuxComplete(fe)}},f.flush=function(l){var s=this;l.transmuxing.start=self.performance.now();var a=this.transmuxer,O=this.worker;if(O)O.postMessage({cmd:"flush",chunkMeta:l});else if(a){var w=a.flush(l);Object(z.isPromise)(w)?w.then(function(S){s.handleFlushResult(S,l)}):this.handleFlushResult(w,l)}},f.handleFlushResult=function(l,s){var a=this;l.forEach(function(O){a.handleTransmuxComplete(O)}),this.onFlush(s)},f.onWorkerMessage=function(l){var s=l.data,a=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,a.trigger(s.event,s.data);break}}},f.configureTransmuxer=function(l){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:l}):a&&a.configure(l)},f.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},c}()},"./src/demux/transmuxer-worker.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return n});var V=P("./src/demux/transmuxer.ts"),k=P("./src/events.ts"),B=P("./src/utils/logger.ts"),z=P("./node_modules/eventemitter3/index.js"),K=P.n(z);function n(u){var c=new z.EventEmitter,f=function(l,s){u.postMessage({event:l,data:s})};c.on(k.Events.FRAG_DECRYPTED,f),c.on(k.Events.ERROR,f),u.addEventListener("message",function(o){var l=o.data;switch(l.cmd){case"init":{var s=JSON.parse(l.config);u.transmuxer=new V.default(c,l.typeSupported,s,l.vendor,l.id),Object(B.enableLogs)(s.debug),f("init",null);break}case"configure":{u.transmuxer.configure(l.config);break}case"demux":{var a=u.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(V.isPromise)(a)?a.then(function(S){M(u,S)}):M(u,a);break}case"flush":{var O=l.chunkMeta,w=u.transmuxer.flush(O);Object(V.isPromise)(w)?w.then(function(S){m(u,S,O)}):m(u,w,O);break}default:break}})}function M(u,c){if(g(c.remuxResult))return;var f=[],o=c.remuxResult,l=o.audio,s=o.video;l&&y(f,l),s&&y(f,s),u.postMessage({event:"transmuxComplete",data:c},f)}function y(u,c){c.data1&&u.push(c.data1.buffer),c.data2&&u.push(c.data2.buffer)}function m(u,c,f){c.forEach(function(o){M(u,o)}),u.postMessage({event:"flush",data:f})}function g(u){return!u.audio&&!u.video&&!u.text&&!u.id3&&!u.initSegment}},"./src/demux/transmuxer.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return s}),P.d(G,"isPromise",function(){return w}),P.d(G,"TransmuxConfig",function(){return S}),P.d(G,"TransmuxState",function(){return L});var V=P("./src/events.ts"),k=P("./src/errors.ts"),B=P("./src/crypt/decrypter.ts"),z=P("./src/demux/aacdemuxer.ts"),K=P("./src/demux/mp4demuxer.ts"),n=P("./src/demux/tsdemuxer.ts"),M=P("./src/demux/mp3demuxer.ts"),y=P("./src/remux/mp4-remuxer.ts"),m=P("./src/remux/passthrough-remuxer.ts"),g=P("./src/demux/chunk-cache.ts"),u=P("./src/utils/mp4-tools.ts"),c=P("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(D){c.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var o=[{demux:n.default,remux:y.default},{demux:K.default,remux:m.default},{demux:z.default,remux:y.default},{demux:M.default,remux:y.default}],l=1024;o.forEach(function(D){var A=D.demux;l=Math.max(l,A.minProbeByteLength)});var s=function(){function D(T,x,d,E,p){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 g.default,this.observer=T,this.typeSupported=x,this.config=d,this.vendor=E,this.id=p}var A=D.prototype;return A.configure=function(x){this.transmuxConfig=x,this.decrypter&&this.decrypter.reset()},A.push=function(x,d,E,p){var v=this,C=E.transmuxing;C.executeStart=f();var F=new Uint8Array(x),R=this.cache,j=this.config,U=this.currentTransmuxState,b=this.transmuxConfig;p&&(this.currentTransmuxState=p);var Q=a(F,d);if(Q&&Q.method==="AES-128"){var ee=this.getDecrypter();if(j.enableSoftwareAES){var oe=ee.softwareDecrypt(F,Q.key.buffer,Q.iv.buffer);if(!oe)return C.executeEnd=f(),O(E);F=new Uint8Array(oe)}else return this.decryptionPromise=ee.webCryptoDecrypt(F,Q.key.buffer,Q.iv.buffer).then(function(et){var dt=v.push(et,null,E);return v.decryptionPromise=null,dt}),this.decryptionPromise}var fe=p||U,Fe=fe.contiguous,Le=fe.discontinuity,Ie=fe.trackSwitch,Be=fe.accurateTimeOffset,We=fe.timeOffset,ge=b.audioCodec,ue=b.videoCodec,ke=b.defaultInitPts,lt=b.duration,ot=b.initSegmentData;if((Le||Ie)&&this.resetInitSegment(ot,ge,ue,lt),Le&&this.resetInitialTimestamp(ke),Fe||this.resetContiguity(),this.needsProbing(F,Le,Ie)){if(R.dataLength){var ut=R.flush();F=Object(u.appendUint8Array)(ut,F)}this.configureTransmuxer(F,b)}var xt=this.transmux(F,Q,We,Be,E),Je=this.currentTransmuxState;return Je.contiguous=!0,Je.discontinuity=!1,Je.trackSwitch=!1,C.executeEnd=f(),xt},A.flush=function(x){var d=this,E=x.transmuxing;E.executeStart=f();var p=this.decrypter,v=this.cache,C=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return d.flush(x)});var R=[],j=C.timeOffset;if(p){var U=p.flush();U&&R.push(this.push(U,null,x))}var b=v.dataLength;v.reset();var Q=this.demuxer,ee=this.remuxer;if(!Q||!ee)return b>=l&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),E.executeEnd=f(),[O(x)];var oe=Q.flush(j);return w(oe)?oe.then(function(fe){return d.flushRemux(R,fe,x),R}):(this.flushRemux(R,oe,x),R)},A.flushRemux=function(x,d,E){var p=d.audioTrack,v=d.avcTrack,C=d.id3Track,F=d.textTrack,R=this.currentTransmuxState,j=R.accurateTimeOffset,U=R.timeOffset;c.logger.log("[transmuxer.ts]: Flushed fragment "+E.sn+(E.part>-1?" p: "+E.part:"")+" of level "+E.level);var b=this.remuxer.remux(p,v,C,F,U,j,!0,this.id);x.push({remuxResult:b,chunkMeta:E}),E.transmuxing.executeEnd=f()},A.resetInitialTimestamp=function(x){var d=this.demuxer,E=this.remuxer;if(!d||!E)return;d.resetTimeStamp(x),E.resetTimeStamp(x)},A.resetContiguity=function(){var x=this.demuxer,d=this.remuxer;if(!x||!d)return;x.resetContiguity(),d.resetNextTimestamp()},A.resetInitSegment=function(x,d,E,p){var v=this.demuxer,C=this.remuxer;if(!v||!C)return;v.resetInitSegment(d,E,p),C.resetInitSegment(x,d,E)},A.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},A.transmux=function(x,d,E,p,v){var C;return d&&d.method==="SAMPLE-AES"?C=this.transmuxSampleAes(x,d,E,p,v):C=this.transmuxUnencrypted(x,E,p,v),C},A.transmuxUnencrypted=function(x,d,E,p){var v=this.demuxer.demux(x,d,!1,!this.config.progressive),C=v.audioTrack,F=v.avcTrack,R=v.id3Track,j=v.textTrack,U=this.remuxer.remux(C,F,R,j,d,E,!1,this.id);return{remuxResult:U,chunkMeta:p}},A.transmuxSampleAes=function(x,d,E,p,v){var C=this;return this.demuxer.demuxSampleAes(x,d,E).then(function(F){var R=C.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,E,p,!1,C.id);return{remuxResult:R,chunkMeta:v}})},A.configureTransmuxer=function(x,d){for(var E=this.config,p=this.observer,v=this.typeSupported,C=this.vendor,F=d.audioCodec,R=d.defaultInitPts,j=d.duration,U=d.initSegmentData,b=d.videoCodec,Q,ee=0,oe=o.length;ee<oe;ee++)if(o[ee].demux.probe(x)){Q=o[ee];break}Q||(c.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Q={demux:K.default,remux:m.default});var fe=this.demuxer,Fe=this.remuxer,Le=Q.remux,Ie=Q.demux;(!Fe||!(Fe instanceof Le))&&(this.remuxer=new Le(p,E,v,C)),(!fe||!(fe instanceof Ie))&&(this.demuxer=new Ie(p,E,v),this.probe=Ie.probe),this.resetInitSegment(U,F,b,j),this.resetInitialTimestamp(R)},A.needsProbing=function(x,d,E){return!this.demuxer||!this.remuxer||d||E},A.getDecrypter=function(){var x=this.decrypter;return x||(x=this.decrypter=new B.default(this.observer,this.config)),x},D}();function a(D,A){var T=null;return D.byteLength>0&&A!=null&&A.key!=null&&A.iv!==null&&A.method!=null&&(T=A),T}var O=function(A){return{remuxResult:{},chunkMeta:A}};function w(D){return"then"in D&&D.then instanceof Function}var S=function(A,T,x,d,E){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=A,this.videoCodec=T,this.initSegmentData=x,this.duration=d,this.defaultInitPts=E},L=function(A,T,x,d,E){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=A,this.contiguous=T,this.accurateTimeOffset=x,this.trackSwitch=d,this.timeOffset=E}},"./src/demux/tsdemuxer.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"discardEPB",function(){return O});var V=P("./src/demux/adts.ts"),k=P("./src/demux/mpegaudio.ts"),B=P("./src/demux/exp-golomb.ts"),z=P("./src/demux/id3.ts"),K=P("./src/demux/sample-aes.ts"),n=P("./src/events.ts"),M=P("./src/utils/mp4-tools.ts"),y=P("./src/utils/logger.ts"),m=P("./src/errors.ts"),g={video:1,audio:2,id3:3,text:4},u=function(){function w(L,D,A){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=D,this.typeSupported=A}w.probe=function(D){var A=w.syncOffset(D);return A<0?!1:(A&&y.logger.warn("MPEG2-TS detected but first sync word found @ offset "+A+", junk ahead ?"),!0)},w.syncOffset=function(D){for(var A=Math.min(1e3,D.length-3*188),T=0;T<A;){if(D[T]===71&&D[T+188]===71&&D[T+2*188]===71)return T;T++}return-1},w.createTrack=function(D,A){return{container:D==="video"||D==="audio"?"video/mp2t":void 0,type:D,id:g[D],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:D==="audio"?A:void 0}};var S=w.prototype;return S.resetInitSegment=function(D,A,T){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video",T),this._audioTrack=w.createTrack("audio",T),this._id3Track=w.createTrack("id3",T),this._txtTrack=w.createTrack("text",T),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=D,this.videoCodec=A,this._duration=T},S.resetTimeStamp=function(){},S.resetContiguity=function(){var D=this._audioTrack,A=this._avcTrack,T=this._id3Track;D&&(D.pesData=null),A&&(A.pesData=null),T&&(T.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},S.demux=function(D,A,T,x){T===void 0&&(T=!1),x===void 0&&(x=!1),T||(this.sampleAes=null);var d,E=this._avcTrack,p=this._audioTrack,v=this._id3Track,C=E.pid,F=E.pesData,R=p.pid,j=v.pid,U=p.pesData,b=v.pesData,Q=!1,ee=this.pmtParsed,oe=this._pmtId,fe=D.length;if(this.remainderData&&(D=Object(M.appendUint8Array)(this.remainderData,D),fe=D.length,this.remainderData=null),fe<188&&!x)return this.remainderData=D,{audioTrack:p,avcTrack:E,id3Track:v,textTrack:this._txtTrack};var Fe=Math.max(0,w.syncOffset(D));fe-=(fe+Fe)%188,fe<D.byteLength&&!x&&(this.remainderData=new Uint8Array(D.buffer,fe,D.buffer.byteLength-fe));for(var Le=Fe;Le<fe;Le+=188)if(D[Le]===71){var Ie=!!(D[Le+1]&64),Be=((D[Le+1]&31)<<8)+D[Le+2],We=(D[Le+3]&48)>>4,ge=void 0;if(We>1){if(ge=Le+5+D[Le+4],ge===Le+188)continue}else ge=Le+4;switch(Be){case C:Ie&&(F&&(d=l(F))&&this.parseAVCPES(d,!1),F={data:[],size:0}),F&&(F.data.push(D.subarray(ge,Le+188)),F.size+=Le+188-ge);break;case R:Ie&&(U&&(d=l(U))&&(p.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),U={data:[],size:0}),U&&(U.data.push(D.subarray(ge,Le+188)),U.size+=Le+188-ge);break;case j:Ie&&(b&&(d=l(b))&&this.parseID3PES(d),b={data:[],size:0}),b&&(b.data.push(D.subarray(ge,Le+188)),b.size+=Le+188-ge);break;case 0:Ie&&(ge+=D[ge]+1),oe=this._pmtId=f(D,ge);break;case oe:{Ie&&(ge+=D[ge]+1);var ue=o(D,ge,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,T);C=ue.avc,C>0&&(E.pid=C),R=ue.audio,R>0&&(p.pid=R,p.isAAC=ue.isAAC),j=ue.id3,j>0&&(v.pid=j),Q&&!ee&&(y.logger.log("reparse from beginning"),Q=!1,Le=Fe-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:Q=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E.pesData=F,p.pesData=U,v.pesData=b;var ke={audioTrack:p,avcTrack:E,id3Track:v,textTrack:this._txtTrack};return x&&this.extractRemainingSamples(ke),ke},S.flush=function(){var D=this.remainderData;this.remainderData=null;var A;return D?A=this.demux(D,-1,!1,!0):A={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(A),this.sampleAes?this.decrypt(A,this.sampleAes):A},S.extractRemainingSamples=function(D){var A=D.audioTrack,T=D.avcTrack,x=D.id3Track,d=T.pesData,E=A.pesData,p=x.pesData,v;d&&(v=l(d))?(this.parseAVCPES(v,!0),T.pesData=null):T.pesData=d,E&&(v=l(E))?(A.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),A.pesData=null):(E!=null&&E.size&&y.logger.log("last AAC PES packet truncated,might overlap between fragments"),A.pesData=E),p&&(v=l(p))?(this.parseID3PES(v),x.pesData=null):x.pesData=p},S.demuxSampleAes=function(D,A,T){var x=this.demux(D,T,!0,!this.config.progressive),d=this.sampleAes=new K.default(this.observer,this.config,A);return this.decrypt(x,d)},S.decrypt=function(D,A){return new Promise(function(T){var x=D.audioTrack,d=D.avcTrack;x.samples&&x.isAAC?A.decryptAacSamples(x.samples,0,function(){d.samples?A.decryptAvcSamples(d.samples,0,0,function(){T(D)}):T(D)}):d.samples&&A.decryptAvcSamples(d.samples,0,0,function(){T(D)})})},S.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},S.parseAVCPES=function(D,A){var T=this,x=this._avcTrack,d=this.parseAVCNALu(D.data),E=!1,p=this.avcSample,v,C=!1;D.data=null,p&&d.length&&!x.audFound&&(s(p,x),p=this.avcSample=c(!1,D.pts,D.dts,"")),d.forEach(function(F){switch(F.type){case 1:{v=!0,p||(p=T.avcSample=c(!0,D.pts,D.dts,"")),E&&(p.debug+="NDR "),p.frame=!0;var R=F.data;if(C&&R.length>4){var j=new B.default(R).readSliceType();(j===2||j===4||j===7||j===9)&&(p.key=!0)}break}case 5:v=!0,p||(p=T.avcSample=c(!0,D.pts,D.dts,"")),E&&(p.debug+="IDR "),p.key=!0,p.frame=!0;break;case 6:{v=!0,E&&p&&(p.debug+="SEI ");var U=new B.default(O(F.data));U.readUByte();for(var b=0,Q=0,ee=!1,oe=0;!ee&&U.bytesAvailable>1;){b=0;do oe=U.readUByte(),b+=oe;while(oe===255);Q=0;do oe=U.readUByte(),Q+=oe;while(oe===255);if(b===4&&U.bytesAvailable!==0){ee=!0;var fe=U.readUByte();if(fe===181){var Fe=U.readUShort();if(Fe===49){var Le=U.readUInt();if(Le===1195456820){var Ie=U.readUByte();if(Ie===3){for(var Be=U.readUByte(),We=U.readUByte(),ge=31&Be,ue=[Be,We],ke=0;ke<ge;ke++)ue.push(U.readUByte()),ue.push(U.readUByte()),ue.push(U.readUByte());a(T._txtTrack.samples,{type:3,pts:D.pts,bytes:ue})}}}}}else if(b===5&&U.bytesAvailable!==0){if(ee=!0,Q>16){for(var lt=[],ot=0;ot<16;ot++)lt.push(U.readUByte().toString(16)),(ot===3||ot===5||ot===7||ot===9)&<.push("-");for(var ut=Q-16,xt=new Uint8Array(ut),Je=0;Je<ut;Je++)xt[Je]=U.readUByte();a(T._txtTrack.samples,{pts:D.pts,payloadType:b,uuid:lt.join(""),userData:Object(z.utf8ArrayToStr)(xt),userDataBytes:xt})}}else if(Q<U.bytesAvailable)for(var et=0;et<Q;et++)U.readUByte()}break}case 7:if(v=!0,C=!0,E&&p&&(p.debug+="SPS "),!x.sps){var dt=new B.default(F.data),de=dt.readSPS();x.width=de.width,x.height=de.height,x.pixelRatio=de.pixelRatio,x.sps=[F.data],x.duration=T._duration;for(var Ce=F.data.subarray(1,4),Ue="avc1.",Ke=0;Ke<3;Ke++){var st=Ce[Ke].toString(16);st.length<2&&(st="0"+st),Ue+=st}x.codec=Ue}break;case 8:v=!0,E&&p&&(p.debug+="PPS "),x.pps||(x.pps=[F.data]);break;case 9:v=!1,x.audFound=!0,p&&s(p,x),p=T.avcSample=c(!1,D.pts,D.dts,E?"AUD ":"");break;case 12:v=!1;break;default:v=!1,p&&(p.debug+="unknown NAL "+F.type+" ");break}if(p&&v){var ht=p.units;ht.push(F)}}),A&&p&&(s(p,x),this.avcSample=null)},S.getLastNalUnit=function(){var D,A=this.avcSample,T;if(!A||A.units.length===0){var x=this._avcTrack.samples;A=x[x.length-1]}if((D=A)!==null&&D!==void 0&&D.units){var d=A.units;T=d[d.length-1]}return T},S.parseAVCNALu=function(D){var A=D.byteLength,T=this._avcTrack,x=T.naluState||0,d=x,E=[],p=0,v,C,F,R=-1,j=0;for(x===-1&&(R=0,j=D[0]&31,x=0,p=1);p<A;){if(v=D[p++],!x){x=v?0:1;continue}if(x===1){x=v?0:2;continue}if(!v)x=3;else if(v===1){if(R>=0){var U={data:D.subarray(R,p-x-1),type:j};E.push(U)}else{var b=this.getLastNalUnit();if(b&&(d&&p<=4-d&&(b.state&&(b.data=b.data.subarray(0,b.data.byteLength-d))),C=p-x-1,C>0)){var Q=new Uint8Array(b.data.byteLength+C);Q.set(b.data,0),Q.set(D.subarray(0,C),b.data.byteLength),b.data=Q,b.state=0}}p<A?(F=D[p]&31,R=p,j=F,x=0):x=-1}else x=0}if(R>=0&&x>=0){var ee={data:D.subarray(R,A),type:j,state:x};E.push(ee)}if(E.length===0){var oe=this.getLastNalUnit();if(oe){var fe=new Uint8Array(oe.data.byteLength+D.byteLength);fe.set(oe.data,0),fe.set(D,oe.data.byteLength),oe.data=fe}}return T.naluState=x,E},S.parseAACPES=function(D){var A=0,T=this._audioTrack,x=this.aacOverFlow,d=D.data;if(x){this.aacOverFlow=null;var E=x.sample.unit.byteLength,p=Math.min(x.missing,E),v=E-p;x.sample.unit.set(d.subarray(0,p),v),T.samples.push(x.sample),A=x.missing}var C,F;for(C=A,F=d.length;C<F-1&&!V.isHeader(d,C);C++);if(C!==A){var R,j;if(C<F-1?(R="AAC PES did not start with ADTS header,offset:"+C,j=!1):(R="no ADTS header found in AAC PES",j=!0),y.logger.warn("parsing error:"+R),this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:j,reason:R}),j)return}V.initTrackConfig(T,this.observer,d,C,this.audioCodec);var U;if(D.pts!==void 0)U=D.pts;else if(x){var b=V.getFrameDuration(T.samplerate);U=x.sample.pts+b}else{y.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Q=0;C<F;)if(V.isHeader(d,C)){if(C+5<F){var ee=V.appendFrame(T,d,C,U,Q);if(ee)if(ee.missing)this.aacOverFlow=ee;else{C+=ee.length,Q++;continue}}break}else C++},S.parseMPEGPES=function(D){var A=D.data,T=A.length,x=0,d=0,E=D.pts;if(E===void 0){y.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;d<T;)if(k.isHeader(A,d)){var p=k.appendFrame(this._audioTrack,A,d,E,x);if(p)d+=p.length,x++;else break}else d++},S.parseID3PES=function(D){if(D.pts===void 0){y.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(D)},w}();u.minProbeByteLength=188;function c(w,S,L,D){return{key:w,frame:!1,pts:S,dts:L,units:[],debug:D,length:0}}function f(w,S){return(w[S+10]&31)<<8|w[S+11]}function o(w,S,L,D){var A={audio:-1,avc:-1,id3:-1,isAAC:!0},T=(w[S+1]&15)<<8|w[S+2],x=S+3+T-4,d=(w[S+10]&15)<<8|w[S+11];for(S+=12+d;S<x;){var E=(w[S+1]&31)<<8|w[S+2];switch(w[S]){case 207:if(!D){y.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:A.audio===-1&&(A.audio=E);break;case 21:A.id3===-1&&(A.id3=E);break;case 219:if(!D){y.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:A.avc===-1&&(A.avc=E);break;case 3:case 4:L?A.audio===-1&&(A.audio=E,A.isAAC=!1):y.logger.log("MPEG audio found, not supported in this browser");break;case 36:y.logger.warn("Unsupported HEVC stream type found");break;default:break}S+=((w[S+3]&15)<<8|w[S+4])+5}return A}function l(w){var S=0,L,D,A,T,x,d=w.data;if(!w||w.size===0)return null;for(;d[0].length<19&&d.length>1;){var E=new Uint8Array(d[0].length+d[1].length);E.set(d[0]),E.set(d[1],d[0].length),d[0]=E,d.splice(1,1)}L=d[0];var p=(L[0]<<16)+(L[1]<<8)+L[2];if(p===1){if(D=(L[4]<<8)+L[5],D&&D>w.size-6)return null;var v=L[7];v&192&&(T=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(x=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,T-x>60*9e4&&(y.logger.warn(Math.round((T-x)/9e4)+"s delta between PTS and DTS, align them"),T=x)):x=T),A=L[8];var C=A+9;if(w.size<=C)return null;w.size-=C;for(var F=new Uint8Array(w.size),R=0,j=d.length;R<j;R++){L=d[R];var U=L.byteLength;if(C)if(C>U){C-=U;continue}else L=L.subarray(C),U-=C,C=0;F.set(L,S),S+=U}return D&&(D-=A+3),{data:F,pts:T,dts:x,len:D}}return null}function s(w,S){if(w.units.length&&w.frame){if(w.pts===void 0){var L=S.samples,D=L.length;if(D){var A=L[D-1];w.pts=A.pts,w.dts=A.dts}else{S.dropped++;return}}S.samples.push(w)}w.debug.length&&y.logger.log(w.pts+"/"+w.dts+":"+w.debug)}function a(w,S){var L=w.length;if(L>0){if(S.pts>=w[L-1].pts)w.push(S);else for(var D=L-1;D>=0;D--)if(S.pts<w[D].pts){w.splice(D,0,S);break}}else w.push(S)}function O(w){for(var S=w.byteLength,L=[],D=1;D<S-2;)w[D]===0&&w[D+1]===0&&w[D+2]===3?(L.push(D+2),D+=2):D++;if(L.length===0)return w;var A=S-L.length,T=new Uint8Array(A),x=0;for(D=0;D<A;x++,D++)x===L[0]&&(x++,L.shift()),T[D]=w[x];return T}G.default=u},"./src/errors.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"ErrorTypes",function(){return V}),P.d(G,"ErrorDetails",function(){return k});var V;(function(B){B.NETWORK_ERROR="networkError",B.MEDIA_ERROR="mediaError",B.KEY_SYSTEM_ERROR="keySystemError",B.MUX_ERROR="muxError",B.OTHER_ERROR="otherError"})(V||(V={}));var k;(function(B){B.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",B.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",B.KEY_SYSTEM_NO_SESSION="keySystemNoSession",B.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",B.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",B.MANIFEST_LOAD_ERROR="manifestLoadError",B.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",B.MANIFEST_PARSING_ERROR="manifestParsingError",B.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",B.LEVEL_EMPTY_ERROR="levelEmptyError",B.LEVEL_LOAD_ERROR="levelLoadError",B.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",B.LEVEL_SWITCH_ERROR="levelSwitchError",B.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",B.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",B.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",B.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",B.FRAG_LOAD_ERROR="fragLoadError",B.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",B.FRAG_DECRYPT_ERROR="fragDecryptError",B.FRAG_PARSING_ERROR="fragParsingError",B.REMUX_ALLOC_ERROR="remuxAllocError",B.KEY_LOAD_ERROR="keyLoadError",B.KEY_LOAD_TIMEOUT="keyLoadTimeOut",B.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",B.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",B.BUFFER_APPEND_ERROR="bufferAppendError",B.BUFFER_APPENDING_ERROR="bufferAppendingError",B.BUFFER_STALLED_ERROR="bufferStalledError",B.BUFFER_FULL_ERROR="bufferFullError",B.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",B.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",B.INTERNAL_EXCEPTION="internalException",B.INTERNAL_ABORTED="aborted",B.UNKNOWN="unknown"})(k||(k={}))},"./src/events.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"Events",function(){return V});var V;(function(k){k.MEDIA_ATTACHING="hlsMediaAttaching",k.MEDIA_ATTACHED="hlsMediaAttached",k.MEDIA_DETACHING="hlsMediaDetaching",k.MEDIA_DETACHED="hlsMediaDetached",k.BUFFER_RESET="hlsBufferReset",k.BUFFER_CODECS="hlsBufferCodecs",k.BUFFER_CREATED="hlsBufferCreated",k.BUFFER_APPENDING="hlsBufferAppending",k.BUFFER_APPENDED="hlsBufferAppended",k.BUFFER_EOS="hlsBufferEos",k.BUFFER_FLUSHING="hlsBufferFlushing",k.BUFFER_FLUSHED="hlsBufferFlushed",k.MANIFEST_LOADING="hlsManifestLoading",k.MANIFEST_LOADED="hlsManifestLoaded",k.MANIFEST_PARSED="hlsManifestParsed",k.LEVEL_SWITCHING="hlsLevelSwitching",k.LEVEL_SWITCHED="hlsLevelSwitched",k.LEVEL_LOADING="hlsLevelLoading",k.LEVEL_LOADED="hlsLevelLoaded",k.LEVEL_UPDATED="hlsLevelUpdated",k.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",k.LEVELS_UPDATED="hlsLevelsUpdated",k.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",k.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",k.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",k.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",k.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",k.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",k.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",k.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",k.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",k.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",k.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",k.CUES_PARSED="hlsCuesParsed",k.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",k.INIT_PTS_FOUND="hlsInitPtsFound",k.FRAG_LOADING="hlsFragLoading",k.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",k.FRAG_LOADED="hlsFragLoaded",k.FRAG_DECRYPTED="hlsFragDecrypted",k.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",k.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",k.FRAG_PARSING_METADATA="hlsFragParsingMetadata",k.FRAG_PARSED="hlsFragParsed",k.FRAG_BUFFERED="hlsFragBuffered",k.FRAG_CHANGED="hlsFragChanged",k.FPS_DROP="hlsFpsDrop",k.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",k.ERROR="hlsError",k.DESTROYING="hlsDestroying",k.KEY_LOADING="hlsKeyLoading",k.KEY_LOADED="hlsKeyLoaded",k.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",k.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return w});var V=P("./node_modules/url-toolkit/src/url-toolkit.js"),k=P.n(V),B=P("./src/loader/playlist-loader.ts"),z=P("./src/loader/key-loader.ts"),K=P("./src/controller/id3-track-controller.ts"),n=P("./src/controller/latency-controller.ts"),M=P("./src/controller/level-controller.ts"),y=P("./src/controller/fragment-tracker.ts"),m=P("./src/controller/stream-controller.ts"),g=P("./src/is-supported.ts"),u=P("./src/utils/logger.ts"),c=P("./src/config.ts"),f=P("./node_modules/eventemitter3/index.js"),o=P.n(f),l=P("./src/events.ts"),s=P("./src/errors.ts");function a(S,L){for(var D=0;D<L.length;D++){var A=L[D];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(S,A.key,A)}}function O(S,L,D){return L&&a(S.prototype,L),D&&a(S,D),S}var w=function(){S.isSupported=function(){return Object(g.isSupported)()};function S(D){D===void 0&&(D={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var A=this.config=Object(c.mergeConfig)(S.DefaultConfig,D);this.userConfig=D,Object(u.enableLogs)(A.debug),this._autoLevelCapping=-1,A.progressive&&Object(c.enableStreamingMode)(A);var T=A.abrController,x=A.bufferController,d=A.capLevelController,E=A.fpsController,p=this.abrController=new T(this),v=this.bufferController=new x(this),C=this.capLevelController=new d(this),F=new E(this),R=new B.default(this),j=new z.default(this),U=new K.default(this),b=this.levelController=new M.default(this),Q=new y.FragmentTracker(this),ee=this.streamController=new m.default(this,Q);C.setStreamController(ee),F.setStreamController(ee);var oe=[b,ee];this.networkControllers=oe;var fe=[R,j,p,v,C,F,U,Q];this.audioTrackController=this.createController(A.audioTrackController,null,oe),this.createController(A.audioStreamController,Q,oe),this.subtitleTrackController=this.createController(A.subtitleTrackController,null,oe),this.createController(A.subtitleStreamController,Q,oe),this.createController(A.timelineController,null,fe),this.emeController=this.createController(A.emeController,null,fe),this.cmcdController=this.createController(A.cmcdController,null,fe),this.latencyController=this.createController(n.default,null,fe),this.coreComponents=fe}var L=S.prototype;return L.createController=function(A,T,x){if(A){var d=T?new A(this,T):new A(this);return x&&x.push(d),d}return null},L.on=function(A,T,x){x===void 0&&(x=this),this._emitter.on(A,T,x)},L.once=function(A,T,x){x===void 0&&(x=this),this._emitter.once(A,T,x)},L.removeAllListeners=function(A){this._emitter.removeAllListeners(A)},L.off=function(A,T,x,d){x===void 0&&(x=this),this._emitter.off(A,T,x,d)},L.listeners=function(A){return this._emitter.listeners(A)},L.emit=function(A,T,x){return this._emitter.emit(A,T,x)},L.trigger=function(A,T){if(this.config.debug)return this.emit(A,A,T);try{return this.emit(A,A,T)}catch(x){u.logger.error("An internal error happened while handling event "+A+'. Error message: "'+x.message+'". Here is a stacktrace:',x),this.trigger(l.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:A,error:x})}return!1},L.listenerCount=function(A){return this._emitter.listenerCount(A)},L.destroy=function(){u.logger.log("destroy"),this.trigger(l.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(A){return A.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(A){return A.destroy()}),this.coreComponents.length=0},L.attachMedia=function(A){u.logger.log("attachMedia"),this._media=A,this.trigger(l.Events.MEDIA_ATTACHING,{media:A})},L.detachMedia=function(){u.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(A){this.stopLoad();var T=this.media,x=this.url,d=this.url=V.buildAbsoluteURL(self.location.href,A,{alwaysNormalize:!0});u.logger.log("loadSource:"+d),T&&x&&x!==d&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(T)),this.trigger(l.Events.MANIFEST_LOADING,{url:A})},L.startLoad=function(A){A===void 0&&(A=-1),u.logger.log("startLoad("+A+")"),this.networkControllers.forEach(function(T){T.startLoad(A)})},L.stopLoad=function(){u.logger.log("stopLoad"),this.networkControllers.forEach(function(A){A.stopLoad()})},L.swapAudioCodec=function(){u.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){u.logger.log("recoverMediaError");var A=this._media;this.detachMedia(),A&&this.attachMedia(A)},L.removeLevel=function(A,T){T===void 0&&(T=0),this.levelController.removeLevel(A,T)},O(S,[{key:"levels",get:function(){var A=this.levelController.levels;return A||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(A){u.logger.log("set currentLevel:"+A),this.loadLevel=A,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(A){u.logger.log("set nextLevel:"+A),this.levelController.manualLevel=A,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(A){u.logger.log("set loadLevel:"+A),this.levelController.manualLevel=A}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(A){this.levelController.nextLoadLevel=A}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(A){u.logger.log("set firstLevel:"+A),this.levelController.firstLevel=A}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(A){u.logger.log("set startLevel:"+A),A!==-1&&(A=Math.max(A,this.minAutoLevel)),this.levelController.startLevel=A}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(A){var T=!!A;T!==this.config.capLevelToPlayerSize&&(T?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=T)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(A){this._autoLevelCapping!==A&&(u.logger.log("set autoLevelCapping:"+A),this._autoLevelCapping=A)}},{key:"bandwidthEstimate",get:function(){var A=this.abrController.bwEstimator;return A?A.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var A=this.levels,T=this.config.minAutoBitrate;if(!A)return 0;for(var x=A.length,d=0;d<x;d++)if(A[d].maxBitrate>T)return d;return 0}},{key:"maxAutoLevel",get:function(){var A=this.levels,T=this.autoLevelCapping,x;return T===-1&&A&&A.length?x=A.length-1:x=T,x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(A){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,A)}},{key:"audioTracks",get:function(){var A=this.audioTrackController;return A?A.audioTracks:[]}},{key:"audioTrack",get:function(){var A=this.audioTrackController;return A?A.audioTrack:-1},set:function(A){var T=this.audioTrackController;T&&(T.audioTrack=A)}},{key:"subtitleTracks",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var A=this.subtitleTrackController;return A?A.subtitleTrack:-1},set:function(A){var T=this.subtitleTrackController;T&&(T.subtitleTrack=A)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var A=this.subtitleTrackController;return A?A.subtitleDisplay:!1},set:function(A){var T=this.subtitleTrackController;T&&(T.subtitleDisplay=A)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(A){this.config.lowLatencyMode=A}},{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 l.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return S.defaultConfig?S.defaultConfig:c.hlsDefaultConfig},set:function(A){S.defaultConfig=A}}]),S}();w.defaultConfig=void 0},"./src/is-supported.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"isSupported",function(){return B}),P.d(G,"changeTypeSupported",function(){return z});var V=P("./src/utils/mediasource-helper.ts");function k(){return self.SourceBuffer||self.WebKitSourceBuffer}function B(){var K=Object(V.getMediaSource)();if(!K)return!1;var n=k(),M=K&&typeof K.isTypeSupported=="function"&&K.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),y=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!M&&!!y}function z(){var K,n=k();return typeof(n==null||((K=n.prototype)===null||K===void 0)?void 0:K.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return u}),P.d(G,"LoadError",function(){return f});var V=P("./src/polyfills/number.ts"),k=P("./src/errors.ts");function B(o,l){o.prototype=Object.create(l.prototype),o.prototype.constructor=o,y(o,l)}function z(o){var l=typeof Map=="function"?new Map:void 0;return z=function(a){if(a===null||!M(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(a))return l.get(a);l.set(a,O)}function O(){return K(a,arguments,m(this).constructor)}return O.prototype=Object.create(a.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),y(O,a)},z(o)}function K(o,l,s){return n()?K=Reflect.construct:K=function(O,w,S){var L=[null];L.push.apply(L,w);var D=Function.bind.apply(O,L),A=new D;return S&&y(A,S.prototype),A},K.apply(null,arguments)}function n(){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(o){return!1}}function M(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function y(o,l){return y=Object.setPrototypeOf||function(a,O){return a.__proto__=O,a},y(o,l)}function m(o){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(o)}var g=Math.pow(2,17),u=function(){function o(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var l=o.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(a,O){var w=this,S=a.url;if(!S)return Promise.reject(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(S?"part list":"url")));this.abort();var L=this.config,D=L.fLoader,A=L.loader;return new Promise(function(T,x){w.loader&&w.loader.destroy();var d=w.loader=a.loader=D?new D(L):new A(L),E=c(a),p={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};a.stats=d.stats,d.load(E,p,{onSuccess:function(C,F,R,j){w.resetLoader(a,d),T({frag:a,part:null,payload:C.data,networkDetails:j})},onError:function(C,F,R){w.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:C,networkDetails:R}))},onAbort:function(C,F,R){w.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:R}))},onTimeout:function(C,F,R){w.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:R}))},onProgress:function(C,F,R,j){O&&O({frag:a,part:null,payload:R,networkDetails:j})}})})},l.loadPart=function(a,O,w){var S=this;this.abort();var L=this.config,D=L.fLoader,A=L.loader;return new Promise(function(T,x){S.loader&&S.loader.destroy();var d=S.loader=a.loader=D?new D(L):new A(L),E=c(a,O),p={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};O.stats=d.stats,d.load(E,p,{onSuccess:function(C,F,R,j){S.resetLoader(a,d),S.updateStatsFromPart(a,O);var U={frag:a,part:O,payload:C.data,networkDetails:j};w(U),T(U)},onError:function(C,F,R){S.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:O,response:C,networkDetails:R}))},onAbort:function(C,F,R){a.stats.aborted=O.stats.aborted,S.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:O,networkDetails:R}))},onTimeout:function(C,F,R){S.resetLoader(a,d),x(new f({type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:O,networkDetails:R}))}})})},l.updateStatsFromPart=function(a,O){var w=a.stats,S=O.stats,L=S.total;if(w.loaded+=S.loaded,L){var D=Math.round(a.duration/O.duration),A=Math.min(Math.round(w.loaded/L),D),T=D-A,x=T*Math.round(w.loaded/A);w.total=w.loaded+x}else w.total=Math.max(w.loaded,w.total);var d=w.loading,E=S.loading;d.start?d.first+=E.first-E.start:(d.start=E.start,d.first=E.first),d.end=E.end},l.resetLoader=function(a,O){a.loader=null,this.loader===O&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),O.destroy()},o}();function c(o,l){l===void 0&&(l=null);var s=l||o,a={frag:o,part:l,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},O=s.byteRangeStartOffset,w=s.byteRangeEndOffset;return Object(V.isFiniteNumber)(O)&&Object(V.isFiniteNumber)(w)&&(a.rangeStart=O,a.rangeEnd=w),a}var f=function(o){B(l,o);function l(s){for(var a,O=arguments.length,w=new Array(O>1?O-1:0),S=1;S<O;S++)w[S-1]=arguments[S];return a=o.call.apply(o,[this].concat(w))||this,a.data=void 0,a.data=s,a}return l}(z(Error))},"./src/loader/fragment.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"ElementaryStreamTypes",function(){return u}),P.d(G,"BaseSegment",function(){return c}),P.d(G,"Fragment",function(){return f}),P.d(G,"Part",function(){return o});var V=P("./src/polyfills/number.ts"),k=P("./node_modules/url-toolkit/src/url-toolkit.js"),B=P.n(k),z=P("./src/utils/logger.ts"),K=P("./src/loader/level-key.ts"),n=P("./src/loader/load-stats.ts");function M(l,s){l.prototype=Object.create(s.prototype),l.prototype.constructor=l,y(l,s)}function y(l,s){return y=Object.setPrototypeOf||function(O,w){return O.__proto__=w,O},y(l,s)}function m(l,s){for(var a=0;a<s.length;a++){var O=s[a];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(l,O.key,O)}}function g(l,s,a){return s&&m(l.prototype,s),a&&m(l,a),l}var u;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(u||(u={}));var c=function(){function l(a){var O;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(O={},O[u.AUDIO]=null,O[u.VIDEO]=null,O[u.AUDIOVIDEO]=null,O),this.baseurl=a}var s=l.prototype;return s.setByteRange=function(O,w){var S=O.split("@",2),L=[];S.length===1?L[0]=w?w.byteRangeEndOffset:0:L[0]=parseInt(S[1]),L[1]=parseInt(S[0])+L[0],this._byteRange=L},g(l,[{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(k.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(O){this._url=O}}]),l}(),f=function(l){M(s,l);function s(O,w){var S;return S=l.call(this,w)||this,S._decryptdata=null,S.rawProgramDateTime=null,S.programDateTime=null,S.tagList=[],S.duration=0,S.sn=0,S.levelkey=void 0,S.type=void 0,S.loader=null,S.level=-1,S.cc=0,S.startPTS=void 0,S.endPTS=void 0,S.appendedPTS=void 0,S.startDTS=void 0,S.endDTS=void 0,S.start=0,S.deltaPTS=void 0,S.maxStartPTS=void 0,S.minEndPTS=void 0,S.stats=new n.LoadStats,S.urlId=0,S.data=void 0,S.bitrateTest=!1,S.title=null,S.initSegment=null,S.type=O,S}var a=s.prototype;return a.createInitializationVector=function(w){for(var S=new Uint8Array(16),L=12;L<16;L++)S[L]=w>>8*(15-L)&255;return S},a.setDecryptDataFromLevelKey=function(w,S){var L=w;return(w==null?void 0:w.method)==="AES-128"&&w.uri&&!w.iv&&(L=K.LevelKey.fromURI(w.uri),L.method=w.method,L.iv=this.createInitializationVector(S),L.keyFormat="identity"),L},a.setElementaryStreamInfo=function(w,S,L,D,A,T){T===void 0&&(T=!1);var x=this.elementaryStreams,d=x[w];if(!d){x[w]={startPTS:S,endPTS:L,startDTS:D,endDTS:A,partial:T};return}d.startPTS=Math.min(d.startPTS,S),d.endPTS=Math.max(d.endPTS,L),d.startDTS=Math.min(d.startDTS,D),d.endDTS=Math.max(d.endDTS,A)},a.clearElementaryStreamInfo=function(){var w=this.elementaryStreams;w[u.AUDIO]=null,w[u.VIDEO]=null,w[u.AUDIOVIDEO]=null},g(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var w=this.sn;typeof w!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&z.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),w=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,w)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var w=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+w*1e3}},{key:"encrypted",get:function(){var w;return!!((w=this.decryptdata)!==null&&w!==void 0&&w.keyFormat&&this.decryptdata.uri)}}]),s}(c),o=function(l){M(s,l);function s(a,O,w,S,L){var D;D=l.call(this,w)||this,D.fragOffset=0,D.duration=0,D.gap=!1,D.independent=!1,D.relurl=void 0,D.fragment=void 0,D.index=void 0,D.stats=new n.LoadStats,D.duration=a.decimalFloatingPoint("DURATION"),D.gap=a.bool("GAP"),D.independent=a.bool("INDEPENDENT"),D.relurl=a.enumeratedString("URI"),D.fragment=O,D.index=S;var A=a.enumeratedString("BYTERANGE");return A&&D.setByteRange(A,L),L&&(D.fragOffset=L.fragOffset+L.duration),D}return g(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 O=this.elementaryStreams;return!!(O.audio||O.video||O.audiovideo)}}]),s}(c)},"./src/loader/key-loader.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return z});var V=P("./src/events.ts"),k=P("./src/errors.ts"),B=P("./src/utils/logger.ts"),z=function(){function K(M){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=M,this._registerListeners()}var n=K.prototype;return n._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var y in this.loaders){var m=this.loaders[y];m&&m.destroy()}this.loaders={}},n.onKeyLoading=function(y,m){var g=m.frag,u=g.type,c=this.loaders[u];if(!g.decryptdata){B.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=g.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(c&&(B.logger.warn("abort previous key loader for type:"+u),c.abort()),!f){B.logger.warn("key uri is falsy");return}var l=o.loader,s=g.loader=this.loaders[u]=new l(o);this.decrypturl=f,this.decryptkey=null;var a={url:f,frag:g,responseType:"arraybuffer"},O={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},w={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,O,w)}else this.decryptkey&&(g.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:g}))},n.loadsuccess=function(y,m,g){var u=g.frag;if(!u.decryptdata){B.logger.error("after key load, decryptdata unset");return}this.decryptkey=u.decryptdata.key=new Uint8Array(y.data),u.loader=null,delete this.loaders[u.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:u})},n.loaderror=function(y,m){var g=m.frag,u=g.loader;u&&u.abort(),delete this.loaders[g.type],this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:g,response:y})},n.loadtimeout=function(y,m){var g=m.frag,u=g.loader;u&&u.abort(),delete this.loaders[g.type],this.hls.trigger(V.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:g})},K}()},"./src/loader/level-details.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"LevelDetails",function(){return K});var V=P("./src/polyfills/number.ts");function k(n,M){for(var y=0;y<M.length;y++){var m=M[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function B(n,M,y){return M&&k(n.prototype,M),y&&k(n,y),n}var z=10,K=function(){function n(y){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=y}var M=n.prototype;return M.reloaded=function(m){if(!m){this.advanced=!0,this.updated=!0;return}var g=this.lastPartSn-m.lastPartSn,u=this.lastPartIndex-m.lastPartIndex;this.updated=this.endSN!==m.endSN||!!u||!!g,this.advanced=this.endSN>m.endSN||g>0||g===0&&u>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},B(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||z}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var g=this.driftEnd-this.driftStart;return g*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.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 m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"LevelKey",function(){return K});var V=P("./node_modules/url-toolkit/src/url-toolkit.js"),k=P.n(V);function B(n,M){for(var y=0;y<M.length;y++){var m=M[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function z(n,M,y){return M&&B(n.prototype,M),y&&B(n,y),n}var K=function(){n.fromURL=function(y,m){return new n(y,m)},n.fromURI=function(y){return new n(y)};function n(M,y){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,y?this._uri=Object(V.buildAbsoluteURL)(M,y,{alwaysNormalize:!0}):this._uri=M}return z(n,[{key:"uri",get:function(){return this._uri}}]),n}()},"./src/loader/load-stats.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"LoadStats",function(){return V});var V=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(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return s});var V=P("./src/polyfills/number.ts"),k=P("./node_modules/url-toolkit/src/url-toolkit.js"),B=P.n(k),z=P("./src/loader/fragment.ts"),K=P("./src/loader/level-details.ts"),n=P("./src/loader/level-key.ts"),M=P("./src/utils/attr-list.ts"),y=P("./src/utils/logger.ts"),m=P("./src/utils/codecs.ts"),g=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,u=/#EXT-X-MEDIA:(.*)/g,c=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function l(L){var D,A;return o.test((D=(A=k.parseURL(L))===null||A===void 0?void 0:A.path)!=null?D:"")}var s=function(){function L(){}return L.findGroup=function(A,T){for(var x=0;x<A.length;x++){var d=A[x];if(d.id===T)return d}},L.convertAVC1ToAVCOTI=function(A){var T=A.split(".");if(T.length>2){var x=T.shift()+".";return x+=parseInt(T.shift()).toString(16),x+=("000"+parseInt(T.shift()).toString(16)).substr(-4),x}return A},L.resolve=function(A,T){return k.buildAbsoluteURL(T,A,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(A,T){var x=[],d={},E=!1;g.lastIndex=0;for(var p;(p=g.exec(A))!=null;)if(p[1]){var v=new M.AttrList(p[1]),C={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(p[2],T)},F=v.decimalResolution("RESOLUTION");F&&(C.width=F.width,C.height=F.height),a((v.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),C),C.videoCodec&&C.videoCodec.indexOf("avc1")!==-1&&(C.videoCodec=L.convertAVC1ToAVCOTI(C.videoCodec)),x.push(C)}else if(p[3]){var R=new M.AttrList(p[3]);R["DATA-ID"]&&(E=!0,d[R["DATA-ID"]]=R)}return{levels:x,sessionData:E?d:null}},L.parseMasterPlaylistMedia=function(A,T,x,d){d===void 0&&(d=[]);var E,p=[],v=0;for(u.lastIndex=0;(E=u.exec(A))!==null;){var C=new M.AttrList(E[1]);if(C.TYPE===x){var F={attrs:C,bitrate:0,id:v++,groupId:C["GROUP-ID"],instreamId:C["INSTREAM-ID"],name:C.NAME||C.LANGUAGE||"",type:x,default:C.bool("DEFAULT"),autoselect:C.bool("AUTOSELECT"),forced:C.bool("FORCED"),lang:C.LANGUAGE,url:C.URI?L.resolve(C.URI,T):""};if(d.length){var R=L.findGroup(d,F.groupId)||d[0];O(F,R,"audioCodec"),O(F,R,"textCodec")}p.push(F)}}return p},L.parseLevelPlaylist=function(A,T,x,d,E){var p=new K.LevelDetails(T),v=p.fragments,C=null,F=0,R=0,j=0,U=0,b=null,Q=new z.Fragment(d,T),ee,oe,fe,Fe=-1,Le=!1;for(c.lastIndex=0,p.m3u8=A;(ee=c.exec(A))!==null;){Le&&(Le=!1,Q=new z.Fragment(d,T),Q.start=j,Q.sn=F,Q.cc=U,Q.level=x,C&&(Q.initSegment=C,Q.rawProgramDateTime=C.rawProgramDateTime));var Ie=ee[1];if(Ie){Q.duration=parseFloat(Ie);var Be=(" "+ee[2]).slice(1);Q.title=Be||null,Q.tagList.push(Be?["INF",Ie,Be]:["INF",Ie])}else if(ee[3])Object(V.isFiniteNumber)(Q.duration)&&(Q.start=j,fe&&(Q.levelkey=fe),Q.sn=F,Q.level=x,Q.cc=U,Q.urlId=E,v.push(Q),Q.relurl=(" "+ee[3]).slice(1),S(Q,b),b=Q,j+=Q.duration,F++,R=0,Le=!0);else if(ee[4]){var We=(" "+ee[4]).slice(1);b?Q.setByteRange(We,b):Q.setByteRange(We)}else if(ee[5])Q.rawProgramDateTime=(" "+ee[5]).slice(1),Q.tagList.push(["PROGRAM-DATE-TIME",Q.rawProgramDateTime]),Fe===-1&&(Fe=v.length);else{if(ee=ee[0].match(f),!ee){y.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ee.length&&!(typeof ee[oe]!="undefined");oe++);var ge=(" "+ee[oe]).slice(1),ue=(" "+ee[oe+1]).slice(1),ke=ee[oe+2]?(" "+ee[oe+2]).slice(1):"";switch(ge){case"PLAYLIST-TYPE":p.type=ue.toUpperCase();break;case"MEDIA-SEQUENCE":F=p.startSN=parseInt(ue);break;case"SKIP":{var lt=new M.AttrList(ue),ot=lt.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(ot)){p.skippedSegments=ot;for(var ut=ot;ut--;)v.unshift(null);F+=ot}var xt=lt.enumeratedString("RECENTLY-REMOVED-DATERANGES");xt&&(p.recentlyRemovedDateranges=xt.split(" "));break}case"TARGETDURATION":p.targetduration=parseFloat(ue);break;case"VERSION":p.version=parseInt(ue);break;case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(ue||ke)&&Q.tagList.push(ke?[ue,ke]:[ue]);break;case"DIS":U++;case"GAP":Q.tagList.push([ge]);break;case"BITRATE":Q.tagList.push([ge,ue]);break;case"DISCONTINUITY-SEQ":U=parseInt(ue);break;case"KEY":{var Je,et=new M.AttrList(ue),dt=et.enumeratedString("METHOD"),de=et.URI,Ce=et.hexadecimalInteger("IV"),Ue=et.enumeratedString("KEYFORMATVERSIONS"),Ke=et.enumeratedString("KEYID"),st=(Je=et.enumeratedString("KEYFORMAT"))!=null?Je:"identity",ht=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ht.indexOf(st)>-1){y.logger.warn("Keyformat "+st+" is not supported from the manifest");continue}else if(st!=="identity")continue;dt&&(fe=n.LevelKey.fromURL(T,de),de&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(dt)>=0&&(fe.method=dt,fe.keyFormat=st,Ke&&(fe.keyID=Ke),Ue&&(fe.keyFormatVersions=Ue),fe.iv=Ce));break}case"START":{var yt=new M.AttrList(ue),mt=yt.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(mt)&&(p.startTimeOffset=mt);break}case"MAP":{var Ot=new M.AttrList(ue);Q.relurl=Ot.URI,Ot.BYTERANGE&&Q.setByteRange(Ot.BYTERANGE),Q.level=x,Q.sn="initSegment",fe&&(Q.levelkey=fe),Q.initSegment=null,C=Q,Le=!0;break}case"SERVER-CONTROL":{var Tt=new M.AttrList(ue);p.canBlockReload=Tt.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=Tt.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&Tt.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=Tt.optionalFloat("PART-HOLD-BACK",0),p.holdBack=Tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Et=new M.AttrList(ue);p.partTarget=Et.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Qe=p.partList;Qe||(Qe=p.partList=[]);var Kt=R>0?Qe[Qe.length-1]:void 0,Ut=R++,qe=new z.Part(new M.AttrList(ue),Q,T,Ut,Kt);Qe.push(qe),Q.duration+=qe.duration;break}case"PRELOAD-HINT":{var tt=new M.AttrList(ue);p.preloadHint=tt;break}case"RENDITION-REPORT":{var Re=new M.AttrList(ue);p.renditionReports=p.renditionReports||[],p.renditionReports.push(Re);break}default:y.logger.warn("line parsed but not handled: "+ee);break}}}b&&!b.relurl?(v.pop(),j-=b.duration,p.partList&&(p.fragmentHint=b)):p.partList&&(S(Q,b),Q.cc=U,p.fragmentHint=Q);var Te=v.length,Se=v[0],te=v[Te-1];if(j+=p.skippedSegments*p.targetduration,j>0&&Te&&te){p.averagetargetduration=j/Te;var se=te.sn;p.endSN=se!=="initSegment"?se:0,Se&&(p.startCC=Se.cc,Se.initSegment||p.fragments.every(function(he){return he.relurl&&l(he.relurl)})&&(y.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Q=new z.Fragment(d,T),Q.relurl=te.relurl,Q.level=x,Q.sn="initSegment",Se.initSegment=Q,p.needSidxRanges=!0))}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(j+=p.fragmentHint.duration),p.totalduration=j,p.endCC=U,Fe>0&&w(v,Fe),p},L}();function a(L,D){["video","audio","text"].forEach(function(A){var T=L.filter(function(d){return Object(m.isCodecType)(d,A)});if(T.length){var x=T.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});D[A+"Codec"]=x.length>0?x[0]:T[0],L=L.filter(function(d){return T.indexOf(d)===-1})}}),D.unknownCodecs=L}function O(L,D,A){var T=D[A];T&&(L[A]=T)}function w(L,D){for(var A=L[D],T=D;T--;){var x=L[T];if(!x)return;x.programDateTime=A.programDateTime-x.duration*1e3,A=x}}function S(L,D){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):D!=null&&D.programDateTime&&(L.programDateTime=D.endProgramDateTime),Object(V.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/polyfills/number.ts"),k=P("./src/events.ts"),B=P("./src/errors.ts"),z=P("./src/utils/logger.ts"),K=P("./src/utils/mp4-tools.ts"),n=P("./src/loader/m3u8-parser.ts"),M=P("./src/types/loader.ts"),y=P("./src/utils/attr-list.ts");function m(c){var f=c.type;switch(f){case M.PlaylistContextType.AUDIO_TRACK:return M.PlaylistLevelType.AUDIO;case M.PlaylistContextType.SUBTITLE_TRACK:return M.PlaylistLevelType.SUBTITLE;default:return M.PlaylistLevelType.MAIN}}function g(c,f){var o=c.url;return(o===void 0||o.indexOf("data:")===0)&&(o=f.url),o}var u=function(){function c(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var f=c.prototype;return f.registerListeners=function(){var l=this.hls;l.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(k.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(k.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(k.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var l=this.hls;l.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(k.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(k.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(k.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(l){var s=this.hls.config,a=s.pLoader,O=s.loader,w=a||O,S=new w(s);return l.loader=S,this.loaders[l.type]=S,S},f.getInternalLoader=function(l){return this.loaders[l.type]},f.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},f.destroyInternalLoaders=function(){for(var l in this.loaders){var s=this.loaders[l];s&&s.destroy(),this.resetInternalLoader(l)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(l,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:M.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},f.onLevelLoading=function(l,s){var a=s.id,O=s.level,w=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:null,level:O,responseType:"text",type:M.PlaylistContextType.LEVEL,url:w,deliveryDirectives:S})},f.onAudioTrackLoading=function(l,s){var a=s.id,O=s.groupId,w=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:M.PlaylistContextType.AUDIO_TRACK,url:w,deliveryDirectives:S})},f.onSubtitleTrackLoading=function(l,s){var a=s.id,O=s.groupId,w=s.url,S=s.deliveryDirectives;this.load({id:a,groupId:O,level:null,responseType:"text",type:M.PlaylistContextType.SUBTITLE_TRACK,url:w,deliveryDirectives:S})},f.load=function(l){var s,a=this.hls.config,O=this.getInternalLoader(l);if(O){var w=O.context;if(w&&w.url===l.url){z.logger.trace("[playlist-loader]: playlist request ongoing");return}z.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),O.abort()}var S,L,D,A;switch(l.type){case M.PlaylistContextType.MANIFEST:S=a.manifestLoadingMaxRetry,L=a.manifestLoadingTimeOut,D=a.manifestLoadingRetryDelay,A=a.manifestLoadingMaxRetryTimeout;break;case M.PlaylistContextType.LEVEL:case M.PlaylistContextType.AUDIO_TRACK:case M.PlaylistContextType.SUBTITLE_TRACK:S=0,L=a.levelLoadingTimeOut;break;default:S=a.levelLoadingMaxRetry,L=a.levelLoadingTimeOut,D=a.levelLoadingRetryDelay,A=a.levelLoadingMaxRetryTimeout;break}if(O=this.createInternalLoader(l),(s=l.deliveryDirectives)!==null&&s!==void 0&&s.part){var T;if(l.type===M.PlaylistContextType.LEVEL&&l.level!==null?T=this.hls.levels[l.level].details:l.type===M.PlaylistContextType.AUDIO_TRACK&&l.id!==null?T=this.hls.audioTracks[l.id].details:l.type===M.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(T=this.hls.subtitleTracks[l.id].details),T){var x=T.partTarget,d=T.targetduration;x&&d&&(L=Math.min(Math.max(x*3,d*.8)*1e3,L))}}var E={timeout:L,maxRetry:S,retryDelay:D,maxRetryDelay:A,highWaterMark:0},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};O.load(l,E,p)},f.loadsuccess=function(l,s,a,O){if(O===void 0&&(O=null),a.isSidxRequest){this.handleSidxRequest(l,a),this.handlePlaylistLoaded(l,s,a,O);return}this.resetInternalLoader(a.type);var w=l.data;if(w.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,a,"no EXTM3U delimiter",O);return}s.parsing.start=performance.now(),w.indexOf("#EXTINF:")>0||w.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,s,a,O):this.handleMasterPlaylist(l,s,a,O)},f.loaderror=function(l,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,l)},f.loadtimeout=function(l,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},f.handleMasterPlaylist=function(l,s,a,O){var w=this.hls,S=l.data,L=g(l,a),D=n.default.parseMasterPlaylist(S,L),A=D.levels,T=D.sessionData;if(!A.length){this.handleManifestParsingError(l,a,"no level found in manifest",O);return}var x=A.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),d=A.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),E=n.default.parseMasterPlaylistMedia(S,L,"AUDIO",x),p=n.default.parseMasterPlaylistMedia(S,L,"SUBTITLES",d),v=n.default.parseMasterPlaylistMedia(S,L,"CLOSED-CAPTIONS");if(E.length){var C=E.some(function(F){return!F.url});!C&&A[0].audioCodec&&!A[0].attrs.AUDIO&&(z.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),E.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new y.AttrList({}),bitrate:0,url:""}))}w.trigger(k.Events.MANIFEST_LOADED,{levels:A,audioTracks:E,subtitles:p,captions:v,url:L,stats:s,networkDetails:O,sessionData:T})},f.handleTrackOrLevelPlaylist=function(l,s,a,O){var w=this.hls,S=a.id,L=a.level,D=a.type,A=g(l,a),T=Object(V.isFiniteNumber)(S)?S:0,x=Object(V.isFiniteNumber)(L)?L:T,d=m(a),E=n.default.parseLevelPlaylist(l.data,A,x,d,T);if(!E.fragments.length){w.trigger(k.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:A,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(D===M.PlaylistContextType.MANIFEST){var p={attrs:new y.AttrList({}),bitrate:0,details:E,name:"",url:A};w.trigger(k.Events.MANIFEST_LOADED,{levels:[p],audioTracks:[],url:A,stats:s,networkDetails:O,sessionData:null})}if(s.parsing.end=performance.now(),E.needSidxRanges){var v,C=(v=E.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:C,isSidxRequest:!0,type:D,level:L,levelDetails:E,id:S,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=E,this.handlePlaylistLoaded(l,s,a,O)},f.handleSidxRequest=function(l,s){var a=Object(K.parseSegmentIndex)(new Uint8Array(l.data));if(!a)return;var O=a.references,w=s.levelDetails;O.forEach(function(S,L){var D=S.info,A=w.fragments[L];A.byteRange.length===0&&A.setByteRange(String(1+D.end-D.start)+"@"+String(D.start)),A.initSegment&&A.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(l,s,a,O){this.hls.trigger(k.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===M.PlaylistContextType.MANIFEST,url:l.url,reason:a,response:l,context:s,networkDetails:O})},f.handleNetworkError=function(l,s,a,O){a===void 0&&(a=!1),z.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var w=B.ErrorDetails.UNKNOWN,S=!1,L=this.getInternalLoader(l);switch(l.type){case M.PlaylistContextType.MANIFEST:w=a?B.ErrorDetails.MANIFEST_LOAD_TIMEOUT:B.ErrorDetails.MANIFEST_LOAD_ERROR,S=!0;break;case M.PlaylistContextType.LEVEL:w=a?B.ErrorDetails.LEVEL_LOAD_TIMEOUT:B.ErrorDetails.LEVEL_LOAD_ERROR,S=!1;break;case M.PlaylistContextType.AUDIO_TRACK:w=a?B.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:B.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,S=!1;break;case M.PlaylistContextType.SUBTITLE_TRACK:w=a?B.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:B.ErrorDetails.SUBTITLE_LOAD_ERROR,S=!1;break}L&&this.resetInternalLoader(l.type);var D={type:B.ErrorTypes.NETWORK_ERROR,details:w,fatal:S,url:l.url,loader:L,context:l,networkDetails:s};O&&(D.response=O),this.hls.trigger(k.Events.ERROR,D)},f.handlePlaylistLoaded=function(l,s,a,O){var w=a.type,S=a.level,L=a.id,D=a.groupId,A=a.loader,T=a.levelDetails,x=a.deliveryDirectives;if(!(T!=null&&T.targetduration)){this.handleManifestParsingError(l,a,"invalid target duration",O);return}if(!A)return;T.live&&(A.getCacheAge&&(T.ageHeader=A.getCacheAge()||0),(!A.getCacheAge||isNaN(T.ageHeader))&&(T.ageHeader=0));switch(w){case M.PlaylistContextType.MANIFEST:case M.PlaylistContextType.LEVEL:this.hls.trigger(k.Events.LEVEL_LOADED,{details:T,level:S||0,id:L||0,stats:s,networkDetails:O,deliveryDirectives:x});break;case M.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(k.Events.AUDIO_TRACK_LOADED,{details:T,id:L||0,groupId:D||"",stats:s,networkDetails:O,deliveryDirectives:x});break;case M.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(k.Events.SUBTITLE_TRACK_LOADED,{details:T,id:L||0,groupId:D||"",stats:s,networkDetails:O,deliveryDirectives:x});break}},c}();G.default=u},"./src/polyfills/number.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"isFiniteNumber",function(){return V}),P.d(G,"MAX_SAFE_INTEGER",function(){return k});var V=Number.isFinite||function(B){return typeof B=="number"&&isFinite(B)},k=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ie,G,P){"use strict";P.r(G);var V=function(){function k(){}return k.getSilentFrame=function(z,K){switch(z){case"mp4a.40.2":if(K===1)return new Uint8Array([0,200,0,128,35,128]);if(K===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(K===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(K===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(K===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(K===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(K===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(K===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(K===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},k}();G.default=V},"./src/remux/mp4-generator.ts":function(ie,G,P){"use strict";P.r(G);var V=Math.pow(2,32)-1,k=function(){function B(){}return B.init=function(){B.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var K;for(K in B.types)B.types.hasOwnProperty(K)&&(B.types[K]=[K.charCodeAt(0),K.charCodeAt(1),K.charCodeAt(2),K.charCodeAt(3)]);var n=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]),M=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);B.HDLR_TYPES={video:n,audio:M};var y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);B.STTS=B.STSC=B.STCO=m,B.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),B.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),B.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var g=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);B.FTYP=B.box(B.types.ftyp,g,c,g,u),B.DINF=B.box(B.types.dinf,B.box(B.types.dref,y))},B.box=function(K){for(var n=8,M=arguments.length,y=new Array(M>1?M-1:0),m=1;m<M;m++)y[m-1]=arguments[m];for(var g=y.length,u=g;g--;)n+=y[g].byteLength;var c=new Uint8Array(n);for(c[0]=n>>24&255,c[1]=n>>16&255,c[2]=n>>8&255,c[3]=n&255,c.set(K,4),g=0,n=8;g<u;g++)c.set(y[g],n),n+=y[g].byteLength;return c},B.hdlr=function(K){return B.box(B.types.hdlr,B.HDLR_TYPES[K])},B.mdat=function(K){return B.box(B.types.mdat,K)},B.mdhd=function(K,n){n*=K;var M=Math.floor(n/(V+1)),y=Math.floor(n%(V+1));return B.box(B.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,K>>24&255,K>>16&255,K>>8&255,K&255,M>>24,M>>16&255,M>>8&255,M&255,y>>24,y>>16&255,y>>8&255,y&255,85,196,0,0]))},B.mdia=function(K){return B.box(B.types.mdia,B.mdhd(K.timescale,K.duration),B.hdlr(K.type),B.minf(K))},B.mfhd=function(K){return B.box(B.types.mfhd,new Uint8Array([0,0,0,0,K>>24,K>>16&255,K>>8&255,K&255]))},B.minf=function(K){return K.type==="audio"?B.box(B.types.minf,B.box(B.types.smhd,B.SMHD),B.DINF,B.stbl(K)):B.box(B.types.minf,B.box(B.types.vmhd,B.VMHD),B.DINF,B.stbl(K))},B.moof=function(K,n,M){return B.box(B.types.moof,B.mfhd(K),B.traf(M,n))},B.moov=function(K){for(var n=K.length,M=[];n--;)M[n]=B.trak(K[n]);return B.box.apply(null,[B.types.moov,B.mvhd(K[0].timescale,K[0].duration)].concat(M).concat(B.mvex(K)))},B.mvex=function(K){for(var n=K.length,M=[];n--;)M[n]=B.trex(K[n]);return B.box.apply(null,[B.types.mvex].concat(M))},B.mvhd=function(K,n){n*=K;var M=Math.floor(n/(V+1)),y=Math.floor(n%(V+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,K>>24&255,K>>16&255,K>>8&255,K&255,M>>24,M>>16&255,M>>8&255,M&255,y>>24,y>>16&255,y>>8&255,y&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return B.box(B.types.mvhd,m)},B.sdtp=function(K){var n=K.samples||[],M=new Uint8Array(4+n.length),y,m;for(y=0;y<n.length;y++)m=n[y].flags,M[y+4]=m.dependsOn<<4|m.isDependedOn<<2|m.hasRedundancy;return B.box(B.types.sdtp,M)},B.stbl=function(K){return B.box(B.types.stbl,B.stsd(K),B.box(B.types.stts,B.STTS),B.box(B.types.stsc,B.STSC),B.box(B.types.stsz,B.STSZ),B.box(B.types.stco,B.STCO))},B.avc1=function(K){var n=[],M=[],y,m,g;for(y=0;y<K.sps.length;y++)m=K.sps[y],g=m.byteLength,n.push(g>>>8&255),n.push(g&255),n=n.concat(Array.prototype.slice.call(m));for(y=0;y<K.pps.length;y++)m=K.pps[y],g=m.byteLength,M.push(g>>>8&255),M.push(g&255),M=M.concat(Array.prototype.slice.call(m));var u=B.box(B.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|K.sps.length].concat(n).concat([K.pps.length]).concat(M))),c=K.width,f=K.height,o=K.pixelRatio[0],l=K.pixelRatio[1];return B.box(B.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>8&255,c&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,B.box(B.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),B.box(B.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,l>>24,l>>16&255,l>>8&255,l&255])))},B.esds=function(K){var n=K.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(K.config).concat([6,1,2]))},B.mp4a=function(K){var n=K.samplerate;return B.box(B.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,K.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),B.box(B.types.esds,B.esds(K)))},B.mp3=function(K){var n=K.samplerate;return B.box(B.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,K.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},B.stsd=function(K){return K.type==="audio"?!K.isAAC&&K.codec==="mp3"?B.box(B.types.stsd,B.STSD,B.mp3(K)):B.box(B.types.stsd,B.STSD,B.mp4a(K)):B.box(B.types.stsd,B.STSD,B.avc1(K))},B.tkhd=function(K){var n=K.id,M=K.duration*K.timescale,y=K.width,m=K.height,g=Math.floor(M/(V+1)),u=Math.floor(M%(V+1));return B.box(B.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255,u>>24,u>>16&255,u>>8&255,u&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,y>>8&255,y&255,0,0,m>>8&255,m&255,0,0]))},B.traf=function(K,n){var M=B.sdtp(K),y=K.id,m=Math.floor(n/(V+1)),g=Math.floor(n%(V+1));return B.box(B.types.traf,B.box(B.types.tfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255])),B.box(B.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,g>>24,g>>16&255,g>>8&255,g&255])),B.trun(K,M.length+16+20+8+16+8+8),M)},B.trak=function(K){return K.duration=K.duration||4294967295,B.box(B.types.trak,B.tkhd(K),B.mdia(K))},B.trex=function(K){var n=K.id;return B.box(B.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},B.trun=function(K,n){var M=K.samples||[],y=M.length,m=12+16*y,g=new Uint8Array(m),u,c,f,o,l,s;for(n+=8+m,g.set([0,0,15,1,y>>>24&255,y>>>16&255,y>>>8&255,y&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),u=0;u<y;u++)c=M[u],f=c.duration,o=c.size,l=c.flags,s=c.cts,g.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*u);return B.box(B.types.trun,g)},B.initSegment=function(K){B.types||B.init();var n=B.moov(K),M=new Uint8Array(B.FTYP.byteLength+n.byteLength);return M.set(B.FTYP),M.set(n,B.FTYP.byteLength),M},B}();k.types=void 0,k.HDLR_TYPES=void 0,k.STTS=void 0,k.STSC=void 0,k.STCO=void 0,k.STSZ=void 0,k.VMHD=void 0,k.SMHD=void 0,k.STSD=void 0,k.FTYP=void 0,k.DINF=void 0,G.default=k},"./src/remux/mp4-remuxer.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return s}),P.d(G,"normalizePts",function(){return a});var V=P("./src/polyfills/number.ts"),k=P("./src/remux/aac-helper.ts"),B=P("./src/remux/mp4-generator.ts"),z=P("./src/events.ts"),K=P("./src/errors.ts"),n=P("./src/utils/logger.ts"),M=P("./src/types/loader.ts"),y=P("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(L){for(var D=1;D<arguments.length;D++){var A=arguments[D];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(L[T]=A[T])}return L},m.apply(this,arguments)}var g=10*1e3,u=1024,c=1152,f=null,o=null,l=!1,s=function(){function L(A,T,x,d){if(d===void 0&&(d=""),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=A,this.config=T,this.typeSupported=x,this.ISGenerated=!1,f===null){var E=navigator.userAgent||"",p=E.match(/Chrome\/(\d+)/i);f=p?parseInt(p[1]):0}if(o===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);o=v?parseInt(v[1]):0}l=!!f&&f<75||!!o&&o<600}var D=L.prototype;return D.destroy=function(){},D.resetTimeStamp=function(T){n.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=T},D.resetNextTimestamp=function(){n.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},D.resetInitSegment=function(){n.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},D.getVideoStartPts=function(T){var x=!1,d=T.reduce(function(E,p){var v=p.pts-E;return v<-4294967296?(x=!0,a(E,p.pts)):v>0?E:p.pts},T[0].pts);return x&&n.logger.debug("PTS rollover detected"),d},D.remux=function(T,x,d,E,p,v,C,F){var R,j,U,b,Q,ee,oe=p,fe=p,Fe=T.pid>-1,Le=x.pid>-1,Ie=x.samples.length,Be=T.samples.length>0,We=Ie>1,ge=(!Fe||Be)&&(!Le||We)||this.ISGenerated||C;if(ge){this.ISGenerated||(U=this.generateIS(T,x,p));var ue=this.isVideoContiguous,ke=-1;if(We&&(ke=O(x.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,ke>0){n.logger.warn("[mp4-remuxer]: Dropped "+ke+" out of "+Ie+" video samples due to a missing keyframe");var lt=this.getVideoStartPts(x.samples);x.samples=x.samples.slice(ke),x.dropped+=ke,fe+=(x.samples[0].pts-lt)/(x.timescale||9e4)}else ke===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ie+" video samples"),ee=!1);if(this.ISGenerated){if(Be&&We){var ot=this.getVideoStartPts(x.samples),ut=a(T.samples[0].pts,ot)-ot,xt=ut/x.inputTimeScale;oe+=Math.max(0,xt),fe+=Math.max(0,-xt)}if(Be){if(T.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(T,x,p)),j=this.remuxAudio(T,oe,this.isAudioContiguous,v,Le||We||F===M.PlaylistLevelType.AUDIO?fe:void 0),We){var Je=j?j.endPTS-j.startPTS:0;x.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(T,x,p)),R=this.remuxVideo(x,fe,ue,Je)}}else We&&(R=this.remuxVideo(x,fe,ue,0));R&&(R.firstKeyFrame=ke,R.independent=ke!==-1)}}return this.ISGenerated&&(d.samples.length&&(Q=this.remuxID3(d,p)),E.samples.length&&(b=this.remuxText(E,p))),{audio:j,video:R,initSegment:U,independent:ee,text:b,id3:Q}},D.generateIS=function(T,x,d){var E=T.samples,p=x.samples,v=this.typeSupported,C={},F=!Object(V.isFiniteNumber)(this._initPTS),R="audio/mp4",j,U,b;if(F&&(j=U=Infinity),T.config&&E.length&&(T.timescale=T.samplerate,T.isAAC||(v.mpeg?(R="audio/mpeg",T.codec=""):v.mp3&&(T.codec="mp3")),C.audio={id:"audio",container:R,codec:T.codec,initSegment:!T.isAAC&&v.mpeg?new Uint8Array(0):B.default.initSegment([T]),metadata:{channelCount:T.channelCount}},F&&(b=T.inputTimeScale,j=U=E[0].pts-Math.round(b*d))),x.sps&&x.pps&&p.length&&(x.timescale=x.inputTimeScale,C.video={id:"main",container:"video/mp4",codec:x.codec,initSegment:B.default.initSegment([x]),metadata:{width:x.width,height:x.height}},F)){b=x.inputTimeScale;var Q=this.getVideoStartPts(p),ee=Math.round(b*d);U=Math.min(U,a(p[0].dts,Q)-ee),j=Math.min(j,Q-ee)}if(Object.keys(C).length)return this.ISGenerated=!0,F&&(this._initPTS=j,this._initDTS=U),{tracks:C,initPTS:j,timescale:b}},D.remuxVideo=function(T,x,d,E){var p=T.inputTimeScale,v=T.samples,C=[],F=v.length,R=this._initPTS,j=this.nextAvcDts,U=8,b,Q,ee,oe=Number.POSITIVE_INFINITY,fe=Number.NEGATIVE_INFINITY,Fe=0,Le=!1;if(!d||j===null){var Ie=x*p,Be=v[0].pts-a(v[0].dts,v[0].pts);j=Ie-Be}for(var We=0;We<F;We++){var ge=v[We];if(ge.pts=a(ge.pts-R,j),ge.dts=a(ge.dts-R,j),ge.dts>ge.pts){var ue=9e4*.2;Fe=Math.max(Math.min(Fe,ge.pts-ge.dts),-1*ue)}ge.dts<v[We>0?We-1:We].dts&&(Le=!0)}Le&&v.sort(function(Bt,wt){var Ye=Bt.dts-wt.dts,en=Bt.pts-wt.pts;return Ye||en}),Q=v[0].dts,ee=v[v.length-1].dts;var ke=Math.round((ee-Q)/(F-1));if(Fe<0){if(Fe<ke*-2){n.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(y.toMsFromMpegTsClock)(-ke,!0)+" ms");for(var lt=Fe,ot=0;ot<F;ot++)v[ot].dts=lt=Math.max(lt,v[ot].pts-ke),v[ot].pts=Math.max(lt,v[ot].pts)}else{n.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(y.toMsFromMpegTsClock)(Fe,!0)+" ms to overcome this issue");for(var ut=0;ut<F;ut++)v[ut].dts=v[ut].dts+Fe}Q=v[0].dts}if(d){var xt=Q-j,Je=xt>ke,et=xt<-1;if(Je||et){Je?n.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(xt,!0)+" ms ("+xt+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(-xt,!0)+" ms ("+xt+"dts) overlapping between fragments detected"),Q=j;var dt=v[0].pts-xt;v[0].dts=Q,v[0].pts=dt,n.logger.log("Video: First PTS/DTS adjusted: "+Object(y.toMsFromMpegTsClock)(dt,!0)+"/"+Object(y.toMsFromMpegTsClock)(Q,!0)+", delta: "+Object(y.toMsFromMpegTsClock)(xt,!0)+" ms")}}l&&(Q=Math.max(0,Q));for(var de=0,Ce=0,Ue=0;Ue<F;Ue++){for(var Ke=v[Ue],st=Ke.units,ht=st.length,yt=0,mt=0;mt<ht;mt++)yt+=st[mt].data.length;Ce+=yt,de+=ht,Ke.length=yt,Ke.dts=Math.max(Ke.dts,Q),Ke.pts=Math.max(Ke.pts,Ke.dts,0),oe=Math.min(Ke.pts,oe),fe=Math.max(Ke.pts,fe)}ee=v[F-1].dts;var Ot=Ce+4*de+8,Tt;try{Tt=new Uint8Array(Ot)}catch(Bt){this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:K.ErrorTypes.MUX_ERROR,details:K.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ot,reason:"fail allocating video mdat "+Ot});return}var Et=new DataView(Tt.buffer);Et.setUint32(0,Ot),Tt.set(B.default.types.mdat,4);for(var Qe=0;Qe<F;Qe++){for(var Kt=v[Qe],Ut=Kt.units,qe=0,tt=0,Re=Ut.length;tt<Re;tt++){var Te=Ut[tt],Se=Te.data,te=Te.data.byteLength;Et.setUint32(U,te),U+=4,Tt.set(Se,U),U+=te,qe+=4+te}if(Qe<F-1)b=v[Qe+1].dts-Kt.dts;else{var se=this.config,he=Kt.dts-v[Qe>0?Qe-1:Qe].dts;if(se.stretchShortVideoTrack&&this.nextAudioPts!==null){var me=Math.floor(se.maxBufferHole*p),xe=(E?oe+E*p:this.nextAudioPts)-Kt.pts;xe>me?(b=xe-he,b<0&&(b=he),n.logger.log("[mp4-remuxer]: It is approximately "+xe/90+" ms to the next segment; using duration "+b/90+" ms for the last video frame.")):b=he}else b=he}var Me=Math.round(Kt.pts-Kt.dts);C.push(new w(Kt.key,b,qe,Me))}if(C.length&&f&&f<70){var Pe=C[0].flags;Pe.dependsOn=2,Pe.isNonSync=0}console.assert(b!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=ee+b,this.isVideoContiguous=!0;var rt=B.default.moof(T.sequenceNumber++,Q,m({},T,{samples:C})),ft="video",pt={data1:rt,data2:Tt,startPTS:oe/p,endPTS:(fe+b)/p,startDTS:Q/p,endDTS:j/p,type:ft,hasAudio:!1,hasVideo:!0,nb:C.length,dropped:T.dropped};return T.samples=[],T.dropped=0,console.assert(Tt.length,"MDAT length must not be zero"),pt},D.remuxAudio=function(T,x,d,E,p){var v=T.inputTimeScale,C=T.samplerate?T.samplerate:v,F=v/C,R=T.isAAC?u:c,j=R*F,U=this._initPTS,b=!T.isAAC&&this.typeSupported.mpeg,Q=[],ee=T.samples,oe=b?0:8,fe=this.nextAudioPts||-1,Fe=x*v;if(this.isAudioContiguous=d=d||ee.length&&fe>0&&(E&&Math.abs(Fe-fe)<9e3||Math.abs(a(ee[0].pts-U,Fe)-fe)<20*j),ee.forEach(function(Se){Se.pts=a(Se.pts-U,Fe)}),!d||fe<0){if(ee=ee.filter(function(Se){return Se.pts>=0}),!ee.length)return;p===0?fe=0:E?fe=Math.max(0,Fe):fe=ee[0].pts}if(T.isAAC)for(var Le=p!==void 0,Ie=this.config.maxAudioFramesDrift,Be=0,We=fe;Be<ee.length;Be++){var ge=ee[Be],ue=ge.pts,ke=ue-We,lt=Math.abs(1e3*ke/v);if(ke<=-Ie*j&&Le)Be===0&&(n.logger.warn("Audio frame @ "+(ue/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ke/v)+" ms."),this.nextAudioPts=fe=We=ue);else if(ke>=Ie*j&<<g&&Le){var ot=Math.round(ke/j);We=ue-ot*j,We<0&&(ot--,We+=j),Be===0&&(this.nextAudioPts=fe=We),n.logger.warn("[mp4-remuxer]: Injecting "+ot+" audio frame @ "+(We/v).toFixed(3)+"s due to "+Math.round(1e3*ke/v)+" ms gap.");for(var ut=0;ut<ot;ut++){var xt=Math.max(We,0),Je=k.default.getSilentFrame(T.manifestCodec||T.codec,T.channelCount);Je||(n.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Je=ge.unit.subarray()),ee.splice(Be,0,{unit:Je,pts:xt}),We+=j,Be++}}ge.pts=We,We+=j}for(var et=null,dt=null,de,Ce=0,Ue=ee.length;Ue--;)Ce+=ee[Ue].unit.byteLength;for(var Ke=0,st=ee.length;Ke<st;Ke++){var ht=ee[Ke],yt=ht.unit,mt=ht.pts;if(dt!==null){var Ot=Q[Ke-1];Ot.duration=Math.round((mt-dt)/F)}else if(d&&T.isAAC&&(mt=fe),et=mt,Ce>0){Ce+=oe;try{de=new Uint8Array(Ce)}catch(Se){this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:K.ErrorTypes.MUX_ERROR,details:K.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ce,reason:"fail allocating audio mdat "+Ce});return}if(!b){var Tt=new DataView(de.buffer);Tt.setUint32(0,Ce),de.set(B.default.types.mdat,4)}}else return;de.set(yt,oe);var Et=yt.byteLength;oe+=Et,Q.push(new w(!0,R,Et,0)),dt=mt}var Qe=Q.length;if(!Qe)return;var Kt=Q[Q.length-1];this.nextAudioPts=fe=dt+F*Kt.duration;var Ut=b?new Uint8Array(0):B.default.moof(T.sequenceNumber++,et/F,m({},T,{samples:Q}));T.samples=[];var qe=et/v,tt=fe/v,Re="audio",Te={data1:Ut,data2:de,startPTS:qe,endPTS:tt,startDTS:qe,endDTS:tt,type:Re,hasAudio:!0,hasVideo:!1,nb:Qe};return this.isAudioContiguous=!0,console.assert(de.length,"MDAT length must not be zero"),Te},D.remuxEmptyAudio=function(T,x,d,E){var p=T.inputTimeScale,v=T.samplerate?T.samplerate:p,C=p/v,F=this.nextAudioPts,R=(F!==null?F:E.startDTS*p)+this._initDTS,j=E.endDTS*p+this._initDTS,U=C*u,b=Math.ceil((j-R)/U),Q=k.default.getSilentFrame(T.manifestCodec||T.codec,T.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!Q){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],oe=0;oe<b;oe++){var fe=R+oe*U;ee.push({unit:Q,pts:fe,dts:fe})}return T.samples=ee,this.remuxAudio(T,x,d,!1)},D.remuxID3=function(T,x){var d=T.samples.length;if(!d)return;for(var E=T.inputTimeScale,p=this._initPTS,v=this._initDTS,C=0;C<d;C++){var F=T.samples[C];F.pts=a(F.pts-p,x*E)/E,F.dts=a(F.dts-v,x*E)/E}var R=T.samples;return T.samples=[],{samples:R}},D.remuxText=function(T,x){var d=T.samples.length;if(!d)return;for(var E=T.inputTimeScale,p=this._initPTS,v=0;v<d;v++){var C=T.samples[v];C.pts=a(C.pts-p,x*E)/E}T.samples.sort(function(R,j){return R.pts-j.pts});var F=T.samples;return T.samples=[],{samples:F}},L}();function a(L,D){var A;if(D===null)return L;for(D<L?A=-8589934592:A=8589934592;Math.abs(L-D)>4294967296;)L+=A;return L}function O(L){for(var D=0;D<L.length;D++)if(L[D].key)return D;return-1}var w=function(D,A,T,x){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=A,this.size=T,this.cts=x,this.flags=new S(D)},S=function(D){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=D?2:1,this.isNonSync=D?0:1}},"./src/remux/passthrough-remuxer.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/polyfills/number.ts"),k=P("./src/utils/mp4-tools.ts"),B=P("./src/loader/fragment.ts"),z=P("./src/utils/logger.ts"),K=function(){function y(){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 m=y.prototype;return m.destroy=function(){},m.resetTimeStamp=function(u){this.initPTS=u,this.lastEndDTS=null},m.resetNextTimestamp=function(){this.lastEndDTS=null},m.resetInitSegment=function(u,c,f){this.audioCodec=c,this.videoCodec=f,this.generateInitSegment(u),this.emitInitSegment=!0},m.generateInitSegment=function(u){var c=this.audioCodec,f=this.videoCodec;if(!u||!u.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(k.parseInitSegment)(u);c||(c=M(o.audio,B.ElementaryStreamTypes.AUDIO)),f||(f=M(o.video,B.ElementaryStreamTypes.VIDEO));var l={};o.audio&&o.video?l.audiovideo={container:"video/mp4",codec:c+","+f,initSegment:u,id:"main"}:o.audio?l.audio={container:"audio/mp4",codec:c,initSegment:u,id:"audio"}:o.video?l.video={container:"video/mp4",codec:f,initSegment:u,id:"main"}:z.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},m.remux=function(u,c,f,o,l){var s=this.initPTS,a=this.lastEndDTS,O={audio:void 0,video:void 0,text:o,id3:f,initSegment:void 0};Object(V.isFiniteNumber)(a)||(a=this.lastEndDTS=l||0);var w=c.samples;if(!w||!w.length)return O;var S={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(w),L=this.initData),!L||!L.length)return z.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),O;this.emitInitSegment&&(S.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(s)||(this.initPTS=S.initPTS=s=n(L,w,a));var D=Object(k.getDuration)(w,L),A=a,T=D+A;Object(k.offsetStartDTS)(L,w,s),D>0?this.lastEndDTS=T:(z.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var x=!!L.audio,d=!!L.video,E="";x&&(E+="audio"),d&&(E+="video");var p={data1:w,startPTS:A,startDTS:A,endPTS:T,endDTS:T,type:E,hasAudio:x,hasVideo:d,nb:1,dropped:0};return O.audio=p.type==="audio"?p:void 0,O.video=p.type!=="audio"?p:void 0,O.text=o,O.id3=f,O.initSegment=S,O},y}(),n=function(m,g,u){return Object(k.getStartDTS)(m,g)-u};function M(y,m){var g=y==null?void 0:y.codec;return g&&g.length>4?g:g==="hvc1"?"hvc1.1.c.L120.90":g==="av01"?"av01.0.04M.08":g==="avc1"||m===B.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}G.default=K},"./src/task-loop.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return V});var V=function(){function k(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var B=k.prototype;return B.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},B.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},B.onHandlerDestroyed=function(){},B.hasInterval=function(){return!!this._tickInterval},B.hasNextTick=function(){return!!this._tickTimer},B.setInterval=function(K){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,K),!0)},B.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},B.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},B.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},B.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},B.doTick=function(){},k}()},"./src/types/cmcd.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"CMCDVersion",function(){return V}),P.d(G,"CMCDObjectType",function(){return k}),P.d(G,"CMCDStreamingFormat",function(){return B}),P.d(G,"CMCDStreamType",function(){return z});var V=1,k;(function(K){K.MANIFEST="m",K.AUDIO="a",K.VIDEO="v",K.MUXED="av",K.INIT="i",K.CAPTION="c",K.TIMED_TEXT="tt",K.KEY="k",K.OTHER="o"})(k||(k={}));var B;(function(K){K.DASH="d",K.HLS="h",K.SMOOTH="s",K.OTHER="o"})(B||(B={}));var z;(function(K){K.VOD="v",K.LIVE="l"})(z||(z={}))},"./src/types/level.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"HlsSkip",function(){return B}),P.d(G,"getSkipValue",function(){return z}),P.d(G,"HlsUrlParameters",function(){return K}),P.d(G,"Level",function(){return n});function V(M,y){for(var m=0;m<y.length;m++){var g=y[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(M,g.key,g)}}function k(M,y,m){return y&&V(M.prototype,y),m&&V(M,m),M}var B;(function(M){M.No="",M.Yes="YES",M.v2="v2"})(B||(B={}));function z(M,y){var m=M.canSkipUntil,g=M.canSkipDateRanges,u=M.endSN,c=y!==void 0?y-u:0;return m&&c<m?g?B.v2:B.Yes:B.No}var K=function(){function M(m,g,u){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=m,this.part=g,this.skip=u}var y=M.prototype;return y.addDirectives=function(g){var u=new self.URL(g);return this.msn!==void 0&&u.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&u.searchParams.set("_HLS_part",this.part.toString()),this.skip&&u.searchParams.set("_HLS_skip",this.skip),u.toString()},M}(),n=function(){function M(y){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=[y.url],this.attrs=y.attrs,this.bitrate=y.bitrate,y.details&&(this.details=y.details),this.id=y.id||0,this.name=y.name,this.width=y.width||0,this.height=y.height||0,this.audioCodec=y.audioCodec,this.videoCodec=y.videoCodec,this.unknownCodecs=y.unknownCodecs,this.codecSet=[y.videoCodec,y.audioCodec].filter(function(m){return m}).join(",").replace(/\.[^.,]+/g,"")}return k(M,[{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(m){var g=m%this.url.length;this._urlId!==g&&(this.details=void 0,this._urlId=g)}}]),M}()},"./src/types/loader.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"PlaylistContextType",function(){return V}),P.d(G,"PlaylistLevelType",function(){return k});var V;(function(B){B.MANIFEST="manifest",B.LEVEL="level",B.AUDIO_TRACK="audioTrack",B.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var k;(function(B){B.MAIN="main",B.AUDIO="audio",B.SUBTITLE="subtitle"})(k||(k={}))},"./src/types/transmuxer.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"ChunkMetadata",function(){return V});var V=function(z,K,n,M,y,m){M===void 0&&(M=0),y===void 0&&(y=-1),m===void 0&&(m=!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=k(),this.buffering={audio:k(),video:k(),audiovideo:k()},this.level=z,this.sn=K,this.id=n,this.size=M,this.part=y,this.partial=m};function k(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"AttrList",function(){return B});var V=/^(\d+)x(\d+)$/,k=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,B=function(){function z(n){typeof n=="string"&&(n=z.parseAttrList(n));for(var M in n)n.hasOwnProperty(M)&&(this[M]=n[M])}var K=z.prototype;return K.decimalInteger=function(M){var y=parseInt(this[M],10);return y>Number.MAX_SAFE_INTEGER?Infinity:y},K.hexadecimalInteger=function(M){if(this[M]){var y=(this[M]||"0x").slice(2);y=(y.length&1?"0":"")+y;for(var m=new Uint8Array(y.length/2),g=0;g<y.length/2;g++)m[g]=parseInt(y.slice(g*2,g*2+2),16);return m}else return null},K.hexadecimalIntegerAsNumber=function(M){var y=parseInt(this[M],16);return y>Number.MAX_SAFE_INTEGER?Infinity:y},K.decimalFloatingPoint=function(M){return parseFloat(this[M])},K.optionalFloat=function(M,y){var m=this[M];return m?parseFloat(m):y},K.enumeratedString=function(M){return this[M]},K.bool=function(M){return this[M]==="YES"},K.decimalResolution=function(M){var y=V.exec(this[M]);return y===null?void 0:{width:parseInt(y[1],10),height:parseInt(y[2],10)}},z.parseAttrList=function(M){var y,m={},g='"';for(k.lastIndex=0;(y=k.exec(M))!==null;){var u=y[2];u.indexOf(g)===0&&u.lastIndexOf(g)===u.length-1&&(u=u.slice(1,-1)),m[y[1]]=u}return m},z}()},"./src/utils/binary-search.ts":function(ie,G,P){"use strict";P.r(G);var V={search:function(B,z){for(var K=0,n=B.length-1,M=null,y=null;K<=n;){M=(K+n)/2|0,y=B[M];var m=z(y);if(m>0)K=M+1;else if(m<0)n=M-1;else return y}return null}};G.default=V},"./src/utils/buffer-helper.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"BufferHelper",function(){return B});var V=P("./src/utils/logger.ts"),k={length:0,start:function(){return 0},end:function(){return 0}},B=function(){function z(){}return z.isBuffered=function(n,M){try{if(n){for(var y=z.getBuffered(n),m=0;m<y.length;m++)if(M>=y.start(m)&&M<=y.end(m))return!0}}catch(g){}return!1},z.bufferInfo=function(n,M,y){try{if(n){var m=z.getBuffered(n),g=[],u;for(u=0;u<m.length;u++)g.push({start:m.start(u),end:m.end(u)});return this.bufferedInfo(g,M,y)}}catch(c){}return{len:0,start:M,end:M,nextStart:void 0}},z.bufferedInfo=function(n,M,y){M=Math.max(0,M),n.sort(function(S,L){var D=S.start-L.start;return D||L.end-S.end});var m=[];if(y)for(var g=0;g<n.length;g++){var u=m.length;if(u){var c=m[u-1].end;n[g].start-c<y?n[g].end>c&&(m[u-1].end=n[g].end):m.push(n[g])}else m.push(n[g])}else m=n;for(var f=0,o,l=M,s=M,a=0;a<m.length;a++){var O=m[a].start,w=m[a].end;if(M+y>=O&&M<w)l=O,s=w,f=s-M;else if(M+y<O){o=O;break}}return{len:f,start:l||0,end:s||0,nextStart:o}},z.getBuffered=function(n){try{return n.buffered}catch(M){return V.logger.log("failed to get media.buffered",M),k}},z}()},"./src/utils/cea-608-parser.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"Row",function(){return s}),P.d(G,"CaptionScreen",function(){return a});var V=P("./src/utils/logger.ts"),k={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},B=function(T){var x=T;return k.hasOwnProperty(T)&&(x=k[T]),String.fromCharCode(x)},z=15,K=100,n={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},M={17:2,18:4,21:6,22:8,23:10,19:13,20:15},y={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],u;(function(A){A[A.ERROR=0]="ERROR",A[A.TEXT=1]="TEXT",A[A.WARNING=2]="WARNING",A[A.INFO=2]="INFO",A[A.DEBUG=3]="DEBUG",A[A.DATA=3]="DATA"})(u||(u={}));var c=function(){function A(){this.time=null,this.verboseLevel=u.ERROR}var T=A.prototype;return T.log=function(d,E){this.verboseLevel>=d&&V.logger.log(this.time+" ["+d+"] "+E)},A}(),f=function(T){for(var x=[],d=0;d<T.length;d++)x.push(T[d].toString(16));return x},o=function(){function A(x,d,E,p,v){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=x||"white",this.underline=d||!1,this.italics=E||!1,this.background=p||"black",this.flash=v||!1}var T=A.prototype;return T.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},T.setStyles=function(d){for(var E=["foreground","underline","italics","background","flash"],p=0;p<E.length;p++){var v=E[p];d.hasOwnProperty(v)&&(this[v]=d[v])}},T.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},T.equals=function(d){return this.foreground===d.foreground&&this.underline===d.underline&&this.italics===d.italics&&this.background===d.background&&this.flash===d.flash},T.copy=function(d){this.foreground=d.foreground,this.underline=d.underline,this.italics=d.italics,this.background=d.background,this.flash=d.flash},T.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},A}(),l=function(){function A(x,d,E,p,v,C){this.uchar=void 0,this.penState=void 0,this.uchar=x||" ",this.penState=new o(d,E,p,v,C)}var T=A.prototype;return T.reset=function(){this.uchar=" ",this.penState.reset()},T.setChar=function(d,E){this.uchar=d,this.penState.copy(E)},T.setPenState=function(d){this.penState.copy(d)},T.equals=function(d){return this.uchar===d.uchar&&this.penState.equals(d.penState)},T.copy=function(d){this.uchar=d.uchar,this.penState.copy(d.penState)},T.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},A}(),s=function(){function A(x){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var d=0;d<K;d++)this.chars.push(new l);this.logger=x,this.pos=0,this.currPenState=new o}var T=A.prototype;return T.equals=function(d){for(var E=!0,p=0;p<K;p++)if(!this.chars[p].equals(d.chars[p])){E=!1;break}return E},T.copy=function(d){for(var E=0;E<K;E++)this.chars[E].copy(d.chars[E])},T.isEmpty=function(){for(var d=!0,E=0;E<K;E++)if(!this.chars[E].isEmpty()){d=!1;break}return d},T.setCursor=function(d){this.pos!==d&&(this.pos=d),this.pos<0?(this.logger.log(u.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>K&&(this.logger.log(u.DEBUG,"Too large cursor position "+this.pos),this.pos=K)},T.moveCursor=function(d){var E=this.pos+d;if(d>1)for(var p=this.pos+1;p<E+1;p++)this.chars[p].setPenState(this.currPenState);this.setCursor(E)},T.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},T.insertChar=function(d){d>=144&&this.backSpace();var E=B(d);if(this.pos>=K){this.logger.log(u.ERROR,"Cannot insert "+d.toString(16)+" ("+E+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(E,this.currPenState),this.moveCursor(1)},T.clearFromPos=function(d){var E;for(E=d;E<K;E++)this.chars[E].reset()},T.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},T.clearToEndOfRow=function(){this.clearFromPos(this.pos)},T.getTextString=function(){for(var d=[],E=!0,p=0;p<K;p++){var v=this.chars[p].uchar;v!==" "&&(E=!1),d.push(v)}return E?"":d.join("")},T.setPenStyles=function(d){this.currPenState.setStyles(d);var E=this.chars[this.pos];E.setPenState(this.currPenState)},A}(),a=function(){function A(x){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var d=0;d<z;d++)this.rows.push(new s(x));this.logger=x,this.currRow=z-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var T=A.prototype;return T.reset=function(){for(var d=0;d<z;d++)this.rows[d].clear();this.currRow=z-1},T.equals=function(d){for(var E=!0,p=0;p<z;p++)if(!this.rows[p].equals(d.rows[p])){E=!1;break}return E},T.copy=function(d){for(var E=0;E<z;E++)this.rows[E].copy(d.rows[E])},T.isEmpty=function(){for(var d=!0,E=0;E<z;E++)if(!this.rows[E].isEmpty()){d=!1;break}return d},T.backSpace=function(){var d=this.rows[this.currRow];d.backSpace()},T.clearToEndOfRow=function(){var d=this.rows[this.currRow];d.clearToEndOfRow()},T.insertChar=function(d){var E=this.rows[this.currRow];E.insertChar(d)},T.setPen=function(d){var E=this.rows[this.currRow];E.setPenStyles(d)},T.moveCursor=function(d){var E=this.rows[this.currRow];E.moveCursor(d)},T.setCursor=function(d){this.logger.log(u.INFO,"setCursor: "+d);var E=this.rows[this.currRow];E.setCursor(d)},T.setPAC=function(d){this.logger.log(u.INFO,"pacData = "+JSON.stringify(d));var E=d.row-1;if(this.nrRollUpRows&&E<this.nrRollUpRows-1&&(E=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==E){for(var p=0;p<z;p++)this.rows[p].clear();var v=this.currRow+1-this.nrRollUpRows,C=this.lastOutputScreen;if(C){var F=C.rows[v].cueStartTime,R=this.logger.time;if(F&&R!==null&&F<R)for(var j=0;j<this.nrRollUpRows;j++)this.rows[E-this.nrRollUpRows+j+1].copy(C.rows[v+j])}}this.currRow=E;var U=this.rows[this.currRow];if(d.indent!==null){var b=d.indent,Q=Math.max(b-1,0);U.setCursor(d.indent),d.color=U.chars[Q].penState.foreground}var ee={foreground:d.color,underline:d.underline,italics:d.italics,background:"black",flash:!1};this.setPen(ee)},T.setBkgData=function(d){this.logger.log(u.INFO,"bkgData = "+JSON.stringify(d)),this.backSpace(),this.setPen(d),this.insertChar(32)},T.setRollUpRows=function(d){this.nrRollUpRows=d},T.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(u.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(u.TEXT,this.getDisplayText());var d=this.currRow+1-this.nrRollUpRows,E=this.rows.splice(d,1)[0];E.clear(),this.rows.splice(this.currRow,0,E),this.logger.log(u.INFO,"Rolling up")},T.getDisplayText=function(d){d=d||!1;for(var E=[],p="",v=-1,C=0;C<z;C++){var F=this.rows[C].getTextString();F&&(v=C+1,d?E.push("Row "+v+": '"+F+"'"):E.push(F.trim()))}return E.length>0&&(d?p="["+E.join(" | ")+"]":p=E.join(`
|
|
`)),p},T.getTextAndFormat=function(){return this.rows},A}(),O=function(){function A(x,d,E){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=x,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new a(E),this.nonDisplayedMemory=new a(E),this.lastOutputScreen=new a(E),this.currRollUpRow=this.displayedMemory.rows[z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=E}var T=A.prototype;return T.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},T.getHandler=function(){return this.outputFilter},T.setHandler=function(d){this.outputFilter=d},T.setPAC=function(d){this.writeScreen.setPAC(d)},T.setBkgData=function(d){this.writeScreen.setBkgData(d)},T.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(u.INFO,"MODE="+d),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=d},T.insertChars=function(d){for(var E=0;E<d.length;E++)this.writeScreen.insertChar(d[E]);var p=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(u.INFO,p+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(u.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},T.ccRCL=function(){this.logger.log(u.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},T.ccBS=function(){if(this.logger.log(u.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},T.ccAOF=function(){},T.ccAON=function(){},T.ccDER=function(){this.logger.log(u.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},T.ccRU=function(d){this.logger.log(u.INFO,"RU("+d+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(d)},T.ccFON=function(){this.logger.log(u.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},T.ccRDC=function(){this.logger.log(u.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},T.ccTR=function(){this.logger.log(u.INFO,"TR"),this.setMode("MODE_TEXT")},T.ccRTD=function(){this.logger.log(u.INFO,"RTD"),this.setMode("MODE_TEXT")},T.ccEDM=function(){this.logger.log(u.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},T.ccCR=function(){this.logger.log(u.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},T.ccENM=function(){this.logger.log(u.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},T.ccEOC=function(){if(this.logger.log(u.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var d=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=d,this.writeScreen=this.nonDisplayedMemory,this.logger.log(u.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},T.ccTO=function(d){this.logger.log(u.INFO,"TO("+d+") - Tab Offset"),this.writeScreen.moveCursor(d)},T.ccMIDROW=function(d){var E={flash:!1};if(E.underline=d%2===1,E.italics=d>=46,E.italics)E.foreground="white";else{var p=Math.floor(d/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];E.foreground=v[p]}this.logger.log(u.INFO,"MIDROW: "+JSON.stringify(E)),this.writeScreen.setPen(E)},T.outputDataUpdate=function(d){d===void 0&&(d=!1);var E=this.logger.time;if(E===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=E:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,E,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:E),this.lastOutputScreen.copy(this.displayedMemory))},T.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},A}(),w=function(){function A(x,d,E){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var p=new c;this.channels=[null,new O(x,d,p),new O(x+1,E,p)],this.cmdHistory=D(),this.logger=p}var T=A.prototype;return T.getHandler=function(d){return this.channels[d].getHandler()},T.setHandler=function(d,E){this.channels[d].setHandler(E)},T.addData=function(d,E){var p,v,C,F=!1;this.logger.time=d;for(var R=0;R<E.length;R+=2){if(v=E[R]&127,C=E[R+1]&127,v===0&&C===0)continue;if(this.logger.log(u.DATA,"["+f([E[R],E[R+1]])+"] -> ("+f([v,C])+")"),p=this.parseCmd(v,C),p||(p=this.parseMidrow(v,C)),p||(p=this.parsePAC(v,C)),p||(p=this.parseBackgroundAttributes(v,C)),!p&&(F=this.parseChars(v,C),F)){var j=this.currentChannel;if(j&&j>0){var U=this.channels[j];U.insertChars(F)}else this.logger.log(u.WARNING,"No channel found yet. TEXT-MODE?")}!p&&!F&&this.logger.log(u.WARNING,"Couldn't parse cleaned data "+f([v,C])+" orig: "+f([E[R],E[R+1]]))}},T.parseCmd=function(d,E){var p=this.cmdHistory,v=(d===20||d===28||d===21||d===29)&&E>=32&&E<=47,C=(d===23||d===31)&&E>=33&&E<=35;if(!(v||C))return!1;if(L(d,E,p))return S(null,null,p),this.logger.log(u.DEBUG,"Repeated command ("+f([d,E])+") is dropped"),!0;var F=d===20||d===21||d===23?1:2,R=this.channels[F];return d===20||d===21||d===28||d===29?E===32?R.ccRCL():E===33?R.ccBS():E===34?R.ccAOF():E===35?R.ccAON():E===36?R.ccDER():E===37?R.ccRU(2):E===38?R.ccRU(3):E===39?R.ccRU(4):E===40?R.ccFON():E===41?R.ccRDC():E===42?R.ccTR():E===43?R.ccRTD():E===44?R.ccEDM():E===45?R.ccCR():E===46?R.ccENM():E===47&&R.ccEOC():R.ccTO(E-32),S(d,E,p),this.currentChannel=F,!0},T.parseMidrow=function(d,E){var p=0;if((d===17||d===25)&&E>=32&&E<=47){if(d===17?p=1:p=2,p!==this.currentChannel)return this.logger.log(u.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[p];return v?(v.ccMIDROW(E),this.logger.log(u.DEBUG,"MIDROW ("+f([d,E])+")"),!0):!1}return!1},T.parsePAC=function(d,E){var p,v=this.cmdHistory,C=(d>=17&&d<=23||d>=25&&d<=31)&&E>=64&&E<=127,F=(d===16||d===24)&&E>=64&&E<=95;if(!(C||F))return!1;if(L(d,E,v))return S(null,null,v),!0;var R=d<=23?1:2;E>=64&&E<=95?p=R===1?n[d]:y[d]:p=R===1?M[d]:m[d];var j=this.channels[R];return j?(j.setPAC(this.interpretPAC(p,E)),S(d,E,v),this.currentChannel=R,!0):!1},T.interpretPAC=function(d,E){var p,v={color:null,italics:!1,indent:null,underline:!1,row:d};return E>95?p=E-96:p=E-64,v.underline=(p&1)===1,p<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(p/2)]:p<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((p-16)/2)*4,v},T.parseChars=function(d,E){var p,v=null,C=null;if(d>=25?(p=2,C=d-8):(p=1,C=d),C>=17&&C<=19){var F;C===17?F=E+80:C===18?F=E+112:F=E+144,this.logger.log(u.INFO,"Special char '"+B(F)+"' in channel "+p),v=[F]}else d>=32&&d<=127&&(v=E===0?[d]:[d,E]);if(v){var R=f(v);this.logger.log(u.DEBUG,"Char codes = "+R.join(",")),S(d,E,this.cmdHistory)}return v},T.parseBackgroundAttributes=function(d,E){var p=(d===16||d===24)&&E>=32&&E<=47,v=(d===23||d===31)&&E>=45&&E<=47;if(!(p||v))return!1;var C,F={};d===16||d===24?(C=Math.floor((E-32)/2),F.background=g[C],E%2===1&&(F.background=F.background+"_semi")):E===45?F.background="transparent":(F.foreground="black",E===47&&(F.underline=!0));var R=d<=23?1:2,j=this.channels[R];return j.setBkgData(F),S(d,E,this.cmdHistory),!0},T.reset=function(){for(var d=0;d<Object.keys(this.channels).length;d++){var E=this.channels[d];E&&E.reset()}this.cmdHistory=D()},T.cueSplitAtTime=function(d){for(var E=0;E<this.channels.length;E++){var p=this.channels[E];p&&p.cueSplitAtTime(d)}},A}();function S(A,T,x){x.a=A,x.b=T}function L(A,T,x){return x.a===A&&x.b===T}function D(){return{a:null,b:null}}G.default=w},"./src/utils/codecs.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"isCodecType",function(){return k}),P.d(G,"isCodecSupportedInMp4",function(){return B});var V={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 k(z,K){var n=V[K];return!!n&&n[z.slice(0,4)]===!0}function B(z,K){return MediaSource.isTypeSupported((K||"video")+'/mp4;codecs="'+z+'"')}},"./src/utils/cues.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/utils/vttparser.ts"),k=P("./src/utils/webvtt-parser.ts"),B=P("./src/utils/texttrack-utils.ts"),z=/\s/,K={newCue:function(M,y,m,g){for(var u=[],c,f,o,l,s,a=self.VTTCue||self.TextTrackCue,O=0;O<g.rows.length;O++)if(c=g.rows[O],o=!0,l=0,s="",!c.isEmpty()){for(var w=0;w<c.chars.length;w++)z.test(c.chars[w].uchar)&&o?l++:(s+=c.chars[w].uchar,o=!1);c.cueStartTime=y,y===m&&(m+=1e-4),l>=16?l--:l++;var S=Object(V.fixLineBreaks)(s.trim()),L=Object(k.generateCueId)(y,m,S);(!M||!M.cues||!M.cues.getCueById(L))&&(f=new a(y,m,S),f.id=L,f.line=O+1,f.align="left",f.position=10+Math.min(80,Math.floor(l*8/32)*10),u.push(f))}return M&&u.length&&(u.sort(function(D,A){return D.line==="auto"||A.line==="auto"?0:D.line>8&&A.line>8?A.line-D.line:D.line-A.line}),u.forEach(function(D){return Object(B.addCueToTrack)(M,D)})),u}};G.default=K},"./src/utils/discontinuities.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"findFirstFragWithCC",function(){return z}),P.d(G,"shouldAlignOnDiscontinuities",function(){return K}),P.d(G,"findDiscontinuousReferenceFrag",function(){return n}),P.d(G,"adjustSlidingStart",function(){return y}),P.d(G,"alignStream",function(){return m}),P.d(G,"alignPDT",function(){return u}),P.d(G,"alignFragmentByPDTDelta",function(){return c}),P.d(G,"alignMediaPlaylistByPDT",function(){return f});var V=P("./src/polyfills/number.ts"),k=P("./src/utils/logger.ts"),B=P("./src/controller/level-helper.ts");function z(o,l){for(var s=null,a=0,O=o.length;a<O;a++){var w=o[a];if(w&&w.cc===l){s=w;break}}return s}function K(o,l,s){return!!(l.details&&(s.endCC>s.startCC||o&&o.cc<s.startCC))}function n(o,l){var s=o.fragments,a=l.fragments;if(!a.length||!s.length){k.logger.log("No fragments to align");return}var O=z(s,a[0].cc);if(!O||O&&!O.startPTS){k.logger.log("No frag in previous level to align on");return}return O}function M(o,l){if(o){var s=o.start+l;o.start=o.startPTS=s,o.endPTS=s+o.duration}}function y(o,l){for(var s=l.fragments,a=0,O=s.length;a<O;a++)M(s[a],o);l.fragmentHint&&M(l.fragmentHint,o),l.alignedSliding=!0}function m(o,l,s){if(!l)return;g(o,s,l),!s.alignedSliding&&l.details&&u(s,l.details),!s.alignedSliding&&l.details&&!s.skippedSegments&&Object(B.adjustSliding)(l.details,s)}function g(o,l,s){if(K(o,s,l)){var a=n(s.details,l);a&&Object(V.isFiniteNumber)(a.start)&&(k.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),y(a.start,l))}}function u(o,l){if(!l.fragments.length||!o.hasProgramDateTime||!l.hasProgramDateTime)return;var s=l.fragments[0].programDateTime,a=o.fragments[0].programDateTime,O=(a-s)/1e3+l.fragments[0].start;O&&Object(V.isFiniteNumber)(O)&&(k.logger.log("Adjusting PTS using programDateTime delta "+(a-s)+"ms, sliding:"+O.toFixed(3)+" "+o.url+" "),y(O,o))}function c(o,l){var s=o.programDateTime;if(!s)return;var a=(s-l)/1e3;o.start=o.startPTS=a,o.endPTS=a+o.duration}function f(o,l){if(!l.fragments.length||!o.hasProgramDateTime||!l.hasProgramDateTime)return;var s=l.fragments[0].programDateTime,a=l.fragments[0].start,O=s-a*1e3;o.fragments.forEach(function(w){c(w,O)}),o.fragmentHint&&c(o.fragmentHint,O),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/utils/ewma.ts"),k=function(){function B(K,n,M){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=M,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(K),this.fast_=new V.default(n)}var z=B.prototype;return z.update=function(n,M){var y=this.slow_,m=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new V.default(n,y.getEstimate(),y.getTotalWeight())),this.fast_.halfLife!==M&&(this.fast_=new V.default(M,m.getEstimate(),m.getTotalWeight()))},z.sample=function(n,M){n=Math.max(n,this.minDelayMs_);var y=8*M,m=n/1e3,g=y/m;this.fast_.sample(m,g),this.slow_.sample(m,g)},z.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},z.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},z.destroy=function(){},B}();G.default=k},"./src/utils/ewma.ts":function(ie,G,P){"use strict";P.r(G);var V=function(){function k(z,K,n){K===void 0&&(K=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=z,this.alpha_=z?Math.exp(Math.log(.5)/z):0,this.estimate_=K,this.totalWeight_=n}var B=k.prototype;return B.sample=function(K,n){var M=Math.pow(this.alpha_,K);this.estimate_=n*(1-M)+M*this.estimate_,this.totalWeight_+=K},B.getTotalWeight=function(){return this.totalWeight_},B.getEstimate=function(){if(this.alpha_){var K=1-Math.pow(this.alpha_,this.totalWeight_);if(K)return this.estimate_/K}return this.estimate_},k}();G.default=V},"./src/utils/fetch-loader.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"fetchSupported",function(){return c});var V=P("./src/polyfills/number.ts"),k=P("./src/loader/load-stats.ts"),B=P("./src/demux/chunk-cache.ts");function z(a,O){a.prototype=Object.create(O.prototype),a.prototype.constructor=a,m(a,O)}function K(a){var O=typeof Map=="function"?new Map:void 0;return K=function(S){if(S===null||!y(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(S))return O.get(S);O.set(S,L)}function L(){return n(S,arguments,g(this).constructor)}return L.prototype=Object.create(S.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),m(L,S)},K(a)}function n(a,O,w){return M()?n=Reflect.construct:n=function(L,D,A){var T=[null];T.push.apply(T,D);var x=Function.bind.apply(L,T),d=new x;return A&&m(d,A.prototype),d},n.apply(null,arguments)}function M(){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(a){return!1}}function y(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function m(a,O){return m=Object.setPrototypeOf||function(S,L){return S.__proto__=L,S},m(a,O)}function g(a){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},g(a)}function u(){return u=Object.assign||function(a){for(var O=1;O<arguments.length;O++){var w=arguments[O];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(a[S]=w[S])}return a},u.apply(this,arguments)}function c(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}var f=function(){function a(w){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=w.fetchSetup||l,this.controller=new self.AbortController,this.stats=new k.LoadStats}var O=a.prototype;return O.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},O.abortInternal=function(){var S=this.response;(!S||!S.ok)&&(this.stats.aborted=!0,this.controller.abort())},O.abort=function(){var S;this.abortInternal(),(S=this.callbacks)!==null&&S!==void 0&&S.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},O.load=function(S,L,D){var A=this,T=this.stats;if(T.loading.start)throw new Error("Loader can only be used once.");T.loading.start=self.performance.now();var x=o(S,this.controller.signal),d=D.onProgress,E=S.responseType==="arraybuffer",p=E?"byteLength":"length";this.context=S,this.config=L,this.callbacks=D,this.request=this.fetchSetup(S,x),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){A.abortInternal(),D.onTimeout(T,S,A.response)},L.timeout),self.fetch(this.request).then(function(v){if(A.response=A.loader=v,!v.ok){var C=v.status,F=v.statusText;throw new s(F||"fetch, bad network response",C,v)}return T.loading.first=Math.max(self.performance.now(),T.loading.start),T.total=parseInt(v.headers.get("Content-Length")||"0"),d&&Object(V.isFiniteNumber)(L.highWaterMark)?A.loadProgressively(v,T,S,L.highWaterMark,d):E?v.arrayBuffer():v.text()}).then(function(v){var C=A.response;self.clearTimeout(A.requestTimeout),T.loading.end=Math.max(self.performance.now(),T.loading.first),T.loaded=T.total=v[p];var F={url:C.url,data:v};d&&!Object(V.isFiniteNumber)(L.highWaterMark)&&d(T,S,v,C),D.onSuccess(F,T,S,C)}).catch(function(v){if(self.clearTimeout(A.requestTimeout),T.aborted)return;var C=v.code||0;D.onError({code:C,text:v.message},S,v.details)})},O.getCacheAge=function(){var S=null;if(this.response){var L=this.response.headers.get("age");S=L?parseFloat(L):null}return S},O.loadProgressively=function(S,L,D,A,T){A===void 0&&(A=0);var x=new B.default,d=S.body.getReader(),E=function p(){return d.read().then(function(v){if(v.done)return x.dataLength&&T(L,D,x.flush(),S),Promise.resolve(new ArrayBuffer(0));var C=v.value,F=C.length;return L.loaded+=F,F<A||x.dataLength?(x.push(C),x.dataLength>=A&&T(L,D,x.flush(),S)):T(L,D,C,S),p()}).catch(function(){return Promise.reject()})};return E()},a}();function o(a,O){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(u({},a.headers))};return a.rangeEnd&&w.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),w}function l(a,O){return new self.Request(a.url,O)}var s=function(a){z(O,a);function O(w,S,L){var D;return D=a.call(this,w)||this,D.code=void 0,D.details=void 0,D.code=S,D.details=L,D}return O}(K(Error));G.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"IMSC1_CODEC",function(){return y}),P.d(G,"parseIMSC1",function(){return c});var V=P("./src/utils/mp4-tools.ts"),k=P("./src/utils/vttparser.ts"),B=P("./src/utils/vttcue.ts"),z=P("./src/demux/id3.ts"),K=P("./src/utils/timescale-conversion.ts"),n=P("./src/utils/webvtt-parser.ts");function M(){return M=Object.assign||function(A){for(var T=1;T<arguments.length;T++){var x=arguments[T];for(var d in x)Object.prototype.hasOwnProperty.call(x,d)&&(A[d]=x[d])}return A},M.apply(this,arguments)}var y="stpp.ttml.im1t",m=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,g=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,u={left:"start",center:"center",right:"end",start:"start",end:"end"};function c(A,T,x,d,E){var p=Object(V.findBox)(new Uint8Array(A),["mdat"]);if(p.length===0){E(new Error("Could not parse IMSC1 mdat"));return}var v=p[0],C=Object(z.utf8ArrayToStr)(new Uint8Array(A,v.start,v.end-v.start)),F=Object(K.toTimescaleFromScale)(T,1,x);try{d(f(C,F))}catch(R){E(R)}}function f(A,T){var x=new DOMParser,d=x.parseFromString(A,"text/xml"),E=d.getElementsByTagName("tt")[0];if(!E)throw new Error("Invalid ttml");var p={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},v=Object.keys(p).reduce(function(U,b){return U[b]=E.getAttribute("ttp:"+b)||p[b],U},{}),C=E.getAttribute("xml:space")!=="preserve",F=l(o(E,"styling","style")),R=l(o(E,"layout","region")),j=o(E,"body","[begin]");return[].map.call(j,function(U){var b=s(U,C);if(!b||!U.hasAttribute("begin"))return null;var Q=S(U.getAttribute("begin"),v),ee=S(U.getAttribute("dur"),v),oe=S(U.getAttribute("end"),v);if(Q===null)throw w(U);if(oe===null){if(ee===null)throw w(U);oe=Q+ee}var fe=new B.default(Q-T,oe-T,b);fe.id=Object(n.generateCueId)(fe.startTime,fe.endTime,fe.text);var Fe=R[U.getAttribute("region")],Le=F[U.getAttribute("style")];fe.position=10,fe.size=80;var Ie=a(Fe,Le),Be=Ie.textAlign;if(Be){var We=u[Be];We&&(fe.lineAlign=We),fe.align=Be}return M(fe,Ie),fe}).filter(function(U){return U!==null})}function o(A,T,x){var d=A.getElementsByTagName(T)[0];return d?[].slice.call(d.querySelectorAll(x)):[]}function l(A){return A.reduce(function(T,x){var d=x.getAttribute("xml:id");return d&&(T[d]=x),T},{})}function s(A,T){return[].slice.call(A.childNodes).reduce(function(x,d,E){var p;return d.nodeName==="br"&&E?x+`
|
|
`:(p=d.childNodes)!==null&&p!==void 0&&p.length?s(d,T):T?x+d.textContent.trim().replace(/\s+/g," "):x+d.textContent},"")}function a(A,T){var x="http://www.w3.org/ns/ttml#styling",d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return d.reduce(function(E,p){var v=O(T,x,p)||O(A,x,p);return v&&(E[p]=v),E},{})}function O(A,T,x){return A.hasAttributeNS(T,x)?A.getAttributeNS(T,x):null}function w(A){return new Error("Could not parse ttml timestamp "+A)}function S(A,T){if(!A)return null;var x=Object(k.parseTimeStamp)(A);return x===null&&(m.test(A)?x=L(A,T):g.test(A)&&(x=D(A,T))),x}function L(A,T){var x=m.exec(A),d=(x[4]|0)+(x[5]|0)/T.subFrameRate;return(x[1]|0)*3600+(x[2]|0)*60+(x[3]|0)+d/T.frameRate}function D(A,T){var x=g.exec(A),d=Number(x[1]),E=x[2];switch(E){case"h":return d*3600;case"m":return d*60;case"ms":return d*1e3;case"f":return d/T.frameRate;case"t":return d/T.tickRate}return d}},"./src/utils/logger.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"enableLogs",function(){return n}),P.d(G,"logger",function(){return M});var V=function(){},k={trace:V,debug:V,log:V,warn:V,info:V,error:V},B=k;function z(y){var m=self.console[y];return m?m.bind(self.console,"["+y+"] >"):V}function K(y){for(var m=arguments.length,g=new Array(m>1?m-1:0),u=1;u<m;u++)g[u-1]=arguments[u];g.forEach(function(c){B[c]=y[c]?y[c].bind(y):z(c)})}function n(y){if(self.console&&y===!0||typeof y=="object"){K(y,"debug","log","info","warn","error");try{B.log()}catch(m){B=k}}else B=k}var M=B},"./src/utils/mediakeys-helper.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"KeySystems",function(){return V}),P.d(G,"requestMediaKeySystemAccess",function(){return k});var V;(function(B){B.WIDEVINE="com.widevine.alpha",B.PLAYREADY="com.microsoft.playready"})(V||(V={}));var k=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"bin2str",function(){return K}),P.d(G,"readUint16",function(){return n}),P.d(G,"readUint32",function(){return M}),P.d(G,"writeUint32",function(){return y}),P.d(G,"findBox",function(){return m}),P.d(G,"parseSegmentIndex",function(){return g}),P.d(G,"parseInitSegment",function(){return u}),P.d(G,"getStartDTS",function(){return c}),P.d(G,"getDuration",function(){return f}),P.d(G,"computeRawDurationFromSamples",function(){return o}),P.d(G,"offsetStartDTS",function(){return l}),P.d(G,"segmentValidRange",function(){return s}),P.d(G,"appendUint8Array",function(){return a});var V=P("./src/utils/typed-array.ts"),k=P("./src/loader/fragment.ts"),B=Math.pow(2,32)-1,z=[].push;function K(O){return String.fromCharCode.apply(null,O)}function n(O,w){"data"in O&&(w+=O.start,O=O.data);var S=O[w]<<8|O[w+1];return S<0?65536+S:S}function M(O,w){"data"in O&&(w+=O.start,O=O.data);var S=O[w]<<24|O[w+1]<<16|O[w+2]<<8|O[w+3];return S<0?4294967296+S:S}function y(O,w,S){"data"in O&&(w+=O.start,O=O.data),O[w]=S>>24,O[w+1]=S>>16&255,O[w+2]=S>>8&255,O[w+3]=S&255}function m(O,w){var S=[];if(!w.length)return S;var L,D,A;"data"in O?(L=O.data,D=O.start,A=O.end):(L=O,D=0,A=L.byteLength);for(var T=D;T<A;){var x=M(L,T),d=K(L.subarray(T+4,T+8)),E=x>1?T+x:A;if(d===w[0])if(w.length===1)S.push({data:L,start:T+8,end:E});else{var p=m({data:L,start:T+8,end:E},w.slice(1));p.length&&z.apply(S,p)}T=E}return S}function g(O){var w=m(O,["moov"]),S=w[0],L=S?S.end:null,D=m(O,["sidx"]);if(!D||!D[0])return null;var A=[],T=D[0],x=T.data[0],d=x===0?8:16,E=M(T,d);d+=4;var p=0,v=0;x===0?d+=8:d+=16,d+=2;var C=T.end+v,F=n(T,d);d+=2;for(var R=0;R<F;R++){var j=d,U=M(T,j);j+=4;var b=U&2147483647,Q=(U&2147483648)>>>31;if(Q===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=M(T,j);j+=4,A.push({referenceSize:b,subsegmentDuration:ee,info:{duration:ee/E,start:C,end:C+b-1}}),C+=b,j+=4,d=j}return{earliestPresentationTime:p,timescale:E,version:x,referencesCount:F,references:A,moovEndOffset:L}}function u(O){for(var w=[],S=m(O,["moov","trak"]),L=0;L<S.length;L++){var D=S[L],A=m(D,["tkhd"])[0];if(A){var T=A.data[A.start],x=T===0?12:20,d=M(A,x),E=m(D,["mdia","mdhd"])[0];if(E){T=E.data[E.start],x=T===0?12:20;var p=M(E,x),v=m(D,["mdia","hdlr"])[0];if(v){var C=K(v.data.subarray(v.start+8,v.start+12)),F={soun:k.ElementaryStreamTypes.AUDIO,vide:k.ElementaryStreamTypes.VIDEO}[C];if(F){var R=m(D,["mdia","minf","stbl","stsd"])[0],j=void 0;R&&(j=K(R.data.subarray(R.start+12,R.start+16))),w[d]={timescale:p,type:F},w[F]={timescale:p,id:d,codec:j}}}}}}var U=m(O,["moov","mvex","trex"]);return U.forEach(function(b){var Q=M(b,4),ee=w[Q];ee&&(ee.default={duration:M(b,12),flags:M(b,20)})}),w}function c(O,w){return m(w,["moof","traf"]).reduce(function(S,L){var D=m(L,["tfdt"])[0],A=D.data[D.start],T=m(L,["tfhd"]).reduce(function(x,d){var E=M(d,4),p=O[E];if(p){var v=M(D,4);A===1&&(v*=Math.pow(2,32),v+=M(D,8));var C=p.timescale||9e4,F=v/C;if(isFinite(F)&&(x===null||F<x))return F}return x},null);return T!==null&&isFinite(T)&&(S===null||T<S)?T:S},null)||0}function f(O,w){for(var S=0,L=0,D=0,A=m(O,["moof","traf"]),T=0;T<A.length;T++){var x=A[T],d=m(x,["tfhd"])[0],E=M(d,4),p=w[E];if(!p)continue;var v=p.default,C=M(d,0)|(v==null?void 0:v.flags),F=v==null?void 0:v.duration;C&8&&(C&2?F=M(d,12):F=M(d,8));for(var R=p.timescale||9e4,j=m(x,["trun"]),U=0;U<j.length;U++){if(F){var b=M(j[U],4);S=F*b}else S=o(j[U]);p.type===k.ElementaryStreamTypes.VIDEO?L+=S/R:p.type===k.ElementaryStreamTypes.AUDIO&&(D+=S/R)}}if(L===0&&D===0){var Q=g(O);if(Q!=null&&Q.references)return Q.references.reduce(function(ee,oe){return ee+oe.info.duration||0},0)}return L||D}function o(O){var w=M(O,0),S=8;w&1&&(S+=4),w&4&&(S+=4);for(var L=0,D=M(O,4),A=0;A<D;A++){if(w&256){var T=M(O,S);L+=T,S+=4}w&512&&(S+=4),w&1024&&(S+=4),w&2048&&(S+=4)}return L}function l(O,w,S){m(w,["moof","traf"]).forEach(function(L){m(L,["tfhd"]).forEach(function(D){var A=M(D,4),T=O[A];if(!T)return;var x=T.timescale||9e4;m(L,["tfdt"]).forEach(function(d){var E=d.data[d.start],p=M(d,4);if(E===0)y(d,4,p-S*x);else{p*=Math.pow(2,32),p+=M(d,8),p-=S*x,p=Math.max(p,0);var v=Math.floor(p/(B+1)),C=Math.floor(p%(B+1));y(d,4,v),y(d,8,C)}})})})}function s(O){var w={valid:null,remainder:null},S=m(O,["moof"]);if(S){if(S.length<2)return w.remainder=O,w}else return w;var L=S[S.length-1];return w.valid=Object(V.sliceUint8)(O,0,L.start-8),w.remainder=Object(V.sliceUint8)(O,L.start-8),w}function a(O,w){var S=new Uint8Array(O.length+w.length);return S.set(O),S.set(w,O.length),S}},"./src/utils/output-filter.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"default",function(){return V});var V=function(){function k(z,K){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=z,this.trackName=K}var B=k.prototype;return B.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},B.newCue=function(K,n,M){(this.startTime===null||this.startTime>K)&&(this.startTime=K),this.endTime=n,this.screen=M,this.timelineController.createCaptionsTrack(this.trackName)},B.reset=function(){this.cueRanges=[]},k}()},"./src/utils/texttrack-utils.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"sendAddTrackEvent",function(){return k}),P.d(G,"addCueToTrack",function(){return B}),P.d(G,"clearCurrentCues",function(){return z}),P.d(G,"removeCuesInRange",function(){return K}),P.d(G,"getCuesInRange",function(){return M});var V=P("./src/utils/logger.ts");function k(y,m){var g;try{g=new Event("addtrack")}catch(u){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=y,m.dispatchEvent(g)}function B(y,m){var g=y.mode;if(g==="disabled"&&(y.mode="hidden"),y.cues&&!y.cues.getCueById(m.id))try{if(y.addCue(m),!y.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(c){V.logger.debug("[texttrack-utils]: "+c);var u=new self.TextTrackCue(m.startTime,m.endTime,m.text);u.id=m.id,y.addCue(u)}g==="disabled"&&(y.mode=g)}function z(y){var m=y.mode;if(m==="disabled"&&(y.mode="hidden"),y.cues)for(var g=y.cues.length;g--;)y.removeCue(y.cues[g]);m==="disabled"&&(y.mode=m)}function K(y,m,g){var u=y.mode;if(u==="disabled"&&(y.mode="hidden"),y.cues&&y.cues.length>0)for(var c=M(y.cues,m,g),f=0;f<c.length;f++)y.removeCue(c[f]);u==="disabled"&&(y.mode=u)}function n(y,m){if(m<y[0].startTime)return 0;var g=y.length-1;if(m>y[g].endTime)return-1;for(var u=0,c=g;u<=c;){var f=Math.floor((c+u)/2);if(m<y[f].startTime)c=f-1;else if(m>y[f].startTime&&u<g)u=f+1;else return f}return y[u].startTime-m<m-y[c].startTime?u:c}function M(y,m,g){var u=[],c=n(y,m);if(c>-1)for(var f=c,o=y.length;f<o;f++){var l=y[f];if(l.startTime>=m&&l.endTime<=g)u.push(l);else if(l.startTime>g)return u}return u}},"./src/utils/time-ranges.ts":function(ie,G,P){"use strict";P.r(G);var V={toString:function(B){for(var z="",K=B.length,n=0;n<K;n++)z+="["+B.start(n).toFixed(3)+","+B.end(n).toFixed(3)+"]";return z}};G.default=V},"./src/utils/timescale-conversion.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"toTimescaleFromBase",function(){return k}),P.d(G,"toTimescaleFromScale",function(){return B}),P.d(G,"toMsFromMpegTsClock",function(){return z}),P.d(G,"toMpegTsClockFromTimescale",function(){return K});var V=9e4;function k(n,M,y,m){y===void 0&&(y=1),m===void 0&&(m=!1);var g=n*M*y;return m?Math.round(g):g}function B(n,M,y,m){return y===void 0&&(y=1),m===void 0&&(m=!1),k(n,M,1/y,m)}function z(n,M){return M===void 0&&(M=!1),k(n,1e3,1/V,M)}function K(n,M){return M===void 0&&(M=1),k(n,V,1/M)}},"./src/utils/typed-array.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"sliceUint8",function(){return V});function V(k,B,z){return Uint8Array.prototype.slice?k.slice(B,z):new Uint8Array(Array.prototype.slice.call(k,B,z))}},"./src/utils/vttcue.ts":function(ie,G,P){"use strict";P.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],k=["start","middle","end","left","right"];function B(y,m){if(typeof m!="string")return!1;if(!Array.isArray(y))return!1;var g=m.toLowerCase();return~y.indexOf(g)?g:!1}function z(y){return B(V,y)}function K(y){return B(k,y)}function n(y){for(var m=arguments.length,g=new Array(m>1?m-1:0),u=1;u<m;u++)g[u-1]=arguments[u];for(var c=1;c<arguments.length;c++){var f=arguments[c];for(var o in f)y[o]=f[o]}return y}function M(y,m,g){var u=this,c={enumerable:!0};u.hasBeenReset=!1;var f="",o=!1,l=y,s=m,a=g,O=null,w="",S=!0,L="auto",D="start",A=50,T="middle",x=50,d="middle";Object.defineProperty(u,"id",n({},c,{get:function(){return f},set:function(p){f=""+p}})),Object.defineProperty(u,"pauseOnExit",n({},c,{get:function(){return o},set:function(p){o=!!p}})),Object.defineProperty(u,"startTime",n({},c,{get:function(){return l},set:function(p){if(typeof p!="number")throw new TypeError("Start time must be set to a number.");l=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",n({},c,{get:function(){return s},set:function(p){if(typeof p!="number")throw new TypeError("End time must be set to a number.");s=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",n({},c,{get:function(){return a},set:function(p){a=""+p,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",n({},c,{get:function(){return O},set:function(p){O=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",n({},c,{get:function(){return w},set:function(p){var v=z(p);if(v===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",n({},c,{get:function(){return S},set:function(p){S=!!p,this.hasBeenReset=!0}})),Object.defineProperty(u,"line",n({},c,{get:function(){return L},set:function(p){if(typeof p!="number"&&p!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"lineAlign",n({},c,{get:function(){return D},set:function(p){var v=K(p);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");D=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",n({},c,{get:function(){return A},set:function(p){if(p<0||p>100)throw new Error("Position must be between 0 and 100.");A=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",n({},c,{get:function(){return T},set:function(p){var v=K(p);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");T=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",n({},c,{get:function(){return x},set:function(p){if(p<0||p>100)throw new Error("Size must be between 0 and 100.");x=p,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",n({},c,{get:function(){return d},set:function(p){var v=K(p);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");d=v,this.hasBeenReset=!0}})),u.displayState=void 0}return M.prototype.getCueAsHTML=function(){var y=self.WebVTT;return y.convertCueToDOMTree(self,this.text)},M}()},"./src/utils/vttparser.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"parseTimeStamp",function(){return B}),P.d(G,"fixLineBreaks",function(){return m}),P.d(G,"VTTParser",function(){return g});var V=P("./src/utils/vttcue.ts"),k=function(){function u(){}var c=u.prototype;return c.decode=function(o,l){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},u}();function B(u){function c(o,l,s,a){return(o|0)*3600+(l|0)*60+(s|0)+parseFloat(a||0)}var f=u.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?c(f[2],f[3],0,f[4]):c(f[1],f[2],f[3],f[4]):null}var z=function(){function u(){this.values=Object.create(null)}var c=u.prototype;return c.set=function(o,l){!this.get(o)&&l!==""&&(this.values[o]=l)},c.get=function(o,l,s){return s?this.has(o)?this.values[o]:l[s]:this.has(o)?this.values[o]:l},c.has=function(o){return o in this.values},c.alt=function(o,l,s){for(var a=0;a<s.length;++a)if(l===s[a]){this.set(o,l);break}},c.integer=function(o,l){/^-?\d+$/.test(l)&&this.set(o,parseInt(l,10))},c.percent=function(o,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var s=parseFloat(l);if(s>=0&&s<=100)return this.set(o,s),!0}return!1},u}();function K(u,c,f,o){var l=o?u.split(o):[u];for(var s in l){if(typeof l[s]!="string")continue;var a=l[s].split(f);if(a.length!==2)continue;var O=a[0],w=a[1];c(O,w)}}var n=new V.default(0,0,""),M=n.align==="middle"?"middle":"center";function y(u,c,f){var o=u;function l(){var O=B(u);if(O===null)throw new Error("Malformed timestamp: "+o);return u=u.replace(/^[^\sa-zA-Z-]+/,""),O}function s(O,w){var S=new z;K(O,function(A,T){var x;switch(A){case"region":for(var d=f.length-1;d>=0;d--)if(f[d].id===T){S.set(A,f[d].region);break}break;case"vertical":S.alt(A,T,["rl","lr"]);break;case"line":x=T.split(","),S.integer(A,x[0]),S.percent(A,x[0])&&S.set("snapToLines",!1),S.alt(A,x[0],["auto"]),x.length===2&&S.alt("lineAlign",x[1],["start",M,"end"]);break;case"position":x=T.split(","),S.percent(A,x[0]),x.length===2&&S.alt("positionAlign",x[1],["start",M,"end","line-left","line-right","auto"]);break;case"size":S.percent(A,T);break;case"align":S.alt(A,T,["start",M,"end","left","right"]);break}},/:/,/\s/),w.region=S.get("region",null),w.vertical=S.get("vertical","");var L=S.get("line","auto");L==="auto"&&n.line===-1&&(L=-1),w.line=L,w.lineAlign=S.get("lineAlign","start"),w.snapToLines=S.get("snapToLines",!0),w.size=S.get("size",100),w.align=S.get("align",M);var D=S.get("position","auto");D==="auto"&&n.position===50&&(D=w.align==="start"||w.align==="left"?0:w.align==="end"||w.align==="right"?100:50),w.position=D}function a(){u=u.replace(/^\s+/,"")}if(a(),c.startTime=l(),a(),u.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);u=u.substr(3),a(),c.endTime=l(),a(),s(u,c)}function m(u){return u.replace(/<br(?: \/)?>/gi,`
|
|
`)}var g=function(){function u(){this.state="INITIAL",this.buffer="",this.decoder=new k,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var c=u.prototype;return c.parse=function(o){var l=this;o&&(l.buffer+=l.decoder.decode(o,{stream:!0}));function s(){var D=l.buffer,A=0;for(D=m(D);A<D.length&&D[A]!=="\r"&&D[A]!==`
|
|
`;)++A;var T=D.substr(0,A);return D[A]==="\r"&&++A,D[A]===`
|
|
`&&++A,l.buffer=D.substr(A),T}function a(D){K(D,function(A,T){},/:/)}try{var O="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;O=s();var w=O.match(/^()?WEBVTT([ \t].*)?$/);if(!w||!w[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var S=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;S?S=!1:O=s();switch(l.state){case"HEADER":/:/.test(O)?a(O):O||(l.state="ID");continue;case"NOTE":O||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(O)){l.state="NOTE";break}if(!O)continue;if(l.cue=new V.default(0,0,""),l.state="CUE",O.indexOf("-->")===-1){l.cue.id=O;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{y(O,l.cue,l.regionList)}catch(D){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var L=O.indexOf("-->")!==-1;if(!O||L&&(S=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
|
|
`),l.cue.text+=O}continue;case"BADCUE":O||(l.state="ID")}}}catch(D){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},c.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
|
|
|
|
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(l){o.onparsingerror&&o.onparsingerror(l)}return o.onflush&&o.onflush(),this},u}()},"./src/utils/webvtt-parser.ts":function(ie,G,P){"use strict";P.r(G),P.d(G,"generateCueId",function(){return g}),P.d(G,"parseWebVTT",function(){return c});var V=P("./src/polyfills/number.ts"),k=P("./src/utils/vttparser.ts"),B=P("./src/demux/id3.ts"),z=P("./src/utils/timescale-conversion.ts"),K=P("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,M=function(o,l,s){return s===void 0&&(s=0),o.substr(s,l.length)===l},y=function(o){var l=parseInt(o.substr(-3)),s=parseInt(o.substr(-6,2)),a=parseInt(o.substr(-9,2)),O=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(l)||!Object(V.isFiniteNumber)(s)||!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(O))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return l+=1e3*s,l+=60*1e3*a,l+=60*60*1e3*O,l},m=function(o){for(var l=5381,s=o.length;s;)l=l*33^o.charCodeAt(--s);return(l>>>0).toString()};function g(f,o,l){return m(f.toString())+m(o.toString())+m(l)}var u=function(o,l,s){var a=o[l],O=o[a.prevCC];if(!O||!O.new&&a.new){o.ccOffset=o.presentationOffset=a.start,a.new=!1;return}for(;(w=O)!==null&&w!==void 0&&w.new;){var w;o.ccOffset+=a.start-O.start,a.new=!1,a=O,O=o[a.prevCC]}o.presentationOffset=s};function c(f,o,l,s,a,O,w,S){var L=new k.VTTParser,D=Object(B.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(n,`
|
|
`).split(`
|
|
`),A=[],T=Object(z.toMpegTsClockFromTimescale)(o,l),x="00:00.000",d=0,E=0,p,v=!0,C=!1;L.oncue=function(F){var R=s[a],j=s.ccOffset,U=(d-T)/9e4;if(R!=null&&R.new&&(E!==void 0?j=s.ccOffset=R.start:u(s,a,U)),U&&(j=U-s.presentationOffset),C){var b=F.endTime-F.startTime,Q=Object(K.normalizePts)((F.startTime+j-E)*9e4,O*9e4)/9e4;F.startTime=Q,F.endTime=Q+b}var ee=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(ee)),F.id||(F.id=g(F.startTime,F.endTime,ee)),F.endTime>0&&A.push(F)},L.onparsingerror=function(F){p=F},L.onflush=function(){if(p){S(p);return}w(A)},D.forEach(function(F){if(v)if(M(F,"X-TIMESTAMP-MAP=")){v=!1,C=!0,F.substr(16).split(",").forEach(function(R){M(R,"LOCAL:")?x=R.substr(6):M(R,"MPEGTS:")&&(d=parseInt(R.substr(7)))});try{E=y(x)/1e3}catch(R){C=!1,p=R}return}else F===""&&(v=!1);L.parse(F+`
|
|
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(ie,G,P){"use strict";P.r(G);var V=P("./src/utils/logger.ts"),k=P("./src/loader/load-stats.ts"),B=/^age:\s*[\d.]+\s*$/m,z=function(){function K(M){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=M?M.xhrSetup:null,this.stats=new k.LoadStats,this.retryDelay=0}var n=K.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var y=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),y&&(y.onreadystatechange=null,y.onprogress=null,y.readyState!==4&&(this.stats.aborted=!0,y.abort()))},n.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(y,m,g){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=y,this.config=m,this.callbacks=g,this.retryDelay=m.retryDelay,this.loadInternal()},n.loadInternal=function(){var y=this.config,m=this.context;if(!y)return;var g=this.loader=new self.XMLHttpRequest,u=this.stats;u.loading.first=0,u.loaded=0;var c=this.xhrSetup;try{if(c)try{c(g,m.url)}catch(l){g.open("GET",m.url,!0),c(g,m.url)}g.readyState||g.open("GET",m.url,!0);var f=this.context.headers;if(f)for(var o in f)g.setRequestHeader(o,f[o])}catch(l){this.callbacks.onError({code:g.status,text:l.message},m,g);return}m.rangeEnd&&g.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),g.onreadystatechange=this.readystatechange.bind(this),g.onprogress=this.loadprogress.bind(this),g.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),y.timeout),g.send()},n.readystatechange=function(){var y=this.context,m=this.loader,g=this.stats;if(!y||!m)return;var u=m.readyState,c=this.config;if(g.aborted)return;if(u>=2)if(self.clearTimeout(this.requestTimeout),g.loading.first===0&&(g.loading.first=Math.max(self.performance.now(),g.loading.start)),u===4){m.onreadystatechange=null,m.onprogress=null;var f=m.status;if(f>=200&&f<300){g.loading.end=Math.max(self.performance.now(),g.loading.first);var o,l;if(y.responseType==="arraybuffer"?(o=m.response,l=o.byteLength):(o=m.responseText,l=o.length),g.loaded=g.total=l,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(g,y,o,m),!this.callbacks)return;var a={url:m.responseURL,data:o};this.callbacks.onSuccess(a,g,y,m)}else g.retry>=c.maxRetry||f>=400&&f<499?(V.logger.error(f+" while loading "+y.url),this.callbacks.onError({code:f,text:m.statusText},y,m)):(V.logger.warn(f+" while loading "+y.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,c.maxRetryDelay),g.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),c.timeout)},n.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var y=this.callbacks;y&&(this.abortInternal(),y.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(y){var m=this.stats;m.loaded=y.loaded,y.lengthComputable&&(m.total=y.total)},n.getCacheAge=function(){var y=null;if(this.loader&&B.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");y=m?parseFloat(m):null}return y},K}();G.default=z}}).default})},vHTk:function(it,ve,W){it.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},xiVL:function(it,ve){it.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC"},xvzu:function(it,ve,W){it.exports={flex_box_center:"flex_box_center___11Yx1",flex_space_between:"flex_space_between___3B8wg",flex_box_vertical_center:"flex_box_vertical_center___1cm8r",flex_box_center_end:"flex_box_center_end___2h7Wz",flex_box_column:"flex_box_column___1vJbd",wrap:"wrap___30mNN",modal:"modal___39YWi",titleWrap:"titleWrap___25lJO",required:"required___2_KP9",title:"title___dFjtB",colorGray:"colorGray___3RoHj",choiceWrap:"choiceWrap___14CFD",answer:"answer___10oFr",activeAnswer:"activeAnswer___S76uT",deleteIcon:"deleteIcon___kKaJg",addIcon:"addIcon___3w3u_",editorWrap:"editorWrap___3DrnO",htmlWrap:"htmlWrap___1tGnP",radio:"radio___24YhJ",color333:"color333___1O71o",color999:"color999___xHfER",questionType:"questionType___22Z7J",questionChoices:"questionChoices____Unas"}},ygoZ:function(it,ve){it.exports="data:image/png;base64,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"},z4EP:function(it,ve){it.exports="data:image/png;base64,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"}}]);
|