@limetech/lime-elements 38.30.0 → 38.31.0

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-code-editor.cjs.entry.js +1673 -1
  4. package/dist/cjs/limel-code-editor.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-form.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/code-editor/code-editor.js +30 -2
  9. package/dist/collection/components/code-editor/code-editor.js.map +1 -1
  10. package/dist/collection/components/code-editor/code-editor.types.js.map +1 -1
  11. package/dist/collection/components/form/form.css +47 -62
  12. package/dist/esm/lime-elements.js +1 -1
  13. package/dist/esm/limel-code-editor.entry.js +1673 -1
  14. package/dist/esm/limel-code-editor.entry.js.map +1 -1
  15. package/dist/esm/limel-form.entry.js +1 -1
  16. package/dist/esm/limel-form.entry.js.map +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/lime-elements/lime-elements.esm.js +1 -1
  19. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  20. package/dist/lime-elements/p-5a483374.entry.js +2 -0
  21. package/dist/lime-elements/p-5a483374.entry.js.map +1 -0
  22. package/dist/lime-elements/{p-beee38bc.entry.js → p-d6d66daa.entry.js} +5 -5
  23. package/dist/lime-elements/{p-beee38bc.entry.js.map → p-d6d66daa.entry.js.map} +1 -1
  24. package/dist/types/components/code-editor/code-editor.d.ts +9 -1
  25. package/dist/types/components/code-editor/code-editor.types.d.ts +1 -1
  26. package/dist/types/components.d.ts +12 -4
  27. package/package.json +1 -1
  28. package/dist/lime-elements/p-596af3ae.entry.js +0 -2
  29. package/dist/lime-elements/p-596af3ae.entry.js.map +0 -1
@@ -9877,7 +9877,1280 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
9877
9877
  })));
9878
9878
  });
9879
9879
 
