@zydon/common-csr 2.0.18 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,205 +2,1006 @@ import { a as a$1 } from '../../../chunk-75QNIQAU.mjs';
2
2
  import { a, b } from '../../../chunk-6KMKD42J.mjs';
3
3
  import { useState, useEffect } from 'react';
4
4
  import { useFormContext, useFieldArray } from 'react-hook-form';
5
- import Ee from '@mui/material/Button';
6
- import cn from '@mui/material/ToggleButtonGroup';
7
- import me from '@zydon/common/components/Icon';
8
- import wt from '@zydon/common/hooks/usePopover';
9
- import dn from '@zydon/common/hooks/useToggle';
10
- import lt from '@mui/material/Popover';
11
- import ne from '@mui/material/Stack';
12
- import pt from '@mui/material/TextField';
13
- import ze from '@mui/material/Typography';
14
- import at from '@mui/material/IconButton';
5
+ import it from '@mui/material/Button';
6
+ import Oi from '@mui/material/ToggleButtonGroup';
7
+ import ze from '@zydon/common/components/Icon';
8
+ import Jt from '@zydon/common/hooks/usePopover';
9
+ import Hi from '@zydon/common/hooks/useToggle';
10
+ import Ot from '@mui/material/Popover';
11
+ import ke from '@mui/material/Stack';
12
+ import Wt from '@mui/material/TextField';
13
+ import mt from '@mui/material/Typography';
14
+ import Dt from '@mui/material/IconButton';
15
15
  import { styled, alpha } from '@mui/material/styles';
16
16
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
17
- import Rt from 'react-ace';
18
- import Et from '@zydon/common/components/SearchInput';
19
- import St from '@zydon/common/components/Scrollbar';
20
- import $t from '@zydon/common/components/DataGrid';
21
- import Yt from '@zydon/common/components/ActionButton';
22
- import Kt from '@zydon/common/components/ExpandableGroup';
23
- import ce from '@zydon/common/form/Autocomplete';
24
- import Wt from '@zydon/common/form/Field';
25
- import rn from '@mui/material/ToggleButton';
26
-
27
- var $e=a((Ie,re)=>{ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,T,L){var R=a("../lib/oop"),w=a("./text_highlight_rules").TextHighlightRules,S=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},S.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules();};R.inherits(S,w),S.getTagRule=function(d){return {token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},S.getStartRule=function(d){return {token:"comment.doc",regex:/\/\*\*(?!\/)/,next:d}},S.getEndRule=function(d){return {token:"comment.doc",regex:"\\*\\/",next:d}},T.JsDocCommentHighlightRules=S;});ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,T,L){var R=a("../lib/oop"),w=a("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,S=a("./text_highlight_rules").TextHighlightRules,d="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",u=function(b){var f={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},y=this.createKeywordMapper(f,"identifier"),m="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",k="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",C="(function)(\\s*)(\\*?)",A={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(f).join("|")+"\\b)"+d+")(\\s*)(\\()"};this.$rules={no_regex:[w.getStartRule("doc-start"),p("no_regex"),A,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+d+")(\\s*)(=)(\\s*)"+C+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+d+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+d+")(\\s*)(:)(\\s*)"+C+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+C+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+m+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:y,regex:d},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:C+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:d},{regex:"",token:"empty",next:"no_regex"}],start:[w.getStartRule("doc-start"),p("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[p("function_arguments"),{token:"variable.parameter",regex:d},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:k},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:k},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!b||!b.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(I,c,i){if(this.next=I=="{"?this.nextState:"",I=="{"&&i.length)i.unshift("start",c);else if(I=="}"&&i.length&&(i.shift(),this.next=i.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return "paren.quasi.end";return I=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:k},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+d+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!b||b.jsx!=!1)&&v.call(this)),this.embedRules(w,"doc-",[w.getEndRule("no_regex")]),this.normalizeRules();};R.inherits(u,S);function v(){var b=d.replace("\\d","\\d\\-"),f={onMatch:function(m,k,C){var A=m.charAt(1)=="/"?2:1;return A==1?(k!=this.nextState?C.unshift(this.next,this.nextState,0):C.unshift(this.next),C[2]++):A==2&&k==this.nextState&&(C[1]--,(!C[1]||C[1]<0)&&(C.shift(),C.shift())),[{type:"meta.tag.punctuation."+(A==1?"":"end-")+"tag-open.xml",value:m.slice(0,A)},{type:"meta.tag.tag-name.xml",value:m.substr(A)}]},regex:"</?(?:"+b+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var y={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[y,f,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(m,k,C){return k==C[0]&&C.shift(),m.length==2&&(C[0]==this.nextState&&C[1]--,(!C[1]||C[1]<0)&&C.splice(0,2)),this.next=C[0]||"start",[{type:this.token,value:m}]},nextState:"jsx"},y,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:b},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}];}function p(b){return [{token:"comment",regex:/\/\*/,next:[w.getTagRule(),{token:"comment",regex:"\\*\\/",next:b||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[w.getTagRule(),{token:"comment",regex:"$|^",next:b||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}T.JavaScriptHighlightRules=u;});ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,T,L){var R=a("../range").Range,w=function(){};((function(){this.checkOutdent=function(S,d){return /^\s+$/.test(S)?/^\s*\}/.test(d):!1},this.autoOutdent=function(S,d){var u=S.getLine(d),v=u.match(/^(\s*\})/);if(!v)return 0;var p=v[1].length,b=S.findMatchingBracket({row:d,column:p});if(!b||b.row==d)return 0;var f=this.$getIndent(S.getLine(b.row));S.replace(new R(d,0,d,p-1),f);},this.$getIndent=function(S){return S.match(/^\s*/)[0]};})).call(w.prototype),T.MatchingBraceOutdent=w;});ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(a,T,L){var R=a("../../lib/oop"),w=a("../behaviour").Behaviour,S=a("../../token_iterator").TokenIterator;function d(v,p){return v&&v.type.lastIndexOf(p+".xml")>-1}var u=function(){this.add("string_dquotes","insertion",function(v,p,b,f,y){if(y=='"'||y=="'"){var m=y,k=f.doc.getTextRange(b.getSelectionRange());if(k!==""&&k!=="'"&&k!='"'&&b.getWrapBehavioursEnabled())return {text:m+k+m,selection:!1};var C=b.getCursorPosition(),A=f.doc.getLine(C.row),I=A.substring(C.column,C.column+1),c=new S(f,C.row,C.column),i=c.getCurrentToken();if(I==m&&(d(i,"attribute-value")||d(i,"string")))return {text:"",selection:[1,1]};if(i||(i=c.stepBackward()),!i)return;for(;d(i,"tag-whitespace")||d(i,"whitespace");)i=c.stepBackward();var e=!I||I.match(/\s/);if(d(i,"attribute-equals")&&(e||I==">")||d(i,"decl-attribute-equals")&&(e||I=="?"))return {text:m+m,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(v,p,b,f,y){var m=f.doc.getTextRange(y);if(!y.isMultiLine()&&(m=='"'||m=="'")){var k=f.doc.getLine(y.start.row),C=k.substring(y.start.column+1,y.start.column+2);if(C==m)return y.end.column++,y}}),this.add("autoclosing","insertion",function(v,p,b,f,y){if(y==">"){var m=b.getSelectionRange().start,k=new S(f,m.row,m.column),C=k.getCurrentToken()||k.stepBackward();if(!C||!(d(C,"tag-name")||d(C,"tag-whitespace")||d(C,"attribute-name")||d(C,"attribute-equals")||d(C,"attribute-value"))||d(C,"reference.attribute-value"))return;if(d(C,"attribute-value")){var A=k.getCurrentTokenColumn()+C.value.length;if(m.column<A)return;if(m.column==A){var I=k.stepForward();if(I&&d(I,"attribute-value"))return;k.stepBackward();}}if(/^\s*>/.test(f.getLine(m.row).slice(m.column)))return;for(;!d(C,"tag-name");)if(C=k.stepBackward(),C.value=="<"){C=k.stepForward();break}var c=k.getCurrentTokenRow(),i=k.getCurrentTokenColumn();if(d(k.stepBackward(),"end-tag-open"))return;var e=C.value;return c==m.row&&(e=e.substring(0,m.column-i)),this.voidElements&&this.voidElements.hasOwnProperty(e.toLowerCase())?void 0:{text:"></"+e+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(v,p,b,f,y){if(y==`
28
- `){var m=b.getCursorPosition(),k=f.getLine(m.row),C=new S(f,m.row,m.column),A=C.getCurrentToken();if(d(A,"")&&A.type.indexOf("tag-close")!==-1){if(A.value=="/>")return;for(;A&&A.type.indexOf("tag-name")===-1;)A=C.stepBackward();if(!A)return;var I=A.value,c=C.getCurrentTokenRow();if(A=C.stepBackward(),!A||A.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var i=f.getTokenAt(m.row,m.column+1),k=f.getLine(c),e=this.$getIndent(k),n=e+f.getTabString();return i&&i.value==="</"?{text:`
29
- `+n+`
30
- `+e,selection:[1,n.length,1,n.length]}:{text:`
31
- `+n}}}}});};R.inherits(u,w),T.XmlBehaviour=u;});ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(a,T,L){var R=a("../../lib/oop"),w=a("../../token_iterator").TokenIterator,S=a("../behaviour/cstyle").CstyleBehaviour,d=a("../behaviour/xml").XmlBehaviour,u=function(){var v=new d({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(v),this.inherit(S),this.add("autoclosing-fragment","insertion",function(p,b,f,y,m){if(m==">"){var k=f.getSelectionRange().start,C=new w(y,k.row,k.column),A=C.getCurrentToken()||C.stepBackward();if(!A)return;if(A.value=="<")return {text:"></>",selection:[1,1]}}});};R.inherits(u,S),T.JavaScriptBehaviour=u;});ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,T,L){var R=a("../../lib/oop"),w=a("../../range").Range,S=a("./fold_mode").FoldMode,d=T.FoldMode=function(p,b){S.call(this),this.voidElements=p||{},this.optionalEndTags=R.mixin({},this.voidElements),b&&R.mixin(this.optionalEndTags,b);};R.inherits(d,S);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0};};function v(p,b){return p.type.lastIndexOf(b+".xml")>-1}(function(){this.getFoldWidget=function(p,b,f){var y=this._getFirstTagInLine(p,f);return y?y.closing||!y.tagName&&y.selfClosing?b==="markbeginend"?"end":"":!y.tagName||y.selfClosing||this.voidElements.hasOwnProperty(y.tagName.toLowerCase())||this._findEndTagInLine(p,f,y.tagName,y.end.column)?"":"start":this.getCommentFoldWidget(p,f)},this.getCommentFoldWidget=function(p,b){return /comment/.test(p.getState(b))&&/<!-/.test(p.getLine(b))?"start":""},this._getFirstTagInLine=function(p,b){for(var f=p.getTokens(b),y=new u,m=0;m<f.length;m++){var k=f[m];if(v(k,"tag-open")){if(y.end.column=y.start.column+k.value.length,y.closing=v(k,"end-tag-open"),k=f[++m],!k)return null;if(y.tagName=k.value,k.value===""){if(k=f[++m],!k)return null;y.tagName=k.value;}for(y.end.column+=k.value.length,m++;m<f.length;m++)if(k=f[m],y.end.column+=k.value.length,v(k,"tag-close")){y.selfClosing=k.value=="/>";break}return y}else if(v(k,"tag-close"))return y.selfClosing=k.value=="/>",y;y.start.column+=k.value.length;}return null},this._findEndTagInLine=function(p,b,f,y){for(var m=p.getTokens(b),k=0,C=0;C<m.length;C++){var A=m[C];if(k+=A.value.length,!(k<y-1)&&v(A,"end-tag-open")&&(A=m[C+1],v(A,"tag-name")&&A.value===""&&(A=m[C+2]),A&&A.value==f))return !0}return !1},this.getFoldWidgetRange=function(p,b,f){var y=this._getFirstTagInLine(p,f);if(!y)return this.getCommentFoldWidget(p,f)&&p.getCommentFoldRange(f,p.getLine(f).length);var m=p.getMatchingTags({row:f,column:0});if(m)return new w(m.openTag.end.row,m.openTag.end.column,m.closeTag.start.row,m.closeTag.start.column)};}).call(d.prototype);});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,T,L){var R=a("../../lib/oop"),w=a("../../range").Range,S=a("./fold_mode").FoldMode,d=T.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)));};R.inherits(d,S),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,v,p){var b=u.getLine(p);if(this.singleLineBlockCommentRe.test(b)&&!this.startRegionRe.test(b)&&!this.tripleStarBlockCommentRe.test(b))return "";var f=this._getFoldWidgetBase(u,v,p);return !f&&this.startRegionRe.test(b)?"start":f},this.getFoldWidgetRange=function(u,v,p,b){var f=u.getLine(p);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(u,f,p);var k=f.match(this.foldingStartMarker);if(k){var y=k.index;if(k[1])return this.openingBracketBlock(u,k[1],p,y);var m=u.getCommentFoldRange(p,y+k[0].length,1);return m&&!m.isMultiLine()&&(b?m=this.getSectionRange(u,p):v!="all"&&(m=null)),m}if(v!=="markbegin"){var k=f.match(this.foldingStopMarker);if(k){var y=k.index+k[0].length;return k[1]?this.closingBracketBlock(u,k[1],p,y):u.getCommentFoldRange(p,y,-1)}}},this.getSectionRange=function(u,v){var p=u.getLine(v),b=p.search(/\S/),f=v,y=p.length;v=v+1;for(var m=v,k=u.getLength();++v<k;){p=u.getLine(v);var C=p.search(/\S/);if(C!==-1){if(b>C)break;var A=this.getFoldWidgetRange(u,"all",v);if(A){if(A.start.row<=f)break;if(A.isMultiLine())v=A.end.row;else if(b==C)break}m=v;}}return new w(f,y,m,u.getLine(m).length)},this.getCommentRegionBlock=function(u,v,p){for(var b=v.search(/\s*$/),f=u.getLength(),y=p,m=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,k=1;++p<f;){v=u.getLine(p);var C=m.exec(v);if(C&&(C[1]?k--:k++,!k))break}var A=p;if(A>y)return new w(y,b,A,v.length)};}.call(d.prototype);});ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(a,T,L){var R=a("../../lib/oop"),w=a("./xml").FoldMode,S=a("./cstyle").FoldMode,d=T.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end))),this.xmlFoldMode=new w;};R.inherits(d,S),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,v,p){var b=this.getFoldWidgetBase(u,v,p);return b||this.xmlFoldMode.getFoldWidget(u,v,p)},this.getFoldWidgetRange=function(u,v,p,b){var f=this.getFoldWidgetRangeBase(u,v,p,b);return f||this.xmlFoldMode.getFoldWidgetRange(u,v,p)};}.call(d.prototype);});ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(a,T,L){var R=a("../lib/oop"),w=a("./text").Mode,S=a("./javascript_highlight_rules").JavaScriptHighlightRules,d=a("./matching_brace_outdent").MatchingBraceOutdent,u=a("../worker/worker_client").WorkerClient,v=a("./behaviour/javascript").JavaScriptBehaviour,p=a("./folding/javascript").FoldMode,b=function(){this.HighlightRules=S,this.$outdent=new d,this.$behaviour=new v,this.foldingRules=new p;};R.inherits(b,w),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,y,m){var k=this.$getIndent(y),C=this.getTokenizer().getLineTokens(y,f),A=C.tokens,I=C.state;if(A.length&&A[A.length-1].type=="comment")return k;if(f=="start"||f=="no_regex"){var c=y.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);c&&(k+=m);}else if(f=="doc-start"&&(I=="start"||I=="no_regex"))return "";return k},this.checkOutdent=function(f,y,m){return this.$outdent.checkOutdent(y,m)},this.autoOutdent=function(f,y,m){this.$outdent.autoOutdent(y,m);},this.createWorker=function(f){var y=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return y.attachToDocument(f.getDocument()),y.on("annotate",function(m){f.setAnnotations(m.data);}),y.on("terminate",function(){f.clearAnnotations();}),y},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript";}.call(b.prototype),T.Mode=b;});ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,T,L){var R=a("../lib/oop"),w=a("./text_highlight_rules").TextHighlightRules,S=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},S.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]};};R.inherits(S,w),S.getTagRule=function(d){return {token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},S.getStartRule=function(d){return {token:"comment.doc",regex:/\/\*\*(?!\/)/,next:d}},S.getEndRule=function(d){return {token:"comment.doc",regex:"\\*\\/",next:d}},T.DocCommentHighlightRules=S;});ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,T,L){var R=a("../lib/oop"),w=a("./doc_comment_highlight_rules").DocCommentHighlightRules,S=a("./text_highlight_rules").TextHighlightRules,d=function(){var u="[a-zA-Z_$][a-zA-Z0-9_$]*",v="abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|exports|opens|requires|uses|yield|module|permits|(?:non\\-)?sealed|var|provides|to|when|open|record|transitive|with",p="null|Infinity|NaN|undefined",b="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",f=this.createKeywordMapper({"variable.language":"this","constant.language":p,"support.function":b},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},w.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",next:[{regex:"}",token:"paren.rparen",next:"start"},{regex:"\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",token:"keyword"}]},{token:"text",regex:"\\s+"},{token:"identifier",regex:"\\w+"},{token:"punctuation.operator",regex:"."},{token:"text",regex:"\\s+"},{regex:"",next:"start"}]},{include:"statements"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],strings:[{token:["punctuation","string"],regex:/(\.)(")/,push:[{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"string",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}],"multiline-strings":[{token:["punctuation","string"],regex:/(\.)(""")/,push:[{token:"string",regex:'"""',next:"pop"},{token:"lparen",regex:/\\\{/,push:[{token:"text",regex:/$/,next:"start"},{token:"rparen",regex:/}/,next:"pop"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{include:"statements"}]},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]},{token:"string",regex:'"""',push:[{token:"string",regex:'"""',next:"pop"},{token:"constant.language.escape",regex:/\\./},{defaultToken:"string"}]}],constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+u+")\\b"},{token:"keyword",regex:"(?:"+v+")\\b"},{token:"storage.type.annotation",regex:"@"+u+"\\b"},{token:"entity.name.function",regex:u+"(?=\\()"},{token:f,regex:u+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(w,"doc-",[w.getEndRule("start")]),this.normalizeRules();};R.inherits(d,S),T.JavaHighlightRules=d;});ace.define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"],function(a,T,L){var R=a("../../lib/oop"),w=a("./cstyle").FoldMode,S=a("../../range").Range,d=T.FoldMode=function(){};R.inherits(d,w),function(){this.importRegex=/^import /,this.getCStyleFoldWidget=this.getFoldWidget,this.getFoldWidget=function(u,v,p){if(v==="markbegin"){var b=u.getLine(p);if(this.importRegex.test(b)&&(p==0||!this.importRegex.test(u.getLine(p-1))))return "start"}return this.getCStyleFoldWidget(u,v,p)},this.getCstyleFoldWidgetRange=this.getFoldWidgetRange,this.getFoldWidgetRange=function(u,v,p,b){var f=u.getLine(p),y=f.match(this.importRegex);if(!y||v!=="markbegin")return this.getCstyleFoldWidgetRange(u,v,p,b);for(var m=y[0].length,k=u.getLength(),C=p,A=p;++p<k;){var f=u.getLine(p);if(!f.match(/^\s*$/)){if(!f.match(this.importRegex))break;A=p;}}if(A>C){var I=u.getLine(A).length;return new S(C,m,A,I)}};}.call(d.prototype);});ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"],function(a,T,L){var R=a("../lib/oop"),w=a("./javascript").Mode,S=a("./java_highlight_rules").JavaHighlightRules,d=a("./folding/java").FoldMode,u=function(){w.call(this),this.HighlightRules=S,this.foldingRules=new d;};R.inherits(u,w),function(){this.createWorker=function(v){return null},this.$id="ace/mode/java",this.snippetFileId="ace/snippets/java";}.call(u.prototype),T.Mode=u;});(function(){ace.require(["ace/mode/java"],function(a){typeof re=="object"&&typeof Ie=="object"&&re&&(re.exports=a);});})();});var Fe=a((Ne,ie)=>{ace.define("ace/theme/chrome-css",["require","exports","module"],function(a,T,L){L.exports=`.ace-chrome .ace_gutter {
32
- background: #ebebeb;
17
+ import ti from 'react-ace';
18
+ import ni from '@zydon/common/components/SearchInput';
19
+ import Xt from '@zydon/common/components/Scrollbar';
20
+ import ai from '@zydon/common/components/DataGrid';
21
+ import Ci from '@zydon/common/components/ActionButton';
22
+ import Si from '@zydon/common/components/ExpandableGroup';
23
+ import Fe from '@zydon/common/form/Autocomplete';
24
+ import mi from '@zydon/common/form/Field';
25
+ import _i from '@mui/material/ToggleButton';
26
+
27
+ var st=a((ot,Re)=>{(function(){var L="ace",T=function(){return this}();if(!T&&typeof window<"u"&&(T=window),!L);var H=function(r,t,i){if(typeof r!="string"){H.original?H.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=t),H.modules[r]||(H.payloads[r]=i,H.modules[r]=null);};H.modules={},H.payloads={};var E=function(r,t,i){if(typeof t=="string"){var n=s(r,t);if(n!=null)return i&&i(),n}else if(Object.prototype.toString.call(t)==="[object Array]"){for(var e=[],o=0,a=t.length;o<a;++o){var u=s(r,t[o]);if(u==null&&x.original)return;e.push(u);}return i&&i.apply(null,e)||!0}},x=function(r,t){var i=E("",r,t);return i==null&&x.original?x.original.apply(this,arguments):i},M=function(r,t){if(t.indexOf("!")!==-1){var i=t.split("!");return M(r,i[0])+"!"+M(r,i[1])}if(t.charAt(0)=="."){var n=r.split("/").slice(0,-1).join("/");for(t=n+"/"+t;t.indexOf(".")!==-1&&e!=t;){var e=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"");}}return t},s=function(r,t){t=M(r,t);var i=H.modules[t];if(!i){if(i=H.payloads[t],typeof i=="function"){var n={},e={id:t,uri:"",exports:n,packaged:!0},o=function(u,y){return E(t,u,y)},a=i(o,n,e);n=a||e.exports,H.modules[t]=n,delete H.payloads[t];}i=H.modules[t]=n||i;}return i};function l(r){var t=T;r&&(T[r]||(T[r]={}),t=T[r]),(!t.define||!t.define.packaged)&&(H.original=t.define,t.define=H,t.define.packaged=!0),(!t.require||!t.require.packaged)&&(x.original=t.require,t.require=x,t.require.packaged=!0);}l(L);})();ace.define("ace/lib/es6-shim",["require","exports","module"],function(L,T,H){function E(x,M,s){Object.defineProperty(x,M,{value:s,enumerable:!1,writable:!0,configurable:!0});}String.prototype.startsWith||E(String.prototype,"startsWith",function(x,M){return M=M||0,this.lastIndexOf(x,M)===M}),String.prototype.endsWith||E(String.prototype,"endsWith",function(x,M){var s=this;(M===void 0||M>s.length)&&(M=s.length),M-=x.length;var l=s.indexOf(x,M);return l!==-1&&l===M}),String.prototype.repeat||E(String.prototype,"repeat",function(x){for(var M="",s=this;x>0;)x&1&&(M+=s),(x>>=1)&&(s+=s);return M}),String.prototype.includes||E(String.prototype,"includes",function(x,M){return this.indexOf(x,M)!=-1}),Object.assign||(Object.assign=function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(x),s=1;s<arguments.length;s++){var l=arguments[s];l!=null&&Object.keys(l).forEach(function(r){M[r]=l[r];});}return M}),Object.values||(Object.values=function(x){return Object.keys(x).map(function(M){return x[M]})}),Array.prototype.find||E(Array.prototype,"find",function(x){for(var M=this.length,s=arguments[1],l=0;l<M;l++){var r=this[l];if(x.call(s,r,l,this))return r}}),Array.prototype.findIndex||E(Array.prototype,"findIndex",function(x){for(var M=this.length,s=arguments[1],l=0;l<M;l++){var r=this[l];if(x.call(s,r,l,this))return l}}),Array.prototype.includes||E(Array.prototype,"includes",function(x,M){return this.indexOf(x,M)!=-1}),Array.prototype.fill||E(Array.prototype,"fill",function(x){for(var M=this,s=M.length>>>0,l=arguments[1],r=l>>0,t=r<0?Math.max(s+r,0):Math.min(r,s),i=arguments[2],n=i===void 0?s:i>>0,e=n<0?Math.max(s+n,0):Math.min(n,s);t<e;)M[t]=x,t++;return M}),Array.of||E(Array,"of",function(){return Array.prototype.slice.call(arguments)});});ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(L,T,H){L("./es6-shim");});ace.define("ace/lib/deep_copy",["require","exports","module"],function(L,T,H){T.deepCopy=function E(x){if(typeof x!="object"||!x)return x;var M;if(Array.isArray(x)){M=[];for(var s=0;s<x.length;s++)M[s]=E(x[s]);return M}if(Object.prototype.toString.call(x)!=="[object Object]")return x;M={};for(var s in x)M[s]=E(x[s]);return M};});ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(L,T,H){T.last=function(M){return M[M.length-1]},T.stringReverse=function(M){return M.split("").reverse().join("")},T.stringRepeat=function(M,s){for(var l="";s>0;)s&1&&(l+=M),(s>>=1)&&(M+=M);return l};var E=/^\s\s*/,x=/\s\s*$/;T.stringTrimLeft=function(M){return M.replace(E,"")},T.stringTrimRight=function(M){return M.replace(x,"")},T.copyObject=function(M){var s={};for(var l in M)s[l]=M[l];return s},T.copyArray=function(M){for(var s=[],l=0,r=M.length;l<r;l++)M[l]&&typeof M[l]=="object"?s[l]=this.copyObject(M[l]):s[l]=M[l];return s},T.deepCopy=L("./deep_copy").deepCopy,T.arrayToMap=function(M){for(var s={},l=0;l<M.length;l++)s[M[l]]=1;return s},T.createMap=function(M){var s=Object.create(null);for(var l in M)s[l]=M[l];return s},T.arrayRemove=function(M,s){for(var l=0;l<=M.length;l++)s===M[l]&&M.splice(l,1);},T.escapeRegExp=function(M){return M.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},T.escapeHTML=function(M){return (""+M).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},T.getMatchOffsets=function(M,s){var l=[];return M.replace(s,function(r){l.push({offset:arguments[arguments.length-2],length:r.length});}),l},T.deferredCall=function(M){var s=null,l=function(){s=null,M();},r=function(t){return r.cancel(),s=setTimeout(l,t||0),r};return r.schedule=r,r.call=function(){return this.cancel(),M(),r},r.cancel=function(){return clearTimeout(s),s=null,r},r.isPending=function(){return s},r},T.delayedCall=function(M,s){var l=null,r=function(){l=null,M();},t=function(i){l==null&&(l=setTimeout(r,i||s));};return t.delay=function(i){l&&clearTimeout(l),l=setTimeout(r,i||s);},t.schedule=t,t.call=function(){this.cancel(),M();},t.cancel=function(){l&&clearTimeout(l),l=null;},t.isPending=function(){return l},t},T.supportsLookbehind=function(){try{new RegExp("(?<=.)");}catch{return !1}return !0},T.skipEmptyMatch=function(M,s,l){return l&&M.codePointAt(s)>65535?2:1};});ace.define("ace/lib/useragent",["require","exports","module"],function(L,T,H){T.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},T.getOS=function(){return T.isMac?T.OS.MAC:T.isLinux?T.OS.LINUX:T.OS.WINDOWS};var E=typeof navigator=="object"?navigator:{},x=(/mac|win|linux/i.exec(E.platform)||["other"])[0].toLowerCase(),M=E.userAgent||"",s=E.appName||"";T.isWin=x=="win",T.isMac=x=="mac",T.isLinux=x=="linux",T.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((M.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((M.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),T.isOldIE=T.isIE&&T.isIE<9,T.isGecko=T.isMozilla=M.match(/ Gecko\/\d+/),T.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",T.isWebKit=parseFloat(M.split("WebKit/")[1])||void 0,T.isChrome=parseFloat(M.split(" Chrome/")[1])||void 0,T.isSafari=parseFloat(M.split(" Safari/")[1])&&!T.isChrome||void 0,T.isEdge=parseFloat(M.split(" Edge/")[1])||void 0,T.isAIR=M.indexOf("AdobeAIR")>=0,T.isAndroid=M.indexOf("Android")>=0,T.isChromeOS=M.indexOf(" CrOS ")>=0,T.isIOS=/iPad|iPhone|iPod/.test(M)&&!window.MSStream,T.isIOS&&(T.isMac=!0),T.isMobile=T.isIOS||T.isAndroid;});ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(L,T,H){var E=L("./useragent"),x="http://www.w3.org/1999/xhtml";T.buildDom=function i(n,e,o){if(typeof n=="string"&&n){var a=document.createTextNode(n);return e&&e.appendChild(a),a}if(!Array.isArray(n))return n&&n.appendChild&&e&&e.appendChild(n),n;if(typeof n[0]!="string"||!n[0]){for(var u=[],y=0;y<n.length;y++){var S=i(n[y],e,o);S&&u.push(S);}return u}var m=document.createElement(n[0]),$=n[1],d=1;$&&typeof $=="object"&&!Array.isArray($)&&(d=2);for(var y=d;y<n.length;y++)i(n[y],m,o);return d==2&&Object.keys($).forEach(function(h){var w=$[h];h==="class"?m.className=Array.isArray(w)?w.join(" "):w:typeof w=="function"||h=="value"||h[0]=="$"?m[h]=w:h==="ref"?o&&(o[w]=m):h==="style"?typeof w=="string"&&(m.style.cssText=w):w!=null&&m.setAttribute(h,w);}),e&&e.appendChild(m),m},T.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},T.createElement=function(i,n){return document.createElementNS?document.createElementNS(n||x,i):document.createElement(i)},T.removeChildren=function(i){i.innerHTML="";},T.createTextNode=function(i,n){var e=n?n.ownerDocument:document;return e.createTextNode(i)},T.createFragment=function(i){var n=i?i.ownerDocument:document;return n.createDocumentFragment()},T.hasCssClass=function(i,n){var e=(i.className+"").split(/\s+/g);return e.indexOf(n)!==-1},T.addCssClass=function(i,n){T.hasCssClass(i,n)||(i.className+=" "+n);},T.removeCssClass=function(i,n){for(var e=i.className.split(/\s+/g);;){var o=e.indexOf(n);if(o==-1)break;e.splice(o,1);}i.className=e.join(" ");},T.toggleCssClass=function(i,n){for(var e=i.className.split(/\s+/g),o=!0;;){var a=e.indexOf(n);if(a==-1)break;o=!1,e.splice(a,1);}return o&&e.push(n),i.className=e.join(" "),o},T.setCssClass=function(i,n,e){e?T.addCssClass(i,n):T.removeCssClass(i,n);},T.hasCssString=function(i,n){var e=0,o;if(n=n||document,o=n.querySelectorAll("style")){for(;e<o.length;)if(o[e++].id===i)return !0}},T.removeElementById=function(i,n){n=n||document,n.getElementById(i)&&n.getElementById(i).remove();};var M,s=[];T.useStrictCSP=function(i){M=i,i==!1?l():s||(s=[]);};function l(){var i=s;s=null,i&&i.forEach(function(n){r(n[0],n[1]);});}function r(i,n,e){if(!(typeof document>"u")){if(s){if(e)l();else if(e===!1)return s.push([i,n])}if(!M){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var a=o.ownerDocument||o;if(n&&T.hasCssString(n,o))return null;n&&(i+=`
28
+ /*# sourceURL=ace/css/`+n+" */");var u=T.createElement("style");u.appendChild(a.createTextNode(i)),n&&(u.id=n),o==a&&(o=T.getDocumentHead(a)),o.insertBefore(u,o.firstChild);}}}if(T.importCssString=r,T.importCssStylsheet=function(i,n){T.buildDom(["link",{rel:"stylesheet",href:i}],T.getDocumentHead(n));},T.scrollbarWidth=function(i){var n=T.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var e=T.createElement("ace_outer"),o=e.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",e.appendChild(n);var a=i&&i.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var u=n.offsetWidth;o.overflow="scroll";var y=n.offsetWidth;return u===y&&(y=e.clientWidth),a.removeChild(e),u-y},T.computedStyle=function(i,n){return window.getComputedStyle(i,"")||{}},T.setStyle=function(i,n,e){i[n]!==e&&(i[n]=e);},T.HAS_CSS_ANIMATION=!1,T.HAS_CSS_TRANSFORMS=!1,T.HI_DPI=E.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,E.isChromeOS&&(T.HI_DPI=!1),typeof document<"u"){var t=document.createElement("div");T.HI_DPI&&t.style.transform!==void 0&&(T.HAS_CSS_TRANSFORMS=!0),!E.isEdge&&typeof t.style.animationName<"u"&&(T.HAS_CSS_ANIMATION=!0),t=null;}T.HAS_CSS_TRANSFORMS?T.translate=function(i,n,e){i.style.transform="translate("+Math.round(n)+"px, "+Math.round(e)+"px)";}:T.translate=function(i,n,e){i.style.top=Math.round(e)+"px",i.style.left=Math.round(n)+"px";};});ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(L,T,H){var E=L("./dom");T.get=function(x,M){var s=new XMLHttpRequest;s.open("GET",x,!0),s.onreadystatechange=function(){s.readyState===4&&M(s.responseText);},s.send(null);},T.loadScript=function(x,M){var s=E.getDocumentHead(),l=document.createElement("script");l.src=x,s.appendChild(l),l.onload=l.onreadystatechange=function(r,t){(t||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,t||M());};},T.qualifyURL=function(x){var M=document.createElement("a");return M.href=x,M.href};});ace.define("ace/lib/oop",["require","exports","module"],function(L,T,H){T.inherits=function(E,x){E.super_=x,E.prototype=Object.create(x.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}});},T.mixin=function(E,x){for(var M in x)E[M]=x[M];return E},T.implement=function(E,x){T.mixin(E,x);};});ace.define("ace/lib/event_emitter",["require","exports","module"],function(L,T,H){var E={},x=function(){this.propagationStopped=!0;},M=function(){this.defaultPrevented=!0;};E._emit=E._dispatchEvent=function(s,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[s]||[],t=this._defaultHandlers[s];if(!(!r.length&&!t)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=s),l.stopPropagation||(l.stopPropagation=x),l.preventDefault||(l.preventDefault=M),r=r.slice();for(var i=0;i<r.length&&(r[i](l,this),!l.propagationStopped);i++);if(t&&!l.defaultPrevented)return t(l,this)}},E._signal=function(s,l){var r=(this._eventRegistry||{})[s];if(r){r=r.slice();for(var t=0;t<r.length;t++)r[t](l,this);}},E.once=function(s,l){var r=this;if(this.on(s,function t(){r.off(s,t),l.apply(null,arguments);}),!l)return new Promise(function(t){l=t;})},E.setDefaultHandler=function(s,l){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[s]){var t=r[s],i=r._disabled_[s];i||(r._disabled_[s]=i=[]),i.push(t);var n=i.indexOf(l);n!=-1&&i.splice(n,1);}r[s]=l;},E.removeDefaultHandler=function(s,l){var r=this._defaultHandlers;if(r){var t=r._disabled_[s];if(r[s]==l)t&&this.setDefaultHandler(s,t.pop());else if(t){var i=t.indexOf(l);i!=-1&&t.splice(i,1);}}},E.on=E.addEventListener=function(s,l,r){this._eventRegistry=this._eventRegistry||{};var t=this._eventRegistry[s];return t||(t=this._eventRegistry[s]=[]),t.indexOf(l)==-1&&t[r?"unshift":"push"](l),l},E.off=E.removeListener=E.removeEventListener=function(s,l){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[s];if(r){var t=r.indexOf(l);t!==-1&&r.splice(t,1);}},E.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0);},T.EventEmitter=E;});ace.define("ace/lib/report_error",["require","exports","module"],function(L,T,H){T.reportError=function(x,M){var s=new Error(x);s.data=M,typeof console=="object"&&console.error&&console.error(s),setTimeout(function(){throw s});};});ace.define("ace/lib/default_english_messages",["require","exports","module"],function(L,T,H){var E={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};T.defaultEnglishMessages=E;});ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(L,T,H){"no use strict";var E=L("./oop"),x=L("./event_emitter").EventEmitter,M=L("./report_error").reportError,s=L("./default_english_messages").defaultEnglishMessages,l={setOptions:function(e){Object.keys(e).forEach(function(o){this.setOption(o,e[o]);},this);},getOptions:function(e){var o={};if(e)Array.isArray(e)||(o=e,e=Object.keys(o));else {var a=this.$options;e=Object.keys(a).filter(function(u){return !a[u].hidden});}return e.forEach(function(u){o[u]=this.getOption(u);},this),o},setOption:function(e,o){if(this["$"+e]!==o){var a=this.$options[e];if(!a)return r('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,o);a.handlesSet||(this["$"+e]=o),a&&a.set&&a.set.call(this,o);}},getOption:function(e){var o=this.$options[e];return o?o.forwardTo?this[o.forwardTo]&&this[o.forwardTo].getOption(e):o&&o.get?o.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments);}var t,i,n=function(){function e(){this.$defaultOptions={},t=s,i="dollarSigns";}return e.prototype.defineOptions=function(o,a,u){return o.$options||(this.$defaultOptions[a]=o.$options={}),Object.keys(u).forEach(function(y){var S=u[y];typeof S=="string"&&(S={forwardTo:S}),S.name||(S.name=y),o.$options[S.name]=S,"initialValue"in S&&(o["$"+S.name]=S.initialValue);}),E.implement(o,l),this},e.prototype.resetOptions=function(o){Object.keys(o.$options).forEach(function(a){var u=o.$options[a];"value"in u&&o.setOption(a,u.value);});},e.prototype.setDefaultValue=function(o,a,u){if(!o){for(o in this.$defaultOptions)if(this.$defaultOptions[o][a])break;if(!this.$defaultOptions[o][a])return !1}var y=this.$defaultOptions[o]||(this.$defaultOptions[o]={});y[a]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,a,u):y[a].value=u);},e.prototype.setDefaultValues=function(o,a){Object.keys(a).forEach(function(u){this.setDefaultValue(o,u,a[u]);},this);},e.prototype.setMessages=function(o,a){t=o,a&&a.placeholders&&(i=a.placeholders);},e.prototype.nls=function(o,a,u){t[o]||(r("No message found for the key '"+o+"' in the provided messages, trying to find a translation for the default string '"+a+"'."),t[a]||r("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var y=t[o]||t[a]||a;return u&&(i==="dollarSigns"&&(y=y.replace(/\$(\$|[\d]+)/g,function(S,m){return m=="$"?"$":u[m]})),i==="curlyBrackets"&&(y=y.replace(/\{([^\}]+)\}/g,function(S,m){return u[m]}))),y},e}();n.prototype.warn=r,n.prototype.reportError=M,E.implement(n.prototype,x),T.AppConfig=n;});ace.define("ace/theme/textmate-css",["require","exports","module"],function(L,T,H){H.exports=`.ace-tm .ace_gutter {
29
+ background: #f0f0f0;
33
30
  color: #333;
34
- overflow : hidden;
35
31
  }
36
32
 
37
- .ace-chrome .ace_print-margin {
33
+ .ace-tm .ace_print-margin {
38
34
  width: 1px;
39
35
  background: #e8e8e8;
40
36
  }
41
37
 
42
- .ace-chrome {
38
+ .ace-tm .ace_fold {
39
+ background-color: #6B72E6;
40
+ }
41
+
42
+ .ace-tm {
43
43
  background-color: #FFFFFF;
44
44
  color: black;
45
45
  }
46
46
 
47
- .ace-chrome .ace_cursor {
47
+ .ace-tm .ace_cursor {
48
48
  color: black;
49
49
  }
50
-
51
- .ace-chrome .ace_invisible {
50
+
51
+ .ace-tm .ace_invisible {
52
52
  color: rgb(191, 191, 191);
53
53
  }
54
54
 
55
- .ace-chrome .ace_constant.ace_buildin {
55
+ .ace-tm .ace_storage,
56
+ .ace-tm .ace_keyword {
57
+ color: blue;
58
+ }
59
+
60
+ .ace-tm .ace_constant {
61
+ color: rgb(197, 6, 11);
62
+ }
63
+
64
+ .ace-tm .ace_constant.ace_buildin {
56
65
  color: rgb(88, 72, 246);
57
66
  }
58
67
 
59
- .ace-chrome .ace_constant.ace_language {
68
+ .ace-tm .ace_constant.ace_language {
60
69
  color: rgb(88, 92, 246);
61
70
  }
62
71
 
63
- .ace-chrome .ace_constant.ace_library {
72
+ .ace-tm .ace_constant.ace_library {
64
73
  color: rgb(6, 150, 14);
65
74
  }
66
75
 
67
- .ace-chrome .ace_invalid {
68
- background-color: rgb(153, 0, 0);
69
- color: white;
70
- }
71
-
72
- .ace-chrome .ace_fold {
76
+ .ace-tm .ace_invalid {
77
+ background-color: rgba(255, 0, 0, 0.1);
78
+ color: red;
73
79
  }
74
80
 
75
- .ace-chrome .ace_support.ace_function {
81
+ .ace-tm .ace_support.ace_function {
76
82
  color: rgb(60, 76, 114);
77
83
  }
78
84
 
79
- .ace-chrome .ace_support.ace_constant {
85
+ .ace-tm .ace_support.ace_constant {
80
86
  color: rgb(6, 150, 14);
81
87
  }
82
88
 
83
- .ace-chrome .ace_support.ace_type,
84
- .ace-chrome .ace_support.ace_class
85
- .ace-chrome .ace_support.ace_other {
89
+ .ace-tm .ace_support.ace_type,
90
+ .ace-tm .ace_support.ace_class {
86
91
  color: rgb(109, 121, 222);
87
92
  }
88
93
 
89
- .ace-chrome .ace_variable.ace_parameter {
90
- font-style:italic;
91
- color:#FD971F;
92
- }
93
- .ace-chrome .ace_keyword.ace_operator {
94
+ .ace-tm .ace_keyword.ace_operator {
94
95
  color: rgb(104, 118, 135);
95
96
  }
96
97
 
97
- .ace-chrome .ace_comment {
98
- color: #236e24;
98
+ .ace-tm .ace_string {
99
+ color: rgb(3, 106, 7);
99
100
  }
100
101
 
101
- .ace-chrome .ace_comment.ace_doc {
102
- color: #236e24;
102
+ .ace-tm .ace_comment {
103
+ color: rgb(76, 136, 107);
103
104
  }
104
105
 
105
- .ace-chrome .ace_comment.ace_doc.ace_tag {
106
- color: #236e24;
106
+ .ace-tm .ace_comment.ace_doc {
107
+ color: rgb(0, 102, 255);
107
108
  }
108
109
 
109
- .ace-chrome .ace_constant.ace_numeric {
110
+ .ace-tm .ace_comment.ace_doc.ace_tag {
111
+ color: rgb(128, 159, 191);
112
+ }
113
+
114
+ .ace-tm .ace_constant.ace_numeric {
110
115
  color: rgb(0, 0, 205);
111
116
  }
112
117
 
113
- .ace-chrome .ace_variable {
118
+ .ace-tm .ace_variable {
114
119
  color: rgb(49, 132, 149);
115
120
  }
116
121
 
117
- .ace-chrome .ace_xml-pe {
122
+ .ace-tm .ace_xml-pe {
118
123
  color: rgb(104, 104, 91);
119
124
  }
120
125
 
121
- .ace-chrome .ace_entity.ace_name.ace_function {
126
+ .ace-tm .ace_entity.ace_name.ace_function {
122
127
  color: #0000A2;
123
128
  }
124
129
 
125
130
 
126
- .ace-chrome .ace_heading {
131
+ .ace-tm .ace_heading {
127
132
  color: rgb(12, 7, 255);
128
133
  }
129
134
 
130
- .ace-chrome .ace_list {
135
+ .ace-tm .ace_list {
131
136
  color:rgb(185, 6, 144);
132
137
  }
133
138
 
134
- .ace-chrome .ace_marker-layer .ace_selection {
135
- background: rgb(181, 213, 255);
139
+ .ace-tm .ace_meta.ace_tag {
140
+ color:rgb(0, 22, 142);
136
141
  }
137
142
 
138
- .ace-chrome .ace_marker-layer .ace_step {
143
+ .ace-tm .ace_string.ace_regex {
144
+ color: rgb(255, 0, 0)
145
+ }
146
+
147
+ .ace-tm .ace_marker-layer .ace_selection {
148
+ background: rgb(181, 213, 255);
149
+ }
150
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
151
+ box-shadow: 0 0 3px 0px white;
152
+ }
153
+ .ace-tm .ace_marker-layer .ace_step {
139
154
  background: rgb(252, 255, 0);
140
155
  }
141
156
 
142
- .ace-chrome .ace_marker-layer .ace_stack {
157
+ .ace-tm .ace_marker-layer .ace_stack {
143
158
  background: rgb(164, 229, 101);
144
159
  }
145
160
 
146
- .ace-chrome .ace_marker-layer .ace_bracket {
161
+ .ace-tm .ace_marker-layer .ace_bracket {
147
162
  margin: -1px 0 0 -1px;
148
163
  border: 1px solid rgb(192, 192, 192);
149
164
  }
150
165
 
151
- .ace-chrome .ace_marker-layer .ace_active-line {
166
+ .ace-tm .ace_marker-layer .ace_active-line {
152
167
  background: rgba(0, 0, 0, 0.07);
153
168
  }
154
169
 
155
- .ace-chrome .ace_gutter-active-line {
170
+ .ace-tm .ace_gutter-active-line {
156
171
  background-color : #dcdcdc;
157
172
  }
158
173
 
159
- .ace-chrome .ace_marker-layer .ace_selected-word {
174
+ .ace-tm .ace_marker-layer .ace_selected-word {
160
175
  background: rgb(250, 250, 255);
161
176
  border: 1px solid rgb(200, 200, 250);
162
177
  }
163
178
 
164
- .ace-chrome .ace_storage,
165
- .ace-chrome .ace_keyword,
166
- .ace-chrome .ace_meta.ace_tag {
167
- color: rgb(147, 15, 128);
179
+ .ace-tm .ace_indent-guide {
180
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
168
181
  }
169
182
 
170
- .ace-chrome .ace_string.ace_regex {
171
- color: rgb(255, 0, 0)
183
+ .ace-tm .ace_indent-guide-active {
184
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
172
185
  }
186
+ `;});ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(L,T,H){T.isDark=!1,T.cssClass="ace-tm",T.cssText=L("./textmate-css"),T.$id="ace/theme/textmate";var E=L("../lib/dom");E.importCssString(T.cssText,T.cssClass,!1);});ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(L,T,H){"no use strict";var E=L("./lib/lang"),x=L("./lib/net"),M=L("./lib/dom"),s=L("./lib/app_config").AppConfig;H.exports=T=new s;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};T.get=function(n){if(!l.hasOwnProperty(n))throw new Error("Unknown config key: "+n);return l[n]},T.set=function(n,e){if(l.hasOwnProperty(n))l[n]=e;else if(this.setDefaultValue("",n,e)==!1)throw new Error("Unknown config key: "+n);n=="useStrictCSP"&&M.useStrictCSP(e);},T.all=function(){return E.copyObject(l)},T.$modes={},T.moduleUrl=function(n,e){if(l.$moduleUrls[n])return l.$moduleUrls[n];var o=n.split("/");e=e||o[o.length-2]||"";var a=e=="snippets"?"/":"-",u=o[o.length-1];if(e=="worker"&&a=="-"){var y=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");u=u.replace(y,"");}(!u||u==e)&&o.length>1&&(u=o[o.length-2]);var S=l[e+"Path"];return S==null?S=l.basePath:a=="/"&&(e=a=""),S&&S.slice(-1)!="/"&&(S+="/"),S+e+a+u+this.get("suffix")},T.setModuleUrl=function(n,e){return l.$moduleUrls[n]=e};var r=function(n,e){if(n==="ace/theme/textmate"||n==="./theme/textmate")return e(null,L("./theme/textmate"));if(t)return t(n,e);console.error("loader is not configured");},t;T.setLoader=function(n){t=n;},T.dynamicModules=Object.create(null),T.$loading={},T.$loaded={},T.loadModule=function(n,e){var o;if(Array.isArray(n))var a=n[0],u=n[1];else if(typeof n=="string")var u=n;var y=function(S){if(S&&!T.$loading[u])return e&&e(S);if(T.$loading[u]||(T.$loading[u]=[]),T.$loading[u].push(e),!(T.$loading[u].length>1)){var m=function(){r(u,function($,d){d&&(T.$loaded[u]=d),T._emit("load.module",{name:u,module:d});var h=T.$loading[u];T.$loading[u]=null,h.forEach(function(w){w&&w(d);});});};if(!T.get("packaged"))return m();x.loadScript(T.moduleUrl(u,a),m),i();}};if(T.dynamicModules[u])T.dynamicModules[u]().then(function(S){S.default?y(S.default):y(S);});else {try{o=this.$require(u);}catch{}y(o||T.$loaded[u]);}},T.$require=function(n){if(typeof H.require=="function"){var e="require";return H[e](n)}},T.setModuleLoader=function(n,e){T.dynamicModules[n]=e;};var i=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),i=function(){});};T.version="1.36.0";});ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(L,T,H){L("./lib/fixoldbrowsers");var E=L("./config");E.setLoader(function(l,r){L([l],function(t){r(null,t);});});var x=function(){return this||typeof window<"u"&&window}();H.exports=function(l){E.init=M,E.$require=L,l.require=L,typeof define=="function"&&(l.define=define);},M(!0);function M(l){if(!(!x||!x.document)){E.set("packaged",l||L.packaged||H.packaged||x.define&&define.packaged);var r={},t="",i=document.currentScript||document._currentScript,n=i&&i.ownerDocument||document;i&&i.src&&(t=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=n.getElementsByTagName("script"),o=0;o<e.length;o++){var a=e[o],u=a.src||a.getAttribute("src");if(u){for(var y=a.attributes,S=0,m=y.length;S<m;S++){var $=y[S];$.name.indexOf("data-ace-")===0&&(r[s($.name.replace(/^data-ace-/,""))]=$.value);}var d=u.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);d&&(t=d[1]);}}t&&(r.base=r.base||t,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var h in r)typeof r[h]<"u"&&E.set(h,r[h]);}}function s(l){return l.replace(/-(.)/g,function(r,t){return t.toUpperCase()})}});ace.define("ace/range",["require","exports","module"],function(L,T,H){var E=function(){function x(M,s,l,r){this.start={row:M,column:s},this.end={row:l,column:r};}return x.prototype.isEqual=function(M){return this.start.row===M.start.row&&this.end.row===M.end.row&&this.start.column===M.start.column&&this.end.column===M.end.column},x.prototype.toString=function(){return "Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},x.prototype.contains=function(M,s){return this.compare(M,s)==0},x.prototype.compareRange=function(M){var s,l=M.end,r=M.start;return s=this.compare(l.row,l.column),s==1?(s=this.compare(r.row,r.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(r.row,r.column),s==-1?-1:s==1?42:0)},x.prototype.comparePoint=function(M){return this.compare(M.row,M.column)},x.prototype.containsRange=function(M){return this.comparePoint(M.start)==0&&this.comparePoint(M.end)==0},x.prototype.intersects=function(M){var s=this.compareRange(M);return s==-1||s==0||s==1},x.prototype.isEnd=function(M,s){return this.end.row==M&&this.end.column==s},x.prototype.isStart=function(M,s){return this.start.row==M&&this.start.column==s},x.prototype.setStart=function(M,s){typeof M=="object"?(this.start.column=M.column,this.start.row=M.row):(this.start.row=M,this.start.column=s);},x.prototype.setEnd=function(M,s){typeof M=="object"?(this.end.column=M.column,this.end.row=M.row):(this.end.row=M,this.end.column=s);},x.prototype.inside=function(M,s){return this.compare(M,s)==0?!(this.isEnd(M,s)||this.isStart(M,s)):!1},x.prototype.insideStart=function(M,s){return this.compare(M,s)==0?!this.isEnd(M,s):!1},x.prototype.insideEnd=function(M,s){return this.compare(M,s)==0?!this.isStart(M,s):!1},x.prototype.compare=function(M,s){return !this.isMultiLine()&&M===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:M<this.start.row?-1:M>this.end.row?1:this.start.row===M?s>=this.start.column?0:-1:this.end.row===M?s<=this.end.column?0:1:0},x.prototype.compareStart=function(M,s){return this.start.row==M&&this.start.column==s?-1:this.compare(M,s)},x.prototype.compareEnd=function(M,s){return this.end.row==M&&this.end.column==s?1:this.compare(M,s)},x.prototype.compareInside=function(M,s){return this.end.row==M&&this.end.column==s?1:this.start.row==M&&this.start.column==s?-1:this.compare(M,s)},x.prototype.clipRows=function(M,s){if(this.end.row>s)var l={row:s+1,column:0};else if(this.end.row<M)var l={row:M,column:0};if(this.start.row>s)var r={row:s+1,column:0};else if(this.start.row<M)var r={row:M,column:0};return x.fromPoints(r||this.start,l||this.end)},x.prototype.extend=function(M,s){var l=this.compare(M,s);if(l==0)return this;if(l==-1)var r={row:M,column:s};else var t={row:M,column:s};return x.fromPoints(r||this.start,t||this.end)},x.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},x.prototype.isMultiLine=function(){return this.start.row!==this.end.row},x.prototype.clone=function(){return x.fromPoints(this.start,this.end)},x.prototype.collapseRows=function(){return this.end.column==0?new x(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new x(this.start.row,0,this.end.row,0)},x.prototype.toScreenRange=function(M){var s=M.documentToScreenPosition(this.start),l=M.documentToScreenPosition(this.end);return new x(s.row,s.column,l.row,l.column)},x.prototype.moveBy=function(M,s){this.start.row+=M,this.start.column+=s,this.end.row+=M,this.end.column+=s;},x}();E.fromPoints=function(x,M){return new E(x.row,x.column,M.row,M.column)},E.comparePoints=function(x,M){return x.row-M.row||x.column-M.column},T.Range=E;});ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(L,T,H){for(var E=L("./oop"),x={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},M={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)M["Digit"+s]=48+s,M["Numpad"+s]=96+s,x.PRINTABLE_KEYS[48+s]=""+s,x.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var l=String.fromCharCode(s+32);M["Key"+l.toUpperCase()]=s,x.PRINTABLE_KEYS[s]=l;}for(var s=1;s<13;s++)M["F"+s]=111+s,x.FUNCTION_KEYS[111+s]="F"+s;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var t in r)M[t]=M[t+"Left"]=M[t+"Right"]=r[t];T.$codeToKeyCode=M,x.PRINTABLE_KEYS[173]="-";for(var i in x.FUNCTION_KEYS){var n=x.FUNCTION_KEYS[i].toLowerCase();x[n]=parseInt(i,10);}for(var i in x.PRINTABLE_KEYS){var n=x.PRINTABLE_KEYS[i].toLowerCase();x[n]=parseInt(i,10);}E.mixin(x,x.MODIFIER_KEYS),E.mixin(x,x.PRINTABLE_KEYS),E.mixin(x,x.FUNCTION_KEYS),x.enter=x.return,x.escape=x.esc,x.del=x.delete,function(){for(var e=["cmd","ctrl","alt","shift"],o=Math.pow(2,e.length);o--;)x.KEY_MODS[o]=e.filter(function(a){return o&x.KEY_MODS[a]}).join("-")+"-";}(),x.KEY_MODS[0]="",x.KEY_MODS[-1]="input-",E.mixin(T,x),T.default=T,T.keyCodeToString=function(e){var o=x[e];return typeof o!="string"&&(o=String.fromCharCode(e)),o.toLowerCase()};});ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,T,H){var E=L("./keys"),x=L("./useragent"),M=null,s=0,l;function r(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}});}catch{}}function t(){return l==null&&r(),l}function i(S,m,$){this.elem=S,this.type=m,this.callback=$;}i.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0;};var n=T.addListener=function(S,m,$,d){S.addEventListener(m,$,t()),d&&d.$toDestroy.push(new i(S,m,$));},e=T.removeListener=function(S,m,$){S.removeEventListener(m,$,t());};T.stopEvent=function(S){return T.stopPropagation(S),T.preventDefault(S),!1},T.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation();},T.preventDefault=function(S){S.preventDefault&&S.preventDefault();},T.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||x.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},T.capture=function(S,m,$){var d=S&&S.ownerDocument||document;function h(w){m&&m(w),$&&$(w),e(d,"mousemove",m),e(d,"mouseup",h),e(d,"dragstart",h);}return n(d,"mousemove",m),n(d,"mouseup",h),n(d,"dragstart",h),h},T.addMouseWheelListener=function(S,m,$){n(S,"wheel",function(d){var h=.15,w=d.deltaX||0,C=d.deltaY||0;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=w*h,d.wheelY=C*h;break;case d.DOM_DELTA_LINE:var v=15;d.wheelX=w*v,d.wheelY=C*v;break;case d.DOM_DELTA_PAGE:var b=150;d.wheelX=w*b,d.wheelY=C*b;break}m(d);},$);},T.addMultiMouseDownListener=function(S,m,$,d,h){var w=0,C,v,b,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(c){if(T.getButton(c)!==0?w=0:c.detail>1?(w++,w>4&&(w=1)):w=1,x.isIE){var g=Math.abs(c.clientX-C)>5||Math.abs(c.clientY-v)>5;(!b||g)&&(w=1),b&&clearTimeout(b),b=setTimeout(function(){b=null;},m[w-1]||600),w==1&&(C=c.clientX,v=c.clientY);}if(c._clicks=w,$[d]("mousedown",c),w>4)w=0;else if(w>1)return $[d](f[w],c)}Array.isArray(S)||(S=[S]),S.forEach(function(c){n(c,"mousedown",p,h);});};function o(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)}T.getModifierString=function(S){return E.KEY_MODS[o(S)]};function a(S,m,$){var d=o(m);if(!$&&m.code&&($=E.$codeToKeyCode[m.code]||$),!x.isMac&&M){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(d|=8),M.altGr)if((3&d)!=3)M.altGr=0;else return;if($===18||$===17){var h=m.location;if($===17&&h===1)M[$]==1&&(s=m.timeStamp);else if($===18&&d===3&&h===2){var w=m.timeStamp-s;w<50&&(M.altGr=!0);}}}if($ in E.MODIFIER_KEYS&&($=-1),!(!d&&$===13&&m.location===3&&(S(m,d,-$),m.defaultPrevented))){if(x.isChromeOS&&d&8){if(S(m,d,$),m.defaultPrevented)return;d&=-9;}return !d&&!($ in E.FUNCTION_KEYS)&&!($ in E.PRINTABLE_KEYS)?!1:S(m,d,$)}}T.addCommandKeyListener=function(S,m,$){var d=null;n(S,"keydown",function(h){M[h.keyCode]=(M[h.keyCode]||0)+1;var w=a(m,h,h.keyCode);return d=h.defaultPrevented,w},$),n(S,"keypress",function(h){d&&(h.ctrlKey||h.altKey||h.shiftKey||h.metaKey)&&(T.stopEvent(h),d=null);},$),n(S,"keyup",function(h){M[h.keyCode]=null;},$),M||(u(),n(window,"focus",u));};function u(){M=Object.create(null);}if(typeof window=="object"&&window.postMessage&&!x.isOldIE){var y=1;T.nextTick=function(S,m){m=m||window;var $="zero-timeout-message-"+y++,d=function(h){h.data==$&&(T.stopPropagation(h),e(m,"message",d),S());};n(m,"message",d),m.postMessage($,"*");};}T.$idleBlocked=!1,T.onIdle=function(S,m){return setTimeout(function $(){T.$idleBlocked?setTimeout($,100):S();},m)},T.$idleBlockId=null,T.blockIdle=function(S){T.$idleBlockId&&clearTimeout(T.$idleBlockId),T.$idleBlocked=!0,T.$idleBlockId=setTimeout(function(){T.$idleBlocked=!1;},S||100);},T.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),T.nextFrame?T.nextFrame=T.nextFrame.bind(window):T.nextFrame=function(S){setTimeout(S,17);};});ace.define("ace/clipboard",["require","exports","module"],function(L,T,H){var E;H.exports={lineMode:!1,pasteCancelled:function(){return E&&E>Date.now()-50?!0:E=!1},cancel:function(){E=Date.now();}};});ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(L,T,H){var E=L("../lib/event"),x=L("../config").nls,M=L("../lib/useragent"),s=L("../lib/dom"),l=L("../lib/lang"),r=L("../clipboard"),t=M.isChrome<18,i=M.isIE,n=M.isChrome>63,e=400,o=L("../lib/keys"),a=o.KEY_MODS,u=M.isIOS,y=u?/\s/:/\n/,S=M.isMobile,m;m=function($,d){var h=s.createElement("textarea");h.className="ace_text-input",h.setAttribute("wrap","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off"),h.setAttribute("spellcheck","false"),h.style.opacity="0",$.insertBefore(h,$.firstChild);var w=!1,C=!1,v=!1,b=!1,f="";S||(h.style.fontSize="1px");var p=!1,c=!1,g="",A=0,k=0,R=0,_=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,I=0;try{var F=document.activeElement===h;}catch{}this.setNumberOfExtraLines=function(P){if(_=Number.MAX_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER,P<0){I=0;return}I=P;},this.setAriaOptions=function(P){if(P.activeDescendant?(h.setAttribute("aria-haspopup","true"),h.setAttribute("aria-autocomplete",P.inline?"both":"list"),h.setAttribute("aria-activedescendant",P.activeDescendant)):(h.setAttribute("aria-haspopup","false"),h.setAttribute("aria-autocomplete","both"),h.removeAttribute("aria-activedescendant")),P.role&&h.setAttribute("role",P.role),P.setLabel){h.setAttribute("aria-roledescription",x("text-input.aria-roledescription","editor"));var K="";if(d.$textInputAriaLabel&&(K+="".concat(d.$textInputAriaLabel,", ")),d.session){var Q=d.session.selection.cursor.row;K+=x("text-input.aria-label","Cursor at row $0",[Q+1]);}h.setAttribute("aria-label",K);}},this.setAriaOptions({role:"textbox"}),E.addListener(h,"blur",function(P){c||(d.onBlur(P),F=!1);},d),E.addListener(h,"focus",function(P){if(!c){if(F=!0,M.isEdge)try{if(!document.hasFocus())return}catch{}d.onFocus(P),M.isEdge?setTimeout(O):O();}},d),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:d.renderer.enableKeyboardAccessibility}),f||n||this.$focusScroll=="browser")return h.focus({preventScroll:!0});var P=h.style.top;h.style.position="fixed",h.style.top="0px";try{var K=h.getBoundingClientRect().top!=0;}catch{return}var Q=[];if(K)for(var X=h.parentElement;X&&X.nodeType==1;)Q.push(X),X.setAttribute("ace_nocontext","true"),!X.parentElement&&X.getRootNode?X=X.getRootNode().host:X=X.parentElement;h.focus({preventScroll:!0}),K&&Q.forEach(function(te){te.removeAttribute("ace_nocontext");}),setTimeout(function(){h.style.position="",h.style.top=="0px"&&(h.style.top=P);},0);},this.blur=function(){h.blur();},this.isFocused=function(){return F},d.on("beforeEndOperation",function(){var P=d.curOp,K=P&&P.command&&P.command.name;if(K!="insertstring"){var Q=K&&(P.docChanged||P.selectionChanged);v&&Q&&(g=h.value="",pe()),O();}});var N=function(P,K){for(var Q=K,X=1;X<=P-_&&X<2*I+1;X++)Q+=d.session.getLine(P-X).length+1;return Q},O=u?function(P){if(!(!F||w&&!P||b)){P||(P="");var K=`
187
+ ab`+P+`cde fg
188
+ `;K!=h.value&&(h.value=g=K);var Q=4,X=4+(P.length||(d.selection.isEmpty()?0:1));(A!=Q||k!=X)&&h.setSelectionRange(Q,X),A=Q,k=X;}}:function(){if(!(v||b)&&!(!F&&!j)){v=!0;var P=0,K=0,Q="";if(d.session){var X=d.selection,te=X.getRange(),oe=X.cursor.row;oe===D+1?(_=D+1,D=_+2*I):oe===_-1?(D=_-1,_=D-2*I):(oe<_-1||oe>D+1)&&(_=oe>I?oe-I:0,D=oe>I?oe+I:2*I);for(var le=[],se=_;se<=D;se++)le.push(d.session.getLine(se));if(Q=le.join(`
189
+ `),P=N(te.start.row,te.start.column),K=N(te.end.row,te.end.column),te.start.row<_){var re=d.session.getLine(_-1);P=te.start.row<_-1?0:P,K+=re.length+1,Q=re+`
190
+ `+Q;}else if(te.end.row>D){var ie=d.session.getLine(D+1);K=te.end.row>D+1?ie.length:te.end.column,K+=Q.length+1,Q=Q+`
191
+ `+ie;}else S&&oe>0&&(Q=`
192
+ `+Q,K+=1,P+=1);Q.length>e&&(P<e&&K<e?Q=Q.slice(0,e):(Q=`
193
+ `,P==K?P=K=0:(P=0,K=1)));var he=Q+`
173
194
 
174
- .ace-chrome .ace_string {
175
- color: #1A1AA6;
195
+ `;he!=g&&(h.value=g=he,A=k=he.length);}if(j&&(A=h.selectionStart,k=h.selectionEnd),k!=K||A!=P||h.selectionEnd!=k)try{h.setSelectionRange(P,K),A=P,k=K;}catch{}v=!1;}};this.resetSelection=O,F&&d.onFocus();var W=function(P){return P.selectionStart===0&&P.selectionEnd>=g.length&&P.value===g&&g&&P.selectionEnd!==k},B=function(P){v||(w?w=!1:W(h)?(d.selectAll(),O()):S&&h.selectionStart!=A&&O());},z=null;this.setInputHandler=function(P){z=P;},this.getInputHandler=function(){return z};var j=!1,U=function(P,K){if(j&&(j=!1),C)return O(),P&&d.onPaste(P),C=!1,"";for(var Q=h.selectionStart,X=h.selectionEnd,te=A,oe=g.length-k,le=P,se=P.length-Q,re=P.length-X,ie=0;te>0&&g[ie]==P[ie];)ie++,te--;for(le=le.slice(ie),ie=1;oe>0&&g.length-ie>A-1&&g[g.length-ie]==P[P.length-ie];)ie++,oe--;se-=ie-1,re-=ie-1;var he=le.length-ie+1;if(he<0&&(te=-he,he=0),le=le.slice(0,he),!K&&!le&&!se&&!te&&!oe&&!re)return "";b=!0;var Ae=!1;return M.isAndroid&&le==". "&&(le=" ",Ae=!0),le&&!te&&!oe&&!se&&!re||p?d.onTextInput(le):d.onTextInput(le,{extendLeft:te,extendRight:oe,restoreStart:se,restoreEnd:re}),b=!1,g=P,A=Q,k=X,R=re,Ae?`
196
+ `:le},V=function(P){if(v)return ne();if(P&&P.inputType){if(P.inputType=="historyUndo")return d.execCommand("undo");if(P.inputType=="historyRedo")return d.execCommand("redo")}var K=h.value,Q=U(K,!0);(K.length>e+100||y.test(Q)||S&&A<1&&A==k)&&O();},Y=function(P,K,Q){var X=P.clipboardData||window.clipboardData;if(!(!X||t)){var te=i||Q?"Text":"text/plain";try{return K?X.setData(te,K)!==!1:X.getData(te)}catch(oe){if(!Q)return Y(oe,K,!0)}}},G=function(P,K){var Q=d.getCopyText();if(!Q)return E.preventDefault(P);Y(P,Q)?(u&&(O(Q),w=Q,setTimeout(function(){w=!1;},10)),K?d.onCut():d.onCopy(),E.preventDefault(P)):(w=!0,h.value=Q,h.select(),setTimeout(function(){w=!1,O(),K?d.onCut():d.onCopy();}));},J=function(P){G(P,!0);},q=function(P){G(P,!1);},ee=function(P){var K=Y(P);r.pasteCancelled()||(typeof K=="string"?(K&&d.onPaste(K,P),M.isIE&&setTimeout(O),E.preventDefault(P)):(h.value="",C=!0));};E.addCommandKeyListener(h,function(P,K,Q){if(!v)return d.onCommandKey(P,K,Q)},d),E.addListener(h,"select",B,d),E.addListener(h,"input",V,d),E.addListener(h,"cut",J,d),E.addListener(h,"copy",q,d),E.addListener(h,"paste",ee,d),(!("oncut"in h)||!("oncopy"in h)||!("onpaste"in h))&&E.addListener($,"keydown",function(P){if(!(M.isMac&&!P.metaKey||!P.ctrlKey))switch(P.keyCode){case 67:q(P);break;case 86:ee(P);break;case 88:J(P);break}},d);var Z=function(P){if(!(v||!d.onCompositionStart||d.$readOnly)&&(v={},!p)){P.data&&(v.useTextareaForIME=!1),setTimeout(ne,0),d._signal("compositionStart"),d.on("mousedown",ge);var K=d.getSelectionRange();K.end.row=K.start.row,K.end.column=K.start.column,v.markerRange=K,v.selectionStart=A,d.onCompositionStart(v),v.useTextareaForIME?(g=h.value="",A=0,k=0):(h.msGetInputContext&&(v.context=h.msGetInputContext()),h.getInputContext&&(v.context=h.getInputContext()));}},ne=function(){if(!(!v||!d.onCompositionUpdate||d.$readOnly)){if(p)return ge();if(v.useTextareaForIME)d.onCompositionUpdate(h.value);else {var P=h.value;U(P),v.markerRange&&(v.context&&(v.markerRange.start.column=v.selectionStart=v.context.compositionStartOffset),v.markerRange.end.column=v.markerRange.start.column+k-v.selectionStart+R);}}},pe=function(P){!d.onCompositionEnd||d.$readOnly||(v=!1,d.onCompositionEnd(),d.off("mousedown",ge),P&&V());};function ge(){c=!0,h.blur(),h.focus(),c=!1;}var ue=l.delayedCall(ne,50).schedule.bind(null,null);function ae(P){P.keyCode==27&&h.value.length<h.selectionStart&&(v||(g=h.value),A=k=-1,O()),ue();}E.addListener(h,"compositionstart",Z,d),E.addListener(h,"compositionupdate",ne,d),E.addListener(h,"keyup",ae,d),E.addListener(h,"keydown",ue,d),E.addListener(h,"compositionend",pe,d),this.getElement=function(){return h},this.setCommandMode=function(P){p=P,h.readOnly=!1;},this.setReadOnly=function(P){p||(h.readOnly=P);},this.setCopyWithEmptySelection=function(P){},this.onContextMenu=function(P){j=!0,O(),d._emit("nativecontextmenu",{target:d,domEvent:P}),this.moveToMouse(P,!0);},this.moveToMouse=function(P,K){f||(f=h.style.cssText),h.style.cssText=(K?"z-index:100000;":"")+(M.isIE?"opacity:0.1;":"")+"text-indent: -"+(A+k)*d.renderer.characterWidth*.5+"px;";var Q=d.container.getBoundingClientRect(),X=s.computedStyle(d.container),te=Q.top+(parseInt(X.borderTopWidth)||0),oe=Q.left+(parseInt(Q.borderLeftWidth)||0),le=Q.bottom-te-h.clientHeight-2,se=function(re){s.translate(h,re.clientX-oe-2,Math.min(re.clientY-te-2,le));};se(P),P.type=="mousedown"&&(d.renderer.$isMousePressed=!0,clearTimeout(ce),M.isWin&&E.capture(d.container,se,we));},this.onContextMenuClose=we;var ce;function we(){clearTimeout(ce),ce=setTimeout(function(){f&&(h.style.cssText=f,f=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor();},0);}var me=function(P){d.textInput.onContextMenu(P),we();};E.addListener(h,"mouseup",me,d),E.addListener(h,"mousedown",function(P){P.preventDefault(),we();},d),E.addListener(d.renderer.scroller,"contextmenu",me,d),E.addListener(h,"contextmenu",me,d),u&&It($,d,h);function It(P,K,Q){var X=null,te=!1;Q.addEventListener("keydown",function(le){X&&clearTimeout(X),te=!0;},!0),Q.addEventListener("keyup",function(le){X=setTimeout(function(){te=!1;},100);},!0);var oe=function(le){if(document.activeElement===Q&&!(te||v||K.$mouseHandler.isMousePressed)&&!w){var se=Q.selectionStart,re=Q.selectionEnd,ie=null,he=0;if(se==0?ie=o.up:se==1?ie=o.home:re>k&&g[re]==`
197
+ `?ie=o.end:se<A&&g[se-1]==" "?(ie=o.left,he=a.option):se<A||se==A&&k!=A&&se==re?ie=o.left:re>k&&g.slice(0,re).split(`
198
+ `).length>2?ie=o.down:re>k&&g[re-1]==" "?(ie=o.right,he=a.option):(re>k||re==k&&k!=A&&se==re)&&(ie=o.right),se!==re&&(he|=a.shift),ie){var Ae=K.onCommandKey({},he,ie);if(!Ae&&K.commands){ie=o.keyCodeToString(ie);var Xe=K.commands.findKeyCommand(he,ie);Xe&&K.execCommand(Xe);}A=se,k=re,O("");}}};document.addEventListener("selectionchange",oe),K.on("destroy",function(){document.removeEventListener("selectionchange",oe);});}this.destroy=function(){h.parentElement&&h.parentElement.removeChild(h);};},T.TextInput=m,T.$setUserAgentForTests=function($,d){S=$,u=d;};});ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(L,T,H){var E=L("../lib/useragent"),x=0,M=550,s=function(){function t(i){i.$clickSelection=null;var n=i.editor;n.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),n.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),n.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),n.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),n.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){i[o]=this[o];},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange");}return t.prototype.onMouseDown=function(i){var n=i.inSelection(),e=i.getDocumentPosition();this.mousedownEvent=i;var o=this.editor,a=i.getButton();if(a!==0){var u=o.getSelectionRange(),y=u.isEmpty();(y||a==1)&&o.selection.moveToPosition(e),a==2&&(o.textInput.onContextMenu(i.domEvent),E.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),n&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(e,i.domEvent._clicks>1),i.preventDefault()},t.prototype.startSelect=function(i,n){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(i):n||e.selection.moveToPosition(i),n||this.select(),e.setStyle("ace_selecting"),this.setState("select"));},t.prototype.select=function(){var i,n=this.editor,e=n.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)i=this.$clickSelection.end;else if(o==1)i=this.$clickSelection.start;else {var a=r(this.$clickSelection,e);e=a.cursor,i=a.anchor;}n.selection.setSelectionAnchor(i.row,i.column);}n.selection.selectToPosition(e),n.renderer.scrollCursorIntoView();},t.prototype.extendSelectionBy=function(i){var n,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[i](o.row,o.column);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(a.start),y=this.$clickSelection.comparePoint(a.end);if(u==-1&&y<=0)n=this.$clickSelection.end,(a.end.row!=o.row||a.end.column!=o.column)&&(o=a.start);else if(y==1&&u>=0)n=this.$clickSelection.start,(a.start.row!=o.row||a.start.column!=o.column)&&(o=a.end);else if(u==-1&&y==1)o=a.end,n=a.start;else {var S=r(this.$clickSelection,o);o=S.cursor,n=S.anchor;}e.selection.setSelectionAnchor(n.row,n.column);}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView();},t.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting");},t.prototype.focusWait=function(){var i=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),n=Date.now();(i>x||n-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition());},t.prototype.onDoubleClick=function(i){var n=i.getDocumentPosition(),e=this.editor,o=e.session,a=o.getBracketRange(n);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(n.row,n.column),this.setState("selectByWords")),this.$clickSelection=a,this.select();},t.prototype.onTripleClick=function(i){var n=i.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var o=e.getSelectionRange();o.isMultiLine()&&o.contains(n.row,n.column)?(this.$clickSelection=e.selection.getLineRange(o.start.row),this.$clickSelection.end=e.selection.getLineRange(o.end.row).end):this.$clickSelection=e.selection.getLineRange(n.row),this.select();},t.prototype.onQuadClick=function(i){var n=this.editor;n.selectAll(),this.$clickSelection=n.getSelectionRange(),this.setState("selectAll");},t.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var n=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=i.domEvent.timeStamp,a=o-e.t,u=a?i.wheelX/a:e.vx,y=a?i.wheelY/a:e.vy;a<M&&(u=(u+e.vx)/2,y=(y+e.vy)/2);var S=Math.abs(u/y),m=!1;if(S>=1&&n.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(m=!0),S<=1&&n.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(m=!0),m)e.allowed=o;else if(o-e.allowed<M){var $=Math.abs(u)<=1.5*Math.abs(e.vx)&&Math.abs(y)<=1.5*Math.abs(e.vy);$?(m=!0,e.allowed=o):e.allowed=0;}if(e.t=o,e.vx=u,e.vy=y,m)return n.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},t}();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,T.DefaultHandlers=s;function l(t,i,n,e){return Math.sqrt(Math.pow(n-t,2)+Math.pow(e-i,2))}function r(t,i){if(t.start.row==t.end.row)var n=2*i.column-t.start.column-t.end.column;else if(t.start.row==t.end.row-1&&!t.start.column&&!t.end.column)var n=i.column-4;else var n=2*i.row-t.start.row-t.end.row;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}});ace.define("ace/lib/scroll",["require","exports","module"],function(L,T,H){T.preventParentScroll=function(x){x.stopPropagation();var M=x.currentTarget,s=M.scrollHeight>M.clientHeight;s||x.preventDefault();};});ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(L,T,H){var E=this&&this.__extends||function(){var a=function(u,y){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,m){S.__proto__=m;}||function(S,m){for(var $ in m)Object.prototype.hasOwnProperty.call(m,$)&&(S[$]=m[$]);},a(u,y)};return function(u,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");a(u,y);function S(){this.constructor=u;}u.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S);}}(),x=this&&this.__values||function(a){var u=typeof Symbol=="function"&&Symbol.iterator,y=u&&a[u],S=0;if(y)return y.call(a);if(a&&typeof a.length=="number")return {next:function(){return a&&S>=a.length&&(a=void 0),{value:a&&a[S++],done:!a}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},M=L("./lib/dom");L("./lib/event");var l=L("./range").Range,r=L("./lib/scroll").preventParentScroll,t="ace_tooltip",i=function(){function a(u){this.isOpen=!1,this.$element=null,this.$parentNode=u;}return a.prototype.$init=function(){return this.$element=M.createElement("div"),this.$element.className=t,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},a.prototype.getElement=function(){return this.$element||this.$init()},a.prototype.setText=function(u){this.getElement().textContent=u;},a.prototype.setHtml=function(u){this.getElement().innerHTML=u;},a.prototype.setPosition=function(u,y){this.getElement().style.left=u+"px",this.getElement().style.top=y+"px";},a.prototype.setClassName=function(u){M.addCssClass(this.getElement(),u);},a.prototype.setTheme=function(u){this.$element.className=t+" "+(u.isDark?"ace_dark ":"")+(u.cssClass||"");},a.prototype.show=function(u,y,S){u!=null&&this.setText(u),y!=null&&S!=null&&this.setPosition(y,S),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0);},a.prototype.hide=function(u){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=t,this.isOpen=!1);},a.prototype.getHeight=function(){return this.getElement().offsetHeight},a.prototype.getWidth=function(){return this.getElement().offsetWidth},a.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element);},a}(),n=function(){function a(){this.popups=[];}return a.prototype.addPopup=function(u){this.popups.push(u),this.updatePopups();},a.prototype.removePopup=function(u){var y=this.popups.indexOf(u);y!==-1&&(this.popups.splice(y,1),this.updatePopups());},a.prototype.updatePopups=function(){var u,y,S,m;this.popups.sort(function(p,c){return c.priority-p.priority});var $=[];try{for(var d=x(this.popups),h=d.next();!h.done;h=d.next()){var w=h.value,C=!0;try{for(var v=(S=void 0,x($)),b=v.next();!b.done;b=v.next()){var f=b.value;if(this.doPopupsOverlap(f,w)){C=!1;break}}}catch(p){S={error:p};}finally{try{b&&!b.done&&(m=v.return)&&m.call(v);}finally{if(S)throw S.error}}C?$.push(w):w.hide();}}catch(p){u={error:p};}finally{try{h&&!h.done&&(y=d.return)&&y.call(d);}finally{if(u)throw u.error}}},a.prototype.doPopupsOverlap=function(u,y){var S=u.getElement().getBoundingClientRect(),m=y.getElement().getBoundingClientRect();return S.left<m.right&&S.right>m.left&&S.top<m.bottom&&S.bottom>m.top},a}(),e=new n;T.popupManager=e,T.Tooltip=i;var o=function(a){E(u,a);function u(y){y===void 0&&(y=document.body);var S=a.call(this,y)||this;S.timeout=void 0,S.lastT=0,S.idleTime=350,S.lastEvent=void 0,S.onMouseOut=S.onMouseOut.bind(S),S.onMouseMove=S.onMouseMove.bind(S),S.waitForHover=S.waitForHover.bind(S),S.hide=S.hide.bind(S);var m=S.getElement();return m.style.whiteSpace="pre-wrap",m.style.pointerEvents="auto",m.addEventListener("mouseout",S.onMouseOut),m.tabIndex=-1,m.addEventListener("blur",function(){m.contains(document.activeElement)||this.hide();}.bind(S)),m.addEventListener("wheel",r),S}return u.prototype.addToEditor=function(y){y.on("mousemove",this.onMouseMove),y.on("mousedown",this.hide),y.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0);},u.prototype.removeFromEditor=function(y){y.off("mousemove",this.onMouseMove),y.off("mousedown",this.hide),y.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null);},u.prototype.onMouseMove=function(y,S){this.lastEvent=y,this.lastT=Date.now();var m=S.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||m||this.isOutsideOfText(this.lastEvent))&&this.hide();}this.timeout||m||(this.lastEvent=y,this.timeout=setTimeout(this.waitForHover,this.idleTime));},u.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var y=Date.now()-this.lastT;if(this.idleTime-y>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-y);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor);},u.prototype.isOutsideOfText=function(y){var S=y.editor,m=y.getDocumentPosition(),$=S.session.getLine(m.row);if(m.column==$.length){var d=S.renderer.pixelToScreenCoordinates(y.clientX,y.clientY),h=S.session.documentToScreenPosition(m.row,m.column);if(h.column!=d.column||h.row!=d.row)return !0}return !1},u.prototype.setDataProvider=function(y){this.$gatherData=y;},u.prototype.showForRange=function(y,S,m,$){var d=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var h=y.renderer;this.isOpen||(e.addPopup(this),this.$registerCloseEvents(),this.setTheme(h.theme)),this.isOpen=!0,this.addMarker(S,y.session),this.range=l.fromPoints(S.start,S.end);var w=h.textToScreenCoordinates(S.start.row,S.start.column),C=h.scroller.getBoundingClientRect();w.pageX<C.left&&(w.pageX=C.left);var v=this.getElement();v.innerHTML="",v.appendChild(m),v.style.maxHeight="",v.style.display="block";var b=v.clientHeight,f=v.clientWidth,p=window.innerHeight-w.pageY-h.lineHeight,c=!0;w.pageY-b<0&&w.pageY<p&&(c=!1),v.style.maxHeight=(c?w.pageY:p)-d+"px",v.style.top=c?"":w.pageY+h.lineHeight+"px",v.style.bottom=c?window.innerHeight-w.pageY+"px":"",v.style.left=Math.min(w.pageX,window.innerWidth-f-d)+"px";}},u.prototype.addMarker=function(y,S){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=S,this.marker=S&&S.addMarker(y,"ace_highlight-marker","text");},u.prototype.hide=function(y){!y&&document.activeElement==this.getElement()||y&&y.target&&(y.type!="keydown"||y.ctrlKey||y.metaKey)&&this.$element.contains(y.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,e.removePopup(this)));},u.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0);},u.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0);},u.prototype.onMouseOut=function(y){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!y.relatedTarget||this.getElement().contains(y.relatedTarget)||y&&y.currentTarget.contains(y.relatedTarget)||y.relatedTarget.classList.contains("ace_content")||this.hide());},u}(i);T.HoverTooltip=o;});ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(L,T,H){var E=this&&this.__extends||function(){var e=function(o,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,y){u.__proto__=y;}||function(u,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(u[S]=y[S]);},e(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(o,a);function u(){this.constructor=o;}o.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u);}}(),x=this&&this.__values||function(e){var o=typeof Symbol=="function"&&Symbol.iterator,a=o&&e[o],u=0;if(a)return a.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&u>=e.length&&(e=void 0),{value:e&&e[u++],done:!e}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},M=L("../lib/dom"),s=L("../lib/event"),l=L("../tooltip").Tooltip,r=L("../config").nls;L("../lib/lang");function i(e){var o=e.editor,a=o.renderer.$gutterLayer,u=new n(o);e.editor.setDefaultHandler("guttermousedown",function(h){if(!(!o.isFocused()||h.getButton()!=0)){var w=a.getRegion(h);if(w!="foldWidgets"){var C=h.getDocumentPosition().row,v=o.session.selection;if(h.getShiftKey())v.selectTo(C,0);else {if(h.domEvent.detail==2)return o.selectAll(),h.preventDefault();e.$clickSelection=o.selection.getLineRange(C);}return e.setState("selectByLines"),e.captureMouse(h),h.preventDefault()}}});var y,S;function m(){var h=S.getDocumentPosition().row,w=o.session.getLength();if(h==w){var C=o.renderer.pixelToScreenCoordinates(0,S.y).row,v=S.$pos;if(C>o.session.documentToScreenRow(v.row,v.column))return $()}if(u.showTooltip(h),!!u.isOpen)if(o.on("mousewheel",$),e.$tooltipFollowsMouse)d(S);else {var b=S.getGutterRow(),f=a.$lines.get(b);if(f){var p=f.element.querySelector(".ace_gutter_annotation"),c=p.getBoundingClientRect(),g=u.getElement().style;g.left=c.right+"px",g.top=c.bottom+"px";}else d(S);}}function $(){y&&(y=clearTimeout(y)),u.isOpen&&(u.hideTooltip(),o.off("mousewheel",$));}function d(h){u.setPosition(h.x,h.y);}e.editor.setDefaultHandler("guttermousemove",function(h){var w=h.domEvent.target||h.domEvent.srcElement;if(M.hasCssClass(w,"ace_fold-widget"))return $();u.isOpen&&e.$tooltipFollowsMouse&&d(h),S=h,!y&&(y=setTimeout(function(){y=null,S&&!e.isMousePressed?m():$();},50));}),s.addListener(o.renderer.$gutter,"mouseout",function(h){S=null,!(!u.isOpen||y)&&(y=setTimeout(function(){y=null,$();},50));},o),o.on("changeSession",$),o.on("input",$);}T.GutterHandler=i;var n=function(e){E(o,e);function o(a){var u=e.call(this,a.container)||this;return u.editor=a,u}return o.prototype.setPosition=function(a,u){var y=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight,m=this.getWidth(),$=this.getHeight();a+=15,u+=15,a+m>y&&(a-=a+m-y),u+$>S&&(u-=20+$),l.prototype.setPosition.call(this,a,u);},Object.defineProperty(o,"annotationLabels",{get:function(){return {error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),o.prototype.showTooltip=function(a){var u,y=this.editor.renderer.$gutterLayer,S=y.$annotations[a],m;S?m={displayText:Array.from(S.displayText),type:Array.from(S.type)}:m={displayText:[],type:[]};var $=y.session.getFoldLine(a);if($&&y.$showFoldedAnnotations){for(var d={error:[],security:[],warning:[],info:[],hint:[]},h={error:1,security:2,warning:3,info:4,hint:5},w,C=a+1;C<=$.end.row;C++)if(y.$annotations[C])for(var v=0;v<y.$annotations[C].text.length;v++){var b=y.$annotations[C].type[v];d[b].push(y.$annotations[C].text[v]),(!w||h[b]<h[w])&&(w=b);}if(["error","security","warning"].includes(w)){var f="".concat(o.annotationsToSummaryString(d)," in folded code.");m.displayText.push(f),m.type.push(w+"_fold");}}if(m.displayText.length===0)return this.hide();for(var p={error:[],security:[],warning:[],info:[],hint:[]},c=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",C=0;C<m.displayText.length;C++){var g=M.createElement("span"),A=M.createElement("span");(u=A.classList).add.apply(u,["ace_".concat(m.type[C]),c]),A.setAttribute("aria-label","".concat(o.annotationLabels[m.type[C].replace("_fold","")].singular)),A.setAttribute("role","img"),A.appendChild(M.createTextNode(" ")),g.appendChild(A),g.appendChild(M.createTextNode(m.displayText[C])),g.appendChild(M.createElement("br")),p[m.type[C].replace("_fold","")].push(g);}var k=this.getElement();M.removeChildren(k),p.error.forEach(function(R){return k.appendChild(R)}),p.security.forEach(function(R){return k.appendChild(R)}),p.warning.forEach(function(R){return k.appendChild(R)}),p.info.forEach(function(R){return k.appendChild(R)}),p.hint.forEach(function(R){return k.appendChild(R)}),k.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this);},o.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this);},o.annotationsToSummaryString=function(a){var u,y,S=[],m=["error","security","warning","info","hint"];try{for(var $=x(m),d=$.next();!d.done;d=$.next()){var h=d.value;if(a[h].length){var w=a[h].length===1?o.annotationLabels[h].singular:o.annotationLabels[h].plural;S.push("".concat(a[h].length," ").concat(w));}}}catch(C){u={error:C};}finally{try{d&&!d.done&&(y=$.return)&&y.call($);}finally{if(u)throw u.error}}return S.join(", ")},o}(l);T.GutterTooltip=n;});ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,T,H){var E=L("../lib/event"),x=L("../lib/useragent"),M=function(){function s(l,r){this.speed,this.wheelX,this.wheelY,this.domEvent=l,this.editor=r,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1;}return s.prototype.stopPropagation=function(){E.stopPropagation(this.domEvent),this.propagationStopped=!0;},s.prototype.preventDefault=function(){E.preventDefault(this.domEvent),this.defaultPrevented=!0;},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault();},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(l,0),t=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-t},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,r=l.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else {var t=this.getDocumentPosition();this.$inSelection=r.contains(t.row,t.column);}return this.$inSelection},s.prototype.getButton=function(){return E.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return x.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s}();T.MouseEvent=M;});ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(L,T,H){var E=L("../lib/dom"),x=L("../lib/event"),M=L("../lib/useragent"),s=200,l=200,r=5;function t(n){var e=n.editor,o=E.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent="\xA0";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(N){n[N]=this[N];},this),e.on("mousedown",this.onMouseDown.bind(n));var u=e.container,y,S,m,$,d,h,w=0,C,v,b,f,p;this.onDragStart=function(N){if(this.cancelDrag||!u.draggable){var O=this;return setTimeout(function(){O.startSelect(),O.captureMouse(N);},0),N.preventDefault()}d=e.getSelectionRange();var W=N.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){e.container.removeChild(o);}),W.clearData(),W.setData("Text",e.session.getTextRange()),v=!0,this.setState("drag");},this.onDragEnd=function(N){if(u.draggable=!1,v=!1,this.setState(null),!e.getReadOnly()){var O=N.dataTransfer.dropEffect;!C&&O=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle();}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("");},this.onDragEnter=function(N){if(!(e.getReadOnly()||!I(N.dataTransfer)))return S=N.clientX,m=N.clientY,y||k(),w++,N.dataTransfer.dropEffect=C=F(N),x.preventDefault(N)},this.onDragOver=function(N){if(!(e.getReadOnly()||!I(N.dataTransfer)))return S=N.clientX,m=N.clientY,y||(k(),w++),_!==null&&(_=null),N.dataTransfer.dropEffect=C=F(N),x.preventDefault(N)},this.onDragLeave=function(N){if(w--,w<=0&&y)return R(),C=null,x.preventDefault(N)},this.onDrop=function(N){if(h){var O=N.dataTransfer;if(v)switch(C){case"move":d.contains(h.row,h.column)?d={start:h,end:h}:d=e.moveText(d,h);break;case"copy":d=e.moveText(d,h,!0);break}else {var W=O.getData("Text");d={start:h,end:e.session.insert(h,W)},e.focus(),C=null;}return R(),x.preventDefault(N)}},x.addListener(u,"dragstart",this.onDragStart.bind(n),e),x.addListener(u,"dragend",this.onDragEnd.bind(n),e),x.addListener(u,"dragenter",this.onDragEnter.bind(n),e),x.addListener(u,"dragover",this.onDragOver.bind(n),e),x.addListener(u,"dragleave",this.onDragLeave.bind(n),e),x.addListener(u,"drop",this.onDrop.bind(n),e);function c(N,O){var W=Date.now(),B=!O||N.row!=O.row,z=!O||N.column!=O.column;if(!f||B||z)e.moveCursorToPosition(N),f=W,p={x:S,y:m};else {var j=i(p.x,p.y,S,m);j>r?f=null:W-f>=l&&(e.renderer.scrollCursorIntoView(),f=null);}}function g(N,O){var W=Date.now(),B=e.renderer.layerConfig.lineHeight,z=e.renderer.layerConfig.characterWidth,j=e.renderer.scroller.getBoundingClientRect(),U={x:{left:S-j.left,right:j.right-S},y:{top:m-j.top,bottom:j.bottom-m}},V=Math.min(U.x.left,U.x.right),Y=Math.min(U.y.top,U.y.bottom),G={row:N.row,column:N.column};V/z<=2&&(G.column+=U.x.left<U.x.right?-3:2),Y/B<=1&&(G.row+=U.y.top<U.y.bottom?-1:1);var J=N.row!=G.row,q=N.column!=G.column,ee=!O||N.row!=O.row;J||q&&!ee?b?W-b>=s&&e.renderer.scrollCursorIntoView(G):b=W:b=null;}function A(){var N=h;h=e.renderer.screenToTextCoordinates(S,m),c(h,N),g(h,N);}function k(){d=e.selection.toOrientedRange(),y=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval($),A(),$=setInterval(A,20),w=0,x.addListener(document,"mousemove",D);}function R(){clearInterval($),e.session.removeMarker(y),y=null,e.selection.fromOrientedRange(d),e.isFocused()&&!v&&e.$resetCursorStyle(),d=null,h=null,w=0,b=null,f=null,x.removeListener(document,"mousemove",D);}var _=null;function D(){_==null&&(_=setTimeout(function(){_!=null&&y&&R();},20));}function I(N){var O=N.types;return !O||Array.prototype.some.call(O,function(W){return W=="text/plain"||W=="Text"})}function F(N){var O=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],B=M.isMac?N.altKey:N.ctrlKey,z="uninitialized";try{z=N.dataTransfer.effectAllowed.toLowerCase();}catch{}var j="none";return B&&O.indexOf(z)>=0?j="copy":W.indexOf(z)>=0?j="move":O.indexOf(z)>=0&&(j="copy"),j}}(function(){this.dragWait=function(){var n=Date.now()-this.mousedownEvent.time;n>this.editor.getDragDelay()&&this.startDrag();},this.dragWaitEnd=function(){var n=this.editor.container;n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd();},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd();},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor,e=n.container;e.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging");var o=M.isWin?"default":"move";n.renderer.setCursorStyle(o),this.setState("dragReady");},this.onMouseDrag=function(n){var e=this.editor.container;if(M.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop();}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()));}},this.onMouseDown=function(n){if(this.$dragEnabled){this.mousedownEvent=n;var e=this.editor,o=n.inSelection(),a=n.getButton(),u=n.domEvent.detail||1;if(u===1&&a===0&&o){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=n.domEvent.target||n.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),e.getDragDelay()){if(M.isWebKit){this.cancelDrag=!0;var S=e.container;S.draggable=!0;}this.setState("dragWait");}else this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0;}}};}).call(t.prototype);function i(n,e,o,a){return Math.sqrt(Math.pow(o-n,2)+Math.pow(a-e,2))}T.DragdropHandler=t;});ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(L,T,H){var E=L("./mouse_event").MouseEvent,x=L("../lib/event"),M=L("../lib/dom");T.addTouchListeners=function(s,l){var r="scroll",t,i,n,e,o,a,u=0,y,S=0,m=0,$=0,d,h;function w(){var c=window.navigator&&window.navigator.clipboard,g=!1,A=function(){var _=l.getCopyText(),D=l.session.getUndoManager().hasUndo();h.replaceChild(M.buildDom(g?["span",!_&&k("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&k("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&k("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],c&&k("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&k("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],k("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],k("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),h.firstChild);},k=function(_){return l.commands.canExecute(_,l)},R=function(_){var D=_.target.getAttribute("action");if(D=="more"||!g)return g=!g,A();D=="paste"?c.readText().then(function(I){l.execCommand(D,I);}):D&&((D=="cut"||D=="copy")&&(c?c.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(D)),h.firstChild.style.display="none",g=!1,D!="openCommandPalette"&&l.focus();};h=M.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){r="menu",_.stopPropagation(),_.preventDefault(),l.textInput.focus();},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),R(_);},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container);}function C(){if(!l.getOption("enableMobileMenu")){h&&v();return}h||w();var c=l.selection.cursor,g=l.renderer.textToScreenCoordinates(c.row,c.column),A=l.renderer.textToScreenCoordinates(0,0).pageX,k=l.renderer.scrollLeft,R=l.container.getBoundingClientRect();h.style.top=g.pageY-R.top-3+"px",g.pageX-R.left<R.width-70?(h.style.left="",h.style.right="10px"):(h.style.right="",h.style.left=A+k-R.left+"px"),h.style.display="",h.firstChild.style.display="none",l.on("input",v);}function v(c){h&&(h.style.display="none"),l.off("input",v);}function b(){o=null,clearTimeout(o);var c=l.selection.getRange(),g=c.contains(y.row,y.column);(c.isEmpty()||!g)&&(l.selection.moveToPosition(y),l.selection.selectWord()),r="wait",C();}function f(){o=null,clearTimeout(o),l.selection.moveToPosition(y);var c=S>=2?l.selection.getLineRange(y.row):l.session.getBracketRange(y);c&&!c.isEmpty()?l.selection.setRange(c):l.selection.selectWord(),r="wait";}x.addListener(s,"contextmenu",function(c){if(d){var g=l.textInput.getElement();g.focus();}},l),x.addListener(s,"touchstart",function(c){var g=c.touches;if(o||g.length>1){clearTimeout(o),o=null,n=-1,r="zoom";return}d=l.$mouseHandler.isMousePressed=!0;var A=l.renderer.layerConfig.lineHeight,k=l.renderer.layerConfig.lineHeight,R=c.timeStamp;e=R;var _=g[0],D=_.clientX,I=_.clientY;Math.abs(t-D)+Math.abs(i-I)>A&&(n=-1),t=c.clientX=D,i=c.clientY=I,m=$=0;var F=new E(c,l);if(y=F.getDocumentPosition(),R-n<500&&g.length==1&&!u)S++,c.preventDefault(),c.button=0,f();else {S=0;var N=l.selection.cursor,O=l.selection.isEmpty()?N:l.selection.anchor,W=l.renderer.$cursorLayer.getPixelPosition(N,!0),B=l.renderer.$cursorLayer.getPixelPosition(O,!0),z=l.renderer.scroller.getBoundingClientRect(),j=l.renderer.layerConfig.offset,U=l.renderer.scrollLeft,V=function(J,q){return J=J/k,q=q/A-.75,J*J+q*q};if(c.clientX<z.left){r="zoom";return}var Y=V(c.clientX-z.left-W.left+U,c.clientY-z.top-W.top+j),G=V(c.clientX-z.left-B.left+U,c.clientY-z.top-B.top+j);Y<3.5&&G<3.5&&(r=Y>G?"cursor":"anchor"),G<3.5?r="anchor":Y<3.5?r="cursor":r="scroll",o=setTimeout(b,450);}n=R;},l),x.addListener(s,"touchend",function(c){d=l.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),r=="zoom"?(r="",u=0):o?(l.selection.moveToPosition(y),u=0,C()):r=="scroll"?(p(),v()):C(),clearTimeout(o),o=null;},l),x.addListener(s,"touchmove",function(c){o&&(clearTimeout(o),o=null);var g=c.touches;if(!(g.length>1||r=="zoom")){var A=g[0],k=t-A.clientX,R=i-A.clientY;if(r=="wait")if(k*k+R*R>4)r="cursor";else return c.preventDefault();t=A.clientX,i=A.clientY,c.clientX=A.clientX,c.clientY=A.clientY;var _=c.timeStamp,D=_-e;if(e=_,r=="scroll"){var I=new E(c,l);I.speed=1,I.wheelX=k,I.wheelY=R,10*Math.abs(k)<Math.abs(R)&&(k=0),10*Math.abs(R)<Math.abs(k)&&(R=0),D!=0&&(m=k/D,$=R/D),l._emit("mousewheel",I),I.propagationStopped||(m=$=0);}else {var F=new E(c,l),N=F.getDocumentPosition();r=="cursor"?l.selection.moveCursorToPosition(N):r=="anchor"&&l.selection.setSelectionAnchor(N.row,N.column),l.renderer.scrollCursorIntoView(N),c.preventDefault();}}},l);function p(){u+=60,a=setInterval(function(){u--<=0&&(clearInterval(a),a=null),Math.abs(m)<.01&&(m=0),Math.abs($)<.01&&($=0),u<20&&(m=.9*m),u<20&&($=.9*$);var c=l.session.getScrollTop();l.renderer.scrollBy(10*m,10*$),c==l.session.getScrollTop()&&(u=0);},10);}};});ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(L,T,H){var E=L("../lib/event"),x=L("../lib/useragent"),M=L("./default_handlers").DefaultHandlers,s=L("./default_gutter_handler").GutterHandler,l=L("./mouse_event").MouseEvent,r=L("./dragdrop_handler").DragdropHandler,t=L("./touch_handler").addTouchListeners,i=L("../config"),n=function(){function e(o){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=o,new M(this),new s(this),new r(this);var u=function(m){var $=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());$&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus();});},y=o.renderer.getMouseEventTarget();E.addListener(y,"click",this.onMouseEvent.bind(this,"click"),o),E.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),E.addMultiMouseDownListener([y,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),E.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),t(o.container,o);var S=o.renderer.$gutter;E.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),E.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),o),E.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),E.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),E.addListener(y,"mousedown",u,o),E.addListener(S,"mousedown",u,o),x.isIE&&o.renderer.scrollBarV&&(E.addListener(o.renderer.scrollBarV.element,"mousedown",u,o),E.addListener(o.renderer.scrollBarH.element,"mousedown",u,o)),o.on("mousemove",function(m){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var $=o.renderer.screenToTextCoordinates(m.x,m.y),d=o.session.selection.getRange(),h=o.renderer;!d.isEmpty()&&d.insideStart($.row,$.column)?h.setCursorStyle("default"):h.setCursorStyle("");}},o);}return e.prototype.onMouseEvent=function(o,a){this.editor.session&&this.editor._emit(o,new l(a,this.editor));},e.prototype.onMouseMove=function(o,a){var u=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!u||!u.length||this.editor._emit(o,new l(a,this.editor));},e.prototype.onMouseWheel=function(o,a){var u=new l(a,this.editor);u.speed=this.$scrollSpeed*2,u.wheelX=a.wheelX,u.wheelY=a.wheelY,this.editor._emit(o,u);},e.prototype.setState=function(o){this.state=o;},e.prototype.captureMouse=function(o,a){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var u=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var S=this,m=function(C){if(C){if(x.isWebKit&&!C.which&&S.releaseMouse)return S.releaseMouse();S.x=C.clientX,S.y=C.clientY,a&&a(C),S.mouseEvent=new l(C,S.editor),S.$mouseMoved=!0;}},$=function(C){u.off("beforeEndOperation",h),clearInterval(w),u.session&&d(),S[S.state+"End"]&&S[S.state+"End"](C),S.state="",S.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,C&&S.onMouseEvent("mouseup",C),u.endOperation();},d=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1;};if(x.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){$(o);});var h=function(C){S.releaseMouse&&u.curOp.command.name&&u.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse());};u.on("beforeEndOperation",h),u.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=m,S.releaseMouse=E.capture(this.editor.container,m,$);var w=setInterval(d,20);},e.prototype.cancelContextMenu=function(){var o=function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),a&&a.domEvent&&E.stopEvent(a.domEvent));}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o);},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse();},e}();n.prototype.releaseMouse=null,i.defineOptions(n.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:x.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),T.MouseHandler=n;});ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(L,T,H){var E=L("../lib/dom"),x=function(){function M(s){s.on("click",function(l){var r=l.getDocumentPosition(),t=s.session,i=t.getFoldAt(r.row,r.column,1);i&&(l.getAccelKey()?t.removeFold(i):t.expandFold(i),l.stop());var n=l.domEvent&&l.domEvent.target;n&&E.hasCssClass(n,"ace_inline_button")&&E.hasCssClass(n,"ace_toggle_wrap")&&(t.setOption("wrap",!t.getUseWrapMode()),s.renderer.scrollCursorIntoView());}),s.on("gutterclick",function(l){var r=s.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var t=l.getDocumentPosition().row,i=s.session;i.foldWidgets&&i.foldWidgets[t]&&s.session.onFoldWidgetClick(t,l),s.isFocused()||s.focus(),l.stop();}}),s.on("gutterdblclick",function(l){var r=s.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var t=l.getDocumentPosition().row,i=s.session,n=i.getParentFoldRangeData(t,!0),e=n.range||n.firstRange;if(e){t=e.start.row;var o=i.getFoldAt(t,i.getLine(t).length,1);o?i.removeFold(o):(i.addFold("...",e),s.renderer.scrollCursorIntoView({row:e.start.row,column:0}));}l.stop();}});}return M}();T.FoldHandler=x;});ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(L,T,H){var E=L("../lib/keys"),x=L("../lib/event"),M=function(){function s(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands);}return s.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0);},s.prototype.setKeyboardHandler=function(l){var r=this.$handlers;if(r[r.length-1]!=l){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(l,1);}},s.prototype.addKeyboardHandler=function(l,r){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var t=this.$handlers.indexOf(l);t!=-1&&this.$handlers.splice(t,1),r==null?this.$handlers.push(l):this.$handlers.splice(r,0,l),t==-1&&l.attach&&l.attach(this.$editor);}},s.prototype.removeKeyboardHandler=function(l){var r=this.$handlers.indexOf(l);return r==-1?!1:(this.$handlers.splice(r,1),l.detach&&l.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var l=this.$data,r=l.editor;return this.$handlers.map(function(t){return t.getStatusText&&t.getStatusText(r,l)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(l,r,t,i){for(var n,e=!1,o=this.$editor.commands,a=this.$handlers.length;a--&&(n=this.$handlers[a].handleKeyboard(this.$data,l,r,t,i),!(!(!n||!n.command)&&(n.command=="null"?e=!0:e=o.exec(n.command,this.$editor,n.args,i),e&&i&&l!=-1&&n.passEvent!=!0&&n.command.passEvent!=!0&&x.stopEvent(i),e))););return !e&&l==-1&&(n={command:"insertstring"},e=o.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",n),e},s.prototype.onCommandKey=function(l,r,t){var i=E.keyCodeToString(t);return this.$callKeyboardHandlers(r,i,t,l)},s.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},s}();T.KeyBinding=M;});ace.define("ace/lib/bidiutil",["require","exports","module"],function(L,T,H){var M=0,s=0,l=!1,t=!1,i=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,y=1,S=0,m=1,$=2,d=3,h=4,w=5,C=6,v=7,b=8,f=9,p=10,c=11,g=12,A=13,k=14,R=15,_=16,D=17,I=18,F=[I,I,I,I,I,I,I,I,I,C,w,C,b,w,I,I,I,I,I,I,I,I,I,I,I,I,I,I,w,w,w,C,b,h,h,c,c,c,h,h,h,h,h,p,f,p,f,f,$,$,$,$,$,$,$,$,$,$,f,h,h,h,h,h,h,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,h,h,h,h,h,h,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,h,h,h,h,I,I,I,I,I,I,w,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,f,h,c,c,c,c,h,h,h,h,S,h,h,I,h,h,c,c,$,$,h,S,h,h,h,$,S,h,h,h,h,h],N=[b,b,b,b,b,b,b,b,b,b,b,I,I,I,S,m,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,b,w,A,k,R,_,D,f,c,c,c,c,c,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,f,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,b];function O(U,V,Y,G){var J=M?a:o,q=null,ee=null,Z=null,ne=0,pe=null,ge=null,ue=-1,ae=null,ce=null,we=[];if(!G)for(ae=0,G=[];ae<Y;ae++)G[ae]=z(U[ae]);for(s=M,l=!1,t=!1,i=!1,ce=0;ce<Y;ce++){if(q=ne,we[ce]=ee=B(U,G,we,ce),ne=J[q][ee],pe=ne&240,ne&=15,V[ce]=Z=J[ne][5],pe>0)if(pe==16){for(ae=ue;ae<ce;ae++)V[ae]=1;ue=-1;}else ue=-1;if(ge=J[ne][6],ge)ue==-1&&(ue=ce);else if(ue>-1){for(ae=ue;ae<ce;ae++)V[ae]=Z;ue=-1;}G[ce]==w&&(V[ce]=0),s|=Z;}if(i){for(ae=0;ae<Y;ae++)if(G[ae]==C){V[ae]=M;for(var me=ae-1;me>=0&&G[me]==b;me--)V[me]=M;}}}function W(U,V,Y){if(!(s<U)){if(U==1&&M==y&&!t){Y.reverse();return}for(var G=Y.length,J=0,q,ee,Z,ne;J<G;){if(V[J]>=U){for(q=J+1;q<G&&V[q]>=U;)q++;for(ee=J,Z=q-1;ee<Z;ee++,Z--)ne=Y[ee],Y[ee]=Y[Z],Y[Z]=ne;J=q;}J++;}}}function B(U,V,Y,G){var J=V[G],q,ee,Z,ne;switch(J){case S:case m:l=!1;case h:case d:return J;case $:return l?d:$;case v:return l=!0,m;case b:return h;case f:return G<1||G+1>=V.length||(q=Y[G-1])!=$&&q!=d||(ee=V[G+1])!=$&&ee!=d?h:(l&&(ee=d),ee==q?ee:h);case p:return q=G>0?Y[G-1]:w,q==$&&G+1<V.length&&V[G+1]==$?$:h;case c:if(G>0&&Y[G-1]==$)return $;if(l)return h;for(ne=G+1,Z=V.length;ne<Z&&V[ne]==c;)ne++;return ne<Z&&V[ne]==$?$:h;case g:for(Z=V.length,ne=G+1;ne<Z&&V[ne]==g;)ne++;if(ne<Z){var pe=U[G],ge=pe>=1425&&pe<=2303||pe==64286;if(q=V[ne],ge&&(q==m||q==v))return m}return G<1||(q=V[G-1])==w?h:Y[G-1];case w:return l=!1,t=!0,M;case C:return i=!0,h;case A:case k:case _:case D:case R:l=!1;case I:return h}}function z(U){var V=U.charCodeAt(0),Y=V>>8;return Y==0?V>191?S:F[V]:Y==5?/[\u0591-\u05f4]/.test(U)?m:S:Y==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(U)?g:/[\u0660-\u0669\u066b-\u066c]/.test(U)?d:V==1642?c:/[\u06f0-\u06f9]/.test(U)?$:v:Y==32&&V<=8287?N[V&255]:Y==254&&V>=65136?v:h}T.L=S,T.R=m,T.EN=$,T.ON_R=3,T.AN=4,T.R_H=5,T.B=6,T.RLE=7,T.DOT="\xB7",T.doBidiReorder=function(U,V,Y){if(U.length<2)return {};var G=U.split(""),J=new Array(G.length),q=new Array(G.length),ee=[];M=Y?y:u,O(G,ee,G.length,V);for(var Z=0;Z<J.length;J[Z]=Z,Z++);W(2,ee,J),W(1,ee,J);for(var Z=0;Z<J.length-1;Z++)V[Z]===d?ee[Z]=T.AN:ee[Z]===m&&(V[Z]>v&&V[Z]<A||V[Z]===h||V[Z]===I)?ee[Z]=T.ON_R:Z>0&&G[Z-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(G[Z])&&(ee[Z-1]=ee[Z]=T.R_H,Z++);G[G.length-1]===T.DOT&&(ee[G.length-1]=T.B),G[0]==="\u202B"&&(ee[0]=T.RLE);for(var Z=0;Z<J.length;Z++)q[Z]=ee[J[Z]];return {logicalFromVisual:J,bidiLevels:q}},T.hasBidiCharacters=function(U,V){for(var Y=!1,G=0;G<U.length;G++)V[G]=z(U.charAt(G)),!Y&&(V[G]==m||V[G]==v||V[G]==d)&&(Y=!0);return Y},T.getVisualFromLogicalIdx=function(U,V){for(var Y=0;Y<V.logicalFromVisual.length;Y++)if(V.logicalFromVisual[Y]==U)return Y;return 0};});ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(L,T,H){var E=L("./lib/bidiutil"),x=L("./lib/lang"),M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function l(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=E,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=M.test(r.getValue());}return l.prototype.isBidiRow=function(r,t,i){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(t,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&M.test(r.lines.join(`
199
+ `))&&(this.seenBidi=!0,this.currentRow=null);},l.prototype.getDocumentRow=function(){var r=0,t=this.session.$screenRowCache;if(t.length){var i=this.session.$getRowCacheIndex(t,this.currentRow);i>=0&&(r=this.session.$docRowCache[i]);}return r},l.prototype.getSplitIndex=function(){var r=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-r>0&&(i=this.session.$getRowCacheIndex(t,this.currentRow-r-1),i===n);)n=i,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,t){r===void 0&&(r=this.getDocumentRow());var i=r===this.session.getLength()-1,n=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(t===void 0&&(t=this.getSplitIndex()),t>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[E.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t]),t==e.length&&(this.line+=this.showInvisibles?n:E.DOT));}else this.line+=this.showInvisibles?n:E.DOT;var o=this.session,a=0,u;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,S){return y===" "||o.isFullWidth(y.charCodeAt(0))?(u=y===" "?o.getScreenTabSize(S+a):2,a+=u-1,x.stringRepeat(E.DOT,u)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==E.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width);},l.prototype.updateBidiMap=function(){var r=[];E.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=E.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={};},l.prototype.markAsDirty=function(){this.currentRow=null;},l.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var t=this.characterWidth=r.$characterSize.width,i=r.$measureCharWidth("\u05D4");this.charWidths[E.L]=this.charWidths[E.EN]=this.charWidths[E.ON_R]=t,this.charWidths[E.R]=this.charWidths[E.AN]=i,this.charWidths[E.R_H]=i*.45,this.charWidths[E.B]=this.charWidths[E.RLE]=0,this.currentRow=null;}},l.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null;},l.prototype.setEolChar=function(r){this.EOL=r;},l.prototype.setContentWidth=function(r){this.contentWidth=r;},l.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(r,t){for(var i=r.getCursorPosition(),n=r.selection.getSelectionAnchor().row;n<=i.row;n++)!t&&r.session.getLine(n).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(n,0,1):t&&r.session.getLine(n).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:n},r.session.$bidiHandler.RLE);},l.prototype.getPosLeft=function(r){r-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,i=r>t?this.session.getOverwrite()?r:r-1:t,n=E.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&r<=t&&e[n]%2!==0&&n++;for(var a=0;a<n;a++)o+=this.charWidths[e[a]];return !this.session.getOverwrite()&&r>t&&e[n]%2===0&&(o+=this.charWidths[e[n]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},l.prototype.getSelections=function(r,t){var i=this.bidiMap,n=i.bidiLevels,e,o=[],a=0,u=Math.min(r,t)-this.wrapIndent,y=Math.max(r,t)-this.wrapIndent,S=!1,m=!1,$=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,h=0;h<n.length;h++)d=i.logicalFromVisual[h],e=n[h],S=d>=u&&d<y,S&&!m?$=a:!S&&m&&o.push({left:$,width:a-$}),a+=this.charWidths[e],m=S;if(S&&h===n.length&&o.push({left:$,width:a-$}),this.isRtlDir)for(var w=0;w<o.length;w++)o[w].left+=this.rtlLineOffset;return o},l.prototype.offsetToCol=function(i){this.isRtlDir&&(i-=this.rtlLineOffset);var t=0,i=Math.max(i,0),n=0,e=0,o=this.bidiMap.bidiLevels,a=this.charWidths[o[e]];for(this.wrapIndent&&(i-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i>n+a/2;){if(n+=a,e===o.length-1){a=0;break}a=this.charWidths[o[++e]];}return e>0&&o[e-1]%2!==0&&o[e]%2===0?(i<n&&e--,t=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?t=1+(i>n?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===o.length-1&&a===0&&o[e-1]%2===0||!this.isRtlDir&&e===0&&o[e]%2!==0?t=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&a!==0&&e--,t=this.bidiMap.logicalFromVisual[e]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},l}();T.BidiHandler=s;});ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(L,T,H){var E=L("./lib/oop"),x=L("./lib/lang"),M=L("./lib/event_emitter").EventEmitter,s=L("./range").Range,l=function(){function r(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(n){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&n.old.column!=n.value.column&&(i.$desiredColumn=null);}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection");});}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return !this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(t,i){this.$isEmpty=!1,this.anchor.setPosition(t,i);},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var t=this.anchor,i=this.lead;return t.row>i.row||t.row==i.row&&t.column>i.column},r.prototype.getRange=function(){var t=this.anchor,i=this.lead;return this.$isEmpty?s.fromPoints(i,i):this.isBackwards()?s.fromPoints(i,t):s.fromPoints(t,i)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"));},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE);},r.prototype.setRange=function(t,i){var n=i?t.end:t.start,e=i?t.start:t.end;this.$setSelection(n.row,n.column,e.row,e.column);},r.prototype.$setSelection=function(t,i,n,e){if(!this.$silent){var o=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,i),this.cursor.setPosition(n,e),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||a)&&this._emit("changeSelection");}},r.prototype.$moveSelection=function(t){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),t.call(this);},r.prototype.selectTo=function(t,i){this.$moveSelection(function(){this.moveCursorTo(t,i);});},r.prototype.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t);});},r.prototype.moveTo=function(t,i){this.clearSelection(),this.moveCursorTo(t,i);},r.prototype.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t);},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp);},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown);},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight);},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft);},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart);},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd);},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd);},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart);},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight);},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft);},r.prototype.getWordRange=function(t,i){if(typeof i>"u"){var n=t||this.lead;t=n.row,i=n.column;}return this.session.getWordRange(t,i)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange());},r.prototype.selectAWord=function(){var t=this.getCursor(),i=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(i);},r.prototype.getLineRange=function(t,i){var n=typeof t=="number"?t:this.lead.row,e,o=this.session.getFoldLine(n);return o?(n=o.start.row,e=o.end.row):e=n,i===!0?new s(n,0,e,this.session.getLine(e).length):new s(n,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange());},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0);},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0);},r.prototype.wouldMoveIntoSoftTab=function(t,i,n){var e=t.column,o=t.column+i;return n<0&&(e=t.column-i,o=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(e,o).split(" ").length-1==i},r.prototype.moveCursorLeft=function(){var t=this.lead.getPosition(),i;if(i=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else {var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1);}},r.prototype.moveCursorRight=function(){var t=this.lead.getPosition(),i;if(i=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(i.end.row,i.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else {var n=this.session.getTabSize(),t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1);}},r.prototype.moveCursorLineStart=function(){var t=this.lead.row,i=this.lead.column,n=this.session.documentToScreenRow(t,i),e=this.session.screenToDocumentPosition(n,0),o=this.session.getDisplayLine(t,null,e.row,e.column),a=o.match(/^\s*/);a[0].length!=i&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e);},r.prototype.moveCursorLineEnd=function(){var t=this.lead,i=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==i.column){var n=this.session.getLine(i.row);if(i.column==n.length){var e=n.search(/\s+$/);e>0&&(i.column=e);}}this.moveCursorTo(i.row,i.column);},r.prototype.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,i=this.doc.getLine(t).length;this.moveCursorTo(t,i);},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0);},r.prototype.moveCursorLongWordRight=function(){var t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),e=n.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(t,i,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=n.substring(i)),i>=n.length){this.moveCursorTo(t,n.length),this.moveCursorRight(),t<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i);},r.prototype.moveCursorLongWordLeft=function(){var t=this.lead.row,i=this.lead.column,n;if(n=this.session.getFoldAt(t,i,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var e=this.session.getFoldStringAt(t,i,-1);e==null&&(e=this.doc.getLine(t).substring(0,i));var o=x.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0){this.moveCursorTo(t,0),this.moveCursorLeft(),t>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i);},r.prototype.$shortWordEndIndex=function(t){var i=0,n,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(t))i=this.session.tokenRe.lastIndex;else {for(;(n=t[i])&&e.test(n);)i++;if(i<1){for(o.lastIndex=0;(n=t[i])&&!o.test(n);)if(o.lastIndex=0,i++,e.test(n))if(i>2){i--;break}else {for(;(n=t[i])&&e.test(n);)i++;if(i>2)break}}}return o.lastIndex=0,i},r.prototype.moveCursorShortWordRight=function(){var t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),e=n.substring(i),o=this.session.getFoldAt(t,i,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(i==n.length){var a=this.doc.getLength();do t++,e=this.doc.getLine(t);while(t<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),i=0;}var u=this.$shortWordEndIndex(e);this.moveCursorTo(t,i+u);},r.prototype.moveCursorShortWordLeft=function(){var t=this.lead.row,i=this.lead.column,n;if(n=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(n.start.row,n.start.column);var e=this.session.getLine(t).substring(0,i);if(i===0){do t--,e=this.doc.getLine(t);while(t>0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="");}var o=x.stringReverse(e),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-a)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight();},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft();},r.prototype.moveCursorBy=function(t,i){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(i===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];t<0?t-=o.rowsAbove||0:t>0&&(t+=o.rowCount-(o.rowsAbove||0));}var a=this.session.screenToDocumentPosition(n.row+t,n.column,e);t!==0&&i===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+i,i===0);},r.prototype.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column);},r.prototype.moveCursorTo=function(t,i,n){var e=this.session.getFoldAt(t,i,1);e&&(t=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(o.charAt(i))&&o.charAt(i-1)&&(this.lead.row==t&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(t,i),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null);},r.prototype.moveCursorToScreen=function(t,i,n){var e=this.session.screenToDocumentPosition(t,i);this.moveCursorTo(e.row,e.column,n);},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach();},r.prototype.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn;},r.prototype.toOrientedRange=function(t){var i=this.getRange();return t?(t.start.column=i.start.column,t.start.row=i.start.row,t.end.column=i.end.column,t.end.row=i.end.row):t=i,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},r.prototype.getRangeOfMovements=function(t){var i=this.getCursor();try{t(this);var n=this.getCursor();return s.fromPoints(i,n)}catch{return s.fromPoints(i,i)}finally{this.moveCursorToPosition(i);}},r.prototype.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(i){var n=i.clone();return n.isBackwards=i.cursor==i.start,n});else {var t=this.getRange();t.isBackwards=this.isBackwards();}return t},r.prototype.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var i=t.length;i--;){var n=s.fromPoints(t[i].start,t[i].end);t[i].isBackwards&&(n.cursor=n.start),this.addRange(n,!0);}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards);},r.prototype.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return !1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(t[i]))return !1;return !0},r}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,E.implement(l.prototype,M),T.Selection=l;});ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(L,T,H){var E=L("./lib/report_error").reportError,x=2e3,M=function(){function s(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var r in this.states){for(var t=this.states[r],i=[],n=0,e=this.matchMappings[r]={defaultToken:"text"},o="g",a=[],u=0;u<t.length;u++){var y=t[u];if(y.defaultToken&&(e.defaultToken=y.defaultToken),y.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),y.unicode&&o.indexOf("u")===-1&&(o+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var S=y.regex,m=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||m==1?y.token=y.token[0]:m-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:m-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(m>1?y.onMatch=this.$applyToken:y.onMatch=y.token),m>1&&(/\\\d/.test(y.regex)?S=y.regex.replace(/\\([0-9]+)/g,function($,d){return "\\"+(parseInt(d,10)+n+1)}):(m=1,S=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&a.push(y)),e[n]=u,n+=m,i.push(S),y.onMatch||(y.onMatch=null);}}i.length||(e[0]=0,i.push("$")),a.forEach(function($){$.splitRegex=this.createSplitterRegexp($.regex,o);},this),this.regExps[r]=new RegExp("("+i.join(")|(")+")|($)",o);}}return s.prototype.$setMaxTokenCount=function(l){x=l|0;},s.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),t=this.token.apply(this,r);if(typeof t=="string")return [{type:t,value:l}];for(var i=[],n=0,e=t.length;n<e;n++)r[n]&&(i[i.length]={type:t[n],value:r[n]});return i},s.prototype.$arrayTokens=function(l){if(!l)return [];var r=this.splitRegex.exec(l);if(!r)return "text";for(var t=[],i=this.tokenArray,n=0,e=i.length;n<e;n++)r[n+1]&&(t[t.length]={type:i[n],value:r[n+1]});return t},s.prototype.removeCapturingGroups=function(l){var r=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(t,i){return i?"(?:":t});return r},s.prototype.createSplitterRegexp=function(l,r){if(l.indexOf("(?=")!=-1){var t=0,i=!1,n={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,a,u,y,S){return i?i=y!="]":y?i=!0:u?(t==n.stack&&(n.end=S+1,n.stack=-1),t--):a&&(t++,a.length!=1&&(n.stack=t,n.start=S)),e}),n.end!=null&&/^\)*$/.test(l.substr(n.end))&&(l=l.substring(0,n.start)+l.substr(n.end));}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(r||"").replace("g",""))},s.prototype.getLineTokens=function(l,r){if(r&&typeof r!="string"){var t=r.slice(0);r=t[0],r==="#tmp"&&(t.shift(),r=t.shift());}else var t=[];var i=r||"start",n=this.states[i];n||(i="start",n=this.states[i]);var e=this.matchMappings[i],o=this.regExps[i];o.lastIndex=0;for(var a,u=[],y=0,S=0,m={type:null,value:""};a=o.exec(l);){var $=e.defaultToken,d=null,h=a[0],w=o.lastIndex;if(w-h.length>y){var C=l.substring(y,w-h.length);m.type==$?m.value+=C:(m.type&&u.push(m),m={type:$,value:C});}for(var v=0;v<a.length-2;v++)if(a[v+1]!==void 0){d=n[e[v]],d.onMatch?$=d.onMatch(h,i,t,l):$=d.token,d.next&&(typeof d.next=="string"?i=d.next:i=d.next(i,t),n=this.states[i],n||(this.reportError("state doesn't exist",i),i="start",n=this.states[i]),e=this.matchMappings[i],y=w,o=this.regExps[i],o.lastIndex=w),d.consumeLineEnd&&(y=w);break}if(h){if(typeof $=="string")(!d||d.merge!==!1)&&m.type===$?m.value+=h:(m.type&&u.push(m),m={type:$,value:h});else if($){m.type&&u.push(m),m={type:null,value:""};for(var v=0;v<$.length;v++)u.push($[v]);}}if(y==l.length)break;if(y=w,S++>x){for(S>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});y<l.length;)m.type&&u.push(m),m={value:l.substring(y,y+=500),type:"overflow"};i="start",t=[];break}}return m.type&&u.push(m),t.length>1&&t[0]!==i&&t.unshift("#tmp",i),{tokens:u,state:t.length?t:i}},s}();M.prototype.reportError=E,T.Tokenizer=M;});ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(L,T,H){var E=L("../lib/deep_copy").deepCopy,x;x=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]};},function(){this.addRules=function(l,r){if(!r){for(var t in l)this.$rules[t]=l[t];return}for(var t in l){for(var i=l[t],n=0;n<i.length;n++){var e=i[n];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState));}this.$rules[r+t]=i;}},this.getRules=function(){return this.$rules},this.embedRules=function(l,r,t,i,n){var e=typeof l=="function"?new l().getRules():l;if(i)for(var o=0;o<i.length;o++)i[o]=r+i[o];else {i=[];for(var a in e)i.push(r+a);}if(this.addRules(e,r),t)for(var u=Array.prototype[n?"push":"unshift"],o=0;o<i.length;o++)u.apply(this.$rules[i[o]],E(t));this.$embeds||(this.$embeds=[]),this.$embeds.push(r);},this.getEmbeds=function(){return this.$embeds};var M=function(l,r){return (l!="start"||r.length)&&r.unshift(this.nextState,l),this.nextState},s=function(l,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var l=0,r=this.$rules;function t(i){var n=r[i];n.processed=!0;for(var e=0;e<n.length;e++){var o=n[e],a=null;Array.isArray(o)&&(a=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0);var u=o.next||o.push;if(u&&Array.isArray(u)){var y=o.stateName;y||(y=o.token,typeof y!="string"&&(y=y[0]||""),r[y]&&(y+=l++)),r[y]=u,o.next=y,t(y);}else u=="pop"&&(o.next=s);if(o.push&&(o.nextState=o.next||o.push,o.next=M,delete o.push),o.rules)for(var S in o.rules)r[S]?r[S].push&&r[S].push.apply(r[S],o.rules[S]):r[S]=o.rules[S];var m=typeof o=="string"?o:o.include;if(m&&(m==="$self"&&(m="start"),Array.isArray(m)?a=m.map(function(d){return r[d]}):a=r[m]),a){var $=[e,1].concat(a);o.noEscape&&($=$.filter(function(d){return !d.next})),n.splice.apply(n,$),e--;}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken);}}Object.keys(r).forEach(t,this);},this.createKeywordMapper=function(l,r,t,i){var n=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(e){for(var o=l[e],a=o.split(i||"|"),u=a.length;u--;){var y=a[u];this.$keywordList.push(y),t&&(y=y.toLowerCase()),n[y]=e;}},this),l=null,t?function(e){return n[e.toLowerCase()]||r}:function(e){return n[e]||r}},this.getKeywords=function(){return this.$keywords};}.call(x.prototype),T.TextHighlightRules=x;});ace.define("ace/mode/behaviour",["require","exports","module"],function(L,T,H){var E;E=function(){this.$behaviours={};},function(){this.add=function(x,M,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[x]:this.$behaviours[x]={};}this.$behaviours[x][M]=s;},this.addBehaviours=function(x){for(var M in x)for(var s in x[M])this.add(M,s,x[M][s]);},this.remove=function(x){this.$behaviours&&this.$behaviours[x]&&delete this.$behaviours[x];},this.inherit=function(x,M){if(typeof x=="function")var s=new x().getBehaviours(M);else var s=x.getBehaviours(M);this.addBehaviours(s);},this.getBehaviours=function(x){if(x){for(var M={},s=0;s<x.length;s++)this.$behaviours[x[s]]&&(M[x[s]]=this.$behaviours[x[s]]);return M}else return this.$behaviours};}.call(E.prototype),T.Behaviour=E;});ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(L,T,H){var E=L("./range").Range,x=function(){function M(s,l,r){this.$session=s,this.$row=l,this.$rowTokens=s.getTokens(l);var t=s.getTokenAt(l,r);this.$tokenIndex=t?t.index:-1;}return M.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1;}return this.$rowTokens[this.$tokenIndex]},M.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0;}return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentTokenRow=function(){return this.$row},M.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,l=this.$tokenIndex,r=s[l].start;if(r!==void 0)return r;for(r=0;l>0;)l-=1,r+=s[l].value.length;return r},M.prototype.getCurrentTokenPosition=function(){return {row:this.$row,column:this.getCurrentTokenColumn()}},M.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new E(this.$row,l,this.$row,l+s.value.length)},M}();T.TokenIterator=x;});ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(L,T,H){var E=L("../../lib/oop"),x=L("../behaviour").Behaviour,M=L("../../token_iterator").TokenIterator,s=L("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],t,i={},n={'"':'"',"'":"'"},e=function(u){var y=-1;if(u.multiSelect&&(y=u.selection.index,i.rangeCount!=u.multiSelect.rangeCount&&(i={rangeCount:u.multiSelect.rangeCount})),i[y])return t=i[y];t=i[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""};},o=function(u,y,S,m){var $=u.end.row-u.start.row;return {text:S+y+m,selection:[0,u.start.column+1,$,u.end.column+($?0:1)]}},a;a=function(u){u=u||{},this.add("braces","insertion",function(y,S,m,$,d){var h=m.getCursorPosition(),w=$.doc.getLine(h.row);if(d=="{"){e(m);var C=m.getSelectionRange(),v=$.doc.getTextRange(C),b=$.getTokenAt(h.row,h.column);if(v!==""&&v!=="{"&&m.getWrapBehavioursEnabled())return o(C,v,"{","}");if(b&&/(?:string)\.quasi|\.xml/.test(b.type)){var f=[/tag\-(?:open|name)/,/attribute\-name/];return f.some(function(_){return _.test(b.type)})||/(string)\.quasi/.test(b.type)&&b.value[h.column-b.start-1]!=="$"?void 0:(a.recordAutoInsert(m,$,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(m,$))return /[\]\}\)]/.test(w[h.column])||m.inMultiSelectMode||u.braces?(a.recordAutoInsert(m,$,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(m,$,"{"),{text:"{",selection:[1,1]})}else if(d=="}"){e(m);var p=w.substring(h.column,h.column+1);if(p=="}"){var c=$.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(c!==null&&a.isAutoInsertedClosing(h,w,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d==`
200
+ `||d==`\r
201
+ `){e(m);var g="";a.isMaybeInsertedClosing(h,w)&&(g=s.stringRepeat("}",t.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var p=w.substring(h.column,h.column+1);if(p==="}"){var A=$.findMatchingBracket({row:h.row,column:h.column+1},"}");if(!A)return null;var k=this.$getIndent($.getLine(A.row));}else if(g)var k=this.$getIndent(w);else {a.clearMaybeInsertedClosing();return}var R=k+$.getTabString();return {text:`
202
+ `+R+`
203
+ `+k+g,selection:[1,R.length,1,R.length]}}else a.clearMaybeInsertedClosing();}),this.add("braces","deletion",function(y,S,m,$,d){var h=$.doc.getTextRange(d);if(!d.isMultiLine()&&h=="{"){e(m);var w=$.doc.getLine(d.start.row),C=w.substring(d.end.column,d.end.column+1);if(C=="}")return d.end.column++,d;t.maybeInsertedBrackets--;}}),this.add("parens","insertion",function(y,S,m,$,d){if(d=="("){e(m);var h=m.getSelectionRange(),w=$.doc.getTextRange(h);if(w!==""&&m.getWrapBehavioursEnabled())return o(h,w,"(",")");if(a.isSaneInsertion(m,$))return a.recordAutoInsert(m,$,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(m);var C=m.getCursorPosition(),v=$.doc.getLine(C.row),b=v.substring(C.column,C.column+1);if(b==")"){var f=$.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(f!==null&&a.isAutoInsertedClosing(C,v,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,S,m,$,d){var h=$.doc.getTextRange(d);if(!d.isMultiLine()&&h=="("){e(m);var w=$.doc.getLine(d.start.row),C=w.substring(d.start.column+1,d.start.column+2);if(C==")")return d.end.column++,d}}),this.add("brackets","insertion",function(y,S,m,$,d){if(d=="["){e(m);var h=m.getSelectionRange(),w=$.doc.getTextRange(h);if(w!==""&&m.getWrapBehavioursEnabled())return o(h,w,"[","]");if(a.isSaneInsertion(m,$))return a.recordAutoInsert(m,$,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(m);var C=m.getCursorPosition(),v=$.doc.getLine(C.row),b=v.substring(C.column,C.column+1);if(b=="]"){var f=$.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(f!==null&&a.isAutoInsertedClosing(C,v,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,S,m,$,d){var h=$.doc.getTextRange(d);if(!d.isMultiLine()&&h=="["){e(m);var w=$.doc.getLine(d.start.row),C=w.substring(d.start.column+1,d.start.column+2);if(C=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(y,S,m,$,d){var h=$.$mode.$quotes||n;if(d.length==1&&h[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(m);var w=d,C=m.getSelectionRange(),v=$.doc.getTextRange(C);if(v!==""&&(v.length!=1||!h[v])&&m.getWrapBehavioursEnabled())return o(C,v,w,w);if(!v){var b=m.getCursorPosition(),f=$.doc.getLine(b.row),p=f.substring(b.column-1,b.column),c=f.substring(b.column,b.column+1),g=$.getTokenAt(b.row,b.column),A=$.getTokenAt(b.row,b.column+1);if(p=="\\"&&g&&/escape/.test(g.type))return null;var k=g&&/string|escape/.test(g.type),R=!A||/string|escape/.test(A.type),_;if(c==w)_=k!==R,_&&/string\.end/.test(A.type)&&(_=!1);else {if(k&&!R||k&&R)return null;var D=$.$mode.tokenRe;D.lastIndex=0;var I=D.test(p);D.lastIndex=0;var F=D.test(c),N=$.$mode.$pairQuotesAfter,O=N&&N[w]&&N[w].test(p);if(!O&&I||F||c&&!/[\s;,.})\]\\]/.test(c))return null;var W=f[b.column-2];if(p==w&&(W==w||D.test(W)))return null;_=!0;}return {text:_?w+w:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,S,m,$,d){var h=$.$mode.$quotes||n,w=$.doc.getTextRange(d);if(!d.isMultiLine()&&h.hasOwnProperty(w)){e(m);var C=$.doc.getLine(d.start.row),v=C.substring(d.start.column+1,d.start.column+2);if(v==w)return d.end.column++,d}}),u.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,S,m,$,d){if(y==="doc-start"&&(d===`
204
+ `||d===`\r
205
+ `)&&m.selection.isEmpty()){var h=m.getCursorPosition();if(h.column===0)return;for(var w=$.doc.getLine(h.row),C=$.doc.getLine(h.row+1),v=$.getTokens(h.row),b=0,f=0;f<v.length;f++){b+=v[f].value.length;var p=v[f];if(b>=h.column){if(b===h.column){if(!/\.doc/.test(p.type))return;if(/\*\//.test(p.value)){var c=v[f+1];if(!c||!/\.doc/.test(c.type))return}}var g=h.column-(b-p.value.length),A=p.value.indexOf("*/"),k=p.value.indexOf("/**",A>-1?A+2:0);if(k!==-1&&g>k&&g<k+3||A!==-1&&k!==-1&&g>=A&&g<=k||!/\.doc/.test(p.type))return;break}}var R=this.$getIndent(w);if(/\s*\*/.test(C))return /^\s*\*/.test(w)?{text:d+R+"* ",selection:[1,2+R.length,1,2+R.length]}:{text:d+R+" * ",selection:[1,3+R.length,1,3+R.length]};if(/\/\*\*/.test(w.substring(0,h.column)))return {text:d+R+" * "+d+" "+R+"*/",selection:[1,4+R.length,1,4+R.length]}}});},a.isSaneInsertion=function(u,y){var S=u.getCursorPosition(),m=new M(y,S.row,S.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",l)){if(/[)}\]]/.test(u.session.getLine(S.row)[S.column]))return !0;var $=new M(y,S.row,S.column+1);if(!this.$matchTokenType($.getCurrentToken()||"text",l))return !1}return m.stepForward(),m.getCurrentTokenRow()!==S.row||this.$matchTokenType(m.getCurrentToken()||"text",r)},a.$matchTokenType=function(u,y){return y.indexOf(u.type||u)>-1},a.recordAutoInsert=function(u,y,S){var m=u.getCursorPosition(),$=y.doc.getLine(m.row);this.isAutoInsertedClosing(m,$,t.autoInsertedLineEnd[0])||(t.autoInsertedBrackets=0),t.autoInsertedRow=m.row,t.autoInsertedLineEnd=S+$.substr(m.column),t.autoInsertedBrackets++;},a.recordMaybeInsert=function(u,y,S){var m=u.getCursorPosition(),$=y.doc.getLine(m.row);this.isMaybeInsertedClosing(m,$)||(t.maybeInsertedBrackets=0),t.maybeInsertedRow=m.row,t.maybeInsertedLineStart=$.substr(0,m.column)+S,t.maybeInsertedLineEnd=$.substr(m.column),t.maybeInsertedBrackets++;},a.isAutoInsertedClosing=function(u,y,S){return t.autoInsertedBrackets>0&&u.row===t.autoInsertedRow&&S===t.autoInsertedLineEnd[0]&&y.substr(u.column)===t.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(u,y){return t.maybeInsertedBrackets>0&&u.row===t.maybeInsertedRow&&y.substr(u.column)===t.maybeInsertedLineEnd&&y.substr(0,u.column)==t.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){t.autoInsertedLineEnd=t.autoInsertedLineEnd.substr(1),t.autoInsertedBrackets--;},a.clearMaybeInsertedClosing=function(){t&&(t.maybeInsertedBrackets=0,t.maybeInsertedRow=-1);},E.inherits(a,x),T.CstyleBehaviour=a;});ace.define("ace/unicode",["require","exports","module"],function(L,T,H){for(var E=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],x=0,M=[],s=0;s<E.length;s+=2)M.push(x+=E[s]),E[s+1]&&M.push(45,x+=E[s+1]);T.wordChars=String.fromCharCode.apply(null,M);});ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(L,T,H){var E=L("../config"),x=L("../tokenizer").Tokenizer,M=L("./text_highlight_rules").TextHighlightRules,s=L("./behaviour/cstyle").CstyleBehaviour,l=L("../unicode"),r=L("../lib/lang"),t=L("../token_iterator").TokenIterator,i=L("../range").Range,n;n=function(){this.HighlightRules=M;},function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new x(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,a,u){var y=o.doc,S=!0,m=!0,$=1/0,d=o.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var v=this.lineCommentStart.map(r.escapeRegExp).join("|"),w=this.lineCommentStart[0];else var v=r.escapeRegExp(this.lineCommentStart),w=this.lineCommentStart;v=new RegExp("^(\\s*)(?:"+v+") ?"),h=o.getUseSoftTabs();var p=function(F,N){var O=F.match(v);if(O){var W=O[1].length,B=O[0].length;!A(F,W,B)&&O[0][B-1]==" "&&B--,y.removeInLine(N,W,B);}},g=w+" ",f=function(F,N){(!S||/\S/.test(F))&&(A(F,$,$)?y.insertInLine({row:N,column:$},g):y.insertInLine({row:N,column:$},w));},c=function(F,N){return v.test(F)},A=function(F,N,O){for(var W=0;N--&&F.charAt(N)==" ";)W++;if(W%d!=0)return !1;for(var W=0;F.charAt(O++)==" ";)W++;return d>2?W%d!=d-1:W%d==0};}else {if(!this.blockComment)return !1;var w=this.blockComment.start,C=this.blockComment.end,v=new RegExp("^(\\s*)(?:"+r.escapeRegExp(w)+")"),b=new RegExp("(?:"+r.escapeRegExp(C)+")\\s*$"),f=function(_,D){c(_,D)||(!S||/\S/.test(_))&&(y.insertInLine({row:D,column:_.length},C),y.insertInLine({row:D,column:$},w));},p=function(_,D){var I;(I=_.match(b))&&y.removeInLine(D,_.length-I[0].length,_.length),(I=_.match(v))&&y.removeInLine(D,I[1].length,I[0].length);},c=function(_,D){if(v.test(_))return !0;for(var I=o.getTokens(D),F=0;F<I.length;F++)if(I[F].type==="comment")return !0};}function k(_){for(var D=a;D<=u;D++)_(y.getLine(D),D);}var R=1/0;k(function(_,D){var I=_.search(/\S/);I!==-1?(I<$&&($=I),m&&!c(_,D)&&(m=!1)):R>_.length&&(R=_.length);}),$==1/0&&($=R,S=!1,m=!1),h&&$%d!=0&&($=Math.floor($/d)*d),k(m?p:f);},this.toggleBlockComment=function(e,o,a,u){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var S=new t(o,u.row,u.column),m=S.getCurrentToken();o.selection;var d=o.selection.toOrientedRange(),h,w;if(m&&/comment/.test(m.type)){for(var C,v;m&&/comment/.test(m.type);){var b=m.value.indexOf(y.start);if(b!=-1){var f=S.getCurrentTokenRow(),p=S.getCurrentTokenColumn()+b;C=new i(f,p,f,p+y.start.length);break}m=S.stepBackward();}for(var S=new t(o,u.row,u.column),m=S.getCurrentToken();m&&/comment/.test(m.type);){var b=m.value.indexOf(y.end);if(b!=-1){var f=S.getCurrentTokenRow(),p=S.getCurrentTokenColumn()+b;v=new i(f,p,f,p+y.end.length);break}m=S.stepForward();}v&&o.remove(v),C&&(o.remove(C),h=C.start.row,w=-y.start.length);}else w=y.start.length,h=a.start.row,o.insert(a.end,y.end),o.insert(a.start,y.start);d.start.row==h&&(d.start.column+=w),d.end.row==h&&(d.end.column+=w),o.selection.fromOrientedRange(d);}},this.getNextLineIndent=function(e,o,a){return this.$getIndent(o)},this.checkOutdent=function(e,o,a){return !1},this.autoOutdent=function(e,o,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var o in e)if(e[o]){var a=e[o],u=a.prototype.$id,y=E.$modes[u];y||(E.$modes[u]=y=new a),E.$modes[o]||(E.$modes[o]=y),this.$embeds.push(o),this.$modes[o]=y;}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(d){(function(h){var w=S[d],C=h[w];h[S[d]]=function(){return this.$delegator(w,arguments,C)};})($);},$=this,o=0;o<S.length;o++)m(o);},this.$delegator=function(e,o,a){var u=o[0]||"start";if(typeof u!="string"){if(Array.isArray(u[2])){var y=u[2][u[2].length-1],S=this.$modes[y];if(S)return S[e].apply(S,[u[1]].concat([].slice.call(o,1)))}u=u[0]||"start";}for(var m=0;m<this.$embeds.length;m++)if(this.$modes[this.$embeds[m]]){var $=u.split(this.$embeds[m]);if(!$[0]&&$[1]){o[0]=$[1];var S=this.$modes[this.$embeds[m]];return S[e].apply(S,o)}}var d=a.apply(this,o);return a?d:void 0},this.transformAction=function(e,o,a,u,y){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var m in S)if(S[m][o]){var $=S[m][o].apply(this,arguments);if($)return $}}},this.getKeywords=function(e){if(!this.completionKeywords){var o=this.$tokenizer.rules,a=[];for(var u in o)for(var y=o[u],S=0,m=y.length;S<m;S++)if(typeof y[S].token=="string")/keyword|support|storage/.test(y[S].token)&&a.push(y[S].regex);else if(typeof y[S].token=="object"){for(var $=0,d=y[S].token.length;$<d;$++)if(/keyword|support|storage/.test(y[S].token[$])){var u=y[S].regex.match(/\(.+?\)/g)[$];a.push(u.substr(1,u.length-2));}}this.completionKeywords=a;}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,o,a,u){var y=this.$keywordList||this.$createKeywordList();return y.map(function(S){return {name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text";}.call(n.prototype),T.Mode=n;});ace.define("ace/apply_delta",["require","exports","module"],function(L,T,H){T.applyDelta=function(s,l,r){var t=l.start.row,i=l.start.column,n=s[t]||"";switch(l.action){case"insert":var e=l.lines;if(e.length===1)s[t]=n.substring(0,i)+l.lines[0]+n.substring(i);else {var o=[t,1].concat(l.lines);s.splice.apply(s,o),s[t]=n.substring(0,i)+s[t],s[t+l.lines.length-1]+=n.substring(i);}break;case"remove":var a=l.end.column,u=l.end.row;t===u?s[t]=n.substring(0,i)+n.substring(a):s.splice(t,u-t+1,n.substring(0,i)+s[u].substring(a));break}};});ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(L,T,H){var E=L("./lib/oop"),x=L("./lib/event_emitter").EventEmitter,M=function(){function r(t,i,n){this.$onChange=this.onChange.bind(this),this.attach(t),typeof i!="number"?this.setPosition(i.row,i.column):this.setPosition(i,n);}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row)&&!(t.start.row>this.row)){var i=l(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0);}},r.prototype.setPosition=function(t,i,n){var e;if(n?e={row:t,column:i}:e=this.$clipPositionToDocument(t,i),!(this.row==e.row&&this.column==e.column)){var o={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:o,value:e});}},r.prototype.detach=function(){this.document.off("change",this.$onChange);},r.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange);},r.prototype.$clipPositionToDocument=function(t,i){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,i))),i<0&&(n.column=0),n},r}();M.prototype.$insertRight=!1,E.implement(M.prototype,x);function s(r,t,i){var n=i?r.column<=t.column:r.column<t.column;return r.row<t.row||r.row==t.row&&n}function l(r,t,i){var n=r.action=="insert",e=(n?1:-1)*(r.end.row-r.start.row),o=(n?1:-1)*(r.end.column-r.start.column),a=r.start,u=n?a:r.end;return s(t,a,i)?{row:t.row,column:t.column}:s(u,t,!i)?{row:t.row+e,column:t.column+(t.row==u.row?o:0)}:{row:a.row,column:a.column}}T.Anchor=M;});ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(L,T,H){var E=L("./lib/oop"),x=L("./apply_delta").applyDelta,M=L("./lib/event_emitter").EventEmitter,s=L("./range").Range,l=L("./anchor").Anchor,r=function(){function t(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i);}return t.prototype.setValue=function(i){var n=this.getLength()-1;this.remove(new s(0,0,n,this.getLine(n).length)),this.insert({row:0,column:0},i||"");},t.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},t.prototype.createAnchor=function(i,n){return new l(this,i,n)},t.prototype.$detectNewLine=function(i){var n=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=n?n[1]:`
206
+ `,this._signal("changeNewLineMode");},t.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return `\r
207
+ `;case"unix":return `
208
+ `;default:return this.$autoNewLine||`
209
+ `}},t.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"));},t.prototype.getNewLineMode=function(){return this.$newLineMode},t.prototype.isNewLine=function(i){return i==`\r
210
+ `||i=="\r"||i==`
211
+ `},t.prototype.getLine=function(i){return this.$lines[i]||""},t.prototype.getLines=function(i,n){return this.$lines.slice(i,n+1)},t.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},t.prototype.getLength=function(){return this.$lines.length},t.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},t.prototype.getLinesForRange=function(i){var n;if(i.start.row===i.end.row)n=[this.getLine(i.start.row).substring(i.start.column,i.end.column)];else {n=this.getLines(i.start.row,i.end.row),n[0]=(n[0]||"").substring(i.start.column);var e=n.length-1;i.end.row-i.start.row==e&&(n[e]=n[e].substring(0,i.end.column));}return n},t.prototype.insertLines=function(i,n){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,n)},t.prototype.removeLines=function(i,n){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,n)},t.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},t.prototype.insert=function(i,n){return this.getLength()<=1&&this.$detectNewLine(n),this.insertMergedLines(i,this.$split(n))},t.prototype.insertInLine=function(i,n){var e=this.clippedPos(i.row,i.column),o=this.pos(i.row,i.column+n.length);return this.applyDelta({start:e,end:o,action:"insert",lines:[n]},!0),this.clonePos(o)},t.prototype.clippedPos=function(i,n){var e=this.getLength();i===void 0?i=e:i<0?i=0:i>=e&&(i=e-1,n=void 0);var o=this.getLine(i);return n==null&&(n=o.length),n=Math.min(Math.max(n,0),o.length),{row:i,column:n}},t.prototype.clonePos=function(i){return {row:i.row,column:i.column}},t.prototype.pos=function(i,n){return {row:i,column:n}},t.prototype.$clipPosition=function(i){var n=this.getLength();return i.row>=n?(i.row=Math.max(0,n-1),i.column=this.getLine(n-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},t.prototype.insertFullLines=function(i,n){i=Math.min(Math.max(i,0),this.getLength());var e=0;i<this.getLength()?(n=n.concat([""]),e=0):(n=[""].concat(n),i--,e=this.$lines[i].length),this.insertMergedLines({row:i,column:e},n);},t.prototype.insertMergedLines=function(i,n){var e=this.clippedPos(i.row,i.column),o={row:e.row+n.length-1,column:(n.length==1?e.column:0)+n[n.length-1].length};return this.applyDelta({start:e,end:o,action:"insert",lines:n}),this.clonePos(o)},t.prototype.remove=function(i){var n=this.clippedPos(i.start.row,i.start.column),e=this.clippedPos(i.end.row,i.end.column);return this.applyDelta({start:n,end:e,action:"remove",lines:this.getLinesForRange({start:n,end:e})}),this.clonePos(n)},t.prototype.removeInLine=function(i,n,e){var o=this.clippedPos(i,n),a=this.clippedPos(i,e);return this.applyDelta({start:o,end:a,action:"remove",lines:this.getLinesForRange({start:o,end:a})},!0),this.clonePos(o)},t.prototype.removeFullLines=function(i,n){i=Math.min(Math.max(0,i),this.getLength()-1),n=Math.min(Math.max(0,n),this.getLength()-1);var e=n==this.getLength()-1&&i>0,o=n<this.getLength()-1,a=e?i-1:i,u=e?this.getLine(a).length:0,y=o?n+1:n,S=o?0:this.getLine(y).length,m=new s(a,u,y,S),$=this.$lines.slice(i,n+1);return this.applyDelta({start:m.start,end:m.end,action:"remove",lines:this.getLinesForRange(m)}),$},t.prototype.removeNewLine=function(i){i<this.getLength()-1&&i>=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]});},t.prototype.replace=function(i,n){if(i instanceof s||(i=s.fromPoints(i.start,i.end)),n.length===0&&i.isEmpty())return i.start;if(n==this.getTextRange(i))return i.end;this.remove(i);var e;return n?e=this.insert(i.start,n):e=i.start,e},t.prototype.applyDeltas=function(i){for(var n=0;n<i.length;n++)this.applyDelta(i[n]);},t.prototype.revertDeltas=function(i){for(var n=i.length-1;n>=0;n--)this.revertDelta(i[n]);},t.prototype.applyDelta=function(i,n){var e=i.action=="insert";(e?i.lines.length<=1&&!i.lines[0]:!s.comparePoints(i.start,i.end))||(e&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(x(this.$lines,i,n),this._signal("change",i)));},t.prototype.$safeApplyDelta=function(i){var n=this.$lines.length;(i.action=="remove"&&i.start.row<n&&i.end.row<n||i.action=="insert"&&i.start.row<=n)&&this.applyDelta(i);},t.prototype.$splitAndapplyLargeDelta=function(i,n){for(var e=i.lines,o=e.length-n+1,a=i.start.row,u=i.start.column,y=0,S=0;y<o;y=S){S+=n-1;var m=e.slice(y,S);m.push(""),this.applyDelta({start:this.pos(a+y,u),end:this.pos(a+S,u=0),action:i.action,lines:m},!0);}i.lines=e.slice(y),i.start.row=a+y,i.start.column=u,this.applyDelta(i,!0);},t.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()});},t.prototype.indexToPosition=function(i,n){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,a=n||0,u=e.length;a<u;a++)if(i-=e[a].length+o,i<0)return {row:a,column:i+e[a].length+o};return {row:u-1,column:i+e[u-1].length+o}},t.prototype.positionToIndex=function(i,n){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,a=0,u=Math.min(i.row,e.length),y=n||0;y<u;++y)a+=e[y].length+o;return a+i.column},t.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},t}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",E.implement(r.prototype,M),T.Document=r;});ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(L,T,H){var E=L("./lib/oop"),x=L("./lib/event_emitter").EventEmitter,M=function(){function s(l,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var t=this;this.$worker=function(){if(t.running){for(var i=new Date,n=t.currentLine,e=-1,o=t.doc,a=n;t.lines[n];)n++;var u=o.getLength(),y=0;for(t.running=!1;n<u;){t.$tokenizeRow(n),e=n;do n++;while(t.lines[n]);if(y++,y%5===0&&new Date-i>20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=n,e==-1&&(e=n),a<=e&&t.fireUpdateEvent(a,e);}};}return s.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0);},s.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop();},s.prototype.fireUpdateEvent=function(l,r){var t={first:l,last:r};this._signal("update",{data:t});},s.prototype.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700);},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700));},s.prototype.$updateOnChange=function(l){var r=l.start.row,t=l.end.row-r;if(t===0)this.lines[r]=null;else if(l.action=="remove")this.lines.splice(r,t+1,null),this.states.splice(r,t+1,null);else {var i=Array(t+1);i.unshift(r,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i);}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop();},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1;},s.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},s.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},s.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),t=this.states[l-1],i=this.tokenizer.getLineTokens(r,t,l);return this.states[l]+""!=i.state+""?(this.states[l]=i.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=i.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners();},s}();E.implement(M.prototype,x),T.BackgroundTokenizer=M;});ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(L,T,H){var E=L("./lib/lang"),x=L("./range").Range,M=function(){function s(l,r,t){t===void 0&&(t="text"),this.setRegexp(l),this.clazz=r,this.type=t;}return s.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[]);},s.prototype.update=function(l,r,t,i){if(this.regExp)for(var n=i.firstRow,e=i.lastRow,o={},a=n;a<=e;a++){var u=this.cache[a];u==null&&(u=E.getMatchOffsets(t.getLine(a),this.regExp),u.length>this.MAX_RANGES&&(u=u.slice(0,this.MAX_RANGES)),u=u.map(function($){return new x(a,$.offset,a,$.offset+$.length)}),this.cache[a]=u.length?u:"");for(var y=u.length;y--;){var S=u[y].toScreenRange(t),m=S.toString();o[m]||(o[m]=!0,r.drawSingleLineMarker(l,S,this.clazz,i));}}},s}();M.prototype.MAX_RANGES=500,T.SearchHighlight=M;});ace.define("ace/undomanager",["require","exports","module","ace/range"],function(L,T,H){var E=function(){function h(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset();}return h.prototype.addSession=function(w){this.$session=w;},h.prototype.add=function(w,C,v){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),C===!1||!this.lastDeltas){this.lastDeltas=[];var b=this.$undoStack.length;b>this.$undoDepth-1&&this.$undoStack.splice(0,b-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev;}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w);}},h.prototype.addSelection=function(w,C){this.selections.push({value:w,rev:C||this.$rev});},h.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},h.prototype.markIgnored=function(w,C){C==null&&(C=this.$rev+1);for(var v=this.$undoStack,b=v.length;b--;){var f=v[b][0];if(f.id<=w)break;f.id<C&&(f.ignore=!0);}this.lastDeltas=null;},h.prototype.getSelection=function(w,C){for(var v=this.selections,b=v.length;b--;){var f=v[b];if(f.rev<w)return C&&(f=v[b+1]),f}},h.prototype.getRevision=function(){return this.$rev},h.prototype.getDeltas=function(w,C){C==null&&(C=this.$rev+1);for(var v=this.$undoStack,b=null,f=0,p=v.length;p--;){var c=v[p][0];if(c.id<C&&!b&&(b=p+1),c.id<=w){f=p+1;break}}return v.slice(f,b)},h.prototype.getChangedRanges=function(w,C){C==null&&(C=this.$rev+1);},h.prototype.getChangedLines=function(w,C){C==null&&(C=this.$rev+1);},h.prototype.undo=function(w,C){this.lastDeltas=null;var v=this.$undoStack;if(x(v,v.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var b=v.pop(),f=null;return b&&(f=w.undoChanges(b,C),this.$redoStack.push(b),this.$syncRev()),this.$fromUndo=!1,f}},h.prototype.redo=function(w,C){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var v=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);d(this.$redoStack,v),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(p){p[0].id=++this.$maxRev;},this);}var b=this.$redoStack.pop(),f=null;return b&&(f=w.redoChanges(b,C),this.$undoStack.push(b),this.$syncRev()),this.$fromUndo=!1,f},h.prototype.$syncRev=function(){var w=this.$undoStack,C=w[w.length-1],v=C&&C[0].id||0;this.$redoStackBaseRev=v,this.$rev=v;},h.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[];},h.prototype.canUndo=function(){return this.$undoStack.length>0},h.prototype.canRedo=function(){return this.$redoStack.length>0},h.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w;},h.prototype.isAtBookmark=function(){return this.$rev===this.mark},h.prototype.toJSON=function(){return {$redoStack:this.$redoStack,$undoStack:this.$undoStack}},h.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack;},h.prototype.$prettyPrint=function(w){return w?n(w):n(this.$undoStack)+`
212
+ ---
213
+ `+n(this.$redoStack)},h}();E.prototype.hasUndo=E.prototype.canUndo,E.prototype.hasRedo=E.prototype.canRedo,E.prototype.isClean=E.prototype.isAtBookmark,E.prototype.markClean=E.prototype.bookmark;function x(h,w){for(var C=w;C--;){var v=h[C];if(v&&!v[0].ignore){for(;C<w-1;){var b=a(h[C],h[C+1]);h[C]=b[0],h[C+1]=b[1],C++;}return !0}}}var M=L("./range").Range,s=M.comparePoints;M.comparePoints;function t(h){return {row:h.row,column:h.column}}function i(h){return {start:t(h.start),end:t(h.end),action:h.action,lines:h.lines.slice()}}function n(h){if(h=h||this,Array.isArray(h))return h.map(n).join(`
214
+ `);var w="";return h.action?(w=h.action=="insert"?"+":"-",w+="["+h.lines+"]"):h.value&&(Array.isArray(h.value)?w=h.value.map(e).join(`
215
+ `):w=e(h.value)),h.start&&(w+=e(h)),(h.id||h.rev)&&(w+=" ("+(h.id||h.rev)+")"),w}function e(h){return h.start.row+":"+h.start.column+"=>"+h.end.row+":"+h.end.column}function o(h,w){var C=h.action=="insert",v=w.action=="insert";if(C&&v)if(s(w.start,h.end)>=0)y(w,h,-1);else if(s(w.start,h.start)<=0)y(h,w,1);else return null;else if(C&&!v)if(s(w.start,h.end)>=0)y(w,h,-1);else if(s(w.end,h.start)<=0)y(h,w,-1);else return null;else if(!C&&v)if(s(w.start,h.start)>=0)y(w,h,1);else if(s(w.start,h.start)<=0)y(h,w,1);else return null;else if(!C&&!v)if(s(w.start,h.start)>=0)y(w,h,1);else if(s(w.end,h.start)<=0)y(h,w,-1);else return null;return [w,h]}function a(h,w){for(var C=h.length;C--;)for(var v=0;v<w.length;v++)if(!o(h[C],w[v])){for(;C<h.length;){for(;v--;)o(w[v],h[C]);v=w.length,C++;}return [h,w]}return h.selectionBefore=w.selectionBefore=h.selectionAfter=w.selectionAfter=null,[w,h]}function u(h,w){var C=h.action=="insert",v=w.action=="insert";if(C&&v)s(h.start,w.start)<0?y(w,h,1):y(h,w,1);else if(C&&!v)s(h.start,w.end)>=0?y(h,w,-1):(s(h.start,w.start)<=0||y(h,M.fromPoints(w.start,h.start),-1),y(w,h,1));else if(!C&&v)s(w.start,h.end)>=0?y(w,h,-1):(s(w.start,h.start)<=0||y(w,M.fromPoints(h.start,w.start),-1),y(h,w,1));else if(!C&&!v)if(s(w.start,h.end)>=0)y(w,h,-1);else if(s(w.end,h.start)<=0)y(h,w,-1);else {var b,f;return s(h.start,w.start)<0&&(b=h,h=m(h,w.start)),s(h.end,w.end)>0&&(f=m(h,w.end)),S(w.end,h.start,h.end,-1),f&&!b&&(h.lines=f.lines,h.start=f.start,h.end=f.end,f=h),[w,b,f].filter(Boolean)}return [w,h]}function y(h,w,C){S(h.start,w.start,w.end,C),S(h.end,w.start,w.end,C);}function S(h,w,C,v){h.row==(v==1?w:C).row&&(h.column+=v*(C.column-w.column)),h.row+=v*(C.row-w.row);}function m(h,w){var C=h.lines,v=h.end;h.end=t(w);var b=h.end.row-h.start.row,f=C.splice(b,C.length),p=b?w.column:w.column-h.start.column;C.push(f[0].substring(0,p)),f[0]=f[0].substr(p);var c={start:t(w),end:v,lines:f,action:h.action};return c}function $(h,w){w=i(w);for(var C=h.length;C--;){for(var v=h[C],b=0;b<v.length;b++){var f=v[b],p=u(f,w);w=p[0],p.length!=2&&(p[2]?(v.splice(b+1,1,p[1],p[2]),b++):p[1]||(v.splice(b,1),b--));}v.length||h.splice(C,1);}return h}function d(h,w){for(var C=0;C<w.length;C++)for(var v=w[C],b=0;b<v.length;b++)$(h,v[b]);}T.UndoManager=E;});ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(L,T,H){var E=L("../range").Range,x=function(){function M(s,l){this.foldData=s,Array.isArray(l)?this.folds=l:l=this.folds=[l];var r=l[l.length-1];this.range=new E(l[0].start.row,l[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this);},this);}return M.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(l){l.start.row+=s,l.end.row+=s;});},M.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(l,r){return -l.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column);}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this;},M.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},M.prototype.walk=function(s,l,r){var t=0,i=this.folds,n,e,o,a=!0;l==null&&(l=this.end.row,r=this.end.column);for(var u=0;u<i.length;u++){if(n=i[u],e=n.range.compareStart(l,r),e==-1){s(null,l,r,t,a);return}if(o=s(null,n.start.row,n.start.column,t,a),o=!o&&s(n.placeholder,n.start.row,n.start.column,t),o||e===0)return;a=!n.sameRow,t=n.end.column;}s(null,l,r,t,a);},M.prototype.getNextFoldTo=function(s,l){for(var r,t,i=0;i<this.folds.length;i++){if(r=this.folds[i],t=r.range.compareEnd(s,l),t==-1)return {fold:r,kind:"after"};if(t===0)return {fold:r,kind:"inside"}}return null},M.prototype.addRemoveChars=function(s,l,r){var t=this.getNextFoldTo(s,l),i,n;if(t){if(i=t.fold,t.kind=="inside"&&i.start.column!=l&&i.start.row!=s)window.console&&window.console.log(s,l,i);else if(i.start.row==s){n=this.folds;var e=n.indexOf(i);for(e===0&&(this.start.column+=r),e;e<n.length;e++){if(i=n[e],i.start.column+=r,!i.sameRow)return;i.end.column+=r;}this.end.column+=r;}}},M.prototype.split=function(s,l){var r=this.getNextFoldTo(s,l);if(!r||r.kind=="inside")return null;var t=r.fold,i=this.folds,n=this.foldData,e=i.indexOf(t),o=i[e-1];this.end.row=o.end.row,this.end.column=o.end.column,i=i.splice(e,i.length-e);var a=new M(n,i);return n.splice(n.indexOf(this)+1,0,a),a},M.prototype.merge=function(s){for(var l=s.folds,r=0;r<l.length;r++)this.addFold(l[r]);var t=this.foldData;t.splice(t.indexOf(s),1);},M.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(l){s.push(" "+l.toString());}),s.push("]"),s.join(`
216
+ `)},M.prototype.idxToPosition=function(s){for(var l=0,r=0;r<this.folds.length;r++){var t=this.folds[r];if(s-=t.start.column-l,s<0)return {row:t.start.row,column:t.start.column+s};if(s-=t.placeholder.length,s<0)return t.start;l=t.end.column;}return {row:this.end.row,column:this.end.column+s}},M}();T.FoldLine=x;});ace.define("ace/range_list",["require","exports","module","ace/range"],function(L,T,H){var E=L("./range").Range,x=E.comparePoints,M=function(){function s(){this.ranges=[],this.$bias=1;}return s.prototype.pointIndex=function(l,r,t){for(var i=this.ranges,n=t||0;n<i.length;n++){var e=i[n],o=x(l,e.end);if(!(o>0)){var a=x(l,e.start);return o===0?r&&a!==0?-n-2:n:a>0||a===0&&!r?n:-n-1}}return -n-1},s.prototype.add=function(l){var r=!l.isEmpty(),t=this.pointIndex(l.start,r);t<0&&(t=-t-1);var i=this.pointIndex(l.end,r,t);return i<0?i=-i-1:i++,this.ranges.splice(t,i-t,l)},s.prototype.addList=function(l){for(var r=[],t=l.length;t--;)r.push.apply(r,this.add(l[t]));return r},s.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},s.prototype.merge=function(){var l=[],r=this.ranges;r=r.sort(function(o,a){return x(o.start,a.start)});for(var t=r[0],i,n=1;n<r.length;n++){i=t,t=r[n];var e=x(i.end,t.start);e<0||e==0&&!i.isEmpty()&&!t.isEmpty()||(x(i.end,t.end)<0&&(i.end.row=t.end.row,i.end.column=t.end.column),r.splice(n,1),l.push(t),t=i,n--);}return this.ranges=r,l},s.prototype.contains=function(l,r){return this.pointIndex({row:l,column:r})>=0},s.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},s.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},s.prototype.clipRows=function(l,r){var t=this.ranges;if(t[0].start.row>r||t[t.length-1].start.row<l)return [];var i=this.pointIndex({row:l,column:0});i<0&&(i=-i-1);var n=this.pointIndex({row:r,column:0},i);n<0&&(n=-n-1);for(var e=[],o=i;o<n;o++)e.push(t[o]);return e},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange);},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null);},s.prototype.$onChange=function(l){for(var r=l.start,t=l.end,i=r.row,n=t.row,e=this.ranges,o=0,a=e.length;o<a;o++){var u=e[o];if(u.end.row>=i)break}if(l.action=="insert")for(var y=n-i,S=-r.column+t.column;o<a;o++){var u=e[o];if(u.start.row>i)break;if(u.start.row==i&&u.start.column>=r.column&&(u.start.column==r.column&&this.$bias<=0||(u.start.column+=S,u.start.row+=y)),u.end.row==i&&u.end.column>=r.column){if(u.end.column==r.column&&this.$bias<0)continue;u.end.column==r.column&&S>0&&o<a-1&&u.end.column>u.start.column&&u.end.column==e[o+1].start.column&&(u.end.column-=S),u.end.column+=S,u.end.row+=y;}}else for(var y=i-n,S=r.column-t.column;o<a;o++){var u=e[o];if(u.start.row>n)break;u.end.row<n&&(i<u.end.row||i==u.end.row&&r.column<u.end.column)?(u.end.row=i,u.end.column=r.column):u.end.row==n?u.end.column<=t.column?(y||u.end.column>r.column)&&(u.end.column=r.column,u.end.row=r.row):(u.end.column+=S,u.end.row+=y):u.end.row>n&&(u.end.row+=y),u.start.row<n&&(i<u.start.row||i==u.start.row&&r.column<u.start.column)?(u.start.row=i,u.start.column=r.column):u.start.row==n?u.start.column<=t.column?(y||u.start.column>r.column)&&(u.start.column=r.column,u.start.row=r.row):(u.start.column+=S,u.start.row+=y):u.start.row>n&&(u.start.row+=y);}if(y!=0&&o<a)for(;o<a;o++){var u=e[o];u.start.row+=y,u.end.row+=y;}},s}();M.prototype.comparePoints=x,T.RangeList=M;});ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(L,T,H){var E=this&&this.__extends||function(){var i=function(n,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a;}||function(o,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u]);},i(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(n,e);function o(){this.constructor=n;}n.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o);}}(),x=L("../range_list").RangeList,M=function(i){E(n,i);function n(e,o){var a=i.call(this)||this;return a.foldLine=null,a.placeholder=o,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return n.prototype.toString=function(){return '"'+this.placeholder+'" '+this.range.toString()},n.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(o){o.setFoldLine(e);});},n.prototype.clone=function(){var e=this.range.clone(),o=new n(e,this.placeholder);return this.subFolds.forEach(function(a){o.subFolds.push(a.clone());}),o.collapseChildren=this.collapseChildren,o},n.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){l(e,this.start);for(var S=e.start.row,m=e.start.column,o=0,a=-1;o<this.subFolds.length&&(a=this.subFolds[o].range.compare(S,m),a==1);o++);var u=this.subFolds[o],y=0;if(a==0){if(u.range.containsRange(e))return u.addSubFold(e);y=1;}for(var S=e.range.end.row,m=e.range.end.column,$=o,a=-1;$<this.subFolds.length&&(a=this.subFolds[$].range.compare(S,m),a==1);$++);a==0&&$++;for(var d=this.subFolds.splice(o,$-o,e),h=a==0?d.length-1:d.length,w=y;w<h;w++)e.addSubFold(d[w]);return e.setFoldLine(this.foldLine),e}},n.prototype.restoreRange=function(e){return t(e,this.start)},n}(x);function s(i,n){i.row-=n.row,i.row==0&&(i.column-=n.column);}function l(i,n){s(i.start,n),s(i.end,n);}function r(i,n){i.row==0&&(i.column+=n.column),i.row+=n.row;}function t(i,n){r(i.start,n),r(i.end,n);}T.Fold=M;});ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(L,T,H){var E=L("../range").Range,x=L("./fold_line").FoldLine,M=L("./fold").Fold,s=L("../token_iterator").TokenIterator,l=L("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(t,i,n){var e=this.getFoldLine(t);if(!e)return null;for(var o=e.folds,a=0;a<o.length;a++){var u=o[a].range;if(u.contains(t,i)){if(n==1&&u.isEnd(t,i)&&!u.isEmpty())continue;if(n==-1&&u.isStart(t,i)&&!u.isEmpty())continue;return o[a]}}},this.getFoldsInRange=function(t){var i=t.start,n=t.end,e=this.$foldData,o=[];i.column+=1,n.column-=1;for(var a=0;a<e.length;a++){var u=e[a].range.compareRange(t);if(u!=2){if(u==-2)break;for(var y=e[a].folds,S=0;S<y.length;S++){var m=y[S];if(u=m.range.compareRange(t),u==-2)break;if(u==2)continue;if(u==42)break;o.push(m);}}}return i.column-=1,n.column+=1,o},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var i=[];t.forEach(function(n){i=i.concat(this.getFoldsInRange(n));},this);}else var i=this.getFoldsInRange(t);return i},this.getAllFolds=function(){for(var t=[],i=this.$foldData,n=0;n<i.length;n++)for(var e=0;e<i[n].folds.length;e++)t.push(i[n].folds[e]);return t},this.getFoldStringAt=function(t,i,n,e){if(e=e||this.getFoldLine(t),!e)return null;for(var o={end:{column:0}},a,u,y=0;y<e.folds.length;y++){u=e.folds[y];var S=u.range.compareEnd(t,i);if(S==-1){a=this.getLine(u.start.row).substring(o.end.column,u.start.column);break}else if(S===0)return null;o=u;}return a||(a=this.getLine(u.start.row).substring(o.end.column)),n==-1?a.substring(0,i-o.end.column):n==1?a.substring(i-o.end.column):a},this.getFoldLine=function(t,i){var n=this.$foldData,e=0;for(i&&(e=n.indexOf(i)),e==-1&&(e=0),e;e<n.length;e++){var o=n[e];if(o.start.row<=t&&o.end.row>=t)return o;if(o.end.row>t)return null}return null},this.getNextFoldLine=function(t,i){var n=this.$foldData,e=0;for(i&&(e=n.indexOf(i)),e==-1&&(e=0),e;e<n.length;e++){var o=n[e];if(o.end.row>=t)return o}return null},this.getFoldedRowCount=function(t,i){for(var n=this.$foldData,e=i-t+1,o=0;o<n.length;o++){var a=n[o],u=a.end.row,y=a.start.row;if(u>=i){y<i&&(y>=t?e-=i-y:e=0);break}else u>=t&&(y>=t?e-=u-y:e-=u-t+1);}return e},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(i,n){return i.start.row-n.start.row}),t},this.addFold=function(t,i){var n=this.$foldData,e=!1,o;t instanceof M?o=t:(o=new M(i,t),o.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(o.range);var a=o.start.row,u=o.start.column,y=o.end.row,S=o.end.column,m=this.getFoldAt(a,u,1),$=this.getFoldAt(y,S,-1);if(m&&$==m)return m.addSubFold(o);m&&!m.range.isStart(a,u)&&this.removeFold(m),$&&!$.range.isEnd(y,S)&&this.removeFold($);var d=this.getFoldsInRange(o.range);d.length>0&&(this.removeFolds(d),o.collapseChildren||d.forEach(function(v){o.addSubFold(v);}));for(var h=0;h<n.length;h++){var w=n[h];if(y==w.start.row){w.addFold(o),e=!0;break}else if(a==w.end.row){if(w.addFold(o),e=!0,!o.sameRow){var C=n[h+1];if(C&&C.start.row==y){w.merge(C);break}}break}else if(y<=w.start.row)break}return e||(w=this.$addFoldLine(new x(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(w.start.row,w.start.row):this.$updateRowLengthCache(w.start.row,w.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(t){t.forEach(function(i){this.addFold(i);},this);},this.removeFold=function(t){var i=t.foldLine,n=i.start.row,e=i.end.row,o=this.$foldData,a=i.folds;if(a.length==1)o.splice(o.indexOf(i),1);else if(i.range.isEnd(t.end.row,t.end.column))a.pop(),i.end.row=a[a.length-1].end.row,i.end.column=a[a.length-1].end.column;else if(i.range.isStart(t.start.row,t.start.column))a.shift(),i.start.row=a[0].start.row,i.start.column=a[0].start.column;else if(t.sameRow)a.splice(a.indexOf(t),1);else {var u=i.split(t.start.row,t.start.column);a=u.folds,a.shift(),u.start.row=a[0].start.row,u.start.column=a[0].start.column;}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,e):this.$updateRowLengthCache(n,e)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"});},this.removeFolds=function(t){for(var i=[],n=0;n<t.length;n++)i.push(t[n]);i.forEach(function(e){this.removeFold(e);},this),this.$modified=!0;},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach(function(i){t.restoreRange(i),this.addFold(i);},this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[];},this.expandFolds=function(t){t.forEach(function(i){this.expandFold(i);},this);},this.unfold=function(t,i){var n,e;if(t==null)n=new E(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof t=="number")n=new E(t,0,t,this.getLine(t).length);else if("row"in t)n=E.fromPoints(t,t);else {if(Array.isArray(t))return e=[],t.forEach(function(a){e=e.concat(this.unfold(a));},this),e;n=t;}e=this.getFoldsInRangeList(n);for(var o=e;e.length==1&&E.comparePoints(e[0].start,n.start)<0&&E.comparePoints(e[0].end,n.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(n);if(i!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(t,i){return !!this.getFoldLine(t,i)},this.getRowFoldEnd=function(t,i){var n=this.getFoldLine(t,i);return n?n.end.row:t},this.getRowFoldStart=function(t,i){var n=this.getFoldLine(t,i);return n?n.start.row:t},this.getFoldDisplayLine=function(t,i,n,e,o){e==null&&(e=t.start.row),o==null&&(o=0),i==null&&(i=t.end.row),n==null&&(n=this.getLine(i).length);var a=this.doc,u="";return t.walk(function(y,S,m,$){if(!(S<e)){if(S==e){if(m<o)return;$=Math.max(o,$);}y!=null?u+=y:u+=a.getLine(S).substring($,m);}},i,n),u},this.getDisplayLine=function(t,i,n,e){var o=this.getFoldLine(t);if(o)return this.getFoldDisplayLine(o,t,i,n,e);var a;return a=this.doc.getLine(t),a.substring(e||0,i||a.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(i){var n=i.folds.map(function(e){return e.clone()});return new x(t,n)}),t},this.toggleFold=function(t){var i=this.selection,n=i.getRange(),e,o;if(n.isEmpty()){var a=n.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else (o=this.findMatchingBracket(a))?n.comparePoint(o)==1?n.end=o:(n.start=o,n.start.column++,n.end.column--):(o=this.findMatchingBracket({row:a.row,column:a.column+1}))?(n.comparePoint(o)==1?n.end=o:n.start=o,n.start.column++):n=this.getCommentFoldRange(a.row,a.column)||n;}else {var u=this.getFoldsInRange(n);if(t&&u.length){this.expandFolds(u);return}else u.length==1&&(e=u[0]);}if(e||(e=this.getFoldAt(n.start.row,n.start.column)),e&&e.range.toString()==n.toString()){this.expandFold(e);return}var y="...";if(!n.isMultiLine()){if(y=this.getTextRange(n),y.length<4)return;y=y.trim().substring(0,2)+"..";}this.addFold(y,n);},this.getCommentFoldRange=function(t,i,n){var e=new s(this,t,i),o=e.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var u=new RegExp(a),y=new E;if(n!=1){do o=e.stepBackward();while(o&&u.test(o.type));o=e.stepForward();}y.start.row=e.getCurrentTokenRow(),y.start.column=e.getCurrentTokenColumn()+o.value.length,e=new s(this,t,i);var S=this.getState(e.$row);if(n!=-1){var m=-1;do if(o=e.stepForward(),m==-1){var $=this.getState(e.$row);S.toString()!==$.toString()&&(m=e.$row);}else if(e.$row>m)break;while(o&&u.test(o.type));o=e.stepBackward();}else o=e.getCurrentToken();return y.end.row=e.getCurrentTokenRow(),y.end.column=e.getCurrentTokenColumn(),y}},this.foldAll=function(t,i,n,e){n==null&&(n=1e5);var o=this.foldWidgets;if(o){i=i||this.getLength(),t=t||0;for(var a=t;a<i;a++)if(o[a]==null&&(o[a]=this.getFoldWidget(a)),o[a]=="start"&&!(e&&!e(a))){var u=this.getFoldWidgetRange(a);u&&u.isMultiLine()&&u.end.row<=i&&u.start.row>=t&&(a=u.end.row,u.collapseChildren=n,this.addFold("...",u));}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1);},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(i){for(var n=t.getTokens(i),e=0;e<n.length;e++){var o=n[e];if(!(o.type=="text"&&/^\s+$/.test(o.value)))return !!/comment/.test(o.type)}});},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,t=="manual"&&this.unfold();var i=this.$foldMode;this.$setFolding(null),this.$setFolding(i);}},this.$setFolding=function(t){if(this.$foldMode!=t){if(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!t||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets);}},this.getParentFoldRangeData=function(t,i){var n=this.foldWidgets;if(!n||i&&n[t])return {};for(var e=t-1,o;e>=0;){var a=n[e];if(a==null&&(a=n[e]=this.getFoldWidget(e)),a=="start"){var u=this.getFoldWidgetRange(e);if(o||(o=u),u&&u.end.row>=t)break}e--;}return {range:e!==-1&&u,firstRange:o}},this.onFoldWidgetClick=function(t,i){i instanceof l&&(i=i.domEvent);var n={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},e=this.$toggleFoldWidget(t,n);if(!e){var o=i.target||i.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid");}},this.$toggleFoldWidget=function(t,i){if(this.getFoldWidget){var n=this.getFoldWidget(t),e=this.getLine(t),o=n==="end"?-1:1,a=this.getFoldAt(t,o===-1?0:e.length,o);if(a)return i.children||i.all?this.removeFold(a):this.expandFold(a),a;var u=this.getFoldWidgetRange(t,!0);if(u&&!u.isMultiLine()&&(a=this.getFoldAt(u.start.row,u.start.column,1),a&&u.isEqual(a.range)))return this.removeFold(a),a;if(i.siblings){var y=this.getParentFoldRangeData(t);if(y.range)var S=y.range.start.row+1,m=y.range.end.row;this.foldAll(S,m,i.all?1e4:0);}else i.children?(m=u?u.end.row:this.getLength(),this.foldAll(t+1,m,i.all?1e4:0)):u&&(i.all&&(u.collapseChildren=1e4),this.addFold("...",u));return u}},this.toggleFoldWidget=function(t){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var n=this.$toggleFoldWidget(i,{});if(!n){var e=this.getParentFoldRangeData(i,!0);if(n=e.range||e.firstRange,n){i=n.start.row;var o=this.getFoldAt(i,this.getLine(i).length,1);o?this.removeFold(o):this.addFold("...",n);}}},this.updateFoldWidgets=function(t){var i=t.start.row,n=t.end.row-i;if(n===0)this.foldWidgets[i]=null;else if(t.action=="remove")this.foldWidgets.splice(i,n+1,null);else {var e=Array(n+1);e.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e);}},this.tokenizerUpdateFoldWidgets=function(t){var i=t.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length);};}T.Folding=r;});ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(L,T,H){var E=L("../token_iterator").TokenIterator,x=L("../range").Range;function M(){this.findMatchingBracket=function(s,l){if(s.column==0)return null;var r=l||this.getLine(s.row).charAt(s.column-1);if(r=="")return null;var t=r.match(/([\(\[\{])|([\)\]\}])/);return t?t[1]?this.$findClosingBracket(t[1],s):this.$findOpeningBracket(t[2],s):null},this.getBracketRange=function(s){var l=this.getLine(s.row),r=!0,t,i=l.charAt(s.column-1),n=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(n||(i=l.charAt(s.column),s={row:s.row,column:s.column+1},n=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!n)return null;if(n[1]){var e=this.$findClosingBracket(n[1],s);if(!e)return null;t=x.fromPoints(s,e),r||(t.end.column++,t.start.column--),t.cursor=t.end;}else {var e=this.$findOpeningBracket(n[2],s);if(!e)return null;t=x.fromPoints(e,s),r||(t.start.column++,t.end.column--),t.cursor=t.start;}return t},this.getMatchingBracketRanges=function(s,l){var r=this.getLine(s.row),t=/([\(\[\{])|([\)\]\}])/,i=!l&&r.charAt(s.column-1),n=i&&i.match(t);if(n||(i=(l===void 0||l)&&r.charAt(s.column),s={row:s.row,column:s.column+1},n=i&&i.match(t)),!n)return null;var e=new x(s.row,s.column-1,s.row,s.column),o=n[1]?this.$findClosingBracket(n[1],s):this.$findOpeningBracket(n[2],s);if(!o)return [e];var a=new x(o.row,o.column,o.row,o.column+1);return [e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,l,r){var t=this.$brackets[s],i=1,n=new E(this,l.row,l.column),e=n.getCurrentToken();if(e||(e=n.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=l.column-n.getCurrentTokenColumn()-2,a=e.value;;){for(;o>=0;){var u=a.charAt(o);if(u==t){if(i-=1,i==0)return {row:n.getCurrentTokenRow(),column:o+n.getCurrentTokenColumn()}}else u==s&&(i+=1);o-=1;}do e=n.stepBackward();while(e&&!r.test(e.type));if(e==null)break;a=e.value,o=a.length-1;}return null}},this.$findClosingBracket=function(s,l,r){var t=this.$brackets[s],i=1,n=new E(this,l.row,l.column),e=n.getCurrentToken();if(e||(e=n.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=l.column-n.getCurrentTokenColumn();;){for(var a=e.value,u=a.length;o<u;){var y=a.charAt(o);if(y==t){if(i-=1,i==0)return {row:n.getCurrentTokenRow(),column:o+n.getCurrentTokenColumn()}}else y==s&&(i+=1);o+=1;}do e=n.stepForward();while(e&&!r.test(e.type));if(e==null)break;o=0;}return null}},this.getMatchingTags=function(s){var l=new E(this,s.row,s.column),r=this.$findTagName(l);if(r){var t=l.stepBackward();return t.value==="<"?this.$findClosingTag(l,r):this.$findOpeningTag(l,r)}},this.$findTagName=function(s){var l=s.getCurrentToken(),r=!1,t=!1;if(l&&l.type.indexOf("tag-name")===-1)do t?l=s.stepBackward():l=s.stepForward(),l&&(l.value==="/>"?t=!0:l.type.indexOf("tag-name")!==-1&&(r=!0));while(l&&!r);return l},this.$findClosingTag=function(s,l){var r,t=l.value,i=l.value,n=0,e=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=s.stepForward();var o=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length),a=!1;do{if(r=l,r.type.indexOf("tag-close")!==-1&&!a){var u=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0;}if(l=s.stepForward(),l){if(l.value===">"&&!a){var u=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0;}if(l.type.indexOf("tag-name")!==-1){if(t=l.value,i===t){if(r.value==="<")n++;else if(r.value==="</"&&(n--,n<0)){s.stepBackward();var y=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);l=s.stepForward();var S=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=s.stepForward()),l&&l.value===">")var m=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(i===t&&l.value==="/>"&&(n--,n<0))var y=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),S=y,m=S,u=new x(o.end.row,o.end.column,o.end.row,o.end.column+1);}}while(l&&n>=0);if(e&&u&&y&&m&&o&&S)return {openTag:new x(e.start.row,e.start.column,u.end.row,u.end.column),closeTag:new x(y.start.row,y.start.column,m.end.row,m.end.column),openTagName:o,closeTagName:S}},this.$findOpeningTag=function(s,l){var r=s.getCurrentToken(),t=l.value,i=0,n=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),o=e+2,a=new x(n,e,n,o);s.stepForward();var u=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=s.stepForward()),!(!l||l.value!==">")){var y=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(l=r,n=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),o=e+l.value.length,r=s.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(t===l.value)if(r.value==="<"){if(i++,i>0){var S=new x(n,e,n,o),m=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do l=s.stepForward();while(l&&l.value!==">");var $=new x(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);}}else r.value==="</"&&i--;}else if(l.value==="/>"){for(var d=0,h=r;h;){if(h.type.indexOf("tag-name")!==-1&&h.value===t){i--;break}else if(h.value==="<")break;h=s.stepBackward(),d++;}for(var w=0;w<d;w++)s.stepForward();}}while(r&&i<=0);if(m&&$&&a&&y&&S&&u)return {openTag:new x(m.start.row,m.start.column,$.end.row,$.end.column),closeTag:new x(a.start.row,a.start.column,y.end.row,y.end.column),openTagName:S,closeTagName:u}}};}T.BracketMatch=M;});ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(L,T,H){var E=L("./lib/oop"),x=L("./lib/lang"),M=L("./bidihandler").BidiHandler,s=L("./config"),l=L("./lib/event_emitter").EventEmitter,r=L("./selection").Selection,t=L("./mode/text").Mode,i=L("./range").Range,n=L("./document").Document,e=L("./background_tokenizer").BackgroundTokenizer,o=L("./search_highlight").SearchHighlight,a=L("./undomanager").UndoManager,u=function(){function b(f,p){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++b.$uid,this.$foldData.toString=function(){return this.join(`
217
+ `)},this.bgTokenizer=new e(new t().getTokenizer(),this);var c=this;this.bgTokenizer.on("update",function(g){c._signal("tokenizerUpdate",g);}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof f!="object"||!f.getLine)&&(f=new n(f)),this.setDocument(f),this.selection=new r(this),this.$bidiHandler=new M(this),s.resetOptions(this),this.setMode(p),s._signal("session",this),this.destroyed=!1;}return b.prototype.setDocument=function(f){this.doc&&this.doc.off("change",this.$onChange),this.doc=f,f.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches();},b.prototype.getDocument=function(){return this.doc},b.prototype.$resetRowCache=function(f){if(!f){this.$docRowCache=[],this.$screenRowCache=[];return}var p=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,f)+1;p>c&&(this.$docRowCache.splice(c,p),this.$screenRowCache.splice(c,p));},b.prototype.$getRowCacheIndex=function(f,p){for(var c=0,g=f.length-1;c<=g;){var A=c+g>>1,k=f[A];if(p>k)c=A+1;else if(p<k)g=A-1;else return A}return c-1},b.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0);},b.prototype.onChangeFold=function(f){var p=f.data;this.$resetRowCache(p.start.row);},b.prototype.onChange=function(f){this.$modified=!0,this.$bidiHandler.onChange(f),this.$resetRowCache(f.start.row);var p=this.$updateInternalDataOnChange(f);!this.$fromUndo&&this.$undoManager&&(p&&p.length&&(this.$undoManager.add({action:"removeFolds",folds:p},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(f,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(f),this._signal("change",f);},b.prototype.setValue=function(f){this.doc.setValue(f),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset();},b.fromJSON=function(f){typeof f=="string"&&(f=JSON.parse(f));var p=new a;p.$undoStack=f.history.undo,p.$redoStack=f.history.redo,p.mark=f.history.mark,p.$rev=f.history.rev;var c=new b(f.value);return f.folds.forEach(function(g){c.addFold("...",i.fromPoints(g.start,g.end));}),c.setAnnotations(f.annotations),c.setBreakpoints(f.breakpoints),c.setMode(f.mode),c.setScrollLeft(f.scrollLeft),c.setScrollTop(f.scrollTop),c.setUndoManager(p),c.selection.fromJSON(f.selection),c},b.prototype.toJSON=function(){return {annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(f){return f.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},b.prototype.toString=function(){return this.doc.getValue()},b.prototype.getSelection=function(){return this.selection},b.prototype.getState=function(f){return this.bgTokenizer.getState(f)},b.prototype.getTokens=function(f){return this.bgTokenizer.getTokens(f)},b.prototype.getTokenAt=function(f,p){var c=this.bgTokenizer.getTokens(f),g,A=0;if(p==null){var k=c.length-1;A=this.getLine(f).length;}else for(var k=0;k<c.length&&(A+=c[k].value.length,!(A>=p));k++);return g=c[k],g?(g.index=k,g.start=A-g.value.length,g):null},b.prototype.setUndoManager=function(f){if(this.$undoManager=f,this.$informUndoManager&&this.$informUndoManager.cancel(),f){var p=this;f.addSession(this),this.$syncInformUndoManager=function(){p.$informUndoManager.cancel(),p.mergeUndoDeltas=!1;},this.$informUndoManager=x.delayedCall(this.$syncInformUndoManager);}else this.$syncInformUndoManager=function(){};},b.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager();},b.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},b.prototype.getTabString=function(){return this.getUseSoftTabs()?x.stringRepeat(" ",this.getTabSize()):" "},b.prototype.setUseSoftTabs=function(f){this.setOption("useSoftTabs",f);},b.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},b.prototype.setTabSize=function(f){this.setOption("tabSize",f);},b.prototype.getTabSize=function(){return this.$tabSize},b.prototype.isTabStop=function(f){return this.$useSoftTabs&&f.column%this.$tabSize===0},b.prototype.setNavigateWithinSoftTabs=function(f){this.setOption("navigateWithinSoftTabs",f);},b.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},b.prototype.setOverwrite=function(f){this.setOption("overwrite",f);},b.prototype.getOverwrite=function(){return this.$overwrite},b.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite);},b.prototype.addGutterDecoration=function(f,p){this.$decorations[f]||(this.$decorations[f]=""),this.$decorations[f]+=" "+p,this._signal("changeBreakpoint",{});},b.prototype.removeGutterDecoration=function(f,p){this.$decorations[f]=(this.$decorations[f]||"").replace(" "+p,""),this._signal("changeBreakpoint",{});},b.prototype.getBreakpoints=function(){return this.$breakpoints},b.prototype.setBreakpoints=function(f){this.$breakpoints=[];for(var p=0;p<f.length;p++)this.$breakpoints[f[p]]="ace_breakpoint";this._signal("changeBreakpoint",{});},b.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{});},b.prototype.setBreakpoint=function(f,p){p===void 0&&(p="ace_breakpoint"),p?this.$breakpoints[f]=p:delete this.$breakpoints[f],this._signal("changeBreakpoint",{});},b.prototype.clearBreakpoint=function(f){delete this.$breakpoints[f],this._signal("changeBreakpoint",{});},b.prototype.addMarker=function(f,p,c,g){var A=this.$markerId++,k={range:f,type:c||"line",renderer:typeof c=="function"?c:null,clazz:p,inFront:!!g,id:A};return g?(this.$frontMarkers[A]=k,this._signal("changeFrontMarker")):(this.$backMarkers[A]=k,this._signal("changeBackMarker")),A},b.prototype.addDynamicMarker=function(f,p){if(f.update){var c=this.$markerId++;return f.id=c,f.inFront=!!p,p?(this.$frontMarkers[c]=f,this._signal("changeFrontMarker")):(this.$backMarkers[c]=f,this._signal("changeBackMarker")),f}},b.prototype.removeMarker=function(f){var p=this.$frontMarkers[f]||this.$backMarkers[f];if(p){var c=p.inFront?this.$frontMarkers:this.$backMarkers;delete c[f],this._signal(p.inFront?"changeFrontMarker":"changeBackMarker");}},b.prototype.getMarkers=function(f){return f?this.$frontMarkers:this.$backMarkers},b.prototype.highlight=function(f){if(!this.$searchHighlight){var p=new o(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(p);}this.$searchHighlight.setRegexp(f);},b.prototype.highlightLines=function(f,p,c,g){typeof p!="number"&&(c=p,p=f),c||(c="ace_step");var A=new i(f,0,p,1/0);return A.id=this.addMarker(A,c,"fullLine",g),A},b.prototype.setAnnotations=function(f){this.$annotations=f,this._signal("changeAnnotation",{});},b.prototype.getAnnotations=function(){return this.$annotations||[]},b.prototype.clearAnnotations=function(){this.setAnnotations([]);},b.prototype.$detectNewLine=function(f){var p=f.match(/^.*?(\r?\n)/m);p?this.$autoNewLine=p[1]:this.$autoNewLine=`
218
+ `;},b.prototype.getWordRange=function(f,p){var c=this.getLine(f),g=!1;if(p>0&&(g=!!c.charAt(p-1).match(this.tokenRe)),g||(g=!!c.charAt(p).match(this.tokenRe)),g)var A=this.tokenRe;else if(/^\s+$/.test(c.slice(p-1,p+1)))var A=/\s/;else var A=this.nonTokenRe;var k=p;if(k>0){do k--;while(k>=0&&c.charAt(k).match(A));k++;}for(var R=p;R<c.length&&c.charAt(R).match(A);)R++;return new i(f,k,f,R)},b.prototype.getAWordRange=function(f,p){for(var c=this.getWordRange(f,p),g=this.getLine(c.end.row);g.charAt(c.end.column).match(/[ \t]/);)c.end.column+=1;return c},b.prototype.setNewLineMode=function(f){this.doc.setNewLineMode(f);},b.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},b.prototype.setUseWorker=function(f){this.setOption("useWorker",f);},b.prototype.getUseWorker=function(){return this.$useWorker},b.prototype.onReloadTokenizer=function(f){var p=f.data;this.bgTokenizer.start(p.first),this._signal("tokenizerUpdate",f);},b.prototype.setMode=function(f,p){if(f&&typeof f=="object"){if(f.getTokenizer)return this.$onChangeMode(f);var c=f,g=c.path;}else g=f||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new t),this.$modes[g]&&!c){this.$onChangeMode(this.$modes[g]),p&&p();return}this.$modeId=g,s.loadModule(["mode",g],function(A){if(this.$modeId!==g)return p&&p();this.$modes[g]&&!c?this.$onChangeMode(this.$modes[g]):A&&A.Mode&&(A=new A.Mode(c),c||(this.$modes[g]=A,A.$id=g),this.$onChangeMode(A)),p&&p();}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0);},b.prototype.$onChangeMode=function(f,p){if(p||(this.$modeId=f.$id),this.$mode!==f){var c=this.$mode;this.$mode=f,this.$stopWorker(),this.$useWorker&&this.$startWorker();var g=f.getTokenizer();if(g.on!==void 0){var A=this.onReloadTokenizer.bind(this);g.on("update",A);}this.bgTokenizer.setTokenizer(g),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=f.tokenRe,this.nonTokenRe=f.nonTokenRe,p||(f.attachToSession&&f.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(f.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:c,mode:f}));}},b.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null);},b.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this);}catch(f){s.warn("Could not load worker",f),this.$worker=null;}},b.prototype.getMode=function(){return this.$mode},b.prototype.setScrollTop=function(f){this.$scrollTop===f||isNaN(f)||(this.$scrollTop=f,this._signal("changeScrollTop",f));},b.prototype.getScrollTop=function(){return this.$scrollTop},b.prototype.setScrollLeft=function(f){this.$scrollLeft===f||isNaN(f)||(this.$scrollLeft=f,this._signal("changeScrollLeft",f));},b.prototype.getScrollLeft=function(){return this.$scrollLeft},b.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},b.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var f=0;return this.lineWidgets.forEach(function(p){p&&p.screenWidth>f&&(f=p.screenWidth);}),this.lineWidgetWidth=f},b.prototype.$computeWidth=function(f){if(this.$modified||f){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var p=this.doc.getAllLines(),c=this.$rowLengthCache,g=0,A=0,k=this.$foldData[A],R=k?k.start.row:1/0,_=p.length,D=0;D<_;D++){if(D>R){if(D=k.end.row+1,D>=_)break;k=this.$foldData[A++],R=k?k.start.row:1/0;}c[D]==null&&(c[D]=this.$getStringScreenWidth(p[D])[0]),c[D]>g&&(g=c[D]);}this.screenWidth=g;}},b.prototype.getLine=function(f){return this.doc.getLine(f)},b.prototype.getLines=function(f,p){return this.doc.getLines(f,p)},b.prototype.getLength=function(){return this.doc.getLength()},b.prototype.getTextRange=function(f){return this.doc.getTextRange(f||this.selection.getRange())},b.prototype.insert=function(f,p){return this.doc.insert(f,p)},b.prototype.remove=function(f){return this.doc.remove(f)},b.prototype.removeFullLines=function(f,p){return this.doc.removeFullLines(f,p)},b.prototype.undoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var c=f.length-1;c!=-1;c--){var g=f[c];g.action=="insert"||g.action=="remove"?this.doc.revertDelta(g):g.folds&&this.addFolds(g.folds);}!p&&this.$undoSelect&&(f.selectionBefore?this.selection.fromJSON(f.selectionBefore):this.selection.setRange(this.$getUndoSelection(f,!0))),this.$fromUndo=!1;}},b.prototype.redoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var c=0;c<f.length;c++){var g=f[c];(g.action=="insert"||g.action=="remove")&&this.doc.$safeApplyDelta(g);}!p&&this.$undoSelect&&(f.selectionAfter?this.selection.fromJSON(f.selectionAfter):this.selection.setRange(this.$getUndoSelection(f,!1))),this.$fromUndo=!1;}},b.prototype.setUndoSelect=function(f){this.$undoSelect=f;},b.prototype.$getUndoSelection=function(f,p){function c(_){return p?_.action!=="insert":_.action==="insert"}for(var g,A,k=0;k<f.length;k++){var R=f[k];if(R.start){if(!g){c(R)?g=i.fromPoints(R.start,R.end):g=i.fromPoints(R.start,R.start);continue}c(R)?(A=R.start,g.compare(A.row,A.column)==-1&&g.setStart(A),A=R.end,g.compare(A.row,A.column)==1&&g.setEnd(A)):(A=R.start,g.compare(A.row,A.column)==-1&&(g=i.fromPoints(R.start,R.start)));}}return g},b.prototype.replace=function(f,p){return this.doc.replace(f,p)},b.prototype.moveText=function(f,p,c){var g=this.getTextRange(f),A=this.getFoldsInRange(f),k=i.fromPoints(p,p);if(!c){this.remove(f);var R=f.start.row-f.end.row,_=R?-f.end.column:f.start.column-f.end.column;_&&(k.start.row==f.end.row&&k.start.column>f.end.column&&(k.start.column+=_),k.end.row==f.end.row&&k.end.column>f.end.column&&(k.end.column+=_)),R&&k.start.row>=f.end.row&&(k.start.row+=R,k.end.row+=R);}if(k.end=this.insert(k.start,g),A.length){var D=f.start,I=k.start,R=I.row-D.row,_=I.column-D.column;this.addFolds(A.map(function(O){return O=O.clone(),O.start.row==D.row&&(O.start.column+=_),O.end.row==D.row&&(O.end.column+=_),O.start.row+=R,O.end.row+=R,O}));}return k},b.prototype.indentRows=function(f,p,c){c=c.replace(/\t/g,this.getTabString());for(var g=f;g<=p;g++)this.doc.insertInLine({row:g,column:0},c);},b.prototype.outdentRows=function(f){for(var p=f.collapseRows(),c=new i(0,0,0,0),g=this.getTabSize(),A=p.start.row;A<=p.end.row;++A){var k=this.getLine(A);c.start.row=A,c.end.row=A;for(var R=0;R<g&&k.charAt(R)==" ";++R);R<g&&k.charAt(R)==" "?(c.start.column=R,c.end.column=R+1):(c.start.column=0,c.end.column=R),this.remove(c);}},b.prototype.$moveLines=function(f,p,c){if(f=this.getRowFoldStart(f),p=this.getRowFoldEnd(p),c<0){var g=this.getRowFoldStart(f+c);if(g<0)return 0;var A=g-f;}else if(c>0){var g=this.getRowFoldEnd(p+c);if(g>this.doc.getLength()-1)return 0;var A=g-p;}else {f=this.$clipRowToDocument(f),p=this.$clipRowToDocument(p);var A=p-f+1;}var k=new i(f,0,p,Number.MAX_VALUE),R=this.getFoldsInRange(k).map(function(D){return D=D.clone(),D.start.row+=A,D.end.row+=A,D}),_=c==0?this.doc.getLines(f,p):this.doc.removeFullLines(f,p);return this.doc.insertFullLines(f+A,_),R.length&&this.addFolds(R),A},b.prototype.moveLinesUp=function(f,p){return this.$moveLines(f,p,-1)},b.prototype.moveLinesDown=function(f,p){return this.$moveLines(f,p,1)},b.prototype.duplicateLines=function(f,p){return this.$moveLines(f,p,0)},b.prototype.$clipRowToDocument=function(f){return Math.max(0,Math.min(f,this.doc.getLength()-1))},b.prototype.$clipColumnToRow=function(f,p){return p<0?0:Math.min(this.doc.getLine(f).length,p)},b.prototype.$clipPositionToDocument=function(f,p){if(p=Math.max(0,p),f<0)f=0,p=0;else {var c=this.doc.getLength();f>=c?(f=c-1,p=this.doc.getLine(c-1).length):p=Math.min(this.doc.getLine(f).length,p);}return {row:f,column:p}},b.prototype.$clipRangeToDocument=function(f){f.start.row<0?(f.start.row=0,f.start.column=0):f.start.column=this.$clipColumnToRow(f.start.row,f.start.column);var p=this.doc.getLength()-1;return f.end.row>p?(f.end.row=p,f.end.column=this.doc.getLine(p).length):f.end.column=this.$clipColumnToRow(f.end.row,f.end.column),f},b.prototype.setUseWrapMode=function(f){if(f!=this.$useWrapMode){if(this.$useWrapMode=f,this.$modified=!0,this.$resetRowCache(0),f){var p=this.getLength();this.$wrapData=Array(p),this.$updateWrapData(0,p-1);}this._signal("changeWrapMode");}},b.prototype.getUseWrapMode=function(){return this.$useWrapMode},b.prototype.setWrapLimitRange=function(f,p){(this.$wrapLimitRange.min!==f||this.$wrapLimitRange.max!==p)&&(this.$wrapLimitRange={min:f,max:p},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"));},b.prototype.adjustWrapLimit=function(f,p){var c=this.$wrapLimitRange;c.max<0&&(c={min:p,max:p});var g=this.$constrainWrapLimit(f,c.min,c.max);return g!=this.$wrapLimit&&g>1?(this.$wrapLimit=g,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},b.prototype.$constrainWrapLimit=function(f,p,c){return p&&(f=Math.max(p,f)),c&&(f=Math.min(c,f)),f},b.prototype.getWrapLimit=function(){return this.$wrapLimit},b.prototype.setWrapLimit=function(f){this.setWrapLimitRange(f,f);},b.prototype.getWrapLimitRange=function(){return {min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},b.prototype.$updateInternalDataOnChange=function(f){var p=this.$useWrapMode,c=f.action,g=f.start,A=f.end,k=g.row,R=A.row,_=R-k,D=null;if(this.$updating=!0,_!=0)if(c==="remove"){this[p?"$wrapData":"$rowLengthCache"].splice(k,_);var I=this.$foldData;D=this.getFoldsInRange(f),this.removeFolds(D);var F=this.getFoldLine(A.row),N=0;if(F){F.addRemoveChars(A.row,A.column,g.column-A.column),F.shiftRow(-_);var O=this.getFoldLine(k);O&&O!==F&&(O.merge(F),F=O),N=I.indexOf(F)+1;}for(N;N<I.length;N++){var F=I[N];F.start.row>=A.row&&F.shiftRow(-_);}R=k;}else {var W=Array(_);W.unshift(k,0);var B=p?this.$wrapData:this.$rowLengthCache;B.splice.apply(B,W);var I=this.$foldData,F=this.getFoldLine(k),N=0;if(F){var z=F.range.compareInside(g.row,g.column);z==0?(F=F.split(g.row,g.column),F&&(F.shiftRow(_),F.addRemoveChars(R,0,A.column-g.column))):z==-1&&(F.addRemoveChars(k,0,A.column-g.column),F.shiftRow(_)),N=I.indexOf(F)+1;}for(N;N<I.length;N++){var F=I[N];F.start.row>=k&&F.shiftRow(_);}}else {_=Math.abs(f.start.column-f.end.column),c==="remove"&&(D=this.getFoldsInRange(f),this.removeFolds(D),_=-_);var F=this.getFoldLine(k);F&&F.addRemoveChars(k,g.column,_);}return p&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,p?this.$updateWrapData(k,R):this.$updateRowLengthCache(k,R),D},b.prototype.$updateRowLengthCache=function(f,p){this.$rowLengthCache[f]=null,this.$rowLengthCache[p]=null;},b.prototype.$updateWrapData=function(f,p){var c=this.doc.getAllLines(),g=this.getTabSize(),A=this.$wrapData,k=this.$wrapLimit,R,_,D=f;for(p=Math.min(p,c.length-1);D<=p;)_=this.getFoldLine(D,_),_?(R=[],_.walk(function(I,F,N,O){var W;if(I!=null){W=this.$getDisplayTokens(I,R.length),W[0]=m;for(var B=1;B<W.length;B++)W[B]=$;}else W=this.$getDisplayTokens(c[F].substring(O,N),R.length);R=R.concat(W);}.bind(this),_.end.row,c[_.end.row].length+1),A[_.start.row]=this.$computeWrapSplits(R,k,g),D=_.end.row+1):(R=this.$getDisplayTokens(c[D]),A[D]=this.$computeWrapSplits(R,k,g),D++);},b.prototype.$computeWrapSplits=function(f,p,c){if(f.length==0)return [];var g=[],A=f.length,k=0,R=0,_=this.$wrapAsCode,D=this.$indentedSoftWrap,I=p<=Math.max(2*c,8)||D===!1?0:Math.floor(p/2);function F(){var z=0;if(I===0)return z;if(D)for(var j=0;j<f.length;j++){var U=f[j];if(U==h)z+=1;else if(U==w)z+=c;else {if(U==C)continue;break}}return _&&D!==!1&&(z+=c),Math.min(z,I)}function N(z){for(var j=z-k,U=k;U<z;U++){var V=f[U];(V===12||V===2)&&(j-=1);}g.length||(O=F(),g.indent=O),R+=j,g.push(R),k=z;}for(var O=0;A-k>p-O;){var W=k+p-O;if(f[W-1]>=h&&f[W]>=h){N(W);continue}if(f[W]==m||f[W]==$){for(W;W!=k-1&&f[W]!=m;W--);if(W>k){N(W);continue}for(W=k+p,W;W<f.length&&f[W]==$;W++);if(W==f.length)break;N(W);continue}for(var B=Math.max(W-(p-(p>>2)),k-1);W>B&&f[W]<m;)W--;if(_){for(;W>B&&f[W]<m;)W--;for(;W>B&&f[W]==d;)W--;}else for(;W>B&&f[W]<h;)W--;if(W>B){N(++W);continue}W=k+p,f[W]==S&&W--,N(W-O);}return g},b.prototype.$getDisplayTokens=function(f,p){var c=[],g;p=p||0;for(var A=0;A<f.length;A++){var k=f.charCodeAt(A);if(k==9){g=this.getScreenTabSize(c.length+p),c.push(w);for(var R=1;R<g;R++)c.push(C);}else k==32?c.push(h):k>39&&k<48||k>57&&k<64?c.push(d):k>=4352&&v(k)?c.push(y,S):c.push(y);}return c},b.prototype.$getStringScreenWidth=function(f,p,c){if(p==0)return [0,0];p==null&&(p=1/0),c=c||0;var g,A;for(A=0;A<f.length&&(g=f.charCodeAt(A),g==9?c+=this.getScreenTabSize(c):g>=4352&&v(g)?c+=2:c+=1,!(c>p));A++);return [c,A]},b.prototype.getRowLength=function(f){var p=1;return this.lineWidgets&&(p+=this.lineWidgets[f]&&this.lineWidgets[f].rowCount||0),!this.$useWrapMode||!this.$wrapData[f]?p:this.$wrapData[f].length+p},b.prototype.getRowLineCount=function(f){return !this.$useWrapMode||!this.$wrapData[f]?1:this.$wrapData[f].length+1},b.prototype.getRowWrapIndent=function(f){if(this.$useWrapMode){var p=this.screenToDocumentPosition(f,Number.MAX_VALUE),c=this.$wrapData[p.row];return c.length&&c[0]<p.column?c.indent:0}else return 0},b.prototype.getScreenLastRowColumn=function(f){var p=this.screenToDocumentPosition(f,Number.MAX_VALUE);return this.documentToScreenColumn(p.row,p.column)},b.prototype.getDocumentLastRowColumn=function(f,p){var c=this.documentToScreenRow(f,p);return this.getScreenLastRowColumn(c)},b.prototype.getDocumentLastRowColumnPosition=function(f,p){var c=this.documentToScreenRow(f,p);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},b.prototype.getRowSplitData=function(f){if(this.$useWrapMode)return this.$wrapData[f]},b.prototype.getScreenTabSize=function(f){return this.$tabSize-(f%this.$tabSize|0)},b.prototype.screenToDocumentRow=function(f,p){return this.screenToDocumentPosition(f,p).row},b.prototype.screenToDocumentColumn=function(f,p){return this.screenToDocumentPosition(f,p).column},b.prototype.screenToDocumentPosition=function(f,p,c){if(f<0)return {row:0,column:0};var g,A=0,k=0,R,_=0,D=0,I=this.$screenRowCache,F=this.$getRowCacheIndex(I,f),N=I.length;if(N&&F>=0)var _=I[F],A=this.$docRowCache[F],O=f>I[N-1];else var O=!N;for(var W=this.getLength()-1,B=this.getNextFoldLine(A),z=B?B.start.row:1/0;_<=f&&(D=this.getRowLength(A),!(_+D>f||A>=W));)_+=D,A++,A>z&&(A=B.end.row+1,B=this.getNextFoldLine(A,B),z=B?B.start.row:1/0),O&&(this.$docRowCache.push(A),this.$screenRowCache.push(_));if(B&&B.start.row<=A)g=this.getFoldDisplayLine(B),A=B.start.row;else {if(_+D<=f||A>W)return {row:W,column:this.getLine(W).length};g=this.getLine(A),B=null;}var j=0,U=Math.floor(f-_);if(this.$useWrapMode){var V=this.$wrapData[A];V&&(R=V[U],U>0&&V.length&&(j=V.indent,k=V[U-1]||V[V.length-1],g=g.substring(k)));}return c!==void 0&&this.$bidiHandler.isBidiRow(_+U,A,U)&&(p=this.$bidiHandler.offsetToCol(c)),k+=this.$getStringScreenWidth(g,p-j)[1],this.$useWrapMode&&k>=R&&(k=R-1),B?B.idxToPosition(k):{row:A,column:k}},b.prototype.documentToScreenPosition=function(f,p){if(typeof p>"u")var c=this.$clipPositionToDocument(f.row,f.column);else c=this.$clipPositionToDocument(f,p);f=c.row,p=c.column;var g=0,A=null,k=null;k=this.getFoldAt(f,p,1),k&&(f=k.start.row,p=k.start.column);var R,_=0,D=this.$docRowCache,I=this.$getRowCacheIndex(D,f),F=D.length;if(F&&I>=0)var _=D[I],g=this.$screenRowCache[I],N=f>D[F-1];else var N=!F;for(var O=this.getNextFoldLine(_),W=O?O.start.row:1/0;_<f;){if(_>=W){if(R=O.end.row+1,R>f)break;O=this.getNextFoldLine(R,O),W=O?O.start.row:1/0;}else R=_+1;g+=this.getRowLength(_),_=R,N&&(this.$docRowCache.push(_),this.$screenRowCache.push(g));}var B="";O&&_>=W?(B=this.getFoldDisplayLine(O,f,p),A=O.start.row):(B=this.getLine(f).substring(0,p),A=f);var z=0;if(this.$useWrapMode){var j=this.$wrapData[A];if(j){for(var U=0;B.length>=j[U];)g++,U++;B=B.substring(j[U-1]||0,B.length),z=U>0?j.indent:0;}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(g+=this.lineWidgets[_].rowsAbove),{row:g,column:z+this.$getStringScreenWidth(B)[0]}},b.prototype.documentToScreenColumn=function(f,p){return this.documentToScreenPosition(f,p).column},b.prototype.documentToScreenRow=function(f,p){return this.documentToScreenPosition(f,p).row},b.prototype.getScreenLength=function(){var f=0,p=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,k=0,g=0,p=this.$foldData[g++],R=p?p.start.row:1/0;k<A;){var _=this.$wrapData[k];f+=_?_.length+1:1,k++,k>R&&(k=p.end.row+1,p=this.$foldData[g++],R=p?p.start.row:1/0);}else {f=this.getLength();for(var c=this.$foldData,g=0;g<c.length;g++)p=c[g],f-=p.end.row-p.start.row;}return this.lineWidgets&&(f+=this.$getWidgetScreenLength()),f},b.prototype.$setFontMetrics=function(f){this.$enableVarChar&&(this.$getStringScreenWidth=function(p,c,g){if(c===0)return [0,0];c||(c=1/0),g=g||0;var A,k;for(k=0;k<p.length&&(A=p.charAt(k),A===" "?g+=this.getScreenTabSize(g):g+=f.getCharacterWidth(A),!(g>c));k++);return [g,k]});},b.prototype.getPrecedingCharacter=function(){var f=this.selection.getCursor();if(f.column===0)return f.row===0?"":this.doc.getNewLineCharacter();var p=this.getLine(f.row);return p[f.column-1]},b.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach();},b}();u.$uid=0,u.prototype.$modes=s.$modes,u.prototype.getValue=u.prototype.toString,u.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},u.prototype.$overwrite=!1,u.prototype.$mode=null,u.prototype.$modeId=null,u.prototype.$scrollTop=0,u.prototype.$scrollLeft=0,u.prototype.$wrapLimit=80,u.prototype.$useWrapMode=!1,u.prototype.$wrapLimitRange={min:null,max:null},u.prototype.lineWidgets=null,u.prototype.isFullWidth=v,E.implement(u.prototype,l);var y=1,S=2,m=3,$=4,d=9,h=10,w=11,C=12;function v(b){return b<4352?!1:b>=4352&&b<=4447||b>=4515&&b<=4519||b>=4602&&b<=4607||b>=9001&&b<=9002||b>=11904&&b<=11929||b>=11931&&b<=12019||b>=12032&&b<=12245||b>=12272&&b<=12283||b>=12288&&b<=12350||b>=12353&&b<=12438||b>=12441&&b<=12543||b>=12549&&b<=12589||b>=12593&&b<=12686||b>=12688&&b<=12730||b>=12736&&b<=12771||b>=12784&&b<=12830||b>=12832&&b<=12871||b>=12880&&b<=13054||b>=13056&&b<=19903||b>=19968&&b<=42124||b>=42128&&b<=42182||b>=43360&&b<=43388||b>=44032&&b<=55203||b>=55216&&b<=55238||b>=55243&&b<=55291||b>=63744&&b<=64255||b>=65040&&b<=65049||b>=65072&&b<=65106||b>=65108&&b<=65126||b>=65128&&b<=65131||b>=65281&&b<=65376||b>=65504&&b<=65510}L("./edit_session/folding").Folding.call(u.prototype),L("./edit_session/bracket_match").BracketMatch.call(u.prototype),s.defineOptions(u.prototype,"session",{wrap:{set:function(b){if(!b||b=="off"?b=!1:b=="free"?b=!0:b=="printMargin"?b=-1:typeof b=="string"&&(b=parseInt(b,10)||!1),this.$wrap!=b)if(this.$wrap=b,!b)this.setUseWrapMode(!1);else {var f=typeof b=="number"?b:null;this.setWrapLimitRange(f,f),this.setUseWrapMode(!0);}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(b){b=b=="auto"?this.$mode.type!="text":b!="text",b!=this.$wrapAsCode&&(this.$wrapAsCode=b,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)));},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0));},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint");},initialValue:1},useWorker:{set:function(b){this.$useWorker=b,this.$stopWorker(),b&&this.$startWorker();},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(b){b=parseInt(b),b>0&&this.$tabSize!==b&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=b,this._signal("changeTabSize"));},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(b){this.setFoldStyle(b);},handlesSet:!0},overwrite:{set:function(b){this._signal("changeOverwrite");},initialValue:!1},newLineMode:{set:function(b){this.doc.setNewLineMode(b);},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(b){this.setMode(b);},get:function(){return this.$modeId},handlesSet:!0}}),T.EditSession=u;});ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(L,T,H){var E=L("./lib/lang"),x=L("./lib/oop"),M=L("./range").Range,s=function(){function r(){this.$options={};}return r.prototype.set=function(t){return x.mixin(this.$options,t),this},r.prototype.getOptions=function(){return E.copyObject(this.$options)},r.prototype.setOptions=function(t){this.$options=t;},r.prototype.find=function(t){var i=this.$options,n=this.$matchIterator(t,i);if(!n)return !1;var e=null;return n.forEach(function(o,a,u,y){return e=new M(o,a,u,y),a==y&&i.start&&i.start.start&&i.skipCurrent!=!1&&e.isEqual(i.start)?(e=null,!1):!0}),e},r.prototype.findAll=function(t){var i=this.$options;if(!i.needle)return [];this.$assembleRegExp(i);var n=i.range,e=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),o=[],a=i.re;if(i.$isMultiLine){var u=a.length,y=e.length-u,S;e:for(var m=a.offset||0;m<=y;m++){for(var $=0;$<u;$++)if(e[m+$].search(a[$])==-1)continue e;var d=e[m],h=e[m+u-1],w=d.length-d.match(a[0])[0].length,C=h.match(a[u-1])[0].length;S&&S.end.row===m&&S.end.column>w||(o.push(S=new M(m,w,m+u-1,C)),u>2&&(m=m+u-2));}}else for(var v=0;v<e.length;v++)for(var b=E.getMatchOffsets(e[v],a),$=0;$<b.length;$++){var f=b[$];o.push(new M(v,f.offset,v,f.offset+f.length));}if(n){for(var p=n.start.column,c=n.end.column,v=0,$=o.length-1;v<$&&o[v].start.column<p&&o[v].start.row==0;)v++;for(var g=n.end.row-n.start.row;v<$&&o[$].end.column>c&&o[$].end.row==g;)$--;for(o=o.slice(v,$+1),v=0,$=o.length;v<$;v++)o[v].start.row+=n.start.row,o[v].end.row+=n.start.row;}return o},r.prototype.replace=function(t,i){var n=this.$options,e=this.$assembleRegExp(n);if(n.$isMultiLine)return i;if(e){var o=e.exec(t);if(!o||o[0].length!=t.length)return null;if(n.regExp||(i=i.replace(/\$/g,"$$$$")),i=t.replace(e,i),n.preserveCase){i=i.split("");for(var a=Math.min(t.length,t.length);a--;){var u=t[a];u&&u.toLowerCase()!=u?i[a]=i[a].toUpperCase():i[a]=i[a].toLowerCase();}i=i.join("");}return i}},r.prototype.$assembleRegExp=function(t,i){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=E.escapeRegExp(n));var e=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,e+="u";}catch{t.$supportsUnicodeFlag=!1;}if(t.wholeWord&&(n=l(n,t)),t.$isMultiLine=!i&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,e);try{var o=new RegExp(n,e);}catch{o=!1;}return t.re=o},r.prototype.$assembleMultilineRegExp=function(t,i){for(var n=t.replace(/\r\n|\r|\n/g,`$
219
+ ^`).split(`
220
+ `),e=[],o=0;o<n.length;o++)try{e.push(new RegExp(n[o],i));}catch{return !1}return e},r.prototype.$matchIterator=function(t,i){var n=this.$assembleRegExp(i);if(!n)return !1;var e=i.backwards==!0,o=i.skipCurrent!=!1,a=n.unicode,u=i.range,y=i.start;y||(y=u?u[e?"end":"start"]:t.selection.getRange()),y.start&&(y=y[o!=e?"end":"start"]);var S=u?u.start.row:0,m=u?u.end.row:t.getLength()-1;if(e)var $=function(w){var C=y.row;if(!h(C,y.column,w)){for(C--;C>=S;C--)if(h(C,Number.MAX_VALUE,w))return;if(i.wrap!=!1){for(C=m,S=y.row;C>=S;C--)if(h(C,Number.MAX_VALUE,w))return}}};else var $=function(C){var v=y.row;if(!h(v,y.column,C)){for(v=v+1;v<=m;v++)if(h(v,0,C))return;if(i.wrap!=!1){for(v=S,m=y.row;v<=m;v++)if(h(v,0,C))return}}};if(i.$isMultiLine)var d=n.length,h=function(w,C,v){var b=e?w-d+1:w;if(!(b<0||b+d>t.getLength())){var f=t.getLine(b),p=f.search(n[0]);if(!(!e&&p<C||p===-1)){for(var c=1;c<d;c++)if(f=t.getLine(b+c),f.search(n[c])==-1)return;var g=f.match(n[d-1])[0].length;if(!(e&&g>C)&&v(b,p,b+d-1,g))return !0}}};else if(e)var h=function(C,v,b){var f=t.getLine(C),p=[],c,g=0;for(n.lastIndex=0;c=n.exec(f);){var A=c[0].length;if(g=c.index,!A){if(g>=f.length)break;n.lastIndex=g+=E.skipEmptyMatch(f,g,a);}if(c.index+A>v)break;p.push(c.index,A);}for(var k=p.length-1;k>=0;k-=2){var R=p[k-1],A=p[k];if(b(C,R,C,R+A))return !0}};else var h=function(C,v,b){var f=t.getLine(C),p,c;for(n.lastIndex=v;c=n.exec(f);){var g=c[0].length;if(p=c.index,b(C,p,C,p+g))return !0;if(!g&&(n.lastIndex=p+=E.skipEmptyMatch(f,p,a),p>=f.length))return !1}};return {forEach:$}},r}();function l(r,t){var i=E.supportsLookbehind();function n(u,y){y===void 0&&(y=!0);var S=i&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(u)||t.regExp?i&&t.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(r),o=e[0],a=e[e.length-1];return n(o)+r+n(a,!1)}T.Search=s;});ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,T,H){var E=this&&this.__extends||function(){var i=function(n,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a;}||function(o,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u]);},i(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(n,e);function o(){this.constructor=n;}n.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o);}}(),x=L("../lib/keys"),M=L("../lib/useragent"),s=x.KEY_MODS,l=function(){function i(n,e){this.$init(n,e,!1);}return i.prototype.$init=function(n,e,o){this.platform=e||(M.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(n),this.$singleCommand=o;},i.prototype.addCommand=function(n){this.commands[n.name]&&this.removeCommand(n),this.commands[n.name]=n,n.bindKey&&this._buildKeyHash(n);},i.prototype.removeCommand=function(n,e){var o=n&&(typeof n=="string"?n:n.name);n=this.commands[o],e||delete this.commands[o];var a=this.commandKeyBinding;for(var u in a){var y=a[u];if(y==n)delete a[u];else if(Array.isArray(y)){var S=y.indexOf(n);S!=-1&&(y.splice(S,1),y.length==1&&(a[u]=y[0]));}}},i.prototype.bindKey=function(n,e,o){if(typeof n=="object"&&n&&(o==null&&(o=n.position),n=n[this.platform]),!!n){if(typeof e=="function")return this.addCommand({exec:e,bindKey:n,name:e.name||n});n.split("|").forEach(function(a){var u="";if(a.indexOf(" ")!=-1){var y=a.split(/\s+/);a=y.pop(),y.forEach(function($){var d=this.parseKeys($),h=s[d.hashId]+d.key;u+=(u?" ":"")+h,this._addCommandToBinding(u,"chainKeys");},this),u+=" ";}var S=this.parseKeys(a),m=s[S.hashId]+S.key;this._addCommandToBinding(u+m,e,o);},this);}},i.prototype._addCommandToBinding=function(n,e,o){var a=this.commandKeyBinding,u;if(!e)delete a[n];else if(!a[n]||this.$singleCommand)a[n]=e;else {Array.isArray(a[n])?(u=a[n].indexOf(e))!=-1&&a[n].splice(u,1):a[n]=[a[n]],typeof o!="number"&&(o=r(e));var y=a[n];for(u=0;u<y.length;u++){var S=y[u],m=r(S);if(m>o)break}y.splice(u,0,e);}},i.prototype.addCommands=function(n){n&&Object.keys(n).forEach(function(e){var o=n[e];if(o){if(typeof o=="string")return this.bindKey(o,e);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=e),this.addCommand(o));}},this);},i.prototype.removeCommands=function(n){Object.keys(n).forEach(function(e){this.removeCommand(n[e]);},this);},i.prototype.bindKeys=function(n){Object.keys(n).forEach(function(e){this.bindKey(e,n[e]);},this);},i.prototype._buildKeyHash=function(n){this.bindKey(n.bindKey,n);},i.prototype.parseKeys=function(n){var e=n.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),o=e.pop(),a=x[o];if(x.FUNCTION_KEYS[a])o=x.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return {key:o.toUpperCase(),hashId:-1}}else return {key:o,hashId:-1};for(var u=0,y=e.length;y--;){var S=x.KEY_MODS[e[y]];if(S==null)return typeof console<"u"&&console.error("invalid modifier "+e[y]+" in "+n),!1;u|=S;}return {key:o,hashId:u}},i.prototype.findKeyCommand=function(n,e){var o=s[n]+e;return this.commandKeyBinding[o]},i.prototype.handleKeyboard=function(n,e,o,a){if(!(a<0)){var u=s[e]+o,y=this.commandKeyBinding[u];return n.$keyChain&&(n.$keyChain+=" "+u,y=this.commandKeyBinding[n.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(n.$keyChain=n.$keyChain||u,{command:"null"}):(n.$keyChain&&((!e||e==4)&&o.length==1?n.$keyChain=n.$keyChain.slice(0,-u.length-1):(e==-1||a>0)&&(n.$keyChain="")),{command:y})}},i.prototype.getStatusText=function(n,e){return e.$keyChain||""},i}();function r(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var t=function(i){E(n,i);function n(e,o){var a=i.call(this,e,o)||this;return a.$singleCommand=!0,a}return n}(l);t.call=function(i,n,e){l.prototype.$init.call(i,n,e,!0);},l.call=function(i,n,e){l.prototype.$init.call(i,n,e,!1);},T.HashHandler=t,T.MultiHashHandler=l;});ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(L,T,H){var E=this&&this.__extends||function(){var r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e;}||function(n,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);},r(t,i)};return function(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(t,i);function n(){this.constructor=t;}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n);}}(),x=L("../lib/oop"),M=L("../keyboard/hash_handler").MultiHashHandler,s=L("../lib/event_emitter").EventEmitter,l=function(r){E(t,r);function t(i,n){var e=r.call(this,n,i)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),e}return t.prototype.exec=function(i,n,e){if(Array.isArray(i)){for(var o=i.length;o--;)if(this.exec(i[o],n,e))return !0;return !1}if(typeof i=="string"&&(i=this.commands[i]),!this.canExecute(i,n))return !1;var a={editor:n,command:i,args:e};return a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1},t.prototype.canExecute=function(i,n){return typeof i=="string"&&(i=this.commands[i]),!(!i||n&&n.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(n))},t.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(n){this.macro.push([n.command,n.args]);}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(i){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(n){typeof n=="string"?this.exec(n,i):this.exec(n[0],i,n[1]);},this);}finally{this.$inReplay=!1;}}},t.prototype.trimMacro=function(i){return i.map(function(n){return typeof n[0]!="string"&&(n[0]=n[0].name),n[1]||(n=n[0]),n})},t}(M);x.implement(l.prototype,s),T.CommandManager=l;});ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(L,T,H){var E=L("../lib/lang"),x=L("../config"),M=L("../range").Range;function s(r,t){return {win:r,mac:t}}T.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(r){x.loadModule("ace/ext/settings_menu",function(t){t.init(r),r.showSettingsMenu();});},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(r){x.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(r,1);});},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(r){x.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(r,-1);});},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(r){r.selectAll();},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(r){r.centerSelection();},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(r,t){typeof t=="number"&&!isNaN(t)&&r.gotoLine(t),r.prompt({$type:"gotoLine"});},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(r){r.session.toggleFoldWidget();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0);},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll();},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments();},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges());},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold();},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(r){r.findNext();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious();},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext();},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious();},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(r){x.loadModule("ace/ext/searchbox",function(t){t.Search(r);});},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite();},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(r,t){r.navigateUp(t.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd();},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(r,t){r.navigateDown(t.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(r,t){r.navigateLeft(t.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(r,t){r.navigateRight(t.times);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown();},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(r){r.scrollPageDown();},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown();},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp();},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(r){r.scrollPageUp();},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp();},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight);},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight);},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r);},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r);},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching();},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0);},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0);},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var t=r.$copyWithEmptySelection&&r.selection.isEmpty(),i=t?r.selection.getLineRange():r.selection.getRange();r._emit("cut",i),i.isEmpty()||r.session.remove(i),r.clearSelection();},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,t){r.$handlePaste(t);},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(r){r.removeLines();},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection();},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines();},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1);},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1);},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(r){x.loadModule("ace/ext/searchbox",function(t){t.Search(r,!0);});}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(r){r.undo();}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo();}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp();},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp();},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown();},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown();},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right");},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left");},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return !1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(r){var t=r.selection.getRange();t.start.column=0,r.session.remove(t);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(r){var t=r.selection.getRange();t.end.column=Number.MAX_VALUE,r.session.remove(t);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(r){r.indent();},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent();},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,t){r.insert(t);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,t){r.insert(E.stringRepeat(t.text||"",t.times||1));},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(r){r.splitLine();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters();},multiSelectAction:function(r){r.transposeSelections(1);},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(r){r.autoIndent();},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var t=r.selection.getRange();t.start.column=t.end.column=0,t.end.row++,r.selection.setRange(t,!1);},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(r){r.openLink();}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(r){for(var t=r.selection.isBackwards(),i=t?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),n=t?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(i.row).length,o=r.session.doc.getTextRange(r.selection.getRange()),a=o.replace(/\n\s*/," ").length,u=r.session.doc.getLine(i.row),y=i.row+1;y<=n.row+1;y++){var S=E.stringTrimLeft(E.stringTrimRight(r.session.doc.getLine(y)));S.length!==0&&(S=" "+S),u+=S;}n.row+1<r.session.doc.getLength()-1&&(u+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new M(i.row,0,n.row+2,0),u),a>0?(r.selection.moveCursorTo(i.row,i.column),r.selection.selectTo(i.row,i.column+a)):(e=r.session.doc.getLine(i.row).length>e?e+1:e,r.selection.moveCursorTo(i.row,e));},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(r){var t=r.session.doc.getLength()-1,i=r.session.doc.getLine(t).length,n=r.selection.rangeList.ranges,e=[];n.length<1&&(n=[r.selection.getRange()]);for(var o=0;o<n.length;o++)o==n.length-1&&(n[o].end.row===t&&n[o].end.column===i||e.push(new M(n[o].end.row,n[o].end.column,t,i))),o===0?n[o].start.row===0&&n[o].start.column===0||e.push(new M(0,0,n[o].start.row,n[o].start.column)):e.push(new M(n[o-1].end.row,n[o-1].end.column,n[o].start.row,n[o].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var o=0;o<e.length;o++)r.selection.addRange(e[o],!1);},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
221
+ `);},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var t=r.getCursorPosition();r.selection.moveTo(t.row-1,Number.MAX_VALUE),r.insert(`
222
+ `),t.row===0&&r.navigateUp();},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"});},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(r){r.prompt({$type:"commands"});},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(r){r.prompt({$type:"modes"});},readOnly:!0}];for(var l=1;l<9;l++)T.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(r){r.session.foldToLevel(this.level);},scrollIntoView:"center",readOnly:!0});});ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(L,T,H){var E=L("./lib/dom"),x=function(){function M(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor);}return M.prototype.getRowLength=function(s){var l;return this.lineWidgets?l=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:l=0,!this.$useWrapMode||!this.$wrapData[s]?1+l:this.$wrapData[s].length+1+l},M.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(s+=l.rowCount);}),s},M.prototype.$onChangeEditor=function(s){this.attach(s.editor);},M.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)));},M.prototype.detach=function(s){var l=this.editor;if(l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el));});}},M.prototype.updateOnFold=function(s,l){var r=l.lineWidgets;if(!(!r||!s.action)){for(var t=s.data,i=t.start.row,n=t.end.row,e=s.action=="add",o=i+1;o<n;o++)r[o]&&(r[o].hidden=e);r[n]&&(e?r[i]?r[n].hidden=e:r[i]=r[n]:(r[i]==r[n]&&(r[i]=void 0),r[n].hidden=e));}},M.prototype.updateOnChange=function(s){var l=this.session.lineWidgets;if(l){var r=s.start.row,t=s.end.row-r;if(t!==0)if(s.action=="remove"){var i=l.splice(r+1,t);!l[r]&&i[i.length-1]&&(l[r]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e);},this),this.$updateRows();}else {var n=new Array(t);l[r]&&l[r].column!=null&&s.start.column>l[r].column&&r++,n.unshift(r,0),l.splice.apply(l,n),this.$updateRows();}}},M.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var l=!0;s.forEach(function(r,t){if(r)for(l=!1,r.row=t;r.$oldWidget;)r.$oldWidget.row=t,r=r.$oldWidget;}),l&&(this.session.lineWidgets=null);}},M.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[s.row];return l&&(s.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},M.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var l=this.editor.renderer;s.html&&!s.el&&(s.el=E.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=E.createElement("div"),s.el.textContent=s.text),s.el&&(E.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&E.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",l.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/l.layerConfig.lineHeight);var r=this.session.getFoldAt(s.row,0);if(s.$fold=r,r){var t=this.session.lineWidgets;s.row==r.end.row&&!t[r.start.row]?t[r.start.row]=s:s.hidden=!0;}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(s),s},M.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy();}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[s.row];if(l==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;l;){if(l.$oldWidget==s){l.$oldWidget=s.$oldWidget;break}l=l.$oldWidget;}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows();},M.prototype.getWidgetsAtRow=function(s){for(var l=this.session.lineWidgets,r=l&&l[s],t=[];r;)t.push(r),r=r.$oldWidget;return t},M.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull();},M.prototype.measureWidgets=function(s,l){var r=this.session._changedWidgets,t=l.layerConfig;if(!(!r||!r.length)){for(var i=1/0,n=0;n<r.length;n++){var e=r[n];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,l.container.appendChild(e.el);}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/t.characterWidth));var o=e.h/t.lineHeight;e.coverLine&&(o-=this.session.getRowLineCount(e.row),o<0&&(o=0)),e.rowCount!=o&&(e.rowCount=o,e.row<i&&(i=e.row));}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[];}},M.prototype.renderWidgets=function(s,l){var r=l.layerConfig,t=this.session.lineWidgets;if(t){for(var i=Math.min(this.firstRow,r.firstRow),n=Math.max(this.lastRow,r.lastRow,t.length);i>0&&!t[i];)i--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var e=i;e<=n;e++){var o=t[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,l.container.appendChild(o.el));var a=l.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(a+=r.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=a-r.offset+"px";var u=o.coverGutter?0:l.gutterWidth;o.fixedWidth||(u-=l.scrollLeft),o.el.style.left=u+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=r.width+2*r.padding+"px"),o.fixedWidth?o.el.style.right=l.scrollBar.getWidth()+"px":o.el.style.right="";}}}},M}();T.LineWidgets=x;});ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(L,T,H){var E=L("../lib/keys"),x=L("../mouse/default_gutter_handler").GutterTooltip,M=function(){function l(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new x(this.editor);}return l.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this));},l.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this));},l.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===E.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=E.enter)return;r.preventDefault();var t=this.editor.getCursorPosition().row;this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),setTimeout(function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldWidget(i),e=this.$findNearestAnnotation(i);if(!(n===null&&e===null)){if(n===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(n!==null&&e===null){this.activeRowIndex=n,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-i)<Math.abs(n-i)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else {this.activeRowIndex=n,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout(function(){this.editor._signal("gutterkeydown",new s(r,this));}.bind(this),10);},l.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===E.tab){r.preventDefault();return}if(r.keyCode===E.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===E.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===E.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===E.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===E.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===E.enter||r.keyCode===E.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var t=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex));}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2],n=i.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=n.right+"px",e.top=n.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},l.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip();},l.prototype.$isFoldWidgetVisible=function(r){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getFoldWidget(r).style.display!=="none";return t&&i},l.prototype.$isAnnotationVisible=function(r){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getAnnotation(r).style.display!=="none";return t&&i},l.prototype.$getFoldWidget=function(r){var t=this.lines.get(r),i=t.element;return i.childNodes[1]},l.prototype.$getAnnotation=function(r){var t=this.lines.get(r),i=t.element;return i.childNodes[2]},l.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var t=0;r-t>0||r+t<this.lines.getLength()-1;){if(t++,r-t>=0&&this.$isFoldWidgetVisible(r-t))return r-t;if(r+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+t))return r+t}return null},l.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var t=0;r-t>0||r+t<this.lines.getLength()-1;){if(t++,r-t>=0&&this.$isAnnotationVisible(r-t))return r-t;if(r+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+t))return r+t}return null},l.prototype.$focusFoldWidget=function(r){if(r!=null){var t=this.$getFoldWidget(r);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus();}},l.prototype.$focusAnnotation=function(r){if(r!=null){var t=this.$getAnnotation(r);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus();}},l.prototype.$blurFoldWidget=function(r){var t=this.$getFoldWidget(r);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur();},l.prototype.$blurAnnotation=function(r){var t=this.$getAnnotation(r);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur();},l.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},l.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},l.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},l.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(t==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldWidget(this.activeRowIndex);if(i==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusFoldWidget(this.activeRowIndex);break}},l.prototype.$rowIndexToRow=function(r){var t=this.lines.get(r);return t?t.row:null},l.prototype.$rowToRowIndex=function(r){for(var t=0;t<this.lines.getLength();t++){var i=this.lines.get(t);if(i.row==r)return t}return null},l}();T.GutterKeyboardHandler=M;var s=function(){function l(r,t){this.gutterKeyboardHandler=t,this.domEvent=r;}return l.prototype.getKey=function(){return E.keyCodeToString(this.domEvent.keyCode)},l.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},l.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},l.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},l}();T.GutterKeyboardEvent=s;});ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(L,T,H){var E=this&&this.__values||function(p){var c=typeof Symbol=="function"&&Symbol.iterator,g=c&&p[c],A=0;if(g)return g.call(p);if(p&&typeof p.length=="number")return {next:function(){return p&&A>=p.length&&(p=void 0),{value:p&&p[A++],done:!p}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},x=L("./lib/oop"),M=L("./lib/dom"),s=L("./lib/lang"),l=L("./lib/useragent"),r=L("./keyboard/textinput").TextInput,t=L("./mouse/mouse_handler").MouseHandler,i=L("./mouse/fold_handler").FoldHandler,n=L("./keyboard/keybinding").KeyBinding,e=L("./edit_session").EditSession,o=L("./search").Search,a=L("./range").Range,u=L("./lib/event_emitter").EventEmitter,y=L("./commands/command_manager").CommandManager,S=L("./commands/default_commands").commands,m=L("./config"),$=L("./token_iterator").TokenIterator,d=L("./line_widgets").LineWidgets,h=L("./keyboard/gutter_handler").GutterKeyboardHandler,w=L("./config").nls,C=L("./clipboard"),v=L("./lib/keys"),b=function(){function p(c,g,A){this.session,this.$toDestroy=[];var k=c.getContainerElement();this.container=k,this.renderer=c,this.id="editor"+ ++p.$uid,this.commands=new y(l.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new r(c.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new t(this),new i(this)),this.keyBinding=new n(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart();}.bind(this)),this.on("change",function(R,_){_._$emitInputEvent.schedule(31);}),this.setSession(g||A&&A.session||new e("")),m.resetOptions(this),A&&this.setOptions(A),m._signal("editor",this);}return p.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0;}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0;}.bind(this),!0);},p.prototype.startOperation=function(c){if(this.curOp){if(!c||this.curOp.command)return;this.prevOp=this.curOp;}c||(this.previousCommand=null,c={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:c.command||{},args:c.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON();},p.prototype.endOperation=function(c){if(this.curOp&&this.session){if(c&&c.returnValue===!1||!this.session)return this.curOp=null;if(c==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var g=this.curOp.command,A=g&&g.scrollIntoView;if(A){switch(A){case"center-animate":A="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var k=this.selection.getRange(),R=this.renderer.layerConfig;(k.start.row>=R.lastRow||k.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;}A=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop);}var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(_),this.prevOp=this.curOp,this.curOp=null;}},p.prototype.$historyTracker=function(c){if(this.$mergeUndoDeltas){var g=this.prevOp,A=this.$mergeableCommands,k=g.command&&c.command.name==g.command.name;if(c.command.name=="insertstring"){var R=c.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),k=k&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(g.args)),this.mergeNextCommand=!0;}else k=k&&A.indexOf(c.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(k=!1),k?this.session.mergeUndoDeltas=!0:A.indexOf(c.command.name)!==-1&&(this.sequenceStartTime=Date.now());}},p.prototype.setKeyboardHandler=function(c,g){if(c&&typeof c=="string"&&c!="ace"){this.$keybindingId=c;var A=this;m.loadModule(["keybinding",c],function(k){A.$keybindingId==c&&A.keyBinding.setKeyboardHandler(k&&k.handler),g&&g();});}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(c),g&&g();},p.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},p.prototype.setSession=function(c){if(this.session!=c){this.curOp&&this.endOperation(),this.curOp={};var g=this.session;if(g){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var A=this.session.getSelection();A.off("changeCursor",this.$onCursorChange),A.off("changeSelection",this.$onSelectionChange);}this.session=c,c?(this.$onDocumentChange=this.onDocumentChange.bind(this),c.on("change",this.$onDocumentChange),this.renderer.setSession(c),this.$onChangeMode=this.onChangeMode.bind(this),c.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),c.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),c.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),c.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),c.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),c.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=c.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(c)),this._signal("changeSession",{session:c,oldSession:g}),this.curOp=null,g&&g._signal("changeEditor",{oldEditor:this}),c&&c._signal("changeEditor",{editor:this}),c&&!c.destroyed&&c.bgTokenizer.scheduleStart();}},p.prototype.getSession=function(){return this.session},p.prototype.setValue=function(c,g){return this.session.doc.setValue(c),g?g==1?this.navigateFileEnd():g==-1&&this.navigateFileStart():this.selectAll(),c},p.prototype.getValue=function(){return this.session.getValue()},p.prototype.getSelection=function(){return this.selection},p.prototype.resize=function(c){this.renderer.onResize(c);},p.prototype.setTheme=function(c,g){this.renderer.setTheme(c,g);},p.prototype.getTheme=function(){return this.renderer.getTheme()},p.prototype.setStyle=function(c){this.renderer.setStyle(c);},p.prototype.unsetStyle=function(c){this.renderer.unsetStyle(c);},p.prototype.getFontSize=function(){return this.getOption("fontSize")||M.computedStyle(this.container).fontSize},p.prototype.setFontSize=function(c){this.setOption("fontSize",c);},p.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var c=this;this.$highlightPending=!0,setTimeout(function(){c.$highlightPending=!1;var g=c.session;if(!(!g||g.destroyed)){g.$bracketHighlight&&(g.$bracketHighlight.markerIds.forEach(function(O){g.removeMarker(O);}),g.$bracketHighlight=null);var A=c.getCursorPosition(),k=c.getKeyboardHandler(),R=k&&k.$getDirectionForHighlight&&k.$getDirectionForHighlight(c),_=g.getMatchingBracketRanges(A,R);if(!_){var D=new $(g,A.row,A.column),I=D.getCurrentToken();if(I&&/\b(?:tag-open|tag-name)/.test(I.type)){var F=g.getMatchingTags(A);F&&(_=[F.openTagName.isEmpty()?F.openTag:F.openTagName,F.closeTagName.isEmpty()?F.closeTag:F.closeTagName]);}}if(!_&&g.$mode.getMatching&&(_=g.$mode.getMatching(c.session)),!_){c.getHighlightIndentGuides()&&c.renderer.$textLayer.$highlightIndentGuide();return}var N="ace_bracket";Array.isArray(_)?_.length==1&&(N="ace_error_bracket"):_=[_],_.length==2&&(a.comparePoints(_[0].end,_[1].start)==0?_=[a.fromPoints(_[0].start,_[1].end)]:a.comparePoints(_[0].start,_[1].end)==0&&(_=[a.fromPoints(_[1].start,_[0].end)])),g.$bracketHighlight={ranges:_,markerIds:_.map(function(O){return g.addMarker(O,N,"text")})},c.getHighlightIndentGuides()&&c.renderer.$textLayer.$highlightIndentGuide();}},50);}},p.prototype.focus=function(){this.textInput.focus();},p.prototype.isFocused=function(){return this.textInput.isFocused()},p.prototype.blur=function(){this.textInput.blur();},p.prototype.onFocus=function(c){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",c));},p.prototype.onBlur=function(c){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",c));},p.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine();},p.prototype.onDocumentChange=function(c){var g=this.session.$useWrapMode,A=c.start.row==c.end.row?c.end.row:1/0;this.renderer.updateLines(c.start.row,A,g),this._signal("change",c),this.$cursorChange();},p.prototype.onTokenizerUpdate=function(c){var g=c.data;this.renderer.updateLines(g.first,g.last);},p.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop());},p.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft());},p.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection");},p.prototype.$updateHighlightActiveLine=function(){var c=this.getSession(),g;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(g=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(g=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(g=!1)),c.$highlightLineMarker&&!g)c.removeMarker(c.$highlightLineMarker.id),c.$highlightLineMarker=null;else if(!c.$highlightLineMarker&&g){var A=new a(g.row,g.column,g.row,1/0);A.id=c.addMarker(A,"ace_active-line","screenLine"),c.$highlightLineMarker=A;}else g&&(c.$highlightLineMarker.start.row=g.row,c.$highlightLineMarker.end.row=g.row,c.$highlightLineMarker.start.column=g.column,c._signal("changeBackMarker"));},p.prototype.onSelectionChange=function(c){var g=this.session;if(g.$selectionMarker&&g.removeMarker(g.$selectionMarker),g.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else {var A=this.selection.getRange(),k=this.getSelectionStyle();g.$selectionMarker=g.addMarker(A,"ace_selection",k);}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection");},p.prototype.$getSelectionHighLightRegexp=function(){var c=this.session,g=this.getSelectionRange();if(!(g.isEmpty()||g.isMultiLine())){var A=g.start.column,k=g.end.column,R=c.getLine(g.start.row),_=R.substring(A,k);if(!(_.length>5e3||!/[\w\d]/.test(_))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),I=R.substring(A-1,k+1);if(D.test(I))return D}}},p.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers();},p.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers();},p.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints();},p.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations());},p.prototype.onChangeMode=function(c){this.renderer.updateText(),this._emit("changeMode",c);},p.prototype.onChangeWrapLimit=function(){this.renderer.updateFull();},p.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0);},p.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull();},p.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},p.prototype.getCopyText=function(){var c=this.getSelectedText(),g=this.session.doc.getNewLineCharacter(),A=!1;if(!c&&this.$copyWithEmptySelection){A=!0;for(var k=this.selection.getAllRanges(),R=0;R<k.length;R++){var _=k[R];R&&k[R-1].start.row==_.start.row||(c+=this.session.getLine(_.start.row)+g);}}var D={text:c};return this._signal("copy",D),C.lineMode=A?D.text:!1,D.text},p.prototype.onCopy=function(){this.commands.exec("copy",this);},p.prototype.onCut=function(){this.commands.exec("cut",this);},p.prototype.onPaste=function(c,g){var A={text:c,event:g};this.commands.exec("paste",this,A);},p.prototype.$handlePaste=function(c){typeof c=="string"&&(c={text:c}),this._signal("paste",c);var g=c.text,A=g===C.lineMode,k=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)A?k.insert({row:this.selection.lead.row,column:0},g):this.insert(g);else if(A)this.selection.rangeList.ranges.forEach(function(N){k.insert({row:N.start.row,column:0},g);});else {var R=g.split(/\r\n|\r|\n/),_=this.selection.rangeList.ranges,D=R.length==2&&(!R[0]||!R[1]);if(R.length!=_.length||D)return this.commands.exec("insertstring",this,g);for(var I=_.length;I--;){var F=_[I];F.isEmpty()||k.remove(F),k.insert(F.start,R[I]);}}},p.prototype.execCommand=function(c,g){return this.commands.exec(c,this,g)},p.prototype.insert=function(c,g){var A=this.session,k=A.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!g){var _=k.transformAction(A.getState(R.row),"insertion",this,A,c);_&&(c!==_.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),c=_.text);}if(c==" "&&(c=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&c.indexOf(`
223
+ `)==-1){var D=a.fromPoints(R,R);D.end.column+=c.length,this.session.remove(D);}}else {var D=this.getSelectionRange();R=this.session.remove(D),this.clearSelection();}if(c==`
224
+ `||c==`\r
225
+ `){var O=A.getLine(R.row);if(R.column>O.search(/\S|$/)){var I=O.substr(R.column).search(/\S|$/);A.doc.removeInLine(R.row,R.column,R.column+I);}}this.clearSelection();var F=R.column,N=A.getState(R.row),O=A.getLine(R.row),W=k.checkOutdent(N,O,c);if(A.insert(R,c),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new a(R.row,F+_.selection[0],R.row,F+_.selection[1])):this.selection.setSelectionRange(new a(R.row+_.selection[0],_.selection[1],R.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(A.getDocument().isNewLine(c)){var B=k.getNextLineIndent(N,O.slice(0,R.column),A.getTabString());A.insert({row:R.row+1,column:0},B);}W&&k.autoOutdent(N,A,R.row);}},p.prototype.autoIndent=function(){for(var c=this.session,g=c.getMode(),A=this.selection.isEmpty()?[new a(0,0,c.doc.getLength()-1,0)]:this.selection.getAllRanges(),k="",R="",_="",D=c.getTabString(),I=0;I<A.length;I++)for(var F=A[I].start.row,N=A[I].end.row,O=F;O<=N;O++){O>0&&(k=c.getState(O-1),R=c.getLine(O-1),_=g.getNextLineIndent(k,R,D));var W=c.getLine(O),B=g.$getIndent(W);if(_!==B){if(B.length>0){var z=new a(O,0,O,B.length);c.remove(z);}_.length>0&&c.insert({row:O,column:0},_);}g.autoOutdent(k,c,O);}},p.prototype.onTextInput=function(c,g){if(!g)return this.keyBinding.onTextInput(c);this.startOperation({command:{name:"insertstring"}});var A=this.applyComposition.bind(this,c,g);this.selection.rangeCount?this.forEachSelection(A):A(),this.endOperation();},p.prototype.applyComposition=function(c,g){if(g.extendLeft||g.extendRight){var A=this.selection.getRange();A.start.column-=g.extendLeft,A.end.column+=g.extendRight,A.start.column<0&&(A.start.row--,A.start.column+=this.session.getLine(A.start.row).length+1),this.selection.setRange(A),!c&&!A.isEmpty()&&this.remove();}if((c||!this.selection.isEmpty())&&this.insert(c,!0),g.restoreStart||g.restoreEnd){var A=this.selection.getRange();A.start.column-=g.restoreStart,A.end.column-=g.restoreEnd,this.selection.setRange(A);}},p.prototype.onCommandKey=function(c,g,A){return this.keyBinding.onCommandKey(c,g,A)},p.prototype.setOverwrite=function(c){this.session.setOverwrite(c);},p.prototype.getOverwrite=function(){return this.session.getOverwrite()},p.prototype.toggleOverwrite=function(){this.session.toggleOverwrite();},p.prototype.setScrollSpeed=function(c){this.setOption("scrollSpeed",c);},p.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},p.prototype.setDragDelay=function(c){this.setOption("dragDelay",c);},p.prototype.getDragDelay=function(){return this.getOption("dragDelay")},p.prototype.setSelectionStyle=function(c){this.setOption("selectionStyle",c);},p.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},p.prototype.setHighlightActiveLine=function(c){this.setOption("highlightActiveLine",c);},p.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},p.prototype.setHighlightGutterLine=function(c){this.setOption("highlightGutterLine",c);},p.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},p.prototype.setHighlightSelectedWord=function(c){this.setOption("highlightSelectedWord",c);},p.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},p.prototype.setAnimatedScroll=function(c){this.renderer.setAnimatedScroll(c);},p.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},p.prototype.setShowInvisibles=function(c){this.renderer.setShowInvisibles(c);},p.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},p.prototype.setDisplayIndentGuides=function(c){this.renderer.setDisplayIndentGuides(c);},p.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},p.prototype.setHighlightIndentGuides=function(c){this.renderer.setHighlightIndentGuides(c);},p.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},p.prototype.setShowPrintMargin=function(c){this.renderer.setShowPrintMargin(c);},p.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},p.prototype.setPrintMarginColumn=function(c){this.renderer.setPrintMarginColumn(c);},p.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},p.prototype.setReadOnly=function(c){this.setOption("readOnly",c);},p.prototype.getReadOnly=function(){return this.getOption("readOnly")},p.prototype.setBehavioursEnabled=function(c){this.setOption("behavioursEnabled",c);},p.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},p.prototype.setWrapBehavioursEnabled=function(c){this.setOption("wrapBehavioursEnabled",c);},p.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},p.prototype.setShowFoldWidgets=function(c){this.setOption("showFoldWidgets",c);},p.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},p.prototype.setFadeFoldWidgets=function(c){this.setOption("fadeFoldWidgets",c);},p.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},p.prototype.remove=function(c){this.selection.isEmpty()&&(c=="left"?this.selection.selectLeft():this.selection.selectRight());var g=this.getSelectionRange();if(this.getBehavioursEnabled()){var A=this.session,k=A.getState(g.start.row),R=A.getMode().transformAction(k,"deletion",this,A,g);if(g.end.column===0){var _=A.getTextRange(g);if(_[_.length-1]==`
226
+ `){var D=A.getLine(g.end.row);/^\s+$/.test(D)&&(g.end.column=D.length);}}R&&(g=R);}this.session.remove(g),this.clearSelection();},p.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection();},p.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection();},p.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection();},p.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var c=this.getSelectionRange();c.start.column==c.end.column&&c.start.row==c.end.row&&(c.end.column=0,c.end.row++),this.session.remove(c),this.clearSelection();},p.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var c=this.getCursorPosition();this.insert(`
227
+ `),this.moveCursorToPosition(c);},p.prototype.setGhostText=function(c,g){this.session.widgetManager||(this.session.widgetManager=new d(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(c,g);},p.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText();},p.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var c=this.getCursorPosition(),g=c.column;if(g!==0){var A=this.session.getLine(c.row),k,R;g<A.length?(k=A.charAt(g)+A.charAt(g-1),R=new a(c.row,g-1,c.row,g+1)):(k=A.charAt(g-1)+A.charAt(g-2),R=new a(c.row,g-2,c.row,g)),this.session.replace(R,k),this.session.selection.moveToPosition(R.end);}}},p.prototype.toLowerCase=function(){var c=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var g=this.getSelectionRange(),A=this.session.getTextRange(g);this.session.replace(g,A.toLowerCase()),this.selection.setSelectionRange(c);},p.prototype.toUpperCase=function(){var c=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var g=this.getSelectionRange(),A=this.session.getTextRange(g);this.session.replace(g,A.toUpperCase()),this.selection.setSelectionRange(c);},p.prototype.indent=function(){var c=this.session,g=this.getSelectionRange();if(g.start.row<g.end.row){var A=this.$getSelectedRows();c.indentRows(A.first,A.last," ");return}else if(g.start.column<g.end.column){var k=c.getTextRange(g);if(!/^\s+$/.test(k)){var A=this.$getSelectedRows();c.indentRows(A.first,A.last," ");return}}var R=c.getLine(g.start.row),_=g.start,D=c.getTabSize(),I=c.documentToScreenColumn(_.row,_.column);if(this.session.getUseSoftTabs())var F=D-I%D,N=s.stringRepeat(" ",F);else {for(var F=I%D;R[g.start.column-1]==" "&&F;)g.start.column--,F--;this.selection.setSelectionRange(g),N=" ";}return this.insert(N)},p.prototype.blockIndent=function(){var c=this.$getSelectedRows();this.session.indentRows(c.first,c.last," ");},p.prototype.blockOutdent=function(){var c=this.session.getSelection();this.session.outdentRows(c.getRange());},p.prototype.sortLines=function(){for(var c=this.$getSelectedRows(),g=this.session,A=[],k=c.first;k<=c.last;k++)A.push(g.getLine(k));A.sort(function(D,I){return D.toLowerCase()<I.toLowerCase()?-1:D.toLowerCase()>I.toLowerCase()?1:0});for(var R=new a(0,0,0,0),k=c.first;k<=c.last;k++){var _=g.getLine(k);R.start.row=k,R.end.row=k,R.end.column=_.length,g.replace(R,A[k-c.first]);}},p.prototype.toggleCommentLines=function(){var c=this.session.getState(this.getCursorPosition().row),g=this.$getSelectedRows();this.session.getMode().toggleCommentLines(c,this.session,g.first,g.last);},p.prototype.toggleBlockComment=function(){var c=this.getCursorPosition(),g=this.session.getState(c.row),A=this.getSelectionRange();this.session.getMode().toggleBlockComment(g,this.session,A,c);},p.prototype.getNumberAt=function(c,g){var A=/[\-]?[0-9]+(?:\.[0-9]+)?/g;A.lastIndex=0;for(var k=this.session.getLine(c);A.lastIndex<g;){var R=A.exec(k);if(R.index<=g&&R.index+R[0].length>=g){var _={value:R[0],start:R.index,end:R.index+R[0].length};return _}}return null},p.prototype.modifyNumber=function(c){var g=this.selection.getCursor().row,A=this.selection.getCursor().column,k=new a(g,A-1,g,A),R=this.session.getTextRange(k);if(!isNaN(parseFloat(R))&&isFinite(R)){var _=this.getNumberAt(g,A);if(_){var D=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,I=_.start+_.value.length-D,F=parseFloat(_.value);F*=Math.pow(10,I),D!==_.end&&A<D?c*=Math.pow(10,_.end-A-1):c*=Math.pow(10,_.end-A),F+=c,F/=Math.pow(10,I);var N=F.toFixed(I),O=new a(g,_.start,g,_.end);this.session.replace(O,N),this.moveCursorTo(g,Math.max(_.start+1,A+N.length-_.value.length));}}else this.toggleWord();},p.prototype.toggleWord=function(){var c=this.selection.getCursor().row,g=this.selection.getCursor().column;this.selection.selectWord();var A=this.getSelectedText(),k=this.selection.getWordRange().start.column,R=A.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),_=g-k-1;_<0&&(_=0);var D=0,I=0,F=this;A.match(/[A-Za-z0-9_]+/)&&R.forEach(function(Y,G){I=D+Y.length,_>=D&&_<=I&&(A=Y,F.selection.clearSelection(),F.moveCursorTo(c,D+k),F.selection.selectTo(c,I+k)),D=I;});for(var N=this.$toggleWordPairs,O,W=0;W<N.length;W++)for(var B=N[W],z=0;z<=1;z++){var j=+!z,U=A.match(new RegExp("^\\s?_?("+s.escapeRegExp(B[z])+")\\s?$","i"));if(U){var V=A.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(U[1])+")($|\\s)","g"));V&&(O=A.replace(new RegExp(s.escapeRegExp(B[z]),"i"),function(Y){var G=B[j];return Y.toUpperCase()==Y?G=G.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(G=G.substr(0,0)+B[j].charAt(0).toUpperCase()+G.substr(1)),G}),this.insert(O),O="");}}},p.prototype.findLinkAt=function(c,g){var A,k,R=this.session.getLine(c),_=R.split(/((?:https?|ftp):\/\/[\S]+)/),D=g;D<0&&(D=0);var I=0,F=0,N;try{for(var O=E(_),W=O.next();!W.done;W=O.next()){var B=W.value;if(F=I+B.length,D>=I&&D<=F&&B.match(/((?:https?|ftp):\/\/[\S]+)/)){N=B.replace(/[\s:.,'";}\]]+$/,"");break}I=F;}}catch(z){A={error:z};}finally{try{W&&!W.done&&(k=O.return)&&k.call(O);}finally{if(A)throw A.error}}return N},p.prototype.openLink=function(){var c=this.selection.getCursor(),g=this.findLinkAt(c.row,c.column);return g&&window.open(g,"_blank"),g!=null},p.prototype.removeLines=function(){var c=this.$getSelectedRows();this.session.removeFullLines(c.first,c.last),this.clearSelection();},p.prototype.duplicateSelection=function(){var c=this.selection,g=this.session,A=c.getRange(),k=c.isBackwards();if(A.isEmpty()){var R=A.start.row;g.duplicateLines(R,R);}else {var _=k?A.start:A.end,D=g.insert(_,g.getTextRange(A));A.start=_,A.end=D,c.setSelectionRange(A,k);}},p.prototype.moveLinesDown=function(){this.$moveLines(1,!1);},p.prototype.moveLinesUp=function(){this.$moveLines(-1,!1);},p.prototype.moveText=function(c,g,A){return this.session.moveText(c,g,A)},p.prototype.copyLinesUp=function(){this.$moveLines(-1,!0);},p.prototype.copyLinesDown=function(){this.$moveLines(1,!0);},p.prototype.$moveLines=function(c,g){var A,k,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var _=R.toOrientedRange();A=this.$getSelectedRows(_),k=this.session.$moveLines(A.first,A.last,g?0:c),g&&c==-1&&(k=0),_.moveBy(k,0),R.fromOrientedRange(_);}else {var D=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var I=0,F=0,N=D.length,O=0;O<N;O++){var W=O;D[O].moveBy(I,0),A=this.$getSelectedRows(D[O]);for(var B=A.first,z=A.last;++O<N;){F&&D[O].moveBy(F,0);var j=this.$getSelectedRows(D[O]);if(g&&j.first!=z)break;if(!g&&j.first>z+1)break;z=j.last;}for(O--,I=this.session.$moveLines(B,z,g?0:c),g&&c==-1&&(W=O+1);W<=O;)D[W].moveBy(I,0),W++;g||(I=0),F+=I;}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1;}},p.prototype.$getSelectedRows=function(c){return c=(c||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(c.start.row),last:this.session.getRowFoldEnd(c.end.row)}},p.prototype.onCompositionStart=function(c){this.renderer.showComposition(c);},p.prototype.onCompositionUpdate=function(c){this.renderer.setCompositionText(c);},p.prototype.onCompositionEnd=function(){this.renderer.hideComposition();},p.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},p.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},p.prototype.isRowVisible=function(c){return c>=this.getFirstVisibleRow()&&c<=this.getLastVisibleRow()},p.prototype.isRowFullyVisible=function(c){return c>=this.renderer.getFirstFullyVisibleRow()&&c<=this.renderer.getLastFullyVisibleRow()},p.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},p.prototype.$moveByPage=function(c,g){var A=this.renderer,k=this.renderer.layerConfig,R=c*Math.floor(k.height/k.lineHeight);g===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0);}):g===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var _=A.scrollTop;A.scrollBy(0,R*k.lineHeight),g!=null&&A.scrollCursorIntoView(null,.5),A.animateScrolling(_);},p.prototype.selectPageDown=function(){this.$moveByPage(1,!0);},p.prototype.selectPageUp=function(){this.$moveByPage(-1,!0);},p.prototype.gotoPageDown=function(){this.$moveByPage(1,!1);},p.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1);},p.prototype.scrollPageDown=function(){this.$moveByPage(1);},p.prototype.scrollPageUp=function(){this.$moveByPage(-1);},p.prototype.scrollToRow=function(c){this.renderer.scrollToRow(c);},p.prototype.scrollToLine=function(c,g,A,k){this.renderer.scrollToLine(c,g,A,k);},p.prototype.centerSelection=function(){var c=this.getSelectionRange(),g={row:Math.floor(c.start.row+(c.end.row-c.start.row)/2),column:Math.floor(c.start.column+(c.end.column-c.start.column)/2)};this.renderer.alignCursor(g,.5);},p.prototype.getCursorPosition=function(){return this.selection.getCursor()},p.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},p.prototype.getSelectionRange=function(){return this.selection.getRange()},p.prototype.selectAll=function(){this.selection.selectAll();},p.prototype.clearSelection=function(){this.selection.clearSelection();},p.prototype.moveCursorTo=function(c,g){this.selection.moveCursorTo(c,g);},p.prototype.moveCursorToPosition=function(c){this.selection.moveCursorToPosition(c);},p.prototype.jumpToMatching=function(c,g){var A=this.getCursorPosition(),k=new $(this.session,A.row,A.column),R=k.getCurrentToken(),_=0;R&&R.type.indexOf("tag-name")!==-1&&(R=k.stepBackward());var D=R||k.stepForward();if(D){var I,F=!1,N={},O=A.column-D.start,W,B={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;O<D.value.length&&!F;O++)if(B[D.value[O]])switch(W=B[D.value[O]]+"."+D.type.replace("rparen","lparen"),isNaN(N[W])&&(N[W]=0),D.value[O]){case"(":case"[":case"{":N[W]++;break;case")":case"]":case"}":N[W]--,N[W]===-1&&(I="bracket",F=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(N[D.value])&&(N[D.value]=0),R.value==="<"&&_>1?N[D.value]++:R.value==="</"&&N[D.value]--,N[D.value]===-1&&(I="tag",F=!0));F||(R=D,_++,D=k.stepForward(),O=0);}while(D&&!F);if(I){var z,j;if(I==="bracket")z=this.session.getBracketRange(A),z||(z=new a(k.getCurrentTokenRow(),k.getCurrentTokenColumn()+O-1,k.getCurrentTokenRow(),k.getCurrentTokenColumn()+O-1),j=z.start,(g||j.row===A.row&&Math.abs(j.column-A.column)<2)&&(z=this.session.getBracketRange(j)));else if(I==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(z=new a(k.getCurrentTokenRow(),k.getCurrentTokenColumn()-2,k.getCurrentTokenRow(),k.getCurrentTokenColumn()-2),z.compare(A.row,A.column)===0){var U=this.session.getMatchingTags(A);U&&(U.openTag.contains(A.row,A.column)?(z=U.closeTag,j=z.start):(z=U.openTag,U.closeTag.start.row===A.row&&U.closeTag.start.column===A.column?j=z.end:j=z.start));}j=j||z.start;}j=z&&z.cursor||j,j&&(c?z&&g?this.selection.setRange(z):z&&z.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(j.row,j.column):this.selection.moveTo(j.row,j.column));}}},p.prototype.gotoLine=function(c,g,A){this.selection.clearSelection(),this.session.unfold({row:c-1,column:g||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(c-1,g||0),this.isRowFullyVisible(c-1)||this.scrollToLine(c-1,!0,A);},p.prototype.navigateTo=function(c,g){this.selection.moveTo(c,g);},p.prototype.navigateUp=function(c){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var g=this.selection.anchor.getPosition();return this.moveCursorToPosition(g)}this.selection.clearSelection(),this.selection.moveCursorBy(-c||-1,0);},p.prototype.navigateDown=function(c){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var g=this.selection.anchor.getPosition();return this.moveCursorToPosition(g)}this.selection.clearSelection(),this.selection.moveCursorBy(c||1,0);},p.prototype.navigateLeft=function(c){if(this.selection.isEmpty())for(c=c||1;c--;)this.selection.moveCursorLeft();else {var g=this.getSelectionRange().start;this.moveCursorToPosition(g);}this.clearSelection();},p.prototype.navigateRight=function(c){if(this.selection.isEmpty())for(c=c||1;c--;)this.selection.moveCursorRight();else {var g=this.getSelectionRange().end;this.moveCursorToPosition(g);}this.clearSelection();},p.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection();},p.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection();},p.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection();},p.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection();},p.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection();},p.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection();},p.prototype.replace=function(c,g){g&&this.$search.set(g);var A=this.$search.find(this.session),k=0;return A&&(this.$tryReplace(A,c)&&(k=1),this.selection.setSelectionRange(A),this.renderer.scrollSelectionIntoView(A.start,A.end)),k},p.prototype.replaceAll=function(c,g){g&&this.$search.set(g);var A=this.$search.findAll(this.session),k=0;if(!A.length)return k;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var _=A.length-1;_>=0;--_)this.$tryReplace(A[_],c)&&k++;return this.selection.setSelectionRange(R),k},p.prototype.$tryReplace=function(c,g){var A=this.session.getTextRange(c);return g=this.$search.replace(A,g),g!==null?(c.end=this.session.replace(c,g),c):null},p.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},p.prototype.find=function(c,g,A){g||(g={}),typeof c=="string"||c instanceof RegExp?g.needle=c:typeof c=="object"&&x.mixin(g,c);var k=this.selection.getRange();g.needle==null&&(c=this.session.getTextRange(k)||this.$search.$options.needle,c||(k=this.session.getWordRange(k.start.row,k.start.column),c=this.session.getTextRange(k)),this.$search.set({needle:c})),this.$search.set(g),g.start||this.$search.set({start:k});var R=this.$search.find(this.session);if(g.preventScroll)return R;if(R)return this.revealRange(R,A),R;g.backwards?k.start=k.end:k.end=k.start,this.selection.setRange(k);},p.prototype.findNext=function(c,g){this.find({skipCurrent:!0,backwards:!1},c,g);},p.prototype.findPrevious=function(c,g){this.find(c,{skipCurrent:!0,backwards:!0},g);},p.prototype.revealRange=function(c,g){this.session.unfold(c),this.selection.setSelectionRange(c);var A=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(c.start,c.end,.5),g!==!1&&this.renderer.animateScrolling(A);},p.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5);},p.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5);},p.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(c){c.destroy();}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners();},p.prototype.setAutoScrollEditorIntoView=function(c){if(c){var g,A=this,k=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var _=this.on("changeSelection",function(){k=!0;}),D=this.renderer.on("beforeRender",function(){k&&(g=A.renderer.container.getBoundingClientRect());}),I=this.renderer.on("afterRender",function(){if(k&&g&&(A.isFocused()||A.searchBox&&A.searchBox.isFocused())){var F=A.renderer,N=F.$cursorLayer.$pixelPos,O=F.layerConfig,W=N.top-O.offset;N.top>=0&&W+g.top<0?k=!0:N.top<O.height&&N.top+g.top+O.lineHeight>window.innerHeight?k=!1:k=null,k!=null&&(R.style.top=W+"px",R.style.left=N.left+"px",R.style.height=O.lineHeight+"px",R.scrollIntoView(k)),k=g=null;}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",I),this.renderer.off("beforeRender",D));};}},p.prototype.$resetCursorStyle=function(){var c=this.$cursorStyle||"ace",g=this.renderer.$cursorLayer;g&&(g.setSmoothBlinking(/smooth/.test(c)),g.isBlinking=!this.$readOnly&&c!="wide",M.setCssClass(g.element,"ace_slim-cursors",/slim/.test(c)));},p.prototype.prompt=function(c,g,A){var k=this;m.loadModule("ace/ext/prompt",function(R){R.prompt(k,c,g,A);});},p}();b.$uid=0,b.prototype.curOp=null,b.prototype.prevOp={},b.prototype.$mergeableCommands=["backspace","del","insertstring"],b.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],x.implement(b.prototype,u),m.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(p){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:p});},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine();},initialValue:!0},highlightSelectedWord:{set:function(p){this.$onSelectionChange();},initialValue:!0},readOnly:{set:function(p){this.textInput.setReadOnly(p),this.$resetCursorStyle();},initialValue:!1},copyWithEmptySelection:{set:function(p){this.textInput.setCopyWithEmptySelection(p);},initialValue:!1},cursorStyle:{set:function(p){this.$resetCursorStyle();},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(p){this.setAutoScrollEditorIntoView(p);}},keyboardHandler:{set:function(p){this.setKeyboardHandler(p);},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(p){this.session.setValue(p);},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(p){this.setSession(p);},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(p){this.renderer.$gutterLayer.setShowLineNumbers(p),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),p&&this.$relativeLineNumbers?f.attach(this):f.detach(this);},initialValue:!0},relativeLineNumbers:{set:function(p){this.$showLineNumbers&&p?f.attach(this):f.detach(this);}},placeholder:{set:function(p){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var c=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(c&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),M.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!c&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),M.addCssClass(this.container,"ace_hasPlaceholder");var g=M.createElement("div");g.className="ace_placeholder",g.textContent=this.$placeholder||"",this.renderer.placeholderNode=g,this.renderer.content.appendChild(this.renderer.placeholderNode);}else !c&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder();}},enableKeyboardAccessibility:{set:function(p){var c={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(k){k.blur(),k.renderer.scroller.focus();},readOnly:!0},g=function(k){if(k.target==this.renderer.scroller&&k.keyCode===v.enter){k.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus();}},A;p?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",w("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",w("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",g.bind(this)),this.commands.addCommand(c),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",w("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",w("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),A||(A=new h(this)),A.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",g.bind(this)),this.commands.removeCommand(c),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),A&&A.removeListener());},initialValue:!1},textInputAriaLabel:{set:function(p){this.$textInputAriaLabel=p;},initialValue:""},enableMobileMenu:{set:function(p){this.$enableMobileMenu=p;},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var f={getText:function(p,c){return (Math.abs(p.selection.lead.row-c)||c+1+(c<9?"\xB7":""))+""},getWidth:function(p,c,g){return Math.max(c.toString().length,(g.lastRow+1).toString().length,2)*g.characterWidth},update:function(p,c){c.renderer.$loop.schedule(c.renderer.CHANGE_GUTTER);},attach:function(p){p.renderer.$gutterLayer.$renderer=this,p.on("changeSelection",this.update),this.update(null,p);},detach:function(p){p.renderer.$gutterLayer.$renderer==this&&(p.renderer.$gutterLayer.$renderer=null),p.off("changeSelection",this.update),this.update(null,p);}};T.Editor=b;});ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(L,T,H){var E=L("../lib/dom"),x=function(){function M(s,l){this.element=s,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0;}return M.prototype.moveContainer=function(s){E.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient);},M.prototype.pageChanged=function(s,l){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},M.prototype.computeLineTop=function(s,l,r){var t=l.firstRowScreen*l.lineHeight,i=Math.floor(t/this.canvasHeight),n=r.documentToScreenRow(s,0)*l.lineHeight;return n-i*this.canvasHeight},M.prototype.computeLineHeight=function(s,l,r){return l.lineHeight*r.getRowLineCount(s)},M.prototype.getLength=function(){return this.cells.length},M.prototype.get=function(s){return this.cells[s]},M.prototype.shift=function(){this.$cacheCell(this.cells.shift());},M.prototype.pop=function(){this.$cacheCell(this.cells.pop());},M.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var l=E.createFragment(this.element),r=0;r<s.length;r++)l.appendChild(s[r].element);this.element.appendChild(l);}else this.cells.push(s),this.element.appendChild(s.element);},M.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var l=E.createFragment(this.element),r=0;r<s.length;r++)l.appendChild(s[r].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l);}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element);},M.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},M.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s));},M.prototype.createCell=function(s,l,r,t){var i=this.cellCache.pop();if(!i){var n=E.createElement("div");t&&t(n),this.element.appendChild(n),i={element:n,text:"",row:s};}return i.row=s,i},M}();T.Lines=x;});ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(L,T,H){var E=L("../lib/dom"),x=L("../lib/oop"),M=L("../lib/lang"),s=L("../lib/event_emitter").EventEmitter,l=L("./lines").Lines,r=L("../config").nls,t=function(){function n(e){this.element=E.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1;}return n.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations);},n.prototype.addGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,o);},n.prototype.removeGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,o);},n.prototype.setAnnotations=function(e){this.$annotations=[];for(var o=0;o<e.length;o++){var a=e[o],u=a.row,y=this.$annotations[u];y||(y=this.$annotations[u]={text:[],type:[],displayText:[]});var S=a.text,m=a.text,$=a.type;S=S?M.escapeHTML(S):a.html||"",m=m||a.html||"",y.text.indexOf(S)===-1&&(y.text.push(S),y.type.push($),y.displayText.push(m));var d=a.className;d?y.className=d:$==="error"?y.className=" ace_error":$==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":$==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":$==="info"&&!y.className?y.className=" ace_info":$==="hint"&&!y.className&&(y.className=" ace_hint");}},n.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var o=e.start.row,a=e.end.row-o;if(a!==0)if(e.action=="remove")this.$annotations.splice(o,a+1,null);else {var u=new Array(a+1);u.unshift(o,1),this.$annotations.splice.apply(this.$annotations,u);}}},n.prototype.update=function(e){this.config=e;var o=this.session,a=e.firstRow,u=Math.min(e.lastRow+e.gutterOffset,o.getLength()-1);this.oldLastRow=u,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var y=o.getNextFoldLine(a),S=y?y.start.row:1/0,m=null,$=-1,d=a;;){if(d>S&&(d=y.end.row+1,y=o.getNextFoldLine(d,y),S=y?y.start.row:1/0),d>u){for(;this.$lines.getLength()>$+1;)this.$lines.pop();break}m=this.$lines.get(++$),m?m.row=d:(m=this.$lines.createCell(d,e,this.session,i),this.$lines.push(m)),this.$renderCell(m,e,y,d),d++;}this._signal("afterRender"),this.$updateGutterWidth(e);},n.prototype.$updateGutterWidth=function(e){var o=this.session,a=o.gutterRenderer||this.$renderer,u=o.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(y=o.getLength()+u-1);var S=a?a.getWidth(o,y,e):y.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();S+=m.left+m.right,S!==this.gutterWidth&&!isNaN(S)&&(this.gutterWidth=S,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",S));},n.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row);}},n.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<o.length;a++){var u=o[a];if(u.row>=this.$cursorRow){if(u.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(a>0&&y&&y.start.row==o[a-1].row)u=o[a-1];else break}u.element.className="ace_gutter-active-line "+u.element.className,this.$cursorCell=u;break}}}}},n.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),u=this.oldLastRow;if(this.oldLastRow=a,!o||u<e.firstRow)return this.update(e);if(a<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var y=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);y>0;y--)this.$lines.shift();if(u>a)for(var y=this.session.getFoldedRowCount(a+1,u);y>0;y--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,o.firstRow-1)),a>u&&this.$lines.push(this.$renderLines(e,u+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e);},n.prototype.$renderLines=function(e,o,a){for(var u=[],y=o,S=this.session.getNextFoldLine(y),m=S?S.start.row:1/0;y>m&&(y=S.end.row+1,S=this.session.getNextFoldLine(y,S),m=S?S.start.row:1/0),!(y>a);){var $=this.$lines.createCell(y,e,this.session,i);this.$renderCell($,e,S,y),u.push($),y++;}return u},n.prototype.$renderCell=function(e,o,a,u){var y=e.element,S=this.session,m=y.childNodes[0],$=y.childNodes[1],d=y.childNodes[2],h=d.firstChild,w=S.$firstLineNumber,C=S.$breakpoints,v=S.$decorations,b=S.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&S.foldWidgets,p=a?a.start.row:Number.MAX_VALUE,c=o.lineHeight+"px",g=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",A=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(b?b.getText(S,u):u+w).toString();if(this.$highlightGutterLine&&(u==this.$cursorRow||a&&u<this.$cursorRow&&u>=p&&this.$cursorRow<=a.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),C[u]&&(g+=C[u]),v[u]&&(g+=v[u]),this.$annotations[u]&&u!==p&&(g+=this.$annotations[u].className),f){var R=f[u];R==null&&(R=f[u]=S.getFoldWidget(u));}if(R){var _="ace_fold-widget ace_"+R,D=R=="start"&&u==p&&u<a.end.row;if(D){_+=" ace_closed";for(var I="",F=!1,N=u+1;N<=a.end.row;N++)if(this.$annotations[N]){if(this.$annotations[N].className===" ace_error"){F=!0,I=" ace_error_fold";break}this.$annotations[N].className===" ace_security"?(F=!0,I=" ace_security_fold"):this.$annotations[N].className===" ace_warning"&&I!==" ace_security_fold"&&(F=!0,I=" ace_warning_fold");}g+=I;}else _+=" ace_open";$.className!=_&&($.className=_),E.setStyle($.style,"height",c),E.setStyle($.style,"display","inline-block"),$.setAttribute("role","button"),$.setAttribute("tabindex","-1");var O=S.getFoldWidgetRange(u);O?$.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[O.start.row+1,O.end.row+1])):a?$.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):$.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[u+1])),D?($.setAttribute("aria-expanded","false"),$.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):($.setAttribute("aria-expanded","true"),$.setAttribute("title",r("gutter.code-folding.open.title","Fold code")));}else $&&(E.setStyle($.style,"display","none"),$.setAttribute("tabindex","0"),$.removeAttribute("role"),$.removeAttribute("aria-label"));if(F&&this.$showFoldedAnnotations){d.className="ace_gutter_annotation",h.className=A,h.className+=I,E.setStyle(h.style,"height",c),E.setStyle(d.style,"display","block"),E.setStyle(d.style,"height",c);var W;switch(I){case" ace_error_fold":W=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security_fold":W=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning_fold":W=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break}d.setAttribute("aria-label",W),d.setAttribute("tabindex","-1"),d.setAttribute("role","button");}else if(this.$annotations[u]){d.className="ace_gutter_annotation",h.className=A,this.$useSvgGutterIcons?h.className+=this.$annotations[u].className:y.classList.add(this.$annotations[u].className.replace(" ","")),E.setStyle(h.style,"height",c),E.setStyle(d.style,"display","block"),E.setStyle(d.style,"height",c);var W;switch(this.$annotations[u].className){case" ace_error":W=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[k]);break;case" ace_security":W=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[k]);break;case" ace_warning":W=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[k]);break;case" ace_info":W=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[k]);break;case" ace_hint":W=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[k]);break}d.setAttribute("aria-label",W),d.setAttribute("tabindex","-1"),d.setAttribute("role","button");}else E.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return k!==m.data&&(m.data=k),y.className!=g&&(y.className=g),E.setStyle(e.element.style,"height",this.$lines.computeLineHeight(u,o,S)+"px"),E.setStyle(e.element.style,"top",this.$lines.computeLineTop(u,o,S)+"px"),e.text=k,d.style.display==="none"&&$.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},n.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e;},n.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return ""}};},n.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},n.prototype.setShowFoldWidgets=function(e){e?E.addCssClass(this.element,"ace_folding-enabled"):E.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null;},n.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},n.prototype.$computePadding=function(){if(!this.element.firstChild)return {left:0,right:0};var e=E.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},n.prototype.getRegion=function(e){var o=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<o.left+a.left)return "markers";if(this.$showFoldWidgets&&e.x>a.right-o.right)return "foldWidgets"},n}();t.prototype.$fixedWidth=!1,t.prototype.$highlightGutterLine=!0,t.prototype.$renderer="",t.prototype.$showLineNumbers=!0,t.prototype.$showFoldWidgets=!0,x.implement(t.prototype,s);function i(n){var e=document.createTextNode("");n.appendChild(e);var o=E.createElement("span");n.appendChild(o);var a=E.createElement("span");n.appendChild(a);var u=E.createElement("span");return a.appendChild(u),n}T.Gutter=t;});ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(L,T,H){var E=L("../range").Range,x=L("../lib/dom"),M=function(){function l(r){this.element=x.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element);}return l.prototype.setPadding=function(r){this.$padding=r;},l.prototype.setSession=function(r){this.session=r;},l.prototype.setMarkers=function(r){this.markers=r;},l.prototype.elt=function(r,t){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=t,i.className=r;},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var t;for(var i in this.markers){var n=this.markers[i];if(!n.range){n.update(t,this,this.session,r);continue}var e=n.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),n.renderer){var o=this.$getTop(e.start.row,r),a=this.$padding+e.start.column*r.characterWidth;n.renderer(t,e,a,o,r);}else n.type=="fullLine"?this.drawFullLineMarker(t,e,n.clazz,r):n.type=="screenLine"?this.drawScreenLineMarker(t,e,n.clazz,r):e.isMultiLine()?n.type=="text"?this.drawTextMarker(t,e,n.clazz,r):this.drawMultiLineMarker(t,e,n.clazz,r):this.drawSingleLineMarker(t,e,n.clazz+" ace_start ace_br15",r);}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild);}},l.prototype.$getTop=function(r,t){return (r-t.firstRowScreen)*t.lineHeight},l.prototype.drawTextMarker=function(r,t,i,n,e){for(var o=this.session,a=t.start.row,u=t.end.row,y=a,S=0,m=0,$=o.getScreenLastRowColumn(y),d=new E(y,t.start.column,y,m);y<=u;y++)d.start.row=d.end.row=y,d.start.column=y==a?t.start.column:o.getRowWrapIndent(y),d.end.column=$,S=m,m=$,$=y+1<u?o.getScreenLastRowColumn(y+1):y==u?0:t.end.column,this.drawSingleLineMarker(r,d,i+(y==a?" ace_start":"")+" ace_br"+s(y==a||y==a+1&&t.start.column,S<m,m>$,y==u),n,y==u?0:1,e);},l.prototype.drawMultiLineMarker=function(r,t,i,n,e){var o=this.$padding,a=n.lineHeight,u=this.$getTop(t.start.row,n),y=o+t.start.column*n.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var S=t.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(r,S,i+" ace_br1 ace_start",n,null,e);}else this.elt(i+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+u+"px;left:"+y+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var S=t.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(r,S,i+" ace_br12",n,null,e);}else {u=this.$getTop(t.end.row,n);var m=t.end.column*n.characterWidth;this.elt(i+" ace_br12","height:"+a+"px;width:"+m+"px;top:"+u+"px;left:"+o+"px;"+(e||""));}if(a=(t.end.row-t.start.row-1)*n.lineHeight,!(a<=0)){u=this.$getTop(t.start.row+1,n);var $=(t.start.column?1:0)|(t.end.column?0:8);this.elt(i+($?" ace_br"+$:""),"height:"+a+"px;right:0;top:"+u+"px;left:"+o+"px;"+(e||""));}},l.prototype.drawSingleLineMarker=function(r,t,i,n,e,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(r,t,i,n,e,o);var a=n.lineHeight,u=(t.end.column+(e||0)-t.start.column)*n.characterWidth,y=this.$getTop(t.start.row,n),S=this.$padding+t.start.column*n.characterWidth;this.elt(i,"height:"+a+"px;width:"+u+"px;top:"+y+"px;left:"+S+"px;"+(o||""));},l.prototype.drawBidiSingleLineMarker=function(r,t,i,n,e,o){var a=n.lineHeight,u=this.$getTop(t.start.row,n),y=this.$padding,S=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);S.forEach(function(m){this.elt(i,"height:"+a+"px;width:"+(m.width+(e||0))+"px;top:"+u+"px;left:"+(y+m.left)+"px;"+(o||""));},this);},l.prototype.drawFullLineMarker=function(r,t,i,n,e){var o=this.$getTop(t.start.row,n),a=n.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,n)-o),this.elt(i,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(e||""));},l.prototype.drawScreenLineMarker=function(r,t,i,n,e){var o=this.$getTop(t.start.row,n),a=n.lineHeight;this.elt(i,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(e||""));},l}();M.prototype.$padding=0;function s(l,r,t,i){return (l?1:0)|(r?2:0)|(t?4:0)|(i?8:0)}T.Marker=M;});ace.define("ace/layer/text_util",["require","exports","module"],function(L,T,H){var E=new Set(["text","rparen","lparen"]);T.isTextToken=function(x){return E.has(x)};});ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(L,T,H){var E=L("../lib/oop"),x=L("../lib/dom"),M=L("../lib/lang"),s=L("./lines").Lines,l=L("../lib/event_emitter").EventEmitter,r=L("../config").nls,t=L("./text_util").isTextToken,i=function(){function n(e){this.dom=x,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element);}return n.prototype.$updateEolChar=function(){var e=this.session.doc,o=e.getNewLineCharacter()==`
228
+ `&&e.getNewLineMode()!="windows",a=o?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},n.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px";},n.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},n.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},n.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(o){this._signal("changeCharacterSize",o);}.bind(this)),this.$pollSizeChanges();},n.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges();},n.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},n.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString();},n.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},n.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},n.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},n.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var o=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_tab",u.textContent=M.stringRepeat(this.TAB_CHAR,a),o.push(u);}else o.push(this.dom.createTextNode(M.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?M.stringRepeat(this.SPACE_CHAR,this.tabSize):M.stringRepeat(" ",this.tabSize),$=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?M.stringRepeat(this.TAB_CHAR,this.tabSize):m,u=this.dom.createElement("span");u.className=y+S,u.textContent=m,this.$tabStrings[" "]=u;var u=this.dom.createElement("span");u.className=y+$,u.textContent=d,this.$tabStrings[" "]=u;}},n.prototype.updateLines=function(e,o,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var u=Math.max(o,e.firstRow),y=Math.min(a,e.lastRow),S=this.element.childNodes,m=0,d=e.firstRow;d<u;d++){var h=this.session.getFoldLine(d);if(h)if(h.containsRow(u)){u=h.start.row;break}else d=h.end.row;m++;}for(var $=!1,d=u,h=this.session.getNextFoldLine(d),w=h?h.start.row:1/0;d>w&&(d=h.end.row+1,h=this.session.getNextFoldLine(d,h),w=h?h.start.row:1/0),!(d>y);){var C=S[m++];if(C){this.dom.removeChildren(C),this.$renderLine(C,d,d==w?h:!1),$&&(C.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var v=e.lineHeight*this.session.getRowLength(d)+"px";C.style.height!=v&&($=!0,C.style.height=v);}d++;}if($)for(;m<this.$lines.cells.length;){var b=this.$lines.cells[m++];b.element.style.top=this.$lines.computeLineTop(b.row,e,this.session)+"px";}},n.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var a=e.lastRow,u=o?o.lastRow:-1;if(!o||u<e.firstRow)return this.update(e);if(a<o.firstRow)return this.update(e);if(!o||o.lastRow<e.firstRow)return this.update(e);if(e.lastRow<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var y=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);y>0;y--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var y=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);y>0;y--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,o.firstRow-1)),e.lastRow>o.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide();},n.prototype.$renderLinesFragment=function(e,o,a){for(var u=[],y=o,S=this.session.getNextFoldLine(y),m=S?S.start.row:1/0;y>m&&(y=S.end.row+1,S=this.session.getNextFoldLine(y,S),m=S?S.start.row:1/0),!(y>a);){var $=this.$lines.createCell(y,e,this.session),d=$.element;this.dom.removeChildren(d),x.setStyle(d.style,"height",this.$lines.computeLineHeight(y,e,this.session)+"px"),x.setStyle(d.style,"top",this.$lines.computeLineTop(y,e,this.session)+"px"),this.$renderLine(d,y,y==m?S:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",u.push($),y++;}return u},n.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,a=e.lastRow,u=this.$lines;u.getLength();)u.pop();u.push(this.$renderLinesFragment(e,o,a));},n.prototype.$renderToken=function(e,o,a,u){for(var y=this,S=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,m=this.dom.createFragment(this.element),$,d=0;$=S.exec(u);){var h=$[1],w=$[2],C=$[3],v=$[4],b=$[5];if(!(!y.showSpaces&&w)){var f=d!=$.index?u.slice(d,$.index):"";if(d=$.index+$[0].length,f&&m.appendChild(this.dom.createTextNode(f,this.element)),h){var p=y.session.getScreenTabSize(o+$.index);m.appendChild(y.$tabStrings[p].cloneNode(!0)),o+=p-1;}else if(w)if(y.showSpaces){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_space",c.textContent=M.stringRepeat(y.SPACE_CHAR,w.length),m.appendChild(c);}else m.appendChild(this.dom.createTextNode(w,this.element));else if(C){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_space ace_invalid",c.textContent=M.stringRepeat(y.SPACE_CHAR,C.length),m.appendChild(c);}else if(v){o+=1;var c=this.dom.createElement("span");c.style.width=y.config.characterWidth*2+"px",c.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c.textContent=y.showSpaces?y.SPACE_CHAR:v,m.appendChild(c);}else if(b){o+=1;var c=this.dom.createElement("span");c.style.width=y.config.characterWidth*2+"px",c.className="ace_cjk",c.textContent=b,m.appendChild(c);}}}if(m.appendChild(this.dom.createTextNode(d?u.slice(d):u,this.element)),t(a.type))e.appendChild(m);else {var g="ace_"+a.type.replace(/\./g," ace_"),c=this.dom.createElement("span");a.type=="fold"&&(c.style.width=a.value.length*this.config.characterWidth+"px",c.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),c.className=g,c.appendChild(m),e.appendChild(c);}return o+u.length},n.prototype.renderIndentGuide=function(e,o,a){var u=o.search(this.$indentGuideRe);if(u<=0||u>=a)return o;if(o[0]==" "){u-=u%this.tabSize;for(var y=u/this.tabSize,S=0;S<y;S++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(u)}else if(o[0]==" "){for(var S=0;S<u;S++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(u)}return this.$highlightIndentGuide(),o},n.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var o=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(o.row))[0].length,u=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:u,start:o.row};var y=this.session.$bracketHighlight;if(y){for(var S=this.session.$bracketHighlight.ranges,m=0;m<S.length;m++)if(o.row!==S[m].start.row){this.$highlightIndentGuideMarker.end=S[m].start.row,o.row>S[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[o.row]!==""&&o.column===e[o.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=o.row+1;m<e.length;m++){var $=e[m],d=/^\s*/.exec($)[0].length;if($!==""&&(this.$highlightIndentGuideMarker.end=m,d<=a))break}}this.$renderHighlightIndentGuide();}}},n.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,o=0;o<e.length;o++){var a=e[o],u=a.element.childNodes;if(u.length>0){for(var y=0;y<u.length;y++)if(u[y].classList&&u[y].classList.contains("ace_indent-guide-active")){u[y].classList.remove("ace_indent-guide-active");break}}}},n.prototype.$setIndentGuideActive=function(e,o){var a=this.session.doc.getLine(e.row);if(a!==""){var u=e.element.childNodes;if(u){var y=u[o-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active");}}},n.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var o=this.$highlightIndentGuideMarker.indentLevel;if(o!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var u=e[a];if(this.$highlightIndentGuideMarker.end&&u.row>=this.$highlightIndentGuideMarker.start+1){if(u.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(u,o);}}else for(var a=e.length-1;a>=0;a--){var u=e[a];if(this.$highlightIndentGuideMarker.end&&u.row<this.$highlightIndentGuideMarker.start){if(u.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(u,o);}}}},n.prototype.$createLineElement=function(e){var o=this.dom.createElement("div");return o.className="ace_line",o.style.height=this.config.lineHeight+"px",o},n.prototype.$renderWrappedLine=function(e,o,a){var u=0,y=0,S=a[0],m=0,$=this.$createLineElement();e.appendChild($);for(var d=0;d<o.length;d++){var h=o[d],w=h.value;if(d==0&&this.displayIndentGuides){if(u=w.length,w=this.renderIndentGuide($,w,S),!w)continue;u-=w.length;}if(u+w.length<S)m=this.$renderToken($,m,h,w),u+=w.length;else {for(;u+w.length>=S;)m=this.$renderToken($,m,h,w.substring(0,S-u)),w=w.substring(S-u),u=S,$=this.$createLineElement(),e.appendChild($),$.appendChild(this.dom.createTextNode(M.stringRepeat("\xA0",a.indent),this.element)),y++,m=0,S=a[y]||Number.MAX_VALUE;w.length!=0&&(u+=w.length,m=this.$renderToken($,m,h,w));}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage($,m,null,"",!0);},n.prototype.$renderSimpleLine=function(e,o){for(var a=0,u=0;u<o.length;u++){var y=o[u],S=y.value;if(!(u==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(e,S),!S))){if(a+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,y,S);a=this.$renderToken(e,a,y,S);}}},n.prototype.$renderOverflowMessage=function(e,o,a,u,y){a&&this.$renderToken(e,o,a,u.slice(0,this.MAX_LINE_LENGTH-o));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=y?"<hide>":"<click to see more...>",e.appendChild(S);},n.prototype.$renderLine=function(e,o,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(o)),a)var u=this.$getFoldLineTokens(o,a);else var u=this.session.getTokens(o);var y=e;if(u.length){var S=this.session.getRowSplitData(o);if(S&&S.length){this.$renderWrappedLine(e,u,S);var y=e.lastChild;}else {var y=e;this.$useLineGroups()&&(y=this.$createLineElement(),e.appendChild(y)),this.$renderSimpleLine(y,u);}}else this.$useLineGroups()&&(y=this.$createLineElement(),e.appendChild(y));if(this.showEOL&&y){a&&(o=a.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(m);}},n.prototype.$getFoldLineTokens=function(e,o){var a=this.session,u=[];function y(m,$,d){for(var h=0,w=0;w+m[h].value.length<$;)if(w+=m[h].value.length,h++,h==m.length)return;if(w!=$){var C=m[h].value.substring($-w);C.length>d-$&&(C=C.substring(0,d-$)),u.push({type:m[h].type,value:C}),w=$+C.length,h+=1;}for(;w<d&&h<m.length;){var C=m[h].value;C.length+w>d?u.push({type:m[h].type,value:C.substring(0,d-w)}):u.push(m[h]),w+=C.length,h+=1;}}var S=a.getTokens(e);return o.walk(function(m,$,d,h,w){m!=null?u.push({type:"fold",value:m}):(w&&(S=a.getTokens($)),S.length&&y(S,h,d));},o.end.row,this.session.getLine(o.end.row).length),u},n.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},n}();i.prototype.EOF_CHAR="\xB6",i.prototype.EOL_CHAR_LF="\xAC",i.prototype.EOL_CHAR_CRLF="\xA4",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="\u2014",i.prototype.SPACE_CHAR="\xB7",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,E.implement(i.prototype,l),T.Text=i;});ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(L,T,H){var E=L("../lib/dom"),x=function(){function M(s){this.element=E.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),E.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this);}return M.prototype.$updateOpacity=function(s){for(var l=this.cursors,r=l.length;r--;)E.setStyle(l[r].style,"opacity",s?"":"0");},M.prototype.$startCssAnimation=function(){for(var s=this.cursors,l=s.length;l--;)s[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&E.addCssClass(this.element,"ace_animate-blinking");}.bind(this));},M.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,E.removeCssClass(this.element,"ace_animate-blinking");},M.prototype.setPadding=function(s){this.$padding=s;},M.prototype.setSession=function(s){this.session=s;},M.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer());},M.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer());},M.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,E.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer());},M.prototype.addCursor=function(){var s=E.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},M.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},M.prototype.hideCursor=function(){this.isVisible=!1,E.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer();},M.prototype.showCursor=function(){this.isVisible=!0,E.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer();},M.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,E.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&E.addCssClass(this.element,"ace_smooth-blinking");}.bind(this))),E.HAS_CSS_ANIMATION)this.$startCssAnimation();else {var l=function(){this.timeoutId=setTimeout(function(){s(!1);},.6*this.blinkInterval);}.bind(this);this.intervalId=setInterval(function(){s(!0),l();},this.blinkInterval),l();}},M.prototype.getPixelPosition=function(s,l){if(!this.config||!this.session)return {left:0,top:0};s||(s=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(s),t=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,s.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),i=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return {left:t,top:i}},M.prototype.isCursorInView=function(s,l){return s.top>=0&&s.top<l.maxHeight},M.prototype.update=function(s){this.config=s;var l=this.session.$selectionMarkers,r=0,t=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var r=0,i=l.length;r<i;r++){var n=this.getPixelPosition(l[r].cursor,!0);if(!((n.top>s.height+s.offset||n.top<0)&&r>1)){var e=this.cursors[t++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,n,s,l[r],this.session):this.isCursorInView(n,s)?(E.setStyle(o,"display","block"),E.translate(e,n.left,n.top),E.setStyle(o,"width",Math.round(s.characterWidth)+"px"),E.setStyle(o,"height",s.lineHeight+"px")):E.setStyle(o,"display","none");}}for(;this.cursors.length>t;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=n,this.restartTimer();},M.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?E.addCssClass(this.element,"ace_overwrite-cursors"):E.removeCssClass(this.element,"ace_overwrite-cursors"));},M.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId);},M}();x.prototype.$padding=0,x.prototype.drawCursor=null,T.Cursor=x;});ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,T,H){var E=this&&this.__extends||function(){var e=function(o,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,y){u.__proto__=y;}||function(u,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(u[S]=y[S]);},e(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(o,a);function u(){this.constructor=o;}o.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u);}}(),x=L("./lib/oop"),M=L("./lib/dom"),s=L("./lib/event"),l=L("./lib/event_emitter").EventEmitter,r=32768,t=function(){function e(o,a){this.element=M.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.inner=M.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault);}return e.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1;},e}();x.implement(t.prototype,l);var i=function(e){E(o,e);function o(a,u){var y=e.call(this,a,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,u.$scrollbarWidth=y.width=M.scrollbarWidth(a.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a);}this._emit("scroll",{data:this.scrollTop});}this.skipEvent=!1;},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(a){this.element.style.height=a+"px";},o.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>r?(this.coeff=r/a,a=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px";},o.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff);},o}(t);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=function(e){E(o,e);function o(a,u){var y=e.call(this,a,"-h")||this;return y.scrollLeft=0,y.height=u.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1;},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(a){this.element.style.width=a+"px";},o.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px";},o.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px";},o.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a);},o}(t);T.ScrollBar=i,T.ScrollBarV=i,T.ScrollBarH=n,T.VScrollBar=i,T.HScrollBar=n;});ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,T,H){var E=this&&this.__extends||function(){var n=function(e,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u;}||function(a,u){for(var y in u)Object.prototype.hasOwnProperty.call(u,y)&&(a[y]=u[y]);},n(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(e,o);function a(){this.constructor=e;}e.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a);}}(),x=L("./lib/oop"),M=L("./lib/dom"),s=L("./lib/event"),l=L("./lib/event_emitter").EventEmitter;M.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
229
+ position: absolute;
230
+ background: rgba(128, 128, 128, 0.6);
231
+ -moz-box-sizing: border-box;
232
+ box-sizing: border-box;
233
+ border: 1px solid #bbb;
234
+ border-radius: 2px;
235
+ z-index: 8;
236
+ }
237
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
238
+ position: absolute;
239
+ z-index: 6;
240
+ background: none;
241
+ overflow: hidden!important;
242
+ }
243
+ .ace_editor>.ace_sb-v {
244
+ z-index: 6;
245
+ right: 0;
246
+ top: 0;
247
+ width: 12px;
248
+ }
249
+ .ace_editor>.ace_sb-v div {
250
+ z-index: 8;
251
+ right: 0;
252
+ width: 100%;
176
253
  }
254
+ .ace_editor>.ace_sb-h {
255
+ bottom: 0;
256
+ left: 0;
257
+ height: 12px;
258
+ }
259
+ .ace_editor>.ace_sb-h div {
260
+ bottom: 0;
261
+ height: 100%;
262
+ }
263
+ .ace_editor>.ace_sb_grabbed {
264
+ z-index: 8;
265
+ background: #000;
266
+ }`,"ace_scrollbar.css",!1);var r=function(){function n(e,o){this.element=M.createElement("div"),this.element.className="ace_sb"+o,this.inner=M.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown");}return n.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1;},n}();x.implement(r.prototype,l);var t=function(n){E(e,n);function e(o,a){var u=n.call(this,o,"-v")||this;return u.scrollTop=0,u.scrollHeight=0,u.parent=o,u.width=u.VScrollWidth,u.renderer=a,u.inner.style.width=u.element.style.width=(u.width||15)+"px",u.$minWidth=0,u}return e.prototype.onMouseDown=function(o,a){if(o==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var u=this,y=a.clientY,S=function(v){y=v.clientY;},m=function(){clearInterval(w);},$=a.clientY,d=this.thumbTop,h=function(){if(y!==void 0){var v=u.scrollTopFromThumbTop(d+y-$);v!==u.scrollTop&&u._emit("scroll",{data:v});}};s.capture(this.inner,S,m);var w=setInterval(h,20);return s.preventDefault(a)}var C=a.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(o){var a=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0);},e.prototype.setScrollHeight=function(o,a){this.pageHeight===o&&!a||(this.pageHeight=o,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})));},e.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px";},e}(r);t.prototype.setInnerHeight=t.prototype.setScrollHeight;var i=function(n){E(e,n);function e(o,a){var u=n.call(this,o,"-h")||this;return u.scrollLeft=0,u.scrollWidth=0,u.height=u.HScrollHeight,u.inner.style.height=u.element.style.height=(u.height||12)+"px",u.renderer=a,u}return e.prototype.onMouseDown=function(o,a){if(o==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var u=this,y=a.clientX,S=function(v){y=v.clientX;},m=function(){clearInterval(w);},$=a.clientX,d=this.thumbLeft,h=function(){if(y!==void 0){var v=u.scrollLeftFromThumbLeft(d+y-$);v!==u.scrollLeft&&u._emit("scroll",{data:v});}};s.capture(this.inner,S,m);var w=setInterval(h,20);return s.preventDefault(a)}var C=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(o){var a=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0);},e.prototype.setScrollWidth=function(o,a){this.pageWidth===o&&!a||(this.pageWidth=o,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})));},e.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px";},e}(r);i.prototype.setInnerWidth=i.prototype.setScrollWidth,T.ScrollBar=t,T.ScrollBarV=t,T.ScrollBarH=i,T.VScrollBar=t,T.HScrollBar=i;});ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(L,T,H){var E=L("./lib/event"),x=function(){function M(s,l){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(t){r.pending=!1;var i=r.changes;if(i&&(E.blockIdle(100),r.changes=0,r.onRender(i)),r.changes){if(r.$recursionLimit--<0)return;r.schedule();}else r.$recursionLimit=2;};}return M.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(E.nextFrame(this._flush),this.pending=!0);},M.prototype.clear=function(s){var l=this.changes;return this.changes=0,l},M}();T.RenderLoop=x;});ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(L,T,H){var E=L("../lib/oop"),x=L("../lib/dom"),M=L("../lib/lang"),s=L("../lib/event"),l=L("../lib/useragent"),r=L("../lib/event_emitter").EventEmitter,t=512,i=typeof ResizeObserver=="function",n=200,e=function(){function o(a){this.el=x.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=x.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=x.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=M.stringRepeat("X",t),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges();}return o.prototype.$setMeasureNodeStyles=function(a,u){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",l.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=u?"hidden":"visible";},o.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var u=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=u&&u.width===a.width&&u.height===a.height,this._emit("changeCharacterSize",{data:a});}},o.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(u){a.checkForSizeChanges();}),this.$observer.observe(this.$measureNode);},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=s.onIdle(function u(){a.checkForSizeChanges(),s.onIdle(u,500);},500)},o.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0);},o.prototype.$measureSizes=function(a){var u={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/t};return u.width===0||u.height===0?null:u},o.prototype.$measureCharWidth=function(a){this.$main.textContent=M.stringRepeat(a,t);var u=this.$main.getBoundingClientRect();return u.width/t},o.prototype.getCharacterWidth=function(a){var u=this.charSizes[a];return u===void 0&&(u=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),u},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);},o.prototype.$getZoom=function(a){return !a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var a=function(u,y){return ["div",{style:"position: absolute;top:"+u+"px;left:"+y+"px;"}]};this.els=x.buildDom([a(0,0),a(n,0),a(0,n),a(n,n)],this.el);},o.prototype.transformCoordinates=function(a,u){if(a){var y=this.$getZoom(this.el);a=d(1/y,a);}function S(D,I,F){var N=D[1]*I[0]-D[0]*I[1];return [(-I[1]*F[0]+I[0]*F[1])/N,(+D[1]*F[0]-D[0]*F[1])/N]}function m(D,I){return [D[0]-I[0],D[1]-I[1]]}function $(D,I){return [D[0]+I[0],D[1]+I[1]]}function d(D,I){return [D*I[0],D*I[1]]}this.els||this.$initTransformMeasureNodes();function h(D){var I=D.getBoundingClientRect();return [I.left,I.top]}var w=h(this.els[0]),C=h(this.els[1]),v=h(this.els[2]),b=h(this.els[3]),f=S(m(b,C),m(b,v),m($(C,v),$(b,w))),p=d(1+f[0],m(C,w)),c=d(1+f[1],m(v,w));if(u){var g=u,A=f[0]*g[0]/n+f[1]*g[1]/n+1,k=$(d(g[0],p),d(g[1],c));return $(d(1/A/n,k),w)}var R=m(a,w),_=S(m(p,d(f[0],R)),m(c,d(f[1],R)),R);return d(n,_)},o}();e.prototype.$characterSize={width:0,height:0},E.implement(e.prototype,r),T.FontMetrics=e;});ace.define("ace/css/editor-css",["require","exports","module"],function(L,T,H){H.exports=`
267
+ .ace_br1 {border-top-left-radius : 3px;}
268
+ .ace_br2 {border-top-right-radius : 3px;}
269
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
270
+ .ace_br4 {border-bottom-right-radius: 3px;}
271
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
272
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
273
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
274
+ .ace_br8 {border-bottom-left-radius : 3px;}
275
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
276
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
277
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
278
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
279
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
280
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
281
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
177
282
 
178
- .ace-chrome .ace_entity.ace_other.ace_attribute-name {
179
- color: #994409;
283
+
284
+ .ace_editor {
285
+ position: relative;
286
+ overflow: hidden;
287
+ padding: 0;
288
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
289
+ direction: ltr;
290
+ text-align: left;
291
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
292
+ forced-color-adjust: none;
180
293
  }
181
294
 
182
- .ace-chrome .ace_indent-guide {
183
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
295
+ .ace_scroller {
296
+ position: absolute;
297
+ overflow: hidden;
298
+ top: 0;
299
+ bottom: 0;
300
+ background-color: inherit;
301
+ -ms-user-select: none;
302
+ -moz-user-select: none;
303
+ -webkit-user-select: none;
304
+ user-select: none;
305
+ cursor: text;
184
306
  }
185
-
186
- .ace-chrome .ace_indent-guide-active {
187
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
307
+
308
+ .ace_content {
309
+ position: absolute;
310
+ box-sizing: border-box;
311
+ min-width: 100%;
312
+ contain: style size layout;
313
+ font-variant-ligatures: no-common-ligatures;
314
+ }
315
+
316
+ .ace_keyboard-focus:focus {
317
+ box-shadow: inset 0 0 0 2px #5E9ED6;
318
+ outline: none;
319
+ }
320
+
321
+ .ace_dragging .ace_scroller:before{
322
+ position: absolute;
323
+ top: 0;
324
+ left: 0;
325
+ right: 0;
326
+ bottom: 0;
327
+ content: '';
328
+ background: rgba(250, 250, 250, 0.01);
329
+ z-index: 1000;
330
+ }
331
+ .ace_dragging.ace_dark .ace_scroller:before{
332
+ background: rgba(0, 0, 0, 0.01);
333
+ }
334
+
335
+ .ace_gutter {
336
+ position: absolute;
337
+ overflow : hidden;
338
+ width: auto;
339
+ top: 0;
340
+ bottom: 0;
341
+ left: 0;
342
+ cursor: default;
343
+ z-index: 4;
344
+ -ms-user-select: none;
345
+ -moz-user-select: none;
346
+ -webkit-user-select: none;
347
+ user-select: none;
348
+ contain: style size layout;
349
+ }
350
+
351
+ .ace_gutter-active-line {
352
+ position: absolute;
353
+ left: 0;
354
+ right: 0;
355
+ }
356
+
357
+ .ace_scroller.ace_scroll-left:after {
358
+ content: "";
359
+ position: absolute;
360
+ top: 0;
361
+ right: 0;
362
+ bottom: 0;
363
+ left: 0;
364
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
365
+ pointer-events: none;
366
+ }
367
+
368
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
369
+ position: absolute;
370
+ top: 0;
371
+ left: 0;
372
+ right: 0;
373
+ padding-left: 19px;
374
+ padding-right: 6px;
375
+ background-repeat: no-repeat;
376
+ }
377
+
378
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
379
+ margin-left: -14px;
380
+ float: left;
381
+ }
382
+
383
+ .ace_gutter-cell .ace_gutter_annotation {
384
+ margin-left: -19px;
385
+ float: left;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
402
+ background-repeat: no-repeat;
403
+ background-position: 2px center;
404
+ }
405
+
406
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
407
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
408
+ }
409
+
410
+ .ace_icon_svg.ace_error {
411
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
412
+ background-color: crimson;
413
+ }
414
+ .ace_icon_svg.ace_security {
415
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
416
+ background-color: crimson;
417
+ }
418
+ .ace_icon_svg.ace_warning {
419
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
420
+ background-color: darkorange;
421
+ }
422
+ .ace_icon_svg.ace_info {
423
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
424
+ background-color: royalblue;
425
+ }
426
+ .ace_icon_svg.ace_hint {
427
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
428
+ background-color: silver;
429
+ }
430
+
431
+ .ace_icon_svg.ace_error_fold {
432
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
433
+ background-color: crimson;
434
+ }
435
+ .ace_icon_svg.ace_security_fold {
436
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
437
+ background-color: crimson;
438
+ }
439
+ .ace_icon_svg.ace_warning_fold {
440
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
441
+ background-color: darkorange;
442
+ }
443
+
444
+ .ace_scrollbar {
445
+ contain: strict;
446
+ position: absolute;
447
+ right: 0;
448
+ bottom: 0;
449
+ z-index: 6;
450
+ }
451
+
452
+ .ace_scrollbar-inner {
453
+ position: absolute;
454
+ cursor: text;
455
+ left: 0;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-v{
460
+ overflow-x: hidden;
461
+ overflow-y: scroll;
462
+ top: 0;
463
+ }
464
+
465
+ .ace_scrollbar-h {
466
+ overflow-x: scroll;
467
+ overflow-y: hidden;
468
+ left: 0;
469
+ }
470
+
471
+ .ace_print-margin {
472
+ position: absolute;
473
+ height: 100%;
474
+ }
475
+
476
+ .ace_text-input {
477
+ position: absolute;
478
+ z-index: 0;
479
+ width: 0.5em;
480
+ height: 1em;
481
+ opacity: 0;
482
+ background: transparent;
483
+ -moz-appearance: none;
484
+ appearance: none;
485
+ border: none;
486
+ resize: none;
487
+ outline: none;
488
+ overflow: hidden;
489
+ font: inherit;
490
+ padding: 0 1px;
491
+ margin: 0 -1px;
492
+ contain: strict;
493
+ -ms-user-select: text;
494
+ -moz-user-select: text;
495
+ -webkit-user-select: text;
496
+ user-select: text;
497
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
498
+ white-space: pre!important;
499
+ }
500
+ .ace_text-input.ace_composition {
501
+ background: transparent;
502
+ color: inherit;
503
+ z-index: 1000;
504
+ opacity: 1;
505
+ }
506
+ .ace_composition_placeholder { color: transparent }
507
+ .ace_composition_marker {
508
+ border-bottom: 1px solid;
509
+ position: absolute;
510
+ border-radius: 0;
511
+ margin-top: 1px;
512
+ }
513
+
514
+ [ace_nocontext=true] {
515
+ transform: none!important;
516
+ filter: none!important;
517
+ clip-path: none!important;
518
+ mask : none!important;
519
+ contain: none!important;
520
+ perspective: none!important;
521
+ mix-blend-mode: initial!important;
522
+ z-index: auto;
523
+ }
524
+
525
+ .ace_layer {
526
+ z-index: 1;
527
+ position: absolute;
528
+ overflow: hidden;
529
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
530
+ word-wrap: normal;
531
+ white-space: pre;
532
+ height: 100%;
533
+ width: 100%;
534
+ box-sizing: border-box;
535
+ /* setting pointer-events: auto; on node under the mouse, which changes
536
+ during scroll, will break mouse wheel scrolling in Safari */
537
+ pointer-events: none;
538
+ }
539
+
540
+ .ace_gutter-layer {
541
+ position: relative;
542
+ width: auto;
543
+ text-align: right;
544
+ pointer-events: auto;
545
+ height: 1000000px;
546
+ contain: style size layout;
547
+ }
548
+
549
+ .ace_text-layer {
550
+ font: inherit !important;
551
+ position: absolute;
552
+ height: 1000000px;
553
+ width: 1000000px;
554
+ contain: style size layout;
555
+ }
556
+
557
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
558
+ contain: style size layout;
559
+ position: absolute;
560
+ top: 0;
561
+ left: 0;
562
+ right: 0;
563
+ }
564
+
565
+ .ace_hidpi .ace_text-layer,
566
+ .ace_hidpi .ace_gutter-layer,
567
+ .ace_hidpi .ace_content,
568
+ .ace_hidpi .ace_gutter {
569
+ contain: strict;
570
+ }
571
+ .ace_hidpi .ace_text-layer > .ace_line,
572
+ .ace_hidpi .ace_text-layer > .ace_line_group {
573
+ contain: strict;
574
+ }
575
+
576
+ .ace_cjk {
577
+ display: inline-block;
578
+ text-align: center;
579
+ }
580
+
581
+ .ace_cursor-layer {
582
+ z-index: 4;
583
+ }
584
+
585
+ .ace_cursor {
586
+ z-index: 4;
587
+ position: absolute;
588
+ box-sizing: border-box;
589
+ border-left: 2px solid;
590
+ /* workaround for smooth cursor repaintng whole screen in chrome */
591
+ transform: translatez(0);
592
+ }
593
+
594
+ .ace_multiselect .ace_cursor {
595
+ border-left-width: 1px;
596
+ }
597
+
598
+ .ace_slim-cursors .ace_cursor {
599
+ border-left-width: 1px;
600
+ }
601
+
602
+ .ace_overwrite-cursors .ace_cursor {
603
+ border-left-width: 0;
604
+ border-bottom: 1px solid;
605
+ }
606
+
607
+ .ace_hidden-cursors .ace_cursor {
608
+ opacity: 0.2;
609
+ }
610
+
611
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
612
+ opacity: 0;
613
+ }
614
+
615
+ .ace_smooth-blinking .ace_cursor {
616
+ transition: opacity 0.18s;
617
+ }
618
+
619
+ .ace_animate-blinking .ace_cursor {
620
+ animation-duration: 1000ms;
621
+ animation-timing-function: step-end;
622
+ animation-name: blink-ace-animate;
623
+ animation-iteration-count: infinite;
188
624
  }
189
- `;});ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(a,T,L){T.isDark=!1,T.cssClass="ace-chrome",T.cssText=a("./chrome-css");var R=a("../lib/dom");R.importCssString(T.cssText,T.cssClass,!1);});(function(){ace.require(["ace/theme/chrome"],function(a){typeof ie=="object"&&typeof Ne=="object"&&ie&&(ie.exports=a);});})();});var Oe=a((Pe,ae)=>{ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(a,T,L){var R=a("./lib/dom"),w=a("./lib/oop"),S=a("./lib/event_emitter").EventEmitter,d=a("./lib/lang"),u=a("./range").Range,v=a("./range_list").RangeList,p=a("./keyboard/hash_handler").HashHandler,b=a("./tokenizer").Tokenizer,f=a("./clipboard"),y={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,n,t){var o=e.session.getTextRange();return t?o.replace(/\n\r?([ \t]*\S)/g,`
190
- `+t+"$1"):o},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return f.getText&&f.getText()},FILENAME:function(e){return /[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return /[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return "/not implemented.txt"},WORKSPACE_NAME:function(){return "Unknown"},FULLNAME:function(){return "Unknown"},BLOCK_COMMENT_START:function(e){var n=e.session.$mode||{};return n.blockComment&&n.blockComment.start||""},BLOCK_COMMENT_END:function(e){var n=e.session.$mode||{};return n.blockComment&&n.blockComment.end||""},LINE_COMMENT:function(e){var n=e.session.$mode||{};return n.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};y.SELECTED_TEXT=y.SELECTION;function m(e){var n=new Date().toLocaleString("en-us",e);return n.length==1?"0"+n:n}var k=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=y;}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function n(r){return r=r.substr(1),/^\d+$/.test(r)?[{tabstopId:parseInt(r,10)}]:[{text:r}]}function t(r){return "(?:[^\\\\"+r+"]|\\\\.)"}var o={regex:"/("+t("/")+"+)/",onMatch:function(r,h,g){var l=g[0];return l.fmtString=!0,l.guard=r.slice(1,-1),l.flag="",""},next:"formatString"};return e.$tokenizer=new b({start:[{regex:/\\./,onMatch:function(r,h,g){var l=r[1];return (l=="}"&&g.length||"`$\\".indexOf(l)!=-1)&&(r=l),[r]}},{regex:/}/,onMatch:function(r,h,g){return [g.length?g.shift():r]}},{regex:/\$(?:\d+|\w+)/,onMatch:n},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(r,h,g){var l=n(r.substr(1));return g.unshift(l[0]),l},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(r,h,g){var l=r.slice(1,-1).replace(/\\[,|\\]|,/g,function(x){return x.length==2?x[1]:"\0"}).split("\0").map(function(x){return {value:x}});return g[0].choices=l,[l[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(r,h,g){return g.length&&g[0].expectElse?(g[0].expectElse=!1,g[0].ifEnd={elseEnd:g[0]},[g[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(r,h,g){var l=r[1];return l=="}"&&g.length||"`$\\".indexOf(l)!=-1?r=l:l=="n"?r=`
191
- `:l=="t"?r=" ":"ulULE".indexOf(l)!=-1&&(r={changeCase:l,local:l>"a"}),[r]}},{regex:"/\\w*}",onMatch:function(r,h,g){var l=g.shift();return l&&(l.flag=r.slice(1,-1)),this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(r,h,g){return [{text:r.slice(1)}]}},{regex:/\${\w+/,onMatch:function(r,h,g){var l={text:r.slice(2)};return g.unshift(l),[l]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(r,h,g){var l=g.shift();return this.next=l&&l.tabstopId?"start":"",[l||r]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(r,h,g){var l=g[0];return l.formatFunction=r.slice(2,-1),[g.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(r,h,g){r[1]=="+"&&(g[0].ifEnd=g[0]),r[1]=="?"&&(g[0].expectElse=!0);},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(n,t){return this.getTokenizer().getLineTokens(n,t).tokens.map(function(o){return o.value||o})},e.prototype.getVariableValue=function(n,t,o){if(/^\d+$/.test(t))return (this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return (this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return "";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](n,t,o)),r??""},e.prototype.tmStrFormat=function(n,t,o){if(!t.fmt)return n;var r=t.flag||"",h=t.guard;h=new RegExp(h,r.replace(/[^gim]/g,""));var g=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,l=this,x=n.replace(h,function(){var s=l.variables.__;l.variables.__=[].slice.call(arguments);for(var _=l.resolveVariables(g,o),M="E",E=0;E<_.length;E++){var $=_[E];if(typeof $=="object")if(_[E]="",$.changeCase&&$.local){var N=_[E+1];N&&typeof N=="string"&&($.changeCase=="u"?_[E]=N[0].toUpperCase():_[E]=N[0].toLowerCase(),_[E+1]=N.substr(1));}else $.changeCase&&(M=$.changeCase);else M=="U"?_[E]=$.toUpperCase():M=="L"&&(_[E]=$.toLowerCase());}return l.variables.__=s,_.join("")});return x},e.prototype.tmFormatFunction=function(n,t,o){return t.formatFunction=="upcase"?n.toUpperCase():t.formatFunction=="downcase"?n.toLowerCase():n},e.prototype.resolveVariables=function(n,t){for(var o=[],r="",h=!0,g=0;g<n.length;g++){var l=n[g];if(typeof l=="string"){o.push(l),l==`
192
- `?(h=!0,r=""):h&&(r=/^\t*/.exec(l)[0],h=/\S/.test(l));continue}if(l){if(h=!1,l.fmtString){var x=n.indexOf(l,g+1);x==-1&&(x=n.length),l.fmt=n.slice(g+1,x),g=x;}if(l.text){var s=this.getVariableValue(t,l.text,r)+"";l.fmtString&&(s=this.tmStrFormat(s,l,t)),l.formatFunction&&(s=this.tmFormatFunction(s,l,t)),s&&!l.ifEnd?(o.push(s),_(l)):!s&&l.ifEnd&&_(l.ifEnd);}else l.elseEnd?_(l.elseEnd):(l.tabstopId!=null||l.changeCase!=null)&&o.push(l);}}function _(M){var E=n.indexOf(M,g+1);E!=-1&&(g=E);}return o},e.prototype.getDisplayTextForSnippet=function(n,t){var o=C.call(this,n,t);return o.text},e.prototype.insertSnippetForSelection=function(n,t,o){o===void 0&&(o={});var r=C.call(this,n,t,o),h=n.getSelectionRange(),g=n.session.replace(h,r.text),l=new A(n),x=n.inVirtualSelectionMode&&n.selection.index;l.addTabstops(r.tabstops,h.start,g,x);},e.prototype.insertSnippet=function(n,t,o){o===void 0&&(o={});var r=this;if(n.inVirtualSelectionMode)return r.insertSnippetForSelection(n,t,o);n.forEachSelection(function(){r.insertSnippetForSelection(n,t,o);},null,{keepOrder:!0}),n.tabstopManager&&n.tabstopManager.tabNext();},e.prototype.$getScope=function(n){var t=n.session.$mode.$id||"";if(t=t.split("/").pop(),t==="html"||t==="php"){t==="php"&&!n.session.$mode.inlinePhp&&(t="html");var o=n.getCursorPosition(),r=n.session.getState(o.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"));}return t},e.prototype.getActiveScopes=function(n){var t=this.$getScope(n),o=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&o.push.apply(o,r[t].includeScopes),o.push("_"),o},e.prototype.expandWithTab=function(n,t){var o=this,r=n.forEachSelection(function(){return o.expandSnippetForSelection(n,t)},null,{keepOrder:!0});return r&&n.tabstopManager&&n.tabstopManager.tabNext(),r},e.prototype.expandSnippetForSelection=function(n,t){var o=n.getCursorPosition(),r=n.session.getLine(o.row),h=r.substring(0,o.column),g=r.substr(o.column),l=this.snippetMap,x;return this.getActiveScopes(n).some(function(s){var _=l[s];return _&&(x=this.findMatchingSnippet(_,h,g)),!!x},this),x?(t&&t.dryRun||(n.session.doc.removeInLine(o.row,o.column-x.replaceBefore.length,o.column+x.replaceAfter.length),this.variables.M__=x.matchBefore,this.variables.T__=x.matchAfter,this.insertSnippetForSelection(n,x.content),this.variables.M__=this.variables.T__=null),!0):!1},e.prototype.findMatchingSnippet=function(n,t,o){for(var r=n.length;r--;){var h=n[r];if(!(h.startRe&&!h.startRe.test(t))&&!(h.endRe&&!h.endRe.test(o))&&!(!h.startRe&&!h.endRe))return h.matchBefore=h.startRe?h.startRe.exec(t):[""],h.matchAfter=h.endRe?h.endRe.exec(o):[""],h.replaceBefore=h.triggerRe?h.triggerRe.exec(t)[0]:"",h.replaceAfter=h.endTriggerRe?h.endTriggerRe.exec(o)[0]:"",h}},e.prototype.register=function(n,t){var o=this.snippetMap,r=this.snippetNameMap,h=this;n||(n=[]);function g(s){return s&&!/^\^?\(.*\)\$?$|^\\b$/.test(s)&&(s="(?:"+s+")"),s||""}function l(s,_,M){return s=g(s),_=g(_),M?(s=_+s,s&&s[s.length-1]!="$"&&(s=s+"$")):(s=s+_,s&&s[0]!="^"&&(s="^"+s)),new RegExp(s)}function x(s){s.scope||(s.scope=t||"_"),t=s.scope,o[t]||(o[t]=[],r[t]={});var _=r[t];if(s.name){var M=_[s.name];M&&h.unregister(M),_[s.name]=s;}o[t].push(s),s.prefix&&(s.tabTrigger=s.prefix),!s.content&&s.body&&(s.content=Array.isArray(s.body)?s.body.join(`
193
- `):s.body),s.tabTrigger&&!s.trigger&&(!s.guard&&/^\w/.test(s.tabTrigger)&&(s.guard="\\b"),s.trigger=d.escapeRegExp(s.tabTrigger)),!(!s.trigger&&!s.guard&&!s.endTrigger&&!s.endGuard)&&(s.startRe=l(s.trigger,s.guard,!0),s.triggerRe=new RegExp(s.trigger),s.endRe=l(s.endTrigger,s.endGuard,!0),s.endTriggerRe=new RegExp(s.endTrigger));}Array.isArray(n)?n.forEach(x):Object.keys(n).forEach(function(s){x(n[s]);}),this._signal("registerSnippets",{scope:t});},e.prototype.unregister=function(n,t){var o=this.snippetMap,r=this.snippetNameMap;function h(g){var l=r[g.scope||t];if(l&&l[g.name]){delete l[g.name];var x=o[g.scope||t],s=x&&x.indexOf(g);s>=0&&x.splice(s,1);}}n.content?h(n):Array.isArray(n)&&n.forEach(h);},e.prototype.parseSnippetFile=function(n){n=n.replace(/\r/g,"");for(var t=[],o={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,h;h=r.exec(n);){if(h[1])try{o=JSON.parse(h[1]),t.push(o);}catch{}if(h[4])o.content=h[4].replace(/^\t/gm,""),t.push(o),o={};else {var g=h[2],l=h[3];if(g=="regex"){var x=/\/((?:[^\/\\]|\\.)*)|$/g;o.guard=x.exec(l)[1],o.trigger=x.exec(l)[1],o.endTrigger=x.exec(l)[1],o.endGuard=x.exec(l)[1];}else g=="snippet"?(o.tabTrigger=l.match(/^\S*/)[0],o.name||(o.name=l)):g&&(o[g]=l);}}return t},e.prototype.getSnippetByName=function(n,t){var o=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(h){var g=o[h];return g&&(r=g[n]),!!r},this),r},e}();w.implement(k.prototype,S);var C=function(e,n,t){t===void 0&&(t={});var o=e.getCursorPosition(),r=e.session.getLine(o.row),h=e.session.getTabString(),g=r.match(/^\s*/)[0];o.column<g.length&&(g=g.slice(0,o.column)),n=n.replace(/\r/g,"");var l=this.tokenizeTmSnippet(n);l=this.resolveVariables(l,e),l=l.map(function(F){return F==`
194
- `&&!t.excludeExtraIndent?F+g:typeof F=="string"?F.replace(/\t/g,h):F});var x=[];l.forEach(function(F,D){if(typeof F=="object"){var V=F.tabstopId,B=x[V];if(B||(B=x[V]=[],B.index=V,B.value="",B.parents={}),B.indexOf(F)===-1){F.choices&&!B.choices&&(B.choices=F.choices),B.push(F);var ee=l.indexOf(F,D+1);if(ee!==-1){var te=l.slice(D+1,ee),rt=te.some(function(it){return typeof it=="object"});rt&&!B.value?B.value=te:te.length&&(!B.value||typeof B.value!="string")&&(B.value=te.join(""));}}}}),x.forEach(function(F){F.length=0;});var s={};function _(F){for(var D=[],V=0;V<F.length;V++){var B=F[V];if(typeof B=="object"){if(s[B.tabstopId])continue;var ee=F.lastIndexOf(B,V-1);B=D[ee]||{tabstopId:B.tabstopId};}D[V]=B;}return D}for(var M=0;M<l.length;M++){var E=l[M];if(typeof E=="object"){var $=E.tabstopId,N=x[$],P=l.indexOf(E,M+1);if(s[$]){s[$]===E&&(delete s[$],Object.keys(s).forEach(function(F){N.parents[F]=!0;}));continue}s[$]=E;var H=N.value;typeof H!="string"?H=_(H):E.fmt&&(H=this.tmStrFormat(H,E,e)),l.splice.apply(l,[M+1,Math.max(0,P-M)].concat(H,E)),N.indexOf(E)===-1&&N.push(E);}}var O=0,z=0,j="";return l.forEach(function(F){if(typeof F=="string"){var D=F.split(`
195
- `);D.length>1?(z=D[D.length-1].length,O+=D.length-1):z+=F.length,j+=F;}else F&&(F.start?F.end={row:O,column:z}:F.start={row:O,column:z});}),{text:j,tabstops:x,tokens:l}},A=function(){function e(n){if(this.index=0,this.ranges=[],this.tabstops=[],n.tabstopManager)return n.tabstopManager;n.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(n);}return e.prototype.attach=function(n){this.$openTabstops=null,this.selectedTabstop=null,this.editor=n,this.session=n.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null;},e.prototype.onChange=function(n){for(var t=n.action[0]=="r",o=this.selectedTabstop||{},r=o.parents||{},h=this.tabstops.slice(),g=0;g<h.length;g++){var l=h[g],x=l==o||r[l.index];if(l.rangeList.$bias=x?0:1,n.action=="remove"&&l!==o){var s=l.parents&&l.parents[o.index],_=l.rangeList.pointIndex(n.start,s);_=_<0?-_-1:_+1;var M=l.rangeList.pointIndex(n.end,s);M=M<0?-M-1:M-1;for(var E=l.rangeList.ranges.slice(_,M),$=0;$<E.length;$++)this.removeRange(E[$]);}l.rangeList.$onChange(n);}var N=this.session;!this.$inChange&&t&&N.getLength()==1&&!N.getValue()&&this.detach();},e.prototype.updateLinkedFields=function(){var n=this.selectedTabstop;if(!(!n||!n.hasLinkedRanges||!n.firstNonLinked)){this.$inChange=!0;for(var t=this.session,o=t.getTextRange(n.firstNonLinked),r=0;r<n.length;r++){var h=n[r];if(h.linked){var g=h.original,l=T.snippetManager.tmStrFormat(o,g,this.editor);t.replace(h,l);}}this.$inChange=!1;}},e.prototype.onAfterExec=function(n){n.command&&!n.command.readOnly&&this.updateLinkedFields();},e.prototype.onChangeSelection=function(){if(this.editor){for(var n=this.editor.selection.lead,t=this.editor.selection.anchor,o=this.editor.selection.isEmpty(),r=0;r<this.ranges.length;r++)if(!this.ranges[r].linked){var h=this.ranges[r].contains(n.row,n.column),g=o||this.ranges[r].contains(t.row,t.column);if(h&&g)return}this.detach();}},e.prototype.onChangeSession=function(){this.detach();},e.prototype.tabNext=function(n){var t=this.tabstops.length,o=this.index+(n||1);o=Math.min(Math.max(o,1),t),o==t&&(o=0),this.selectTabstop(o),this.updateTabstopMarkers(),o===0&&this.detach();},e.prototype.selectTabstop=function(n){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=n,t=this.tabstops[this.index],!(!t||!t.length)){this.selectedTabstop=t;var o=t.firstNonLinked||t;if(t.choices&&(o.cursor=o.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(o);else {var r=this.editor.multiSelect;r.toSingleRange(o);for(var h=0;h<t.length;h++)t.hasLinkedRanges&&t[h].linked||r.addRange(t[h].clone(),!0);}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices});}},e.prototype.addTabstops=function(n,t,o){var r=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!n[0]){var h=u.fromPoints(o,o);c(h.start,t),c(h.end,t),n[0]=[h],n[0].index=0;}var g=this.index,l=[g+1,0],x=this.ranges,s=this.snippetId=(this.snippetId||0)+1;n.forEach(function(_,M){var E=this.$openTabstops[M]||_;E.snippetId=s;for(var $=0;$<_.length;$++){var N=_[$],P=u.fromPoints(N.start,N.end||N.start);I(P.start,t),I(P.end,t),P.original=N,P.tabstop=E,x.push(P),E!=_?E.unshift(P):E[$]=P,N.fmtString||E.firstNonLinked&&r?(P.linked=!0,E.hasLinkedRanges=!0):E.firstNonLinked||(E.firstNonLinked=P);}E.firstNonLinked||(E.hasLinkedRanges=!1),E===_&&(l.push(E),this.$openTabstops[M]=E),this.addTabstopMarkers(E),E.rangeList=E.rangeList||new v,E.rangeList.$bias=0,E.rangeList.addList(E);},this),l.length>2&&(this.tabstops.length&&l.push(l.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,l));},e.prototype.addTabstopMarkers=function(n){var t=this.session;n.forEach(function(o){o.markerId||(o.markerId=t.addMarker(o,"ace_snippet-marker","text"));});},e.prototype.removeTabstopMarkers=function(n){var t=this.session;n.forEach(function(o){t.removeMarker(o.markerId),o.markerId=null;});},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var n=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&n--,this.tabstops.forEach(function(t){t.snippetId===n?this.addTabstopMarkers(t):this.removeTabstopMarkers(t);},this);}},e.prototype.removeRange=function(n){var t=n.tabstop.indexOf(n);t!=-1&&n.tabstop.splice(t,1),t=this.ranges.indexOf(n),t!=-1&&this.ranges.splice(t,1),t=n.tabstop.rangeList.ranges.indexOf(n),t!=-1&&n.tabstop.splice(t,1),this.session.removeMarker(n.markerId),n.tabstop.length||(t=this.tabstops.indexOf(n.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach());},e}();A.prototype.keyboardHandler=new p,A.prototype.keyboardHandler.bindKeys({Tab:function(e){T.snippetManager&&T.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView());},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView();},Esc:function(e){e.tabstopManager.detach();}});var I=function(e,n){e.row==0&&(e.column+=n.column),e.row+=n.row;},c=function(e,n){e.row==n.row&&(e.column-=n.column),e.row-=n.row;};R.importCssString(`
625
+
626
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
627
+ animation-duration: 1000ms;
628
+ animation-timing-function: ease-in-out;
629
+ animation-name: blink-ace-animate-smooth;
630
+ }
631
+
632
+ @keyframes blink-ace-animate {
633
+ from, to { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ }
636
+
637
+ @keyframes blink-ace-animate-smooth {
638
+ from, to { opacity: 1; }
639
+ 45% { opacity: 1; }
640
+ 60% { opacity: 0; }
641
+ 85% { opacity: 0; }
642
+ }
643
+
644
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
645
+ position: absolute;
646
+ z-index: 3;
647
+ }
648
+
649
+ .ace_marker-layer .ace_selection {
650
+ position: absolute;
651
+ z-index: 5;
652
+ }
653
+
654
+ .ace_marker-layer .ace_bracket {
655
+ position: absolute;
656
+ z-index: 6;
657
+ }
658
+
659
+ .ace_marker-layer .ace_error_bracket {
660
+ position: absolute;
661
+ border-bottom: 1px solid #DE5555;
662
+ border-radius: 0;
663
+ }
664
+
665
+ .ace_marker-layer .ace_active-line {
666
+ position: absolute;
667
+ z-index: 2;
668
+ }
669
+
670
+ .ace_marker-layer .ace_selected-word {
671
+ position: absolute;
672
+ z-index: 4;
673
+ box-sizing: border-box;
674
+ }
675
+
676
+ .ace_line .ace_fold {
677
+ box-sizing: border-box;
678
+
679
+ display: inline-block;
680
+ height: 11px;
681
+ margin-top: -2px;
682
+ vertical-align: middle;
683
+
684
+ background-image:
685
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
686
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
687
+ background-repeat: no-repeat, repeat-x;
688
+ background-position: center center, top left;
689
+ color: transparent;
690
+
691
+ border: 1px solid black;
692
+ border-radius: 2px;
693
+
694
+ cursor: pointer;
695
+ pointer-events: auto;
696
+ }
697
+
698
+ .ace_dark .ace_fold {
699
+ }
700
+
701
+ .ace_fold:hover{
702
+ background-image:
703
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
704
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
705
+ }
706
+
707
+ .ace_tooltip {
708
+ background-color: #f5f5f5;
709
+ border: 1px solid gray;
710
+ border-radius: 1px;
711
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
712
+ color: black;
713
+ max-width: 100%;
714
+ padding: 3px 4px;
715
+ position: fixed;
716
+ z-index: 999999;
717
+ box-sizing: border-box;
718
+ cursor: default;
719
+ white-space: pre-wrap;
720
+ word-wrap: break-word;
721
+ line-height: normal;
722
+ font-style: normal;
723
+ font-weight: normal;
724
+ letter-spacing: normal;
725
+ pointer-events: none;
726
+ overflow: auto;
727
+ max-width: min(60em, 66vw);
728
+ overscroll-behavior: contain;
729
+ }
730
+ .ace_tooltip pre {
731
+ white-space: pre-wrap;
732
+ }
733
+
734
+ .ace_tooltip.ace_dark {
735
+ background-color: #636363;
736
+ color: #fff;
737
+ }
738
+
739
+ .ace_tooltip:focus {
740
+ outline: 1px solid #5E9ED6;
741
+ }
742
+
743
+ .ace_icon {
744
+ display: inline-block;
745
+ width: 18px;
746
+ vertical-align: top;
747
+ }
748
+
749
+ .ace_icon_svg {
750
+ display: inline-block;
751
+ width: 12px;
752
+ vertical-align: top;
753
+ -webkit-mask-repeat: no-repeat;
754
+ -webkit-mask-size: 12px;
755
+ -webkit-mask-position: center;
756
+ }
757
+
758
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
759
+ padding-right: 13px;
760
+ }
761
+
762
+ .ace_fold-widget {
763
+ box-sizing: border-box;
764
+
765
+ margin: 0 -12px 0 1px;
766
+ display: none;
767
+ width: 11px;
768
+ vertical-align: top;
769
+
770
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
771
+ background-repeat: no-repeat;
772
+ background-position: center;
773
+
774
+ border-radius: 3px;
775
+
776
+ border: 1px solid transparent;
777
+ cursor: pointer;
778
+ }
779
+
780
+ .ace_folding-enabled .ace_fold-widget {
781
+ display: inline-block;
782
+ }
783
+
784
+ .ace_fold-widget.ace_end {
785
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
786
+ }
787
+
788
+ .ace_fold-widget.ace_closed {
789
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
790
+ }
791
+
792
+ .ace_fold-widget:hover {
793
+ border: 1px solid rgba(0, 0, 0, 0.3);
794
+ background-color: rgba(255, 255, 255, 0.2);
795
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
796
+ }
797
+
798
+ .ace_fold-widget:active {
799
+ border: 1px solid rgba(0, 0, 0, 0.4);
800
+ background-color: rgba(0, 0, 0, 0.05);
801
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
802
+ }
803
+ /**
804
+ * Dark version for fold widgets
805
+ */
806
+ .ace_dark .ace_fold-widget {
807
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
808
+ }
809
+ .ace_dark .ace_fold-widget.ace_end {
810
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
811
+ }
812
+ .ace_dark .ace_fold-widget.ace_closed {
813
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
814
+ }
815
+ .ace_dark .ace_fold-widget:hover {
816
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
817
+ background-color: rgba(255, 255, 255, 0.1);
818
+ }
819
+ .ace_dark .ace_fold-widget:active {
820
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
821
+ }
822
+
823
+ .ace_inline_button {
824
+ border: 1px solid lightgray;
825
+ display: inline-block;
826
+ margin: -1px 8px;
827
+ padding: 0 5px;
828
+ pointer-events: auto;
829
+ cursor: pointer;
830
+ }
831
+ .ace_inline_button:hover {
832
+ border-color: gray;
833
+ background: rgba(200,200,200,0.2);
834
+ display: inline-block;
835
+ pointer-events: auto;
836
+ }
837
+
838
+ .ace_fold-widget.ace_invalid {
839
+ background-color: #FFB4B4;
840
+ border-color: #DE5555;
841
+ }
842
+
843
+ .ace_fade-fold-widgets .ace_fold-widget {
844
+ transition: opacity 0.4s ease 0.05s;
845
+ opacity: 0;
846
+ }
847
+
848
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
849
+ transition: opacity 0.05s ease 0.05s;
850
+ opacity:1;
851
+ }
852
+
853
+ .ace_underline {
854
+ text-decoration: underline;
855
+ }
856
+
857
+ .ace_bold {
858
+ font-weight: bold;
859
+ }
860
+
861
+ .ace_nobold .ace_bold {
862
+ font-weight: normal;
863
+ }
864
+
865
+ .ace_italic {
866
+ font-style: italic;
867
+ }
868
+
869
+
870
+ .ace_error-marker {
871
+ background-color: rgba(255, 0, 0,0.2);
872
+ position: absolute;
873
+ z-index: 9;
874
+ }
875
+
876
+ .ace_highlight-marker {
877
+ background-color: rgba(255, 255, 0,0.2);
878
+ position: absolute;
879
+ z-index: 8;
880
+ }
881
+
882
+ .ace_mobile-menu {
883
+ position: absolute;
884
+ line-height: 1.5;
885
+ border-radius: 4px;
886
+ -ms-user-select: none;
887
+ -moz-user-select: none;
888
+ -webkit-user-select: none;
889
+ user-select: none;
890
+ background: white;
891
+ box-shadow: 1px 3px 2px grey;
892
+ border: 1px solid #dcdcdc;
893
+ color: black;
894
+ }
895
+ .ace_dark > .ace_mobile-menu {
896
+ background: #333;
897
+ color: #ccc;
898
+ box-shadow: 1px 3px 2px grey;
899
+ border: 1px solid #444;
900
+
901
+ }
902
+ .ace_mobile-button {
903
+ padding: 2px;
904
+ cursor: pointer;
905
+ overflow: hidden;
906
+ }
907
+ .ace_mobile-button:hover {
908
+ background-color: #eee;
909
+ opacity:1;
910
+ }
911
+ .ace_mobile-button:active {
912
+ background-color: #ddd;
913
+ }
914
+
915
+ .ace_placeholder {
916
+ position: relative;
917
+ font-family: arial;
918
+ transform: scale(0.9);
919
+ transform-origin: left;
920
+ white-space: pre;
921
+ opacity: 0.7;
922
+ margin: 0 10px;
923
+ z-index: 1;
924
+ }
925
+
926
+ .ace_ghost_text {
927
+ opacity: 0.5;
928
+ font-style: italic;
929
+ }
930
+
931
+ .ace_ghost_text_container > div {
932
+ white-space: pre;
933
+ }
934
+
935
+ .ghost_text_line_wrapped::after {
936
+ content: "\u21A9";
937
+ position: absolute;
938
+ }
939
+
940
+ .ace_lineWidgetContainer.ace_ghost_text {
941
+ margin: 0px 4px
942
+ }
943
+
944
+ .ace_screenreader-only {
945
+ position:absolute;
946
+ left:-10000px;
947
+ top:auto;
948
+ width:1px;
949
+ height:1px;
950
+ overflow:hidden;
951
+ }
952
+
953
+ .ace_hidden_token {
954
+ display: none;
955
+ }`;});ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(L,T,H){var E=L("../lib/dom"),x=L("../lib/oop"),M=L("../lib/event_emitter").EventEmitter,s=function(){function l(r,t){this.canvas=E.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},r.element.appendChild(this.canvas);}return l.prototype.$updateDecorators=function(r){var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var i=(r.lastRow+1)*this.lineHeight;i<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight;}var n=this.canvas.getContext("2d");function e(b,f){return b.priority<f.priority?-1:b.priority>f.priority?1:0}var o=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),o){var a={info:1,warning:2,error:3};o.forEach(function(b){b.priority=a[b.type]||null;}),o=o.sort(e);for(var u=this.renderer.session.$foldData,y=0;y<o.length;y++){var S=o[y].row,m=this.compensateFoldRows(S,u),$=Math.round((S-m)*this.lineHeight*this.heightRatio),d=Math.round((S-m)*this.lineHeight*this.heightRatio),h=Math.round(((S-m)*this.lineHeight+this.lineHeight)*this.heightRatio),w=h-d;if(w<this.minDecorationHeight){var C=(d+h)/2|0;C<this.halfMinDecorationHeight?C=this.halfMinDecorationHeight:C+this.halfMinDecorationHeight>this.canvasHeight&&(C=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(C-this.halfMinDecorationHeight),h=Math.round(C+this.halfMinDecorationHeight);}n.fillStyle=t[o[y].type]||null,n.fillRect(0,$,this.canvasWidth,h-d);}}var v=this.renderer.session.selection.getCursor();if(v){var m=this.compensateFoldRows(v.row,u),$=Math.round((v.row-m)*this.lineHeight*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,$,this.canvasWidth,2);}},l.prototype.compensateFoldRows=function(r,t){var i=0;if(t&&t.length>0)for(var n=0;n<t.length;n++)r>t[n].start.row&&r<t[n].end.row?i+=r-t[n].start.row:r>=t[n].end.row&&(i+=t[n].end.row-t[n].start.row);return i},l}();x.implement(s.prototype,M),T.Decorator=s;});ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(L,T,H){var E=L("./lib/oop"),x=L("./lib/dom"),M=L("./lib/lang"),s=L("./config"),l=L("./layer/gutter").Gutter,r=L("./layer/marker").Marker,t=L("./layer/text").Text,i=L("./layer/cursor").Cursor,n=L("./scrollbar").HScrollBar,e=L("./scrollbar").VScrollBar,o=L("./scrollbar_custom").HScrollBar,a=L("./scrollbar_custom").VScrollBar,u=L("./renderloop").RenderLoop,y=L("./layer/font_metrics").FontMetrics,S=L("./lib/event_emitter").EventEmitter,m=L("./css/editor-css"),$=L("./layer/decorators").Decorator,d=L("./lib/useragent"),h=L("./layer/text_util").isTextToken;x.importCssString(m,"ace_editor.css",!1);var w=function(){function C(v,b){var f=this;this.container=v||x.createElement("div"),x.addCssClass(this.container,"ace_editor"),x.HI_DPI&&x.addCssClass(this.container,"ace_hidpi"),this.setTheme(b),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=x.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=x.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=x.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new l(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var p=this.$textLayer=new t(this.content);this.canvas=p.element,this.$markerFront=new r(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.on("scroll",function(c){f.$scrollAnimation||f.session.setScrollTop(c.data-f.scrollMargin.top);}),this.scrollBarH.on("scroll",function(c){f.$scrollAnimation||f.session.setScrollLeft(c.data-f.scrollMargin.left);}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(c){f.updateCharacterSize(),f.onResize(!0,f.gutterWidth,f.$size.width,f.$size.height),f._signal("changeCharacterSize",c);}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!d.isIOS,this.$loop=new u(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this);}return C.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),x.setStyle(this.scroller.style,"line-height",this.lineHeight+"px");},C.prototype.setSession=function(v){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=v,v&&this.scrollMargin.top&&v.getScrollTop()<=0&&v.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(v),this.$markerBack.setSession(v),this.$markerFront.setSession(v),this.$gutterLayer.setSession(v),this.$textLayer.setSession(v),v&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode));},C.prototype.updateLines=function(v,b,f){if(b===void 0&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>v&&(this.$changedLines.firstRow=v),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:v,lastRow:b},this.$changedLines.lastRow<this.layerConfig.firstRow)if(f)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES);},C.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);},C.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize();},C.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT);},C.prototype.updateFull=function(v){v?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL);},C.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges();},C.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize();},C.prototype.onResize=function(v,b,f,p){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=v?1:0;var c=this.container;p||(p=c.clientHeight||c.scrollHeight),!p&&this.$maxLines&&this.lineHeight>1&&(!c.style.height||c.style.height=="0px")&&(c.style.height="1px",p=c.clientHeight||c.scrollHeight),f||(f=c.clientWidth||c.scrollWidth);var g=this.$updateCachedSize(v,b,f,p);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!f&&!p)return this.resizing=0;v&&(this.$gutterLayer.$padding=null),v?this.$renderChanges(g|this.$changes,!0):this.$loop.schedule(g|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0);}},C.prototype.$updateCachedSize=function(v,b,f,p){p-=this.$extraHeight||0;var c=0,g=this.$size,A={width:g.width,height:g.height,scrollerHeight:g.scrollerHeight,scrollerWidth:g.scrollerWidth};if(p&&(v||g.height!=p)&&(g.height=p,c|=this.CHANGE_SIZE,g.scrollerHeight=g.height,this.$horizScroll&&(g.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(g.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",c=c|this.CHANGE_SCROLL),f&&(v||g.width!=f)){c|=this.CHANGE_SIZE,g.width=f,b==null&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,x.setStyle(this.scrollBarH.element.style,"left",b+"px"),x.setStyle(this.scroller.style,"left",b+this.margin.left+"px"),g.scrollerWidth=Math.max(0,f-b-this.scrollBarV.getWidth()-this.margin.h),x.setStyle(this.$gutter.style,"left",this.margin.left+"px");var k=this.scrollBarV.getWidth()+"px";x.setStyle(this.scrollBarH.element.style,"right",k),x.setStyle(this.scroller.style,"right",k),x.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(g.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||v)&&(c|=this.CHANGE_FULL);}return g.$dirty=!f||!p,c&&this._signal("resize",A),c},C.prototype.onGutterResize=function(v){var b=this.$showGutter?v:0;b!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,b,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig();},C.prototype.adjustWrapLimit=function(){var v=this.$size.scrollerWidth-this.$padding*2,b=Math.floor(v/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},C.prototype.setAnimatedScroll=function(v){this.setOption("animatedScroll",v);},C.prototype.getAnimatedScroll=function(){return this.$animatedScroll},C.prototype.setShowInvisibles=function(v){this.setOption("showInvisibles",v),this.session.$bidiHandler.setShowInvisibles(v);},C.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},C.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},C.prototype.setDisplayIndentGuides=function(v){this.setOption("displayIndentGuides",v);},C.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},C.prototype.setHighlightIndentGuides=function(v){this.setOption("highlightIndentGuides",v);},C.prototype.setShowPrintMargin=function(v){this.setOption("showPrintMargin",v);},C.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},C.prototype.setPrintMarginColumn=function(v){this.setOption("printMarginColumn",v);},C.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},C.prototype.getShowGutter=function(){return this.getOption("showGutter")},C.prototype.setShowGutter=function(v){return this.setOption("showGutter",v)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v);},C.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v);},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var v=x.createElement("div");v.className="ace_layer ace_print-margin-layer",this.$printMarginEl=x.createElement("div"),this.$printMarginEl.className="ace_print-margin",v.appendChild(this.$printMarginEl),this.content.insertBefore(v,this.content.firstChild);}var b=this.$printMarginEl.style;b.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit();}},C.prototype.getContainerElement=function(){return this.container},C.prototype.getMouseEventTarget=function(){return this.scroller},C.prototype.getTextAreaContainer=function(){return this.container},C.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var v=this.textarea.style,b=this.$composition;if(!this.$keepTextAreaAtCursor&&!b){x.translate(this.textarea,-100,0);return}var f=this.$cursorLayer.$pixelPos;if(f){b&&b.markerRange&&(f=this.$cursorLayer.getPixelPosition(b.markerRange.start,!0));var p=this.layerConfig,c=f.top,g=f.left;c-=p.offset;var A=b&&b.useTextareaForIME||d.isMobile?this.lineHeight:1;if(c<0||c>p.height-A){x.translate(this.textarea,0,0);return}var k=1,R=this.$size.height-A;if(!b)c+=this.lineHeight;else if(b.useTextareaForIME){var _=this.textarea.value;k=this.characterWidth*this.session.$getStringScreenWidth(_)[0];}else c+=this.lineHeight+2;g-=this.scrollLeft,g>this.$size.scrollerWidth-k&&(g=this.$size.scrollerWidth-k),g+=this.gutterWidth+this.margin.left,x.setStyle(v,"height",A+"px"),x.setStyle(v,"width",k+"px"),x.translate(this.textarea,Math.min(g,this.$size.scrollerWidth-k),Math.min(c,R));}}},C.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},C.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},C.prototype.getLastFullyVisibleRow=function(){var v=this.layerConfig,b=v.lastRow,f=this.session.documentToScreenRow(b,0)*v.lineHeight;return f-this.session.getScrollTop()>v.height-v.lineHeight?b-1:b},C.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},C.prototype.setPadding=function(v){this.$padding=v,this.$textLayer.setPadding(v),this.$cursorLayer.setPadding(v),this.$markerFront.setPadding(v),this.$markerBack.setPadding(v),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin();},C.prototype.setScrollMargin=function(v,b,f,p){var c=this.scrollMargin;c.top=v|0,c.bottom=b|0,c.right=p|0,c.left=f|0,c.v=c.top+c.bottom,c.h=c.left+c.right,c.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-c.top),this.updateFull();},C.prototype.setMargin=function(v,b,f,p){var c=this.margin;c.top=v|0,c.bottom=b|0,c.right=p|0,c.left=f|0,c.v=c.top+c.bottom,c.h=c.left+c.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull();},C.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},C.prototype.setHScrollBarAlwaysVisible=function(v){this.setOption("hScrollBarAlwaysVisible",v);},C.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},C.prototype.setVScrollBarAlwaysVisible=function(v){this.setOption("vScrollBarAlwaysVisible",v);},C.prototype.$updateScrollBarV=function(){var v=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(v-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>v-b&&(v=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(v+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top);},C.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left);},C.prototype.freeze=function(){this.$frozen=!0;},C.prototype.unfreeze=function(){this.$frozen=!1;},C.prototype.$renderChanges=function(v,b){if(this.$changes&&(v|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!v&&!b){this.$changes|=v;return}if(this.$size.$dirty)return this.$changes|=v,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",v),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var f=this.layerConfig;if(v&this.CHANGE_FULL||v&this.CHANGE_SIZE||v&this.CHANGE_TEXT||v&this.CHANGE_LINES||v&this.CHANGE_SCROLL||v&this.CHANGE_H_SCROLL){if(v|=this.$computeLayerConfig()|this.$loop.clear(),f.firstRow!=this.layerConfig.firstRow&&f.firstRowScreen==this.layerConfig.firstRowScreen){var p=this.scrollTop+(f.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;p>0&&(this.scrollTop=p,v=v|this.CHANGE_SCROLL,v|=this.$computeLayerConfig()|this.$loop.clear());}f=this.layerConfig,this.$updateScrollBarV(),v&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),x.translate(this.content,-this.scrollLeft,-f.offset);var c=f.width+2*this.$padding+"px",g=f.minHeight+"px";x.setStyle(this.content.style,"width",c),x.setStyle(this.content.style,"height",g);}if(v&this.CHANGE_H_SCROLL&&(x.translate(this.content,-this.scrollLeft,-f.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),v&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",v);return}if(v&this.CHANGE_SCROLL){this.$changedLines=null,v&this.CHANGE_TEXT||v&this.CHANGE_LINES?this.$textLayer.update(f):this.$textLayer.scrollLines(f),this.$showGutter&&(v&this.CHANGE_GUTTER||v&this.CHANGE_LINES?this.$gutterLayer.update(f):this.$gutterLayer.scrollLines(f)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",v);return}v&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):v&this.CHANGE_LINES?((this.$updateLines()||v&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):v&this.CHANGE_TEXT||v&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):v&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)),v&this.CHANGE_CURSOR&&(this.$cursorLayer.update(f),this.$moveTextAreaToCursor()),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(f),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(f),this._signal("afterRender",v);},C.prototype.$autosize=function(){var v=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,f=Math.min(b,Math.max((this.$minLines||1)*this.lineHeight,v))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(f+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&f>this.$maxPixelHeight&&(f=this.$maxPixelHeight);var p=f<=2*this.lineHeight,c=!p&&v>b;if(f!=this.desiredHeight||this.$size.height!=this.desiredHeight||c!=this.$vScroll){c!=this.$vScroll&&(this.$vScroll=c,this.scrollBarV.setVisible(c));var g=this.container.clientWidth;this.container.style.height=f+"px",this.$updateCachedSize(!0,this.$gutterWidth,g,f),this.desiredHeight=f,this._signal("autosize");}},C.prototype.$computeLayerConfig=function(){var v=this.session,b=this.$size,f=b.height<=2*this.lineHeight,p=this.session.getScreenLength(),c=p*this.lineHeight,g=this.$getLongestLine(),A=!f&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-g-2*this.$padding<0),k=this.$horizScroll!==A;k&&(this.$horizScroll=A,this.scrollBarH.setVisible(A));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var _=b.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;c+=D;var I=this.scrollMargin;this.session.setScrollTop(Math.max(-I.top,Math.min(this.scrollTop,c-b.scrollerHeight+I.bottom))),this.session.setScrollLeft(Math.max(-I.left,Math.min(this.scrollLeft,g+2*this.$padding-b.scrollerWidth+I.right)));var F=!f&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-c+D<0||this.scrollTop>I.top),N=R!==F;N&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var O=this.scrollTop%this.lineHeight,W=Math.ceil(_/this.lineHeight)-1,B=Math.max(0,Math.round((this.scrollTop-O)/this.lineHeight)),z=B+W,j,U,V=this.lineHeight;B=v.screenToDocumentRow(B,0);var Y=v.getFoldLine(B);Y&&(B=Y.start.row),j=v.documentToScreenRow(B,0),U=v.getRowLength(B)*V,z=Math.min(v.screenToDocumentRow(z,0),v.getLength()-1),_=b.scrollerHeight+v.getRowLength(z)*V+U,O=this.scrollTop-j*V;var G=0;return (this.layerConfig.width!=g||k)&&(G=this.CHANGE_H_SCROLL),(k||N)&&(G|=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),N&&(g=this.$getLongestLine())),this.layerConfig={width:g,padding:this.$padding,firstRow:B,firstRowScreen:j,lastRow:z,lineHeight:V,characterWidth:this.characterWidth,minHeight:_,maxHeight:c,offset:O,gutterOffset:V?Math.max(0,Math.ceil((O+b.height-b.scrollerHeight)/V)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(g-this.$padding),G},C.prototype.$updateLines=function(){if(this.$changedLines){var v=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var f=this.layerConfig;if(!(v>f.lastRow+1)&&!(b<f.firstRow)){if(b===1/0){this.$showGutter&&this.$gutterLayer.update(f),this.$textLayer.update(f);return}return this.$textLayer.updateLines(f,v,b),!0}}},C.prototype.$getLongestLine=function(){var v=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(v+=1),this.$textLayer&&v>this.$textLayer.MAX_LINE_LENGTH&&(v=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(v*this.characterWidth))},C.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT);},C.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK);},C.prototype.addGutterDecoration=function(v,b){this.$gutterLayer.addGutterDecoration(v,b);},C.prototype.removeGutterDecoration=function(v,b){this.$gutterLayer.removeGutterDecoration(v,b);},C.prototype.updateBreakpoints=function(v){this._rows=v,this.$loop.schedule(this.CHANGE_GUTTER);},C.prototype.setAnnotations=function(v){this.$gutterLayer.setAnnotations(v),this.$loop.schedule(this.CHANGE_GUTTER);},C.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR);},C.prototype.hideCursor=function(){this.$cursorLayer.hideCursor();},C.prototype.showCursor=function(){this.$cursorLayer.showCursor();},C.prototype.scrollSelectionIntoView=function(v,b,f){this.scrollCursorIntoView(v,f),this.scrollCursorIntoView(b,f);},C.prototype.scrollCursorIntoView=function(v,b,f){if(this.$size.scrollerHeight!==0){var p=this.$cursorLayer.getPixelPosition(v),c=p.left,g=p.top,A=f&&f.top||0,k=f&&f.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+A>g?(b&&R+A>g+this.lineHeight&&(g-=b*this.$size.scrollerHeight),g===0&&(g=-this.scrollMargin.top),this.session.setScrollTop(g)):R+this.$size.scrollerHeight-k<g+this.lineHeight&&(b&&R+this.$size.scrollerHeight-k<g-this.lineHeight&&(g+=b*this.$size.scrollerHeight),this.session.setScrollTop(g+this.lineHeight+k-this.$size.scrollerHeight));var _=this.scrollLeft,D=2*this.layerConfig.characterWidth;c-D<_?(c-=D,c<this.$padding+D&&(c=-this.scrollMargin.left),this.session.setScrollLeft(c)):(c+=D,_+this.$size.scrollerWidth<c+this.characterWidth?this.session.setScrollLeft(Math.round(c+this.characterWidth-this.$size.scrollerWidth)):_<=this.$padding&&c-_<this.characterWidth&&this.session.setScrollLeft(0));}},C.prototype.getScrollTop=function(){return this.session.getScrollTop()},C.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},C.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},C.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},C.prototype.scrollToRow=function(v){this.session.setScrollTop(v*this.lineHeight);},C.prototype.alignCursor=function(v,b){typeof v=="number"&&(v={row:v,column:0});var f=this.$cursorLayer.getPixelPosition(v),p=this.$size.scrollerHeight-this.lineHeight,c=f.top-p*(b||0);return this.session.setScrollTop(c),c},C.prototype.$calcSteps=function(v,b){var f=0,p=this.STEPS,c=[],g=function(A,k,R){return R*(Math.pow(A-1,3)+1)+k};for(f=0;f<p;++f)c.push(g(f/this.STEPS,v,b-v));return c},C.prototype.scrollToLine=function(v,b,f,p){var c=this.$cursorLayer.getPixelPosition({row:v,column:0}),g=c.top;b&&(g-=this.$size.scrollerHeight/2);var A=this.scrollTop;this.session.setScrollTop(g),f!==!1&&this.animateScrolling(A,p);},C.prototype.animateScrolling=function(v,b){var f=this.scrollTop;if(!this.$animatedScroll)return;var p=this;if(v==f)return;if(this.$scrollAnimation){var c=this.$scrollAnimation.steps;if(c.length&&(v=c[0],v==f))return}var g=p.$calcSteps(v,f);this.$scrollAnimation={from:v,to:f,steps:g},clearInterval(this.$timer),p.session.setScrollTop(g.shift()),p.session.$scrollTop=f;function A(){p.$timer=clearInterval(p.$timer),p.$scrollAnimation=null,p.$stopAnimation=!1,b&&b();}this.$timer=setInterval(function(){if(p.$stopAnimation){A();return}if(!p.session)return clearInterval(p.$timer);g.length?(p.session.setScrollTop(g.shift()),p.session.$scrollTop=f):f!=null?(p.session.$scrollTop=-1,p.session.setScrollTop(f),f=null):A();},10);},C.prototype.scrollToY=function(v){this.scrollTop!==v&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=v);},C.prototype.scrollToX=function(v){this.scrollLeft!==v&&(this.scrollLeft=v),this.$loop.schedule(this.CHANGE_H_SCROLL);},C.prototype.scrollTo=function(v,b){this.session.setScrollTop(b),this.session.setScrollLeft(v);},C.prototype.scrollBy=function(v,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),v&&this.session.setScrollLeft(this.session.getScrollLeft()+v);},C.prototype.isScrollableBy=function(v,b){if(b<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||v<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||v>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return !0},C.prototype.pixelToScreenCoordinates=function(v,b){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([v,b]);v=p[1]-this.gutterWidth-this.margin.left,b=p[0];}else f=this.scroller.getBoundingClientRect();var c=v+this.scrollLeft-f.left-this.$padding,g=c/this.characterWidth,A=Math.floor((b+this.scrollTop-f.top)/this.lineHeight),k=this.$blockCursor?Math.floor(g):Math.round(g);return {row:A,column:k,side:g-k>0?1:-1,offsetX:c}},C.prototype.screenToTextCoordinates=function(v,b){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([v,b]);v=p[1]-this.gutterWidth-this.margin.left,b=p[0];}else f=this.scroller.getBoundingClientRect();var c=v+this.scrollLeft-f.left-this.$padding,g=c/this.characterWidth,A=this.$blockCursor?Math.floor(g):Math.round(g),k=Math.floor((b+this.scrollTop-f.top)/this.lineHeight);return this.session.screenToDocumentPosition(k,Math.max(A,0),c)},C.prototype.textToScreenCoordinates=function(v,b){var f=this.scroller.getBoundingClientRect(),p=this.session.documentToScreenPosition(v,b),c=this.$padding+(this.session.$bidiHandler.isBidiRow(p.row,v)?this.session.$bidiHandler.getPosLeft(p.column):Math.round(p.column*this.characterWidth)),g=p.row*this.lineHeight;return {pageX:f.left+c-this.scrollLeft,pageY:f.top+g-this.scrollTop}},C.prototype.visualizeFocus=function(){x.addCssClass(this.container,"ace_focus");},C.prototype.visualizeBlur=function(){x.removeCssClass(this.container,"ace_focus");},C.prototype.showComposition=function(v){this.$composition=v,v.cssText||(v.cssText=this.textarea.style.cssText),v.useTextareaForIME==null&&(v.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(x.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):v.markerId=this.session.addMarker(v.markerRange,"ace_composition_marker","text");},C.prototype.setCompositionText=function(v){var b=this.session.selection.cursor;this.addToken(v,"composition_placeholder",b.row,b.column),this.$moveTextAreaToCursor();},C.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),x.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var v=this.session.selection.cursor;this.removeExtraToken(v.row,v.column),this.$composition=null,this.$cursorLayer.element.style.display="";}},C.prototype.setGhostText=function(v,b){var f=this.session.selection.cursor,p=b||{row:f.row,column:f.column};this.removeGhostText();var c=this.$calculateWrappedTextChunks(v,p);this.addToken(c[0].text,"ghost_text",p.row,p.column),this.$ghostText={text:v,position:{row:p.row,column:p.column}};var g=x.createElement("div");if(c.length>1){var A=this.hideTokensAfterPosition(p.row,p.column),k;c.slice(1).forEach(function(N){var O=x.createElement("div"),W=x.createElement("span");W.className="ace_ghost_text",N.wrapped&&(O.className="ghost_text_line_wrapped"),N.text.length===0&&(N.text=" "),W.appendChild(x.createTextNode(N.text)),O.appendChild(W),g.appendChild(O),k=O;}),A.forEach(function(N){var O=x.createElement("span");h(N.type)||(O.className="ace_"+N.type.replace(/\./g," ace_")),O.appendChild(x.createTextNode(N.value)),k.appendChild(O);}),this.$ghostTextWidget={el:g,row:p.row,column:p.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var R=this.$cursorLayer.getPixelPosition(p,!0),_=this.container,D=_.getBoundingClientRect().height,I=c.length*this.lineHeight,F=I<D-R.top;if(F)return;I<D?this.scrollBy(0,(c.length-1)*this.lineHeight):this.scrollToRow(p.row);}},C.prototype.$calculateWrappedTextChunks=function(v,b){var f=this.$size.scrollerWidth-this.$padding*2,p=Math.floor(f/this.characterWidth)-2;p=p<=0?60:p;for(var c=v.split(/\r?\n/),g=[],A=0;A<c.length;A++){var k=this.session.$getDisplayTokens(c[A],b.column),R=this.session.$computeWrapSplits(k,p,this.session.$tabSize);if(R.length>0){var _=0;R.push(c[A].length);for(var D=0;D<R.length;D++){var I=c[A].slice(_,R[D]);g.push({text:I,wrapped:!0}),_=R[D];}}else g.push({text:c[A],wrapped:!1});}return g},C.prototype.removeGhostText=function(){if(this.$ghostText){var v=this.$ghostText.position;this.removeExtraToken(v.row,v.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null;}},C.prototype.addToken=function(v,b,f,p){var c=this.session;c.bgTokenizer.lines[f]=null;var g={type:b,value:v},A=c.getTokens(f);if(p==null||!A.length)A.push(g);else for(var k=0,R=0;R<A.length;R++){var _=A[R];if(k+=_.value.length,p<=k){var D=_.value.length-(k-p),I=_.value.slice(0,D),F=_.value.slice(D);A.splice(R,1,{type:_.type,value:I},g,{type:_.type,value:F});break}}this.updateLines(f,f);},C.prototype.hideTokensAfterPosition=function(v,b){for(var f=this.session.getTokens(v),p=0,c=!1,g=[],A=0;A<f.length;A++){var k=f[A];if(p+=k.value.length,k.type!=="ghost_text"){if(c){g.push({type:k.type,value:k.value}),k.type="hidden_token";continue}p===b&&(c=!0);}}return this.updateLines(v,v),g},C.prototype.removeExtraToken=function(v,b){this.session.bgTokenizer.lines[v]=null,this.updateLines(v,v);},C.prototype.setTheme=function(v,b){var f=this;if(this.$themeId=v,f._dispatchEvent("themeChange",{theme:v}),!v||typeof v=="string"){var p=v||this.$options.theme.initialValue;s.loadModule(["theme",p],c);}else c(v);function c(g){if(f.$themeId!=v)return b&&b();if(!g||!g.cssClass)throw new Error("couldn't load module "+v+" or it didn't call define");g.$id&&(f.$themeId=g.$id),x.importCssString(g.cssText,g.cssClass,f.container),f.theme&&x.removeCssClass(f.container,f.theme.cssClass);var A="padding"in g?g.padding:"padding"in(f.theme||{})?4:f.$padding;f.$padding&&A!=f.$padding&&f.setPadding(A),f.$theme=g.cssClass,f.theme=g,x.addCssClass(f.container,g.cssClass),x.setCssClass(f.container,"ace_dark",g.isDark),f.$size&&(f.$size.width=0,f.$updateSizeAsync()),f._dispatchEvent("themeLoaded",{theme:g}),b&&b(),d.isSafari&&f.scroller&&(f.scroller.style.background="red",f.scroller.style.background="");}},C.prototype.getTheme=function(){return this.$themeId},C.prototype.setStyle=function(v,b){x.setCssClass(this.container,v,b!==!1);},C.prototype.unsetStyle=function(v){x.removeCssClass(this.container,v);},C.prototype.setCursorStyle=function(v){x.setStyle(this.scroller.style,"cursor",v);},C.prototype.setMouseCursor=function(v){x.setStyle(this.scroller.style,"cursor",v);},C.prototype.attachToShadowRoot=function(){x.importCssString(m,"ace_editor.css",this.container);},C.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1);},C.prototype.$updateCustomScrollbar=function(v){var b=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,v===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(f){b.$scrollAnimation||b.session.setScrollTop(f.data-b.scrollMargin.top);}),this.scrollBarH.addEventListener("scroll",function(f){b.$scrollAnimation||b.session.setScrollLeft(f.data-b.scrollMargin.left);}),this.$scrollDecorator=new $(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.addEventListener("scroll",function(f){b.$scrollAnimation||b.session.setScrollTop(f.data-b.scrollMargin.top);}),this.scrollBarH.addEventListener("scroll",function(f){b.$scrollAnimation||b.session.setScrollLeft(f.data-b.scrollMargin.left);}));},C.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var v=this;this.$resizeTimer=M.delayedCall(function(){v.destroyed||v.onResize();},50),this.$resizeObserver=new window.ResizeObserver(function(b){var f=b[0].contentRect.width,p=b[0].contentRect.height;Math.abs(v.$size.width-f)>1||Math.abs(v.$size.height-p)>1?v.$resizeTimer.delay():v.$resizeTimer.cancel();}),this.$resizeObserver.observe(this.container);}},C}();w.prototype.CHANGE_CURSOR=1,w.prototype.CHANGE_MARKER=2,w.prototype.CHANGE_GUTTER=4,w.prototype.CHANGE_SCROLL=8,w.prototype.CHANGE_LINES=16,w.prototype.CHANGE_TEXT=32,w.prototype.CHANGE_SIZE=64,w.prototype.CHANGE_MARKER_BACK=128,w.prototype.CHANGE_MARKER_FRONT=256,w.prototype.CHANGE_FULL=512,w.prototype.CHANGE_H_SCROLL=1024,w.prototype.$changes=0,w.prototype.$padding=null,w.prototype.$frozen=!1,w.prototype.STEPS=8,E.implement(w.prototype,S),s.defineOptions(w.prototype,"renderer",{useResizeObserver:{set:function(C){!C&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):C&&!this.$resizeObserver&&this.$addResizeObserver();}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(C){this.$textLayer.setShowInvisibles(C)&&this.$loop.schedule(this.CHANGE_TEXT);},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin();},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin();},initialValue:80},printMargin:{set:function(C){typeof C=="number"&&(this.$printMarginColumn=C),this.$showPrintMargin=!!C,this.$updatePrintMargin();},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(C){this.$gutter.style.display=C?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize();},initialValue:!0},useSvgGutterIcons:{set:function(C){this.$gutterLayer.$useSvgGutterIcons=C;},initialValue:!1},showFoldedAnnotations:{set:function(C){this.$gutterLayer.$showFoldedAnnotations=C;},initialValue:!1},fadeFoldWidgets:{set:function(C){x.setCssClass(this.$gutter,"ace_fade-fold-widgets",C);},initialValue:!1},showFoldWidgets:{set:function(C){this.$gutterLayer.setShowFoldWidgets(C),this.$loop.schedule(this.CHANGE_GUTTER);},initialValue:!0},displayIndentGuides:{set:function(C){this.$textLayer.setDisplayIndentGuides(C)&&this.$loop.schedule(this.CHANGE_TEXT);},initialValue:!0},highlightIndentGuides:{set:function(C){this.$textLayer.setHighlightIndentGuides(C)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells);},initialValue:!0},highlightGutterLine:{set:function(C){this.$gutterLayer.setHighlightGutterLine(C),this.$loop.schedule(this.CHANGE_GUTTER);},initialValue:!0},hScrollBarAlwaysVisible:{set:function(C){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL);},initialValue:!1},vScrollBarAlwaysVisible:{set:function(C){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL);},initialValue:!1},fontSize:{set:function(C){typeof C=="number"&&(C=C+"px"),this.container.style.fontSize=C,this.updateFontSize();},initialValue:12},fontFamily:{set:function(C){this.container.style.fontFamily=C,this.updateFontSize();}},maxLines:{set:function(C){this.updateFull();}},minLines:{set:function(C){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull();}},maxPixelHeight:{set:function(C){this.updateFull();},initialValue:0},scrollPastEnd:{set:function(C){C=+C||0,this.$scrollPastEnd!=C&&(this.$scrollPastEnd=C,this.$loop.schedule(this.CHANGE_SCROLL));},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(C){this.$gutterLayer.$fixedWidth=!!C,this.$loop.schedule(this.CHANGE_GUTTER);}},customScrollbar:{set:function(C){this.$updateCustomScrollbar(C);},initialValue:!1},theme:{set:function(C){this.setTheme(C);},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),T.VirtualRenderer=w;});ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(L,T,H){var E=L("../lib/oop"),x=L("../lib/net"),M=L("../lib/event_emitter").EventEmitter,s=L("../config");function l(n){var e="importScripts('"+x.qualifyURL(n)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new o;return a.append(e),a.getBlob("application/javascript")}}function r(n){if(typeof Worker>"u")return {postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=l(n),o=window.URL||window.webkitURL,a=o.createObjectURL(e);return new Worker(a)}return new Worker(n)}var t=function(n){n.postMessage||(n=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=n,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage;};(function(){E.implement(this,M),this.$createWorkerFromOldConfig=function(n,e,o,a,u){if(L.nameToUrl&&!L.toUrl&&(L.toUrl=L.nameToUrl),s.get("packaged")||!L.toUrl)a=a||s.moduleUrl(e,"worker");else {var y=this.$normalizePath;a=a||y(L.toUrl("ace/worker/worker.js",null,"_"));var S={};n.forEach(function(m){S[m]=y(L.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""));});}return this.$worker=r(a),u&&this.send("importScripts",u),this.$worker.postMessage({init:!0,tlns:S,module:e,classname:o}),this.$worker},this.onMessage=function(n){var e=n.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var o=this.callbacks[e.id];o&&(o(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(n){window.console&&console.error&&console.error(n);},this.$normalizePath=function(n){return x.qualifyURL(n)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(n){n.preventDefault();},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null;},this.send=function(n,e){this.$worker.postMessage({command:n,args:e});},this.call=function(n,e,o){if(o){var a=this.callbackId++;this.callbacks[a]=o,e.push(a);}this.send(n,e);},this.emit=function(n,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:n,data:{data:e.data}});}catch(o){console.error(o.stack);}},this.attachToDocument=function(n){this.$doc&&this.terminate(),this.$doc=n,this.call("setValue",[n.getValue()]),n.on("change",this.changeListener,!0);},this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),n.action=="insert"?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end);},this.$sendDeltaQueue=function(){var n=this.deltaQueue;n&&(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}));};}).call(t.prototype);var i=function(n,e,o){var a=null,u=!1,y=Object.create(M),S=[],m=new t({messageBuffer:S,terminate:function(){},postMessage:function(d){S.push(d),a&&(u?setTimeout($):$());}});m.setEmitSync=function(d){u=d;};var $=function(){var d=S.shift();d.command?a[d.command].apply(a,d.args):d.event&&y._signal(d.event,d.data);};return y.postMessage=function(d){m.onMessage({data:d});},y.callback=function(d,h){this.postMessage({type:"call",id:h,data:d});},y.emit=function(d,h){this.postMessage({type:"event",name:d,data:h});},s.loadModule(["worker",e],function(d){for(a=new d[o](y);S.length;)$();}),m};T.UIWorkerClient=i,T.WorkerClient=t,T.createWorker=r;});ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(L,T,H){var E=L("./range").Range,x=L("./lib/event_emitter").EventEmitter,M=L("./lib/oop"),s=function(){function l(r,t,i,n,e,o){var a=this;this.length=t,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange();});},this.$pos=i;var u=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange);}return l.prototype.setup=function(){var r=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var n=this.pos;n.$insertRight=!0,n.detach(),n.markerId=i.addMarker(new E(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=t.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),r.others.push(o);}),i.setUndoSelect(!1);},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=r.addMarker(new E(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1);});}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId);}},l.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var t=r;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i=r.action==="insert"?t.end.column-t.start.column:t.start.column-t.end.column,n=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,e=t.start.column-this.pos.column;if(this.updateAnchors(r),n&&(this.length+=i),n&&!this.session.$fromUndo){if(r.action==="insert")for(var o=this.others.length-1;o>=0;o--){var a=this.others[o],u={row:a.row,column:a.column+e};this.doc.insertMergedLines(u,r.lines);}else if(r.action==="remove")for(var o=this.others.length-1;o>=0;o--){var a=this.others[o],u={row:a.row,column:a.column+e};this.doc.remove(new E(u.row,u.column,u.row,u.column-i));}}this.$updating=!1,this.updateMarkers();}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var t=this.others.length;t--;)this.others[t].onChange(r);this.updateMarkers();},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,t=this.session,i=function(e,o){t.removeMarker(e.markerId),e.markerId=t.addMarker(new E(e.row,e.column,e.row,e.column+r.length),o,null,!1);};i(this.pos,this.mainClass);for(var n=this.others.length;n--;)i(this.others[n],this.othersClass);}},l.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r));}},l.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null;},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),t=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore);}},l}();M.implement(s.prototype,x),T.PlaceHolder=s;});ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,T,H){var E=L("../lib/event"),x=L("../lib/useragent");function M(l,r){return l.row==r.row&&l.column==r.column}function s(l){var r=l.domEvent,t=r.altKey,i=r.shiftKey,n=r.ctrlKey,e=l.getAccelKey(),o=l.getButton();if(n&&x.isMac&&(o=r.button),l.editor.inMultiSelectMode&&o==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!n&&!t&&!e){o===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(o===0){var a=l.editor,u=a.selection,y=a.inMultiSelectMode,S=l.getDocumentPosition(),m=u.getCursor(),$=l.inSelection()||u.isEmpty()&&M(S,m),d=l.x,h=l.y,w=function(I){d=I.clientX,h=I.clientY;},C=a.session,v=a.renderer.pixelToScreenCoordinates(d,h),b=v,f;if(a.$mouseHandler.$enableJumpToDef)n&&t||e&&t?f=i?"block":"add":t&&a.$blockSelectEnabled&&(f="block");else if(e&&!t){if(f="add",!y&&i)return}else t&&a.$blockSelectEnabled&&(f="block");if(f&&x.isMac&&r.ctrlKey&&a.$mouseHandler.cancelContextMenu(),f=="add"){if(!y&&$)return;if(!y){var p=u.toOrientedRange();a.addSelectionMarker(p);}var c=u.rangeList.rangeAtPoint(S);a.inVirtualSelectionMode=!0,i&&(c=null,p=u.ranges[0]||p,a.removeSelectionMarker(p)),a.once("mouseup",function(){var I=u.toOrientedRange();c&&I.isEmpty()&&M(c.cursor,I.cursor)?u.substractPoint(I.cursor):(i?u.substractPoint(p.cursor):p&&(a.removeSelectionMarker(p),u.addRange(p)),u.addRange(I)),a.inVirtualSelectionMode=!1;});}else if(f=="block"){l.stop(),a.inVirtualSelectionMode=!0;var g,A=[],k=function(){var I=a.renderer.pixelToScreenCoordinates(d,h),F=C.screenToDocumentPosition(I.row,I.column,I.offsetX);M(b,I)&&M(F,u.lead)||(b=I,a.selection.moveToPosition(F),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(A),A=u.rectangularRangeBlock(b,v),a.$mouseHandler.$clickSelection&&A.length==1&&A[0].isEmpty()&&(A[0]=a.$mouseHandler.$clickSelection.clone()),A.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers());};y&&!e?u.toSingleRange():!y&&e&&(g=u.toOrientedRange(),a.addSelectionMarker(g)),i?v=C.documentToScreenPosition(u.lead):u.moveToPosition(S),b={row:-1,column:-1};var R=function(I){k(),clearInterval(D),a.removeSelectionMarkers(A),A.length||(A=[u.toOrientedRange()]),g&&(a.removeSelectionMarker(g),u.toSingleRange(g));for(var F=0;F<A.length;F++)u.addRange(A[F]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null;},_=k;E.capture(a.container,w,R);var D=setInterval(function(){_();},20);return l.preventDefault()}}}T.onMouseDown=s;});ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(L,T,H){T.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(x){x.selectMoreLines(-1);},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(x){x.selectMoreLines(1);},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(x){x.selectMoreLines(-1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(x){x.selectMoreLines(1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(x){x.selectMore(-1);},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(x){x.selectMore(1);},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(x){x.selectMore(-1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(x){x.selectMore(1,!0);},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(x){x.multiSelect.rangeCount>1?x.multiSelect.joinSelections():x.multiSelect.splitIntoLines();},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(x){x.multiSelect.splitIntoLines();},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(x){x.alignCursors();},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(x){x.findAll();},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],T.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(x){x.exitMultiSelectMode();},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(x){return x&&x.inMultiSelectMode}}];var E=L("../keyboard/hash_handler").HashHandler;T.keyboardHandler=new E(T.multiSelectCommands);});ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(L,T,H){var E=L("./range_list").RangeList,x=L("./range").Range,M=L("./selection").Selection,s=L("./mouse/multi_select_handler").onMouseDown,l=L("./lib/event"),r=L("./lib/lang"),t=L("./commands/multi_select_commands");T.commands=t.defaultCommands.concat(t.multiSelectCommands);var i=L("./search").Search,n=new i;function e(m,$,d){return n.$options.wrap=!0,n.$options.needle=$,n.$options.backwards=d==-1,n.find(m)}var o=L("./edit_session").EditSession;((function(){this.getSelectionMarkers=function(){return this.$selectionMarkers};})).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(m,$){if(m){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(m),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),$||this.fromOrientedRange(m);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d);}m.cursor||(m.cursor=m.end);var h=this.rangeList.add(m);return this.$onAddRange(m),h.length&&this.$onRemoveRange(h),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),$||this.fromOrientedRange(m)}},this.toSingleRange=function(m){m=m||this.ranges[0];var $=this.rangeList.removeAll();$.length&&this.$onRemoveRange($),m&&this.fromOrientedRange(m);},this.substractPoint=function(m){var $=this.rangeList.substractPoint(m);if($)return this.$onRemoveRange($),$[0]},this.mergeOverlappingRanges=function(){var m=this.rangeList.merge();m.length&&this.$onRemoveRange(m);},this.$onAddRange=function(m){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(m),this._signal("addRange",{range:m});},this.$onRemoveRange=function(m){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var $=this.rangeList.ranges.pop();m.push($),this.rangeCount=0;}for(var d=m.length;d--;){var h=this.ranges.indexOf(m[d]);this.ranges.splice(h,1);}this._signal("removeRange",{ranges:m}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),$=$||this.ranges[0],$&&!$.isEqual(this.getRange())&&this.fromOrientedRange($);},this.$initRangeList=function(){this.rangeList||(this.rangeList=new E,this.ranges=[],this.rangeCount=0);},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var m=this.ranges.length?this.ranges:[this.getRange()],$=[],d=0;d<m.length;d++){var h=m[d],w=h.start.row,C=h.end.row;if(w===C)$.push(h.clone());else {for($.push(new x(w,h.start.column,w,this.session.getLine(w).length));++w<C;)$.push(this.getLineRange(w,!0));$.push(new x(C,0,C,h.end.column));}d==0&&!this.isBackwards()&&($=$.reverse());}this.toSingleRange();for(var d=$.length;d--;)this.addRange($[d]);},this.joinSelections=function(){var m=this.rangeList.ranges,$=m[m.length-1],d=x.fromPoints(m[0].start,$.end);this.toSingleRange(),this.setSelectionRange(d,$.cursor==$.start);},this.toggleBlockSelection=function(){if(this.rangeCount>1){var m=this.rangeList.ranges,$=m[m.length-1],d=x.fromPoints(m[0].start,$.end);this.toSingleRange(),this.setSelectionRange(d,$.cursor==$.start);}else {var h=this.session.documentToScreenPosition(this.cursor),w=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(h,w);C.forEach(this.addRange,this);}},this.rectangularRangeBlock=function(m,$,d){var h=[],w=m.column<$.column;if(w)var C=m.column,v=$.column,b=m.offsetX,f=$.offsetX;else var C=$.column,v=m.column,b=$.offsetX,f=m.offsetX;var p=m.row<$.row;if(p)var c=m.row,g=$.row;else var c=$.row,g=m.row;C<0&&(C=0),c<0&&(c=0),c==g&&(d=!0);for(var A,k=c;k<=g;k++){var R=x.fromPoints(this.session.screenToDocumentPosition(k,C,b),this.session.screenToDocumentPosition(k,v,f));if(R.isEmpty()){if(A&&u(R.end,A))break;A=R.end;}R.cursor=w?R.start:R.end,h.push(R);}if(p&&h.reverse(),!d){for(var _=h.length-1;h[_].isEmpty()&&_>0;)_--;if(_>0)for(var D=0;h[D].isEmpty();)D++;for(var I=_;I>=D;I--)h[I].isEmpty()&&h.splice(I,1);}return h};}.call(M.prototype);var a=L("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.addSelectionMarker=function(m){m.cursor||(m.cursor=m.end);var $=this.getSelectionStyle();return m.marker=this.session.addMarker(m,"ace_selection",$),this.session.$selectionMarkers.push(m),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,m},this.removeSelectionMarker=function(m){if(m.marker){this.session.removeMarker(m.marker);var $=this.session.$selectionMarkers.indexOf(m);$!=-1&&this.session.$selectionMarkers.splice($,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length;}},this.removeSelectionMarkers=function(m){for(var $=this.session.$selectionMarkers,d=m.length;d--;){var h=m[d];if(h.marker){this.session.removeMarker(h.marker);var w=$.indexOf(h);w!=-1&&$.splice(w,1);}}this.session.selectionMarkerCount=$.length;},this.$onAddRange=function(m){this.addSelectionMarker(m.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.$onRemoveRange=function(m){this.removeSelectionMarkers(m.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers();},this.$onMultiSelect=function(m){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(t.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers());},this.$onSingleSelect=function(m){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(t.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"));},this.$onMultiSelectExec=function(m){var $=m.command,d=m.editor;if(d.multiSelect){if($.multiSelectAction)$.multiSelectAction=="forEach"?h=d.forEachSelection($,m.args):$.multiSelectAction=="forEachLine"?h=d.forEachSelection($,m.args,!0):$.multiSelectAction=="single"?(d.exitMultiSelectMode(),h=$.exec(d,m.args||{})):h=$.multiSelectAction(d,m.args||{});else {var h=$.exec(d,m.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges();}return h}},this.forEachSelection=function(m,$,d){if(!this.inVirtualSelectionMode){var h=d&&d.keepOrder,w=d==!0||d&&d.$byLines,C=this.session,v=this.selection,b=v.rangeList,f=(h?v:b).ranges,p;if(!f.length)return m.exec?m.exec(this,$||{}):m(this,$||{});var c=v._eventRegistry;v._eventRegistry={};var g=new M(C);this.inVirtualSelectionMode=!0;for(var A=f.length;A--;){if(w)for(;A>0&&f[A].start.row==f[A-1].end.row;)A--;g.fromOrientedRange(f[A]),g.index=A,this.selection=C.selection=g;var k=m.exec?m.exec(this,$||{}):m(this,$||{});!p&&k!==void 0&&(p=k),g.toOrientedRange(f[A]);}g.detach(),this.selection=C.selection=v,this.inVirtualSelectionMode=!1,v._eventRegistry=c,v.mergeOverlappingRanges(),v.ranges[0]&&v.fromOrientedRange(v.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),p}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange();},this.getSelectedText=function(){var m="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var $=this.multiSelect.rangeList.ranges,d=[],h=0;h<$.length;h++)d.push(this.session.getTextRange($[h]));var w=this.session.getDocument().getNewLineCharacter();m=d.join(w),m.length==(d.length-1)*w.length&&(m="");}else this.selection.isEmpty()||(m=this.session.getTextRange(this.getSelectionRange()));return m},this.$checkMultiselectChange=function(m,$){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var d=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&$==this.multiSelect.anchor)return;var h=$==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor;h.row!=$.row||this.session.$clipPositionToDocument(h.row,h.column).column!=$.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges();}},this.findAll=function(m,$,d){if($=$||{},$.needle=m||$.needle,$.needle==null){var h=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();$.needle=this.session.getTextRange(h);}this.$search.set($);var w=this.$search.findAll(this.session);if(!w.length)return 0;var C=this.multiSelect;d||C.toSingleRange(w[0]);for(var v=w.length;v--;)C.addRange(w[v],!0);return h&&C.rangeList.rangeAtPoint(h.start)&&C.addRange(h,!0),w.length},this.selectMoreLines=function(m,$){var d=this.selection.toOrientedRange(),h=d.cursor==d.end,w=this.session.documentToScreenPosition(d.cursor);this.selection.$desiredColumn&&(w.column=this.selection.$desiredColumn);var C=this.session.screenToDocumentPosition(w.row+m,w.column);if(d.isEmpty())var b=C;else var v=this.session.documentToScreenPosition(h?d.end:d.start),b=this.session.screenToDocumentPosition(v.row+m,v.column);if(h){var f=x.fromPoints(C,b);f.cursor=f.start;}else {var f=x.fromPoints(b,C);f.cursor=f.end;}if(f.desiredColumn=w.column,!this.selection.inMultiSelectMode)this.selection.addRange(d);else if($)var p=d.cursor;this.selection.addRange(f),p&&this.selection.substractPoint(p);},this.transposeSelections=function(m){for(var $=this.session,d=$.multiSelect,h=d.ranges,w=h.length;w--;){var C=h[w];if(C.isEmpty()){var v=$.getWordRange(C.start.row,C.start.column);C.start.row=v.start.row,C.start.column=v.start.column,C.end.row=v.end.row,C.end.column=v.end.column;}}d.mergeOverlappingRanges();for(var b=[],w=h.length;w--;){var C=h[w];b.unshift($.getTextRange(C));}m<0?b.unshift(b.pop()):b.push(b.shift());for(var w=h.length;w--;){var C=h[w],f=C.clone();$.replace(C,b[w]),C.start.row=f.start.row,C.start.column=f.start.column;}d.fromOrientedRange(d.ranges[0]);},this.selectMore=function(m,$,d){var h=this.session,w=h.multiSelect,C=w.toOrientedRange();if(!(C.isEmpty()&&(C=h.getWordRange(C.start.row,C.start.column),C.cursor=m==-1?C.start:C.end,this.multiSelect.addRange(C),d))){var v=h.getTextRange(C),b=e(h,v,m);b&&(b.cursor=m==-1?b.start:b.end,this.session.unfold(b),this.multiSelect.addRange(b),this.renderer.scrollCursorIntoView(null,.5)),$&&this.multiSelect.substractPoint(C.cursor);}},this.alignCursors=function(){var m=this.session,$=m.multiSelect,d=$.ranges,h=-1,w=d.filter(function(_){if(_.cursor.row==h)return !0;h=_.cursor.row;});if(!d.length||w.length==d.length-1){var C=this.selection.getRange(),v=C.start.row,b=C.end.row,f=v==b;if(f){var p=this.session.getLength(),c;do c=this.session.getLine(b);while(/[=:]/.test(c)&&++b<p);do c=this.session.getLine(v);while(/[=:]/.test(c)&&--v>0);v<0&&(v=0),b>=p&&(b=p-1);}var g=this.session.removeFullLines(v,b);g=this.$reAlignText(g,f),this.session.insert({row:v,column:0},g.join(`
956
+ `)+`
957
+ `),f||(C.start.column=0,C.end.column=g[g.length-1].length),this.selection.setRange(C);}else {w.forEach(function(_){$.substractPoint(_.cursor);});var A=0,k=1/0,R=d.map(function(_){var D=_.cursor,I=m.getLine(D.row),F=I.substr(D.column).search(/\S/g);return F==-1&&(F=0),D.column>A&&(A=D.column),F<k&&(k=F),F});d.forEach(function(_,D){var I=_.cursor,F=A-I.column,N=R[D]-k;F>N?m.insert(I,r.stringRepeat(" ",F-N)):m.remove(new x(I.row,I.column,I.row,I.column-F+N)),_.start.column=_.end.column=A,_.start.row=_.end.row=I.row,_.cursor=_.end;}),$.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers();}},this.$reAlignText=function(m,$){var d=!0,h=!0,w,C,v;return m.map(function(g){var A=g.match(/(\s*)(.*?)(\s*)([=:].*)/);return A?w==null?(w=A[1].length,C=A[2].length,v=A[3].length,A):(w+C+v!=A[1].length+A[2].length+A[3].length&&(h=!1),w!=A[1].length&&(d=!1),w>A[1].length&&(w=A[1].length),C<A[2].length&&(C=A[2].length),v>A[3].length&&(v=A[3].length),A):[g]}).map($?f:d?h?p:f:c);function b(g){return r.stringRepeat(" ",g)}function f(g){return g[2]?b(w)+g[2]+b(C-g[2].length+v)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}function p(g){return g[2]?b(w+C-g[2].length)+g[2]+b(v)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}function c(g){return g[2]?b(w)+g[2]+b(v)+g[4].replace(/^([=:])\s+/,"$1 "):g[0]}};}).call(a.prototype);function u(m,$){return m.row==$.row&&m.column==$.column}T.onSessionChange=function(m){var $=m.session;$&&!$.multiSelect&&($.$selectionMarkers=[],$.selection.$initRangeList(),$.multiSelect=$.selection),this.multiSelect=$&&$.multiSelect;var d=m.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),$&&($.multiSelect.on("addRange",this.$onAddRange),$.multiSelect.on("removeRange",this.$onRemoveRange),$.multiSelect.on("multiSelect",this.$onMultiSelect),$.multiSelect.on("singleSelect",this.$onSingleSelect),$.multiSelect.lead.on("change",this.$checkMultiselectChange),$.multiSelect.anchor.on("change",this.$checkMultiselectChange)),$&&this.inMultiSelectMode!=$.selection.inMultiSelectMode&&($.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect());};function y(m){m.$multiselectOnSessionChange||(m.$onAddRange=m.$onAddRange.bind(m),m.$onRemoveRange=m.$onRemoveRange.bind(m),m.$onMultiSelect=m.$onMultiSelect.bind(m),m.$onSingleSelect=m.$onSingleSelect.bind(m),m.$multiselectOnSessionChange=T.onSessionChange.bind(m),m.$checkMultiselectChange=m.$checkMultiselectChange.bind(m),m.$multiselectOnSessionChange(m),m.on("changeSession",m.$multiselectOnSessionChange),m.on("mousedown",s),m.commands.addCommands(t.defaultCommands),S(m));}function S(m){if(!m.textInput)return;var $=m.textInput.getElement(),d=!1;l.addListener($,"keydown",function(w){var C=w.keyCode==18&&!(w.ctrlKey||w.shiftKey||w.metaKey);m.$blockSelectEnabled&&C?d||(m.renderer.setMouseCursor("crosshair"),d=!0):d&&h();},m),l.addListener($,"keyup",h,m),l.addListener($,"blur",h,m);function h(w){d&&(m.renderer.setMouseCursor(""),d=!1);}}T.MultiSelect=y,L("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(m){y(this),m?this.on("mousedown",s):this.off("mousedown",s);},value:!0},enableBlockSelect:{set:function(m){this.$blockSelectEnabled=m;},value:!0}});});ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(L,T,H){var E=L("../../range").Range,x=T.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(M,s,l){var r=M.getLine(l);return this.foldingStartMarker.test(r)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(M,s,l){return null},this.indentationBlock=function(M,s,l){var r=/\S/,t=M.getLine(s),i=t.search(r);if(i!=-1){for(var n=l||t.length,e=M.getLength(),o=s,a=s;++s<e;){var u=M.getLine(s).search(r);if(u!=-1){if(u<=i){var y=M.getTokenAt(s,0);if(!y||y.type!=="string")break}a=s;}}if(a>o){var S=M.getLine(a).length;return new E(o,n,a,S)}}},this.openingBracketBlock=function(M,s,l,r,t){var i={row:l,column:r+1},n=M.$findClosingBracket(s,i,t);if(n){var e=M.foldWidgets[n.row];return e==null&&(e=M.getFoldWidget(n.row)),e=="start"&&n.row>i.row&&(n.row--,n.column=M.getLine(n.row).length),E.fromPoints(i,n)}},this.closingBracketBlock=function(M,s,l,r,t){var i={row:l,column:r},n=M.$findOpeningBracket(s,i);if(n)return n.column++,i.column--,E.fromPoints(n,i)};}).call(x.prototype);});ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(L,T,H){var E=L("../line_widgets").LineWidgets,x=L("../lib/dom"),M=L("../range").Range,s=L("../config").nls;function l(t,i,n){for(var e=0,o=t.length-1;e<=o;){var a=e+o>>1,u=n(i,t[a]);if(u>0)e=a+1;else if(u<0)o=a-1;else return a}return -(e+1)}function r(t,i,n){var e=t.getAnnotations().sort(M.comparePoints);if(e.length){var o=l(e,{row:i,column:-1},M.comparePoints);o<0&&(o=-o-1),o>=e.length?o=n>0?0:e.length-1:o===0&&n<0&&(o=e.length-1);var a=e[o];if(!(!a||!n)){if(a.row===i){do a=e[o+=n];while(a&&a.row===i);if(!a)return e.slice()}var u=[];i=a.row;do u[n<0?"unshift":"push"](a),a=e[o+=n];while(a&&a.row==i);return u.length&&u}}}T.showErrorMarker=function(t,i){var n=t.session;n.widgetManager||(n.widgetManager=new E(n),n.widgetManager.attach(t));var e=t.getCursorPosition(),o=e.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(C){return C.type=="errorMarker"})[0];a?a.destroy():o-=i;var u=r(n,o,i),y;if(u){var S=u[0];e.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,e.row=S.row,y=t.renderer.$gutterLayer.$annotations[e.row];}else {if(a)return;y={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"};}t.session.unfold(e.row),t.selection.moveToPosition(e);var m={row:e.row,fixedWidth:!0,coverGutter:!0,el:x.createElement("div"),type:"errorMarker"},$=m.el.appendChild(x.createElement("div")),d=m.el.appendChild(x.createElement("div"));d.className="error_widget_arrow "+y.className;var h=t.renderer.$cursorLayer.getPixelPosition(e).left;d.style.left=h+t.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",$.className="error_widget "+y.className,y.displayText.forEach(function(C,v){$.appendChild(x.createTextNode(C)),v<y.displayText.length-1&&$.appendChild(x.createElement("br"));}),$.appendChild(x.createElement("div"));var w=function(C,v,b){if(v===0&&(b==="esc"||b==="return"))return m.destroy(),{command:"null"}};m.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(w),n.widgetManager.removeLineWidget(m),t.off("changeSelection",m.destroy),t.off("changeSession",m.destroy),t.off("mouseup",m.destroy),t.off("change",m.destroy));},t.keyBinding.addKeyboardHandler(w),t.on("changeSelection",m.destroy),t.on("changeSession",m.destroy),t.on("mouseup",m.destroy),t.on("change",m.destroy),t.session.widgetManager.addLineWidget(m),m.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight});},x.importCssString(`
958
+ .error_widget_wrapper {
959
+ background: inherit;
960
+ color: inherit;
961
+ border:none
962
+ }
963
+ .error_widget {
964
+ border-top: solid 2px;
965
+ border-bottom: solid 2px;
966
+ margin: 5px 0;
967
+ padding: 10px 40px;
968
+ white-space: pre-wrap;
969
+ }
970
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
971
+ border-color: #ff5a5a
972
+ }
973
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
974
+ border-color: #F1D817
975
+ }
976
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
977
+ border-color: #5a5a5a
978
+ }
979
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
980
+ border-color: #5aaa5a
981
+ }
982
+ .error_widget_arrow {
983
+ position: absolute;
984
+ border: solid 5px;
985
+ border-top-color: transparent!important;
986
+ border-right-color: transparent!important;
987
+ border-left-color: transparent!important;
988
+ top: -5px;
989
+ }
990
+ `,"error_marker.css",!1);});ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(L,T,H){L("./loader_build")(T);var E=L("./lib/dom"),x=L("./range").Range,M=L("./editor").Editor,s=L("./edit_session").EditSession,l=L("./undomanager").UndoManager,r=L("./virtual_renderer").VirtualRenderer;L("./worker/worker_client"),L("./keyboard/hash_handler"),L("./placeholder"),L("./multi_select"),L("./mode/folding/fold_mode"),L("./theme/textmate"),L("./ext/error_marker"),T.config=L("./config"),T.edit=function(t,i){if(typeof t=="string"){var n=t;if(t=document.getElementById(n),!t)throw new Error("ace.edit can't find div #"+n)}if(t&&t.env&&t.env.editor instanceof M)return t.env.editor;var e="";if(t&&/input|textarea/i.test(t.tagName)){var o=t;e=o.value,t=E.createElement("pre"),o.parentNode.replaceChild(t,o);}else t&&(e=t.textContent,t.innerHTML="");var a=T.createEditSession(e),u=new M(new r(t),a,i),y={document:a,editor:u,onResize:u.resize.bind(u,null)};return o&&(y.textarea=o),u.on("destroy",function(){y.editor.container.env=null;}),u.container.env=u.env=y,u},T.createEditSession=function(t,i){var n=new s(t,i);return n.setUndoManager(new l),n},T.Range=x,T.Editor=M,T.EditSession=s,T.UndoManager=l,T.VirtualRenderer=r,T.version=T.config.version;});(function(){ace.require(["ace/ace"],function(L){L&&(L.config.init(!0),L.define=ace.define);var T=function(){return this}();!T&&typeof window<"u"&&(T=window),!T&&typeof self<"u"&&(T=self),T.ace||(T.ace=L);for(var H in L)L.hasOwnProperty(H)&&(T.ace[H]=L[H]);T.ace.default=T.ace,typeof Re=="object"&&typeof ot=="object"&&Re&&(Re.exports=T.ace);});})();});var lt=a((at,_e)=>{ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(L,T,H){var E=L("./lib/dom"),x=L("./lib/oop"),M=L("./lib/event_emitter").EventEmitter,s=L("./lib/lang"),l=L("./range").Range,r=L("./range_list").RangeList,t=L("./keyboard/hash_handler").HashHandler,i=L("./tokenizer").Tokenizer,n=L("./clipboard"),e={CURRENT_WORD:function(d){return d.session.getTextRange(d.session.getWordRange())},SELECTION:function(d,h,w){var C=d.session.getTextRange();return w?C.replace(/\n\r?([ \t]*\S)/g,`
991
+ `+w+"$1"):C},CURRENT_LINE:function(d){return d.session.getLine(d.getCursorPosition().row)},PREV_LINE:function(d){return d.session.getLine(d.getCursorPosition().row-1)},LINE_INDEX:function(d){return d.getCursorPosition().row},LINE_NUMBER:function(d){return d.getCursorPosition().row+1},SOFT_TABS:function(d){return d.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(d){return d.session.getTabSize()},CLIPBOARD:function(d){return n.getText&&n.getText()},FILENAME:function(d){return /[^/\\]*$/.exec(this.FILEPATH(d))[0]},FILENAME_BASE:function(d){return /[^/\\]*$/.exec(this.FILEPATH(d))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(d){return this.FILEPATH(d).replace(/[^/\\]*$/,"")},FILEPATH:function(d){return "/not implemented.txt"},WORKSPACE_NAME:function(){return "Unknown"},FULLNAME:function(){return "Unknown"},BLOCK_COMMENT_START:function(d){var h=d.session.$mode||{};return h.blockComment&&h.blockComment.start||""},BLOCK_COMMENT_END:function(d){var h=d.session.$mode||{};return h.blockComment&&h.blockComment.end||""},LINE_COMMENT:function(d){var h=d.session.$mode||{};return h.lineCommentStart||""},CURRENT_YEAR:o.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:o.bind(null,{year:"2-digit"}),CURRENT_MONTH:o.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:o.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:o.bind(null,{month:"short"}),CURRENT_DATE:o.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:o.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:o.bind(null,{weekday:"short"}),CURRENT_HOUR:o.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:o.bind(null,{minute:"2-digit"}),CURRENT_SECOND:o.bind(null,{second:"2-digit"})};e.SELECTED_TEXT=e.SELECTION;function o(d){var h=new Date().toLocaleString("en-us",d);return h.length==1?"0"+h:h}var a=function(){function d(){this.snippetMap={},this.snippetNameMap={},this.variables=e;}return d.prototype.getTokenizer=function(){return d.$tokenizer||this.createTokenizer()},d.prototype.createTokenizer=function(){function h(v){return v=v.substr(1),/^\d+$/.test(v)?[{tabstopId:parseInt(v,10)}]:[{text:v}]}function w(v){return "(?:[^\\\\"+v+"]|\\\\.)"}var C={regex:"/("+w("/")+"+)/",onMatch:function(v,b,f){var p=f[0];return p.fmtString=!0,p.guard=v.slice(1,-1),p.flag="",""},next:"formatString"};return d.$tokenizer=new i({start:[{regex:/\\./,onMatch:function(v,b,f){var p=v[1];return (p=="}"&&f.length||"`$\\".indexOf(p)!=-1)&&(v=p),[v]}},{regex:/}/,onMatch:function(v,b,f){return [f.length?f.shift():v]}},{regex:/\$(?:\d+|\w+)/,onMatch:h},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(v,b,f){var p=h(v.substr(1));return f.unshift(p[0]),p},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+w("\\|")+"*\\|",onMatch:function(v,b,f){var p=v.slice(1,-1).replace(/\\[,|\\]|,/g,function(c){return c.length==2?c[1]:"\0"}).split("\0").map(function(c){return {value:c}});return f[0].choices=p,[p[0]]},next:"start"},C,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(v,b,f){return f.length&&f[0].expectElse?(f[0].expectElse=!1,f[0].ifEnd={elseEnd:f[0]},[f[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(v,b,f){var p=v[1];return p=="}"&&f.length||"`$\\".indexOf(p)!=-1?v=p:p=="n"?v=`
992
+ `:p=="t"?v=" ":"ulULE".indexOf(p)!=-1&&(v={changeCase:p,local:p>"a"}),[v]}},{regex:"/\\w*}",onMatch:function(v,b,f){var p=f.shift();return p&&(p.flag=v.slice(1,-1)),this.next=p&&p.tabstopId?"start":"",[p||v]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(v,b,f){return [{text:v.slice(1)}]}},{regex:/\${\w+/,onMatch:function(v,b,f){var p={text:v.slice(2)};return f.unshift(p),[p]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(v,b,f){var p=f.shift();return this.next=p&&p.tabstopId?"start":"",[p||v]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(v,b,f){var p=f[0];return p.formatFunction=v.slice(2,-1),[f.shift()]},next:"formatString"},C,{regex:/:[\?\-+]?/,onMatch:function(v,b,f){v[1]=="+"&&(f[0].ifEnd=f[0]),v[1]=="?"&&(f[0].expectElse=!0);},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),d.$tokenizer},d.prototype.tokenizeTmSnippet=function(h,w){return this.getTokenizer().getLineTokens(h,w).tokens.map(function(C){return C.value||C})},d.prototype.getVariableValue=function(h,w,C){if(/^\d+$/.test(w))return (this.variables.__||{})[w]||"";if(/^[A-Z]\d+$/.test(w))return (this.variables[w[0]+"__"]||{})[w.substr(1)]||"";if(w=w.replace(/^TM_/,""),!this.variables.hasOwnProperty(w))return "";var v=this.variables[w];return typeof v=="function"&&(v=this.variables[w](h,w,C)),v??""},d.prototype.tmStrFormat=function(h,w,C){if(!w.fmt)return h;var v=w.flag||"",b=w.guard;b=new RegExp(b,v.replace(/[^gim]/g,""));var f=typeof w.fmt=="string"?this.tokenizeTmSnippet(w.fmt,"formatString"):w.fmt,p=this,c=h.replace(b,function(){var g=p.variables.__;p.variables.__=[].slice.call(arguments);for(var A=p.resolveVariables(f,C),k="E",R=0;R<A.length;R++){var _=A[R];if(typeof _=="object")if(A[R]="",_.changeCase&&_.local){var D=A[R+1];D&&typeof D=="string"&&(_.changeCase=="u"?A[R]=D[0].toUpperCase():A[R]=D[0].toLowerCase(),A[R+1]=D.substr(1));}else _.changeCase&&(k=_.changeCase);else k=="U"?A[R]=_.toUpperCase():k=="L"&&(A[R]=_.toLowerCase());}return p.variables.__=g,A.join("")});return c},d.prototype.tmFormatFunction=function(h,w,C){return w.formatFunction=="upcase"?h.toUpperCase():w.formatFunction=="downcase"?h.toLowerCase():h},d.prototype.resolveVariables=function(h,w){for(var C=[],v="",b=!0,f=0;f<h.length;f++){var p=h[f];if(typeof p=="string"){C.push(p),p==`
993
+ `?(b=!0,v=""):b&&(v=/^\t*/.exec(p)[0],b=/\S/.test(p));continue}if(p){if(b=!1,p.fmtString){var c=h.indexOf(p,f+1);c==-1&&(c=h.length),p.fmt=h.slice(f+1,c),f=c;}if(p.text){var g=this.getVariableValue(w,p.text,v)+"";p.fmtString&&(g=this.tmStrFormat(g,p,w)),p.formatFunction&&(g=this.tmFormatFunction(g,p,w)),g&&!p.ifEnd?(C.push(g),A(p)):!g&&p.ifEnd&&A(p.ifEnd);}else p.elseEnd?A(p.elseEnd):(p.tabstopId!=null||p.changeCase!=null)&&C.push(p);}}function A(k){var R=h.indexOf(k,f+1);R!=-1&&(f=R);}return C},d.prototype.getDisplayTextForSnippet=function(h,w){var C=u.call(this,h,w);return C.text},d.prototype.insertSnippetForSelection=function(h,w,C){C===void 0&&(C={});var v=u.call(this,h,w,C),b=h.getSelectionRange(),f=h.session.replace(b,v.text),p=new y(h),c=h.inVirtualSelectionMode&&h.selection.index;p.addTabstops(v.tabstops,b.start,f,c);},d.prototype.insertSnippet=function(h,w,C){C===void 0&&(C={});var v=this;if(h.inVirtualSelectionMode)return v.insertSnippetForSelection(h,w,C);h.forEachSelection(function(){v.insertSnippetForSelection(h,w,C);},null,{keepOrder:!0}),h.tabstopManager&&h.tabstopManager.tabNext();},d.prototype.$getScope=function(h){var w=h.session.$mode.$id||"";if(w=w.split("/").pop(),w==="html"||w==="php"){w==="php"&&!h.session.$mode.inlinePhp&&(w="html");var C=h.getCursorPosition(),v=h.session.getState(C.row);typeof v=="object"&&(v=v[0]),v.substring&&(v.substring(0,3)=="js-"?w="javascript":v.substring(0,4)=="css-"?w="css":v.substring(0,4)=="php-"&&(w="php"));}return w},d.prototype.getActiveScopes=function(h){var w=this.$getScope(h),C=[w],v=this.snippetMap;return v[w]&&v[w].includeScopes&&C.push.apply(C,v[w].includeScopes),C.push("_"),C},d.prototype.expandWithTab=function(h,w){var C=this,v=h.forEachSelection(function(){return C.expandSnippetForSelection(h,w)},null,{keepOrder:!0});return v&&h.tabstopManager&&h.tabstopManager.tabNext(),v},d.prototype.expandSnippetForSelection=function(h,w){var C=h.getCursorPosition(),v=h.session.getLine(C.row),b=v.substring(0,C.column),f=v.substr(C.column),p=this.snippetMap,c;return this.getActiveScopes(h).some(function(g){var A=p[g];return A&&(c=this.findMatchingSnippet(A,b,f)),!!c},this),c?(w&&w.dryRun||(h.session.doc.removeInLine(C.row,C.column-c.replaceBefore.length,C.column+c.replaceAfter.length),this.variables.M__=c.matchBefore,this.variables.T__=c.matchAfter,this.insertSnippetForSelection(h,c.content),this.variables.M__=this.variables.T__=null),!0):!1},d.prototype.findMatchingSnippet=function(h,w,C){for(var v=h.length;v--;){var b=h[v];if(!(b.startRe&&!b.startRe.test(w))&&!(b.endRe&&!b.endRe.test(C))&&!(!b.startRe&&!b.endRe))return b.matchBefore=b.startRe?b.startRe.exec(w):[""],b.matchAfter=b.endRe?b.endRe.exec(C):[""],b.replaceBefore=b.triggerRe?b.triggerRe.exec(w)[0]:"",b.replaceAfter=b.endTriggerRe?b.endTriggerRe.exec(C)[0]:"",b}},d.prototype.register=function(h,w){var C=this.snippetMap,v=this.snippetNameMap,b=this;h||(h=[]);function f(g){return g&&!/^\^?\(.*\)\$?$|^\\b$/.test(g)&&(g="(?:"+g+")"),g||""}function p(g,A,k){return g=f(g),A=f(A),k?(g=A+g,g&&g[g.length-1]!="$"&&(g=g+"$")):(g=g+A,g&&g[0]!="^"&&(g="^"+g)),new RegExp(g)}function c(g){g.scope||(g.scope=w||"_"),w=g.scope,C[w]||(C[w]=[],v[w]={});var A=v[w];if(g.name){var k=A[g.name];k&&b.unregister(k),A[g.name]=g;}C[w].push(g),g.prefix&&(g.tabTrigger=g.prefix),!g.content&&g.body&&(g.content=Array.isArray(g.body)?g.body.join(`
994
+ `):g.body),g.tabTrigger&&!g.trigger&&(!g.guard&&/^\w/.test(g.tabTrigger)&&(g.guard="\\b"),g.trigger=s.escapeRegExp(g.tabTrigger)),!(!g.trigger&&!g.guard&&!g.endTrigger&&!g.endGuard)&&(g.startRe=p(g.trigger,g.guard,!0),g.triggerRe=new RegExp(g.trigger),g.endRe=p(g.endTrigger,g.endGuard,!0),g.endTriggerRe=new RegExp(g.endTrigger));}Array.isArray(h)?h.forEach(c):Object.keys(h).forEach(function(g){c(h[g]);}),this._signal("registerSnippets",{scope:w});},d.prototype.unregister=function(h,w){var C=this.snippetMap,v=this.snippetNameMap;function b(f){var p=v[f.scope||w];if(p&&p[f.name]){delete p[f.name];var c=C[f.scope||w],g=c&&c.indexOf(f);g>=0&&c.splice(g,1);}}h.content?b(h):Array.isArray(h)&&h.forEach(b);},d.prototype.parseSnippetFile=function(h){h=h.replace(/\r/g,"");for(var w=[],C={},v=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,b;b=v.exec(h);){if(b[1])try{C=JSON.parse(b[1]),w.push(C);}catch{}if(b[4])C.content=b[4].replace(/^\t/gm,""),w.push(C),C={};else {var f=b[2],p=b[3];if(f=="regex"){var c=/\/((?:[^\/\\]|\\.)*)|$/g;C.guard=c.exec(p)[1],C.trigger=c.exec(p)[1],C.endTrigger=c.exec(p)[1],C.endGuard=c.exec(p)[1];}else f=="snippet"?(C.tabTrigger=p.match(/^\S*/)[0],C.name||(C.name=p)):f&&(C[f]=p);}}return w},d.prototype.getSnippetByName=function(h,w){var C=this.snippetNameMap,v;return this.getActiveScopes(w).some(function(b){var f=C[b];return f&&(v=f[h]),!!v},this),v},d}();x.implement(a.prototype,M);var u=function(d,h,w){w===void 0&&(w={});var C=d.getCursorPosition(),v=d.session.getLine(C.row),b=d.session.getTabString(),f=v.match(/^\s*/)[0];C.column<f.length&&(f=f.slice(0,C.column)),h=h.replace(/\r/g,"");var p=this.tokenizeTmSnippet(h);p=this.resolveVariables(p,d),p=p.map(function(B){return B==`
995
+ `&&!w.excludeExtraIndent?B+f:typeof B=="string"?B.replace(/\t/g,b):B});var c=[];p.forEach(function(B,z){if(typeof B=="object"){var j=B.tabstopId,U=c[j];if(U||(U=c[j]=[],U.index=j,U.value="",U.parents={}),U.indexOf(B)===-1){B.choices&&!U.choices&&(U.choices=B.choices),U.push(B);var V=p.indexOf(B,z+1);if(V!==-1){var Y=p.slice(z+1,V),G=Y.some(function(J){return typeof J=="object"});G&&!U.value?U.value=Y:Y.length&&(!U.value||typeof U.value!="string")&&(U.value=Y.join(""));}}}}),c.forEach(function(B){B.length=0;});var g={};function A(B){for(var z=[],j=0;j<B.length;j++){var U=B[j];if(typeof U=="object"){if(g[U.tabstopId])continue;var V=B.lastIndexOf(U,j-1);U=z[V]||{tabstopId:U.tabstopId};}z[j]=U;}return z}for(var k=0;k<p.length;k++){var R=p[k];if(typeof R=="object"){var _=R.tabstopId,D=c[_],I=p.indexOf(R,k+1);if(g[_]){g[_]===R&&(delete g[_],Object.keys(g).forEach(function(B){D.parents[B]=!0;}));continue}g[_]=R;var F=D.value;typeof F!="string"?F=A(F):R.fmt&&(F=this.tmStrFormat(F,R,d)),p.splice.apply(p,[k+1,Math.max(0,I-k)].concat(F,R)),D.indexOf(R)===-1&&D.push(R);}}var N=0,O=0,W="";return p.forEach(function(B){if(typeof B=="string"){var z=B.split(`
996
+ `);z.length>1?(O=z[z.length-1].length,N+=z.length-1):O+=B.length,W+=B;}else B&&(B.start?B.end={row:N,column:O}:B.start={row:N,column:O});}),{text:W,tabstops:c,tokens:p}},y=function(){function d(h){if(this.index=0,this.ranges=[],this.tabstops=[],h.tabstopManager)return h.tabstopManager;h.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(h);}return d.prototype.attach=function(h){this.$openTabstops=null,this.selectedTabstop=null,this.editor=h,this.session=h.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);},d.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null;},d.prototype.onChange=function(h){for(var w=h.action[0]=="r",C=this.selectedTabstop||{},v=C.parents||{},b=this.tabstops.slice(),f=0;f<b.length;f++){var p=b[f],c=p==C||v[p.index];if(p.rangeList.$bias=c?0:1,h.action=="remove"&&p!==C){var g=p.parents&&p.parents[C.index],A=p.rangeList.pointIndex(h.start,g);A=A<0?-A-1:A+1;var k=p.rangeList.pointIndex(h.end,g);k=k<0?-k-1:k-1;for(var R=p.rangeList.ranges.slice(A,k),_=0;_<R.length;_++)this.removeRange(R[_]);}p.rangeList.$onChange(h);}var D=this.session;!this.$inChange&&w&&D.getLength()==1&&!D.getValue()&&this.detach();},d.prototype.updateLinkedFields=function(){var h=this.selectedTabstop;if(!(!h||!h.hasLinkedRanges||!h.firstNonLinked)){this.$inChange=!0;for(var w=this.session,C=w.getTextRange(h.firstNonLinked),v=0;v<h.length;v++){var b=h[v];if(b.linked){var f=b.original,p=T.snippetManager.tmStrFormat(C,f,this.editor);w.replace(b,p);}}this.$inChange=!1;}},d.prototype.onAfterExec=function(h){h.command&&!h.command.readOnly&&this.updateLinkedFields();},d.prototype.onChangeSelection=function(){if(this.editor){for(var h=this.editor.selection.lead,w=this.editor.selection.anchor,C=this.editor.selection.isEmpty(),v=0;v<this.ranges.length;v++)if(!this.ranges[v].linked){var b=this.ranges[v].contains(h.row,h.column),f=C||this.ranges[v].contains(w.row,w.column);if(b&&f)return}this.detach();}},d.prototype.onChangeSession=function(){this.detach();},d.prototype.tabNext=function(h){var w=this.tabstops.length,C=this.index+(h||1);C=Math.min(Math.max(C,1),w),C==w&&(C=0),this.selectTabstop(C),this.updateTabstopMarkers(),C===0&&this.detach();},d.prototype.selectTabstop=function(h){this.$openTabstops=null;var w=this.tabstops[this.index];if(w&&this.addTabstopMarkers(w),this.index=h,w=this.tabstops[this.index],!(!w||!w.length)){this.selectedTabstop=w;var C=w.firstNonLinked||w;if(w.choices&&(C.cursor=C.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(C);else {var v=this.editor.multiSelect;v.toSingleRange(C);for(var b=0;b<w.length;b++)w.hasLinkedRanges&&w[b].linked||v.addRange(w[b].clone(),!0);}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices});}},d.prototype.addTabstops=function(h,w,C){var v=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!h[0]){var b=l.fromPoints(C,C);m(b.start,w),m(b.end,w),h[0]=[b],h[0].index=0;}var f=this.index,p=[f+1,0],c=this.ranges,g=this.snippetId=(this.snippetId||0)+1;h.forEach(function(A,k){var R=this.$openTabstops[k]||A;R.snippetId=g;for(var _=0;_<A.length;_++){var D=A[_],I=l.fromPoints(D.start,D.end||D.start);S(I.start,w),S(I.end,w),I.original=D,I.tabstop=R,c.push(I),R!=A?R.unshift(I):R[_]=I,D.fmtString||R.firstNonLinked&&v?(I.linked=!0,R.hasLinkedRanges=!0):R.firstNonLinked||(R.firstNonLinked=I);}R.firstNonLinked||(R.hasLinkedRanges=!1),R===A&&(p.push(R),this.$openTabstops[k]=R),this.addTabstopMarkers(R),R.rangeList=R.rangeList||new r,R.rangeList.$bias=0,R.rangeList.addList(R);},this),p.length>2&&(this.tabstops.length&&p.push(p.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,p));},d.prototype.addTabstopMarkers=function(h){var w=this.session;h.forEach(function(C){C.markerId||(C.markerId=w.addMarker(C,"ace_snippet-marker","text"));});},d.prototype.removeTabstopMarkers=function(h){var w=this.session;h.forEach(function(C){w.removeMarker(C.markerId),C.markerId=null;});},d.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var h=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&h--,this.tabstops.forEach(function(w){w.snippetId===h?this.addTabstopMarkers(w):this.removeTabstopMarkers(w);},this);}},d.prototype.removeRange=function(h){var w=h.tabstop.indexOf(h);w!=-1&&h.tabstop.splice(w,1),w=this.ranges.indexOf(h),w!=-1&&this.ranges.splice(w,1),w=h.tabstop.rangeList.ranges.indexOf(h),w!=-1&&h.tabstop.splice(w,1),this.session.removeMarker(h.markerId),h.tabstop.length||(w=this.tabstops.indexOf(h.tabstop),w!=-1&&this.tabstops.splice(w,1),this.tabstops.length||this.detach());},d}();y.prototype.keyboardHandler=new t,y.prototype.keyboardHandler.bindKeys({Tab:function(d){T.snippetManager&&T.snippetManager.expandWithTab(d)||(d.tabstopManager.tabNext(1),d.renderer.scrollCursorIntoView());},"Shift-Tab":function(d){d.tabstopManager.tabNext(-1),d.renderer.scrollCursorIntoView();},Esc:function(d){d.tabstopManager.detach();}});var S=function(d,h){d.row==0&&(d.column+=h.column),d.row+=h.row;},m=function(d,h){d.row==h.row&&(d.column-=h.column),d.row-=h.row;};E.importCssString(`
196
997
  .ace_snippet-marker {
197
998
  -moz-box-sizing: border-box;
198
999
  box-sizing: border-box;
199
1000
  background: rgba(194, 193, 208, 0.09);
200
1001
  border: 1px dotted rgba(211, 208, 235, 0.62);
201
1002
  position: absolute;
202
- }`,"snippets.css",!1),T.snippetManager=new k;var i=a("./editor").Editor;(function(){this.insertSnippet=function(e,n){return T.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return T.snippetManager.expandWithTab(this,e)};}).call(i.prototype);});ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(a,T,L){var R=a("../virtual_renderer").VirtualRenderer,w=a("../editor").Editor,S=a("../range").Range,d=a("../lib/event"),u=a("../lib/lang"),v=a("../lib/dom"),p=a("../config").nls,b=a("./../lib/useragent"),f=function(I){return "suggest-aria-id:".concat(I)},y=b.isSafari?"menu":"listbox",m=b.isSafari?"menuitem":"option",k=b.isSafari?"aria-current":"aria-selected",C=function(I){var c=new R(I);c.$maxLines=4;var i=new w(c);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusTimeout=0,i.$highlightTagPending=!0,i},A=function(){function I(c){var i=v.createElement("div"),e=C(i);c&&c.appendChild(i),i.style.display="none",e.renderer.content.style.cursor="default",e.renderer.setStyle("ace_autocomplete"),e.renderer.$textLayer.element.setAttribute("role",y),e.renderer.$textLayer.element.setAttribute("aria-roledescription",p("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),e.renderer.$textLayer.element.setAttribute("aria-label",p("autocomplete.popup.aria-label","Autocomplete suggestions")),e.renderer.textarea.setAttribute("aria-hidden","true"),e.setOption("displayIndentGuides",!1),e.setOption("dragDelay",150);var n=function(){};e.focus=n,e.$isFocused=!0,e.renderer.$cursorLayer.restartTimer=n,e.renderer.$cursorLayer.element.style.opacity="0",e.renderer.$maxLines=8,e.renderer.$keepTextAreaAtCursor=!1,e.setHighlightActiveLine(!1),e.session.highlight(""),e.session.$searchHighlight.clazz="ace_highlight-marker",e.on("mousedown",function(x){var s=x.getDocumentPosition();e.selection.moveToPosition(s),r.start.row=r.end.row=s.row,x.stop();});var t,o=new S(-1,0,-1,1/0),r=new S(-1,0,-1,1/0);r.id=e.session.addMarker(r,"ace_active-line","fullLine"),e.setSelectOnHover=function(x){x?o.id&&(e.session.removeMarker(o.id),o.id=null):o.id=e.session.addMarker(o,"ace_line-hover","fullLine");},e.setSelectOnHover(!1),e.on("mousemove",function(x){if(!t){t=x;return}if(!(t.x==x.x&&t.y==x.y)){t=x,t.scrollTop=e.renderer.scrollTop,e.isMouseOver=!0;var s=t.getDocumentPosition().row;o.start.row!=s&&(o.id||e.setRow(s),g(s));}}),e.renderer.on("beforeRender",function(){if(t&&o.start.row!=-1){t.$pos=null;var x=t.getDocumentPosition().row;o.id||e.setRow(x),g(x,!0);}}),e.renderer.on("afterRender",function(){var x=e.getRow(),s=e.renderer.$textLayer,_=s.element.childNodes[x-s.config.firstRow],M=document.activeElement;if(_!==e.selectedNode&&e.selectedNode&&(v.removeCssClass(e.selectedNode,"ace_selected"),M.removeAttribute("aria-activedescendant"),e.selectedNode.removeAttribute(k),e.selectedNode.removeAttribute("id")),e.selectedNode=_,_){v.addCssClass(_,"ace_selected");var E=f(x);_.id=E,s.element.setAttribute("aria-activedescendant",E),M.setAttribute("aria-activedescendant",E),_.setAttribute("role",m),_.setAttribute("aria-roledescription",p("autocomplete.popup.item.aria-roledescription","item")),_.setAttribute("aria-label",e.getData(x).caption||e.getData(x).value),_.setAttribute("aria-setsize",e.data.length),_.setAttribute("aria-posinset",x+1),_.setAttribute("aria-describedby","doc-tooltip"),_.setAttribute(k,"true");}});var h=function(){g(-1);},g=function(x,s){x!==o.start.row&&(o.start.row=o.end.row=x,s||e.session._emit("changeBackMarker"),e._emit("changeHoverMarker"));};e.getHoveredRow=function(){return o.start.row},d.addListener(e.container,"mouseout",function(){e.isMouseOver=!1,h();}),e.on("hide",h),e.on("changeSelection",h),e.session.doc.getLength=function(){return e.data.length},e.session.doc.getLine=function(x){var s=e.data[x];return typeof s=="string"?s:s&&s.value||""};var l=e.session.bgTokenizer;return l.$tokenizeRow=function(x){var s=e.data[x],_=[];if(!s)return _;typeof s=="string"&&(s={value:s});var M=s.caption||s.value||s.name;function E(F,D){F&&_.push({type:(s.className||"")+(D||""),value:F});}for(var $=M.toLowerCase(),N=(e.filterText||"").toLowerCase(),P=0,H=0,O=0;O<=N.length;O++)if(O!=H&&(s.matchMask&1<<O||O==N.length)){var z=N.slice(H,O);H=O;var j=$.indexOf(z,P);if(j==-1)continue;E(M.slice(P,j),""),P=j+z.length,E(M.slice(j,P),"completion-highlight");}return E(M.slice(P,M.length),""),_.push({type:"completion-spacer",value:" "}),s.meta&&_.push({type:"completion-meta",value:s.meta}),s.message&&_.push({type:"completion-message",value:s.message}),_},l.$updateOnChange=n,l.start=n,e.session.$computeWidth=function(){return this.screenWidth=0},e.isOpen=!1,e.isTopdown=!1,e.autoSelect=!0,e.filterText="",e.isMouseOver=!1,e.data=[],e.setData=function(x,s){e.filterText=s||"",e.setValue(u.stringRepeat(`
203
- `,x.length),-1),e.data=x||[],e.setRow(0);},e.getData=function(x){return e.data[x]},e.getRow=function(){return r.start.row},e.setRow=function(x){x=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,x)),r.start.row!=x&&(e.selection.clearSelection(),r.start.row=r.end.row=x||0,e.session._emit("changeBackMarker"),e.moveCursorTo(x||0,0),e.isOpen&&e._signal("select"));},e.on("changeSelection",function(){e.isOpen&&e.setRow(e.selection.lead.row),e.renderer.scrollCursorIntoView();}),e.hide=function(){this.container.style.display="none",e.anchorPos=null,e.anchor=null,e.isOpen&&(e.isOpen=!1,this._signal("hide"));},e.tryShow=function(x,s,_,M){if(!M&&e.isOpen&&e.anchorPos&&e.anchor&&e.anchorPos.top===x.top&&e.anchorPos.left===x.left&&e.anchor===_)return !0;var E=this.container,$=window.innerHeight,N=window.innerWidth,P=this.renderer,H=P.$maxLines*s*1.4,O={top:0,bottom:0,left:0},z=$-x.top-3*this.$borderSize-s,j=x.top-3*this.$borderSize;_||(j<=z||z>=H?_="bottom":_="top"),_==="top"?(O.bottom=x.top-this.$borderSize,O.top=O.bottom-H):_==="bottom"&&(O.top=x.top+s+this.$borderSize,O.bottom=O.top+H);var F=O.top>=0&&O.bottom<=$;if(!M&&!F)return !1;F?P.$maxPixelHeight=null:_==="top"?P.$maxPixelHeight=j:P.$maxPixelHeight=z,_==="top"?(E.style.top="",E.style.bottom=$-O.bottom+"px",e.isTopdown=!1):(E.style.top=O.top+"px",E.style.bottom="",e.isTopdown=!0),E.style.display="";var D=x.left;return D+E.offsetWidth>N&&(D=N-E.offsetWidth),E.style.left=D+"px",E.style.right="",e.isOpen||(e.isOpen=!0,this._signal("show"),t=null),e.anchorPos=x,e.anchor=_,!0},e.show=function(x,s,_){this.tryShow(x,s,_?"bottom":void 0,!0);},e.goTo=function(x){var s=this.getRow(),_=this.session.getLength()-1;switch(x){case"up":s=s<=0?_:s-1;break;case"down":s=s>=_?-1:s+1;break;case"start":s=0;break;case"end":s=_;break}this.setRow(s);},e.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},e.$imageSize=0,e.$borderSize=1,e}return I}();v.importCssString(`
1003
+ }`,"snippets.css",!1),T.snippetManager=new a;var $=L("./editor").Editor;(function(){this.insertSnippet=function(d,h){return T.snippetManager.insertSnippet(this,d,h)},this.expandSnippet=function(d){return T.snippetManager.expandWithTab(this,d)};}).call($.prototype);});ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(L,T,H){var E=L("../virtual_renderer").VirtualRenderer,x=L("../editor").Editor,M=L("../range").Range,s=L("../lib/event"),l=L("../lib/lang"),r=L("../lib/dom"),t=L("../config").nls,i=L("./../lib/useragent"),n=function(S){return "suggest-aria-id:".concat(S)},e=i.isSafari?"menu":"listbox",o=i.isSafari?"menuitem":"option",a=i.isSafari?"aria-current":"aria-selected",u=function(S){var m=new E(S);m.$maxLines=4;var $=new x(m);return $.setHighlightActiveLine(!1),$.setShowPrintMargin(!1),$.renderer.setShowGutter(!1),$.renderer.setHighlightGutterLine(!1),$.$mouseHandler.$focusTimeout=0,$.$highlightTagPending=!0,$},y=function(){function S(m){var $=r.createElement("div"),d=u($);m&&m.appendChild($),$.style.display="none",d.renderer.content.style.cursor="default",d.renderer.setStyle("ace_autocomplete"),d.renderer.$textLayer.element.setAttribute("role",e),d.renderer.$textLayer.element.setAttribute("aria-roledescription",t("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),d.renderer.$textLayer.element.setAttribute("aria-label",t("autocomplete.popup.aria-label","Autocomplete suggestions")),d.renderer.textarea.setAttribute("aria-hidden","true"),d.setOption("displayIndentGuides",!1),d.setOption("dragDelay",150);var h=function(){};d.focus=h,d.$isFocused=!0,d.renderer.$cursorLayer.restartTimer=h,d.renderer.$cursorLayer.element.style.opacity="0",d.renderer.$maxLines=8,d.renderer.$keepTextAreaAtCursor=!1,d.setHighlightActiveLine(!1),d.session.highlight(""),d.session.$searchHighlight.clazz="ace_highlight-marker",d.on("mousedown",function(c){var g=c.getDocumentPosition();d.selection.moveToPosition(g),v.start.row=v.end.row=g.row,c.stop();});var w,C=new M(-1,0,-1,1/0),v=new M(-1,0,-1,1/0);v.id=d.session.addMarker(v,"ace_active-line","fullLine"),d.setSelectOnHover=function(c){c?C.id&&(d.session.removeMarker(C.id),C.id=null):C.id=d.session.addMarker(C,"ace_line-hover","fullLine");},d.setSelectOnHover(!1),d.on("mousemove",function(c){if(!w){w=c;return}if(!(w.x==c.x&&w.y==c.y)){w=c,w.scrollTop=d.renderer.scrollTop,d.isMouseOver=!0;var g=w.getDocumentPosition().row;C.start.row!=g&&(C.id||d.setRow(g),f(g));}}),d.renderer.on("beforeRender",function(){if(w&&C.start.row!=-1){w.$pos=null;var c=w.getDocumentPosition().row;C.id||d.setRow(c),f(c,!0);}}),d.renderer.on("afterRender",function(){var c=d.getRow(),g=d.renderer.$textLayer,A=g.element.childNodes[c-g.config.firstRow],k=document.activeElement;if(A!==d.selectedNode&&d.selectedNode&&(r.removeCssClass(d.selectedNode,"ace_selected"),k.removeAttribute("aria-activedescendant"),d.selectedNode.removeAttribute(a),d.selectedNode.removeAttribute("id")),d.selectedNode=A,A){r.addCssClass(A,"ace_selected");var R=n(c);A.id=R,g.element.setAttribute("aria-activedescendant",R),k.setAttribute("aria-activedescendant",R),A.setAttribute("role",o),A.setAttribute("aria-roledescription",t("autocomplete.popup.item.aria-roledescription","item")),A.setAttribute("aria-label",d.getData(c).caption||d.getData(c).value),A.setAttribute("aria-setsize",d.data.length),A.setAttribute("aria-posinset",c+1),A.setAttribute("aria-describedby","doc-tooltip"),A.setAttribute(a,"true");}});var b=function(){f(-1);},f=function(c,g){c!==C.start.row&&(C.start.row=C.end.row=c,g||d.session._emit("changeBackMarker"),d._emit("changeHoverMarker"));};d.getHoveredRow=function(){return C.start.row},s.addListener(d.container,"mouseout",function(){d.isMouseOver=!1,b();}),d.on("hide",b),d.on("changeSelection",b),d.session.doc.getLength=function(){return d.data.length},d.session.doc.getLine=function(c){var g=d.data[c];return typeof g=="string"?g:g&&g.value||""};var p=d.session.bgTokenizer;return p.$tokenizeRow=function(c){var g=d.data[c],A=[];if(!g)return A;typeof g=="string"&&(g={value:g});var k=g.caption||g.value||g.name;function R(B,z){B&&A.push({type:(g.className||"")+(z||""),value:B});}for(var _=k.toLowerCase(),D=(d.filterText||"").toLowerCase(),I=0,F=0,N=0;N<=D.length;N++)if(N!=F&&(g.matchMask&1<<N||N==D.length)){var O=D.slice(F,N);F=N;var W=_.indexOf(O,I);if(W==-1)continue;R(k.slice(I,W),""),I=W+O.length,R(k.slice(W,I),"completion-highlight");}return R(k.slice(I,k.length),""),A.push({type:"completion-spacer",value:" "}),g.meta&&A.push({type:"completion-meta",value:g.meta}),g.message&&A.push({type:"completion-message",value:g.message}),A},p.$updateOnChange=h,p.start=h,d.session.$computeWidth=function(){return this.screenWidth=0},d.isOpen=!1,d.isTopdown=!1,d.autoSelect=!0,d.filterText="",d.isMouseOver=!1,d.data=[],d.setData=function(c,g){d.filterText=g||"",d.setValue(l.stringRepeat(`
1004
+ `,c.length),-1),d.data=c||[],d.setRow(0);},d.getData=function(c){return d.data[c]},d.getRow=function(){return v.start.row},d.setRow=function(c){c=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,c)),v.start.row!=c&&(d.selection.clearSelection(),v.start.row=v.end.row=c||0,d.session._emit("changeBackMarker"),d.moveCursorTo(c||0,0),d.isOpen&&d._signal("select"));},d.on("changeSelection",function(){d.isOpen&&d.setRow(d.selection.lead.row),d.renderer.scrollCursorIntoView();}),d.hide=function(){this.container.style.display="none",d.anchorPos=null,d.anchor=null,d.isOpen&&(d.isOpen=!1,this._signal("hide"));},d.tryShow=function(c,g,A,k){if(!k&&d.isOpen&&d.anchorPos&&d.anchor&&d.anchorPos.top===c.top&&d.anchorPos.left===c.left&&d.anchor===A)return !0;var R=this.container,_=window.innerHeight,D=window.innerWidth,I=this.renderer,F=I.$maxLines*g*1.4,N={top:0,bottom:0,left:0},O=_-c.top-3*this.$borderSize-g,W=c.top-3*this.$borderSize;A||(W<=O||O>=F?A="bottom":A="top"),A==="top"?(N.bottom=c.top-this.$borderSize,N.top=N.bottom-F):A==="bottom"&&(N.top=c.top+g+this.$borderSize,N.bottom=N.top+F);var B=N.top>=0&&N.bottom<=_;if(!k&&!B)return !1;B?I.$maxPixelHeight=null:A==="top"?I.$maxPixelHeight=W:I.$maxPixelHeight=O,A==="top"?(R.style.top="",R.style.bottom=_-N.bottom+"px",d.isTopdown=!1):(R.style.top=N.top+"px",R.style.bottom="",d.isTopdown=!0),R.style.display="";var z=c.left;return z+R.offsetWidth>D&&(z=D-R.offsetWidth),R.style.left=z+"px",R.style.right="",d.isOpen||(d.isOpen=!0,this._signal("show"),w=null),d.anchorPos=c,d.anchor=A,!0},d.show=function(c,g,A){this.tryShow(c,g,A?"bottom":void 0,!0);},d.goTo=function(c){var g=this.getRow(),A=this.session.getLength()-1;switch(c){case"up":g=g<=0?A:g-1;break;case"down":g=g>=A?-1:g+1;break;case"start":g=0;break;case"end":g=A;break}this.setRow(g);},d.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},d.$imageSize=0,d.$borderSize=1,d}return S}();r.importCssString(`
204
1005
  .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
205
1006
  background-color: #CAD6FA;
206
1007
  z-index: 1;
@@ -292,6 +1093,174 @@ var $e=a((Ie,re)=>{ace.define("ace/mode/jsdoc_comment_highlight_rules",["require
292
1093
  animation: none;
293
1094
  }
294
1095
  }
295
- `,"autocompletion.css",!1),T.AcePopup=A,T.$singleLineEditor=C,T.getAriaId=f;});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(a,T,L){var R=function(){function w(S){this.editor=S,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv);}return w.prototype.setScreenReaderContent=function(S){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var u=this.popup.getRow(),v=this.popup.renderer.$textLayer,p=v.element.childNodes[u-v.config.firstRow];if(p){for(var b="doc-tooltip ",f=0;f<this._lines.length;f++)b+="ace-inline-screenreader-line-".concat(f," ");p.setAttribute("aria-describedby",b);}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=S.split(/\r\n|\r|\n/);var d=this.createCodeBlock();this.screenReaderDiv.appendChild(d);},w.prototype.destroy=function(){this.screenReaderDiv.remove();},w.prototype.createCodeBlock=function(){var S=document.createElement("pre");S.setAttribute("id","ace-inline-screenreader");for(var d=0;d<this._lines.length;d++){var u=document.createElement("code");u.setAttribute("id","ace-inline-screenreader-line-".concat(d));var v=document.createTextNode(this._lines[d]);u.appendChild(v),S.appendChild(u);}return S},w}();T.AceInlineScreenReader=R;});ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(a,T,L){var R=a("../snippets").snippetManager,w=a("./inline_screenreader").AceInlineScreenReader,S=function(){function d(){this.editor=null;}return d.prototype.show=function(u,v,p){if(p=p||"",u&&this.editor&&this.editor!==u&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!u||!v)return !1;this.inlineScreenReader||(this.inlineScreenReader=new w(u));var b=v.snippet?R.getDisplayTextForSnippet(u,v.snippet):v.value;return v.hideInlinePreview||!b||!b.startsWith(p)?!1:(this.editor=u,this.inlineScreenReader.setScreenReaderContent(b),b=b.slice(p.length),b===""?u.removeGhostText():u.setGhostText(b),!0)},d.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},d.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},d.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null);},d}();T.AceInline=S;});ace.define("ace/autocomplete/util",["require","exports","module"],function(a,T,L){T.parForEach=function(w,S,d){var u=0,v=w.length;v===0&&d();for(var p=0;p<v;p++)S(w[p],function(b,f){u++,u===v&&d(b,f);});};var R=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;T.retrievePrecedingIdentifier=function(w,S,d){d=d||R;for(var u=[],v=S-1;v>=0&&d.test(w[v]);v--)u.push(w[v]);return u.reverse().join("")},T.retrieveFollowingIdentifier=function(w,S,d){d=d||R;for(var u=[],v=S;v<w.length&&d.test(w[v]);v++)u.push(w[v]);return u},T.getCompletionPrefix=function(w){var S=w.getCursorPosition(),d=w.session.getLine(S.row),u;return w.completers.forEach(function(v){v.identifierRegexps&&v.identifierRegexps.forEach(function(p){!u&&p&&(u=this.retrievePrecedingIdentifier(d,S.column,p));}.bind(this));}.bind(this)),u||this.retrievePrecedingIdentifier(d,S.column)},T.triggerAutocomplete=function(w,d){var d=d??w.session.getPrecedingCharacter();return w.completers.some(function(u){if(u.triggerCharacters&&Array.isArray(u.triggerCharacters))return u.triggerCharacters.includes(d)})};});ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(a,T,L){var R=a("./keyboard/hash_handler").HashHandler,w=a("./autocomplete/popup").AcePopup,S=a("./autocomplete/inline").AceInline,d=a("./autocomplete/popup").getAriaId,u=a("./autocomplete/util"),v=a("./lib/lang"),p=a("./lib/dom"),b=a("./snippets").snippetManager,f=a("./config"),y=a("./lib/event"),m=a("./lib/scroll").preventParentScroll,k=function(c,i){i.completer&&i.completer.destroy();},C=function(){function c(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new R,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=v.delayedCall(function(){this.updateCompletions(!0);}.bind(this)),this.tooltipTimer=v.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=v.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=v.delayedCall(function(){this.stickySelection=!0;}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=v.delayedCall(function(){var i=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!i||this.editor.completers.length===0||(this.completions=new I(c.completionsForLoading),this.openPopup(this.editor,i.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0));}.bind(this),this.stickySelectionDelay);}return Object.defineProperty(c,"completionsForLoading",{get:function(){return [{caption:f.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),c.prototype.$init=function(){return this.popup=new w(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(i){this.insertMatch(),i.stop();}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),y.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},c.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new S,this.inlineRenderer},c.prototype.getPopup=function(){return this.popup||this.$init()},c.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1;},c.prototype.$seen=function(i){!this.hasSeen.has(i)&&i&&i.completer&&i.completer.onSeen&&typeof i.completer.onSeen=="function"&&(i.completer.onSeen(this.editor,i),this.hasSeen.add(i));},c.prototype.$onPopupChange=function(i){if(this.inlineRenderer&&this.inlineEnabled){var e=i?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(e),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule();}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null);},c.prototype.$updateGhostText=function(i){var e=this.base.row,n=this.base.column,t=this.editor.getCursorPosition().column,o=this.editor.session.getLine(e).slice(n,t);this.inlineRenderer.show(this.editor,i,o)?this.$seen(i):this.inlineRenderer.hide();},c.prototype.$onPopupRender=function(){var i=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var e=this.popup.getFirstVisibleRow();e<=this.popup.getLastVisibleRow();e++){var n=this.popup.getData(e);n&&(!i||n.hideInlinePreview)&&this.$seen(n);}},c.prototype.$onPopupShow=function(i){this.$onPopupChange(i),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay);},c.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var i=this.editor.container.parentNode,e=[];i;)e.push(i),i.addEventListener("scroll",this.onLayoutChange,{passive:!0}),i=i.parentNode;this.$elements=e;}},c.prototype.unObserveLayoutChanges=function(){var i=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(e){e.removeEventListener("scroll",i.onLayoutChange,{passive:!0});}),this.$elements=null;},c.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip();},c.prototype.$updatePopupPosition=function(){var i=this.editor,e=i.renderer,n=e.layerConfig.lineHeight,t=e.$cursorLayer.getPixelPosition(this.base,!0);t.left-=this.popup.getTextLeftOffset();var o=i.container.getBoundingClientRect();t.top+=o.top-e.layerConfig.offset,t.left+=o.left-i.renderer.scrollLeft,t.left+=e.gutterWidth;var r={top:t.top,left:t.left};e.$ghostText&&e.$ghostTextWidget&&this.base.row===e.$ghostText.position.row&&(r.top+=e.$ghostTextWidget.el.offsetHeight);var h=i.container.getBoundingClientRect().bottom-n,g=h<r.top?{top:h,left:r.left}:r;this.popup.tryShow(g,n,"bottom")||this.popup.tryShow(t,n,"top")||this.popup.show(t,n);},c.prototype.openPopup=function(i,e,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var t=this.popup.getRow(),o=this.popup.data[t];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:d(this.popup.getRow()),inline:this.inlineEnabled}),i.keyBinding.addKeyboardHandler(this.keyboardHandler);var r;this.stickySelection&&(r=this.popup.data.indexOf(o)),(!r||r===-1)&&(r=0),this.popup.setRow(this.autoSelect?r:-1),r===t&&o!==this.completions.filtered[r]&&this.$onPopupChange();var h=this.inlineRenderer&&this.inlineEnabled;if(r===t&&h){var g=this.popup.getData(this.popup.getRow());this.$updateGhostText(g);}n||(this.popup.setTheme(i.getTheme()),this.popup.setFontSize(i.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges();},c.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges();},c.prototype.changeListener=function(i){var e=this.editor.selection.lead;(e.row!=this.base.row||e.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach();},c.prototype.blurListener=function(i){var e=document.activeElement,n=this.editor.textInput.getElement(),t=i.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(i.relatedTarget),o=this.popup&&this.popup.container;e!=n&&e.parentNode!=o&&!t&&e!=this.tooltipNode&&i.relatedTarget!=n&&this.detach();},c.prototype.mousedownListener=function(i){this.detach();},c.prototype.mousewheelListener=function(i){this.popup&&!this.popup.isMouseOver&&this.detach();},c.prototype.mouseOutListener=function(i){this.popup.isOpen&&this.$updatePopupPosition();},c.prototype.goTo=function(i){this.popup.goTo(i);},c.prototype.insertMatch=function(i,e){if(i||(i=this.popup.getData(this.popup.getRow())),!i)return !1;if(i.value==="")return this.detach();var n=this.completions,t=this.getCompletionProvider().insertMatch(this.editor,i,n.filterText,e);return this.completions==n&&this.detach(),t},c.prototype.showPopup=function(i,e){this.editor&&this.detach(),this.activated=!0,this.editor=i,i.completer!=this&&(i.completer&&i.completer.detach(),i.completer=this),i.on("changeSelection",this.changeListener),i.on("blur",this.blurListener),i.on("mousedown",this.mousedownListener),i.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,e);},c.prototype.getCompletionProvider=function(i){return this.completionProvider||(this.completionProvider=new A(i)),this.completionProvider},c.prototype.gatherCompletions=function(i,e){return this.getCompletionProvider().gatherCompletions(i,e)},c.prototype.updateCompletions=function(i,e){if(i&&this.base&&this.completions){var t=this.editor.getCursorPosition(),o=this.editor.session.getTextRange({start:this.base,end:t});if(o==this.completions.filterText)return;if(this.completions.setFilter(o),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==o&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,o,i);return}if(e&&e.matches){var t=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(t.row,t.column),this.base.$insertRight=!0,this.completions=new I(e.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",i)}var n=this.editor.getSession(),t=this.editor.getCursorPosition(),o=u.getCompletionPrefix(this.editor);this.base=n.doc.createAnchor(t.row,t.column-o.length),this.base.$insertRight=!0;var r={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:o,pos:t}).provideCompletions(this.editor,r,function(h,g,l){var x=g.filtered,s=u.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),l){if(!x.length){var _=!this.autoShown&&this.emptyMessage;if(typeof _=="function"&&(_=this.emptyMessage(s)),_){var M=[{caption:_,value:""}];this.completions=new I(M),this.openPopup(this.editor,s,i),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(x.length==1&&x[0].value==s&&!x[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&x.length==1)return this.insertMatch(x[0])}this.completions=!l&&this.showLoadingState?new I(c.completionsForLoading.concat(x),g.filterText):g,this.openPopup(this.editor,s,i),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!l);}.bind(this)),this.showLoadingState&&!this.autoShown&&!(this.popup&&this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2);},c.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu();},c.prototype.updateDocTooltip=function(){var i=this.popup,e=this.completions.filtered,n=e&&(e[i.getHoveredRow()]||e[i.getRow()]),t=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var o=this.editor.completers.length,r=0;r<o;r++){var h=this.editor.completers[r];if(h.getDocTooltip&&n.completerId===h.id){t=h.getDocTooltip(n);break}}if(!t&&typeof n!="string"&&(t=n),typeof t=="string"&&(t={docText:t}),!t||!(t.docHTML||t.docText))return this.hideDocTooltip();this.showDocTooltip(t);},c.prototype.showDocTooltip=function(i){this.tooltipNode||(this.tooltipNode=p.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",m));var e=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(e.isDark?"ace_dark ":"")+(e.cssClass||"");var n=this.tooltipNode;i.docHTML?n.innerHTML=i.docHTML:i.docText&&(n.textContent=i.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var t=this.popup,o=t.container.getBoundingClientRect();n.style.top=t.container.style.top,n.style.bottom=t.container.style.bottom,n.style.display="block",window.innerWidth-o.right<320?o.left<320?t.isTopdown?(n.style.top=o.bottom+"px",n.style.left=o.left+"px",n.style.right="",n.style.bottom=""):(n.style.top=t.container.offsetTop-n.offsetHeight+"px",n.style.left=o.left+"px",n.style.right="",n.style.bottom=""):(n.style.right=window.innerWidth-o.left+"px",n.style.left=""):(n.style.left=o.right+1+"px",n.style.right="");},c.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var i=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==i&&this.editor.focus(),this.tooltipNode=null,i.parentNode&&i.parentNode.removeChild(i);}},c.prototype.onTooltipClick=function(i){for(var e=i.target;e&&e!=this.tooltipNode;){if(e.nodeName=="A"&&e.href){e.rel="noreferrer",e.target="_blank";break}e=e.parentNode;}},c.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var i=this.popup.container;i&&i.parentNode&&i.parentNode.removeChild(i);}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",k),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null;},c}();C.prototype.commands={Up:function(c){c.completer.goTo("up");},Down:function(c){c.completer.goTo("down");},"Ctrl-Up|Ctrl-Home":function(c){c.completer.goTo("start");},"Ctrl-Down|Ctrl-End":function(c){c.completer.goTo("end");},Esc:function(c){c.completer.detach();},Return:function(c){return c.completer.insertMatch()},"Shift-Return":function(c){c.completer.insertMatch(null,{deleteSuffix:!0});},Tab:function(c){var i=c.completer.insertMatch();if(!i&&!c.tabstopManager)c.completer.goTo("down");else return i},Backspace:function(c){c.execCommand("backspace");var i=u.getCompletionPrefix(c);!i&&c.completer&&c.completer.detach();},PageUp:function(c){c.completer.popup.gotoPageUp();},PageDown:function(c){c.completer.popup.gotoPageDown();}},C.for=function(c){return c.completer instanceof C||(c.completer&&(c.completer.destroy(),c.completer=null),f.get("sharedPopups")?(C.$sharedInstance||(C.$sharedInstance=new C),c.completer=C.$sharedInstance):(c.completer=new C,c.once("destroy",k))),c.completer},C.startCommand={name:"startAutocomplete",exec:function(c,i){var e=C.for(c);e.autoInsert=!1,e.autoSelect=!0,e.autoShown=!1,e.showPopup(c,i),e.cancelContextMenu();},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var A=function(){function c(i){this.initialPosition=i,this.active=!0;}return c.prototype.insertByIndex=function(i,e,n){return !this.completions||!this.completions.filtered?!1:this.insertMatch(i,this.completions.filtered[e],n)},c.prototype.insertMatch=function(i,e,n){if(!e)return !1;if(i.startOperation({command:{name:"insertMatch"}}),e.completer&&e.completer.insertMatch)e.completer.insertMatch(i,e);else {if(!this.completions)return !1;var t=this.completions.filterText.length,o=0;if(e.range&&e.range.start.row===e.range.end.row&&(t-=this.initialPosition.prefix.length,t+=this.initialPosition.pos.column-e.range.start.column,o+=e.range.end.column-this.initialPosition.pos.column),t||o){var r;i.selection.getAllRanges?r=i.selection.getAllRanges():r=[i.getSelectionRange()];for(var h=0,g;g=r[h];h++)g.start.column-=t,g.end.column+=o,i.session.remove(g);}e.snippet?b.insertSnippet(i,e.snippet):this.$insertString(i,e),e.completer&&e.completer.onInsert&&typeof e.completer.onInsert=="function"&&e.completer.onInsert(i,e),e.command&&e.command==="startAutocomplete"&&i.execCommand(e.command);}return i.endOperation(),!0},c.prototype.$insertString=function(i,e){var n=e.value||e;i.execCommand("insertstring",n);},c.prototype.gatherCompletions=function(i,e){var n=i.getSession(),t=i.getCursorPosition(),o=u.getCompletionPrefix(i),r=[];this.completers=i.completers;var h=i.completers.length;return i.completers.forEach(function(g,l){g.getCompletions(i,n,t,o,function(x,s){g.hideInlinePreview&&(s=s.map(function(_){return Object.assign(_,{hideInlinePreview:g.hideInlinePreview})})),!x&&s&&(r=r.concat(s)),e(null,{prefix:u.getCompletionPrefix(i),matches:r,finished:--h===0});});}),!0},c.prototype.provideCompletions=function(i,e,n){var t=function(g){var l=g.prefix,x=g.matches;this.completions=new I(x),e.exactMatch&&(this.completions.exactMatch=!0),e.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(l),(g.finished||this.completions.filtered.length)&&n(null,this.completions,g.finished);}.bind(this),o=!0,r=null;if(this.gatherCompletions(i,function(g,l){if(this.active){g&&(n(g,[],!0),this.detach());var x=l.prefix;if(x.indexOf(l.prefix)===0){if(o){r=l;return}t(l);}}}.bind(this)),o=!1,r){var h=r;r=null,t(h);}},c.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(i){typeof i.cancel=="function"&&i.cancel();});},c}(),I=function(){function c(i,e){this.all=i,this.filtered=i,this.filterText=e||"",this.exactMatch=!1,this.ignoreCaption=!1;}return c.prototype.setFilter=function(i){if(i.length>this.filterText&&i.lastIndexOf(this.filterText,0)===0)var e=this.filtered;else var e=this.all;this.filterText=i,e=this.filterCompletions(e,this.filterText),e=e.sort(function(t,o){return o.exactMatch-t.exactMatch||o.$score-t.$score||(t.caption||t.value).localeCompare(o.caption||o.value)});var n=null;e=e.filter(function(t){var o=t.snippet||t.caption||t.value;return o===n?!1:(n=o,!0)}),this.filtered=e;},c.prototype.filterCompletions=function(i,e){var n=[],t=e.toUpperCase(),o=e.toLowerCase();e:for(var r=0,h;h=i[r];r++){var g=!this.ignoreCaption&&h.caption||h.value||h.snippet;if(g){var l=-1,x=0,s=0,_,M;if(this.exactMatch){if(e!==g.substr(0,e.length))continue e}else {var E=g.toLowerCase().indexOf(o);if(E>-1)s=E;else for(var $=0;$<e.length;$++){var N=g.indexOf(o[$],l+1),P=g.indexOf(t[$],l+1);if(_=N>=0&&(P<0||N<P)?N:P,_<0)continue e;M=_-l-1,M>0&&(l===-1&&(s+=10),s+=M,x=x|1<<$),l=_;}}h.matchMask=x,h.exactMatch=s?0:1,h.$score=(h.score||0)-s,n.push(h);}}return n},c}();T.Autocomplete=C,T.CompletionProvider=A,T.FilteredList=I;});ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(a,T,L){var R=a("../range").Range,w=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function S(u,v){var p=u.getTextRange(R.fromPoints({row:0,column:0},v));return p.split(w).length-1}function d(u,v){var p=S(u,v),b=u.getValue().split(w),f=Object.create(null),y=b[p];return b.forEach(function(m,k){if(!(!m||m===y)){var C=Math.abs(p-k),A=b.length-C;f[m]?f[m]=Math.max(A,f[m]):f[m]=A;}}),f}T.getCompletions=function(u,v,p,b,f){var y=d(v,p),m=Object.keys(y);f(null,m.map(function(k){return {caption:k,value:k,score:y[k],meta:"local"}}));};});ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(a,T,L){var R=a("../snippets").snippetManager,w=a("../autocomplete").Autocomplete,S=a("../config"),d=a("../lib/lang"),u=a("../autocomplete/util"),v=a("../autocomplete/text_completer"),p={getCompletions:function(t,o,r,h,g){if(o.$mode.completer)return o.$mode.completer.getCompletions(t,o,r,h,g);var l=t.session.getState(r.row),x=o.$mode.getCompletions(l,o,r,h);x=x.map(function(s){return s.completerId=p.id,s}),g(null,x);},id:"keywordCompleter"},b=function(t){var o={};return t.replace(/\${(\d+)(:(.*?))?}/g,function(r,h,g,l){return o[h]=l||""}).replace(/\$(\d+?)/g,function(r,h){return o[h]})},f={getCompletions:function(t,o,r,h,g){var l=[],x=o.getTokenAt(r.row,r.column);x&&x.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?l.push("html-tag"):l=R.getActiveScopes(t);var s=R.snippetMap,_=[];l.forEach(function(M){for(var E=s[M]||[],$=E.length;$--;){var N=E[$],P=N.name||N.tabTrigger;P&&_.push({caption:P,snippet:N.content,meta:N.tabTrigger&&!N.name?N.tabTrigger+"\u21E5 ":"snippet",completerId:f.id});}},this),g(null,_);},getDocTooltip:function(t){t.snippet&&!t.docHTML&&(t.docHTML=["<b>",d.escapeHTML(t.caption),"</b>","<hr></hr>",d.escapeHTML(b(t.snippet))].join(""));},id:"snippetCompleter"},y=[f,v,p];T.setCompleters=function(t){y.length=0,t&&y.push.apply(y,t);},T.addCompleter=function(t){y.push(t);},T.textCompleter=v,T.keyWordCompleter=p,T.snippetCompleter=f;var m={name:"expandSnippet",exec:function(t){return R.expandWithTab(t)},bindKey:"Tab"},k=function(t,o){C(o.session.$mode);},C=function(t){typeof t=="string"&&(t=S.$modes[t]),t&&(R.files||(R.files={}),A(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(C));},A=function(t,o){!o||!t||R.files[t]||(R.files[t]={},S.loadModule(o,function(r){r&&(R.files[t]=r,!r.snippets&&r.snippetText&&(r.snippets=R.parseSnippetFile(r.snippetText)),R.register(r.snippets||[],r.scope),r.includeScopes&&(R.snippetMap[r.scope].includeScopes=r.includeScopes,r.includeScopes.forEach(function(h){C("ace/mode/"+h);})));}));},I=function(t){var o=t.editor,r=o.completer&&o.completer.activated;if(t.command.name==="backspace")r&&!u.getCompletionPrefix(o)&&o.completer.detach();else if(t.command.name==="insertstring"&&!r){c=t;var h=t.editor.$liveAutocompletionDelay;h?i.delay(h):e(t);}},c,i=d.delayedCall(function(){e(c);},0),e=function(t){var o=t.editor,r=u.getCompletionPrefix(o),h=t.args,g=u.triggerAutocomplete(o,h);if(r&&r.length>=o.$liveAutocompletionThreshold||g){var l=w.for(o);l.autoShown=!0,l.showPopup(o);}},n=a("../editor").Editor;a("../config").defineOptions(n.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:y),this.commands.addCommand(w.startCommand)):this.commands.removeCommand(w.startCommand);},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:y),this.commands.on("afterExec",I)):this.commands.off("afterExec",I);},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(t){t?(this.commands.addCommand(m),this.on("changeMode",k),k(null,this)):(this.commands.removeCommand(m),this.off("changeMode",k));},value:!1}});});(function(){ace.require(["ace/ext/language_tools"],function(a){typeof ae=="object"&&typeof Pe=="object"&&ae&&(ae.exports=a);});})();});var oe=styled(ne)(({theme:a})=>({borderBottom:`1px solid ${alpha(a.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(a.palette.grey[500],.32)}`,padding:16})),_e=styled(ne)(({theme:a})=>({border:`1px solid ${alpha(a.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:a.palette.grey[100]}})),Re=styled(ne)(({theme:a})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:"#fff",padding:"8px 16px",borderRadius:8,border:`1px solid ${alpha(a.palette.grey[500],.24)}`,cursor:"pointer",color:a.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${a.palette.primary.main}`,backgroundColor:alpha(a.palette.primary.main,.05)}})),Ae=styled(ne)(({theme:a})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(a.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:a.palette.text.disabled,fontSize:12}}})),ge=styled(at)({padding:0});var ht=({openPopover:a,handleClose:T,argumentsValues:L,filter:R,onExecute:w})=>{let[S,d]=useState([]),u=(p,b)=>{if(b&&b!=="")S.filter(y=>y.name===p).length>0?d(S.map(y=>y.name===p?{name:p,value:b}:y)):d([...S||[],{name:p,value:b}]);else {let f=S.filter(y=>y.name===p);d(f);}},v=()=>{let p=R||"";return S.forEach(b=>{p=p.replace(`$ARG[${b.name}]`,`'${b.value}'`);}),p};return jsxs(lt,{open:!!a,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:a,onClose:T,title:"Pr\xE9-visualizar",children:[jsx(ze,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(oe,{children:L?.map((p,b)=>jsx(pt,{name:p,label:p,size:"small",onChange:f=>u(p,f.target.value),required:!0},b))}),jsxs(ne,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(Ee,{variant:"outlined",color:"inherit",size:"small",onClick:T,children:"Cancelar"}),jsx(Ee,{variant:"contained",color:"primary",size:"small",startIcon:jsx(me,{icon:"PLAY_SIMPLE"}),onClick:()=>w(v()),disabled:S.length<L.length,children:"Executar"})]})]})},Le=ht;b($e());b(Fe());b(Oe());var yt=({openPopover:a,handleClose:T,addItem:L})=>{let[R,w]=useState("");return jsxs(lt,{open:!!a,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:a,onClose:T,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(ze,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(oe,{children:jsx(pt,{value:R,onChange:d=>w(d.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(ne,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(Ee,{variant:"outlined",color:"inherit",size:"small",onClick:T,children:"Cancelar"}),jsx(Ee,{variant:"contained",color:"primary",size:"small",startIcon:jsx(me,{icon:"SAVE_MARK"}),disabled:!R||R==="",onClick:()=>{L(R),T(),w("");},children:"Salvar"})]})]})},He=yt;var Tt=({label:a,itens:T,argumentsValues:L,fields:R,addItem:w,removeItem:S,insertItemSQL:d})=>{let[u,v]=useState(!1),p=wt(),b=()=>{v(!u);},f=(m,k)=>{m.stopPropagation(),S&&S(k);},y=m=>{d(L?` $ARG[${m}]`:R?` this.${m}`:` ${m}`);};return jsxs(ne,{children:[jsxs(ne,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(ge,{edge:"end",onClick:b,children:jsx(me,{icon:u?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(ze,{variant:"overline",color:"text.primary",children:a}),w&&jsxs(Fragment,{children:[jsx(ge,{edge:"end",onClick:p.onOpen,children:jsx(me,{icon:"SIMPLE_ADD"})}),jsx(He,{addItem:w,handleClose:p.onClose,openPopover:p.open})]})]}),u&&jsx(ne,{spacing:.5,children:jsx(St,{sx:{maxHeight:150},children:T?.map((m,k)=>jsxs(Re,{direction:"row",justifyContent:"space-between",onClick:()=>y(m),children:[jsx(ze,{variant:"caption",textAlign:"center",width:"100%",children:m}),S&&jsx(at,{edge:"end",onClick:C=>f(C,m),children:jsx(me,{icon:"DELETE_MARK_BUTTON_02"})})]},k))})})]})},q=Tt;var Lt=({fieldsSelect:a,argumentsValues:T,onChangeArguments:L,sql:R,setSql:w,setFilterRule:S})=>{let[d,u]=useState(),{setValue:v}=useFormContext(),[p,b]=useState(1),[f,y]=useState(),m=c=>{f.session.insert(p,` ${c} `);},k=c=>{L([...T||[],c]);},C=c=>{L(T?.filter(i=>i!==c));},A=c=>{w(c[0]),S(c[0]),v("groups",void 0);},I=d?a.filter(c=>c.id.toString().toLocaleLowerCase().includes(d)||c.description.toString().toLocaleLowerCase().includes(d)||c.name?.toString().toLocaleLowerCase().includes(d)):a;return jsxs(ne,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(_e,{children:[jsx(Et,{value:d,trigger:"change",onSearch:c=>u(c?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(q,{label:"Campos",fields:!0,itens:I.map(c=>c.name),insertItemSQL:m}),jsx(q,{label:"Argumentos",argumentsValues:!0,itens:T,addItem:k,removeItem:C,insertItemSQL:m}),jsx(q,{label:"Operadores",insertItemSQL:m,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(q,{label:"Filtros",fields:!0,insertItemSQL:m,itens:I.map(c=>c.name)})]}),jsx(Ae,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(Rt,{width:"100%",mode:"sql",theme:"chrome",name:"rule",fontSize:14,onChange:A,onCursorChange:c=>b(c.getCursor()),value:R,onLoad:c=>y(c),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},We=Lt;var Nt=({data:a,fields:T,isLoading:L,isError:R})=>jsxs(ne,{children:[jsx(ze,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),R&&jsx(ne,{children:"Falha ao gerar resultado"}),a&&jsx($t,{columns:T?.map(w=>({field:w,headerName:w,width:150,type:"string"})),loading:L,rows:a,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})]}),je=Nt;var Xe=styled(ne)(({theme:a})=>({border:`1px solid ${alpha(a.palette.primary.main,.32)}`,backgroundColor:alpha(a.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),Ge=styled(at)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),le=styled(ce)(()=>({width:230}));var Ut=({index:a,indexGroup:T,removeConditional:L,fieldsSelect:R})=>{let{watch:w}=useFormContext(),S=`groups.[${T}].conditionals[${a}].field`,d=`groups.[${T}].conditionals[${a}].conditional`,u=`groups.[${T}].conditionals[${a}].type`,v=`groups.[${T}].conditionals[${a}].value`,p=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],b=w(u);return jsxs(ne,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(ce,{label:"Se",name:S,size:"small",fullWidth:!0,options:R?.map(f=>({value:f.name,label:f.description}))}),jsx(ce,{label:"Estado",name:d,size:"small",fullWidth:!0,options:p}),jsx(ce,{label:"Objetivo",name:`groups.[${T}].conditionals[${a}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),b==="value"?jsx(Wt,{label:"Valor",name:v,size:"small",fullWidth:!0}):jsx(ce,{label:"Se",name:v,size:"small",fullWidth:!0,options:R?.map(f=>({value:f.name,label:f.description}))}),jsx(Ge,{color:"error",onClick:()=>{L(a);},children:jsx(me,{icon:"DELETE_MARK_BUTTON_02"})})]})},Ye=Ut;var Jt=({index:a,removeGroup:T,fieldsSelect:L})=>{let{control:R}=useFormContext(),w=`groups.[${a}].operator`,{fields:S,append:d,remove:u}=useFieldArray({name:`groups.${a}.conditionals`,control:R});return jsx(Kt,{name:`GRUPO ${a+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(le,{name:w,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>T(a),children:jsxs(ne,{spacing:1.5,alignItems:"flex-start",children:[S.map((v,p)=>jsx(Ye,{index:p,indexGroup:a,removeConditional:b=>u(b),fieldsSelect:L},v.id)),jsx(Yt,{actionType:"NEW",onClick:()=>d({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},Ke=Jt;var nn=({fieldsSelect:a})=>{let{control:T}=useFormContext(),{fields:L,append:R,remove:w}=useFieldArray({name:"groups",control:T});return jsxs(ne,{gap:1.5,children:[jsxs(Xe,{direction:"row",spacing:1.5,children:[jsx(ze,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(ne,{children:jsx(le,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(ze,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),L.map((S,d)=>jsx(Ke,{index:d,removeGroup:u=>w(u),fieldsSelect:a},S.id)),jsx(Ee,{size:"large",color:"inherit",startIcon:jsx(me,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{R({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},Ze=nn;var qe=styled(ne)(({theme:a})=>({border:`1px solid ${alpha(a.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),et=styled(ne)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),Se=styled(rn)(()=>({lineHeight:"1em"})),tt=styled(ne)(()=>({padding:12}));var hn=({argumentsValues:a,onChangeArguments:T,fieldsSelect:L,onChangeRule:R,onChangeSqlProcessed:w,defaultMode:S,defaultFilter:d,dataPreview:u,errorPreview:v,loadingPreview:p})=>{let[b,f]=useState(d||""),[y,m]=dn(),[k,C]=useState(S||"simple"),{watch:A,setValue:I}=useFormContext(),c=wt(),i=A("operator"),e=A("groups");useEffect(()=>()=>{I("config",{});},[]);let n=(r,h)=>{if(h==="advanced"){let g=a$1(e,i);f(g),w(g),R(g);}C(h);},t=r=>{y||k==="simple"||a.length===0?m():c.onOpen(r);},o=r=>{m(),w(r);};return jsx(Fragment,{children:jsxs(qe,{children:[jsxs(et,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(cn,{color:"primary",value:k,size:"small",exclusive:!0,onChange:n,children:[jsx(Se,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(Se,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(Ee,{variant:"outlined",color:"inherit",onClick:r=>t(r),startIcon:!y&&jsx(me,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:y?"Voltar":"Executar"}),!!c.open&&jsx(Le,{handleClose:c.onClose,openPopover:c.open,argumentsValues:a,filter:b,onExecute:r=>o(r)})]}),jsx(tt,{children:y?jsx(je,{fields:L.map(r=>r.name),data:u,isError:v,isLoading:p}):jsx(Fragment,{children:k==="simple"?jsx(Ze,{fieldsSelect:L,sql:b,setSql:f}):jsx(We,{fieldsSelect:L,argumentsValues:a,onChangeArguments:T,sql:b,setSql:f,setFilterRule:R})})})]})})},lr=hn;
1096
+ `,"autocompletion.css",!1),T.AcePopup=y,T.$singleLineEditor=u,T.getAriaId=n;});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(L,T,H){var E=function(){function x(M){this.editor=M,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv);}return x.prototype.setScreenReaderContent=function(M){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var l=this.popup.getRow(),r=this.popup.renderer.$textLayer,t=r.element.childNodes[l-r.config.firstRow];if(t){for(var i="doc-tooltip ",n=0;n<this._lines.length;n++)i+="ace-inline-screenreader-line-".concat(n," ");t.setAttribute("aria-describedby",i);}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=M.split(/\r\n|\r|\n/);var s=this.createCodeBlock();this.screenReaderDiv.appendChild(s);},x.prototype.destroy=function(){this.screenReaderDiv.remove();},x.prototype.createCodeBlock=function(){var M=document.createElement("pre");M.setAttribute("id","ace-inline-screenreader");for(var s=0;s<this._lines.length;s++){var l=document.createElement("code");l.setAttribute("id","ace-inline-screenreader-line-".concat(s));var r=document.createTextNode(this._lines[s]);l.appendChild(r),M.appendChild(l);}return M},x}();T.AceInlineScreenReader=E;});ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(L,T,H){var E=L("../snippets").snippetManager,x=L("./inline_screenreader").AceInlineScreenReader,M=function(){function s(){this.editor=null;}return s.prototype.show=function(l,r,t){if(t=t||"",l&&this.editor&&this.editor!==l&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!l||!r)return !1;this.inlineScreenReader||(this.inlineScreenReader=new x(l));var i=r.snippet?E.getDisplayTextForSnippet(l,r.snippet):r.value;return r.hideInlinePreview||!i||!i.startsWith(t)?!1:(this.editor=l,this.inlineScreenReader.setScreenReaderContent(i),i=i.slice(t.length),i===""?l.removeGhostText():l.setGhostText(i),!0)},s.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},s.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},s.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null);},s}();T.AceInline=M;});ace.define("ace/autocomplete/util",["require","exports","module"],function(L,T,H){T.parForEach=function(x,M,s){var l=0,r=x.length;r===0&&s();for(var t=0;t<r;t++)M(x[t],function(i,n){l++,l===r&&s(i,n);});};var E=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;T.retrievePrecedingIdentifier=function(x,M,s){s=s||E;for(var l=[],r=M-1;r>=0&&s.test(x[r]);r--)l.push(x[r]);return l.reverse().join("")},T.retrieveFollowingIdentifier=function(x,M,s){s=s||E;for(var l=[],r=M;r<x.length&&s.test(x[r]);r++)l.push(x[r]);return l},T.getCompletionPrefix=function(x){var M=x.getCursorPosition(),s=x.session.getLine(M.row),l;return x.completers.forEach(function(r){r.identifierRegexps&&r.identifierRegexps.forEach(function(t){!l&&t&&(l=this.retrievePrecedingIdentifier(s,M.column,t));}.bind(this));}.bind(this)),l||this.retrievePrecedingIdentifier(s,M.column)},T.triggerAutocomplete=function(x,s){var s=s??x.session.getPrecedingCharacter();return x.completers.some(function(l){if(l.triggerCharacters&&Array.isArray(l.triggerCharacters))return l.triggerCharacters.includes(s)})};});ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(L,T,H){var E=L("./keyboard/hash_handler").HashHandler,x=L("./autocomplete/popup").AcePopup,M=L("./autocomplete/inline").AceInline,s=L("./autocomplete/popup").getAriaId,l=L("./autocomplete/util"),r=L("./lib/lang"),t=L("./lib/dom"),i=L("./snippets").snippetManager,n=L("./config"),e=L("./lib/event"),o=L("./lib/scroll").preventParentScroll,a=function(m,$){$.completer&&$.completer.destroy();},u=function(){function m(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new E,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=r.delayedCall(function(){this.updateCompletions(!0);}.bind(this)),this.tooltipTimer=r.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=r.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=r.delayedCall(function(){this.stickySelection=!0;}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=r.delayedCall(function(){var $=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!$||this.editor.completers.length===0||(this.completions=new S(m.completionsForLoading),this.openPopup(this.editor,$.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0));}.bind(this),this.stickySelectionDelay);}return Object.defineProperty(m,"completionsForLoading",{get:function(){return [{caption:n.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),m.prototype.$init=function(){return this.popup=new x(this.parentNode||document.body||document.documentElement),this.popup.on("click",function($){this.insertMatch(),$.stop();}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),e.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},m.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new M,this.inlineRenderer},m.prototype.getPopup=function(){return this.popup||this.$init()},m.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1;},m.prototype.$seen=function($){!this.hasSeen.has($)&&$&&$.completer&&$.completer.onSeen&&typeof $.completer.onSeen=="function"&&($.completer.onSeen(this.editor,$),this.hasSeen.add($));},m.prototype.$onPopupChange=function($){if(this.inlineRenderer&&this.inlineEnabled){var d=$?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(d),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule();}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null);},m.prototype.$updateGhostText=function($){var d=this.base.row,h=this.base.column,w=this.editor.getCursorPosition().column,C=this.editor.session.getLine(d).slice(h,w);this.inlineRenderer.show(this.editor,$,C)?this.$seen($):this.inlineRenderer.hide();},m.prototype.$onPopupRender=function(){var $=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var d=this.popup.getFirstVisibleRow();d<=this.popup.getLastVisibleRow();d++){var h=this.popup.getData(d);h&&(!$||h.hideInlinePreview)&&this.$seen(h);}},m.prototype.$onPopupShow=function($){this.$onPopupChange($),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay);},m.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var $=this.editor.container.parentNode,d=[];$;)d.push($),$.addEventListener("scroll",this.onLayoutChange,{passive:!0}),$=$.parentNode;this.$elements=d;}},m.prototype.unObserveLayoutChanges=function(){var $=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(d){d.removeEventListener("scroll",$.onLayoutChange,{passive:!0});}),this.$elements=null;},m.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip();},m.prototype.$updatePopupPosition=function(){var $=this.editor,d=$.renderer,h=d.layerConfig.lineHeight,w=d.$cursorLayer.getPixelPosition(this.base,!0);w.left-=this.popup.getTextLeftOffset();var C=$.container.getBoundingClientRect();w.top+=C.top-d.layerConfig.offset,w.left+=C.left-$.renderer.scrollLeft,w.left+=d.gutterWidth;var v={top:w.top,left:w.left};d.$ghostText&&d.$ghostTextWidget&&this.base.row===d.$ghostText.position.row&&(v.top+=d.$ghostTextWidget.el.offsetHeight);var b=$.container.getBoundingClientRect().bottom-h,f=b<v.top?{top:b,left:v.left}:v;this.popup.tryShow(f,h,"bottom")||this.popup.tryShow(w,h,"top")||this.popup.show(w,h);},m.prototype.openPopup=function($,d,h){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var w=this.popup.getRow(),C=this.popup.data[w];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),$.keyBinding.addKeyboardHandler(this.keyboardHandler);var v;this.stickySelection&&(v=this.popup.data.indexOf(C)),(!v||v===-1)&&(v=0),this.popup.setRow(this.autoSelect?v:-1),v===w&&C!==this.completions.filtered[v]&&this.$onPopupChange();var b=this.inlineRenderer&&this.inlineEnabled;if(v===w&&b){var f=this.popup.getData(this.popup.getRow());this.$updateGhostText(f);}h||(this.popup.setTheme($.getTheme()),this.popup.setFontSize($.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges();},m.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges();},m.prototype.changeListener=function($){var d=this.editor.selection.lead;(d.row!=this.base.row||d.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach();},m.prototype.blurListener=function($){var d=document.activeElement,h=this.editor.textInput.getElement(),w=$.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains($.relatedTarget),C=this.popup&&this.popup.container;d!=h&&d.parentNode!=C&&!w&&d!=this.tooltipNode&&$.relatedTarget!=h&&this.detach();},m.prototype.mousedownListener=function($){this.detach();},m.prototype.mousewheelListener=function($){this.popup&&!this.popup.isMouseOver&&this.detach();},m.prototype.mouseOutListener=function($){this.popup.isOpen&&this.$updatePopupPosition();},m.prototype.goTo=function($){this.popup.goTo($);},m.prototype.insertMatch=function($,d){if($||($=this.popup.getData(this.popup.getRow())),!$)return !1;if($.value==="")return this.detach();var h=this.completions,w=this.getCompletionProvider().insertMatch(this.editor,$,h.filterText,d);return this.completions==h&&this.detach(),w},m.prototype.showPopup=function($,d){this.editor&&this.detach(),this.activated=!0,this.editor=$,$.completer!=this&&($.completer&&$.completer.detach(),$.completer=this),$.on("changeSelection",this.changeListener),$.on("blur",this.blurListener),$.on("mousedown",this.mousedownListener),$.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,d);},m.prototype.getCompletionProvider=function($){return this.completionProvider||(this.completionProvider=new y($)),this.completionProvider},m.prototype.gatherCompletions=function($,d){return this.getCompletionProvider().gatherCompletions($,d)},m.prototype.updateCompletions=function($,d){if($&&this.base&&this.completions){var w=this.editor.getCursorPosition(),C=this.editor.session.getTextRange({start:this.base,end:w});if(C==this.completions.filterText)return;if(this.completions.setFilter(C),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==C&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,C,$);return}if(d&&d.matches){var w=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(w.row,w.column),this.base.$insertRight=!0,this.completions=new S(d.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",$)}var h=this.editor.getSession(),w=this.editor.getCursorPosition(),C=l.getCompletionPrefix(this.editor);this.base=h.doc.createAnchor(w.row,w.column-C.length),this.base.$insertRight=!0;var v={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:C,pos:w}).provideCompletions(this.editor,v,function(b,f,p){var c=f.filtered,g=l.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),p){if(!c.length){var A=!this.autoShown&&this.emptyMessage;if(typeof A=="function"&&(A=this.emptyMessage(g)),A){var k=[{caption:A,value:""}];this.completions=new S(k),this.openPopup(this.editor,g,$),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(c.length==1&&c[0].value==g&&!c[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&c.length==1)return this.insertMatch(c[0])}this.completions=!p&&this.showLoadingState?new S(m.completionsForLoading.concat(c),f.filterText):f,this.openPopup(this.editor,g,$),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!p);}.bind(this)),this.showLoadingState&&!this.autoShown&&!(this.popup&&this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2);},m.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu();},m.prototype.updateDocTooltip=function(){var $=this.popup,d=this.completions.filtered,h=d&&(d[$.getHoveredRow()]||d[$.getRow()]),w=null;if(!h||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var C=this.editor.completers.length,v=0;v<C;v++){var b=this.editor.completers[v];if(b.getDocTooltip&&h.completerId===b.id){w=b.getDocTooltip(h);break}}if(!w&&typeof h!="string"&&(w=h),typeof w=="string"&&(w={docText:w}),!w||!(w.docHTML||w.docText))return this.hideDocTooltip();this.showDocTooltip(w);},m.prototype.showDocTooltip=function($){this.tooltipNode||(this.tooltipNode=t.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",o));var d=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(d.isDark?"ace_dark ":"")+(d.cssClass||"");var h=this.tooltipNode;$.docHTML?h.innerHTML=$.docHTML:$.docText&&(h.textContent=$.docText),h.parentNode||this.popup.container.appendChild(this.tooltipNode);var w=this.popup,C=w.container.getBoundingClientRect();h.style.top=w.container.style.top,h.style.bottom=w.container.style.bottom,h.style.display="block",window.innerWidth-C.right<320?C.left<320?w.isTopdown?(h.style.top=C.bottom+"px",h.style.left=C.left+"px",h.style.right="",h.style.bottom=""):(h.style.top=w.container.offsetTop-h.offsetHeight+"px",h.style.left=C.left+"px",h.style.right="",h.style.bottom=""):(h.style.right=window.innerWidth-C.left+"px",h.style.left=""):(h.style.left=C.right+1+"px",h.style.right="");},m.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var $=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==$&&this.editor.focus(),this.tooltipNode=null,$.parentNode&&$.parentNode.removeChild($);}},m.prototype.onTooltipClick=function($){for(var d=$.target;d&&d!=this.tooltipNode;){if(d.nodeName=="A"&&d.href){d.rel="noreferrer",d.target="_blank";break}d=d.parentNode;}},m.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var $=this.popup.container;$&&$.parentNode&&$.parentNode.removeChild($);}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",a),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null;},m}();u.prototype.commands={Up:function(m){m.completer.goTo("up");},Down:function(m){m.completer.goTo("down");},"Ctrl-Up|Ctrl-Home":function(m){m.completer.goTo("start");},"Ctrl-Down|Ctrl-End":function(m){m.completer.goTo("end");},Esc:function(m){m.completer.detach();},Return:function(m){return m.completer.insertMatch()},"Shift-Return":function(m){m.completer.insertMatch(null,{deleteSuffix:!0});},Tab:function(m){var $=m.completer.insertMatch();if(!$&&!m.tabstopManager)m.completer.goTo("down");else return $},Backspace:function(m){m.execCommand("backspace");var $=l.getCompletionPrefix(m);!$&&m.completer&&m.completer.detach();},PageUp:function(m){m.completer.popup.gotoPageUp();},PageDown:function(m){m.completer.popup.gotoPageDown();}},u.for=function(m){return m.completer instanceof u||(m.completer&&(m.completer.destroy(),m.completer=null),n.get("sharedPopups")?(u.$sharedInstance||(u.$sharedInstance=new u),m.completer=u.$sharedInstance):(m.completer=new u,m.once("destroy",a))),m.completer},u.startCommand={name:"startAutocomplete",exec:function(m,$){var d=u.for(m);d.autoInsert=!1,d.autoSelect=!0,d.autoShown=!1,d.showPopup(m,$),d.cancelContextMenu();},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=function(){function m($){this.initialPosition=$,this.active=!0;}return m.prototype.insertByIndex=function($,d,h){return !this.completions||!this.completions.filtered?!1:this.insertMatch($,this.completions.filtered[d],h)},m.prototype.insertMatch=function($,d,h){if(!d)return !1;if($.startOperation({command:{name:"insertMatch"}}),d.completer&&d.completer.insertMatch)d.completer.insertMatch($,d);else {if(!this.completions)return !1;var w=this.completions.filterText.length,C=0;if(d.range&&d.range.start.row===d.range.end.row&&(w-=this.initialPosition.prefix.length,w+=this.initialPosition.pos.column-d.range.start.column,C+=d.range.end.column-this.initialPosition.pos.column),w||C){var v;$.selection.getAllRanges?v=$.selection.getAllRanges():v=[$.getSelectionRange()];for(var b=0,f;f=v[b];b++)f.start.column-=w,f.end.column+=C,$.session.remove(f);}d.snippet?i.insertSnippet($,d.snippet):this.$insertString($,d),d.completer&&d.completer.onInsert&&typeof d.completer.onInsert=="function"&&d.completer.onInsert($,d),d.command&&d.command==="startAutocomplete"&&$.execCommand(d.command);}return $.endOperation(),!0},m.prototype.$insertString=function($,d){var h=d.value||d;$.execCommand("insertstring",h);},m.prototype.gatherCompletions=function($,d){var h=$.getSession(),w=$.getCursorPosition(),C=l.getCompletionPrefix($),v=[];this.completers=$.completers;var b=$.completers.length;return $.completers.forEach(function(f,p){f.getCompletions($,h,w,C,function(c,g){f.hideInlinePreview&&(g=g.map(function(A){return Object.assign(A,{hideInlinePreview:f.hideInlinePreview})})),!c&&g&&(v=v.concat(g)),d(null,{prefix:l.getCompletionPrefix($),matches:v,finished:--b===0});});}),!0},m.prototype.provideCompletions=function($,d,h){var w=function(f){var p=f.prefix,c=f.matches;this.completions=new S(c),d.exactMatch&&(this.completions.exactMatch=!0),d.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(p),(f.finished||this.completions.filtered.length)&&h(null,this.completions,f.finished);}.bind(this),C=!0,v=null;if(this.gatherCompletions($,function(f,p){if(this.active){f&&(h(f,[],!0),this.detach());var c=p.prefix;if(c.indexOf(p.prefix)===0){if(C){v=p;return}w(p);}}}.bind(this)),C=!1,v){var b=v;v=null,w(b);}},m.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function($){typeof $.cancel=="function"&&$.cancel();});},m}(),S=function(){function m($,d){this.all=$,this.filtered=$,this.filterText=d||"",this.exactMatch=!1,this.ignoreCaption=!1;}return m.prototype.setFilter=function($){if($.length>this.filterText&&$.lastIndexOf(this.filterText,0)===0)var d=this.filtered;else var d=this.all;this.filterText=$,d=this.filterCompletions(d,this.filterText),d=d.sort(function(w,C){return C.exactMatch-w.exactMatch||C.$score-w.$score||(w.caption||w.value).localeCompare(C.caption||C.value)});var h=null;d=d.filter(function(w){var C=w.snippet||w.caption||w.value;return C===h?!1:(h=C,!0)}),this.filtered=d;},m.prototype.filterCompletions=function($,d){var h=[],w=d.toUpperCase(),C=d.toLowerCase();e:for(var v=0,b;b=$[v];v++){var f=!this.ignoreCaption&&b.caption||b.value||b.snippet;if(f){var p=-1,c=0,g=0,A,k;if(this.exactMatch){if(d!==f.substr(0,d.length))continue e}else {var R=f.toLowerCase().indexOf(C);if(R>-1)g=R;else for(var _=0;_<d.length;_++){var D=f.indexOf(C[_],p+1),I=f.indexOf(w[_],p+1);if(A=D>=0&&(I<0||D<I)?D:I,A<0)continue e;k=A-p-1,k>0&&(p===-1&&(g+=10),g+=k,c=c|1<<_),p=A;}}b.matchMask=c,b.exactMatch=g?0:1,b.$score=(b.score||0)-g,h.push(b);}}return h},m}();T.Autocomplete=u,T.CompletionProvider=y,T.FilteredList=S;});ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(L,T,H){var E=L("../range").Range,x=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function M(l,r){var t=l.getTextRange(E.fromPoints({row:0,column:0},r));return t.split(x).length-1}function s(l,r){var t=M(l,r),i=l.getValue().split(x),n=Object.create(null),e=i[t];return i.forEach(function(o,a){if(!(!o||o===e)){var u=Math.abs(t-a),y=i.length-u;n[o]?n[o]=Math.max(y,n[o]):n[o]=y;}}),n}T.getCompletions=function(l,r,t,i,n){var e=s(r,t),o=Object.keys(e);n(null,o.map(function(a){return {caption:a,value:a,score:e[a],meta:"local"}}));};});ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(L,T,H){var E=L("../snippets").snippetManager,x=L("../autocomplete").Autocomplete,M=L("../config"),s=L("../lib/lang"),l=L("../autocomplete/util"),r=L("../autocomplete/text_completer"),t={getCompletions:function(w,C,v,b,f){if(C.$mode.completer)return C.$mode.completer.getCompletions(w,C,v,b,f);var p=w.session.getState(v.row),c=C.$mode.getCompletions(p,C,v,b);c=c.map(function(g){return g.completerId=t.id,g}),f(null,c);},id:"keywordCompleter"},i=function(w){var C={};return w.replace(/\${(\d+)(:(.*?))?}/g,function(v,b,f,p){return C[b]=p||""}).replace(/\$(\d+?)/g,function(v,b){return C[b]})},n={getCompletions:function(w,C,v,b,f){var p=[],c=C.getTokenAt(v.row,v.column);c&&c.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?p.push("html-tag"):p=E.getActiveScopes(w);var g=E.snippetMap,A=[];p.forEach(function(k){for(var R=g[k]||[],_=R.length;_--;){var D=R[_],I=D.name||D.tabTrigger;I&&A.push({caption:I,snippet:D.content,meta:D.tabTrigger&&!D.name?D.tabTrigger+"\u21E5 ":"snippet",completerId:n.id});}},this),f(null,A);},getDocTooltip:function(w){w.snippet&&!w.docHTML&&(w.docHTML=["<b>",s.escapeHTML(w.caption),"</b>","<hr></hr>",s.escapeHTML(i(w.snippet))].join(""));},id:"snippetCompleter"},e=[n,r,t];T.setCompleters=function(w){e.length=0,w&&e.push.apply(e,w);},T.addCompleter=function(w){e.push(w);},T.textCompleter=r,T.keyWordCompleter=t,T.snippetCompleter=n;var o={name:"expandSnippet",exec:function(w){return E.expandWithTab(w)},bindKey:"Tab"},a=function(w,C){u(C.session.$mode);},u=function(w){typeof w=="string"&&(w=M.$modes[w]),w&&(E.files||(E.files={}),y(w.$id,w.snippetFileId),w.modes&&w.modes.forEach(u));},y=function(w,C){!C||!w||E.files[w]||(E.files[w]={},M.loadModule(C,function(v){v&&(E.files[w]=v,!v.snippets&&v.snippetText&&(v.snippets=E.parseSnippetFile(v.snippetText)),E.register(v.snippets||[],v.scope),v.includeScopes&&(E.snippetMap[v.scope].includeScopes=v.includeScopes,v.includeScopes.forEach(function(b){u("ace/mode/"+b);})));}));},S=function(w){var C=w.editor,v=C.completer&&C.completer.activated;if(w.command.name==="backspace")v&&!l.getCompletionPrefix(C)&&C.completer.detach();else if(w.command.name==="insertstring"&&!v){m=w;var b=w.editor.$liveAutocompletionDelay;b?$.delay(b):d(w);}},m,$=s.delayedCall(function(){d(m);},0),d=function(w){var C=w.editor,v=l.getCompletionPrefix(C),b=w.args,f=l.triggerAutocomplete(C,b);if(v&&v.length>=C.$liveAutocompletionThreshold||f){var p=x.for(C);p.autoShown=!0,p.showPopup(C);}},h=L("../editor").Editor;L("../config").defineOptions(h.prototype,"editor",{enableBasicAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:e),this.commands.addCommand(x.startCommand)):this.commands.removeCommand(x.startCommand);},value:!1},enableLiveAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:e),this.commands.on("afterExec",S)):this.commands.off("afterExec",S);},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(w){w?(this.commands.addCommand(o),this.on("changeMode",a),a(null,this)):(this.commands.removeCommand(o),this.off("changeMode",a));},value:!1}});});(function(){ace.require(["ace/ext/language_tools"],function(L){typeof _e=="object"&&typeof at=="object"&&_e&&(_e.exports=L);});})();});var ht=a((ct,Ie)=>{ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(L,T,H){var E=L("../lib/oop"),x=L("./text_highlight_rules").TextHighlightRules,M=function(){var s="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct|is|in|all|alter|any|array|at|authorization|between|both|cast|check|collate|column|commit|constraint|cube|current|current_date|current_time|current_timestamp|current_user|describe|escape|except|exists|external|extract|fetch|filter|for|full|function|global|grouping|intersect|interval|into|leading|like|local|no|of|only|out|overlaps|partition|position|range|revoke|rollback|rollup|row|rows|session_user|set|some|start|tablesample|time|to|trailing|truncate|unique|unknown|user|using|values|window|with",l="true|false",r="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",t="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer|string",i=this.createKeywordMapper({"support.function":r,keyword:s,"constant.language":l,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules();};E.inherits(M,x),T.SqlHighlightRules=M;});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(L,T,H){var E=L("../../lib/oop"),x=L("../../range").Range,M=L("./fold_mode").FoldMode,s=T.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)));};E.inherits(s,M),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,t){var i=l.getLine(t);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return "";var n=this._getFoldWidgetBase(l,r,t);return !n&&this.startRegionRe.test(i)?"start":n},this.getFoldWidgetRange=function(l,r,t,i){var n=l.getLine(t);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(l,n,t);var a=n.match(this.foldingStartMarker);if(a){var e=a.index;if(a[1])return this.openingBracketBlock(l,a[1],t,e);var o=l.getCommentFoldRange(t,e+a[0].length,1);return o&&!o.isMultiLine()&&(i?o=this.getSectionRange(l,t):r!="all"&&(o=null)),o}if(r!=="markbegin"){var a=n.match(this.foldingStopMarker);if(a){var e=a.index+a[0].length;return a[1]?this.closingBracketBlock(l,a[1],t,e):l.getCommentFoldRange(t,e,-1)}}},this.getSectionRange=function(l,r){var t=l.getLine(r),i=t.search(/\S/),n=r,e=t.length;r=r+1;for(var o=r,a=l.getLength();++r<a;){t=l.getLine(r);var u=t.search(/\S/);if(u!==-1){if(i>u)break;var y=this.getFoldWidgetRange(l,"all",r);if(y){if(y.start.row<=n)break;if(y.isMultiLine())r=y.end.row;else if(i==u)break}o=r;}}return new x(n,e,o,l.getLine(o).length)},this.getCommentRegionBlock=function(l,r,t){for(var i=r.search(/\s*$/),n=l.getLength(),e=t,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++t<n;){r=l.getLine(t);var u=o.exec(r);if(u&&(u[1]?a--:a++,!a))break}var y=t;if(y>e)return new x(e,i,y,r.length)};}.call(s.prototype);});ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(L,T,H){var E=L("../../lib/oop"),x=L("./cstyle").FoldMode,M=T.FoldMode=function(){};E.inherits(M,x),function(){}.call(M.prototype);});ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],function(L,T,H){var E=L("../lib/oop"),x=L("./text").Mode,M=L("./sql_highlight_rules").SqlHighlightRules,s=L("./folding/sql").FoldMode,l=function(){this.HighlightRules=M,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour;};E.inherits(l,x),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql";}.call(l.prototype),T.Mode=l;});(function(){ace.require(["ace/mode/sql"],function(L){typeof Ie=="object"&&typeof ct=="object"&&Ie&&(Ie.exports=L);});})();});var dt=a((ut,De)=>{ace.define("ace/theme/chrome-css",["require","exports","module"],function(L,T,H){H.exports=`.ace-chrome .ace_gutter {
1097
+ background: #ebebeb;
1098
+ color: #333;
1099
+ overflow : hidden;
1100
+ }
1101
+
1102
+ .ace-chrome .ace_print-margin {
1103
+ width: 1px;
1104
+ background: #e8e8e8;
1105
+ }
1106
+
1107
+ .ace-chrome {
1108
+ background-color: #FFFFFF;
1109
+ color: black;
1110
+ }
1111
+
1112
+ .ace-chrome .ace_cursor {
1113
+ color: black;
1114
+ }
1115
+
1116
+ .ace-chrome .ace_invisible {
1117
+ color: rgb(191, 191, 191);
1118
+ }
1119
+
1120
+ .ace-chrome .ace_constant.ace_buildin {
1121
+ color: rgb(88, 72, 246);
1122
+ }
1123
+
1124
+ .ace-chrome .ace_constant.ace_language {
1125
+ color: rgb(88, 92, 246);
1126
+ }
1127
+
1128
+ .ace-chrome .ace_constant.ace_library {
1129
+ color: rgb(6, 150, 14);
1130
+ }
1131
+
1132
+ .ace-chrome .ace_invalid {
1133
+ background-color: rgb(153, 0, 0);
1134
+ color: white;
1135
+ }
1136
+
1137
+ .ace-chrome .ace_fold {
1138
+ }
1139
+
1140
+ .ace-chrome .ace_support.ace_function {
1141
+ color: rgb(60, 76, 114);
1142
+ }
1143
+
1144
+ .ace-chrome .ace_support.ace_constant {
1145
+ color: rgb(6, 150, 14);
1146
+ }
1147
+
1148
+ .ace-chrome .ace_support.ace_type,
1149
+ .ace-chrome .ace_support.ace_class
1150
+ .ace-chrome .ace_support.ace_other {
1151
+ color: rgb(109, 121, 222);
1152
+ }
1153
+
1154
+ .ace-chrome .ace_variable.ace_parameter {
1155
+ font-style:italic;
1156
+ color:#FD971F;
1157
+ }
1158
+ .ace-chrome .ace_keyword.ace_operator {
1159
+ color: rgb(104, 118, 135);
1160
+ }
1161
+
1162
+ .ace-chrome .ace_comment {
1163
+ color: #236e24;
1164
+ }
1165
+
1166
+ .ace-chrome .ace_comment.ace_doc {
1167
+ color: #236e24;
1168
+ }
1169
+
1170
+ .ace-chrome .ace_comment.ace_doc.ace_tag {
1171
+ color: #236e24;
1172
+ }
1173
+
1174
+ .ace-chrome .ace_constant.ace_numeric {
1175
+ color: rgb(0, 0, 205);
1176
+ }
1177
+
1178
+ .ace-chrome .ace_variable {
1179
+ color: rgb(49, 132, 149);
1180
+ }
1181
+
1182
+ .ace-chrome .ace_xml-pe {
1183
+ color: rgb(104, 104, 91);
1184
+ }
1185
+
1186
+ .ace-chrome .ace_entity.ace_name.ace_function {
1187
+ color: #0000A2;
1188
+ }
1189
+
1190
+
1191
+ .ace-chrome .ace_heading {
1192
+ color: rgb(12, 7, 255);
1193
+ }
1194
+
1195
+ .ace-chrome .ace_list {
1196
+ color:rgb(185, 6, 144);
1197
+ }
1198
+
1199
+ .ace-chrome .ace_marker-layer .ace_selection {
1200
+ background: rgb(181, 213, 255);
1201
+ }
1202
+
1203
+ .ace-chrome .ace_marker-layer .ace_step {
1204
+ background: rgb(252, 255, 0);
1205
+ }
1206
+
1207
+ .ace-chrome .ace_marker-layer .ace_stack {
1208
+ background: rgb(164, 229, 101);
1209
+ }
1210
+
1211
+ .ace-chrome .ace_marker-layer .ace_bracket {
1212
+ margin: -1px 0 0 -1px;
1213
+ border: 1px solid rgb(192, 192, 192);
1214
+ }
1215
+
1216
+ .ace-chrome .ace_marker-layer .ace_active-line {
1217
+ background: rgba(0, 0, 0, 0.07);
1218
+ }
1219
+
1220
+ .ace-chrome .ace_gutter-active-line {
1221
+ background-color : #dcdcdc;
1222
+ }
1223
+
1224
+ .ace-chrome .ace_marker-layer .ace_selected-word {
1225
+ background: rgb(250, 250, 255);
1226
+ border: 1px solid rgb(200, 200, 250);
1227
+ }
1228
+
1229
+ .ace-chrome .ace_storage,
1230
+ .ace-chrome .ace_keyword,
1231
+ .ace-chrome .ace_meta.ace_tag {
1232
+ color: rgb(147, 15, 128);
1233
+ }
1234
+
1235
+ .ace-chrome .ace_string.ace_regex {
1236
+ color: rgb(255, 0, 0)
1237
+ }
1238
+
1239
+ .ace-chrome .ace_string {
1240
+ color: #1A1AA6;
1241
+ }
1242
+
1243
+ .ace-chrome .ace_entity.ace_other.ace_attribute-name {
1244
+ color: #994409;
1245
+ }
1246
+
1247
+ .ace-chrome .ace_indent-guide {
1248
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
1249
+ }
1250
+
1251
+ .ace-chrome .ace_indent-guide-active {
1252
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
1253
+ }
1254
+ `;});ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(L,T,H){T.isDark=!1,T.cssClass="ace-chrome",T.cssText=L("./chrome-css");var E=L("../lib/dom");E.importCssString(T.cssText,T.cssClass,!1);});(function(){ace.require(["ace/theme/chrome"],function(L){typeof De=="object"&&typeof ut=="object"&&De&&(De.exports=L);});})();});var Ee=styled(ke)(({theme:L})=>({borderBottom:`1px solid ${alpha(L.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(L.palette.grey[500],.32)}`,padding:16})),qe=styled(ke)(({theme:L})=>({border:`1px solid ${alpha(L.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:L.palette.grey[100]}})),et=styled(ke)(({theme:L})=>({display:"flex",textAlign:"center",flexDirection:"row",alignItems:"center",width:"100%",gap:8,height:34,backgroundColor:"#fff",padding:"8px 16px",borderRadius:8,border:`1px solid ${alpha(L.palette.grey[500],.24)}`,cursor:"pointer",color:L.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${L.palette.primary.main}`,backgroundColor:alpha(L.palette.primary.main,.05)}})),tt=styled(ke)(({theme:L})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(L.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:L.palette.text.disabled,fontSize:12}}})),Be=styled(Dt)({padding:0});var Pt=({openPopover:L,handleClose:T,argumentsValues:H,filter:E,onExecute:x})=>{let[M,s]=useState([]),l=(t,i)=>{if(i&&i!=="")M.filter(e=>e.name===t).length>0?s(M.map(e=>e.name===t?{name:t,value:i}:e)):s([...M||[],{name:t,value:i}]);else {let n=M.filter(e=>e.name===t);s(n);}},r=()=>{let t=E||"";return M.forEach(i=>{t=t.replace(`$ARG[${i.name}]`,`'${i.value}'`);}),t};return jsxs(Ot,{open:!!L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:L,onClose:T,title:"Pr\xE9-visualizar",children:[jsx(mt,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(Ee,{children:H?.map((t,i)=>jsx(Wt,{name:t,label:t,size:"small",onChange:n=>l(t,n.target.value),required:!0},i))}),jsxs(ke,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(it,{variant:"outlined",color:"inherit",size:"small",onClick:T,children:"Cancelar"}),jsx(it,{variant:"contained",color:"primary",size:"small",startIcon:jsx(ze,{icon:"PLAY_SIMPLE"}),onClick:()=>x(r()),disabled:M.length<H.length,children:"Executar"})]})]})},rt=Pt;b(st());b(lt());b(ht());b(dt());var Yt=({openPopover:L,handleClose:T,addItem:H})=>{let[E,x]=useState("");return jsxs(Ot,{open:!!L,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:L,onClose:T,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(mt,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(Ee,{children:jsx(Wt,{value:E,onChange:s=>x(s.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(ke,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(it,{variant:"outlined",color:"inherit",size:"small",onClick:T,children:"Cancelar"}),jsx(it,{variant:"contained",color:"primary",size:"small",startIcon:jsx(ze,{icon:"SAVE_MARK"}),disabled:!E||E==="",onClick:()=>{H(E),T(),x("");},children:"Salvar"})]})]})},gt=Yt;var qt=({label:L,itens:T,argumentsValues:H,fields:E,addItem:x,removeItem:M,insertItemSQL:s})=>{let[l,r]=useState(!1),t=Jt(),i=()=>{r(!l);},n=(o,a)=>{o.stopPropagation(),M&&M(a);},e=o=>{s(H?` $ARG[${o}]`:E?` this.${o}`:` ${o}`);};return jsxs(ke,{children:[jsxs(ke,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(Be,{edge:"end",onClick:i,children:jsx(ze,{icon:l?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(mt,{variant:"overline",color:"text.primary",children:L}),x&&jsxs(Fragment,{children:[jsx(Be,{edge:"end",onClick:t.onOpen,children:jsx(ze,{icon:"SIMPLE_ADD"})}),jsx(gt,{addItem:x,handleClose:t.onClose,openPopover:t.open})]})]}),l&&jsx(ke,{spacing:.5,children:jsx(Xt,{sx:{maxHeight:150},children:T?.map((o,a)=>jsxs(et,{direction:"row",justifyContent:"space-between",onClick:()=>e(o),children:[jsx(mt,{variant:"caption",textAlign:"center",width:"100%",children:o}),M&&jsx(Dt,{edge:"end",onClick:u=>n(u,o),children:jsx(ze,{icon:"DELETE_MARK_BUTTON_02"})})]},a))})})]})},xe=qt;var oi=({fieldsSelect:L,argumentsValues:T,onChangeArguments:H,sql:E,setSql:x,setFilterRule:M})=>{let[s,l]=useState(),{setValue:r}=useFormContext(),[t,i]=useState(1),[n,e]=useState(),o=m=>{n.session.insert(t,` ${m} `);},a=m=>{H([...T||[],m]);},u=m=>{H(T?.filter($=>$!==m));},y=m=>{x(m[0]),M(m[0]),r("groups",void 0);},S=s?L.filter(m=>m.id.toString().toLocaleLowerCase().includes(s)||m.description.toString().toLocaleLowerCase().includes(s)||m.name?.toString().toLocaleLowerCase().includes(s)):L;return jsxs(ke,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(qe,{children:[jsx(ni,{value:s,trigger:"change",onSearch:m=>l(m?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(xe,{label:"Campos",fields:!0,itens:S.map(m=>m.name),insertItemSQL:o}),jsx(xe,{label:"Argumentos",argumentsValues:!0,itens:T,addItem:a,removeItem:u,insertItemSQL:o}),jsx(xe,{label:"Operadores",insertItemSQL:o,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(xe,{label:"Filtros",fields:!0,insertItemSQL:o,itens:S.map(m=>m.name)})]}),jsx(tt,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(ti,{width:"100%",mode:"sql",theme:"chrome",name:"rule",fontSize:14,onChange:y,onCursorChange:m=>i(m.getCursor()),value:E,onLoad:m=>e(m),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2}})]})})]})},vt=oi;var li=({data:L,fields:T,isLoading:H,isError:E})=>jsxs(ke,{children:[jsx(mt,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),E&&jsx(ke,{children:"Falha ao gerar resultado"}),L&&jsx(ai,{columns:T?.map(x=>({field:x,headerName:x,width:150,type:"string"})),loading:H,rows:L,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})]}),wt=li;var $t=styled(ke)(({theme:L})=>({border:`1px solid ${alpha(L.palette.primary.main,.32)}`,backgroundColor:alpha(L.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),Ct=styled(Dt)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),Oe=styled(Fe)(()=>({width:230}));var vi=({index:L,indexGroup:T,removeConditional:H,fieldsSelect:E})=>{let{watch:x}=useFormContext(),M=`groups.[${T}].conditionals[${L}].field`,s=`groups.[${T}].conditionals[${L}].conditional`,l=`groups.[${T}].conditionals[${L}].type`,r=`groups.[${T}].conditionals[${L}].value`,t=[{value:"=",label:"Igual a"},{value:">",label:"Maior que"},{value:"<",label:"Menor que"},{value:"<=",label:"Menor ou igual a"},{value:">=",label:"Maior ou igual a"},{value:"!=",label:"Diferente de"},{value:"IS NULL",label:"Est\xE1 vazio"},{value:"IN",label:"Contido em"},{value:"LIKE",label:"Contendo"},{value:"NOT IN",label:"N\xE3o contido em"},{value:"NOT LIKE",label:"N\xE3o cont\xE9m"},{value:"IS NOT NULL",label:"N\xE3o est\xE1 vazio"}],i=x(l);return jsxs(ke,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(Fe,{label:"Se",name:M,size:"small",fullWidth:!0,options:E?.map(n=>({value:n.name,label:n.description}))}),jsx(Fe,{label:"Estado",name:s,size:"small",fullWidth:!0,options:t}),jsx(Fe,{label:"Objetivo",name:`groups.[${T}].conditionals[${L}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),i==="value"?jsx(mi,{label:"Valor",name:r,size:"small",fullWidth:!0}):jsx(Fe,{label:"Se",name:r,size:"small",fullWidth:!0,options:E?.map(n=>({value:n.name,label:n.description}))}),jsx(Ct,{color:"error",onClick:()=>{H(L);},children:jsx(ze,{icon:"DELETE_MARK_BUTTON_02"})})]})},St=vi;var Ai=({index:L,removeGroup:T,fieldsSelect:H})=>{let{control:E}=useFormContext(),x=`groups.[${L}].operator`,{fields:M,append:s,remove:l}=useFieldArray({name:`groups.${L}.conditionals`,control:E});return jsx(Si,{name:`GRUPO ${L+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(Oe,{name:x,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>T(L),children:jsxs(ke,{spacing:1.5,alignItems:"flex-start",children:[M.map((r,t)=>jsx(St,{index:t,indexGroup:L,removeConditional:i=>l(i),fieldsSelect:H},r.id)),jsx(Ci,{actionType:"NEW",onClick:()=>s({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},At=Ai;var Ei=({fieldsSelect:L})=>{let{control:T}=useFormContext(),{fields:H,append:E,remove:x}=useFieldArray({name:"groups",control:T});return jsxs(ke,{gap:1.5,children:[jsxs($t,{direction:"row",spacing:1.5,children:[jsx(mt,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(ke,{children:jsx(Oe,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(mt,{variant:"body2",color:"text.light.primary",children:["regra de ",jsx("strong",{children:"todos os grupos"})," \u201CSe\u201D forem cumpridas,"," ",jsx("strong",{children:"ir\xE1 exibir a listagem."})]})]}),H.map((M,s)=>jsx(At,{index:s,removeGroup:l=>x(l),fieldsSelect:L},M.id)),jsx(it,{size:"large",color:"inherit",startIcon:jsx(ze,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{E({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},Lt=Ei;var Tt=styled(ke)(({theme:L})=>({border:`1px solid ${alpha(L.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),kt=styled(ke)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),Qe=styled(_i)(()=>({lineHeight:"1em"})),Et=styled(ke)(()=>({padding:12}));var Bi=({argumentsValues:L,onChangeArguments:T,fieldsSelect:H,onChangeRule:E,onChangeSqlProcessed:x,defaultMode:M,defaultFilter:s,dataPreview:l,errorPreview:r,loadingPreview:t})=>{let[i,n]=useState(s||""),[e,o]=Hi(),[a,u]=useState(M||"simple"),{watch:y,setValue:S}=useFormContext(),m=Jt(),$=y("operator"),d=y("groups");useEffect(()=>()=>{S("config",{});},[]);let h=(v,b)=>{if(b==="advanced"){let f=a$1(d,$);n(f),x(f),E(f);}u(b);},w=v=>{e||a==="simple"||L.length===0?o():m.onOpen(v);},C=v=>{o(),x(v);};return jsx(Fragment,{children:jsxs(Tt,{children:[jsxs(kt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(Oi,{color:"primary",value:a,size:"small",exclusive:!0,onChange:h,children:[jsx(Qe,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(Qe,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(it,{variant:"outlined",color:"inherit",onClick:v=>w(v),startIcon:!e&&jsx(ze,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:e?"Voltar":"Executar"}),!!m.open&&jsx(rt,{handleClose:m.onClose,openPopover:m.open,argumentsValues:L,filter:i,onExecute:v=>C(v)})]}),jsx(Et,{children:e?jsx(wt,{fields:H.map(v=>v.name),data:l,isError:r,isLoading:t}):jsx(Fragment,{children:a==="simple"?jsx(Lt,{fieldsSelect:H,sql:i,setSql:n}):jsx(vt,{fieldsSelect:H,argumentsValues:L,onChangeArguments:T,sql:i,setSql:n,setFilterRule:E})})})]})})},Or=Bi;/*! Bundled license information:
1255
+
1256
+ ace-builds/src-noconflict/ace.js:
1257
+ (*
1258
+ * based on code from:
1259
+ *
1260
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
1261
+ * Available via the MIT or new BSD license.
1262
+ * see: http://github.com/jrburke/requirejs for details
1263
+ *)
1264
+ */
296
1265
 
297
- export { lr as default };
1266
+ export { Or as default };