Add loan-advisor-chatgpt-app (part 9)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- loan-advisor-chatgpt-app/node_modules/refractor/lang/hpkp.js +25 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/hsts.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/hsts.js +24 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/http.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/http.js +164 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ichigojam.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ichigojam.js +27 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/icon.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/icon.js +33 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/icu-message-format.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/icu-message-format.js +164 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/idris.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/idris.js +30 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/iecst.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/iecst.js +46 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ignore.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ignore.js +31 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/inform7.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/inform7.js +77 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ini.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/ini.js +52 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/io.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/io.js +35 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/j.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/j.js +41 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/java.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/java.js +163 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoc.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoc.js +108 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoclike.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoclike.js +94 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javascript.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javascript.js +195 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javastacktrace.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/javastacktrace.js +149 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jexl.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jexl.js +26 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jolie.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jolie.js +58 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jq.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jq.js +80 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/js-extras.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/js-extras.js +160 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/js-templates.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/js-templates.js +366 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jsdoc.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/jsdoc.js +102 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/json.d.ts +7 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/json.js +36 -0
- loan-advisor-chatgpt-app/node_modules/refractor/lang/json5.d.ts +7 -0
loan-advisor-chatgpt-app/node_modules/refractor/lang/hpkp.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
hpkp.displayName = 'hpkp'
|
| 6 |
+
hpkp.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function hpkp(Prism) {
|
| 10 |
+
/**
|
| 11 |
+
* Original by Scott Helme.
|
| 12 |
+
*
|
| 13 |
+
* Reference: https://scotthelme.co.uk/hpkp-cheat-sheet/
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
Prism.languages.hpkp = {
|
| 17 |
+
directive: {
|
| 18 |
+
pattern:
|
| 19 |
+
/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,
|
| 20 |
+
alias: 'property'
|
| 21 |
+
},
|
| 22 |
+
operator: /=/,
|
| 23 |
+
punctuation: /;/
|
| 24 |
+
}
|
| 25 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/hsts.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function hsts(Prism: any): void;
|
| 3 |
+
declare namespace hsts {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default hsts;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/hsts.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
hsts.displayName = 'hsts'
|
| 6 |
+
hsts.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function hsts(Prism) {
|
| 10 |
+
/**
|
| 11 |
+
* Original by Scott Helme.
|
| 12 |
+
*
|
| 13 |
+
* Reference: https://scotthelme.co.uk/hsts-cheat-sheet/
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
Prism.languages.hsts = {
|
| 17 |
+
directive: {
|
| 18 |
+
pattern: /\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,
|
| 19 |
+
alias: 'property'
|
| 20 |
+
},
|
| 21 |
+
operator: /=/,
|
| 22 |
+
punctuation: /;/
|
| 23 |
+
}
|
| 24 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/http.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function http(Prism: any): void;
|
| 3 |
+
declare namespace http {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default http;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/http.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
http.displayName = 'http'
|
| 6 |
+
http.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function http(Prism) {
|
| 10 |
+
;(function (Prism) {
|
| 11 |
+
/**
|
| 12 |
+
* @param {string} name
|
| 13 |
+
* @returns {RegExp}
|
| 14 |
+
*/
|
| 15 |
+
function headerValueOf(name) {
|
| 16 |
+
return RegExp('(^(?:' + name + '):[ \t]*(?![ \t]))[^]+', 'i')
|
| 17 |
+
}
|
| 18 |
+
Prism.languages.http = {
|
| 19 |
+
'request-line': {
|
| 20 |
+
pattern:
|
| 21 |
+
/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,
|
| 22 |
+
inside: {
|
| 23 |
+
// HTTP Method
|
| 24 |
+
method: {
|
| 25 |
+
pattern: /^[A-Z]+\b/,
|
| 26 |
+
alias: 'property'
|
| 27 |
+
},
|
| 28 |
+
// Request Target e.g. http://example.com, /path/to/file
|
| 29 |
+
'request-target': {
|
| 30 |
+
pattern: /^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,
|
| 31 |
+
lookbehind: true,
|
| 32 |
+
alias: 'url',
|
| 33 |
+
inside: Prism.languages.uri
|
| 34 |
+
},
|
| 35 |
+
// HTTP Version
|
| 36 |
+
'http-version': {
|
| 37 |
+
pattern: /^(\s)HTTP\/[\d.]+/,
|
| 38 |
+
lookbehind: true,
|
| 39 |
+
alias: 'property'
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
'response-status': {
|
| 44 |
+
pattern: /^HTTP\/[\d.]+ \d+ .+/m,
|
| 45 |
+
inside: {
|
| 46 |
+
// HTTP Version
|
| 47 |
+
'http-version': {
|
| 48 |
+
pattern: /^HTTP\/[\d.]+/,
|
| 49 |
+
alias: 'property'
|
| 50 |
+
},
|
| 51 |
+
// Status Code
|
| 52 |
+
'status-code': {
|
| 53 |
+
pattern: /^(\s)\d+(?=\s)/,
|
| 54 |
+
lookbehind: true,
|
| 55 |
+
alias: 'number'
|
| 56 |
+
},
|
| 57 |
+
// Reason Phrase
|
| 58 |
+
'reason-phrase': {
|
| 59 |
+
pattern: /^(\s).+/,
|
| 60 |
+
lookbehind: true,
|
| 61 |
+
alias: 'string'
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
header: {
|
| 66 |
+
pattern: /^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,
|
| 67 |
+
inside: {
|
| 68 |
+
'header-value': [
|
| 69 |
+
{
|
| 70 |
+
pattern: headerValueOf(/Content-Security-Policy/.source),
|
| 71 |
+
lookbehind: true,
|
| 72 |
+
alias: ['csp', 'languages-csp'],
|
| 73 |
+
inside: Prism.languages.csp
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
pattern: headerValueOf(/Public-Key-Pins(?:-Report-Only)?/.source),
|
| 77 |
+
lookbehind: true,
|
| 78 |
+
alias: ['hpkp', 'languages-hpkp'],
|
| 79 |
+
inside: Prism.languages.hpkp
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
pattern: headerValueOf(/Strict-Transport-Security/.source),
|
| 83 |
+
lookbehind: true,
|
| 84 |
+
alias: ['hsts', 'languages-hsts'],
|
| 85 |
+
inside: Prism.languages.hsts
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
pattern: headerValueOf(/[^:]+/.source),
|
| 89 |
+
lookbehind: true
|
| 90 |
+
}
|
| 91 |
+
],
|
| 92 |
+
'header-name': {
|
| 93 |
+
pattern: /^[^:]+/,
|
| 94 |
+
alias: 'keyword'
|
| 95 |
+
},
|
| 96 |
+
punctuation: /^:/
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
// Create a mapping of Content-Type headers to language definitions
|
| 102 |
+
var langs = Prism.languages
|
| 103 |
+
var httpLanguages = {
|
| 104 |
+
'application/javascript': langs.javascript,
|
| 105 |
+
'application/json': langs.json || langs.javascript,
|
| 106 |
+
'application/xml': langs.xml,
|
| 107 |
+
'text/xml': langs.xml,
|
| 108 |
+
'text/html': langs.html,
|
| 109 |
+
'text/css': langs.css,
|
| 110 |
+
'text/plain': langs.plain
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
// Declare which types can also be suffixes
|
| 114 |
+
var suffixTypes = {
|
| 115 |
+
'application/json': true,
|
| 116 |
+
'application/xml': true
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
/**
|
| 120 |
+
* Returns a pattern for the given content type which matches it and any type which has it as a suffix.
|
| 121 |
+
*
|
| 122 |
+
* @param {string} contentType
|
| 123 |
+
* @returns {string}
|
| 124 |
+
*/
|
| 125 |
+
function getSuffixPattern(contentType) {
|
| 126 |
+
var suffix = contentType.replace(/^[a-z]+\//, '')
|
| 127 |
+
var suffixPattern = '\\w+/(?:[\\w.-]+\\+)+' + suffix + '(?![+\\w.-])'
|
| 128 |
+
return '(?:' + contentType + '|' + suffixPattern + ')'
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
// Insert each content type parser that has its associated language
|
| 132 |
+
// currently loaded.
|
| 133 |
+
var options
|
| 134 |
+
for (var contentType in httpLanguages) {
|
| 135 |
+
if (httpLanguages[contentType]) {
|
| 136 |
+
options = options || {}
|
| 137 |
+
var pattern = suffixTypes[contentType]
|
| 138 |
+
? getSuffixPattern(contentType)
|
| 139 |
+
: contentType
|
| 140 |
+
options[contentType.replace(/\//g, '-')] = {
|
| 141 |
+
pattern: RegExp(
|
| 142 |
+
'(' +
|
| 143 |
+
/content-type:\s*/.source +
|
| 144 |
+
pattern +
|
| 145 |
+
/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source +
|
| 146 |
+
')' +
|
| 147 |
+
// This is a little interesting:
|
| 148 |
+
// The HTTP format spec required 1 empty line before the body to make everything unambiguous.
|
| 149 |
+
// However, when writing code by hand (e.g. to display on a website) people can forget about this,
|
| 150 |
+
// so we want to be liberal here. We will allow the empty line to be omitted if the first line of
|
| 151 |
+
// the body does not start with a [\w-] character (as headers do).
|
| 152 |
+
/[^ \t\w-][\s\S]*/.source,
|
| 153 |
+
'i'
|
| 154 |
+
),
|
| 155 |
+
lookbehind: true,
|
| 156 |
+
inside: httpLanguages[contentType]
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
if (options) {
|
| 161 |
+
Prism.languages.insertBefore('http', 'header', options)
|
| 162 |
+
}
|
| 163 |
+
})(Prism)
|
| 164 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ichigojam.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function ichigojam(Prism: any): void;
|
| 3 |
+
declare namespace ichigojam {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default ichigojam;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ichigojam.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
ichigojam.displayName = 'ichigojam'
|
| 6 |
+
ichigojam.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function ichigojam(Prism) {
|
| 10 |
+
// according to the offical reference (EN)
|
| 11 |
+
// https://ichigojam.net/IchigoJam-en.html
|
| 12 |
+
Prism.languages.ichigojam = {
|
| 13 |
+
comment: /(?:\B'|REM)(?:[^\n\r]*)/i,
|
| 14 |
+
string: {
|
| 15 |
+
pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,
|
| 16 |
+
greedy: true
|
| 17 |
+
},
|
| 18 |
+
number: /\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
|
| 19 |
+
keyword:
|
| 20 |
+
/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,
|
| 21 |
+
function:
|
| 22 |
+
/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,
|
| 23 |
+
label: /(?:\B@\S+)/,
|
| 24 |
+
operator: /<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,
|
| 25 |
+
punctuation: /[\[,;:()\]]/
|
| 26 |
+
}
|
| 27 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/icon.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function icon(Prism: any): void;
|
| 3 |
+
declare namespace icon {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default icon;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/icon.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
icon.displayName = 'icon'
|
| 6 |
+
icon.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function icon(Prism) {
|
| 10 |
+
Prism.languages.icon = {
|
| 11 |
+
comment: /#.*/,
|
| 12 |
+
string: {
|
| 13 |
+
pattern: /(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,
|
| 14 |
+
greedy: true
|
| 15 |
+
},
|
| 16 |
+
number: /\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,
|
| 17 |
+
'builtin-keyword': {
|
| 18 |
+
pattern:
|
| 19 |
+
/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,
|
| 20 |
+
alias: 'variable'
|
| 21 |
+
},
|
| 22 |
+
directive: {
|
| 23 |
+
pattern: /\$\w+/,
|
| 24 |
+
alias: 'builtin'
|
| 25 |
+
},
|
| 26 |
+
keyword:
|
| 27 |
+
/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,
|
| 28 |
+
function: /\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
|
| 29 |
+
operator:
|
| 30 |
+
/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
|
| 31 |
+
punctuation: /[\[\](){},;]/
|
| 32 |
+
}
|
| 33 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/icu-message-format.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function icuMessageFormat(Prism: any): void;
|
| 3 |
+
declare namespace icuMessageFormat {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default icuMessageFormat;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/icu-message-format.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
icuMessageFormat.displayName = 'icu-message-format'
|
| 6 |
+
icuMessageFormat.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function icuMessageFormat(Prism) {
|
| 10 |
+
// https://unicode-org.github.io/icu/userguide/format_parse/messages/
|
| 11 |
+
// https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html
|
| 12 |
+
|
| 13 |
+
;(function (Prism) {
|
| 14 |
+
/**
|
| 15 |
+
* @param {string} source
|
| 16 |
+
* @param {number} level
|
| 17 |
+
* @returns {string}
|
| 18 |
+
*/
|
| 19 |
+
function nested(source, level) {
|
| 20 |
+
if (level <= 0) {
|
| 21 |
+
return /[]/.source
|
| 22 |
+
} else {
|
| 23 |
+
return source.replace(/<SELF>/g, function () {
|
| 24 |
+
return nested(source, level - 1)
|
| 25 |
+
})
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
var stringPattern = /'[{}:=,](?:[^']|'')*'(?!')/
|
| 29 |
+
var escape = {
|
| 30 |
+
pattern: /''/,
|
| 31 |
+
greedy: true,
|
| 32 |
+
alias: 'operator'
|
| 33 |
+
}
|
| 34 |
+
var string = {
|
| 35 |
+
pattern: stringPattern,
|
| 36 |
+
greedy: true,
|
| 37 |
+
inside: {
|
| 38 |
+
escape: escape
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
var argumentSource = nested(
|
| 42 |
+
/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(
|
| 43 |
+
/<STR>/g,
|
| 44 |
+
function () {
|
| 45 |
+
return stringPattern.source
|
| 46 |
+
}
|
| 47 |
+
),
|
| 48 |
+
8
|
| 49 |
+
)
|
| 50 |
+
var nestedMessage = {
|
| 51 |
+
pattern: RegExp(argumentSource),
|
| 52 |
+
inside: {
|
| 53 |
+
message: {
|
| 54 |
+
pattern: /^(\{)[\s\S]+(?=\}$)/,
|
| 55 |
+
lookbehind: true,
|
| 56 |
+
inside: null // see below
|
| 57 |
+
},
|
| 58 |
+
'message-delimiter': {
|
| 59 |
+
pattern: /./,
|
| 60 |
+
alias: 'punctuation'
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
Prism.languages['icu-message-format'] = {
|
| 65 |
+
argument: {
|
| 66 |
+
pattern: RegExp(argumentSource),
|
| 67 |
+
greedy: true,
|
| 68 |
+
inside: {
|
| 69 |
+
content: {
|
| 70 |
+
pattern: /^(\{)[\s\S]+(?=\}$)/,
|
| 71 |
+
lookbehind: true,
|
| 72 |
+
inside: {
|
| 73 |
+
'argument-name': {
|
| 74 |
+
pattern: /^(\s*)[^{}:=,\s]+/,
|
| 75 |
+
lookbehind: true
|
| 76 |
+
},
|
| 77 |
+
'choice-style': {
|
| 78 |
+
// https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1ChoiceFormat.html#details
|
| 79 |
+
pattern: /^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,
|
| 80 |
+
lookbehind: true,
|
| 81 |
+
inside: {
|
| 82 |
+
punctuation: /\|/,
|
| 83 |
+
range: {
|
| 84 |
+
pattern: /^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,
|
| 85 |
+
lookbehind: true,
|
| 86 |
+
inside: {
|
| 87 |
+
operator: /[<#\u2264]/,
|
| 88 |
+
number: /\S+/
|
| 89 |
+
}
|
| 90 |
+
},
|
| 91 |
+
rest: null // see below
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
'plural-style': {
|
| 95 |
+
// https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/PluralFormat.html#:~:text=Patterns%20and%20Their%20Interpretation
|
| 96 |
+
pattern:
|
| 97 |
+
/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,
|
| 98 |
+
lookbehind: true,
|
| 99 |
+
inside: {
|
| 100 |
+
offset: /^offset:\s*\d+/,
|
| 101 |
+
'nested-message': nestedMessage,
|
| 102 |
+
selector: {
|
| 103 |
+
pattern: /=\d+|[^{}:=,\s]+/,
|
| 104 |
+
inside: {
|
| 105 |
+
keyword: /^(?:few|many|one|other|two|zero)$/
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
'select-style': {
|
| 111 |
+
// https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/SelectFormat.html#:~:text=Patterns%20and%20Their%20Interpretation
|
| 112 |
+
pattern: /^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,
|
| 113 |
+
lookbehind: true,
|
| 114 |
+
inside: {
|
| 115 |
+
'nested-message': nestedMessage,
|
| 116 |
+
selector: {
|
| 117 |
+
pattern: /[^{}:=,\s]+/,
|
| 118 |
+
inside: {
|
| 119 |
+
keyword: /^other$/
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
},
|
| 124 |
+
keyword: /\b(?:choice|plural|select|selectordinal)\b/,
|
| 125 |
+
'arg-type': {
|
| 126 |
+
pattern: /\b(?:date|duration|number|ordinal|spellout|time)\b/,
|
| 127 |
+
alias: 'keyword'
|
| 128 |
+
},
|
| 129 |
+
'arg-skeleton': {
|
| 130 |
+
pattern: /(,\s*)::[^{}:=,\s]+/,
|
| 131 |
+
lookbehind: true
|
| 132 |
+
},
|
| 133 |
+
'arg-style': {
|
| 134 |
+
pattern:
|
| 135 |
+
/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,
|
| 136 |
+
lookbehind: true
|
| 137 |
+
},
|
| 138 |
+
'arg-style-text': {
|
| 139 |
+
pattern: RegExp(
|
| 140 |
+
/(^\s*,\s*(?=\S))/.source +
|
| 141 |
+
nested(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source, 8) +
|
| 142 |
+
'$'
|
| 143 |
+
),
|
| 144 |
+
lookbehind: true,
|
| 145 |
+
alias: 'string'
|
| 146 |
+
},
|
| 147 |
+
punctuation: /,/
|
| 148 |
+
}
|
| 149 |
+
},
|
| 150 |
+
'argument-delimiter': {
|
| 151 |
+
pattern: /./,
|
| 152 |
+
alias: 'operator'
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
},
|
| 156 |
+
escape: escape,
|
| 157 |
+
string: string
|
| 158 |
+
}
|
| 159 |
+
nestedMessage.inside.message.inside = Prism.languages['icu-message-format']
|
| 160 |
+
Prism.languages['icu-message-format'].argument.inside.content.inside[
|
| 161 |
+
'choice-style'
|
| 162 |
+
].inside.rest = Prism.languages['icu-message-format']
|
| 163 |
+
})(Prism)
|
| 164 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/idris.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function idris(Prism: any): void;
|
| 3 |
+
declare namespace idris {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: string[];
|
| 6 |
+
}
|
| 7 |
+
export default idris;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/idris.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorHaskell from './haskell.js'
|
| 6 |
+
idris.displayName = 'idris'
|
| 7 |
+
idris.aliases = ['idr']
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function idris(Prism) {
|
| 11 |
+
Prism.register(refractorHaskell)
|
| 12 |
+
Prism.languages.idris = Prism.languages.extend('haskell', {
|
| 13 |
+
comment: {
|
| 14 |
+
pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m
|
| 15 |
+
},
|
| 16 |
+
keyword:
|
| 17 |
+
/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,
|
| 18 |
+
builtin: undefined
|
| 19 |
+
})
|
| 20 |
+
Prism.languages.insertBefore('idris', 'keyword', {
|
| 21 |
+
'import-statement': {
|
| 22 |
+
pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,
|
| 23 |
+
lookbehind: true,
|
| 24 |
+
inside: {
|
| 25 |
+
punctuation: /\./
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
})
|
| 29 |
+
Prism.languages.idr = Prism.languages.idris
|
| 30 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/iecst.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function iecst(Prism: any): void;
|
| 3 |
+
declare namespace iecst {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default iecst;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/iecst.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
iecst.displayName = 'iecst'
|
| 6 |
+
iecst.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function iecst(Prism) {
|
| 10 |
+
Prism.languages.iecst = {
|
| 11 |
+
comment: [
|
| 12 |
+
{
|
| 13 |
+
pattern:
|
| 14 |
+
/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,
|
| 15 |
+
lookbehind: true,
|
| 16 |
+
greedy: true
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
pattern: /(^|[^\\:])\/\/.*/,
|
| 20 |
+
lookbehind: true,
|
| 21 |
+
greedy: true
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
string: {
|
| 25 |
+
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
| 26 |
+
greedy: true
|
| 27 |
+
},
|
| 28 |
+
keyword: [
|
| 29 |
+
/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,
|
| 30 |
+
/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/
|
| 31 |
+
],
|
| 32 |
+
'class-name':
|
| 33 |
+
/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,
|
| 34 |
+
address: {
|
| 35 |
+
pattern: /%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,
|
| 36 |
+
alias: 'symbol'
|
| 37 |
+
},
|
| 38 |
+
number:
|
| 39 |
+
/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
| 40 |
+
boolean: /\b(?:FALSE|NULL|TRUE)\b/,
|
| 41 |
+
operator:
|
| 42 |
+
/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,
|
| 43 |
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
| 44 |
+
punctuation: /[()[\].,;]/
|
| 45 |
+
}
|
| 46 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ignore.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function ignore(Prism: any): void;
|
| 3 |
+
declare namespace ignore {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: string[];
|
| 6 |
+
}
|
| 7 |
+
export default ignore;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ignore.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
ignore.displayName = 'ignore'
|
| 6 |
+
ignore.aliases = ['gitignore', 'hgignore', 'npmignore']
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function ignore(Prism) {
|
| 10 |
+
;(function (Prism) {
|
| 11 |
+
Prism.languages.ignore = {
|
| 12 |
+
// https://git-scm.com/docs/gitignore
|
| 13 |
+
comment: /^#.*/m,
|
| 14 |
+
entry: {
|
| 15 |
+
pattern: /\S(?:.*(?:(?:\\ )|\S))?/,
|
| 16 |
+
alias: 'string',
|
| 17 |
+
inside: {
|
| 18 |
+
operator: /^!|\*\*?|\?/,
|
| 19 |
+
regex: {
|
| 20 |
+
pattern: /(^|[^\\])\[[^\[\]]*\]/,
|
| 21 |
+
lookbehind: true
|
| 22 |
+
},
|
| 23 |
+
punctuation: /\//
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
Prism.languages.gitignore = Prism.languages.ignore
|
| 28 |
+
Prism.languages.hgignore = Prism.languages.ignore
|
| 29 |
+
Prism.languages.npmignore = Prism.languages.ignore
|
| 30 |
+
})(Prism)
|
| 31 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/inform7.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function inform7(Prism: any): void;
|
| 3 |
+
declare namespace inform7 {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default inform7;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/inform7.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
inform7.displayName = 'inform7'
|
| 6 |
+
inform7.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function inform7(Prism) {
|
| 10 |
+
Prism.languages.inform7 = {
|
| 11 |
+
string: {
|
| 12 |
+
pattern: /"[^"]*"/,
|
| 13 |
+
inside: {
|
| 14 |
+
substitution: {
|
| 15 |
+
pattern: /\[[^\[\]]+\]/,
|
| 16 |
+
inside: {
|
| 17 |
+
delimiter: {
|
| 18 |
+
pattern: /\[|\]/,
|
| 19 |
+
alias: 'punctuation'
|
| 20 |
+
}
|
| 21 |
+
// See rest below
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
},
|
| 26 |
+
comment: {
|
| 27 |
+
pattern: /\[[^\[\]]+\]/,
|
| 28 |
+
greedy: true
|
| 29 |
+
},
|
| 30 |
+
title: {
|
| 31 |
+
pattern: /^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,
|
| 32 |
+
alias: 'important'
|
| 33 |
+
},
|
| 34 |
+
number: {
|
| 35 |
+
pattern:
|
| 36 |
+
/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,
|
| 37 |
+
lookbehind: true
|
| 38 |
+
},
|
| 39 |
+
verb: {
|
| 40 |
+
pattern:
|
| 41 |
+
/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,
|
| 42 |
+
lookbehind: true,
|
| 43 |
+
alias: 'operator'
|
| 44 |
+
},
|
| 45 |
+
keyword: {
|
| 46 |
+
pattern:
|
| 47 |
+
/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,
|
| 48 |
+
lookbehind: true
|
| 49 |
+
},
|
| 50 |
+
property: {
|
| 51 |
+
pattern:
|
| 52 |
+
/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,
|
| 53 |
+
lookbehind: true,
|
| 54 |
+
alias: 'symbol'
|
| 55 |
+
},
|
| 56 |
+
position: {
|
| 57 |
+
pattern:
|
| 58 |
+
/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,
|
| 59 |
+
lookbehind: true,
|
| 60 |
+
alias: 'keyword'
|
| 61 |
+
},
|
| 62 |
+
type: {
|
| 63 |
+
pattern:
|
| 64 |
+
/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,
|
| 65 |
+
lookbehind: true,
|
| 66 |
+
alias: 'variable'
|
| 67 |
+
},
|
| 68 |
+
punctuation: /[.,:;(){}]/
|
| 69 |
+
}
|
| 70 |
+
Prism.languages.inform7['string'].inside['substitution'].inside.rest =
|
| 71 |
+
Prism.languages.inform7
|
| 72 |
+
// We don't want the remaining text in the substitution to be highlighted as the string.
|
| 73 |
+
Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
|
| 74 |
+
pattern: /\S(?:\s*\S)*/,
|
| 75 |
+
alias: 'comment'
|
| 76 |
+
}
|
| 77 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ini.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function ini(Prism: any): void;
|
| 3 |
+
declare namespace ini {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default ini;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/ini.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
ini.displayName = 'ini'
|
| 6 |
+
ini.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function ini(Prism) {
|
| 10 |
+
Prism.languages.ini = {
|
| 11 |
+
/**
|
| 12 |
+
* The component mimics the behavior of the Win32 API parser.
|
| 13 |
+
*
|
| 14 |
+
* @see {@link https://github.com/PrismJS/prism/issues/2775#issuecomment-787477723}
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
comment: {
|
| 18 |
+
pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m,
|
| 19 |
+
lookbehind: true
|
| 20 |
+
},
|
| 21 |
+
section: {
|
| 22 |
+
pattern: /(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,
|
| 23 |
+
lookbehind: true,
|
| 24 |
+
inside: {
|
| 25 |
+
'section-name': {
|
| 26 |
+
pattern: /(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,
|
| 27 |
+
lookbehind: true,
|
| 28 |
+
alias: 'selector'
|
| 29 |
+
},
|
| 30 |
+
punctuation: /\[|\]/
|
| 31 |
+
}
|
| 32 |
+
},
|
| 33 |
+
key: {
|
| 34 |
+
pattern:
|
| 35 |
+
/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,
|
| 36 |
+
lookbehind: true,
|
| 37 |
+
alias: 'attr-name'
|
| 38 |
+
},
|
| 39 |
+
value: {
|
| 40 |
+
pattern: /(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,
|
| 41 |
+
lookbehind: true,
|
| 42 |
+
alias: 'attr-value',
|
| 43 |
+
inside: {
|
| 44 |
+
'inner-value': {
|
| 45 |
+
pattern: /^("|').+(?=\1$)/,
|
| 46 |
+
lookbehind: true
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
punctuation: /=/
|
| 51 |
+
}
|
| 52 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/io.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function io(Prism: any): void;
|
| 3 |
+
declare namespace io {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default io;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/io.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
io.displayName = 'io'
|
| 6 |
+
io.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function io(Prism) {
|
| 10 |
+
Prism.languages.io = {
|
| 11 |
+
comment: {
|
| 12 |
+
pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,
|
| 13 |
+
lookbehind: true,
|
| 14 |
+
greedy: true
|
| 15 |
+
},
|
| 16 |
+
'triple-quoted-string': {
|
| 17 |
+
pattern: /"""(?:\\[\s\S]|(?!""")[^\\])*"""/,
|
| 18 |
+
greedy: true,
|
| 19 |
+
alias: 'string'
|
| 20 |
+
},
|
| 21 |
+
string: {
|
| 22 |
+
pattern: /"(?:\\.|[^\\\r\n"])*"/,
|
| 23 |
+
greedy: true
|
| 24 |
+
},
|
| 25 |
+
keyword:
|
| 26 |
+
/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,
|
| 27 |
+
builtin:
|
| 28 |
+
/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,
|
| 29 |
+
boolean: /\b(?:false|nil|true)\b/,
|
| 30 |
+
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,
|
| 31 |
+
operator:
|
| 32 |
+
/[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,
|
| 33 |
+
punctuation: /[{}[\];(),.:]/
|
| 34 |
+
}
|
| 35 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/j.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function j(Prism: any): void;
|
| 3 |
+
declare namespace j {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default j;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/j.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
j.displayName = 'j'
|
| 6 |
+
j.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function j(Prism) {
|
| 10 |
+
Prism.languages.j = {
|
| 11 |
+
comment: {
|
| 12 |
+
pattern: /\bNB\..*/,
|
| 13 |
+
greedy: true
|
| 14 |
+
},
|
| 15 |
+
string: {
|
| 16 |
+
pattern: /'(?:''|[^'\r\n])*'/,
|
| 17 |
+
greedy: true
|
| 18 |
+
},
|
| 19 |
+
keyword:
|
| 20 |
+
/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,
|
| 21 |
+
verb: {
|
| 22 |
+
// Negative look-ahead prevents bad highlighting
|
| 23 |
+
// of ^: ;. =. =: !. !:
|
| 24 |
+
pattern:
|
| 25 |
+
/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,
|
| 26 |
+
alias: 'keyword'
|
| 27 |
+
},
|
| 28 |
+
number:
|
| 29 |
+
/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,
|
| 30 |
+
adverb: {
|
| 31 |
+
pattern: /[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,
|
| 32 |
+
alias: 'builtin'
|
| 33 |
+
},
|
| 34 |
+
operator: /[=a][.:]|_\./,
|
| 35 |
+
conjunction: {
|
| 36 |
+
pattern: /&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,
|
| 37 |
+
alias: 'variable'
|
| 38 |
+
},
|
| 39 |
+
punctuation: /[()]/
|
| 40 |
+
}
|
| 41 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/java.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function java(Prism: any): void;
|
| 3 |
+
declare namespace java {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default java;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/java.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorClike from './clike.js'
|
| 6 |
+
java.displayName = 'java'
|
| 7 |
+
java.aliases = []
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function java(Prism) {
|
| 11 |
+
Prism.register(refractorClike)
|
| 12 |
+
;(function (Prism) {
|
| 13 |
+
var keywords =
|
| 14 |
+
/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/
|
| 15 |
+
|
| 16 |
+
// full package (optional) + parent classes (optional)
|
| 17 |
+
var classNamePrefix = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source
|
| 18 |
+
|
| 19 |
+
// based on the java naming conventions
|
| 20 |
+
var className = {
|
| 21 |
+
pattern: RegExp(
|
| 22 |
+
/(^|[^\w.])/.source +
|
| 23 |
+
classNamePrefix +
|
| 24 |
+
/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source
|
| 25 |
+
),
|
| 26 |
+
lookbehind: true,
|
| 27 |
+
inside: {
|
| 28 |
+
namespace: {
|
| 29 |
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
| 30 |
+
inside: {
|
| 31 |
+
punctuation: /\./
|
| 32 |
+
}
|
| 33 |
+
},
|
| 34 |
+
punctuation: /\./
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
Prism.languages.java = Prism.languages.extend('clike', {
|
| 38 |
+
string: {
|
| 39 |
+
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
| 40 |
+
lookbehind: true,
|
| 41 |
+
greedy: true
|
| 42 |
+
},
|
| 43 |
+
'class-name': [
|
| 44 |
+
className,
|
| 45 |
+
{
|
| 46 |
+
// variables, parameters, and constructor references
|
| 47 |
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
| 48 |
+
pattern: RegExp(
|
| 49 |
+
/(^|[^\w.])/.source +
|
| 50 |
+
classNamePrefix +
|
| 51 |
+
/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/
|
| 52 |
+
.source
|
| 53 |
+
),
|
| 54 |
+
lookbehind: true,
|
| 55 |
+
inside: className.inside
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
// class names based on keyword
|
| 59 |
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
| 60 |
+
pattern: RegExp(
|
| 61 |
+
/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/
|
| 62 |
+
.source +
|
| 63 |
+
classNamePrefix +
|
| 64 |
+
/[A-Z]\w*\b/.source
|
| 65 |
+
),
|
| 66 |
+
lookbehind: true,
|
| 67 |
+
inside: className.inside
|
| 68 |
+
}
|
| 69 |
+
],
|
| 70 |
+
keyword: keywords,
|
| 71 |
+
function: [
|
| 72 |
+
Prism.languages.clike.function,
|
| 73 |
+
{
|
| 74 |
+
pattern: /(::\s*)[a-z_]\w*/,
|
| 75 |
+
lookbehind: true
|
| 76 |
+
}
|
| 77 |
+
],
|
| 78 |
+
number:
|
| 79 |
+
/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
|
| 80 |
+
operator: {
|
| 81 |
+
pattern:
|
| 82 |
+
/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
| 83 |
+
lookbehind: true
|
| 84 |
+
},
|
| 85 |
+
constant: /\b[A-Z][A-Z_\d]+\b/
|
| 86 |
+
})
|
| 87 |
+
Prism.languages.insertBefore('java', 'string', {
|
| 88 |
+
'triple-quoted-string': {
|
| 89 |
+
// http://openjdk.java.net/jeps/355#Description
|
| 90 |
+
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
| 91 |
+
greedy: true,
|
| 92 |
+
alias: 'string'
|
| 93 |
+
},
|
| 94 |
+
char: {
|
| 95 |
+
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
| 96 |
+
greedy: true
|
| 97 |
+
}
|
| 98 |
+
})
|
| 99 |
+
Prism.languages.insertBefore('java', 'class-name', {
|
| 100 |
+
annotation: {
|
| 101 |
+
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
| 102 |
+
lookbehind: true,
|
| 103 |
+
alias: 'punctuation'
|
| 104 |
+
},
|
| 105 |
+
generics: {
|
| 106 |
+
pattern:
|
| 107 |
+
/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
| 108 |
+
inside: {
|
| 109 |
+
'class-name': className,
|
| 110 |
+
keyword: keywords,
|
| 111 |
+
punctuation: /[<>(),.:]/,
|
| 112 |
+
operator: /[?&|]/
|
| 113 |
+
}
|
| 114 |
+
},
|
| 115 |
+
import: [
|
| 116 |
+
{
|
| 117 |
+
pattern: RegExp(
|
| 118 |
+
/(\bimport\s+)/.source +
|
| 119 |
+
classNamePrefix +
|
| 120 |
+
/(?:[A-Z]\w*|\*)(?=\s*;)/.source
|
| 121 |
+
),
|
| 122 |
+
lookbehind: true,
|
| 123 |
+
inside: {
|
| 124 |
+
namespace: className.inside.namespace,
|
| 125 |
+
punctuation: /\./,
|
| 126 |
+
operator: /\*/,
|
| 127 |
+
'class-name': /\w+/
|
| 128 |
+
}
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
pattern: RegExp(
|
| 132 |
+
/(\bimport\s+static\s+)/.source +
|
| 133 |
+
classNamePrefix +
|
| 134 |
+
/(?:\w+|\*)(?=\s*;)/.source
|
| 135 |
+
),
|
| 136 |
+
lookbehind: true,
|
| 137 |
+
alias: 'static',
|
| 138 |
+
inside: {
|
| 139 |
+
namespace: className.inside.namespace,
|
| 140 |
+
static: /\b\w+$/,
|
| 141 |
+
punctuation: /\./,
|
| 142 |
+
operator: /\*/,
|
| 143 |
+
'class-name': /\w+/
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
],
|
| 147 |
+
namespace: {
|
| 148 |
+
pattern: RegExp(
|
| 149 |
+
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(
|
| 150 |
+
/<keyword>/g,
|
| 151 |
+
function () {
|
| 152 |
+
return keywords.source
|
| 153 |
+
}
|
| 154 |
+
)
|
| 155 |
+
),
|
| 156 |
+
lookbehind: true,
|
| 157 |
+
inside: {
|
| 158 |
+
punctuation: /\./
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
})
|
| 162 |
+
})(Prism)
|
| 163 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoc.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function javadoc(Prism: any): void;
|
| 3 |
+
declare namespace javadoc {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default javadoc;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoc.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorJava from './java.js'
|
| 6 |
+
import refractorJavadoclike from './javadoclike.js'
|
| 7 |
+
import refractorMarkup from './markup.js'
|
| 8 |
+
javadoc.displayName = 'javadoc'
|
| 9 |
+
javadoc.aliases = []
|
| 10 |
+
|
| 11 |
+
/** @param {Refractor} Prism */
|
| 12 |
+
export default function javadoc(Prism) {
|
| 13 |
+
Prism.register(refractorJava)
|
| 14 |
+
Prism.register(refractorJavadoclike)
|
| 15 |
+
Prism.register(refractorMarkup)
|
| 16 |
+
;(function (Prism) {
|
| 17 |
+
var codeLinePattern = /(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m
|
| 18 |
+
var memberReference = /#\s*\w+(?:\s*\([^()]*\))?/.source
|
| 19 |
+
var reference =
|
| 20 |
+
/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(
|
| 21 |
+
/<mem>/g,
|
| 22 |
+
function () {
|
| 23 |
+
return memberReference
|
| 24 |
+
}
|
| 25 |
+
)
|
| 26 |
+
Prism.languages.javadoc = Prism.languages.extend('javadoclike', {})
|
| 27 |
+
Prism.languages.insertBefore('javadoc', 'keyword', {
|
| 28 |
+
reference: {
|
| 29 |
+
pattern: RegExp(
|
| 30 |
+
/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/
|
| 31 |
+
.source +
|
| 32 |
+
'(?:' +
|
| 33 |
+
reference +
|
| 34 |
+
')'
|
| 35 |
+
),
|
| 36 |
+
lookbehind: true,
|
| 37 |
+
inside: {
|
| 38 |
+
function: {
|
| 39 |
+
pattern: /(#\s*)\w+(?=\s*\()/,
|
| 40 |
+
lookbehind: true
|
| 41 |
+
},
|
| 42 |
+
field: {
|
| 43 |
+
pattern: /(#\s*)\w+/,
|
| 44 |
+
lookbehind: true
|
| 45 |
+
},
|
| 46 |
+
namespace: {
|
| 47 |
+
pattern: /\b(?:[a-z]\w*\s*\.\s*)+/,
|
| 48 |
+
inside: {
|
| 49 |
+
punctuation: /\./
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
'class-name': /\b[A-Z]\w*/,
|
| 53 |
+
keyword: Prism.languages.java.keyword,
|
| 54 |
+
punctuation: /[#()[\],.]/
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
'class-name': {
|
| 58 |
+
// @param <T> the first generic type parameter
|
| 59 |
+
pattern: /(@param\s+)<[A-Z]\w*>/,
|
| 60 |
+
lookbehind: true,
|
| 61 |
+
inside: {
|
| 62 |
+
punctuation: /[.<>]/
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
'code-section': [
|
| 66 |
+
{
|
| 67 |
+
pattern:
|
| 68 |
+
/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,
|
| 69 |
+
lookbehind: true,
|
| 70 |
+
inside: {
|
| 71 |
+
code: {
|
| 72 |
+
// there can't be any HTML inside of {@code} tags
|
| 73 |
+
pattern: codeLinePattern,
|
| 74 |
+
lookbehind: true,
|
| 75 |
+
inside: Prism.languages.java,
|
| 76 |
+
alias: 'language-java'
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
pattern:
|
| 82 |
+
/(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,
|
| 83 |
+
lookbehind: true,
|
| 84 |
+
inside: {
|
| 85 |
+
line: {
|
| 86 |
+
pattern: codeLinePattern,
|
| 87 |
+
lookbehind: true,
|
| 88 |
+
inside: {
|
| 89 |
+
// highlight HTML tags and entities
|
| 90 |
+
tag: Prism.languages.markup.tag,
|
| 91 |
+
entity: Prism.languages.markup.entity,
|
| 92 |
+
code: {
|
| 93 |
+
// everything else is Java code
|
| 94 |
+
pattern: /.+/,
|
| 95 |
+
inside: Prism.languages.java,
|
| 96 |
+
alias: 'language-java'
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
],
|
| 103 |
+
tag: Prism.languages.markup.tag,
|
| 104 |
+
entity: Prism.languages.markup.entity
|
| 105 |
+
})
|
| 106 |
+
Prism.languages.javadoclike.addSupport('java', Prism.languages.javadoc)
|
| 107 |
+
})(Prism)
|
| 108 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoclike.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function javadoclike(Prism: any): void;
|
| 3 |
+
declare namespace javadoclike {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default javadoclike;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javadoclike.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
javadoclike.displayName = 'javadoclike'
|
| 6 |
+
javadoclike.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function javadoclike(Prism) {
|
| 10 |
+
;(function (Prism) {
|
| 11 |
+
var javaDocLike = (Prism.languages.javadoclike = {
|
| 12 |
+
parameter: {
|
| 13 |
+
pattern:
|
| 14 |
+
/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,
|
| 15 |
+
lookbehind: true
|
| 16 |
+
},
|
| 17 |
+
keyword: {
|
| 18 |
+
// keywords are the first word in a line preceded be an `@` or surrounded by curly braces.
|
| 19 |
+
// @word, {@word}
|
| 20 |
+
pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,
|
| 21 |
+
lookbehind: true
|
| 22 |
+
},
|
| 23 |
+
punctuation: /[{}]/
|
| 24 |
+
})
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* Adds doc comment support to the given language and calls a given callback on each doc comment pattern.
|
| 28 |
+
*
|
| 29 |
+
* @param {string} lang the language add doc comment support to.
|
| 30 |
+
* @param {(pattern: {inside: {rest: undefined}}) => void} callback the function called with each doc comment pattern as argument.
|
| 31 |
+
*/
|
| 32 |
+
function docCommentSupport(lang, callback) {
|
| 33 |
+
var tokenName = 'doc-comment'
|
| 34 |
+
var grammar = Prism.languages[lang]
|
| 35 |
+
if (!grammar) {
|
| 36 |
+
return
|
| 37 |
+
}
|
| 38 |
+
var token = grammar[tokenName]
|
| 39 |
+
if (!token) {
|
| 40 |
+
// add doc comment: /** */
|
| 41 |
+
var definition = {}
|
| 42 |
+
definition[tokenName] = {
|
| 43 |
+
pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,
|
| 44 |
+
lookbehind: true,
|
| 45 |
+
alias: 'comment'
|
| 46 |
+
}
|
| 47 |
+
grammar = Prism.languages.insertBefore(lang, 'comment', definition)
|
| 48 |
+
token = grammar[tokenName]
|
| 49 |
+
}
|
| 50 |
+
if (token instanceof RegExp) {
|
| 51 |
+
// convert regex to object
|
| 52 |
+
token = grammar[tokenName] = {
|
| 53 |
+
pattern: token
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
if (Array.isArray(token)) {
|
| 57 |
+
for (var i = 0, l = token.length; i < l; i++) {
|
| 58 |
+
if (token[i] instanceof RegExp) {
|
| 59 |
+
token[i] = {
|
| 60 |
+
pattern: token[i]
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
callback(token[i])
|
| 64 |
+
}
|
| 65 |
+
} else {
|
| 66 |
+
callback(token)
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* Adds doc-comment support to the given languages for the given documentation language.
|
| 72 |
+
*
|
| 73 |
+
* @param {string[]|string} languages
|
| 74 |
+
* @param {Object} docLanguage
|
| 75 |
+
*/
|
| 76 |
+
function addSupport(languages, docLanguage) {
|
| 77 |
+
if (typeof languages === 'string') {
|
| 78 |
+
languages = [languages]
|
| 79 |
+
}
|
| 80 |
+
languages.forEach(function (lang) {
|
| 81 |
+
docCommentSupport(lang, function (pattern) {
|
| 82 |
+
if (!pattern.inside) {
|
| 83 |
+
pattern.inside = {}
|
| 84 |
+
}
|
| 85 |
+
pattern.inside.rest = docLanguage
|
| 86 |
+
})
|
| 87 |
+
})
|
| 88 |
+
}
|
| 89 |
+
Object.defineProperty(javaDocLike, 'addSupport', {
|
| 90 |
+
value: addSupport
|
| 91 |
+
})
|
| 92 |
+
javaDocLike.addSupport(['java', 'javascript', 'php'], javaDocLike)
|
| 93 |
+
})(Prism)
|
| 94 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javascript.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function javascript(Prism: any): void;
|
| 3 |
+
declare namespace javascript {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: string[];
|
| 6 |
+
}
|
| 7 |
+
export default javascript;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javascript.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorClike from './clike.js'
|
| 6 |
+
javascript.displayName = 'javascript'
|
| 7 |
+
javascript.aliases = ['js']
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function javascript(Prism) {
|
| 11 |
+
Prism.register(refractorClike)
|
| 12 |
+
Prism.languages.javascript = Prism.languages.extend('clike', {
|
| 13 |
+
'class-name': [
|
| 14 |
+
Prism.languages.clike['class-name'],
|
| 15 |
+
{
|
| 16 |
+
pattern:
|
| 17 |
+
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
| 18 |
+
lookbehind: true
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
keyword: [
|
| 22 |
+
{
|
| 23 |
+
pattern: /((?:^|\})\s*)catch\b/,
|
| 24 |
+
lookbehind: true
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
pattern:
|
| 28 |
+
/(^|[^.]|\.\.\.\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/,
|
| 29 |
+
lookbehind: true
|
| 30 |
+
}
|
| 31 |
+
],
|
| 32 |
+
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
|
| 33 |
+
function:
|
| 34 |
+
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
| 35 |
+
number: {
|
| 36 |
+
pattern: RegExp(
|
| 37 |
+
/(^|[^\w$])/.source +
|
| 38 |
+
'(?:' +
|
| 39 |
+
// constant
|
| 40 |
+
(/NaN|Infinity/.source +
|
| 41 |
+
'|' +
|
| 42 |
+
// binary integer
|
| 43 |
+
/0[bB][01]+(?:_[01]+)*n?/.source +
|
| 44 |
+
'|' +
|
| 45 |
+
// octal integer
|
| 46 |
+
/0[oO][0-7]+(?:_[0-7]+)*n?/.source +
|
| 47 |
+
'|' +
|
| 48 |
+
// hexadecimal integer
|
| 49 |
+
/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source +
|
| 50 |
+
'|' +
|
| 51 |
+
// decimal bigint
|
| 52 |
+
/\d+(?:_\d+)*n/.source +
|
| 53 |
+
'|' +
|
| 54 |
+
// decimal number (integer or float) but no bigint
|
| 55 |
+
/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/
|
| 56 |
+
.source) +
|
| 57 |
+
')' +
|
| 58 |
+
/(?![\w$])/.source
|
| 59 |
+
),
|
| 60 |
+
lookbehind: true
|
| 61 |
+
},
|
| 62 |
+
operator:
|
| 63 |
+
/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
| 64 |
+
})
|
| 65 |
+
Prism.languages.javascript['class-name'][0].pattern =
|
| 66 |
+
/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/
|
| 67 |
+
Prism.languages.insertBefore('javascript', 'keyword', {
|
| 68 |
+
regex: {
|
| 69 |
+
pattern: RegExp(
|
| 70 |
+
// lookbehind
|
| 71 |
+
// eslint-disable-next-line regexp/no-dupe-characters-character-class
|
| 72 |
+
/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source +
|
| 73 |
+
// Regex pattern:
|
| 74 |
+
// There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
|
| 75 |
+
// classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
|
| 76 |
+
// with the only syntax, so we have to define 2 different regex patterns.
|
| 77 |
+
/\//.source +
|
| 78 |
+
'(?:' +
|
| 79 |
+
/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/
|
| 80 |
+
.source +
|
| 81 |
+
'|' +
|
| 82 |
+
// `v` flag syntax. This supports 3 levels of nested character classes.
|
| 83 |
+
/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/
|
| 84 |
+
.source +
|
| 85 |
+
')' +
|
| 86 |
+
// lookahead
|
| 87 |
+
/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/
|
| 88 |
+
.source
|
| 89 |
+
),
|
| 90 |
+
lookbehind: true,
|
| 91 |
+
greedy: true,
|
| 92 |
+
inside: {
|
| 93 |
+
'regex-source': {
|
| 94 |
+
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
| 95 |
+
lookbehind: true,
|
| 96 |
+
alias: 'language-regex',
|
| 97 |
+
inside: Prism.languages.regex
|
| 98 |
+
},
|
| 99 |
+
'regex-delimiter': /^\/|\/$/,
|
| 100 |
+
'regex-flags': /^[a-z]+$/
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
// This must be declared before keyword because we use "function" inside the look-forward
|
| 104 |
+
'function-variable': {
|
| 105 |
+
pattern:
|
| 106 |
+
/#?(?!\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*=>))/,
|
| 107 |
+
alias: 'function'
|
| 108 |
+
},
|
| 109 |
+
parameter: [
|
| 110 |
+
{
|
| 111 |
+
pattern:
|
| 112 |
+
/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
| 113 |
+
lookbehind: true,
|
| 114 |
+
inside: Prism.languages.javascript
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
pattern:
|
| 118 |
+
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
| 119 |
+
lookbehind: true,
|
| 120 |
+
inside: Prism.languages.javascript
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
pattern:
|
| 124 |
+
/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
| 125 |
+
lookbehind: true,
|
| 126 |
+
inside: Prism.languages.javascript
|
| 127 |
+
},
|
| 128 |
+
{
|
| 129 |
+
pattern:
|
| 130 |
+
/((?:\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*\{)/,
|
| 131 |
+
lookbehind: true,
|
| 132 |
+
inside: Prism.languages.javascript
|
| 133 |
+
}
|
| 134 |
+
],
|
| 135 |
+
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
|
| 136 |
+
})
|
| 137 |
+
Prism.languages.insertBefore('javascript', 'string', {
|
| 138 |
+
hashbang: {
|
| 139 |
+
pattern: /^#!.*/,
|
| 140 |
+
greedy: true,
|
| 141 |
+
alias: 'comment'
|
| 142 |
+
},
|
| 143 |
+
'template-string': {
|
| 144 |
+
pattern:
|
| 145 |
+
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
| 146 |
+
greedy: true,
|
| 147 |
+
inside: {
|
| 148 |
+
'template-punctuation': {
|
| 149 |
+
pattern: /^`|`$/,
|
| 150 |
+
alias: 'string'
|
| 151 |
+
},
|
| 152 |
+
interpolation: {
|
| 153 |
+
pattern:
|
| 154 |
+
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
| 155 |
+
lookbehind: true,
|
| 156 |
+
inside: {
|
| 157 |
+
'interpolation-punctuation': {
|
| 158 |
+
pattern: /^\$\{|\}$/,
|
| 159 |
+
alias: 'punctuation'
|
| 160 |
+
},
|
| 161 |
+
rest: Prism.languages.javascript
|
| 162 |
+
}
|
| 163 |
+
},
|
| 164 |
+
string: /[\s\S]+/
|
| 165 |
+
}
|
| 166 |
+
},
|
| 167 |
+
'string-property': {
|
| 168 |
+
pattern:
|
| 169 |
+
/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
| 170 |
+
lookbehind: true,
|
| 171 |
+
greedy: true,
|
| 172 |
+
alias: 'property'
|
| 173 |
+
}
|
| 174 |
+
})
|
| 175 |
+
Prism.languages.insertBefore('javascript', 'operator', {
|
| 176 |
+
'literal-property': {
|
| 177 |
+
pattern:
|
| 178 |
+
/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
| 179 |
+
lookbehind: true,
|
| 180 |
+
alias: 'property'
|
| 181 |
+
}
|
| 182 |
+
})
|
| 183 |
+
if (Prism.languages.markup) {
|
| 184 |
+
Prism.languages.markup.tag.addInlined('script', 'javascript')
|
| 185 |
+
|
| 186 |
+
// add attribute support for all DOM events.
|
| 187 |
+
// https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
|
| 188 |
+
Prism.languages.markup.tag.addAttribute(
|
| 189 |
+
/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)/
|
| 190 |
+
.source,
|
| 191 |
+
'javascript'
|
| 192 |
+
)
|
| 193 |
+
}
|
| 194 |
+
Prism.languages.js = Prism.languages.javascript
|
| 195 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javastacktrace.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function javastacktrace(Prism: any): void;
|
| 3 |
+
declare namespace javastacktrace {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default javastacktrace;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/javastacktrace.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
javastacktrace.displayName = 'javastacktrace'
|
| 6 |
+
javastacktrace.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function javastacktrace(Prism) {
|
| 10 |
+
// Specification:
|
| 11 |
+
// https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/Throwable.html#printStackTrace()
|
| 12 |
+
|
| 13 |
+
Prism.languages.javastacktrace = {
|
| 14 |
+
// java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...]
|
| 15 |
+
// Caused by: java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...]
|
| 16 |
+
// Caused by: com.example.myproject.MyProjectServletException
|
| 17 |
+
// Caused by: MidLevelException: LowLevelException
|
| 18 |
+
// Suppressed: Resource$CloseFailException: Resource ID = 0
|
| 19 |
+
summary: {
|
| 20 |
+
pattern:
|
| 21 |
+
/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,
|
| 22 |
+
lookbehind: true,
|
| 23 |
+
inside: {
|
| 24 |
+
keyword: {
|
| 25 |
+
pattern:
|
| 26 |
+
/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,
|
| 27 |
+
lookbehind: true
|
| 28 |
+
},
|
| 29 |
+
// the current thread if the summary starts with 'Exception in thread'
|
| 30 |
+
string: {
|
| 31 |
+
pattern: /^(\s*)"[^"]*"/,
|
| 32 |
+
lookbehind: true
|
| 33 |
+
},
|
| 34 |
+
exceptions: {
|
| 35 |
+
pattern: /^(:?\s*)[\w$.]+(?=:|$)/,
|
| 36 |
+
lookbehind: true,
|
| 37 |
+
inside: {
|
| 38 |
+
'class-name': /[\w$]+$/,
|
| 39 |
+
namespace: /\b[a-z]\w*\b/,
|
| 40 |
+
punctuation: /\./
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
message: {
|
| 44 |
+
pattern: /(:\s*)\S.*/,
|
| 45 |
+
lookbehind: true,
|
| 46 |
+
alias: 'string'
|
| 47 |
+
},
|
| 48 |
+
punctuation: /:/
|
| 49 |
+
}
|
| 50 |
+
},
|
| 51 |
+
// at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
|
| 52 |
+
// at org.hsqldb.jdbc.Util.throwError(Unknown Source) here could be some notes
|
| 53 |
+
// at java.base/java.lang.Class.forName0(Native Method)
|
| 54 |
+
// at Util.<init>(Unknown Source)
|
| 55 |
+
// at com.foo.loader/foo@9.0/com.foo.Main.run(Main.java:101)
|
| 56 |
+
// at com.foo.loader//com.foo.bar.App.run(App.java:12)
|
| 57 |
+
// at acme@2.1/org.acme.Lib.test(Lib.java:80)
|
| 58 |
+
// at MyClass.mash(MyClass.java:9)
|
| 59 |
+
//
|
| 60 |
+
// More information:
|
| 61 |
+
// https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/StackTraceElement.html#toString()
|
| 62 |
+
//
|
| 63 |
+
// A valid Java module name is defined as:
|
| 64 |
+
// "A module name consists of one or more Java identifiers (§3.8) separated by "." tokens."
|
| 65 |
+
// https://docs.oracle.com/javase/specs/jls/se9/html/jls-6.html#jls-ModuleName
|
| 66 |
+
//
|
| 67 |
+
// A Java module version is defined by this class:
|
| 68 |
+
// https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleDescriptor.Version.html
|
| 69 |
+
// This is the implementation of the `parse` method in JDK13:
|
| 70 |
+
// https://github.com/matcdac/jdk/blob/2305df71d1b7710266ae0956d73927a225132c0f/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java#L1108
|
| 71 |
+
// However, to keep this simple, a version will be matched by the pattern /@[\w$.+-]*/.
|
| 72 |
+
'stack-frame': {
|
| 73 |
+
pattern: /^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,
|
| 74 |
+
lookbehind: true,
|
| 75 |
+
inside: {
|
| 76 |
+
keyword: {
|
| 77 |
+
pattern: /^(\s*)at(?= )/,
|
| 78 |
+
lookbehind: true
|
| 79 |
+
},
|
| 80 |
+
source: [
|
| 81 |
+
// (Main.java:15)
|
| 82 |
+
// (Main.scala:15)
|
| 83 |
+
{
|
| 84 |
+
pattern: /(\()\w+\.\w+:\d+(?=\))/,
|
| 85 |
+
lookbehind: true,
|
| 86 |
+
inside: {
|
| 87 |
+
file: /^\w+\.\w+/,
|
| 88 |
+
punctuation: /:/,
|
| 89 |
+
'line-number': {
|
| 90 |
+
pattern: /\b\d+\b/,
|
| 91 |
+
alias: 'number'
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
},
|
| 95 |
+
// (Unknown Source)
|
| 96 |
+
// (Native Method)
|
| 97 |
+
// (...something...)
|
| 98 |
+
{
|
| 99 |
+
pattern: /(\()[^()]*(?=\))/,
|
| 100 |
+
lookbehind: true,
|
| 101 |
+
inside: {
|
| 102 |
+
keyword: /^(?:Native Method|Unknown Source)$/
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
],
|
| 106 |
+
'class-name': /[\w$]+(?=\.(?:<init>|[\w$]+)\()/,
|
| 107 |
+
function: /(?:<init>|[\w$]+)(?=\()/,
|
| 108 |
+
'class-loader': {
|
| 109 |
+
pattern: /(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,
|
| 110 |
+
lookbehind: true,
|
| 111 |
+
alias: 'namespace',
|
| 112 |
+
inside: {
|
| 113 |
+
punctuation: /\./
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
module: {
|
| 117 |
+
pattern: /([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,
|
| 118 |
+
lookbehind: true,
|
| 119 |
+
inside: {
|
| 120 |
+
version: {
|
| 121 |
+
pattern: /(@)[\s\S]+/,
|
| 122 |
+
lookbehind: true,
|
| 123 |
+
alias: 'number'
|
| 124 |
+
},
|
| 125 |
+
punctuation: /[@.]/
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
namespace: {
|
| 129 |
+
pattern: /(?:\b[a-z]\w*\.)+/,
|
| 130 |
+
inside: {
|
| 131 |
+
punctuation: /\./
|
| 132 |
+
}
|
| 133 |
+
},
|
| 134 |
+
punctuation: /[()/.]/
|
| 135 |
+
}
|
| 136 |
+
},
|
| 137 |
+
// ... 32 more
|
| 138 |
+
// ... 32 common frames omitted
|
| 139 |
+
more: {
|
| 140 |
+
pattern: /^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,
|
| 141 |
+
lookbehind: true,
|
| 142 |
+
inside: {
|
| 143 |
+
punctuation: /\.{3}/,
|
| 144 |
+
number: /\d+/,
|
| 145 |
+
keyword: /\b[a-z]+(?: [a-z]+)*\b/
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jexl.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jexl(Prism: any): void;
|
| 3 |
+
declare namespace jexl {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jexl;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jexl.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
jexl.displayName = 'jexl'
|
| 6 |
+
jexl.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function jexl(Prism) {
|
| 10 |
+
Prism.languages.jexl = {
|
| 11 |
+
string: /(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
| 12 |
+
transform: {
|
| 13 |
+
pattern:
|
| 14 |
+
/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,
|
| 15 |
+
alias: 'function',
|
| 16 |
+
lookbehind: true
|
| 17 |
+
},
|
| 18 |
+
function:
|
| 19 |
+
/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,
|
| 20 |
+
number: /\b\d+(?:\.\d+)?\b|\B\.\d+\b/,
|
| 21 |
+
operator: /[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,
|
| 22 |
+
boolean: /\b(?:false|true)\b/,
|
| 23 |
+
keyword: /\bin\b/,
|
| 24 |
+
punctuation: /[{}[\](),.]/
|
| 25 |
+
}
|
| 26 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jolie.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jolie(Prism: any): void;
|
| 3 |
+
declare namespace jolie {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jolie;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jolie.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorClike from './clike.js'
|
| 6 |
+
jolie.displayName = 'jolie'
|
| 7 |
+
jolie.aliases = []
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function jolie(Prism) {
|
| 11 |
+
Prism.register(refractorClike)
|
| 12 |
+
Prism.languages.jolie = Prism.languages.extend('clike', {
|
| 13 |
+
string: {
|
| 14 |
+
pattern: /(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,
|
| 15 |
+
lookbehind: true,
|
| 16 |
+
greedy: true
|
| 17 |
+
},
|
| 18 |
+
'class-name': {
|
| 19 |
+
pattern:
|
| 20 |
+
/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,
|
| 21 |
+
lookbehind: true
|
| 22 |
+
},
|
| 23 |
+
keyword:
|
| 24 |
+
/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,
|
| 25 |
+
function: /\b[a-z_]\w*(?=[ \t]*[@(])/i,
|
| 26 |
+
number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,
|
| 27 |
+
operator: /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,
|
| 28 |
+
punctuation: /[()[\]{},;.:]/,
|
| 29 |
+
builtin:
|
| 30 |
+
/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/
|
| 31 |
+
})
|
| 32 |
+
Prism.languages.insertBefore('jolie', 'keyword', {
|
| 33 |
+
aggregates: {
|
| 34 |
+
pattern:
|
| 35 |
+
/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
|
| 36 |
+
lookbehind: true,
|
| 37 |
+
inside: {
|
| 38 |
+
keyword: /\bwith\b/,
|
| 39 |
+
'class-name': /\w+/,
|
| 40 |
+
punctuation: /,/
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
redirects: {
|
| 44 |
+
pattern:
|
| 45 |
+
/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
|
| 46 |
+
lookbehind: true,
|
| 47 |
+
inside: {
|
| 48 |
+
punctuation: /,/,
|
| 49 |
+
'class-name': /\w+/,
|
| 50 |
+
operator: /=>/
|
| 51 |
+
}
|
| 52 |
+
},
|
| 53 |
+
property: {
|
| 54 |
+
pattern:
|
| 55 |
+
/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/
|
| 56 |
+
}
|
| 57 |
+
})
|
| 58 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jq.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jq(Prism: any): void;
|
| 3 |
+
declare namespace jq {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jq;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jq.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
jq.displayName = 'jq'
|
| 6 |
+
jq.aliases = []
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function jq(Prism) {
|
| 10 |
+
;(function (Prism) {
|
| 11 |
+
var interpolation = /\\\((?:[^()]|\([^()]*\))*\)/.source
|
| 12 |
+
var string = RegExp(
|
| 13 |
+
/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(
|
| 14 |
+
/__/g,
|
| 15 |
+
function () {
|
| 16 |
+
return interpolation
|
| 17 |
+
}
|
| 18 |
+
)
|
| 19 |
+
)
|
| 20 |
+
var stringInterpolation = {
|
| 21 |
+
interpolation: {
|
| 22 |
+
pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + interpolation),
|
| 23 |
+
lookbehind: true,
|
| 24 |
+
inside: {
|
| 25 |
+
content: {
|
| 26 |
+
pattern: /^(\\\()[\s\S]+(?=\)$)/,
|
| 27 |
+
lookbehind: true,
|
| 28 |
+
inside: null // see below
|
| 29 |
+
},
|
| 30 |
+
punctuation: /^\\\(|\)$/
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
var jq = (Prism.languages.jq = {
|
| 35 |
+
comment: /#.*/,
|
| 36 |
+
property: {
|
| 37 |
+
pattern: RegExp(string.source + /(?=\s*:(?!:))/.source),
|
| 38 |
+
lookbehind: true,
|
| 39 |
+
greedy: true,
|
| 40 |
+
inside: stringInterpolation
|
| 41 |
+
},
|
| 42 |
+
string: {
|
| 43 |
+
pattern: string,
|
| 44 |
+
lookbehind: true,
|
| 45 |
+
greedy: true,
|
| 46 |
+
inside: stringInterpolation
|
| 47 |
+
},
|
| 48 |
+
function: {
|
| 49 |
+
pattern: /(\bdef\s+)[a-z_]\w+/i,
|
| 50 |
+
lookbehind: true
|
| 51 |
+
},
|
| 52 |
+
variable: /\B\$\w+/,
|
| 53 |
+
'property-literal': {
|
| 54 |
+
pattern: /\b[a-z_]\w*(?=\s*:(?!:))/i,
|
| 55 |
+
alias: 'property'
|
| 56 |
+
},
|
| 57 |
+
keyword:
|
| 58 |
+
/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,
|
| 59 |
+
boolean: /\b(?:false|true)\b/,
|
| 60 |
+
number: /(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,
|
| 61 |
+
operator: [
|
| 62 |
+
{
|
| 63 |
+
pattern: /\|=?/,
|
| 64 |
+
alias: 'pipe'
|
| 65 |
+
},
|
| 66 |
+
/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/
|
| 67 |
+
],
|
| 68 |
+
'c-style-function': {
|
| 69 |
+
pattern: /\b[a-z_]\w*(?=\s*\()/i,
|
| 70 |
+
alias: 'function'
|
| 71 |
+
},
|
| 72 |
+
punctuation: /::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,
|
| 73 |
+
dot: {
|
| 74 |
+
pattern: /\./,
|
| 75 |
+
alias: 'important'
|
| 76 |
+
}
|
| 77 |
+
})
|
| 78 |
+
stringInterpolation.interpolation.inside.content.inside = jq
|
| 79 |
+
})(Prism)
|
| 80 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/js-extras.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jsExtras(Prism: any): void;
|
| 3 |
+
declare namespace jsExtras {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jsExtras;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/js-extras.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorJavascript from './javascript.js'
|
| 6 |
+
jsExtras.displayName = 'js-extras'
|
| 7 |
+
jsExtras.aliases = []
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function jsExtras(Prism) {
|
| 11 |
+
Prism.register(refractorJavascript)
|
| 12 |
+
;(function (Prism) {
|
| 13 |
+
Prism.languages.insertBefore('javascript', 'function-variable', {
|
| 14 |
+
'method-variable': {
|
| 15 |
+
pattern: RegExp(
|
| 16 |
+
'(\\.\\s*)' +
|
| 17 |
+
Prism.languages.javascript['function-variable'].pattern.source
|
| 18 |
+
),
|
| 19 |
+
lookbehind: true,
|
| 20 |
+
alias: ['function-variable', 'method', 'function', 'property-access']
|
| 21 |
+
}
|
| 22 |
+
})
|
| 23 |
+
Prism.languages.insertBefore('javascript', 'function', {
|
| 24 |
+
method: {
|
| 25 |
+
pattern: RegExp(
|
| 26 |
+
'(\\.\\s*)' + Prism.languages.javascript['function'].source
|
| 27 |
+
),
|
| 28 |
+
lookbehind: true,
|
| 29 |
+
alias: ['function', 'property-access']
|
| 30 |
+
}
|
| 31 |
+
})
|
| 32 |
+
Prism.languages.insertBefore('javascript', 'constant', {
|
| 33 |
+
'known-class-name': [
|
| 34 |
+
{
|
| 35 |
+
// standard built-ins
|
| 36 |
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
|
| 37 |
+
pattern:
|
| 38 |
+
/\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/,
|
| 39 |
+
alias: 'class-name'
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
// errors
|
| 43 |
+
pattern: /\b(?:[A-Z]\w*)Error\b/,
|
| 44 |
+
alias: 'class-name'
|
| 45 |
+
}
|
| 46 |
+
]
|
| 47 |
+
})
|
| 48 |
+
|
| 49 |
+
/**
|
| 50 |
+
* Replaces the `<ID>` placeholder in the given pattern with a pattern for general JS identifiers.
|
| 51 |
+
*
|
| 52 |
+
* @param {string} source
|
| 53 |
+
* @param {string} [flags]
|
| 54 |
+
* @returns {RegExp}
|
| 55 |
+
*/
|
| 56 |
+
function withId(source, flags) {
|
| 57 |
+
return RegExp(
|
| 58 |
+
source.replace(/<ID>/g, function () {
|
| 59 |
+
return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source
|
| 60 |
+
}),
|
| 61 |
+
flags
|
| 62 |
+
)
|
| 63 |
+
}
|
| 64 |
+
Prism.languages.insertBefore('javascript', 'keyword', {
|
| 65 |
+
imports: {
|
| 66 |
+
// https://tc39.es/ecma262/#sec-imports
|
| 67 |
+
pattern: withId(
|
| 68 |
+
/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/
|
| 69 |
+
.source
|
| 70 |
+
),
|
| 71 |
+
lookbehind: true,
|
| 72 |
+
inside: Prism.languages.javascript
|
| 73 |
+
},
|
| 74 |
+
exports: {
|
| 75 |
+
// https://tc39.es/ecma262/#sec-exports
|
| 76 |
+
pattern: withId(
|
| 77 |
+
/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/
|
| 78 |
+
.source
|
| 79 |
+
),
|
| 80 |
+
lookbehind: true,
|
| 81 |
+
inside: Prism.languages.javascript
|
| 82 |
+
}
|
| 83 |
+
})
|
| 84 |
+
Prism.languages.javascript['keyword'].unshift(
|
| 85 |
+
{
|
| 86 |
+
pattern: /\b(?:as|default|export|from|import)\b/,
|
| 87 |
+
alias: 'module'
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
pattern:
|
| 91 |
+
/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
|
| 92 |
+
alias: 'control-flow'
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
pattern: /\bnull\b/,
|
| 96 |
+
alias: ['null', 'nil']
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
pattern: /\bundefined\b/,
|
| 100 |
+
alias: 'nil'
|
| 101 |
+
}
|
| 102 |
+
)
|
| 103 |
+
Prism.languages.insertBefore('javascript', 'operator', {
|
| 104 |
+
spread: {
|
| 105 |
+
pattern: /\.{3}/,
|
| 106 |
+
alias: 'operator'
|
| 107 |
+
},
|
| 108 |
+
arrow: {
|
| 109 |
+
pattern: /=>/,
|
| 110 |
+
alias: 'operator'
|
| 111 |
+
}
|
| 112 |
+
})
|
| 113 |
+
Prism.languages.insertBefore('javascript', 'punctuation', {
|
| 114 |
+
'property-access': {
|
| 115 |
+
pattern: withId(/(\.\s*)#?<ID>/.source),
|
| 116 |
+
lookbehind: true
|
| 117 |
+
},
|
| 118 |
+
'maybe-class-name': {
|
| 119 |
+
pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
|
| 120 |
+
lookbehind: true
|
| 121 |
+
},
|
| 122 |
+
dom: {
|
| 123 |
+
// this contains only a few commonly used DOM variables
|
| 124 |
+
pattern:
|
| 125 |
+
/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
|
| 126 |
+
alias: 'variable'
|
| 127 |
+
},
|
| 128 |
+
console: {
|
| 129 |
+
pattern: /\bconsole(?=\s*\.)/,
|
| 130 |
+
alias: 'class-name'
|
| 131 |
+
}
|
| 132 |
+
})
|
| 133 |
+
|
| 134 |
+
// add 'maybe-class-name' to tokens which might be a class name
|
| 135 |
+
var maybeClassNameTokens = [
|
| 136 |
+
'function',
|
| 137 |
+
'function-variable',
|
| 138 |
+
'method',
|
| 139 |
+
'method-variable',
|
| 140 |
+
'property-access'
|
| 141 |
+
]
|
| 142 |
+
for (var i = 0; i < maybeClassNameTokens.length; i++) {
|
| 143 |
+
var token = maybeClassNameTokens[i]
|
| 144 |
+
var value = Prism.languages.javascript[token]
|
| 145 |
+
|
| 146 |
+
// convert regex to object
|
| 147 |
+
if (Prism.util.type(value) === 'RegExp') {
|
| 148 |
+
value = Prism.languages.javascript[token] = {
|
| 149 |
+
pattern: value
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
// keep in mind that we don't support arrays
|
| 154 |
+
|
| 155 |
+
var inside = value.inside || {}
|
| 156 |
+
value.inside = inside
|
| 157 |
+
inside['maybe-class-name'] = /^[A-Z][\s\S]*/
|
| 158 |
+
}
|
| 159 |
+
})(Prism)
|
| 160 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/js-templates.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jsTemplates(Prism: any): void;
|
| 3 |
+
declare namespace jsTemplates {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jsTemplates;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/js-templates.js
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorJavascript from './javascript.js'
|
| 6 |
+
jsTemplates.displayName = 'js-templates'
|
| 7 |
+
jsTemplates.aliases = []
|
| 8 |
+
|
| 9 |
+
/** @param {Refractor} Prism */
|
| 10 |
+
export default function jsTemplates(Prism) {
|
| 11 |
+
Prism.register(refractorJavascript)
|
| 12 |
+
;(function (Prism) {
|
| 13 |
+
var templateString = Prism.languages.javascript['template-string']
|
| 14 |
+
|
| 15 |
+
// see the pattern in prism-javascript.js
|
| 16 |
+
var templateLiteralPattern = templateString.pattern.source
|
| 17 |
+
var interpolationObject = templateString.inside['interpolation']
|
| 18 |
+
var interpolationPunctuationObject =
|
| 19 |
+
interpolationObject.inside['interpolation-punctuation']
|
| 20 |
+
var interpolationPattern = interpolationObject.pattern.source
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* Creates a new pattern to match a template string with a special tag.
|
| 24 |
+
*
|
| 25 |
+
* This will return `undefined` if there is no grammar with the given language id.
|
| 26 |
+
*
|
| 27 |
+
* @param {string} language The language id of the embedded language. E.g. `markdown`.
|
| 28 |
+
* @param {string} tag The regex pattern to match the tag.
|
| 29 |
+
* @returns {object | undefined}
|
| 30 |
+
* @example
|
| 31 |
+
* createTemplate('css', /\bcss/.source);
|
| 32 |
+
*/
|
| 33 |
+
function createTemplate(language, tag) {
|
| 34 |
+
if (!Prism.languages[language]) {
|
| 35 |
+
return undefined
|
| 36 |
+
}
|
| 37 |
+
return {
|
| 38 |
+
pattern: RegExp('((?:' + tag + ')\\s*)' + templateLiteralPattern),
|
| 39 |
+
lookbehind: true,
|
| 40 |
+
greedy: true,
|
| 41 |
+
inside: {
|
| 42 |
+
'template-punctuation': {
|
| 43 |
+
pattern: /^`|`$/,
|
| 44 |
+
alias: 'string'
|
| 45 |
+
},
|
| 46 |
+
'embedded-code': {
|
| 47 |
+
pattern: /[\s\S]+/,
|
| 48 |
+
alias: language
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
Prism.languages.javascript['template-string'] = [
|
| 54 |
+
// styled-jsx:
|
| 55 |
+
// css`a { color: #25F; }`
|
| 56 |
+
// styled-components:
|
| 57 |
+
// styled.h1`color: red;`
|
| 58 |
+
createTemplate(
|
| 59 |
+
'css',
|
| 60 |
+
/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/
|
| 61 |
+
.source
|
| 62 |
+
),
|
| 63 |
+
// html`<p></p>`
|
| 64 |
+
// div.innerHTML = `<p></p>`
|
| 65 |
+
createTemplate('html', /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),
|
| 66 |
+
// svg`<path fill="#fff" d="M55.37 ..."/>`
|
| 67 |
+
createTemplate('svg', /\bsvg/.source),
|
| 68 |
+
// md`# h1`, markdown`## h2`
|
| 69 |
+
createTemplate('markdown', /\b(?:markdown|md)/.source),
|
| 70 |
+
// gql`...`, graphql`...`, graphql.experimental`...`
|
| 71 |
+
createTemplate(
|
| 72 |
+
'graphql',
|
| 73 |
+
/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source
|
| 74 |
+
),
|
| 75 |
+
// sql`...`
|
| 76 |
+
createTemplate('sql', /\bsql/.source),
|
| 77 |
+
// vanilla template string
|
| 78 |
+
templateString
|
| 79 |
+
].filter(Boolean)
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* Returns a specific placeholder literal for the given language.
|
| 83 |
+
*
|
| 84 |
+
* @param {number} counter
|
| 85 |
+
* @param {string} language
|
| 86 |
+
* @returns {string}
|
| 87 |
+
*/
|
| 88 |
+
function getPlaceholder(counter, language) {
|
| 89 |
+
return '___' + language.toUpperCase() + '_' + counter + '___'
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
/**
|
| 93 |
+
* Returns the tokens of `Prism.tokenize` but also runs the `before-tokenize` and `after-tokenize` hooks.
|
| 94 |
+
*
|
| 95 |
+
* @param {string} code
|
| 96 |
+
* @param {any} grammar
|
| 97 |
+
* @param {string} language
|
| 98 |
+
* @returns {(string|Token)[]}
|
| 99 |
+
*/
|
| 100 |
+
function tokenizeWithHooks(code, grammar, language) {
|
| 101 |
+
var env = {
|
| 102 |
+
code: code,
|
| 103 |
+
grammar: grammar,
|
| 104 |
+
language: language
|
| 105 |
+
}
|
| 106 |
+
Prism.hooks.run('before-tokenize', env)
|
| 107 |
+
env.tokens = Prism.tokenize(env.code, env.grammar)
|
| 108 |
+
Prism.hooks.run('after-tokenize', env)
|
| 109 |
+
return env.tokens
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* Returns the token of the given JavaScript interpolation expression.
|
| 114 |
+
*
|
| 115 |
+
* @param {string} expression The code of the expression. E.g. `"${42}"`
|
| 116 |
+
* @returns {Token}
|
| 117 |
+
*/
|
| 118 |
+
function tokenizeInterpolationExpression(expression) {
|
| 119 |
+
var tempGrammar = {}
|
| 120 |
+
tempGrammar['interpolation-punctuation'] = interpolationPunctuationObject
|
| 121 |
+
|
| 122 |
+
/** @type {Array} */
|
| 123 |
+
var tokens = Prism.tokenize(expression, tempGrammar)
|
| 124 |
+
if (tokens.length === 3) {
|
| 125 |
+
/**
|
| 126 |
+
* The token array will look like this
|
| 127 |
+
* [
|
| 128 |
+
* ["interpolation-punctuation", "${"]
|
| 129 |
+
* "..." // JavaScript expression of the interpolation
|
| 130 |
+
* ["interpolation-punctuation", "}"]
|
| 131 |
+
* ]
|
| 132 |
+
*/
|
| 133 |
+
|
| 134 |
+
var args = [1, 1]
|
| 135 |
+
args.push.apply(
|
| 136 |
+
args,
|
| 137 |
+
tokenizeWithHooks(tokens[1], Prism.languages.javascript, 'javascript')
|
| 138 |
+
)
|
| 139 |
+
tokens.splice.apply(tokens, args)
|
| 140 |
+
}
|
| 141 |
+
return new Prism.Token(
|
| 142 |
+
'interpolation',
|
| 143 |
+
tokens,
|
| 144 |
+
interpolationObject.alias,
|
| 145 |
+
expression
|
| 146 |
+
)
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
/**
|
| 150 |
+
* Tokenizes the given code with support for JavaScript interpolation expressions mixed in.
|
| 151 |
+
*
|
| 152 |
+
* This function has 3 phases:
|
| 153 |
+
*
|
| 154 |
+
* 1. Replace all JavaScript interpolation expression with a placeholder.
|
| 155 |
+
* The placeholder will have the syntax of a identify of the target language.
|
| 156 |
+
* 2. Tokenize the code with placeholders.
|
| 157 |
+
* 3. Tokenize the interpolation expressions and re-insert them into the tokenize code.
|
| 158 |
+
* The insertion only works if a placeholder hasn't been "ripped apart" meaning that the placeholder has been
|
| 159 |
+
* tokenized as two tokens by the grammar of the embedded language.
|
| 160 |
+
*
|
| 161 |
+
* @param {string} code
|
| 162 |
+
* @param {object} grammar
|
| 163 |
+
* @param {string} language
|
| 164 |
+
* @returns {Token}
|
| 165 |
+
*/
|
| 166 |
+
function tokenizeEmbedded(code, grammar, language) {
|
| 167 |
+
// 1. First filter out all interpolations
|
| 168 |
+
|
| 169 |
+
// because they might be escaped, we need a lookbehind, so we use Prism
|
| 170 |
+
/** @type {(Token|string)[]} */
|
| 171 |
+
var _tokens = Prism.tokenize(code, {
|
| 172 |
+
interpolation: {
|
| 173 |
+
pattern: RegExp(interpolationPattern),
|
| 174 |
+
lookbehind: true
|
| 175 |
+
}
|
| 176 |
+
})
|
| 177 |
+
|
| 178 |
+
// replace all interpolations with a placeholder which is not in the code already
|
| 179 |
+
var placeholderCounter = 0
|
| 180 |
+
/** @type {Object<string, string>} */
|
| 181 |
+
var placeholderMap = {}
|
| 182 |
+
var embeddedCode = _tokens
|
| 183 |
+
.map(function (token) {
|
| 184 |
+
if (typeof token === 'string') {
|
| 185 |
+
return token
|
| 186 |
+
} else {
|
| 187 |
+
var interpolationExpression = token.content
|
| 188 |
+
var placeholder
|
| 189 |
+
while (
|
| 190 |
+
code.indexOf(
|
| 191 |
+
(placeholder = getPlaceholder(placeholderCounter++, language))
|
| 192 |
+
) !== -1
|
| 193 |
+
) {
|
| 194 |
+
/* noop */
|
| 195 |
+
}
|
| 196 |
+
placeholderMap[placeholder] = interpolationExpression
|
| 197 |
+
return placeholder
|
| 198 |
+
}
|
| 199 |
+
})
|
| 200 |
+
.join('')
|
| 201 |
+
|
| 202 |
+
// 2. Tokenize the embedded code
|
| 203 |
+
|
| 204 |
+
var embeddedTokens = tokenizeWithHooks(embeddedCode, grammar, language)
|
| 205 |
+
|
| 206 |
+
// 3. Re-insert the interpolation
|
| 207 |
+
|
| 208 |
+
var placeholders = Object.keys(placeholderMap)
|
| 209 |
+
placeholderCounter = 0
|
| 210 |
+
|
| 211 |
+
/**
|
| 212 |
+
*
|
| 213 |
+
* @param {(Token|string)[]} tokens
|
| 214 |
+
* @returns {void}
|
| 215 |
+
*/
|
| 216 |
+
function walkTokens(tokens) {
|
| 217 |
+
for (var i = 0; i < tokens.length; i++) {
|
| 218 |
+
if (placeholderCounter >= placeholders.length) {
|
| 219 |
+
return
|
| 220 |
+
}
|
| 221 |
+
var token = tokens[i]
|
| 222 |
+
if (typeof token === 'string' || typeof token.content === 'string') {
|
| 223 |
+
var placeholder = placeholders[placeholderCounter]
|
| 224 |
+
var s =
|
| 225 |
+
typeof token === 'string'
|
| 226 |
+
? token
|
| 227 |
+
: /** @type {string} */ token.content
|
| 228 |
+
var index = s.indexOf(placeholder)
|
| 229 |
+
if (index !== -1) {
|
| 230 |
+
++placeholderCounter
|
| 231 |
+
var before = s.substring(0, index)
|
| 232 |
+
var middle = tokenizeInterpolationExpression(
|
| 233 |
+
placeholderMap[placeholder]
|
| 234 |
+
)
|
| 235 |
+
var after = s.substring(index + placeholder.length)
|
| 236 |
+
var replacement = []
|
| 237 |
+
if (before) {
|
| 238 |
+
replacement.push(before)
|
| 239 |
+
}
|
| 240 |
+
replacement.push(middle)
|
| 241 |
+
if (after) {
|
| 242 |
+
var afterTokens = [after]
|
| 243 |
+
walkTokens(afterTokens)
|
| 244 |
+
replacement.push.apply(replacement, afterTokens)
|
| 245 |
+
}
|
| 246 |
+
if (typeof token === 'string') {
|
| 247 |
+
tokens.splice.apply(tokens, [i, 1].concat(replacement))
|
| 248 |
+
i += replacement.length - 1
|
| 249 |
+
} else {
|
| 250 |
+
token.content = replacement
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
} else {
|
| 254 |
+
var content = token.content
|
| 255 |
+
if (Array.isArray(content)) {
|
| 256 |
+
walkTokens(content)
|
| 257 |
+
} else {
|
| 258 |
+
walkTokens([content])
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
}
|
| 263 |
+
walkTokens(embeddedTokens)
|
| 264 |
+
return new Prism.Token(
|
| 265 |
+
language,
|
| 266 |
+
embeddedTokens,
|
| 267 |
+
'language-' + language,
|
| 268 |
+
code
|
| 269 |
+
)
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
/**
|
| 273 |
+
* The languages for which JS templating will handle tagged template literals.
|
| 274 |
+
*
|
| 275 |
+
* JS templating isn't active for only JavaScript but also related languages like TypeScript, JSX, and TSX.
|
| 276 |
+
*/
|
| 277 |
+
var supportedLanguages = {
|
| 278 |
+
javascript: true,
|
| 279 |
+
js: true,
|
| 280 |
+
typescript: true,
|
| 281 |
+
ts: true,
|
| 282 |
+
jsx: true,
|
| 283 |
+
tsx: true
|
| 284 |
+
}
|
| 285 |
+
Prism.hooks.add('after-tokenize', function (env) {
|
| 286 |
+
if (!(env.language in supportedLanguages)) {
|
| 287 |
+
return
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
/**
|
| 291 |
+
* Finds and tokenizes all template strings with an embedded languages.
|
| 292 |
+
*
|
| 293 |
+
* @param {(Token | string)[]} tokens
|
| 294 |
+
* @returns {void}
|
| 295 |
+
*/
|
| 296 |
+
function findTemplateStrings(tokens) {
|
| 297 |
+
for (var i = 0, l = tokens.length; i < l; i++) {
|
| 298 |
+
var token = tokens[i]
|
| 299 |
+
if (typeof token === 'string') {
|
| 300 |
+
continue
|
| 301 |
+
}
|
| 302 |
+
var content = token.content
|
| 303 |
+
if (!Array.isArray(content)) {
|
| 304 |
+
if (typeof content !== 'string') {
|
| 305 |
+
findTemplateStrings([content])
|
| 306 |
+
}
|
| 307 |
+
continue
|
| 308 |
+
}
|
| 309 |
+
if (token.type === 'template-string') {
|
| 310 |
+
/**
|
| 311 |
+
* A JavaScript template-string token will look like this:
|
| 312 |
+
*
|
| 313 |
+
* ["template-string", [
|
| 314 |
+
* ["template-punctuation", "`"],
|
| 315 |
+
* (
|
| 316 |
+
* An array of "string" and "interpolation" tokens. This is the simple string case.
|
| 317 |
+
* or
|
| 318 |
+
* ["embedded-code", "..."] This is the token containing the embedded code.
|
| 319 |
+
* It also has an alias which is the language of the embedded code.
|
| 320 |
+
* ),
|
| 321 |
+
* ["template-punctuation", "`"]
|
| 322 |
+
* ]]
|
| 323 |
+
*/
|
| 324 |
+
|
| 325 |
+
var embedded = content[1]
|
| 326 |
+
if (
|
| 327 |
+
content.length === 3 &&
|
| 328 |
+
typeof embedded !== 'string' &&
|
| 329 |
+
embedded.type === 'embedded-code'
|
| 330 |
+
) {
|
| 331 |
+
// get string content
|
| 332 |
+
var code = stringContent(embedded)
|
| 333 |
+
var alias = embedded.alias
|
| 334 |
+
var language = Array.isArray(alias) ? alias[0] : alias
|
| 335 |
+
var grammar = Prism.languages[language]
|
| 336 |
+
if (!grammar) {
|
| 337 |
+
// the embedded language isn't registered.
|
| 338 |
+
continue
|
| 339 |
+
}
|
| 340 |
+
content[1] = tokenizeEmbedded(code, grammar, language)
|
| 341 |
+
}
|
| 342 |
+
} else {
|
| 343 |
+
findTemplateStrings(content)
|
| 344 |
+
}
|
| 345 |
+
}
|
| 346 |
+
}
|
| 347 |
+
findTemplateStrings(env.tokens)
|
| 348 |
+
})
|
| 349 |
+
|
| 350 |
+
/**
|
| 351 |
+
* Returns the string content of a token or token stream.
|
| 352 |
+
*
|
| 353 |
+
* @param {string | Token | (string | Token)[]} value
|
| 354 |
+
* @returns {string}
|
| 355 |
+
*/
|
| 356 |
+
function stringContent(value) {
|
| 357 |
+
if (typeof value === 'string') {
|
| 358 |
+
return value
|
| 359 |
+
} else if (Array.isArray(value)) {
|
| 360 |
+
return value.map(stringContent).join('')
|
| 361 |
+
} else {
|
| 362 |
+
return stringContent(value.content)
|
| 363 |
+
}
|
| 364 |
+
}
|
| 365 |
+
})(Prism)
|
| 366 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jsdoc.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function jsdoc(Prism: any): void;
|
| 3 |
+
declare namespace jsdoc {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default jsdoc;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/jsdoc.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
import refractorJavadoclike from './javadoclike.js'
|
| 6 |
+
import refractorJavascript from './javascript.js'
|
| 7 |
+
import refractorTypescript from './typescript.js'
|
| 8 |
+
jsdoc.displayName = 'jsdoc'
|
| 9 |
+
jsdoc.aliases = []
|
| 10 |
+
|
| 11 |
+
/** @param {Refractor} Prism */
|
| 12 |
+
export default function jsdoc(Prism) {
|
| 13 |
+
Prism.register(refractorJavadoclike)
|
| 14 |
+
Prism.register(refractorJavascript)
|
| 15 |
+
Prism.register(refractorTypescript)
|
| 16 |
+
;(function (Prism) {
|
| 17 |
+
var javascript = Prism.languages.javascript
|
| 18 |
+
var type = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source
|
| 19 |
+
var parameterPrefix =
|
| 20 |
+
'(@(?:arg|argument|param|property)\\s+(?:' + type + '\\s+)?)'
|
| 21 |
+
Prism.languages.jsdoc = Prism.languages.extend('javadoclike', {
|
| 22 |
+
parameter: {
|
| 23 |
+
// @param {string} foo - foo bar
|
| 24 |
+
pattern: RegExp(
|
| 25 |
+
parameterPrefix + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source
|
| 26 |
+
),
|
| 27 |
+
lookbehind: true,
|
| 28 |
+
inside: {
|
| 29 |
+
punctuation: /\./
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
})
|
| 33 |
+
Prism.languages.insertBefore('jsdoc', 'keyword', {
|
| 34 |
+
'optional-parameter': {
|
| 35 |
+
// @param {string} [baz.foo="bar"] foo bar
|
| 36 |
+
pattern: RegExp(
|
| 37 |
+
parameterPrefix +
|
| 38 |
+
/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source
|
| 39 |
+
),
|
| 40 |
+
lookbehind: true,
|
| 41 |
+
inside: {
|
| 42 |
+
parameter: {
|
| 43 |
+
pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/,
|
| 44 |
+
lookbehind: true,
|
| 45 |
+
inside: {
|
| 46 |
+
punctuation: /\./
|
| 47 |
+
}
|
| 48 |
+
},
|
| 49 |
+
code: {
|
| 50 |
+
pattern: /(=)[\s\S]*(?=\]$)/,
|
| 51 |
+
lookbehind: true,
|
| 52 |
+
inside: javascript,
|
| 53 |
+
alias: 'language-javascript'
|
| 54 |
+
},
|
| 55 |
+
punctuation: /[=[\]]/
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
'class-name': [
|
| 59 |
+
{
|
| 60 |
+
pattern: RegExp(
|
| 61 |
+
/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(
|
| 62 |
+
/<TYPE>/g,
|
| 63 |
+
function () {
|
| 64 |
+
return type
|
| 65 |
+
}
|
| 66 |
+
)
|
| 67 |
+
),
|
| 68 |
+
lookbehind: true,
|
| 69 |
+
inside: {
|
| 70 |
+
punctuation: /\./
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
pattern: RegExp('(@[a-z]+\\s+)' + type),
|
| 75 |
+
lookbehind: true,
|
| 76 |
+
inside: {
|
| 77 |
+
string: javascript.string,
|
| 78 |
+
number: javascript.number,
|
| 79 |
+
boolean: javascript.boolean,
|
| 80 |
+
keyword: Prism.languages.typescript.keyword,
|
| 81 |
+
operator: /=>|\.\.\.|[&|?:*]/,
|
| 82 |
+
punctuation: /[.,;=<>{}()[\]]/
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
],
|
| 86 |
+
example: {
|
| 87 |
+
pattern:
|
| 88 |
+
/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,
|
| 89 |
+
lookbehind: true,
|
| 90 |
+
inside: {
|
| 91 |
+
code: {
|
| 92 |
+
pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m,
|
| 93 |
+
lookbehind: true,
|
| 94 |
+
inside: javascript,
|
| 95 |
+
alias: 'language-javascript'
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
})
|
| 100 |
+
Prism.languages.javadoclike.addSupport('javascript', Prism.languages.jsdoc)
|
| 101 |
+
})(Prism)
|
| 102 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/json.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function json(Prism: any): void;
|
| 3 |
+
declare namespace json {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: string[];
|
| 6 |
+
}
|
| 7 |
+
export default json;
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/json.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// @ts-nocheck
|
| 2 |
+
/**
|
| 3 |
+
* @import {Refractor} from '../lib/core.js'
|
| 4 |
+
*/
|
| 5 |
+
json.displayName = 'json'
|
| 6 |
+
json.aliases = ['webmanifest']
|
| 7 |
+
|
| 8 |
+
/** @param {Refractor} Prism */
|
| 9 |
+
export default function json(Prism) {
|
| 10 |
+
// https://www.json.org/json-en.html
|
| 11 |
+
Prism.languages.json = {
|
| 12 |
+
property: {
|
| 13 |
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
| 14 |
+
lookbehind: true,
|
| 15 |
+
greedy: true
|
| 16 |
+
},
|
| 17 |
+
string: {
|
| 18 |
+
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
|
| 19 |
+
lookbehind: true,
|
| 20 |
+
greedy: true
|
| 21 |
+
},
|
| 22 |
+
comment: {
|
| 23 |
+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
| 24 |
+
greedy: true
|
| 25 |
+
},
|
| 26 |
+
number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
| 27 |
+
punctuation: /[{}[\],]/,
|
| 28 |
+
operator: /:/,
|
| 29 |
+
boolean: /\b(?:false|true)\b/,
|
| 30 |
+
null: {
|
| 31 |
+
pattern: /\bnull\b/,
|
| 32 |
+
alias: 'keyword'
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
Prism.languages.webmanifest = Prism.languages.json
|
| 36 |
+
}
|
loan-advisor-chatgpt-app/node_modules/refractor/lang/json5.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('../core.js').Syntax} */
|
| 2 |
+
declare function json5(Prism: any): void;
|
| 3 |
+
declare namespace json5 {
|
| 4 |
+
let displayName: string;
|
| 5 |
+
let aliases: any[];
|
| 6 |
+
}
|
| 7 |
+
export default json5;
|