9880
- _commonjsHelpers.createCommonjsModule(function (module, exports) {
9880
+ var css = _commonjsHelpers.createCommonjsModule(function (module, exports) {
9881
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
9882
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
9883
+
9884
+ (function(mod) {
9885
+ mod(codemirror);
9886
+ })(function(CodeMirror) {
9887
+
9888
+ CodeMirror.defineMode("css", function(config, parserConfig) {
9889
+ var inline = parserConfig.inline;
9890
+ if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
9891
+
9892
+ var indentUnit = config.indentUnit,
9893
+ tokenHooks = parserConfig.tokenHooks,
9894
+ documentTypes = parserConfig.documentTypes || {},
9895
+ mediaTypes = parserConfig.mediaTypes || {},
9896
+ mediaFeatures = parserConfig.mediaFeatures || {},
9897
+ mediaValueKeywords = parserConfig.mediaValueKeywords || {},
9898
+ propertyKeywords = parserConfig.propertyKeywords || {},
9899
+ nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
9900
+ fontProperties = parserConfig.fontProperties || {},
9901
+ counterDescriptors = parserConfig.counterDescriptors || {},
9902
+ colorKeywords = parserConfig.colorKeywords || {},
9903
+ valueKeywords = parserConfig.valueKeywords || {},
9904
+ allowNested = parserConfig.allowNested,
9905
+ lineComment = parserConfig.lineComment,
9906
+ supportsAtComponent = parserConfig.supportsAtComponent === true,
9907
+ highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
9908
+
9909
+ var type, override;
9910
+ function ret(style, tp) { type = tp; return style; }
9911
+
9912
+ // Tokenizers
9913
+
9914
+ function tokenBase(stream, state) {
9915
+ var ch = stream.next();
9916
+ if (tokenHooks[ch]) {
9917
+ var result = tokenHooks[ch](stream, state);
9918
+ if (result !== false) return result;
9919
+ }
9920
+ if (ch == "@") {
9921
+ stream.eatWhile(/[\w\\\-]/);
9922
+ return ret("def", stream.current());
9923
+ } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
9924
+ return ret(null, "compare");
9925
+ } else if (ch == "\"" || ch == "'") {
9926
+ state.tokenize = tokenString(ch);
9927
+ return state.tokenize(stream, state);
9928
+ } else if (ch == "#") {
9929
+ stream.eatWhile(/[\w\\\-]/);
9930
+ return ret("atom", "hash");
9931
+ } else if (ch == "!") {
9932
+ stream.match(/^\s*\w*/);
9933
+ return ret("keyword", "important");
9934
+ } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
9935
+ stream.eatWhile(/[\w.%]/);
9936
+ return ret("number", "unit");
9937
+ } else if (ch === "-") {
9938
+ if (/[\d.]/.test(stream.peek())) {
9939
+ stream.eatWhile(/[\w.%]/);
9940
+ return ret("number", "unit");
9941
+ } else if (stream.match(/^-[\w\\\-]*/)) {
9942
+ stream.eatWhile(/[\w\\\-]/);
9943
+ if (stream.match(/^\s*:/, false))
9944
+ return ret("variable-2", "variable-definition");
9945
+ return ret("variable-2", "variable");
9946
+ } else if (stream.match(/^\w+-/)) {
9947
+ return ret("meta", "meta");
9948
+ }
9949
+ } else if (/[,+>*\/]/.test(ch)) {
9950
+ return ret(null, "select-op");
9951
+ } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
9952
+ return ret("qualifier", "qualifier");
9953
+ } else if (/[:;{}\[\]\(\)]/.test(ch)) {
9954
+ return ret(null, ch);
9955
+ } else if (stream.match(/^[\w-.]+(?=\()/)) {
9956
+ if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {
9957
+ state.tokenize = tokenParenthesized;
9958
+ }
9959
+ return ret("variable callee", "variable");
9960
+ } else if (/[\w\\\-]/.test(ch)) {
9961
+ stream.eatWhile(/[\w\\\-]/);
9962
+ return ret("property", "word");
9963
+ } else {
9964
+ return ret(null, null);
9965
+ }
9966
+ }
9967
+
9968
+ function tokenString(quote) {
9969
+ return function(stream, state) {
9970
+ var escaped = false, ch;
9971
+ while ((ch = stream.next()) != null) {
9972
+ if (ch == quote && !escaped) {
9973
+ if (quote == ")") stream.backUp(1);
9974
+ break;
9975
+ }
9976
+ escaped = !escaped && ch == "\\";
9977
+ }
9978
+ if (ch == quote || !escaped && quote != ")") state.tokenize = null;
9979
+ return ret("string", "string");
9980
+ };
9981
+ }
9982
+
9983
+ function tokenParenthesized(stream, state) {
9984
+ stream.next(); // Must be '('
9985
+ if (!stream.match(/^\s*[\"\')]/, false))
9986
+ state.tokenize = tokenString(")");
9987
+ else
9988
+ state.tokenize = null;
9989
+ return ret(null, "(");
9990
+ }
9991
+
9992
+ // Context management
9993
+
9994
+ function Context(type, indent, prev) {
9995
+ this.type = type;
9996
+ this.indent = indent;
9997
+ this.prev = prev;
9998
+ }
9999
+
10000
+ function pushContext(state, stream, type, indent) {
10001
+ state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
10002
+ return type;
10003
+ }
10004
+
10005
+ function popContext(state) {
10006
+ if (state.context.prev)
10007
+ state.context = state.context.prev;
10008
+ return state.context.type;
10009
+ }
10010
+
10011
+ function pass(type, stream, state) {
10012
+ return states[state.context.type](type, stream, state);
10013
+ }
10014
+ function popAndPass(type, stream, state, n) {
10015
+ for (var i = n || 1; i > 0; i--)
10016
+ state.context = state.context.prev;
10017
+ return pass(type, stream, state);
10018
+ }
10019
+
10020
+ // Parser
10021
+
10022
+ function wordAsValue(stream) {
10023
+ var word = stream.current().toLowerCase();
10024
+ if (valueKeywords.hasOwnProperty(word))
10025
+ override = "atom";
10026
+ else if (colorKeywords.hasOwnProperty(word))
10027
+ override = "keyword";
10028
+ else
10029
+ override = "variable";
10030
+ }
10031
+
10032
+ var states = {};
10033
+
10034
+ states.top = function(type, stream, state) {
10035
+ if (type == "{") {
10036
+ return pushContext(state, stream, "block");
10037
+ } else if (type == "}" && state.context.prev) {
10038
+ return popContext(state);
10039
+ } else if (supportsAtComponent && /@component/i.test(type)) {
10040
+ return pushContext(state, stream, "atComponentBlock");
10041
+ } else if (/^@(-moz-)?document$/i.test(type)) {
10042
+ return pushContext(state, stream, "documentTypes");
10043
+ } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
10044
+ return pushContext(state, stream, "atBlock");
10045
+ } else if (/^@(font-face|counter-style)/i.test(type)) {
10046
+ state.stateArg = type;
10047
+ return "restricted_atBlock_before";
10048
+ } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
10049
+ return "keyframes";
10050
+ } else if (type && type.charAt(0) == "@") {
10051
+ return pushContext(state, stream, "at");
10052
+ } else if (type == "hash") {
10053
+ override = "builtin";
10054
+ } else if (type == "word") {
10055
+ override = "tag";
10056
+ } else if (type == "variable-definition") {
10057
+ return "maybeprop";
10058
+ } else if (type == "interpolation") {
10059
+ return pushContext(state, stream, "interpolation");
10060
+ } else if (type == ":") {
10061
+ return "pseudo";
10062
+ } else if (allowNested && type == "(") {
10063
+ return pushContext(state, stream, "parens");
10064
+ }
10065
+ return state.context.type;
10066
+ };
10067
+
10068
+ states.block = function(type, stream, state) {
10069
+ if (type == "word") {
10070
+ var word = stream.current().toLowerCase();
10071
+ if (propertyKeywords.hasOwnProperty(word)) {
10072
+ override = "property";
10073
+ return "maybeprop";
10074
+ } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
10075
+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
10076
+ return "maybeprop";
10077
+ } else if (allowNested) {
10078
+ override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
10079
+ return "block";
10080
+ } else {
10081
+ override += " error";
10082
+ return "maybeprop";
10083
+ }
10084
+ } else if (type == "meta") {
10085
+ return "block";
10086
+ } else if (!allowNested && (type == "hash" || type == "qualifier")) {
10087
+ override = "error";
10088
+ return "block";
10089
+ } else {
10090
+ return states.top(type, stream, state);
10091
+ }
10092
+ };
10093
+
10094
+ states.maybeprop = function(type, stream, state) {
10095
+ if (type == ":") return pushContext(state, stream, "prop");
10096
+ return pass(type, stream, state);
10097
+ };
10098
+
10099
+ states.prop = function(type, stream, state) {
10100
+ if (type == ";") return popContext(state);
10101
+ if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
10102
+ if (type == "}" || type == "{") return popAndPass(type, stream, state);
10103
+ if (type == "(") return pushContext(state, stream, "parens");
10104
+
10105
+ if (type == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {
10106
+ override += " error";
10107
+ } else if (type == "word") {
10108
+ wordAsValue(stream);
10109
+ } else if (type == "interpolation") {
10110
+ return pushContext(state, stream, "interpolation");
10111
+ }
10112
+ return "prop";
10113
+ };
10114
+
10115
+ states.propBlock = function(type, _stream, state) {
10116
+ if (type == "}") return popContext(state);
10117
+ if (type == "word") { override = "property"; return "maybeprop"; }
10118
+ return state.context.type;
10119
+ };
10120
+
10121
+ states.parens = function(type, stream, state) {
10122
+ if (type == "{" || type == "}") return popAndPass(type, stream, state);
10123
+ if (type == ")") return popContext(state);
10124
+ if (type == "(") return pushContext(state, stream, "parens");
10125
+ if (type == "interpolation") return pushContext(state, stream, "interpolation");
10126
+ if (type == "word") wordAsValue(stream);
10127
+ return "parens";
10128
+ };
10129
+
10130
+ states.pseudo = function(type, stream, state) {
10131
+ if (type == "meta") return "pseudo";
10132
+
10133
+ if (type == "word") {
10134
+ override = "variable-3";
10135
+ return state.context.type;
10136
+ }
10137
+ return pass(type, stream, state);
10138
+ };
10139
+
10140
+ states.documentTypes = function(type, stream, state) {
10141
+ if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
10142
+ override = "tag";
10143
+ return state.context.type;
10144
+ } else {
10145
+ return states.atBlock(type, stream, state);
10146
+ }
10147
+ };
10148
+
10149
+ states.atBlock = function(type, stream, state) {
10150
+ if (type == "(") return pushContext(state, stream, "atBlock_parens");
10151
+ if (type == "}" || type == ";") return popAndPass(type, stream, state);
10152
+ if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
10153
+
10154
+ if (type == "interpolation") return pushContext(state, stream, "interpolation");
10155
+
10156
+ if (type == "word") {
10157
+ var word = stream.current().toLowerCase();
10158
+ if (word == "only" || word == "not" || word == "and" || word == "or")
10159
+ override = "keyword";
10160
+ else if (mediaTypes.hasOwnProperty(word))
10161
+ override = "attribute";
10162
+ else if (mediaFeatures.hasOwnProperty(word))
10163
+ override = "property";
10164
+ else if (mediaValueKeywords.hasOwnProperty(word))
10165
+ override = "keyword";
10166
+ else if (propertyKeywords.hasOwnProperty(word))
10167
+ override = "property";
10168
+ else if (nonStandardPropertyKeywords.hasOwnProperty(word))
10169
+ override = highlightNonStandardPropertyKeywords ? "string-2" : "property";
10170
+ else if (valueKeywords.hasOwnProperty(word))
10171
+ override = "atom";
10172
+ else if (colorKeywords.hasOwnProperty(word))
10173
+ override = "keyword";
10174
+ else
10175
+ override = "error";
10176
+ }
10177
+ return state.context.type;
10178
+ };
10179
+
10180
+ states.atComponentBlock = function(type, stream, state) {
10181
+ if (type == "}")
10182
+ return popAndPass(type, stream, state);
10183
+ if (type == "{")
10184
+ return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
10185
+ if (type == "word")
10186
+ override = "error";
10187
+ return state.context.type;
10188
+ };
10189
+
10190
+ states.atBlock_parens = function(type, stream, state) {
10191
+ if (type == ")") return popContext(state);
10192
+ if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
10193
+ return states.atBlock(type, stream, state);
10194
+ };
10195
+
10196
+ states.restricted_atBlock_before = function(type, stream, state) {
10197
+ if (type == "{")
10198
+ return pushContext(state, stream, "restricted_atBlock");
10199
+ if (type == "word" && state.stateArg == "@counter-style") {
10200
+ override = "variable";
10201
+ return "restricted_atBlock_before";
10202
+ }
10203
+ return pass(type, stream, state);
10204
+ };
10205
+
10206
+ states.restricted_atBlock = function(type, stream, state) {
10207
+ if (type == "}") {
10208
+ state.stateArg = null;
10209
+ return popContext(state);
10210
+ }
10211
+ if (type == "word") {
10212
+ if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
10213
+ (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
10214
+ override = "error";
10215
+ else
10216
+ override = "property";
10217
+ return "maybeprop";
10218
+ }
10219
+ return "restricted_atBlock";
10220
+ };
10221
+
10222
+ states.keyframes = function(type, stream, state) {
10223
+ if (type == "word") { override = "variable"; return "keyframes"; }
10224
+ if (type == "{") return pushContext(state, stream, "top");
10225
+ return pass(type, stream, state);
10226
+ };
10227
+
10228
+ states.at = function(type, stream, state) {
10229
+ if (type == ";") return popContext(state);
10230
+ if (type == "{" || type == "}") return popAndPass(type, stream, state);
10231
+ if (type == "word") override = "tag";
10232
+ else if (type == "hash") override = "builtin";
10233
+ return "at";
10234
+ };
10235
+
10236
+ states.interpolation = function(type, stream, state) {
10237
+ if (type == "}") return popContext(state);
10238
+ if (type == "{" || type == ";") return popAndPass(type, stream, state);
10239
+ if (type == "word") override = "variable";
10240
+ else if (type != "variable" && type != "(" && type != ")") override = "error";
10241
+ return "interpolation";
10242
+ };
10243
+
10244
+ return {
10245
+ startState: function(base) {
10246
+ return {tokenize: null,
10247
+ state: inline ? "block" : "top",
10248
+ stateArg: null,
10249
+ context: new Context(inline ? "block" : "top", base || 0, null)};
10250
+ },
10251
+
10252
+ token: function(stream, state) {
10253
+ if (!state.tokenize && stream.eatSpace()) return null;
10254
+ var style = (state.tokenize || tokenBase)(stream, state);
10255
+ if (style && typeof style == "object") {
10256
+ type = style[1];
10257
+ style = style[0];
10258
+ }
10259
+ override = style;
10260
+ if (type != "comment")
10261
+ state.state = states[state.state](type, stream, state);
10262
+ return override;
10263
+ },
10264
+
10265
+ indent: function(state, textAfter) {
10266
+ var cx = state.context, ch = textAfter && textAfter.charAt(0);
10267
+ var indent = cx.indent;
10268
+ if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
10269
+ if (cx.prev) {
10270
+ if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
10271
+ cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
10272
+ // Resume indentation from parent context.
10273
+ cx = cx.prev;
10274
+ indent = cx.indent;
10275
+ } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
10276
+ ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
10277
+ // Dedent relative to current context.
10278
+ indent = Math.max(0, cx.indent - indentUnit);
10279
+ }
10280
+ }
10281
+ return indent;
10282
+ },
10283
+
10284
+ electricChars: "}",
10285
+ blockCommentStart: "/*",
10286
+ blockCommentEnd: "*/",
10287
+ blockCommentContinue: " * ",
10288
+ lineComment: lineComment,
10289
+ fold: "brace"
10290
+ };
10291
+ });
10292
+
10293
+ function keySet(array) {
10294
+ var keys = {};
10295
+ for (var i = 0; i < array.length; ++i) {
10296
+ keys[array[i].toLowerCase()] = true;
10297
+ }
10298
+ return keys;
10299
+ }
10300
+
10301
+ var documentTypes_ = [
10302
+ "domain", "regexp", "url", "url-prefix"
10303
+ ], documentTypes = keySet(documentTypes_);
10304
+
10305
+ var mediaTypes_ = [
10306
+ "all", "aural", "braille", "handheld", "print", "projection", "screen",
10307
+ "tty", "tv", "embossed"
10308
+ ], mediaTypes = keySet(mediaTypes_);
10309
+
10310
+ var mediaFeatures_ = [
10311
+ "width", "min-width", "max-width", "height", "min-height", "max-height",
10312
+ "device-width", "min-device-width", "max-device-width", "device-height",
10313
+ "min-device-height", "max-device-height", "aspect-ratio",
10314
+ "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
10315
+ "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
10316
+ "max-color", "color-index", "min-color-index", "max-color-index",
10317
+ "monochrome", "min-monochrome", "max-monochrome", "resolution",
10318
+ "min-resolution", "max-resolution", "scan", "grid", "orientation",
10319
+ "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
10320
+ "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme",
10321
+ "dynamic-range", "video-dynamic-range"
10322
+ ], mediaFeatures = keySet(mediaFeatures_);
10323
+
10324
+ var mediaValueKeywords_ = [
10325
+ "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
10326
+ "interlace", "progressive",
10327
+ "dark", "light",
10328
+ "standard", "high"
10329
+ ], mediaValueKeywords = keySet(mediaValueKeywords_);
10330
+
10331
+ var propertyKeywords_ = [
10332
+ "align-content", "align-items", "align-self", "alignment-adjust",
10333
+ "alignment-baseline", "all", "anchor-point", "animation", "animation-delay",
10334
+ "animation-direction", "animation-duration", "animation-fill-mode",
10335
+ "animation-iteration-count", "animation-name", "animation-play-state",
10336
+ "animation-timing-function", "appearance", "azimuth", "backdrop-filter",
10337
+ "backface-visibility", "background", "background-attachment",
10338
+ "background-blend-mode", "background-clip", "background-color",
10339
+ "background-image", "background-origin", "background-position",
10340
+ "background-position-x", "background-position-y", "background-repeat",
10341
+ "background-size", "baseline-shift", "binding", "bleed", "block-size",
10342
+ "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target",
10343
+ "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius",
10344
+ "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
10345
+ "border-collapse", "border-color", "border-image", "border-image-outset",
10346
+ "border-image-repeat", "border-image-slice", "border-image-source",
10347
+ "border-image-width", "border-left", "border-left-color", "border-left-style",
10348
+ "border-left-width", "border-radius", "border-right", "border-right-color",
10349
+ "border-right-style", "border-right-width", "border-spacing", "border-style",
10350
+ "border-top", "border-top-color", "border-top-left-radius",
10351
+ "border-top-right-radius", "border-top-style", "border-top-width",
10352
+ "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
10353
+ "break-after", "break-before", "break-inside", "caption-side", "caret-color",
10354
+ "clear", "clip", "color", "color-profile", "column-count", "column-fill",
10355
+ "column-gap", "column-rule", "column-rule-color", "column-rule-style",
10356
+ "column-rule-width", "column-span", "column-width", "columns", "contain",
10357
+ "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after",
10358
+ "cue-before", "cursor", "direction", "display", "dominant-baseline",
10359
+ "drop-initial-after-adjust", "drop-initial-after-align",
10360
+ "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size",
10361
+ "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position",
10362
+ "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow",
10363
+ "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into",
10364
+ "font", "font-family", "font-feature-settings", "font-kerning",
10365
+ "font-language-override", "font-optical-sizing", "font-size",
10366
+ "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
10367
+ "font-variant", "font-variant-alternates", "font-variant-caps",
10368
+ "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
10369
+ "font-variant-position", "font-variation-settings", "font-weight", "gap",
10370
+ "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows",
10371
+ "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start",
10372
+ "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start",
10373
+ "grid-template", "grid-template-areas", "grid-template-columns",
10374
+ "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon",
10375
+ "image-orientation", "image-rendering", "image-resolution", "inline-box-align",
10376
+ "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline",
10377
+ "inset-inline-end", "inset-inline-start", "isolation", "justify-content",
10378
+ "justify-items", "justify-self", "left", "letter-spacing", "line-break",
10379
+ "line-height", "line-height-step", "line-stacking", "line-stacking-ruby",
10380
+ "line-stacking-shift", "line-stacking-strategy", "list-style",
10381
+ "list-style-image", "list-style-position", "list-style-type", "margin",
10382
+ "margin-bottom", "margin-left", "margin-right", "margin-top", "marks",
10383
+ "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed",
10384
+ "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode",
10385
+ "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type",
10386
+ "max-block-size", "max-height", "max-inline-size",
10387
+ "max-width", "min-block-size", "min-height", "min-inline-size", "min-width",
10388
+ "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right",
10389
+ "nav-up", "object-fit", "object-position", "offset", "offset-anchor",
10390
+ "offset-distance", "offset-path", "offset-position", "offset-rotate",
10391
+ "opacity", "order", "orphans", "outline", "outline-color", "outline-offset",
10392
+ "outline-style", "outline-width", "overflow", "overflow-style",
10393
+ "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom",
10394
+ "padding-left", "padding-right", "padding-top", "page", "page-break-after",
10395
+ "page-break-before", "page-break-inside", "page-policy", "pause",
10396
+ "pause-after", "pause-before", "perspective", "perspective-origin", "pitch",
10397
+ "pitch-range", "place-content", "place-items", "place-self", "play-during",
10398
+ "position", "presentation-level", "punctuation-trim", "quotes",
10399
+ "region-break-after", "region-break-before", "region-break-inside",
10400
+ "region-fragment", "rendering-intent", "resize", "rest", "rest-after",
10401
+ "rest-before", "richness", "right", "rotate", "rotation", "rotation-point",
10402
+ "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span",
10403
+ "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block",
10404
+ "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom",
10405
+ "scroll-margin-inline", "scroll-margin-inline-end",
10406
+ "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right",
10407
+ "scroll-margin-top", "scroll-padding", "scroll-padding-block",
10408
+ "scroll-padding-block-end", "scroll-padding-block-start",
10409
+ "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end",
10410
+ "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right",
10411
+ "scroll-padding-top", "scroll-snap-align", "scroll-snap-type",
10412
+ "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside",
10413
+ "size", "speak", "speak-as", "speak-header", "speak-numeral",
10414
+ "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size",
10415
+ "table-layout", "target", "target-name", "target-new", "target-position",
10416
+ "text-align", "text-align-last", "text-combine-upright", "text-decoration",
10417
+ "text-decoration-color", "text-decoration-line", "text-decoration-skip",
10418
+ "text-decoration-skip-ink", "text-decoration-style", "text-emphasis",
10419
+ "text-emphasis-color", "text-emphasis-position", "text-emphasis-style",
10420
+ "text-height", "text-indent", "text-justify", "text-orientation",
10421
+ "text-outline", "text-overflow", "text-rendering", "text-shadow",
10422
+ "text-size-adjust", "text-space-collapse", "text-transform",
10423
+ "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin",
10424
+ "transform-style", "transition", "transition-delay", "transition-duration",
10425
+ "transition-property", "transition-timing-function", "translate",
10426
+ "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance",
10427
+ "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate",
10428
+ "voice-stress", "voice-volume", "volume", "white-space", "widows", "width",
10429
+ "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index",
10430
+ // SVG-specific
10431
+ "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
10432
+ "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
10433
+ "color-interpolation", "color-interpolation-filters",
10434
+ "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
10435
+ "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke",
10436
+ "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
10437
+ "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
10438
+ "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
10439
+ "glyph-orientation-vertical", "text-anchor", "writing-mode",
10440
+ ], propertyKeywords = keySet(propertyKeywords_);
10441
+
10442
+ var nonStandardPropertyKeywords_ = [
10443
+ "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end",
10444
+ "border-block-end-color", "border-block-end-style", "border-block-end-width",
10445
+ "border-block-start", "border-block-start-color", "border-block-start-style",
10446
+ "border-block-start-width", "border-block-style", "border-block-width",
10447
+ "border-inline", "border-inline-color", "border-inline-end",
10448
+ "border-inline-end-color", "border-inline-end-style",
10449
+ "border-inline-end-width", "border-inline-start", "border-inline-start-color",
10450
+ "border-inline-start-style", "border-inline-start-width",
10451
+ "border-inline-style", "border-inline-width", "content-visibility", "margin-block",
10452
+ "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end",
10453
+ "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end",
10454
+ "padding-block-start", "padding-inline", "padding-inline-end",
10455
+ "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color",
10456
+ "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
10457
+ "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
10458
+ "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration",
10459
+ "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom"
10460
+ ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
10461
+
10462
+ var fontProperties_ = [
10463
+ "font-display", "font-family", "src", "unicode-range", "font-variant",
10464
+ "font-feature-settings", "font-stretch", "font-weight", "font-style"
10465
+ ], fontProperties = keySet(fontProperties_);
10466
+
10467
+ var counterDescriptors_ = [
10468
+ "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
10469
+ "speak-as", "suffix", "symbols", "system"
10470
+ ], counterDescriptors = keySet(counterDescriptors_);
10471
+
10472
+ var colorKeywords_ = [
10473
+ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
10474
+ "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
10475
+ "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
10476
+ "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
10477
+ "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen",
10478
+ "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
10479
+ "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet",
10480
+ "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick",
10481
+ "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
10482
+ "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
10483
+ "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
10484
+ "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
10485
+ "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink",
10486
+ "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey",
10487
+ "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
10488
+ "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
10489
+ "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
10490
+ "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
10491
+ "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
10492
+ "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
10493
+ "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
10494
+ "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
10495
+ "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
10496
+ "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan",
10497
+ "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
10498
+ "whitesmoke", "yellow", "yellowgreen"
10499
+ ], colorKeywords = keySet(colorKeywords_);
10500
+
10501
+ var valueKeywords_ = [
10502
+ "above", "absolute", "activeborder", "additive", "activecaption", "afar",
10503
+ "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
10504
+ "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
10505
+ "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
10506
+ "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary",
10507
+ "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box",
10508
+ "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button",
10509
+ "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
10510
+ "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
10511
+ "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
10512
+ "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
10513
+ "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
10514
+ "compact", "condensed", "conic-gradient", "contain", "content", "contents",
10515
+ "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop",
10516
+ "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
10517
+ "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
10518
+ "destination-in", "destination-out", "destination-over", "devanagari", "difference",
10519
+ "disc", "discard", "disclosure-closed", "disclosure-open", "document",
10520
+ "dot-dash", "dot-dot-dash",
10521
+ "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
10522
+ "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
10523
+ "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
10524
+ "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
10525
+ "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
10526
+ "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
10527
+ "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
10528
+ "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
10529
+ "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
10530
+ "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
10531
+ "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove",
10532
+ "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
10533
+ "help", "hidden", "hide", "higher", "highlight", "highlighttext",
10534
+ "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore",
10535
+ "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
10536
+ "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
10537
+ "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
10538
+ "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
10539
+ "katakana", "katakana-iroha", "keep-all", "khmer",
10540
+ "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
10541
+ "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
10542
+ "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
10543
+ "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
10544
+ "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
10545
+ "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d",
10546
+ "media-play-button", "media-slider", "media-sliderthumb",
10547
+ "media-volume-slider", "media-volume-sliderthumb", "medium",
10548
+ "menu", "menulist", "menulist-button",
10549
+ "menutext", "message-box", "middle", "min-intrinsic",
10550
+ "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize",
10551
+ "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
10552
+ "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
10553
+ "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
10554
+ "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
10555
+ "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
10556
+ "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter",
10557
+ "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
10558
+ "progress", "push-button", "radial-gradient", "radio", "read-only",
10559
+ "read-write", "read-write-plaintext-only", "rectangle", "region",
10560
+ "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient",
10561
+ "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse",
10562
+ "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
10563
+ "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
10564
+ "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
10565
+ "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
10566
+ "searchfield-cancel-button", "searchfield-decoration",
10567
+ "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
10568
+ "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama",
10569
+ "simp-chinese-formal", "simp-chinese-informal", "single",
10570
+ "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
10571
+ "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
10572
+ "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
10573
+ "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
10574
+ "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub",
10575
+ "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
10576
+ "table-caption", "table-cell", "table-column", "table-column-group",
10577
+ "table-footer-group", "table-header-group", "table-row", "table-row-group",
10578
+ "tamil",
10579
+ "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
10580
+ "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
10581
+ "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
10582
+ "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
10583
+ "trad-chinese-formal", "trad-chinese-informal", "transform",
10584
+ "translate", "translate3d", "translateX", "translateY", "translateZ",
10585
+ "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up",
10586
+ "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
10587
+ "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
10588
+ "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted",
10589
+ "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
10590
+ "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
10591
+ "xx-large", "xx-small"
10592
+ ], valueKeywords = keySet(valueKeywords_);
10593
+
10594
+ var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
10595
+ .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
10596
+ .concat(valueKeywords_);
10597
+ CodeMirror.registerHelper("hintWords", "css", allWords);
10598
+
10599
+ function tokenCComment(stream, state) {
10600
+ var maybeEnd = false, ch;
10601
+ while ((ch = stream.next()) != null) {
10602
+ if (maybeEnd && ch == "/") {
10603
+ state.tokenize = null;
10604
+ break;
10605
+ }
10606
+ maybeEnd = (ch == "*");
10607
+ }
10608
+ return ["comment", "comment"];
10609
+ }
10610
+
10611
+ CodeMirror.defineMIME("text/css", {
10612
+ documentTypes: documentTypes,
10613
+ mediaTypes: mediaTypes,
10614
+ mediaFeatures: mediaFeatures,
10615
+ mediaValueKeywords: mediaValueKeywords,
10616
+ propertyKeywords: propertyKeywords,
10617
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10618
+ fontProperties: fontProperties,
10619
+ counterDescriptors: counterDescriptors,
10620
+ colorKeywords: colorKeywords,
10621
+ valueKeywords: valueKeywords,
10622
+ tokenHooks: {
10623
+ "/": function(stream, state) {
10624
+ if (!stream.eat("*")) return false;
10625
+ state.tokenize = tokenCComment;
10626
+ return tokenCComment(stream, state);
10627
+ }
10628
+ },
10629
+ name: "css"
10630
+ });
10631
+
10632
+ CodeMirror.defineMIME("text/x-scss", {
10633
+ mediaTypes: mediaTypes,
10634
+ mediaFeatures: mediaFeatures,
10635
+ mediaValueKeywords: mediaValueKeywords,
10636
+ propertyKeywords: propertyKeywords,
10637
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10638
+ colorKeywords: colorKeywords,
10639
+ valueKeywords: valueKeywords,
10640
+ fontProperties: fontProperties,
10641
+ allowNested: true,
10642
+ lineComment: "//",
10643
+ tokenHooks: {
10644
+ "/": function(stream, state) {
10645
+ if (stream.eat("/")) {
10646
+ stream.skipToEnd();
10647
+ return ["comment", "comment"];
10648
+ } else if (stream.eat("*")) {
10649
+ state.tokenize = tokenCComment;
10650
+ return tokenCComment(stream, state);
10651
+ } else {
10652
+ return ["operator", "operator"];
10653
+ }
10654
+ },
10655
+ ":": function(stream) {
10656
+ if (stream.match(/^\s*\{/, false))
10657
+ return [null, null]
10658
+ return false;
10659
+ },
10660
+ "$": function(stream) {
10661
+ stream.match(/^[\w-]+/);
10662
+ if (stream.match(/^\s*:/, false))
10663
+ return ["variable-2", "variable-definition"];
10664
+ return ["variable-2", "variable"];
10665
+ },
10666
+ "#": function(stream) {
10667
+ if (!stream.eat("{")) return false;
10668
+ return [null, "interpolation"];
10669
+ }
10670
+ },
10671
+ name: "css",
10672
+ helperType: "scss"
10673
+ });
10674
+
10675
+ CodeMirror.defineMIME("text/x-less", {
10676
+ mediaTypes: mediaTypes,
10677
+ mediaFeatures: mediaFeatures,
10678
+ mediaValueKeywords: mediaValueKeywords,
10679
+ propertyKeywords: propertyKeywords,
10680
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10681
+ colorKeywords: colorKeywords,
10682
+ valueKeywords: valueKeywords,
10683
+ fontProperties: fontProperties,
10684
+ allowNested: true,
10685
+ lineComment: "//",
10686
+ tokenHooks: {
10687
+ "/": function(stream, state) {
10688
+ if (stream.eat("/")) {
10689
+ stream.skipToEnd();
10690
+ return ["comment", "comment"];
10691
+ } else if (stream.eat("*")) {
10692
+ state.tokenize = tokenCComment;
10693
+ return tokenCComment(stream, state);
10694
+ } else {
10695
+ return ["operator", "operator"];
10696
+ }
10697
+ },
10698
+ "@": function(stream) {
10699
+ if (stream.eat("{")) return [null, "interpolation"];
10700
+ if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
10701
+ stream.eatWhile(/[\w\\\-]/);
10702
+ if (stream.match(/^\s*:/, false))
10703
+ return ["variable-2", "variable-definition"];
10704
+ return ["variable-2", "variable"];
10705
+ },
10706
+ "&": function() {
10707
+ return ["atom", "atom"];
10708
+ }
10709
+ },
10710
+ name: "css",
10711
+ helperType: "less"
10712
+ });
10713
+
10714
+ CodeMirror.defineMIME("text/x-gss", {
10715
+ documentTypes: documentTypes,
10716
+ mediaTypes: mediaTypes,
10717
+ mediaFeatures: mediaFeatures,
10718
+ propertyKeywords: propertyKeywords,
10719
+ nonStandardPropertyKeywords: nonStandardPropertyKeywords,
10720
+ fontProperties: fontProperties,
10721
+ counterDescriptors: counterDescriptors,
10722
+ colorKeywords: colorKeywords,
10723
+ valueKeywords: valueKeywords,
10724
+ supportsAtComponent: true,
10725
+ tokenHooks: {
10726
+ "/": function(stream, state) {
10727
+ if (!stream.eat("*")) return false;
10728
+ state.tokenize = tokenCComment;
10729
+ return tokenCComment(stream, state);
10730
+ }
10731
+ },
10732
+ name: "css",
10733
+ helperType: "gss"
10734
+ });
10735
+
10736
+ });
10737
+ });
10738
+
10739
+ var xml = _commonjsHelpers.createCommonjsModule(function (module, exports) {
10740
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
10741
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
10742
+
10743
+ (function(mod) {
10744
+ mod(codemirror);
10745
+ })(function(CodeMirror) {
10746
+
10747
+ var htmlConfig = {
10748
+ autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
10749
+ 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
10750
+ 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
10751
+ 'track': true, 'wbr': true, 'menuitem': true},
10752
+ implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
10753
+ 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
10754
+ 'th': true, 'tr': true},
10755
+ contextGrabbers: {
10756
+ 'dd': {'dd': true, 'dt': true},
10757
+ 'dt': {'dd': true, 'dt': true},
10758
+ 'li': {'li': true},
10759
+ 'option': {'option': true, 'optgroup': true},
10760
+ 'optgroup': {'optgroup': true},
10761
+ 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
10762
+ 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
10763
+ 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
10764
+ 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
10765
+ 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
10766
+ 'rp': {'rp': true, 'rt': true},
10767
+ 'rt': {'rp': true, 'rt': true},
10768
+ 'tbody': {'tbody': true, 'tfoot': true},
10769
+ 'td': {'td': true, 'th': true},
10770
+ 'tfoot': {'tbody': true},
10771
+ 'th': {'td': true, 'th': true},
10772
+ 'thead': {'tbody': true, 'tfoot': true},
10773
+ 'tr': {'tr': true}
10774
+ },
10775
+ doNotIndent: {"pre": true},
10776
+ allowUnquoted: true,
10777
+ allowMissing: true,
10778
+ caseFold: true
10779
+ };
10780
+
10781
+ var xmlConfig = {
10782
+ autoSelfClosers: {},
10783
+ implicitlyClosed: {},
10784
+ contextGrabbers: {},
10785
+ doNotIndent: {},
10786
+ allowUnquoted: false,
10787
+ allowMissing: false,
10788
+ allowMissingTagName: false,
10789
+ caseFold: false
10790
+ };
10791
+
10792
+ CodeMirror.defineMode("xml", function(editorConf, config_) {
10793
+ var indentUnit = editorConf.indentUnit;
10794
+ var config = {};
10795
+ var defaults = config_.htmlMode ? htmlConfig : xmlConfig;
10796
+ for (var prop in defaults) config[prop] = defaults[prop];
10797
+ for (var prop in config_) config[prop] = config_[prop];
10798
+
10799
+ // Return variables for tokenizers
10800
+ var type, setStyle;
10801
+
10802
+ function inText(stream, state) {
10803
+ function chain(parser) {
10804
+ state.tokenize = parser;
10805
+ return parser(stream, state);
10806
+ }
10807
+
10808
+ var ch = stream.next();
10809
+ if (ch == "<") {
10810
+ if (stream.eat("!")) {
10811
+ if (stream.eat("[")) {
10812
+ if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
10813
+ else return null;
10814
+ } else if (stream.match("--")) {
10815
+ return chain(inBlock("comment", "-->"));
10816
+ } else if (stream.match("DOCTYPE", true, true)) {
10817
+ stream.eatWhile(/[\w\._\-]/);
10818
+ return chain(doctype(1));
10819
+ } else {
10820
+ return null;
10821
+ }
10822
+ } else if (stream.eat("?")) {
10823
+ stream.eatWhile(/[\w\._\-]/);
10824
+ state.tokenize = inBlock("meta", "?>");
10825
+ return "meta";
10826
+ } else {
10827
+ type = stream.eat("/") ? "closeTag" : "openTag";
10828
+ state.tokenize = inTag;
10829
+ return "tag bracket";
10830
+ }
10831
+ } else if (ch == "&") {
10832
+ var ok;
10833
+ if (stream.eat("#")) {
10834
+ if (stream.eat("x")) {
10835
+ ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
10836
+ } else {
10837
+ ok = stream.eatWhile(/[\d]/) && stream.eat(";");
10838
+ }
10839
+ } else {
10840
+ ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
10841
+ }
10842
+ return ok ? "atom" : "error";
10843
+ } else {
10844
+ stream.eatWhile(/[^&<]/);
10845
+ return null;
10846
+ }
10847
+ }
10848
+ inText.isInText = true;
10849
+
10850
+ function inTag(stream, state) {
10851
+ var ch = stream.next();
10852
+ if (ch == ">" || (ch == "/" && stream.eat(">"))) {
10853
+ state.tokenize = inText;
10854
+ type = ch == ">" ? "endTag" : "selfcloseTag";
10855
+ return "tag bracket";
10856
+ } else if (ch == "=") {
10857
+ type = "equals";
10858
+ return null;
10859
+ } else if (ch == "<") {
10860
+ state.tokenize = inText;
10861
+ state.state = baseState;
10862
+ state.tagName = state.tagStart = null;
10863
+ var next = state.tokenize(stream, state);
10864
+ return next ? next + " tag error" : "tag error";
10865
+ } else if (/[\'\"]/.test(ch)) {
10866
+ state.tokenize = inAttribute(ch);
10867
+ state.stringStartCol = stream.column();
10868
+ return state.tokenize(stream, state);
10869
+ } else {
10870
+ stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
10871
+ return "word";
10872
+ }
10873
+ }
10874
+
10875
+ function inAttribute(quote) {
10876
+ var closure = function(stream, state) {
10877
+ while (!stream.eol()) {
10878
+ if (stream.next() == quote) {
10879
+ state.tokenize = inTag;
10880
+ break;
10881
+ }
10882
+ }
10883
+ return "string";
10884
+ };
10885
+ closure.isInAttribute = true;
10886
+ return closure;
10887
+ }
10888
+
10889
+ function inBlock(style, terminator) {
10890
+ return function(stream, state) {
10891
+ while (!stream.eol()) {
10892
+ if (stream.match(terminator)) {
10893
+ state.tokenize = inText;
10894
+ break;
10895
+ }
10896
+ stream.next();
10897
+ }
10898
+ return style;
10899
+ }
10900
+ }
10901
+
10902
+ function doctype(depth) {
10903
+ return function(stream, state) {
10904
+ var ch;
10905
+ while ((ch = stream.next()) != null) {
10906
+ if (ch == "<") {
10907
+ state.tokenize = doctype(depth + 1);
10908
+ return state.tokenize(stream, state);
10909
+ } else if (ch == ">") {
10910
+ if (depth == 1) {
10911
+ state.tokenize = inText;
10912
+ break;
10913
+ } else {
10914
+ state.tokenize = doctype(depth - 1);
10915
+ return state.tokenize(stream, state);
10916
+ }
10917
+ }
10918
+ }
10919
+ return "meta";
10920
+ };
10921
+ }
10922
+
10923
+ function lower(tagName) {
10924
+ return tagName && tagName.toLowerCase();
10925
+ }
10926
+
10927
+ function Context(state, tagName, startOfLine) {
10928
+ this.prev = state.context;
10929
+ this.tagName = tagName || "";
10930
+ this.indent = state.indented;
10931
+ this.startOfLine = startOfLine;
10932
+ if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
10933
+ this.noIndent = true;
10934
+ }
10935
+ function popContext(state) {
10936
+ if (state.context) state.context = state.context.prev;
10937
+ }
10938
+ function maybePopContext(state, nextTagName) {
10939
+ var parentTagName;
10940
+ while (true) {
10941
+ if (!state.context) {
10942
+ return;
10943
+ }
10944
+ parentTagName = state.context.tagName;
10945
+ if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||
10946
+ !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {
10947
+ return;
10948
+ }
10949
+ popContext(state);
10950
+ }
10951
+ }
10952
+
10953
+ function baseState(type, stream, state) {
10954
+ if (type == "openTag") {
10955
+ state.tagStart = stream.column();
10956
+ return tagNameState;
10957
+ } else if (type == "closeTag") {
10958
+ return closeTagNameState;
10959
+ } else {
10960
+ return baseState;
10961
+ }
10962
+ }
10963
+ function tagNameState(type, stream, state) {
10964
+ if (type == "word") {
10965
+ state.tagName = stream.current();
10966
+ setStyle = "tag";
10967
+ return attrState;
10968
+ } else if (config.allowMissingTagName && type == "endTag") {
10969
+ setStyle = "tag bracket";
10970
+ return attrState(type, stream, state);
10971
+ } else {
10972
+ setStyle = "error";
10973
+ return tagNameState;
10974
+ }
10975
+ }
10976
+ function closeTagNameState(type, stream, state) {
10977
+ if (type == "word") {
10978
+ var tagName = stream.current();
10979
+ if (state.context && state.context.tagName != tagName &&
10980
+ config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))
10981
+ popContext(state);
10982
+ if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
10983
+ setStyle = "tag";
10984
+ return closeState;
10985
+ } else {
10986
+ setStyle = "tag error";
10987
+ return closeStateErr;
10988
+ }
10989
+ } else if (config.allowMissingTagName && type == "endTag") {
10990
+ setStyle = "tag bracket";
10991
+ return closeState(type, stream, state);
10992
+ } else {
10993
+ setStyle = "error";
10994
+ return closeStateErr;
10995
+ }
10996
+ }
10997
+
10998
+ function closeState(type, _stream, state) {
10999
+ if (type != "endTag") {
11000
+ setStyle = "error";
11001
+ return closeState;
11002
+ }
11003
+ popContext(state);
11004
+ return baseState;
11005
+ }
11006
+ function closeStateErr(type, stream, state) {
11007
+ setStyle = "error";
11008
+ return closeState(type, stream, state);
11009
+ }
11010
+
11011
+ function attrState(type, _stream, state) {
11012
+ if (type == "word") {
11013
+ setStyle = "attribute";
11014
+ return attrEqState;
11015
+ } else if (type == "endTag" || type == "selfcloseTag") {
11016
+ var tagName = state.tagName, tagStart = state.tagStart;
11017
+ state.tagName = state.tagStart = null;
11018
+ if (type == "selfcloseTag" ||
11019
+ config.autoSelfClosers.hasOwnProperty(lower(tagName))) {
11020
+ maybePopContext(state, tagName);
11021
+ } else {
11022
+ maybePopContext(state, tagName);
11023
+ state.context = new Context(state, tagName, tagStart == state.indented);
11024
+ }
11025
+ return baseState;
11026
+ }
11027
+ setStyle = "error";
11028
+ return attrState;
11029
+ }
11030
+ function attrEqState(type, stream, state) {
11031
+ if (type == "equals") return attrValueState;
11032
+ if (!config.allowMissing) setStyle = "error";
11033
+ return attrState(type, stream, state);
11034
+ }
11035
+ function attrValueState(type, stream, state) {
11036
+ if (type == "string") return attrContinuedState;
11037
+ if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
11038
+ setStyle = "error";
11039
+ return attrState(type, stream, state);
11040
+ }
11041
+ function attrContinuedState(type, stream, state) {
11042
+ if (type == "string") return attrContinuedState;
11043
+ return attrState(type, stream, state);
11044
+ }
11045
+
11046
+ return {
11047
+ startState: function(baseIndent) {
11048
+ var state = {tokenize: inText,
11049
+ state: baseState,
11050
+ indented: baseIndent || 0,
11051
+ tagName: null, tagStart: null,
11052
+ context: null};
11053
+ if (baseIndent != null) state.baseIndent = baseIndent;
11054
+ return state
11055
+ },
11056
+
11057
+ token: function(stream, state) {
11058
+ if (!state.tagName && stream.sol())
11059
+ state.indented = stream.indentation();
11060
+
11061
+ if (stream.eatSpace()) return null;
11062
+ type = null;
11063
+ var style = state.tokenize(stream, state);
11064
+ if ((style || type) && style != "comment") {
11065
+ setStyle = null;
11066
+ state.state = state.state(type || style, stream, state);
11067
+ if (setStyle)
11068
+ style = setStyle == "error" ? style + " error" : setStyle;
11069
+ }
11070
+ return style;
11071
+ },
11072
+
11073
+ indent: function(state, textAfter, fullLine) {
11074
+ var context = state.context;
11075
+ // Indent multi-line strings (e.g. css).
11076
+ if (state.tokenize.isInAttribute) {
11077
+ if (state.tagStart == state.indented)
11078
+ return state.stringStartCol + 1;
11079
+ else
11080
+ return state.indented + indentUnit;
11081
+ }
11082
+ if (context && context.noIndent) return CodeMirror.Pass;
11083
+ if (state.tokenize != inTag && state.tokenize != inText)
11084
+ return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
11085
+ // Indent the starts of attribute names.
11086
+ if (state.tagName) {
11087
+ if (config.multilineTagIndentPastTag !== false)
11088
+ return state.tagStart + state.tagName.length + 2;
11089
+ else
11090
+ return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
11091
+ }
11092
+ if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
11093
+ var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
11094
+ if (tagAfter && tagAfter[1]) { // Closing tag spotted
11095
+ while (context) {
11096
+ if (context.tagName == tagAfter[2]) {
11097
+ context = context.prev;
11098
+ break;
11099
+ } else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {
11100
+ context = context.prev;
11101
+ } else {
11102
+ break;
11103
+ }
11104
+ }
11105
+ } else if (tagAfter) { // Opening tag spotted
11106
+ while (context) {
11107
+ var grabbers = config.contextGrabbers[lower(context.tagName)];
11108
+ if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))
11109
+ context = context.prev;
11110
+ else
11111
+ break;
11112
+ }
11113
+ }
11114
+ while (context && context.prev && !context.startOfLine)
11115
+ context = context.prev;
11116
+ if (context) return context.indent + indentUnit;
11117
+ else return state.baseIndent || 0;
11118
+ },
11119
+
11120
+ electricInput: /<\/[\s\w:]+>$/,
11121
+ blockCommentStart: "<!--",
11122
+ blockCommentEnd: "-->",
11123
+
11124
+ configuration: config.htmlMode ? "html" : "xml",
11125
+ helperType: config.htmlMode ? "html" : "xml",
11126
+
11127
+ skipAttribute: function(state) {
11128
+ if (state.state == attrValueState)
11129
+ state.state = attrState;
11130
+ },
11131
+
11132
+ xmlCurrentTag: function(state) {
11133
+ return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null
11134
+ },
11135
+
11136
+ xmlCurrentContext: function(state) {
11137
+ var context = [];
11138
+ for (var cx = state.context; cx; cx = cx.prev)
11139
+ context.push(cx.tagName);
11140
+ return context.reverse()
11141
+ }
11142
+ };
11143
+ });
11144
+
11145
+ CodeMirror.defineMIME("text/xml", "xml");
11146
+ CodeMirror.defineMIME("application/xml", "xml");
11147
+ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
11148
+ CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
11149
+
11150
+ });
11151
+ });
11152
+
11153
+ var javascript = _commonjsHelpers.createCommonjsModule(function (module, exports) {
9881
11154
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
9882
11155
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
9883
11156
 
@@ -10837,6 +12110,155 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
10837
12110
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
10838
12111
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
10839
12112
 
12113
+ (function(mod) {
12114
+ mod(codemirror, xml, javascript, css);
12115
+ })(function(CodeMirror) {
12116
+
12117
+ var defaultTags = {
12118
+ script: [
12119
+ ["lang", /(javascript|babel)/i, "javascript"],
12120
+ ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
12121
+ ["type", /./, "text/plain"],
12122
+ [null, null, "javascript"]
12123
+ ],
12124
+ style: [
12125
+ ["lang", /^css$/i, "css"],
12126
+ ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
12127
+ ["type", /./, "text/plain"],
12128
+ [null, null, "css"]
12129
+ ]
12130
+ };
12131
+
12132
+ function maybeBackup(stream, pat, style) {
12133
+ var cur = stream.current(), close = cur.search(pat);
12134
+ if (close > -1) {
12135
+ stream.backUp(cur.length - close);
12136
+ } else if (cur.match(/<\/?$/)) {
12137
+ stream.backUp(cur.length);
12138
+ if (!stream.match(pat, false)) stream.match(cur);
12139
+ }
12140
+ return style;
12141
+ }
12142
+
12143
+ var attrRegexpCache = {};
12144
+ function getAttrRegexp(attr) {
12145
+ var regexp = attrRegexpCache[attr];
12146
+ if (regexp) return regexp;
12147
+ return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
12148
+ }
12149
+
12150
+ function getAttrValue(text, attr) {
12151
+ var match = text.match(getAttrRegexp(attr));
12152
+ return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
12153
+ }
12154
+
12155
+ function getTagRegexp(tagName, anchored) {
12156
+ return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i");
12157
+ }
12158
+
12159
+ function addTags(from, to) {
12160
+ for (var tag in from) {
12161
+ var dest = to[tag] || (to[tag] = []);
12162
+ var source = from[tag];
12163
+ for (var i = source.length - 1; i >= 0; i--)
12164
+ dest.unshift(source[i]);
12165
+ }
12166
+ }
12167
+
12168
+ function findMatchingMode(tagInfo, tagText) {
12169
+ for (var i = 0; i < tagInfo.length; i++) {
12170
+ var spec = tagInfo[i];
12171
+ if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
12172
+ }
12173
+ }
12174
+
12175
+ CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
12176
+ var htmlMode = CodeMirror.getMode(config, {
12177
+ name: "xml",
12178
+ htmlMode: true,
12179
+ multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
12180
+ multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,
12181
+ allowMissingTagName: parserConfig.allowMissingTagName,
12182
+ });
12183
+
12184
+ var tags = {};
12185
+ var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
12186
+ addTags(defaultTags, tags);
12187
+ if (configTags) addTags(configTags, tags);
12188
+ if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
12189
+ tags.script.unshift(["type", configScript[i].matches, configScript[i].mode]);
12190
+
12191
+ function html(stream, state) {
12192
+ var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName;
12193
+ if (tag && !/[<>\s\/]/.test(stream.current()) &&
12194
+ (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
12195
+ tags.hasOwnProperty(tagName)) {
12196
+ state.inTag = tagName + " ";
12197
+ } else if (state.inTag && tag && />$/.test(stream.current())) {
12198
+ var inTag = /^([\S]+) (.*)/.exec(state.inTag);
12199
+ state.inTag = null;
12200
+ var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2]);
12201
+ var mode = CodeMirror.getMode(config, modeSpec);
12202
+ var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
12203
+ state.token = function (stream, state) {
12204
+ if (stream.match(endTagA, false)) {
12205
+ state.token = html;
12206
+ state.localState = state.localMode = null;
12207
+ return null;
12208
+ }
12209
+ return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
12210
+ };
12211
+ state.localMode = mode;
12212
+ state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
12213
+ } else if (state.inTag) {
12214
+ state.inTag += stream.current();
12215
+ if (stream.eol()) state.inTag += " ";
12216
+ }
12217
+ return style;
12218
+ }
12219
+ return {
12220
+ startState: function () {
12221
+ var state = CodeMirror.startState(htmlMode);
12222
+ return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
12223
+ },
12224
+
12225
+ copyState: function (state) {
12226
+ var local;
12227
+ if (state.localState) {
12228
+ local = CodeMirror.copyState(state.localMode, state.localState);
12229
+ }
12230
+ return {token: state.token, inTag: state.inTag,
12231
+ localMode: state.localMode, localState: local,
12232
+ htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
12233
+ },
12234
+
12235
+ token: function (stream, state) {
12236
+ return state.token(stream, state);
12237
+ },
12238
+
12239
+ indent: function (state, textAfter, line) {
12240
+ if (!state.localMode || /^\s*<\//.test(textAfter))
12241
+ return htmlMode.indent(state.htmlState, textAfter, line);
12242
+ else if (state.localMode.indent)
12243
+ return state.localMode.indent(state.localState, textAfter, line);
12244
+ else
12245
+ return CodeMirror.Pass;
12246
+ },
12247
+
12248
+ innerMode: function (state) {
12249
+ return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
12250
+ }
12251
+ };
12252
+ }, "xml", "javascript", "css");
12253
+
12254
+ CodeMirror.defineMIME("text/html", "htmlmixed");
12255
+ });
12256
+ });
12257
+
12258
+ _commonjsHelpers.createCommonjsModule(function (module, exports) {
12259
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12260
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12261
+
10840
12262
  (function(mod) {
10841
12263
  mod(codemirror);
10842
12264
  })(function(CodeMirror) {
@@ -11249,6 +12671,250 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
11249
12671
  });
11250
12672
  });
