(window.webpackJsonp=window.webpackJsonp||[]).push([[98,5,7,8,15,17],{"+ua5":function(ct,_e,K){},"/cxE":function(ct,_e,K){"use strict";K.d(_e,"f",function(){return D}),K.d(_e,"g",function(){return W}),K.d(_e,"h",function(){return N}),K.d(_e,"e",function(){return z}),K.d(_e,"b",function(){return P}),K.d(_e,"c",function(){return e}),K.d(_e,"d",function(){return R}),K.d(_e,"a",function(){return p});class oe{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(g){setTimeout(()=>{throw g.stack?new Error(g.message+`
`+g.stack):g},0)}}emit(g){this.listeners.forEach(u=>{u(g)})}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}const G=new oe;function D(g){z(g)||G.onUnexpectedError(g);return}function W(g){z(g)||G.onUnexpectedExternalError(g);return}function N(g){if(g instanceof Error){let{name:u,message:s}=g;const i=g.stacktrace||g.stack;return{$isError:!0,name:u,message:s,stack:i}}return g}const O="Canceled";function z(g){return g instanceof Error&&g.name===O&&g.message===O}function P(){const g=new Error(O);return g.name=g.message,g}function e(g){return g?new Error(`Illegal argument: ${g}`):new Error("Illegal argument")}function R(g){return g?new Error(`Illegal state: ${g}`):new Error("Illegal state")}class p extends Error{constructor(g){super("NotSupported");g&&(this.message=g)}}},"24hK":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});class oe{constructor(D){this.element=D,this.next=oe.Undefined,this.prev=oe.Undefined}}oe.Undefined=new oe(void 0);class G{constructor(){this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===oe.Undefined}clear(){let D=this._first;for(;D!==oe.Undefined;){const W=D.next;D.prev=oe.Undefined,D.next=oe.Undefined,D=W}this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,W){const N=new oe(D);if(this._first===oe.Undefined)this._first=N,this._last=N;else if(W){const z=this._last;this._last=N,N.prev=z,z.next=N}else{const z=this._first;this._first=N,N.next=z,z.prev=N}this._size+=1;let O=!1;return()=>{O||(O=!0,this._remove(N))}}shift(){if(this._first===oe.Undefined)return;{const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last===oe.Undefined)return;{const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==oe.Undefined&&D.next!==oe.Undefined){const W=D.prev;W.next=D.next,D.next.prev=W}else D.prev===oe.Undefined&&D.next===oe.Undefined?(this._first=oe.Undefined,this._last=oe.Undefined):D.next===oe.Undefined?(this._last=this._last.prev,this._last.next=oe.Undefined):D.prev===oe.Undefined&&(this._first=this._first.next,this._first.prev=oe.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==oe.Undefined;)yield D.element,D=D.next}}},"3/fG":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});function oe(D,W){let N;return W.length===0?N=D:N=D.replace(/\{(\d+)\}/g,function(O,z){const P=z[0];return typeof W[P]!="undefined"?W[P]:O}),N}function G(D,W,...N){return oe(W,N)}},"49sm":function(ct,_e){var K={}.toString;ct.exports=Array.isArray||function(oe){return K.call(oe)=="[object Array]"}},"55Ip":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return r});var oe=K("Ty5D"),G=K("dI71"),D=K("q1tI"),W=K.n(D),N=K("YS25"),O=K("17x9"),z=K.n(O),P=K("wx14"),e=K("zLVn"),R=K("9R94"),p=function(n){Object(G.a)(l,n);function l(){for(var w,E=arguments.length,h=new Array(E),L=0;L=0||E.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;n.setState({goInputText:""}),F(n.getValidValue())},n.go=function(E){var h=n.state.goInputText;if(h==="")return;(E.keyCode===s.ENTER||E.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(N.a)(c,[{key:"getValidValue",value:function(){var l=this.state,d=l.goInputText,w=l.current;return!d||isNaN(d)?w:Number(d)}},{key:"getPageSizeOptions",value:function(){var l=this.props,d=l.pageSize,w=l.pageSizeOptions;return w.some(function(E){return E.toString()===d.toString()})?w:w.concat([d.toString()]).sort(function(E,h){var L=isNaN(Number(E))?0:Number(E),F=isNaN(Number(h))?0:Number(h);return L-F})}},{key:"render",value:function(){var l=this,d=this.props,w=d.pageSize,E=d.locale,h=d.rootPrefixCls,L=d.changeSize,F=d.quickGo,B=d.goButton,M=d.selectComponentClass,j=d.buildOptionText,U=d.selectPrefixCls,$=d.disabled,ee=this.state.goInputText,pe="".concat(h,"-options"),fe=M,Le=null,xe=null,Se=null;if(!L&&!F)return null;var Ue=this.getPageSizeOptions();if(L&&fe){var Fe=Ue.map(function(Ce,ve){return e.a.createElement(fe.Option,{key:ve,value:Ce.toString()},(j||l.buildOptionText)(Ce))});Le=e.a.createElement(fe,{disabled:$,prefixCls:U,showSearch:!1,className:"".concat(pe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(w||Ue[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ve){return ve.parentNode}},Fe)}return F&&(B&&(Se=typeof B=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:$,className:"".concat(pe,"-quick-jumper-button")},E.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),xe=e.a.createElement("div",{className:"".concat(pe,"-quick-jumper")},E.jump_to,e.a.createElement("input",{disabled:$,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),E.page,Se)),e.a.createElement("li",{className:"".concat(pe)},Le,xe)}}]),c}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=i,o=K("N2Kk");function a(){}function r(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function t(x,y,c){return c}function _(x,y,c){var n=typeof x=="undefined"?y.pageSize:x;return Math.floor((c.total-1)/n)+1}var v=function(x){Object(O.a)(c,x);var y=Object(z.a)(c);function c(n){var l;Object(W.a)(this,c),l=y.call(this,n),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(_(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(L,F){var B=l.props.prefixCls,M=L||e.a.createElement("button",{type:"button","aria-label":F,className:"".concat(B,"-item-link")});return typeof L=="function"&&(M=e.a.createElement(L,Object(D.a)({},l.props))),M},l.savePaginationNode=function(L){l.paginationNode=L},l.isValid=function(L){return r(L)&&L!==l.state.current},l.shouldDisplayQuickJumper=function(){var L=l.props,F=L.showQuickJumper,B=L.pageSize,M=L.total;return M<=B?!1:F},l.handleKeyDown=function(L){(L.keyCode===s.ARROW_UP||L.keyCode===s.ARROW_DOWN)&&L.preventDefault()},l.handleKeyUp=function(L){var F=l.getValidValue(L),B=l.state.currentInputValue;F!==B&&l.setState({currentInputValue:F}),L.keyCode===s.ENTER?l.handleChange(F):L.keyCode===s.ARROW_UP?l.handleChange(F-1):L.keyCode===s.ARROW_DOWN&&l.handleChange(F+1)},l.changePageSize=function(L){var F=l.state.current,B=_(L,l.state,l.props);F=F>B?B:F,B===0&&(F=l.state.current),typeof L=="number"&&("pageSize"in l.props||l.setState({pageSize:L}),"current"in l.props||l.setState({current:F,currentInputValue:F})),l.props.onShowSizeChange(F,L),"onChange"in l.props&&l.props.onChange&&l.props.onChange(F,L)},l.handleChange=function(L){var F=l.props.disabled,B=L;if(l.isValid(B)&&!F){var M=_(void 0,l.state,l.props);B>M?B=M:B<1&&(B=1),"current"in l.props||l.setState({current:B,currentInputValue:B});var j=l.state.pageSize;return l.props.onChange(B,j),B}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<_(void 0,l.state,l.props)},l.runIfEnter=function(L,F){if(L.key==="Enter"||L.charCode===13){for(var B=arguments.length,M=new Array(B>2?B-2:0),j=2;j=w?h=w:h=Number(d),h}},{key:"getShowSizeChanger",value:function(){var l=this.props,d=l.showSizeChanger,w=l.total,E=l.totalBoundaryShowSizeChanger;return typeof d!="undefined"?d:w>E}},{key:"renderPrev",value:function(l){var d=this.props,w=d.prevIcon,E=d.itemRender,h=E(l,"prev",this.getItemIcon(w,"prev page")),L=!this.hasPrev();return Object(P.isValidElement)(h)?Object(P.cloneElement)(h,{disabled:L}):h}},{key:"renderNext",value:function(l){var d=this.props,w=d.nextIcon,E=d.itemRender,h=E(l,"next",this.getItemIcon(w,"next page")),L=!this.hasNext();return Object(P.isValidElement)(h)?Object(P.cloneElement)(h,{disabled:L}):h}},{key:"render",value:function(){var l=this,d=this.props,w=d.prefixCls,E=d.className,h=d.style,L=d.disabled,F=d.hideOnSinglePage,B=d.total,M=d.locale,j=d.showQuickJumper,U=d.showLessItems,$=d.showTitle,ee=d.showTotal,pe=d.simple,fe=d.itemRender,Le=d.showPrevNextJumpers,xe=d.jumpPrevIcon,Se=d.jumpNextIcon,Ue=d.selectComponentClass,Fe=d.selectPrefixCls,Ce=d.pageSizeOptions,ve=this.state,Je=ve.current,at=ve.pageSize,nt=ve.currentInputValue;if(F===!0&&B<=at)return null;var tt=_(void 0,this.state,this.props),Ke=[],re=null,X=null,J=null,Y=null,ie=null,ue=j&&j.goButton,ce=U?1:2,He=Je-1>0?Je-1:0,Ve=Je+1=ce*2&&Je!==1+2&&(Ke[0]=Object(P.cloneElement)(Ke[0],{className:"".concat(w,"-item-after-jump-prev")}),Ke.unshift(re)),tt-Je>=ce*2&&Je!==tt-2&&(Ke[Ke.length-1]=Object(P.cloneElement)(Ke[Ke.length-1],{className:"".concat(w,"-item-before-jump-next")}),Ke.push(X)),je!==1&&Ke.unshift(J),$e!==tt&&Ke.push(Y)}var we=null;ee&&(we=e.a.createElement("li",{className:"".concat(w,"-total-text")},ee(B,[B===0?0:(Je-1)*at+1,Je*at>B?B:Je*at])));var he=!this.hasPrev()||!tt,ge=!this.hasNext()||!tt;return e.a.createElement("ul",Object(oe.a)({className:p()(w,E,Object(G.a)({},"".concat(w,"-disabled"),L)),style:h,unselectable:"unselectable",ref:this.savePaginationNode},We),we,e.a.createElement("li",{title:$?M.prev_page:null,onClick:this.prev,tabIndex:he?null:0,onKeyPress:this.runIfEnterPrev,className:p()("".concat(w,"-prev"),Object(G.a)({},"".concat(w,"-disabled"),he)),"aria-disabled":he},this.renderPrev(He)),Ke,e.a.createElement("li",{title:$?M.next_page:null,onClick:this.next,tabIndex:ge?null:0,onKeyPress:this.runIfEnterNext,className:p()("".concat(w,"-next"),Object(G.a)({},"".concat(w,"-disabled"),ge)),"aria-disabled":ge},this.renderNext(Ve)),e.a.createElement(A,{disabled:L,locale:M,rootPrefixCls:w,selectComponentClass:Ue,selectPrefixCls:Fe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Je,pageSize:at,pageSizeOptions:Ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(l,d){var w={};if("current"in l&&(w.current=l.current,l.current!==d.current&&(w.currentInputValue=w.current)),"pageSize"in l&&l.pageSize!==d.pageSize){var E=d.current,h=_(l.pageSize,d,l);E=E>h?h:E,"current"in l||(w.current=E,w.currentInputValue=E),w.pageSize=l.pageSize}return w}}]),c}(e.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:o.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var b=v},"6RRn":function(ct,_e,K){"use strict";var oe=K("wCXF"),G=K("n6Qo");K.d(_e,"b",function(){return G.a});var D=K("IBYe"),W=K("6eGT"),N=K("hW8S");K.d(_e,"a",function(){return N.a}),_e.c=oe.b},"6UM0":function(ct,_e,K){var oe,G;(function(){var D;(function(){"use strict";var N=[function(e,R,p){var g=p(1).Beautifier,u=p(5).Options;function s(i,A){var o=new g(i,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,p){var g=p(2).Output,u=p(3).Token,s=p(4),i=p(5).Options,A=p(7).Tokenizer,o=p(7).line_starters,a=p(7).positionable_operators,r=p(7).TOKEN;function t(U,$){return $.indexOf(U)!==-1}function _(U){return U.replace(/^\s+/g,"")}function v(U){for(var $={},ee=0;eeee&&(ee=U.line_indent_level));var pe={mode:$,parent:U,last_token:U?U.last_token:new u(r.START_BLOCK,""),last_word:U?U.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ee,alignment:0,line_indent_level:U?U.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return pe},M.prototype._reset=function(U){var $=U.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new g(this._options,$),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var ee=new A(U,this._options);return this._tokens=ee.tokenize(),U},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var U,$=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=`
`,$&&s.lineBreak.test($||"")&&(ee=$.match(s.lineBreak)[0]));for(var pe=this._tokens.next();pe;)this.handle_token(pe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=pe,pe=this._tokens.next();return U=this._output.get_code(ee),U},M.prototype.handle_token=function(U,$){U.type===r.START_EXPR?this.handle_start_expr(U):U.type===r.END_EXPR?this.handle_end_expr(U):U.type===r.START_BLOCK?this.handle_start_block(U):U.type===r.END_BLOCK?this.handle_end_block(U):U.type===r.WORD?this.handle_word(U):U.type===r.RESERVED?this.handle_word(U):U.type===r.SEMICOLON?this.handle_semicolon(U):U.type===r.STRING?this.handle_string(U):U.type===r.EQUALS?this.handle_equals(U):U.type===r.OPERATOR?this.handle_operator(U):U.type===r.COMMA?this.handle_comma(U):U.type===r.BLOCK_COMMENT?this.handle_block_comment(U,$):U.type===r.COMMENT?this.handle_comment(U,$):U.type===r.DOT?this.handle_dot(U):U.type===r.EOF?this.handle_eof(U):U.type===r.UNKNOWN?this.handle_unknown(U,$):this.handle_unknown(U,$)},M.prototype.handle_whitespace_and_comments=function(U,$){var ee=U.newlines,pe=this._options.keep_array_indentation&&h(this._flags.mode);if(U.comments_before)for(var fe=U.comments_before.next();fe;)this.handle_whitespace_and_comments(fe,$),this.handle_token(fe,$),fe=U.comments_before.next();if(pe)for(var Le=0;Le0,$);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,$);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))},M.prototype.set_mode=function(U){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,U),this._flags=this.create_flags(this._previous_flags,U),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(U){var $=!1;return $=$||x(this._flags.last_token,["var","let","const"])&&U.type===r.WORD,$=$||b(this._flags.last_token,"do"),$=$||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&x(this._flags.last_token,j)&&!U.newlines,$=$||b(this._flags.last_token,"else")&&!(b(U,"if")&&!U.comments_before),$=$||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),$=$||this._flags.last_token.type===r.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(U.text==="--"||U.text==="++")&&this._last_last_text!=="function"&&U.type!==r.WORD&&U.type!==r.RESERVED,$=$||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),$?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(U,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U,x(U,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U);var $=d.Expression;if(U.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(U),this.set_mode($),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}$=d.ArrayLiteral,h(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,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,$=d.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,$=d.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&U.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var pe=this._tokens.peek(-4);x(ee,["async","function"])||ee.text==="*"&&x(pe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.text==="*"&&(pe.text==="{"||pe.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(U);(this._flags.last_token.type===r.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===d.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===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(U,U.newlines),this.print_token(U),this.set_mode($),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(U){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(U,U.text==="]"&&h(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.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(U),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(U){this.handle_whitespace_and_comments(U);var $=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):ee&&(t(ee.text,[":",","])&&t($.type,[r.STRING,r.WORD,r.RESERVED])||t($.text,["get","set","..."])&&t(ee.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(ee.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var pe=!$.comments_before&&$.text==="}",fe=pe&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Le=0,xe=null;this._flags.inline_frame=!0;do if(Le+=1,xe=this._tokens.peek(Le-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==r.EOF&&!(xe.type===r.END_BLOCK&&xe.opened===U))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&U.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(fe||this._flags.last_token.type===r.EQUALS||x(this._flags.last_token,y)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(h(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(U),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(U),this.indent(),!pe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(U){for(this.handle_whitespace_and_comments(U);this._flags.mode===d.Statement;)this.restore_mode();var $=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!$?this._output.space_before_token=!0:this._options.brace_style==="expand"?$||this.print_newline():$||(h(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(U)},M.prototype.handle_word=function(U){if(U.type===r.RESERVED){if(t(U.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)U.type=r.WORD;else if(U.text==="import"&&t(this._tokens.peek().text,["(","."]))U.type=r.WORD;else if(t(U.text,["as","from"])&&!this._flags.import_block)U.type=r.WORD;else if(this._flags.mode===d.ObjectLiteral){var $=this._tokens.peek();$.text===":"&&(U.type=r.WORD)}}if(this.start_of_statement(U)?x(this._flags.last_token,["var","let","const"])&&U.type===r.WORD&&(this._flags.declaration_statement=!0):U.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(U),this.print_newline()):this.handle_whitespace_and_comments(U),this._flags.do_block&&!this._flags.do_while)if(b(U,"while")){this._output.space_before_token=!0,this.print_token(U),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&&b(U,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(U,["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(U),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U)),b(U,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!U.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,j)?this._output.space_before_token=!0:b(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===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||h(this._flags.mode))||this.print_newline(),this.print_token(U),this._flags.last_word=U.text;return}var ee="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":x(U,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===d.BlockStatement?ee="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&L(this._flags.mode)?ee="SPACE":this._flags.last_token.type===r.STRING?ee="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&t(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),x(U,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),x(U,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var pe=this._output.current_line;pe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ee==="NEWLINE"?x(this._flags.last_token,y)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(U,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!x(U,["var","let","const"]))&&this._flags.last_token.text!==":"&&(b(U,"if")&&b(U.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(U,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&h(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ee==="SPACE"&&(this._output.space_before_token=!0);U.previous&&(U.previous.type===r.WORD||U.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(U),this._flags.last_word=U.text,U.type===r.RESERVED&&(U.text==="do"?this._flags.do_block=!0:U.text==="if"?this._flags.if_block=!0:U.text==="import"?this._flags.import_block=!0:this._flags.import_block&&b(U,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(U){this.start_of_statement(U)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(U);for(var $=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&b($,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(U)},M.prototype.handle_string=function(U){U.text.startsWith("`")&&U.newlines===0&&U.whitespace_before===""&&(U.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(U)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(U),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U):U.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(U.previous.text==="]"||U.previous.text===")")&&U.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(U)},M.prototype.handle_equals=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0},M.prototype.handle_comma=function(U){this.handle_whitespace_and_comments(U,!0),this.print_token(U),this._output.space_before_token=!0,this._flags.declaration_statement?(L(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(U)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(U)},M.prototype.handle_operator=function(U){var $=U.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),ee=t(U.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(U)){var pe=!$;this.handle_whitespace_and_comments(U,pe)}if(U.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(U);return}if(U.text==="::"){this.print_token(U);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(U),U.text===":"&&this._flags.in_case){this.print_token(U),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var fe=!0,Le=!0,xe=!1;if(U.text===":"?this._flags.ternary_depth===0?fe=!1:(this._flags.ternary_depth-=1,xe=!0):U.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!$&&this._options.preserve_newlines&&t(U.text,a)){var Se=U.text===":",Ue=Se&&xe,Fe=Se&&!xe;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!Fe,this.print_token(U),(!Se||Ue)&&this.allow_wrap_or_preserved_newline(U),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!Se||Ue?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(U):this._output.space_before_token=!1,this.print_token(U),this._output.space_before_token=!0;return;case n.preserve_newline:Fe||this.allow_wrap_or_preserved_newline(U),fe=!(this._output.just_added_newline()||Fe),this._output.space_before_token=fe,this.print_token(U),this._output.space_before_token=!0;return}}if($){this.allow_wrap_or_preserved_newline(U),fe=!1;var Ce=this._tokens.peek();Le=Ce&&t(Ce.type,[r.WORD,r.RESERVED])}else if(U.text==="...")this.allow_wrap_or_preserved_newline(U),fe=this._flags.last_token.type===r.START_BLOCK,Le=!1;else if(t(U.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(U),fe=!1,Le=!1,U.newlines&&(U.text==="--"||U.text==="++"||U.text==="~")){var ve=x(this._flags.last_token,y)&&U.newlines;ve&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ve,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(fe=!0),this._flags.last_token.type===r.RESERVED?fe=!0:this._flags.last_token.type===r.END_EXPR?fe=!(this._flags.last_token.text==="]"&&(U.text==="--"||U.text==="++")):this._flags.last_token.type===r.OPERATOR&&(fe=t(U.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(U.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Le=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||fe,this.print_token(U),this._output.space_before_token=Le},M.prototype.handle_block_comment=function(U,$){if(this._output.raw){this._output.add_raw_token(U),U.directives&&U.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(U.directives){this.print_newline(!1,$),this.print_token(U),U.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(U.text)&&!U.newlines){this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0;return}else this.print_block_commment(U,$)},M.prototype.print_block_commment=function(U,$){var ee=E(U.text),pe,fe=!1,Le=!1,xe=U.whitespace_before,Se=xe.length;if(this.print_newline(!1,$),this.print_token_line_indentation(U),this._output.add_token(ee[0]),this.print_newline(!1,$),ee.length>1){for(ee=ee.slice(1),fe=F(ee,"*"),Le=B(ee,xe),fe&&(this._flags.alignment=1),pe=0;pe=0;s--)if(this.__items[s].match(u))return!0;return!1},R.prototype.set_indent=function(u,s){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.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)},R.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},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(u){this.__items.push(u);var s=u.lastIndexOf(`
`);s!==-1?this.__character_count=u.length-s:this.__character_count+=u.length},R.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function p(u,s){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),s=s||"",u.indent_level>0&&(s=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}p.prototype.get_indent_size=function(u,s){var i=this.__base_string_length;return s=s||0,u<0&&(i=0),i+=u*this.__indent_size,i+=s,i},p.prototype.get_indent_string=function(u,s){var i=this.__base_string;return s=s||0,u<0&&(u=0,i=""),s+=u*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},p.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var u=this.__cache.length,s=0,i="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),u&&(i+=new Array(u+1).join(" ")),this.__cache.push(i)};function g(u,s){this.__indent_cache=new p(u,s),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}g.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},g.prototype.get_line_number=function(){return this.__lines.length},g.prototype.get_indent_string=function(u,s){return this.__indent_cache.get_indent_string(u,s)},g.prototype.get_indent_size=function(u,s){return this.__indent_cache.get_indent_size(u,s)},g.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},g.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},g.prototype.get_code=function(u){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
`);return u!==`
`&&(i=i.replace(/[\n]/g,u)),i},g.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},g.prototype.set_indent=function(u,s){return u=u||0,s=s||0,this.next_line.set_indent(u,s),this.__lines.length>1?(this.current_line.set_indent(u,s),!0):(this.current_line.set_indent(),!1)},g.prototype.add_raw_token=function(u){for(var s=0;s1&&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},g.prototype.just_added_newline=function(){return this.current_line.is_empty()},g.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},g.prototype.ensure_empty_line_above=function(u,s){for(var i=this.__lines.length-2;i>=0;){var A=this.__lines[i];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=g},function(e){function R(p,g,u,s){this.type=p,this.text=g,this.comments_before=null,this.newlines=u||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=R},function(e,R){var p="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",g="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+p+u+"])",A="(?:\\\\u[0-9a-fA-F]{4}|["+g+u+s+"])*";R.identifier=new RegExp(i+A,"g"),R.identifierStart=new RegExp(i),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+g+u+s+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(e,R,p){var g=p(6).Options,u=["before-newline","after-newline","preserve-newline"];function s(i){g.call(this,i,"js");var A=this.raw_options.brace_style||null;A==="expand-strict"?this.raw_options.brace_style="expand":A==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),c=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";c=c.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),c="\\?\\.(?!\\d) "+c,c=c.replace(/ /g,"|");var n=new RegExp(c),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+d.join("|")+")$"),E,h=function(F,B){u.call(this,F,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new o(this._input),j=new a(this._input).read_options(this._options);this.__patterns={template:j,identifier:j.starting_with(A.identifier).matching(A.identifierMatch),number:M.matching(v),punct:M.matching(n),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(//),include:M.starting_with(/#include/).until_after(A.lineBreak),shebang:M.starting_with(/#!/).until_after(A.lineBreak),xml:M.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:j.until(/['\\\n\r\u2028\u2029]/),double_quote:j.until(/["\\\n\r\u2028\u2029]/),template_text:j.until(/[`\\$]/),template_expression:j.until(/[`}\\]/)}};h.prototype=new u,h.prototype._is_comment=function(F){return F.type===t.COMMENT||F.type===t.BLOCK_COMMENT||F.type===t.UNKNOWN},h.prototype._is_opening=function(F){return F.type===t.START_BLOCK||F.type===t.START_EXPR},h.prototype._is_closing=function(F,B){return(F.type===t.END_BLOCK||F.type===t.END_EXPR)&&B&&(F.text==="]"&&B.text==="["||F.text===")"&&B.text==="("||F.text==="}"&&B.text==="{")},h.prototype._reset=function(){E=!1},h.prototype._get_next_token=function(F,B){var M=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(t.EOF,""):(M=M||this._read_non_javascript(j),M=M||this._read_string(j),M=M||this._read_word(F),M=M||this._read_singles(j),M=M||this._read_comment(j),M=M||this._read_regexp(j,F),M=M||this._read_xml(j,F),M=M||this._read_punctuation(),M=M||this._create_token(t.UNKNOWN,this._input.next()),M)},h.prototype._read_word=function(F){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(A.allLineBreaks,`
`),!(F.type===t.DOT||F.type===t.RESERVED&&(F.text==="set"||F.text==="get"))&&w.test(B)?(B==="in"||B==="of")&&(F.type===t.WORD||F.type===t.STRING)?this._create_token(t.OPERATOR,B):this._create_token(t.RESERVED,B):this._create_token(t.WORD,B);if(B=this.__patterns.number.read(),B!=="")return this._create_token(t.WORD,B)},h.prototype._read_singles=function(F){var B=null;return F==="("||F==="["?B=this._create_token(t.START_EXPR,F):F===")"||F==="]"?B=this._create_token(t.END_EXPR,F):F==="{"?B=this._create_token(t.START_BLOCK,F):F==="}"?B=this._create_token(t.END_BLOCK,F):F===";"?B=this._create_token(t.SEMICOLON,F):F==="."&&x.test(this._input.peek(1))?B=this._create_token(t.DOT,F):F===","&&(B=this._create_token(t.COMMA,F)),B&&this._input.next(),B},h.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(t.EQUALS,F):F==="?."?this._create_token(t.DOT,F):this._create_token(t.OPERATOR,F)},h.prototype._read_non_javascript=function(F){var B="";if(F==="#"){if(this._is_first_token()&&(B=this.__patterns.shebang.read(),B))return this._create_token(t.UNKNOWN,B.trim()+`
`);if(B=this.__patterns.include.read(),B)return this._create_token(t.UNKNOWN,B.trim()+`
`);F=this._input.next();var M="#";if(this._input.hasNext()&&this._input.testChar(b)){do F=this._input.next(),M+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(M+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(M+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,M)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(B=this.__patterns.html_comment_start.read(),B){for(;this._input.hasNext()&&!this._input.testChar(A.newline);)B+=this._input.next();return E=!0,this._create_token(t.COMMENT,B)}}else if(E&&F==="-"&&(B=this.__patterns.html_comment_end.read(),B))return E=!1,this._create_token(t.COMMENT,B);return null},h.prototype._read_comment=function(F){var B=null;if(F==="/"){var M="";if(this._input.peek(1)==="*"){M=this.__patterns.block_comment.read();var j=_.get_directives(M);j&&j.ignore==="start"&&(M+=_.readIgnored(this._input)),M=M.replace(A.allLineBreaks,`
`),B=this._create_token(t.BLOCK_COMMENT,M),B.directives=j}else this._input.peek(1)==="/"&&(M=this.__patterns.comment.read(),B=this._create_token(t.COMMENT,M))}return B},h.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var B=this._input.next();return this.has_char_escapes=!1,F==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(B=L(B)),this._input.peek()===F&&(B+=this._input.next()),B=B.replace(A.allLineBreaks,`
`),this._create_token(t.STRING,B)}return null},h.prototype._allow_regexp_or_xml=function(F){return F.type===t.RESERVED&&r(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===t.END_EXPR&&F.text===")"&&F.opened.previous.type===t.RESERVED&&r(F.opened.previous.text,["if","while","for"])||r(F.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},h.prototype._read_regexp=function(F,B){if(F==="/"&&this._allow_regexp_or_xml(B)){for(var M=this._input.next(),j=!1,U=!1;this._input.hasNext()&&(j||U||this._input.peek()!==F)&&!this._input.testChar(A.newline);)M+=this._input.peek(),j?j=!1:(j=this._input.peek()==="\\",this._input.peek()==="["?U=!0:this._input.peek()==="]"&&(U=!1)),this._input.next();return this._input.peek()===F&&(M+=this._input.next(),M+=this._input.read(A.identifier)),this._create_token(t.STRING,M)}return null},h.prototype._read_xml=function(F,B){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(B)){var M="",j=this.__patterns.xml.read_match();if(j){for(var U=j[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),$=U.indexOf("{")===0,ee=0;j;){var pe=!!j[1],fe=j[2],Le=!!j[j.length-1]||fe.slice(0,8)==="![CDATA[";if(!Le&&(fe===U||$&&fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(pe?--ee:++ee),M+=j[0],ee<=0)break;j=this.__patterns.xml.read_match()}return j||(M+=this._input.match(/[\s\S]*/g)[0]),M=M.replace(A.allLineBreaks,`
`),this._create_token(t.STRING,M)}}return null};function L(F){for(var B="",M=0,j=new g(F),U=null;j.hasNext();)if(U=j.match(/([\s]|[^\\]|\\\\)+/g),U&&(B+=U[0]),j.peek()==="\\"){if(j.next(),j.peek()==="x")U=j.match(/x([0-9A-Fa-f]{2})/g);else if(j.peek()==="u")U=j.match(/u([0-9A-Fa-f]{4})/g);else{B+="\\",j.hasNext()&&(B+=j.next());continue}if(!U)return F;if(M=parseInt(U[1],16),M>126&&M<=255&&U[0].indexOf("x")===0)return F;if(M>=0&&M<32){B+="\\"+U[0];continue}else M===34||M===39||M===92?B+="\\"+String.fromCharCode(M):B+=String.fromCharCode(M)}return B}h.prototype._read_string_recursive=function(F,B,M){var j,U;F==="'"?U=this.__patterns.single_quote:F==='"'?U=this.__patterns.double_quote:F==="`"?U=this.__patterns.template_text:F==="}"&&(U=this.__patterns.template_expression);for(var $=U.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===F||!B&&A.newline.test(ee)){this._input.back();break}else ee==="\\"&&this._input.hasNext()?(j=this._input.peek(),j==="x"||j==="u"?this.has_char_escapes=!0:j==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ee+=this._input.next()):M&&(M==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),M===ee&&(F==="`"?ee+=this._read_string_recursive("}",B,"`"):ee+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=U.read(),$+=ee}return $},e.exports.Tokenizer=h,e.exports.TOKEN=t,e.exports.positionable_operators=y.slice(),e.exports.line_starters=l.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function p(g){this.__input=g||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position=0&&g=0&&u=g.length&&this.__input.substring(u-g.length,u).toLowerCase()===g},e.exports.InputScanner=p},function(e,R,p){var g=p(8).InputScanner,u=p(3).Token,s=p(10).TokenStream,i=p(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(a,r){this._input=new g(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var a,r=new u(A.START,""),t=null,_=[],v=new s;r.type!==A.EOF;){for(a=this._get_next_token(r,t);this._is_comment(a);)v.add(a),a=this._get_next_token(r,t);v.isEmpty()||(a.comments_before=v,v=new s),a.parent=t,this._is_opening(a)?(_.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=_.pop(),a.parent=t),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(a,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(A.RAW,t):this._create_token(A.EOF,"")},o.prototype._is_comment=function(a){return!1},o.prototype._is_opening=function(a){return!1},o.prototype._is_closing=function(a,r){return!1},o.prototype._create_token=function(a,r){var t=new u(a,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=o,e.exports.TOKEN=A},function(e){function R(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position=0&&p/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new g,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var A=this._create();return A._disabled[i]=!0,A._update(),A},s.prototype.read_options=function(i){var A=this._create();for(var o in u)A._disabled[o]=i.templating.indexOf(o)===-1;return A._update(),A},s.prototype.exclude=function(i){var A=this._create();return A._excluded[i]=!0,A._update(),A},s.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var A=this._read_template();A;)this._match_pattern?A+=this._input.read(this._match_pattern):A+=this._input.readUntil(this.__template_pattern),i+=A,A=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},s.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},s.prototype._read_template=function(){var i="",A=this._input.peek();if(A==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(i=i||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=s}],O={};function z(e){var R=O[e];if(R!==void 0)return R.exports;var p=O[e]={exports:{}};return N[e](p,p.exports,z),p.exports}var P=z(0);D=P})();var W=D;!(oe=[],G=function(){return{js_beautify:W}}.apply(_e,oe),G!==void 0&&(ct.exports=G))})()},"6eGT":function(ct,_e,K){"use strict";function oe(G){return null}_e.a=oe},"746U":function(ct,_e,K){"use strict";K.d(_e,"f",function(){return oe}),K.d(_e,"l",function(){return G}),K.d(_e,"k",function(){return D}),K.d(_e,"j",function(){return W}),K.d(_e,"g",function(){return N}),K.d(_e,"m",function(){return O}),K.d(_e,"h",function(){return z}),K.d(_e,"n",function(){return P}),K.d(_e,"c",function(){return e}),K.d(_e,"a",function(){return R}),K.d(_e,"i",function(){return p}),K.d(_e,"o",function(){return g}),K.d(_e,"e",function(){return i}),K.d(_e,"d",function(){return A}),K.d(_e,"p",function(){return o}),K.d(_e,"b",function(){return a});function oe(r){return Array.isArray(r)}function G(r){return typeof r=="string"}function D(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function W(r){return typeof r=="number"&&!isNaN(r)}function N(r){return r===!0||r===!1}function O(r){return typeof r=="undefined"}function z(r){return!P(r)}function P(r){return O(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function R(r){if(P(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function p(r){return typeof r=="function"}function g(r,t){const _=Math.min(r.length,t.length);for(let v=0;v<_;v++)u(r[v],t[v])}function u(r,t){if(G(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(p(t)){try{if(r instanceof t)return}catch(_){}if(!P(r)&&r.constructor===t)return;if(t.length===1&&t.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(r){let t=[],_=Object.getPrototypeOf(r);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function i(r){const t=[];for(const _ of s(r))typeof r[_]=="function"&&t.push(_);return t}function A(r,t){const _=b=>function(){const x=Array.prototype.slice.call(arguments,0);return t(b,x)};let v={};for(const b of r)v[b]=_(b);return v}function o(r){return r===null?void 0:r}function a(r,t="Unreachable"){throw new Error(t)}},"815F":function(ct,_e,K){"use strict";K.d(_e,"e",function(){return z}),K.d(_e,"c",function(){return e}),K.d(_e,"d",function(){return R}),K.d(_e,"a",function(){return g}),K.d(_e,"f",function(){return u}),K.d(_e,"b",function(){return s});var oe=K("KQm4"),G=K("VTBJ"),D=K("Ff2n"),W=K("Zm9Q"),N=K("Kwbf"),O=K("OZM5");function z(i,A){return i!=null?i:A}function P(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function o(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var _=t.key,v=t.children;Object(N.a)(_!=null,"Tree node must have a certain key: [".concat(r).concat(_,"]"));var b=String(_);Object(N.a)(!A.has(b)||_===null||_===void 0,"Same 'key' exist in the Tree: ".concat(b)),A.set(b,!0),o(v,"".concat(r).concat(b," > "))})}o(i)}function e(i){function A(o){var a=Object(W.a)(o);return a.map(function(r){if(!Object(O.i)(r))return Object(N.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,_=r.props,v=_.children,b=Object(D.a)(_,["children"]),x=Object(G.a)({key:t},b),y=A(v);return y.length&&(x.children=y),x}).filter(function(r){return r})}return A(i)}function R(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=new Set(A===!0?[]:A),a=[];function r(t){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(v,b){var x=Object(O.h)(_?_.pos:"0",b),y=z(v.key,x),c=Object(G.a)(Object(G.a)({},v),{},{parent:_,pos:x,children:null,data:v,isStart:[].concat(Object(oe.a)(_?_.isStart:[]),[b===0]),isEnd:[].concat(Object(oe.a)(_?_.isEnd:[]),[b===t.length-1])});return a.push(c),A===!0||o.has(y)?c.children=r(v.children||[],c):c.children=[],c})}return r(i),a}function p(i,A,o){var a;o?typeof o=="string"?a=function(_){return _[o]}:typeof o=="function"&&(a=function(_){return o(_)}):a=function(_,v){return z(_.key,v)};function r(t,_,v){var b=t?t.children:i,x=t?Object(O.h)(v.pos,_):"0";if(t){var y=a(t,x),c={node:t,index:_,pos:x,key:y,parentPos:v.node?v.pos:null,level:v.level+1};A(c)}b&&b.forEach(function(n,l){r(n,l,{node:t,pos:x,level:v?v.level+1:-1})})}r(null)}function g(i){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=A.initWrapper,a=A.processEntity,r=A.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,_={},v={},b={posEntities:_,keyEntities:v};return o&&(b=o(b)||b),p(i,function(x){var y=x.node,c=x.index,n=x.pos,l=x.key,d=x.parentPos,w=x.level,E={node:y,index:c,key:l,pos:n,level:w},h=z(l,n);_[n]=E,v[h]=E,E.parent=_[d],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),a&&a(E,b)},t),r&&r(b),b}function u(i,A){var o=A.expandedKeys,a=A.selectedKeys,r=A.loadedKeys,t=A.loadingKeys,_=A.checkedKeys,v=A.halfCheckedKeys,b=A.dragOverNodeKey,x=A.dropPosition,y=A.keyEntities,c=y[i],n={eventKey:i,expanded:o.indexOf(i)!==-1,selected:a.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:_.indexOf(i)!==-1,halfChecked:v.indexOf(i)!==-1,pos:String(c?c.pos:""),dragOver:b===i&&x===0,dragOverGapTop:b===i&&x===-1,dragOverGapBottom:b===i&&x===1};return n}function s(i){var A=i.data,o=i.expanded,a=i.selected,r=i.checked,t=i.loaded,_=i.loading,v=i.halfChecked,b=i.dragOver,x=i.dragOverGapTop,y=i.dragOverGapBottom,c=i.pos,n=i.active,l=Object(G.a)(Object(G.a)({},A),{},{expanded:o,selected:a,checked:r,loaded:t,loading:_,halfChecked:v,dragOver:b,dragOverGapTop:x,dragOverGapBottom:y,pos:c,active:n});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(N.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8HAY":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return N}),K.d(_e,"b",function(){return O}),K.d(_e,"d",function(){return z}),K.d(_e,"e",function(){return P}),K.d(_e,"c",function(){return e});var oe=K("MI8n"),G=K("pmY6"),D=K("3/fG"),W=function(R,p,g,u){function s(i){return i instanceof g?i:new g(function(A){A(i)})}return new(g||(g=Promise))(function(i,A){function o(t){try{r(u.next(t))}catch(_){A(_)}}function a(t){try{r(u.throw(t))}catch(_){A(_)}}function r(t){t.done?i(t.value):s(t.value).then(o,a)}r((u=u.apply(R,p||[])).next())})};class N extends G.a{constructor(R,p="",g="",u=!0,s){super();this._onDidChange=this._register(new oe.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=p,this._cssClass=g,this._enabled=u,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(R){this._setLabel(R)}_setLabel(R){this._label!==R&&(this._label=R,this._onDidChange.fire({label:R}))}get tooltip(){return this._tooltip||""}set tooltip(R){this._setTooltip(R)}_setTooltip(R){this._tooltip!==R&&(this._tooltip=R,this._onDidChange.fire({tooltip:R}))}get class(){return this._cssClass}set class(R){this._setClass(R)}_setClass(R){this._cssClass!==R&&(this._cssClass=R,this._onDidChange.fire({class:R}))}get enabled(){return this._enabled}set enabled(R){this._setEnabled(R)}_setEnabled(R){this._enabled!==R&&(this._enabled=R,this._onDidChange.fire({enabled:R}))}get checked(){return this._checked}set checked(R){this._setChecked(R)}_setChecked(R){this._checked!==R&&(this._checked=R,this._onDidChange.fire({checked:R}))}run(R,p){return W(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(R))})}}class O extends G.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new oe.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new oe.b),this.onDidRun=this._onDidRun.event}run(R,p){return W(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let g;try{yield this.runAction(R,p)}catch(u){g=u}this._onDidRun.fire({action:R,error:g})})}runAction(R,p){return W(this,void 0,void 0,function*(){yield R.run(p)})}}class z extends N{constructor(R){super(z.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}z.ID="vs.actions.separator";class P{constructor(R,p,g,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=p,this.class=u,this._actions=g}get actions(){return this._actions}dispose(){}run(){return W(this,void 0,void 0,function*(){})}}class e extends N{constructor(){super(e.ID,D.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(ct,_e,K){ct.exports={button:"button___1wy9m"}},"9Bee":function(ct,_e,K){"use strict";var oe=K("DYRE"),G=K("zeV3"),D=K("+L6B"),W=K("2/Rp"),N=K("k1fw"),O=K("9og8"),z=K("tJVT"),P=K("WmNS"),e=K.n(P),R=K("q1tI"),p=K.n(R),g=K("vg9a"),u=K("DlQD"),s=K.n(u),i=K("rUJ1");function A(H,m){var C=H.match(/^(\s+)(?:```)/);if(C===null)return m;var k=C[1];return m.split(`
`).map(function(Z){var Q=Z.match(/^\s+/);if(Q===null)return Z;var ye=Object(z.a)(Q,1),Qe=ye[0];return Qe.length>=k.length?Z.slice(k.length):Z}).join(`
`)}var o=[],a=[""],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){o.length=0,a=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function b(H,m,C,k){if(m>=H.length||H[m].level<=C)return m;var Z=H[m];k.push("- "+Z.text+""),m++;var Q=[];return m=b(H,m,Z.level,Q),Q.length>0&&(k.push("
"),Q.forEach(function(ye){k.push(ye)}),k.push("
")),k.push(" "),m=b(H,m,C,k),m}function x(){return b(o,0,0,a),a.push("
"),a.join("")}var y={heading:function(m){var C=t.exec(m);if(C)return{type:"heading",raw:C[0],depth:C[1].length,text:C[2]}},fences:function(m){var C=this.rules.block.fences.exec(m);if(C){var k=C[0],Z=A(k,C[3]||""),Q=C[2]?C[2].trim():C[2];if(["latex","katex","math"].indexOf(Q)>=0){var ye=l(),Qe=Z;Z=ye,d[ye]={type:"block",expression:Qe}}return{type:"code",raw:k,lang:Q,text:Z}}}},c=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,l=function(){return"__special_katext_id_".concat(n++,"__")},d={};function w(){return d}function E(){n=0,d={}}function h(H){return H=H.replace(c,function(m,C){var k=l();return d[k]={type:"inline",expression:C},k}),H}var L=r.listitem;r.listitem=function(H){return L(h(H))};var F=r.paragraph;r.paragraph=function(H){return F(h(H))};var B=r.tablecell;r.tablecell=function(H,m){return B(h(H),m)},r.code=function(H,m,C){var k=(m||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"".concat(H,"
"):'
').concat(C?H:Object(i.escape)(H,!0),`
`):''+(C?H:Object(i.escape)(H,!0))+"
"},r.heading=function(H,m,C){var k=this.options.headerPrefix+C.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:k,level:m,text:H}),"'+H+""},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:y,renderer:r});var M=s.a,j=K("SJMd"),U=K("ulZh"),$=K.n(U),ee=K("m3rI"),pe=K("Oy/b"),fe=K("p5ED"),Le=K("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(H,m){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,k){C.__proto__=k}||function(C,k){for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&(C[Z]=k[Z])})(H,m)};function Se(H,m){function C(){this.constructor=H}xe(H,m),H.prototype=m===null?Object.create(m):(C.prototype=m.prototype,new C)}function Ue(H,m,C,k){return new(C||(C=Promise))(function(Z,Q){function ye(st){try{Be(k.next(st))}catch(ze){Q(ze)}}function Qe(st){try{Be(k.throw(st))}catch(ze){Q(ze)}}function Be(st){var ze;st.done?Z(st.value):(ze=st.value,ze instanceof C?ze:new C(function(mt){mt(ze)})).then(ye,Qe)}Be((k=k.apply(H,m||[])).next())})}function Fe(H,m){var C,k,Z,Q,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return Q={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Qe(Be){return function(st){return function(ze){if(C)throw new TypeError("Generator is already executing.");for(;ye;)try{if(C=1,k&&(Z=2&ze[0]?k.return:ze[0]?k.throw||((Z=k.return)&&Z.call(k),0):k.next)&&!(Z=Z.call(k,ze[1])).done)return Z;switch(k=0,Z&&(ze=[2&ze[0],Z.value]),ze[0]){case 0:case 1:Z=ze;break;case 4:return ye.label++,{value:ze[1],done:!1};case 5:ye.label++,k=ze[1],ze=[0];continue;case 7:ze=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||ze[0]!==6&&ze[0]!==2)){ye=0;continue}if(ze[0]===3&&(!Z||ze[1]>Z[0]&&ze[1]',"select"),this.addActionButton(k,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(k,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(k,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(k,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(k,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(k,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(k,'',"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(Q){var ye=document.createElement("div");ye.className=""+C.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",Q.typeName),ye.innerHTML=Q.icon,ye.addEventListener("click",function(){C.markerToolbarButtonClicked(ye,Q)}),C.buttons.push(ye),C.markerButtons.push(ye)}),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 Z=document.createElement("div");Z.className=this.toolbarBlockStyleClass.name,Z.style.whiteSpace="nowrap",Z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Z),this.addActionButton(Z,'',"render"),this.addActionButton(Z,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},H.prototype.addButtonClickListener=function(m){this.buttonClickListeners.push(m)},H.prototype.removeButtonClickListener=function(m){this.buttonClickListeners.indexOf(m)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(m),1)},H.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},H.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var m=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var C=0;C0&&this.buttonClickListeners.forEach(function(k){return k("marker",C)}),this.markerButtonOverflowBlock.style.display="none"},H.prototype.actionToolbarButtonClicked=function(m,C){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",C)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},H.prototype.setActiveButton=function(m){this.resetButtonStyles(),m.className=m.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),m.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},H.prototype.setActiveMarkerButton=function(m){var C=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===m});C&&this.setActiveButton(C)},H.prototype.setCurrentMarker=function(m){var C=this;this.currentMarker=m,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){C.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},H}(),J=function(){function H(m,C,k,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=m,this.displayMode=C,this.uiStyleSettings=k,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return H.prototype.addStyles=function(){var m;this.toolboxStyleClass=this.styles.addClass(new re("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 re("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var C=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new re("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new re("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new re("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 re("toolbox-panel-row_colors",`
background-color: `+((m=this.uiStyleSettings.toolboxBackgroundColor)!==null&&m!==void 0?m:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
padding: `+C+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new re("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},H.prototype.show=function(m){var C;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,this.uiContainer.className=this.toolboxStyleClass.name+" "+((C=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},H.prototype.setPanelButtons=function(m){var C,k,Z=this;this.panels=m,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((C=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var ye;Q.uiStyleSettings=Z.uiStyleSettings;var Qe=document.createElement("div");Qe.className=Z.toolboxButtonStyleClass.name+" "+((ye=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:Z.toolboxButtonStyleColorsClass.name),Qe.innerHTML=Q.icon,Qe.title=Q.title,Qe.addEventListener("click",function(){Z.panelButtonClick(Q)}),Z.panelButtons.push(Qe),Z.buttonRow.appendChild(Qe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},H.prototype.panelButtonClick=function(m){var C=this,k=-1;if(m!==this.activePanel){k=this.panels.indexOf(m),this.panelRow.innerHTML="";var Z=m.getUi();Z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Z),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=m}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){C.displayMode==="inline"?C.panelRow.style.display="none":C.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,ye){var Qe,Be;Q.className=C.toolboxButtonStyleClass.name+" "+(ye===k?""+((Qe=C.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:C.toolboxActiveButtonStyleColorsClass.name):""+((Be=C.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Be!==void 0?Be:C.toolboxButtonStyleColorsClass.name))})},H}(),Y=function(H,m){this.title=H,this.icon=m},ie=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'')||this;return ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=k,ye.currentColor=Z,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var Q=C.getColorBox(Z);k.appendChild(Q),C.colorBoxes.push(Q)}),k},m.prototype.getColorBox=function(C){var k=this,Z=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-Z,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=Q-2+"px",ye.style.height=Q-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(Q+2)/2+"px",ye.style.borderColor=C===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){k.setCurrentColor(C,ye)});var Qe=document.createElement("div");return Qe.style.display="inline-block",Qe.style.width=Q-2+"px",Qe.style.height=Q-2+"px",Qe.style.backgroundColor=C,Qe.style.borderRadius=Q/2+"px",C==="transparent"&&(Qe.style.fill=this.uiStyleSettings.toolboxAccentColor,Qe.innerHTML=``),ye.appendChild(Qe),ye},m.prototype.setCurrentColor=function(C,k){var Z=this;this.currentColor=C,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(C)},m}(Y),ue=function(){function H(m,C,k){this._state="new",this._isSelected=!1,this._container=m,this._overlayContainer=C,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(H.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),H.prototype.ownsTarget=function(m){return!1},Object.defineProperty(H.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),H.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},H.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},H.prototype.pointerDown=function(m,C){},H.prototype.dblClick=function(m,C){},H.prototype.manipulate=function(m){},H.prototype.pointerUp=function(m){this.stateChanged()},H.prototype.dispose=function(){},H.prototype.addMarkerVisualToContainer=function(m){this.container.childNodes.length>0?this.container.insertBefore(m,this.container.childNodes[0]):this.container.appendChild(m)},H.prototype.getState=function(){return{typeName:H.typeName,state:this.state,notes:this.notes}},H.prototype.restoreState=function(m){this._state=m.state,this.notes=m.notes},H.prototype.scale=function(m,C){},H.prototype.colorChanged=function(m){this.onColorChanged&&this.onColorChanged(m),this.stateChanged()},H.prototype.fillColorChanged=function(m){this.onFillColorChanged&&this.onFillColorChanged(m),this.stateChanged()},H.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var m=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),m.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(m)&&this.onStateChanged(this)}},H.typeName="MarkerBase",H}(),ce=function(){function H(){this.findGripByVisual=this.findGripByVisual.bind(this)}return H.prototype.findGripByVisual=function(m){return this.topLeft.ownsTarget(m)?this.topLeft:this.topCenter.ownsTarget(m)?this.topCenter:this.topRight.ownsTarget(m)?this.topRight:this.centerLeft.ownsTarget(m)?this.centerLeft:this.centerRight.ownsTarget(m)?this.centerRight:this.bottomLeft.ownsTarget(m)?this.bottomLeft:this.bottomCenter.ownsTarget(m)?this.bottomCenter:this.bottomRight.ownsTarget(m)?this.bottomRight:void 0},H}(),He=function(){function H(){this.GRIP_SIZE=10,this.visual=ve.createGroup(),this.visual.appendChild(ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ve.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return H.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},H}(),Ve=function(){function H(){}return H.toITransformMatrix=function(m){return{a:m.a,b:m.b,c:m.c,d:m.d,e:m.e,f:m.f}},H.toSVGMatrix=function(m,C){return m.a=C.a,m.b=C.b,m.c=C.c,m.d=C.d,m.e=C.e,m.f=C.f,m},H}(),We=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.left=0,Q.top=0,Q.width=0,Q.height=0,Q.defaultSize={x:50,y:20},Q.offsetX=0,Q.offsetY=0,Q.rotationAngle=0,Q.CB_DISTANCE=10,Q._suppressMarkerCreateEvent=!1,Q.container.transform.baseVal.appendItem(ve.createTransform()),Q.setupControlBox(),Q}return Se(m,H),Object.defineProperty(m.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"visual",{get:function(){return this._visual},set:function(C){this._visual=C;var k=ve.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(C){return!!H.prototype.ownsTarget.call(this,C)||!!(this.controlGrips.findGripByVisual(C)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(C))},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.left=C.x,this.top=C.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(C);if(this.manipulationStartX=Z.x,this.manipulationStartY=Z.y,this.offsetX=Z.x-this.left,this.offsetY=Z.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(k),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k)){this.activeGrip=this.rotatorGrip;var Q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Q.x-this.width/2,this.top=Q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},m.prototype.pointerUp=function(C){var k=this.state;H.prototype.pointerUp.call(this,C),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(C),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},m.prototype.moveVisual=function(C){this.visual.style.transform="translate("+C.x+"px, "+C.y+"px)"},m.prototype.manipulate=function(C){var k=this.unrotatePoint(C);this.state==="creating"?this.resize(C):this.state==="move"?(this.left=this.manipulationStartLeft+(k.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(k.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(k):this.state==="rotate"&&this.rotate(C)},m.prototype.resize=function(C){var k=this.manipulationStartLeft,Z=this.manipulationStartWidth,Q=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+C.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+C.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+C.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+C.y-this.manipulationStartY}Z>=0?(this.left=k,this.width=Z):(this.left=k+Z,this.width=-Z),ye>=0?(this.top=Q,this.height=ye):(this.top=Q+ye,this.height=-ye),this.setSize()},m.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},m.prototype.rotate=function(C){if(Math.abs(C.x-this.centerX)>.1){var k=Math.sign(C.x-this.centerX);this.rotationAngle=180*Math.atan((C.y-this.centerY)/(C.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},m.prototype.applyRotation=function(){var C=this.container.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(C,0)},m.prototype.rotatePoint=function(C){if(this.rotationAngle===0)return C;var k=this.container.getCTM(),Z=ve.createPoint(C.x,C.y);return{x:(Z=Z.matrixTransform(k)).x,y:Z.y}},m.prototype.unrotatePoint=function(C){if(this.rotationAngle===0)return C;var k=this.container.getCTM();k=k.inverse();var Z=ve.createPoint(C.x,C.y);return{x:(Z=Z.matrixTransform(k)).x,y:Z.y}},m.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=ve.createGroup();var C=ve.createTransform();C.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(C),this.container.appendChild(this.controlBox),this.controlRect=ve.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=ve.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 ce,this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){var C=this.controlBox.transform.baseVal.getItem(0);C.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(C,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()},m.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()},m.prototype.createGrip=function(){var C=new He;return C.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(C.visual),C},m.prototype.positionGrips=function(){var C=this.controlGrips.topLeft.GRIP_SIZE,k=-C/2,Z=k,Q=(this.width+this.CB_DISTANCE)/2-C/2,ye=(this.height+this.CB_DISTANCE)/2-C/2,Qe=this.height+this.CB_DISTANCE-C/2,Be=this.width+this.CB_DISTANCE-C/2;this.positionGrip(this.controlGrips.topLeft.visual,k,Z),this.positionGrip(this.controlGrips.topCenter.visual,Q,Z),this.positionGrip(this.controlGrips.topRight.visual,Be,Z),this.positionGrip(this.controlGrips.centerLeft.visual,k,ye),this.positionGrip(this.controlGrips.centerRight.visual,Be,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Qe),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,Be,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,Z-3*this.CB_DISTANCE)},m.prototype.positionGrip=function(C,k,Z){var Q=C.transform.baseVal.getItem(0);Q.setTranslate(k,Z),C.transform.baseVal.replaceItem(Q,0)},m.prototype.hideControlBox=function(){this.controlBox.style.display="none"},m.prototype.showControlBox=function(){this.controlBox.style.display=""},m.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.left=k.left,this.top=k.top,this.width=k.width,this.height=k.height,this.rotationAngle=k.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k);var Z=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:Z.x*C,y:Z.y*k});this.left=Q.x,this.top=Q.y,this.width=this.width*C,this.height=this.height*k,this.adjustControlBox()},m}(ue),Ge=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual)},m.prototype.createVisual=function(){this.visual=ve.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.setSize()},m.prototype.setSize=function(){H.prototype.setSize.call(this),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(C){H.prototype.pointerUp.call(this,C),this.setSize()},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},m.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){var k=C;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize()},m.title="Rectangle marker",m}(We),rt=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=k,ye.currentWidth=Z,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.flexGrow="2",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=Z===C.currentWidth?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentWidth(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.innerText=Z.toString(),ye.style.marginRight="5px",Q.appendChild(ye);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.display="flex",Qe.style.alignItems="center";var Be=document.createElement("hr");Be.style.minWidth="20px",Be.style.border="0px",Be.style.borderTop=Z+"px solid "+C.uiStyleSettings.toolboxColor,Be.style.flexGrow="2",Qe.appendChild(Be),Q.appendChild(Qe),C.widthBoxes.push(Q)}),k},m.prototype.setCurrentWidth=function(C,k){var Z=this;this.currentWidth=C,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},m}(Y),At=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'')||this;return ye.styles=[],ye.styleBoxes=[],ye.styles=k,ye.currentStyle=Z,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/C.styles.length-5+"%",Q.style.borderColor=Z===C.currentStyle?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentStyle(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var Qe=``;ye.innerHTML=Qe,Q.appendChild(ye),C.styleBoxes.push(Q)}),k},m.prototype.setCurrentStyle=function(C,k){var Z=this;this.currentStyle=C,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},m}(Y),Te=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new At("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Se(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="FrameMarker",m.title="Frame marker",m.icon='',m}(Ge),De=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},je=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.x1=0,Q.y1=0,Q.x2=0,Q.y2=0,Q.defaultLength=50,Q.manipulationStartX=0,Q.manipulationStartY=0,Q.manipulationStartX1=0,Q.manipulationStartY1=0,Q.manipulationStartX2=0,Q.manipulationStartY2=0,Q.setupControlBox(),Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!!H.prototype.ownsTarget.call(this,C)||!(!this.grip1.ownsTarget(C)&&!this.grip2.ownsTarget(C))},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.manipulationStartX=C.x,this.manipulationStartY=C.y,this.state==="new"&&(this.x1=C.x,this.y1=C.y,this.x2=C.x,this.y2=C.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(k)?this.activeGrip=this.grip1:this.grip2.ownsTarget(k)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},m.prototype.pointerUp=function(C){var k=this.state;H.prototype.pointerUp.call(this,C),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(C),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},m.prototype.adjustVisual=function(){},m.prototype.manipulate=function(C){this.state==="creating"?this.resize(C):this.state==="move"?(this.x1=this.manipulationStartX1+C.x-this.manipulationStartX,this.y1=this.manipulationStartY1+C.y-this.manipulationStartY,this.x2=this.manipulationStartX2+C.x-this.manipulationStartX,this.y2=this.manipulationStartY2+C.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(C)},m.prototype.resize=function(C){switch(this.activeGrip){case this.grip1:this.x1=C.x,this.y1=C.y;break;case this.grip2:case void 0:this.x2=C.x,this.y2=C.y}this.adjustVisual(),this.adjustControlBox()},m.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){this.positionGrips()},m.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},m.prototype.createGrip=function(){var C=new He;return C.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(C.visual),C},m.prototype.positionGrips=function(){var C=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-C/2,this.y1-C/2),this.positionGrip(this.grip2.visual,this.x2-C/2,this.y2-C/2)},m.prototype.positionGrip=function(C,k,Z){var Q=C.transform.baseVal.getItem(0);Q.setTranslate(k,Z),C.transform.baseVal.replaceItem(Q,0)},m.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.x1=this.x1*C,this.y1=this.y1*k,this.x2=this.x2*C,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},m}(ue),$e=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new At("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorLine&&C!==this.visibleLine)},m.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ve.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},m.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()),ve.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},m.typeName="LineMarker",m.title="Line marker",m.icon='',m}(je),Ne=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'')||this;return ye.fonts=[],ye.fontBoxes=[],ye.fonts=k,ye.currentFont=Z,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(Z){var Q=document.createElement("div");Q.style.display="inline-block",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/C.fonts.length-5+"%",Q.style.borderColor=Z===C.currentFont?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentFont(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=Z,ye.style.overflow="hidden";var Qe=document.createElement("div");Qe.style.whiteSpace="nowrap",Qe.style.overflow="hidden",Qe.style.textOverflow="ellipsis",Qe.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(Qe),Q.appendChild(ye),C.fontBoxes.push(Q)}),k},m.prototype.setCurrentFont=function(C,k){var Z=this;this.currentFont=C,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},m}(Y),Pe=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=Z.defaultColor,Q.fontFamily=Z.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setColor=Q.setColor.bind(Q),Q.setFont=Q.setFont.bind(Q),Q.renderText=Q.renderText.bind(Q),Q.sizeText=Q.sizeText.bind(Q),Q.textEditDivClicked=Q.textEditDivClicked.bind(Q),Q.showTextEditor=Q.showTextEditor.bind(Q),Q.setSize=Q.setSize.bind(Q),Q.positionTextEditor=Q.positionTextEditor.bind(Q),Q.colorPanel=new ie("Color",Z.defaultColorSet,Z.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new Ne("Font",Z.defaultFontFamilies,Z.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return Se(m,H),m.prototype.ownsTarget=function(C){if(H.prototype.ownsTarget.call(this,C)||C===this.visual||C===this.textElement||C===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(Z){Z===C&&(k=!0)}),k},m.prototype.createVisual=function(){this.visual=ve.createGroup(),this.bgRectangle=ve.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ve.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.isMoved=!1,this.pointerDownPoint=C,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.renderText=function(){var C=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(k){C.textElement.appendChild(ve.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},m.prototype.getTextScale=function(){var C=this.textElement.getBBox(),k=1;if(C.width>0&&C.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/C.width,Q=(1*this.height-this.height*this.padding*2/100)/C.height;k=Math.min(Z,Q)}return k},m.prototype.getTextPosition=function(C){var k=this.textElement.getBBox(),Z=0,Q=0;return k.width>0&&k.height>0&&(Z=(this.width-k.width*C)/2,Q=this.height/2-k.height*C/2),{x:Z,y:Q}},m.prototype.sizeText=function(){var C=this.textElement.getBBox(),k=this.getTextScale(),Z=this.getTextPosition(k);Z.y-=C.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(C.x-this.pointerDownPoint.x)>5||Math.abs(C.y-this.pointerDownPoint.y)>5)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.isMoved=!0,this.setSize(),this.sizeText()},m.prototype.setSize=function(){H.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},m.prototype.pointerUp=function(C){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),H.prototype.pointerUp.call(this,C),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},m.prototype.showTextEditor=function(){var C=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(k){k.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var k=Number.parseFloat(C.textEditor.style.fontSize);C.textEditor.clientWidth>=Number.parseInt(C.textEditor.style.maxWidth)&&k>.9;)k-=.1,C.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var Z=k.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(Z)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){C.textEditDivClicked(C.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},m.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var C=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),Q={x:Z.width*C,y:Z.height*C};k.x-=Q.x/2,k.y-=Q.y/2,this.textEditor.style.top=k.y+"px",this.textEditor.style.left=k.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-k.x+"px",this.textEditor.style.fontSize=Math.max(16*C,12)+"px",this.textElement.style.display="none"}},m.prototype.textEditDivClicked=function(C){this.text=C.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},m.prototype.select=function(){H.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},m.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),H.prototype.deselect.call(this)},m.prototype.dblClick=function(C,k){H.prototype.dblClick.call(this,C,k),this.showTextEditor()},m.prototype.setColor=function(C){this.textElement&&ve.setAttributes(this.textElement,[["fill",C]]),this.color=C,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(C)},m.prototype.setFont=function(C){this.textElement&&ve.setAttributes(this.textElement,[["font-family",C]]),this.fontFamily=C,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},m.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},m.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){var k=C;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize(),this.sizeText(),this.positionTextEditor()},m.typeName="TextMarker",m.title="Text marker",m.icon='',m}(We),we=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=Z.defaultColor,Q.lineWidth=Z.defaultStrokeWidth,Q.pixelRatio=Z.freehandPixelRatio,Q.setColor=Q.setColor.bind(Q),Q.addCanvas=Q.addCanvas.bind(Q),Q.finishCreation=Q.finishCreation.bind(Q),Q.setLineWidth=Q.setLineWidth.bind(Q),Q.colorPanel=new ie("Color",Z.defaultColorSet,Z.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.drawingImage)},m.prototype.createVisual=function(){this.visual=ve.createGroup(),this.drawingImage=ve.createImage(),this.visual.appendChild(this.drawingImage);var C=ve.createTransform();this.visual.transform.baseVal.appendItem(C),this.addMarkerVisualToContainer(this.visual)},m.prototype.pointerDown=function(C,k){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(C.x,C.y),this.drawing=!0):H.prototype.pointerDown.call(this,C,k)},m.prototype.manipulate=function(C){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(C.x,C.y),this.canvasContext.stroke()):H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(C){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):H.prototype.pointerUp.call(this,C)},m.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)},m.prototype.select=function(){this.state==="creating"&&this.finishCreation(),H.prototype.select.call(this)},m.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),H.prototype.deselect.call(this)},m.prototype.finishCreation=function(){for(var C=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=k[0],Q=k[1],ye=k[2],Qe=k[3],Be=!1,st=0;st0&&(Be=!0,stQe&&(Qe=st),ze>ye&&(ye=ze));if(Be){this.left=Z/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(ye-Z)/this.pixelRatio,this.height=(Qe-Q)/this.pixelRatio;var mt=document.createElement("canvas");mt.width=ye-Z,mt.height=Qe-Q,mt.getContext("2d").putImageData(this.canvasContext.getImageData(Z,Q,ye-Z,Qe-Q),0,0),this.drawingImgUrl=mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},m.prototype.setDrawingImage=function(){ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},m.prototype.setColor=function(C){this.color=C,this.colorChanged(C)},m.prototype.setLineWidth=function(C){this.lineWidth=C},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({drawingImgUrl:this.drawingImgUrl},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){this.createVisual(),H.prototype.restoreState.call(this,C),this.drawingImgUrl=C.drawingImgUrl,this.setDrawingImage()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setDrawingImage()},m.typeName="FreehandMarker",m.title="Freehand marker",m.icon='',m}(We),he=function(H){function m(C,k,Z){var Q=H.call(this,C,Z||'')||this;return Q.typeBoxes=[],Q.currentType=k,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var Z=function(Qe){var Be="both";switch(Qe){case 0:Be="both";break;case 1:Be="start";break;case 2:Be="end";break;case 3:Be="none"}var st=document.createElement("div");if(st.style.display="flex",st.style.flexGrow="2",st.style.alignItems="center",st.style.justifyContent="space-between",st.style.padding="5px",st.style.borderWidth="2px",st.style.borderStyle="solid",st.style.borderColor=Be===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",st.addEventListener("click",function(){C.setCurrentType(Be,st)}),k.appendChild(st),Be==="both"||Be==="start"){var ze=document.createElement("div");ze.style.display="flex",ze.style.alignItems="center",ze.style.minHeight="20px",ze.innerHTML=``,ze.style.marginLeft="5px",st.appendChild(ze)}var mt=document.createElement("div");mt.style.display="flex",mt.style.alignItems="center",mt.style.minHeight="20px",mt.style.flexGrow="2";var pt=document.createElement("hr");if(pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),pt.style.flexGrow="2",mt.appendChild(pt),st.appendChild(mt),Be==="both"||Be==="end"){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.innerHTML=``,Et.style.marginRight="5px",st.appendChild(Et)}Q.typeBoxes.push(st)},Q=this,ye=0;ye<4;ye++)Z(ye);return k},m.prototype.setCurrentType=function(C,k){var Z=this;this.currentType=C,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},m}(Y),ge=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.arrowType="end",Q.arrowBaseHeight=10,Q.arrowBaseWidth=10,Q.getArrowPoints=Q.getArrowPoints.bind(Q),Q.setArrowType=Q.setArrowType.bind(Q),Q.arrowTypePanel=new he("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.arrow1&&C!==this.arrow2)},m.prototype.getArrowPoints=function(C,k){var Z=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return C-Z/2+","+(k+Q/2)+" "+C+","+(k-Q/2)+" "+(C+Z/2)+","+(k+Q/2)},m.prototype.createTips=function(){this.arrow1=ve.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ve.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow2)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(H.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",ve.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ve.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.arrow1.transform.baseVal.getItem(0);k.setRotate(C,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(C+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},m.prototype.setArrowType=function(C){this.arrowType=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({arrowType:this.arrowType},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},m.typeName="ArrowMarker",m.title="Arrow marker",m.icon='',m}($e),te=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor=Z.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new ie("Color",Z.defaultColorSet,Z.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return Se(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="CoverMarker",m.title="Cover marker",m.icon='',m}(Ge),ne=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'')||this;return ye.opacities=[],ye.opacityBoxes=[],ye.opacities=k,ye.currentOpacity=Z,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return Se(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",k.style.justifyContent="space-between",this.opacities.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="center",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=Z===C.currentOpacity?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentOpacity(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.innerText=100*Z+"%",Q.appendChild(ye),C.opacityBoxes.push(Q)}),k},m.prototype.setCurrentOpacity=function(C,k){var Z=this;this.currentOpacity=C,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},m}(Y),le=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=Z.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=Z.defaultHighlightOpacity,Q.fillPanel=new ie("Color",Z.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new ne("Opacity",Z.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return Se(m,H),m.prototype.setOpacity=function(C){this.opacity=C,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="HighlightMarker",m.title="Highlight marker",m.icon='',m}(te),de='',Re=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.bgColor="transparent",Q.tipPosition={x:0,y:0},Q.tipBase1Position={x:0,y:0},Q.tipBase2Position={x:0,y:0},Q.tipMoving=!1,Q.color=Z.defaultStrokeColor,Q.bgColor=Z.defaultFillColor,Q.fontFamily=Z.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setBgColor=Q.setBgColor.bind(Q),Q.getTipPoints=Q.getTipPoints.bind(Q),Q.positionTip=Q.positionTip.bind(Q),Q.setTipPoints=Q.setTipPoints.bind(Q),Q.colorPanel=new ie("Text color",Z.defaultColorSet,Q.color,''),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new ie("Fill color",Z.defaultColorSet,Q.bgColor,de),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new Ne("Font",Z.defaultFontFamilies,Z.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new He,Q.tipGrip.visual.transform.baseVal.appendItem(ve.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return Se(m,H),m.prototype.ownsTarget=function(C){return H.prototype.ownsTarget.call(this,C)||this.tipGrip.ownsTarget(C)||this.tip===C},m.prototype.createTip=function(){ve.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ve.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},m.prototype.pointerDown=function(C,k){this.state==="new"&&H.prototype.pointerDown.call(this,C,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):H.prototype.pointerDown.call(this,C,k)},m.prototype.pointerUp=function(C){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,H.prototype.pointerUp.call(this,C);else{var k=this.state==="creating";H.prototype.pointerUp.call(this,C),this.setTipPoints(k),this.positionTip()}},m.prototype.manipulate=function(C){if(this.tipMoving){var k=this.unrotatePoint(C);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else H.prototype.manipulate.call(this,C)},m.prototype.setBgColor=function(C){this.bgRectangle&&this.tip&&(ve.setAttributes(this.bgRectangle,[["fill",C]]),ve.setAttributes(this.tip,[["fill",C]])),this.bgColor=C,this.fillColorChanged(C)},m.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},m.prototype.setTipPoints=function(C){C===void 0&&(C=!1);var k=Math.min(this.height/2,15),Z=this.height/5;C&&(this.tipPosition={x:k+Z/2,y:this.height+20});var Q=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?Q',m}(Pe),Me=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.fillColor=Z.defaultFillColor,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.setOpacity=Q.setOpacity.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q.strokePanel=new ie("Line color",Ce(Z.defaultColorSet,["transparent"]),Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.fillPanel=new ie("Fill color",Ce(Z.defaultColorSet,["transparent"]),Q.fillColor,de),Q.fillPanel.onColorChanged=Q.setFillColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new At("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q.opacityPanel=new ne("Opacity",Z.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual)},m.prototype.createVisual=function(){this.visual=ve.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.setSize()},m.prototype.setSize=function(){H.prototype.setSize.call(this),ve.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},m.prototype.pointerUp=function(C){H.prototype.pointerUp.call(this,C),this.setSize()},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},m.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(C),this.stateChanged()},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.setOpacity=function(C){this.opacity=C,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){var k=C;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize()},m.typeName="EllipseMarker",m.title="Ellipse marker",m.icon='',m}(We),qe=function(H){function m(C,k,Z){return H.call(this,C,k,Z)||this}return Se(m,H),Object.defineProperty(m.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.tip1&&C!==this.tip2)},m.prototype.createTips=function(){this.tip1=ve.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(ve.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ve.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(ve.createTransform()),this.visual.appendChild(this.tip2)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(H.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ve.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()]]),ve.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 C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.tip1.transform.baseVal.getItem(0);k.setRotate(C,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(C+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C),this.createTips(),this.adjustVisual()},m.typeName="MeasurementMarker",m.title="Measurement marker",m.icon='',m}($e),lt=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokePanel.colors=Z.defaultColorSet,Q.fillColor="transparent",Q}return Se(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="EllipseFrameMarker",m.title="Ellipse frame marker",m.icon='',m}(Me),ft=function(){function H(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),H.prototype.addUndoStep=function(m){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(m)||(this.undoStack.push(m),JSON.stringify(this.lastRedoStep)!==JSON.stringify(m)&&this.redoStack.splice(0,this.redoStack.length))},H.prototype.replaceLastUndoStep=function(m){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=m)},H.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},H.prototype.undo=function(){if(this.undoStack.length>1){var m=this.undoStack.pop();return m!==void 0&&this.redoStack.push(m),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},H.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},H}(),ot=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.curveX=0,Q.curveY=0,Q.manipulationStartCurveX=0,Q.manipulationStartCurveY=0,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.positionGrips=Q.positionGrips.bind(Q),Q.addControlGrips=Q.addControlGrips.bind(Q),Q.adjustVisual=Q.adjustVisual.bind(Q),Q.setupControlBox=Q.setupControlBox.bind(Q),Q.resize=Q.resize.bind(Q),Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new At("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Se(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorCurve&&C!==this.visibleCurve&&!this.curveGrip.ownsTarget(C))},m.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},m.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorCurve=ve.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ve.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=C.x,this.curveY=C.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},m.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ve.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},m.prototype.setupControlBox=function(){H.prototype.setupControlBox.call(this),this.curveControlLine1=ve.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ve.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)},m.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,H.prototype.addControlGrips.call(this)},m.prototype.positionGrips=function(){H.prototype.positionGrips.call(this);var C=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-C/2,this.curveY-C/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()))},m.prototype.manipulate=function(C){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+C.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+C.y-this.manipulationStartY),H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){this.activeGrip===this.curveGrip&&(this.curveX=C.x,this.curveY=C.y),H.prototype.resize.call(this,C),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual()},m.prototype.scale=function(C,k){this.curveX=this.curveX*C,this.curveY=this.curveY*k,H.prototype.scale.call(this,C,k)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},m.typeName="CurveMarker",m.title="Curve marker",m.icon='',m}(je),Bt=function(){function H(m,C){C===void 0&&(C=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=m,this.cancelable=C}return Object.defineProperty(H.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),H.prototype.preventDefault=function(){this._defaultPrevented=!0},H}(),St=function(H){function m(C,k,Z){var Q=H.call(this,C,!1)||this;return Q.dataUrl=k,Q.state=Z,Q}return Se(m,H),m}(Bt),it=function(H){function m(C,k,Z){Z===void 0&&(Z=!1);var Q=H.call(this,C,Z)||this;return Q.marker=k,Q}return Se(m,H),m}(Bt),Wt=function(){function H(){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 H.prototype.addEventListener=function(m,C){this[m].push(C)},H.prototype.removeEventListener=function(m,C){var k=this[m].indexOf(C);k>-1&&this[m].splice(k,1)},H}(),Qt=function(){function H(m){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new ft,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=H.instanceCounter++,this.styles=new tt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=m,this.targetRoot=document.body,this.width=m.clientWidth,this.height=m.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(H.prototype,"ALL_MARKER_TYPES",{get:function(){return[Te,we,ge,Pe,lt,Me,le,Re,qe,te,$e,ot]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Te,we,ge,Pe,Me,le,Re]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Te,we,ge,Pe,le]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(m){var C=this;this._availableMarkerTypes.splice(0),m.forEach(function(k){if(typeof k=="string"){var Z=C.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===k});Z!==void 0&&C._availableMarkerTypes.push(Z)}else C._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(m){this._zoomLevel=m,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),H.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},H.prototype.show=function(){var m=this;this.styles.styleSheetRoot===void 0&&nt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=nt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(C){return C(new Bt(m))})},H.prototype.render=function(){return Ue(this,void 0,void 0,function(){var m;return Fe(this,function(C){switch(C.label){case 0:return this.setCurrentMarker(),(m=new at).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.markersOnly=this.renderMarkersOnly,m.width=this.renderWidth,m.height=this.renderHeight,[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return C.sent(),[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,C.sent()]}})})},H.prototype.close=function(m){var C=this;if(m===void 0&&(m=!1),this.isOpen){var k=!1;m||this.eventListeners.beforeclose.forEach(function(Z){var Q=new Bt(C,!0);Z(Q),Q.defaultPrevented&&(k=!0)}),k||(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(Z){return Z(new Bt(C))}),this.detachEvents(),this._isOpen=!1)}},H.prototype.addMarkersToToolbar=function(){for(var m,C=[],k=0;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*m:this.editorCanvas.clientWidth,k=C',m.title="Powered by marker.js",m.style.display="grid",m.style.alignItems="center",m.style.justifyItems="center",m.style.padding="3px",m.style.width="20px",m.style.height="20px",this.logoUI.appendChild(m),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},H.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")},H.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"},H.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},H.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 m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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 X(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(m),1),m.dispose()},H.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())},H.prototype.toolbarButtonClicked=function(m,C){if(m==="marker"&&C!==void 0)this.createNewMarker(C);else if(m==="action")switch(C){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()}},H.prototype.deleteSelectedMarker=function(){var m=this;if(this._currentMarker!==void 0){var C=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var Q=new it(m,m._currentMarker,!0);Z(Q),Q.defaultPrevented&&(C=!0)}),!C){var k=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(Z){return Z(new it(m,k))})}}},H.prototype.clear=function(){var m=this,C=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var Qe=new it(m,void 0,!0);ye(Qe),Qe.defaultPrevented&&(C=!0)}),!C)){this.setCurrentMarker();for(var k=function(ye){var Qe=Z.markers[ye];Z.setCurrentMarker(Z.markers[ye]),Z._currentMarker.dispose(),Z.markerImage.removeChild(Z._currentMarker.container),Z.markers.splice(Z.markers.indexOf(Z._currentMarker),1),Z.eventListeners.markerdelete.forEach(function(Be){return Be(new it(m,Qe))})},Z=this,Q=this.markers.length-1;Q>=0;Q--)k(Q);this.addUndoStep()}},Object.defineProperty(H.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),H.prototype.showNotesEditor=function(){var m;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=(m=this._currentMarker.notes)!==null&&m!==void 0?m:"",this.overlayContainer.appendChild(this.notesArea))},H.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)},H.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},H.prototype.addUndoStep=function(){var m=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var C=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===C.width&&k.height===C.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(C),Z1&&this.panTo({x:m.clientX,y:m.clientY}))},H.prototype.onPointerUp=function(m){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(m.clientX,m.clientY)),this.isDragging=!1,this.addUndoStep()},H.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},H.prototype.onKeyUp=function(m){this._currentMarker===void 0||this.notesArea!==void 0||m.key!=="Delete"&&m.key!=="Backspace"||this.deleteSelectedMarker()},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.markerImage.getBoundingClientRect();return{x:(m-k.left)/this.zoomLevel,y:(C-k.top)/this.zoomLevel}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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()},H.prototype.addLicenseKey=function(m){Je.addKey(m)},H.prototype.addEventListener=function(m,C){this.eventListeners.addEventListener(m,C)},H.prototype.removeEventListener=function(m,C){this.eventListeners.removeEventListener(m,C)},H.prototype.renderState=function(m){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(m),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(H.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),H.prototype.focus=function(){var m=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(C){return C(new Bt(m))}))},H.prototype.blur=function(){var m=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(C){return C(new Bt(m))}))},H.instanceCounter=0,H}();/* **********************************
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 It=function(H,m){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,k){C.__proto__=k}||function(C,k){for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&(C[Z]=k[Z])})(H,m)};function qt(H,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function C(){this.constructor=H}It(H,m),H.prototype=m===null?Object.create(m):(C.prototype=m.prototype,new C)}function Ft(H,m,C,k){return new(C||(C=Promise))(function(Z,Q){function ye(st){try{Be(k.next(st))}catch(ze){Q(ze)}}function Qe(st){try{Be(k.throw(st))}catch(ze){Q(ze)}}function Be(st){var ze;st.done?Z(st.value):(ze=st.value,ze instanceof C?ze:new C(function(mt){mt(ze)})).then(ye,Qe)}Be((k=k.apply(H,m||[])).next())})}function rr(H,m){var C,k,Z,Q,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return Q={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Qe(Be){return function(st){return function(ze){if(C)throw new TypeError("Generator is already executing.");for(;ye;)try{if(C=1,k&&(Z=2&ze[0]?k.return:ze[0]?k.throw||((Z=k.return)&&Z.call(k),0):k.next)&&!(Z=Z.call(k,ze[1])).done)return Z;switch(k=0,Z&&(ze=[2&ze[0],Z.value]),ze[0]){case 0:case 1:Z=ze;break;case 4:return ye.label++,{value:ze[1],done:!1};case 5:ye.label++,k=ze[1],ze=[0];continue;case 7:ze=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||ze[0]!==6&&ze[0]!==2)){ye=0;continue}if(ze[0]===3&&(!Z||ze[1]>Z[0]&&ze[1]0&&C>0){var k=new kr(m,C),Z=k.ratio>=1?20:k.getHorizontalLength(20),Q=k.ratio<1?20:k.getVerticalLength(20),ye=document.createElementNS("http://www.w3.org/2000/svg","svg");ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),ye.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ye);var Qe=ut.createDefs();ye.appendChild(Qe);var Be=ut.createElement("clipPath",[["id","text-bg-clip"]]);Qe.appendChild(Be);var st=ut.createPath(ut.getHollowRectanglePath((24-Z)/2,(24-Q)/2,Z,Q,(24-Z)/2+2,(24-Q)/2+2,Z-4,Q-4));ye.appendChild(st);var ze=ut.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ze.appendChild(ut.createTSpan(m+":"+C)),ye.appendChild(ze);var mt=ze.getBBox();ut.setAttributes(ze,[["x",((24-mt.width)/2).toString()],["y",((24-mt.height)/2-mt.y).toString()]]);var pt=ut.createPath(ut.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 Be.appendChild(pt),ut.setAttributes(st,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ye),ye.outerHTML}return''},H}(),fr=function(H){function m(C,k,Z){var Q=H.call(this,C,k)||this;return Q.isDropdownOpen=!1,Q.onClick=Q.dropdownButtonClicked,Q.dropdownButtons=Z,Q}return qt(m,H),m.prototype.setupDropdown=function(){var C=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(k){k.className=C.className,k.colorsClassName=C.colorsClassName,C.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},m.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},m.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},m.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},m.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},m.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},m}(Tr),Qr=function(){function H(m,C){this.GRIP_SIZE=10,this.color=m,this.fillColor=C,this.visual=ut.createGroup(),this.visual.appendChild(ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ut.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return H.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},H.prototype.setCenter=function(m,C){this.visual.childNodes.forEach(function(k){return ut.setAttributes(k,[["cx",m.toString()],["cy",C.toString()]])})},H}(),pr=function(){function H(m,C,k,Z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=m,this.canvasHeight=C,this.margin=k,this.container=Z,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(H.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(m){this._aspectRatio=m,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.gridContainer&&ut.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(m){this._zoomFactor=m,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),H.prototype.open=function(){var m=this;this.cropShadeElement=ut.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ut.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var C=0;Cthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-C.height/2),ut.setAttributes(this.cropRectElement,[["x",C.x.toString()],["y",C.y.toString()],["width",C.width.toString()],["height",C.height.toString()]]);var k=C.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Q,ye){var Qe=C.y+k*(ye+1);ut.setAttributes(Q,[["x1",""+C.x],["y1",""+Qe],["x2",""+(C.x+C.width)],["y2",""+Qe]])});var Z=C.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Q,ye){var Qe=C.x+Z*(ye+1);ut.setAttributes(Q,[["x1",""+Qe],["y1",""+C.y],["x2",""+Qe],["y2",""+(C.y+C.height)]])}),ut.setAttributes(this.cropShadeElement,[["d",ut.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,C.x,C.y,C.width,C.height)]]),this.topLeftGrip.setCenter(C.x,C.y),this.topRightGrip.setCenter(C.x+C.width,C.y),this.bottomLeftGrip.setCenter(C.x,C.y+C.height),this.bottomRightGrip.setCenter(C.x+C.width,C.y+C.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},H.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)},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.container.getBoundingClientRect();return{x:m-k.left+this.margin,y:C-k.top+this.margin}},H.prototype.onPointerDown=function(m){this.container.setPointerCapture(m.pointerId),this.previousPoint=this.clientToLocalCoordinates(m.clientX,m.clientY),this.cropRectElement===m.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(m.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(m.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(m.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(m.target)&&(this.activeGrip=this.bottomRightGrip)},H.prototype.onPointerMove=function(m){if(this.isMoving)this.move(this.clientToLocalCoordinates(m.clientX,m.clientY));else if(this.activeGrip){var C=this.clientToLocalCoordinates(m.clientX,m.clientY);this.resize(C)}m.preventDefault()},H.prototype.onPointerUp=function(m){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(m.pointerId)},H.prototype.move=function(m){var C=m.x-this.previousPoint.x,k=m.y-this.previousPoint.y;this.zoomFactor!==1&&(C=-C/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+C),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+k),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=m},H.prototype.resize=function(m){var C=Object.assign({},this.cropRect),k=m.x-this.previousPoint.x,Z=m.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:C.x+kthis.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-C.width),C.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(C.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),C.height=this.aspectRatio.getVerticalLength(C.width)):(C.y+=Z,C.height=this.cropRect.y+this.cropRect.height-C.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?C.height=this.aspectRatio.getVerticalLength(C.width):C.height+=Z}C.width<10&&(C.x=this.cropRect.x,C.width=10),C.height<10&&(C.y=this.cropRect.y,C.height=10),this.previousPoint=m,C.x>=this.margin&&C.y>=this.margin&&C.x-this.margin+C.width<=this.canvasWidth&&C.y-this.margin+C.height<=this.canvasHeight&&(this.cropRect=C,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},H.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var m=this.cropRect.x+this.cropRect.width/2,C=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),Z=this.aspectRatio.getVerticalLength(this.cropRect.width);k/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=m-this.cropRect.width/2,this.cropRect.y=C-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)}},H.prototype.getRescaledRect=function(m,C,k,Z,Q,ye){var Qe=k/m,Be=Z/C;return{x:(Q.x-ye)*Qe+ye,y:(Q.y-ye)*Be+ye,width:Q.width*Qe,height:Q.height*Be}},H.prototype.scaleCanvas=function(m,C){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,m,C,this.cropRect,this.margin);this.canvasWidth=m,this.canvasHeight=C,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},H}(),Kr=function(){function H(m){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=m,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(H.prototype,"angle",{get:function(){return this._angle},set:function(m){this._angle=m,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),H.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},H.prototype.onPointerDown=function(m){this.controlContainer.setPointerCapture(m.pointerId),this.isDragging=!0,this.previousPoint={x:m.clientX,y:m.clientY}},H.prototype.onPointerMove=function(m){this.isDragging&&(this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.previousPoint.x=m.clientX)},H.prototype.onPointerUp=function(m){this.isDragging&&this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(m.pointerId)},H.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var m=this.angleLabelText.getBBox();ut.setAttributes(this.angleLabelElement,[["x",((this.width-m.width)/2).toString()],["y",(this.height/2).toString()]])}},H.prototype.positionScaleShape=function(){if(this.scaleShape){var m=this.scaleShape.transform.baseVal.getItem(0);m.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(m,0)}},H.prototype.getVisual=function(){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("xmlns","http://www.w3.org/2000/svg"),m.setAttribute("width",this.width+"px"),m.setAttribute("height",this.height+"px"),m.setAttribute("viewBox","0 0 "+this.width+" "+this.height),m.style.flexShrink="0",document.body.appendChild(m);for(var C="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var Z=k%5==0?this.height/3:this.height/6;C+="h4v"+-Z+"h1v"+Z}C+="v1H0Z",this.scaleShape=ut.createPath(C);var Q=ut.createTransform();this.scaleShape.transform.baseVal.appendItem(Q),m.appendChild(this.scaleShape),this.angleLabelElement=ut.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ut.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ye=ut.createTSpan("");return ye.innerHTML="°",this.angleLabelElement.appendChild(ye),m.appendChild(this.angleLabelElement),document.body.removeChild(m),m},H}(),Dr=function(){function H(){this.naturalSize=!1,this.imageType="image/png"}return H.prototype.rasterize=function(m,C,k,Z,Q,ye,Qe){var Be=this;return new Promise(function(st){var ze=document.createElement("canvas");ze.width=m.width.baseVal.value-2*Z,ze.height=m.height.baseVal.value-2*Z;var mt=1,pt=1;Be.naturalSize===!0?(mt=C.naturalWidth/(m.width.baseVal.value-2*Z)/ye,pt=C.naturalHeight/(m.height.baseVal.value-2*Z)/Qe,ze.width=C.naturalWidth/ye,ze.height=C.naturalHeight/Qe):Be.width!==void 0&&Be.height!==void 0&&(mt=Be.width/k.width,pt=Be.height/k.height,ze.width*=mt,ze.height*=pt);var Et=ze.getContext("2d");Et.translate(ze.width/2,ze.height/2),Et.rotate(Q*Math.PI/180),Et.scale(ye,Qe),Et.translate(-ze.width/2,-ze.height/2),Et.drawImage(C,0,0,ze.width,ze.height);var Rt=document.createElement("canvas");Rt.width=k.width*mt,Rt.height=k.height*pt,Rt.getContext("2d").putImageData(Et.getImageData((k.x-Z)*mt,(k.y-Z)*pt,k.width*mt,k.height*pt),0,0),st(Rt.toDataURL(Be.imageType,Be.imageQuality))})},H}(),ae=function(){function H(m){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=H.instanceCounter++,this.styles=new lr(this.instanceNo),this.target=m,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(m){this._zoomToCropEnabled=m,m?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"gridLines",{get:function(){return this._gridLines},set:function(m){this._gridLines=m,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(m){this._rotationAngle=m,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"aspectRatio",{get:function(){var m;return(m=this._aspectRatio)!==null&&m!==void 0?m:this.aspectRatios[0]},set:function(m){this._aspectRatio=m},enumerable:!1,configurable:!0}),H.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},H.prototype.show=function(){this.showUI(),this.open()},H.prototype.close=function(m){m===void 0&&(m=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),m||this.closeEventListeners.forEach(function(C){return C()}),this._isOpen=!1)},H.prototype.addRenderEventListener=function(m){this.renderEventListeners.push(m)},H.prototype.removeRenderEventListener=function(m){this.renderEventListeners.indexOf(m)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(m),1)},H.prototype.addCloseEventListener=function(m){this.closeEventListeners.push(m)},H.prototype.removeCloseEventListener=function(m){this.closeEventListeners.indexOf(m)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(m),1)},H.prototype.setupResizeObserver=function(){var m=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.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))},H.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var m=1*this.target.clientWidth/this.target.clientHeight,C=this.contentDiv.clientWidth/m>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*m:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=C+2*this.CANVAS_MARGINm+this.CANVAS_MARGIN?this.target.offsetTop-(m+this.CANVAS_MARGIN):0;this.coverDiv.style.top=C+"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},H.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},H.prototype.addTopToolbar=function(){var m=this;this.topToolbar=new Dt,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 C=new xr;C.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(C);var k=[];this.aspectRatios.forEach(function(pt){var Et=new Tr(Gt.getIcon(pt.horizontal,pt.vertical),pt.horizontal===0&&pt.vertical===0?"FREE":pt.horizontal+":"+pt.vertical);Et.onClick=function(){return m.ratioButtonClicked(pt)},k.push(Et)}),this.aspectRatioButton=new fr(Gt.getIcon(0,0),"Aspect ratio",k),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,C.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Z=new Tr('',"Toggle grid");Z.isActive=this.isGridVisible,Z.onClick=function(){m.isGridVisible=!m.isGridVisible,Z.isActive=m.isGridVisible},C.addButton(Z);var Q=new Tr('',"Zoom to selection");if(Q.isActive=this.zoomToCropEnabled,Q.onClick=function(){m.zoomToCropEnabled=!m.zoomToCropEnabled,Q.isActive=m.zoomToCropEnabled},C.addButton(Q),!kt.isLicensed){var ye=new Pr;this.topToolbar.addElementBlock(ye);var Qe=document.createElement("div");Qe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Be=document.createElement("a");Be.style.color="currentColor",Be.href="https://markerjs.com/products/cropro",Be.target="_blank",Be.innerHTML='',Qe.appendChild(Be),ye.addElement(Qe)}var st=new xr;st.minWidth=3*this.toolbarHeight+"px",st.contentAlign="end",this.topToolbar.addButtonBlock(st);var ze=new Tr('',"OK");ze.onClick=this.startRenderAndClose,st.addButton(ze),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ze.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var mt=new Tr('',"Close");mt.onClick=this.close,st.addButton(mt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(mt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},H.prototype.addBottomToolbar=function(){var m=this;this.bottomToolbar=new Dt,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 C=new xr;C.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(C);var k=new Tr('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,C.addButton(k);var Z=new Tr('',"Rotate right");Z.onClick=this.rotateRightButtonClicked,C.addButton(Z);var Q=new Pr;Q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Q),this.straightener=new Kr("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(st){m.rotateBy(st),m.straightener.angle=m.rotationAngle},Q.addElement(this.straightener.getUI());var ye=new xr;ye.minWidth=2*this.toolbarHeight+"px",ye.contentAlign="end",this.bottomToolbar.addButtonBlock(ye);var Qe=new Tr('',"Flip horizontal");Qe.onClick=this.flipHorizontallyButtonClicked,ye.addButton(Qe);var Be=new Tr('',"Flip vertical");Be.onClick=this.flipVerticallyButtonClicked,ye.addButton(Be)},H.prototype.ratioButtonClicked=function(m){this.aspectRatio=m,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},H.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Gt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},H.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new kr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},H.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},H.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},H.prototype.restoreState=function(m){if(m){var C=this.cropLayer.getRescaledRect(m.width,m.height,this.imageWidth,this.imageHeight,m.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(C),this.cropRectChanged(C),this.flippedHorizontally=m.flippedHorizontally,this.flippedVertically=m.flippedVertically,this.applyFlip(),this.rotationAngle=m.rotationAngle,this.applyRotation()}},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.cropImage.getBoundingClientRect();return{x:m-k.left,y:C-k.top}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var m=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=m+"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()},H.prototype.rotateLeftButtonClicked=function(){var m=this.rotationAngle-90;this.rotationAngle%90!=0&&(m+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(m)},H.prototype.rotateRightButtonClicked=function(){var m=this.rotationAngle+90;this.rotationAngle%90!=0&&(m-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(m)},H.prototype.rotateTo=function(m){m=(m=m>180?m-360:m)<=-180?m+360:m,this.rotationAngle=m,this.applyRotation()},H.prototype.rotateBy=function(m){this.rotateTo((this.rotationAngle+m)%360)},H.prototype.applyRotation=function(){var m=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var C=this.editingTargetRotationContainer.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(C,0);var k=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/k.width,this.imageHeight/k.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=m},H.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},H.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},H.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},H.prototype.startRenderAndClose=function(){return Ft(this,void 0,void 0,function(){var m,C;return rr(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return m=k.sent(),C=this.getState(),this.renderEventListeners.forEach(function(Z){return Z(m,C)}),this.close(!0),[2]}})})},H.prototype.render=function(){return Ft(this,void 0,void 0,function(){var m;return rr(this,function(C){switch(C.label){case 0:return(m=new Dr).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.width=this.renderWidth,m.height=this.renderHeight,this.unzoomFromCrop(),ut.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,m.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 C.sent(),[4,m.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,C.sent()]}})})},H.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 m=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new dt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*m)+`px;
height: `+(this.toolbarHeight-2*m)+`px;
padding: `+m+`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 wt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new wt("."+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*m)+`px;
padding: `+m+`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;
`))},H.instanceCounter=0,H}(),se=K("8hTe"),me=K.n(se),Ie=/]*>/g;function Xe(H){var m=document.createElement("div");return m.innerHTML=H,m.childNodes.length===0?"":m.childNodes[0].nodeValue}var et=_e.a=function(H){var m=H.value,C=m===void 0?"":m,k=H.edit,Z=k===void 0?!1:k,Q=H.className,ye=H.showTextOnly,Qe=H.showLines,Be=H.replaces,st=H.zoomImg,ze=H.hasMask,mt=H.style,pt=mt===void 0?{}:mt,Et=H.stylesPrev,Rt=Et===void 0?{}:Et,ir=String(C),Nt=Object(R.useRef)(),er=Object(R.useRef)(),Ot=Object(R.useState)(""),mr=Object(z.a)(Ot,2),Kt=mr[0],_r=mr[1],gr=Object(R.useState)("office"),Sr=Object(z.a)(gr,2),Ir=Sr[0],vr=Sr[1],yr=function(){var Ut=new ae(er.current);Ut.displayMode="popup",Ut.addRenderEventListener(function(){var tr=Object(O.a)(e.a.mark(function Yt(wr){var ar;return e.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Nt.current.style.display="none",Mt.next=3,Object(Le.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr}});case 3:ar=Mt.sent,ar!=null&&ar.id&&Be(er.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 5:case"end":return Mt.stop()}},Yt)}));return function(Yt){return tr.apply(this,arguments)}}()),Ut.show()},Er=function(){var Ut=new Qt(er.current);Ut.settings.displayMode="popup",Ut.addEventListener("render",function(){var tr=Object(O.a)(e.a.mark(function Yt(wr){var ar;return e.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Nt.current.style.display="none",!er.current){Mt.next=6;break}return Mt.next=4,Object(Le.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr.dataUrl}});case 4:ar=Mt.sent,ar!=null&&ar.id&&Be(er.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 6:case"end":return Mt.stop()}},Yt)}));return function(Yt){return tr.apply(this,arguments)}}()),Ut.show(),window.markerArea=Ut},Rr=Object(R.useMemo)(function(){Nt.current&&(Nt.current.style.zIndex=-1);try{var Xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ut=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ir=ir.replace(Xt,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ut,'"'+ee.a.API_SERVER+"/api/attachments/").replace(tr,'"'+ee.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(gn){}var Yt=M(ir),wr=w();if(ir.match(/\[TOC\]/)&&(Yt=Yt.replace("[TOC]
",x()),_()),Yt=Yt.replace(/(__special_katext_id_\d+__)/g,function(gn,Mt){var Ht=wr[Mt],Lt=Ht.type,nr=Ht.expression;return Object(pe.renderToString)(Xe(nr)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),Yt=Yt.replace(/▁/g,"\u2581\u2581\u2581"),E(),ye){var ar=document.createElement("div");return ar.innerHTML=Yt,ar.innerText}return setTimeout(function(){return Fr()},500),Yt},[ir]),Br=Object(R.useRef)();v.WebkitLineClamp=Qe,Qe&&(pt=Object(N.a)(Object(N.a)({},pt),v));function Ur(Xt){var Ut=Xt.target;if(Ut.tagName.toUpperCase()==="IMG"){if(st){var tr=Ut.getAttribute("src");_r(tr),vr("image")}}else if(Ut.tagName.toUpperCase()==="A"){var Yt=Ut.getAttribute("href");if(Yt.indexOf("office")>-1)Xt.preventDefault(),_r(Yt),vr("office");else if(Yt.indexOf("application/pdf")>-1)Xt.preventDefault(),_r(Yt),vr("pdf");else if(Yt.indexOf("text/html")>-1)Xt.preventDefault(),_r(Yt),vr("html");else if(Yt.startsWith("#")){Xt.preventDefault();var wr=document.getElementById(Yt.replace("#",""));wr&&wr.scrollIntoView(!0)}}}var Fr=function(){var Ut,tr=(Ut=Br.current)===null||Ut===void 0?void 0:Ut.querySelectorAll("video");tr==null||tr.forEach(function(Yt){if(Yt.oncontextmenu=function(){return!1},Yt.src.indexOf(".m3u8")>-1&&!Yt.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var wr=new $.a;wr.loadSource(Yt.src),wr.attachMedia(Yt)}}})};Object(R.useEffect)(function(){if(Br.current&&Rr&&(Rr.match(Ie)&&window.PR.prettyPrint()),Br.current)return Br.current.addEventListener("click",Ur),function(){Br.current.removeEventListener("click",Ur),E(),_()}},[Rr,Br.current,Ur]);var or=function(Ut){if(!Z)return;Ut.target.nodeName==="IMG"?(Nt.current.style.zIndex=1,Nt.current.style.display="flex",Nt.current.style.width=Ut.target.clientWidth+"px",Nt.current.style.height=Ut.target.clientHeight+"px",Nt.current.style.top=Ut.target.offsetTop+"px",Nt.current.style.left=Ut.target.offsetLeft+"px",er.current.src=Ut.target.getAttribute("src")):Nt.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:Br,style:Object(N.a)({},pt),className:"".concat(Q||""," markdown-body ").concat(me.a.mdBody),onMouseOver:or,dangerouslySetInnerHTML:{__html:Rr}}),p.a.createElement("div",{ref:Nt,className:me.a.button},p.a.createElement(G.a,null,p.a.createElement(W.a,{onClick:function(){return yr()}},"\u88C1\u526A"),p.a.createElement(W.a,{onClick:function(){return Er()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:er,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),p.a.createElement(fe.a,{close:!0,data:Kt,type:Kt!=null&&Kt.length?Ir:"",style:Object(N.a)({},Rt),onClose:function(){return _r("")}}))}},BU3w:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return O});var oe=K("MNnm"),G="rc-util-key";function D(z){if(z.attachTo)return z.attachTo;var P=document.querySelector("head");return P||document.body}function W(z){var P,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(oe.a)())return null;var R=document.createElement("style");if((P=e.csp)===null||P===void 0?void 0:P.nonce){var p;R.nonce=(p=e.csp)===null||p===void 0?void 0:p.nonce}R.innerHTML=z;var g=D(e),u=g.firstChild;return e.prepend&&g.prepend?g.prepend(R):e.prepend&&u?g.insertBefore(R,u):g.appendChild(R),R}var N=new Map;function O(z,P){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=D(e);if(!N.has(R)){var p=W("",e),g=p.parentNode;N.set(R,g),g.removeChild(p)}var u=Array.from(N.get(R).children).find(function(a){return a.tagName==="STYLE"&&a[G]===P});if(u){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&u.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var A;u.nonce=(A=e.csp)===null||A===void 0?void 0:A.nonce}return u.innerHTML!==z&&(u.innerHTML=z),u}var o=W(z,e);return o[G]=P,o}},"C/vA":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});function oe(G){const D=this;let W=!1,N;return function(){return W||(W=!0,N=G.apply(D,arguments)),N}}},"Cg/j":function(ct,_e,K){"use strict";K.d(_e,"b",function(){return oe}),K.d(_e,"a",function(){return G}),K.d(_e,"c",function(){return W}),K.d(_e,"d",function(){return N});var oe;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function z(P){return P[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=z})(oe||(oe={}));const G=W("instantiationService");function D(O,z,P,e){z[oe.DI_TARGET]===z?z[oe.DI_DEPENDENCIES].push({id:O,index:P,optional:e}):(z[oe.DI_DEPENDENCIES]=[{id:O,index:P,optional:e}],z[oe.DI_TARGET]=z)}function W(O){if(oe.serviceIds.has(O))return oe.serviceIds.get(O);const z=function(P,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");D(z,P,R,!1)};return z.toString=()=>O,oe.serviceIds.set(O,z),z}function N(O){return function(z,P,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");D(O,z,e,!0)}}},DlQD:function(ct,_e,K){(function(oe,G){ct.exports=G()})(this,function(){"use strict";function oe(we,he){for(var ge=0;gewe.length)&&(he=we.length);for(var ge=0,te=new Array(he);ge=we.length?{done:!0}:{done:!1,value:we[te++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ge=we[Symbol.iterator](),ge.next.bind(ge)}function O(we,he){return he={exports:{}},we(he,he.exports),he.exports}var z=O(function(we){function he(){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 ge(te){we.exports.defaults=te}we.exports={defaults:he(),getDefaults:he,changeDefaults:ge}}),P=z.defaults,e=z.getDefaults,R=z.changeDefaults,p=/[&<>"']/,g=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(he){return i[he]};function o(we,he){if(he){if(p.test(we))return we.replace(g,A)}else if(u.test(we))return we.replace(s,A);return we}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(we){return we.replace(a,function(he,ge){return ge=ge.toLowerCase(),ge==="colon"?":":ge.charAt(0)==="#"?ge.charAt(1)==="x"?String.fromCharCode(parseInt(ge.substring(2),16)):String.fromCharCode(+ge.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(we,he){we=we.source||we,he=he||"";var ge={replace:function(ne,le){return le=le.source||le,le=le.replace(t,"$1"),we=we.replace(ne,le),ge},getRegex:function(){return new RegExp(we,he)}};return ge}var v=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(we,he,ge){if(we){var te;try{te=decodeURIComponent(r(ge)).replace(v,"").toLowerCase()}catch(ne){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}he&&!b.test(ge)&&(ge=d(he,ge));try{ge=encodeURI(ge).replace(/%25/g,"%")}catch(ne){return null}return ge}var y={},c=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(we,he){y[" "+we]||(c.test(we)?y[" "+we]=we+"/":y[" "+we]=L(we,"/",!0)),we=y[" "+we];var ge=we.indexOf(":")===-1;return he.substring(0,2)==="//"?ge?he:we.replace(n,"$1")+he:he.charAt(0)==="/"?ge?he:we.replace(l,"$1")+he:we+he}var w={exec:function(){}};function E(we){for(var he=1,ge,te;he=0&&Re[qe]==="\\";)Me=!Me;return Me?"|":" |"}),te=ge.split(/ \|/),ne=0;if(te.length>he)te.splice(he);else for(;te.length=te.length?ne.slice(te.length):ne}).join(`
`)}var xe=function(){function we(ge){this.options=ge||j}var he=we.prototype;return he.space=function(te){var ne=this.rules.block.newline.exec(te);if(ne)return ne[0].length>1?{type:"space",raw:ne[0]}:{raw:`
`}},he.code=function(te,ne){var le=this.rules.block.code.exec(te);if(le){var de=ne[ne.length-1];if(de&&de.type==="paragraph")return{raw:le[0],text:le[0].trimRight()};var Re=le[0].replace(/^ {4}/gm,"");return{type:"code",raw:le[0],codeBlockStyle:"indented",text:this.options.pedantic?Re:U(Re,`
`)}}},he.fences=function(te){var ne=this.rules.block.fences.exec(te);if(ne){var le=ne[0],de=Le(le,ne[3]||"");return{type:"code",raw:le,lang:ne[2]?ne[2].trim():ne[2],text:de}}},he.heading=function(te){var ne=this.rules.block.heading.exec(te);if(ne)return{type:"heading",raw:ne[0],depth:ne[1].length,text:ne[2]}},he.nptable=function(te){var ne=this.rules.block.nptable.exec(te);if(ne){var le={type:"table",header:$(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
`):[],raw:ne[0]};if(le.header.length===le.align.length){var de=le.align.length,Re;for(Re=0;Re ?/gm,"");return{type:"blockquote",raw:ne[0],text:le}}},he.list=function(te){var ne=this.rules.block.list.exec(te);if(ne){for(var le=ne[0],de=ne[2],Re=de.length>1,Me=de[de.length-1]===")",qe={type:"list",raw:le,ordered:Re,start:Re?+de.slice(0,-1):"",loose:!1,items:[]},lt=ne[0].match(this.rules.block.item),ft=!1,ot,Bt,St,it,Wt,Qt,It,qt=lt.length,Ft=0;Ft1||this.options.smartLists&&St!==de)&&(it=lt.slice(Ft+1).join(`
`),qe.raw=qe.raw.substring(0,qe.raw.length-it.length),Ft=qt-1)),Wt=ft||/\n\n(?!\s*$)/.test(ot),Ft!==qt-1&&(ft=ot.charAt(ot.length-1)===`
`,Wt||(Wt=ft)),Wt&&(qe.loose=!0),Qt=/^\[[ xX]\] /.test(ot),It=void 0,Qt&&(It=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:le,task:Qt,checked:It,loose:Wt,text:ot});return qe}},he.html=function(te){var ne=this.rules.block.html.exec(te);if(ne)return{type:this.options.sanitize?"paragraph":"html",raw:ne[0],pre:!this.options.sanitizer&&(ne[1]==="pre"||ne[1]==="script"||ne[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ne[0]):ee(ne[0]):ne[0]}},he.def=function(te){var ne=this.rules.block.def.exec(te);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var le=ne[1].toLowerCase().replace(/\s+/g," ");return{tag:le,raw:ne[0],href:ne[2],title:ne[3]}}},he.table=function(te){var ne=this.rules.block.table.exec(te);if(ne){var le={type:"table",header:$(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
`):[]};if(le.header.length===le.align.length){le.raw=ne[0];var de=le.align.length,Re;for(Re=0;Re/i.test(de[0])&&(ne=!1),!le&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?le=!0:le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(le=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ne,inRawBlock:le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ee(de[0]):de[0]}},he.link=function(te){var ne=this.rules.inline.link.exec(te);if(ne){var le=pe(ne[2],"()");if(le>-1){var de=ne[0].indexOf("!")===0?5:4,Re=de+ne[1].length+le;ne[2]=ne[2].substring(0,le),ne[0]=ne[0].substring(0,Re).trim(),ne[3]=""}var Me=ne[2],qe="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Me);lt?(Me=lt[1],qe=lt[3]):qe=""}else qe=ne[3]?ne[3].slice(1,-1):"";Me=Me.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=fe(ne,{href:Me&&Me.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},ne[0]);return ft}},he.reflink=function(te,ne){var le;if((le=this.rules.inline.reflink.exec(te))||(le=this.rules.inline.nolink.exec(te))){var de=(le[2]||le[1]).replace(/\s+/g," ");if(de=ne[de.toLowerCase()],!de||!de.href){var Re=le[0].charAt(0);return{type:"text",raw:Re,text:Re}}var Me=fe(le,de,le[0]);return Me}},he.strong=function(te,ne,le){le===void 0&&(le="");var de=this.rules.inline.strong.start.exec(te);if(de&&(!de[1]||de[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ne=ne.slice(-1*te.length);var Re=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Re.lastIndex=0;for(var Me;(de=Re.exec(ne))!=null;)if(Me=this.rules.inline.strong.middle.exec(ne.slice(0,de.index+3)),Me)return{type:"strong",raw:te.slice(0,Me[0].length),text:te.slice(2,Me[0].length-2)}}},he.em=function(te,ne,le){le===void 0&&(le="");var de=this.rules.inline.em.start.exec(te);if(de&&(!de[1]||de[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ne=ne.slice(-1*te.length);var Re=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Re.lastIndex=0;for(var Me;(de=Re.exec(ne))!=null;)if(Me=this.rules.inline.em.middle.exec(ne.slice(0,de.index+2)),Me)return{type:"em",raw:te.slice(0,Me[0].length),text:te.slice(1,Me[0].length-1)}}},he.codespan=function(te){var ne=this.rules.inline.code.exec(te);if(ne){var le=ne[2].replace(/\n/g," "),de=/[^ ]/.test(le),Re=le.startsWith(" ")&&le.endsWith(" ");return de&&Re&&(le=le.substring(1,le.length-1)),le=ee(le,!0),{type:"codespan",raw:ne[0],text:le}}},he.br=function(te){var ne=this.rules.inline.br.exec(te);if(ne)return{type:"br",raw:ne[0]}},he.del=function(te){var ne=this.rules.inline.del.exec(te);if(ne)return{type:"del",raw:ne[0],text:ne[1]}},he.autolink=function(te,ne){var le=this.rules.inline.autolink.exec(te);if(le){var de,Re;return le[2]==="@"?(de=ee(this.options.mangle?ne(le[1]):le[1]),Re="mailto:"+de):(de=ee(le[1]),Re=de),{type:"link",raw:le[0],text:de,href:Re,tokens:[{type:"text",raw:de,text:de}]}}},he.url=function(te,ne){var le;if(le=this.rules.inline.url.exec(te)){var de,Re;if(le[2]==="@")de=ee(this.options.mangle?ne(le[0]):le[0]),Re="mailto:"+de;else{var Me;do Me=le[0],le[0]=this.rules.inline._backpedal.exec(le[0])[0];while(Me!==le[0]);de=ee(le[0]),le[1]==="www."?Re="http://"+de:Re=de}return{type:"link",raw:le[0],text:de,href:Re,tokens:[{type:"text",raw:de,text:de}]}}},he.inlineText=function(te,ne,le){var de=this.rules.inline.text.exec(te);if(de){var Re;return ne?Re=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ee(de[0]):de[0]:Re=ee(this.options.smartypants?le(de[0]):de[0]),{type:"text",raw:de[0],text:Re}}},we}(),Se=M.noopTest,Ue=M.edit,Fe=M.merge,Ce={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:Se,table:Se,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ce.def=Ue(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex(),Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ce.item=Ue(Ce.item,"gm").replace(/bull/g,Ce.bullet).getRegex(),Ce.list=Ue(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex(),Ce._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",Ce._comment=//,Ce.html=Ue(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce.paragraph=Ue(Ce._paragraph).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.blockquote=Ue(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex(),Ce.normal=Fe({},Ce),Ce.gfm=Fe({},Ce.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*|$)"}),Ce.gfm.nptable=Ue(Ce.gfm.nptable).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.gfm.table=Ue(Ce.gfm.table).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.pedantic=Fe({},Ce.normal,{html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._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:Se,paragraph:Ue(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,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:Se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ve.punctuation=Ue(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex(),ve._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ve._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ve.em.start=Ue(ve.em.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.middle=Ue(ve.em.middle).replace(/punctuation/g,ve._punctuation).replace(/overlapSkip/g,ve._overlapSkip).getRegex(),ve.em.endAst=Ue(ve.em.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.endUnd=Ue(ve.em.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.start=Ue(ve.strong.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.middle=Ue(ve.strong.middle).replace(/punctuation/g,ve._punctuation).replace(/blockSkip/g,ve._blockSkip).getRegex(),ve.strong.endAst=Ue(ve.strong.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.endUnd=Ue(ve.strong.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.blockSkip=Ue(ve._blockSkip,"g").getRegex(),ve.overlapSkip=Ue(ve._overlapSkip,"g").getRegex(),ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ve._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])?)+(?![-_])/,ve.autolink=Ue(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex(),ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ve.tag=Ue(ve.tag).replace("comment",Ce._comment).replace("attribute",ve._attribute).getRegex(),ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ve._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ve.link=Ue(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex(),ve.reflink=Ue(ve.reflink).replace("label",ve._label).getRegex(),ve.reflinkSearch=Ue(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex(),ve.normal=Fe({},ve),ve.pedantic=Fe({},ve.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:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()}),ve.gfm=Fe({},ve.normal,{escape:Ue(ve.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&&(te="x"+te.toString(16)),he+=""+te+";";return he}var X=function(){function we(ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=ge||at,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:nt.normal,inline:tt.normal};this.options.pedantic?(te.block=nt.pedantic,te.inline=tt.pedantic):this.options.gfm&&(te.block=nt.gfm,this.options.breaks?te.inline=tt.breaks:te.inline=tt.gfm),this.tokenizer.rules=te}we.lex=function(te,ne){var le=new we(ne);return le.lex(te)};var he=we.prototype;return he.lex=function(te){return te=te.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},he.blockTokens=function(te,ne,le){ne===void 0&&(ne=[]),le===void 0&&(le=!0),te=te.replace(/^ +$/gm,"");for(var de,Re,Me,qe;te;){if(de=this.tokenizer.space(te)){te=te.substring(de.raw.length),de.type&&ne.push(de);continue}if(de=this.tokenizer.code(te,ne)){te=te.substring(de.raw.length),de.type?ne.push(de):(qe=ne[ne.length-1],qe.raw+=`
`+de.raw,qe.text+=`
`+de.text);continue}if(de=this.tokenizer.fences(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.heading(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.nptable(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.hr(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.blockquote(te)){te=te.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],le),ne.push(de);continue}if(de=this.tokenizer.list(te)){for(te=te.substring(de.raw.length),Me=de.items.length,Re=0;Re0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)ft.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Me=this.tokenizer.escape(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.tag(te,le,de)){te=te.substring(Me.raw.length),le=Me.inLink,de=Me.inRawBlock,ne.push(Me);continue}if(Me=this.tokenizer.link(te)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,de)),ne.push(Me);continue}if(Me=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,de)),ne.push(Me);continue}if(Me=this.tokenizer.strong(te,qe,Re)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.em(te,qe,Re)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.codespan(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.br(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.del(te)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.autolink(te,re)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(!le&&(Me=this.tokenizer.url(te,re))){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.inlineText(te,de,Ke)){te=te.substring(Me.raw.length),Re=Me.raw.slice(-1),ne.push(Me);continue}if(te){var ot="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return ne},G(we,null,[{key:"rules",get:function(){return{block:nt,inline:tt}}}]),we}(),J=z.defaults,Y=M.cleanUrl,ie=M.escape,ue=function(){function we(ge){this.options=ge||J}var he=we.prototype;return he.code=function(te,ne,le){var de=(ne||"").match(/\S*/)[0];if(this.options.highlight){var Re=this.options.highlight(te,de);Re!=null&&Re!==te&&(le=!0,te=Re)}return de?''+(le?te:ie(te,!0))+`
`:""+(le?te:ie(te,!0))+`
`},he.blockquote=function(te){return`
`+te+`
`},he.html=function(te){return te},he.heading=function(te,ne,le,de){return this.options.headerIds?"
`:""+te+"
`},he.hr=function(){return this.options.xhtml?`
`:`
`},he.list=function(te,ne,le){var de=ne?"ol":"ul",Re=ne&&le!==1?' start="'+le+'"':"";return"<"+de+Re+`>
`+te+""+de+`>
`},he.listitem=function(te){return""+te+`
`},he.checkbox=function(te){return" "},he.paragraph=function(te){return""+te+`
`},he.table=function(te,ne){return ne&&(ne=""+ne+""),`
`},he.tablerow=function(te){return`
`+te+`
`},he.tablecell=function(te,ne){var le=ne.header?"th":"td",de=ne.align?"<"+le+' align="'+ne.align+'">':"<"+le+">";return de+te+""+le+`>
`},he.strong=function(te){return""+te+""},he.em=function(te){return""+te+""},he.codespan=function(te){return""+te+""},he.br=function(){return this.options.xhtml?"
":"
"},he.del=function(te){return""+te+""},he.link=function(te,ne,le){if(te=Y(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var de='"+le+"",de},he.image=function(te,ne,le){if(te=Y(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var de='
":">",de},he.text=function(te){return te},we}(),ce=function(){function we(){}var he=we.prototype;return he.strong=function(te){return te},he.em=function(te){return te},he.codespan=function(te){return te},he.del=function(te){return te},he.html=function(te){return te},he.text=function(te){return te},he.link=function(te,ne,le){return""+le},he.image=function(te,ne,le){return""+le},he.br=function(){return""},we}(),He=function(){function we(){this.seen={}}var he=we.prototype;return he.slug=function(te){var ne=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ne)){var le=ne;do this.seen[le]++,ne=le+"-"+this.seen[le];while(this.seen.hasOwnProperty(ne))}return this.seen[ne]=0,ne},we}(),Ve=z.defaults,We=M.unescape,Ge=function(){function we(ge){this.options=ge||Ve,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ce,this.slugger=new He}we.parse=function(te,ne){var le=new we(ne);return le.parse(te)};var he=we.prototype;return he.parse=function(te,ne){ne===void 0&&(ne=!0);var le="",de,Re,Me,qe,lt,ft,ot,Bt,St,it,Wt,Qt,It,qt,Ft,rr,kt,ut,lr=te.length;for(de=0;de0&&Ft.tokens[0].type==="text"?(Ft.tokens[0].text=ut+" "+Ft.tokens[0].text,Ft.tokens[0].tokens&&Ft.tokens[0].tokens.length>0&&Ft.tokens[0].tokens[0].type==="text"&&(Ft.tokens[0].tokens[0].text=ut+" "+Ft.tokens[0].tokens[0].text)):Ft.tokens.unshift({type:"text",text:ut}):qt+=ut),qt+=this.parse(Ft.tokens,It),St+=this.renderer.listitem(qt,kt,rr);le+=this.renderer.list(St,Wt,Qt);continue}case"html":{le+=this.renderer.html(it.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(St=it.tokens?this.parseInline(it.tokens):it.text;de+1An error occurred:
"+Te(Me.message+"",!0)+"
";throw Me}}Ne.options=Ne.setOptions=function(we){return rt(Ne.defaults,we),je(Ne.defaults),Ne},Ne.getDefaults=De,Ne.defaults=$e,Ne.use=function(we){var he=rt({},we);if(we.renderer&&function(){var te=Ne.defaults.renderer||new ue,ne=function(Re){var Me=te[Re];te[Re]=function(){for(var qe=arguments.length,lt=new Array(qe),ft=0;ft>"))),n.a.createElement("div",{className:"font16 mt10"},he.is_finish===!1&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",he.is_finish&&n.a.createElement("aside",{className:pe.a.shixunWrp},n.a.createElement(fe.a,{v:he,shixunWorkReport:Ge,dispatch:We,autoHeight:Ve,languages:he.languages,language:he.language,game_id:he.id,data:xe.Base64.decode(he.code),diff_code_count:he.diff_code_count,onPathChange:$e}))),n.a.createElement("aside",{className:"mt10 font16"},(te=he.history)!==null&&te!==void 0&&te.length?n.a.createElement(W.a,{columns:je,pagination:{hideOnSinglePage:!0},dataSource:he.history}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},Ue=Object(E.a)(function(ue){var ce=ue.shixunHomeworks,He=ue.loading,Ve=ue.globalSetting;return{shixunHomeworks:ce,globalSetting:Ve,loading:He.effects}})(Se),Fe=K("5NDa"),Ce=K("5rEg"),ve=K("y8nQ"),Je=K("Vl3Y"),at=function(ce){var He,Ve,We,Ge=ce.shixunHomeworks,rt=ce.dispatch,At=Object(b.a)(ce,["shixunHomeworks","dispatch"]),Te=Object(w.i)(),De=Object(c.useState)(!1),je=Object(v.a)(De,2),$e=je[0],Ne=je[1],Pe=Je.a.useForm(),we=Object(v.a)(Pe,1),he=we[0];Object(c.useEffect)(function(){if(Ge.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4")if(Ge.actionTabs.selectArrs.type==="1")he.setFieldsValue({comment:Ge.actionTabs.selectArrs.v.comment,hidden_comment:Ge.actionTabs.selectArrs.v.hidden_comment});else{var te,ne,le,de,Re,Me;he.setFieldsValue({comment:(te=Ge.actionTabs.selectArrs)===null||te===void 0||((ne=te.data)===null||ne===void 0||((le=ne.data)===null||le===void 0))?void 0:le.work_comment,hidden_comment:(de=Ge.actionTabs.selectArrs)===null||de===void 0||((Re=de.data)===null||Re===void 0||((Me=Re.data)===null||Me===void 0))?void 0:Me.work_comment_hidden})}},[Ge.actionTabs.key]);var ge=function(){var te=Object(r.a)(y.a.mark(function ne(){var le,de,Re,Me,qe,lt,ft;return y.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return qe=he.getFieldValue(),lt=Ge.actionTabs.selectArrs.type==="1"?"/api/problems/".concat(Ge.actionTabs.selectArrs.v.identifier,"/hack_comment.json"):"/api/student_works/".concat(Te.homeworkId,"/shixun_work_comment.json"),Bt.next=4,Object(Le.a)(lt,{method:"post",body:{hidden_comment:qe.hidden_comment,comment:qe.comment,language:(le=Ge.actionTabs.selectArrs)===null||le===void 0?void 0:le.language,user_id:(de=Ge.actionTabs.selectArrs)===null||de===void 0||((Re=de.data)===null||Re===void 0||((Me=Re.data)===null||Me===void 0))?void 0:Me.user_id}});case 4:ft=Bt.sent,ft.status===0&&(O.b.success("\u8BC4\u9605\u6210\u529F"),he.resetFields(),rt({type:"shixunHomeworks/setActionTabs",payload:{}}),rt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(_.a)({},Te)}));case 6:case"end":return Bt.stop()}},ne)}));return function(){return te.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(a.a,{centered:!0,title:n.a.createElement("span",null,((He=Ge.actionTabs.selectArrs)===null||He===void 0?void 0:He.type)==="1"?"\u70B9\u8BC4\u4EE3\u7801":"\u66F4\u6539\u70B9\u8BC4",((Ve=Ge.actionTabs.selectArrs)===null||Ve===void 0?void 0:Ve.language)&&n.a.createElement("span",{style:{marginLeft:10,fontSize:14}},"\u4F7F\u7528\u8BED\u8A00\uFF1A",(We=Ge.actionTabs.selectArrs)===null||We===void 0?void 0:We.language)),visible:Ge.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(r.a)(y.a.mark(function te(){var ne;return y.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:ne=he.getFieldValue(),JSON.stringify(ne)==="{}"||ne.hidden_comment===""&&ne.comment===""?Ne(!0):ge();case 2:case"end":return de.stop()}},te)})),onCancel:function(){rt({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(Je.a,{form:he,onChange:function(){$e&&Ne(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(Je.a.Item,{name:"comment"},n.a.createElement(Ce.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(Je.a.Item,{name:"hidden_comment"},n.a.createElement(Ce.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),$e&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},nt=Object(E.a)(function(ue){var ce=ue.shixunHomeworks;return{shixunHomeworks:ce}})(at),tt=K("T7RX"),Ke=K("9Bee"),re=K("XYT7"),X=K("1n7x"),J=K.n(X),Y=function(ce){var He,Ve,We,Ge,rt,At,Te,De,je,$e,Ne,Pe,we,he,ge,te,ne,le,de,Re,Me,qe,lt,ft,ot,Bt,St,it,Wt,Qt,It,qt=ce.shixunHomeworks,Ft=ce.globalSetting,rr=ce.loading,kt=ce.dispatch,ut=Object(b.a)(ce,["shixunHomeworks","globalSetting","loading","dispatch"]),lr=Object(c.useState)(Object(_.a)({},Object(w.i)())),wt=Object(v.a)(lr,2),dt=wt[0],Dt=wt[1],dr=Object(w.i)(),xr=Object(c.useState)([]),Tr=Object(t.a)(xr),Pr=Object(c.useState)({last:!1}),kr=Object(v.a)(Pr,2),Gt=kr[0],fr=kr[1],Qr=Object(c.useState)({last:!1}),pr=Object(v.a)(Qr,2),Kr=pr[0],Dr=pr[1],ae=Object(c.useRef)(),se=Object(c.useRef)(),me=Object(c.useState)(!1),Ie=Object(v.a)(me,2),Xe=Ie[0],et=Ie[1],H=Object(c.useState)(!1),m=Object(v.a)(H,2),C=m[0],k=m[1],Z=Object(c.useState)(!1),Q=Object(v.a)(Z,2),ye=Q[0],Qe=Q[1],Be=qt.shixunWorkReport,st=Object(U.c)(),ze=Object(c.useState)(new d.a),mt=Object(v.a)(ze,2),pt=mt[0],Et=mt[1],Rt=Object(c.useState)(0),ir=Object(v.a)(Rt,2),Nt=ir[0],er=ir[1],Ot=Object(c.useState)([]),mr=Object(v.a)(Ot,2),Kt=mr[0],_r=mr[1],gr=Object(c.useState)(!1),Sr=Object(v.a)(gr,2),Ir=Sr[0],vr=Sr[1],yr=Object(c.useState)(!1),Er=Object(v.a)(yr,2),Rr=Er[0],Br=Er[1];Object(c.useEffect)(function(){return kt({type:"globalSetting/footerToggle",payload:!1}),function(){kt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(c.useEffect)(function(){qt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Kt.length>0&&tr("all")},[Kt]),Object(c.useEffect)(function(){Dt(Object(_.a)({},dr))},[ut.location.pathname]);var Ur=function(){document.body.scrollIntoView()};function Fr(){return or.apply(this,arguments)}function or(){return or=Object(r.a)(y.a.mark(function Mt(){var Ht,Lt,nr,xt,Jt,Vt,nn;return y.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),vn.next=3,kt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(_.a)(Object(_.a)({},dt),nr)});case 3:xt=vn.sent,_r(xt.all_student_works),Jt=(Ht=xt.all_student_works)===null||Ht===void 0?void 0:Ht.map(function(zr){return String(zr.user_id)}).indexOf(dt.homeworkId),Jt===((Lt=xt.all_student_works)===null||Lt===void 0?void 0:Lt.length)-1?fr({last:!0}):fr((Vt=xt.all_student_works)===null||Vt===void 0?void 0:Vt[Jt+1]),Jt===0?Dr({last:!0}):Dr((nn=xt.all_student_works)===null||nn===void 0?void 0:nn[Jt-1]);case 8:case"end":return vn.stop()}},Mt)})),or.apply(this,arguments)}var Xt=function(){document.querySelectorAll("canvas").forEach(function(Ht){(!Ht.clientWidth||!Ht.clientHeight)&&Ht.remove()})},Ut=function(){ae.current.offsetHeight>62e3?Qe(!1):Qe(!0)},tr=function(){var Mt=Object(r.a)(y.a.mark(function Ht(Lt){var nr,xt,Jt,Vt,nn,an;return y.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(nn=function(){return nn=Object(r.a)(y.a.mark(function sn(){var Xr;return y.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return Lr.next=2,kt({type:"shixunHomeworks/getShixunWorkReports",payload:{homeworkId:Kt[nr].user_id}});case 2:Xr=Lr.sent,Ur(),nr++,setTimeout(Object(r.a)(y.a.mark(function un(){var Zr,bn,_n,qr,tn,on,hn;return y.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:Xt(),bn=pt.folder("".concat(Xr==null?void 0:Xr.username)),_n=document.querySelector("#export-all").children,qr=J()(),tn=y.a.mark(function An(wn){return y.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return jt.next=2,qr.set(Jt).from(_n[wn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var zt=Object(r.a)(y.a.mark(function Nr(en){return y.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!(wn<_n.length-1)){Cn.next=3;break}return Cn.next=3,en.addPage();case 3:case"end":return Cn.stop()}},Nr)}));return function(Nr){return zt.apply(this,arguments)}}());case 2:case"end":return jt.stop()}},An)}),on=0;case 6:if(!(on<_n.length)){jr.next=11;break}return jr.delegateYield(tn(on),"t0",8);case 8:on++,jr.next=6;break;case 11:bn.file("".concat(Kt[nr-1].student_work_user_name).concat(nr,".pdf"),qr.output("blob")),hn=bn.folder("\u4EE3\u7801\u6587\u4EF6"),Xr==null||((Zr=Xr.shixun_detail)===null||Zr===void 0)||Zr.map(function(An,wn){var Rn,jt=hn.folder("\u7B2C".concat(wn+1,"\u5173-").concat(An.subject,"-").concat(An.id));An==null||((Rn=An.game_codes)===null||Rn===void 0)||Rn.map(function(zt){jt.file("".concat(zt.filename,".txt"),zt==null?void 0:zt.content)})}),xt.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr),"/",Kt==null?void 0:Kt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(Kt==null?void 0:Kt.length)?(xt.destroy(),Yt()):Vt();case 16:case"end":return jr.stop()}},un)})),2200);case 6:case"end":return Lr.stop()}},sn)})),nn.apply(this,arguments)},Vt=function(){return nn.apply(this,arguments)},nr=0,xt=a.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr+1),"/",Lt!=="all"?1:Kt==null?void 0:Kt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:pe.a.modal,onOk:function(){}}),Jt={margin:[0,0],filename:"".concat(Be.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(Lt!=="all"||(Kt==null?void 0:Kt.length)<2)){zr.next=12;break}return zr.delegateYield(y.a.mark(function $r(){var sn,Xr,In,Lr,un,Zr,bn;return y.a.wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:Xt(),Ur(),Xr=se.current.children,In=J()(),Lr=pt.folder("".concat(Be==null?void 0:Be.username)),un=y.a.mark(function tn(on){return y.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return yn.next=2,In.set(Jt).from(Xr[on]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var jr=Object(r.a)(y.a.mark(function An(wn){return y.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!(on"},n.a.createElement(A.a.Item,null,n.a.createElement(h.a,{to:"/classrooms/".concat(Be==null||((Ve=Be.category)===null||Ve===void 0)?void 0:Ve.course_id,"/program_homework")},Be==null||((We=Be.category)===null||We===void 0)?void 0:We.course_name)),n.a.createElement(A.a.Item,null,n.a.createElement(h.a,{to:"/classrooms/".concat(Be==null||((Ge=Be.category)===null||Ge===void 0)?void 0:Ge.course_id,"/program_homework")},Be.category.category_name)),n.a.createElement(A.a.Item,null,n.a.createElement(h.a,{to:"/classrooms/".concat(Be==null||((rt=Be.category)===null||rt===void 0)?void 0:rt.course_id,"/program_homework/").concat(dt==null?void 0:dt.categoryId,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),n.a.createElement(A.a.Item,null,Be==null||((At=Be.data)===null||At===void 0)?void 0:At.user_name))),n.a.createElement("aside",{className:[pe.a.title1,"mt20"].join(" ")},n.a.createElement(g.a,{align:"middle"},n.a.createElement(s.a,{flex:1},n.a.createElement(h.a,{to:"/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt==null?void 0:dt.categoryId,"/detail")},n.a.createElement(L.a,{className:"font16 c-black"})),n.a.createElement("strong",{className:"font20 ml5"},Be==null||((Te=Be.category)===null||Te===void 0)?void 0:Te.homework_name),n.a.createElement($.m,{temporary:!0,status:Be.homework_status}))))),n.a.createElement("aside",{className:"mt30 relative"})),n.a.createElement("aside",{className:"edu-container bg-white",ref:ae},n.a.createElement("div",{id:"export-all",ref:se},n.a.createElement("div",{id:"export-all-1"},n.a.createElement("div",{className:pe.a.title},n.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),n.a.createElement("div",null,Object(U.c)()&&n.a.createElement(R.a,{className:"mr20",type:"primary",onClick:function(){kt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Be.user_id,data:Object(_.a)({},Be)}}})}},n.a.createElement(F.a,null),Be!=null&&(De=Be.data)!==null&&De!==void 0&&De.has_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),n.a.createElement(P.a,{style:{marginTop:0}}),n.a.createElement(g.a,{className:"pl30 pr30"},n.a.createElement(s.a,null,n.a.createElement("img",{className:pe.a.userPic,src:"".concat(j.a.IMG_SERVER,"/images/").concat(Be==null||((je=Be.data)===null||je===void 0)?void 0:je.image_url),alt:Be==null||(($e=Be.data)===null||$e===void 0)?void 0:$e.username})),n.a.createElement(s.a,null,n.a.createElement("span",{className:"font16 ml40"},Be==null||((Ne=Be.data)===null||Ne===void 0)?void 0:Ne.user_name),n.a.createElement($.e,{status:Be==null||((Pe=Be.data)===null||Pe===void 0)?void 0:Pe.compelete_status}),n.a.createElement("ul",{className:pe.a.userInfo},n.a.createElement("li",null,"\u5B66\u53F7\uFF1A",(Be==null||((we=Be.data)===null||we===void 0)?void 0:we.student_id)||"--"),n.a.createElement("li",null,"\u5206\u73ED\uFF1A",(Be==null||((he=Be.data)===null||he===void 0)?void 0:he.course_group)||"--"),n.a.createElement("br",null),n.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A",n.a.createElement("span",{className:"c-red"},Be==null||((ge=Be.data)===null||ge===void 0)?void 0:ge.finish_do)),n.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A",n.a.createElement("span",{className:"c-red"},(Be==null||((te=Be.data)===null||te===void 0)?void 0:te.latest_do)||"-")))),n.a.createElement("ul",{className:[pe.a.listItem,"mt10"].join(" ")},n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u95F4"),n.a.createElement("div",{className:"c-light-black mt20"},(Be==null?void 0:Be.data)&&(Be==null||((ne=Be.data)===null||ne===void 0)?void 0:ne.finish_time))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u957F",n.a.createElement("i",{onClick:function(Ht){Ht.stopPropagation(),Ht.preventDefault(),Br(!0)},style:{marginLeft:4,display:"none",color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),n.a.createElement("div",{className:"c-light-black mt20"},Be==null||((le=Be.data)===null||le===void 0)?void 0:le.finish_time_long)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),n.a.createElement("div",{className:"mt20"},Be==null||((de=Be.data)===null||de===void 0)?void 0:de.submit_count)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u901A\u8FC7\u7387"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",null,(Be==null||((Re=Be.data)===null||Re===void 0)?void 0:Re.pass_rate)||"- -"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5F97\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((Me=Be.data)===null||Me===void 0)?void 0:Me.score))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u7EC3\u4E60\u603B\u6392\u540D"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((qe=Be.data)===null||qe===void 0)?void 0:qe.total_rank))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5206\u73ED\u6392\u540D"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((lt=Be.data)===null||lt===void 0)?void 0:lt.class_rank))))),n.a.createElement(P.a,{style:{margin:0}}),((Be==null||((ft=Be.data)===null||ft===void 0)?void 0:ft.work_comment_hidden)||(Be==null||((ot=Be.data)===null||ot===void 0)?void 0:ot.work_comment))&&n.a.createElement("div",null,n.a.createElement(g.a,{align:"middle"},n.a.createElement(s.a,{flex:1},n.a.createElement("h1",{className:pe.a.title},"\u70B9\u8BC4\u5185\u5BB9")),n.a.createElement(s.a,{className:"pr30"},Object(U.c)()&&n.a.createElement(R.a,{onClick:Object(r.a)(y.a.mark(function Mt(){return y.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:a.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:n.a.createElement(B.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(r.a)(y.a.mark(function xt(){var Jt,Vt;return y.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(re.m)({comment_id:Be==null||((Jt=Be.data)===null||Jt===void 0)?void 0:Jt.comment_id,homeworkId:dt.homeworkId});case 2:Vt=an.sent,Vt.status===0&&(O.b.success("\u5220\u9664\u6210\u529F"),kt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(_.a)({},dt)}));case 4:case"end":return an.stop()}},xt)}))()}});case 1:case"end":return Lt.stop()}},Mt)}))},n.a.createElement(M.a,null),"\u5220\u9664"))),n.a.createElement(P.a,{style:{margin:0}}),(Be==null||((Bt=Be.data)===null||Bt===void 0)?void 0:Bt.work_comment)&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(Ke.a,{value:Be==null||((St=Be.data)===null||St===void 0)?void 0:St.work_comment})),(Be==null||((it=Be.data)===null||it===void 0)?void 0:it.work_comment_hidden)&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(Ke.a,{value:Be==null||((Wt=Be.data)===null||Wt===void 0)?void 0:Wt.work_comment_hidden}))),n.a.createElement("h1",{className:pe.a.title},"\u9636\u6BB5\u6210\u7EE9"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(W.a,{dataSource:Be==null?void 0:Be.hack,pagination:!1,columns:ar})),(Be==null||((Qt=Be.data)===null||Qt===void 0)?void 0:Qt.work_description)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h1",{className:pe.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(Ke.a,{value:Be==null||((It=Be.data)===null||It===void 0)?void 0:It.work_description}))),n.a.createElement("h1",{className:pe.a.title},"\u5237\u9898\u8BE6\u60C5")),n.a.createElement(Ue,{autoHeight:ye}))),Object(U.c)()&&n.a.createElement("aside",{className:"".concat(pe.a.footerBar," ").concat(Xe?pe.a.footerBarStatic:"")},n.a.createElement("aside",{className:"edu-container"},n.a.createElement(g.a,{align:"middle"},n.a.createElement(s.a,{flex:"1"},n.a.createElement(h.a,{className:pe.a.exitComment,to:"/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),n.a.createElement(s.a,{flex:"1",className:"tr"},Object(U.c)()&&n.a.createElement(R.a,{type:"primary",onClick:Object(r.a)(y.a.mark(function Mt(){return y.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:kt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Be.user_id,data:Object(_.a)({},Be)}}});case 1:case"end":return Lt.stop()}},Mt)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),n.a.createElement(nt,null),n.a.createElement(tt.a,null),n.a.createElement(a.a,{visible:Ir,width:860,centered:!0,onCancel:function(){vr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},n.a.createElement("div",{style:{color:"#333333",fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null," ","\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002"," "),n.a.createElement("br",null),n.a.createElement("span",null," ","\u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),n.a.createElement(a.a,{visible:Rr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Br(!1)},width:600},n.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},n.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},ie=_e.default=Object(E.a)(function(ue){var ce=ue.shixunHomeworks,He=ue.loading,Ve=ue.globalSetting;return{shixunHomeworks:ce,globalSetting:Ve,loading:He.effects}})(Y)},FWmy:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});function oe(G,D){if(!G)throw new Error(D?`Assertion failed (${D})`:"Assertion Failed")}},GeSD:function(ct,_e,K){ct.exports={flex_box_center:"flex_box_center___3psDK",flex_space_between:"flex_space_between___3-Gwv",flex_box_vertical_center:"flex_box_vertical_center___KuXCa",flex_box_center_end:"flex_box_center_end___3yf7b",flex_box_column:"flex_box_column___CeV--",title:"title___1pfhN",export:"export___1Foif",title1_right:"title1_right___1b0PH",userPic:"userPic___2fhW8",userInfo:"userInfo___3ELpM",listItem:"listItem___2hXBP",rightInfo:"rightInfo___35dRu",shixunTitle:"shixunTitle___1yeYv",shixunWrp:"shixunWrp___5RaDa",footerBar:"footerBar___1_Vn_",footerBarStatic:"footerBarStatic___KgV2n",exitComment:"exitComment___2Z6mb",nextComment:"nextComment___2qKB7",modal:"modal___2apBa"}},H7XF:function(ct,_e,K){"use strict";_e.byteLength=P,_e.toByteArray=R,_e.fromByteArray=u;for(var oe=[],G=[],D=typeof Uint8Array!="undefined"?Uint8Array:Array,W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0,O=W.length;N0)throw new Error("Invalid string. Length must be a multiple of 4");var A=s.indexOf("=");A===-1&&(A=i);var o=A===i?0:4-A%4;return[A,o]}function P(s){var i=z(s),A=i[0],o=i[1];return(A+o)*3/4-o}function e(s,i,A){return(i+A)*3/4-A}function R(s){var i,A=z(s),o=A[0],a=A[1],r=new D(e(s,o,a)),t=0,_=a>0?o-4:o,v;for(v=0;v<_;v+=4)i=G[s.charCodeAt(v)]<<18|G[s.charCodeAt(v+1)]<<12|G[s.charCodeAt(v+2)]<<6|G[s.charCodeAt(v+3)],r[t++]=i>>16&255,r[t++]=i>>8&255,r[t++]=i&255;return a===2&&(i=G[s.charCodeAt(v)]<<2|G[s.charCodeAt(v+1)]>>4,r[t++]=i&255),a===1&&(i=G[s.charCodeAt(v)]<<10|G[s.charCodeAt(v+1)]<<4|G[s.charCodeAt(v+2)]>>2,r[t++]=i>>8&255,r[t++]=i&255),r}function p(s){return oe[s>>18&63]+oe[s>>12&63]+oe[s>>6&63]+oe[s&63]}function g(s,i,A){for(var o,a=[],r=i;r_?_:t+r));return o===1?(i=s[A-1],a.push(oe[i>>2]+oe[i<<4&63]+"==")):o===2&&(i=(s[A-2]<<8)+s[A-1],a.push(oe[i>>10]+oe[i>>4&63]+oe[i<<2&63]+"=")),a.join("")}},HDXh:function(ct,_e,K){"use strict";(function(oe){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/var G=K("H7XF"),D=K("kVK+"),W=K("49sm");_e.Buffer=P,_e.SlowBuffer=a,_e.INSPECT_MAX_BYTES=50,P.TYPED_ARRAY_SUPPORT=oe.TYPED_ARRAY_SUPPORT!==void 0?oe.TYPED_ARRAY_SUPPORT:N(),_e.kMaxLength=O();function N(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(X){return!1}}function O(){return P.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function z(re,X){if(O()=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return re|0}function a(re){return+re!=re&&(re=0),P.alloc(+re)}P.isBuffer=function(X){return!!(X!=null&&X._isBuffer)},P.compare=function(X,J){if(!P.isBuffer(X)||!P.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(X===J)return 0;for(var Y=X.length,ie=J.length,ue=0,ce=Math.min(Y,ie);ue>>1;case"base64":return nt(re).length;default:if(Y)return ve(re).length;X=(""+X).toLowerCase(),Y=!0}}P.byteLength=r;function t(re,X,J){var Y=!1;if((X===void 0||X<0)&&(X=0),X>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,X>>>=0,J<=X)return"";for(re||(re="utf8");;)switch(re){case"hex":return M(this,X,J);case"utf8":case"utf-8":return E(this,X,J);case"ascii":return F(this,X,J);case"latin1":case"binary":return B(this,X,J);case"base64":return w(this,X,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,X,J);default:if(Y)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),Y=!0}}P.prototype._isBuffer=!0;function _(re,X,J){var Y=re[X];re[X]=re[J],re[J]=Y}P.prototype.swap16=function(){var X=this.length;if(X%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J0&&(X=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(X+=" ... ")),""},P.prototype.compare=function(X,J,Y,ie,ue){if(!P.isBuffer(X))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),Y===void 0&&(Y=X?X.length:0),ie===void 0&&(ie=0),ue===void 0&&(ue=this.length),J<0||Y>X.length||ie<0||ue>this.length)throw new RangeError("out of range index");if(ie>=ue&&J>=Y)return 0;if(ie>=ue)return-1;if(J>=Y)return 1;if(J>>>=0,Y>>>=0,ie>>>=0,ue>>>=0,this===X)return 0;for(var ce=ue-ie,He=Y-J,Ve=Math.min(ce,He),We=this.slice(ie,ue),Ge=X.slice(J,Y),rt=0;rt2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=ie?0:re.length-1),J<0&&(J=re.length+J),J>=re.length){if(ie)return-1;J=re.length-1}else if(J<0)if(ie)J=0;else return-1;if(typeof X=="string"&&(X=P.from(X,Y)),P.isBuffer(X))return X.length===0?-1:b(re,X,J,Y,ie);if(typeof X=="number")return X=X&255,P.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ie?Uint8Array.prototype.indexOf.call(re,X,J):Uint8Array.prototype.lastIndexOf.call(re,X,J):b(re,[X],J,Y,ie);throw new TypeError("val must be string, number or Buffer")}function b(re,X,J,Y,ie){var ue=1,ce=re.length,He=X.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(re.length<2||X.length<2)return-1;ue=2,ce/=2,He/=2,J/=2}function Ve(Te,De){return ue===1?Te[De]:Te.readUInt16BE(De*ue)}var We;if(ie){var Ge=-1;for(We=J;Wece&&(J=ce-He),We=J;We>=0;We--){for(var rt=!0,At=0;Atie&&(Y=ie)):Y=ie;var ue=X.length;if(ue%2!==0)throw new TypeError("Invalid hex string");Y>ue/2&&(Y=ue/2);for(var ce=0;ceue)&&(Y=ue),X.length>0&&(Y<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");for(var ce=!1;;)switch(ie){case"hex":return x(this,X,J,Y);case"utf8":case"utf-8":return y(this,X,J,Y);case"ascii":return c(this,X,J,Y);case"latin1":case"binary":return n(this,X,J,Y);case"base64":return l(this,X,J,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,X,J,Y);default:if(ce)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),ce=!0}},P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(re,X,J){return X===0&&J===re.length?G.fromByteArray(re):G.fromByteArray(re.slice(X,J))}function E(re,X,J){J=Math.min(re.length,J);for(var Y=[],ie=X;ie239?4:ue>223?3:ue>191?2:1;if(ie+He<=J){var Ve,We,Ge,rt;switch(He){case 1:ue<128&&(ce=ue);break;case 2:Ve=re[ie+1],(Ve&192)===128&&(rt=(ue&31)<<6|Ve&63,rt>127&&(ce=rt));break;case 3:Ve=re[ie+1],We=re[ie+2],(Ve&192)===128&&(We&192)===128&&(rt=(ue&15)<<12|(Ve&63)<<6|We&63,rt>2047&&(rt<55296||rt>57343)&&(ce=rt));break;case 4:Ve=re[ie+1],We=re[ie+2],Ge=re[ie+3],(Ve&192)===128&&(We&192)===128&&(Ge&192)===128&&(rt=(ue&15)<<18|(Ve&63)<<12|(We&63)<<6|Ge&63,rt>65535&&rt<1114112&&(ce=rt))}}ce===null?(ce=65533,He=1):ce>65535&&(ce-=65536,Y.push(ce>>>10&1023|55296),ce=56320|ce&1023),Y.push(ce),ie+=He}return L(Y)}var h=4096;function L(re){var X=re.length;if(X<=h)return String.fromCharCode.apply(String,re);for(var J="",Y=0;YY)&&(J=Y);for(var ie="",ue=X;ueY&&(X=Y),J<0?(J+=Y,J<0&&(J=0)):J>Y&&(J=Y),JJ)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUIntLE=function(X,J,Y){X=X|0,J=J|0,Y||U(X,J,this.length);for(var ie=this[X],ue=1,ce=0;++ce0&&(ue*=256);)ie+=this[X+--J]*ue;return ie},P.prototype.readUInt8=function(X,J){return J||U(X,1,this.length),this[X]},P.prototype.readUInt16LE=function(X,J){return J||U(X,2,this.length),this[X]|this[X+1]<<8},P.prototype.readUInt16BE=function(X,J){return J||U(X,2,this.length),this[X]<<8|this[X+1]},P.prototype.readUInt32LE=function(X,J){return J||U(X,4,this.length),(this[X]|this[X+1]<<8|this[X+2]<<16)+this[X+3]*16777216},P.prototype.readUInt32BE=function(X,J){return J||U(X,4,this.length),this[X]*16777216+(this[X+1]<<16|this[X+2]<<8|this[X+3])},P.prototype.readIntLE=function(X,J,Y){X=X|0,J=J|0,Y||U(X,J,this.length);for(var ie=this[X],ue=1,ce=0;++ce=ue&&(ie-=Math.pow(2,8*J)),ie},P.prototype.readIntBE=function(X,J,Y){X=X|0,J=J|0,Y||U(X,J,this.length);for(var ie=J,ue=1,ce=this[X+--ie];ie>0&&(ue*=256);)ce+=this[X+--ie]*ue;return ue*=128,ce>=ue&&(ce-=Math.pow(2,8*J)),ce},P.prototype.readInt8=function(X,J){return J||U(X,1,this.length),this[X]&128?(255-this[X]+1)*-1:this[X]},P.prototype.readInt16LE=function(X,J){J||U(X,2,this.length);var Y=this[X]|this[X+1]<<8;return Y&32768?Y|4294901760:Y},P.prototype.readInt16BE=function(X,J){J||U(X,2,this.length);var Y=this[X+1]|this[X]<<8;return Y&32768?Y|4294901760:Y},P.prototype.readInt32LE=function(X,J){return J||U(X,4,this.length),this[X]|this[X+1]<<8|this[X+2]<<16|this[X+3]<<24},P.prototype.readInt32BE=function(X,J){return J||U(X,4,this.length),this[X]<<24|this[X+1]<<16|this[X+2]<<8|this[X+3]},P.prototype.readFloatLE=function(X,J){return J||U(X,4,this.length),D.read(this,X,!0,23,4)},P.prototype.readFloatBE=function(X,J){return J||U(X,4,this.length),D.read(this,X,!1,23,4)},P.prototype.readDoubleLE=function(X,J){return J||U(X,8,this.length),D.read(this,X,!0,52,8)},P.prototype.readDoubleBE=function(X,J){return J||U(X,8,this.length),D.read(this,X,!1,52,8)};function $(re,X,J,Y,ie,ue){if(!P.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(X>ie||Xre.length)throw new RangeError("Index out of range")}P.prototype.writeUIntLE=function(X,J,Y,ie){if(X=+X,J=J|0,Y=Y|0,!ie){var ue=Math.pow(2,8*Y)-1;$(this,X,J,Y,ue,0)}var ce=1,He=0;for(this[J]=X&255;++He=0&&(He*=256);)this[J+ce]=X/He&255;return J+Y},P.prototype.writeUInt8=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,1,255,0),P.TYPED_ARRAY_SUPPORT||(X=Math.floor(X)),this[J]=X&255,J+1};function ee(re,X,J,Y){X<0&&(X=65535+X+1);for(var ie=0,ue=Math.min(re.length-J,2);ie>>(Y?ie:1-ie)*8}P.prototype.writeUInt16LE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[J]=X&255,this[J+1]=X>>>8):ee(this,X,J,!0),J+2},P.prototype.writeUInt16BE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[J]=X>>>8,this[J+1]=X&255):ee(this,X,J,!1),J+2};function pe(re,X,J,Y){X<0&&(X=4294967295+X+1);for(var ie=0,ue=Math.min(re.length-J,4);ie>>(Y?ie:3-ie)*8&255}P.prototype.writeUInt32LE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[J+3]=X>>>24,this[J+2]=X>>>16,this[J+1]=X>>>8,this[J]=X&255):pe(this,X,J,!0),J+4},P.prototype.writeUInt32BE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[J]=X>>>24,this[J+1]=X>>>16,this[J+2]=X>>>8,this[J+3]=X&255):pe(this,X,J,!1),J+4},P.prototype.writeIntLE=function(X,J,Y,ie){if(X=+X,J=J|0,!ie){var ue=Math.pow(2,8*Y-1);$(this,X,J,Y,ue-1,-ue)}var ce=0,He=1,Ve=0;for(this[J]=X&255;++ce>0)-Ve&255;return J+Y},P.prototype.writeIntBE=function(X,J,Y,ie){if(X=+X,J=J|0,!ie){var ue=Math.pow(2,8*Y-1);$(this,X,J,Y,ue-1,-ue)}var ce=Y-1,He=1,Ve=0;for(this[J+ce]=X&255;--ce>=0&&(He*=256);)X<0&&Ve===0&&this[J+ce+1]!==0&&(Ve=1),this[J+ce]=(X/He>>0)-Ve&255;return J+Y},P.prototype.writeInt8=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,1,127,-128),P.TYPED_ARRAY_SUPPORT||(X=Math.floor(X)),X<0&&(X=255+X+1),this[J]=X&255,J+1},P.prototype.writeInt16LE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[J]=X&255,this[J+1]=X>>>8):ee(this,X,J,!0),J+2},P.prototype.writeInt16BE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[J]=X>>>8,this[J+1]=X&255):ee(this,X,J,!1),J+2},P.prototype.writeInt32LE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,4,2147483647,-2147483648),P.TYPED_ARRAY_SUPPORT?(this[J]=X&255,this[J+1]=X>>>8,this[J+2]=X>>>16,this[J+3]=X>>>24):pe(this,X,J,!0),J+4},P.prototype.writeInt32BE=function(X,J,Y){return X=+X,J=J|0,Y||$(this,X,J,4,2147483647,-2147483648),X<0&&(X=4294967295+X+1),P.TYPED_ARRAY_SUPPORT?(this[J]=X>>>24,this[J+1]=X>>>16,this[J+2]=X>>>8,this[J+3]=X&255):pe(this,X,J,!1),J+4};function fe(re,X,J,Y,ie,ue){if(J+Y>re.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function Le(re,X,J,Y,ie){return ie||fe(re,X,J,4,34028234663852886e22,-34028234663852886e22),D.write(re,X,J,Y,23,4),J+4}P.prototype.writeFloatLE=function(X,J,Y){return Le(this,X,J,!0,Y)},P.prototype.writeFloatBE=function(X,J,Y){return Le(this,X,J,!1,Y)};function xe(re,X,J,Y,ie){return ie||fe(re,X,J,8,17976931348623157e292,-17976931348623157e292),D.write(re,X,J,Y,52,8),J+8}P.prototype.writeDoubleLE=function(X,J,Y){return xe(this,X,J,!0,Y)},P.prototype.writeDoubleBE=function(X,J,Y){return xe(this,X,J,!1,Y)},P.prototype.copy=function(X,J,Y,ie){if(Y||(Y=0),!ie&&ie!==0&&(ie=this.length),J>=X.length&&(J=X.length),J||(J=0),ie>0&&ie=this.length)throw new RangeError("sourceStart out of bounds");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),X.length-J=0;--ce)X[ce+J]=this[ce+Y];else if(ue<1e3||!P.TYPED_ARRAY_SUPPORT)for(ce=0;ce>>0,Y=Y===void 0?this.length:Y>>>0,X||(X=0);var ce;if(typeof X=="number")for(ce=J;ce55295&&J<57344){if(!ie){if(J>56319){(X-=3)>-1&&ue.push(239,191,189);continue}else if(ce+1===Y){(X-=3)>-1&&ue.push(239,191,189);continue}ie=J;continue}if(J<56320){(X-=3)>-1&&ue.push(239,191,189),ie=J;continue}J=(ie-55296<<10|J-56320)+65536}else ie&&((X-=3)>-1&&ue.push(239,191,189));if(ie=null,J<128){if((X-=1)<0)break;ue.push(J)}else if(J<2048){if((X-=2)<0)break;ue.push(J>>6|192,J&63|128)}else if(J<65536){if((X-=3)<0)break;ue.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((X-=4)<0)break;ue.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return ue}function Je(re){for(var X=[],J=0;J>8,ie=J%256,ue.push(ie),ue.push(Y);return ue}function nt(re){return G.toByteArray(Ue(re))}function tt(re,X,J,Y){for(var ie=0;ie=X.length||ie>=re.length);++ie)X[ie+J]=re[ie];return ie}function Ke(re){return re!==re}}).call(this,K("IyRk"))},IBYe:function(ct,_e,K){"use strict";function oe(G){return null}_e.a=oe},J66h:function(ct,_e,K){(function(oe){var G,D;(function(W,N){ct.exports=N(W)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof oe!="undefined"?oe:this,function(W){"use strict";W=W||{};var N=W.Base64,O="2.6.4",z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=function(h){for(var L={},F=0,B=h.length;F>>6)+e(128|L&63):e(224|L>>>12&15)+e(128|L>>>6&63)+e(128|L&63)}else{var L=65536+(h.charCodeAt(0)-55296)*1024+(h.charCodeAt(1)-56320);return e(240|L>>>18&7)+e(128|L>>>12&63)+e(128|L>>>6&63)+e(128|L&63)}},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(h){return h.replace(p,R)},u=function(h){var L=[0,2,1][h.length%3],F=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),B=[z.charAt(F>>>18),z.charAt(F>>>12&63),L>=2?"=":z.charAt(F>>>6&63),L>=1?"=":z.charAt(F&63)];return B.join("")},s=W.btoa&&typeof W.btoa=="function"?function(h){return W.btoa(h)}:function(h){if(h.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return h.replace(/[\s\S]{1,3}/g,u)},i=function(h){return s(g(String(h)))},A=function(h){return h.replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,"")},o=function(h,L){return L?A(i(h)):i(h)},a=function(h){return o(h,!0)},r;W.Uint8Array&&(r=function(h,L){for(var F="",B=0,M=h.length;B>>18)+z.charAt(ee>>>12&63)+(typeof U!="undefined"?z.charAt(ee>>>6&63):"=")+(typeof $!="undefined"?z.charAt(ee&63):"=")}return L?A(F):F});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_=function(h){switch(h.length){case 4:var L=(7&h.charCodeAt(0))<<18|(63&h.charCodeAt(1))<<12|(63&h.charCodeAt(2))<<6|63&h.charCodeAt(3),F=L-65536;return e((F>>>10)+55296)+e((F&1023)+56320);case 3:return e((15&h.charCodeAt(0))<<12|(63&h.charCodeAt(1))<<6|63&h.charCodeAt(2));default:return e((31&h.charCodeAt(0))<<6|63&h.charCodeAt(1))}},v=function(h){return h.replace(t,_)},b=function(h){var L=h.length,F=L%4,B=(L>0?P[h.charAt(0)]<<18:0)|(L>1?P[h.charAt(1)]<<12:0)|(L>2?P[h.charAt(2)]<<6:0)|(L>3?P[h.charAt(3)]:0),M=[e(B>>>16),e(B>>>8&255),e(B&255)];return M.length-=[0,0,2,1][F],M.join("")},x=W.atob&&typeof W.atob=="function"?function(h){return W.atob(h)}:function(h){return h.replace(/\S{1,4}/g,b)},y=function(h){return x(String(h).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(h){return v(x(h))},n=function(h){return String(h).replace(/[-_]/g,function(L){return L=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},l=function(h){return c(n(h))},d;W.Uint8Array&&(d=function(h){return Uint8Array.from(y(n(h)),function(L){return L.charCodeAt(0)})});var w=function(){var h=W.Base64;return W.Base64=N,h};if(W.Base64={VERSION:O,atob:y,btoa:s,fromBase64:l,toBase64:o,utob:g,encode:o,encodeURI:a,btou:v,decode:l,noConflict:w,fromUint8Array:r,toUint8Array:d},typeof Object.defineProperty=="function"){var E=function(h){return{value:h,enumerable:!1,writable:!0,configurable:!0}};W.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return l(this)})),Object.defineProperty(String.prototype,"toBase64",E(function(h){return o(this,h)})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return o(this,!0)}))}}return W.Meteor&&(Base64=W.Base64),ct.exports?ct.exports.Base64=W.Base64:!(G=[],D=function(){return W.Base64}.apply(_e,G),D!==void 0&&(ct.exports=D)),{Base64:W.Base64}})}).call(this,K("IyRk"))},JYp7:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});var oe;(function(G){function D(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}G.is=D;const W=Object.freeze([]);function N(){return W}G.empty=N;function*O(t){yield t}G.single=O;function z(t){return t||W}G.from=z;function P(t){return!t||t[Symbol.iterator]().next().done===!0}G.isEmpty=P;function e(t){return t[Symbol.iterator]().next().value}G.first=e;function R(t,_){for(const v of t)if(_(v))return!0;return!1}G.some=R;function p(t,_){for(const v of t)if(_(v))return v;return}G.find=p;function*g(t,_){for(const v of t)_(v)&&(yield v)}G.filter=g;function*u(t,_){let v=0;for(const b of t)yield _(b,v++)}G.map=u;function*s(...t){for(const _ of t)for(const v of _)yield v}G.concat=s;function*i(t){for(const _ of t)for(const v of _)yield v}G.concatNested=i;function A(t,_,v){let b=v;for(const x of t)b=_(b,x);return b}G.reduce=A;function*o(t,_,v=t.length){for(_<0&&(_+=t.length),v<0?v+=t.length:v>t.length&&(v=t.length);_b===x){const b=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const y=b.next(),c=x.next();if(y.done!==c.done)return!1;if(y.done)return!0;if(!v(y.value,c.value))return!1}}G.equals=r})(oe||(oe={}))},LdHM:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return t}),K.d(_e,"a",function(){return v});var oe=K("1OyB"),G=K("vuIU"),D=K("Ji7U"),W=K("LK+K"),N=K("q1tI"),O=K("rePB"),z=K("Ff2n"),P=K("ODXe"),e=K("4IlW"),R=K("bX4T"),p=K("YrtM"),g=K("TSYQ"),u=K.n(g),s=K("+nKL"),i=K("8OUc"),A=function($,ee){var pe=$.prefixCls,fe=$.id,Le=$.flattenOptions,xe=$.childrenAsData,Se=$.values,Ue=$.searchValue,Fe=$.multiple,Ce=$.defaultActiveFirstOption,ve=$.height,Je=$.itemHeight,at=$.notFoundContent,nt=$.open,tt=$.menuItemSelectedIcon,Ke=$.virtual,re=$.onSelect,X=$.onToggleOpen,J=$.onActiveValue,Y=$.onScroll,ie=$.onMouseEnter,ue="".concat(pe,"-item"),ce=Object(p.a)(function(){return Le},[nt,Le],function(Pe,we){return we[0]&&Pe[1]!==we[1]}),He=N.useRef(null),Ve=function(we){we.preventDefault()},We=function(we){He.current&&He.current.scrollTo({index:we})},Ge=function(we){for(var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ge=ce.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(U).map(function(ee,pe){if(!N.isValidElement(ee)||!ee.type)return null;var fe=ee.type.isSelectOptGroup,Le=ee.key,xe=ee.props,Se=xe.children,Ue=Object(z.a)(xe,["children"]);return $||!fe?y(ee):Object(b.a)(Object(b.a)({key:"__RC_SELECT_GRP__".concat(Le===null?pe:Le,"__"),label:Le},Ue),{},{options:c(Se)})}).filter(function(ee){return ee})}var n=K("2Qr1"),l=K("qNPg"),d=K("U8pU"),w=K("Kwbf"),E=K("WKfj");function h(U){var $=U.mode,ee=U.options,pe=U.children,fe=U.backfill,Le=U.allowClear,xe=U.placeholder,Se=U.getInputElement,Ue=U.showSearch,Fe=U.onSearch,Ce=U.defaultOpen,ve=U.autoFocus,Je=U.labelInValue,at=U.value,nt=U.inputValue,tt=U.optionLabelProp,Ke=$==="multiple"||$==="tags",re=Ue!==void 0?Ue:Ke||$==="combobox",X=ee||c(pe);if(Object(w.a)($!=="tags"||X.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var J=X.some(function(ue){return ue.options?ue.options.some(function(ce){return typeof("value"in ce?ce.value:ce.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(w.a)(!J,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(w.a)($!=="combobox"||!tt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(w.a)($==="combobox"||!fe,"`backfill` only works with `combobox` mode."),Object(w.a)($==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(w.b)($!=="combobox"||!Se||!Le||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fe&&!re&&$!=="combobox"&&$!=="tags"&&Object(w.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(w.b)(!Ce||ve,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),at!=null){var Y=Object(E.d)(at);Object(w.a)(!Je||Y.every(function(ue){return Object(d.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(w.a)(!Ke||Array.isArray(at),"`value` should be array when `mode` is `multiple` or `tags`")}if(pe){var ie=null;Object(x.a)(pe).some(function(ue){if(!N.isValidElement(ue)||!ue.type)return!1;var ce=ue.type;if(ce.isSelectOption)return!1;if(ce.isSelectOptGroup){var He=Object(x.a)(ue.props.children).every(function(Ve){return!N.isValidElement(Ve)||!ue.type||Ve.type.isSelectOption?!0:(ie=Ve.type,!1)});return!He}return ie=ce,!0}),ie&&Object(w.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ie.displayName||ie.name||ie,"`.")),Object(w.a)(nt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var L=h,F=Object(l.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:c,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:L,fillOptionsWithMissingValue:n.a}),B=function(U){Object(D.a)(ee,U);var $=Object(W.a)(ee);function ee(){var pe;return Object(oe.a)(this,ee),pe=$.apply(this,arguments),pe.selectRef=N.createRef(),pe.focus=function(){pe.selectRef.current.focus()},pe.blur=function(){pe.selectRef.current.blur()},pe}return Object(G.a)(ee,[{key:"render",value:function(){return N.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),ee}(N.Component);B.Option=t,B.OptGroup=v;var M=B,j=_e.c=M},MI8n:function(ct,_e,K){"use strict";K.d(_e,"c",function(){return N}),K.d(_e,"b",function(){return e}),K.d(_e,"e",function(){return R}),K.d(_e,"a",function(){return p}),K.d(_e,"d",function(){return g}),K.d(_e,"f",function(){return u});var oe=K("/cxE"),G=K("pmY6"),D=K("24hK"),W=K("5Y4S"),N;(function(s){s.None=()=>G.a.None;function i(h){return(L,F=null,B)=>{let M=!1,j;return j=h(U=>M?void 0:(j?j.dispose():M=!0,L.call(F,U)),null,B),M&&j.dispose(),j}}s.once=i;function A(h,L){return v((F,B=null,M)=>h(j=>F.call(B,L(j)),null,M))}s.map=A;function o(h,L){return v((F,B=null,M)=>h(j=>{L(j),F.call(B,j)},null,M))}s.forEach=o;function a(h,L){return v((F,B=null,M)=>h(j=>L(j)&&F.call(B,j),null,M))}s.filter=a;function r(h){return h}s.signal=r;function t(...h){return(L,F=null,B)=>Object(G.e)(...h.map(M=>M(j=>L.call(F,j),null,B)))}s.any=t;function _(h,L,F){let B=F;return A(h,M=>(B=L(B,M),B))}s.reduce=_;function v(h){let L;const F=new e({onFirstListenerAdd(){L=h(F.fire,F)},onLastListenerRemove(){L.dispose()}});return F.event}function b(h,L,F=100,B=!1,M){let j,U,$,ee=0;const pe=new e({leakWarningThreshold:M,onFirstListenerAdd(){j=h(fe=>{ee++,U=L(U,fe),B&&!$&&(pe.fire(U),U=void 0),clearTimeout($),$=setTimeout(()=>{const Le=U;U=void 0,$=void 0,(!B||ee>1)&&pe.fire(Le),ee=0},F)})},onLastListenerRemove(){j.dispose()}});return pe.event}s.debounce=b;function x(h,L=(F,B)=>F===B){let F=!0,B;return a(h,M=>{const j=F||!L(M,B);return F=!1,B=M,j})}s.latch=x;function y(h,L){return[s.filter(h,L),s.filter(h,F=>!L(F))]}s.split=y;function c(h,L=!1,F=[]){let B=F.slice(),M=h($=>{B?B.push($):U.fire($)});const j=()=>{B&&B.forEach($=>U.fire($)),B=null},U=new e({onFirstListenerAdd(){M||(M=h($=>U.fire($)))},onFirstListenerDidAdd(){B&&(L?setTimeout(j):j())},onLastListenerRemove(){M&&M.dispose(),M=null}});return U.event}s.buffer=c;class n{constructor(h){this.event=h}map(h){return new n(A(this.event,h))}forEach(h){return new n(o(this.event,h))}filter(h){return new n(a(this.event,h))}reduce(h,L){return new n(_(this.event,h,L))}latch(){return new n(x(this.event))}debounce(h,L=100,F=!1,B){return new n(b(this.event,h,L,F,B))}on(h,L,F){return this.event(h,L,F)}once(h,L,F){return i(this.event)(h,L,F)}}function l(h){return new n(h)}s.chain=l;function d(h,L,F=B=>B){const B=(...$)=>U.fire(F(...$)),M=()=>h.on(L,B),j=()=>h.removeListener(L,B),U=new e({onFirstListenerAdd:M,onLastListenerRemove:j});return U.event}s.fromNodeEventEmitter=d;function w(h,L,F=B=>B){const B=(...$)=>U.fire(F(...$)),M=()=>h.addEventListener(L,B),j=()=>h.removeEventListener(L,B),U=new e({onFirstListenerAdd:M,onLastListenerRemove:j});return U.event}s.fromDOMEventEmitter=w;function E(h){return new Promise(L=>i(h)(L))}s.toPromise=E})(N||(N={}));class O{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${O._idPool++}`}start(s){this._stopWatch=new W.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}O._idPool=0;let z=-1;class P{constructor(s,i=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let i=z;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s{const a=this._stacks.get(A)||0;this._stacks.set(A,a-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=z>0?new P(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new O(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,A)=>{var o;this._listeners||(this._listeners=new D.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[s,i]:s);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),_=Object(G.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const v=this._listeners&&!this._listeners.isEmpty();v||this._options.onLastListenerRemove(this)}});return A instanceof G.b?A.add(_):Array.isArray(A)&&A.push(_),_}),this._event}fire(s){var i,A;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new D.a);for(let o of this._listeners)this._deliveryQueue.push([o,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,a]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,a):o[0].call(o[1],a)}catch(r){Object(oe.f)(r)}}(A=this._perfMon)===null||A===void 0||A.stop()}}dispose(){var s,i,A,o,a;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(o=(A=this._options)===null||A===void 0?void 0:A.onLastListenerRemove)===null||o===void 0||o.call(A),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class R extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new D.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class p extends R{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class g{constructor(){this.buffers=[]}wrapEvent(s){return(i,A,o)=>s(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(A,a)):i.call(A,a)},void 0,o)}bufferEvents(s){const i=[];this.buffers.push(i);const A=s();return this.buffers.pop(),i.forEach(o=>o()),A}}class u{constructor(){this.listening=!1,this.inputEvent=N.None,this.inputEventListener=G.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(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(ct,_e,K){"use strict";(function(oe,G){K.d(_e,"b",function(){return A}),K.d(_e,"i",function(){return t}),K.d(_e,"f",function(){return _}),K.d(_e,"d",function(){return v}),K.d(_e,"g",function(){return b}),K.d(_e,"h",function(){return x}),K.d(_e,"c",function(){return y}),K.d(_e,"k",function(){return c}),K.d(_e,"j",function(){return n}),K.d(_e,"a",function(){return l}),K.d(_e,"e",function(){return E});var D;const W="en";let N=!1,O=!1,z=!1,P=!1,e=!1,R=!1,p=!1,g,u=W,s,i;const A=typeof self=="object"?self:typeof oe=="object"?oe:{};let o;typeof A.vscode!="undefined"&&typeof A.vscode.process!="undefined"?o=A.vscode.process:typeof G!="undefined"&&(o=G);const a=typeof((D=o==null?void 0:o.versions)===null||D===void 0?void 0:D.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!a)i=navigator.userAgent,N=i.indexOf("Windows")>=0,O=i.indexOf("Macintosh")>=0,p=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,z=i.indexOf("Linux")>=0,R=!0,g=navigator.language,u=g;else if(typeof o=="object"){N=o.platform==="win32",O=o.platform==="darwin",z=o.platform==="linux",P=z&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,g=W,u=W;const h=o.env.VSCODE_NLS_CONFIG;if(h)try{const L=JSON.parse(h),F=L.availableLanguages["*"];g=L.locale,u=F||W,s=L._translationsConfigFile}catch(L){}e=!0}else console.error("Unable to resolve platform.");let r=0;O?r=1:N?r=3:z&&(r=2);const t=N,_=O,v=z,b=e,x=R,y=p,c=i,n=function(){if(A.setImmediate)return A.setImmediate.bind(A);if(typeof A.postMessage=="function"&&!A.importScripts){let F=[];A.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let j=0,U=F.length;j{const j=++B;F.push({id:j,callback:M}),A.postMessage({vscodeSetImmediateId:j},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const L=Promise.resolve();return F=>L.then(F)}(),l=O||p?2:N?1:3;let d=!0,w=!1;function E(){if(!w){w=!0;const h=new Uint8Array(2);h[0]=1,h[1]=2;const L=new Uint16Array(h.buffer);d=L[0]===(2<<8)+1}return d}}).call(this,K("IyRk"),K("Q2Ig"))},N0LK:function(ct,_e,K){"use strict";K.d(_e,"C",function(){return oe}),K.d(_e,"v",function(){return D}),K.d(_e,"s",function(){return W}),K.d(_e,"t",function(){return N}),K.d(_e,"U",function(){return O}),K.d(_e,"J",function(){return z}),K.d(_e,"O",function(){return P}),K.d(_e,"p",function(){return e}),K.d(_e,"T",function(){return R}),K.d(_e,"q",function(){return p}),K.d(_e,"N",function(){return g}),K.d(_e,"M",function(){return u}),K.d(_e,"Q",function(){return s}),K.d(_e,"u",function(){return i}),K.d(_e,"x",function(){return A}),K.d(_e,"I",function(){return o}),K.d(_e,"f",function(){return a}),K.d(_e,"h",function(){return r}),K.d(_e,"g",function(){return t}),K.d(_e,"i",function(){return _}),K.d(_e,"G",function(){return v}),K.d(_e,"H",function(){return b}),K.d(_e,"r",function(){return x}),K.d(_e,"R",function(){return y}),K.d(_e,"d",function(){return c}),K.d(_e,"e",function(){return n}),K.d(_e,"E",function(){return l}),K.d(_e,"F",function(){return d}),K.d(_e,"j",function(){return w}),K.d(_e,"z",function(){return E}),K.d(_e,"K",function(){return L}),K.d(_e,"L",function(){return F}),K.d(_e,"m",function(){return M}),K.d(_e,"k",function(){return U}),K.d(_e,"A",function(){return ee}),K.d(_e,"a",function(){return pe}),K.d(_e,"n",function(){return fe}),K.d(_e,"l",function(){return Le}),K.d(_e,"D",function(){return xe}),K.d(_e,"B",function(){return Se}),K.d(_e,"b",function(){return Ue}),K.d(_e,"S",function(){return Fe}),K.d(_e,"o",function(){return Ce}),K.d(_e,"P",function(){return ve}),K.d(_e,"w",function(){return Je}),K.d(_e,"c",function(){return at}),K.d(_e,"y",function(){return Ke});function oe(Y){return!Y||typeof Y!="string"?!0:Y.trim().length===0}const G=/{(\d+)}/g;function D(Y,...ie){return ie.length===0?Y:Y.replace(G,function(ue,ce){const He=parseInt(ce,10);return isNaN(He)||He<0||He>=ie.length?ue:ie[He]})}function W(Y){return Y.replace(/[<>&]/g,function(ie){switch(ie){case"<":return"<";case">":return">";case"&":return"&";default:return ie}})}function N(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O(Y,ie=" "){const ue=z(Y,ie);return P(ue,ie)}function z(Y,ie){if(!Y||!ie)return Y;const ue=ie.length;if(ue===0||Y.length===0)return Y;let ce=0;for(;Y.indexOf(ie,ce)===ce;)ce=ce+ue;return Y.substring(ce)}function P(Y,ie){if(!Y||!ie)return Y;const ue=ie.length,ce=Y.length;if(ue===0||ce===0)return Y;let He=ce,Ve=-1;for(;!(Ve=Y.lastIndexOf(ie,He-1),Ve===-1||Ve+ue!==He);){if(Ve===0)return"";He=Ve}return Y.substring(0,He)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R(Y){return Y.replace(/\*/g,"")}function p(Y,ie,ue={}){if(!Y)throw new Error("Cannot create regex from empty string");ie||(Y=N(Y)),ue.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let ce="";return ue.global&&(ce+="g"),ue.matchCase||(ce+="i"),ue.multiline&&(ce+="m"),ue.unicode&&(ce+="u"),new RegExp(Y,ce)}function g(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const ie=Y.exec("");return!!(ie&&Y.lastIndex===0)}function u(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function s(Y){return Y.split(/\r\n|\r|\n/)}function i(Y){for(let ie=0,ue=Y.length;ie=0;ue--){const ce=Y.charCodeAt(ue);if(ce!==32&&ce!==9)return ue}return-1}function a(Y,ie){return Yie?1:0}function r(Y,ie,ue=0,ce=Y.length,He=0,Ve=ie.length){for(;ueAt)return 1}const We=ce-ue,Ge=Ve-He;return WeGe?1:0}function t(Y,ie){return _(Y,ie,0,Y.length,0,ie.length)}function _(Y,ie,ue=0,ce=Y.length,He=0,Ve=ie.length){for(;ue=128||At>=128)return r(Y.toLowerCase(),ie.toLowerCase(),ue,ce,He,Ve);v(rt)&&(rt-=32),v(At)&&(At-=32);const Te=rt-At;if(Te===0)continue;return Te}const We=ce-ue,Ge=Ve-He;return WeGe?1:0}function v(Y){return Y>=97&&Y<=122}function b(Y){return Y>=65&&Y<=90}function x(Y,ie){return Y.length===ie.length&&_(Y,ie)===0}function y(Y,ie){const ue=ie.length;return ie.length>Y.length?!1:_(Y,ie,0,ue)===0}function c(Y,ie){let ue,ce=Math.min(Y.length,ie.length);for(ue=0;ue1){const ce=Y.charCodeAt(ie-2);if(l(ce))return w(ce,ue)}return ue}function L(Y,ie){const ue=nt.getInstance(),ce=ie,He=Y.length,Ve=E(Y,He,ie);ie+=Ve>=65536?2:1;let We=ue.getGraphemeBreakType(Ve);for(;ie=65536?2:1,We=rt}return ie-ce}function F(Y,ie){const ue=nt.getInstance(),ce=ie,He=h(Y,ie);ie-=He>=65536?2:1;let Ve=ue.getGraphemeBreakType(He);for(;ie>0;){const We=h(Y,ie),Ge=ue.getGraphemeBreakType(We);if(at(Ge,Ve))break;ie-=We>=65536?2:1,Ve=Ge}return ce-ie}const B=/(?:[\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 M(Y){return B.test(Y)}const j=/(?:[\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 U(Y){return j.test(Y)}const $=/^[\t\n\r\x20-\x7E]*$/;function ee(Y){return $.test(Y)}const pe=/[\u2028\u2029]/;function fe(Y){return pe.test(Y)}function Le(Y){for(let ie=0,ue=Y.length;ie=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function Se(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const Ue=String.fromCharCode(65279);function Fe(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function Ce(Y,ie=!1){return Y?(ie&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function ve(Y){const ie=90-65+1;return Y=Y%(2*ie),Yie[3*ce+1])ce=2*ce+1;else return ie[3*ce+2];return 0}}nt._INSTANCE=null;function tt(){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 Ke(Y,ie){if(Y===0)return 0;const ue=re(Y,ie);if(ue!==void 0)return ue;const ce=h(ie,Y);return Y-=X(ce),Y}function re(Y,ie){let ue=h(ie,Y);for(Y-=X(ue);J(ue)||ue===65039||ue===8419;){if(Y===0)return;ue=h(ie,Y),Y-=X(ue)}if(!Se(ue))return;if(Y>=0){const ce=h(ie,Y);ce===8205&&(Y-=X(ce))}return Y}function X(Y){return Y>=65536?2:1}function J(Y){return 127995<=Y&&Y<=127999}},NvD2:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return O});var oe=K("Kwbf");function G(z,P){var e=new Set;return z.forEach(function(R){P.has(R)||e.add(R)}),e}function D(z){var P=z||{},e=P.disabled,R=P.disableCheckbox,p=P.checkable;return!!(e||R)||p===!1}function W(z,P,e,R){for(var p=new Set(z),g=new Set,u=0;u<=e;u+=1){var s=P.get(u)||new Set;s.forEach(function(a){var r=a.key,t=a.node,_=a.children,v=_===void 0?[]:_;p.has(r)&&!R(t)&&v.filter(function(b){return!R(b.node)}).forEach(function(b){p.add(b.key)})})}for(var i=new Set,A=e;A>=0;A-=1){var o=P.get(A)||new Set;o.forEach(function(a){var r=a.parent,t=a.node;if(R(t)||!a.parent||i.has(a.parent.key))return;if(R(a.parent.node)){i.add(r.key);return}var _=!0,v=!1;(r.children||[]).filter(function(b){return!R(b.node)}).forEach(function(b){var x=b.key,y=p.has(x);_&&!y&&(_=!1),!v&&(y||g.has(x))&&(v=!0)}),_&&p.add(r.key),v&&g.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(G(g,p))}}function N(z,P,e,R,p){for(var g=new Set(z),u=new Set(P),s=0;s<=R;s+=1){var i=e.get(s)||new Set;i.forEach(function(r){var t=r.key,_=r.node,v=r.children,b=v===void 0?[]:v;!g.has(t)&&!u.has(t)&&!p(_)&&b.filter(function(x){return!p(x.node)}).forEach(function(x){g.delete(x.key)})})}u=new Set;for(var A=new Set,o=R;o>=0;o-=1){var a=e.get(o)||new Set;a.forEach(function(r){var t=r.parent,_=r.node;if(p(_)||!r.parent||A.has(r.parent.key))return;if(p(r.parent.node)){A.add(t.key);return}var v=!0,b=!1;(t.children||[]).filter(function(x){return!p(x.node)}).forEach(function(x){var y=x.key,c=g.has(y);v&&!c&&(v=!1),!b&&(c||u.has(y))&&(b=!0)}),v||g.delete(t.key),b&&u.add(t.key),A.add(t.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(G(u,g))}}function O(z,P,e,R){var p=[],g;R?g=R:g=D;var u=new Set(z.filter(function(o){var a=!!e[o];return a||p.push(o),a})),s=new Map,i=0;Object.keys(e).forEach(function(o){var a=e[o],r=a.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(a),i=Math.max(i,r)}),Object(oe.a)(!p.length,"Tree missing follow keys: ".concat(p.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var A;return P===!0?A=W(u,s,i,g):A=N(u,P.halfCheckedKeys,s,i,g),A}},OZM5:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return R}),K.d(_e,"a",function(){return p}),K.d(_e,"k",function(){return g}),K.d(_e,"h",function(){return u}),K.d(_e,"i",function(){return s}),K.d(_e,"g",function(){return i}),K.d(_e,"c",function(){return A}),K.d(_e,"d",function(){return o}),K.d(_e,"j",function(){return t}),K.d(_e,"e",function(){return _}),K.d(_e,"f",function(){return v});var oe=K("KQm4"),G=K("U8pU"),D=K("Ff2n"),W=K("q1tI"),N=K.n(W),O=K("Kwbf"),z=K("WaYH"),P=.25,e=2;function R(b,x){var y=b.slice(),c=y.indexOf(x);return c>=0&&y.splice(c,1),y}function p(b,x){var y=b.slice();return y.indexOf(x)===-1&&y.push(x),y}function g(b){return b.split("-")}function u(b,x){return"".concat(b,"-").concat(x)}function s(b){return b&&b.type&&b.type.isTreeNode}function i(b,x){var y=[b],c=x[b];function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(d){var w=d.key,E=d.children;y.push(w),n(E)})}return n(c.children),y}function A(b,x){var y=b.clientY,c=x.selectHandle.getBoundingClientRect(),n=c.top,l=c.bottom,d=c.height,w=Math.max(d*P,e);return y<=n+w?-1:y>=l-w?1:0}function o(b,x){if(!b)return;var y=x.multiple;return y?b.slice():b.length?[b[0]]:b}var a=function(x){return x};function r(b,x){if(!b)return[];var y=x||{},c=y.processProps,n=c===void 0?a:c,l=Array.isArray(b)?b:[b];return l.map(function(d){var w=d.children,E=Object(D.a)(d,["children"]),h=r(w,x);return N.a.createElement(z.a,Object.assign({},n(E)),h)})}function t(b){if(!b)return null;var x;if(Array.isArray(b))x={checkedKeys:b,halfCheckedKeys:void 0};else if(Object(G.a)(b)==="object")x={checkedKeys:b.checked||void 0,halfCheckedKeys:b.halfChecked||void 0};else return Object(O.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function _(b,x){var y=new Set;function c(n){if(y.has(n))return;var l=x[n];if(!l)return;y.add(n);var d=l.parent,w=l.node;if(w.disabled)return;d&&c(d.key)}return(b||[]).forEach(function(n){c(n)}),Object(oe.a)(y)}function v(b){var x={};return Object.keys(b).forEach(function(y){(y.startsWith("data-")||y.startsWith("aria-"))&&(x[y]=b[y])}),x}},"SA+Z":function(ct,_e,K){var oe=K("wTVA"),G=K("EbDI"),D=K("ZhPi"),W=K("wkBT");function N(O){return oe(O)||G(O)||D(O)||W()}ct.exports=N,ct.exports.__esModule=!0,ct.exports.default=ct.exports},SJMd:function(ct,_e){/**
* @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 K,oe,G,D=!1,W,N;window.PR_SHOULD_USE_CONTINUATION=!0;var O,z;(function(){var P=window,e=["break,continue,do,else,for,if,return,while"],R=[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"],p=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],g=[p,"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"],u=[p,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[p,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",A=[p,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[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"],r=[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"],_=[g,s,u,A,o,a,r,t],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,b="str",x="kwd",y="com",c="typ",n="lit",l="pun",d="pln",w="tag",E="dec",h="src",L="atn",F="atv",B="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(re){for(var X=0,J=!1,Y=!1,ie=0,ue=re.length;ie122||(te<65||ge>90||je.push([Math.max(65,ge)|32,Math.min(te,90)|32]),te<97||ge>122||je.push([Math.max(97,ge)&~32,Math.min(te,122)&~32]))}}je.sort(function(Re,Me){return Re[0]-Me[0]||Me[1]-Re[1]});for(var ne=[],le=[],Pe=0;Pede[0]&&(de[1]+1>de[0]&&Ne.push("-"),Ne.push(We(de[1])))}return Ne.push("]"),Ne.join("")}function rt(Te){for(var De=Te.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")),je=De.length,$e=[],Ne=0,Pe=0;Ne=2&&ge==="["?De[Ne]=Ge(we):ge!=="\\"&&(De[Ne]=we.replace(/[a-zA-Z]/g,function(le){var de=le.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return De.join("")}for(var At=[],ie=0,ue=re.length;ie=0;)J[At.charAt(Te)]=rt;var De=rt[1],je=""+De;Ve.hasOwnProperty(je)||(He.push(De),Ve[je]=null)}He.push(/[\0-\uffff]/),Y=j(He)})();var ie=X.length,ue=function(ce){for(var He=ce.sourceCode,Ve=ce.basePos,We=ce.sourceNode,Ge=[Ve,d],rt=0,At=He.match(Y)||[],Te={},De=0,je=At.length;De=5&&Ne.substring(0,5)==="lang-",we&&!(Pe&&typeof Pe[1]=="string")&&(we=!1,Ne=h),we||(Te[$e]=Ne)}var te=rt;if(rt+=$e.length,!we)Ge.push(Ve+te,Ne);else{var ne=Pe[1],le=$e.indexOf(ne),de=le+ne.length;Pe[2]&&(de=$e.length-Pe[2].length,le=de-ne.length);var Re=Ne.substring(5);$(We,Ve+te,$e.substring(0,le),ue,Ge),$(We,Ve+te+le,ne,ve(Re,ne),Ge),$(We,Ve+te+de,$e.substring(de),ue,Ge)}}ce.decorations=Ge};return ue}function Le(re){var X=[],J=[];re.tripleQuotedStrings?X.push([b,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?X.push([b,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):X.push([b,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&J.push([b,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=re.hashComments;Y&&(re.cStyleComments?(Y>1?X.push([y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):X.push([y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([b,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):X.push([y,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(J.push([y,/^\/\/[^\r\n]*/,null]),J.push([y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ie=re.regexLiterals;if(ie){var ue=ie>1?"":`
\r`,ce=ue?".":"[\\S\\s]",He="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+ce+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+ce+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+M+"("+He+")")])}var Ve=re.types;Ve&&J.push([c,Ve]);var We=(""+re.keywords).replace(/^ | $/g,"");We.length&&J.push([x,new RegExp("^(?:"+We.replace(/[\s,]+/g,"|")+")\\b"),null]),X.push([d,/^\s+/,null,` \r
\xA0`]);var Ge="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(Ge+="(?!s*/)"),J.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[l,new RegExp(Ge),null]),fe(X,J)}var xe=Le({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(re,X,J){for(var Y=/(?:^|\s)nocode(?:\s|$)/,ie=/\r\n?|\n/,ue=re.ownerDocument,ce=ue.createElement("li");re.firstChild;)ce.appendChild(re.firstChild);var He=[ce];function Ve(De){var je=De.nodeType;if(je==1&&!Y.test(De.className))if(De.nodeName==="br")We(De),De.parentNode&&De.parentNode.removeChild(De);else for(var $e=De.firstChild;$e;$e=$e.nextSibling)Ve($e);else if((je==3||je==4)&&J){var Ne=De.nodeValue,Pe=Ne.match(ie);if(Pe){var we=Ne.substring(0,Pe.index);De.nodeValue=we;var he=Ne.substring(Pe.index+Pe[0].length);if(he){var ge=De.parentNode;ge.insertBefore(ue.createTextNode(he),De.nextSibling)}We(De),we||De.parentNode.removeChild(De)}}}function We(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function je(Pe,we){var he=we?Pe.cloneNode(!1):Pe,ge=Pe.parentNode;if(ge){var te=je(ge,1),ne=Pe.nextSibling;te.appendChild(he);for(var le=ne;le;le=ne)ne=le.nextSibling,te.appendChild(le)}return he}for(var $e=je(De.nextSibling,0),Ne;(Ne=$e.parentNode)&&Ne.nodeType===1;)$e=Ne;He.push($e)}for(var Ge=0;Ge=ge&&(Ve+=2),ue>=te&&(rt+=2)}}finally{Ne&&(Ne.style.display=Pe)}}var Fe={};function Ce(re,X){for(var J=X.length;--J>=0;){var Y=X[J];Fe.hasOwnProperty(Y)?P.console&&console.warn("cannot override language handler %s",Y):Fe[Y]=re}}function ve(re,X){return re&&Fe.hasOwnProperty(re)||(re=/^\s*]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^