(window.webpackJsonp=window.webpackJsonp||[]).push([[101,5,7,8,14],{"+ua5":function(st,ve,z){},"/cxE":function(st,ve,z){"use strict";z.d(ve,"f",function(){return A}),z.d(ve,"g",function(){return U}),z.d(ve,"h",function(){return O}),z.d(ve,"e",function(){return H}),z.d(ve,"b",function(){return F}),z.d(ve,"c",function(){return e}),z.d(ve,"d",function(){return C}),z.d(ve,"a",function(){return f});class q{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
`+p.stack):p},0)}}emit(p){this.listeners.forEach(o=>{o(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const j=new q;function A(p){H(p)||j.onUnexpectedError(p);return}function U(p){H(p)||j.onUnexpectedExternalError(p);return}function O(p){if(p instanceof Error){let{name:o,message:a}=p;const r=p.stacktrace||p.stack;return{$isError:!0,name:o,message:a,stack:r}}return p}const M="Canceled";function H(p){return p instanceof Error&&p.name===M&&p.message===M}function F(){const p=new Error(M);return p.name=p.message,p}function e(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function C(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class f extends Error{constructor(p){super("NotSupported");p&&(this.message=p)}}},"24hK":function(st,ve,z){"use strict";z.d(ve,"a",function(){return j});class q{constructor(A){this.element=A,this.next=q.Undefined,this.prev=q.Undefined}}q.Undefined=new q(void 0);class j{constructor(){this._first=q.Undefined,this._last=q.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===q.Undefined}clear(){let A=this._first;for(;A!==q.Undefined;){const U=A.next;A.prev=q.Undefined,A.next=q.Undefined,A=U}this._first=q.Undefined,this._last=q.Undefined,this._size=0}unshift(A){return this._insert(A,!1)}push(A){return this._insert(A,!0)}_insert(A,U){const O=new q(A);if(this._first===q.Undefined)this._first=O,this._last=O;else if(U){const H=this._last;this._last=O,O.prev=H,H.next=O}else{const H=this._first;this._first=O,O.next=H,H.prev=O}this._size+=1;let M=!1;return()=>{M||(M=!0,this._remove(O))}}shift(){if(this._first===q.Undefined)return;{const A=this._first.element;return this._remove(this._first),A}}pop(){if(this._last===q.Undefined)return;{const A=this._last.element;return this._remove(this._last),A}}_remove(A){if(A.prev!==q.Undefined&&A.next!==q.Undefined){const U=A.prev;U.next=A.next,A.next.prev=U}else A.prev===q.Undefined&&A.next===q.Undefined?(this._first=q.Undefined,this._last=q.Undefined):A.next===q.Undefined?(this._last=this._last.prev,this._last.next=q.Undefined):A.prev===q.Undefined&&(this._first=this._first.next,this._first.prev=q.Undefined);this._size-=1}*[Symbol.iterator](){let A=this._first;for(;A!==q.Undefined;)yield A.element,A=A.next}}},"3/fG":function(st,ve,z){"use strict";z.d(ve,"a",function(){return j});function q(A,U){let O;return U.length===0?O=A:O=A.replace(/\{(\d+)\}/g,function(M,H){const F=H[0];return typeof U[F]!="undefined"?U[F]:M}),O}function j(A,U,...O){return q(U,O)}},"479L":function(st,ve){st.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAWCAYAAAAvg9c4AAAAAXNSR0IArs4c6QAABPdJREFUSEullWloHGUYx//vzO7sHDuzm93sZpM2l/SgRyK7xSYxrfYgbdUq6JcixXqAUrxItGAVMT1A+kH7Re1WWppa6afiAYJIi7ZB07vkIARzVJqYbJMmu90zszOzM6/MVEXQotR3mPky8/7e//N7ZuYl+J+jt7fX7/f7i/X19cU/UORemZRSZnBwsKNQKLztdrtHOI57sqGhYcbm3ROUUsoOD4++Mz9f2CtJItE0DaVSqTMWi+27Jyil1DM0NLTfsmgHpZbLhthQSmlfTU3NmkgkUvjPSSmlZGRkZI2maZ2mWdpAGBehpgnd0KBpOkzTLPn9/gei0Wjfv0JHR0cXGpq2xTDNHZTSJsu0OJNaIIRFUc07KXXdgGVZCAQCL7e0tMT/Br3ja3iRaZptlmU9YVHayhBGoAApGTpKhgHCsFCLRaRvp+yEtk9QaiEYDHy0cWPb639CbdjAwADP8/zRkmk9BYADIU4nLUqdycX5Agxdh4cXkLh5E8m5WTD2A4SAZVmEwxVnNm3a9AiJx+MrdSI8nslm25YtqlMaVi6LWab1+2IUFIB9NXQDuUwapmFAUnwYHBhAOp0Ex3nAcRx4QUA4FL62ecuWVnL01Om8V1YkXdewpMoLn6zYC4NhGLhcLng4t4OdnEognUqCIQSSJOPipYvI5gsQBBGyV4KiyAgFgz83NDauImevDtFUJo+ZqXGsW7UcvjK/zQDDEBBCHF+pZBKTU1NOl1mWgYfnMTNzy1FTWbUA6UzWuVce9N2QRKmRfP3d9zSRLOBS9xlsbVsLv893p2TLcjzqhgGtqEEvGWAI47izyx27ft2ppq6uHpIoIFcowqfIkz7Fu4LEjxyhVUtX4cuTn2FxdQiiKILYKe3DbpTtwu4Fw4Bzu8F5PGAZFqnbKWdhRVEQDkegm5YNnVhYFVlJ9uzbb2x++iXXxwf2o0Jxg+N5J4ENs/0RlgVLCFwuNyRJhCAITgX+sgCyubzjXZK88Hq9ttuRMr8SI2d+OHdCqFz8zMkjh1SeqqXy8qBsGIbj0rQs56UGpXCxLCRZhiLLmFdVyF4FmmFAUXzw+RRIogSvV+xdUFX5ILl07drBIh/quHD2bNeK+vLLum7ENXUe+Xweqqo6p6brMEsleDweJ1Eul0MgWA7Too6uYCAAryxDEvlzzU1NbeTClSsHDTHScaG7+/D6pmU9k2nt8/TU+NUl91UP53K5dblcrjKfzzOFQsFpmu01k8mgrCwAC4yjygZXVkYgy9LR1paWF0n3jz0fMMGaN8+f6z68oXnp+V/T1omRgd7ju9t3Pp9IJMTZ2dmHMpnMtnQ6/Wg2mw2pqkqy2SzcbjdcnAiOczuJIxUhVIRCu5qbV39Ivj19+oBSvfytyz/1HG5trLs4NU+O3xge6npj53Mv/PUHPj09HR4bG9s+NzfXnkymatSiCoEX4C8rA+fh4eE4GioPrI1Goz3k1Fdf7KlcEuvsu3z1mN9jjY3fSr/vgX5oV/trr/zTrtDf379wYmIinkqlHrMsi8iyDFnxQRCFsdrq6tW1tbW3yXt79z77y42J44KL5FPJOeJiXUb0/oYdu9/t/OZuW42tpa+v75iqqtvy+RwqwiEIvPjJw+vXv+q8011dXXx/f/9WWZaVQCBwE0Bfe3v7NCHE/rDuOmzw+Pj4p4lEYruLZWeqa2o2xmKxIXvCb487Tm3fsdeDAAAAAElFTkSuQmCC"},"55Ip":function(st,ve,z){"use strict";z.d(ve,"a",function(){return i});var q=z("Ty5D"),j=z("dI71"),A=z("q1tI"),U=z.n(A),O=z("YS25"),M=z("17x9"),H=z.n(M),F=z("wx14"),e=z("zLVn"),C=z("9R94"),f=function(c){Object(j.a)(u,c);function u(){for(var b,m=arguments.length,w=new Array(m),I=0;I=0||m.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;c.setState({goInputText:""}),L(c.getValidValue())},c.go=function(m){var w=c.state.goInputText;if(w==="")return;(m.keyCode===a.ENTER||m.type==="click")&&(c.setState({goInputText:""}),c.props.quickGo(c.getValidValue()))},c}return Object(O.a)(y,[{key:"getValidValue",value:function(){var u=this.state,l=u.goInputText,b=u.current;return!l||isNaN(l)?b:Number(l)}},{key:"getPageSizeOptions",value:function(){var u=this.props,l=u.pageSize,b=u.pageSizeOptions;return b.some(function(m){return m.toString()===l.toString()})?b:b.concat([l.toString()]).sort(function(m,w){var I=isNaN(Number(m))?0:Number(m),L=isNaN(Number(w))?0:Number(w);return I-L})}},{key:"render",value:function(){var u=this,l=this.props,b=l.pageSize,m=l.locale,w=l.rootPrefixCls,I=l.changeSize,L=l.quickGo,S=l.goButton,D=l.selectComponentClass,B=l.buildOptionText,R=l.selectPrefixCls,W=l.disabled,Y=this.state.goInputText,se="".concat(w,"-options"),ne=D,Se=null,xe=null,we=null;if(!I&&!L)return null;var Re=this.getPageSizeOptions();if(I&&ne){var Pe=Re.map(function(ye,ee){return e.a.createElement(ne.Option,{key:ee,value:ye.toString()},(B||u.buildOptionText)(ye))});Se=e.a.createElement(ne,{disabled:W,prefixCls:R,showSearch:!1,className:"".concat(se,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(b||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ee){return ee.parentNode}},Pe)}return L&&(S&&(we=typeof S=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(se,"-quick-jumper-button")},m.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),xe=e.a.createElement("div",{className:"".concat(se,"-quick-jumper")},m.jump_to,e.a.createElement("input",{disabled:W,type:"text",value:Y,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),m.page,we)),e.a.createElement("li",{className:"".concat(se)},Se,xe)}}]),y}(e.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=r,s=z("N2Kk");function n(){}function i(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function t(x,E,y){return y}function _(x,E,y){var c=typeof x=="undefined"?E.pageSize:x;return Math.floor((y.total-1)/c)+1}var g=function(x){Object(M.a)(y,x);var E=Object(H.a)(y);function y(c){var u;Object(U.a)(this,y),u=E.call(this,c),u.getJumpPrevPage=function(){return Math.max(1,u.state.current-(u.props.showLessItems?3:5))},u.getJumpNextPage=function(){return Math.min(_(void 0,u.state,u.props),u.state.current+(u.props.showLessItems?3:5))},u.getItemIcon=function(I,L){var S=u.props.prefixCls,D=I||e.a.createElement("button",{type:"button","aria-label":L,className:"".concat(S,"-item-link")});return typeof I=="function"&&(D=e.a.createElement(I,Object(A.a)({},u.props))),D},u.savePaginationNode=function(I){u.paginationNode=I},u.isValid=function(I){return i(I)&&I!==u.state.current},u.shouldDisplayQuickJumper=function(){var I=u.props,L=I.showQuickJumper,S=I.pageSize,D=I.total;return D<=S?!1:L},u.handleKeyDown=function(I){(I.keyCode===a.ARROW_UP||I.keyCode===a.ARROW_DOWN)&&I.preventDefault()},u.handleKeyUp=function(I){var L=u.getValidValue(I),S=u.state.currentInputValue;L!==S&&u.setState({currentInputValue:L}),I.keyCode===a.ENTER?u.handleChange(L):I.keyCode===a.ARROW_UP?u.handleChange(L-1):I.keyCode===a.ARROW_DOWN&&u.handleChange(L+1)},u.changePageSize=function(I){var L=u.state.current,S=_(I,u.state,u.props);L=L>S?S:L,S===0&&(L=u.state.current),typeof I=="number"&&("pageSize"in u.props||u.setState({pageSize:I}),"current"in u.props||u.setState({current:L,currentInputValue:L})),u.props.onShowSizeChange(L,I),"onChange"in u.props&&u.props.onChange&&u.props.onChange(L,I)},u.handleChange=function(I){var L=u.props.disabled,S=I;if(u.isValid(S)&&!L){var D=_(void 0,u.state,u.props);S>D?S=D:S<1&&(S=1),"current"in u.props||u.setState({current:S,currentInputValue:S});var B=u.state.pageSize;return u.props.onChange(S,B),S}return u.state.current},u.prev=function(){u.hasPrev()&&u.handleChange(u.state.current-1)},u.next=function(){u.hasNext()&&u.handleChange(u.state.current+1)},u.jumpPrev=function(){u.handleChange(u.getJumpPrevPage())},u.jumpNext=function(){u.handleChange(u.getJumpNextPage())},u.hasPrev=function(){return u.state.current>1},u.hasNext=function(){return u.state.current<_(void 0,u.state,u.props)},u.runIfEnter=function(I,L){if(I.key==="Enter"||I.charCode===13){for(var S=arguments.length,D=new Array(S>2?S-2:0),B=2;B=b?w=b:w=Number(l),w}},{key:"getShowSizeChanger",value:function(){var u=this.props,l=u.showSizeChanger,b=u.total,m=u.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:b>m}},{key:"renderPrev",value:function(u){var l=this.props,b=l.prevIcon,m=l.itemRender,w=m(u,"prev",this.getItemIcon(b,"prev page")),I=!this.hasPrev();return Object(F.isValidElement)(w)?Object(F.cloneElement)(w,{disabled:I}):w}},{key:"renderNext",value:function(u){var l=this.props,b=l.nextIcon,m=l.itemRender,w=m(u,"next",this.getItemIcon(b,"next page")),I=!this.hasNext();return Object(F.isValidElement)(w)?Object(F.cloneElement)(w,{disabled:I}):w}},{key:"render",value:function(){var u=this,l=this.props,b=l.prefixCls,m=l.className,w=l.style,I=l.disabled,L=l.hideOnSinglePage,S=l.total,D=l.locale,B=l.showQuickJumper,R=l.showLessItems,W=l.showTitle,Y=l.showTotal,se=l.simple,ne=l.itemRender,Se=l.showPrevNextJumpers,xe=l.jumpPrevIcon,we=l.jumpNextIcon,Re=l.selectComponentClass,Pe=l.selectPrefixCls,ye=l.pageSizeOptions,ee=this.state,je=ee.current,et=ee.pageSize,He=ee.currentInputValue;if(L===!0&&S<=et)return null;var Ne=_(void 0,this.state,this.props),Ye=[],Ae=null,Ue=null,Ve=null,Q=null,fe=null,be=B&&B.goButton,Ee=R?1:2,ke=je-1>0?je-1:0,We=je+1=Ee*2&&je!==1+2&&(Ye[0]=Object(F.cloneElement)(Ye[0],{className:"".concat(b,"-item-after-jump-prev")}),Ye.unshift(Ae)),Ne-je>=Ee*2&&je!==Ne-2&&(Ye[Ye.length-1]=Object(F.cloneElement)(Ye[Ye.length-1],{className:"".concat(b,"-item-before-jump-next")}),Ye.push(Ue)),it!==1&&Ye.unshift(Ve),nt!==Ne&&Ye.push(Q)}var pe=null;Y&&(pe=e.a.createElement("li",{className:"".concat(b,"-total-text")},Y(S,[S===0?0:(je-1)*et+1,je*et>S?S:je*et])));var ue=!this.hasPrev()||!Ne,ce=!this.hasNext()||!Ne;return e.a.createElement("ul",Object(q.a)({className:f()(b,m,Object(j.a)({},"".concat(b,"-disabled"),I)),style:w,unselectable:"unselectable",ref:this.savePaginationNode},Xe),pe,e.a.createElement("li",{title:W?D.prev_page:null,onClick:this.prev,tabIndex:ue?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(b,"-prev"),Object(j.a)({},"".concat(b,"-disabled"),ue)),"aria-disabled":ue},this.renderPrev(ke)),Ye,e.a.createElement("li",{title:W?D.next_page:null,onClick:this.next,tabIndex:ce?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(b,"-next"),Object(j.a)({},"".concat(b,"-disabled"),ce)),"aria-disabled":ce},this.renderNext(We)),e.a.createElement(h,{disabled:I,locale:D,rootPrefixCls:b,selectComponentClass:Re,selectPrefixCls:Pe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:je,pageSize:et,pageSizeOptions:ye,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:be}))}}],[{key:"getDerivedStateFromProps",value:function(u,l){var b={};if("current"in u&&(b.current=u.current,u.current!==l.current&&(b.currentInputValue=b.current)),"pageSize"in u&&u.pageSize!==l.pageSize){var m=l.current,w=_(u.pageSize,l,u);m=m>w?w:m,"current"in u||(b.current=m,b.currentInputValue=m),b.pageSize=u.pageSize}return b}}]),y}(e.a.Component);g.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var v=g},"6UM0":function(st,ve,z){var q,j;(function(){var A;(function(){"use strict";var O=[function(e,C,f){var p=f(1).Beautifier,o=f(5).Options;function a(r,h){var s=new p(r,h);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new o}},function(e,C,f){var p=f(2).Output,o=f(3).Token,a=f(4),r=f(5).Options,h=f(7).Tokenizer,s=f(7).line_starters,n=f(7).positionable_operators,i=f(7).TOKEN;function t(R,W){return W.indexOf(R)!==-1}function _(R){return R.replace(/^\s+/g,"")}function g(R){for(var W={},Y=0;YY&&(Y=R.line_indent_level));var se={mode:W,parent:R,last_token:R?R.last_token:new o(i.START_BLOCK,""),last_word:R?R.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Y,alignment:0,line_indent_level:R?R.line_indent_level:Y,start_line_index:this._output.get_line_number(),ternary_depth:0};return se},D.prototype._reset=function(R){var W=R.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new p(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var Y=new h(R,this._options);return this._tokens=Y.tokenize(),R},D.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R,W=this._reset(this._source_text),Y=this._options.eol;this._options.eol==="auto"&&(Y=`
`,W&&a.lineBreak.test(W||"")&&(Y=W.match(a.lineBreak)[0]));for(var se=this._tokens.next();se;)this.handle_token(se),this._last_last_text=this._flags.last_token.text,this._flags.last_token=se,se=this._tokens.next();return R=this._output.get_code(Y),R},D.prototype.handle_token=function(R,W){R.type===i.START_EXPR?this.handle_start_expr(R):R.type===i.END_EXPR?this.handle_end_expr(R):R.type===i.START_BLOCK?this.handle_start_block(R):R.type===i.END_BLOCK?this.handle_end_block(R):R.type===i.WORD?this.handle_word(R):R.type===i.RESERVED?this.handle_word(R):R.type===i.SEMICOLON?this.handle_semicolon(R):R.type===i.STRING?this.handle_string(R):R.type===i.EQUALS?this.handle_equals(R):R.type===i.OPERATOR?this.handle_operator(R):R.type===i.COMMA?this.handle_comma(R):R.type===i.BLOCK_COMMENT?this.handle_block_comment(R,W):R.type===i.COMMENT?this.handle_comment(R,W):R.type===i.DOT?this.handle_dot(R):R.type===i.EOF?this.handle_eof(R):R.type===i.UNKNOWN?this.handle_unknown(R,W):this.handle_unknown(R,W)},D.prototype.handle_whitespace_and_comments=function(R,W){var Y=R.newlines,se=this._options.keep_array_indentation&&w(this._flags.mode);if(R.comments_before)for(var ne=R.comments_before.next();ne;)this.handle_whitespace_and_comments(ne,W),this.handle_token(ne,W),ne=R.comments_before.next();if(se)for(var Se=0;Se0,W);else if(this._options.max_preserve_newlines&&Y>this._options.max_preserve_newlines&&(Y=this._options.max_preserve_newlines),this._options.preserve_newlines&&Y>1){this.print_newline(!1,W);for(var xe=1;xe0&&(!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))},D.prototype.set_mode=function(R){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,R),this._flags=this.create_flags(this._previous_flags,R),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},D.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},D.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},D.prototype.start_of_statement=function(R){var W=!1;return W=W||x(this._flags.last_token,["var","let","const"])&&R.type===i.WORD,W=W||v(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&x(this._flags.last_token,B)&&!R.newlines,W=W||v(this._flags.last_token,"else")&&!(v(R,"if")&&!R.comments_before),W=W||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),W=W||this._flags.last_token.type===i.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(R.text==="--"||R.text==="++")&&this._last_last_text!=="function"&&R.type!==i.WORD&&R.type!==i.RESERVED,W=W||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),W?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(R,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R,x(R,["do","for","if","while"])),!0):!1},D.prototype.handle_start_expr=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R);var W=l.Expression;if(R.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(R),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=l.ArrayLiteral,w(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())),t(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=l.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=l.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&R.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var Y=this._tokens.peek(-3);if(this._options.space_after_named_function&&Y){var se=this._tokens.peek(-4);x(Y,["async","function"])||Y.text==="*"&&x(se,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(Y.text==="{"||Y.text===","||Y.text==="*"&&(se.text==="{"||se.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(R);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&t(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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(R,R.newlines),this.print_token(R),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},D.prototype.handle_end_expr=function(R){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(R),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(R,R.text==="]"&&w(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(R),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},D.prototype.handle_start_block=function(R){this.handle_whitespace_and_comments(R);var W=this._tokens.peek(),Y=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):Y&&(t(Y.text,[":",","])&&t(W.type,[i.STRING,i.WORD,i.RESERVED])||t(W.text,["get","set","..."])&&t(Y.type,[i.WORD,i.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(Y.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):t(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var se=!W.comments_before&&W.text==="}",ne=se&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Se=0,xe=null;this._flags.inline_frame=!0;do if(Se+=1,xe=this._tokens.peek(Se-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==i.EOF&&!(xe.type===i.END_BLOCK&&xe.opened===R))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(ne||this._flags.last_token.type===i.EQUALS||x(this._flags.last_token,E)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(w(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(R),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(R),this.indent(),!se&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},D.prototype.handle_end_block=function(R){for(this.handle_whitespace_and_comments(R);this._flags.mode===l.Statement;)this.restore_mode();var W=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(w(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(R)},D.prototype.handle_word=function(R){if(R.type===i.RESERVED){if(t(R.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)R.type=i.WORD;else if(R.text==="import"&&t(this._tokens.peek().text,["(","."]))R.type=i.WORD;else if(t(R.text,["as","from"])&&!this._flags.import_block)R.type=i.WORD;else if(this._flags.mode===l.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(R.type=i.WORD)}}if(this.start_of_statement(R)?x(this._flags.last_token,["var","let","const"])&&R.type===i.WORD&&(this._flags.declaration_statement=!0):R.newlines&&!I(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(R),this.print_newline()):this.handle_whitespace_and_comments(R),this._flags.do_block&&!this._flags.do_while)if(v(R,"while")){this._output.space_before_token=!0,this.print_token(R),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&&v(R,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(R,["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(R),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R)),v(R,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!R.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,B)?this._output.space_before_token=!0:v(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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(I(this._flags.mode)||w(this._flags.mode))||this.print_newline(),this.print_token(R),this._flags.last_word=R.text;return}var Y="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?Y="SPACE":x(R,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines?Y="NEWLINE":(Y="SPACE",this._output.space_before_token=!0):Y="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===l.BlockStatement?Y="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&I(this._flags.mode)?Y="SPACE":this._flags.last_token.type===i.STRING?Y="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&t(this._last_last_text,["{",","]))?Y="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?Y="SPACE":Y="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,Y="NEWLINE"),x(R,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Y="SPACE":Y="NEWLINE"),x(R,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&R.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var se=this._output.current_line;se.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Y==="NEWLINE"?x(this._flags.last_token,E)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(R,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!x(R,["var","let","const"]))&&this._flags.last_token.text!==":"&&(v(R,"if")&&v(R.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(R,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&w(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Y==="SPACE"&&(this._output.space_before_token=!0);R.previous&&(R.previous.type===i.WORD||R.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(R),this._flags.last_word=R.text,R.type===i.RESERVED&&(R.text==="do"?this._flags.do_block=!0:R.text==="if"?this._flags.if_block=!0:R.text==="import"?this._flags.import_block=!0:this._flags.import_block&&v(R,"from")&&(this._flags.import_block=!1))},D.prototype.handle_semicolon=function(R){this.start_of_statement(R)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(R);for(var W=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&v(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(R)},D.prototype.handle_string=function(R){R.text.startsWith("`")&&R.newlines===0&&R.whitespace_before===""&&(R.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(R)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(R),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(R):R.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(R.previous.text==="]"||R.previous.text===")")&&R.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(R)},D.prototype.handle_equals=function(R){this.start_of_statement(R)||this.handle_whitespace_and_comments(R),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0},D.prototype.handle_comma=function(R){this.handle_whitespace_and_comments(R,!0),this.print_token(R),this._output.space_before_token=!0,this._flags.declaration_statement?(I(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(R)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(R)},D.prototype.handle_operator=function(R){var W=R.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),Y=t(R.text,["-","+"])&&(t(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(R)){var se=!W;this.handle_whitespace_and_comments(R,se)}if(R.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(R);return}if(R.text==="::"){this.print_token(R);return}if(this._flags.last_token.type===i.OPERATOR&&t(this._options.operator_position,u)&&this.allow_wrap_or_preserved_newline(R),R.text===":"&&this._flags.in_case){this.print_token(R),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.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 ne=!0,Se=!0,xe=!1;if(R.text===":"?this._flags.ternary_depth===0?ne=!1:(this._flags.ternary_depth-=1,xe=!0):R.text==="?"&&(this._flags.ternary_depth+=1),!Y&&!W&&this._options.preserve_newlines&&t(R.text,n)){var we=R.text===":",Re=we&&xe,Pe=we&&!xe;switch(this._options.operator_position){case c.before_newline:this._output.space_before_token=!Pe,this.print_token(R),(!we||Re)&&this.allow_wrap_or_preserved_newline(R),this._output.space_before_token=!0;return;case c.after_newline:this._output.space_before_token=!0,!we||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(R):this._output.space_before_token=!1,this.print_token(R),this._output.space_before_token=!0;return;case c.preserve_newline:Pe||this.allow_wrap_or_preserved_newline(R),ne=!(this._output.just_added_newline()||Pe),this._output.space_before_token=ne,this.print_token(R),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(R),ne=!1;var ye=this._tokens.peek();Se=ye&&t(ye.type,[i.WORD,i.RESERVED])}else if(R.text==="...")this.allow_wrap_or_preserved_newline(R),ne=this._flags.last_token.type===i.START_BLOCK,Se=!1;else if(t(R.text,["--","++","!","~"])||Y){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(R),ne=!1,Se=!1,R.newlines&&(R.text==="--"||R.text==="++"||R.text==="~")){var ee=x(this._flags.last_token,E)&&R.newlines;ee&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ee,!0)}this._flags.last_token.text===";"&&I(this._flags.mode)&&(ne=!0),this._flags.last_token.type===i.RESERVED?ne=!0:this._flags.last_token.type===i.END_EXPR?ne=!(this._flags.last_token.text==="]"&&(R.text==="--"||R.text==="++")):this._flags.last_token.type===i.OPERATOR&&(ne=t(R.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(R.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Se=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ne,this.print_token(R),this._output.space_before_token=Se},D.prototype.handle_block_comment=function(R,W){if(this._output.raw){this._output.add_raw_token(R),R.directives&&R.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(R.directives){this.print_newline(!1,W),this.print_token(R),R.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(R.text)&&!R.newlines){this._output.space_before_token=!0,this.print_token(R),this._output.space_before_token=!0;return}else this.print_block_commment(R,W)},D.prototype.print_block_commment=function(R,W){var Y=m(R.text),se,ne=!1,Se=!1,xe=R.whitespace_before,we=xe.length;if(this.print_newline(!1,W),this.print_token_line_indentation(R),this._output.add_token(Y[0]),this.print_newline(!1,W),Y.length>1){for(Y=Y.slice(1),ne=L(Y,"*"),Se=S(Y,xe),ne&&(this._flags.alignment=1),se=0;se=0;a--)if(this.__items[a].match(o))return!0;return!1},C.prototype.set_indent=function(o,a){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},C.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)},C.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},C.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},C.prototype.is_empty=function(){return this.__items.length===0},C.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},C.prototype.push=function(o){this.__items.push(o);var a=o.lastIndexOf(`
`);a!==-1?this.__character_count=o.length-a:this.__character_count+=o.length},C.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},C.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},C.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},C.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},C.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function f(o,a){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),a=a||"",o.indent_level>0&&(a=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}f.prototype.get_indent_size=function(o,a){var r=this.__base_string_length;return a=a||0,o<0&&(r=0),r+=o*this.__indent_size,r+=a,r},f.prototype.get_indent_string=function(o,a){var r=this.__base_string;return a=a||0,o<0&&(o=0,r=""),a+=o*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},f.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var o=this.__cache.length,a=0,r="";this.__indent_size&&o>=this.__indent_size&&(a=Math.floor(o/this.__indent_size),o-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),o&&(r+=new Array(o+1).join(" ")),this.__cache.push(r)};function p(o,a){this.__indent_cache=new f(o,a),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new C(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(o,a){return this.__indent_cache.get_indent_string(o,a)},p.prototype.get_indent_size=function(o,a){return this.__indent_cache.get_indent_size(o,a)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.prototype.get_code=function(o){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
`);return o!==`
`&&(r=r.replace(/[\n]/g,o)),r},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.prototype.set_indent=function(o,a){return o=o||0,a=a||0,this.next_line.set_indent(o,a),this.__lines.length>1?(this.current_line.set_indent(o,a),!0):(this.current_line.set_indent(),!1)},p.prototype.add_raw_token=function(o){for(var a=0;a1&&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},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.prototype.ensure_empty_line_above=function(o,a){for(var r=this.__lines.length-2;r>=0;){var h=this.__lines[r];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==a){this.__lines.splice(r+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=p},function(e){function C(f,p,o,a){this.type=f,this.text=p,this.comments_before=null,this.newlines=o||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=C},function(e,C){var f="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",a="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="(?:\\\\u[0-9a-fA-F]{4}|["+f+o+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+p+o+a+"])*";C.identifier=new RegExp(r+h,"g"),C.identifierStart=new RegExp(r),C.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+p+o+a+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;C.newline=/[\n\r\u2028\u2029]/,C.lineBreak=new RegExp(`\r
|`+C.newline.source),C.allLineBreaks=new RegExp(C.lineBreak.source,"g")},function(e,C,f){var p=f(6).Options,o=["before-newline","after-newline","preserve-newline"];function a(r){p.call(this,r,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";y=y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),y="\\?\\.(?!\\d) "+y,y=y.replace(/ /g,"|");var c=new RegExp(y),u="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=u.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),b=new RegExp("^(?:"+l.join("|")+")$"),m,w=function(L,S){o.call(this,L,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var D=new s(this._input),B=new n(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(h.identifier).matching(h.identifierMatch),number:D.matching(g),punct:D.matching(c),comment:D.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:D.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:D.matching(//),include:D.starting_with(/#include/).until_after(h.lineBreak),shebang:D.starting_with(/#!/).until_after(h.lineBreak),xml:D.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:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};w.prototype=new o,w.prototype._is_comment=function(L){return L.type===t.COMMENT||L.type===t.BLOCK_COMMENT||L.type===t.UNKNOWN},w.prototype._is_opening=function(L){return L.type===t.START_BLOCK||L.type===t.START_EXPR},w.prototype._is_closing=function(L,S){return(L.type===t.END_BLOCK||L.type===t.END_EXPR)&&S&&(L.text==="]"&&S.text==="["||L.text===")"&&S.text==="("||L.text==="}"&&S.text==="{")},w.prototype._reset=function(){m=!1},w.prototype._get_next_token=function(L,S){var D=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(t.EOF,""):(D=D||this._read_non_javascript(B),D=D||this._read_string(B),D=D||this._read_word(L),D=D||this._read_singles(B),D=D||this._read_comment(B),D=D||this._read_regexp(B,L),D=D||this._read_xml(B,L),D=D||this._read_punctuation(),D=D||this._create_token(t.UNKNOWN,this._input.next()),D)},w.prototype._read_word=function(L){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(h.allLineBreaks,`
`),!(L.type===t.DOT||L.type===t.RESERVED&&(L.text==="set"||L.text==="get"))&&b.test(S)?(S==="in"||S==="of")&&(L.type===t.WORD||L.type===t.STRING)?this._create_token(t.OPERATOR,S):this._create_token(t.RESERVED,S):this._create_token(t.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(t.WORD,S)},w.prototype._read_singles=function(L){var S=null;return L==="("||L==="["?S=this._create_token(t.START_EXPR,L):L===")"||L==="]"?S=this._create_token(t.END_EXPR,L):L==="{"?S=this._create_token(t.START_BLOCK,L):L==="}"?S=this._create_token(t.END_BLOCK,L):L===";"?S=this._create_token(t.SEMICOLON,L):L==="."&&x.test(this._input.peek(1))?S=this._create_token(t.DOT,L):L===","&&(S=this._create_token(t.COMMA,L)),S&&this._input.next(),S},w.prototype._read_punctuation=function(){var L=this.__patterns.punct.read();if(L!=="")return L==="="?this._create_token(t.EQUALS,L):L==="?."?this._create_token(t.DOT,L):this._create_token(t.OPERATOR,L)},w.prototype._read_non_javascript=function(L){var S="";if(L==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(t.UNKNOWN,S.trim()+`
`);if(S=this.__patterns.include.read(),S)return this._create_token(t.UNKNOWN,S.trim()+`
`);L=this._input.next();var D="#";if(this._input.hasNext()&&this._input.testChar(v)){do L=this._input.next(),D+=L;while(this._input.hasNext()&&L!=="#"&&L!=="=");return L==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(D+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(D+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,D)}this._input.back()}else if(L==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)S+=this._input.next();return m=!0,this._create_token(t.COMMENT,S)}}else if(m&&L==="-"&&(S=this.__patterns.html_comment_end.read(),S))return m=!1,this._create_token(t.COMMENT,S);return null},w.prototype._read_comment=function(L){var S=null;if(L==="/"){var D="";if(this._input.peek(1)==="*"){D=this.__patterns.block_comment.read();var B=_.get_directives(D);B&&B.ignore==="start"&&(D+=_.readIgnored(this._input)),D=D.replace(h.allLineBreaks,`
`),S=this._create_token(t.BLOCK_COMMENT,D),S.directives=B}else this._input.peek(1)==="/"&&(D=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,D))}return S},w.prototype._read_string=function(L){if(L==="`"||L==="'"||L==='"'){var S=this._input.next();return this.has_char_escapes=!1,L==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(L),this.has_char_escapes&&this._options.unescape_strings&&(S=I(S)),this._input.peek()===L&&(S+=this._input.next()),S=S.replace(h.allLineBreaks,`
`),this._create_token(t.STRING,S)}return null},w.prototype._allow_regexp_or_xml=function(L){return L.type===t.RESERVED&&i(L.text,["return","case","throw","else","do","typeof","yield"])||L.type===t.END_EXPR&&L.text===")"&&L.opened.previous.type===t.RESERVED&&i(L.opened.previous.text,["if","while","for"])||i(L.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},w.prototype._read_regexp=function(L,S){if(L==="/"&&this._allow_regexp_or_xml(S)){for(var D=this._input.next(),B=!1,R=!1;this._input.hasNext()&&(B||R||this._input.peek()!==L)&&!this._input.testChar(h.newline);)D+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?R=!0:this._input.peek()==="]"&&(R=!1)),this._input.next();return this._input.peek()===L&&(D+=this._input.next(),D+=this._input.read(h.identifier)),this._create_token(t.STRING,D)}return null},w.prototype._read_xml=function(L,S){if(this._options.e4x&&L==="<"&&this._allow_regexp_or_xml(S)){var D="",B=this.__patterns.xml.read_match();if(B){for(var R=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=R.indexOf("{")===0,Y=0;B;){var se=!!B[1],ne=B[2],Se=!!B[B.length-1]||ne.slice(0,8)==="![CDATA[";if(!Se&&(ne===R||W&&ne.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(se?--Y:++Y),D+=B[0],Y<=0)break;B=this.__patterns.xml.read_match()}return B||(D+=this._input.match(/[\s\S]*/g)[0]),D=D.replace(h.allLineBreaks,`
`),this._create_token(t.STRING,D)}}return null};function I(L){for(var S="",D=0,B=new p(L),R=null;B.hasNext();)if(R=B.match(/([\s]|[^\\]|\\\\)+/g),R&&(S+=R[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")R=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")R=B.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",B.hasNext()&&(S+=B.next());continue}if(!R)return L;if(D=parseInt(R[1],16),D>126&&D<=255&&R[0].indexOf("x")===0)return L;if(D>=0&&D<32){S+="\\"+R[0];continue}else D===34||D===39||D===92?S+="\\"+String.fromCharCode(D):S+=String.fromCharCode(D)}return S}w.prototype._read_string_recursive=function(L,S,D){var B,R;L==="'"?R=this.__patterns.single_quote:L==='"'?R=this.__patterns.double_quote:L==="`"?R=this.__patterns.template_text:L==="}"&&(R=this.__patterns.template_expression);for(var W=R.read(),Y="";this._input.hasNext();){if(Y=this._input.next(),Y===L||!S&&h.newline.test(Y)){this._input.back();break}else Y==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Y+=this._input.next()):D&&(D==="${"&&Y==="$"&&this._input.peek()==="{"&&(Y+=this._input.next()),D===Y&&(L==="`"?Y+=this._read_string_recursive("}",S,"`"):Y+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(Y+=this._input.next())));Y+=R.read(),W+=Y}return W},e.exports.Tokenizer=w,e.exports.TOKEN=t,e.exports.positionable_operators=E.slice(),e.exports.line_starters=u.slice()},function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function f(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position=0&&p=0&&o=p.length&&this.__input.substring(o-p.length,o).toLowerCase()===p},e.exports.InputScanner=f},function(e,C,f){var p=f(8).InputScanner,o=f(3).Token,a=f(10).TokenStream,r=f(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(n,i){this._input=new p(n),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var n,i=new o(h.START,""),t=null,_=[],g=new a;i.type!==h.EOF;){for(n=this._get_next_token(i,t);this._is_comment(n);)g.add(n),n=this._get_next_token(i,t);g.isEmpty()||(n.comments_before=g,g=new a),n.parent=t,this._is_opening(n)?(_.push(t),t=n):t&&this._is_closing(n,t)&&(n.opened=t,t.closed=n,t=_.pop(),n.parent=t),n.previous=i,i.next=n,this.__tokens.add(n),i=n}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(n,i){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(h.RAW,t):this._create_token(h.EOF,"")},s.prototype._is_comment=function(n){return!1},s.prototype._is_opening=function(n){return!1},s.prototype._is_closing=function(n,i){return!1},s.prototype._create_token=function(n,i){var t=new o(n,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=s,e.exports.TOKEN=h},function(e){function C(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}C.prototype.restart=function(){this.__position=0},C.prototype.isEmpty=function(){return this.__tokens_length===0},C.prototype.hasNext=function(){return this.__position=0&&f/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new p,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(r){var h=this._create();return h._disabled[r]=!0,h._update(),h},a.prototype.read_options=function(r){var h=this._create();for(var s in o)h._disabled[s]=r.templating.indexOf(s)===-1;return h._update(),h},a.prototype.exclude=function(r){var h=this._create();return h._excluded[r]=!0,h._update(),h},a.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),r+=h,h=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},a.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},a.prototype._read_template=function(){var r="",h=this._input.peek();if(h==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(r=r||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},e.exports.TemplatablePattern=a}],M={};function H(e){var C=M[e];if(C!==void 0)return C.exports;var f=M[e]={exports:{}};return O[e](f,f.exports,H),f.exports}var F=H(0);A=F})();var U=A;!(q=[],j=function(){return{js_beautify:U}}.apply(ve,q),j!==void 0&&(st.exports=j))})()},"746U":function(st,ve,z){"use strict";z.d(ve,"f",function(){return q}),z.d(ve,"l",function(){return j}),z.d(ve,"k",function(){return A}),z.d(ve,"j",function(){return U}),z.d(ve,"g",function(){return O}),z.d(ve,"m",function(){return M}),z.d(ve,"h",function(){return H}),z.d(ve,"n",function(){return F}),z.d(ve,"c",function(){return e}),z.d(ve,"a",function(){return C}),z.d(ve,"i",function(){return f}),z.d(ve,"o",function(){return p}),z.d(ve,"e",function(){return r}),z.d(ve,"d",function(){return h}),z.d(ve,"p",function(){return s}),z.d(ve,"b",function(){return n});function q(i){return Array.isArray(i)}function j(i){return typeof i=="string"}function A(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function U(i){return typeof i=="number"&&!isNaN(i)}function O(i){return i===!0||i===!1}function M(i){return typeof i=="undefined"}function H(i){return!F(i)}function F(i){return M(i)||i===null}function e(i,t){if(!i)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function C(i){if(F(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function f(i){return typeof i=="function"}function p(i,t){const _=Math.min(i.length,t.length);for(let g=0;g<_;g++)o(i[g],t[g])}function o(i,t){if(j(t)){if(typeof i!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(f(t)){try{if(i instanceof t)return}catch(_){}if(!F(i)&&i.constructor===t)return;if(t.length===1&&t.call(void 0,i)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(i){let t=[],_=Object.getPrototypeOf(i);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function r(i){const t=[];for(const _ of a(i))typeof i[_]=="function"&&t.push(_);return t}function h(i,t){const _=v=>function(){const x=Array.prototype.slice.call(arguments,0);return t(v,x)};let g={};for(const v of i)g[v]=_(v);return g}function s(i){return i===null?void 0:i}function n(i,t="Unreachable"){throw new Error(t)}},"8HAY":function(st,ve,z){"use strict";z.d(ve,"a",function(){return O}),z.d(ve,"b",function(){return M}),z.d(ve,"d",function(){return H}),z.d(ve,"e",function(){return F}),z.d(ve,"c",function(){return e});var q=z("MI8n"),j=z("pmY6"),A=z("3/fG"),U=function(C,f,p,o){function a(r){return r instanceof p?r:new p(function(h){h(r)})}return new(p||(p=Promise))(function(r,h){function s(t){try{i(o.next(t))}catch(_){h(_)}}function n(t){try{i(o.throw(t))}catch(_){h(_)}}function i(t){t.done?r(t.value):a(t.value).then(s,n)}i((o=o.apply(C,f||[])).next())})};class O extends j.a{constructor(C,f="",p="",o=!0,a){super();this._onDidChange=this._register(new q.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=f,this._cssClass=p,this._enabled=o,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,f){return U(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class M extends j.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new q.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new q.b),this.onDidRun=this._onDidRun.event}run(C,f){return U(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let p;try{yield this.runAction(C,f)}catch(o){p=o}this._onDidRun.fire({action:C,error:p})})}runAction(C,f){return U(this,void 0,void 0,function*(){yield C.run(f)})}}class H extends O{constructor(C){super(H.ID,C,C?"separator text":"separator");this.checked=!1,this.enabled=!1}}H.ID="vs.actions.separator";class F{constructor(C,f,p,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=f,this.class=o,this._actions=p}get actions(){return this._actions}dispose(){}run(){return U(this,void 0,void 0,function*(){})}}class e extends O{constructor(){super(e.ID,A.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(st,ve,z){st.exports={button:"button___1wy9m"}},"9Bee":function(st,ve,z){"use strict";var q=z("DYRE"),j=z("zeV3"),A=z("+L6B"),U=z("2/Rp"),O=z("k1fw"),M=z("9og8"),H=z("tJVT"),F=z("WmNS"),e=z.n(F),C=z("q1tI"),f=z.n(C),p=z("vg9a"),o=z("DlQD"),a=z.n(o),r=z("rUJ1");function h(N,d){var T=N.match(/^(\s+)(?:```)/);if(T===null)return d;var P=T[1];return d.split(`
`).map(function(K){var k=K.match(/^\s+/);if(k===null)return K;var le=Object(H.a)(k,1),Le=le[0];return Le.length>=P.length?K.slice(P.length):K}).join(`
`)}var s=[],n=[""],i=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){s.length=0,n=[""]}var g={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(N,d,T,P){if(d>=N.length||N[d].level<=T)return d;var K=N[d];P.push("- "+K.text+""),d++;var k=[];return d=v(N,d,K.level,k),k.length>0&&(P.push("
"),k.forEach(function(le){P.push(le)}),P.push("
")),P.push(" "),d=v(N,d,T,P),d}function x(){return v(s,0,0,n),n.push("
"),n.join("")}var E={heading:function(d){var T=t.exec(d);if(T)return{type:"heading",raw:T[0],depth:T[1].length,text:T[2]}},fences:function(d){var T=this.rules.block.fences.exec(d);if(T){var P=T[0],K=h(P,T[3]||""),k=T[2]?T[2].trim():T[2];if(["latex","katex","math"].indexOf(k)>=0){var le=u(),Le=K;K=le,l[le]={type:"block",expression:Le}}return{type:"code",raw:P,lang:k,text:K}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,u=function(){return"__special_katext_id_".concat(c++,"__")},l={};function b(){return l}function m(){c=0,l={}}function w(N){return N=N.replace(y,function(d,T){var P=u();return l[P]={type:"inline",expression:T},P}),N}var I=i.listitem;i.listitem=function(N){return I(w(N))};var L=i.paragraph;i.paragraph=function(N){return L(w(N))};var S=i.tablecell;i.tablecell=function(N,d){return S(w(N),d)},i.code=function(N,d,T){var P=(d||"").match(/\S*/)[0];return P?["latex","katex","math"].indexOf(P)>=0?"".concat(N,"
"):'
').concat(T?N:Object(r.escape)(N,!0),`
`):''+(T?N:Object(r.escape)(N,!0))+"
"},i.heading=function(N,d,T){var P=this.options.headerPrefix+T.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:P,level:d,text:N}),"'+N+""},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:E,renderer:i});var D=a.a,B=z("SJMd"),R=z("ulZh"),W=z.n(R),Y=z("m3rI"),se=z("Oy/b"),ne=z("p5ED"),Se=z("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 xe=function(N,d){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var K in P)Object.prototype.hasOwnProperty.call(P,K)&&(T[K]=P[K])})(N,d)};function we(N,d){function T(){this.constructor=N}xe(N,d),N.prototype=d===null?Object.create(d):(T.prototype=d.prototype,new T)}function Re(N,d,T,P){return new(T||(T=Promise))(function(K,k){function le(at){try{Je(P.next(at))}catch(De){k(De)}}function Le(at){try{Je(P.throw(at))}catch(De){k(De)}}function Je(at){var De;at.done?K(at.value):(De=at.value,De instanceof T?De:new T(function(mt){mt(De)})).then(le,Le)}Je((P=P.apply(N,d||[])).next())})}function Pe(N,d){var T,P,K,k,le={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return k={next:Le(0),throw:Le(1),return:Le(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function Le(Je){return function(at){return function(De){if(T)throw new TypeError("Generator is already executing.");for(;le;)try{if(T=1,P&&(K=2&De[0]?P.return:De[0]?P.throw||((K=P.return)&&K.call(P),0):P.next)&&!(K=K.call(P,De[1])).done)return K;switch(P=0,K&&(De=[2&De[0],K.value]),De[0]){case 0:case 1:K=De;break;case 4:return le.label++,{value:De[1],done:!1};case 5:le.label++,P=De[1],De=[0];continue;case 7:De=le.ops.pop(),le.trys.pop();continue;default:if(!(K=le.trys,(K=K.length>0&&K[K.length-1])||De[0]!==6&&De[0]!==2)){le=0;continue}if(De[0]===3&&(!K||De[1]>K[0]&&De[1]',"select"),this.addActionButton(P,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(P,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(P,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(P,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(P,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(P,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(P,'',"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(k){var le=document.createElement("div");le.className=""+T.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",k.typeName),le.innerHTML=k.icon,le.addEventListener("click",function(){T.markerToolbarButtonClicked(le,k)}),T.buttons.push(le),T.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='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",K.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(K),this.addActionButton(K,'',"render"),this.addActionButton(K,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},N.prototype.addButtonClickListener=function(d){this.buttonClickListeners.push(d)},N.prototype.removeButtonClickListener=function(d){this.buttonClickListeners.indexOf(d)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(d),1)},N.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},N.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var d=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var T=0;T0&&this.buttonClickListeners.forEach(function(P){return P("marker",T)}),this.markerButtonOverflowBlock.style.display="none"},N.prototype.actionToolbarButtonClicked=function(d,T){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(P){return P("action",T)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},N.prototype.setActiveButton=function(d){this.resetButtonStyles(),d.className=d.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),d.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},N.prototype.setActiveMarkerButton=function(d){var T=this.markerButtons.find(function(P){return P.getAttribute("data-type-name")===d});T&&this.setActiveButton(T)},N.prototype.setCurrentMarker=function(d){var T=this;this.currentMarker=d,this.buttons.filter(function(P){return/delete|notes/.test(P.getAttribute("data-action"))}).forEach(function(P){T.currentMarker===void 0?(P.style.fillOpacity="0.4",P.style.pointerEvents="none"):(P.style.fillOpacity="1",P.style.pointerEvents="all")})},N}(),Ve=function(){function N(d,T,P,K){this.panels=[],this.panelButtons=[],this.markerjsContainer=d,this.displayMode=T,this.uiStyleSettings=P,this.styles=K,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return N.prototype.addStyles=function(){var d;this.toolboxStyleClass=this.styles.addClass(new Ae("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Ae("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var T=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ae("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ae("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Ae("toolbox-panel-row_colors",`
background-color: `+((d=this.uiStyleSettings.toolboxBackgroundColor)!==null&&d!==void 0?d:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ae("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*T)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*T)+`px;
padding: `+T+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ae("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ye("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ye("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},N.prototype.show=function(d){var T;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolboxStyleClass.name+" "+((T=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&T!==void 0?T:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},N.prototype.setPanelButtons=function(d){var T,P,K=this;this.panels=d,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((T=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&T!==void 0?T:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((P=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(k){var le;k.uiStyleSettings=K.uiStyleSettings;var Le=document.createElement("div");Le.className=K.toolboxButtonStyleClass.name+" "+((le=K.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:K.toolboxButtonStyleColorsClass.name),Le.innerHTML=k.icon,Le.title=k.title,Le.addEventListener("click",function(){K.panelButtonClick(k)}),K.panelButtons.push(Le),K.buttonRow.appendChild(Le)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},N.prototype.panelButtonClick=function(d){var T=this,P=-1;if(d!==this.activePanel){P=this.panels.indexOf(d),this.panelRow.innerHTML="";var K=d.getUi();K.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(K),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=d}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){T.displayMode==="inline"?T.panelRow.style.display="none":T.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(k,le){var Le,Je;k.className=T.toolboxButtonStyleClass.name+" "+(le===P?""+((Le=T.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Le!==void 0?Le:T.toolboxActiveButtonStyleColorsClass.name):""+((Je=T.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Je!==void 0?Je:T.toolboxButtonStyleColorsClass.name))})},N}(),Q=function(N,d){this.title=N,this.icon=d},fe=function(N){function d(T,P,K,k){var le=N.call(this,T,k||'')||this;return le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=P,le.currentColor=K,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");return P.style.overflow="hidden",P.style.whiteSpace="nowrap",this.colors.forEach(function(K){var k=T.getColorBox(K);P.appendChild(k),T.colorBoxes.push(k)}),P},d.prototype.getColorBox=function(T){var P=this,K=this.uiStyleSettings.toolbarHeight/4,k=this.uiStyleSettings.toolbarHeight-K,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=k-2+"px",le.style.height=k-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=(k+2)/2+"px",le.style.borderColor=T===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){P.setCurrentColor(T,le)});var Le=document.createElement("div");return Le.style.display="inline-block",Le.style.width=k-2+"px",Le.style.height=k-2+"px",Le.style.backgroundColor=T,Le.style.borderRadius=k/2+"px",T==="transparent"&&(Le.style.fill=this.uiStyleSettings.toolboxAccentColor,Le.innerHTML=``),le.appendChild(Le),le},d.prototype.setCurrentColor=function(T,P){var K=this;this.currentColor=T,this.colorBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(T)},d}(Q),be=function(){function N(d,T,P){this._state="new",this._isSelected=!1,this._container=d,this._overlayContainer=T,this.globalSettings=P,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(N.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),N.prototype.ownsTarget=function(d){return!1},Object.defineProperty(N.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),N.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},N.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},N.prototype.pointerDown=function(d,T){},N.prototype.dblClick=function(d,T){},N.prototype.manipulate=function(d){},N.prototype.pointerUp=function(d){this.stateChanged()},N.prototype.dispose=function(){},N.prototype.addMarkerVisualToContainer=function(d){this.container.childNodes.length>0?this.container.insertBefore(d,this.container.childNodes[0]):this.container.appendChild(d)},N.prototype.getState=function(){return{typeName:N.typeName,state:this.state,notes:this.notes}},N.prototype.restoreState=function(d){this._state=d.state,this.notes=d.notes},N.prototype.scale=function(d,T){},N.prototype.colorChanged=function(d){this.onColorChanged&&this.onColorChanged(d),this.stateChanged()},N.prototype.fillColorChanged=function(d){this.onFillColorChanged&&this.onFillColorChanged(d),this.stateChanged()},N.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var d=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),d.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(d)&&this.onStateChanged(this)}},N.typeName="MarkerBase",N}(),Ee=function(){function N(){this.findGripByVisual=this.findGripByVisual.bind(this)}return N.prototype.findGripByVisual=function(d){return this.topLeft.ownsTarget(d)?this.topLeft:this.topCenter.ownsTarget(d)?this.topCenter:this.topRight.ownsTarget(d)?this.topRight:this.centerLeft.ownsTarget(d)?this.centerLeft:this.centerRight.ownsTarget(d)?this.centerRight:this.bottomLeft.ownsTarget(d)?this.bottomLeft:this.bottomCenter.ownsTarget(d)?this.bottomCenter:this.bottomRight.ownsTarget(d)?this.bottomRight:void 0},N}(),ke=function(){function N(){this.GRIP_SIZE=10,this.visual=ee.createGroup(),this.visual.appendChild(ee.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ee.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},N}(),We=function(){function N(){}return N.toITransformMatrix=function(d){return{a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}},N.toSVGMatrix=function(d,T){return d.a=T.a,d.b=T.b,d.c=T.c,d.d=T.d,d.e=T.e,d.f=T.f,d},N}(),Xe=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.left=0,k.top=0,k.width=0,k.height=0,k.defaultSize={x:50,y:20},k.offsetX=0,k.offsetY=0,k.rotationAngle=0,k.CB_DISTANCE=10,k._suppressMarkerCreateEvent=!1,k.container.transform.baseVal.appendItem(ee.createTransform()),k.setupControlBox(),k}return we(d,N),Object.defineProperty(d.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"visual",{get:function(){return this._visual},set:function(T){this._visual=T;var P=ee.createTransform();this._visual.transform.baseVal.appendItem(P)},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(T){return!!N.prototype.ownsTarget.call(this,T)||!!(this.controlGrips.findGripByVisual(T)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(T))},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="new"&&(this.left=T.x,this.top=T.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var K=this.unrotatePoint(T);if(this.manipulationStartX=K.x,this.manipulationStartY=K.y,this.offsetX=K.x-this.left,this.offsetY=K.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(P),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(P)){this.activeGrip=this.rotatorGrip;var k=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=k.x-this.width/2,this.top=k.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"},d.prototype.pointerUp=function(T){var P=this.state;N.prototype.pointerUp.call(this,T),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(T),this._state="select",P==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},d.prototype.moveVisual=function(T){this.visual.style.transform="translate("+T.x+"px, "+T.y+"px)"},d.prototype.manipulate=function(T){var P=this.unrotatePoint(T);this.state==="creating"?this.resize(T):this.state==="move"?(this.left=this.manipulationStartLeft+(P.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(P.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(P):this.state==="rotate"&&this.rotate(T)},d.prototype.resize=function(T){var P=this.manipulationStartLeft,K=this.manipulationStartWidth,k=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:P=this.manipulationStartLeft+T.x-this.manipulationStartX,K=this.manipulationStartWidth+this.manipulationStartLeft-P;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:K=this.manipulationStartWidth+T.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:k=this.manipulationStartTop+T.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-k;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+T.y-this.manipulationStartY}K>=0?(this.left=P,this.width=K):(this.left=P+K,this.width=-K),le>=0?(this.top=k,this.height=le):(this.top=k+le,this.height=-le),this.setSize()},d.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},d.prototype.rotate=function(T){if(Math.abs(T.x-this.centerX)>.1){var P=Math.sign(T.x-this.centerX);this.rotationAngle=180*Math.atan((T.y-this.centerY)/(T.x-this.centerX))/Math.PI+90*P,this.applyRotation()}},d.prototype.applyRotation=function(){var T=this.container.transform.baseVal.getItem(0);T.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(T,0)},d.prototype.rotatePoint=function(T){if(this.rotationAngle===0)return T;var P=this.container.getCTM(),K=ee.createPoint(T.x,T.y);return{x:(K=K.matrixTransform(P)).x,y:K.y}},d.prototype.unrotatePoint=function(T){if(this.rotationAngle===0)return T;var P=this.container.getCTM();P=P.inverse();var K=ee.createPoint(T.x,T.y);return{x:(K=K.matrixTransform(P)).x,y:K.y}},d.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=ee.createGroup();var T=ee.createTransform();T.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(T),this.container.appendChild(this.controlBox),this.controlRect=ee.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=ee.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 Ee,this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){var T=this.controlBox.transform.baseVal.getItem(0);T.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(T,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()},d.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()},d.prototype.createGrip=function(){var T=new ke;return T.visual.transform.baseVal.appendItem(ee.createTransform()),this.controlBox.appendChild(T.visual),T},d.prototype.positionGrips=function(){var T=this.controlGrips.topLeft.GRIP_SIZE,P=-T/2,K=P,k=(this.width+this.CB_DISTANCE)/2-T/2,le=(this.height+this.CB_DISTANCE)/2-T/2,Le=this.height+this.CB_DISTANCE-T/2,Je=this.width+this.CB_DISTANCE-T/2;this.positionGrip(this.controlGrips.topLeft.visual,P,K),this.positionGrip(this.controlGrips.topCenter.visual,k,K),this.positionGrip(this.controlGrips.topRight.visual,Je,K),this.positionGrip(this.controlGrips.centerLeft.visual,P,le),this.positionGrip(this.controlGrips.centerRight.visual,Je,le),this.positionGrip(this.controlGrips.bottomLeft.visual,P,Le),this.positionGrip(this.controlGrips.bottomCenter.visual,k,Le),this.positionGrip(this.controlGrips.bottomRight.visual,Je,Le),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,k,K-3*this.CB_DISTANCE)},d.prototype.positionGrip=function(T,P,K){var k=T.transform.baseVal.getItem(0);k.setTranslate(P,K),T.transform.baseVal.replaceItem(k,0)},d.prototype.hideControlBox=function(){this.controlBox.style.display="none"},d.prototype.showControlBox=function(){this.controlBox.style.display=""},d.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:We.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:We.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},N.prototype.getState.call(this))},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T);var P=T;this.left=P.left,this.top=P.top,this.width=P.width,this.height=P.height,this.rotationAngle=P.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(We.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,P.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(We.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,P.containerTransformMatrix))},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P);var K=this.rotatePoint({x:this.left,y:this.top}),k=this.unrotatePoint({x:K.x*T,y:K.y*P});this.left=k.x,this.top=k.y,this.width=this.width*T,this.height=this.height*P,this.adjustControlBox()},d}(be),ze=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.createVisual=k.createVisual.bind(k),k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.visual)},d.prototype.createVisual=function(){this.visual=ee.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)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="new"&&(this.createVisual(),this.moveVisual(T),this._state="creating")},d.prototype.manipulate=function(T){N.prototype.manipulate.call(this,T)},d.prototype.resize=function(T){N.prototype.resize.call(this,T),this.setSize()},d.prototype.setSize=function(){N.prototype.setSize.call(this),ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(T){N.prototype.pointerUp.call(this,T),this.setSize()},d.prototype.setStrokeColor=function(T){this.strokeColor=T,this.visual&&ee.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(T),this.stateChanged()},d.prototype.setFillColor=function(T){this.fillColor=T,this.visual&&ee.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},d.prototype.setStrokeWidth=function(T){this.strokeWidth=T,this.visual&&ee.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(T){this.strokeDasharray=T,this.visual&&ee.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this))},d.prototype.restoreState=function(T){var P=T;this.fillColor=P.fillColor,this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.opacity=P.opacity,this.createVisual(),N.prototype.restoreState.call(this,T),this.setSize()},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P),this.setSize()},d.title="Rectangle marker",d}(Xe),qe=function(N){function d(T,P,K,k){var le=N.call(this,T,k||'')||this;return le.widths=[],le.widthBoxes=[],le.widths=P,le.currentWidth=K,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",this.widths.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.flexGrow="2",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=K===T.currentWidth?T.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){T.setCurrentWidth(K,k)}),P.appendChild(k);var le=document.createElement("div");le.innerText=K.toString(),le.style.marginRight="5px",k.appendChild(le);var Le=document.createElement("div");Le.style.minHeight="20px",Le.style.flexGrow="2",Le.style.display="flex",Le.style.alignItems="center";var Je=document.createElement("hr");Je.style.minWidth="20px",Je.style.border="0px",Je.style.borderTop=K+"px solid "+T.uiStyleSettings.toolboxColor,Je.style.flexGrow="2",Le.appendChild(Je),k.appendChild(Le),T.widthBoxes.push(k)}),P},d.prototype.setCurrentWidth=function(T,P){var K=this;this.currentWidth=T,this.widthBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},d}(Q),Qe=function(N){function d(T,P,K,k){var le=N.call(this,T,k||'')||this;return le.styles=[],le.styleBoxes=[],le.styles=P,le.currentStyle=K,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",this.styles.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/T.styles.length-5+"%",k.style.borderColor=K===T.currentStyle?T.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){T.setCurrentStyle(K,k)}),P.appendChild(k);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var Le=``;le.innerHTML=Le,k.appendChild(le),T.styleBoxes.push(k)}),P},d.prototype.setCurrentStyle=function(T,P){var K=this;this.currentStyle=T,this.styleBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},d}(Q),Ze=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new fe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new qe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new Qe("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return we(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=N.prototype.getState.call(this);return T.typeName=d.typeName,T},d.typeName="FrameMarker",d.title="Frame marker",d.icon='',d}(ze),Ge=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},it=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.x1=0,k.y1=0,k.x2=0,k.y2=0,k.defaultLength=50,k.manipulationStartX=0,k.manipulationStartY=0,k.manipulationStartX1=0,k.manipulationStartY1=0,k.manipulationStartX2=0,k.manipulationStartY2=0,k.setupControlBox(),k}return we(d,N),d.prototype.ownsTarget=function(T){return!!N.prototype.ownsTarget.call(this,T)||!(!this.grip1.ownsTarget(T)&&!this.grip2.ownsTarget(T))},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.manipulationStartX=T.x,this.manipulationStartY=T.y,this.state==="new"&&(this.x1=T.x,this.y1=T.y,this.x2=T.x,this.y2=T.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(P)?this.activeGrip=this.grip1:this.grip2.ownsTarget(P)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},d.prototype.pointerUp=function(T){var P=this.state;N.prototype.pointerUp.call(this,T),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(T),this._state="select",P==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},d.prototype.adjustVisual=function(){},d.prototype.manipulate=function(T){this.state==="creating"?this.resize(T):this.state==="move"?(this.x1=this.manipulationStartX1+T.x-this.manipulationStartX,this.y1=this.manipulationStartY1+T.y-this.manipulationStartY,this.x2=this.manipulationStartX2+T.x-this.manipulationStartX,this.y2=this.manipulationStartY2+T.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(T)},d.prototype.resize=function(T){switch(this.activeGrip){case this.grip1:this.x1=T.x,this.y1=T.y;break;case this.grip2:case void 0:this.x2=T.x,this.y2=T.y}this.adjustVisual(),this.adjustControlBox()},d.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=ee.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){this.positionGrips()},d.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},d.prototype.createGrip=function(){var T=new ke;return T.visual.transform.baseVal.appendItem(ee.createTransform()),this.controlBox.appendChild(T.visual),T},d.prototype.positionGrips=function(){var T=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-T/2,this.y1-T/2),this.positionGrip(this.grip2.visual,this.x2-T/2,this.y2-T/2)},d.prototype.positionGrip=function(T,P,K){var k=T.transform.baseVal.getItem(0);k.setTranslate(P,K),T.transform.baseVal.replaceItem(k,0)},d.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},N.prototype.getState.call(this))},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T);var P=T;this.x1=P.x1,this.y1=P.y1,this.x2=P.x2,this.y2=P.y2},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P),this.x1=this.x1*T,this.y1=this.y1*P,this.x2=this.x2*T,this.y2=this.y2*P,this.adjustVisual(),this.adjustControlBox()},d}(be),nt=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new fe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new qe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new Qe("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.visual&&T!==this.selectorLine&&T!==this.visibleLine)},d.prototype.createVisual=function(){this.visual=ee.createGroup(),this.selectorLine=ee.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ee.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)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},d.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()),ee.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ee.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ee.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setStrokeColor=function(T){this.strokeColor=T,this.adjustVisual(),this.colorChanged(T)},d.prototype.setStrokeWidth=function(T){this.strokeWidth=T,this.adjustVisual()},d.prototype.setStrokeDasharray=function(T){this.strokeDasharray=T,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T);var P=T;this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.createVisual(),this.adjustVisual()},d.typeName="LineMarker",d.title="Line marker",d.icon='',d}(it),Ie=function(N){function d(T,P,K,k){var le=N.call(this,T,k||'')||this;return le.fonts=[],le.fontBoxes=[],le.fonts=P,le.currentFont=K,le.setCurrentFont=le.setCurrentFont.bind(le),le}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");return P.style.overflow="hidden",P.style.flexGrow="2",this.fonts.forEach(function(K){var k=document.createElement("div");k.style.display="inline-block",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/T.fonts.length-5+"%",k.style.borderColor=K===T.currentFont?T.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){T.setCurrentFont(K,k)}),P.appendChild(k);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=K,le.style.overflow="hidden";var Le=document.createElement("div");Le.style.whiteSpace="nowrap",Le.style.overflow="hidden",Le.style.textOverflow="ellipsis",Le.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(Le),k.appendChild(le),T.fontBoxes.push(k)}),P},d.prototype.setCurrentFont=function(T,P){var K=this;this.currentFont=T,this.fontBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},d}(Q),Me=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.color="transparent",k.padding=5,k.DEFAULT_TEXT="your text here",k.text=k.DEFAULT_TEXT,k.isMoved=!1,k.color=K.defaultColor,k.fontFamily=K.defaultFontFamily,k.defaultSize={x:100,y:30},k.setColor=k.setColor.bind(k),k.setFont=k.setFont.bind(k),k.renderText=k.renderText.bind(k),k.sizeText=k.sizeText.bind(k),k.textEditDivClicked=k.textEditDivClicked.bind(k),k.showTextEditor=k.showTextEditor.bind(k),k.setSize=k.setSize.bind(k),k.positionTextEditor=k.positionTextEditor.bind(k),k.colorPanel=new fe("Color",K.defaultColorSet,K.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.fontFamilyPanel=new Ie("Font",K.defaultFontFamilies,K.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k}return we(d,N),d.prototype.ownsTarget=function(T){if(N.prototype.ownsTarget.call(this,T)||T===this.visual||T===this.textElement||T===this.bgRectangle)return!0;var P=!1;return this.textElement.childNodes.forEach(function(K){K===T&&(P=!0)}),P},d.prototype.createVisual=function(){this.visual=ee.createGroup(),this.bgRectangle=ee.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ee.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ee.createTransform()),this.textElement.transform.baseVal.appendItem(ee.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.isMoved=!1,this.pointerDownPoint=T,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(T),this._state="creating")},d.prototype.renderText=function(){var T=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(P){T.textElement.appendChild(ee.createTSpan(P.trim()===""?" ":P.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},d.prototype.getTextScale=function(){var T=this.textElement.getBBox(),P=1;if(T.width>0&&T.height>0){var K=(1*this.width-this.width*this.padding*2/100)/T.width,k=(1*this.height-this.height*this.padding*2/100)/T.height;P=Math.min(K,k)}return P},d.prototype.getTextPosition=function(T){var P=this.textElement.getBBox(),K=0,k=0;return P.width>0&&P.height>0&&(K=(this.width-P.width*T)/2,k=this.height/2-P.height*T/2),{x:K,y:k}},d.prototype.sizeText=function(){var T=this.textElement.getBBox(),P=this.getTextScale(),K=this.getTextPosition(P);K.y-=T.y*P,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+K.x+"px, "+K.y+"px) scale("+P+", "+P+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(K.x,K.y),this.textElement.transform.baseVal.getItem(1).setScale(P,P))},d.prototype.manipulate=function(T){N.prototype.manipulate.call(this,T),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(T.x-this.pointerDownPoint.x)>5||Math.abs(T.y-this.pointerDownPoint.y)>5)},d.prototype.resize=function(T){N.prototype.resize.call(this,T),this.isMoved=!0,this.setSize(),this.sizeText()},d.prototype.setSize=function(){N.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ee.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},d.prototype.pointerUp=function(T){var P=this.state;P==="creating"&&(this._suppressMarkerCreateEvent=!0),N.prototype.pointerUp.call(this,T),this.setSize(),(P==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},d.prototype.showTextEditor=function(){var T=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(P){P.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var P=Number.parseFloat(T.textEditor.style.fontSize);T.textEditor.clientWidth>=Number.parseInt(T.textEditor.style.maxWidth)&&P>.9;)P-=.1,T.textEditor.style.fontSize=Math.max(P,.9)+"em"}),this.textEditor.addEventListener("keyup",function(P){P.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(P){if(P.clipboardData){var K=P.clipboardData.getData("text"),k=window.getSelection();if(!k.rangeCount)return!1;k.deleteFromDocument(),k.getRangeAt(0).insertNode(document.createTextNode(K)),P.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){T.textEditDivClicked(T.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},d.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var T=this.getTextScale(),P=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),K=this.textElement.getBBox(),k={x:K.width*T,y:K.height*T};P.x-=k.x/2,P.y-=k.y/2,this.textEditor.style.top=P.y+"px",this.textEditor.style.left=P.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-P.x+"px",this.textEditor.style.fontSize=Math.max(16*T,12)+"px",this.textElement.style.display="none"}},d.prototype.textEditDivClicked=function(T){this.text=T.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},d.prototype.select=function(){N.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},d.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),N.prototype.deselect.call(this)},d.prototype.dblClick=function(T,P){N.prototype.dblClick.call(this,T,P),this.showTextEditor()},d.prototype.setColor=function(T){this.textElement&&ee.setAttributes(this.textElement,[["fill",T]]),this.color=T,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(T)},d.prototype.setFont=function(T){this.textElement&&ee.setAttributes(this.textElement,[["font-family",T]]),this.fontFamily=T,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},d.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},d.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){var P=T;this.color=P.color,this.fontFamily=P.fontFamily,this.padding=P.padding,this.text=P.text,this.createVisual(),N.prototype.restoreState.call(this,T),this.setSize()},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P),this.setSize(),this.sizeText(),this.positionTextEditor()},d.typeName="TextMarker",d.title="Text marker",d.icon='',d}(Xe),pe=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.color="transparent",k.lineWidth=3,k.drawing=!1,k.pixelRatio=1,k.color=K.defaultColor,k.lineWidth=K.defaultStrokeWidth,k.pixelRatio=K.freehandPixelRatio,k.setColor=k.setColor.bind(k),k.addCanvas=k.addCanvas.bind(k),k.finishCreation=k.finishCreation.bind(k),k.setLineWidth=k.setLineWidth.bind(k),k.colorPanel=new fe("Color",K.defaultColorSet,K.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.lineWidthPanel=new qe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.lineWidthPanel.onWidthChanged=k.setLineWidth,k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.visual&&T!==this.drawingImage)},d.prototype.createVisual=function(){this.visual=ee.createGroup(),this.drawingImage=ee.createImage(),this.visual.appendChild(this.drawingImage);var T=ee.createTransform();this.visual.transform.baseVal.appendItem(T),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(T,P){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(T.x,T.y),this.drawing=!0):N.prototype.pointerDown.call(this,T,P)},d.prototype.manipulate=function(T){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(T.x,T.y),this.canvasContext.stroke()):N.prototype.manipulate.call(this,T)},d.prototype.resize=function(T){N.prototype.resize.call(this,T),ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ee.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(T){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):N.prototype.pointerUp.call(this,T)},d.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)},d.prototype.select=function(){this.state==="creating"&&this.finishCreation(),N.prototype.select.call(this)},d.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),N.prototype.deselect.call(this)},d.prototype.finishCreation=function(){for(var T=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),P=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],K=P[0],k=P[1],le=P[2],Le=P[3],Je=!1,at=0;at0&&(Je=!0,atLe&&(Le=at),De>le&&(le=De));if(Je){this.left=K/this.pixelRatio,this.top=k/this.pixelRatio,this.width=(le-K)/this.pixelRatio,this.height=(Le-k)/this.pixelRatio;var mt=document.createElement("canvas");mt.width=le-K,mt.height=Le-k,mt.getContext("2d").putImageData(this.canvasContext.getImageData(K,k,le-K,Le-k),0,0),this.drawingImgUrl=mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},d.prototype.setDrawingImage=function(){ee.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ee.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},d.prototype.setColor=function(T){this.color=T,this.colorChanged(T)},d.prototype.setLineWidth=function(T){this.lineWidth=T},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({drawingImgUrl:this.drawingImgUrl},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){this.createVisual(),N.prototype.restoreState.call(this,T),this.drawingImgUrl=T.drawingImgUrl,this.setDrawingImage()},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P),this.setDrawingImage()},d.typeName="FreehandMarker",d.title="Freehand marker",d.icon='',d}(Xe),ue=function(N){function d(T,P,K){var k=N.call(this,T,K||'')||this;return k.typeBoxes=[],k.currentType=P,k.setCurrentType=k.setCurrentType.bind(k),k}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2";for(var K=function(Le){var Je="both";switch(Le){case 0:Je="both";break;case 1:Je="start";break;case 2:Je="end";break;case 3:Je="none"}var at=document.createElement("div");if(at.style.display="flex",at.style.flexGrow="2",at.style.alignItems="center",at.style.justifyContent="space-between",at.style.padding="5px",at.style.borderWidth="2px",at.style.borderStyle="solid",at.style.borderColor=Je===k.currentType?k.uiStyleSettings.toolboxAccentColor:"transparent",at.addEventListener("click",function(){T.setCurrentType(Je,at)}),P.appendChild(at),Je==="both"||Je==="start"){var De=document.createElement("div");De.style.display="flex",De.style.alignItems="center",De.style.minHeight="20px",De.innerHTML=``,De.style.marginLeft="5px",at.appendChild(De)}var mt=document.createElement("div");mt.style.display="flex",mt.style.alignItems="center",mt.style.minHeight="20px",mt.style.flexGrow="2";var kt=document.createElement("hr");if(kt.style.minWidth="20px",kt.style.border="0px",kt.style.borderTop="3px solid "+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee"),kt.style.flexGrow="2",mt.appendChild(kt),at.appendChild(mt),Je==="both"||Je==="end"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.innerHTML=``,Kt.style.marginRight="5px",at.appendChild(Kt)}k.typeBoxes.push(at)},k=this,le=0;le<4;le++)K(le);return P},d.prototype.setCurrentType=function(T,P){var K=this;this.currentType=T,this.typeBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},d}(Q),ce=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.arrowType="end",k.arrowBaseHeight=10,k.arrowBaseWidth=10,k.getArrowPoints=k.getArrowPoints.bind(k),k.setArrowType=k.setArrowType.bind(k),k.arrowTypePanel=new ue("Arrow type","end"),k.arrowTypePanel.onArrowTypeChanged=k.setArrowType,k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.arrow1&&T!==this.arrow2)},d.prototype.getArrowPoints=function(T,P){var K=this.arrowBaseWidth+2*this.strokeWidth,k=this.arrowBaseHeight+2*this.strokeWidth;return T-K/2+","+(P+k/2)+" "+T+","+(P-k/2)+" "+(T+K/2)+","+(P+k/2)},d.prototype.createTips=function(){this.arrow1=ee.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ee.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ee.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ee.createTransform()),this.visual.appendChild(this.arrow2)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(N.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",ee.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ee.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var T=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),P=this.arrow1.transform.baseVal.getItem(0);P.setRotate(T,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(P,0);var K=this.arrow2.transform.baseVal.getItem(0);K.setRotate(T+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(K,0)}},d.prototype.setArrowType=function(T){this.arrowType=T,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({arrowType:this.arrowType},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T);var P=T;this.arrowType=P.arrowType,this.createTips(),this.adjustVisual()},d.typeName="ArrowMarker",d.title="Arrow marker",d.icon='',d}(nt),X=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.fillColor=K.defaultFillColor,k.strokeWidth=0,k.fillPanel=new fe("Color",K.defaultColorSet,K.defaultFillColor),k.fillPanel.onColorChanged=k.setFillColor,k}return we(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=N.prototype.getState.call(this);return T.typeName=d.typeName,T},d.typeName="CoverMarker",d.title="Cover marker",d.icon='',d}(ze),$=function(N){function d(T,P,K,k){var le=N.call(this,T,k||'')||this;return le.opacities=[],le.opacityBoxes=[],le.opacities=P,le.currentOpacity=K,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return we(d,N),d.prototype.getUi=function(){var T=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",P.style.justifyContent="space-between",this.opacities.forEach(function(K){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="center",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=K===T.currentOpacity?T.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){T.setCurrentOpacity(K,k)}),P.appendChild(k);var le=document.createElement("div");le.innerText=100*K+"%",k.appendChild(le),T.opacityBoxes.push(k)}),P},d.prototype.setCurrentOpacity=function(T,P){var K=this;this.currentOpacity=T,this.opacityBoxes.forEach(function(k){k.style.borderColor=k===P?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},d}(Q),te=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.setOpacity=k.setOpacity.bind(k),k.fillColor=K.defaultHighlightColor,k.strokeWidth=0,k.opacity=K.defaultHighlightOpacity,k.fillPanel=new fe("Color",K.defaultColorSet,k.fillColor),k.fillPanel.onColorChanged=k.setFillColor,k.opacityPanel=new $("Opacity",K.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return we(d,N),d.prototype.setOpacity=function(T){this.opacity=T,this.visual&&ee.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=N.prototype.getState.call(this);return T.typeName=d.typeName,T},d.typeName="HighlightMarker",d.title="Highlight marker",d.icon='',d}(X),oe='',Te=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.bgColor="transparent",k.tipPosition={x:0,y:0},k.tipBase1Position={x:0,y:0},k.tipBase2Position={x:0,y:0},k.tipMoving=!1,k.color=K.defaultStrokeColor,k.bgColor=K.defaultFillColor,k.fontFamily=K.defaultFontFamily,k.defaultSize={x:100,y:30},k.setBgColor=k.setBgColor.bind(k),k.getTipPoints=k.getTipPoints.bind(k),k.positionTip=k.positionTip.bind(k),k.setTipPoints=k.setTipPoints.bind(k),k.colorPanel=new fe("Text color",K.defaultColorSet,k.color,''),k.colorPanel.onColorChanged=k.setColor,k.bgColorPanel=new fe("Fill color",K.defaultColorSet,k.bgColor,oe),k.bgColorPanel.onColorChanged=k.setBgColor,k.fontFamilyPanel=new Ie("Font",K.defaultFontFamilies,K.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k.tipGrip=new ke,k.tipGrip.visual.transform.baseVal.appendItem(ee.createTransform()),k.controlBox.appendChild(k.tipGrip.visual),k}return we(d,N),d.prototype.ownsTarget=function(T){return N.prototype.ownsTarget.call(this,T)||this.tipGrip.ownsTarget(T)||this.tip===T},d.prototype.createTip=function(){ee.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ee.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},d.prototype.pointerDown=function(T,P){this.state==="new"&&N.prototype.pointerDown.call(this,T,P),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(P)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):N.prototype.pointerDown.call(this,T,P)},d.prototype.pointerUp=function(T){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,N.prototype.pointerUp.call(this,T);else{var P=this.state==="creating";N.prototype.pointerUp.call(this,T),this.setTipPoints(P),this.positionTip()}},d.prototype.manipulate=function(T){if(this.tipMoving){var P=this.unrotatePoint(T);this.tipPosition={x:P.x-this.manipulationStartLeft,y:P.y-this.manipulationStartTop},this.positionTip()}else N.prototype.manipulate.call(this,T)},d.prototype.setBgColor=function(T){this.bgRectangle&&this.tip&&(ee.setAttributes(this.bgRectangle,[["fill",T]]),ee.setAttributes(this.tip,[["fill",T]])),this.bgColor=T,this.fillColorChanged(T)},d.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},d.prototype.setTipPoints=function(T){T===void 0&&(T=!1);var P=Math.min(this.height/2,15),K=this.height/5;T&&(this.tipPosition={x:P+K/2,y:this.height+20});var k=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?k',d}(Me),Ce=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.fillColor=K.defaultFillColor,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.setOpacity=k.setOpacity.bind(k),k.createVisual=k.createVisual.bind(k),k.strokePanel=new fe("Line color",ye(K.defaultColorSet,["transparent"]),K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.fillPanel=new fe("Fill color",ye(K.defaultColorSet,["transparent"]),k.fillColor,oe),k.fillPanel.onColorChanged=k.setFillColor,k.strokeWidthPanel=new qe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new Qe("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k.opacityPanel=new $("Opacity",K.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.visual)},d.prototype.createVisual=function(){this.visual=ee.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)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="new"&&(this.createVisual(),this.moveVisual(T),this._state="creating")},d.prototype.manipulate=function(T){N.prototype.manipulate.call(this,T)},d.prototype.resize=function(T){N.prototype.resize.call(this,T),this.setSize()},d.prototype.setSize=function(){N.prototype.setSize.call(this),ee.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},d.prototype.pointerUp=function(T){N.prototype.pointerUp.call(this,T),this.setSize()},d.prototype.setStrokeColor=function(T){this.strokeColor=T,this.visual&&ee.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(T),this.stateChanged()},d.prototype.setFillColor=function(T){this.fillColor=T,this.visual&&ee.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(T),this.stateChanged()},d.prototype.setStrokeWidth=function(T){this.strokeWidth=T,this.visual&&ee.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(T){this.strokeDasharray=T,this.visual&&ee.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.setOpacity=function(T){this.opacity=T,this.visual&&ee.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){var P=T;this.fillColor=P.fillColor,this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.opacity=P.opacity,this.createVisual(),N.prototype.restoreState.call(this,T),this.setSize()},d.prototype.scale=function(T,P){N.prototype.scale.call(this,T,P),this.setSize()},d.typeName="EllipseMarker",d.title="Ellipse marker",d.icon='',d}(Xe),Ke=function(N){function d(T,P,K){return N.call(this,T,P,K)||this}return we(d,N),Object.defineProperty(d.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.tip1&&T!==this.tip2)},d.prototype.createTips=function(){this.tip1=ee.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(ee.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ee.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(ee.createTransform()),this.visual.appendChild(this.tip2)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ee.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()]]),ee.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 T=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),P=this.tip1.transform.baseVal.getItem(0);P.setRotate(T,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(P,0);var K=this.tip2.transform.baseVal.getItem(0);K.setRotate(T+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(K,0)}},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=N.prototype.getState.call(this);return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T),this.createTips(),this.adjustVisual()},d.typeName="MeasurementMarker",d.title="Measurement marker",d.icon='',d}(nt),lt=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.strokePanel.colors=K.defaultColorSet,k.fillColor="transparent",k}return we(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=N.prototype.getState.call(this);return T.typeName=d.typeName,T},d.typeName="EllipseFrameMarker",d.title="Ellipse frame marker",d.icon='',d}(Ce),gt=function(){function N(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),N.prototype.addUndoStep=function(d){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(d)||(this.undoStack.push(d),JSON.stringify(this.lastRedoStep)!==JSON.stringify(d)&&this.redoStack.splice(0,this.redoStack.length))},N.prototype.replaceLastUndoStep=function(d){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=d)},N.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},N.prototype.undo=function(){if(this.undoStack.length>1){var d=this.undoStack.pop();return d!==void 0&&this.redoStack.push(d),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},N.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},N}(),ut=function(N){function d(T,P,K){var k=N.call(this,T,P,K)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.curveX=0,k.curveY=0,k.manipulationStartCurveX=0,k.manipulationStartCurveY=0,k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.positionGrips=k.positionGrips.bind(k),k.addControlGrips=k.addControlGrips.bind(k),k.adjustVisual=k.adjustVisual.bind(k),k.setupControlBox=k.setupControlBox.bind(k),k.resize=k.resize.bind(k),k.strokeColor=K.defaultColor,k.strokeWidth=K.defaultStrokeWidth,k.strokeDasharray=K.defaultStrokeDasharray,k.strokePanel=new fe("Line color",K.defaultColorSet,K.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new qe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new Qe("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return we(d,N),d.prototype.ownsTarget=function(T){return!(!N.prototype.ownsTarget.call(this,T)&&T!==this.visual&&T!==this.selectorCurve&&T!==this.visibleCurve&&!this.curveGrip.ownsTarget(T))},d.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},d.prototype.createVisual=function(){this.visual=ee.createGroup(),this.selectorCurve=ee.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ee.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)},d.prototype.pointerDown=function(T,P){N.prototype.pointerDown.call(this,T,P),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=T.x,this.curveY=T.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(P)&&(this.activeGrip=this.curveGrip,this._state="resize")},d.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ee.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ee.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ee.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setupControlBox=function(){N.prototype.setupControlBox.call(this),this.curveControlLine1=ee.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ee.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)},d.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,N.prototype.addControlGrips.call(this)},d.prototype.positionGrips=function(){N.prototype.positionGrips.call(this);var T=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-T/2,this.curveY-T/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()))},d.prototype.manipulate=function(T){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+T.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+T.y-this.manipulationStartY),N.prototype.manipulate.call(this,T)},d.prototype.resize=function(T){this.activeGrip===this.curveGrip&&(this.curveX=T.x,this.curveY=T.y),N.prototype.resize.call(this,T),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},d.prototype.setStrokeColor=function(T){this.strokeColor=T,this.adjustVisual(),this.colorChanged(T)},d.prototype.setStrokeWidth=function(T){this.strokeWidth=T,this.adjustVisual()},d.prototype.setStrokeDasharray=function(T){this.strokeDasharray=T,this.adjustVisual()},d.prototype.scale=function(T,P){this.curveX=this.curveX*T,this.curveY=this.curveY*P,N.prototype.scale.call(this,T,P)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var T=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},N.prototype.getState.call(this));return T.typeName=d.typeName,T},d.prototype.restoreState=function(T){N.prototype.restoreState.call(this,T);var P=T;this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.curveX=P.curveX,this.curveY=P.curveY,this.createVisual(),this.adjustVisual()},d.typeName="CurveMarker",d.title="Curve marker",d.icon='',d}(it),yt=function(){function N(d,T){T===void 0&&(T=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=d,this.cancelable=T}return Object.defineProperty(N.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),N.prototype.preventDefault=function(){this._defaultPrevented=!0},N}(),wt=function(N){function d(T,P,K){var k=N.call(this,T,!1)||this;return k.dataUrl=P,k.state=K,k}return we(d,N),d}(yt),rt=function(N){function d(T,P,K){K===void 0&&(K=!1);var k=N.call(this,T,K)||this;return k.marker=P,k}return we(d,N),d}(yt),Vt=function(){function N(){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 N.prototype.addEventListener=function(d,T){this[d].push(T)},N.prototype.removeEventListener=function(d,T){var P=this[d].indexOf(T);P>-1&&this[d].splice(P,1)},N}(),Pt=function(){function N(d){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ge,this._isOpen=!1,this.undoRedoManager=new gt,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 Vt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=N.instanceCounter++,this.styles=new Ne(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=d,this.targetRoot=document.body,this.width=d.clientWidth,this.height=d.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(N.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ze,pe,ce,Me,lt,Ce,te,Te,Ke,X,nt,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,pe,ce,Me,Ce,te,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,pe,ce,Me,te]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(d){var T=this;this._availableMarkerTypes.splice(0),d.forEach(function(P){if(typeof P=="string"){var K=T.ALL_MARKER_TYPES.find(function(k){return k.typeName===P});K!==void 0&&T._availableMarkerTypes.push(K)}else T._availableMarkerTypes.push(P)})},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(d){this._zoomLevel=d,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),N.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),je.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},N.prototype.show=function(){var d=this;this.styles.styleSheetRoot===void 0&&He.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=He.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(T){return T(new yt(d))})},N.prototype.render=function(){return Re(this,void 0,void 0,function(){var d;return Pe(this,function(T){switch(T.label){case 0:return this.setCurrentMarker(),(d=new et).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.markersOnly=this.renderMarkersOnly,d.width=this.renderWidth,d.height=this.renderHeight,[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return T.sent(),[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,T.sent()]}})})},N.prototype.close=function(d){var T=this;if(d===void 0&&(d=!1),this.isOpen){var P=!1;d||this.eventListeners.beforeclose.forEach(function(K){var k=new yt(T,!0);K(k),k.defaultPrevented&&(P=!0)}),P||(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(K){return K(new yt(T))}),this.detachEvents(),this._isOpen=!1)}},N.prototype.addMarkersToToolbar=function(){for(var d,T=[],P=0;Pthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*d:this.editorCanvas.clientWidth,P=T',d.title="Powered by marker.js",d.style.display="grid",d.style.alignItems="center",d.style.justifyItems="center",d.style.padding="3px",d.style.width="20px",d.style.height="20px",this.logoUI.appendChild(d),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},N.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")},N.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"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.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 d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"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 Ue(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-1&&this.markers.splice(this.markers.indexOf(d),1),d.dispose()},N.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())},N.prototype.toolbarButtonClicked=function(d,T){if(d==="marker"&&T!==void 0)this.createNewMarker(T);else if(d==="action")switch(T){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()}},N.prototype.deleteSelectedMarker=function(){var d=this;if(this._currentMarker!==void 0){var T=!1;if(this.eventListeners.markerbeforedelete.forEach(function(K){var k=new rt(d,d._currentMarker,!0);K(k),k.defaultPrevented&&(T=!0)}),!T){var P=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(K){return K(new rt(d,P))})}}},N.prototype.clear=function(){var d=this,T=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var Le=new rt(d,void 0,!0);le(Le),Le.defaultPrevented&&(T=!0)}),!T)){this.setCurrentMarker();for(var P=function(le){var Le=K.markers[le];K.setCurrentMarker(K.markers[le]),K._currentMarker.dispose(),K.markerImage.removeChild(K._currentMarker.container),K.markers.splice(K.markers.indexOf(K._currentMarker),1),K.eventListeners.markerdelete.forEach(function(Je){return Je(new rt(d,Le))})},K=this,k=this.markers.length-1;k>=0;k--)P(k);this.addUndoStep()}},Object.defineProperty(N.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),N.prototype.showNotesEditor=function(){var d;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=(d=this._currentMarker.notes)!==null&&d!==void 0?d:"",this.overlayContainer.appendChild(this.notesArea))},N.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)},N.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},N.prototype.addUndoStep=function(){var d=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var T=this.getState(),P=this.undoRedoManager.getLastUndoStep();if(!P||P.width===T.width&&P.height===T.height){var K=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(T),K1&&this.panTo({x:d.clientX,y:d.clientY}))},N.prototype.onPointerUp=function(d){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(d.clientX,d.clientY)),this.isDragging=!1,this.addUndoStep()},N.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},N.prototype.onKeyUp=function(d){this._currentMarker===void 0||this.notesArea!==void 0||d.key!=="Delete"&&d.key!=="Backspace"||this.deleteSelectedMarker()},N.prototype.clientToLocalCoordinates=function(d,T){var P=this.markerImage.getBoundingClientRect();return{x:(d-P.left)/this.zoomLevel,y:(T-P.top)/this.zoomLevel}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"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()},N.prototype.addLicenseKey=function(d){je.addKey(d)},N.prototype.addEventListener=function(d,T){this.eventListeners.addEventListener(d,T)},N.prototype.removeEventListener=function(d,T){this.eventListeners.removeEventListener(d,T)},N.prototype.renderState=function(d){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(d),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(N.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),N.prototype.focus=function(){var d=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(T){return T(new yt(d))}))},N.prototype.blur=function(){var d=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(T){return T(new yt(d))}))},N.instanceCounter=0,N}();/* **********************************
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 Zt=function(N,d){return(Zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var K in P)Object.prototype.hasOwnProperty.call(P,K)&&(T[K]=P[K])})(N,d)};function qt(N,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function T(){this.constructor=N}Zt(N,d),N.prototype=d===null?Object.create(d):(T.prototype=d.prototype,new T)}function bt(N,d,T,P){return new(T||(T=Promise))(function(K,k){function le(at){try{Je(P.next(at))}catch(De){k(De)}}function Le(at){try{Je(P.throw(at))}catch(De){k(De)}}function Je(at){var De;at.done?K(at.value):(De=at.value,De instanceof T?De:new T(function(mt){mt(De)})).then(le,Le)}Je((P=P.apply(N,d||[])).next())})}function ii(N,d){var T,P,K,k,le={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return k={next:Le(0),throw:Le(1),return:Le(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function Le(Je){return function(at){return function(De){if(T)throw new TypeError("Generator is already executing.");for(;le;)try{if(T=1,P&&(K=2&De[0]?P.return:De[0]?P.throw||((K=P.return)&&K.call(P),0):P.next)&&!(K=K.call(P,De[1])).done)return K;switch(P=0,K&&(De=[2&De[0],K.value]),De[0]){case 0:case 1:K=De;break;case 4:return le.label++,{value:De[1],done:!1};case 5:le.label++,P=De[1],De=[0];continue;case 7:De=le.ops.pop(),le.trys.pop();continue;default:if(!(K=le.trys,(K=K.length>0&&K[K.length-1])||De[0]!==6&&De[0]!==2)){le=0;continue}if(De[0]===3&&(!K||De[1]>K[0]&&De[1]0&&T>0){var P=new Wi(d,T),K=P.ratio>=1?20:P.getHorizontalLength(20),k=P.ratio<1?20:P.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 Le=ht.createDefs();le.appendChild(Le);var Je=ht.createElement("clipPath",[["id","text-bg-clip"]]);Le.appendChild(Je);var at=ht.createPath(ht.getHollowRectanglePath((24-K)/2,(24-k)/2,K,k,(24-K)/2+2,(24-k)/2+2,K-4,k-4));le.appendChild(at);var De=ht.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);De.appendChild(ht.createTSpan(d+":"+T)),le.appendChild(De);var mt=De.getBBox();ht.setAttributes(De,[["x",((24-mt.width)/2).toString()],["y",((24-mt.height)/2-mt.y).toString()]]);var kt=ht.createPath(ht.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(mt.width))/2,(24-Math.ceil(mt.height))/2,Math.ceil(mt.width),Math.ceil(mt.height)));return Je.appendChild(kt),ht.setAttributes(at,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(le),le.outerHTML}return''},N}(),_i=function(N){function d(T,P,K){var k=N.call(this,T,P)||this;return k.isDropdownOpen=!1,k.onClick=k.dropdownButtonClicked,k.dropdownButtons=K,k}return qt(d,N),d.prototype.setupDropdown=function(){var T=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(P){P.className=T.className,P.colorsClassName=T.colorsClassName,T.dropdownBlock.appendChild(P.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},d.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},d.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},d.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},d.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},d.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},d}(li),Oi=function(){function N(d,T){this.GRIP_SIZE=10,this.color=d,this.fillColor=T,this.visual=ht.createGroup(),this.visual.appendChild(ht.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ht.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},N.prototype.setCenter=function(d,T){this.visual.childNodes.forEach(function(P){return ht.setAttributes(P,[["cx",d.toString()],["cy",T.toString()]])})},N}(),Ci=function(){function N(d,T,P,K){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=d,this.canvasHeight=T,this.margin=P,this.container=K,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(N.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(d){this._aspectRatio=d,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.gridContainer&&ht.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(d){this._zoomFactor=d,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),N.prototype.open=function(){var d=this;this.cropShadeElement=ht.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ht.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var T=0;Tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-T.height/2),ht.setAttributes(this.cropRectElement,[["x",T.x.toString()],["y",T.y.toString()],["width",T.width.toString()],["height",T.height.toString()]]);var P=T.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(k,le){var Le=T.y+P*(le+1);ht.setAttributes(k,[["x1",""+T.x],["y1",""+Le],["x2",""+(T.x+T.width)],["y2",""+Le]])});var K=T.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(k,le){var Le=T.x+K*(le+1);ht.setAttributes(k,[["x1",""+Le],["y1",""+T.y],["x2",""+Le],["y2",""+(T.y+T.height)]])}),ht.setAttributes(this.cropShadeElement,[["d",ht.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,T.x,T.y,T.width,T.height)]]),this.topLeftGrip.setCenter(T.x,T.y),this.topRightGrip.setCenter(T.x+T.width,T.y),this.bottomLeftGrip.setCenter(T.x,T.y+T.height),this.bottomRightGrip.setCenter(T.x+T.width,T.y+T.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},N.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)},N.prototype.clientToLocalCoordinates=function(d,T){var P=this.container.getBoundingClientRect();return{x:d-P.left+this.margin,y:T-P.top+this.margin}},N.prototype.onPointerDown=function(d){this.container.setPointerCapture(d.pointerId),this.previousPoint=this.clientToLocalCoordinates(d.clientX,d.clientY),this.cropRectElement===d.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(d.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(d.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(d.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(d.target)&&(this.activeGrip=this.bottomRightGrip)},N.prototype.onPointerMove=function(d){if(this.isMoving)this.move(this.clientToLocalCoordinates(d.clientX,d.clientY));else if(this.activeGrip){var T=this.clientToLocalCoordinates(d.clientX,d.clientY);this.resize(T)}d.preventDefault()},N.prototype.onPointerUp=function(d){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(d.pointerId)},N.prototype.move=function(d){var T=d.x-this.previousPoint.x,P=d.y-this.previousPoint.y;this.zoomFactor!==1&&(T=-T/this.zoomFactor,P=-P/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+T),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+P),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=d},N.prototype.resize=function(d){var T=Object.assign({},this.cropRect),P=d.x-this.previousPoint.x,K=d.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:T.x+Pthis.canvasWidth*this.zoomFactor&&(P=this.canvasWidth*this.zoomFactor-T.width),T.width+=P}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(T.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(P),T.height=this.aspectRatio.getVerticalLength(T.width)):(T.y+=K,T.height=this.cropRect.y+this.cropRect.height-T.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?T.height=this.aspectRatio.getVerticalLength(T.width):T.height+=K}T.width<10&&(T.x=this.cropRect.x,T.width=10),T.height<10&&(T.y=this.cropRect.y,T.height=10),this.previousPoint=d,T.x>=this.margin&&T.y>=this.margin&&T.x-this.margin+T.width<=this.canvasWidth&&T.y-this.margin+T.height<=this.canvasHeight&&(this.cropRect=T,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},N.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var d=this.cropRect.x+this.cropRect.width/2,T=this.cropRect.y+this.cropRect.height/2,P=this.aspectRatio.getHorizontalLength(this.cropRect.height),K=this.aspectRatio.getVerticalLength(this.cropRect.width);P/this.canvasWidththis.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=d-this.cropRect.width/2,this.cropRect.y=T-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)}},N.prototype.getRescaledRect=function(d,T,P,K,k,le){var Le=P/d,Je=K/T;return{x:(k.x-le)*Le+le,y:(k.y-le)*Je+le,width:k.width*Le,height:k.height*Je}},N.prototype.scaleCanvas=function(d,T){var P=this.getRescaledRect(this.canvasWidth,this.canvasHeight,d,T,this.cropRect,this.margin);this.canvasWidth=d,this.canvasHeight=T,this.onCropChange&&this.onCropChange(P),this.setCropRectangle(P)},N}(),Ni=function(){function N(d){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=d,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(N.prototype,"angle",{get:function(){return this._angle},set:function(d){this._angle=d,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),N.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},N.prototype.onPointerDown=function(d){this.controlContainer.setPointerCapture(d.pointerId),this.isDragging=!0,this.previousPoint={x:d.clientX,y:d.clientY}},N.prototype.onPointerMove=function(d){this.isDragging&&(this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.previousPoint.x=d.clientX)},N.prototype.onPointerUp=function(d){this.isDragging&&this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(d.pointerId)},N.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var d=this.angleLabelText.getBBox();ht.setAttributes(this.angleLabelElement,[["x",((this.width-d.width)/2).toString()],["y",(this.height/2).toString()]])}},N.prototype.positionScaleShape=function(){if(this.scaleShape){var d=this.scaleShape.transform.baseVal.getItem(0);d.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(d,0)}},N.prototype.getVisual=function(){var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("width",this.width+"px"),d.setAttribute("height",this.height+"px"),d.setAttribute("viewBox","0 0 "+this.width+" "+this.height),d.style.flexShrink="0",document.body.appendChild(d);for(var T="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,P=1;P<=this.width/5+10;P++){var K=P%5==0?this.height/3:this.height/6;T+="h4v"+-K+"h1v"+K}T+="v1H0Z",this.scaleShape=ht.createPath(T);var k=ht.createTransform();this.scaleShape.transform.baseVal.appendItem(k),d.appendChild(this.scaleShape),this.angleLabelElement=ht.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ht.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var le=ht.createTSpan("");return le.innerHTML="°",this.angleLabelElement.appendChild(le),d.appendChild(this.angleLabelElement),document.body.removeChild(d),d},N}(),Li=function(){function N(){this.naturalSize=!1,this.imageType="image/png"}return N.prototype.rasterize=function(d,T,P,K,k,le,Le){var Je=this;return new Promise(function(at){var De=document.createElement("canvas");De.width=d.width.baseVal.value-2*K,De.height=d.height.baseVal.value-2*K;var mt=1,kt=1;Je.naturalSize===!0?(mt=T.naturalWidth/(d.width.baseVal.value-2*K)/le,kt=T.naturalHeight/(d.height.baseVal.value-2*K)/Le,De.width=T.naturalWidth/le,De.height=T.naturalHeight/Le):Je.width!==void 0&&Je.height!==void 0&&(mt=Je.width/P.width,kt=Je.height/P.height,De.width*=mt,De.height*=kt);var Kt=De.getContext("2d");Kt.translate(De.width/2,De.height/2),Kt.rotate(k*Math.PI/180),Kt.scale(le,Le),Kt.translate(-De.width/2,-De.height/2),Kt.drawImage(T,0,0,De.width,De.height);var wi=document.createElement("canvas");wi.width=P.width*mt,wi.height=P.height*kt,wi.getContext("2d").putImageData(Kt.getImageData((P.x-K)*mt,(P.y-K)*kt,P.width*mt,P.height*kt),0,0),at(wi.toDataURL(Je.imageType,Je.imageQuality))})},N}(),Ui=function(){function N(d){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=N.instanceCounter++,this.styles=new Si(this.instanceNo),this.target=d,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(d){this._zoomToCropEnabled=d,d?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLines",{get:function(){return this._gridLines},set:function(d){this._gridLines=d,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(d){this._rotationAngle=d,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"aspectRatio",{get:function(){var d;return(d=this._aspectRatio)!==null&&d!==void 0?d:this.aspectRatios[0]},set:function(d){this._aspectRatio=d},enumerable:!1,configurable:!0}),N.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},N.prototype.show=function(){this.showUI(),this.open()},N.prototype.close=function(d){d===void 0&&(d=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),d||this.closeEventListeners.forEach(function(T){return T()}),this._isOpen=!1)},N.prototype.addRenderEventListener=function(d){this.renderEventListeners.push(d)},N.prototype.removeRenderEventListener=function(d){this.renderEventListeners.indexOf(d)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(d),1)},N.prototype.addCloseEventListener=function(d){this.closeEventListeners.push(d)},N.prototype.removeCloseEventListener=function(d){this.closeEventListeners.indexOf(d)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(d),1)},N.prototype.setupResizeObserver=function(){var d=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.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))},N.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var d=1*this.target.clientWidth/this.target.clientHeight,T=this.contentDiv.clientWidth/d>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*d:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,P=T+2*this.CANVAS_MARGINd+this.CANVAS_MARGIN?this.target.offsetTop-(d+this.CANVAS_MARGIN):0;this.coverDiv.style.top=T+"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},N.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},N.prototype.addTopToolbar=function(){var d=this;this.topToolbar=new Ht,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var T=new oi;T.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(T);var P=[];this.aspectRatios.forEach(function(kt){var Kt=new li(Yt.getIcon(kt.horizontal,kt.vertical),kt.horizontal===0&&kt.vertical===0?"FREE":kt.horizontal+":"+kt.vertical);Kt.onClick=function(){return d.ratioButtonClicked(kt)},P.push(Kt)}),this.aspectRatioButton=new _i(Yt.getIcon(0,0),"Aspect ratio",P),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,T.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var K=new li('',"Toggle grid");K.isActive=this.isGridVisible,K.onClick=function(){d.isGridVisible=!d.isGridVisible,K.isActive=d.isGridVisible},T.addButton(K);var k=new li('',"Zoom to selection");if(k.isActive=this.zoomToCropEnabled,k.onClick=function(){d.zoomToCropEnabled=!d.zoomToCropEnabled,k.isActive=d.zoomToCropEnabled},T.addButton(k),!vi.isLicensed){var le=new ki;this.topToolbar.addElementBlock(le);var Le=document.createElement("div");Le.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Je=document.createElement("a");Je.style.color="currentColor",Je.href="https://markerjs.com/products/cropro",Je.target="_blank",Je.innerHTML='',Le.appendChild(Je),le.addElement(Le)}var at=new oi;at.minWidth=3*this.toolbarHeight+"px",at.contentAlign="end",this.topToolbar.addButtonBlock(at);var De=new li('',"OK");De.onClick=this.startRenderAndClose,at.addButton(De),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(De.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var mt=new li('',"Close");mt.onClick=this.close,at.addButton(mt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(mt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},N.prototype.addBottomToolbar=function(){var d=this;this.bottomToolbar=new Ht,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var T=new oi;T.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(T);var P=new li('',"Rotate left");P.onClick=this.rotateLeftButtonClicked,T.addButton(P);var K=new li('',"Rotate right");K.onClick=this.rotateRightButtonClicked,T.addButton(K);var k=new ki;k.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(k),this.straightener=new Ni("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(at){d.rotateBy(at),d.straightener.angle=d.rotationAngle},k.addElement(this.straightener.getUI());var le=new oi;le.minWidth=2*this.toolbarHeight+"px",le.contentAlign="end",this.bottomToolbar.addButtonBlock(le);var Le=new li('',"Flip horizontal");Le.onClick=this.flipHorizontallyButtonClicked,le.addButton(Le);var Je=new li('',"Flip vertical");Je.onClick=this.flipVerticallyButtonClicked,le.addButton(Je)},N.prototype.ratioButtonClicked=function(d){this.aspectRatio=d,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},N.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Yt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},N.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Wi(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},N.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},N.prototype.restoreState=function(d){if(d){var T=this.cropLayer.getRescaledRect(d.width,d.height,this.imageWidth,this.imageHeight,d.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(T),this.cropRectChanged(T),this.flippedHorizontally=d.flippedHorizontally,this.flippedVertically=d.flippedVertically,this.applyFlip(),this.rotationAngle=d.rotationAngle,this.applyRotation()}},N.prototype.clientToLocalCoordinates=function(d,T){var P=this.cropImage.getBoundingClientRect();return{x:d-P.left,y:T-P.top}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var d=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=d+"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()},N.prototype.rotateLeftButtonClicked=function(){var d=this.rotationAngle-90;this.rotationAngle%90!=0&&(d+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(d)},N.prototype.rotateRightButtonClicked=function(){var d=this.rotationAngle+90;this.rotationAngle%90!=0&&(d-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(d)},N.prototype.rotateTo=function(d){d=(d=d>180?d-360:d)<=-180?d+360:d,this.rotationAngle=d,this.applyRotation()},N.prototype.rotateBy=function(d){this.rotateTo((this.rotationAngle+d)%360)},N.prototype.applyRotation=function(){var d=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var T=this.editingTargetRotationContainer.transform.baseVal.getItem(0);T.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(T,0);var P=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/P.width,this.imageHeight/P.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=d},N.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},N.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},N.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},N.prototype.startRenderAndClose=function(){return bt(this,void 0,void 0,function(){var d,T;return ii(this,function(P){switch(P.label){case 0:return[4,this.render()];case 1:return d=P.sent(),T=this.getState(),this.renderEventListeners.forEach(function(K){return K(d,T)}),this.close(!0),[2]}})})},N.prototype.render=function(){return bt(this,void 0,void 0,function(){var d;return ii(this,function(T){switch(T.label){case 0:return(d=new Li).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.width=this.renderWidth,d.height=this.renderHeight,this.unzoomFromCrop(),ht.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,d.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 T.sent(),[4,d.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,T.sent()]}})})},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new dt("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 dt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new dt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var d=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new dt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*d)+`px;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new pt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new pt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new dt("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 dt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new dt("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 dt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new dt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},N.instanceCounter=0,N}(),qi=z("8hTe"),Ki=z.n(qi),cn=/]*>/g;function yn(N){var d=document.createElement("div");return d.innerHTML=N,d.childNodes.length===0?"":d.childNodes[0].nodeValue}var dn=ve.a=function(N){var d=N.value,T=d===void 0?"":d,P=N.edit,K=P===void 0?!1:P,k=N.className,le=N.showTextOnly,Le=N.showLines,Je=N.replaces,at=N.zoomImg,De=N.hasMask,mt=N.style,kt=mt===void 0?{}:mt,Kt=N.stylesPrev,wi=Kt===void 0?{}:Kt,Fi=String(T),pi=Object(C.useRef)(),Ri=Object(C.useRef)(),bn=Object(C.useState)(""),en=Object(H.a)(bn,2),Gi=en[0],Bi=en[1],fn=Object(C.useState)("office"),zi=Object(H.a)(fn,2),_n=zi[0],Vi=zi[1],En=function(){var Bt=new Ui(Ri.current);Bt.displayMode="popup",Bt.addRenderEventListener(function(){var ri=Object(M.a)(e.a.mark(function Mt(mi){var $t;return e.a.wrap(function(hi){for(;;)switch(hi.prev=hi.next){case 0:return pi.current.style.display="none",hi.next=3,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mi}});case 3:$t=hi.sent,$t!=null&&$t.id&&Je(Ri.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat($t==null?void 0:$t.id,"?type=").concat($t.content_type));case 5:case"end":return hi.stop()}},Mt)}));return function(Mt){return ri.apply(this,arguments)}}()),Bt.show()},Tn=function(){var Bt=new Pt(Ri.current);Bt.settings.displayMode="popup",Bt.addEventListener("render",function(){var ri=Object(M.a)(e.a.mark(function Mt(mi){var $t;return e.a.wrap(function(hi){for(;;)switch(hi.prev=hi.next){case 0:if(pi.current.style.display="none",!Ri.current){hi.next=6;break}return hi.next=4,Object(Se.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mi.dataUrl}});case 4:$t=hi.sent,$t!=null&&$t.id&&Je(Ri.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat($t==null?void 0:$t.id,"?type=").concat($t.content_type));case 6:case"end":return hi.stop()}},Mt)}));return function(Mt){return ri.apply(this,arguments)}}()),Bt.show(),window.markerArea=Bt},Yi=Object(C.useMemo)(function(){pi.current&&(pi.current.style.zIndex=-1);try{var ni=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Bt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ri=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Fi=Fi.replace(ni,"("+Y.a.API_SERVER+"/api/attachments/").replace(Bt,'"'+Y.a.API_SERVER+"/api/attachments/").replace(ri,'"'+Y.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch($i){}var Mt=D(Fi),mi=b();if(Fi.match(/\[TOC\]/)&&(Mt=Mt.replace("[TOC]
",x()),_()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function($i,hi){var tn=mi[hi],wn=tn.type,Sn=tn.expression;return Object(se.renderToString)(yn(Sn)||"",{displayMode:wn==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),m(),le){var $t=document.createElement("div");return $t.innerHTML=Mt,$t.innerText}return setTimeout(function(){return xn()},500),Mt},[Fi]),ui=Object(C.useRef)();g.WebkitLineClamp=Le,Le&&(kt=Object(O.a)(Object(O.a)({},kt),g));function Xi(ni){var Bt=ni.target;if(Bt.tagName.toUpperCase()==="IMG"){if(at){var ri=Bt.getAttribute("src");Bi(ri),Vi("image")}}else if(Bt.tagName.toUpperCase()==="A"){var Mt=Bt.getAttribute("href");if(Mt.indexOf("office")>-1)ni.preventDefault(),Bi(Mt),Vi("office");else if(Mt.indexOf("application/pdf")>-1)ni.preventDefault(),Bi(Mt),Vi("pdf");else if(Mt.indexOf("text/html")>-1)ni.preventDefault(),Bi(Mt),Vi("html");else if(Mt.startsWith("#")){ni.preventDefault();var mi=document.getElementById(Mt.replace("#",""));mi&&mi.scrollIntoView(!0)}}}var xn=function(){var Bt,ri=(Bt=ui.current)===null||Bt===void 0?void 0:Bt.querySelectorAll("video");ri==null||ri.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var mi=new W.a;mi.loadSource(Mt.src),mi.attachMedia(Mt)}}})};Object(C.useEffect)(function(){if(ui.current&&Yi&&(Yi.match(cn)&&window.PR.prettyPrint()),ui.current)return ui.current.addEventListener("click",Xi),function(){ui.current.removeEventListener("click",Xi),m(),_()}},[Yi,ui.current,Xi]);var Fn=function(Bt){if(!K)return;Bt.target.nodeName==="IMG"?(pi.current.style.zIndex=1,pi.current.style.display="flex",pi.current.style.width=Bt.target.clientWidth+"px",pi.current.style.height=Bt.target.clientHeight+"px",pi.current.style.top=Bt.target.offsetTop+"px",pi.current.style.left=Bt.target.offsetLeft+"px",Ri.current.src=Bt.target.getAttribute("src")):pi.current.style.display="none"};return f.a.createElement("div",{style:{position:"relative"}},f.a.createElement("div",{ref:ui,style:Object(O.a)({},kt),className:"".concat(k||""," markdown-body ").concat(Ki.a.mdBody),onMouseOver:Fn,dangerouslySetInnerHTML:{__html:Yi}}),f.a.createElement("div",{ref:pi,className:Ki.a.button},f.a.createElement(j.a,null,f.a.createElement(U.a,{onClick:function(){return En()}},"\u88C1\u526A"),f.a.createElement(U.a,{onClick:function(){return Tn()}},"\u7F16\u8F91"))),f.a.createElement("img",{ref:Ri,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),f.a.createElement(ne.a,{close:!0,data:Gi,type:Gi!=null&&Gi.length?_n:"",style:Object(O.a)({},wi),onClose:function(){return Bi("")}}))}},BU3w:function(st,ve,z){"use strict";z.d(ve,"a",function(){return M});var q=z("MNnm"),j="rc-util-key";function A(H){if(H.attachTo)return H.attachTo;var F=document.querySelector("head");return F||document.body}function U(H){var F,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(q.a)())return null;var C=document.createElement("style");if((F=e.csp)===null||F===void 0?void 0:F.nonce){var f;C.nonce=(f=e.csp)===null||f===void 0?void 0:f.nonce}C.innerHTML=H;var p=A(e),o=p.firstChild;return e.prepend&&p.prepend?p.prepend(C):e.prepend&&o?p.insertBefore(C,o):p.appendChild(C),C}var O=new Map;function M(H,F){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=A(e);if(!O.has(C)){var f=U("",e),p=f.parentNode;O.set(C,p),p.removeChild(f)}var o=Array.from(O.get(C).children).find(function(n){return n.tagName==="STYLE"&&n[j]===F});if(o){var a,r;if(((a=e.csp)===null||a===void 0?void 0:a.nonce)&&o.nonce!==((r=e.csp)===null||r===void 0?void 0:r.nonce)){var h;o.nonce=(h=e.csp)===null||h===void 0?void 0:h.nonce}return o.innerHTML!==H&&(o.innerHTML=H),o}var s=U(H,e);return s[j]=F,s}},BdwD:function(st,ve,z){"use strict";var q=z("+L6B"),j=z("2/Rp"),A=z("0Owb"),U=z("k1fw"),O=z("q1tI"),M=z.n(O),H=z("FOrL"),F=z.n(H),e=function(f){var p=f.buttonProps,o=p===void 0?{}:p,a=f.styles,r=a===void 0?{}:a,h=f.customText,s=f.ButtonText,n=f.ButtonClick,i=f.Buttonclass,t=f.ButtonTwo;return M.a.createElement("section",{className:"tc animated fadeIn",style:Object(U.a)(Object(U.a)({},{color:"#999",margin:"200px auto"}),r)},M.a.createElement("img",{src:F.a}),M.a.createElement("p",{className:"mt20 font14"},h||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&M.a.createElement(j.a,Object(A.a)({className:i,onClick:n},o),s),t&&t)};ve.a=e},"C/vA":function(st,ve,z){"use strict";z.d(ve,"a",function(){return q});function q(j){const A=this;let U=!1,O;return function(){return U||(U=!0,O=j.apply(A,arguments)),O}}},"Cg/j":function(st,ve,z){"use strict";z.d(ve,"b",function(){return q}),z.d(ve,"a",function(){return j}),z.d(ve,"c",function(){return U}),z.d(ve,"d",function(){return O});var q;(function(M){M.serviceIds=new Map,M.DI_TARGET="$di$target",M.DI_DEPENDENCIES="$di$dependencies";function H(F){return F[M.DI_DEPENDENCIES]||[]}M.getServiceDependencies=H})(q||(q={}));const j=U("instantiationService");function A(M,H,F,e){H[q.DI_TARGET]===H?H[q.DI_DEPENDENCIES].push({id:M,index:F,optional:e}):(H[q.DI_DEPENDENCIES]=[{id:M,index:F,optional:e}],H[q.DI_TARGET]=H)}function U(M){if(q.serviceIds.has(M))return q.serviceIds.get(M);const H=function(F,e,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");A(H,F,C,!1)};return H.toString=()=>M,q.serviceIds.set(M,H),H}function O(M){return function(H,F,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");A(M,H,e,!0)}}},DlQD:function(st,ve,z){(function(q,j){st.exports=j()})(this,function(){"use strict";function q(pe,ue){for(var ce=0;cepe.length)&&(ue=pe.length);for(var ce=0,X=new Array(ue);ce=pe.length?{done:!0}:{done:!1,value:pe[X++]}}}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 ce=pe[Symbol.iterator](),ce.next.bind(ce)}function M(pe,ue){return ue={exports:{}},pe(ue,ue.exports),ue.exports}var H=M(function(pe){function ue(){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 ce(X){pe.exports.defaults=X}pe.exports={defaults:ue(),getDefaults:ue,changeDefaults:ce}}),F=H.defaults,e=H.getDefaults,C=H.changeDefaults,f=/[&<>"']/,p=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(ue){return r[ue]};function s(pe,ue){if(ue){if(f.test(pe))return pe.replace(p,h)}else if(o.test(pe))return pe.replace(a,h);return pe}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(pe){return pe.replace(n,function(ue,ce){return ce=ce.toLowerCase(),ce==="colon"?":":ce.charAt(0)==="#"?ce.charAt(1)==="x"?String.fromCharCode(parseInt(ce.substring(2),16)):String.fromCharCode(+ce.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(pe,ue){pe=pe.source||pe,ue=ue||"";var ce={replace:function($,te){return te=te.source||te,te=te.replace(t,"$1"),pe=pe.replace($,te),ce},getRegex:function(){return new RegExp(pe,ue)}};return ce}var g=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(pe,ue,ce){if(pe){var X;try{X=decodeURIComponent(i(ce)).replace(g,"").toLowerCase()}catch($){return null}if(X.indexOf("javascript:")===0||X.indexOf("vbscript:")===0||X.indexOf("data:")===0)return null}ue&&!v.test(ce)&&(ce=l(ue,ce));try{ce=encodeURI(ce).replace(/%25/g,"%")}catch($){return null}return ce}var E={},y=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(pe,ue){E[" "+pe]||(y.test(pe)?E[" "+pe]=pe+"/":E[" "+pe]=I(pe,"/",!0)),pe=E[" "+pe];var ce=pe.indexOf(":")===-1;return ue.substring(0,2)==="//"?ce?ue:pe.replace(c,"$1")+ue:ue.charAt(0)==="/"?ce?ue:pe.replace(u,"$1")+ue:pe+ue}var b={exec:function(){}};function m(pe){for(var ue=1,ce,X;ue=0&&Te[Ke]==="\\";)Ce=!Ce;return Ce?"|":" |"}),X=ce.split(/ \|/),$=0;if(X.length>ue)X.splice(ue);else for(;X.length=X.length?$.slice(X.length):$}).join(`
`)}var xe=function(){function pe(ce){this.options=ce||B}var ue=pe.prototype;return ue.space=function(X){var $=this.rules.block.newline.exec(X);if($)return $[0].length>1?{type:"space",raw:$[0]}:{raw:`
`}},ue.code=function(X,$){var te=this.rules.block.code.exec(X);if(te){var oe=$[$.length-1];if(oe&&oe.type==="paragraph")return{raw:te[0],text:te[0].trimRight()};var Te=te[0].replace(/^ {4}/gm,"");return{type:"code",raw:te[0],codeBlockStyle:"indented",text:this.options.pedantic?Te:R(Te,`
`)}}},ue.fences=function(X){var $=this.rules.block.fences.exec(X);if($){var te=$[0],oe=Se(te,$[3]||"");return{type:"code",raw:te,lang:$[2]?$[2].trim():$[2],text:oe}}},ue.heading=function(X){var $=this.rules.block.heading.exec(X);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},ue.nptable=function(X){var $=this.rules.block.nptable.exec(X);if($){var te={type:"table",header:W($[1].replace(/^ *| *\| *$/g,"")),align:$[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:$[3]?$[3].replace(/\n$/,"").split(`
`):[],raw:$[0]};if(te.header.length===te.align.length){var oe=te.align.length,Te;for(Te=0;Te ?/gm,"");return{type:"blockquote",raw:$[0],text:te}}},ue.list=function(X){var $=this.rules.block.list.exec(X);if($){for(var te=$[0],oe=$[2],Te=oe.length>1,Ce=oe[oe.length-1]===")",Ke={type:"list",raw:te,ordered:Te,start:Te?+oe.slice(0,-1):"",loose:!1,items:[]},lt=$[0].match(this.rules.block.item),gt=!1,ut,yt,wt,rt,Vt,Pt,Zt,qt=lt.length,bt=0;bt1||this.options.smartLists&&wt!==oe)&&(rt=lt.slice(bt+1).join(`
`),Ke.raw=Ke.raw.substring(0,Ke.raw.length-rt.length),bt=qt-1)),Vt=gt||/\n\n(?!\s*$)/.test(ut),bt!==qt-1&&(gt=ut.charAt(ut.length-1)===`
`,Vt||(Vt=gt)),Vt&&(Ke.loose=!0),Pt=/^\[[ xX]\] /.test(ut),Zt=void 0,Pt&&(Zt=ut[1]!==" ",ut=ut.replace(/^\[[ xX]\] +/,"")),Ke.items.push({type:"list_item",raw:te,task:Pt,checked:Zt,loose:Vt,text:ut});return Ke}},ue.html=function(X){var $=this.rules.block.html.exec(X);if($)return{type:this.options.sanitize?"paragraph":"html",raw:$[0],pre:!this.options.sanitizer&&($[1]==="pre"||$[1]==="script"||$[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer($[0]):Y($[0]):$[0]}},ue.def=function(X){var $=this.rules.block.def.exec(X);if($){$[3]&&($[3]=$[3].substring(1,$[3].length-1));var te=$[1].toLowerCase().replace(/\s+/g," ");return{tag:te,raw:$[0],href:$[2],title:$[3]}}},ue.table=function(X){var $=this.rules.block.table.exec(X);if($){var te={type:"table",header:W($[1].replace(/^ *| *\| *$/g,"")),align:$[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:$[3]?$[3].replace(/\n$/,"").split(`
`):[]};if(te.header.length===te.align.length){te.raw=$[0];var oe=te.align.length,Te;for(Te=0;Te/i.test(oe[0])&&($=!1),!te&&/^<(pre|code|kbd|script)(\s|>)/i.test(oe[0])?te=!0:te&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(oe[0])&&(te=!1),{type:this.options.sanitize?"text":"html",raw:oe[0],inLink:$,inRawBlock:te,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):Y(oe[0]):oe[0]}},ue.link=function(X){var $=this.rules.inline.link.exec(X);if($){var te=se($[2],"()");if(te>-1){var oe=$[0].indexOf("!")===0?5:4,Te=oe+$[1].length+te;$[2]=$[2].substring(0,te),$[0]=$[0].substring(0,Te).trim(),$[3]=""}var Ce=$[2],Ke="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ce);lt?(Ce=lt[1],Ke=lt[3]):Ke=""}else Ke=$[3]?$[3].slice(1,-1):"";Ce=Ce.trim().replace(/^<([\s\S]*)>$/,"$1");var gt=ne($,{href:Ce&&Ce.replace(this.rules.inline._escapes,"$1"),title:Ke&&Ke.replace(this.rules.inline._escapes,"$1")},$[0]);return gt}},ue.reflink=function(X,$){var te;if((te=this.rules.inline.reflink.exec(X))||(te=this.rules.inline.nolink.exec(X))){var oe=(te[2]||te[1]).replace(/\s+/g," ");if(oe=$[oe.toLowerCase()],!oe||!oe.href){var Te=te[0].charAt(0);return{type:"text",raw:Te,text:Te}}var Ce=ne(te,oe,te[0]);return Ce}},ue.strong=function(X,$,te){te===void 0&&(te="");var oe=this.rules.inline.strong.start.exec(X);if(oe&&(!oe[1]||oe[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){$=$.slice(-1*X.length);var Te=oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Te.lastIndex=0;for(var Ce;(oe=Te.exec($))!=null;)if(Ce=this.rules.inline.strong.middle.exec($.slice(0,oe.index+3)),Ce)return{type:"strong",raw:X.slice(0,Ce[0].length),text:X.slice(2,Ce[0].length-2)}}},ue.em=function(X,$,te){te===void 0&&(te="");var oe=this.rules.inline.em.start.exec(X);if(oe&&(!oe[1]||oe[1]&&(te===""||this.rules.inline.punctuation.exec(te)))){$=$.slice(-1*X.length);var Te=oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Te.lastIndex=0;for(var Ce;(oe=Te.exec($))!=null;)if(Ce=this.rules.inline.em.middle.exec($.slice(0,oe.index+2)),Ce)return{type:"em",raw:X.slice(0,Ce[0].length),text:X.slice(1,Ce[0].length-1)}}},ue.codespan=function(X){var $=this.rules.inline.code.exec(X);if($){var te=$[2].replace(/\n/g," "),oe=/[^ ]/.test(te),Te=te.startsWith(" ")&&te.endsWith(" ");return oe&&Te&&(te=te.substring(1,te.length-1)),te=Y(te,!0),{type:"codespan",raw:$[0],text:te}}},ue.br=function(X){var $=this.rules.inline.br.exec(X);if($)return{type:"br",raw:$[0]}},ue.del=function(X){var $=this.rules.inline.del.exec(X);if($)return{type:"del",raw:$[0],text:$[1]}},ue.autolink=function(X,$){var te=this.rules.inline.autolink.exec(X);if(te){var oe,Te;return te[2]==="@"?(oe=Y(this.options.mangle?$(te[1]):te[1]),Te="mailto:"+oe):(oe=Y(te[1]),Te=oe),{type:"link",raw:te[0],text:oe,href:Te,tokens:[{type:"text",raw:oe,text:oe}]}}},ue.url=function(X,$){var te;if(te=this.rules.inline.url.exec(X)){var oe,Te;if(te[2]==="@")oe=Y(this.options.mangle?$(te[0]):te[0]),Te="mailto:"+oe;else{var Ce;do Ce=te[0],te[0]=this.rules.inline._backpedal.exec(te[0])[0];while(Ce!==te[0]);oe=Y(te[0]),te[1]==="www."?Te="http://"+oe:Te=oe}return{type:"link",raw:te[0],text:oe,href:Te,tokens:[{type:"text",raw:oe,text:oe}]}}},ue.inlineText=function(X,$,te){var oe=this.rules.inline.text.exec(X);if(oe){var Te;return $?Te=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):Y(oe[0]):oe[0]:Te=Y(this.options.smartypants?te(oe[0]):oe[0]),{type:"text",raw:oe[0],text:Te}}},pe}(),we=D.noopTest,Re=D.edit,Pe=D.merge,ye={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*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ye._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ye._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ye.def=Re(ye.def).replace("label",ye._label).replace("title",ye._title).getRegex(),ye.bullet=/(?:[*+-]|\d{1,9}[.)])/,ye.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ye.item=Re(ye.item,"gm").replace(/bull/g,ye.bullet).getRegex(),ye.list=Re(ye.list).replace(/bull/g,ye.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ye.def.source+")").getRegex(),ye._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",ye._comment=//,ye.html=Re(ye.html,"i").replace("comment",ye._comment).replace("tag",ye._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ye.paragraph=Re(ye._paragraph).replace("hr",ye.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",ye._tag).getRegex(),ye.blockquote=Re(ye.blockquote).replace("paragraph",ye.paragraph).getRegex(),ye.normal=Pe({},ye),ye.gfm=Pe({},ye.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*|$)"}),ye.gfm.nptable=Re(ye.gfm.nptable).replace("hr",ye.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",ye._tag).getRegex(),ye.gfm.table=Re(ye.gfm.table).replace("hr",ye.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",ye._tag).getRegex(),ye.pedantic=Pe({},ye.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ye._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:we,paragraph:Re(ye.normal._paragraph).replace("hr",ye.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ye.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ee.punctuation=Re(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ee._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ee.em.start=Re(ee.em.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.middle=Re(ee.em.middle).replace(/punctuation/g,ee._punctuation).replace(/overlapSkip/g,ee._overlapSkip).getRegex(),ee.em.endAst=Re(ee.em.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.endUnd=Re(ee.em.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.start=Re(ee.strong.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.middle=Re(ee.strong.middle).replace(/punctuation/g,ee._punctuation).replace(/blockSkip/g,ee._blockSkip).getRegex(),ee.strong.endAst=Re(ee.strong.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.endUnd=Re(ee.strong.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=Re(ee._blockSkip,"g").getRegex(),ee.overlapSkip=Re(ee._overlapSkip,"g").getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._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])?)+(?![-_])/,ee.autolink=Re(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=Re(ee.tag).replace("comment",ye._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=Re(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=Re(ee.reflink).replace("label",ee._label).getRegex(),ee.reflinkSearch=Re(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=Pe({},ee),ee.pedantic=Pe({},ee.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=Pe({},ee.normal,{escape:Re(ee.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]*?(?:(?=[\\.5&&(X="x"+X.toString(16)),ue+=""+X+";";return ue}var Ue=function(){function pe(ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=ce||et,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var X={block:He.normal,inline:Ne.normal};this.options.pedantic?(X.block=He.pedantic,X.inline=Ne.pedantic):this.options.gfm&&(X.block=He.gfm,this.options.breaks?X.inline=Ne.breaks:X.inline=Ne.gfm),this.tokenizer.rules=X}pe.lex=function(X,$){var te=new pe($);return te.lex(X)};var ue=pe.prototype;return ue.lex=function(X){return X=X.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(X,this.tokens,!0),this.inline(this.tokens),this.tokens},ue.blockTokens=function(X,$,te){$===void 0&&($=[]),te===void 0&&(te=!0),X=X.replace(/^ +$/gm,"");for(var oe,Te,Ce,Ke;X;){if(oe=this.tokenizer.space(X)){X=X.substring(oe.raw.length),oe.type&&$.push(oe);continue}if(oe=this.tokenizer.code(X,$)){X=X.substring(oe.raw.length),oe.type?$.push(oe):(Ke=$[$.length-1],Ke.raw+=`
`+oe.raw,Ke.text+=`
`+oe.text);continue}if(oe=this.tokenizer.fences(X)){X=X.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.heading(X)){X=X.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.nptable(X)){X=X.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.hr(X)){X=X.substring(oe.raw.length),$.push(oe);continue}if(oe=this.tokenizer.blockquote(X)){X=X.substring(oe.raw.length),oe.tokens=this.blockTokens(oe.text,[],te),$.push(oe);continue}if(oe=this.tokenizer.list(X)){for(X=X.substring(oe.raw.length),Ce=oe.items.length,Te=0;Te0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(Ke))!=null;)gt.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(Ke=Ke.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ke.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(Ke))!=null;)Ke=Ke.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Ke.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;X;){if(Ce=this.tokenizer.escape(X)){X=X.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.tag(X,te,oe)){X=X.substring(Ce.raw.length),te=Ce.inLink,oe=Ce.inRawBlock,$.push(Ce);continue}if(Ce=this.tokenizer.link(X)){X=X.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,oe)),$.push(Ce);continue}if(Ce=this.tokenizer.reflink(X,this.tokens.links)){X=X.substring(Ce.raw.length),Ce.type==="link"&&(Ce.tokens=this.inlineTokens(Ce.text,[],!0,oe)),$.push(Ce);continue}if(Ce=this.tokenizer.strong(X,Ke,Te)){X=X.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],te,oe),$.push(Ce);continue}if(Ce=this.tokenizer.em(X,Ke,Te)){X=X.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],te,oe),$.push(Ce);continue}if(Ce=this.tokenizer.codespan(X)){X=X.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.br(X)){X=X.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.del(X)){X=X.substring(Ce.raw.length),Ce.tokens=this.inlineTokens(Ce.text,[],te,oe),$.push(Ce);continue}if(Ce=this.tokenizer.autolink(X,Ae)){X=X.substring(Ce.raw.length),$.push(Ce);continue}if(!te&&(Ce=this.tokenizer.url(X,Ae))){X=X.substring(Ce.raw.length),$.push(Ce);continue}if(Ce=this.tokenizer.inlineText(X,oe,Ye)){X=X.substring(Ce.raw.length),Te=Ce.raw.slice(-1),$.push(Ce);continue}if(X){var ut="Infinite loop on byte: "+X.charCodeAt(0);if(this.options.silent){console.error(ut);break}else throw new Error(ut)}}return $},j(pe,null,[{key:"rules",get:function(){return{block:He,inline:Ne}}}]),pe}(),Ve=H.defaults,Q=D.cleanUrl,fe=D.escape,be=function(){function pe(ce){this.options=ce||Ve}var ue=pe.prototype;return ue.code=function(X,$,te){var oe=($||"").match(/\S*/)[0];if(this.options.highlight){var Te=this.options.highlight(X,oe);Te!=null&&Te!==X&&(te=!0,X=Te)}return oe?''+(te?X:fe(X,!0))+`
`:""+(te?X:fe(X,!0))+`
`},ue.blockquote=function(X){return`
`+X+`
`},ue.html=function(X){return X},ue.heading=function(X,$,te,oe){return this.options.headerIds?"
`:""+X+"
`},ue.hr=function(){return this.options.xhtml?`
`:`
`},ue.list=function(X,$,te){var oe=$?"ol":"ul",Te=$&&te!==1?' start="'+te+'"':"";return"<"+oe+Te+`>
`+X+""+oe+`>
`},ue.listitem=function(X){return""+X+`
`},ue.checkbox=function(X){return" "},ue.paragraph=function(X){return""+X+`
`},ue.table=function(X,$){return $&&($=""+$+""),`
`},ue.tablerow=function(X){return`
`+X+`
`},ue.tablecell=function(X,$){var te=$.header?"th":"td",oe=$.align?"<"+te+' align="'+$.align+'">':"<"+te+">";return oe+X+""+te+`>
`},ue.strong=function(X){return""+X+""},ue.em=function(X){return""+X+""},ue.codespan=function(X){return""+X+""},ue.br=function(){return this.options.xhtml?"
":"
"},ue.del=function(X){return""+X+""},ue.link=function(X,$,te){if(X=Q(this.options.sanitize,this.options.baseUrl,X),X===null)return te;var oe='"+te+"",oe},ue.image=function(X,$,te){if(X=Q(this.options.sanitize,this.options.baseUrl,X),X===null)return te;var oe='
":">",oe},ue.text=function(X){return X},pe}(),Ee=function(){function pe(){}var ue=pe.prototype;return ue.strong=function(X){return X},ue.em=function(X){return X},ue.codespan=function(X){return X},ue.del=function(X){return X},ue.html=function(X){return X},ue.text=function(X){return X},ue.link=function(X,$,te){return""+te},ue.image=function(X,$,te){return""+te},ue.br=function(){return""},pe}(),ke=function(){function pe(){this.seen={}}var ue=pe.prototype;return ue.slug=function(X){var $=X.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty($)){var te=$;do this.seen[te]++,$=te+"-"+this.seen[te];while(this.seen.hasOwnProperty($))}return this.seen[$]=0,$},pe}(),We=H.defaults,Xe=D.unescape,ze=function(){function pe(ce){this.options=ce||We,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new ke}pe.parse=function(X,$){var te=new pe($);return te.parse(X)};var ue=pe.prototype;return ue.parse=function(X,$){$===void 0&&($=!0);var te="",oe,Te,Ce,Ke,lt,gt,ut,yt,wt,rt,Vt,Pt,Zt,qt,bt,ii,vi,ht,Si=X.length;for(oe=0;oe0&&bt.tokens[0].type==="text"?(bt.tokens[0].text=ht+" "+bt.tokens[0].text,bt.tokens[0].tokens&&bt.tokens[0].tokens.length>0&&bt.tokens[0].tokens[0].type==="text"&&(bt.tokens[0].tokens[0].text=ht+" "+bt.tokens[0].tokens[0].text)):bt.tokens.unshift({type:"text",text:ht}):qt+=ht),qt+=this.parse(bt.tokens,Zt),wt+=this.renderer.listitem(qt,vi,ii);te+=this.renderer.list(wt,Vt,Pt);continue}case"html":{te+=this.renderer.html(rt.text);continue}case"paragraph":{te+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(wt=rt.tokens?this.parseInline(rt.tokens):rt.text;oe+1An error occurred:
"+Ze(Ce.message+"",!0)+"
";throw Ce}}Ie.options=Ie.setOptions=function(pe){return qe(Ie.defaults,pe),it(Ie.defaults),Ie},Ie.getDefaults=Ge,Ie.defaults=nt,Ie.use=function(pe){var ue=qe({},pe);if(pe.renderer&&function(){var X=Ie.defaults.renderer||new be,$=function(Te){var Ce=X[Te];X[Te]=function(){for(var Ke=arguments.length,lt=new Array(Ke),gt=0;gtt.length&&(g=t.length);_v===x){const v=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const E=v.next(),y=x.next();if(E.done!==y.done)return!1;if(E.done)return!0;if(!g(E.value,y.value))return!1}}j.equals=i})(q||(q={}))},LdHM:function(st,ve,z){"use strict";z.d(ve,"b",function(){return t}),z.d(ve,"a",function(){return g});var q=z("1OyB"),j=z("vuIU"),A=z("Ji7U"),U=z("LK+K"),O=z("q1tI"),M=z("rePB"),H=z("Ff2n"),F=z("ODXe"),e=z("4IlW"),C=z("bX4T"),f=z("YrtM"),p=z("TSYQ"),o=z.n(p),a=z("+nKL"),r=z("8OUc"),h=function(W,Y){var se=W.prefixCls,ne=W.id,Se=W.flattenOptions,xe=W.childrenAsData,we=W.values,Re=W.searchValue,Pe=W.multiple,ye=W.defaultActiveFirstOption,ee=W.height,je=W.itemHeight,et=W.notFoundContent,He=W.open,Ne=W.menuItemSelectedIcon,Ye=W.virtual,Ae=W.onSelect,Ue=W.onToggleOpen,Ve=W.onActiveValue,Q=W.onScroll,fe=W.onMouseEnter,be="".concat(se,"-item"),Ee=Object(f.a)(function(){return Se},[He,Se],function(Me,pe){return pe[0]&&Me[1]!==pe[1]}),ke=O.useRef(null),We=function(pe){pe.preventDefault()},Xe=function(pe){ke.current&&ke.current.scrollTo({index:pe})},ze=function(pe){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ce=Ee.length,X=0;X1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(R).map(function(Y,se){if(!O.isValidElement(Y)||!Y.type)return null;var ne=Y.type.isSelectOptGroup,Se=Y.key,xe=Y.props,we=xe.children,Re=Object(H.a)(xe,["children"]);return W||!ne?E(Y):Object(v.a)(Object(v.a)({key:"__RC_SELECT_GRP__".concat(Se===null?se:Se,"__"),label:Se},Re),{},{options:y(we)})}).filter(function(Y){return Y})}var c=z("2Qr1"),u=z("qNPg"),l=z("U8pU"),b=z("Kwbf"),m=z("WKfj");function w(R){var W=R.mode,Y=R.options,se=R.children,ne=R.backfill,Se=R.allowClear,xe=R.placeholder,we=R.getInputElement,Re=R.showSearch,Pe=R.onSearch,ye=R.defaultOpen,ee=R.autoFocus,je=R.labelInValue,et=R.value,He=R.inputValue,Ne=R.optionLabelProp,Ye=W==="multiple"||W==="tags",Ae=Re!==void 0?Re:Ye||W==="combobox",Ue=Y||y(se);if(Object(b.a)(W!=="tags"||Ue.every(function(be){return!be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var Ve=Ue.some(function(be){return be.options?be.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in be?be.value:be.key)=="number"});Object(b.a)(!Ve,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)(W!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)(W==="combobox"||!ne,"`backfill` only works with `combobox` mode."),Object(b.a)(W==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(b.b)(W!=="combobox"||!we||!Se||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pe&&!Ae&&W!=="combobox"&&W!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!ye||ee,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),et!=null){var Q=Object(m.d)(et);Object(b.a)(!je||Q.every(function(be){return Object(l.a)(be)==="object"&&("key"in be||"value"in be)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!Ye||Array.isArray(et),"`value` should be array when `mode` is `multiple` or `tags`")}if(se){var fe=null;Object(x.a)(se).some(function(be){if(!O.isValidElement(be)||!be.type)return!1;var Ee=be.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var ke=Object(x.a)(be.props.children).every(function(We){return!O.isValidElement(We)||!be.type||We.type.isSelectOption?!0:(fe=We.type,!1)});return!ke}return fe=Ee,!0}),fe&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(fe.displayName||fe.name||fe,"`.")),Object(b.a)(He===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=w,L=Object(u.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:y,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:I,fillOptionsWithMissingValue:c.a}),S=function(R){Object(A.a)(Y,R);var W=Object(U.a)(Y);function Y(){var se;return Object(q.a)(this,Y),se=W.apply(this,arguments),se.selectRef=O.createRef(),se.focus=function(){se.selectRef.current.focus()},se.blur=function(){se.selectRef.current.blur()},se}return Object(j.a)(Y,[{key:"render",value:function(){return O.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),Y}(O.Component);S.Option=t,S.OptGroup=g;var D=S,B=ve.c=D},MI8n:function(st,ve,z){"use strict";z.d(ve,"c",function(){return O}),z.d(ve,"b",function(){return e}),z.d(ve,"e",function(){return C}),z.d(ve,"a",function(){return f}),z.d(ve,"d",function(){return p}),z.d(ve,"f",function(){return o});var q=z("/cxE"),j=z("pmY6"),A=z("24hK"),U=z("5Y4S"),O;(function(a){a.None=()=>j.a.None;function r(w){return(I,L=null,S)=>{let D=!1,B;return B=w(R=>D?void 0:(B?B.dispose():D=!0,I.call(L,R)),null,S),D&&B.dispose(),B}}a.once=r;function h(w,I){return g((L,S=null,D)=>w(B=>L.call(S,I(B)),null,D))}a.map=h;function s(w,I){return g((L,S=null,D)=>w(B=>{I(B),L.call(S,B)},null,D))}a.forEach=s;function n(w,I){return g((L,S=null,D)=>w(B=>I(B)&&L.call(S,B),null,D))}a.filter=n;function i(w){return w}a.signal=i;function t(...w){return(I,L=null,S)=>Object(j.e)(...w.map(D=>D(B=>I.call(L,B),null,S)))}a.any=t;function _(w,I,L){let S=L;return h(w,D=>(S=I(S,D),S))}a.reduce=_;function g(w){let I;const L=new e({onFirstListenerAdd(){I=w(L.fire,L)},onLastListenerRemove(){I.dispose()}});return L.event}function v(w,I,L=100,S=!1,D){let B,R,W,Y=0;const se=new e({leakWarningThreshold:D,onFirstListenerAdd(){B=w(ne=>{Y++,R=I(R,ne),S&&!W&&(se.fire(R),R=void 0),clearTimeout(W),W=setTimeout(()=>{const Se=R;R=void 0,W=void 0,(!S||Y>1)&&se.fire(Se),Y=0},L)})},onLastListenerRemove(){B.dispose()}});return se.event}a.debounce=v;function x(w,I=(L,S)=>L===S){let L=!0,S;return n(w,D=>{const B=L||!I(D,S);return L=!1,S=D,B})}a.latch=x;function E(w,I){return[a.filter(w,I),a.filter(w,L=>!I(L))]}a.split=E;function y(w,I=!1,L=[]){let S=L.slice(),D=w(W=>{S?S.push(W):R.fire(W)});const B=()=>{S&&S.forEach(W=>R.fire(W)),S=null},R=new e({onFirstListenerAdd(){D||(D=w(W=>R.fire(W)))},onFirstListenerDidAdd(){S&&(I?setTimeout(B):B())},onLastListenerRemove(){D&&D.dispose(),D=null}});return R.event}a.buffer=y;class c{constructor(w){this.event=w}map(w){return new c(h(this.event,w))}forEach(w){return new c(s(this.event,w))}filter(w){return new c(n(this.event,w))}reduce(w,I){return new c(_(this.event,w,I))}latch(){return new c(x(this.event))}debounce(w,I=100,L=!1,S){return new c(v(this.event,w,I,L,S))}on(w,I,L){return this.event(w,I,L)}once(w,I,L){return r(this.event)(w,I,L)}}function u(w){return new c(w)}a.chain=u;function l(w,I,L=S=>S){const S=(...W)=>R.fire(L(...W)),D=()=>w.on(I,S),B=()=>w.removeListener(I,S),R=new e({onFirstListenerAdd:D,onLastListenerRemove:B});return R.event}a.fromNodeEventEmitter=l;function b(w,I,L=S=>S){const S=(...W)=>R.fire(L(...W)),D=()=>w.addEventListener(I,S),B=()=>w.removeEventListener(I,S),R=new e({onFirstListenerAdd:D,onLastListenerRemove:B});return R.event}a.fromDOMEventEmitter=b;function m(w){return new Promise(I=>r(w)(I))}a.toPromise=m})(O||(O={}));class M{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${M._idPool++}`}start(a){this._stopWatch=new U.a(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let H=-1;class F{constructor(a,r=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let r=H;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),r<=0||a{const n=this._stacks.get(h)||0;this._stacks.set(h,n-1)}}}class e{constructor(a){var r;this._disposed=!1,this._options=a,this._leakageMon=H>0?new F(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(a,r,h)=>{var s;this._listeners||(this._listeners=new A.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(r?[a,r]:a);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,r);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),_=Object(j.i)(()=>{if(t&&t(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const g=this._listeners&&!this._listeners.isEmpty();g||this._options.onLastListenerRemove(this)}});return h instanceof j.b?h.add(_):Array.isArray(h)&&h.push(_),_}),this._event}fire(a){var r,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new A.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,n]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,n):s[0].call(s[1],n)}catch(i){Object(q.f)(i)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var a,r,h,s,n;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(s=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||s===void 0||s.call(h),(n=this._leakageMon)===null||n===void 0||n.dispose())}}class C extends e{constructor(a){super(a);this._isPaused=0,this._eventQueue=new A.a,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}class f extends C{constructor(a){var r;super(a);this._delay=(r=a.delay)!==null&&r!==void 0?r:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class p{constructor(){this.buffers=[]}wrapEvent(a){return(r,h,s)=>a(n=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>r.call(h,n)):r.call(h,n)},void 0,s)}bufferEvents(a){const r=[];this.buffers.push(r);const h=a();return this.buffers.pop(),r.forEach(s=>s()),h}}class o{constructor(){this.listening=!1,this.inputEvent=O.None,this.inputEventListener=j.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(st,ve,z){"use strict";(function(q,j){z.d(ve,"b",function(){return h}),z.d(ve,"i",function(){return t}),z.d(ve,"f",function(){return _}),z.d(ve,"d",function(){return g}),z.d(ve,"g",function(){return v}),z.d(ve,"h",function(){return x}),z.d(ve,"c",function(){return E}),z.d(ve,"k",function(){return y}),z.d(ve,"j",function(){return c}),z.d(ve,"a",function(){return u}),z.d(ve,"e",function(){return m});var A;const U="en";let O=!1,M=!1,H=!1,F=!1,e=!1,C=!1,f=!1,p,o=U,a,r;const h=typeof self=="object"?self:typeof q=="object"?q:{};let s;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?s=h.vscode.process:typeof j!="undefined"&&(s=j);const n=typeof((A=s==null?void 0:s.versions)===null||A===void 0?void 0:A.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!n)r=navigator.userAgent,O=r.indexOf("Windows")>=0,M=r.indexOf("Macintosh")>=0,f=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=r.indexOf("Linux")>=0,C=!0,p=navigator.language,o=p;else if(typeof s=="object"){O=s.platform==="win32",M=s.platform==="darwin",H=s.platform==="linux",F=H&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,p=U,o=U;const w=s.env.VSCODE_NLS_CONFIG;if(w)try{const I=JSON.parse(w),L=I.availableLanguages["*"];p=I.locale,o=L||U,a=I._translationsConfigFile}catch(I){}e=!0}else console.error("Unable to resolve platform.");let i=0;M?i=1:O?i=3:H&&(i=2);const t=O,_=M,g=H,v=e,x=C,E=f,y=r,c=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let L=[];h.addEventListener("message",D=>{if(D.data&&D.data.vscodeSetImmediateId)for(let B=0,R=L.length;B{const B=++S;L.push({id:B,callback:D}),h.postMessage({vscodeSetImmediateId:B},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const I=Promise.resolve();return L=>I.then(L)}(),u=M||f?2:O?1:3;let l=!0,b=!1;function m(){if(!b){b=!0;const w=new Uint8Array(2);w[0]=1,w[1]=2;const I=new Uint16Array(w.buffer);l=I[0]===(2<<8)+1}return l}}).call(this,z("IyRk"),z("Q2Ig"))},N0LK:function(st,ve,z){"use strict";z.d(ve,"C",function(){return q}),z.d(ve,"v",function(){return A}),z.d(ve,"s",function(){return U}),z.d(ve,"t",function(){return O}),z.d(ve,"U",function(){return M}),z.d(ve,"J",function(){return H}),z.d(ve,"O",function(){return F}),z.d(ve,"p",function(){return e}),z.d(ve,"T",function(){return C}),z.d(ve,"q",function(){return f}),z.d(ve,"N",function(){return p}),z.d(ve,"M",function(){return o}),z.d(ve,"Q",function(){return a}),z.d(ve,"u",function(){return r}),z.d(ve,"x",function(){return h}),z.d(ve,"I",function(){return s}),z.d(ve,"f",function(){return n}),z.d(ve,"h",function(){return i}),z.d(ve,"g",function(){return t}),z.d(ve,"i",function(){return _}),z.d(ve,"G",function(){return g}),z.d(ve,"H",function(){return v}),z.d(ve,"r",function(){return x}),z.d(ve,"R",function(){return E}),z.d(ve,"d",function(){return y}),z.d(ve,"e",function(){return c}),z.d(ve,"E",function(){return u}),z.d(ve,"F",function(){return l}),z.d(ve,"j",function(){return b}),z.d(ve,"z",function(){return m}),z.d(ve,"K",function(){return I}),z.d(ve,"L",function(){return L}),z.d(ve,"m",function(){return D}),z.d(ve,"k",function(){return R}),z.d(ve,"A",function(){return Y}),z.d(ve,"a",function(){return se}),z.d(ve,"n",function(){return ne}),z.d(ve,"l",function(){return Se}),z.d(ve,"D",function(){return xe}),z.d(ve,"B",function(){return we}),z.d(ve,"b",function(){return Re}),z.d(ve,"S",function(){return Pe}),z.d(ve,"o",function(){return ye}),z.d(ve,"P",function(){return ee}),z.d(ve,"w",function(){return je}),z.d(ve,"c",function(){return et}),z.d(ve,"y",function(){return Ye});function q(Q){return!Q||typeof Q!="string"?!0:Q.trim().length===0}const j=/{(\d+)}/g;function A(Q,...fe){return fe.length===0?Q:Q.replace(j,function(be,Ee){const ke=parseInt(Ee,10);return isNaN(ke)||ke<0||ke>=fe.length?be:fe[ke]})}function U(Q){return Q.replace(/[<>&]/g,function(fe){switch(fe){case"<":return"<";case">":return">";case"&":return"&";default:return fe}})}function O(Q){return Q.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(Q,fe=" "){const be=H(Q,fe);return F(be,fe)}function H(Q,fe){if(!Q||!fe)return Q;const be=fe.length;if(be===0||Q.length===0)return Q;let Ee=0;for(;Q.indexOf(fe,Ee)===Ee;)Ee=Ee+be;return Q.substring(Ee)}function F(Q,fe){if(!Q||!fe)return Q;const be=fe.length,Ee=Q.length;if(be===0||Ee===0)return Q;let ke=Ee,We=-1;for(;!(We=Q.lastIndexOf(fe,ke-1),We===-1||We+be!==ke);){if(We===0)return"";ke=We}return Q.substring(0,ke)}function e(Q){return Q.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(Q){return Q.replace(/\*/g,"")}function f(Q,fe,be={}){if(!Q)throw new Error("Cannot create regex from empty string");fe||(Q=O(Q)),be.wholeWord&&(/\B/.test(Q.charAt(0))||(Q="\\b"+Q),/\B/.test(Q.charAt(Q.length-1))||(Q=Q+"\\b"));let Ee="";return be.global&&(Ee+="g"),be.matchCase||(Ee+="i"),be.multiline&&(Ee+="m"),be.unicode&&(Ee+="u"),new RegExp(Q,Ee)}function p(Q){if(Q.source==="^"||Q.source==="^$"||Q.source==="$"||Q.source==="^\\s*$")return!1;const fe=Q.exec("");return!!(fe&&Q.lastIndex===0)}function o(Q){return(Q.global?"g":"")+(Q.ignoreCase?"i":"")+(Q.multiline?"m":"")+(Q.unicode?"u":"")}function a(Q){return Q.split(/\r\n|\r|\n/)}function r(Q){for(let fe=0,be=Q.length;fe=0;be--){const Ee=Q.charCodeAt(be);if(Ee!==32&&Ee!==9)return be}return-1}function n(Q,fe){return Qfe?1:0}function i(Q,fe,be=0,Ee=Q.length,ke=0,We=fe.length){for(;beQe)return 1}const Xe=Ee-be,ze=We-ke;return Xeze?1:0}function t(Q,fe){return _(Q,fe,0,Q.length,0,fe.length)}function _(Q,fe,be=0,Ee=Q.length,ke=0,We=fe.length){for(;be=128||Qe>=128)return i(Q.toLowerCase(),fe.toLowerCase(),be,Ee,ke,We);g(qe)&&(qe-=32),g(Qe)&&(Qe-=32);const Ze=qe-Qe;if(Ze===0)continue;return Ze}const Xe=Ee-be,ze=We-ke;return Xeze?1:0}function g(Q){return Q>=97&&Q<=122}function v(Q){return Q>=65&&Q<=90}function x(Q,fe){return Q.length===fe.length&&_(Q,fe)===0}function E(Q,fe){const be=fe.length;return fe.length>Q.length?!1:_(Q,fe,0,be)===0}function y(Q,fe){let be,Ee=Math.min(Q.length,fe.length);for(be=0;be1){const Ee=Q.charCodeAt(fe-2);if(u(Ee))return b(Ee,be)}return be}function I(Q,fe){const be=He.getInstance(),Ee=fe,ke=Q.length,We=m(Q,ke,fe);fe+=We>=65536?2:1;let Xe=be.getGraphemeBreakType(We);for(;fe=65536?2:1,Xe=qe}return fe-Ee}function L(Q,fe){const be=He.getInstance(),Ee=fe,ke=w(Q,fe);fe-=ke>=65536?2:1;let We=be.getGraphemeBreakType(ke);for(;fe>0;){const Xe=w(Q,fe),ze=be.getGraphemeBreakType(Xe);if(et(ze,We))break;fe-=Xe>=65536?2:1,We=ze}return Ee-fe}const S=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function D(Q){return S.test(Q)}const B=/(?:[\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 R(Q){return B.test(Q)}const W=/^[\t\n\r\x20-\x7E]*$/;function Y(Q){return W.test(Q)}const se=/[\u2028\u2029]/;function ne(Q){return se.test(Q)}function Se(Q){for(let fe=0,be=Q.length;fe=11904&&Q<=55215||Q>=63744&&Q<=64255||Q>=65281&&Q<=65374}function we(Q){return Q>=127462&&Q<=127487||Q===8986||Q===8987||Q===9200||Q===9203||Q>=9728&&Q<=10175||Q===11088||Q===11093||Q>=127744&&Q<=128591||Q>=128640&&Q<=128764||Q>=128992&&Q<=129003||Q>=129280&&Q<=129535||Q>=129648&&Q<=129750}const Re=String.fromCharCode(65279);function Pe(Q){return!!(Q&&Q.length>0&&Q.charCodeAt(0)===65279)}function ye(Q,fe=!1){return Q?(fe&&(Q=Q.replace(/\\./g,"")),Q.toLowerCase()!==Q):!1}function ee(Q){const fe=90-65+1;return Q=Q%(2*fe),Qfe[3*Ee+1])Ee=2*Ee+1;else return fe[3*Ee+2];return 0}}He._INSTANCE=null;function Ne(){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 Ye(Q,fe){if(Q===0)return 0;const be=Ae(Q,fe);if(be!==void 0)return be;const Ee=w(fe,Q);return Q-=Ue(Ee),Q}function Ae(Q,fe){let be=w(fe,Q);for(Q-=Ue(be);Ve(be)||be===65039||be===8419;){if(Q===0)return;be=w(fe,Q),Q-=Ue(be)}if(!we(be))return;if(Q>=0){const Ee=w(fe,Q);Ee===8205&&(Q-=Ue(Ee))}return Q}function Ue(Q){return Q>=65536?2:1}function Ve(Q){return 127995<=Q&&Q<=127999}},SJMd:function(st,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 z,q,j,A=!1,U,O;window.PR_SHOULD_USE_CONTINUATION=!0;var M,H;(function(){var F=window,e=["break,continue,do,else,for,if,return,while"],C=[e,"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"],f=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[f,"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"],o=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[f,"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"],r="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",h=[f,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[e,"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"],i=[e,"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"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],_=[p,a,o,h,s,n,i,t],g=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,v="str",x="kwd",E="com",y="typ",c="lit",u="pun",l="pln",b="tag",m="dec",w="src",I="atn",L="atv",S="nocode",D="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(Ae){for(var Ue=0,Ve=!1,Q=!1,fe=0,be=Ae.length;fe122||(X<65||ce>90||it.push([Math.max(65,ce)|32,Math.min(X,90)|32]),X<97||ce>122||it.push([Math.max(97,ce)&~32,Math.min(X,122)&~32]))}}it.sort(function(Te,Ce){return Te[0]-Ce[0]||Ce[1]-Te[1]});for(var $=[],te=[],Me=0;Meoe[0]&&(oe[1]+1>oe[0]&&Ie.push("-"),Ie.push(Xe(oe[1])))}return Ie.push("]"),Ie.join("")}function qe(Ze){for(var Ge=Ze.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")),it=Ge.length,nt=[],Ie=0,Me=0;Ie=2&&ce==="["?Ge[Ie]=ze(pe):ce!=="\\"&&(Ge[Ie]=pe.replace(/[a-zA-Z]/g,function(te){var oe=te.charCodeAt(0);return"["+String.fromCharCode(oe&~32,oe|32)+"]"}))}return Ge.join("")}for(var Qe=[],fe=0,be=Ae.length;fe=0;)Ve[Qe.charAt(Ze)]=qe;var Ge=qe[1],it=""+Ge;We.hasOwnProperty(it)||(ke.push(Ge),We[it]=null)}ke.push(/[\0-\uffff]/),Q=B(ke)})();var fe=Ue.length,be=function(Ee){for(var ke=Ee.sourceCode,We=Ee.basePos,Xe=Ee.sourceNode,ze=[We,l],qe=0,Qe=ke.match(Q)||[],Ze={},Ge=0,it=Qe.length;Ge=5&&Ie.substring(0,5)==="lang-",pe&&!(Me&&typeof Me[1]=="string")&&(pe=!1,Ie=w),pe||(Ze[nt]=Ie)}var X=qe;if(qe+=nt.length,!pe)ze.push(We+X,Ie);else{var $=Me[1],te=nt.indexOf($),oe=te+$.length;Me[2]&&(oe=nt.length-Me[2].length,te=oe-$.length);var Te=Ie.substring(5);W(Xe,We+X,nt.substring(0,te),be,ze),W(Xe,We+X+te,$,ee(Te,$),ze),W(Xe,We+X+oe,nt.substring(oe),be,ze)}}Ee.decorations=ze};return be}function Se(Ae){var Ue=[],Ve=[];Ae.tripleQuotedStrings?Ue.push([v,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?Ue.push([v,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ue.push([v,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&Ve.push([v,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=Ae.hashComments;Q&&(Ae.cStyleComments?(Q>1?Ue.push([E,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ue.push([E,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ve.push([v,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ue.push([E,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(Ve.push([E,/^\/\/[^\r\n]*/,null]),Ve.push([E,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var fe=Ae.regexLiterals;if(fe){var be=fe>1?"":`
\r`,Ee=be?".":"[\\S\\s]",ke="/(?=[^/*"+be+"])(?:[^/\\x5B\\x5C"+be+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+be+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Ve.push(["lang-regex",RegExp("^"+D+"("+ke+")")])}var We=Ae.types;We&&Ve.push([y,We]);var Xe=(""+Ae.keywords).replace(/^ | $/g,"");Xe.length&&Ve.push([x,new RegExp("^(?:"+Xe.replace(/[\s,]+/g,"|")+")\\b"),null]),Ue.push([l,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(ze+="(?!s*/)"),Ve.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[u,new RegExp(ze),null]),ne(Ue,Ve)}var xe=Se({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(Ae,Ue,Ve){for(var Q=/(?:^|\s)nocode(?:\s|$)/,fe=/\r\n?|\n/,be=Ae.ownerDocument,Ee=be.createElement("li");Ae.firstChild;)Ee.appendChild(Ae.firstChild);var ke=[Ee];function We(Ge){var it=Ge.nodeType;if(it==1&&!Q.test(Ge.className))if(Ge.nodeName==="br")Xe(Ge),Ge.parentNode&&Ge.parentNode.removeChild(Ge);else for(var nt=Ge.firstChild;nt;nt=nt.nextSibling)We(nt);else if((it==3||it==4)&&Ve){var Ie=Ge.nodeValue,Me=Ie.match(fe);if(Me){var pe=Ie.substring(0,Me.index);Ge.nodeValue=pe;var ue=Ie.substring(Me.index+Me[0].length);if(ue){var ce=Ge.parentNode;ce.insertBefore(be.createTextNode(ue),Ge.nextSibling)}Xe(Ge),pe||Ge.parentNode.removeChild(Ge)}}}function Xe(Ge){for(;!Ge.nextSibling;)if(Ge=Ge.parentNode,!Ge)return;function it(Me,pe){var ue=pe?Me.cloneNode(!1):Me,ce=Me.parentNode;if(ce){var X=it(ce,1),$=Me.nextSibling;X.appendChild(ue);for(var te=$;te;te=$)$=te.nextSibling,X.appendChild(te)}return ue}for(var nt=it(Ge.nextSibling,0),Ie;(Ie=nt.parentNode)&&Ie.nodeType===1;)nt=Ie;ke.push(nt)}for(var ze=0;ze=ce&&(We+=2),be>=X&&(qe+=2)}}finally{Ie&&(Ie.style.display=Me)}}var Pe={};function ye(Ae,Ue){for(var Ve=Ue.length;--Ve>=0;){var Q=Ue[Ve];Pe.hasOwnProperty(Q)?F.console&&console.warn("cannot override language handler %s",Q):Pe[Q]=Ae}}function ee(Ae,Ue){return Ae&&Pe.hasOwnProperty(Ae)||(Ae=/^\s*]*(?:>|$)/],[E,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[u,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^