11251
12673
 
12674
+ var xmlFold = _commonjsHelpers.createCommonjsModule(function (module, exports) {
12675
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12676
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12677
+
12678
+ (function(mod) {
12679
+ mod(codemirror);
12680
+ })(function(CodeMirror) {
12681
+
12682
+ var Pos = CodeMirror.Pos;
12683
+ function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
12684
+
12685
+ var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
12686
+ var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
12687
+ var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
12688
+
12689
+ function Iter(cm, line, ch, range) {
12690
+ this.line = line; this.ch = ch;
12691
+ this.cm = cm; this.text = cm.getLine(line);
12692
+ this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();
12693
+ this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();
12694
+ }
12695
+
12696
+ function tagAt(iter, ch) {
12697
+ var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
12698
+ return type && /\btag\b/.test(type);
12699
+ }
12700
+
12701
+ function nextLine(iter) {
12702
+ if (iter.line >= iter.max) return;
12703
+ iter.ch = 0;
12704
+ iter.text = iter.cm.getLine(++iter.line);
12705
+ return true;
12706
+ }
12707
+ function prevLine(iter) {
12708
+ if (iter.line <= iter.min) return;
12709
+ iter.text = iter.cm.getLine(--iter.line);
12710
+ iter.ch = iter.text.length;
12711
+ return true;
12712
+ }
12713
+
12714
+ function toTagEnd(iter) {
12715
+ for (;;) {
12716
+ var gt = iter.text.indexOf(">", iter.ch);
12717
+ if (gt == -1) { if (nextLine(iter)) continue; else return; }
12718
+ if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
12719
+ var lastSlash = iter.text.lastIndexOf("/", gt);
12720
+ var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
12721
+ iter.ch = gt + 1;
12722
+ return selfClose ? "selfClose" : "regular";
12723
+ }
12724
+ }
12725
+ function toTagStart(iter) {
12726
+ for (;;) {
12727
+ var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
12728
+ if (lt == -1) { if (prevLine(iter)) continue; else return; }
12729
+ if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
12730
+ xmlTagStart.lastIndex = lt;
12731
+ iter.ch = lt;
12732
+ var match = xmlTagStart.exec(iter.text);
12733
+ if (match && match.index == lt) return match;
12734
+ }
12735
+ }
12736
+
12737
+ function toNextTag(iter) {
12738
+ for (;;) {
12739
+ xmlTagStart.lastIndex = iter.ch;
12740
+ var found = xmlTagStart.exec(iter.text);
12741
+ if (!found) { if (nextLine(iter)) continue; else return; }
12742
+ if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
12743
+ iter.ch = found.index + found[0].length;
12744
+ return found;
12745
+ }
12746
+ }
12747
+ function toPrevTag(iter) {
12748
+ for (;;) {
12749
+ var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
12750
+ if (gt == -1) { if (prevLine(iter)) continue; else return; }
12751
+ if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
12752
+ var lastSlash = iter.text.lastIndexOf("/", gt);
12753
+ var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
12754
+ iter.ch = gt + 1;
12755
+ return selfClose ? "selfClose" : "regular";
12756
+ }
12757
+ }
12758
+
12759
+ function findMatchingClose(iter, tag) {
12760
+ var stack = [];
12761
+ for (;;) {
12762
+ var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
12763
+ if (!next || !(end = toTagEnd(iter))) return;
12764
+ if (end == "selfClose") continue;
12765
+ if (next[1]) { // closing tag
12766
+ for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
12767
+ stack.length = i;
12768
+ break;
12769
+ }
12770
+ if (i < 0 && (!tag || tag == next[2])) return {
12771
+ tag: next[2],
12772
+ from: Pos(startLine, startCh),
12773
+ to: Pos(iter.line, iter.ch)
12774
+ };
12775
+ } else { // opening tag
12776
+ stack.push(next[2]);
12777
+ }
12778
+ }
12779
+ }
12780
+ function findMatchingOpen(iter, tag) {
12781
+ var stack = [];
12782
+ for (;;) {
12783
+ var prev = toPrevTag(iter);
12784
+ if (!prev) return;
12785
+ if (prev == "selfClose") { toTagStart(iter); continue; }
12786
+ var endLine = iter.line, endCh = iter.ch;
12787
+ var start = toTagStart(iter);
12788
+ if (!start) return;
12789
+ if (start[1]) { // closing tag
12790
+ stack.push(start[2]);
12791
+ } else { // opening tag
12792
+ for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
12793
+ stack.length = i;
12794
+ break;
12795
+ }
12796
+ if (i < 0 && (!tag || tag == start[2])) return {
12797
+ tag: start[2],
12798
+ from: Pos(iter.line, iter.ch),
12799
+ to: Pos(endLine, endCh)
12800
+ };
12801
+ }
12802
+ }
12803
+ }
12804
+
12805
+ CodeMirror.registerHelper("fold", "xml", function(cm, start) {
12806
+ var iter = new Iter(cm, start.line, 0);
12807
+ for (;;) {
12808
+ var openTag = toNextTag(iter);
12809
+ if (!openTag || iter.line != start.line) return
12810
+ var end = toTagEnd(iter);
12811
+ if (!end) return
12812
+ if (!openTag[1] && end != "selfClose") {
12813
+ var startPos = Pos(iter.line, iter.ch);
12814
+ var endPos = findMatchingClose(iter, openTag[2]);
12815
+ return endPos && cmp(endPos.from, startPos) > 0 ? {from: startPos, to: endPos.from} : null
12816
+ }
12817
+ }
12818
+ });
12819
+ CodeMirror.findMatchingTag = function(cm, pos, range) {
12820
+ var iter = new Iter(cm, pos.line, pos.ch, range);
12821
+ if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
12822
+ var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
12823
+ var start = end && toTagStart(iter);
12824
+ if (!end || !start || cmp(iter, pos) > 0) return;
12825
+ var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
12826
+ if (end == "selfClose") return {open: here, close: null, at: "open"};
12827
+
12828
+ if (start[1]) { // closing tag
12829
+ return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
12830
+ } else { // opening tag
12831
+ iter = new Iter(cm, to.line, to.ch, range);
12832
+ return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
12833
+ }
12834
+ };
12835
+
12836
+ CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {
12837
+ var iter = new Iter(cm, pos.line, pos.ch, range);
12838
+ for (;;) {
12839
+ var open = findMatchingOpen(iter, tag);
12840
+ if (!open) break;
12841
+ var forward = new Iter(cm, pos.line, pos.ch, range);
12842
+ var close = findMatchingClose(forward, open.tag);
12843
+ if (close) return {open: open, close: close};
12844
+ }
12845
+ };
12846
+
12847
+ // Used by addon/edit/closetag.js
12848
+ CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
12849
+ var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
12850
+ return findMatchingClose(iter, name);
12851
+ };
12852
+ });
12853
+ });
12854
+
12855
+ _commonjsHelpers.createCommonjsModule(function (module, exports) {
12856
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
12857
+ // Distributed under an MIT license: https://codemirror.net/5/LICENSE
12858
+
12859
+ (function(mod) {
12860
+ mod(codemirror, xmlFold);
12861
+ })(function(CodeMirror) {
12862
+
12863
+ CodeMirror.defineOption("matchTags", false, function(cm, val, old) {
12864
+ if (old && old != CodeMirror.Init) {
12865
+ cm.off("cursorActivity", doMatchTags);
12866
+ cm.off("viewportChange", maybeUpdateMatch);
12867
+ clear(cm);
12868
+ }
12869
+ if (val) {
12870
+ cm.state.matchBothTags = typeof val == "object" && val.bothTags;
12871
+ cm.on("cursorActivity", doMatchTags);
12872
+ cm.on("viewportChange", maybeUpdateMatch);
12873
+ doMatchTags(cm);
12874
+ }
12875
+ });
12876
+
12877
+ function clear(cm) {
12878
+ if (cm.state.tagHit) cm.state.tagHit.clear();
12879
+ if (cm.state.tagOther) cm.state.tagOther.clear();
12880
+ cm.state.tagHit = cm.state.tagOther = null;
12881
+ }
12882
+
12883
+ function doMatchTags(cm) {
12884
+ cm.state.failedTagMatch = false;
12885
+ cm.operation(function() {
12886
+ clear(cm);
12887
+ if (cm.somethingSelected()) return;
12888
+ var cur = cm.getCursor(), range = cm.getViewport();
12889
+ range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);
12890
+ var match = CodeMirror.findMatchingTag(cm, cur, range);
12891
+ if (!match) return;
12892
+ if (cm.state.matchBothTags) {
12893
+ var hit = match.at == "open" ? match.open : match.close;
12894
+ if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});
12895
+ }
12896
+ var other = match.at == "close" ? match.open : match.close;
12897
+ if (other)
12898
+ cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});
12899
+ else
12900
+ cm.state.failedTagMatch = true;
12901
+ });
12902
+ }
12903
+
12904
+ function maybeUpdateMatch(cm) {
12905
+ if (cm.state.failedTagMatch) doMatchTags(cm);
12906
+ }
12907
+
12908
+ CodeMirror.commands.toMatchingTag = function(cm) {
12909
+ var found = CodeMirror.findMatchingTag(cm, cm.getCursor());
12910
+ if (found) {
12911
+ var other = found.at == "close" ? found.open : found.close;
12912
+ if (other) cm.extendSelection(other.to, other.from);
12913
+ }
12914
+ };
12915
+ });
12916
+ });
12917
+
11252
12918
  _commonjsHelpers.createCommonjsModule(function (module, exports) {
11253
12919
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
11254
12920
  // Distributed under an MIT license: https://codemirror.net/5/LICENSE
@@ -12829,6 +14495,7 @@ const CodeEditor = class {
12829
14495
  this.language = undefined;
12830
14496
  this.readonly = false;
12831
14497
  this.lineNumbers = false;
14498
+ this.lineWrapping = false;
12832
14499
  this.fold = false;
12833
14500
  this.lint = false;
12834
14501
  this.colorScheme = 'auto';
@@ -12909,6 +14576,9 @@ const CodeEditor = class {
12909
14576
  typescript: true,
12910
14577
  };
12911
14578
  }
14579
+ else if (this.language === 'html') {
14580
+ mode = 'htmlmixed';
14581
+ }
12912
14582
  if (this.fold) {
12913
14583
  gutters.push('CodeMirror-foldgutter');
12914
14584
  }
@@ -12920,8 +14590,10 @@ const CodeEditor = class {
12920
14590
  tabSize: TAB_SIZE,
12921
14591
  indentUnit: TAB_SIZE,
12922
14592
  lineNumbers: this.lineNumbers,
14593
+ lineWrapping: this.lineWrapping,
12923
14594
  styleActiveLine: true,
12924
14595
  matchBrackets: true,
14596
+ matchTags: { bothTags: true },
12925
14597
  lint: this.lint,
12926
14598
  foldGutter: this.fold,
12927
14599
  gutters: gutters,