@zydon/common-csr 2.0.17 → 2.0.18
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,156 +2,296 @@ 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
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
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';
|
|
15
15
|
import { styled, alpha } from '@mui/material/styles';
|
|
16
16
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
|
|
27
|
-
var ce=a((se,E)=>{ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var i=e("../lib/oop"),c=e("./text_highlight_rules").TextHighlightRules,l=function(){var p="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",o="true|false",n="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",a=this.createKeywordMapper({"support.function":n,keyword:p,"constant.language":o,"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:a,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();};i.inherits(l,c),r.SqlHighlightRules=l;});ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var i=e("../../lib/oop"),c=e("../../range").Range,l=e("./fold_mode").FoldMode,p=r.FoldMode=function(o){o&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+o.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+o.end)));};i.inherits(p,l),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(o,n,t){var a=o.getLine(t);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return "";var s=this._getFoldWidgetBase(o,n,t);return !s&&this.startRegionRe.test(a)?"start":s},this.getFoldWidgetRange=function(o,n,t,a){var s=o.getLine(t);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(o,s,t);var u=s.match(this.foldingStartMarker);if(u){var f=u.index;if(u[1])return this.openingBracketBlock(o,u[1],t,f);var m=o.getCommentFoldRange(t,f+u[0].length,1);return m&&!m.isMultiLine()&&(a?m=this.getSectionRange(o,t):n!="all"&&(m=null)),m}if(n!=="markbegin"){var u=s.match(this.foldingStopMarker);if(u){var f=u.index+u[0].length;return u[1]?this.closingBracketBlock(o,u[1],t,f):o.getCommentFoldRange(t,f,-1)}}},this.getSectionRange=function(o,n){var t=o.getLine(n),a=t.search(/\S/),s=n,f=t.length;n=n+1;for(var m=n,u=o.getLength();++n<u;){t=o.getLine(n);var h=t.search(/\S/);if(h!==-1){if(a>h)break;var b=this.getFoldWidgetRange(o,"all",n);if(b){if(b.start.row<=s)break;if(b.isMultiLine())n=b.end.row;else if(a==h)break}m=n;}}return new c(s,f,m,o.getLine(m).length)},this.getCommentRegionBlock=function(o,n,t){for(var a=n.search(/\s*$/),s=o.getLength(),f=t,m=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,u=1;++t<s;){n=o.getLine(t);var h=m.exec(n);if(h&&(h[1]?u--:u++,!u))break}var b=t;if(b>f)return new c(f,a,b,n.length)};}.call(p.prototype);});ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(e,r,d){var i=e("../../lib/oop"),c=e("./cstyle").FoldMode,l=r.FoldMode=function(){};i.inherits(l,c),function(){}.call(l.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(e,r,d){var i=e("../lib/oop"),c=e("./text").Mode,l=e("./sql_highlight_rules").SqlHighlightRules,p=e("./folding/sql").FoldMode,o=function(){this.HighlightRules=l,this.foldingRules=new p,this.$behaviour=this.$defaultBehaviour;};i.inherits(o,c),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql";}.call(o.prototype),r.Mode=o;});(function(){ace.require(["ace/mode/sql"],function(e){typeof E=="object"&&typeof se=="object"&&E&&(E.exports=e);});})();});var me=a((pe,T)=>{ace.define("ace/theme/github-css",["require","exports","module"],function(e,r,d){d.exports=`/* CSS style content from github's default pygments highlighter template.
|
|
28
|
-
|
|
29
|
-
|
|
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;
|
|
33
|
+
color: #333;
|
|
34
|
+
overflow : hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ace-chrome .ace_print-margin {
|
|
38
|
+
width: 1px;
|
|
30
39
|
background: #e8e8e8;
|
|
31
|
-
color: #AAA;
|
|
32
40
|
}
|
|
33
41
|
|
|
34
|
-
.ace-
|
|
35
|
-
background: #
|
|
36
|
-
color:
|
|
42
|
+
.ace-chrome {
|
|
43
|
+
background-color: #FFFFFF;
|
|
44
|
+
color: black;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
|
-
.ace-
|
|
40
|
-
|
|
47
|
+
.ace-chrome .ace_cursor {
|
|
48
|
+
color: black;
|
|
41
49
|
}
|
|
42
50
|
|
|
43
|
-
.ace-
|
|
44
|
-
color:
|
|
51
|
+
.ace-chrome .ace_invisible {
|
|
52
|
+
color: rgb(191, 191, 191);
|
|
45
53
|
}
|
|
46
54
|
|
|
47
|
-
.ace-
|
|
48
|
-
color:
|
|
55
|
+
.ace-chrome .ace_constant.ace_buildin {
|
|
56
|
+
color: rgb(88, 72, 246);
|
|
49
57
|
}
|
|
50
58
|
|
|
51
|
-
.ace-
|
|
52
|
-
color:
|
|
59
|
+
.ace-chrome .ace_constant.ace_language {
|
|
60
|
+
color: rgb(88, 92, 246);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
|
-
.ace-
|
|
56
|
-
color:
|
|
63
|
+
.ace-chrome .ace_constant.ace_library {
|
|
64
|
+
color: rgb(6, 150, 14);
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
.ace-
|
|
60
|
-
color:
|
|
67
|
+
.ace-chrome .ace_invalid {
|
|
68
|
+
background-color: rgb(153, 0, 0);
|
|
69
|
+
color: white;
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
.ace-
|
|
64
|
-
color: #998;
|
|
65
|
-
font-style: italic;
|
|
72
|
+
.ace-chrome .ace_fold {
|
|
66
73
|
}
|
|
67
74
|
|
|
68
|
-
.ace-
|
|
69
|
-
color:
|
|
75
|
+
.ace-chrome .ace_support.ace_function {
|
|
76
|
+
color: rgb(60, 76, 114);
|
|
70
77
|
}
|
|
71
78
|
|
|
72
|
-
.ace-
|
|
73
|
-
|
|
79
|
+
.ace-chrome .ace_support.ace_constant {
|
|
80
|
+
color: rgb(6, 150, 14);
|
|
74
81
|
}
|
|
75
82
|
|
|
76
|
-
.ace-
|
|
77
|
-
|
|
83
|
+
.ace-chrome .ace_support.ace_type,
|
|
84
|
+
.ace-chrome .ace_support.ace_class
|
|
85
|
+
.ace-chrome .ace_support.ace_other {
|
|
86
|
+
color: rgb(109, 121, 222);
|
|
78
87
|
}
|
|
79
88
|
|
|
80
|
-
.ace-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
.ace-chrome .ace_variable.ace_parameter {
|
|
90
|
+
font-style:italic;
|
|
91
|
+
color:#FD971F;
|
|
92
|
+
}
|
|
93
|
+
.ace-chrome .ace_keyword.ace_operator {
|
|
94
|
+
color: rgb(104, 118, 135);
|
|
83
95
|
}
|
|
84
96
|
|
|
85
|
-
.ace-
|
|
86
|
-
color:
|
|
97
|
+
.ace-chrome .ace_comment {
|
|
98
|
+
color: #236e24;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
|
-
.ace-
|
|
90
|
-
|
|
101
|
+
.ace-chrome .ace_comment.ace_doc {
|
|
102
|
+
color: #236e24;
|
|
91
103
|
}
|
|
92
104
|
|
|
93
|
-
.ace-
|
|
94
|
-
color:
|
|
105
|
+
.ace-chrome .ace_comment.ace_doc.ace_tag {
|
|
106
|
+
color: #236e24;
|
|
95
107
|
}
|
|
96
108
|
|
|
97
|
-
.ace-
|
|
98
|
-
|
|
109
|
+
.ace-chrome .ace_constant.ace_numeric {
|
|
110
|
+
color: rgb(0, 0, 205);
|
|
99
111
|
}
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
|
|
113
|
+
.ace-chrome .ace_variable {
|
|
114
|
+
color: rgb(49, 132, 149);
|
|
102
115
|
}
|
|
103
116
|
|
|
104
|
-
.ace-
|
|
105
|
-
|
|
117
|
+
.ace-chrome .ace_xml-pe {
|
|
118
|
+
color: rgb(104, 104, 91);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.ace-chrome .ace_entity.ace_name.ace_function {
|
|
122
|
+
color: #0000A2;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
.ace-chrome .ace_heading {
|
|
127
|
+
color: rgb(12, 7, 255);
|
|
106
128
|
}
|
|
107
129
|
|
|
108
|
-
.ace-
|
|
109
|
-
|
|
130
|
+
.ace-chrome .ace_list {
|
|
131
|
+
color:rgb(185, 6, 144);
|
|
110
132
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
font-weight: normal !important;
|
|
133
|
+
|
|
134
|
+
.ace-chrome .ace_marker-layer .ace_selection {
|
|
135
|
+
background: rgb(181, 213, 255);
|
|
115
136
|
}
|
|
116
137
|
|
|
117
|
-
.ace-
|
|
138
|
+
.ace-chrome .ace_marker-layer .ace_step {
|
|
118
139
|
background: rgb(252, 255, 0);
|
|
119
140
|
}
|
|
120
141
|
|
|
121
|
-
.ace-
|
|
142
|
+
.ace-chrome .ace_marker-layer .ace_stack {
|
|
122
143
|
background: rgb(164, 229, 101);
|
|
123
144
|
}
|
|
124
145
|
|
|
125
|
-
.ace-
|
|
146
|
+
.ace-chrome .ace_marker-layer .ace_bracket {
|
|
126
147
|
margin: -1px 0 0 -1px;
|
|
127
148
|
border: 1px solid rgb(192, 192, 192);
|
|
128
149
|
}
|
|
129
150
|
|
|
130
|
-
.ace-
|
|
131
|
-
|
|
151
|
+
.ace-chrome .ace_marker-layer .ace_active-line {
|
|
152
|
+
background: rgba(0, 0, 0, 0.07);
|
|
132
153
|
}
|
|
133
154
|
|
|
134
|
-
.ace-
|
|
155
|
+
.ace-chrome .ace_gutter-active-line {
|
|
156
|
+
background-color : #dcdcdc;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ace-chrome .ace_marker-layer .ace_selected-word {
|
|
135
160
|
background: rgb(250, 250, 255);
|
|
136
161
|
border: 1px solid rgb(200, 200, 250);
|
|
137
162
|
}
|
|
138
163
|
|
|
139
|
-
.ace-
|
|
140
|
-
|
|
164
|
+
.ace-chrome .ace_storage,
|
|
165
|
+
.ace-chrome .ace_keyword,
|
|
166
|
+
.ace-chrome .ace_meta.ace_tag {
|
|
167
|
+
color: rgb(147, 15, 128);
|
|
141
168
|
}
|
|
142
169
|
|
|
143
|
-
.ace-
|
|
144
|
-
|
|
145
|
-
background: #e8e8e8;
|
|
170
|
+
.ace-chrome .ace_string.ace_regex {
|
|
171
|
+
color: rgb(255, 0, 0)
|
|
146
172
|
}
|
|
147
173
|
|
|
148
|
-
.ace-
|
|
149
|
-
|
|
174
|
+
.ace-chrome .ace_string {
|
|
175
|
+
color: #1A1AA6;
|
|
150
176
|
}
|
|
151
177
|
|
|
152
|
-
.ace-
|
|
178
|
+
.ace-chrome .ace_entity.ace_other.ace_attribute-name {
|
|
179
|
+
color: #994409;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.ace-chrome .ace_indent-guide {
|
|
183
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ace-chrome .ace_indent-guide-active {
|
|
153
187
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
154
188
|
}
|
|
155
|
-
`;});ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(e,r,d){r.isDark=!1,r.cssClass="ace-github",r.cssText=e("./github-css");var i=e("../lib/dom");i.importCssString(r.cssText,r.cssClass,!1);});(function(){ace.require(["ace/theme/github"],function(e){typeof T=="object"&&typeof pe=="object"&&T&&(T.exports=e);});})();});var L=styled(M)(({theme:e})=>({borderBottom:`1px solid ${alpha(e.palette.grey[500],.32)}`,borderTop:`1px solid ${alpha(e.palette.grey[500],.32)}`,padding:16})),oe=styled(M)(({theme:e})=>({border:`1px solid ${alpha(e.palette.grey[500],.32)}`,borderRadius:8,padding:12,"& .MuiInputBase-root":{background:e.palette.grey[100]}})),re=styled(M)(({theme:e})=>({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(e.palette.grey[500],.24)}`,cursor:"pointer",color:e.palette.text.disabled,"&:hover, &:focus":{border:`1px solid ${e.palette.primary.main}`,backgroundColor:alpha(e.palette.primary.main,.05)}})),ne=styled(M)(({theme:e})=>({width:"100%","& fieldset":{border:`1px solid ${alpha(e.palette.grey[500],.24)}`,borderRadius:8,"& legend":{color:e.palette.text.disabled,fontSize:12}}})),G=styled(Ne)({marginLeft:"auto",padding:0});var De=({openPopover:e,handleClose:r,argumentsValues:d,filter:i,onExecute:c})=>{let[l,p]=useState([]),o=(t,a)=>{if(a&&a!=="")l.filter(f=>f.name===t).length>0?p(l.map(f=>f.name===t?{name:t,value:a}:f)):p([...l||[],{name:t,value:a}]);else {let s=l.filter(f=>f.name===t);p(s);}},n=()=>{let t=i||"";return l.forEach(a=>{t=t.replace(`$ARG[${a.name}]`,`'${a.value}'`);}),t};return jsxs(ze,{open:!!e,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:e,onClose:r,title:"Pr\xE9-visualizar",children:[jsx(fe,{variant:"subtitle1",color:"text.primary",p:1,children:"Pr\xE9-visualizar"}),jsx(L,{children:d?.map((t,a)=>jsx(qe,{name:t,label:t,size:"small",onChange:s=>o(t,s.target.value),required:!0},a))}),jsxs(M,{p:2,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ae,{variant:"outlined",color:"inherit",size:"small",onClick:r,children:"Cancelar"}),jsx(ae,{variant:"contained",color:"primary",size:"small",startIcon:jsx(D,{icon:"PLAY_SIMPLE"}),onClick:()=>c(n()),disabled:l.length<d.length,children:"Executar"})]})]})},le=De;b(ce());b(me());var Ze=({openPopover:e,handleClose:r,addItem:d})=>{let[i,c]=useState("");return jsxs(ze,{open:!!e,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:e,onClose:r,sx:{maxWidth:464},title:"Novo Argumento",children:[jsx(fe,{variant:"subtitle1",color:"text.primary",p:1,children:"Novo Argumento"}),jsx(L,{children:jsx(qe,{value:i,onChange:p=>c(p.target.value),name:"item",label:"Novo argumento",size:"small"})}),jsxs(M,{p:1,direction:"row",justifyContent:"flex-end",spacing:1,children:[jsx(ae,{variant:"outlined",color:"inherit",size:"small",onClick:r,children:"Cancelar"}),jsx(ae,{variant:"contained",color:"primary",size:"small",startIcon:jsx(D,{icon:"SAVE_MARK"}),disabled:!i||i==="",onClick:()=>{d(i),r(),c("");},children:"Salvar"})]})]})},ge=Ze;var tt=({label:e,itens:r,argumentsValues:d,fields:i,addItem:c,removeItem:l,insertItemSQL:p})=>{let[o,n]=useState(!1),t=et(),a=()=>{n(!o);},s=(m,u)=>{m.stopPropagation(),l&&l(u);},f=m=>{p(d?` $ARG[${m}]`:i?` this.${m}`:` ${m}`);};return jsxs(M,{children:[jsxs(M,{direction:"row",alignItems:"center",spacing:1.5,padding:1,paddingLeft:0,children:[jsx(G,{edge:"end",onClick:a,children:jsx(D,{icon:o?"CHEVRON_UP":"CHEVRON_RIGHT"})}),jsx(fe,{variant:"overline",color:"text.primary",children:e}),c&&jsxs(Fragment,{children:[jsx(G,{edge:"end",onClick:t.onOpen,children:jsx(D,{icon:"SIMPLE_ADD"})}),jsx(ge,{addItem:c,handleClose:t.onClose,openPopover:t.open})]})]}),o&&jsx(M,{spacing:.5,children:jsx(Je,{sx:{maxHeight:150},children:r?.map((m,u)=>jsxs(re,{direction:"row",justifyContent:"space-between",onClick:()=>f(m),children:[jsx(fe,{variant:"caption",textAlign:"center",width:"100%",children:m}),l&&jsx(Ne,{edge:"end",onClick:h=>s(h,m),children:jsx(D,{icon:"DELETE_MARK_BUTTON_02"})})]},u))})})]})},w=tt;var lt=({fieldsSelect:e,argumentsValues:r,onChangeArguments:d,sql:i,setSql:c,setFilterRule:l})=>{let[p,o]=useState(),{setValue:n}=useFormContext(),[t,a]=useState(1),[s,f]=useState(),m=g=>{s.session.insert(t,` ${g} `);},u=g=>{d([...r||[],g]);},h=g=>{d(r?.filter(O=>O!==g));},b=g=>{c(g[0]),l(g[0]),n("groups",void 0);},B=p?e.filter(g=>g.id.toString().toLocaleLowerCase().includes(p)||g.description.toString().toLocaleLowerCase().includes(p)||g.name?.toString().toLocaleLowerCase().includes(p)):e;return jsxs(M,{direction:"row",padding:1.5,spacing:1.5,children:[jsxs(oe,{children:[jsx(at,{value:p,trigger:"change",onSearch:g=>o(g?.toLocaleLowerCase()),fullWidth:!0,size:"small",placeholder:"Buscar",iconPosition:"start"}),jsx(w,{label:"Campos",fields:!0,itens:B.map(g=>g.name),insertItemSQL:m}),jsx(w,{label:"Argumentos",argumentsValues:!0,itens:r,addItem:u,removeItem:h,insertItemSQL:m}),jsx(w,{label:"Operadores",insertItemSQL:m,itens:["=",">","<","<=",">=","!=","IS NULL","IN","LIKE","NOT IN","NOT LIKE","IS NOT NULL"]}),jsx(w,{label:"Filtros",fields:!0,insertItemSQL:m,itens:B.map(g=>g.name)})]}),jsx(ne,{children:jsxs("fieldset",{children:[jsx("legend",{children:"Regras de listagem"}),jsx(split,{width:"100%",mode:"sql",theme:"chrome",name:"rule",fontSize:14,onChange:b,onCursorChange:g=>a(g.getCursor()),value:[i],onLoad:g=>f(g),showPrintMargin:!1,showGutter:!1,highlightActiveLine:!1,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:!1,tabSize:2},splits:1})]})})]})},he=lt;var pt=({data:e,fields:r,isLoading:d,isError:i})=>jsxs(M,{children:[jsx(fe,{variant:"subtitle2",color:"text.secondary",children:"PR\xC9 VISUALIZA\xC7\xC3O DOS RESULTADOS DA LISTAGEM"}),i&&jsx(M,{children:"Falha ao gerar resultado"}),e&&jsx(ct,{columns:r?.map(c=>({field:c,headerName:c,width:150,type:"string"})),loading:d,rows:e,disableRowSelectionOnClick:!0,disableColumnMenu:!0,disableColumnResize:!0,showColumnVerticalBorder:!0,hideFooter:!0})]}),ve=pt;var ke=styled(M)(({theme:e})=>({border:`1px solid ${alpha(e.palette.primary.main,.32)}`,backgroundColor:alpha(e.palette.primary.main,.08),borderRadius:8,padding:8,paddingLeft:24,alignItems:"center"})),Ce=styled(Ne)(()=>({height:"28px",marginLeft:"16px","&:hover":{backgroundColor:"transparent"}})),P=styled(N)(()=>({width:230}));var At=({index:e,indexGroup:r,removeConditional:d,fieldsSelect:i})=>{let{watch:c}=useFormContext(),l=`groups.[${r}].conditionals[${e}].field`,p=`groups.[${r}].conditionals[${e}].conditional`,o=`groups.[${r}].conditionals[${e}].type`,n=`groups.[${r}].conditionals[${e}].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"}],a=c(o);return jsxs(M,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[jsx(N,{label:"Se",name:l,size:"small",fullWidth:!0,options:i?.map(s=>({value:s.name,label:s.description}))}),jsx(N,{label:"Estado",name:p,size:"small",fullWidth:!0,options:t}),jsx(N,{label:"Objetivo",name:`groups.[${r}].conditionals[${e}].type`,size:"small",fullWidth:!0,options:[{label:"Valor",value:"value"},{label:"Campo",value:"field"}]}),a==="value"?jsx(vt,{label:"Valor",name:n,size:"small",fullWidth:!0}):jsx(N,{label:"Se",name:n,size:"small",fullWidth:!0,options:i?.map(s=>({value:s.name,label:s.description}))}),jsx(Ce,{color:"error",onClick:()=>{d(e);},children:jsx(D,{icon:"DELETE_MARK_BUTTON_02"})})]})},ye=At;var Rt=({index:e,removeGroup:r,fieldsSelect:d})=>{let{control:i}=useFormContext(),c=`groups.[${e}].operator`,{fields:l,append:p,remove:o}=useFieldArray({name:`groups.${e}.conditionals`,control:i});return jsx(It,{name:`GRUPO ${e+1}`,description:"EXIBIR A LISTAGEM QUANDO ATENDER UMA DAS CONDI\xC7\xD5ES",header:jsx(P,{name:c,size:"small",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]}),onDelete:()=>r(e),children:jsxs(M,{spacing:1.5,alignItems:"flex-start",children:[l.map((n,t)=>jsx(ye,{index:t,indexGroup:e,removeConditional:a=>o(a),fieldsSelect:d},n.id)),jsx(St,{actionType:"NEW",onClick:()=>p({field:"",conditional:"=",type:"value",value:""}),variant:"text",size:"small",children:"Adicionar condi\xE7\xE3o"})]})})},xe=Rt;var Et=({fieldsSelect:e})=>{let{control:r}=useFormContext(),{fields:d,append:i,remove:c}=useFieldArray({name:"groups",control:r});return jsxs(M,{gap:1.5,children:[jsxs(ke,{direction:"row",spacing:1.5,children:[jsx(fe,{variant:"body2",color:"text.light.primary",children:"Se"}),jsx(M,{children:jsx(P,{size:"small",name:"operator",options:[{label:"Qualquer",value:"or"},{label:"Todas as condi\xE7\xF5es",value:"and"}]})}),jsxs(fe,{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."})]})]}),d.map((l,p)=>jsx(xe,{index:p,removeGroup:o=>c(o),fieldsSelect:e},l.id)),jsx(ae,{size:"large",color:"inherit",startIcon:jsx(D,{icon:"SIMPLE_ADD"}),variant:"outlined",fullWidth:!0,onClick:()=>{i({operator:"or",conditionals:[{field:"",conditional:"=",type:"value",value:""}]});},children:"Adicionar grupo"})]})},Re=Et;var _e=styled(M)(({theme:e})=>({border:`1px solid ${alpha(e.palette.grey[500],.32)}`,borderRadius:8,marginTop:24})),we=styled(M)(()=>({padding:12,borderBottom:"1px solid #e0e0e0"})),Z=styled(Ft)(()=>({lineHeight:"1em"})),Be=styled(M)(()=>({padding:12}));var Ut=({argumentsValues:e,onChangeArguments:r,fieldsSelect:d,onChangeRule:i,onChangeSqlProcessed:c,defaultMode:l,defaultFilter:p,dataPreview:o,errorPreview:n,loadingPreview:t})=>{let[a,s]=useState(p||""),[f,m]=Gt(),[u,h]=useState(l||"simple"),{watch:b,setValue:B}=useFormContext(),g=et(),O=b("operator"),Ee=b("groups");useEffect(()=>()=>{B("config",{});},[]);let Te=(k,j)=>{if(j==="advanced"){let q=a$1(Ee,O);s(q),c(q),i(q);}h(j);},Fe=k=>{f||u==="simple"||e.length===0?m():g.onOpen(k);},Pe=k=>{m(),c(k);};return jsx(Fragment,{children:jsxs(_e,{children:[jsxs(we,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxs(zt,{color:"primary",value:u,size:"small",exclusive:!0,onChange:Te,children:[jsx(Z,{value:"simple",size:"small",children:"Modo simplificado"}),jsx(Z,{value:"advanced",size:"small",children:"Modo avan\xE7ado"})]}),jsx(ae,{variant:"outlined",color:"inherit",onClick:k=>Fe(k),startIcon:!f&&jsx(D,{icon:"PLAY_SIMPLE",color:"primary.main"}),children:f?"Voltar":"Executar"}),!!g.open&&jsx(le,{handleClose:g.onClose,openPopover:g.open,argumentsValues:e,filter:a,onExecute:k=>Pe(k)})]}),jsx(Be,{children:f?jsx(ve,{fields:d.map(k=>k.name),data:o,isError:n,isLoading:t}):jsx(Fragment,{children:u==="simple"?jsx(Re,{fieldsSelect:d,sql:a,setSql:s}):jsx(he,{fieldsSelect:d,argumentsValues:e,onChangeArguments:r,sql:a,setSql:s,setFilterRule:i})})})]})})},Nr=Ut;
|
|
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(`
|
|
196
|
+
.ace_snippet-marker {
|
|
197
|
+
-moz-box-sizing: border-box;
|
|
198
|
+
box-sizing: border-box;
|
|
199
|
+
background: rgba(194, 193, 208, 0.09);
|
|
200
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
201
|
+
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(`
|
|
204
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
205
|
+
background-color: #CAD6FA;
|
|
206
|
+
z-index: 1;
|
|
207
|
+
}
|
|
208
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
209
|
+
background-color: #3a674e;
|
|
210
|
+
}
|
|
211
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
212
|
+
border: 1px solid #abbffe;
|
|
213
|
+
margin-top: -1px;
|
|
214
|
+
background: rgba(233,233,253,0.4);
|
|
215
|
+
position: absolute;
|
|
216
|
+
z-index: 2;
|
|
217
|
+
}
|
|
218
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
219
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
220
|
+
background: rgba(58, 103, 78, 0.62);
|
|
221
|
+
}
|
|
222
|
+
.ace_completion-meta {
|
|
223
|
+
opacity: 0.5;
|
|
224
|
+
margin-left: 0.9em;
|
|
225
|
+
}
|
|
226
|
+
.ace_completion-message {
|
|
227
|
+
margin-left: 0.9em;
|
|
228
|
+
color: blue;
|
|
229
|
+
}
|
|
230
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
231
|
+
color: #2d69c7;
|
|
232
|
+
}
|
|
233
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
234
|
+
color: #93ca12;
|
|
235
|
+
}
|
|
236
|
+
.ace_editor.ace_autocomplete {
|
|
237
|
+
width: 300px;
|
|
238
|
+
z-index: 200000;
|
|
239
|
+
border: 1px lightgray solid;
|
|
240
|
+
position: fixed;
|
|
241
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
242
|
+
line-height: 1.4;
|
|
243
|
+
background: #fefefe;
|
|
244
|
+
color: #111;
|
|
245
|
+
}
|
|
246
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
|
247
|
+
border: 1px #484747 solid;
|
|
248
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
249
|
+
line-height: 1.4;
|
|
250
|
+
background: #25282c;
|
|
251
|
+
color: #c1c1c1;
|
|
252
|
+
}
|
|
253
|
+
.ace_autocomplete .ace_text-layer {
|
|
254
|
+
width: calc(100% - 8px);
|
|
255
|
+
}
|
|
256
|
+
.ace_autocomplete .ace_line {
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
}
|
|
260
|
+
.ace_autocomplete .ace_line > * {
|
|
261
|
+
min-width: 0;
|
|
262
|
+
flex: 0 0 auto;
|
|
263
|
+
}
|
|
264
|
+
.ace_autocomplete .ace_line .ace_ {
|
|
265
|
+
flex: 0 1 auto;
|
|
266
|
+
overflow: hidden;
|
|
267
|
+
text-overflow: ellipsis;
|
|
268
|
+
}
|
|
269
|
+
.ace_autocomplete .ace_completion-spacer {
|
|
270
|
+
flex: 1;
|
|
271
|
+
}
|
|
272
|
+
.ace_autocomplete.ace_loading:after {
|
|
273
|
+
content: "";
|
|
274
|
+
position: absolute;
|
|
275
|
+
top: 0px;
|
|
276
|
+
height: 2px;
|
|
277
|
+
width: 8%;
|
|
278
|
+
background: blue;
|
|
279
|
+
z-index: 100;
|
|
280
|
+
animation: ace_progress 3s infinite linear;
|
|
281
|
+
animation-delay: 300ms;
|
|
282
|
+
transform: translateX(-100%) scaleX(1);
|
|
283
|
+
}
|
|
284
|
+
@keyframes ace_progress {
|
|
285
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
|
286
|
+
50% { transform: translateX(625%) scaleX(2) }
|
|
287
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
|
288
|
+
}
|
|
289
|
+
@media (prefers-reduced-motion) {
|
|
290
|
+
.ace_autocomplete.ace_loading:after {
|
|
291
|
+
transform: translateX(625%) scaleX(2);
|
|
292
|
+
animation: none;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
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;
|
|
156
296
|
|
|
157
|
-
export {
|
|
297
|
+
export { lr as default };
|
package/package.json
CHANGED