react-source-spotlight 1.0.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 (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +375 -0
  3. package/bin/cli.js +28 -0
  4. package/dist/Spotlight.d.ts +8 -0
  5. package/dist/Spotlight.d.ts.map +1 -0
  6. package/dist/SpotlightProvider.d.ts +12 -0
  7. package/dist/SpotlightProvider.d.ts.map +1 -0
  8. package/dist/__tests__/setup.d.ts +2 -0
  9. package/dist/__tests__/setup.d.ts.map +1 -0
  10. package/dist/cli/Spotlight.d.ts +8 -0
  11. package/dist/cli/Spotlight.d.ts.map +1 -0
  12. package/dist/cli/SpotlightProvider.d.ts +12 -0
  13. package/dist/cli/SpotlightProvider.d.ts.map +1 -0
  14. package/dist/cli/__tests__/setup.d.ts +2 -0
  15. package/dist/cli/__tests__/setup.d.ts.map +1 -0
  16. package/dist/cli/cli/config.d.ts +3 -0
  17. package/dist/cli/cli/config.d.ts.map +1 -0
  18. package/dist/cli/cli/generator.d.ts +8 -0
  19. package/dist/cli/cli/generator.d.ts.map +1 -0
  20. package/dist/cli/components/CodeModal.d.ts +10 -0
  21. package/dist/cli/components/CodeModal.d.ts.map +1 -0
  22. package/dist/cli/components/DevModeToggle.d.ts +7 -0
  23. package/dist/cli/components/DevModeToggle.d.ts.map +1 -0
  24. package/dist/cli/config.d.ts +3 -0
  25. package/dist/cli/config.d.ts.map +1 -0
  26. package/dist/cli/generator.d.ts +8 -0
  27. package/dist/cli/generator.d.ts.map +1 -0
  28. package/dist/cli/generator.js +128 -0
  29. package/dist/cli/generator.js.map +1 -0
  30. package/dist/cli/hooks/useSourceSpotlight.d.ts +11 -0
  31. package/dist/cli/hooks/useSourceSpotlight.d.ts.map +1 -0
  32. package/dist/cli/index.d.ts +6 -0
  33. package/dist/cli/index.d.ts.map +1 -0
  34. package/dist/cli/types.d.ts +45 -0
  35. package/dist/cli/types.d.ts.map +1 -0
  36. package/dist/components/CodeModal.d.ts +10 -0
  37. package/dist/components/CodeModal.d.ts.map +1 -0
  38. package/dist/components/DevModeToggle.d.ts +7 -0
  39. package/dist/components/DevModeToggle.d.ts.map +1 -0
  40. package/dist/hooks/useSourceSpotlight.d.ts +11 -0
  41. package/dist/hooks/useSourceSpotlight.d.ts.map +1 -0
  42. package/dist/index.d.ts +6 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.esm.js +3295 -0
  45. package/dist/index.esm.js.map +1 -0
  46. package/dist/index.js +3300 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/types.d.ts +45 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/package.json +73 -0
@@ -0,0 +1,3295 @@
1
+ import React, { createContext, useState, useEffect, createElement, useCallback, useMemo, useContext } from 'react';
2
+
3
+ const SpotlightContext = createContext(null);
4
+ function SpotlightProvider({ children, mapUrl = '/spotlight-map.json', repoUrl, theme = 'dark', }) {
5
+ const [isDevMode, setIsDevMode] = useState(false);
6
+ const [sourceMap, setSourceMap] = useState({});
7
+ // Load source map on mount
8
+ useEffect(() => {
9
+ fetch(mapUrl)
10
+ .then(res => {
11
+ if (!res.ok) {
12
+ throw new Error(`Failed to load source map: ${res.statusText}`);
13
+ }
14
+ return res.json();
15
+ })
16
+ .then(data => {
17
+ setSourceMap(data);
18
+ console.log(`[Spotlight] Loaded ${Object.keys(data).length} component sources`);
19
+ })
20
+ .catch(err => {
21
+ console.warn('[Spotlight] Source map not found:', err.message);
22
+ console.warn('[Spotlight] Make sure to run "spotlight generate" before building');
23
+ });
24
+ }, [mapUrl]);
25
+ // Keyboard shortcut (Ctrl+Shift+D)
26
+ useEffect(() => {
27
+ const handler = (e) => {
28
+ if (e.ctrlKey && e.shiftKey && e.key === 'D') {
29
+ e.preventDefault();
30
+ setIsDevMode(prev => {
31
+ console.log(`[Spotlight] Dev mode ${!prev ? 'ON' : 'OFF'}`);
32
+ return !prev;
33
+ });
34
+ }
35
+ };
36
+ window.addEventListener('keydown', handler);
37
+ return () => window.removeEventListener('keydown', handler);
38
+ }, []);
39
+ const contextValue = {
40
+ isDevMode,
41
+ setIsDevMode,
42
+ sourceMap,
43
+ repoUrl,
44
+ theme,
45
+ };
46
+ return (React.createElement(SpotlightContext.Provider, { value: contextValue }, children));
47
+ }
48
+
49
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
50
+
51
+ var __create = Object.create;
52
+ var __defProp = Object.defineProperty;
53
+ var __defProps = Object.defineProperties;
54
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
55
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
56
+ var __getOwnPropNames = Object.getOwnPropertyNames;
57
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
58
+ var __getProtoOf = Object.getPrototypeOf;
59
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
60
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
61
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
62
+ var __spreadValues = (a, b) => {
63
+ for (var prop in b || (b = {}))
64
+ if (__hasOwnProp.call(b, prop))
65
+ __defNormalProp(a, prop, b[prop]);
66
+ if (__getOwnPropSymbols)
67
+ for (var prop of __getOwnPropSymbols(b)) {
68
+ if (__propIsEnum.call(b, prop))
69
+ __defNormalProp(a, prop, b[prop]);
70
+ }
71
+ return a;
72
+ };
73
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
74
+ var __objRest = (source, exclude) => {
75
+ var target = {};
76
+ for (var prop in source)
77
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
78
+ target[prop] = source[prop];
79
+ if (source != null && __getOwnPropSymbols)
80
+ for (var prop of __getOwnPropSymbols(source)) {
81
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
82
+ target[prop] = source[prop];
83
+ }
84
+ return target;
85
+ };
86
+ var __commonJS = (cb, mod) => function __require() {
87
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
88
+ };
89
+ var __export = (target, all) => {
90
+ for (var name in all)
91
+ __defProp(target, name, { get: all[name], enumerable: true });
92
+ };
93
+ var __copyProps = (to, from, except, desc) => {
94
+ if (from && typeof from === "object" || typeof from === "function") {
95
+ for (let key of __getOwnPropNames(from))
96
+ if (!__hasOwnProp.call(to, key) && key !== except)
97
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
98
+ }
99
+ return to;
100
+ };
101
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
102
+ // If the importer is in node compatibility mode or this is not an ESM
103
+ // file that has been converted to a CommonJS file using a Babel-
104
+ // compatible transform (i.e. "__esModule" has not been set), then set
105
+ // "default" to the CommonJS "module.exports" for node compatibility.
106
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
107
+ mod
108
+ ));
109
+
110
+ // ../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js
111
+ var require_prism = __commonJS({
112
+ "../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(exports$1, module) {
113
+ var Prism2 = function() {
114
+ var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
115
+ var uniqueId = 0;
116
+ var plainTextGrammar = {};
117
+ var _ = {
118
+ /**
119
+ * A namespace for utility methods.
120
+ *
121
+ * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
122
+ * change or disappear at any time.
123
+ *
124
+ * @namespace
125
+ * @memberof Prism
126
+ */
127
+ util: {
128
+ encode: function encode(tokens) {
129
+ if (tokens instanceof Token) {
130
+ return new Token(tokens.type, encode(tokens.content), tokens.alias);
131
+ } else if (Array.isArray(tokens)) {
132
+ return tokens.map(encode);
133
+ } else {
134
+ return tokens.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
135
+ }
136
+ },
137
+ /**
138
+ * Returns the name of the type of the given value.
139
+ *
140
+ * @param {any} o
141
+ * @returns {string}
142
+ * @example
143
+ * type(null) === 'Null'
144
+ * type(undefined) === 'Undefined'
145
+ * type(123) === 'Number'
146
+ * type('foo') === 'String'
147
+ * type(true) === 'Boolean'
148
+ * type([1, 2]) === 'Array'
149
+ * type({}) === 'Object'
150
+ * type(String) === 'Function'
151
+ * type(/abc+/) === 'RegExp'
152
+ */
153
+ type: function(o) {
154
+ return Object.prototype.toString.call(o).slice(8, -1);
155
+ },
156
+ /**
157
+ * Returns a unique number for the given object. Later calls will still return the same number.
158
+ *
159
+ * @param {Object} obj
160
+ * @returns {number}
161
+ */
162
+ objId: function(obj) {
163
+ if (!obj["__id"]) {
164
+ Object.defineProperty(obj, "__id", { value: ++uniqueId });
165
+ }
166
+ return obj["__id"];
167
+ },
168
+ /**
169
+ * Creates a deep clone of the given object.
170
+ *
171
+ * The main intended use of this function is to clone language definitions.
172
+ *
173
+ * @param {T} o
174
+ * @param {Record<number, any>} [visited]
175
+ * @returns {T}
176
+ * @template T
177
+ */
178
+ clone: function deepClone(o, visited) {
179
+ visited = visited || {};
180
+ var clone;
181
+ var id;
182
+ switch (_.util.type(o)) {
183
+ case "Object":
184
+ id = _.util.objId(o);
185
+ if (visited[id]) {
186
+ return visited[id];
187
+ }
188
+ clone = /** @type {Record<string, any>} */
189
+ {};
190
+ visited[id] = clone;
191
+ for (var key in o) {
192
+ if (o.hasOwnProperty(key)) {
193
+ clone[key] = deepClone(o[key], visited);
194
+ }
195
+ }
196
+ return (
197
+ /** @type {any} */
198
+ clone
199
+ );
200
+ case "Array":
201
+ id = _.util.objId(o);
202
+ if (visited[id]) {
203
+ return visited[id];
204
+ }
205
+ clone = [];
206
+ visited[id] = clone;
207
+ /** @type {Array} */
208
+ /** @type {any} */
209
+ o.forEach(function(v, i) {
210
+ clone[i] = deepClone(v, visited);
211
+ });
212
+ return (
213
+ /** @type {any} */
214
+ clone
215
+ );
216
+ default:
217
+ return o;
218
+ }
219
+ },
220
+ /**
221
+ * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
222
+ *
223
+ * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
224
+ *
225
+ * @param {Element} element
226
+ * @returns {string}
227
+ */
228
+ getLanguage: function(element) {
229
+ while (element) {
230
+ var m = lang.exec(element.className);
231
+ if (m) {
232
+ return m[1].toLowerCase();
233
+ }
234
+ element = element.parentElement;
235
+ }
236
+ return "none";
237
+ },
238
+ /**
239
+ * Sets the Prism `language-xxxx` class of the given element.
240
+ *
241
+ * @param {Element} element
242
+ * @param {string} language
243
+ * @returns {void}
244
+ */
245
+ setLanguage: function(element, language) {
246
+ element.className = element.className.replace(RegExp(lang, "gi"), "");
247
+ element.classList.add("language-" + language);
248
+ },
249
+ /**
250
+ * Returns whether a given class is active for `element`.
251
+ *
252
+ * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
253
+ * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
254
+ * given class is just the given class with a `no-` prefix.
255
+ *
256
+ * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
257
+ * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
258
+ * ancestors have the given class or the negated version of it, then the default activation will be returned.
259
+ *
260
+ * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
261
+ * version of it, the class is considered active.
262
+ *
263
+ * @param {Element} element
264
+ * @param {string} className
265
+ * @param {boolean} [defaultActivation=false]
266
+ * @returns {boolean}
267
+ */
268
+ isActive: function(element, className, defaultActivation) {
269
+ var no = "no-" + className;
270
+ while (element) {
271
+ var classList = element.classList;
272
+ if (classList.contains(className)) {
273
+ return true;
274
+ }
275
+ if (classList.contains(no)) {
276
+ return false;
277
+ }
278
+ element = element.parentElement;
279
+ }
280
+ return !!defaultActivation;
281
+ }
282
+ },
283
+ /**
284
+ * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
285
+ *
286
+ * @namespace
287
+ * @memberof Prism
288
+ * @public
289
+ */
290
+ languages: {
291
+ /**
292
+ * The grammar for plain, unformatted text.
293
+ */
294
+ plain: plainTextGrammar,
295
+ plaintext: plainTextGrammar,
296
+ text: plainTextGrammar,
297
+ txt: plainTextGrammar,
298
+ /**
299
+ * Creates a deep copy of the language with the given id and appends the given tokens.
300
+ *
301
+ * If a token in `redef` also appears in the copied language, then the existing token in the copied language
302
+ * will be overwritten at its original position.
303
+ *
304
+ * ## Best practices
305
+ *
306
+ * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
307
+ * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
308
+ * understand the language definition because, normally, the order of tokens matters in Prism grammars.
309
+ *
310
+ * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
311
+ * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
312
+ *
313
+ * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
314
+ * @param {Grammar} redef The new tokens to append.
315
+ * @returns {Grammar} The new language created.
316
+ * @public
317
+ * @example
318
+ * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
319
+ * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
320
+ * // at its original position
321
+ * 'comment': { ... },
322
+ * // CSS doesn't have a 'color' token, so this token will be appended
323
+ * 'color': /\b(?:red|green|blue)\b/
324
+ * });
325
+ */
326
+ extend: function(id, redef) {
327
+ var lang2 = _.util.clone(_.languages[id]);
328
+ for (var key in redef) {
329
+ lang2[key] = redef[key];
330
+ }
331
+ return lang2;
332
+ },
333
+ /**
334
+ * Inserts tokens _before_ another token in a language definition or any other grammar.
335
+ *
336
+ * ## Usage
337
+ *
338
+ * This helper method makes it easy to modify existing languages. For example, the CSS language definition
339
+ * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
340
+ * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
341
+ * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
342
+ * this:
343
+ *
344
+ * ```js
345
+ * Prism.languages.markup.style = {
346
+ * // token
347
+ * };
348
+ * ```
349
+ *
350
+ * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
351
+ * before existing tokens. For the CSS example above, you would use it like this:
352
+ *
353
+ * ```js
354
+ * Prism.languages.insertBefore('markup', 'cdata', {
355
+ * 'style': {
356
+ * // token
357
+ * }
358
+ * });
359
+ * ```
360
+ *
361
+ * ## Special cases
362
+ *
363
+ * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
364
+ * will be ignored.
365
+ *
366
+ * This behavior can be used to insert tokens after `before`:
367
+ *
368
+ * ```js
369
+ * Prism.languages.insertBefore('markup', 'comment', {
370
+ * 'comment': Prism.languages.markup.comment,
371
+ * // tokens after 'comment'
372
+ * });
373
+ * ```
374
+ *
375
+ * ## Limitations
376
+ *
377
+ * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
378
+ * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
379
+ * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
380
+ * deleting properties which is necessary to insert at arbitrary positions.
381
+ *
382
+ * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
383
+ * Instead, it will create a new object and replace all references to the target object with the new one. This
384
+ * can be done without temporarily deleting properties, so the iteration order is well-defined.
385
+ *
386
+ * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
387
+ * you hold the target object in a variable, then the value of the variable will not change.
388
+ *
389
+ * ```js
390
+ * var oldMarkup = Prism.languages.markup;
391
+ * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
392
+ *
393
+ * assert(oldMarkup !== Prism.languages.markup);
394
+ * assert(newMarkup === Prism.languages.markup);
395
+ * ```
396
+ *
397
+ * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
398
+ * object to be modified.
399
+ * @param {string} before The key to insert before.
400
+ * @param {Grammar} insert An object containing the key-value pairs to be inserted.
401
+ * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
402
+ * object to be modified.
403
+ *
404
+ * Defaults to `Prism.languages`.
405
+ * @returns {Grammar} The new grammar object.
406
+ * @public
407
+ */
408
+ insertBefore: function(inside, before, insert, root) {
409
+ root = root || /** @type {any} */
410
+ _.languages;
411
+ var grammar = root[inside];
412
+ var ret = {};
413
+ for (var token in grammar) {
414
+ if (grammar.hasOwnProperty(token)) {
415
+ if (token == before) {
416
+ for (var newToken in insert) {
417
+ if (insert.hasOwnProperty(newToken)) {
418
+ ret[newToken] = insert[newToken];
419
+ }
420
+ }
421
+ }
422
+ if (!insert.hasOwnProperty(token)) {
423
+ ret[token] = grammar[token];
424
+ }
425
+ }
426
+ }
427
+ var old = root[inside];
428
+ root[inside] = ret;
429
+ _.languages.DFS(_.languages, function(key, value) {
430
+ if (value === old && key != inside) {
431
+ this[key] = ret;
432
+ }
433
+ });
434
+ return ret;
435
+ },
436
+ // Traverse a language definition with Depth First Search
437
+ DFS: function DFS(o, callback, type, visited) {
438
+ visited = visited || {};
439
+ var objId = _.util.objId;
440
+ for (var i in o) {
441
+ if (o.hasOwnProperty(i)) {
442
+ callback.call(o, i, o[i], type || i);
443
+ var property = o[i];
444
+ var propertyType = _.util.type(property);
445
+ if (propertyType === "Object" && !visited[objId(property)]) {
446
+ visited[objId(property)] = true;
447
+ DFS(property, callback, null, visited);
448
+ } else if (propertyType === "Array" && !visited[objId(property)]) {
449
+ visited[objId(property)] = true;
450
+ DFS(property, callback, i, visited);
451
+ }
452
+ }
453
+ }
454
+ }
455
+ },
456
+ plugins: {},
457
+ /**
458
+ * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
459
+ * and the language definitions to use, and returns a string with the HTML produced.
460
+ *
461
+ * The following hooks will be run:
462
+ * 1. `before-tokenize`
463
+ * 2. `after-tokenize`
464
+ * 3. `wrap`: On each {@link Token}.
465
+ *
466
+ * @param {string} text A string with the code to be highlighted.
467
+ * @param {Grammar} grammar An object containing the tokens to use.
468
+ *
469
+ * Usually a language definition like `Prism.languages.markup`.
470
+ * @param {string} language The name of the language definition passed to `grammar`.
471
+ * @returns {string} The highlighted HTML.
472
+ * @memberof Prism
473
+ * @public
474
+ * @example
475
+ * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
476
+ */
477
+ highlight: function(text, grammar, language) {
478
+ var env = {
479
+ code: text,
480
+ grammar,
481
+ language
482
+ };
483
+ _.hooks.run("before-tokenize", env);
484
+ if (!env.grammar) {
485
+ throw new Error('The language "' + env.language + '" has no grammar.');
486
+ }
487
+ env.tokens = _.tokenize(env.code, env.grammar);
488
+ _.hooks.run("after-tokenize", env);
489
+ return Token.stringify(_.util.encode(env.tokens), env.language);
490
+ },
491
+ /**
492
+ * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
493
+ * and the language definitions to use, and returns an array with the tokenized code.
494
+ *
495
+ * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
496
+ *
497
+ * This method could be useful in other contexts as well, as a very crude parser.
498
+ *
499
+ * @param {string} text A string with the code to be highlighted.
500
+ * @param {Grammar} grammar An object containing the tokens to use.
501
+ *
502
+ * Usually a language definition like `Prism.languages.markup`.
503
+ * @returns {TokenStream} An array of strings and tokens, a token stream.
504
+ * @memberof Prism
505
+ * @public
506
+ * @example
507
+ * let code = `var foo = 0;`;
508
+ * let tokens = Prism.tokenize(code, Prism.languages.javascript);
509
+ * tokens.forEach(token => {
510
+ * if (token instanceof Prism.Token && token.type === 'number') {
511
+ * console.log(`Found numeric literal: ${token.content}`);
512
+ * }
513
+ * });
514
+ */
515
+ tokenize: function(text, grammar) {
516
+ var rest = grammar.rest;
517
+ if (rest) {
518
+ for (var token in rest) {
519
+ grammar[token] = rest[token];
520
+ }
521
+ delete grammar.rest;
522
+ }
523
+ var tokenList = new LinkedList();
524
+ addAfter(tokenList, tokenList.head, text);
525
+ matchGrammar(text, tokenList, grammar, tokenList.head, 0);
526
+ return toArray(tokenList);
527
+ },
528
+ /**
529
+ * @namespace
530
+ * @memberof Prism
531
+ * @public
532
+ */
533
+ hooks: {
534
+ all: {},
535
+ /**
536
+ * Adds the given callback to the list of callbacks for the given hook.
537
+ *
538
+ * The callback will be invoked when the hook it is registered for is run.
539
+ * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
540
+ *
541
+ * One callback function can be registered to multiple hooks and the same hook multiple times.
542
+ *
543
+ * @param {string} name The name of the hook.
544
+ * @param {HookCallback} callback The callback function which is given environment variables.
545
+ * @public
546
+ */
547
+ add: function(name, callback) {
548
+ var hooks2 = _.hooks.all;
549
+ hooks2[name] = hooks2[name] || [];
550
+ hooks2[name].push(callback);
551
+ },
552
+ /**
553
+ * Runs a hook invoking all registered callbacks with the given environment variables.
554
+ *
555
+ * Callbacks will be invoked synchronously and in the order in which they were registered.
556
+ *
557
+ * @param {string} name The name of the hook.
558
+ * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
559
+ * @public
560
+ */
561
+ run: function(name, env) {
562
+ var callbacks = _.hooks.all[name];
563
+ if (!callbacks || !callbacks.length) {
564
+ return;
565
+ }
566
+ for (var i = 0, callback; callback = callbacks[i++]; ) {
567
+ callback(env);
568
+ }
569
+ }
570
+ },
571
+ Token
572
+ };
573
+ function Token(type, content, alias, matchedStr) {
574
+ this.type = type;
575
+ this.content = content;
576
+ this.alias = alias;
577
+ this.length = (matchedStr || "").length | 0;
578
+ }
579
+ Token.stringify = function stringify(o, language) {
580
+ if (typeof o == "string") {
581
+ return o;
582
+ }
583
+ if (Array.isArray(o)) {
584
+ var s = "";
585
+ o.forEach(function(e) {
586
+ s += stringify(e, language);
587
+ });
588
+ return s;
589
+ }
590
+ var env = {
591
+ type: o.type,
592
+ content: stringify(o.content, language),
593
+ tag: "span",
594
+ classes: ["token", o.type],
595
+ attributes: {},
596
+ language
597
+ };
598
+ var aliases = o.alias;
599
+ if (aliases) {
600
+ if (Array.isArray(aliases)) {
601
+ Array.prototype.push.apply(env.classes, aliases);
602
+ } else {
603
+ env.classes.push(aliases);
604
+ }
605
+ }
606
+ _.hooks.run("wrap", env);
607
+ var attributes = "";
608
+ for (var name in env.attributes) {
609
+ attributes += " " + name + '="' + (env.attributes[name] || "").replace(/"/g, "&quot;") + '"';
610
+ }
611
+ return "<" + env.tag + ' class="' + env.classes.join(" ") + '"' + attributes + ">" + env.content + "</" + env.tag + ">";
612
+ };
613
+ function matchPattern(pattern, pos, text, lookbehind) {
614
+ pattern.lastIndex = pos;
615
+ var match = pattern.exec(text);
616
+ if (match && lookbehind && match[1]) {
617
+ var lookbehindLength = match[1].length;
618
+ match.index += lookbehindLength;
619
+ match[0] = match[0].slice(lookbehindLength);
620
+ }
621
+ return match;
622
+ }
623
+ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
624
+ for (var token in grammar) {
625
+ if (!grammar.hasOwnProperty(token) || !grammar[token]) {
626
+ continue;
627
+ }
628
+ var patterns = grammar[token];
629
+ patterns = Array.isArray(patterns) ? patterns : [patterns];
630
+ for (var j = 0; j < patterns.length; ++j) {
631
+ if (rematch && rematch.cause == token + "," + j) {
632
+ return;
633
+ }
634
+ var patternObj = patterns[j];
635
+ var inside = patternObj.inside;
636
+ var lookbehind = !!patternObj.lookbehind;
637
+ var greedy = !!patternObj.greedy;
638
+ var alias = patternObj.alias;
639
+ if (greedy && !patternObj.pattern.global) {
640
+ var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
641
+ patternObj.pattern = RegExp(patternObj.pattern.source, flags + "g");
642
+ }
643
+ var pattern = patternObj.pattern || patternObj;
644
+ for (var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) {
645
+ if (rematch && pos >= rematch.reach) {
646
+ break;
647
+ }
648
+ var str = currentNode.value;
649
+ if (tokenList.length > text.length) {
650
+ return;
651
+ }
652
+ if (str instanceof Token) {
653
+ continue;
654
+ }
655
+ var removeCount = 1;
656
+ var match;
657
+ if (greedy) {
658
+ match = matchPattern(pattern, pos, text, lookbehind);
659
+ if (!match || match.index >= text.length) {
660
+ break;
661
+ }
662
+ var from = match.index;
663
+ var to = match.index + match[0].length;
664
+ var p = pos;
665
+ p += currentNode.value.length;
666
+ while (from >= p) {
667
+ currentNode = currentNode.next;
668
+ p += currentNode.value.length;
669
+ }
670
+ p -= currentNode.value.length;
671
+ pos = p;
672
+ if (currentNode.value instanceof Token) {
673
+ continue;
674
+ }
675
+ for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === "string"); k = k.next) {
676
+ removeCount++;
677
+ p += k.value.length;
678
+ }
679
+ removeCount--;
680
+ str = text.slice(pos, p);
681
+ match.index -= pos;
682
+ } else {
683
+ match = matchPattern(pattern, 0, str, lookbehind);
684
+ if (!match) {
685
+ continue;
686
+ }
687
+ }
688
+ var from = match.index;
689
+ var matchStr = match[0];
690
+ var before = str.slice(0, from);
691
+ var after = str.slice(from + matchStr.length);
692
+ var reach = pos + str.length;
693
+ if (rematch && reach > rematch.reach) {
694
+ rematch.reach = reach;
695
+ }
696
+ var removeFrom = currentNode.prev;
697
+ if (before) {
698
+ removeFrom = addAfter(tokenList, removeFrom, before);
699
+ pos += before.length;
700
+ }
701
+ removeRange(tokenList, removeFrom, removeCount);
702
+ var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
703
+ currentNode = addAfter(tokenList, removeFrom, wrapped);
704
+ if (after) {
705
+ addAfter(tokenList, currentNode, after);
706
+ }
707
+ if (removeCount > 1) {
708
+ var nestedRematch = {
709
+ cause: token + "," + j,
710
+ reach
711
+ };
712
+ matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
713
+ if (rematch && nestedRematch.reach > rematch.reach) {
714
+ rematch.reach = nestedRematch.reach;
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ function LinkedList() {
722
+ var head = { value: null, prev: null, next: null };
723
+ var tail = { value: null, prev: head, next: null };
724
+ head.next = tail;
725
+ this.head = head;
726
+ this.tail = tail;
727
+ this.length = 0;
728
+ }
729
+ function addAfter(list, node, value) {
730
+ var next = node.next;
731
+ var newNode = { value, prev: node, next };
732
+ node.next = newNode;
733
+ next.prev = newNode;
734
+ list.length++;
735
+ return newNode;
736
+ }
737
+ function removeRange(list, node, count) {
738
+ var next = node.next;
739
+ for (var i = 0; i < count && next !== list.tail; i++) {
740
+ next = next.next;
741
+ }
742
+ node.next = next;
743
+ next.prev = node;
744
+ list.length -= i;
745
+ }
746
+ function toArray(list) {
747
+ var array = [];
748
+ var node = list.head.next;
749
+ while (node !== list.tail) {
750
+ array.push(node.value);
751
+ node = node.next;
752
+ }
753
+ return array;
754
+ }
755
+ return _;
756
+ }();
757
+ module.exports = Prism2;
758
+ Prism2.default = Prism2;
759
+ }
760
+ });
761
+
762
+ // src/prism-langs.ts
763
+ var Prism = __toESM(require_prism());
764
+ Prism.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: true }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: true }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: true, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: true, greedy: true, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: true }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: true }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: true }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function(e) {
765
+ "entity" === e.type && (e.attributes.title = e.content.replace(/&amp;/, "&"));
766
+ }), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { value: function(e, n) {
767
+ var t = {}, t = (t["language-" + n] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: true, inside: Prism.languages[n] }, t.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: t } }), n = (t["language-" + n] = { pattern: /[\s\S]+/, inside: Prism.languages[n] }, {});
768
+ n[e] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
769
+ return e;
770
+ }), "i"), lookbehind: true, greedy: true, inside: t }, Prism.languages.insertBefore("markup", "cdata", n);
771
+ } }), Object.defineProperty(Prism.languages.markup.tag, "addAttribute", { value: function(e, n) {
772
+ Prism.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: true, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: true, alias: [n, "language-" + n], inside: Prism.languages[n] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
773
+ } }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml, function(e) {
774
+ var n = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, t = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, a = "(?:[^\\\\-]|" + t.source + ")", a = RegExp(a + "-" + a), r = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: true, alias: "variable" };
775
+ e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: true, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: true, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: a, inside: { escape: t, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": n, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: t } }, "special-escape": n, "char-set": { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, backreference: [{ pattern: /\\(?![123][0-7]{2})[1-9]/, alias: "keyword" }, { pattern: /\\k<[^<>']+>/, alias: "keyword", inside: { "group-name": r } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: t, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": r } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
776
+ }(Prism), Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: true, greedy: true }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: true, greedy: true }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: true }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: true, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: true }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: true }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: true }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: true, greedy: true, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: true, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: true, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: true, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: true, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: true, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: true, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: true, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: true, greedy: true, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: true, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.actionscript = Prism.languages.extend("javascript", { keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/, operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ }), Prism.languages.actionscript["class-name"].alias = "function", delete Prism.languages.actionscript.parameter, delete Prism.languages.actionscript["literal-property"], Prism.languages.markup && Prism.languages.insertBefore("actionscript", "string", { xml: { pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/, lookbehind: true, inside: Prism.languages.markup } }), function(e) {
777
+ var n = /#(?!\{).+/, t = { pattern: /#\{[^}]+\}/, alias: "variable" };
778
+ e.languages.coffeescript = e.languages.extend("javascript", { comment: n, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: true }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: true, inside: { interpolation: t } }], keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, "class-member": { pattern: /@(?!\d)\w+/, alias: "variable" } }), e.languages.insertBefore("coffeescript", "comment", { "multiline-comment": { pattern: /###[\s\S]+?###/, alias: "comment" }, "block-regex": { pattern: /\/{3}[\s\S]*?\/{3}/, alias: "regex", inside: { comment: n, interpolation: t } } }), e.languages.insertBefore("coffeescript", "string", { "inline-javascript": { pattern: /`(?:\\[\s\S]|[^\\`])*`/, inside: { delimiter: { pattern: /^`|`$/, alias: "punctuation" }, script: { pattern: /[\s\S]+/, alias: "language-javascript", inside: e.languages.javascript } } }, "multiline-string": [{ pattern: /'''[\s\S]*?'''/, greedy: true, alias: "string" }, { pattern: /"""[\s\S]*?"""/, greedy: true, alias: "string", inside: { interpolation: t } }] }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
779
+ }(Prism), function(l) {
780
+ var e = l.languages.javadoclike = { parameter: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m, lookbehind: true }, keyword: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m, lookbehind: true }, punctuation: /[{}]/ };
781
+ Object.defineProperty(e, "addSupport", { value: function(e2, o) {
782
+ (e2 = "string" == typeof e2 ? [e2] : e2).forEach(function(e3) {
783
+ var n = function(e4) {
784
+ e4.inside || (e4.inside = {}), e4.inside.rest = o;
785
+ }, t = "doc-comment";
786
+ if (a = l.languages[e3]) {
787
+ var a, r = a[t];
788
+ if ((r = r ? r : (a = l.languages.insertBefore(e3, "comment", { "doc-comment": { pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, lookbehind: true, alias: "comment" } }))[t]) instanceof RegExp && (r = a[t] = { pattern: r }), Array.isArray(r))
789
+ for (var s = 0, i = r.length; s < i; s++)
790
+ r[s] instanceof RegExp && (r[s] = { pattern: r[s] }), n(r[s]);
791
+ else
792
+ n(r);
793
+ }
794
+ });
795
+ } }), e.addSupport(["java", "javascript", "php"], e);
796
+ }(Prism), function(e) {
797
+ var n = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, n = (e.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + n.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: true, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: true } } }, url: { pattern: RegExp("\\burl\\((?:" + n.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: true, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + n.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + n.source + ")*(?=\\s*\\{)"), lookbehind: true }, string: { pattern: n, greedy: true }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: true }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: true }, punctuation: /[(){};:,]/ }, e.languages.css.atrule.inside.rest = e.languages.css, e.languages.markup);
798
+ n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
799
+ }(Prism), function(e) {
800
+ var n = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, n = (e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: true, inside: n = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + n.source + ")*\\]"), greedy: true, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: true, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: true, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: true }, "attr-value": [n, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: true }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: true, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: true }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = n, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: true } }), { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: true }), t = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: true };
801
+ e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: true }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: true }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: n, number: t, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: n, number: t });
802
+ }(Prism), function(e) {
803
+ var n = /[*&][^\s[\]{},]+/, t = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, a = "(?:" + t.source + "(?:[ ]+" + n.source + ")?|" + n.source + "(?:[ ]+" + t.source + ")?)", r = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
804
+ return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
805
+ }), s = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
806
+ function i(e2, n2) {
807
+ n2 = (n2 || "").replace(/m/g, "") + "m";
808
+ var t2 = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
809
+ return a;
810
+ }).replace(/<<value>>/g, function() {
811
+ return e2;
812
+ });
813
+ return RegExp(t2, n2);
814
+ }
815
+ e.languages.yaml = { scalar: { pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
816
+ return a;
817
+ })), lookbehind: true, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
818
+ return a;
819
+ }).replace(/<<key>>/g, function() {
820
+ return "(?:" + r + "|" + s + ")";
821
+ })), lookbehind: true, greedy: true, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: true, alias: "important" }, datetime: { pattern: i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source), lookbehind: true, alias: "number" }, boolean: { pattern: i(/false|true/.source, "i"), lookbehind: true, alias: "important" }, null: { pattern: i(/null|~/.source, "i"), lookbehind: true, alias: "important" }, string: { pattern: i(s), lookbehind: true, greedy: true }, number: { pattern: i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: true }, tag: t, important: n, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, e.languages.yml = e.languages.yaml;
822
+ }(Prism), function(o) {
823
+ var n = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
824
+ function e(e2) {
825
+ return e2 = e2.replace(/<inner>/g, function() {
826
+ return n;
827
+ }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + e2 + ")");
828
+ }
829
+ var t = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, a = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
830
+ return t;
831
+ }), r = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, l = (o.languages.markdown = o.languages.extend("markup", {}), o.languages.insertBefore("markdown", "prolog", { "front-matter-block": { pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, lookbehind: true, greedy: true, inside: { punctuation: /^---|---$/, "front-matter": { pattern: /\S+(?:\s+\S+)*/, alias: ["yaml", "language-yaml"], inside: o.languages.yaml } } }, blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: "punctuation" }, table: { pattern: RegExp("^" + a + r + "(?:" + a + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + a + r + ")(?:" + a + ")*$"), lookbehind: true, inside: { "table-data": { pattern: RegExp(t), inside: o.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + a + ")" + r + "$"), lookbehind: true, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + a + "$"), inside: { "table-header": { pattern: RegExp(t), alias: "important", inside: o.languages.markdown }, punctuation: /\|/ } } } }, code: [{ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: true, alias: "keyword" }, { pattern: /^```[\s\S]*?^```$/m, greedy: true, inside: { "code-block": { pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: true }, "code-language": { pattern: /^(```).+/, lookbehind: true }, punctuation: /```/ } }], title: [{ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: "important", inside: { punctuation: /==+$|--+$/ } }, { pattern: /(^\s*)#.+/m, lookbehind: true, alias: "important", inside: { punctuation: /^#+|#+$/ } }], hr: { pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, lookbehind: true, alias: "punctuation" }, list: { pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, lookbehind: true, alias: "punctuation" }, "url-reference": { pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: true }, string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, punctuation: /^[\[\]!:]|[<>]/ }, alias: "url" }, bold: { pattern: e(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source), lookbehind: true, greedy: true, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: true, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: e(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source), lookbehind: true, greedy: true, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: true, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: e(/(~~?)(?:(?!~)<inner>)+\2/.source), lookbehind: true, greedy: true, inside: { content: { pattern: /(^~~?)[\s\S]+(?=\1$)/, lookbehind: true, inside: {} }, punctuation: /~~?/ } }, "code-snippet": { pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, lookbehind: true, greedy: true, alias: ["code", "keyword"] }, url: { pattern: e(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source), lookbehind: true, greedy: true, inside: { operator: /^!/, content: { pattern: /(^\[)[^\]]+(?=\])/, lookbehind: true, inside: {} }, variable: { pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, lookbehind: true }, url: { pattern: /(^\]\()[^\s)]+/, lookbehind: true }, string: { pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, lookbehind: true } } } }), ["url", "bold", "italic", "strike"].forEach(function(n2) {
832
+ ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(e2) {
833
+ n2 !== e2 && (o.languages.markdown[n2].inside.content.inside[e2] = o.languages.markdown[e2]);
834
+ });
835
+ }), o.hooks.add("after-tokenize", function(e2) {
836
+ "markdown" !== e2.language && "md" !== e2.language || !function e3(n2) {
837
+ if (n2 && "string" != typeof n2)
838
+ for (var t2 = 0, a2 = n2.length; t2 < a2; t2++) {
839
+ var r2, s = n2[t2];
840
+ "code" !== s.type ? e3(s.content) : (r2 = s.content[1], s = s.content[3], r2 && s && "code-language" === r2.type && "code-block" === s.type && "string" == typeof r2.content && (r2 = r2.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), r2 = "language-" + (r2 = (/[a-z][\w-]*/i.exec(r2) || [""])[0].toLowerCase()), s.alias ? "string" == typeof s.alias ? s.alias = [s.alias, r2] : s.alias.push(r2) : s.alias = [r2]));
841
+ }
842
+ }(e2.tokens);
843
+ }), o.hooks.add("wrap", function(e2) {
844
+ if ("code-block" === e2.type) {
845
+ for (var n2 = "", t2 = 0, a2 = e2.classes.length; t2 < a2; t2++) {
846
+ var r2 = e2.classes[t2], r2 = /language-(.+)/.exec(r2);
847
+ if (r2) {
848
+ n2 = r2[1];
849
+ break;
850
+ }
851
+ }
852
+ var s, i = o.languages[n2];
853
+ i ? e2.content = o.highlight(function(e3) {
854
+ e3 = e3.replace(l, "");
855
+ return e3 = e3.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(e4, n3) {
856
+ var t3;
857
+ return "#" === (n3 = n3.toLowerCase())[0] ? (t3 = "x" === n3[1] ? parseInt(n3.slice(2), 16) : Number(n3.slice(1)), c(t3)) : u[n3] || e4;
858
+ });
859
+ }(e2.content), i, n2) : n2 && "none" !== n2 && o.plugins.autoloader && (s = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random()), e2.attributes.id = s, o.plugins.autoloader.loadLanguages(n2, function() {
860
+ var e3 = document.getElementById(s);
861
+ e3 && (e3.innerHTML = o.highlight(e3.textContent, o.languages[n2], n2));
862
+ }));
863
+ }
864
+ }), RegExp(o.languages.markup.tag.pattern.source, "gi")), u = { amp: "&", lt: "<", gt: ">", quot: '"' }, c = String.fromCodePoint || String.fromCharCode;
865
+ o.languages.md = o.languages.markdown;
866
+ }(Prism), Prism.languages.graphql = { comment: /#.*/, description: { pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, greedy: true, alias: "string", inside: { "language-markdown": { pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, lookbehind: true, inside: Prism.languages.markdown } } }, string: { pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: true }, number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, boolean: /\b(?:false|true)\b/, variable: /\$[a-z_]\w*/i, directive: { pattern: /@[a-z_]\w*/i, alias: "function" }, "attr-name": { pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: true }, "atom-input": { pattern: /\b[A-Z]\w*Input\b/, alias: "class-name" }, scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, constant: /\b[A-Z][A-Z_\d]*\b/, "class-name": { pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, lookbehind: true }, fragment: { pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, lookbehind: true, alias: "function" }, "definition-mutation": { pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, lookbehind: true, alias: "function" }, "definition-query": { pattern: /(\bquery\s+)[a-zA-Z_]\w*/, lookbehind: true, alias: "function" }, keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, operator: /[!=|&]|\.{3}/, "property-query": /\w+(?=\s*\()/, object: /\w+(?=\s*\{)/, punctuation: /[!(){}\[\]:=,]/, property: /\w+/ }, Prism.hooks.add("after-tokenize", function(e) {
867
+ if ("graphql" === e.language)
868
+ for (var i = e.tokens.filter(function(e2) {
869
+ return "string" != typeof e2 && "comment" !== e2.type && "scalar" !== e2.type;
870
+ }), o = 0; o < i.length; ) {
871
+ var n = i[o++];
872
+ if ("keyword" === n.type && "mutation" === n.content) {
873
+ var t = [];
874
+ if (p(["definition-mutation", "punctuation"]) && "(" === c(1).content) {
875
+ o += 2;
876
+ var a = d(/^\($/, /^\)$/);
877
+ if (-1 === a)
878
+ continue;
879
+ for (; o < a; o++) {
880
+ var r = c(0);
881
+ "variable" === r.type && (g(r, "variable-input"), t.push(r.content));
882
+ }
883
+ o = a + 1;
884
+ }
885
+ if (p(["punctuation", "property-query"]) && "{" === c(0).content && (o++, g(c(0), "property-mutation"), 0 < t.length)) {
886
+ var s = d(/^\{$/, /^\}$/);
887
+ if (-1 !== s)
888
+ for (var l = o; l < s; l++) {
889
+ var u = i[l];
890
+ "variable" === u.type && 0 <= t.indexOf(u.content) && g(u, "variable-input");
891
+ }
892
+ }
893
+ }
894
+ }
895
+ function c(e2) {
896
+ return i[o + e2];
897
+ }
898
+ function p(e2, n2) {
899
+ n2 = n2 || 0;
900
+ for (var t2 = 0; t2 < e2.length; t2++) {
901
+ var a2 = c(t2 + n2);
902
+ if (!a2 || a2.type !== e2[t2])
903
+ return;
904
+ }
905
+ return 1;
906
+ }
907
+ function d(e2, n2) {
908
+ for (var t2 = 1, a2 = o; a2 < i.length; a2++) {
909
+ var r2 = i[a2], s2 = r2.content;
910
+ if ("punctuation" === r2.type && "string" == typeof s2) {
911
+ if (e2.test(s2))
912
+ t2++;
913
+ else if (n2.test(s2) && 0 === --t2)
914
+ return a2;
915
+ }
916
+ }
917
+ return -1;
918
+ }
919
+ function g(e2, n2) {
920
+ var t2 = e2.alias;
921
+ t2 ? Array.isArray(t2) || (e2.alias = t2 = [t2]) : e2.alias = t2 = [], t2.push(n2);
922
+ }
923
+ }), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: true }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: true }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: true, lookbehind: true }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: true, lookbehind: true, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(b) {
924
+ var e = b.languages.javascript["template-string"], t = e.pattern.source, m = e.inside.interpolation, f = m.inside["interpolation-punctuation"], s = m.pattern.source;
925
+ function n(e2, n2) {
926
+ if (b.languages[e2])
927
+ return { pattern: RegExp("((?:" + n2 + ")\\s*)" + t), lookbehind: true, greedy: true, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias: e2 } } };
928
+ }
929
+ function h(e2, n2, t2) {
930
+ e2 = { code: e2, grammar: n2, language: t2 };
931
+ return b.hooks.run("before-tokenize", e2), e2.tokens = b.tokenize(e2.code, e2.grammar), b.hooks.run("after-tokenize", e2), e2.tokens;
932
+ }
933
+ function l(a2, e2, r) {
934
+ var n2 = b.tokenize(a2, { interpolation: { pattern: RegExp(s), lookbehind: true } }), p = 0, d = {}, n2 = h(n2.map(function(e3) {
935
+ if ("string" == typeof e3)
936
+ return e3;
937
+ for (var n3, t2, e3 = e3.content; -1 !== a2.indexOf((t2 = p++, n3 = "___" + r.toUpperCase() + "_" + t2 + "___")); )
938
+ ;
939
+ return d[n3] = e3, n3;
940
+ }).join(""), e2, r), g = Object.keys(d);
941
+ return p = 0, function e3(n3) {
942
+ for (var t2 = 0; t2 < n3.length; t2++) {
943
+ if (p >= g.length)
944
+ return;
945
+ var a3, r2, s2, i, o, l2, u2, c = n3[t2];
946
+ "string" == typeof c || "string" == typeof c.content ? (a3 = g[p], -1 !== (u2 = (l2 = "string" == typeof c ? c : c.content).indexOf(a3)) && (++p, r2 = l2.substring(0, u2), o = d[a3], s2 = void 0, (i = {})["interpolation-punctuation"] = f, 3 === (i = b.tokenize(o, i)).length && ((s2 = [1, 1]).push.apply(s2, h(i[1], b.languages.javascript, "javascript")), i.splice.apply(i, s2)), s2 = new b.Token("interpolation", i, m.alias, o), i = l2.substring(u2 + a3.length), o = [], r2 && o.push(r2), o.push(s2), i && (e3(l2 = [i]), o.push.apply(o, l2)), "string" == typeof c ? (n3.splice.apply(n3, [t2, 1].concat(o)), t2 += o.length - 1) : c.content = o)) : (u2 = c.content, Array.isArray(u2) ? e3(u2) : e3([u2]));
947
+ }
948
+ }(n2), new b.Token(r, n2, "language-" + r, a2);
949
+ }
950
+ b.languages.javascript["template-string"] = [n("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source), n("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), n("svg", /\bsvg/.source), n("markdown", /\b(?:markdown|md)/.source), n("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), n("sql", /\bsql/.source), e].filter(Boolean);
951
+ var a = { javascript: true, js: true, typescript: true, ts: true, jsx: true, tsx: true };
952
+ function u(e2) {
953
+ return "string" == typeof e2 ? e2 : Array.isArray(e2) ? e2.map(u).join("") : u(e2.content);
954
+ }
955
+ b.hooks.add("after-tokenize", function(e2) {
956
+ e2.language in a && !function e3(n2) {
957
+ for (var t2 = 0, a2 = n2.length; t2 < a2; t2++) {
958
+ var r, s2, i, o = n2[t2];
959
+ "string" != typeof o && (r = o.content, Array.isArray(r) ? "template-string" === o.type ? (o = r[1], 3 === r.length && "string" != typeof o && "embedded-code" === o.type && (s2 = u(o), o = o.alias, o = Array.isArray(o) ? o[0] : o, i = b.languages[o]) && (r[1] = l(s2, i, o))) : e3(r) : "string" != typeof r && e3([r]));
960
+ }
961
+ }(e2.tokens);
962
+ });
963
+ }(Prism), function(e) {
964
+ e.languages.typescript = e.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: true, greedy: true, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
965
+ var n = e.languages.extend("typescript", {});
966
+ delete n["class-name"], e.languages.typescript["class-name"].inside = n, e.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: true, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: n } } } }), e.languages.ts = e.languages.typescript;
967
+ }(Prism), function(e) {
968
+ var n = e.languages.javascript, t = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, a = "(@(?:arg|argument|param|property)\\s+(?:" + t + "\\s+)?)";
969
+ e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: { pattern: RegExp(a + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source), lookbehind: true, inside: { punctuation: /\./ } } }), e.languages.insertBefore("jsdoc", "keyword", { "optional-parameter": { pattern: RegExp(a + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source), lookbehind: true, inside: { parameter: { pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/, lookbehind: true, inside: { punctuation: /\./ } }, code: { pattern: /(=)[\s\S]*(?=\]$)/, lookbehind: true, inside: n, alias: "language-javascript" }, punctuation: /[=[\]]/ } }, "class-name": [{ pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
970
+ return t;
971
+ })), lookbehind: true, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" + t), lookbehind: true, inside: { string: n.string, number: n.number, boolean: n.boolean, keyword: e.languages.typescript.keyword, operator: /=>|\.\.\.|[&|?:*]/, punctuation: /[.,;=<>{}()[\]]/ } }], example: { pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/, lookbehind: true, inside: { code: { pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m, lookbehind: true, inside: n, alias: "language-javascript" } } } }), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
972
+ }(Prism), function(e) {
973
+ e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{ pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/, alias: "class-name" }] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": { pattern: /\{\||\|\}/, alias: "punctuation" } }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/, lookbehind: true }, { pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/, lookbehind: true });
974
+ }(Prism), Prism.languages.n4js = Prism.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), Prism.languages.insertBefore("n4js", "constant", { annotation: { pattern: /@+\w+/, alias: "operator" } }), Prism.languages.n4jsd = Prism.languages.n4js, function(e) {
975
+ function n(e2, n2) {
976
+ return RegExp(e2.replace(/<ID>/g, function() {
977
+ return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
978
+ }), n2);
979
+ }
980
+ e.languages.insertBefore("javascript", "function-variable", { "method-variable": { pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source), lookbehind: true, alias: ["function-variable", "method", "function", "property-access"] } }), e.languages.insertBefore("javascript", "function", { method: { pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source), lookbehind: true, alias: ["function", "property-access"] } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: "class-name" }, { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: "class-name" }] }), e.languages.insertBefore("javascript", "keyword", { imports: { pattern: n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source), lookbehind: true, inside: e.languages.javascript }, exports: { pattern: n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source), lookbehind: true, inside: e.languages.javascript } }), e.languages.javascript.keyword.unshift({ pattern: /\b(?:as|default|export|from|import)\b/, alias: "module" }, { pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: "control-flow" }, { pattern: /\bnull\b/, alias: ["null", "nil"] }, { pattern: /\bundefined\b/, alias: "nil" }), e.languages.insertBefore("javascript", "operator", { spread: { pattern: /\.{3}/, alias: "operator" }, arrow: { pattern: /=>/, alias: "operator" } }), e.languages.insertBefore("javascript", "punctuation", { "property-access": { pattern: n(/(\.\s*)#?<ID>/.source), lookbehind: true }, "maybe-class-name": { pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, lookbehind: true }, dom: { pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: "variable" }, console: { pattern: /\bconsole(?=\s*\.)/, alias: "class-name" } });
981
+ for (var t = ["function", "function-variable", "method", "method-variable", "property-access"], a = 0; a < t.length; a++) {
982
+ var r = t[a], s = e.languages.javascript[r], r = (s = "RegExp" === e.util.type(s) ? e.languages.javascript[r] = { pattern: s } : s).inside || {};
983
+ (s.inside = r)["maybe-class-name"] = /^[A-Z][\s\S]*/;
984
+ }
985
+ }(Prism), function(s) {
986
+ var e = s.util.clone(s.languages.javascript), t = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, a = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, r = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
987
+ function n(e2, n2) {
988
+ return e2 = e2.replace(/<S>/g, function() {
989
+ return t;
990
+ }).replace(/<BRACES>/g, function() {
991
+ return a;
992
+ }).replace(/<SPREAD>/g, function() {
993
+ return r;
994
+ }), RegExp(e2, n2);
995
+ }
996
+ r = n(r).source, s.languages.jsx = s.languages.extend("markup", e), s.languages.jsx.tag.pattern = n(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), s.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, s.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, s.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, s.languages.jsx.tag.inside.comment = e.comment, s.languages.insertBefore("inside", "attr-name", { spread: { pattern: n(/<SPREAD>/.source), inside: s.languages.jsx } }, s.languages.jsx.tag), s.languages.insertBefore("inside", "special-attr", { script: { pattern: n(/=<BRACES>/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: s.languages.jsx } } }, s.languages.jsx.tag);
997
+ function i(e2) {
998
+ for (var n2 = [], t2 = 0; t2 < e2.length; t2++) {
999
+ var a2 = e2[t2], r2 = false;
1000
+ "string" != typeof a2 && ("tag" === a2.type && a2.content[0] && "tag" === a2.content[0].type ? "</" === a2.content[0].content[0].content ? 0 < n2.length && n2[n2.length - 1].tagName === o(a2.content[0].content[1]) && n2.pop() : "/>" !== a2.content[a2.content.length - 1].content && n2.push({ tagName: o(a2.content[0].content[1]), openedBraces: 0 }) : 0 < n2.length && "punctuation" === a2.type && "{" === a2.content ? n2[n2.length - 1].openedBraces++ : 0 < n2.length && 0 < n2[n2.length - 1].openedBraces && "punctuation" === a2.type && "}" === a2.content ? n2[n2.length - 1].openedBraces-- : r2 = true), (r2 || "string" == typeof a2) && 0 < n2.length && 0 === n2[n2.length - 1].openedBraces && (r2 = o(a2), t2 < e2.length - 1 && ("string" == typeof e2[t2 + 1] || "plain-text" === e2[t2 + 1].type) && (r2 += o(e2[t2 + 1]), e2.splice(t2 + 1, 1)), 0 < t2 && ("string" == typeof e2[t2 - 1] || "plain-text" === e2[t2 - 1].type) && (r2 = o(e2[t2 - 1]) + r2, e2.splice(t2 - 1, 1), t2--), e2[t2] = new s.Token("plain-text", r2, null, r2)), a2.content && "string" != typeof a2.content && i(a2.content);
1001
+ }
1002
+ }
1003
+ var o = function(e2) {
1004
+ return e2 ? "string" == typeof e2 ? e2 : "string" == typeof e2.content ? e2.content : e2.content.map(o).join("") : "";
1005
+ };
1006
+ s.hooks.add("after-tokenize", function(e2) {
1007
+ "jsx" !== e2.language && "tsx" !== e2.language || i(e2.tokens);
1008
+ });
1009
+ }(Prism), function(e) {
1010
+ var n = e.util.clone(e.languages.typescript), n = (e.languages.tsx = e.languages.extend("jsx", n), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
1011
+ n.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = true;
1012
+ }(Prism), Prism.languages.swift = { comment: { pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/, lookbehind: true, greedy: true }, "string-literal": [{ pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source), lookbehind: true, greedy: true, inside: { interpolation: { pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: true, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\\($/, alias: "punctuation" }, punctuation: /\\(?=[\r\n])/, string: /[\s\S]+/ } }, { pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"), lookbehind: true, greedy: true, inside: { interpolation: { pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/, lookbehind: true, inside: null }, "interpolation-punctuation": { pattern: /^\)|\\#+\($/, alias: "punctuation" }, string: /[\s\S]+/ } }], directive: { pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"), alias: "property", inside: { "directive-name": /^#\w+/, boolean: /\b(?:false|true)\b/, number: /\b\d+(?:\.\d+)*\b/, operator: /!|&&|\|\||[<>]=?/, punctuation: /[(),]/ } }, literal: { pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/, alias: "constant" }, "other-directive": { pattern: /#\w+\b/, alias: "property" }, attribute: { pattern: /@\w+/, alias: "atrule" }, "function-definition": { pattern: /(\bfunc\s+)\w+/, lookbehind: true, alias: "function" }, label: { pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/, lookbehind: true, alias: "important" }, keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, boolean: /\b(?:false|true)\b/, nil: { pattern: /\bnil\b/, alias: "constant" }, "short-argument": /\$\d+\b/, omit: { pattern: /\b_\b/, alias: "keyword" }, number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, "class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/, function: /\b[a-z_]\w*(?=\s*\()/i, constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/, punctuation: /[{}[\]();,.:\\]/ }, Prism.languages.swift["string-literal"].forEach(function(e) {
1013
+ e.inside.interpolation.inside = Prism.languages.swift;
1014
+ }), function(e) {
1015
+ e.languages.kotlin = e.languages.extend("clike", { keyword: { pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/, lookbehind: true }, function: [{ pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/, greedy: true }, { pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/, lookbehind: true, greedy: true }], number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/, operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ }), delete e.languages.kotlin["class-name"];
1016
+ var n = { "interpolation-punctuation": { pattern: /^\$\{?|\}$/, alias: "punctuation" }, expression: { pattern: /[\s\S]+/, inside: e.languages.kotlin } };
1017
+ e.languages.insertBefore("kotlin", "string", { "string-literal": [{ pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/, alias: "multiline", inside: { interpolation: { pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i, inside: n }, string: /[\s\S]+/ } }, { pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/, alias: "singleline", inside: { interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i, lookbehind: true, inside: n }, string: /[\s\S]+/ } }], char: { pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: true } }), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", { annotation: { pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/, alias: "builtin" } }), e.languages.insertBefore("kotlin", "function", { label: { pattern: /\b\w+@|@\w+\b/, alias: "symbol" } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
1018
+ }(Prism), Prism.languages.c = Prism.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: true }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: true }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: true }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), Prism.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: true } }), Prism.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: true, greedy: true, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: true }, Prism.languages.c.string], char: Prism.languages.c.char, comment: Prism.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: true }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: true, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: true, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: Prism.languages.c } } } }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, Prism.languages.objectivec = Prism.languages.extend("c", { string: { pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: true }, keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }), delete Prism.languages.objectivec["class-name"], Prism.languages.objc = Prism.languages.objectivec, Prism.languages.reason = Prism.languages.extend("clike", { string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/, greedy: true }, "class-name": /\b[A-Z]\w*/, keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/, operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/ }), Prism.languages.insertBefore("reason", "class-name", { char: { pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/, greedy: true }, constructor: /\b[A-Z]\w*\b(?!\s*\.)/, label: { pattern: /\b[a-z]\w*(?=::)/, alias: "symbol" } }), delete Prism.languages.reason.function, function(e) {
1019
+ for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, t = 0; t < 2; t++)
1020
+ n = n.replace(/<self>/g, function() {
1021
+ return n;
1022
+ });
1023
+ n = n.replace(/<self>/g, function() {
1024
+ return /[^\s\S]/.source;
1025
+ }), e.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + n), lookbehind: true, greedy: true }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: true, greedy: true }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: true }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: true }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: true, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: true, greedy: true, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: true, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: true, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: true, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: true, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: true, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
1026
+ }(Prism), Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: true, greedy: true }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: true } }), delete Prism.languages.go["class-name"], function(e) {
1027
+ var n = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, t = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
1028
+ return n.source;
1029
+ });
1030
+ e.languages.cpp = e.languages.extend("c", { "class-name": [{ pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
1031
+ return n.source;
1032
+ })), lookbehind: true }, /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/], keyword: n, number: { pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, greedy: true }, operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, boolean: /\b(?:false|true)\b/ }), e.languages.insertBefore("cpp", "string", { module: { pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
1033
+ return t;
1034
+ }) + ")"), lookbehind: true, greedy: true, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: true } }), e.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: e.languages.cpp } } } }), e.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), e.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: true, greedy: true, inside: e.languages.extend("cpp", {}) } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
1035
+ }(Prism), Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: true, greedy: true }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: true, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: true, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: true }, "conversion-option": { pattern: /![sra](?=[:}]$)/, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: true, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: true }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: true }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: true }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: true, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: true, greedy: true }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: true, greedy: true }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: true }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json;
1036
+
1037
+ // src/themes/index.ts
1038
+ var themes_exports = {};
1039
+ __export(themes_exports, {
1040
+ dracula: () => dracula_default,
1041
+ duotoneDark: () => duotoneDark_default,
1042
+ duotoneLight: () => duotoneLight_default,
1043
+ github: () => github_default,
1044
+ gruvboxMaterialDark: () => gruvboxMaterialDark_default,
1045
+ gruvboxMaterialLight: () => gruvboxMaterialLight_default,
1046
+ jettwaveDark: () => jettwaveDark_default,
1047
+ jettwaveLight: () => jettwaveLight_default,
1048
+ nightOwl: () => nightOwl_default,
1049
+ nightOwlLight: () => nightOwlLight_default,
1050
+ oceanicNext: () => oceanicNext_default,
1051
+ okaidia: () => okaidia_default,
1052
+ oneDark: () => oneDark_default,
1053
+ oneLight: () => oneLight_default,
1054
+ palenight: () => palenight_default,
1055
+ shadesOfPurple: () => shadesOfPurple_default,
1056
+ synthwave84: () => synthwave84_default,
1057
+ ultramin: () => ultramin_default,
1058
+ vsDark: () => vsDark_default,
1059
+ vsLight: () => vsLight_default
1060
+ });
1061
+
1062
+ // src/themes/dracula.ts
1063
+ var theme = {
1064
+ plain: {
1065
+ color: "#F8F8F2",
1066
+ backgroundColor: "#282A36"
1067
+ },
1068
+ styles: [
1069
+ {
1070
+ types: ["prolog", "constant", "builtin"],
1071
+ style: {
1072
+ color: "rgb(189, 147, 249)"
1073
+ }
1074
+ },
1075
+ {
1076
+ types: ["inserted", "function"],
1077
+ style: {
1078
+ color: "rgb(80, 250, 123)"
1079
+ }
1080
+ },
1081
+ {
1082
+ types: ["deleted"],
1083
+ style: {
1084
+ color: "rgb(255, 85, 85)"
1085
+ }
1086
+ },
1087
+ {
1088
+ types: ["changed"],
1089
+ style: {
1090
+ color: "rgb(255, 184, 108)"
1091
+ }
1092
+ },
1093
+ {
1094
+ types: ["punctuation", "symbol"],
1095
+ style: {
1096
+ color: "rgb(248, 248, 242)"
1097
+ }
1098
+ },
1099
+ {
1100
+ types: ["string", "char", "tag", "selector"],
1101
+ style: {
1102
+ color: "rgb(255, 121, 198)"
1103
+ }
1104
+ },
1105
+ {
1106
+ types: ["keyword", "variable"],
1107
+ style: {
1108
+ color: "rgb(189, 147, 249)",
1109
+ fontStyle: "italic"
1110
+ }
1111
+ },
1112
+ {
1113
+ types: ["comment"],
1114
+ style: {
1115
+ color: "rgb(98, 114, 164)"
1116
+ }
1117
+ },
1118
+ {
1119
+ types: ["attr-name"],
1120
+ style: {
1121
+ color: "rgb(241, 250, 140)"
1122
+ }
1123
+ }
1124
+ ]
1125
+ };
1126
+ var dracula_default = theme;
1127
+
1128
+ // src/themes/duotoneDark.ts
1129
+ var theme2 = {
1130
+ plain: {
1131
+ backgroundColor: "#2a2734",
1132
+ color: "#9a86fd"
1133
+ },
1134
+ styles: [
1135
+ {
1136
+ types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
1137
+ style: {
1138
+ color: "#6c6783"
1139
+ }
1140
+ },
1141
+ {
1142
+ types: ["namespace"],
1143
+ style: {
1144
+ opacity: 0.7
1145
+ }
1146
+ },
1147
+ {
1148
+ types: ["tag", "operator", "number"],
1149
+ style: {
1150
+ color: "#e09142"
1151
+ }
1152
+ },
1153
+ {
1154
+ types: ["property", "function"],
1155
+ style: {
1156
+ color: "#9a86fd"
1157
+ }
1158
+ },
1159
+ {
1160
+ types: ["tag-id", "selector", "atrule-id"],
1161
+ style: {
1162
+ color: "#eeebff"
1163
+ }
1164
+ },
1165
+ {
1166
+ types: ["attr-name"],
1167
+ style: {
1168
+ color: "#c4b9fe"
1169
+ }
1170
+ },
1171
+ {
1172
+ types: [
1173
+ "boolean",
1174
+ "string",
1175
+ "entity",
1176
+ "url",
1177
+ "attr-value",
1178
+ "keyword",
1179
+ "control",
1180
+ "directive",
1181
+ "unit",
1182
+ "statement",
1183
+ "regex",
1184
+ "atrule",
1185
+ "placeholder",
1186
+ "variable"
1187
+ ],
1188
+ style: {
1189
+ color: "#ffcc99"
1190
+ }
1191
+ },
1192
+ {
1193
+ types: ["deleted"],
1194
+ style: {
1195
+ textDecorationLine: "line-through"
1196
+ }
1197
+ },
1198
+ {
1199
+ types: ["inserted"],
1200
+ style: {
1201
+ textDecorationLine: "underline"
1202
+ }
1203
+ },
1204
+ {
1205
+ types: ["italic"],
1206
+ style: {
1207
+ fontStyle: "italic"
1208
+ }
1209
+ },
1210
+ {
1211
+ types: ["important", "bold"],
1212
+ style: {
1213
+ fontWeight: "bold"
1214
+ }
1215
+ },
1216
+ {
1217
+ types: ["important"],
1218
+ style: {
1219
+ color: "#c4b9fe"
1220
+ }
1221
+ }
1222
+ ]
1223
+ };
1224
+ var duotoneDark_default = theme2;
1225
+
1226
+ // src/themes/duotoneLight.ts
1227
+ var theme3 = {
1228
+ plain: {
1229
+ backgroundColor: "#faf8f5",
1230
+ color: "#728fcb"
1231
+ },
1232
+ styles: [
1233
+ {
1234
+ types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
1235
+ style: {
1236
+ color: "#b6ad9a"
1237
+ }
1238
+ },
1239
+ {
1240
+ types: ["namespace"],
1241
+ style: {
1242
+ opacity: 0.7
1243
+ }
1244
+ },
1245
+ {
1246
+ types: ["tag", "operator", "number"],
1247
+ style: {
1248
+ color: "#063289"
1249
+ }
1250
+ },
1251
+ {
1252
+ types: ["property", "function"],
1253
+ style: {
1254
+ color: "#b29762"
1255
+ }
1256
+ },
1257
+ {
1258
+ types: ["tag-id", "selector", "atrule-id"],
1259
+ style: {
1260
+ color: "#2d2006"
1261
+ }
1262
+ },
1263
+ {
1264
+ types: ["attr-name"],
1265
+ style: {
1266
+ color: "#896724"
1267
+ }
1268
+ },
1269
+ {
1270
+ types: [
1271
+ "boolean",
1272
+ "string",
1273
+ "entity",
1274
+ "url",
1275
+ "attr-value",
1276
+ "keyword",
1277
+ "control",
1278
+ "directive",
1279
+ "unit",
1280
+ "statement",
1281
+ "regex",
1282
+ "atrule"
1283
+ ],
1284
+ style: {
1285
+ color: "#728fcb"
1286
+ }
1287
+ },
1288
+ {
1289
+ types: ["placeholder", "variable"],
1290
+ style: {
1291
+ color: "#93abdc"
1292
+ }
1293
+ },
1294
+ {
1295
+ types: ["deleted"],
1296
+ style: {
1297
+ textDecorationLine: "line-through"
1298
+ }
1299
+ },
1300
+ {
1301
+ types: ["inserted"],
1302
+ style: {
1303
+ textDecorationLine: "underline"
1304
+ }
1305
+ },
1306
+ {
1307
+ types: ["italic"],
1308
+ style: {
1309
+ fontStyle: "italic"
1310
+ }
1311
+ },
1312
+ {
1313
+ types: ["important", "bold"],
1314
+ style: {
1315
+ fontWeight: "bold"
1316
+ }
1317
+ },
1318
+ {
1319
+ types: ["important"],
1320
+ style: {
1321
+ color: "#896724"
1322
+ }
1323
+ }
1324
+ ]
1325
+ };
1326
+ var duotoneLight_default = theme3;
1327
+
1328
+ // src/themes/github.ts
1329
+ var theme4 = {
1330
+ plain: {
1331
+ color: "#393A34",
1332
+ backgroundColor: "#f6f8fa"
1333
+ },
1334
+ styles: [
1335
+ {
1336
+ types: ["comment", "prolog", "doctype", "cdata"],
1337
+ style: {
1338
+ color: "#999988",
1339
+ fontStyle: "italic"
1340
+ }
1341
+ },
1342
+ {
1343
+ types: ["namespace"],
1344
+ style: {
1345
+ opacity: 0.7
1346
+ }
1347
+ },
1348
+ {
1349
+ types: ["string", "attr-value"],
1350
+ style: {
1351
+ color: "#e3116c"
1352
+ }
1353
+ },
1354
+ {
1355
+ types: ["punctuation", "operator"],
1356
+ style: {
1357
+ color: "#393A34"
1358
+ }
1359
+ },
1360
+ {
1361
+ types: [
1362
+ "entity",
1363
+ "url",
1364
+ "symbol",
1365
+ "number",
1366
+ "boolean",
1367
+ "variable",
1368
+ "constant",
1369
+ "property",
1370
+ "regex",
1371
+ "inserted"
1372
+ ],
1373
+ style: {
1374
+ color: "#36acaa"
1375
+ }
1376
+ },
1377
+ {
1378
+ types: ["atrule", "keyword", "attr-name", "selector"],
1379
+ style: {
1380
+ color: "#00a4db"
1381
+ }
1382
+ },
1383
+ {
1384
+ types: ["function", "deleted", "tag"],
1385
+ style: {
1386
+ color: "#d73a49"
1387
+ }
1388
+ },
1389
+ {
1390
+ types: ["function-variable"],
1391
+ style: {
1392
+ color: "#6f42c1"
1393
+ }
1394
+ },
1395
+ {
1396
+ types: ["tag", "selector", "keyword"],
1397
+ style: {
1398
+ color: "#00009f"
1399
+ }
1400
+ }
1401
+ ]
1402
+ };
1403
+ var github_default = theme4;
1404
+
1405
+ // src/themes/nightOwl.ts
1406
+ var theme5 = {
1407
+ plain: {
1408
+ color: "#d6deeb",
1409
+ backgroundColor: "#011627"
1410
+ },
1411
+ styles: [
1412
+ {
1413
+ types: ["changed"],
1414
+ style: {
1415
+ color: "rgb(162, 191, 252)",
1416
+ fontStyle: "italic"
1417
+ }
1418
+ },
1419
+ {
1420
+ types: ["deleted"],
1421
+ style: {
1422
+ color: "rgba(239, 83, 80, 0.56)",
1423
+ fontStyle: "italic"
1424
+ }
1425
+ },
1426
+ {
1427
+ types: ["inserted", "attr-name"],
1428
+ style: {
1429
+ color: "rgb(173, 219, 103)",
1430
+ fontStyle: "italic"
1431
+ }
1432
+ },
1433
+ {
1434
+ types: ["comment"],
1435
+ style: {
1436
+ color: "rgb(99, 119, 119)",
1437
+ fontStyle: "italic"
1438
+ }
1439
+ },
1440
+ {
1441
+ types: ["string", "url"],
1442
+ style: {
1443
+ color: "rgb(173, 219, 103)"
1444
+ }
1445
+ },
1446
+ {
1447
+ types: ["variable"],
1448
+ style: {
1449
+ color: "rgb(214, 222, 235)"
1450
+ }
1451
+ },
1452
+ {
1453
+ types: ["number"],
1454
+ style: {
1455
+ color: "rgb(247, 140, 108)"
1456
+ }
1457
+ },
1458
+ {
1459
+ types: ["builtin", "char", "constant", "function"],
1460
+ style: {
1461
+ color: "rgb(130, 170, 255)"
1462
+ }
1463
+ },
1464
+ {
1465
+ // This was manually added after the auto-generation
1466
+ // so that punctuations are not italicised
1467
+ types: ["punctuation"],
1468
+ style: {
1469
+ color: "rgb(199, 146, 234)"
1470
+ }
1471
+ },
1472
+ {
1473
+ types: ["selector", "doctype"],
1474
+ style: {
1475
+ color: "rgb(199, 146, 234)",
1476
+ fontStyle: "italic"
1477
+ }
1478
+ },
1479
+ {
1480
+ types: ["class-name"],
1481
+ style: {
1482
+ color: "rgb(255, 203, 139)"
1483
+ }
1484
+ },
1485
+ {
1486
+ types: ["tag", "operator", "keyword"],
1487
+ style: {
1488
+ color: "rgb(127, 219, 202)"
1489
+ }
1490
+ },
1491
+ {
1492
+ types: ["boolean"],
1493
+ style: {
1494
+ color: "rgb(255, 88, 116)"
1495
+ }
1496
+ },
1497
+ {
1498
+ types: ["property"],
1499
+ style: {
1500
+ color: "rgb(128, 203, 196)"
1501
+ }
1502
+ },
1503
+ {
1504
+ types: ["namespace"],
1505
+ style: {
1506
+ color: "rgb(178, 204, 214)"
1507
+ }
1508
+ }
1509
+ ]
1510
+ };
1511
+ var nightOwl_default = theme5;
1512
+
1513
+ // src/themes/nightOwlLight.ts
1514
+ var theme6 = {
1515
+ plain: {
1516
+ color: "#403f53",
1517
+ backgroundColor: "#FBFBFB"
1518
+ },
1519
+ styles: [
1520
+ {
1521
+ types: ["changed"],
1522
+ style: {
1523
+ color: "rgb(162, 191, 252)",
1524
+ fontStyle: "italic"
1525
+ }
1526
+ },
1527
+ {
1528
+ types: ["deleted"],
1529
+ style: {
1530
+ color: "rgba(239, 83, 80, 0.56)",
1531
+ fontStyle: "italic"
1532
+ }
1533
+ },
1534
+ {
1535
+ types: ["inserted", "attr-name"],
1536
+ style: {
1537
+ color: "rgb(72, 118, 214)",
1538
+ fontStyle: "italic"
1539
+ }
1540
+ },
1541
+ {
1542
+ types: ["comment"],
1543
+ style: {
1544
+ color: "rgb(152, 159, 177)",
1545
+ fontStyle: "italic"
1546
+ }
1547
+ },
1548
+ {
1549
+ types: ["string", "builtin", "char", "constant", "url"],
1550
+ style: {
1551
+ color: "rgb(72, 118, 214)"
1552
+ }
1553
+ },
1554
+ {
1555
+ types: ["variable"],
1556
+ style: {
1557
+ color: "rgb(201, 103, 101)"
1558
+ }
1559
+ },
1560
+ {
1561
+ types: ["number"],
1562
+ style: {
1563
+ color: "rgb(170, 9, 130)"
1564
+ }
1565
+ },
1566
+ {
1567
+ // This was manually added after the auto-generation
1568
+ // so that punctuations are not italicised
1569
+ types: ["punctuation"],
1570
+ style: {
1571
+ color: "rgb(153, 76, 195)"
1572
+ }
1573
+ },
1574
+ {
1575
+ types: ["function", "selector", "doctype"],
1576
+ style: {
1577
+ color: "rgb(153, 76, 195)",
1578
+ fontStyle: "italic"
1579
+ }
1580
+ },
1581
+ {
1582
+ types: ["class-name"],
1583
+ style: {
1584
+ color: "rgb(17, 17, 17)"
1585
+ }
1586
+ },
1587
+ {
1588
+ types: ["tag"],
1589
+ style: {
1590
+ color: "rgb(153, 76, 195)"
1591
+ }
1592
+ },
1593
+ {
1594
+ types: ["operator", "property", "keyword", "namespace"],
1595
+ style: {
1596
+ color: "rgb(12, 150, 155)"
1597
+ }
1598
+ },
1599
+ {
1600
+ types: ["boolean"],
1601
+ style: {
1602
+ color: "rgb(188, 84, 84)"
1603
+ }
1604
+ }
1605
+ ]
1606
+ };
1607
+ var nightOwlLight_default = theme6;
1608
+
1609
+ // src/themes/oceanicNext.ts
1610
+ var colors = {
1611
+ char: "#D8DEE9",
1612
+ comment: "#999999",
1613
+ keyword: "#c5a5c5",
1614
+ primitive: "#5a9bcf",
1615
+ string: "#8dc891",
1616
+ variable: "#d7deea",
1617
+ boolean: "#ff8b50",
1618
+ tag: "#fc929e",
1619
+ function: "#79b6f2",
1620
+ className: "#FAC863"};
1621
+ var theme7 = {
1622
+ plain: {
1623
+ backgroundColor: "#282c34",
1624
+ color: "#ffffff"
1625
+ },
1626
+ styles: [
1627
+ {
1628
+ types: ["attr-name"],
1629
+ style: {
1630
+ color: colors.keyword
1631
+ }
1632
+ },
1633
+ {
1634
+ types: ["attr-value"],
1635
+ style: {
1636
+ color: colors.string
1637
+ }
1638
+ },
1639
+ {
1640
+ types: [
1641
+ "comment",
1642
+ "block-comment",
1643
+ "prolog",
1644
+ "doctype",
1645
+ "cdata",
1646
+ "shebang"
1647
+ ],
1648
+ style: {
1649
+ color: colors.comment
1650
+ }
1651
+ },
1652
+ {
1653
+ types: [
1654
+ "property",
1655
+ "number",
1656
+ "function-name",
1657
+ "constant",
1658
+ "symbol",
1659
+ "deleted"
1660
+ ],
1661
+ style: {
1662
+ color: colors.primitive
1663
+ }
1664
+ },
1665
+ {
1666
+ types: ["boolean"],
1667
+ style: {
1668
+ color: colors.boolean
1669
+ }
1670
+ },
1671
+ {
1672
+ types: ["tag"],
1673
+ style: {
1674
+ color: colors.tag
1675
+ }
1676
+ },
1677
+ {
1678
+ types: ["string"],
1679
+ style: {
1680
+ color: colors.string
1681
+ }
1682
+ },
1683
+ {
1684
+ types: ["punctuation"],
1685
+ style: {
1686
+ color: colors.string
1687
+ }
1688
+ },
1689
+ {
1690
+ types: ["selector", "char", "builtin", "inserted"],
1691
+ style: {
1692
+ color: colors.char
1693
+ }
1694
+ },
1695
+ {
1696
+ types: ["function"],
1697
+ style: {
1698
+ color: colors.function
1699
+ }
1700
+ },
1701
+ {
1702
+ types: ["operator", "entity", "url", "variable"],
1703
+ style: {
1704
+ color: colors.variable
1705
+ }
1706
+ },
1707
+ {
1708
+ types: ["keyword"],
1709
+ style: {
1710
+ color: colors.keyword
1711
+ }
1712
+ },
1713
+ {
1714
+ types: ["atrule", "class-name"],
1715
+ style: {
1716
+ color: colors.className
1717
+ }
1718
+ },
1719
+ {
1720
+ types: ["important"],
1721
+ style: {
1722
+ fontWeight: "400"
1723
+ }
1724
+ },
1725
+ {
1726
+ types: ["bold"],
1727
+ style: {
1728
+ fontWeight: "bold"
1729
+ }
1730
+ },
1731
+ {
1732
+ types: ["italic"],
1733
+ style: {
1734
+ fontStyle: "italic"
1735
+ }
1736
+ },
1737
+ {
1738
+ types: ["namespace"],
1739
+ style: {
1740
+ opacity: 0.7
1741
+ }
1742
+ }
1743
+ ]
1744
+ };
1745
+ var oceanicNext_default = theme7;
1746
+
1747
+ // src/themes/okaidia.ts
1748
+ var theme8 = {
1749
+ plain: {
1750
+ color: "#f8f8f2",
1751
+ backgroundColor: "#272822"
1752
+ },
1753
+ styles: [
1754
+ {
1755
+ types: ["changed"],
1756
+ style: {
1757
+ color: "rgb(162, 191, 252)",
1758
+ fontStyle: "italic"
1759
+ }
1760
+ },
1761
+ {
1762
+ types: ["deleted"],
1763
+ style: {
1764
+ color: "#f92672",
1765
+ fontStyle: "italic"
1766
+ }
1767
+ },
1768
+ {
1769
+ types: ["inserted"],
1770
+ style: {
1771
+ color: "rgb(173, 219, 103)",
1772
+ fontStyle: "italic"
1773
+ }
1774
+ },
1775
+ {
1776
+ types: ["comment"],
1777
+ style: {
1778
+ color: "#8292a2",
1779
+ fontStyle: "italic"
1780
+ }
1781
+ },
1782
+ {
1783
+ types: ["string", "url"],
1784
+ style: {
1785
+ color: "#a6e22e"
1786
+ }
1787
+ },
1788
+ {
1789
+ types: ["variable"],
1790
+ style: {
1791
+ color: "#f8f8f2"
1792
+ }
1793
+ },
1794
+ {
1795
+ types: ["number"],
1796
+ style: {
1797
+ color: "#ae81ff"
1798
+ }
1799
+ },
1800
+ {
1801
+ types: ["builtin", "char", "constant", "function", "class-name"],
1802
+ style: {
1803
+ color: "#e6db74"
1804
+ }
1805
+ },
1806
+ {
1807
+ types: ["punctuation"],
1808
+ style: {
1809
+ color: "#f8f8f2"
1810
+ }
1811
+ },
1812
+ {
1813
+ types: ["selector", "doctype"],
1814
+ style: {
1815
+ color: "#a6e22e",
1816
+ fontStyle: "italic"
1817
+ }
1818
+ },
1819
+ {
1820
+ types: ["tag", "operator", "keyword"],
1821
+ style: {
1822
+ color: "#66d9ef"
1823
+ }
1824
+ },
1825
+ {
1826
+ types: ["boolean"],
1827
+ style: {
1828
+ color: "#ae81ff"
1829
+ }
1830
+ },
1831
+ {
1832
+ types: ["namespace"],
1833
+ style: {
1834
+ color: "rgb(178, 204, 214)",
1835
+ opacity: 0.7
1836
+ }
1837
+ },
1838
+ {
1839
+ types: ["tag", "property"],
1840
+ style: {
1841
+ color: "#f92672"
1842
+ }
1843
+ },
1844
+ {
1845
+ types: ["attr-name"],
1846
+ style: {
1847
+ color: "#a6e22e !important"
1848
+ }
1849
+ },
1850
+ {
1851
+ types: ["doctype"],
1852
+ style: {
1853
+ color: "#8292a2"
1854
+ }
1855
+ },
1856
+ {
1857
+ types: ["rule"],
1858
+ style: {
1859
+ color: "#e6db74"
1860
+ }
1861
+ }
1862
+ ]
1863
+ };
1864
+ var okaidia_default = theme8;
1865
+
1866
+ // src/themes/palenight.ts
1867
+ var theme9 = {
1868
+ plain: {
1869
+ color: "#bfc7d5",
1870
+ backgroundColor: "#292d3e"
1871
+ },
1872
+ styles: [
1873
+ {
1874
+ types: ["comment"],
1875
+ style: {
1876
+ color: "rgb(105, 112, 152)",
1877
+ fontStyle: "italic"
1878
+ }
1879
+ },
1880
+ {
1881
+ types: ["string", "inserted"],
1882
+ style: {
1883
+ color: "rgb(195, 232, 141)"
1884
+ }
1885
+ },
1886
+ {
1887
+ types: ["number"],
1888
+ style: {
1889
+ color: "rgb(247, 140, 108)"
1890
+ }
1891
+ },
1892
+ {
1893
+ types: ["builtin", "char", "constant", "function"],
1894
+ style: {
1895
+ color: "rgb(130, 170, 255)"
1896
+ }
1897
+ },
1898
+ {
1899
+ types: ["punctuation", "selector"],
1900
+ style: {
1901
+ color: "rgb(199, 146, 234)"
1902
+ }
1903
+ },
1904
+ {
1905
+ types: ["variable"],
1906
+ style: {
1907
+ color: "rgb(191, 199, 213)"
1908
+ }
1909
+ },
1910
+ {
1911
+ types: ["class-name", "attr-name"],
1912
+ style: {
1913
+ color: "rgb(255, 203, 107)"
1914
+ }
1915
+ },
1916
+ {
1917
+ types: ["tag", "deleted"],
1918
+ style: {
1919
+ color: "rgb(255, 85, 114)"
1920
+ }
1921
+ },
1922
+ {
1923
+ types: ["operator"],
1924
+ style: {
1925
+ color: "rgb(137, 221, 255)"
1926
+ }
1927
+ },
1928
+ {
1929
+ types: ["boolean"],
1930
+ style: {
1931
+ color: "rgb(255, 88, 116)"
1932
+ }
1933
+ },
1934
+ {
1935
+ types: ["keyword"],
1936
+ style: {
1937
+ fontStyle: "italic"
1938
+ }
1939
+ },
1940
+ {
1941
+ types: ["doctype"],
1942
+ style: {
1943
+ color: "rgb(199, 146, 234)",
1944
+ fontStyle: "italic"
1945
+ }
1946
+ },
1947
+ {
1948
+ types: ["namespace"],
1949
+ style: {
1950
+ color: "rgb(178, 204, 214)"
1951
+ }
1952
+ },
1953
+ {
1954
+ types: ["url"],
1955
+ style: {
1956
+ color: "rgb(221, 221, 221)"
1957
+ }
1958
+ }
1959
+ ]
1960
+ };
1961
+ var palenight_default = theme9;
1962
+
1963
+ // src/themes/shadesOfPurple.ts
1964
+ var theme10 = {
1965
+ plain: {
1966
+ color: "#9EFEFF",
1967
+ backgroundColor: "#2D2A55"
1968
+ },
1969
+ styles: [
1970
+ {
1971
+ types: ["changed"],
1972
+ style: {
1973
+ color: "rgb(255, 238, 128)"
1974
+ }
1975
+ },
1976
+ {
1977
+ types: ["deleted"],
1978
+ style: {
1979
+ color: "rgba(239, 83, 80, 0.56)"
1980
+ }
1981
+ },
1982
+ {
1983
+ types: ["inserted"],
1984
+ style: {
1985
+ color: "rgb(173, 219, 103)"
1986
+ }
1987
+ },
1988
+ {
1989
+ types: ["comment"],
1990
+ style: {
1991
+ color: "rgb(179, 98, 255)",
1992
+ fontStyle: "italic"
1993
+ }
1994
+ },
1995
+ {
1996
+ types: ["punctuation"],
1997
+ style: {
1998
+ color: "rgb(255, 255, 255)"
1999
+ }
2000
+ },
2001
+ {
2002
+ types: ["constant"],
2003
+ style: {
2004
+ color: "rgb(255, 98, 140)"
2005
+ }
2006
+ },
2007
+ {
2008
+ types: ["string", "url"],
2009
+ style: {
2010
+ color: "rgb(165, 255, 144)"
2011
+ }
2012
+ },
2013
+ {
2014
+ types: ["variable"],
2015
+ style: {
2016
+ color: "rgb(255, 238, 128)"
2017
+ }
2018
+ },
2019
+ {
2020
+ types: ["number", "boolean"],
2021
+ style: {
2022
+ color: "rgb(255, 98, 140)"
2023
+ }
2024
+ },
2025
+ {
2026
+ types: ["attr-name"],
2027
+ style: {
2028
+ color: "rgb(255, 180, 84)"
2029
+ }
2030
+ },
2031
+ {
2032
+ types: [
2033
+ "keyword",
2034
+ "operator",
2035
+ "property",
2036
+ "namespace",
2037
+ "tag",
2038
+ "selector",
2039
+ "doctype"
2040
+ ],
2041
+ style: {
2042
+ color: "rgb(255, 157, 0)"
2043
+ }
2044
+ },
2045
+ {
2046
+ types: ["builtin", "char", "constant", "function", "class-name"],
2047
+ style: {
2048
+ color: "rgb(250, 208, 0)"
2049
+ }
2050
+ }
2051
+ ]
2052
+ };
2053
+ var shadesOfPurple_default = theme10;
2054
+
2055
+ // src/themes/synthwave84.ts
2056
+ var theme11 = {
2057
+ plain: {
2058
+ backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
2059
+ backgroundImage: "#34294f",
2060
+ color: "#f92aad",
2061
+ textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
2062
+ },
2063
+ styles: [
2064
+ {
2065
+ types: ["comment", "block-comment", "prolog", "doctype", "cdata"],
2066
+ style: {
2067
+ color: "#495495",
2068
+ fontStyle: "italic"
2069
+ }
2070
+ },
2071
+ {
2072
+ types: ["punctuation"],
2073
+ style: {
2074
+ color: "#ccc"
2075
+ }
2076
+ },
2077
+ {
2078
+ types: [
2079
+ "tag",
2080
+ "attr-name",
2081
+ "namespace",
2082
+ "number",
2083
+ "unit",
2084
+ "hexcode",
2085
+ "deleted"
2086
+ ],
2087
+ style: {
2088
+ color: "#e2777a"
2089
+ }
2090
+ },
2091
+ {
2092
+ types: ["property", "selector"],
2093
+ style: {
2094
+ color: "#72f1b8",
2095
+ textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
2096
+ }
2097
+ },
2098
+ {
2099
+ types: ["function-name"],
2100
+ style: {
2101
+ color: "#6196cc"
2102
+ }
2103
+ },
2104
+ {
2105
+ types: ["boolean", "selector-id", "function"],
2106
+ style: {
2107
+ color: "#fdfdfd",
2108
+ textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
2109
+ }
2110
+ },
2111
+ {
2112
+ types: ["class-name", "maybe-class-name", "builtin"],
2113
+ style: {
2114
+ color: "#fff5f6",
2115
+ textShadow: "0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"
2116
+ }
2117
+ },
2118
+ {
2119
+ types: ["constant", "symbol"],
2120
+ style: {
2121
+ color: "#f92aad",
2122
+ textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
2123
+ }
2124
+ },
2125
+ {
2126
+ types: ["important", "atrule", "keyword", "selector-class"],
2127
+ style: {
2128
+ color: "#f4eee4",
2129
+ textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
2130
+ }
2131
+ },
2132
+ {
2133
+ types: ["string", "char", "attr-value", "regex", "variable"],
2134
+ style: {
2135
+ color: "#f87c32"
2136
+ }
2137
+ },
2138
+ {
2139
+ types: ["parameter"],
2140
+ style: {
2141
+ fontStyle: "italic"
2142
+ }
2143
+ },
2144
+ {
2145
+ types: ["entity", "url"],
2146
+ style: {
2147
+ color: "#67cdcc"
2148
+ }
2149
+ },
2150
+ {
2151
+ types: ["operator"],
2152
+ style: {
2153
+ color: "ffffffee"
2154
+ }
2155
+ },
2156
+ {
2157
+ types: ["important", "bold"],
2158
+ style: {
2159
+ fontWeight: "bold"
2160
+ }
2161
+ },
2162
+ {
2163
+ types: ["italic"],
2164
+ style: {
2165
+ fontStyle: "italic"
2166
+ }
2167
+ },
2168
+ {
2169
+ types: ["entity"],
2170
+ style: {
2171
+ cursor: "help"
2172
+ }
2173
+ },
2174
+ {
2175
+ types: ["inserted"],
2176
+ style: {
2177
+ color: "green"
2178
+ }
2179
+ }
2180
+ ]
2181
+ };
2182
+ var synthwave84_default = theme11;
2183
+
2184
+ // src/themes/ultramin.ts
2185
+ var theme12 = {
2186
+ plain: {
2187
+ color: "#282a2e",
2188
+ backgroundColor: "#ffffff"
2189
+ },
2190
+ styles: [
2191
+ {
2192
+ types: ["comment"],
2193
+ style: {
2194
+ color: "rgb(197, 200, 198)"
2195
+ }
2196
+ },
2197
+ {
2198
+ types: ["string", "number", "builtin", "variable"],
2199
+ style: {
2200
+ color: "rgb(150, 152, 150)"
2201
+ }
2202
+ },
2203
+ {
2204
+ types: ["class-name", "function", "tag", "attr-name"],
2205
+ style: {
2206
+ color: "rgb(40, 42, 46)"
2207
+ }
2208
+ }
2209
+ ]
2210
+ };
2211
+ var ultramin_default = theme12;
2212
+
2213
+ // src/themes/vsDark.ts
2214
+ var theme13 = {
2215
+ plain: {
2216
+ color: "#9CDCFE",
2217
+ backgroundColor: "#1E1E1E"
2218
+ },
2219
+ styles: [
2220
+ {
2221
+ types: ["prolog"],
2222
+ style: {
2223
+ color: "rgb(0, 0, 128)"
2224
+ }
2225
+ },
2226
+ {
2227
+ types: ["comment"],
2228
+ style: {
2229
+ color: "rgb(106, 153, 85)"
2230
+ }
2231
+ },
2232
+ {
2233
+ types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2234
+ style: {
2235
+ color: "rgb(86, 156, 214)"
2236
+ }
2237
+ },
2238
+ {
2239
+ types: ["number", "inserted"],
2240
+ style: {
2241
+ color: "rgb(181, 206, 168)"
2242
+ }
2243
+ },
2244
+ {
2245
+ types: ["constant"],
2246
+ style: {
2247
+ color: "rgb(100, 102, 149)"
2248
+ }
2249
+ },
2250
+ {
2251
+ types: ["attr-name", "variable"],
2252
+ style: {
2253
+ color: "rgb(156, 220, 254)"
2254
+ }
2255
+ },
2256
+ {
2257
+ types: ["deleted", "string", "attr-value", "template-punctuation"],
2258
+ style: {
2259
+ color: "rgb(206, 145, 120)"
2260
+ }
2261
+ },
2262
+ {
2263
+ types: ["selector"],
2264
+ style: {
2265
+ color: "rgb(215, 186, 125)"
2266
+ }
2267
+ },
2268
+ {
2269
+ // Fix tag color
2270
+ types: ["tag"],
2271
+ style: {
2272
+ color: "rgb(78, 201, 176)"
2273
+ }
2274
+ },
2275
+ {
2276
+ // Fix tag color for HTML
2277
+ types: ["tag"],
2278
+ languages: ["markup"],
2279
+ style: {
2280
+ color: "rgb(86, 156, 214)"
2281
+ }
2282
+ },
2283
+ {
2284
+ types: ["punctuation", "operator"],
2285
+ style: {
2286
+ color: "rgb(212, 212, 212)"
2287
+ }
2288
+ },
2289
+ {
2290
+ // Fix punctuation color for HTML
2291
+ types: ["punctuation"],
2292
+ languages: ["markup"],
2293
+ style: {
2294
+ color: "#808080"
2295
+ }
2296
+ },
2297
+ {
2298
+ types: ["function"],
2299
+ style: {
2300
+ color: "rgb(220, 220, 170)"
2301
+ }
2302
+ },
2303
+ {
2304
+ types: ["class-name"],
2305
+ style: {
2306
+ color: "rgb(78, 201, 176)"
2307
+ }
2308
+ },
2309
+ {
2310
+ types: ["char"],
2311
+ style: {
2312
+ color: "rgb(209, 105, 105)"
2313
+ }
2314
+ }
2315
+ ]
2316
+ };
2317
+ var vsDark_default = theme13;
2318
+
2319
+ // src/themes/vsLight.ts
2320
+ var theme14 = {
2321
+ plain: {
2322
+ color: "#000000",
2323
+ backgroundColor: "#ffffff"
2324
+ },
2325
+ styles: [
2326
+ {
2327
+ types: ["comment"],
2328
+ style: {
2329
+ color: "rgb(0, 128, 0)"
2330
+ }
2331
+ },
2332
+ {
2333
+ types: ["builtin"],
2334
+ style: {
2335
+ color: "rgb(0, 112, 193)"
2336
+ }
2337
+ },
2338
+ {
2339
+ types: ["number", "variable", "inserted"],
2340
+ style: {
2341
+ color: "rgb(9, 134, 88)"
2342
+ }
2343
+ },
2344
+ {
2345
+ types: ["operator"],
2346
+ style: {
2347
+ color: "rgb(0, 0, 0)"
2348
+ }
2349
+ },
2350
+ {
2351
+ types: ["constant", "char"],
2352
+ style: {
2353
+ color: "rgb(129, 31, 63)"
2354
+ }
2355
+ },
2356
+ {
2357
+ types: ["tag"],
2358
+ style: {
2359
+ color: "rgb(128, 0, 0)"
2360
+ }
2361
+ },
2362
+ {
2363
+ types: ["attr-name"],
2364
+ style: {
2365
+ color: "rgb(255, 0, 0)"
2366
+ }
2367
+ },
2368
+ {
2369
+ types: ["deleted", "string"],
2370
+ style: {
2371
+ color: "rgb(163, 21, 21)"
2372
+ }
2373
+ },
2374
+ {
2375
+ types: ["changed", "punctuation"],
2376
+ style: {
2377
+ color: "rgb(4, 81, 165)"
2378
+ }
2379
+ },
2380
+ {
2381
+ types: ["function", "keyword"],
2382
+ style: {
2383
+ color: "rgb(0, 0, 255)"
2384
+ }
2385
+ },
2386
+ {
2387
+ types: ["class-name"],
2388
+ style: {
2389
+ color: "rgb(38, 127, 153)"
2390
+ }
2391
+ }
2392
+ ]
2393
+ };
2394
+ var vsLight_default = theme14;
2395
+
2396
+ // src/themes/jettwaveDark.ts
2397
+ var theme15 = {
2398
+ plain: {
2399
+ color: "#f8fafc",
2400
+ backgroundColor: "#011627"
2401
+ },
2402
+ styles: [
2403
+ {
2404
+ types: ["prolog"],
2405
+ style: {
2406
+ color: "#000080"
2407
+ }
2408
+ },
2409
+ {
2410
+ types: ["comment"],
2411
+ style: {
2412
+ color: "#6A9955"
2413
+ }
2414
+ },
2415
+ {
2416
+ types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2417
+ style: {
2418
+ color: "#569CD6"
2419
+ }
2420
+ },
2421
+ {
2422
+ types: ["number", "inserted"],
2423
+ style: {
2424
+ color: "#B5CEA8"
2425
+ }
2426
+ },
2427
+ {
2428
+ types: ["constant"],
2429
+ style: {
2430
+ color: "#f8fafc"
2431
+ }
2432
+ },
2433
+ {
2434
+ types: ["attr-name", "variable"],
2435
+ style: {
2436
+ color: "#9CDCFE"
2437
+ }
2438
+ },
2439
+ {
2440
+ types: ["deleted", "string", "attr-value", "template-punctuation"],
2441
+ style: {
2442
+ color: "#cbd5e1"
2443
+ }
2444
+ },
2445
+ {
2446
+ types: ["selector"],
2447
+ style: {
2448
+ color: "#D7BA7D"
2449
+ }
2450
+ },
2451
+ {
2452
+ types: ["tag"],
2453
+ style: {
2454
+ color: "#0ea5e9"
2455
+ }
2456
+ },
2457
+ {
2458
+ types: ["tag"],
2459
+ languages: ["markup"],
2460
+ style: {
2461
+ color: "#0ea5e9"
2462
+ }
2463
+ },
2464
+ {
2465
+ types: ["punctuation", "operator"],
2466
+ style: {
2467
+ color: "#D4D4D4"
2468
+ }
2469
+ },
2470
+ {
2471
+ types: ["punctuation"],
2472
+ languages: ["markup"],
2473
+ style: {
2474
+ color: "#808080"
2475
+ }
2476
+ },
2477
+ {
2478
+ types: ["function"],
2479
+ style: {
2480
+ color: "#7dd3fc"
2481
+ }
2482
+ },
2483
+ {
2484
+ types: ["class-name"],
2485
+ style: {
2486
+ color: "#0ea5e9"
2487
+ }
2488
+ },
2489
+ {
2490
+ types: ["char"],
2491
+ style: {
2492
+ color: "#D16969"
2493
+ }
2494
+ }
2495
+ ]
2496
+ };
2497
+ var jettwaveDark_default = theme15;
2498
+
2499
+ // src/themes/jettwaveLight.ts
2500
+ var theme16 = {
2501
+ plain: {
2502
+ color: "#0f172a",
2503
+ backgroundColor: "#f1f5f9"
2504
+ },
2505
+ styles: [
2506
+ {
2507
+ types: ["prolog"],
2508
+ style: {
2509
+ color: "#000080"
2510
+ }
2511
+ },
2512
+ {
2513
+ types: ["comment"],
2514
+ style: {
2515
+ color: "#6A9955"
2516
+ }
2517
+ },
2518
+ {
2519
+ types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
2520
+ style: {
2521
+ color: "#0c4a6e"
2522
+ }
2523
+ },
2524
+ {
2525
+ types: ["number", "inserted"],
2526
+ style: {
2527
+ color: "#B5CEA8"
2528
+ }
2529
+ },
2530
+ {
2531
+ types: ["constant"],
2532
+ style: {
2533
+ color: "#0f172a"
2534
+ }
2535
+ },
2536
+ {
2537
+ types: ["attr-name", "variable"],
2538
+ style: {
2539
+ color: "#0c4a6e"
2540
+ }
2541
+ },
2542
+ {
2543
+ types: ["deleted", "string", "attr-value", "template-punctuation"],
2544
+ style: {
2545
+ color: "#64748b"
2546
+ }
2547
+ },
2548
+ {
2549
+ types: ["selector"],
2550
+ style: {
2551
+ color: "#D7BA7D"
2552
+ }
2553
+ },
2554
+ {
2555
+ types: ["tag"],
2556
+ style: {
2557
+ color: "#0ea5e9"
2558
+ }
2559
+ },
2560
+ {
2561
+ types: ["tag"],
2562
+ languages: ["markup"],
2563
+ style: {
2564
+ color: "#0ea5e9"
2565
+ }
2566
+ },
2567
+ {
2568
+ types: ["punctuation", "operator"],
2569
+ style: {
2570
+ color: "#475569"
2571
+ }
2572
+ },
2573
+ {
2574
+ types: ["punctuation"],
2575
+ languages: ["markup"],
2576
+ style: {
2577
+ color: "#808080"
2578
+ }
2579
+ },
2580
+ {
2581
+ types: ["function"],
2582
+ style: {
2583
+ color: "#0e7490"
2584
+ }
2585
+ },
2586
+ {
2587
+ types: ["class-name"],
2588
+ style: {
2589
+ color: "#0ea5e9"
2590
+ }
2591
+ },
2592
+ {
2593
+ types: ["char"],
2594
+ style: {
2595
+ color: "#D16969"
2596
+ }
2597
+ }
2598
+ ]
2599
+ };
2600
+ var jettwaveLight_default = theme16;
2601
+
2602
+ // src/themes/oneDark.ts
2603
+ var theme17 = {
2604
+ plain: {
2605
+ backgroundColor: "hsl(220, 13%, 18%)",
2606
+ color: "hsl(220, 14%, 71%)",
2607
+ textShadow: "0 1px rgba(0, 0, 0, 0.3)"
2608
+ },
2609
+ styles: [
2610
+ {
2611
+ types: ["comment", "prolog", "cdata"],
2612
+ style: {
2613
+ color: "hsl(220, 10%, 40%)"
2614
+ }
2615
+ },
2616
+ {
2617
+ types: ["doctype", "punctuation", "entity"],
2618
+ style: {
2619
+ color: "hsl(220, 14%, 71%)"
2620
+ }
2621
+ },
2622
+ {
2623
+ types: [
2624
+ "attr-name",
2625
+ "class-name",
2626
+ "maybe-class-name",
2627
+ "boolean",
2628
+ "constant",
2629
+ "number",
2630
+ "atrule"
2631
+ ],
2632
+ style: { color: "hsl(29, 54%, 61%)" }
2633
+ },
2634
+ {
2635
+ types: ["keyword"],
2636
+ style: { color: "hsl(286, 60%, 67%)" }
2637
+ },
2638
+ {
2639
+ types: ["property", "tag", "symbol", "deleted", "important"],
2640
+ style: {
2641
+ color: "hsl(355, 65%, 65%)"
2642
+ }
2643
+ },
2644
+ {
2645
+ types: [
2646
+ "selector",
2647
+ "string",
2648
+ "char",
2649
+ "builtin",
2650
+ "inserted",
2651
+ "regex",
2652
+ "attr-value"
2653
+ ],
2654
+ style: {
2655
+ color: "hsl(95, 38%, 62%)"
2656
+ }
2657
+ },
2658
+ {
2659
+ types: ["variable", "operator", "function"],
2660
+ style: {
2661
+ color: "hsl(207, 82%, 66%)"
2662
+ }
2663
+ },
2664
+ {
2665
+ types: ["url"],
2666
+ style: {
2667
+ color: "hsl(187, 47%, 55%)"
2668
+ }
2669
+ },
2670
+ {
2671
+ types: ["deleted"],
2672
+ style: {
2673
+ textDecorationLine: "line-through"
2674
+ }
2675
+ },
2676
+ {
2677
+ types: ["inserted"],
2678
+ style: {
2679
+ textDecorationLine: "underline"
2680
+ }
2681
+ },
2682
+ {
2683
+ types: ["italic"],
2684
+ style: {
2685
+ fontStyle: "italic"
2686
+ }
2687
+ },
2688
+ {
2689
+ types: ["important", "bold"],
2690
+ style: {
2691
+ fontWeight: "bold"
2692
+ }
2693
+ },
2694
+ {
2695
+ types: ["important"],
2696
+ style: {
2697
+ color: "hsl(220, 14%, 71%)"
2698
+ }
2699
+ }
2700
+ ]
2701
+ };
2702
+ var oneDark_default = theme17;
2703
+
2704
+ // src/themes/oneLight.ts
2705
+ var theme18 = {
2706
+ plain: {
2707
+ backgroundColor: "hsl(230, 1%, 98%)",
2708
+ color: "hsl(230, 8%, 24%)"
2709
+ },
2710
+ styles: [
2711
+ {
2712
+ types: ["comment", "prolog", "cdata"],
2713
+ style: {
2714
+ color: "hsl(230, 4%, 64%)"
2715
+ }
2716
+ },
2717
+ {
2718
+ types: ["doctype", "punctuation", "entity"],
2719
+ style: {
2720
+ color: "hsl(230, 8%, 24%)"
2721
+ }
2722
+ },
2723
+ {
2724
+ types: [
2725
+ "attr-name",
2726
+ "class-name",
2727
+ "boolean",
2728
+ "constant",
2729
+ "number",
2730
+ "atrule"
2731
+ ],
2732
+ style: {
2733
+ color: "hsl(35, 99%, 36%)"
2734
+ }
2735
+ },
2736
+ {
2737
+ types: ["keyword"],
2738
+ style: {
2739
+ color: "hsl(301, 63%, 40%)"
2740
+ }
2741
+ },
2742
+ {
2743
+ types: ["property", "tag", "symbol", "deleted", "important"],
2744
+ style: {
2745
+ color: "hsl(5, 74%, 59%)"
2746
+ }
2747
+ },
2748
+ {
2749
+ types: [
2750
+ "selector",
2751
+ "string",
2752
+ "char",
2753
+ "builtin",
2754
+ "inserted",
2755
+ "regex",
2756
+ "attr-value",
2757
+ "punctuation"
2758
+ ],
2759
+ style: {
2760
+ color: "hsl(119, 34%, 47%)"
2761
+ }
2762
+ },
2763
+ {
2764
+ types: ["variable", "operator", "function"],
2765
+ style: {
2766
+ color: "hsl(221, 87%, 60%)"
2767
+ }
2768
+ },
2769
+ {
2770
+ types: ["url"],
2771
+ style: {
2772
+ color: "hsl(198, 99%, 37%)"
2773
+ }
2774
+ },
2775
+ {
2776
+ types: ["deleted"],
2777
+ style: {
2778
+ textDecorationLine: "line-through"
2779
+ }
2780
+ },
2781
+ {
2782
+ types: ["inserted"],
2783
+ style: {
2784
+ textDecorationLine: "underline"
2785
+ }
2786
+ },
2787
+ {
2788
+ types: ["italic"],
2789
+ style: {
2790
+ fontStyle: "italic"
2791
+ }
2792
+ },
2793
+ {
2794
+ types: ["important", "bold"],
2795
+ style: {
2796
+ fontWeight: "bold"
2797
+ }
2798
+ },
2799
+ {
2800
+ types: ["important"],
2801
+ style: {
2802
+ color: "hsl(230, 8%, 24%)"
2803
+ }
2804
+ }
2805
+ ]
2806
+ };
2807
+ var oneLight_default = theme18;
2808
+
2809
+ // src/themes/gruvboxMaterialDark.ts
2810
+ var theme19 = {
2811
+ plain: {
2812
+ color: "#ebdbb2",
2813
+ backgroundColor: "#292828"
2814
+ },
2815
+ styles: [
2816
+ {
2817
+ types: [
2818
+ "imports",
2819
+ "class-name",
2820
+ "maybe-class-name",
2821
+ "constant",
2822
+ "doctype",
2823
+ "builtin",
2824
+ "function"
2825
+ ],
2826
+ style: {
2827
+ color: "#d8a657"
2828
+ }
2829
+ },
2830
+ {
2831
+ types: ["property-access"],
2832
+ style: {
2833
+ color: "#7daea3"
2834
+ }
2835
+ },
2836
+ {
2837
+ types: ["tag"],
2838
+ style: {
2839
+ color: "#e78a4e"
2840
+ }
2841
+ },
2842
+ {
2843
+ types: ["attr-name", "char", "url", "regex"],
2844
+ style: {
2845
+ color: "#a9b665"
2846
+ }
2847
+ },
2848
+ {
2849
+ types: ["attr-value", "string"],
2850
+ style: {
2851
+ color: "#89b482"
2852
+ }
2853
+ },
2854
+ {
2855
+ types: ["comment", "prolog", "cdata", "operator", "inserted"],
2856
+ style: {
2857
+ color: "#a89984"
2858
+ }
2859
+ },
2860
+ {
2861
+ types: [
2862
+ "delimiter",
2863
+ "boolean",
2864
+ "keyword",
2865
+ "selector",
2866
+ "important",
2867
+ "atrule",
2868
+ "property",
2869
+ "variable",
2870
+ "deleted"
2871
+ ],
2872
+ style: {
2873
+ color: "#ea6962"
2874
+ }
2875
+ },
2876
+ {
2877
+ types: ["entity", "number", "symbol"],
2878
+ style: {
2879
+ color: "#d3869b"
2880
+ }
2881
+ }
2882
+ ]
2883
+ };
2884
+ var gruvboxMaterialDark_default = theme19;
2885
+
2886
+ // src/themes/gruvboxMaterialLight.ts
2887
+ var theme20 = {
2888
+ plain: {
2889
+ color: "#654735",
2890
+ backgroundColor: "#f9f5d7"
2891
+ },
2892
+ styles: [
2893
+ {
2894
+ types: [
2895
+ "delimiter",
2896
+ "boolean",
2897
+ "keyword",
2898
+ "selector",
2899
+ "important",
2900
+ "atrule",
2901
+ "property",
2902
+ "variable",
2903
+ "deleted"
2904
+ ],
2905
+ style: {
2906
+ color: "#af2528"
2907
+ }
2908
+ },
2909
+ {
2910
+ types: [
2911
+ "imports",
2912
+ "class-name",
2913
+ "maybe-class-name",
2914
+ "constant",
2915
+ "doctype",
2916
+ "builtin"
2917
+ ],
2918
+ style: {
2919
+ color: "#b4730e"
2920
+ }
2921
+ },
2922
+ {
2923
+ types: ["string", "attr-value"],
2924
+ style: {
2925
+ color: "#477a5b"
2926
+ }
2927
+ },
2928
+ {
2929
+ types: ["property-access"],
2930
+ style: {
2931
+ color: "#266b79"
2932
+ }
2933
+ },
2934
+ {
2935
+ types: ["function", "attr-name", "char", "url"],
2936
+ style: {
2937
+ color: "#72761e"
2938
+ }
2939
+ },
2940
+ {
2941
+ types: ["tag"],
2942
+ style: {
2943
+ color: "#b94c07"
2944
+ }
2945
+ },
2946
+ {
2947
+ types: ["comment", "prolog", "cdata", "operator", "inserted"],
2948
+ style: {
2949
+ color: "#a89984"
2950
+ }
2951
+ },
2952
+ {
2953
+ types: ["entity", "number", "symbol"],
2954
+ style: {
2955
+ color: "#924f79"
2956
+ }
2957
+ }
2958
+ ]
2959
+ };
2960
+ var gruvboxMaterialLight_default = theme20;
2961
+ var useGetLineProps = (themeDictionary) => useCallback(
2962
+ (_a) => {
2963
+ var _b = _a, { className, style, line } = _b, rest = __objRest(_b, ["className", "style", "line"]);
2964
+ const output = __spreadProps(__spreadValues({}, rest), {
2965
+ className: clsx("token-line", className)
2966
+ });
2967
+ if (typeof themeDictionary === "object" && "plain" in themeDictionary)
2968
+ output.style = themeDictionary.plain;
2969
+ if (typeof style === "object")
2970
+ output.style = __spreadValues(__spreadValues({}, output.style || {}), style);
2971
+ return output;
2972
+ },
2973
+ [themeDictionary]
2974
+ );
2975
+ var useGetTokenProps = (themeDictionary) => {
2976
+ const styleForToken = useCallback(
2977
+ ({ types, empty }) => {
2978
+ if (themeDictionary == null)
2979
+ return void 0;
2980
+ else if (types.length === 1 && types[0] === "plain") {
2981
+ return empty != null ? { display: "inline-block" } : void 0;
2982
+ } else if (types.length === 1 && empty != null) {
2983
+ return themeDictionary[types[0]];
2984
+ }
2985
+ return Object.assign(
2986
+ empty != null ? { display: "inline-block" } : {},
2987
+ ...types.map((type) => themeDictionary[type])
2988
+ );
2989
+ },
2990
+ [themeDictionary]
2991
+ );
2992
+ return useCallback(
2993
+ (_a) => {
2994
+ var _b = _a, { token, className, style } = _b, rest = __objRest(_b, ["token", "className", "style"]);
2995
+ const output = __spreadProps(__spreadValues({}, rest), {
2996
+ className: clsx("token", ...token.types, className),
2997
+ children: token.content,
2998
+ style: styleForToken(token)
2999
+ });
3000
+ if (style != null) {
3001
+ output.style = __spreadValues(__spreadValues({}, output.style || {}), style);
3002
+ }
3003
+ return output;
3004
+ },
3005
+ [styleForToken]
3006
+ );
3007
+ };
3008
+
3009
+ // src/utils/normalizeTokens.ts
3010
+ var newlineRe = /\r\n|\r|\n/;
3011
+ var normalizeEmptyLines = (line) => {
3012
+ if (line.length === 0) {
3013
+ line.push({
3014
+ types: ["plain"],
3015
+ content: "\n",
3016
+ empty: true
3017
+ });
3018
+ } else if (line.length === 1 && line[0].content === "") {
3019
+ line[0].content = "\n";
3020
+ line[0].empty = true;
3021
+ }
3022
+ };
3023
+ var appendTypes = (types, add) => {
3024
+ const typesSize = types.length;
3025
+ if (typesSize > 0 && types[typesSize - 1] === add) {
3026
+ return types;
3027
+ }
3028
+ return types.concat(add);
3029
+ };
3030
+ var normalizeTokens = (tokens) => {
3031
+ const typeArrStack = [[]];
3032
+ const tokenArrStack = [tokens];
3033
+ const tokenArrIndexStack = [0];
3034
+ const tokenArrSizeStack = [tokens.length];
3035
+ let i = 0;
3036
+ let stackIndex = 0;
3037
+ let currentLine = [];
3038
+ const acc = [currentLine];
3039
+ while (stackIndex > -1) {
3040
+ while ((i = tokenArrIndexStack[stackIndex]++) < tokenArrSizeStack[stackIndex]) {
3041
+ let content;
3042
+ let types = typeArrStack[stackIndex];
3043
+ const tokenArr = tokenArrStack[stackIndex];
3044
+ const token = tokenArr[i];
3045
+ if (typeof token === "string") {
3046
+ types = stackIndex > 0 ? types : ["plain"];
3047
+ content = token;
3048
+ } else {
3049
+ types = appendTypes(types, token.type);
3050
+ if (token.alias) {
3051
+ types = appendTypes(types, token.alias);
3052
+ }
3053
+ content = token.content;
3054
+ }
3055
+ if (typeof content !== "string") {
3056
+ stackIndex++;
3057
+ typeArrStack.push(types);
3058
+ tokenArrStack.push(content);
3059
+ tokenArrIndexStack.push(0);
3060
+ tokenArrSizeStack.push(content.length);
3061
+ continue;
3062
+ }
3063
+ const splitByNewlines = content.split(newlineRe);
3064
+ const newlineCount = splitByNewlines.length;
3065
+ currentLine.push({
3066
+ types,
3067
+ content: splitByNewlines[0]
3068
+ });
3069
+ for (let i2 = 1; i2 < newlineCount; i2++) {
3070
+ normalizeEmptyLines(currentLine);
3071
+ acc.push(currentLine = []);
3072
+ currentLine.push({
3073
+ types,
3074
+ content: splitByNewlines[i2]
3075
+ });
3076
+ }
3077
+ }
3078
+ stackIndex--;
3079
+ typeArrStack.pop();
3080
+ tokenArrStack.pop();
3081
+ tokenArrIndexStack.pop();
3082
+ tokenArrSizeStack.pop();
3083
+ }
3084
+ normalizeEmptyLines(currentLine);
3085
+ return acc;
3086
+ };
3087
+ var normalizeTokens_default = normalizeTokens;
3088
+ var useTokenize = ({ prism, code, grammar, language }) => {
3089
+ return useMemo(() => {
3090
+ if (grammar == null)
3091
+ return normalizeTokens_default([code]);
3092
+ const prismConfig = {
3093
+ code,
3094
+ grammar,
3095
+ language,
3096
+ tokens: []
3097
+ };
3098
+ prism.hooks.run("before-tokenize", prismConfig);
3099
+ prismConfig.tokens = prism.tokenize(code, grammar);
3100
+ prism.hooks.run("after-tokenize", prismConfig);
3101
+ return normalizeTokens_default(prismConfig.tokens);
3102
+ }, [
3103
+ code,
3104
+ grammar,
3105
+ language,
3106
+ // prism is a stable import
3107
+ prism
3108
+ ]);
3109
+ };
3110
+
3111
+ // src/utils/themeToDict.ts
3112
+ var themeToDict = (theme21, language) => {
3113
+ const { plain } = theme21;
3114
+ const themeDict = theme21.styles.reduce((acc, themeEntry) => {
3115
+ const { languages: languages2, style } = themeEntry;
3116
+ if (languages2 && !languages2.includes(language)) {
3117
+ return acc;
3118
+ }
3119
+ themeEntry.types.forEach((type) => {
3120
+ const accStyle = __spreadValues(__spreadValues({}, acc[type]), style);
3121
+ acc[type] = accStyle;
3122
+ });
3123
+ return acc;
3124
+ }, {});
3125
+ themeDict.root = plain;
3126
+ themeDict.plain = __spreadProps(__spreadValues({}, plain), { backgroundColor: void 0 });
3127
+ return themeDict;
3128
+ };
3129
+ var themeToDict_default = themeToDict;
3130
+
3131
+ // src/components/highlight.ts
3132
+ var Highlight = ({
3133
+ children,
3134
+ language: _language,
3135
+ code,
3136
+ theme: theme21,
3137
+ prism
3138
+ }) => {
3139
+ const language = _language.toLowerCase();
3140
+ const themeDictionary = themeToDict_default(theme21, language);
3141
+ const getLineProps = useGetLineProps(themeDictionary);
3142
+ const getTokenProps = useGetTokenProps(themeDictionary);
3143
+ const grammar = prism.languages[language];
3144
+ const tokens = useTokenize({ prism, language, code, grammar });
3145
+ return children({
3146
+ tokens,
3147
+ className: `prism-code language-${language}`,
3148
+ style: themeDictionary != null ? themeDictionary.root : {},
3149
+ getLineProps,
3150
+ getTokenProps
3151
+ });
3152
+ };
3153
+
3154
+ // src/index.ts
3155
+ var Highlight2 = (props) => createElement(Highlight, __spreadProps(__spreadValues({}, props), {
3156
+ prism: props.prism || Prism,
3157
+ theme: props.theme || vsDark_default,
3158
+ code: props.code,
3159
+ language: props.language
3160
+ }));
3161
+ /*! Bundled license information:
3162
+
3163
+ prismjs/prism.js:
3164
+ (**
3165
+ * Prism: Lightweight, robust, elegant syntax highlighting
3166
+ *
3167
+ * @license MIT <https://opensource.org/licenses/MIT>
3168
+ * @author Lea Verou <https://lea.verou.me>
3169
+ * @namespace
3170
+ * @public
3171
+ *)
3172
+ */
3173
+
3174
+ function CodeModal({ filename, sourceData, onClose }) {
3175
+ const context = useContext(SpotlightContext);
3176
+ const [copied, setCopied] = useState(false);
3177
+ if (!context)
3178
+ return null;
3179
+ const { repoUrl, theme } = context;
3180
+ // Close on ESC key
3181
+ useEffect(() => {
3182
+ const handler = (e) => {
3183
+ if (e.key === 'Escape') {
3184
+ onClose();
3185
+ }
3186
+ };
3187
+ window.addEventListener('keydown', handler);
3188
+ return () => window.removeEventListener('keydown', handler);
3189
+ }, [onClose]);
3190
+ const copyToClipboard = async () => {
3191
+ try {
3192
+ await navigator.clipboard.writeText(sourceData.code);
3193
+ setCopied(true);
3194
+ setTimeout(() => setCopied(false), 2000);
3195
+ }
3196
+ catch (error) {
3197
+ console.error('[Spotlight] Failed to copy:', error);
3198
+ }
3199
+ };
3200
+ const isCleanCode = sourceData.lines < 100;
3201
+ // Determine file extension for syntax highlighting
3202
+ const getLanguage = (filename) => {
3203
+ if (filename.endsWith('.tsx'))
3204
+ return 'tsx';
3205
+ if (filename.endsWith('.ts'))
3206
+ return 'typescript';
3207
+ if (filename.endsWith('.jsx'))
3208
+ return 'jsx';
3209
+ return 'javascript';
3210
+ };
3211
+ return (React.createElement("div", { className: "spotlight-modal-backdrop", onClick: onClose },
3212
+ React.createElement("div", { className: "spotlight-modal", onClick: e => e.stopPropagation() },
3213
+ React.createElement("div", { className: "spotlight-modal-header" },
3214
+ React.createElement("div", { className: "spotlight-modal-title" },
3215
+ React.createElement("h3", null, filename),
3216
+ React.createElement("p", { className: "spotlight-modal-meta" },
3217
+ sourceData.lines,
3218
+ " lines \u00B7 ",
3219
+ (sourceData.size / 1024).toFixed(1),
3220
+ ' ',
3221
+ "KB")),
3222
+ React.createElement("div", { className: "spotlight-modal-header-actions" },
3223
+ isCleanCode && (React.createElement("span", { className: "clean-code-badge" }, "\u2728 Clean & Modular")),
3224
+ React.createElement("button", { className: "spotlight-modal-close", onClick: onClose, "aria-label": "Close modal" }, "\u2715"))),
3225
+ React.createElement("div", { className: "spotlight-actions" },
3226
+ React.createElement("button", { className: "spotlight-action-btn", onClick: copyToClipboard, disabled: copied }, copied ? '✓ Copied!' : '📋 Copy Code'),
3227
+ repoUrl && (React.createElement("a", { href: `${repoUrl}/blob/main/${filename}`, target: "_blank", rel: "noopener noreferrer", className: "spotlight-action-btn spotlight-action-link" }, "\uD83D\uDD17 View on GitHub"))),
3228
+ React.createElement("div", { className: "spotlight-code-container" },
3229
+ React.createElement(Highlight2, { theme: theme === 'dark' ? themes_exports.nightOwl : themes_exports.github, code: sourceData.code, language: getLanguage(filename) }, ({ style, tokens, getLineProps, getTokenProps }) => (React.createElement("pre", { style: style, className: "spotlight-code-pre" }, tokens.map((line, i) => (React.createElement("div", { key: i, ...getLineProps({ line }) },
3230
+ React.createElement("span", { className: "line-number" }, i + 1),
3231
+ React.createElement("span", { className: "line-content" }, line.map((token, key) => (React.createElement("span", { key: key, ...getTokenProps({ token }) }))))))))))))));
3232
+ }
3233
+
3234
+ function Spotlight({ filename, children }) {
3235
+ const context = useContext(SpotlightContext);
3236
+ const [isHovered, setIsHovered] = useState(false);
3237
+ const [showModal, setShowModal] = useState(false);
3238
+ // If context is not available or DevMode is OFF, render normally
3239
+ if (!context || !context.isDevMode) {
3240
+ return React.createElement(React.Fragment, null, children);
3241
+ }
3242
+ const { sourceMap } = context;
3243
+ const sourceData = sourceMap[filename];
3244
+ // Warn if source data not found
3245
+ if (!sourceData && isHovered) {
3246
+ console.warn(`[Spotlight] No source data found for: ${filename}`);
3247
+ }
3248
+ return (React.createElement(React.Fragment, null,
3249
+ React.createElement("div", { className: "spotlight-wrapper", onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: () => {
3250
+ if (sourceData) {
3251
+ setShowModal(true);
3252
+ }
3253
+ }, style: {
3254
+ position: 'relative',
3255
+ outline: isHovered ? '2px dashed #00ff88' : 'none',
3256
+ outlineOffset: '4px',
3257
+ cursor: isHovered && sourceData ? 'pointer' : 'default',
3258
+ transition: 'outline 0.2s ease',
3259
+ } },
3260
+ children,
3261
+ isHovered && (React.createElement("div", { className: "spotlight-badge" },
3262
+ "\uD83D\uDCC4 ",
3263
+ filename,
3264
+ !sourceData && ' (not found)'))),
3265
+ showModal && sourceData && (React.createElement(CodeModal, { filename: filename, sourceData: sourceData, onClose: () => setShowModal(false) }))));
3266
+ }
3267
+
3268
+ function DevModeToggle({ position = 'bottom-right', }) {
3269
+ const context = useContext(SpotlightContext);
3270
+ if (!context) {
3271
+ console.warn('[Spotlight] DevModeToggle must be used within SpotlightProvider');
3272
+ return null;
3273
+ }
3274
+ const { isDevMode, setIsDevMode } = context;
3275
+ return (React.createElement("button", { className: `spotlight-toggle spotlight-toggle-${position}`, onClick: () => setIsDevMode(!isDevMode), "aria-label": isDevMode ? 'Disable Developer Mode' : 'Enable Developer Mode', title: `${isDevMode ? 'Disable' : 'Enable'} Developer Mode (Ctrl+Shift+D)` }, isDevMode ? '👨‍💻 Dev Mode ON' : '👁️ View Code'));
3276
+ }
3277
+
3278
+ function useSourceSpotlight() {
3279
+ const context = useContext(SpotlightContext);
3280
+ if (!context) {
3281
+ throw new Error('useSourceSpotlight must be used within a SpotlightProvider');
3282
+ }
3283
+ return {
3284
+ isDevMode: context.isDevMode,
3285
+ toggleDevMode: () => context.setIsDevMode(!context.isDevMode),
3286
+ enableDevMode: () => context.setIsDevMode(true),
3287
+ disableDevMode: () => context.setIsDevMode(false),
3288
+ getSourceCode: (filename) => context.sourceMap[filename],
3289
+ sourceMap: context.sourceMap,
3290
+ hasSourceMap: Object.keys(context.sourceMap).length > 0,
3291
+ };
3292
+ }
3293
+
3294
+ export { DevModeToggle, Spotlight, SpotlightProvider, useSourceSpotlight };
3295
+ //# sourceMappingURL=index.esm.js.map