{"version":3,"file":"mode-redshift-1f2d297d.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-redshift.js"],"sourcesContent":["ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar DocCommentHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"comment.doc.tag\",\n regex: \"@\\\\w+(?=\\\\s|$)\"\n }, DocCommentHighlightRules.getTagRule(), {\n defaultToken: \"comment.doc\",\n caseInsensitive: true\n }\n ]\n };\n};\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\nDocCommentHighlightRules.getTagRule = function (start) {\n return {\n token: \"comment.doc.tag.storage.type\",\n regex: \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\nDocCommentHighlightRules.getStartRule = function (start) {\n return {\n token: \"comment.doc\",\n regex: \"\\\\/\\\\*(?=\\\\*)\",\n next: start\n };\n};\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token: \"comment.doc\",\n regex: \"\\\\*\\\\/\",\n next: start\n };\n};\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/json_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar JsonHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"variable\",\n regex: '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]\\\\s*(?=:)'\n }, {\n token: \"string\",\n regex: '\"',\n next: \"string\"\n }, {\n token: \"constant.numeric\",\n regex: \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token: \"constant.numeric\",\n regex: \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token: \"constant.language.boolean\",\n regex: \"(?:true|false)\\\\b\"\n }, {\n token: \"text\",\n regex: \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token: \"comment\",\n regex: \"\\\\/\\\\/.*$\"\n }, {\n token: \"comment.start\",\n regex: \"\\\\/\\\\*\",\n next: \"comment\"\n }, {\n token: \"paren.lparen\",\n regex: \"[[({]\"\n }, {\n token: \"paren.rparen\",\n regex: \"[\\\\])}]\"\n }, {\n token: \"punctuation.operator\",\n regex: /[,]/\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }\n ],\n \"string\": [\n {\n token: \"constant.language.escape\",\n regex: /\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[\"\\\\\\/bfnrt])/\n }, {\n token: \"string\",\n regex: '\"|$',\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"comment\": [\n {\n token: \"comment.end\",\n regex: \"\\\\*\\\\/\",\n next: \"start\"\n }, {\n defaultToken: \"comment\"\n }\n ]\n };\n};\noop.inherits(JsonHighlightRules, TextHighlightRules);\nexports.JsonHighlightRules = JsonHighlightRules;\n\n});\n\nace.define(\"ace/mode/redshift_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\",\"ace/mode/json_highlight_rules\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar lang = require(\"../lib/lang\");\nvar DocCommentHighlightRules = require(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar JsonHighlightRules = require(\"./json_highlight_rules\").JsonHighlightRules;\nvar RedshiftHighlightRules = function () {\n var keywords = (\"aes128|aes256|all|allowoverwrite|analyse|analyze|and|any|array|as|asc|authorization|backup|\" +\n \"between|binary|blanksasnull|both|bytedict|bzip2|case|cast|check|collate|column|constraint|create|credentials|\" +\n \"cross|current_date|current_time|current_timestamp|current_user|current_user_id|default|deferrable|deflate|defrag|delta|\" +\n \"delta32k|desc|disable|distinct|do|else|emptyasnull|enable|encode|encrypt|encryption|end|except|explicit|false|for|foreign|\" +\n \"freeze|from|full|globaldict256|globaldict64k|grant|group|gzip|having|identity|ignore|ilike|in|initially|inner|intersect|into|is|\" +\n \"isnull|join|leading|left|like|limit|localtime|localtimestamp|lun|luns|lzo|lzop|minus|mostly13|mostly32|mostly8|natural|new|not|notnull|\" +\n \"null|nulls|off|offline|offset|old|on|only|open|or|order|outer|overlaps|parallel|partition|percent|permissions|placing|primary|raw|readratio|\" +\n \"recover|references|rejectlog|resort|restore|right|select|session_user|similar|some|sysdate|system|table|tag|tdes|text255|text32k|then|timestamp|\" +\n \"to|top|trailing|true|truncatecolumns|union|unique|user|using|verbose|wallet|when|where|with|without\");\n var builtinFunctions = (\"current_schema|current_schemas|has_database_privilege|has_schema_privilege|has_table_privilege|age|current_time|current_timestamp|localtime|\" +\n \"isfinite|now|ascii|get_bit|get_byte|octet_length|set_bit|set_byte|to_ascii|avg|count|listagg|max|min|stddev_samp|stddev_pop|sum|var_samp|var_pop|\" +\n \"bit_and|bit_or|bool_and|bool_or|avg|count|cume_dist|dense_rank|first_value|last_value|lag|lead|listagg|max|median|min|nth_value|ntile|percent_rank|\" +\n \"percentile_cont|percentile_disc|rank|ratio_to_report|row_number|case|coalesce|decode|greatest|least|nvl|nvl2|nullif|add_months|age|convert_timezone|\" +\n \"current_date|timeofday|current_time|current_timestamp|date_cmp|date_cmp_timestamp|date_part_year|dateadd|datediff|date_part|date_trunc|extract|getdate|\" +\n \"interval_cmp|isfinite|last_day|localtime|localtimestamp|months_between|next_day|now|sysdate|timestamp_cmp|timestamp_cmp_date|trunc|abs|acos|asin|atan|\" +\n \"atan2|cbrt|ceiling|ceil|checksum|cos|cot|degrees|dexp|dlog1|dlog10|exp|floor|ln|log|mod|pi|power|radians|random|round|sin|sign|sqrt|tan|trunc|ascii|\" +\n \"bpcharcmp|btrim|bttext_pattern_cmp|char_length|character_length|charindex|chr|concat|crc32|func_sha1|get_bit|get_byte|initcap|left|right|len|length|\" +\n \"lower|lpad|rpad|ltrim|md5|octet_length|position|quote_ident|quote_literal|regexp_count|regexp_instr|regexp_replace|regexp_substr|repeat|replace|replicate|\" +\n \"reverse|rtrim|set_bit|set_byte|split_part|strpos|strtol|substring|textlen|to_ascii|to_hex|translate|trim|upper|json_array_length|json_extract_array_element_text|\" +\n \"json_extract_path_text|cast|convert|to_char|to_date|to_number|current_database|current_schema|current_schemas|current_user|current_user_id|has_database_privilege|\" +\n \"has_schema_privilege|has_table_privilege|pg_backend_pid|pg_last_copy_count|pg_last_copy_id|pg_last_query_id|pg_last_unload_count|session_user|slice_num|user|version\");\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": builtinFunctions,\n \"keyword\": keywords\n }, \"identifier\", true);\n var sqlRules = [{\n token: \"string\",\n regex: \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token: \"variable.language\",\n regex: '\".*?\"'\n }, {\n token: \"constant.numeric\",\n regex: \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token: keywordMapper,\n regex: \"[a-zA-Z_][a-zA-Z0-9_$]*\\\\b\" // TODO - Unicode in identifiers\n }, {\n token: \"keyword.operator\",\n regex: \"!|!!|!~|!~\\\\*|!~~|!~~\\\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\\\&|\\\\&\\\\&|\\\\&<|\\\\&<\\\\||\\\\&>|\\\\*|\\\\+|\" +\n \"\\\\-|/|<|<#>|<\\\\->|<<|<<=|<<\\\\||<=|<>|<\\\\?>|<@|<\\\\^|=|>|>=|>>|>>=|>\\\\^|\\\\?#|\\\\?\\\\-|\\\\?\\\\-\\\\||\" +\n \"\\\\?\\\\||\\\\?\\\\|\\\\||@|@\\\\-@|@>|@@|@@@|\\\\^|\\\\||\\\\|\\\\&>|\\\\|/|\\\\|>>|\\\\|\\\\||\\\\|\\\\|/|~|~\\\\*|~<=~|~<~|\" +\n \"~=|~>=~|~>~|~~|~~\\\\*\"\n }, {\n token: \"paren.lparen\",\n regex: \"[\\\\(]\"\n }, {\n token: \"paren.rparen\",\n regex: \"[\\\\)]\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }\n ];\n this.$rules = {\n \"start\": [{\n token: \"comment\",\n regex: \"--.*$\"\n },\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n {\n token: \"comment\",\n regex: \"\\\\/\\\\*\",\n next: \"comment\"\n }, {\n token: \"keyword.statementBegin\",\n regex: \"^[a-zA-Z]+\",\n next: \"statement\"\n }, {\n token: \"support.buildin\",\n regex: \"^\\\\\\\\[\\\\S]+.*$\"\n }\n ],\n \"statement\": [{\n token: \"comment\",\n regex: \"--.*$\"\n }, {\n token: \"comment\",\n regex: \"\\\\/\\\\*\",\n next: \"commentStatement\"\n }, {\n token: \"statementEnd\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \"\\\\$json\\\\$\",\n next: \"json-start\"\n }, {\n token: \"string\",\n regex: \"\\\\$[\\\\w_0-9]*\\\\$$\",\n next: \"dollarSql\"\n }, {\n token: \"string\",\n regex: \"\\\\$[\\\\w_0-9]*\\\\$\",\n next: \"dollarStatementString\"\n }\n ].concat(sqlRules),\n \"dollarSql\": [{\n token: \"comment\",\n regex: \"--.*$\"\n }, {\n token: \"comment\",\n regex: \"\\\\/\\\\*\",\n next: \"commentDollarSql\"\n }, {\n token: \"string\",\n regex: \"^\\\\$[\\\\w_0-9]*\\\\$\",\n next: \"statement\"\n }, {\n token: \"string\",\n regex: \"\\\\$[\\\\w_0-9]*\\\\$\",\n next: \"dollarSqlString\"\n }\n ].concat(sqlRules),\n \"comment\": [{\n token: \"comment\",\n regex: \".*?\\\\*\\\\/\",\n next: \"start\"\n }, {\n token: \"comment\",\n regex: \".+\"\n }\n ],\n \"commentStatement\": [{\n token: \"comment\",\n regex: \".*?\\\\*\\\\/\",\n next: \"statement\"\n }, {\n token: \"comment\",\n regex: \".+\"\n }\n ],\n \"commentDollarSql\": [{\n token: \"comment\",\n regex: \".*?\\\\*\\\\/\",\n next: \"dollarSql\"\n }, {\n token: \"comment\",\n regex: \".+\"\n }\n ],\n \"dollarStatementString\": [{\n token: \"string\",\n regex: \".*?\\\\$[\\\\w_0-9]*\\\\$\",\n next: \"statement\"\n }, {\n token: \"string\",\n regex: \".+\"\n }\n ],\n \"dollarSqlString\": [{\n token: \"string\",\n regex: \".*?\\\\$[\\\\w_0-9]*\\\\$\",\n next: \"dollarSql\"\n }, {\n token: \"string\",\n regex: \".+\"\n }\n ]\n };\n this.embedRules(DocCommentHighlightRules, \"doc-\", [DocCommentHighlightRules.getEndRule(\"start\")]);\n this.embedRules(JsonHighlightRules, \"json-\", [{ token: \"string\", regex: \"\\\\$json\\\\$\", next: \"statement\" }]);\n};\noop.inherits(RedshiftHighlightRules, TextHighlightRules);\nexports.RedshiftHighlightRules = RedshiftHighlightRules;\n\n});\n\nace.define(\"ace/mode/redshift\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/redshift_highlight_rules\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar TextMode = require(\"../mode/text\").Mode;\nvar RedshiftHighlightRules = require(\"./redshift_highlight_rules\").RedshiftHighlightRules;\nvar Mode = function () {\n this.HighlightRules = RedshiftHighlightRules;\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"--\";\n this.blockComment = { start: \"/*\", end: \"*/\" };\n this.getNextLineIndent = function (state, line, tab) {\n if (state == \"start\" || state == \"keyword.statementEnd\") {\n return \"\";\n }\n else {\n return this.$getIndent(line); // Keep whatever indent the previous line has\n }\n };\n this.$id = \"ace/mode/redshift\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/redshift\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","DocCommentHighlightRules","start","JsonHighlightRules","RedshiftHighlightRules","keywords","builtinFunctions","keywordMapper","sqlRules","TextMode","Mode","state","line","tab","m"],"mappings":"gaAAA,IAAI,OAAO,uCAAuC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAClK,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAA2B,UAAY,CACvC,KAAK,OAAS,CACV,MAAS,CACL,CACI,MAAO,kBACP,MAAO,gBACvB,EAAeA,EAAyB,aAAc,CACtC,aAAc,cACd,gBAAiB,EACpB,CACJ,CACT,CACA,EACAF,EAAI,SAASE,EAA0BD,CAAkB,EACzDC,EAAyB,WAAa,SAAUC,EAAO,CACnD,MAAO,CACH,MAAO,+BACP,MAAO,+BACf,CACA,EACAD,EAAyB,aAAe,SAAUC,EAAO,CACrD,MAAO,CACH,MAAO,cACP,MAAO,gBACP,KAAMA,CACd,CACA,EACAD,EAAyB,WAAa,SAAUC,EAAO,CACnD,MAAO,CACH,MAAO,cACP,MAAO,SACP,KAAMA,CACd,CACA,EACAL,EAAQ,yBAA2BI,CAEnC,CAAC,EAED,IAAI,OAAO,gCAAgC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASL,EAASC,EAASC,EAAO,CAC3J,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDO,EAAqB,UAAY,CACjC,KAAK,OAAS,CACV,MAAS,CACL,CACI,MAAO,WACP,MAAO,6CACvB,EAAe,CACC,MAAO,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