Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/int.js +156 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/map.js +8 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/merge.js +12 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/null.js +35 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/omap.js +44 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/pairs.js +53 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/seq.js +8 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/set.js +29 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/str.js +8 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/jsesc/bin/jsesc +148 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/jsesc/man/jsesc.1 +94 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-buffer/test/index.js +63 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js +7 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/nested.js +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/str.js +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js +7 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/cmp.js +11 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/nested.js +42 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/replacer.js +74 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/space.js +59 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/str.js +32 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/to-json.js +20 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.js +1737 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.min.js +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.min.mjs +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.mjs +1426 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/cli.js +152 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/index.d.ts +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/index.js +9 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/parse.d.ts +15 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/parse.js +1114 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/register.js +13 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/require.js +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/stringify.d.ts +89 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/stringify.js +261 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/unicode.d.ts +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/unicode.js +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/util.d.ts +5 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/util.js +35 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/keyv/src/index.d.ts +112 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/keyv/src/index.js +259 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/levn/lib/cast.js +327 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/levn/lib/index.js +22 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/levn/lib/parse-string.js +113 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/lightningcss/node/ast.d.ts +0 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/lightningcss/node/ast.js.flow +0 -0
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/int.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var common = require('../common');
|
| 4 |
+
var Type = require('../type');
|
| 5 |
+
|
| 6 |
+
function isHexCode(c) {
|
| 7 |
+
return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
|
| 8 |
+
((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
|
| 9 |
+
((0x61/* a */ <= c) && (c <= 0x66/* f */));
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
function isOctCode(c) {
|
| 13 |
+
return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
function isDecCode(c) {
|
| 17 |
+
return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
function resolveYamlInteger(data) {
|
| 21 |
+
if (data === null) return false;
|
| 22 |
+
|
| 23 |
+
var max = data.length,
|
| 24 |
+
index = 0,
|
| 25 |
+
hasDigits = false,
|
| 26 |
+
ch;
|
| 27 |
+
|
| 28 |
+
if (!max) return false;
|
| 29 |
+
|
| 30 |
+
ch = data[index];
|
| 31 |
+
|
| 32 |
+
// sign
|
| 33 |
+
if (ch === '-' || ch === '+') {
|
| 34 |
+
ch = data[++index];
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
if (ch === '0') {
|
| 38 |
+
// 0
|
| 39 |
+
if (index + 1 === max) return true;
|
| 40 |
+
ch = data[++index];
|
| 41 |
+
|
| 42 |
+
// base 2, base 8, base 16
|
| 43 |
+
|
| 44 |
+
if (ch === 'b') {
|
| 45 |
+
// base 2
|
| 46 |
+
index++;
|
| 47 |
+
|
| 48 |
+
for (; index < max; index++) {
|
| 49 |
+
ch = data[index];
|
| 50 |
+
if (ch === '_') continue;
|
| 51 |
+
if (ch !== '0' && ch !== '1') return false;
|
| 52 |
+
hasDigits = true;
|
| 53 |
+
}
|
| 54 |
+
return hasDigits && ch !== '_';
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
if (ch === 'x') {
|
| 59 |
+
// base 16
|
| 60 |
+
index++;
|
| 61 |
+
|
| 62 |
+
for (; index < max; index++) {
|
| 63 |
+
ch = data[index];
|
| 64 |
+
if (ch === '_') continue;
|
| 65 |
+
if (!isHexCode(data.charCodeAt(index))) return false;
|
| 66 |
+
hasDigits = true;
|
| 67 |
+
}
|
| 68 |
+
return hasDigits && ch !== '_';
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
if (ch === 'o') {
|
| 73 |
+
// base 8
|
| 74 |
+
index++;
|
| 75 |
+
|
| 76 |
+
for (; index < max; index++) {
|
| 77 |
+
ch = data[index];
|
| 78 |
+
if (ch === '_') continue;
|
| 79 |
+
if (!isOctCode(data.charCodeAt(index))) return false;
|
| 80 |
+
hasDigits = true;
|
| 81 |
+
}
|
| 82 |
+
return hasDigits && ch !== '_';
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
// base 10 (except 0)
|
| 87 |
+
|
| 88 |
+
// value should not start with `_`;
|
| 89 |
+
if (ch === '_') return false;
|
| 90 |
+
|
| 91 |
+
for (; index < max; index++) {
|
| 92 |
+
ch = data[index];
|
| 93 |
+
if (ch === '_') continue;
|
| 94 |
+
if (!isDecCode(data.charCodeAt(index))) {
|
| 95 |
+
return false;
|
| 96 |
+
}
|
| 97 |
+
hasDigits = true;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
// Should have digits and should not end with `_`
|
| 101 |
+
if (!hasDigits || ch === '_') return false;
|
| 102 |
+
|
| 103 |
+
return true;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
function constructYamlInteger(data) {
|
| 107 |
+
var value = data, sign = 1, ch;
|
| 108 |
+
|
| 109 |
+
if (value.indexOf('_') !== -1) {
|
| 110 |
+
value = value.replace(/_/g, '');
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
ch = value[0];
|
| 114 |
+
|
| 115 |
+
if (ch === '-' || ch === '+') {
|
| 116 |
+
if (ch === '-') sign = -1;
|
| 117 |
+
value = value.slice(1);
|
| 118 |
+
ch = value[0];
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
if (value === '0') return 0;
|
| 122 |
+
|
| 123 |
+
if (ch === '0') {
|
| 124 |
+
if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
|
| 125 |
+
if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);
|
| 126 |
+
if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
return sign * parseInt(value, 10);
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
function isInteger(object) {
|
| 133 |
+
return (Object.prototype.toString.call(object)) === '[object Number]' &&
|
| 134 |
+
(object % 1 === 0 && !common.isNegativeZero(object));
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
module.exports = new Type('tag:yaml.org,2002:int', {
|
| 138 |
+
kind: 'scalar',
|
| 139 |
+
resolve: resolveYamlInteger,
|
| 140 |
+
construct: constructYamlInteger,
|
| 141 |
+
predicate: isInteger,
|
| 142 |
+
represent: {
|
| 143 |
+
binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },
|
| 144 |
+
octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },
|
| 145 |
+
decimal: function (obj) { return obj.toString(10); },
|
| 146 |
+
/* eslint-disable max-len */
|
| 147 |
+
hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
|
| 148 |
+
},
|
| 149 |
+
defaultStyle: 'decimal',
|
| 150 |
+
styleAliases: {
|
| 151 |
+
binary: [ 2, 'bin' ],
|
| 152 |
+
octal: [ 8, 'oct' ],
|
| 153 |
+
decimal: [ 10, 'dec' ],
|
| 154 |
+
hexadecimal: [ 16, 'hex' ]
|
| 155 |
+
}
|
| 156 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/map.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
module.exports = new Type('tag:yaml.org,2002:map', {
|
| 6 |
+
kind: 'mapping',
|
| 7 |
+
construct: function (data) { return data !== null ? data : {}; }
|
| 8 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/merge.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
function resolveYamlMerge(data) {
|
| 6 |
+
return data === '<<' || data === null;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
module.exports = new Type('tag:yaml.org,2002:merge', {
|
| 10 |
+
kind: 'scalar',
|
| 11 |
+
resolve: resolveYamlMerge
|
| 12 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/null.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
function resolveYamlNull(data) {
|
| 6 |
+
if (data === null) return true;
|
| 7 |
+
|
| 8 |
+
var max = data.length;
|
| 9 |
+
|
| 10 |
+
return (max === 1 && data === '~') ||
|
| 11 |
+
(max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
function constructYamlNull() {
|
| 15 |
+
return null;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
function isNull(object) {
|
| 19 |
+
return object === null;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
module.exports = new Type('tag:yaml.org,2002:null', {
|
| 23 |
+
kind: 'scalar',
|
| 24 |
+
resolve: resolveYamlNull,
|
| 25 |
+
construct: constructYamlNull,
|
| 26 |
+
predicate: isNull,
|
| 27 |
+
represent: {
|
| 28 |
+
canonical: function () { return '~'; },
|
| 29 |
+
lowercase: function () { return 'null'; },
|
| 30 |
+
uppercase: function () { return 'NULL'; },
|
| 31 |
+
camelcase: function () { return 'Null'; },
|
| 32 |
+
empty: function () { return ''; }
|
| 33 |
+
},
|
| 34 |
+
defaultStyle: 'lowercase'
|
| 35 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/omap.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
| 6 |
+
var _toString = Object.prototype.toString;
|
| 7 |
+
|
| 8 |
+
function resolveYamlOmap(data) {
|
| 9 |
+
if (data === null) return true;
|
| 10 |
+
|
| 11 |
+
var objectKeys = [], index, length, pair, pairKey, pairHasKey,
|
| 12 |
+
object = data;
|
| 13 |
+
|
| 14 |
+
for (index = 0, length = object.length; index < length; index += 1) {
|
| 15 |
+
pair = object[index];
|
| 16 |
+
pairHasKey = false;
|
| 17 |
+
|
| 18 |
+
if (_toString.call(pair) !== '[object Object]') return false;
|
| 19 |
+
|
| 20 |
+
for (pairKey in pair) {
|
| 21 |
+
if (_hasOwnProperty.call(pair, pairKey)) {
|
| 22 |
+
if (!pairHasKey) pairHasKey = true;
|
| 23 |
+
else return false;
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if (!pairHasKey) return false;
|
| 28 |
+
|
| 29 |
+
if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
|
| 30 |
+
else return false;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
return true;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
function constructYamlOmap(data) {
|
| 37 |
+
return data !== null ? data : [];
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
module.exports = new Type('tag:yaml.org,2002:omap', {
|
| 41 |
+
kind: 'sequence',
|
| 42 |
+
resolve: resolveYamlOmap,
|
| 43 |
+
construct: constructYamlOmap
|
| 44 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/pairs.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
var _toString = Object.prototype.toString;
|
| 6 |
+
|
| 7 |
+
function resolveYamlPairs(data) {
|
| 8 |
+
if (data === null) return true;
|
| 9 |
+
|
| 10 |
+
var index, length, pair, keys, result,
|
| 11 |
+
object = data;
|
| 12 |
+
|
| 13 |
+
result = new Array(object.length);
|
| 14 |
+
|
| 15 |
+
for (index = 0, length = object.length; index < length; index += 1) {
|
| 16 |
+
pair = object[index];
|
| 17 |
+
|
| 18 |
+
if (_toString.call(pair) !== '[object Object]') return false;
|
| 19 |
+
|
| 20 |
+
keys = Object.keys(pair);
|
| 21 |
+
|
| 22 |
+
if (keys.length !== 1) return false;
|
| 23 |
+
|
| 24 |
+
result[index] = [ keys[0], pair[keys[0]] ];
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
return true;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
function constructYamlPairs(data) {
|
| 31 |
+
if (data === null) return [];
|
| 32 |
+
|
| 33 |
+
var index, length, pair, keys, result,
|
| 34 |
+
object = data;
|
| 35 |
+
|
| 36 |
+
result = new Array(object.length);
|
| 37 |
+
|
| 38 |
+
for (index = 0, length = object.length; index < length; index += 1) {
|
| 39 |
+
pair = object[index];
|
| 40 |
+
|
| 41 |
+
keys = Object.keys(pair);
|
| 42 |
+
|
| 43 |
+
result[index] = [ keys[0], pair[keys[0]] ];
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
return result;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
module.exports = new Type('tag:yaml.org,2002:pairs', {
|
| 50 |
+
kind: 'sequence',
|
| 51 |
+
resolve: resolveYamlPairs,
|
| 52 |
+
construct: constructYamlPairs
|
| 53 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/seq.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
module.exports = new Type('tag:yaml.org,2002:seq', {
|
| 6 |
+
kind: 'sequence',
|
| 7 |
+
construct: function (data) { return data !== null ? data : []; }
|
| 8 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/set.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
| 6 |
+
|
| 7 |
+
function resolveYamlSet(data) {
|
| 8 |
+
if (data === null) return true;
|
| 9 |
+
|
| 10 |
+
var key, object = data;
|
| 11 |
+
|
| 12 |
+
for (key in object) {
|
| 13 |
+
if (_hasOwnProperty.call(object, key)) {
|
| 14 |
+
if (object[key] !== null) return false;
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
return true;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
function constructYamlSet(data) {
|
| 22 |
+
return data !== null ? data : {};
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
module.exports = new Type('tag:yaml.org,2002:set', {
|
| 26 |
+
kind: 'mapping',
|
| 27 |
+
resolve: resolveYamlSet,
|
| 28 |
+
construct: constructYamlSet
|
| 29 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/str.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
module.exports = new Type('tag:yaml.org,2002:str', {
|
| 6 |
+
kind: 'scalar',
|
| 7 |
+
construct: function (data) { return data !== null ? data : ''; }
|
| 8 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/js-yaml/lib/type/timestamp.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var Type = require('../type');
|
| 4 |
+
|
| 5 |
+
var YAML_DATE_REGEXP = new RegExp(
|
| 6 |
+
'^([0-9][0-9][0-9][0-9])' + // [1] year
|
| 7 |
+
'-([0-9][0-9])' + // [2] month
|
| 8 |
+
'-([0-9][0-9])$'); // [3] day
|
| 9 |
+
|
| 10 |
+
var YAML_TIMESTAMP_REGEXP = new RegExp(
|
| 11 |
+
'^([0-9][0-9][0-9][0-9])' + // [1] year
|
| 12 |
+
'-([0-9][0-9]?)' + // [2] month
|
| 13 |
+
'-([0-9][0-9]?)' + // [3] day
|
| 14 |
+
'(?:[Tt]|[ \\t]+)' + // ...
|
| 15 |
+
'([0-9][0-9]?)' + // [4] hour
|
| 16 |
+
':([0-9][0-9])' + // [5] minute
|
| 17 |
+
':([0-9][0-9])' + // [6] second
|
| 18 |
+
'(?:\\.([0-9]*))?' + // [7] fraction
|
| 19 |
+
'(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
|
| 20 |
+
'(?::([0-9][0-9]))?))?$'); // [11] tz_minute
|
| 21 |
+
|
| 22 |
+
function resolveYamlTimestamp(data) {
|
| 23 |
+
if (data === null) return false;
|
| 24 |
+
if (YAML_DATE_REGEXP.exec(data) !== null) return true;
|
| 25 |
+
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
|
| 26 |
+
return false;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
function constructYamlTimestamp(data) {
|
| 30 |
+
var match, year, month, day, hour, minute, second, fraction = 0,
|
| 31 |
+
delta = null, tz_hour, tz_minute, date;
|
| 32 |
+
|
| 33 |
+
match = YAML_DATE_REGEXP.exec(data);
|
| 34 |
+
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
|
| 35 |
+
|
| 36 |
+
if (match === null) throw new Error('Date resolve error');
|
| 37 |
+
|
| 38 |
+
// match: [1] year [2] month [3] day
|
| 39 |
+
|
| 40 |
+
year = +(match[1]);
|
| 41 |
+
month = +(match[2]) - 1; // JS month starts with 0
|
| 42 |
+
day = +(match[3]);
|
| 43 |
+
|
| 44 |
+
if (!match[4]) { // no hour
|
| 45 |
+
return new Date(Date.UTC(year, month, day));
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
// match: [4] hour [5] minute [6] second [7] fraction
|
| 49 |
+
|
| 50 |
+
hour = +(match[4]);
|
| 51 |
+
minute = +(match[5]);
|
| 52 |
+
second = +(match[6]);
|
| 53 |
+
|
| 54 |
+
if (match[7]) {
|
| 55 |
+
fraction = match[7].slice(0, 3);
|
| 56 |
+
while (fraction.length < 3) { // milli-seconds
|
| 57 |
+
fraction += '0';
|
| 58 |
+
}
|
| 59 |
+
fraction = +fraction;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
// match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
|
| 63 |
+
|
| 64 |
+
if (match[9]) {
|
| 65 |
+
tz_hour = +(match[10]);
|
| 66 |
+
tz_minute = +(match[11] || 0);
|
| 67 |
+
delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
|
| 68 |
+
if (match[9] === '-') delta = -delta;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
| 72 |
+
|
| 73 |
+
if (delta) date.setTime(date.getTime() - delta);
|
| 74 |
+
|
| 75 |
+
return date;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
function representYamlTimestamp(object /*, style*/) {
|
| 79 |
+
return object.toISOString();
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
module.exports = new Type('tag:yaml.org,2002:timestamp', {
|
| 83 |
+
kind: 'scalar',
|
| 84 |
+
resolve: resolveYamlTimestamp,
|
| 85 |
+
construct: constructYamlTimestamp,
|
| 86 |
+
instanceOf: Date,
|
| 87 |
+
represent: representYamlTimestamp
|
| 88 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/jsesc/bin/jsesc
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
(function() {
|
| 3 |
+
|
| 4 |
+
var fs = require('fs');
|
| 5 |
+
var stringEscape = require('../jsesc.js');
|
| 6 |
+
var strings = process.argv.splice(2);
|
| 7 |
+
var stdin = process.stdin;
|
| 8 |
+
var data;
|
| 9 |
+
var timeout;
|
| 10 |
+
var isObject = false;
|
| 11 |
+
var options = {};
|
| 12 |
+
var log = console.log;
|
| 13 |
+
|
| 14 |
+
var main = function() {
|
| 15 |
+
var option = strings[0];
|
| 16 |
+
|
| 17 |
+
if (/^(?:-h|--help|undefined)$/.test(option)) {
|
| 18 |
+
log(
|
| 19 |
+
'jsesc v%s - https://mths.be/jsesc',
|
| 20 |
+
stringEscape.version
|
| 21 |
+
);
|
| 22 |
+
log([
|
| 23 |
+
'\nUsage:\n',
|
| 24 |
+
'\tjsesc [string]',
|
| 25 |
+
'\tjsesc [-s | --single-quotes] [string]',
|
| 26 |
+
'\tjsesc [-d | --double-quotes] [string]',
|
| 27 |
+
'\tjsesc [-w | --wrap] [string]',
|
| 28 |
+
'\tjsesc [-e | --escape-everything] [string]',
|
| 29 |
+
'\tjsesc [-t | --escape-etago] [string]',
|
| 30 |
+
'\tjsesc [-6 | --es6] [string]',
|
| 31 |
+
'\tjsesc [-l | --lowercase-hex] [string]',
|
| 32 |
+
'\tjsesc [-j | --json] [string]',
|
| 33 |
+
'\tjsesc [-o | --object] [stringified_object]', // `JSON.parse()` the argument
|
| 34 |
+
'\tjsesc [-p | --pretty] [string]', // `compact: false`
|
| 35 |
+
'\tjsesc [-v | --version]',
|
| 36 |
+
'\tjsesc [-h | --help]',
|
| 37 |
+
'\nExamples:\n',
|
| 38 |
+
'\tjsesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
|
| 39 |
+
'\tjsesc --json \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
|
| 40 |
+
'\tjsesc --json --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
|
| 41 |
+
'\tjsesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
|
| 42 |
+
'\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | jsesc'
|
| 43 |
+
].join('\n'));
|
| 44 |
+
return process.exit(1);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
if (/^(?:-v|--version)$/.test(option)) {
|
| 48 |
+
log('v%s', stringEscape.version);
|
| 49 |
+
return process.exit(1);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
strings.forEach(function(string) {
|
| 53 |
+
// Process options
|
| 54 |
+
if (/^(?:-s|--single-quotes)$/.test(string)) {
|
| 55 |
+
options.quotes = 'single';
|
| 56 |
+
return;
|
| 57 |
+
}
|
| 58 |
+
if (/^(?:-d|--double-quotes)$/.test(string)) {
|
| 59 |
+
options.quotes = 'double';
|
| 60 |
+
return;
|
| 61 |
+
}
|
| 62 |
+
if (/^(?:-w|--wrap)$/.test(string)) {
|
| 63 |
+
options.wrap = true;
|
| 64 |
+
return;
|
| 65 |
+
}
|
| 66 |
+
if (/^(?:-e|--escape-everything)$/.test(string)) {
|
| 67 |
+
options.escapeEverything = true;
|
| 68 |
+
return;
|
| 69 |
+
}
|
| 70 |
+
if (/^(?:-t|--escape-etago)$/.test(string)) {
|
| 71 |
+
options.escapeEtago = true;
|
| 72 |
+
return;
|
| 73 |
+
}
|
| 74 |
+
if (/^(?:-6|--es6)$/.test(string)) {
|
| 75 |
+
options.es6 = true;
|
| 76 |
+
return;
|
| 77 |
+
}
|
| 78 |
+
if (/^(?:-l|--lowercase-hex)$/.test(string)) {
|
| 79 |
+
options.lowercaseHex = true;
|
| 80 |
+
return;
|
| 81 |
+
}
|
| 82 |
+
if (/^(?:-j|--json)$/.test(string)) {
|
| 83 |
+
options.json = true;
|
| 84 |
+
return;
|
| 85 |
+
}
|
| 86 |
+
if (/^(?:-o|--object)$/.test(string)) {
|
| 87 |
+
isObject = true;
|
| 88 |
+
return;
|
| 89 |
+
}
|
| 90 |
+
if (/^(?:-p|--pretty)$/.test(string)) {
|
| 91 |
+
isObject = true;
|
| 92 |
+
options.compact = false;
|
| 93 |
+
return;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
// Process string(s)
|
| 97 |
+
var result;
|
| 98 |
+
try {
|
| 99 |
+
if (isObject) {
|
| 100 |
+
string = JSON.parse(string);
|
| 101 |
+
}
|
| 102 |
+
result = stringEscape(string, options);
|
| 103 |
+
log(result);
|
| 104 |
+
} catch(error) {
|
| 105 |
+
log(error.message + '\n');
|
| 106 |
+
log('Error: failed to escape.');
|
| 107 |
+
log('If you think this is a bug in jsesc, please report it:');
|
| 108 |
+
log('https://github.com/mathiasbynens/jsesc/issues/new');
|
| 109 |
+
log(
|
| 110 |
+
'\nStack trace using jsesc@%s:\n',
|
| 111 |
+
stringEscape.version
|
| 112 |
+
);
|
| 113 |
+
log(error.stack);
|
| 114 |
+
return process.exit(1);
|
| 115 |
+
}
|
| 116 |
+
});
|
| 117 |
+
// Return with exit status 0 outside of the `forEach` loop, in case
|
| 118 |
+
// multiple strings were passed in.
|
| 119 |
+
return process.exit(0);
|
| 120 |
+
|
| 121 |
+
};
|
| 122 |
+
|
| 123 |
+
if (stdin.isTTY) {
|
| 124 |
+
// handle shell arguments
|
| 125 |
+
main();
|
| 126 |
+
} else {
|
| 127 |
+
// Either the script is called from within a non-TTY context,
|
| 128 |
+
// or `stdin` content is being piped in.
|
| 129 |
+
if (!process.stdout.isTTY) { // called from a non-TTY context
|
| 130 |
+
timeout = setTimeout(function() {
|
| 131 |
+
// if no piped data arrived after a while, handle shell arguments
|
| 132 |
+
main();
|
| 133 |
+
}, 250);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
data = '';
|
| 137 |
+
stdin.on('data', function(chunk) {
|
| 138 |
+
clearTimeout(timeout);
|
| 139 |
+
data += chunk;
|
| 140 |
+
});
|
| 141 |
+
stdin.on('end', function() {
|
| 142 |
+
strings.push(data.trim());
|
| 143 |
+
main();
|
| 144 |
+
});
|
| 145 |
+
stdin.resume();
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
}());
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/jsesc/man/jsesc.1
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.Dd May 13, 2016
|
| 2 |
+
.Dt jsesc 1
|
| 3 |
+
.Sh NAME
|
| 4 |
+
.Nm jsesc
|
| 5 |
+
.Nd escape strings for use in JavaScript string literals
|
| 6 |
+
.Sh SYNOPSIS
|
| 7 |
+
.Nm
|
| 8 |
+
.Op Fl s | -single-quotes Ar string
|
| 9 |
+
.br
|
| 10 |
+
.Op Fl d | -double-quotes Ar string
|
| 11 |
+
.br
|
| 12 |
+
.Op Fl w | -wrap Ar string
|
| 13 |
+
.br
|
| 14 |
+
.Op Fl e | -escape-everything Ar string
|
| 15 |
+
.br
|
| 16 |
+
.Op Fl 6 | -es6 Ar string
|
| 17 |
+
.br
|
| 18 |
+
.Op Fl l | -lowercase-hex Ar string
|
| 19 |
+
.br
|
| 20 |
+
.Op Fl j | -json Ar string
|
| 21 |
+
.br
|
| 22 |
+
.Op Fl p | -object Ar string
|
| 23 |
+
.br
|
| 24 |
+
.Op Fl p | -pretty Ar string
|
| 25 |
+
.br
|
| 26 |
+
.Op Fl v | -version
|
| 27 |
+
.br
|
| 28 |
+
.Op Fl h | -help
|
| 29 |
+
.Sh DESCRIPTION
|
| 30 |
+
.Nm
|
| 31 |
+
escapes strings for use in JavaScript string literals while generating the shortest possible valid ASCII-only output.
|
| 32 |
+
.Sh OPTIONS
|
| 33 |
+
.Bl -ohang -offset
|
| 34 |
+
.It Sy "-s, --single-quotes"
|
| 35 |
+
Escape any occurrences of ' in the input string as \\', so that the output can be used in a JavaScript string literal wrapped in single quotes.
|
| 36 |
+
.It Sy "-d, --double-quotes"
|
| 37 |
+
Escape any occurrences of " in the input string as \\", so that the output can be used in a JavaScript string literal wrapped in double quotes.
|
| 38 |
+
.It Sy "-w, --wrap"
|
| 39 |
+
Make sure the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified using the
|
| 40 |
+
.Ar -s | --single-quotes
|
| 41 |
+
or
|
| 42 |
+
.Ar -d | --double-quotes
|
| 43 |
+
settings.
|
| 44 |
+
.It Sy "-6, --es6"
|
| 45 |
+
Escape any astral Unicode symbols using ECMAScript 6 Unicode code point escape sequences.
|
| 46 |
+
.It Sy "-e, --escape-everything"
|
| 47 |
+
Escape all the symbols in the output, even printable ASCII symbols.
|
| 48 |
+
.It Sy "-j, --json"
|
| 49 |
+
Make sure the output is valid JSON. Hexadecimal character escape sequences and the \\v or \\0 escape sequences will not be used. Setting this flag enables the
|
| 50 |
+
.Ar -d | --double-quotes
|
| 51 |
+
and
|
| 52 |
+
.Ar -w | --wrap
|
| 53 |
+
settings.
|
| 54 |
+
.It Sy "-o, --object"
|
| 55 |
+
Treat the input as a JavaScript object rather than a string. Accepted values are flat arrays containing only string values, and flat objects containing only string values.
|
| 56 |
+
.It Sy "-p, --pretty"
|
| 57 |
+
Pretty-print the output for objects, using whitespace to make it more readable. Setting this flag enables the
|
| 58 |
+
.It Sy "-l, --lowercase-hex"
|
| 59 |
+
Use lowercase for alphabetical hexadecimal digits in escape sequences.
|
| 60 |
+
.Ar -o | --object
|
| 61 |
+
setting.
|
| 62 |
+
.It Sy "-v, --version"
|
| 63 |
+
Print jsesc's version.
|
| 64 |
+
.It Sy "-h, --help"
|
| 65 |
+
Show the help screen.
|
| 66 |
+
.El
|
| 67 |
+
.Sh EXIT STATUS
|
| 68 |
+
The
|
| 69 |
+
.Nm jsesc
|
| 70 |
+
utility exits with one of the following values:
|
| 71 |
+
.Pp
|
| 72 |
+
.Bl -tag -width flag -compact
|
| 73 |
+
.It Li 0
|
| 74 |
+
.Nm
|
| 75 |
+
successfully escaped the given string and printed the result.
|
| 76 |
+
.It Li 1
|
| 77 |
+
.Nm
|
| 78 |
+
wasn't instructed to escape anything (for example, the
|
| 79 |
+
.Ar --help
|
| 80 |
+
flag was set); or, an error occurred.
|
| 81 |
+
.El
|
| 82 |
+
.Sh EXAMPLES
|
| 83 |
+
.Bl -ohang -offset
|
| 84 |
+
.It Sy "jsesc 'foo bar baz'"
|
| 85 |
+
Print an escaped version of the given string.
|
| 86 |
+
.It Sy echo\ 'foo bar baz'\ |\ jsesc
|
| 87 |
+
Print an escaped version of the string that gets piped in.
|
| 88 |
+
.El
|
| 89 |
+
.Sh BUGS
|
| 90 |
+
jsesc's bug tracker is located at <https://github.com/mathiasbynens/jsesc/issues>.
|
| 91 |
+
.Sh AUTHOR
|
| 92 |
+
Mathias Bynens <https://mathiasbynens.be/>
|
| 93 |
+
.Sh WWW
|
| 94 |
+
<https://mths.be/jsesc>
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-buffer/test/index.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
var test = require('tape')
|
| 3 |
+
var _JSON = require('../')
|
| 4 |
+
|
| 5 |
+
function clone (o) {
|
| 6 |
+
return JSON.parse(JSON.stringify(o))
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
var examples = {
|
| 10 |
+
simple: { foo: [], bar: {}, baz: Buffer.from('some binary data') },
|
| 11 |
+
just_buffer: Buffer.from('JUST A BUFFER'),
|
| 12 |
+
all_types: {
|
| 13 |
+
string:'hello',
|
| 14 |
+
number: 3145,
|
| 15 |
+
null: null,
|
| 16 |
+
object: {},
|
| 17 |
+
array: [],
|
| 18 |
+
boolean: true,
|
| 19 |
+
boolean2: false
|
| 20 |
+
},
|
| 21 |
+
foo: Buffer.from('foo'),
|
| 22 |
+
foo2: Buffer.from('foo2'),
|
| 23 |
+
escape: {
|
| 24 |
+
buffer: Buffer.from('x'),
|
| 25 |
+
string: _JSON.stringify(Buffer.from('x'))
|
| 26 |
+
},
|
| 27 |
+
escape2: {
|
| 28 |
+
buffer: Buffer.from('x'),
|
| 29 |
+
string: ':base64:'+ Buffer.from('x').toString('base64')
|
| 30 |
+
},
|
| 31 |
+
undefined: {
|
| 32 |
+
empty: undefined, test: true
|
| 33 |
+
},
|
| 34 |
+
undefined2: {
|
| 35 |
+
first: 1, empty: undefined, test: true
|
| 36 |
+
},
|
| 37 |
+
undefinedArray: {
|
| 38 |
+
array: [undefined, 1, 'two']
|
| 39 |
+
},
|
| 40 |
+
fn: {
|
| 41 |
+
fn: function () {}
|
| 42 |
+
},
|
| 43 |
+
undefined: undefined
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
for(k in examples)
|
| 47 |
+
(function (value, k) {
|
| 48 |
+
test(k, function (t) {
|
| 49 |
+
var s = _JSON.stringify(value)
|
| 50 |
+
console.log('parse', s)
|
| 51 |
+
if(JSON.stringify(value) !== undefined) {
|
| 52 |
+
console.log(s)
|
| 53 |
+
var _value = _JSON.parse(s)
|
| 54 |
+
t.deepEqual(clone(_value), clone(value))
|
| 55 |
+
}
|
| 56 |
+
else
|
| 57 |
+
t.equal(s, undefined)
|
| 58 |
+
t.end()
|
| 59 |
+
})
|
| 60 |
+
})(examples[k], k)
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/.eslintrc.yml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
parserOptions:
|
| 2 |
+
ecmaVersion: 6
|
| 3 |
+
globals:
|
| 4 |
+
beforeEach: false
|
| 5 |
+
describe: false
|
| 6 |
+
it: false
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/fixtures/schema.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var schema = {
|
| 4 |
+
additionalItems: subschema('additionalItems'),
|
| 5 |
+
items: subschema('items'),
|
| 6 |
+
contains: subschema('contains'),
|
| 7 |
+
additionalProperties: subschema('additionalProperties'),
|
| 8 |
+
propertyNames: subschema('propertyNames'),
|
| 9 |
+
not: subschema('not'),
|
| 10 |
+
allOf: [
|
| 11 |
+
subschema('allOf_0'),
|
| 12 |
+
subschema('allOf_1'),
|
| 13 |
+
{
|
| 14 |
+
items: [
|
| 15 |
+
subschema('items_0'),
|
| 16 |
+
subschema('items_1'),
|
| 17 |
+
]
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
anyOf: [
|
| 21 |
+
subschema('anyOf_0'),
|
| 22 |
+
subschema('anyOf_1'),
|
| 23 |
+
],
|
| 24 |
+
oneOf: [
|
| 25 |
+
subschema('oneOf_0'),
|
| 26 |
+
subschema('oneOf_1'),
|
| 27 |
+
],
|
| 28 |
+
definitions: {
|
| 29 |
+
foo: subschema('definitions_foo'),
|
| 30 |
+
bar: subschema('definitions_bar'),
|
| 31 |
+
},
|
| 32 |
+
properties: {
|
| 33 |
+
foo: subschema('properties_foo'),
|
| 34 |
+
bar: subschema('properties_bar'),
|
| 35 |
+
},
|
| 36 |
+
patternProperties: {
|
| 37 |
+
foo: subschema('patternProperties_foo'),
|
| 38 |
+
bar: subschema('patternProperties_bar'),
|
| 39 |
+
},
|
| 40 |
+
dependencies: {
|
| 41 |
+
foo: subschema('dependencies_foo'),
|
| 42 |
+
bar: subschema('dependencies_bar'),
|
| 43 |
+
},
|
| 44 |
+
required: ['foo', 'bar']
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
function subschema(keyword) {
|
| 49 |
+
var sch = {
|
| 50 |
+
properties: {},
|
| 51 |
+
additionalProperties: false,
|
| 52 |
+
additionalItems: false,
|
| 53 |
+
anyOf: [
|
| 54 |
+
{format: 'email'},
|
| 55 |
+
{format: 'hostname'}
|
| 56 |
+
]
|
| 57 |
+
};
|
| 58 |
+
sch.properties['foo_' + keyword] = {title: 'foo'};
|
| 59 |
+
sch.properties['bar_' + keyword] = {title: 'bar'};
|
| 60 |
+
return sch;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
module.exports = {
|
| 65 |
+
schema: schema,
|
| 66 |
+
|
| 67 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 68 |
+
expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]]
|
| 69 |
+
.concat(expectedCalls('additionalItems'))
|
| 70 |
+
.concat(expectedCalls('items'))
|
| 71 |
+
.concat(expectedCalls('contains'))
|
| 72 |
+
.concat(expectedCalls('additionalProperties'))
|
| 73 |
+
.concat(expectedCalls('propertyNames'))
|
| 74 |
+
.concat(expectedCalls('not'))
|
| 75 |
+
.concat(expectedCallsChild('allOf', 0))
|
| 76 |
+
.concat(expectedCallsChild('allOf', 1))
|
| 77 |
+
.concat([
|
| 78 |
+
[schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2],
|
| 79 |
+
[schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0],
|
| 80 |
+
[schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'],
|
| 81 |
+
[schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'],
|
| 82 |
+
[schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0],
|
| 83 |
+
[schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1],
|
| 84 |
+
|
| 85 |
+
[schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1],
|
| 86 |
+
[schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'],
|
| 87 |
+
[schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'],
|
| 88 |
+
[schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0],
|
| 89 |
+
[schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1]
|
| 90 |
+
])
|
| 91 |
+
.concat(expectedCallsChild('anyOf', 0))
|
| 92 |
+
.concat(expectedCallsChild('anyOf', 1))
|
| 93 |
+
.concat(expectedCallsChild('oneOf', 0))
|
| 94 |
+
.concat(expectedCallsChild('oneOf', 1))
|
| 95 |
+
.concat(expectedCallsChild('definitions', 'foo'))
|
| 96 |
+
.concat(expectedCallsChild('definitions', 'bar'))
|
| 97 |
+
.concat(expectedCallsChild('properties', 'foo'))
|
| 98 |
+
.concat(expectedCallsChild('properties', 'bar'))
|
| 99 |
+
.concat(expectedCallsChild('patternProperties', 'foo'))
|
| 100 |
+
.concat(expectedCallsChild('patternProperties', 'bar'))
|
| 101 |
+
.concat(expectedCallsChild('dependencies', 'foo'))
|
| 102 |
+
.concat(expectedCallsChild('dependencies', 'bar'))
|
| 103 |
+
};
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
function expectedCalls(keyword) {
|
| 107 |
+
return [
|
| 108 |
+
[schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined],
|
| 109 |
+
[schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`],
|
| 110 |
+
[schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`],
|
| 111 |
+
[schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0],
|
| 112 |
+
[schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1]
|
| 113 |
+
];
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
function expectedCallsChild(keyword, i) {
|
| 118 |
+
return [
|
| 119 |
+
[schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i],
|
| 120 |
+
[schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`],
|
| 121 |
+
[schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`],
|
| 122 |
+
[schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0],
|
| 123 |
+
[schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1]
|
| 124 |
+
];
|
| 125 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-schema-traverse/spec/index.spec.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 5 |
+
|
| 6 |
+
describe('json-schema-traverse', function() {
|
| 7 |
+
var calls;
|
| 8 |
+
|
| 9 |
+
beforeEach(function() {
|
| 10 |
+
calls = [];
|
| 11 |
+
});
|
| 12 |
+
|
| 13 |
+
it('should traverse all keywords containing schemas recursively', function() {
|
| 14 |
+
var schema = require('./fixtures/schema').schema;
|
| 15 |
+
var expectedCalls = require('./fixtures/schema').expectedCalls;
|
| 16 |
+
|
| 17 |
+
traverse(schema, {cb: callback});
|
| 18 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 19 |
+
});
|
| 20 |
+
|
| 21 |
+
describe('Legacy v0.3.1 API', function() {
|
| 22 |
+
it('should traverse all keywords containing schemas recursively', function() {
|
| 23 |
+
var schema = require('./fixtures/schema').schema;
|
| 24 |
+
var expectedCalls = require('./fixtures/schema').expectedCalls;
|
| 25 |
+
|
| 26 |
+
traverse(schema, callback);
|
| 27 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
it('should work when an options object is provided', function() {
|
| 31 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 32 |
+
var schema = require('./fixtures/schema').schema;
|
| 33 |
+
var expectedCalls = require('./fixtures/schema').expectedCalls;
|
| 34 |
+
|
| 35 |
+
traverse(schema, {}, callback);
|
| 36 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 37 |
+
});
|
| 38 |
+
});
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
describe('allKeys option', function() {
|
| 42 |
+
var schema = {
|
| 43 |
+
someObject: {
|
| 44 |
+
minimum: 1,
|
| 45 |
+
maximum: 2
|
| 46 |
+
}
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
it('should traverse objects with allKeys: true option', function() {
|
| 50 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 51 |
+
var expectedCalls = [
|
| 52 |
+
[schema, '', schema, undefined, undefined, undefined, undefined],
|
| 53 |
+
[schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined]
|
| 54 |
+
];
|
| 55 |
+
|
| 56 |
+
traverse(schema, {allKeys: true, cb: callback});
|
| 57 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 58 |
+
});
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
it('should NOT traverse objects with allKeys: false option', function() {
|
| 62 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 63 |
+
var expectedCalls = [
|
| 64 |
+
[schema, '', schema, undefined, undefined, undefined, undefined]
|
| 65 |
+
];
|
| 66 |
+
|
| 67 |
+
traverse(schema, {allKeys: false, cb: callback});
|
| 68 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 69 |
+
});
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
it('should NOT traverse objects without allKeys option', function() {
|
| 73 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 74 |
+
var expectedCalls = [
|
| 75 |
+
[schema, '', schema, undefined, undefined, undefined, undefined]
|
| 76 |
+
];
|
| 77 |
+
|
| 78 |
+
traverse(schema, {cb: callback});
|
| 79 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 80 |
+
});
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
it('should NOT travers objects in standard keywords which value is not a schema', function() {
|
| 84 |
+
var schema2 = {
|
| 85 |
+
const: {foo: 'bar'},
|
| 86 |
+
enum: ['a', 'b'],
|
| 87 |
+
required: ['foo'],
|
| 88 |
+
another: {
|
| 89 |
+
|
| 90 |
+
},
|
| 91 |
+
patternProperties: {}, // will not traverse - no properties
|
| 92 |
+
dependencies: true, // will not traverse - invalid
|
| 93 |
+
properties: {
|
| 94 |
+
smaller: {
|
| 95 |
+
type: 'number'
|
| 96 |
+
},
|
| 97 |
+
larger: {
|
| 98 |
+
type: 'number',
|
| 99 |
+
minimum: {$data: '1/smaller'}
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
};
|
| 103 |
+
|
| 104 |
+
// schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex
|
| 105 |
+
var expectedCalls = [
|
| 106 |
+
[schema2, '', schema2, undefined, undefined, undefined, undefined],
|
| 107 |
+
[schema2.another, '/another', schema2, '', 'another', schema2, undefined],
|
| 108 |
+
[schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'],
|
| 109 |
+
[schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'],
|
| 110 |
+
];
|
| 111 |
+
|
| 112 |
+
traverse(schema2, {allKeys: true, cb: callback});
|
| 113 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 114 |
+
});
|
| 115 |
+
});
|
| 116 |
+
|
| 117 |
+
describe('pre and post', function() {
|
| 118 |
+
var schema = {
|
| 119 |
+
type: 'object',
|
| 120 |
+
properties: {
|
| 121 |
+
name: {type: 'string'},
|
| 122 |
+
age: {type: 'number'}
|
| 123 |
+
}
|
| 124 |
+
};
|
| 125 |
+
|
| 126 |
+
it('should traverse schema in pre-order', function() {
|
| 127 |
+
traverse(schema, {cb: {pre}});
|
| 128 |
+
var expectedCalls = [
|
| 129 |
+
['pre', schema, '', schema, undefined, undefined, undefined, undefined],
|
| 130 |
+
['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
|
| 131 |
+
['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
|
| 132 |
+
];
|
| 133 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 134 |
+
});
|
| 135 |
+
|
| 136 |
+
it('should traverse schema in post-order', function() {
|
| 137 |
+
traverse(schema, {cb: {post}});
|
| 138 |
+
var expectedCalls = [
|
| 139 |
+
['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
|
| 140 |
+
['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
|
| 141 |
+
['post', schema, '', schema, undefined, undefined, undefined, undefined],
|
| 142 |
+
];
|
| 143 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 144 |
+
});
|
| 145 |
+
|
| 146 |
+
it('should traverse schema in pre- and post-order at the same time', function() {
|
| 147 |
+
traverse(schema, {cb: {pre, post}});
|
| 148 |
+
var expectedCalls = [
|
| 149 |
+
['pre', schema, '', schema, undefined, undefined, undefined, undefined],
|
| 150 |
+
['pre', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
|
| 151 |
+
['post', schema.properties.name, '/properties/name', schema, '', 'properties', schema, 'name'],
|
| 152 |
+
['pre', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
|
| 153 |
+
['post', schema.properties.age, '/properties/age', schema, '', 'properties', schema, 'age'],
|
| 154 |
+
['post', schema, '', schema, undefined, undefined, undefined, undefined],
|
| 155 |
+
];
|
| 156 |
+
assert.deepStrictEqual(calls, expectedCalls);
|
| 157 |
+
});
|
| 158 |
+
});
|
| 159 |
+
|
| 160 |
+
function callback() {
|
| 161 |
+
calls.push(Array.prototype.slice.call(arguments));
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
function pre() {
|
| 165 |
+
calls.push(['pre'].concat(Array.prototype.slice.call(arguments)));
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
function post() {
|
| 169 |
+
calls.push(['post'].concat(Array.prototype.slice.call(arguments)));
|
| 170 |
+
}
|
| 171 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var stringify = require('../');
|
| 2 |
+
|
| 3 |
+
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
|
| 4 |
+
var s = stringify(obj, function (a, b) {
|
| 5 |
+
return a.key < b.key ? 1 : -1;
|
| 6 |
+
});
|
| 7 |
+
console.log(s);
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/nested.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var stringify = require('../');
|
| 2 |
+
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
|
| 3 |
+
console.log(stringify(obj));
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/str.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var stringify = require('../');
|
| 2 |
+
var obj = { c: 6, b: [4,5], a: 3 };
|
| 3 |
+
console.log(stringify(obj));
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var stringify = require('../');
|
| 2 |
+
|
| 3 |
+
var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };
|
| 4 |
+
var s = stringify(obj, function (a, b) {
|
| 5 |
+
return a.value < b.value ? 1 : -1;
|
| 6 |
+
});
|
| 7 |
+
console.log(s);
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/cmp.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('custom comparison function', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
|
| 7 |
+
var s = stringify(obj, function (a, b) {
|
| 8 |
+
return a.key < b.key ? 1 : -1;
|
| 9 |
+
});
|
| 10 |
+
t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
|
| 11 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/nested.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('nested', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
|
| 7 |
+
t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
test('cyclic (default)', function (t) {
|
| 11 |
+
t.plan(1);
|
| 12 |
+
var one = { a: 1 };
|
| 13 |
+
var two = { a: 2, one: one };
|
| 14 |
+
one.two = two;
|
| 15 |
+
try {
|
| 16 |
+
stringify(one);
|
| 17 |
+
} catch (ex) {
|
| 18 |
+
t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON');
|
| 19 |
+
}
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
test('cyclic (specifically allowed)', function (t) {
|
| 23 |
+
t.plan(1);
|
| 24 |
+
var one = { a: 1 };
|
| 25 |
+
var two = { a: 2, one: one };
|
| 26 |
+
one.two = two;
|
| 27 |
+
t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}');
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
test('repeated non-cyclic value', function(t) {
|
| 31 |
+
t.plan(1);
|
| 32 |
+
var one = { x: 1 };
|
| 33 |
+
var two = { a: one, b: one };
|
| 34 |
+
t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}');
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
test('acyclic but with reused obj-property pointers', function (t) {
|
| 38 |
+
t.plan(1);
|
| 39 |
+
var x = { a: 1 }
|
| 40 |
+
var y = { b: x, c: x }
|
| 41 |
+
t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}');
|
| 42 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/replacer.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('replace root', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
|
| 7 |
+
var obj = { a: 1, b: 2, c: false };
|
| 8 |
+
var replacer = function(key, value) { return 'one'; };
|
| 9 |
+
|
| 10 |
+
t.equal(stringify(obj, { replacer: replacer }), '"one"');
|
| 11 |
+
});
|
| 12 |
+
|
| 13 |
+
test('replace numbers', function (t) {
|
| 14 |
+
t.plan(1);
|
| 15 |
+
|
| 16 |
+
var obj = { a: 1, b: 2, c: false };
|
| 17 |
+
var replacer = function(key, value) {
|
| 18 |
+
if(value === 1) return 'one';
|
| 19 |
+
if(value === 2) return 'two';
|
| 20 |
+
return value;
|
| 21 |
+
};
|
| 22 |
+
|
| 23 |
+
t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}');
|
| 24 |
+
});
|
| 25 |
+
|
| 26 |
+
test('replace with object', function (t) {
|
| 27 |
+
t.plan(1);
|
| 28 |
+
|
| 29 |
+
var obj = { a: 1, b: 2, c: false };
|
| 30 |
+
var replacer = function(key, value) {
|
| 31 |
+
if(key === 'b') return { d: 1 };
|
| 32 |
+
if(value === 1) return 'one';
|
| 33 |
+
return value;
|
| 34 |
+
};
|
| 35 |
+
|
| 36 |
+
t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}');
|
| 37 |
+
});
|
| 38 |
+
|
| 39 |
+
test('replace with undefined', function (t) {
|
| 40 |
+
t.plan(1);
|
| 41 |
+
|
| 42 |
+
var obj = { a: 1, b: 2, c: false };
|
| 43 |
+
var replacer = function(key, value) {
|
| 44 |
+
if(value === false) return;
|
| 45 |
+
return value;
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}');
|
| 49 |
+
});
|
| 50 |
+
|
| 51 |
+
test('replace with array', function (t) {
|
| 52 |
+
t.plan(1);
|
| 53 |
+
|
| 54 |
+
var obj = { a: 1, b: 2, c: false };
|
| 55 |
+
var replacer = function(key, value) {
|
| 56 |
+
if(key === 'b') return ['one', 'two'];
|
| 57 |
+
return value;
|
| 58 |
+
};
|
| 59 |
+
|
| 60 |
+
t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}');
|
| 61 |
+
});
|
| 62 |
+
|
| 63 |
+
test('replace array item', function (t) {
|
| 64 |
+
t.plan(1);
|
| 65 |
+
|
| 66 |
+
var obj = { a: 1, b: 2, c: [1,2] };
|
| 67 |
+
var replacer = function(key, value) {
|
| 68 |
+
if(value === 1) return 'one';
|
| 69 |
+
if(value === 2) return 'two';
|
| 70 |
+
return value;
|
| 71 |
+
};
|
| 72 |
+
|
| 73 |
+
t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}');
|
| 74 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/space.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('space parameter', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
var obj = { one: 1, two: 2 };
|
| 7 |
+
t.equal(stringify(obj, {space: ' '}), ''
|
| 8 |
+
+ '{\n'
|
| 9 |
+
+ ' "one": 1,\n'
|
| 10 |
+
+ ' "two": 2\n'
|
| 11 |
+
+ '}'
|
| 12 |
+
);
|
| 13 |
+
});
|
| 14 |
+
|
| 15 |
+
test('space parameter (with tabs)', function (t) {
|
| 16 |
+
t.plan(1);
|
| 17 |
+
var obj = { one: 1, two: 2 };
|
| 18 |
+
t.equal(stringify(obj, {space: '\t'}), ''
|
| 19 |
+
+ '{\n'
|
| 20 |
+
+ '\t"one": 1,\n'
|
| 21 |
+
+ '\t"two": 2\n'
|
| 22 |
+
+ '}'
|
| 23 |
+
);
|
| 24 |
+
});
|
| 25 |
+
|
| 26 |
+
test('space parameter (with a number)', function (t) {
|
| 27 |
+
t.plan(1);
|
| 28 |
+
var obj = { one: 1, two: 2 };
|
| 29 |
+
t.equal(stringify(obj, {space: 3}), ''
|
| 30 |
+
+ '{\n'
|
| 31 |
+
+ ' "one": 1,\n'
|
| 32 |
+
+ ' "two": 2\n'
|
| 33 |
+
+ '}'
|
| 34 |
+
);
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
test('space parameter (nested objects)', function (t) {
|
| 38 |
+
t.plan(1);
|
| 39 |
+
var obj = { one: 1, two: { b: 4, a: [2,3] } };
|
| 40 |
+
t.equal(stringify(obj, {space: ' '}), ''
|
| 41 |
+
+ '{\n'
|
| 42 |
+
+ ' "one": 1,\n'
|
| 43 |
+
+ ' "two": {\n'
|
| 44 |
+
+ ' "a": [\n'
|
| 45 |
+
+ ' 2,\n'
|
| 46 |
+
+ ' 3\n'
|
| 47 |
+
+ ' ],\n'
|
| 48 |
+
+ ' "b": 4\n'
|
| 49 |
+
+ ' }\n'
|
| 50 |
+
+ '}'
|
| 51 |
+
);
|
| 52 |
+
});
|
| 53 |
+
|
| 54 |
+
test('space parameter (same as native)', function (t) {
|
| 55 |
+
t.plan(1);
|
| 56 |
+
// for this test, properties need to be in alphabetical order
|
| 57 |
+
var obj = { one: 1, two: { a: [2,3], b: 4 } };
|
| 58 |
+
t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' '));
|
| 59 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/str.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('simple object', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
var obj = { c: 6, b: [4,5], a: 3, z: null };
|
| 7 |
+
t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}');
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
test('object with undefined', function (t) {
|
| 11 |
+
t.plan(1);
|
| 12 |
+
var obj = { a: 3, z: undefined };
|
| 13 |
+
t.equal(stringify(obj), '{"a":3}');
|
| 14 |
+
});
|
| 15 |
+
|
| 16 |
+
test('array with undefined', function (t) {
|
| 17 |
+
t.plan(1);
|
| 18 |
+
var obj = [4, undefined, 6];
|
| 19 |
+
t.equal(stringify(obj), '[4,null,6]');
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
test('object with empty string', function (t) {
|
| 23 |
+
t.plan(1);
|
| 24 |
+
var obj = { a: 3, z: '' };
|
| 25 |
+
t.equal(stringify(obj), '{"a":3,"z":""}');
|
| 26 |
+
});
|
| 27 |
+
|
| 28 |
+
test('array with empty string', function (t) {
|
| 29 |
+
t.plan(1);
|
| 30 |
+
var obj = [4, '', 6];
|
| 31 |
+
t.equal(stringify(obj), '[4,"",6]');
|
| 32 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json-stable-stringify-without-jsonify/test/to-json.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var test = require('tape');
|
| 2 |
+
var stringify = require('../');
|
| 3 |
+
|
| 4 |
+
test('toJSON function', function (t) {
|
| 5 |
+
t.plan(1);
|
| 6 |
+
var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } };
|
| 7 |
+
t.equal(stringify(obj), '{"one":1}' );
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
test('toJSON returns string', function (t) {
|
| 11 |
+
t.plan(1);
|
| 12 |
+
var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } };
|
| 13 |
+
t.equal(stringify(obj), '"one"');
|
| 14 |
+
});
|
| 15 |
+
|
| 16 |
+
test('toJSON returns array', function (t) {
|
| 17 |
+
t.plan(1);
|
| 18 |
+
var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } };
|
| 19 |
+
t.equal(stringify(obj), '["one"]');
|
| 20 |
+
});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.js
ADDED
|
@@ -0,0 +1,1737 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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? module.exports = factory() :
|
| 3 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
| 4 |
+
(global.JSON5 = factory());
|
| 5 |
+
}(this, (function () { 'use strict';
|
| 6 |
+
|
| 7 |
+
function createCommonjsModule(fn, module) {
|
| 8 |
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
var _global = createCommonjsModule(function (module) {
|
| 12 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
| 13 |
+
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
| 14 |
+
? window : typeof self != 'undefined' && self.Math == Math ? self
|
| 15 |
+
// eslint-disable-next-line no-new-func
|
| 16 |
+
: Function('return this')();
|
| 17 |
+
if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef
|
| 18 |
+
});
|
| 19 |
+
|
| 20 |
+
var _core = createCommonjsModule(function (module) {
|
| 21 |
+
var core = module.exports = { version: '2.6.5' };
|
| 22 |
+
if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef
|
| 23 |
+
});
|
| 24 |
+
var _core_1 = _core.version;
|
| 25 |
+
|
| 26 |
+
var _isObject = function (it) {
|
| 27 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
var _anObject = function (it) {
|
| 31 |
+
if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); }
|
| 32 |
+
return it;
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
var _fails = function (exec) {
|
| 36 |
+
try {
|
| 37 |
+
return !!exec();
|
| 38 |
+
} catch (e) {
|
| 39 |
+
return true;
|
| 40 |
+
}
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
// Thank's IE8 for his funny defineProperty
|
| 44 |
+
var _descriptors = !_fails(function () {
|
| 45 |
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
| 46 |
+
});
|
| 47 |
+
|
| 48 |
+
var document = _global.document;
|
| 49 |
+
// typeof document.createElement is 'object' in old IE
|
| 50 |
+
var is = _isObject(document) && _isObject(document.createElement);
|
| 51 |
+
var _domCreate = function (it) {
|
| 52 |
+
return is ? document.createElement(it) : {};
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
+
var _ie8DomDefine = !_descriptors && !_fails(function () {
|
| 56 |
+
return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
|
| 57 |
+
});
|
| 58 |
+
|
| 59 |
+
// 7.1.1 ToPrimitive(input [, PreferredType])
|
| 60 |
+
|
| 61 |
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
| 62 |
+
// and the second argument - flag - preferred type is a string
|
| 63 |
+
var _toPrimitive = function (it, S) {
|
| 64 |
+
if (!_isObject(it)) { return it; }
|
| 65 |
+
var fn, val;
|
| 66 |
+
if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; }
|
| 67 |
+
if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; }
|
| 68 |
+
if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; }
|
| 69 |
+
throw TypeError("Can't convert object to primitive value");
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
var dP = Object.defineProperty;
|
| 73 |
+
|
| 74 |
+
var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
| 75 |
+
_anObject(O);
|
| 76 |
+
P = _toPrimitive(P, true);
|
| 77 |
+
_anObject(Attributes);
|
| 78 |
+
if (_ie8DomDefine) { try {
|
| 79 |
+
return dP(O, P, Attributes);
|
| 80 |
+
} catch (e) { /* empty */ } }
|
| 81 |
+
if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); }
|
| 82 |
+
if ('value' in Attributes) { O[P] = Attributes.value; }
|
| 83 |
+
return O;
|
| 84 |
+
};
|
| 85 |
+
|
| 86 |
+
var _objectDp = {
|
| 87 |
+
f: f
|
| 88 |
+
};
|
| 89 |
+
|
| 90 |
+
var _propertyDesc = function (bitmap, value) {
|
| 91 |
+
return {
|
| 92 |
+
enumerable: !(bitmap & 1),
|
| 93 |
+
configurable: !(bitmap & 2),
|
| 94 |
+
writable: !(bitmap & 4),
|
| 95 |
+
value: value
|
| 96 |
+
};
|
| 97 |
+
};
|
| 98 |
+
|
| 99 |
+
var _hide = _descriptors ? function (object, key, value) {
|
| 100 |
+
return _objectDp.f(object, key, _propertyDesc(1, value));
|
| 101 |
+
} : function (object, key, value) {
|
| 102 |
+
object[key] = value;
|
| 103 |
+
return object;
|
| 104 |
+
};
|
| 105 |
+
|
| 106 |
+
var hasOwnProperty = {}.hasOwnProperty;
|
| 107 |
+
var _has = function (it, key) {
|
| 108 |
+
return hasOwnProperty.call(it, key);
|
| 109 |
+
};
|
| 110 |
+
|
| 111 |
+
var id = 0;
|
| 112 |
+
var px = Math.random();
|
| 113 |
+
var _uid = function (key) {
|
| 114 |
+
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
| 115 |
+
};
|
| 116 |
+
|
| 117 |
+
var _library = false;
|
| 118 |
+
|
| 119 |
+
var _shared = createCommonjsModule(function (module) {
|
| 120 |
+
var SHARED = '__core-js_shared__';
|
| 121 |
+
var store = _global[SHARED] || (_global[SHARED] = {});
|
| 122 |
+
|
| 123 |
+
(module.exports = function (key, value) {
|
| 124 |
+
return store[key] || (store[key] = value !== undefined ? value : {});
|
| 125 |
+
})('versions', []).push({
|
| 126 |
+
version: _core.version,
|
| 127 |
+
mode: _library ? 'pure' : 'global',
|
| 128 |
+
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
| 129 |
+
});
|
| 130 |
+
});
|
| 131 |
+
|
| 132 |
+
var _functionToString = _shared('native-function-to-string', Function.toString);
|
| 133 |
+
|
| 134 |
+
var _redefine = createCommonjsModule(function (module) {
|
| 135 |
+
var SRC = _uid('src');
|
| 136 |
+
|
| 137 |
+
var TO_STRING = 'toString';
|
| 138 |
+
var TPL = ('' + _functionToString).split(TO_STRING);
|
| 139 |
+
|
| 140 |
+
_core.inspectSource = function (it) {
|
| 141 |
+
return _functionToString.call(it);
|
| 142 |
+
};
|
| 143 |
+
|
| 144 |
+
(module.exports = function (O, key, val, safe) {
|
| 145 |
+
var isFunction = typeof val == 'function';
|
| 146 |
+
if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); }
|
| 147 |
+
if (O[key] === val) { return; }
|
| 148 |
+
if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); }
|
| 149 |
+
if (O === _global) {
|
| 150 |
+
O[key] = val;
|
| 151 |
+
} else if (!safe) {
|
| 152 |
+
delete O[key];
|
| 153 |
+
_hide(O, key, val);
|
| 154 |
+
} else if (O[key]) {
|
| 155 |
+
O[key] = val;
|
| 156 |
+
} else {
|
| 157 |
+
_hide(O, key, val);
|
| 158 |
+
}
|
| 159 |
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
| 160 |
+
})(Function.prototype, TO_STRING, function toString() {
|
| 161 |
+
return typeof this == 'function' && this[SRC] || _functionToString.call(this);
|
| 162 |
+
});
|
| 163 |
+
});
|
| 164 |
+
|
| 165 |
+
var _aFunction = function (it) {
|
| 166 |
+
if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); }
|
| 167 |
+
return it;
|
| 168 |
+
};
|
| 169 |
+
|
| 170 |
+
// optional / simple context binding
|
| 171 |
+
|
| 172 |
+
var _ctx = function (fn, that, length) {
|
| 173 |
+
_aFunction(fn);
|
| 174 |
+
if (that === undefined) { return fn; }
|
| 175 |
+
switch (length) {
|
| 176 |
+
case 1: return function (a) {
|
| 177 |
+
return fn.call(that, a);
|
| 178 |
+
};
|
| 179 |
+
case 2: return function (a, b) {
|
| 180 |
+
return fn.call(that, a, b);
|
| 181 |
+
};
|
| 182 |
+
case 3: return function (a, b, c) {
|
| 183 |
+
return fn.call(that, a, b, c);
|
| 184 |
+
};
|
| 185 |
+
}
|
| 186 |
+
return function (/* ...args */) {
|
| 187 |
+
return fn.apply(that, arguments);
|
| 188 |
+
};
|
| 189 |
+
};
|
| 190 |
+
|
| 191 |
+
var PROTOTYPE = 'prototype';
|
| 192 |
+
|
| 193 |
+
var $export = function (type, name, source) {
|
| 194 |
+
var IS_FORCED = type & $export.F;
|
| 195 |
+
var IS_GLOBAL = type & $export.G;
|
| 196 |
+
var IS_STATIC = type & $export.S;
|
| 197 |
+
var IS_PROTO = type & $export.P;
|
| 198 |
+
var IS_BIND = type & $export.B;
|
| 199 |
+
var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];
|
| 200 |
+
var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
|
| 201 |
+
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
| 202 |
+
var key, own, out, exp;
|
| 203 |
+
if (IS_GLOBAL) { source = name; }
|
| 204 |
+
for (key in source) {
|
| 205 |
+
// contains in native
|
| 206 |
+
own = !IS_FORCED && target && target[key] !== undefined;
|
| 207 |
+
// export native or passed
|
| 208 |
+
out = (own ? target : source)[key];
|
| 209 |
+
// bind timers to global for call from export context
|
| 210 |
+
exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
|
| 211 |
+
// extend global
|
| 212 |
+
if (target) { _redefine(target, key, out, type & $export.U); }
|
| 213 |
+
// export
|
| 214 |
+
if (exports[key] != out) { _hide(exports, key, exp); }
|
| 215 |
+
if (IS_PROTO && expProto[key] != out) { expProto[key] = out; }
|
| 216 |
+
}
|
| 217 |
+
};
|
| 218 |
+
_global.core = _core;
|
| 219 |
+
// type bitmap
|
| 220 |
+
$export.F = 1; // forced
|
| 221 |
+
$export.G = 2; // global
|
| 222 |
+
$export.S = 4; // static
|
| 223 |
+
$export.P = 8; // proto
|
| 224 |
+
$export.B = 16; // bind
|
| 225 |
+
$export.W = 32; // wrap
|
| 226 |
+
$export.U = 64; // safe
|
| 227 |
+
$export.R = 128; // real proto method for `library`
|
| 228 |
+
var _export = $export;
|
| 229 |
+
|
| 230 |
+
// 7.1.4 ToInteger
|
| 231 |
+
var ceil = Math.ceil;
|
| 232 |
+
var floor = Math.floor;
|
| 233 |
+
var _toInteger = function (it) {
|
| 234 |
+
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
| 235 |
+
};
|
| 236 |
+
|
| 237 |
+
// 7.2.1 RequireObjectCoercible(argument)
|
| 238 |
+
var _defined = function (it) {
|
| 239 |
+
if (it == undefined) { throw TypeError("Can't call method on " + it); }
|
| 240 |
+
return it;
|
| 241 |
+
};
|
| 242 |
+
|
| 243 |
+
// true -> String#at
|
| 244 |
+
// false -> String#codePointAt
|
| 245 |
+
var _stringAt = function (TO_STRING) {
|
| 246 |
+
return function (that, pos) {
|
| 247 |
+
var s = String(_defined(that));
|
| 248 |
+
var i = _toInteger(pos);
|
| 249 |
+
var l = s.length;
|
| 250 |
+
var a, b;
|
| 251 |
+
if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; }
|
| 252 |
+
a = s.charCodeAt(i);
|
| 253 |
+
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
| 254 |
+
? TO_STRING ? s.charAt(i) : a
|
| 255 |
+
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
| 256 |
+
};
|
| 257 |
+
};
|
| 258 |
+
|
| 259 |
+
var $at = _stringAt(false);
|
| 260 |
+
_export(_export.P, 'String', {
|
| 261 |
+
// 21.1.3.3 String.prototype.codePointAt(pos)
|
| 262 |
+
codePointAt: function codePointAt(pos) {
|
| 263 |
+
return $at(this, pos);
|
| 264 |
+
}
|
| 265 |
+
});
|
| 266 |
+
|
| 267 |
+
var codePointAt = _core.String.codePointAt;
|
| 268 |
+
|
| 269 |
+
var max = Math.max;
|
| 270 |
+
var min = Math.min;
|
| 271 |
+
var _toAbsoluteIndex = function (index, length) {
|
| 272 |
+
index = _toInteger(index);
|
| 273 |
+
return index < 0 ? max(index + length, 0) : min(index, length);
|
| 274 |
+
};
|
| 275 |
+
|
| 276 |
+
var fromCharCode = String.fromCharCode;
|
| 277 |
+
var $fromCodePoint = String.fromCodePoint;
|
| 278 |
+
|
| 279 |
+
// length should be 1, old FF problem
|
| 280 |
+
_export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
|
| 281 |
+
// 21.1.2.2 String.fromCodePoint(...codePoints)
|
| 282 |
+
fromCodePoint: function fromCodePoint(x) {
|
| 283 |
+
var arguments$1 = arguments;
|
| 284 |
+
// eslint-disable-line no-unused-vars
|
| 285 |
+
var res = [];
|
| 286 |
+
var aLen = arguments.length;
|
| 287 |
+
var i = 0;
|
| 288 |
+
var code;
|
| 289 |
+
while (aLen > i) {
|
| 290 |
+
code = +arguments$1[i++];
|
| 291 |
+
if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); }
|
| 292 |
+
res.push(code < 0x10000
|
| 293 |
+
? fromCharCode(code)
|
| 294 |
+
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
|
| 295 |
+
);
|
| 296 |
+
} return res.join('');
|
| 297 |
+
}
|
| 298 |
+
});
|
| 299 |
+
|
| 300 |
+
var fromCodePoint = _core.String.fromCodePoint;
|
| 301 |
+
|
| 302 |
+
// This is a generated file. Do not edit.
|
| 303 |
+
var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
| 304 |
+
var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\u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C0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
| 305 |
+
var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8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\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uF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D34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\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DE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
| 306 |
+
|
| 307 |
+
var unicode = {
|
| 308 |
+
Space_Separator: Space_Separator,
|
| 309 |
+
ID_Start: ID_Start,
|
| 310 |
+
ID_Continue: ID_Continue
|
| 311 |
+
};
|
| 312 |
+
|
| 313 |
+
var util = {
|
| 314 |
+
isSpaceSeparator: function isSpaceSeparator (c) {
|
| 315 |
+
return typeof c === 'string' && unicode.Space_Separator.test(c)
|
| 316 |
+
},
|
| 317 |
+
|
| 318 |
+
isIdStartChar: function isIdStartChar (c) {
|
| 319 |
+
return typeof c === 'string' && (
|
| 320 |
+
(c >= 'a' && c <= 'z') ||
|
| 321 |
+
(c >= 'A' && c <= 'Z') ||
|
| 322 |
+
(c === '$') || (c === '_') ||
|
| 323 |
+
unicode.ID_Start.test(c)
|
| 324 |
+
)
|
| 325 |
+
},
|
| 326 |
+
|
| 327 |
+
isIdContinueChar: function isIdContinueChar (c) {
|
| 328 |
+
return typeof c === 'string' && (
|
| 329 |
+
(c >= 'a' && c <= 'z') ||
|
| 330 |
+
(c >= 'A' && c <= 'Z') ||
|
| 331 |
+
(c >= '0' && c <= '9') ||
|
| 332 |
+
(c === '$') || (c === '_') ||
|
| 333 |
+
(c === '\u200C') || (c === '\u200D') ||
|
| 334 |
+
unicode.ID_Continue.test(c)
|
| 335 |
+
)
|
| 336 |
+
},
|
| 337 |
+
|
| 338 |
+
isDigit: function isDigit (c) {
|
| 339 |
+
return typeof c === 'string' && /[0-9]/.test(c)
|
| 340 |
+
},
|
| 341 |
+
|
| 342 |
+
isHexDigit: function isHexDigit (c) {
|
| 343 |
+
return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
|
| 344 |
+
},
|
| 345 |
+
};
|
| 346 |
+
|
| 347 |
+
var source;
|
| 348 |
+
var parseState;
|
| 349 |
+
var stack;
|
| 350 |
+
var pos;
|
| 351 |
+
var line;
|
| 352 |
+
var column;
|
| 353 |
+
var token;
|
| 354 |
+
var key;
|
| 355 |
+
var root;
|
| 356 |
+
|
| 357 |
+
var parse = function parse (text, reviver) {
|
| 358 |
+
source = String(text);
|
| 359 |
+
parseState = 'start';
|
| 360 |
+
stack = [];
|
| 361 |
+
pos = 0;
|
| 362 |
+
line = 1;
|
| 363 |
+
column = 0;
|
| 364 |
+
token = undefined;
|
| 365 |
+
key = undefined;
|
| 366 |
+
root = undefined;
|
| 367 |
+
|
| 368 |
+
do {
|
| 369 |
+
token = lex();
|
| 370 |
+
|
| 371 |
+
// This code is unreachable.
|
| 372 |
+
// if (!parseStates[parseState]) {
|
| 373 |
+
// throw invalidParseState()
|
| 374 |
+
// }
|
| 375 |
+
|
| 376 |
+
parseStates[parseState]();
|
| 377 |
+
} while (token.type !== 'eof')
|
| 378 |
+
|
| 379 |
+
if (typeof reviver === 'function') {
|
| 380 |
+
return internalize({'': root}, '', reviver)
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
return root
|
| 384 |
+
};
|
| 385 |
+
|
| 386 |
+
function internalize (holder, name, reviver) {
|
| 387 |
+
var value = holder[name];
|
| 388 |
+
if (value != null && typeof value === 'object') {
|
| 389 |
+
if (Array.isArray(value)) {
|
| 390 |
+
for (var i = 0; i < value.length; i++) {
|
| 391 |
+
var key = String(i);
|
| 392 |
+
var replacement = internalize(value, key, reviver);
|
| 393 |
+
if (replacement === undefined) {
|
| 394 |
+
delete value[key];
|
| 395 |
+
} else {
|
| 396 |
+
Object.defineProperty(value, key, {
|
| 397 |
+
value: replacement,
|
| 398 |
+
writable: true,
|
| 399 |
+
enumerable: true,
|
| 400 |
+
configurable: true,
|
| 401 |
+
});
|
| 402 |
+
}
|
| 403 |
+
}
|
| 404 |
+
} else {
|
| 405 |
+
for (var key$1 in value) {
|
| 406 |
+
var replacement$1 = internalize(value, key$1, reviver);
|
| 407 |
+
if (replacement$1 === undefined) {
|
| 408 |
+
delete value[key$1];
|
| 409 |
+
} else {
|
| 410 |
+
Object.defineProperty(value, key$1, {
|
| 411 |
+
value: replacement$1,
|
| 412 |
+
writable: true,
|
| 413 |
+
enumerable: true,
|
| 414 |
+
configurable: true,
|
| 415 |
+
});
|
| 416 |
+
}
|
| 417 |
+
}
|
| 418 |
+
}
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
return reviver.call(holder, name, value)
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
var lexState;
|
| 425 |
+
var buffer;
|
| 426 |
+
var doubleQuote;
|
| 427 |
+
var sign;
|
| 428 |
+
var c;
|
| 429 |
+
|
| 430 |
+
function lex () {
|
| 431 |
+
lexState = 'default';
|
| 432 |
+
buffer = '';
|
| 433 |
+
doubleQuote = false;
|
| 434 |
+
sign = 1;
|
| 435 |
+
|
| 436 |
+
for (;;) {
|
| 437 |
+
c = peek();
|
| 438 |
+
|
| 439 |
+
// This code is unreachable.
|
| 440 |
+
// if (!lexStates[lexState]) {
|
| 441 |
+
// throw invalidLexState(lexState)
|
| 442 |
+
// }
|
| 443 |
+
|
| 444 |
+
var token = lexStates[lexState]();
|
| 445 |
+
if (token) {
|
| 446 |
+
return token
|
| 447 |
+
}
|
| 448 |
+
}
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
function peek () {
|
| 452 |
+
if (source[pos]) {
|
| 453 |
+
return String.fromCodePoint(source.codePointAt(pos))
|
| 454 |
+
}
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
function read () {
|
| 458 |
+
var c = peek();
|
| 459 |
+
|
| 460 |
+
if (c === '\n') {
|
| 461 |
+
line++;
|
| 462 |
+
column = 0;
|
| 463 |
+
} else if (c) {
|
| 464 |
+
column += c.length;
|
| 465 |
+
} else {
|
| 466 |
+
column++;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
if (c) {
|
| 470 |
+
pos += c.length;
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
return c
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
var lexStates = {
|
| 477 |
+
default: function default$1 () {
|
| 478 |
+
switch (c) {
|
| 479 |
+
case '\t':
|
| 480 |
+
case '\v':
|
| 481 |
+
case '\f':
|
| 482 |
+
case ' ':
|
| 483 |
+
case '\u00A0':
|
| 484 |
+
case '\uFEFF':
|
| 485 |
+
case '\n':
|
| 486 |
+
case '\r':
|
| 487 |
+
case '\u2028':
|
| 488 |
+
case '\u2029':
|
| 489 |
+
read();
|
| 490 |
+
return
|
| 491 |
+
|
| 492 |
+
case '/':
|
| 493 |
+
read();
|
| 494 |
+
lexState = 'comment';
|
| 495 |
+
return
|
| 496 |
+
|
| 497 |
+
case undefined:
|
| 498 |
+
read();
|
| 499 |
+
return newToken('eof')
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
if (util.isSpaceSeparator(c)) {
|
| 503 |
+
read();
|
| 504 |
+
return
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
// This code is unreachable.
|
| 508 |
+
// if (!lexStates[parseState]) {
|
| 509 |
+
// throw invalidLexState(parseState)
|
| 510 |
+
// }
|
| 511 |
+
|
| 512 |
+
return lexStates[parseState]()
|
| 513 |
+
},
|
| 514 |
+
|
| 515 |
+
comment: function comment () {
|
| 516 |
+
switch (c) {
|
| 517 |
+
case '*':
|
| 518 |
+
read();
|
| 519 |
+
lexState = 'multiLineComment';
|
| 520 |
+
return
|
| 521 |
+
|
| 522 |
+
case '/':
|
| 523 |
+
read();
|
| 524 |
+
lexState = 'singleLineComment';
|
| 525 |
+
return
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
throw invalidChar(read())
|
| 529 |
+
},
|
| 530 |
+
|
| 531 |
+
multiLineComment: function multiLineComment () {
|
| 532 |
+
switch (c) {
|
| 533 |
+
case '*':
|
| 534 |
+
read();
|
| 535 |
+
lexState = 'multiLineCommentAsterisk';
|
| 536 |
+
return
|
| 537 |
+
|
| 538 |
+
case undefined:
|
| 539 |
+
throw invalidChar(read())
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
read();
|
| 543 |
+
},
|
| 544 |
+
|
| 545 |
+
multiLineCommentAsterisk: function multiLineCommentAsterisk () {
|
| 546 |
+
switch (c) {
|
| 547 |
+
case '*':
|
| 548 |
+
read();
|
| 549 |
+
return
|
| 550 |
+
|
| 551 |
+
case '/':
|
| 552 |
+
read();
|
| 553 |
+
lexState = 'default';
|
| 554 |
+
return
|
| 555 |
+
|
| 556 |
+
case undefined:
|
| 557 |
+
throw invalidChar(read())
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
read();
|
| 561 |
+
lexState = 'multiLineComment';
|
| 562 |
+
},
|
| 563 |
+
|
| 564 |
+
singleLineComment: function singleLineComment () {
|
| 565 |
+
switch (c) {
|
| 566 |
+
case '\n':
|
| 567 |
+
case '\r':
|
| 568 |
+
case '\u2028':
|
| 569 |
+
case '\u2029':
|
| 570 |
+
read();
|
| 571 |
+
lexState = 'default';
|
| 572 |
+
return
|
| 573 |
+
|
| 574 |
+
case undefined:
|
| 575 |
+
read();
|
| 576 |
+
return newToken('eof')
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
read();
|
| 580 |
+
},
|
| 581 |
+
|
| 582 |
+
value: function value () {
|
| 583 |
+
switch (c) {
|
| 584 |
+
case '{':
|
| 585 |
+
case '[':
|
| 586 |
+
return newToken('punctuator', read())
|
| 587 |
+
|
| 588 |
+
case 'n':
|
| 589 |
+
read();
|
| 590 |
+
literal('ull');
|
| 591 |
+
return newToken('null', null)
|
| 592 |
+
|
| 593 |
+
case 't':
|
| 594 |
+
read();
|
| 595 |
+
literal('rue');
|
| 596 |
+
return newToken('boolean', true)
|
| 597 |
+
|
| 598 |
+
case 'f':
|
| 599 |
+
read();
|
| 600 |
+
literal('alse');
|
| 601 |
+
return newToken('boolean', false)
|
| 602 |
+
|
| 603 |
+
case '-':
|
| 604 |
+
case '+':
|
| 605 |
+
if (read() === '-') {
|
| 606 |
+
sign = -1;
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
lexState = 'sign';
|
| 610 |
+
return
|
| 611 |
+
|
| 612 |
+
case '.':
|
| 613 |
+
buffer = read();
|
| 614 |
+
lexState = 'decimalPointLeading';
|
| 615 |
+
return
|
| 616 |
+
|
| 617 |
+
case '0':
|
| 618 |
+
buffer = read();
|
| 619 |
+
lexState = 'zero';
|
| 620 |
+
return
|
| 621 |
+
|
| 622 |
+
case '1':
|
| 623 |
+
case '2':
|
| 624 |
+
case '3':
|
| 625 |
+
case '4':
|
| 626 |
+
case '5':
|
| 627 |
+
case '6':
|
| 628 |
+
case '7':
|
| 629 |
+
case '8':
|
| 630 |
+
case '9':
|
| 631 |
+
buffer = read();
|
| 632 |
+
lexState = 'decimalInteger';
|
| 633 |
+
return
|
| 634 |
+
|
| 635 |
+
case 'I':
|
| 636 |
+
read();
|
| 637 |
+
literal('nfinity');
|
| 638 |
+
return newToken('numeric', Infinity)
|
| 639 |
+
|
| 640 |
+
case 'N':
|
| 641 |
+
read();
|
| 642 |
+
literal('aN');
|
| 643 |
+
return newToken('numeric', NaN)
|
| 644 |
+
|
| 645 |
+
case '"':
|
| 646 |
+
case "'":
|
| 647 |
+
doubleQuote = (read() === '"');
|
| 648 |
+
buffer = '';
|
| 649 |
+
lexState = 'string';
|
| 650 |
+
return
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
throw invalidChar(read())
|
| 654 |
+
},
|
| 655 |
+
|
| 656 |
+
identifierNameStartEscape: function identifierNameStartEscape () {
|
| 657 |
+
if (c !== 'u') {
|
| 658 |
+
throw invalidChar(read())
|
| 659 |
+
}
|
| 660 |
+
|
| 661 |
+
read();
|
| 662 |
+
var u = unicodeEscape();
|
| 663 |
+
switch (u) {
|
| 664 |
+
case '$':
|
| 665 |
+
case '_':
|
| 666 |
+
break
|
| 667 |
+
|
| 668 |
+
default:
|
| 669 |
+
if (!util.isIdStartChar(u)) {
|
| 670 |
+
throw invalidIdentifier()
|
| 671 |
+
}
|
| 672 |
+
|
| 673 |
+
break
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
buffer += u;
|
| 677 |
+
lexState = 'identifierName';
|
| 678 |
+
},
|
| 679 |
+
|
| 680 |
+
identifierName: function identifierName () {
|
| 681 |
+
switch (c) {
|
| 682 |
+
case '$':
|
| 683 |
+
case '_':
|
| 684 |
+
case '\u200C':
|
| 685 |
+
case '\u200D':
|
| 686 |
+
buffer += read();
|
| 687 |
+
return
|
| 688 |
+
|
| 689 |
+
case '\\':
|
| 690 |
+
read();
|
| 691 |
+
lexState = 'identifierNameEscape';
|
| 692 |
+
return
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
if (util.isIdContinueChar(c)) {
|
| 696 |
+
buffer += read();
|
| 697 |
+
return
|
| 698 |
+
}
|
| 699 |
+
|
| 700 |
+
return newToken('identifier', buffer)
|
| 701 |
+
},
|
| 702 |
+
|
| 703 |
+
identifierNameEscape: function identifierNameEscape () {
|
| 704 |
+
if (c !== 'u') {
|
| 705 |
+
throw invalidChar(read())
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
read();
|
| 709 |
+
var u = unicodeEscape();
|
| 710 |
+
switch (u) {
|
| 711 |
+
case '$':
|
| 712 |
+
case '_':
|
| 713 |
+
case '\u200C':
|
| 714 |
+
case '\u200D':
|
| 715 |
+
break
|
| 716 |
+
|
| 717 |
+
default:
|
| 718 |
+
if (!util.isIdContinueChar(u)) {
|
| 719 |
+
throw invalidIdentifier()
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
break
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
buffer += u;
|
| 726 |
+
lexState = 'identifierName';
|
| 727 |
+
},
|
| 728 |
+
|
| 729 |
+
sign: function sign$1 () {
|
| 730 |
+
switch (c) {
|
| 731 |
+
case '.':
|
| 732 |
+
buffer = read();
|
| 733 |
+
lexState = 'decimalPointLeading';
|
| 734 |
+
return
|
| 735 |
+
|
| 736 |
+
case '0':
|
| 737 |
+
buffer = read();
|
| 738 |
+
lexState = 'zero';
|
| 739 |
+
return
|
| 740 |
+
|
| 741 |
+
case '1':
|
| 742 |
+
case '2':
|
| 743 |
+
case '3':
|
| 744 |
+
case '4':
|
| 745 |
+
case '5':
|
| 746 |
+
case '6':
|
| 747 |
+
case '7':
|
| 748 |
+
case '8':
|
| 749 |
+
case '9':
|
| 750 |
+
buffer = read();
|
| 751 |
+
lexState = 'decimalInteger';
|
| 752 |
+
return
|
| 753 |
+
|
| 754 |
+
case 'I':
|
| 755 |
+
read();
|
| 756 |
+
literal('nfinity');
|
| 757 |
+
return newToken('numeric', sign * Infinity)
|
| 758 |
+
|
| 759 |
+
case 'N':
|
| 760 |
+
read();
|
| 761 |
+
literal('aN');
|
| 762 |
+
return newToken('numeric', NaN)
|
| 763 |
+
}
|
| 764 |
+
|
| 765 |
+
throw invalidChar(read())
|
| 766 |
+
},
|
| 767 |
+
|
| 768 |
+
zero: function zero () {
|
| 769 |
+
switch (c) {
|
| 770 |
+
case '.':
|
| 771 |
+
buffer += read();
|
| 772 |
+
lexState = 'decimalPoint';
|
| 773 |
+
return
|
| 774 |
+
|
| 775 |
+
case 'e':
|
| 776 |
+
case 'E':
|
| 777 |
+
buffer += read();
|
| 778 |
+
lexState = 'decimalExponent';
|
| 779 |
+
return
|
| 780 |
+
|
| 781 |
+
case 'x':
|
| 782 |
+
case 'X':
|
| 783 |
+
buffer += read();
|
| 784 |
+
lexState = 'hexadecimal';
|
| 785 |
+
return
|
| 786 |
+
}
|
| 787 |
+
|
| 788 |
+
return newToken('numeric', sign * 0)
|
| 789 |
+
},
|
| 790 |
+
|
| 791 |
+
decimalInteger: function decimalInteger () {
|
| 792 |
+
switch (c) {
|
| 793 |
+
case '.':
|
| 794 |
+
buffer += read();
|
| 795 |
+
lexState = 'decimalPoint';
|
| 796 |
+
return
|
| 797 |
+
|
| 798 |
+
case 'e':
|
| 799 |
+
case 'E':
|
| 800 |
+
buffer += read();
|
| 801 |
+
lexState = 'decimalExponent';
|
| 802 |
+
return
|
| 803 |
+
}
|
| 804 |
+
|
| 805 |
+
if (util.isDigit(c)) {
|
| 806 |
+
buffer += read();
|
| 807 |
+
return
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
return newToken('numeric', sign * Number(buffer))
|
| 811 |
+
},
|
| 812 |
+
|
| 813 |
+
decimalPointLeading: function decimalPointLeading () {
|
| 814 |
+
if (util.isDigit(c)) {
|
| 815 |
+
buffer += read();
|
| 816 |
+
lexState = 'decimalFraction';
|
| 817 |
+
return
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
throw invalidChar(read())
|
| 821 |
+
},
|
| 822 |
+
|
| 823 |
+
decimalPoint: function decimalPoint () {
|
| 824 |
+
switch (c) {
|
| 825 |
+
case 'e':
|
| 826 |
+
case 'E':
|
| 827 |
+
buffer += read();
|
| 828 |
+
lexState = 'decimalExponent';
|
| 829 |
+
return
|
| 830 |
+
}
|
| 831 |
+
|
| 832 |
+
if (util.isDigit(c)) {
|
| 833 |
+
buffer += read();
|
| 834 |
+
lexState = 'decimalFraction';
|
| 835 |
+
return
|
| 836 |
+
}
|
| 837 |
+
|
| 838 |
+
return newToken('numeric', sign * Number(buffer))
|
| 839 |
+
},
|
| 840 |
+
|
| 841 |
+
decimalFraction: function decimalFraction () {
|
| 842 |
+
switch (c) {
|
| 843 |
+
case 'e':
|
| 844 |
+
case 'E':
|
| 845 |
+
buffer += read();
|
| 846 |
+
lexState = 'decimalExponent';
|
| 847 |
+
return
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
+
if (util.isDigit(c)) {
|
| 851 |
+
buffer += read();
|
| 852 |
+
return
|
| 853 |
+
}
|
| 854 |
+
|
| 855 |
+
return newToken('numeric', sign * Number(buffer))
|
| 856 |
+
},
|
| 857 |
+
|
| 858 |
+
decimalExponent: function decimalExponent () {
|
| 859 |
+
switch (c) {
|
| 860 |
+
case '+':
|
| 861 |
+
case '-':
|
| 862 |
+
buffer += read();
|
| 863 |
+
lexState = 'decimalExponentSign';
|
| 864 |
+
return
|
| 865 |
+
}
|
| 866 |
+
|
| 867 |
+
if (util.isDigit(c)) {
|
| 868 |
+
buffer += read();
|
| 869 |
+
lexState = 'decimalExponentInteger';
|
| 870 |
+
return
|
| 871 |
+
}
|
| 872 |
+
|
| 873 |
+
throw invalidChar(read())
|
| 874 |
+
},
|
| 875 |
+
|
| 876 |
+
decimalExponentSign: function decimalExponentSign () {
|
| 877 |
+
if (util.isDigit(c)) {
|
| 878 |
+
buffer += read();
|
| 879 |
+
lexState = 'decimalExponentInteger';
|
| 880 |
+
return
|
| 881 |
+
}
|
| 882 |
+
|
| 883 |
+
throw invalidChar(read())
|
| 884 |
+
},
|
| 885 |
+
|
| 886 |
+
decimalExponentInteger: function decimalExponentInteger () {
|
| 887 |
+
if (util.isDigit(c)) {
|
| 888 |
+
buffer += read();
|
| 889 |
+
return
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
return newToken('numeric', sign * Number(buffer))
|
| 893 |
+
},
|
| 894 |
+
|
| 895 |
+
hexadecimal: function hexadecimal () {
|
| 896 |
+
if (util.isHexDigit(c)) {
|
| 897 |
+
buffer += read();
|
| 898 |
+
lexState = 'hexadecimalInteger';
|
| 899 |
+
return
|
| 900 |
+
}
|
| 901 |
+
|
| 902 |
+
throw invalidChar(read())
|
| 903 |
+
},
|
| 904 |
+
|
| 905 |
+
hexadecimalInteger: function hexadecimalInteger () {
|
| 906 |
+
if (util.isHexDigit(c)) {
|
| 907 |
+
buffer += read();
|
| 908 |
+
return
|
| 909 |
+
}
|
| 910 |
+
|
| 911 |
+
return newToken('numeric', sign * Number(buffer))
|
| 912 |
+
},
|
| 913 |
+
|
| 914 |
+
string: function string () {
|
| 915 |
+
switch (c) {
|
| 916 |
+
case '\\':
|
| 917 |
+
read();
|
| 918 |
+
buffer += escape();
|
| 919 |
+
return
|
| 920 |
+
|
| 921 |
+
case '"':
|
| 922 |
+
if (doubleQuote) {
|
| 923 |
+
read();
|
| 924 |
+
return newToken('string', buffer)
|
| 925 |
+
}
|
| 926 |
+
|
| 927 |
+
buffer += read();
|
| 928 |
+
return
|
| 929 |
+
|
| 930 |
+
case "'":
|
| 931 |
+
if (!doubleQuote) {
|
| 932 |
+
read();
|
| 933 |
+
return newToken('string', buffer)
|
| 934 |
+
}
|
| 935 |
+
|
| 936 |
+
buffer += read();
|
| 937 |
+
return
|
| 938 |
+
|
| 939 |
+
case '\n':
|
| 940 |
+
case '\r':
|
| 941 |
+
throw invalidChar(read())
|
| 942 |
+
|
| 943 |
+
case '\u2028':
|
| 944 |
+
case '\u2029':
|
| 945 |
+
separatorChar(c);
|
| 946 |
+
break
|
| 947 |
+
|
| 948 |
+
case undefined:
|
| 949 |
+
throw invalidChar(read())
|
| 950 |
+
}
|
| 951 |
+
|
| 952 |
+
buffer += read();
|
| 953 |
+
},
|
| 954 |
+
|
| 955 |
+
start: function start () {
|
| 956 |
+
switch (c) {
|
| 957 |
+
case '{':
|
| 958 |
+
case '[':
|
| 959 |
+
return newToken('punctuator', read())
|
| 960 |
+
|
| 961 |
+
// This code is unreachable since the default lexState handles eof.
|
| 962 |
+
// case undefined:
|
| 963 |
+
// return newToken('eof')
|
| 964 |
+
}
|
| 965 |
+
|
| 966 |
+
lexState = 'value';
|
| 967 |
+
},
|
| 968 |
+
|
| 969 |
+
beforePropertyName: function beforePropertyName () {
|
| 970 |
+
switch (c) {
|
| 971 |
+
case '$':
|
| 972 |
+
case '_':
|
| 973 |
+
buffer = read();
|
| 974 |
+
lexState = 'identifierName';
|
| 975 |
+
return
|
| 976 |
+
|
| 977 |
+
case '\\':
|
| 978 |
+
read();
|
| 979 |
+
lexState = 'identifierNameStartEscape';
|
| 980 |
+
return
|
| 981 |
+
|
| 982 |
+
case '}':
|
| 983 |
+
return newToken('punctuator', read())
|
| 984 |
+
|
| 985 |
+
case '"':
|
| 986 |
+
case "'":
|
| 987 |
+
doubleQuote = (read() === '"');
|
| 988 |
+
lexState = 'string';
|
| 989 |
+
return
|
| 990 |
+
}
|
| 991 |
+
|
| 992 |
+
if (util.isIdStartChar(c)) {
|
| 993 |
+
buffer += read();
|
| 994 |
+
lexState = 'identifierName';
|
| 995 |
+
return
|
| 996 |
+
}
|
| 997 |
+
|
| 998 |
+
throw invalidChar(read())
|
| 999 |
+
},
|
| 1000 |
+
|
| 1001 |
+
afterPropertyName: function afterPropertyName () {
|
| 1002 |
+
if (c === ':') {
|
| 1003 |
+
return newToken('punctuator', read())
|
| 1004 |
+
}
|
| 1005 |
+
|
| 1006 |
+
throw invalidChar(read())
|
| 1007 |
+
},
|
| 1008 |
+
|
| 1009 |
+
beforePropertyValue: function beforePropertyValue () {
|
| 1010 |
+
lexState = 'value';
|
| 1011 |
+
},
|
| 1012 |
+
|
| 1013 |
+
afterPropertyValue: function afterPropertyValue () {
|
| 1014 |
+
switch (c) {
|
| 1015 |
+
case ',':
|
| 1016 |
+
case '}':
|
| 1017 |
+
return newToken('punctuator', read())
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
throw invalidChar(read())
|
| 1021 |
+
},
|
| 1022 |
+
|
| 1023 |
+
beforeArrayValue: function beforeArrayValue () {
|
| 1024 |
+
if (c === ']') {
|
| 1025 |
+
return newToken('punctuator', read())
|
| 1026 |
+
}
|
| 1027 |
+
|
| 1028 |
+
lexState = 'value';
|
| 1029 |
+
},
|
| 1030 |
+
|
| 1031 |
+
afterArrayValue: function afterArrayValue () {
|
| 1032 |
+
switch (c) {
|
| 1033 |
+
case ',':
|
| 1034 |
+
case ']':
|
| 1035 |
+
return newToken('punctuator', read())
|
| 1036 |
+
}
|
| 1037 |
+
|
| 1038 |
+
throw invalidChar(read())
|
| 1039 |
+
},
|
| 1040 |
+
|
| 1041 |
+
end: function end () {
|
| 1042 |
+
// This code is unreachable since it's handled by the default lexState.
|
| 1043 |
+
// if (c === undefined) {
|
| 1044 |
+
// read()
|
| 1045 |
+
// return newToken('eof')
|
| 1046 |
+
// }
|
| 1047 |
+
|
| 1048 |
+
throw invalidChar(read())
|
| 1049 |
+
},
|
| 1050 |
+
};
|
| 1051 |
+
|
| 1052 |
+
function newToken (type, value) {
|
| 1053 |
+
return {
|
| 1054 |
+
type: type,
|
| 1055 |
+
value: value,
|
| 1056 |
+
line: line,
|
| 1057 |
+
column: column,
|
| 1058 |
+
}
|
| 1059 |
+
}
|
| 1060 |
+
|
| 1061 |
+
function literal (s) {
|
| 1062 |
+
for (var i = 0, list = s; i < list.length; i += 1) {
|
| 1063 |
+
var c = list[i];
|
| 1064 |
+
|
| 1065 |
+
var p = peek();
|
| 1066 |
+
|
| 1067 |
+
if (p !== c) {
|
| 1068 |
+
throw invalidChar(read())
|
| 1069 |
+
}
|
| 1070 |
+
|
| 1071 |
+
read();
|
| 1072 |
+
}
|
| 1073 |
+
}
|
| 1074 |
+
|
| 1075 |
+
function escape () {
|
| 1076 |
+
var c = peek();
|
| 1077 |
+
switch (c) {
|
| 1078 |
+
case 'b':
|
| 1079 |
+
read();
|
| 1080 |
+
return '\b'
|
| 1081 |
+
|
| 1082 |
+
case 'f':
|
| 1083 |
+
read();
|
| 1084 |
+
return '\f'
|
| 1085 |
+
|
| 1086 |
+
case 'n':
|
| 1087 |
+
read();
|
| 1088 |
+
return '\n'
|
| 1089 |
+
|
| 1090 |
+
case 'r':
|
| 1091 |
+
read();
|
| 1092 |
+
return '\r'
|
| 1093 |
+
|
| 1094 |
+
case 't':
|
| 1095 |
+
read();
|
| 1096 |
+
return '\t'
|
| 1097 |
+
|
| 1098 |
+
case 'v':
|
| 1099 |
+
read();
|
| 1100 |
+
return '\v'
|
| 1101 |
+
|
| 1102 |
+
case '0':
|
| 1103 |
+
read();
|
| 1104 |
+
if (util.isDigit(peek())) {
|
| 1105 |
+
throw invalidChar(read())
|
| 1106 |
+
}
|
| 1107 |
+
|
| 1108 |
+
return '\0'
|
| 1109 |
+
|
| 1110 |
+
case 'x':
|
| 1111 |
+
read();
|
| 1112 |
+
return hexEscape()
|
| 1113 |
+
|
| 1114 |
+
case 'u':
|
| 1115 |
+
read();
|
| 1116 |
+
return unicodeEscape()
|
| 1117 |
+
|
| 1118 |
+
case '\n':
|
| 1119 |
+
case '\u2028':
|
| 1120 |
+
case '\u2029':
|
| 1121 |
+
read();
|
| 1122 |
+
return ''
|
| 1123 |
+
|
| 1124 |
+
case '\r':
|
| 1125 |
+
read();
|
| 1126 |
+
if (peek() === '\n') {
|
| 1127 |
+
read();
|
| 1128 |
+
}
|
| 1129 |
+
|
| 1130 |
+
return ''
|
| 1131 |
+
|
| 1132 |
+
case '1':
|
| 1133 |
+
case '2':
|
| 1134 |
+
case '3':
|
| 1135 |
+
case '4':
|
| 1136 |
+
case '5':
|
| 1137 |
+
case '6':
|
| 1138 |
+
case '7':
|
| 1139 |
+
case '8':
|
| 1140 |
+
case '9':
|
| 1141 |
+
throw invalidChar(read())
|
| 1142 |
+
|
| 1143 |
+
case undefined:
|
| 1144 |
+
throw invalidChar(read())
|
| 1145 |
+
}
|
| 1146 |
+
|
| 1147 |
+
return read()
|
| 1148 |
+
}
|
| 1149 |
+
|
| 1150 |
+
function hexEscape () {
|
| 1151 |
+
var buffer = '';
|
| 1152 |
+
var c = peek();
|
| 1153 |
+
|
| 1154 |
+
if (!util.isHexDigit(c)) {
|
| 1155 |
+
throw invalidChar(read())
|
| 1156 |
+
}
|
| 1157 |
+
|
| 1158 |
+
buffer += read();
|
| 1159 |
+
|
| 1160 |
+
c = peek();
|
| 1161 |
+
if (!util.isHexDigit(c)) {
|
| 1162 |
+
throw invalidChar(read())
|
| 1163 |
+
}
|
| 1164 |
+
|
| 1165 |
+
buffer += read();
|
| 1166 |
+
|
| 1167 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 1168 |
+
}
|
| 1169 |
+
|
| 1170 |
+
function unicodeEscape () {
|
| 1171 |
+
var buffer = '';
|
| 1172 |
+
var count = 4;
|
| 1173 |
+
|
| 1174 |
+
while (count-- > 0) {
|
| 1175 |
+
var c = peek();
|
| 1176 |
+
if (!util.isHexDigit(c)) {
|
| 1177 |
+
throw invalidChar(read())
|
| 1178 |
+
}
|
| 1179 |
+
|
| 1180 |
+
buffer += read();
|
| 1181 |
+
}
|
| 1182 |
+
|
| 1183 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 1184 |
+
}
|
| 1185 |
+
|
| 1186 |
+
var parseStates = {
|
| 1187 |
+
start: function start () {
|
| 1188 |
+
if (token.type === 'eof') {
|
| 1189 |
+
throw invalidEOF()
|
| 1190 |
+
}
|
| 1191 |
+
|
| 1192 |
+
push();
|
| 1193 |
+
},
|
| 1194 |
+
|
| 1195 |
+
beforePropertyName: function beforePropertyName () {
|
| 1196 |
+
switch (token.type) {
|
| 1197 |
+
case 'identifier':
|
| 1198 |
+
case 'string':
|
| 1199 |
+
key = token.value;
|
| 1200 |
+
parseState = 'afterPropertyName';
|
| 1201 |
+
return
|
| 1202 |
+
|
| 1203 |
+
case 'punctuator':
|
| 1204 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1205 |
+
// if (token.value !== '}') {
|
| 1206 |
+
// throw invalidToken()
|
| 1207 |
+
// }
|
| 1208 |
+
|
| 1209 |
+
pop();
|
| 1210 |
+
return
|
| 1211 |
+
|
| 1212 |
+
case 'eof':
|
| 1213 |
+
throw invalidEOF()
|
| 1214 |
+
}
|
| 1215 |
+
|
| 1216 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1217 |
+
// throw invalidToken()
|
| 1218 |
+
},
|
| 1219 |
+
|
| 1220 |
+
afterPropertyName: function afterPropertyName () {
|
| 1221 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1222 |
+
// if (token.type !== 'punctuator' || token.value !== ':') {
|
| 1223 |
+
// throw invalidToken()
|
| 1224 |
+
// }
|
| 1225 |
+
|
| 1226 |
+
if (token.type === 'eof') {
|
| 1227 |
+
throw invalidEOF()
|
| 1228 |
+
}
|
| 1229 |
+
|
| 1230 |
+
parseState = 'beforePropertyValue';
|
| 1231 |
+
},
|
| 1232 |
+
|
| 1233 |
+
beforePropertyValue: function beforePropertyValue () {
|
| 1234 |
+
if (token.type === 'eof') {
|
| 1235 |
+
throw invalidEOF()
|
| 1236 |
+
}
|
| 1237 |
+
|
| 1238 |
+
push();
|
| 1239 |
+
},
|
| 1240 |
+
|
| 1241 |
+
beforeArrayValue: function beforeArrayValue () {
|
| 1242 |
+
if (token.type === 'eof') {
|
| 1243 |
+
throw invalidEOF()
|
| 1244 |
+
}
|
| 1245 |
+
|
| 1246 |
+
if (token.type === 'punctuator' && token.value === ']') {
|
| 1247 |
+
pop();
|
| 1248 |
+
return
|
| 1249 |
+
}
|
| 1250 |
+
|
| 1251 |
+
push();
|
| 1252 |
+
},
|
| 1253 |
+
|
| 1254 |
+
afterPropertyValue: function afterPropertyValue () {
|
| 1255 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1256 |
+
// if (token.type !== 'punctuator') {
|
| 1257 |
+
// throw invalidToken()
|
| 1258 |
+
// }
|
| 1259 |
+
|
| 1260 |
+
if (token.type === 'eof') {
|
| 1261 |
+
throw invalidEOF()
|
| 1262 |
+
}
|
| 1263 |
+
|
| 1264 |
+
switch (token.value) {
|
| 1265 |
+
case ',':
|
| 1266 |
+
parseState = 'beforePropertyName';
|
| 1267 |
+
return
|
| 1268 |
+
|
| 1269 |
+
case '}':
|
| 1270 |
+
pop();
|
| 1271 |
+
}
|
| 1272 |
+
|
| 1273 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1274 |
+
// throw invalidToken()
|
| 1275 |
+
},
|
| 1276 |
+
|
| 1277 |
+
afterArrayValue: function afterArrayValue () {
|
| 1278 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1279 |
+
// if (token.type !== 'punctuator') {
|
| 1280 |
+
// throw invalidToken()
|
| 1281 |
+
// }
|
| 1282 |
+
|
| 1283 |
+
if (token.type === 'eof') {
|
| 1284 |
+
throw invalidEOF()
|
| 1285 |
+
}
|
| 1286 |
+
|
| 1287 |
+
switch (token.value) {
|
| 1288 |
+
case ',':
|
| 1289 |
+
parseState = 'beforeArrayValue';
|
| 1290 |
+
return
|
| 1291 |
+
|
| 1292 |
+
case ']':
|
| 1293 |
+
pop();
|
| 1294 |
+
}
|
| 1295 |
+
|
| 1296 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1297 |
+
// throw invalidToken()
|
| 1298 |
+
},
|
| 1299 |
+
|
| 1300 |
+
end: function end () {
|
| 1301 |
+
// This code is unreachable since it's handled by the lexState.
|
| 1302 |
+
// if (token.type !== 'eof') {
|
| 1303 |
+
// throw invalidToken()
|
| 1304 |
+
// }
|
| 1305 |
+
},
|
| 1306 |
+
};
|
| 1307 |
+
|
| 1308 |
+
function push () {
|
| 1309 |
+
var value;
|
| 1310 |
+
|
| 1311 |
+
switch (token.type) {
|
| 1312 |
+
case 'punctuator':
|
| 1313 |
+
switch (token.value) {
|
| 1314 |
+
case '{':
|
| 1315 |
+
value = {};
|
| 1316 |
+
break
|
| 1317 |
+
|
| 1318 |
+
case '[':
|
| 1319 |
+
value = [];
|
| 1320 |
+
break
|
| 1321 |
+
}
|
| 1322 |
+
|
| 1323 |
+
break
|
| 1324 |
+
|
| 1325 |
+
case 'null':
|
| 1326 |
+
case 'boolean':
|
| 1327 |
+
case 'numeric':
|
| 1328 |
+
case 'string':
|
| 1329 |
+
value = token.value;
|
| 1330 |
+
break
|
| 1331 |
+
|
| 1332 |
+
// This code is unreachable.
|
| 1333 |
+
// default:
|
| 1334 |
+
// throw invalidToken()
|
| 1335 |
+
}
|
| 1336 |
+
|
| 1337 |
+
if (root === undefined) {
|
| 1338 |
+
root = value;
|
| 1339 |
+
} else {
|
| 1340 |
+
var parent = stack[stack.length - 1];
|
| 1341 |
+
if (Array.isArray(parent)) {
|
| 1342 |
+
parent.push(value);
|
| 1343 |
+
} else {
|
| 1344 |
+
Object.defineProperty(parent, key, {
|
| 1345 |
+
value: value,
|
| 1346 |
+
writable: true,
|
| 1347 |
+
enumerable: true,
|
| 1348 |
+
configurable: true,
|
| 1349 |
+
});
|
| 1350 |
+
}
|
| 1351 |
+
}
|
| 1352 |
+
|
| 1353 |
+
if (value !== null && typeof value === 'object') {
|
| 1354 |
+
stack.push(value);
|
| 1355 |
+
|
| 1356 |
+
if (Array.isArray(value)) {
|
| 1357 |
+
parseState = 'beforeArrayValue';
|
| 1358 |
+
} else {
|
| 1359 |
+
parseState = 'beforePropertyName';
|
| 1360 |
+
}
|
| 1361 |
+
} else {
|
| 1362 |
+
var current = stack[stack.length - 1];
|
| 1363 |
+
if (current == null) {
|
| 1364 |
+
parseState = 'end';
|
| 1365 |
+
} else if (Array.isArray(current)) {
|
| 1366 |
+
parseState = 'afterArrayValue';
|
| 1367 |
+
} else {
|
| 1368 |
+
parseState = 'afterPropertyValue';
|
| 1369 |
+
}
|
| 1370 |
+
}
|
| 1371 |
+
}
|
| 1372 |
+
|
| 1373 |
+
function pop () {
|
| 1374 |
+
stack.pop();
|
| 1375 |
+
|
| 1376 |
+
var current = stack[stack.length - 1];
|
| 1377 |
+
if (current == null) {
|
| 1378 |
+
parseState = 'end';
|
| 1379 |
+
} else if (Array.isArray(current)) {
|
| 1380 |
+
parseState = 'afterArrayValue';
|
| 1381 |
+
} else {
|
| 1382 |
+
parseState = 'afterPropertyValue';
|
| 1383 |
+
}
|
| 1384 |
+
}
|
| 1385 |
+
|
| 1386 |
+
// This code is unreachable.
|
| 1387 |
+
// function invalidParseState () {
|
| 1388 |
+
// return new Error(`JSON5: invalid parse state '${parseState}'`)
|
| 1389 |
+
// }
|
| 1390 |
+
|
| 1391 |
+
// This code is unreachable.
|
| 1392 |
+
// function invalidLexState (state) {
|
| 1393 |
+
// return new Error(`JSON5: invalid lex state '${state}'`)
|
| 1394 |
+
// }
|
| 1395 |
+
|
| 1396 |
+
function invalidChar (c) {
|
| 1397 |
+
if (c === undefined) {
|
| 1398 |
+
return syntaxError(("JSON5: invalid end of input at " + line + ":" + column))
|
| 1399 |
+
}
|
| 1400 |
+
|
| 1401 |
+
return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column))
|
| 1402 |
+
}
|
| 1403 |
+
|
| 1404 |
+
function invalidEOF () {
|
| 1405 |
+
return syntaxError(("JSON5: invalid end of input at " + line + ":" + column))
|
| 1406 |
+
}
|
| 1407 |
+
|
| 1408 |
+
// This code is unreachable.
|
| 1409 |
+
// function invalidToken () {
|
| 1410 |
+
// if (token.type === 'eof') {
|
| 1411 |
+
// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1412 |
+
// }
|
| 1413 |
+
|
| 1414 |
+
// const c = String.fromCodePoint(token.value.codePointAt(0))
|
| 1415 |
+
// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
|
| 1416 |
+
// }
|
| 1417 |
+
|
| 1418 |
+
function invalidIdentifier () {
|
| 1419 |
+
column -= 5;
|
| 1420 |
+
return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column))
|
| 1421 |
+
}
|
| 1422 |
+
|
| 1423 |
+
function separatorChar (c) {
|
| 1424 |
+
console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping"));
|
| 1425 |
+
}
|
| 1426 |
+
|
| 1427 |
+
function formatChar (c) {
|
| 1428 |
+
var replacements = {
|
| 1429 |
+
"'": "\\'",
|
| 1430 |
+
'"': '\\"',
|
| 1431 |
+
'\\': '\\\\',
|
| 1432 |
+
'\b': '\\b',
|
| 1433 |
+
'\f': '\\f',
|
| 1434 |
+
'\n': '\\n',
|
| 1435 |
+
'\r': '\\r',
|
| 1436 |
+
'\t': '\\t',
|
| 1437 |
+
'\v': '\\v',
|
| 1438 |
+
'\0': '\\0',
|
| 1439 |
+
'\u2028': '\\u2028',
|
| 1440 |
+
'\u2029': '\\u2029',
|
| 1441 |
+
};
|
| 1442 |
+
|
| 1443 |
+
if (replacements[c]) {
|
| 1444 |
+
return replacements[c]
|
| 1445 |
+
}
|
| 1446 |
+
|
| 1447 |
+
if (c < ' ') {
|
| 1448 |
+
var hexString = c.charCodeAt(0).toString(16);
|
| 1449 |
+
return '\\x' + ('00' + hexString).substring(hexString.length)
|
| 1450 |
+
}
|
| 1451 |
+
|
| 1452 |
+
return c
|
| 1453 |
+
}
|
| 1454 |
+
|
| 1455 |
+
function syntaxError (message) {
|
| 1456 |
+
var err = new SyntaxError(message);
|
| 1457 |
+
err.lineNumber = line;
|
| 1458 |
+
err.columnNumber = column;
|
| 1459 |
+
return err
|
| 1460 |
+
}
|
| 1461 |
+
|
| 1462 |
+
var stringify = function stringify (value, replacer, space) {
|
| 1463 |
+
var stack = [];
|
| 1464 |
+
var indent = '';
|
| 1465 |
+
var propertyList;
|
| 1466 |
+
var replacerFunc;
|
| 1467 |
+
var gap = '';
|
| 1468 |
+
var quote;
|
| 1469 |
+
|
| 1470 |
+
if (
|
| 1471 |
+
replacer != null &&
|
| 1472 |
+
typeof replacer === 'object' &&
|
| 1473 |
+
!Array.isArray(replacer)
|
| 1474 |
+
) {
|
| 1475 |
+
space = replacer.space;
|
| 1476 |
+
quote = replacer.quote;
|
| 1477 |
+
replacer = replacer.replacer;
|
| 1478 |
+
}
|
| 1479 |
+
|
| 1480 |
+
if (typeof replacer === 'function') {
|
| 1481 |
+
replacerFunc = replacer;
|
| 1482 |
+
} else if (Array.isArray(replacer)) {
|
| 1483 |
+
propertyList = [];
|
| 1484 |
+
for (var i = 0, list = replacer; i < list.length; i += 1) {
|
| 1485 |
+
var v = list[i];
|
| 1486 |
+
|
| 1487 |
+
var item = (void 0);
|
| 1488 |
+
|
| 1489 |
+
if (typeof v === 'string') {
|
| 1490 |
+
item = v;
|
| 1491 |
+
} else if (
|
| 1492 |
+
typeof v === 'number' ||
|
| 1493 |
+
v instanceof String ||
|
| 1494 |
+
v instanceof Number
|
| 1495 |
+
) {
|
| 1496 |
+
item = String(v);
|
| 1497 |
+
}
|
| 1498 |
+
|
| 1499 |
+
if (item !== undefined && propertyList.indexOf(item) < 0) {
|
| 1500 |
+
propertyList.push(item);
|
| 1501 |
+
}
|
| 1502 |
+
}
|
| 1503 |
+
}
|
| 1504 |
+
|
| 1505 |
+
if (space instanceof Number) {
|
| 1506 |
+
space = Number(space);
|
| 1507 |
+
} else if (space instanceof String) {
|
| 1508 |
+
space = String(space);
|
| 1509 |
+
}
|
| 1510 |
+
|
| 1511 |
+
if (typeof space === 'number') {
|
| 1512 |
+
if (space > 0) {
|
| 1513 |
+
space = Math.min(10, Math.floor(space));
|
| 1514 |
+
gap = ' '.substr(0, space);
|
| 1515 |
+
}
|
| 1516 |
+
} else if (typeof space === 'string') {
|
| 1517 |
+
gap = space.substr(0, 10);
|
| 1518 |
+
}
|
| 1519 |
+
|
| 1520 |
+
return serializeProperty('', {'': value})
|
| 1521 |
+
|
| 1522 |
+
function serializeProperty (key, holder) {
|
| 1523 |
+
var value = holder[key];
|
| 1524 |
+
if (value != null) {
|
| 1525 |
+
if (typeof value.toJSON5 === 'function') {
|
| 1526 |
+
value = value.toJSON5(key);
|
| 1527 |
+
} else if (typeof value.toJSON === 'function') {
|
| 1528 |
+
value = value.toJSON(key);
|
| 1529 |
+
}
|
| 1530 |
+
}
|
| 1531 |
+
|
| 1532 |
+
if (replacerFunc) {
|
| 1533 |
+
value = replacerFunc.call(holder, key, value);
|
| 1534 |
+
}
|
| 1535 |
+
|
| 1536 |
+
if (value instanceof Number) {
|
| 1537 |
+
value = Number(value);
|
| 1538 |
+
} else if (value instanceof String) {
|
| 1539 |
+
value = String(value);
|
| 1540 |
+
} else if (value instanceof Boolean) {
|
| 1541 |
+
value = value.valueOf();
|
| 1542 |
+
}
|
| 1543 |
+
|
| 1544 |
+
switch (value) {
|
| 1545 |
+
case null: return 'null'
|
| 1546 |
+
case true: return 'true'
|
| 1547 |
+
case false: return 'false'
|
| 1548 |
+
}
|
| 1549 |
+
|
| 1550 |
+
if (typeof value === 'string') {
|
| 1551 |
+
return quoteString(value, false)
|
| 1552 |
+
}
|
| 1553 |
+
|
| 1554 |
+
if (typeof value === 'number') {
|
| 1555 |
+
return String(value)
|
| 1556 |
+
}
|
| 1557 |
+
|
| 1558 |
+
if (typeof value === 'object') {
|
| 1559 |
+
return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
|
| 1560 |
+
}
|
| 1561 |
+
|
| 1562 |
+
return undefined
|
| 1563 |
+
}
|
| 1564 |
+
|
| 1565 |
+
function quoteString (value) {
|
| 1566 |
+
var quotes = {
|
| 1567 |
+
"'": 0.1,
|
| 1568 |
+
'"': 0.2,
|
| 1569 |
+
};
|
| 1570 |
+
|
| 1571 |
+
var replacements = {
|
| 1572 |
+
"'": "\\'",
|
| 1573 |
+
'"': '\\"',
|
| 1574 |
+
'\\': '\\\\',
|
| 1575 |
+
'\b': '\\b',
|
| 1576 |
+
'\f': '\\f',
|
| 1577 |
+
'\n': '\\n',
|
| 1578 |
+
'\r': '\\r',
|
| 1579 |
+
'\t': '\\t',
|
| 1580 |
+
'\v': '\\v',
|
| 1581 |
+
'\0': '\\0',
|
| 1582 |
+
'\u2028': '\\u2028',
|
| 1583 |
+
'\u2029': '\\u2029',
|
| 1584 |
+
};
|
| 1585 |
+
|
| 1586 |
+
var product = '';
|
| 1587 |
+
|
| 1588 |
+
for (var i = 0; i < value.length; i++) {
|
| 1589 |
+
var c = value[i];
|
| 1590 |
+
switch (c) {
|
| 1591 |
+
case "'":
|
| 1592 |
+
case '"':
|
| 1593 |
+
quotes[c]++;
|
| 1594 |
+
product += c;
|
| 1595 |
+
continue
|
| 1596 |
+
|
| 1597 |
+
case '\0':
|
| 1598 |
+
if (util.isDigit(value[i + 1])) {
|
| 1599 |
+
product += '\\x00';
|
| 1600 |
+
continue
|
| 1601 |
+
}
|
| 1602 |
+
}
|
| 1603 |
+
|
| 1604 |
+
if (replacements[c]) {
|
| 1605 |
+
product += replacements[c];
|
| 1606 |
+
continue
|
| 1607 |
+
}
|
| 1608 |
+
|
| 1609 |
+
if (c < ' ') {
|
| 1610 |
+
var hexString = c.charCodeAt(0).toString(16);
|
| 1611 |
+
product += '\\x' + ('00' + hexString).substring(hexString.length);
|
| 1612 |
+
continue
|
| 1613 |
+
}
|
| 1614 |
+
|
| 1615 |
+
product += c;
|
| 1616 |
+
}
|
| 1617 |
+
|
| 1618 |
+
var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; });
|
| 1619 |
+
|
| 1620 |
+
product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);
|
| 1621 |
+
|
| 1622 |
+
return quoteChar + product + quoteChar
|
| 1623 |
+
}
|
| 1624 |
+
|
| 1625 |
+
function serializeObject (value) {
|
| 1626 |
+
if (stack.indexOf(value) >= 0) {
|
| 1627 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 1628 |
+
}
|
| 1629 |
+
|
| 1630 |
+
stack.push(value);
|
| 1631 |
+
|
| 1632 |
+
var stepback = indent;
|
| 1633 |
+
indent = indent + gap;
|
| 1634 |
+
|
| 1635 |
+
var keys = propertyList || Object.keys(value);
|
| 1636 |
+
var partial = [];
|
| 1637 |
+
for (var i = 0, list = keys; i < list.length; i += 1) {
|
| 1638 |
+
var key = list[i];
|
| 1639 |
+
|
| 1640 |
+
var propertyString = serializeProperty(key, value);
|
| 1641 |
+
if (propertyString !== undefined) {
|
| 1642 |
+
var member = serializeKey(key) + ':';
|
| 1643 |
+
if (gap !== '') {
|
| 1644 |
+
member += ' ';
|
| 1645 |
+
}
|
| 1646 |
+
member += propertyString;
|
| 1647 |
+
partial.push(member);
|
| 1648 |
+
}
|
| 1649 |
+
}
|
| 1650 |
+
|
| 1651 |
+
var final;
|
| 1652 |
+
if (partial.length === 0) {
|
| 1653 |
+
final = '{}';
|
| 1654 |
+
} else {
|
| 1655 |
+
var properties;
|
| 1656 |
+
if (gap === '') {
|
| 1657 |
+
properties = partial.join(',');
|
| 1658 |
+
final = '{' + properties + '}';
|
| 1659 |
+
} else {
|
| 1660 |
+
var separator = ',\n' + indent;
|
| 1661 |
+
properties = partial.join(separator);
|
| 1662 |
+
final = '{\n' + indent + properties + ',\n' + stepback + '}';
|
| 1663 |
+
}
|
| 1664 |
+
}
|
| 1665 |
+
|
| 1666 |
+
stack.pop();
|
| 1667 |
+
indent = stepback;
|
| 1668 |
+
return final
|
| 1669 |
+
}
|
| 1670 |
+
|
| 1671 |
+
function serializeKey (key) {
|
| 1672 |
+
if (key.length === 0) {
|
| 1673 |
+
return quoteString(key, true)
|
| 1674 |
+
}
|
| 1675 |
+
|
| 1676 |
+
var firstChar = String.fromCodePoint(key.codePointAt(0));
|
| 1677 |
+
if (!util.isIdStartChar(firstChar)) {
|
| 1678 |
+
return quoteString(key, true)
|
| 1679 |
+
}
|
| 1680 |
+
|
| 1681 |
+
for (var i = firstChar.length; i < key.length; i++) {
|
| 1682 |
+
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
|
| 1683 |
+
return quoteString(key, true)
|
| 1684 |
+
}
|
| 1685 |
+
}
|
| 1686 |
+
|
| 1687 |
+
return key
|
| 1688 |
+
}
|
| 1689 |
+
|
| 1690 |
+
function serializeArray (value) {
|
| 1691 |
+
if (stack.indexOf(value) >= 0) {
|
| 1692 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 1693 |
+
}
|
| 1694 |
+
|
| 1695 |
+
stack.push(value);
|
| 1696 |
+
|
| 1697 |
+
var stepback = indent;
|
| 1698 |
+
indent = indent + gap;
|
| 1699 |
+
|
| 1700 |
+
var partial = [];
|
| 1701 |
+
for (var i = 0; i < value.length; i++) {
|
| 1702 |
+
var propertyString = serializeProperty(String(i), value);
|
| 1703 |
+
partial.push((propertyString !== undefined) ? propertyString : 'null');
|
| 1704 |
+
}
|
| 1705 |
+
|
| 1706 |
+
var final;
|
| 1707 |
+
if (partial.length === 0) {
|
| 1708 |
+
final = '[]';
|
| 1709 |
+
} else {
|
| 1710 |
+
if (gap === '') {
|
| 1711 |
+
var properties = partial.join(',');
|
| 1712 |
+
final = '[' + properties + ']';
|
| 1713 |
+
} else {
|
| 1714 |
+
var separator = ',\n' + indent;
|
| 1715 |
+
var properties$1 = partial.join(separator);
|
| 1716 |
+
final = '[\n' + indent + properties$1 + ',\n' + stepback + ']';
|
| 1717 |
+
}
|
| 1718 |
+
}
|
| 1719 |
+
|
| 1720 |
+
stack.pop();
|
| 1721 |
+
indent = stepback;
|
| 1722 |
+
return final
|
| 1723 |
+
}
|
| 1724 |
+
};
|
| 1725 |
+
|
| 1726 |
+
var JSON5 = {
|
| 1727 |
+
parse: parse,
|
| 1728 |
+
stringify: stringify,
|
| 1729 |
+
};
|
| 1730 |
+
|
| 1731 |
+
var lib = JSON5;
|
| 1732 |
+
|
| 1733 |
+
var es5 = lib;
|
| 1734 |
+
|
| 1735 |
+
return es5;
|
| 1736 |
+
|
| 1737 |
+
})));
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),r=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),t=function(u){if(!r(u))throw TypeError(u+" is not an object!");return u},n=function(u){try{return!!u()}catch(u){return!0}},F=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=r(C)&&r(C.createElement),i=!F&&!n(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:F?Object.defineProperty:function(u,D,e){if(t(u),D=function(u,D){if(!r(u))return u;var e,t;if(D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;if("function"==typeof(e=u.valueOf)&&!r(t=e.call(u)))return t;if(!D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;throw TypeError("Can't convert object to primitive value")}(D,!0),t(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=F?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var r=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return r[u]||(r[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var r,t="Symbol(".concat(void 0===(r="src")?"":r,")_",(++s+f).toString(36)),n=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,r,F){var C="function"==typeof r;C&&(B(r,"name")||a(r,"name",e)),u[e]!==r&&(C&&(B(r,t)||a(r,t,u[e]?""+u[e]:n.join(String(e)))),u===D?u[e]=r:F?u[e]?u[e]=r:a(u,e,r):(delete u[e],a(u,e,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,r){return u.call(D,e,r)};case 3:return function(e,r,t){return u.call(D,e,r,t)}}return function(){return u.apply(D,arguments)}},p=function(u,r,t){var n,F,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[r]||(D[r]={}):(D[r]||{}).prototype,f=E?e:e[r]||(e[r]={}),l=f.prototype||(f.prototype={});for(n in E&&(t=r),t)C=((F=!i&&s&&void 0!==s[n])?s:t)[n],A=B&&F?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,n,C,u&p.U),f[n]!=C&&a(f,n,A),c&&l[n]!=C&&(l[n]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},b=(h=!1,function(u,D){var e,r,t=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),n=w(D),F=t.length;return n<0||n>=F?h?"":void 0:(e=t.charCodeAt(n))<55296||e>56319||n+1===F||(r=t.charCodeAt(n+1))<56320||r>57343?h?t.charAt(n):e:h?t.slice(n,n+2):r-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return b(this,u)}});e.String.codePointAt;var S=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,r,t=arguments,n=[],F=arguments.length,C=0;F>C;){if(D=+t[C++],r=1114111,((e=w(e=D))<0?S(e+r,0):x(e,r))!==D)throw RangeError(D+" is not a valid code point");n.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return n.join("")}});e.String.fromCodePoint;var _,O,j,I,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA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7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|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\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\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0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB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00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\u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-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[I])return String.fromCodePoint(_.codePointAt(I))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(I+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[O]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw ru(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw ru(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw ru(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw ru(W())},identifierNameStartEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw nu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"":case"":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":case"":case"":break;default:if(!U.isIdContinueChar(u))throw nu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw ru(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw ru(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw ru(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw ru(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw ru(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw ru(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw ru(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw ru(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+Fu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw ru(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw ru(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw ru(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw ru(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw ru(W())},end:function(){throw ru(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D<e.length;D+=1){var r=e[D];if(q()!==r)throw ru(W());W()}}function Y(){for(var u="",D=4;D-- >0;){var e=q();if(!U.isHexDigit(e))throw ru(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw tu();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(O="afterPropertyName");case"punctuator":return void eu();case"eof":throw tu()}},afterPropertyName:function(){if("eof"===M.type)throw tu();O="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw tu();Du()},beforeArrayValue:function(){if("eof"===M.type)throw tu();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=j[j.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,k,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)j.push(u),O=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=j[j.length-1];O=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){j.pop();var u=j[j.length-1];O=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function ru(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+Fu(u)+"' at "+V+":"+J)}function tu(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function nu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function Fu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),O="start",j=[],I=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[O]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,r){var t=D[e];if(null!=t&&"object"==typeof t)if(Array.isArray(t))for(var n=0;n<t.length;n++){var F=String(n),C=u(t,F,r);void 0===C?delete t[F]:Object.defineProperty(t,F,{value:C,writable:!0,enumerable:!0,configurable:!0})}else for(var A in t){var i=u(t,A,r);void 0===i?delete t[A]:Object.defineProperty(t,A,{value:i,writable:!0,enumerable:!0,configurable:!0})}return r.call(D,e,t)}({"":L},"",D):L},stringify:function(u,D,e){var r,t,n,F=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,n=D.quote,D=D.replacer),"function"==typeof D)t=D;else if(Array.isArray(D)){r=[];for(var i=0,E=D;i<E.length;i+=1){var o=E[i],a=void 0;"string"==typeof o?a=o:("number"==typeof o||o instanceof String||o instanceof Number)&&(a=String(o)),void 0!==a&&r.indexOf(a)<0&&r.push(a)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),t&&(e=t.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(F.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,r=[],t=0;t<u.length;t++){var n=c(String(t),u);r.push(void 0!==n?n:"null")}if(0===r.length)e="[]";else if(""===A){var i=r.join(",");e="["+i+"]"}else{var E=",\n"+C,o=r.join(E);e="[\n"+C+o+",\n"+D+"]"}return F.pop(),C=D,e}(e):function(u){if(F.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,t,n=r||Object.keys(u),i=[],E=0,o=n;E<o.length;E+=1){var a=o[E],B=c(a,u);if(void 0!==B){var f=s(a)+":";""!==A&&(f+=" "),f+=B,i.push(f)}}if(0===i.length)e="{}";else if(""===A)t=i.join(","),e="{"+t+"}";else{var l=",\n"+C;t=i.join(l),e="{\n"+C+t+",\n"+D+"}"}return F.pop(),C=D,e}(e):void 0}function B(u){for(var D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},r="",t=0;t<u.length;t++){var F=u[t];switch(F){case"'":case'"':D[F]++,r+=F;continue;case"\0":if(U.isDigit(u[t+1])){r+="\\x00";continue}}if(e[F])r+=e[F];else if(F<" "){var C=F.charCodeAt(0).toString(16);r+="\\x"+("00"+C).substring(C.length)}else r+=F}var A=n||Object.keys(D).reduce(function(u,e){return D[u]<D[e]?u:e});return A+(r=r.replace(new RegExp(A,"g"),e[A]))+A}function s(u){if(0===u.length)return B(u);var D=String.fromCodePoint(u.codePointAt(0));if(!U.isIdStartChar(D))return B(u);for(var e=D.length;e<u.length;e++)if(!U.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return B(u);return u}}}});
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.min.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFB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uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u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0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8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\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue},util={isSpaceSeparator:u=>"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||""===u||""===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)if(Array.isArray(r))for(let u=0;u<r.length;u++){const D=String(u),t=internalize(r,D,e);void 0===t?delete r[D]:Object.defineProperty(r,D,{value:t,writable:!0,enumerable:!0,configurable:!0})}else for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:Object.defineProperty(r,u,{value:D,writable:!0,enumerable:!0,configurable:!0})}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"":case"":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"":case"":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,key,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),n("",{"":u});function n(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?E(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D<u.length;D++){const e=n(String(D),u);t.push(void 0!==e?e:"null")}if(0===t.length)e="[]";else if(""===A){let u=t.join(",");e="["+u+"]"}else{let u=",\n"+a,r=t.join(u);e="[\n"+a+r+",\n"+D+"]"}return r.pop(),a=D,e}(e):function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=n(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function E(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;t<u.length;t++){const F=u[t];switch(F){case"'":case'"':D[F]++,r+=F;continue;case"\0":if(util.isDigit(u[t+1])){r+="\\x00";continue}}if(e[F])r+=e[F];else if(F<" "){let u=F.charCodeAt(0).toString(16);r+="\\x"+("00"+u).substring(u.length)}else r+=F}const t=C||Object.keys(D).reduce((u,e)=>D[u]<D[e]?u:e);return t+(r=r.replace(new RegExp(t,"g"),e[t]))+t}function i(u){if(0===u.length)return E(u);const D=String.fromCodePoint(u.codePointAt(0));if(!util.isIdStartChar(D))return E(u);for(let e=D.length;e<u.length;e++)if(!util.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return E(u);return u}};const JSON5={parse:parse,stringify:stringify};var lib=JSON5;export default lib;
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/dist/index.mjs
ADDED
|
@@ -0,0 +1,1426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// This is a generated file. Do not edit.
|
| 2 |
+
var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
| 3 |
+
var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01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C00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
| 4 |
+
var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0B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1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F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DE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uD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uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
| 5 |
+
|
| 6 |
+
var unicode = {
|
| 7 |
+
Space_Separator: Space_Separator,
|
| 8 |
+
ID_Start: ID_Start,
|
| 9 |
+
ID_Continue: ID_Continue
|
| 10 |
+
};
|
| 11 |
+
|
| 12 |
+
var util = {
|
| 13 |
+
isSpaceSeparator (c) {
|
| 14 |
+
return typeof c === 'string' && unicode.Space_Separator.test(c)
|
| 15 |
+
},
|
| 16 |
+
|
| 17 |
+
isIdStartChar (c) {
|
| 18 |
+
return typeof c === 'string' && (
|
| 19 |
+
(c >= 'a' && c <= 'z') ||
|
| 20 |
+
(c >= 'A' && c <= 'Z') ||
|
| 21 |
+
(c === '$') || (c === '_') ||
|
| 22 |
+
unicode.ID_Start.test(c)
|
| 23 |
+
)
|
| 24 |
+
},
|
| 25 |
+
|
| 26 |
+
isIdContinueChar (c) {
|
| 27 |
+
return typeof c === 'string' && (
|
| 28 |
+
(c >= 'a' && c <= 'z') ||
|
| 29 |
+
(c >= 'A' && c <= 'Z') ||
|
| 30 |
+
(c >= '0' && c <= '9') ||
|
| 31 |
+
(c === '$') || (c === '_') ||
|
| 32 |
+
(c === '\u200C') || (c === '\u200D') ||
|
| 33 |
+
unicode.ID_Continue.test(c)
|
| 34 |
+
)
|
| 35 |
+
},
|
| 36 |
+
|
| 37 |
+
isDigit (c) {
|
| 38 |
+
return typeof c === 'string' && /[0-9]/.test(c)
|
| 39 |
+
},
|
| 40 |
+
|
| 41 |
+
isHexDigit (c) {
|
| 42 |
+
return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
|
| 43 |
+
},
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
let source;
|
| 47 |
+
let parseState;
|
| 48 |
+
let stack;
|
| 49 |
+
let pos;
|
| 50 |
+
let line;
|
| 51 |
+
let column;
|
| 52 |
+
let token;
|
| 53 |
+
let key;
|
| 54 |
+
let root;
|
| 55 |
+
|
| 56 |
+
var parse = function parse (text, reviver) {
|
| 57 |
+
source = String(text);
|
| 58 |
+
parseState = 'start';
|
| 59 |
+
stack = [];
|
| 60 |
+
pos = 0;
|
| 61 |
+
line = 1;
|
| 62 |
+
column = 0;
|
| 63 |
+
token = undefined;
|
| 64 |
+
key = undefined;
|
| 65 |
+
root = undefined;
|
| 66 |
+
|
| 67 |
+
do {
|
| 68 |
+
token = lex();
|
| 69 |
+
|
| 70 |
+
// This code is unreachable.
|
| 71 |
+
// if (!parseStates[parseState]) {
|
| 72 |
+
// throw invalidParseState()
|
| 73 |
+
// }
|
| 74 |
+
|
| 75 |
+
parseStates[parseState]();
|
| 76 |
+
} while (token.type !== 'eof')
|
| 77 |
+
|
| 78 |
+
if (typeof reviver === 'function') {
|
| 79 |
+
return internalize({'': root}, '', reviver)
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
return root
|
| 83 |
+
};
|
| 84 |
+
|
| 85 |
+
function internalize (holder, name, reviver) {
|
| 86 |
+
const value = holder[name];
|
| 87 |
+
if (value != null && typeof value === 'object') {
|
| 88 |
+
if (Array.isArray(value)) {
|
| 89 |
+
for (let i = 0; i < value.length; i++) {
|
| 90 |
+
const key = String(i);
|
| 91 |
+
const replacement = internalize(value, key, reviver);
|
| 92 |
+
if (replacement === undefined) {
|
| 93 |
+
delete value[key];
|
| 94 |
+
} else {
|
| 95 |
+
Object.defineProperty(value, key, {
|
| 96 |
+
value: replacement,
|
| 97 |
+
writable: true,
|
| 98 |
+
enumerable: true,
|
| 99 |
+
configurable: true,
|
| 100 |
+
});
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
} else {
|
| 104 |
+
for (const key in value) {
|
| 105 |
+
const replacement = internalize(value, key, reviver);
|
| 106 |
+
if (replacement === undefined) {
|
| 107 |
+
delete value[key];
|
| 108 |
+
} else {
|
| 109 |
+
Object.defineProperty(value, key, {
|
| 110 |
+
value: replacement,
|
| 111 |
+
writable: true,
|
| 112 |
+
enumerable: true,
|
| 113 |
+
configurable: true,
|
| 114 |
+
});
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
return reviver.call(holder, name, value)
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
let lexState;
|
| 124 |
+
let buffer;
|
| 125 |
+
let doubleQuote;
|
| 126 |
+
let sign;
|
| 127 |
+
let c;
|
| 128 |
+
|
| 129 |
+
function lex () {
|
| 130 |
+
lexState = 'default';
|
| 131 |
+
buffer = '';
|
| 132 |
+
doubleQuote = false;
|
| 133 |
+
sign = 1;
|
| 134 |
+
|
| 135 |
+
for (;;) {
|
| 136 |
+
c = peek();
|
| 137 |
+
|
| 138 |
+
// This code is unreachable.
|
| 139 |
+
// if (!lexStates[lexState]) {
|
| 140 |
+
// throw invalidLexState(lexState)
|
| 141 |
+
// }
|
| 142 |
+
|
| 143 |
+
const token = lexStates[lexState]();
|
| 144 |
+
if (token) {
|
| 145 |
+
return token
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
function peek () {
|
| 151 |
+
if (source[pos]) {
|
| 152 |
+
return String.fromCodePoint(source.codePointAt(pos))
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
function read () {
|
| 157 |
+
const c = peek();
|
| 158 |
+
|
| 159 |
+
if (c === '\n') {
|
| 160 |
+
line++;
|
| 161 |
+
column = 0;
|
| 162 |
+
} else if (c) {
|
| 163 |
+
column += c.length;
|
| 164 |
+
} else {
|
| 165 |
+
column++;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
if (c) {
|
| 169 |
+
pos += c.length;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
return c
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
const lexStates = {
|
| 176 |
+
default () {
|
| 177 |
+
switch (c) {
|
| 178 |
+
case '\t':
|
| 179 |
+
case '\v':
|
| 180 |
+
case '\f':
|
| 181 |
+
case ' ':
|
| 182 |
+
case '\u00A0':
|
| 183 |
+
case '\uFEFF':
|
| 184 |
+
case '\n':
|
| 185 |
+
case '\r':
|
| 186 |
+
case '\u2028':
|
| 187 |
+
case '\u2029':
|
| 188 |
+
read();
|
| 189 |
+
return
|
| 190 |
+
|
| 191 |
+
case '/':
|
| 192 |
+
read();
|
| 193 |
+
lexState = 'comment';
|
| 194 |
+
return
|
| 195 |
+
|
| 196 |
+
case undefined:
|
| 197 |
+
read();
|
| 198 |
+
return newToken('eof')
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
if (util.isSpaceSeparator(c)) {
|
| 202 |
+
read();
|
| 203 |
+
return
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
// This code is unreachable.
|
| 207 |
+
// if (!lexStates[parseState]) {
|
| 208 |
+
// throw invalidLexState(parseState)
|
| 209 |
+
// }
|
| 210 |
+
|
| 211 |
+
return lexStates[parseState]()
|
| 212 |
+
},
|
| 213 |
+
|
| 214 |
+
comment () {
|
| 215 |
+
switch (c) {
|
| 216 |
+
case '*':
|
| 217 |
+
read();
|
| 218 |
+
lexState = 'multiLineComment';
|
| 219 |
+
return
|
| 220 |
+
|
| 221 |
+
case '/':
|
| 222 |
+
read();
|
| 223 |
+
lexState = 'singleLineComment';
|
| 224 |
+
return
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
throw invalidChar(read())
|
| 228 |
+
},
|
| 229 |
+
|
| 230 |
+
multiLineComment () {
|
| 231 |
+
switch (c) {
|
| 232 |
+
case '*':
|
| 233 |
+
read();
|
| 234 |
+
lexState = 'multiLineCommentAsterisk';
|
| 235 |
+
return
|
| 236 |
+
|
| 237 |
+
case undefined:
|
| 238 |
+
throw invalidChar(read())
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
read();
|
| 242 |
+
},
|
| 243 |
+
|
| 244 |
+
multiLineCommentAsterisk () {
|
| 245 |
+
switch (c) {
|
| 246 |
+
case '*':
|
| 247 |
+
read();
|
| 248 |
+
return
|
| 249 |
+
|
| 250 |
+
case '/':
|
| 251 |
+
read();
|
| 252 |
+
lexState = 'default';
|
| 253 |
+
return
|
| 254 |
+
|
| 255 |
+
case undefined:
|
| 256 |
+
throw invalidChar(read())
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
read();
|
| 260 |
+
lexState = 'multiLineComment';
|
| 261 |
+
},
|
| 262 |
+
|
| 263 |
+
singleLineComment () {
|
| 264 |
+
switch (c) {
|
| 265 |
+
case '\n':
|
| 266 |
+
case '\r':
|
| 267 |
+
case '\u2028':
|
| 268 |
+
case '\u2029':
|
| 269 |
+
read();
|
| 270 |
+
lexState = 'default';
|
| 271 |
+
return
|
| 272 |
+
|
| 273 |
+
case undefined:
|
| 274 |
+
read();
|
| 275 |
+
return newToken('eof')
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
read();
|
| 279 |
+
},
|
| 280 |
+
|
| 281 |
+
value () {
|
| 282 |
+
switch (c) {
|
| 283 |
+
case '{':
|
| 284 |
+
case '[':
|
| 285 |
+
return newToken('punctuator', read())
|
| 286 |
+
|
| 287 |
+
case 'n':
|
| 288 |
+
read();
|
| 289 |
+
literal('ull');
|
| 290 |
+
return newToken('null', null)
|
| 291 |
+
|
| 292 |
+
case 't':
|
| 293 |
+
read();
|
| 294 |
+
literal('rue');
|
| 295 |
+
return newToken('boolean', true)
|
| 296 |
+
|
| 297 |
+
case 'f':
|
| 298 |
+
read();
|
| 299 |
+
literal('alse');
|
| 300 |
+
return newToken('boolean', false)
|
| 301 |
+
|
| 302 |
+
case '-':
|
| 303 |
+
case '+':
|
| 304 |
+
if (read() === '-') {
|
| 305 |
+
sign = -1;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
lexState = 'sign';
|
| 309 |
+
return
|
| 310 |
+
|
| 311 |
+
case '.':
|
| 312 |
+
buffer = read();
|
| 313 |
+
lexState = 'decimalPointLeading';
|
| 314 |
+
return
|
| 315 |
+
|
| 316 |
+
case '0':
|
| 317 |
+
buffer = read();
|
| 318 |
+
lexState = 'zero';
|
| 319 |
+
return
|
| 320 |
+
|
| 321 |
+
case '1':
|
| 322 |
+
case '2':
|
| 323 |
+
case '3':
|
| 324 |
+
case '4':
|
| 325 |
+
case '5':
|
| 326 |
+
case '6':
|
| 327 |
+
case '7':
|
| 328 |
+
case '8':
|
| 329 |
+
case '9':
|
| 330 |
+
buffer = read();
|
| 331 |
+
lexState = 'decimalInteger';
|
| 332 |
+
return
|
| 333 |
+
|
| 334 |
+
case 'I':
|
| 335 |
+
read();
|
| 336 |
+
literal('nfinity');
|
| 337 |
+
return newToken('numeric', Infinity)
|
| 338 |
+
|
| 339 |
+
case 'N':
|
| 340 |
+
read();
|
| 341 |
+
literal('aN');
|
| 342 |
+
return newToken('numeric', NaN)
|
| 343 |
+
|
| 344 |
+
case '"':
|
| 345 |
+
case "'":
|
| 346 |
+
doubleQuote = (read() === '"');
|
| 347 |
+
buffer = '';
|
| 348 |
+
lexState = 'string';
|
| 349 |
+
return
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
throw invalidChar(read())
|
| 353 |
+
},
|
| 354 |
+
|
| 355 |
+
identifierNameStartEscape () {
|
| 356 |
+
if (c !== 'u') {
|
| 357 |
+
throw invalidChar(read())
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
read();
|
| 361 |
+
const u = unicodeEscape();
|
| 362 |
+
switch (u) {
|
| 363 |
+
case '$':
|
| 364 |
+
case '_':
|
| 365 |
+
break
|
| 366 |
+
|
| 367 |
+
default:
|
| 368 |
+
if (!util.isIdStartChar(u)) {
|
| 369 |
+
throw invalidIdentifier()
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
break
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
buffer += u;
|
| 376 |
+
lexState = 'identifierName';
|
| 377 |
+
},
|
| 378 |
+
|
| 379 |
+
identifierName () {
|
| 380 |
+
switch (c) {
|
| 381 |
+
case '$':
|
| 382 |
+
case '_':
|
| 383 |
+
case '\u200C':
|
| 384 |
+
case '\u200D':
|
| 385 |
+
buffer += read();
|
| 386 |
+
return
|
| 387 |
+
|
| 388 |
+
case '\\':
|
| 389 |
+
read();
|
| 390 |
+
lexState = 'identifierNameEscape';
|
| 391 |
+
return
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
if (util.isIdContinueChar(c)) {
|
| 395 |
+
buffer += read();
|
| 396 |
+
return
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
return newToken('identifier', buffer)
|
| 400 |
+
},
|
| 401 |
+
|
| 402 |
+
identifierNameEscape () {
|
| 403 |
+
if (c !== 'u') {
|
| 404 |
+
throw invalidChar(read())
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
read();
|
| 408 |
+
const u = unicodeEscape();
|
| 409 |
+
switch (u) {
|
| 410 |
+
case '$':
|
| 411 |
+
case '_':
|
| 412 |
+
case '\u200C':
|
| 413 |
+
case '\u200D':
|
| 414 |
+
break
|
| 415 |
+
|
| 416 |
+
default:
|
| 417 |
+
if (!util.isIdContinueChar(u)) {
|
| 418 |
+
throw invalidIdentifier()
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
break
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
buffer += u;
|
| 425 |
+
lexState = 'identifierName';
|
| 426 |
+
},
|
| 427 |
+
|
| 428 |
+
sign () {
|
| 429 |
+
switch (c) {
|
| 430 |
+
case '.':
|
| 431 |
+
buffer = read();
|
| 432 |
+
lexState = 'decimalPointLeading';
|
| 433 |
+
return
|
| 434 |
+
|
| 435 |
+
case '0':
|
| 436 |
+
buffer = read();
|
| 437 |
+
lexState = 'zero';
|
| 438 |
+
return
|
| 439 |
+
|
| 440 |
+
case '1':
|
| 441 |
+
case '2':
|
| 442 |
+
case '3':
|
| 443 |
+
case '4':
|
| 444 |
+
case '5':
|
| 445 |
+
case '6':
|
| 446 |
+
case '7':
|
| 447 |
+
case '8':
|
| 448 |
+
case '9':
|
| 449 |
+
buffer = read();
|
| 450 |
+
lexState = 'decimalInteger';
|
| 451 |
+
return
|
| 452 |
+
|
| 453 |
+
case 'I':
|
| 454 |
+
read();
|
| 455 |
+
literal('nfinity');
|
| 456 |
+
return newToken('numeric', sign * Infinity)
|
| 457 |
+
|
| 458 |
+
case 'N':
|
| 459 |
+
read();
|
| 460 |
+
literal('aN');
|
| 461 |
+
return newToken('numeric', NaN)
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
throw invalidChar(read())
|
| 465 |
+
},
|
| 466 |
+
|
| 467 |
+
zero () {
|
| 468 |
+
switch (c) {
|
| 469 |
+
case '.':
|
| 470 |
+
buffer += read();
|
| 471 |
+
lexState = 'decimalPoint';
|
| 472 |
+
return
|
| 473 |
+
|
| 474 |
+
case 'e':
|
| 475 |
+
case 'E':
|
| 476 |
+
buffer += read();
|
| 477 |
+
lexState = 'decimalExponent';
|
| 478 |
+
return
|
| 479 |
+
|
| 480 |
+
case 'x':
|
| 481 |
+
case 'X':
|
| 482 |
+
buffer += read();
|
| 483 |
+
lexState = 'hexadecimal';
|
| 484 |
+
return
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
return newToken('numeric', sign * 0)
|
| 488 |
+
},
|
| 489 |
+
|
| 490 |
+
decimalInteger () {
|
| 491 |
+
switch (c) {
|
| 492 |
+
case '.':
|
| 493 |
+
buffer += read();
|
| 494 |
+
lexState = 'decimalPoint';
|
| 495 |
+
return
|
| 496 |
+
|
| 497 |
+
case 'e':
|
| 498 |
+
case 'E':
|
| 499 |
+
buffer += read();
|
| 500 |
+
lexState = 'decimalExponent';
|
| 501 |
+
return
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
if (util.isDigit(c)) {
|
| 505 |
+
buffer += read();
|
| 506 |
+
return
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
return newToken('numeric', sign * Number(buffer))
|
| 510 |
+
},
|
| 511 |
+
|
| 512 |
+
decimalPointLeading () {
|
| 513 |
+
if (util.isDigit(c)) {
|
| 514 |
+
buffer += read();
|
| 515 |
+
lexState = 'decimalFraction';
|
| 516 |
+
return
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
throw invalidChar(read())
|
| 520 |
+
},
|
| 521 |
+
|
| 522 |
+
decimalPoint () {
|
| 523 |
+
switch (c) {
|
| 524 |
+
case 'e':
|
| 525 |
+
case 'E':
|
| 526 |
+
buffer += read();
|
| 527 |
+
lexState = 'decimalExponent';
|
| 528 |
+
return
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
if (util.isDigit(c)) {
|
| 532 |
+
buffer += read();
|
| 533 |
+
lexState = 'decimalFraction';
|
| 534 |
+
return
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
return newToken('numeric', sign * Number(buffer))
|
| 538 |
+
},
|
| 539 |
+
|
| 540 |
+
decimalFraction () {
|
| 541 |
+
switch (c) {
|
| 542 |
+
case 'e':
|
| 543 |
+
case 'E':
|
| 544 |
+
buffer += read();
|
| 545 |
+
lexState = 'decimalExponent';
|
| 546 |
+
return
|
| 547 |
+
}
|
| 548 |
+
|
| 549 |
+
if (util.isDigit(c)) {
|
| 550 |
+
buffer += read();
|
| 551 |
+
return
|
| 552 |
+
}
|
| 553 |
+
|
| 554 |
+
return newToken('numeric', sign * Number(buffer))
|
| 555 |
+
},
|
| 556 |
+
|
| 557 |
+
decimalExponent () {
|
| 558 |
+
switch (c) {
|
| 559 |
+
case '+':
|
| 560 |
+
case '-':
|
| 561 |
+
buffer += read();
|
| 562 |
+
lexState = 'decimalExponentSign';
|
| 563 |
+
return
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
if (util.isDigit(c)) {
|
| 567 |
+
buffer += read();
|
| 568 |
+
lexState = 'decimalExponentInteger';
|
| 569 |
+
return
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
throw invalidChar(read())
|
| 573 |
+
},
|
| 574 |
+
|
| 575 |
+
decimalExponentSign () {
|
| 576 |
+
if (util.isDigit(c)) {
|
| 577 |
+
buffer += read();
|
| 578 |
+
lexState = 'decimalExponentInteger';
|
| 579 |
+
return
|
| 580 |
+
}
|
| 581 |
+
|
| 582 |
+
throw invalidChar(read())
|
| 583 |
+
},
|
| 584 |
+
|
| 585 |
+
decimalExponentInteger () {
|
| 586 |
+
if (util.isDigit(c)) {
|
| 587 |
+
buffer += read();
|
| 588 |
+
return
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
return newToken('numeric', sign * Number(buffer))
|
| 592 |
+
},
|
| 593 |
+
|
| 594 |
+
hexadecimal () {
|
| 595 |
+
if (util.isHexDigit(c)) {
|
| 596 |
+
buffer += read();
|
| 597 |
+
lexState = 'hexadecimalInteger';
|
| 598 |
+
return
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
throw invalidChar(read())
|
| 602 |
+
},
|
| 603 |
+
|
| 604 |
+
hexadecimalInteger () {
|
| 605 |
+
if (util.isHexDigit(c)) {
|
| 606 |
+
buffer += read();
|
| 607 |
+
return
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
return newToken('numeric', sign * Number(buffer))
|
| 611 |
+
},
|
| 612 |
+
|
| 613 |
+
string () {
|
| 614 |
+
switch (c) {
|
| 615 |
+
case '\\':
|
| 616 |
+
read();
|
| 617 |
+
buffer += escape();
|
| 618 |
+
return
|
| 619 |
+
|
| 620 |
+
case '"':
|
| 621 |
+
if (doubleQuote) {
|
| 622 |
+
read();
|
| 623 |
+
return newToken('string', buffer)
|
| 624 |
+
}
|
| 625 |
+
|
| 626 |
+
buffer += read();
|
| 627 |
+
return
|
| 628 |
+
|
| 629 |
+
case "'":
|
| 630 |
+
if (!doubleQuote) {
|
| 631 |
+
read();
|
| 632 |
+
return newToken('string', buffer)
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
buffer += read();
|
| 636 |
+
return
|
| 637 |
+
|
| 638 |
+
case '\n':
|
| 639 |
+
case '\r':
|
| 640 |
+
throw invalidChar(read())
|
| 641 |
+
|
| 642 |
+
case '\u2028':
|
| 643 |
+
case '\u2029':
|
| 644 |
+
separatorChar(c);
|
| 645 |
+
break
|
| 646 |
+
|
| 647 |
+
case undefined:
|
| 648 |
+
throw invalidChar(read())
|
| 649 |
+
}
|
| 650 |
+
|
| 651 |
+
buffer += read();
|
| 652 |
+
},
|
| 653 |
+
|
| 654 |
+
start () {
|
| 655 |
+
switch (c) {
|
| 656 |
+
case '{':
|
| 657 |
+
case '[':
|
| 658 |
+
return newToken('punctuator', read())
|
| 659 |
+
|
| 660 |
+
// This code is unreachable since the default lexState handles eof.
|
| 661 |
+
// case undefined:
|
| 662 |
+
// return newToken('eof')
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
lexState = 'value';
|
| 666 |
+
},
|
| 667 |
+
|
| 668 |
+
beforePropertyName () {
|
| 669 |
+
switch (c) {
|
| 670 |
+
case '$':
|
| 671 |
+
case '_':
|
| 672 |
+
buffer = read();
|
| 673 |
+
lexState = 'identifierName';
|
| 674 |
+
return
|
| 675 |
+
|
| 676 |
+
case '\\':
|
| 677 |
+
read();
|
| 678 |
+
lexState = 'identifierNameStartEscape';
|
| 679 |
+
return
|
| 680 |
+
|
| 681 |
+
case '}':
|
| 682 |
+
return newToken('punctuator', read())
|
| 683 |
+
|
| 684 |
+
case '"':
|
| 685 |
+
case "'":
|
| 686 |
+
doubleQuote = (read() === '"');
|
| 687 |
+
lexState = 'string';
|
| 688 |
+
return
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
if (util.isIdStartChar(c)) {
|
| 692 |
+
buffer += read();
|
| 693 |
+
lexState = 'identifierName';
|
| 694 |
+
return
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
throw invalidChar(read())
|
| 698 |
+
},
|
| 699 |
+
|
| 700 |
+
afterPropertyName () {
|
| 701 |
+
if (c === ':') {
|
| 702 |
+
return newToken('punctuator', read())
|
| 703 |
+
}
|
| 704 |
+
|
| 705 |
+
throw invalidChar(read())
|
| 706 |
+
},
|
| 707 |
+
|
| 708 |
+
beforePropertyValue () {
|
| 709 |
+
lexState = 'value';
|
| 710 |
+
},
|
| 711 |
+
|
| 712 |
+
afterPropertyValue () {
|
| 713 |
+
switch (c) {
|
| 714 |
+
case ',':
|
| 715 |
+
case '}':
|
| 716 |
+
return newToken('punctuator', read())
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
throw invalidChar(read())
|
| 720 |
+
},
|
| 721 |
+
|
| 722 |
+
beforeArrayValue () {
|
| 723 |
+
if (c === ']') {
|
| 724 |
+
return newToken('punctuator', read())
|
| 725 |
+
}
|
| 726 |
+
|
| 727 |
+
lexState = 'value';
|
| 728 |
+
},
|
| 729 |
+
|
| 730 |
+
afterArrayValue () {
|
| 731 |
+
switch (c) {
|
| 732 |
+
case ',':
|
| 733 |
+
case ']':
|
| 734 |
+
return newToken('punctuator', read())
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
throw invalidChar(read())
|
| 738 |
+
},
|
| 739 |
+
|
| 740 |
+
end () {
|
| 741 |
+
// This code is unreachable since it's handled by the default lexState.
|
| 742 |
+
// if (c === undefined) {
|
| 743 |
+
// read()
|
| 744 |
+
// return newToken('eof')
|
| 745 |
+
// }
|
| 746 |
+
|
| 747 |
+
throw invalidChar(read())
|
| 748 |
+
},
|
| 749 |
+
};
|
| 750 |
+
|
| 751 |
+
function newToken (type, value) {
|
| 752 |
+
return {
|
| 753 |
+
type,
|
| 754 |
+
value,
|
| 755 |
+
line,
|
| 756 |
+
column,
|
| 757 |
+
}
|
| 758 |
+
}
|
| 759 |
+
|
| 760 |
+
function literal (s) {
|
| 761 |
+
for (const c of s) {
|
| 762 |
+
const p = peek();
|
| 763 |
+
|
| 764 |
+
if (p !== c) {
|
| 765 |
+
throw invalidChar(read())
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
read();
|
| 769 |
+
}
|
| 770 |
+
}
|
| 771 |
+
|
| 772 |
+
function escape () {
|
| 773 |
+
const c = peek();
|
| 774 |
+
switch (c) {
|
| 775 |
+
case 'b':
|
| 776 |
+
read();
|
| 777 |
+
return '\b'
|
| 778 |
+
|
| 779 |
+
case 'f':
|
| 780 |
+
read();
|
| 781 |
+
return '\f'
|
| 782 |
+
|
| 783 |
+
case 'n':
|
| 784 |
+
read();
|
| 785 |
+
return '\n'
|
| 786 |
+
|
| 787 |
+
case 'r':
|
| 788 |
+
read();
|
| 789 |
+
return '\r'
|
| 790 |
+
|
| 791 |
+
case 't':
|
| 792 |
+
read();
|
| 793 |
+
return '\t'
|
| 794 |
+
|
| 795 |
+
case 'v':
|
| 796 |
+
read();
|
| 797 |
+
return '\v'
|
| 798 |
+
|
| 799 |
+
case '0':
|
| 800 |
+
read();
|
| 801 |
+
if (util.isDigit(peek())) {
|
| 802 |
+
throw invalidChar(read())
|
| 803 |
+
}
|
| 804 |
+
|
| 805 |
+
return '\0'
|
| 806 |
+
|
| 807 |
+
case 'x':
|
| 808 |
+
read();
|
| 809 |
+
return hexEscape()
|
| 810 |
+
|
| 811 |
+
case 'u':
|
| 812 |
+
read();
|
| 813 |
+
return unicodeEscape()
|
| 814 |
+
|
| 815 |
+
case '\n':
|
| 816 |
+
case '\u2028':
|
| 817 |
+
case '\u2029':
|
| 818 |
+
read();
|
| 819 |
+
return ''
|
| 820 |
+
|
| 821 |
+
case '\r':
|
| 822 |
+
read();
|
| 823 |
+
if (peek() === '\n') {
|
| 824 |
+
read();
|
| 825 |
+
}
|
| 826 |
+
|
| 827 |
+
return ''
|
| 828 |
+
|
| 829 |
+
case '1':
|
| 830 |
+
case '2':
|
| 831 |
+
case '3':
|
| 832 |
+
case '4':
|
| 833 |
+
case '5':
|
| 834 |
+
case '6':
|
| 835 |
+
case '7':
|
| 836 |
+
case '8':
|
| 837 |
+
case '9':
|
| 838 |
+
throw invalidChar(read())
|
| 839 |
+
|
| 840 |
+
case undefined:
|
| 841 |
+
throw invalidChar(read())
|
| 842 |
+
}
|
| 843 |
+
|
| 844 |
+
return read()
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
function hexEscape () {
|
| 848 |
+
let buffer = '';
|
| 849 |
+
let c = peek();
|
| 850 |
+
|
| 851 |
+
if (!util.isHexDigit(c)) {
|
| 852 |
+
throw invalidChar(read())
|
| 853 |
+
}
|
| 854 |
+
|
| 855 |
+
buffer += read();
|
| 856 |
+
|
| 857 |
+
c = peek();
|
| 858 |
+
if (!util.isHexDigit(c)) {
|
| 859 |
+
throw invalidChar(read())
|
| 860 |
+
}
|
| 861 |
+
|
| 862 |
+
buffer += read();
|
| 863 |
+
|
| 864 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 865 |
+
}
|
| 866 |
+
|
| 867 |
+
function unicodeEscape () {
|
| 868 |
+
let buffer = '';
|
| 869 |
+
let count = 4;
|
| 870 |
+
|
| 871 |
+
while (count-- > 0) {
|
| 872 |
+
const c = peek();
|
| 873 |
+
if (!util.isHexDigit(c)) {
|
| 874 |
+
throw invalidChar(read())
|
| 875 |
+
}
|
| 876 |
+
|
| 877 |
+
buffer += read();
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 881 |
+
}
|
| 882 |
+
|
| 883 |
+
const parseStates = {
|
| 884 |
+
start () {
|
| 885 |
+
if (token.type === 'eof') {
|
| 886 |
+
throw invalidEOF()
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
push();
|
| 890 |
+
},
|
| 891 |
+
|
| 892 |
+
beforePropertyName () {
|
| 893 |
+
switch (token.type) {
|
| 894 |
+
case 'identifier':
|
| 895 |
+
case 'string':
|
| 896 |
+
key = token.value;
|
| 897 |
+
parseState = 'afterPropertyName';
|
| 898 |
+
return
|
| 899 |
+
|
| 900 |
+
case 'punctuator':
|
| 901 |
+
// This code is unreachable since it's handled by the lexState.
|
| 902 |
+
// if (token.value !== '}') {
|
| 903 |
+
// throw invalidToken()
|
| 904 |
+
// }
|
| 905 |
+
|
| 906 |
+
pop();
|
| 907 |
+
return
|
| 908 |
+
|
| 909 |
+
case 'eof':
|
| 910 |
+
throw invalidEOF()
|
| 911 |
+
}
|
| 912 |
+
|
| 913 |
+
// This code is unreachable since it's handled by the lexState.
|
| 914 |
+
// throw invalidToken()
|
| 915 |
+
},
|
| 916 |
+
|
| 917 |
+
afterPropertyName () {
|
| 918 |
+
// This code is unreachable since it's handled by the lexState.
|
| 919 |
+
// if (token.type !== 'punctuator' || token.value !== ':') {
|
| 920 |
+
// throw invalidToken()
|
| 921 |
+
// }
|
| 922 |
+
|
| 923 |
+
if (token.type === 'eof') {
|
| 924 |
+
throw invalidEOF()
|
| 925 |
+
}
|
| 926 |
+
|
| 927 |
+
parseState = 'beforePropertyValue';
|
| 928 |
+
},
|
| 929 |
+
|
| 930 |
+
beforePropertyValue () {
|
| 931 |
+
if (token.type === 'eof') {
|
| 932 |
+
throw invalidEOF()
|
| 933 |
+
}
|
| 934 |
+
|
| 935 |
+
push();
|
| 936 |
+
},
|
| 937 |
+
|
| 938 |
+
beforeArrayValue () {
|
| 939 |
+
if (token.type === 'eof') {
|
| 940 |
+
throw invalidEOF()
|
| 941 |
+
}
|
| 942 |
+
|
| 943 |
+
if (token.type === 'punctuator' && token.value === ']') {
|
| 944 |
+
pop();
|
| 945 |
+
return
|
| 946 |
+
}
|
| 947 |
+
|
| 948 |
+
push();
|
| 949 |
+
},
|
| 950 |
+
|
| 951 |
+
afterPropertyValue () {
|
| 952 |
+
// This code is unreachable since it's handled by the lexState.
|
| 953 |
+
// if (token.type !== 'punctuator') {
|
| 954 |
+
// throw invalidToken()
|
| 955 |
+
// }
|
| 956 |
+
|
| 957 |
+
if (token.type === 'eof') {
|
| 958 |
+
throw invalidEOF()
|
| 959 |
+
}
|
| 960 |
+
|
| 961 |
+
switch (token.value) {
|
| 962 |
+
case ',':
|
| 963 |
+
parseState = 'beforePropertyName';
|
| 964 |
+
return
|
| 965 |
+
|
| 966 |
+
case '}':
|
| 967 |
+
pop();
|
| 968 |
+
}
|
| 969 |
+
|
| 970 |
+
// This code is unreachable since it's handled by the lexState.
|
| 971 |
+
// throw invalidToken()
|
| 972 |
+
},
|
| 973 |
+
|
| 974 |
+
afterArrayValue () {
|
| 975 |
+
// This code is unreachable since it's handled by the lexState.
|
| 976 |
+
// if (token.type !== 'punctuator') {
|
| 977 |
+
// throw invalidToken()
|
| 978 |
+
// }
|
| 979 |
+
|
| 980 |
+
if (token.type === 'eof') {
|
| 981 |
+
throw invalidEOF()
|
| 982 |
+
}
|
| 983 |
+
|
| 984 |
+
switch (token.value) {
|
| 985 |
+
case ',':
|
| 986 |
+
parseState = 'beforeArrayValue';
|
| 987 |
+
return
|
| 988 |
+
|
| 989 |
+
case ']':
|
| 990 |
+
pop();
|
| 991 |
+
}
|
| 992 |
+
|
| 993 |
+
// This code is unreachable since it's handled by the lexState.
|
| 994 |
+
// throw invalidToken()
|
| 995 |
+
},
|
| 996 |
+
|
| 997 |
+
end () {
|
| 998 |
+
// This code is unreachable since it's handled by the lexState.
|
| 999 |
+
// if (token.type !== 'eof') {
|
| 1000 |
+
// throw invalidToken()
|
| 1001 |
+
// }
|
| 1002 |
+
},
|
| 1003 |
+
};
|
| 1004 |
+
|
| 1005 |
+
function push () {
|
| 1006 |
+
let value;
|
| 1007 |
+
|
| 1008 |
+
switch (token.type) {
|
| 1009 |
+
case 'punctuator':
|
| 1010 |
+
switch (token.value) {
|
| 1011 |
+
case '{':
|
| 1012 |
+
value = {};
|
| 1013 |
+
break
|
| 1014 |
+
|
| 1015 |
+
case '[':
|
| 1016 |
+
value = [];
|
| 1017 |
+
break
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
break
|
| 1021 |
+
|
| 1022 |
+
case 'null':
|
| 1023 |
+
case 'boolean':
|
| 1024 |
+
case 'numeric':
|
| 1025 |
+
case 'string':
|
| 1026 |
+
value = token.value;
|
| 1027 |
+
break
|
| 1028 |
+
|
| 1029 |
+
// This code is unreachable.
|
| 1030 |
+
// default:
|
| 1031 |
+
// throw invalidToken()
|
| 1032 |
+
}
|
| 1033 |
+
|
| 1034 |
+
if (root === undefined) {
|
| 1035 |
+
root = value;
|
| 1036 |
+
} else {
|
| 1037 |
+
const parent = stack[stack.length - 1];
|
| 1038 |
+
if (Array.isArray(parent)) {
|
| 1039 |
+
parent.push(value);
|
| 1040 |
+
} else {
|
| 1041 |
+
Object.defineProperty(parent, key, {
|
| 1042 |
+
value,
|
| 1043 |
+
writable: true,
|
| 1044 |
+
enumerable: true,
|
| 1045 |
+
configurable: true,
|
| 1046 |
+
});
|
| 1047 |
+
}
|
| 1048 |
+
}
|
| 1049 |
+
|
| 1050 |
+
if (value !== null && typeof value === 'object') {
|
| 1051 |
+
stack.push(value);
|
| 1052 |
+
|
| 1053 |
+
if (Array.isArray(value)) {
|
| 1054 |
+
parseState = 'beforeArrayValue';
|
| 1055 |
+
} else {
|
| 1056 |
+
parseState = 'beforePropertyName';
|
| 1057 |
+
}
|
| 1058 |
+
} else {
|
| 1059 |
+
const current = stack[stack.length - 1];
|
| 1060 |
+
if (current == null) {
|
| 1061 |
+
parseState = 'end';
|
| 1062 |
+
} else if (Array.isArray(current)) {
|
| 1063 |
+
parseState = 'afterArrayValue';
|
| 1064 |
+
} else {
|
| 1065 |
+
parseState = 'afterPropertyValue';
|
| 1066 |
+
}
|
| 1067 |
+
}
|
| 1068 |
+
}
|
| 1069 |
+
|
| 1070 |
+
function pop () {
|
| 1071 |
+
stack.pop();
|
| 1072 |
+
|
| 1073 |
+
const current = stack[stack.length - 1];
|
| 1074 |
+
if (current == null) {
|
| 1075 |
+
parseState = 'end';
|
| 1076 |
+
} else if (Array.isArray(current)) {
|
| 1077 |
+
parseState = 'afterArrayValue';
|
| 1078 |
+
} else {
|
| 1079 |
+
parseState = 'afterPropertyValue';
|
| 1080 |
+
}
|
| 1081 |
+
}
|
| 1082 |
+
|
| 1083 |
+
// This code is unreachable.
|
| 1084 |
+
// function invalidParseState () {
|
| 1085 |
+
// return new Error(`JSON5: invalid parse state '${parseState}'`)
|
| 1086 |
+
// }
|
| 1087 |
+
|
| 1088 |
+
// This code is unreachable.
|
| 1089 |
+
// function invalidLexState (state) {
|
| 1090 |
+
// return new Error(`JSON5: invalid lex state '${state}'`)
|
| 1091 |
+
// }
|
| 1092 |
+
|
| 1093 |
+
function invalidChar (c) {
|
| 1094 |
+
if (c === undefined) {
|
| 1095 |
+
return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1096 |
+
}
|
| 1097 |
+
|
| 1098 |
+
return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
|
| 1099 |
+
}
|
| 1100 |
+
|
| 1101 |
+
function invalidEOF () {
|
| 1102 |
+
return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1103 |
+
}
|
| 1104 |
+
|
| 1105 |
+
// This code is unreachable.
|
| 1106 |
+
// function invalidToken () {
|
| 1107 |
+
// if (token.type === 'eof') {
|
| 1108 |
+
// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1109 |
+
// }
|
| 1110 |
+
|
| 1111 |
+
// const c = String.fromCodePoint(token.value.codePointAt(0))
|
| 1112 |
+
// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
|
| 1113 |
+
// }
|
| 1114 |
+
|
| 1115 |
+
function invalidIdentifier () {
|
| 1116 |
+
column -= 5;
|
| 1117 |
+
return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)
|
| 1118 |
+
}
|
| 1119 |
+
|
| 1120 |
+
function separatorChar (c) {
|
| 1121 |
+
console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);
|
| 1122 |
+
}
|
| 1123 |
+
|
| 1124 |
+
function formatChar (c) {
|
| 1125 |
+
const replacements = {
|
| 1126 |
+
"'": "\\'",
|
| 1127 |
+
'"': '\\"',
|
| 1128 |
+
'\\': '\\\\',
|
| 1129 |
+
'\b': '\\b',
|
| 1130 |
+
'\f': '\\f',
|
| 1131 |
+
'\n': '\\n',
|
| 1132 |
+
'\r': '\\r',
|
| 1133 |
+
'\t': '\\t',
|
| 1134 |
+
'\v': '\\v',
|
| 1135 |
+
'\0': '\\0',
|
| 1136 |
+
'\u2028': '\\u2028',
|
| 1137 |
+
'\u2029': '\\u2029',
|
| 1138 |
+
};
|
| 1139 |
+
|
| 1140 |
+
if (replacements[c]) {
|
| 1141 |
+
return replacements[c]
|
| 1142 |
+
}
|
| 1143 |
+
|
| 1144 |
+
if (c < ' ') {
|
| 1145 |
+
const hexString = c.charCodeAt(0).toString(16);
|
| 1146 |
+
return '\\x' + ('00' + hexString).substring(hexString.length)
|
| 1147 |
+
}
|
| 1148 |
+
|
| 1149 |
+
return c
|
| 1150 |
+
}
|
| 1151 |
+
|
| 1152 |
+
function syntaxError (message) {
|
| 1153 |
+
const err = new SyntaxError(message);
|
| 1154 |
+
err.lineNumber = line;
|
| 1155 |
+
err.columnNumber = column;
|
| 1156 |
+
return err
|
| 1157 |
+
}
|
| 1158 |
+
|
| 1159 |
+
var stringify = function stringify (value, replacer, space) {
|
| 1160 |
+
const stack = [];
|
| 1161 |
+
let indent = '';
|
| 1162 |
+
let propertyList;
|
| 1163 |
+
let replacerFunc;
|
| 1164 |
+
let gap = '';
|
| 1165 |
+
let quote;
|
| 1166 |
+
|
| 1167 |
+
if (
|
| 1168 |
+
replacer != null &&
|
| 1169 |
+
typeof replacer === 'object' &&
|
| 1170 |
+
!Array.isArray(replacer)
|
| 1171 |
+
) {
|
| 1172 |
+
space = replacer.space;
|
| 1173 |
+
quote = replacer.quote;
|
| 1174 |
+
replacer = replacer.replacer;
|
| 1175 |
+
}
|
| 1176 |
+
|
| 1177 |
+
if (typeof replacer === 'function') {
|
| 1178 |
+
replacerFunc = replacer;
|
| 1179 |
+
} else if (Array.isArray(replacer)) {
|
| 1180 |
+
propertyList = [];
|
| 1181 |
+
for (const v of replacer) {
|
| 1182 |
+
let item;
|
| 1183 |
+
|
| 1184 |
+
if (typeof v === 'string') {
|
| 1185 |
+
item = v;
|
| 1186 |
+
} else if (
|
| 1187 |
+
typeof v === 'number' ||
|
| 1188 |
+
v instanceof String ||
|
| 1189 |
+
v instanceof Number
|
| 1190 |
+
) {
|
| 1191 |
+
item = String(v);
|
| 1192 |
+
}
|
| 1193 |
+
|
| 1194 |
+
if (item !== undefined && propertyList.indexOf(item) < 0) {
|
| 1195 |
+
propertyList.push(item);
|
| 1196 |
+
}
|
| 1197 |
+
}
|
| 1198 |
+
}
|
| 1199 |
+
|
| 1200 |
+
if (space instanceof Number) {
|
| 1201 |
+
space = Number(space);
|
| 1202 |
+
} else if (space instanceof String) {
|
| 1203 |
+
space = String(space);
|
| 1204 |
+
}
|
| 1205 |
+
|
| 1206 |
+
if (typeof space === 'number') {
|
| 1207 |
+
if (space > 0) {
|
| 1208 |
+
space = Math.min(10, Math.floor(space));
|
| 1209 |
+
gap = ' '.substr(0, space);
|
| 1210 |
+
}
|
| 1211 |
+
} else if (typeof space === 'string') {
|
| 1212 |
+
gap = space.substr(0, 10);
|
| 1213 |
+
}
|
| 1214 |
+
|
| 1215 |
+
return serializeProperty('', {'': value})
|
| 1216 |
+
|
| 1217 |
+
function serializeProperty (key, holder) {
|
| 1218 |
+
let value = holder[key];
|
| 1219 |
+
if (value != null) {
|
| 1220 |
+
if (typeof value.toJSON5 === 'function') {
|
| 1221 |
+
value = value.toJSON5(key);
|
| 1222 |
+
} else if (typeof value.toJSON === 'function') {
|
| 1223 |
+
value = value.toJSON(key);
|
| 1224 |
+
}
|
| 1225 |
+
}
|
| 1226 |
+
|
| 1227 |
+
if (replacerFunc) {
|
| 1228 |
+
value = replacerFunc.call(holder, key, value);
|
| 1229 |
+
}
|
| 1230 |
+
|
| 1231 |
+
if (value instanceof Number) {
|
| 1232 |
+
value = Number(value);
|
| 1233 |
+
} else if (value instanceof String) {
|
| 1234 |
+
value = String(value);
|
| 1235 |
+
} else if (value instanceof Boolean) {
|
| 1236 |
+
value = value.valueOf();
|
| 1237 |
+
}
|
| 1238 |
+
|
| 1239 |
+
switch (value) {
|
| 1240 |
+
case null: return 'null'
|
| 1241 |
+
case true: return 'true'
|
| 1242 |
+
case false: return 'false'
|
| 1243 |
+
}
|
| 1244 |
+
|
| 1245 |
+
if (typeof value === 'string') {
|
| 1246 |
+
return quoteString(value, false)
|
| 1247 |
+
}
|
| 1248 |
+
|
| 1249 |
+
if (typeof value === 'number') {
|
| 1250 |
+
return String(value)
|
| 1251 |
+
}
|
| 1252 |
+
|
| 1253 |
+
if (typeof value === 'object') {
|
| 1254 |
+
return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
|
| 1255 |
+
}
|
| 1256 |
+
|
| 1257 |
+
return undefined
|
| 1258 |
+
}
|
| 1259 |
+
|
| 1260 |
+
function quoteString (value) {
|
| 1261 |
+
const quotes = {
|
| 1262 |
+
"'": 0.1,
|
| 1263 |
+
'"': 0.2,
|
| 1264 |
+
};
|
| 1265 |
+
|
| 1266 |
+
const replacements = {
|
| 1267 |
+
"'": "\\'",
|
| 1268 |
+
'"': '\\"',
|
| 1269 |
+
'\\': '\\\\',
|
| 1270 |
+
'\b': '\\b',
|
| 1271 |
+
'\f': '\\f',
|
| 1272 |
+
'\n': '\\n',
|
| 1273 |
+
'\r': '\\r',
|
| 1274 |
+
'\t': '\\t',
|
| 1275 |
+
'\v': '\\v',
|
| 1276 |
+
'\0': '\\0',
|
| 1277 |
+
'\u2028': '\\u2028',
|
| 1278 |
+
'\u2029': '\\u2029',
|
| 1279 |
+
};
|
| 1280 |
+
|
| 1281 |
+
let product = '';
|
| 1282 |
+
|
| 1283 |
+
for (let i = 0; i < value.length; i++) {
|
| 1284 |
+
const c = value[i];
|
| 1285 |
+
switch (c) {
|
| 1286 |
+
case "'":
|
| 1287 |
+
case '"':
|
| 1288 |
+
quotes[c]++;
|
| 1289 |
+
product += c;
|
| 1290 |
+
continue
|
| 1291 |
+
|
| 1292 |
+
case '\0':
|
| 1293 |
+
if (util.isDigit(value[i + 1])) {
|
| 1294 |
+
product += '\\x00';
|
| 1295 |
+
continue
|
| 1296 |
+
}
|
| 1297 |
+
}
|
| 1298 |
+
|
| 1299 |
+
if (replacements[c]) {
|
| 1300 |
+
product += replacements[c];
|
| 1301 |
+
continue
|
| 1302 |
+
}
|
| 1303 |
+
|
| 1304 |
+
if (c < ' ') {
|
| 1305 |
+
let hexString = c.charCodeAt(0).toString(16);
|
| 1306 |
+
product += '\\x' + ('00' + hexString).substring(hexString.length);
|
| 1307 |
+
continue
|
| 1308 |
+
}
|
| 1309 |
+
|
| 1310 |
+
product += c;
|
| 1311 |
+
}
|
| 1312 |
+
|
| 1313 |
+
const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b);
|
| 1314 |
+
|
| 1315 |
+
product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);
|
| 1316 |
+
|
| 1317 |
+
return quoteChar + product + quoteChar
|
| 1318 |
+
}
|
| 1319 |
+
|
| 1320 |
+
function serializeObject (value) {
|
| 1321 |
+
if (stack.indexOf(value) >= 0) {
|
| 1322 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 1323 |
+
}
|
| 1324 |
+
|
| 1325 |
+
stack.push(value);
|
| 1326 |
+
|
| 1327 |
+
let stepback = indent;
|
| 1328 |
+
indent = indent + gap;
|
| 1329 |
+
|
| 1330 |
+
let keys = propertyList || Object.keys(value);
|
| 1331 |
+
let partial = [];
|
| 1332 |
+
for (const key of keys) {
|
| 1333 |
+
const propertyString = serializeProperty(key, value);
|
| 1334 |
+
if (propertyString !== undefined) {
|
| 1335 |
+
let member = serializeKey(key) + ':';
|
| 1336 |
+
if (gap !== '') {
|
| 1337 |
+
member += ' ';
|
| 1338 |
+
}
|
| 1339 |
+
member += propertyString;
|
| 1340 |
+
partial.push(member);
|
| 1341 |
+
}
|
| 1342 |
+
}
|
| 1343 |
+
|
| 1344 |
+
let final;
|
| 1345 |
+
if (partial.length === 0) {
|
| 1346 |
+
final = '{}';
|
| 1347 |
+
} else {
|
| 1348 |
+
let properties;
|
| 1349 |
+
if (gap === '') {
|
| 1350 |
+
properties = partial.join(',');
|
| 1351 |
+
final = '{' + properties + '}';
|
| 1352 |
+
} else {
|
| 1353 |
+
let separator = ',\n' + indent;
|
| 1354 |
+
properties = partial.join(separator);
|
| 1355 |
+
final = '{\n' + indent + properties + ',\n' + stepback + '}';
|
| 1356 |
+
}
|
| 1357 |
+
}
|
| 1358 |
+
|
| 1359 |
+
stack.pop();
|
| 1360 |
+
indent = stepback;
|
| 1361 |
+
return final
|
| 1362 |
+
}
|
| 1363 |
+
|
| 1364 |
+
function serializeKey (key) {
|
| 1365 |
+
if (key.length === 0) {
|
| 1366 |
+
return quoteString(key, true)
|
| 1367 |
+
}
|
| 1368 |
+
|
| 1369 |
+
const firstChar = String.fromCodePoint(key.codePointAt(0));
|
| 1370 |
+
if (!util.isIdStartChar(firstChar)) {
|
| 1371 |
+
return quoteString(key, true)
|
| 1372 |
+
}
|
| 1373 |
+
|
| 1374 |
+
for (let i = firstChar.length; i < key.length; i++) {
|
| 1375 |
+
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
|
| 1376 |
+
return quoteString(key, true)
|
| 1377 |
+
}
|
| 1378 |
+
}
|
| 1379 |
+
|
| 1380 |
+
return key
|
| 1381 |
+
}
|
| 1382 |
+
|
| 1383 |
+
function serializeArray (value) {
|
| 1384 |
+
if (stack.indexOf(value) >= 0) {
|
| 1385 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 1386 |
+
}
|
| 1387 |
+
|
| 1388 |
+
stack.push(value);
|
| 1389 |
+
|
| 1390 |
+
let stepback = indent;
|
| 1391 |
+
indent = indent + gap;
|
| 1392 |
+
|
| 1393 |
+
let partial = [];
|
| 1394 |
+
for (let i = 0; i < value.length; i++) {
|
| 1395 |
+
const propertyString = serializeProperty(String(i), value);
|
| 1396 |
+
partial.push((propertyString !== undefined) ? propertyString : 'null');
|
| 1397 |
+
}
|
| 1398 |
+
|
| 1399 |
+
let final;
|
| 1400 |
+
if (partial.length === 0) {
|
| 1401 |
+
final = '[]';
|
| 1402 |
+
} else {
|
| 1403 |
+
if (gap === '') {
|
| 1404 |
+
let properties = partial.join(',');
|
| 1405 |
+
final = '[' + properties + ']';
|
| 1406 |
+
} else {
|
| 1407 |
+
let separator = ',\n' + indent;
|
| 1408 |
+
let properties = partial.join(separator);
|
| 1409 |
+
final = '[\n' + indent + properties + ',\n' + stepback + ']';
|
| 1410 |
+
}
|
| 1411 |
+
}
|
| 1412 |
+
|
| 1413 |
+
stack.pop();
|
| 1414 |
+
indent = stepback;
|
| 1415 |
+
return final
|
| 1416 |
+
}
|
| 1417 |
+
};
|
| 1418 |
+
|
| 1419 |
+
const JSON5 = {
|
| 1420 |
+
parse,
|
| 1421 |
+
stringify,
|
| 1422 |
+
};
|
| 1423 |
+
|
| 1424 |
+
var lib = JSON5;
|
| 1425 |
+
|
| 1426 |
+
export default lib;
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/cli.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
|
| 3 |
+
const fs = require('fs')
|
| 4 |
+
const path = require('path')
|
| 5 |
+
const pkg = require('../package.json')
|
| 6 |
+
const JSON5 = require('./')
|
| 7 |
+
|
| 8 |
+
const argv = parseArgs()
|
| 9 |
+
|
| 10 |
+
if (argv.version) {
|
| 11 |
+
version()
|
| 12 |
+
} else if (argv.help) {
|
| 13 |
+
usage()
|
| 14 |
+
} else {
|
| 15 |
+
const inFilename = argv.defaults[0]
|
| 16 |
+
|
| 17 |
+
let readStream
|
| 18 |
+
if (inFilename) {
|
| 19 |
+
readStream = fs.createReadStream(inFilename)
|
| 20 |
+
} else {
|
| 21 |
+
readStream = process.stdin
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
let json5 = ''
|
| 25 |
+
readStream.on('data', data => {
|
| 26 |
+
json5 += data
|
| 27 |
+
})
|
| 28 |
+
|
| 29 |
+
readStream.on('end', () => {
|
| 30 |
+
let space
|
| 31 |
+
if (argv.space === 't' || argv.space === 'tab') {
|
| 32 |
+
space = '\t'
|
| 33 |
+
} else {
|
| 34 |
+
space = Number(argv.space)
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
let value
|
| 38 |
+
try {
|
| 39 |
+
value = JSON5.parse(json5)
|
| 40 |
+
if (!argv.validate) {
|
| 41 |
+
const json = JSON.stringify(value, null, space)
|
| 42 |
+
|
| 43 |
+
let writeStream
|
| 44 |
+
|
| 45 |
+
// --convert is for backward compatibility with v0.5.1. If
|
| 46 |
+
// specified with <file> and not --out-file, then a file with
|
| 47 |
+
// the same name but with a .json extension will be written.
|
| 48 |
+
if (argv.convert && inFilename && !argv.outFile) {
|
| 49 |
+
const parsedFilename = path.parse(inFilename)
|
| 50 |
+
const outFilename = path.format(
|
| 51 |
+
Object.assign(
|
| 52 |
+
parsedFilename,
|
| 53 |
+
{base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'}
|
| 54 |
+
)
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
writeStream = fs.createWriteStream(outFilename)
|
| 58 |
+
} else if (argv.outFile) {
|
| 59 |
+
writeStream = fs.createWriteStream(argv.outFile)
|
| 60 |
+
} else {
|
| 61 |
+
writeStream = process.stdout
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
writeStream.write(json)
|
| 65 |
+
}
|
| 66 |
+
} catch (err) {
|
| 67 |
+
console.error(err.message)
|
| 68 |
+
process.exit(1)
|
| 69 |
+
}
|
| 70 |
+
})
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
function parseArgs () {
|
| 74 |
+
let convert
|
| 75 |
+
let space
|
| 76 |
+
let validate
|
| 77 |
+
let outFile
|
| 78 |
+
let version
|
| 79 |
+
let help
|
| 80 |
+
const defaults = []
|
| 81 |
+
|
| 82 |
+
const args = process.argv.slice(2)
|
| 83 |
+
for (let i = 0; i < args.length; i++) {
|
| 84 |
+
const arg = args[i]
|
| 85 |
+
switch (arg) {
|
| 86 |
+
case '--convert':
|
| 87 |
+
case '-c':
|
| 88 |
+
convert = true
|
| 89 |
+
break
|
| 90 |
+
|
| 91 |
+
case '--space':
|
| 92 |
+
case '-s':
|
| 93 |
+
space = args[++i]
|
| 94 |
+
break
|
| 95 |
+
|
| 96 |
+
case '--validate':
|
| 97 |
+
case '-v':
|
| 98 |
+
validate = true
|
| 99 |
+
break
|
| 100 |
+
|
| 101 |
+
case '--out-file':
|
| 102 |
+
case '-o':
|
| 103 |
+
outFile = args[++i]
|
| 104 |
+
break
|
| 105 |
+
|
| 106 |
+
case '--version':
|
| 107 |
+
case '-V':
|
| 108 |
+
version = true
|
| 109 |
+
break
|
| 110 |
+
|
| 111 |
+
case '--help':
|
| 112 |
+
case '-h':
|
| 113 |
+
help = true
|
| 114 |
+
break
|
| 115 |
+
|
| 116 |
+
default:
|
| 117 |
+
defaults.push(arg)
|
| 118 |
+
break
|
| 119 |
+
}
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
return {
|
| 123 |
+
convert,
|
| 124 |
+
space,
|
| 125 |
+
validate,
|
| 126 |
+
outFile,
|
| 127 |
+
version,
|
| 128 |
+
help,
|
| 129 |
+
defaults,
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
function version () {
|
| 134 |
+
console.log(pkg.version)
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
function usage () {
|
| 138 |
+
console.log(
|
| 139 |
+
`
|
| 140 |
+
Usage: json5 [options] <file>
|
| 141 |
+
|
| 142 |
+
If <file> is not provided, then STDIN is used.
|
| 143 |
+
|
| 144 |
+
Options:
|
| 145 |
+
|
| 146 |
+
-s, --space The number of spaces to indent or 't' for tabs
|
| 147 |
+
-o, --out-file [file] Output to the specified file, otherwise STDOUT
|
| 148 |
+
-v, --validate Validate JSON5 but do not output JSON
|
| 149 |
+
-V, --version Output the version number
|
| 150 |
+
-h, --help Output usage information`
|
| 151 |
+
)
|
| 152 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import parse = require('./parse')
|
| 2 |
+
import stringify = require('./stringify')
|
| 3 |
+
|
| 4 |
+
export {parse, stringify}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const parse = require('./parse')
|
| 2 |
+
const stringify = require('./stringify')
|
| 3 |
+
|
| 4 |
+
const JSON5 = {
|
| 5 |
+
parse,
|
| 6 |
+
stringify,
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
module.exports = JSON5
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/parse.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Parses a JSON5 string, constructing the JavaScript value or object described
|
| 3 |
+
* by the string.
|
| 4 |
+
* @template T The type of the return value.
|
| 5 |
+
* @param text The string to parse as JSON5.
|
| 6 |
+
* @param reviver A function that prescribes how the value originally produced
|
| 7 |
+
* by parsing is transformed before being returned.
|
| 8 |
+
* @returns The JavaScript value converted from the JSON5 string.
|
| 9 |
+
*/
|
| 10 |
+
declare function parse<T = any>(
|
| 11 |
+
text: string,
|
| 12 |
+
reviver?: ((this: any, key: string, value: any) => any) | null,
|
| 13 |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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const util = require('./util')
|
| 2 |
+
|
| 3 |
+
let source
|
| 4 |
+
let parseState
|
| 5 |
+
let stack
|
| 6 |
+
let pos
|
| 7 |
+
let line
|
| 8 |
+
let column
|
| 9 |
+
let token
|
| 10 |
+
let key
|
| 11 |
+
let root
|
| 12 |
+
|
| 13 |
+
module.exports = function parse (text, reviver) {
|
| 14 |
+
source = String(text)
|
| 15 |
+
parseState = 'start'
|
| 16 |
+
stack = []
|
| 17 |
+
pos = 0
|
| 18 |
+
line = 1
|
| 19 |
+
column = 0
|
| 20 |
+
token = undefined
|
| 21 |
+
key = undefined
|
| 22 |
+
root = undefined
|
| 23 |
+
|
| 24 |
+
do {
|
| 25 |
+
token = lex()
|
| 26 |
+
|
| 27 |
+
// This code is unreachable.
|
| 28 |
+
// if (!parseStates[parseState]) {
|
| 29 |
+
// throw invalidParseState()
|
| 30 |
+
// }
|
| 31 |
+
|
| 32 |
+
parseStates[parseState]()
|
| 33 |
+
} while (token.type !== 'eof')
|
| 34 |
+
|
| 35 |
+
if (typeof reviver === 'function') {
|
| 36 |
+
return internalize({'': root}, '', reviver)
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
return root
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
function internalize (holder, name, reviver) {
|
| 43 |
+
const value = holder[name]
|
| 44 |
+
if (value != null && typeof value === 'object') {
|
| 45 |
+
if (Array.isArray(value)) {
|
| 46 |
+
for (let i = 0; i < value.length; i++) {
|
| 47 |
+
const key = String(i)
|
| 48 |
+
const replacement = internalize(value, key, reviver)
|
| 49 |
+
if (replacement === undefined) {
|
| 50 |
+
delete value[key]
|
| 51 |
+
} else {
|
| 52 |
+
Object.defineProperty(value, key, {
|
| 53 |
+
value: replacement,
|
| 54 |
+
writable: true,
|
| 55 |
+
enumerable: true,
|
| 56 |
+
configurable: true,
|
| 57 |
+
})
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
} else {
|
| 61 |
+
for (const key in value) {
|
| 62 |
+
const replacement = internalize(value, key, reviver)
|
| 63 |
+
if (replacement === undefined) {
|
| 64 |
+
delete value[key]
|
| 65 |
+
} else {
|
| 66 |
+
Object.defineProperty(value, key, {
|
| 67 |
+
value: replacement,
|
| 68 |
+
writable: true,
|
| 69 |
+
enumerable: true,
|
| 70 |
+
configurable: true,
|
| 71 |
+
})
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
return reviver.call(holder, name, value)
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
let lexState
|
| 81 |
+
let buffer
|
| 82 |
+
let doubleQuote
|
| 83 |
+
let sign
|
| 84 |
+
let c
|
| 85 |
+
|
| 86 |
+
function lex () {
|
| 87 |
+
lexState = 'default'
|
| 88 |
+
buffer = ''
|
| 89 |
+
doubleQuote = false
|
| 90 |
+
sign = 1
|
| 91 |
+
|
| 92 |
+
for (;;) {
|
| 93 |
+
c = peek()
|
| 94 |
+
|
| 95 |
+
// This code is unreachable.
|
| 96 |
+
// if (!lexStates[lexState]) {
|
| 97 |
+
// throw invalidLexState(lexState)
|
| 98 |
+
// }
|
| 99 |
+
|
| 100 |
+
const token = lexStates[lexState]()
|
| 101 |
+
if (token) {
|
| 102 |
+
return token
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
function peek () {
|
| 108 |
+
if (source[pos]) {
|
| 109 |
+
return String.fromCodePoint(source.codePointAt(pos))
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
function read () {
|
| 114 |
+
const c = peek()
|
| 115 |
+
|
| 116 |
+
if (c === '\n') {
|
| 117 |
+
line++
|
| 118 |
+
column = 0
|
| 119 |
+
} else if (c) {
|
| 120 |
+
column += c.length
|
| 121 |
+
} else {
|
| 122 |
+
column++
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if (c) {
|
| 126 |
+
pos += c.length
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
return c
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
const lexStates = {
|
| 133 |
+
default () {
|
| 134 |
+
switch (c) {
|
| 135 |
+
case '\t':
|
| 136 |
+
case '\v':
|
| 137 |
+
case '\f':
|
| 138 |
+
case ' ':
|
| 139 |
+
case '\u00A0':
|
| 140 |
+
case '\uFEFF':
|
| 141 |
+
case '\n':
|
| 142 |
+
case '\r':
|
| 143 |
+
case '\u2028':
|
| 144 |
+
case '\u2029':
|
| 145 |
+
read()
|
| 146 |
+
return
|
| 147 |
+
|
| 148 |
+
case '/':
|
| 149 |
+
read()
|
| 150 |
+
lexState = 'comment'
|
| 151 |
+
return
|
| 152 |
+
|
| 153 |
+
case undefined:
|
| 154 |
+
read()
|
| 155 |
+
return newToken('eof')
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
if (util.isSpaceSeparator(c)) {
|
| 159 |
+
read()
|
| 160 |
+
return
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// This code is unreachable.
|
| 164 |
+
// if (!lexStates[parseState]) {
|
| 165 |
+
// throw invalidLexState(parseState)
|
| 166 |
+
// }
|
| 167 |
+
|
| 168 |
+
return lexStates[parseState]()
|
| 169 |
+
},
|
| 170 |
+
|
| 171 |
+
comment () {
|
| 172 |
+
switch (c) {
|
| 173 |
+
case '*':
|
| 174 |
+
read()
|
| 175 |
+
lexState = 'multiLineComment'
|
| 176 |
+
return
|
| 177 |
+
|
| 178 |
+
case '/':
|
| 179 |
+
read()
|
| 180 |
+
lexState = 'singleLineComment'
|
| 181 |
+
return
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
throw invalidChar(read())
|
| 185 |
+
},
|
| 186 |
+
|
| 187 |
+
multiLineComment () {
|
| 188 |
+
switch (c) {
|
| 189 |
+
case '*':
|
| 190 |
+
read()
|
| 191 |
+
lexState = 'multiLineCommentAsterisk'
|
| 192 |
+
return
|
| 193 |
+
|
| 194 |
+
case undefined:
|
| 195 |
+
throw invalidChar(read())
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
read()
|
| 199 |
+
},
|
| 200 |
+
|
| 201 |
+
multiLineCommentAsterisk () {
|
| 202 |
+
switch (c) {
|
| 203 |
+
case '*':
|
| 204 |
+
read()
|
| 205 |
+
return
|
| 206 |
+
|
| 207 |
+
case '/':
|
| 208 |
+
read()
|
| 209 |
+
lexState = 'default'
|
| 210 |
+
return
|
| 211 |
+
|
| 212 |
+
case undefined:
|
| 213 |
+
throw invalidChar(read())
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
read()
|
| 217 |
+
lexState = 'multiLineComment'
|
| 218 |
+
},
|
| 219 |
+
|
| 220 |
+
singleLineComment () {
|
| 221 |
+
switch (c) {
|
| 222 |
+
case '\n':
|
| 223 |
+
case '\r':
|
| 224 |
+
case '\u2028':
|
| 225 |
+
case '\u2029':
|
| 226 |
+
read()
|
| 227 |
+
lexState = 'default'
|
| 228 |
+
return
|
| 229 |
+
|
| 230 |
+
case undefined:
|
| 231 |
+
read()
|
| 232 |
+
return newToken('eof')
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
read()
|
| 236 |
+
},
|
| 237 |
+
|
| 238 |
+
value () {
|
| 239 |
+
switch (c) {
|
| 240 |
+
case '{':
|
| 241 |
+
case '[':
|
| 242 |
+
return newToken('punctuator', read())
|
| 243 |
+
|
| 244 |
+
case 'n':
|
| 245 |
+
read()
|
| 246 |
+
literal('ull')
|
| 247 |
+
return newToken('null', null)
|
| 248 |
+
|
| 249 |
+
case 't':
|
| 250 |
+
read()
|
| 251 |
+
literal('rue')
|
| 252 |
+
return newToken('boolean', true)
|
| 253 |
+
|
| 254 |
+
case 'f':
|
| 255 |
+
read()
|
| 256 |
+
literal('alse')
|
| 257 |
+
return newToken('boolean', false)
|
| 258 |
+
|
| 259 |
+
case '-':
|
| 260 |
+
case '+':
|
| 261 |
+
if (read() === '-') {
|
| 262 |
+
sign = -1
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
lexState = 'sign'
|
| 266 |
+
return
|
| 267 |
+
|
| 268 |
+
case '.':
|
| 269 |
+
buffer = read()
|
| 270 |
+
lexState = 'decimalPointLeading'
|
| 271 |
+
return
|
| 272 |
+
|
| 273 |
+
case '0':
|
| 274 |
+
buffer = read()
|
| 275 |
+
lexState = 'zero'
|
| 276 |
+
return
|
| 277 |
+
|
| 278 |
+
case '1':
|
| 279 |
+
case '2':
|
| 280 |
+
case '3':
|
| 281 |
+
case '4':
|
| 282 |
+
case '5':
|
| 283 |
+
case '6':
|
| 284 |
+
case '7':
|
| 285 |
+
case '8':
|
| 286 |
+
case '9':
|
| 287 |
+
buffer = read()
|
| 288 |
+
lexState = 'decimalInteger'
|
| 289 |
+
return
|
| 290 |
+
|
| 291 |
+
case 'I':
|
| 292 |
+
read()
|
| 293 |
+
literal('nfinity')
|
| 294 |
+
return newToken('numeric', Infinity)
|
| 295 |
+
|
| 296 |
+
case 'N':
|
| 297 |
+
read()
|
| 298 |
+
literal('aN')
|
| 299 |
+
return newToken('numeric', NaN)
|
| 300 |
+
|
| 301 |
+
case '"':
|
| 302 |
+
case "'":
|
| 303 |
+
doubleQuote = (read() === '"')
|
| 304 |
+
buffer = ''
|
| 305 |
+
lexState = 'string'
|
| 306 |
+
return
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
throw invalidChar(read())
|
| 310 |
+
},
|
| 311 |
+
|
| 312 |
+
identifierNameStartEscape () {
|
| 313 |
+
if (c !== 'u') {
|
| 314 |
+
throw invalidChar(read())
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
read()
|
| 318 |
+
const u = unicodeEscape()
|
| 319 |
+
switch (u) {
|
| 320 |
+
case '$':
|
| 321 |
+
case '_':
|
| 322 |
+
break
|
| 323 |
+
|
| 324 |
+
default:
|
| 325 |
+
if (!util.isIdStartChar(u)) {
|
| 326 |
+
throw invalidIdentifier()
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
break
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
buffer += u
|
| 333 |
+
lexState = 'identifierName'
|
| 334 |
+
},
|
| 335 |
+
|
| 336 |
+
identifierName () {
|
| 337 |
+
switch (c) {
|
| 338 |
+
case '$':
|
| 339 |
+
case '_':
|
| 340 |
+
case '\u200C':
|
| 341 |
+
case '\u200D':
|
| 342 |
+
buffer += read()
|
| 343 |
+
return
|
| 344 |
+
|
| 345 |
+
case '\\':
|
| 346 |
+
read()
|
| 347 |
+
lexState = 'identifierNameEscape'
|
| 348 |
+
return
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
if (util.isIdContinueChar(c)) {
|
| 352 |
+
buffer += read()
|
| 353 |
+
return
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
return newToken('identifier', buffer)
|
| 357 |
+
},
|
| 358 |
+
|
| 359 |
+
identifierNameEscape () {
|
| 360 |
+
if (c !== 'u') {
|
| 361 |
+
throw invalidChar(read())
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
read()
|
| 365 |
+
const u = unicodeEscape()
|
| 366 |
+
switch (u) {
|
| 367 |
+
case '$':
|
| 368 |
+
case '_':
|
| 369 |
+
case '\u200C':
|
| 370 |
+
case '\u200D':
|
| 371 |
+
break
|
| 372 |
+
|
| 373 |
+
default:
|
| 374 |
+
if (!util.isIdContinueChar(u)) {
|
| 375 |
+
throw invalidIdentifier()
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
break
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
buffer += u
|
| 382 |
+
lexState = 'identifierName'
|
| 383 |
+
},
|
| 384 |
+
|
| 385 |
+
sign () {
|
| 386 |
+
switch (c) {
|
| 387 |
+
case '.':
|
| 388 |
+
buffer = read()
|
| 389 |
+
lexState = 'decimalPointLeading'
|
| 390 |
+
return
|
| 391 |
+
|
| 392 |
+
case '0':
|
| 393 |
+
buffer = read()
|
| 394 |
+
lexState = 'zero'
|
| 395 |
+
return
|
| 396 |
+
|
| 397 |
+
case '1':
|
| 398 |
+
case '2':
|
| 399 |
+
case '3':
|
| 400 |
+
case '4':
|
| 401 |
+
case '5':
|
| 402 |
+
case '6':
|
| 403 |
+
case '7':
|
| 404 |
+
case '8':
|
| 405 |
+
case '9':
|
| 406 |
+
buffer = read()
|
| 407 |
+
lexState = 'decimalInteger'
|
| 408 |
+
return
|
| 409 |
+
|
| 410 |
+
case 'I':
|
| 411 |
+
read()
|
| 412 |
+
literal('nfinity')
|
| 413 |
+
return newToken('numeric', sign * Infinity)
|
| 414 |
+
|
| 415 |
+
case 'N':
|
| 416 |
+
read()
|
| 417 |
+
literal('aN')
|
| 418 |
+
return newToken('numeric', NaN)
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
throw invalidChar(read())
|
| 422 |
+
},
|
| 423 |
+
|
| 424 |
+
zero () {
|
| 425 |
+
switch (c) {
|
| 426 |
+
case '.':
|
| 427 |
+
buffer += read()
|
| 428 |
+
lexState = 'decimalPoint'
|
| 429 |
+
return
|
| 430 |
+
|
| 431 |
+
case 'e':
|
| 432 |
+
case 'E':
|
| 433 |
+
buffer += read()
|
| 434 |
+
lexState = 'decimalExponent'
|
| 435 |
+
return
|
| 436 |
+
|
| 437 |
+
case 'x':
|
| 438 |
+
case 'X':
|
| 439 |
+
buffer += read()
|
| 440 |
+
lexState = 'hexadecimal'
|
| 441 |
+
return
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
return newToken('numeric', sign * 0)
|
| 445 |
+
},
|
| 446 |
+
|
| 447 |
+
decimalInteger () {
|
| 448 |
+
switch (c) {
|
| 449 |
+
case '.':
|
| 450 |
+
buffer += read()
|
| 451 |
+
lexState = 'decimalPoint'
|
| 452 |
+
return
|
| 453 |
+
|
| 454 |
+
case 'e':
|
| 455 |
+
case 'E':
|
| 456 |
+
buffer += read()
|
| 457 |
+
lexState = 'decimalExponent'
|
| 458 |
+
return
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
if (util.isDigit(c)) {
|
| 462 |
+
buffer += read()
|
| 463 |
+
return
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
return newToken('numeric', sign * Number(buffer))
|
| 467 |
+
},
|
| 468 |
+
|
| 469 |
+
decimalPointLeading () {
|
| 470 |
+
if (util.isDigit(c)) {
|
| 471 |
+
buffer += read()
|
| 472 |
+
lexState = 'decimalFraction'
|
| 473 |
+
return
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
throw invalidChar(read())
|
| 477 |
+
},
|
| 478 |
+
|
| 479 |
+
decimalPoint () {
|
| 480 |
+
switch (c) {
|
| 481 |
+
case 'e':
|
| 482 |
+
case 'E':
|
| 483 |
+
buffer += read()
|
| 484 |
+
lexState = 'decimalExponent'
|
| 485 |
+
return
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
if (util.isDigit(c)) {
|
| 489 |
+
buffer += read()
|
| 490 |
+
lexState = 'decimalFraction'
|
| 491 |
+
return
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
return newToken('numeric', sign * Number(buffer))
|
| 495 |
+
},
|
| 496 |
+
|
| 497 |
+
decimalFraction () {
|
| 498 |
+
switch (c) {
|
| 499 |
+
case 'e':
|
| 500 |
+
case 'E':
|
| 501 |
+
buffer += read()
|
| 502 |
+
lexState = 'decimalExponent'
|
| 503 |
+
return
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
if (util.isDigit(c)) {
|
| 507 |
+
buffer += read()
|
| 508 |
+
return
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
return newToken('numeric', sign * Number(buffer))
|
| 512 |
+
},
|
| 513 |
+
|
| 514 |
+
decimalExponent () {
|
| 515 |
+
switch (c) {
|
| 516 |
+
case '+':
|
| 517 |
+
case '-':
|
| 518 |
+
buffer += read()
|
| 519 |
+
lexState = 'decimalExponentSign'
|
| 520 |
+
return
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
if (util.isDigit(c)) {
|
| 524 |
+
buffer += read()
|
| 525 |
+
lexState = 'decimalExponentInteger'
|
| 526 |
+
return
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
throw invalidChar(read())
|
| 530 |
+
},
|
| 531 |
+
|
| 532 |
+
decimalExponentSign () {
|
| 533 |
+
if (util.isDigit(c)) {
|
| 534 |
+
buffer += read()
|
| 535 |
+
lexState = 'decimalExponentInteger'
|
| 536 |
+
return
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
throw invalidChar(read())
|
| 540 |
+
},
|
| 541 |
+
|
| 542 |
+
decimalExponentInteger () {
|
| 543 |
+
if (util.isDigit(c)) {
|
| 544 |
+
buffer += read()
|
| 545 |
+
return
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
return newToken('numeric', sign * Number(buffer))
|
| 549 |
+
},
|
| 550 |
+
|
| 551 |
+
hexadecimal () {
|
| 552 |
+
if (util.isHexDigit(c)) {
|
| 553 |
+
buffer += read()
|
| 554 |
+
lexState = 'hexadecimalInteger'
|
| 555 |
+
return
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
throw invalidChar(read())
|
| 559 |
+
},
|
| 560 |
+
|
| 561 |
+
hexadecimalInteger () {
|
| 562 |
+
if (util.isHexDigit(c)) {
|
| 563 |
+
buffer += read()
|
| 564 |
+
return
|
| 565 |
+
}
|
| 566 |
+
|
| 567 |
+
return newToken('numeric', sign * Number(buffer))
|
| 568 |
+
},
|
| 569 |
+
|
| 570 |
+
string () {
|
| 571 |
+
switch (c) {
|
| 572 |
+
case '\\':
|
| 573 |
+
read()
|
| 574 |
+
buffer += escape()
|
| 575 |
+
return
|
| 576 |
+
|
| 577 |
+
case '"':
|
| 578 |
+
if (doubleQuote) {
|
| 579 |
+
read()
|
| 580 |
+
return newToken('string', buffer)
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
buffer += read()
|
| 584 |
+
return
|
| 585 |
+
|
| 586 |
+
case "'":
|
| 587 |
+
if (!doubleQuote) {
|
| 588 |
+
read()
|
| 589 |
+
return newToken('string', buffer)
|
| 590 |
+
}
|
| 591 |
+
|
| 592 |
+
buffer += read()
|
| 593 |
+
return
|
| 594 |
+
|
| 595 |
+
case '\n':
|
| 596 |
+
case '\r':
|
| 597 |
+
throw invalidChar(read())
|
| 598 |
+
|
| 599 |
+
case '\u2028':
|
| 600 |
+
case '\u2029':
|
| 601 |
+
separatorChar(c)
|
| 602 |
+
break
|
| 603 |
+
|
| 604 |
+
case undefined:
|
| 605 |
+
throw invalidChar(read())
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
buffer += read()
|
| 609 |
+
},
|
| 610 |
+
|
| 611 |
+
start () {
|
| 612 |
+
switch (c) {
|
| 613 |
+
case '{':
|
| 614 |
+
case '[':
|
| 615 |
+
return newToken('punctuator', read())
|
| 616 |
+
|
| 617 |
+
// This code is unreachable since the default lexState handles eof.
|
| 618 |
+
// case undefined:
|
| 619 |
+
// return newToken('eof')
|
| 620 |
+
}
|
| 621 |
+
|
| 622 |
+
lexState = 'value'
|
| 623 |
+
},
|
| 624 |
+
|
| 625 |
+
beforePropertyName () {
|
| 626 |
+
switch (c) {
|
| 627 |
+
case '$':
|
| 628 |
+
case '_':
|
| 629 |
+
buffer = read()
|
| 630 |
+
lexState = 'identifierName'
|
| 631 |
+
return
|
| 632 |
+
|
| 633 |
+
case '\\':
|
| 634 |
+
read()
|
| 635 |
+
lexState = 'identifierNameStartEscape'
|
| 636 |
+
return
|
| 637 |
+
|
| 638 |
+
case '}':
|
| 639 |
+
return newToken('punctuator', read())
|
| 640 |
+
|
| 641 |
+
case '"':
|
| 642 |
+
case "'":
|
| 643 |
+
doubleQuote = (read() === '"')
|
| 644 |
+
lexState = 'string'
|
| 645 |
+
return
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
if (util.isIdStartChar(c)) {
|
| 649 |
+
buffer += read()
|
| 650 |
+
lexState = 'identifierName'
|
| 651 |
+
return
|
| 652 |
+
}
|
| 653 |
+
|
| 654 |
+
throw invalidChar(read())
|
| 655 |
+
},
|
| 656 |
+
|
| 657 |
+
afterPropertyName () {
|
| 658 |
+
if (c === ':') {
|
| 659 |
+
return newToken('punctuator', read())
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
throw invalidChar(read())
|
| 663 |
+
},
|
| 664 |
+
|
| 665 |
+
beforePropertyValue () {
|
| 666 |
+
lexState = 'value'
|
| 667 |
+
},
|
| 668 |
+
|
| 669 |
+
afterPropertyValue () {
|
| 670 |
+
switch (c) {
|
| 671 |
+
case ',':
|
| 672 |
+
case '}':
|
| 673 |
+
return newToken('punctuator', read())
|
| 674 |
+
}
|
| 675 |
+
|
| 676 |
+
throw invalidChar(read())
|
| 677 |
+
},
|
| 678 |
+
|
| 679 |
+
beforeArrayValue () {
|
| 680 |
+
if (c === ']') {
|
| 681 |
+
return newToken('punctuator', read())
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
lexState = 'value'
|
| 685 |
+
},
|
| 686 |
+
|
| 687 |
+
afterArrayValue () {
|
| 688 |
+
switch (c) {
|
| 689 |
+
case ',':
|
| 690 |
+
case ']':
|
| 691 |
+
return newToken('punctuator', read())
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
throw invalidChar(read())
|
| 695 |
+
},
|
| 696 |
+
|
| 697 |
+
end () {
|
| 698 |
+
// This code is unreachable since it's handled by the default lexState.
|
| 699 |
+
// if (c === undefined) {
|
| 700 |
+
// read()
|
| 701 |
+
// return newToken('eof')
|
| 702 |
+
// }
|
| 703 |
+
|
| 704 |
+
throw invalidChar(read())
|
| 705 |
+
},
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
function newToken (type, value) {
|
| 709 |
+
return {
|
| 710 |
+
type,
|
| 711 |
+
value,
|
| 712 |
+
line,
|
| 713 |
+
column,
|
| 714 |
+
}
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
function literal (s) {
|
| 718 |
+
for (const c of s) {
|
| 719 |
+
const p = peek()
|
| 720 |
+
|
| 721 |
+
if (p !== c) {
|
| 722 |
+
throw invalidChar(read())
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
read()
|
| 726 |
+
}
|
| 727 |
+
}
|
| 728 |
+
|
| 729 |
+
function escape () {
|
| 730 |
+
const c = peek()
|
| 731 |
+
switch (c) {
|
| 732 |
+
case 'b':
|
| 733 |
+
read()
|
| 734 |
+
return '\b'
|
| 735 |
+
|
| 736 |
+
case 'f':
|
| 737 |
+
read()
|
| 738 |
+
return '\f'
|
| 739 |
+
|
| 740 |
+
case 'n':
|
| 741 |
+
read()
|
| 742 |
+
return '\n'
|
| 743 |
+
|
| 744 |
+
case 'r':
|
| 745 |
+
read()
|
| 746 |
+
return '\r'
|
| 747 |
+
|
| 748 |
+
case 't':
|
| 749 |
+
read()
|
| 750 |
+
return '\t'
|
| 751 |
+
|
| 752 |
+
case 'v':
|
| 753 |
+
read()
|
| 754 |
+
return '\v'
|
| 755 |
+
|
| 756 |
+
case '0':
|
| 757 |
+
read()
|
| 758 |
+
if (util.isDigit(peek())) {
|
| 759 |
+
throw invalidChar(read())
|
| 760 |
+
}
|
| 761 |
+
|
| 762 |
+
return '\0'
|
| 763 |
+
|
| 764 |
+
case 'x':
|
| 765 |
+
read()
|
| 766 |
+
return hexEscape()
|
| 767 |
+
|
| 768 |
+
case 'u':
|
| 769 |
+
read()
|
| 770 |
+
return unicodeEscape()
|
| 771 |
+
|
| 772 |
+
case '\n':
|
| 773 |
+
case '\u2028':
|
| 774 |
+
case '\u2029':
|
| 775 |
+
read()
|
| 776 |
+
return ''
|
| 777 |
+
|
| 778 |
+
case '\r':
|
| 779 |
+
read()
|
| 780 |
+
if (peek() === '\n') {
|
| 781 |
+
read()
|
| 782 |
+
}
|
| 783 |
+
|
| 784 |
+
return ''
|
| 785 |
+
|
| 786 |
+
case '1':
|
| 787 |
+
case '2':
|
| 788 |
+
case '3':
|
| 789 |
+
case '4':
|
| 790 |
+
case '5':
|
| 791 |
+
case '6':
|
| 792 |
+
case '7':
|
| 793 |
+
case '8':
|
| 794 |
+
case '9':
|
| 795 |
+
throw invalidChar(read())
|
| 796 |
+
|
| 797 |
+
case undefined:
|
| 798 |
+
throw invalidChar(read())
|
| 799 |
+
}
|
| 800 |
+
|
| 801 |
+
return read()
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
function hexEscape () {
|
| 805 |
+
let buffer = ''
|
| 806 |
+
let c = peek()
|
| 807 |
+
|
| 808 |
+
if (!util.isHexDigit(c)) {
|
| 809 |
+
throw invalidChar(read())
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
buffer += read()
|
| 813 |
+
|
| 814 |
+
c = peek()
|
| 815 |
+
if (!util.isHexDigit(c)) {
|
| 816 |
+
throw invalidChar(read())
|
| 817 |
+
}
|
| 818 |
+
|
| 819 |
+
buffer += read()
|
| 820 |
+
|
| 821 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 822 |
+
}
|
| 823 |
+
|
| 824 |
+
function unicodeEscape () {
|
| 825 |
+
let buffer = ''
|
| 826 |
+
let count = 4
|
| 827 |
+
|
| 828 |
+
while (count-- > 0) {
|
| 829 |
+
const c = peek()
|
| 830 |
+
if (!util.isHexDigit(c)) {
|
| 831 |
+
throw invalidChar(read())
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
buffer += read()
|
| 835 |
+
}
|
| 836 |
+
|
| 837 |
+
return String.fromCodePoint(parseInt(buffer, 16))
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
const parseStates = {
|
| 841 |
+
start () {
|
| 842 |
+
if (token.type === 'eof') {
|
| 843 |
+
throw invalidEOF()
|
| 844 |
+
}
|
| 845 |
+
|
| 846 |
+
push()
|
| 847 |
+
},
|
| 848 |
+
|
| 849 |
+
beforePropertyName () {
|
| 850 |
+
switch (token.type) {
|
| 851 |
+
case 'identifier':
|
| 852 |
+
case 'string':
|
| 853 |
+
key = token.value
|
| 854 |
+
parseState = 'afterPropertyName'
|
| 855 |
+
return
|
| 856 |
+
|
| 857 |
+
case 'punctuator':
|
| 858 |
+
// This code is unreachable since it's handled by the lexState.
|
| 859 |
+
// if (token.value !== '}') {
|
| 860 |
+
// throw invalidToken()
|
| 861 |
+
// }
|
| 862 |
+
|
| 863 |
+
pop()
|
| 864 |
+
return
|
| 865 |
+
|
| 866 |
+
case 'eof':
|
| 867 |
+
throw invalidEOF()
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
// This code is unreachable since it's handled by the lexState.
|
| 871 |
+
// throw invalidToken()
|
| 872 |
+
},
|
| 873 |
+
|
| 874 |
+
afterPropertyName () {
|
| 875 |
+
// This code is unreachable since it's handled by the lexState.
|
| 876 |
+
// if (token.type !== 'punctuator' || token.value !== ':') {
|
| 877 |
+
// throw invalidToken()
|
| 878 |
+
// }
|
| 879 |
+
|
| 880 |
+
if (token.type === 'eof') {
|
| 881 |
+
throw invalidEOF()
|
| 882 |
+
}
|
| 883 |
+
|
| 884 |
+
parseState = 'beforePropertyValue'
|
| 885 |
+
},
|
| 886 |
+
|
| 887 |
+
beforePropertyValue () {
|
| 888 |
+
if (token.type === 'eof') {
|
| 889 |
+
throw invalidEOF()
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
push()
|
| 893 |
+
},
|
| 894 |
+
|
| 895 |
+
beforeArrayValue () {
|
| 896 |
+
if (token.type === 'eof') {
|
| 897 |
+
throw invalidEOF()
|
| 898 |
+
}
|
| 899 |
+
|
| 900 |
+
if (token.type === 'punctuator' && token.value === ']') {
|
| 901 |
+
pop()
|
| 902 |
+
return
|
| 903 |
+
}
|
| 904 |
+
|
| 905 |
+
push()
|
| 906 |
+
},
|
| 907 |
+
|
| 908 |
+
afterPropertyValue () {
|
| 909 |
+
// This code is unreachable since it's handled by the lexState.
|
| 910 |
+
// if (token.type !== 'punctuator') {
|
| 911 |
+
// throw invalidToken()
|
| 912 |
+
// }
|
| 913 |
+
|
| 914 |
+
if (token.type === 'eof') {
|
| 915 |
+
throw invalidEOF()
|
| 916 |
+
}
|
| 917 |
+
|
| 918 |
+
switch (token.value) {
|
| 919 |
+
case ',':
|
| 920 |
+
parseState = 'beforePropertyName'
|
| 921 |
+
return
|
| 922 |
+
|
| 923 |
+
case '}':
|
| 924 |
+
pop()
|
| 925 |
+
}
|
| 926 |
+
|
| 927 |
+
// This code is unreachable since it's handled by the lexState.
|
| 928 |
+
// throw invalidToken()
|
| 929 |
+
},
|
| 930 |
+
|
| 931 |
+
afterArrayValue () {
|
| 932 |
+
// This code is unreachable since it's handled by the lexState.
|
| 933 |
+
// if (token.type !== 'punctuator') {
|
| 934 |
+
// throw invalidToken()
|
| 935 |
+
// }
|
| 936 |
+
|
| 937 |
+
if (token.type === 'eof') {
|
| 938 |
+
throw invalidEOF()
|
| 939 |
+
}
|
| 940 |
+
|
| 941 |
+
switch (token.value) {
|
| 942 |
+
case ',':
|
| 943 |
+
parseState = 'beforeArrayValue'
|
| 944 |
+
return
|
| 945 |
+
|
| 946 |
+
case ']':
|
| 947 |
+
pop()
|
| 948 |
+
}
|
| 949 |
+
|
| 950 |
+
// This code is unreachable since it's handled by the lexState.
|
| 951 |
+
// throw invalidToken()
|
| 952 |
+
},
|
| 953 |
+
|
| 954 |
+
end () {
|
| 955 |
+
// This code is unreachable since it's handled by the lexState.
|
| 956 |
+
// if (token.type !== 'eof') {
|
| 957 |
+
// throw invalidToken()
|
| 958 |
+
// }
|
| 959 |
+
},
|
| 960 |
+
}
|
| 961 |
+
|
| 962 |
+
function push () {
|
| 963 |
+
let value
|
| 964 |
+
|
| 965 |
+
switch (token.type) {
|
| 966 |
+
case 'punctuator':
|
| 967 |
+
switch (token.value) {
|
| 968 |
+
case '{':
|
| 969 |
+
value = {}
|
| 970 |
+
break
|
| 971 |
+
|
| 972 |
+
case '[':
|
| 973 |
+
value = []
|
| 974 |
+
break
|
| 975 |
+
}
|
| 976 |
+
|
| 977 |
+
break
|
| 978 |
+
|
| 979 |
+
case 'null':
|
| 980 |
+
case 'boolean':
|
| 981 |
+
case 'numeric':
|
| 982 |
+
case 'string':
|
| 983 |
+
value = token.value
|
| 984 |
+
break
|
| 985 |
+
|
| 986 |
+
// This code is unreachable.
|
| 987 |
+
// default:
|
| 988 |
+
// throw invalidToken()
|
| 989 |
+
}
|
| 990 |
+
|
| 991 |
+
if (root === undefined) {
|
| 992 |
+
root = value
|
| 993 |
+
} else {
|
| 994 |
+
const parent = stack[stack.length - 1]
|
| 995 |
+
if (Array.isArray(parent)) {
|
| 996 |
+
parent.push(value)
|
| 997 |
+
} else {
|
| 998 |
+
Object.defineProperty(parent, key, {
|
| 999 |
+
value,
|
| 1000 |
+
writable: true,
|
| 1001 |
+
enumerable: true,
|
| 1002 |
+
configurable: true,
|
| 1003 |
+
})
|
| 1004 |
+
}
|
| 1005 |
+
}
|
| 1006 |
+
|
| 1007 |
+
if (value !== null && typeof value === 'object') {
|
| 1008 |
+
stack.push(value)
|
| 1009 |
+
|
| 1010 |
+
if (Array.isArray(value)) {
|
| 1011 |
+
parseState = 'beforeArrayValue'
|
| 1012 |
+
} else {
|
| 1013 |
+
parseState = 'beforePropertyName'
|
| 1014 |
+
}
|
| 1015 |
+
} else {
|
| 1016 |
+
const current = stack[stack.length - 1]
|
| 1017 |
+
if (current == null) {
|
| 1018 |
+
parseState = 'end'
|
| 1019 |
+
} else if (Array.isArray(current)) {
|
| 1020 |
+
parseState = 'afterArrayValue'
|
| 1021 |
+
} else {
|
| 1022 |
+
parseState = 'afterPropertyValue'
|
| 1023 |
+
}
|
| 1024 |
+
}
|
| 1025 |
+
}
|
| 1026 |
+
|
| 1027 |
+
function pop () {
|
| 1028 |
+
stack.pop()
|
| 1029 |
+
|
| 1030 |
+
const current = stack[stack.length - 1]
|
| 1031 |
+
if (current == null) {
|
| 1032 |
+
parseState = 'end'
|
| 1033 |
+
} else if (Array.isArray(current)) {
|
| 1034 |
+
parseState = 'afterArrayValue'
|
| 1035 |
+
} else {
|
| 1036 |
+
parseState = 'afterPropertyValue'
|
| 1037 |
+
}
|
| 1038 |
+
}
|
| 1039 |
+
|
| 1040 |
+
// This code is unreachable.
|
| 1041 |
+
// function invalidParseState () {
|
| 1042 |
+
// return new Error(`JSON5: invalid parse state '${parseState}'`)
|
| 1043 |
+
// }
|
| 1044 |
+
|
| 1045 |
+
// This code is unreachable.
|
| 1046 |
+
// function invalidLexState (state) {
|
| 1047 |
+
// return new Error(`JSON5: invalid lex state '${state}'`)
|
| 1048 |
+
// }
|
| 1049 |
+
|
| 1050 |
+
function invalidChar (c) {
|
| 1051 |
+
if (c === undefined) {
|
| 1052 |
+
return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1053 |
+
}
|
| 1054 |
+
|
| 1055 |
+
return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
|
| 1056 |
+
}
|
| 1057 |
+
|
| 1058 |
+
function invalidEOF () {
|
| 1059 |
+
return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1060 |
+
}
|
| 1061 |
+
|
| 1062 |
+
// This code is unreachable.
|
| 1063 |
+
// function invalidToken () {
|
| 1064 |
+
// if (token.type === 'eof') {
|
| 1065 |
+
// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
|
| 1066 |
+
// }
|
| 1067 |
+
|
| 1068 |
+
// const c = String.fromCodePoint(token.value.codePointAt(0))
|
| 1069 |
+
// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
|
| 1070 |
+
// }
|
| 1071 |
+
|
| 1072 |
+
function invalidIdentifier () {
|
| 1073 |
+
column -= 5
|
| 1074 |
+
return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)
|
| 1075 |
+
}
|
| 1076 |
+
|
| 1077 |
+
function separatorChar (c) {
|
| 1078 |
+
console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)
|
| 1079 |
+
}
|
| 1080 |
+
|
| 1081 |
+
function formatChar (c) {
|
| 1082 |
+
const replacements = {
|
| 1083 |
+
"'": "\\'",
|
| 1084 |
+
'"': '\\"',
|
| 1085 |
+
'\\': '\\\\',
|
| 1086 |
+
'\b': '\\b',
|
| 1087 |
+
'\f': '\\f',
|
| 1088 |
+
'\n': '\\n',
|
| 1089 |
+
'\r': '\\r',
|
| 1090 |
+
'\t': '\\t',
|
| 1091 |
+
'\v': '\\v',
|
| 1092 |
+
'\0': '\\0',
|
| 1093 |
+
'\u2028': '\\u2028',
|
| 1094 |
+
'\u2029': '\\u2029',
|
| 1095 |
+
}
|
| 1096 |
+
|
| 1097 |
+
if (replacements[c]) {
|
| 1098 |
+
return replacements[c]
|
| 1099 |
+
}
|
| 1100 |
+
|
| 1101 |
+
if (c < ' ') {
|
| 1102 |
+
const hexString = c.charCodeAt(0).toString(16)
|
| 1103 |
+
return '\\x' + ('00' + hexString).substring(hexString.length)
|
| 1104 |
+
}
|
| 1105 |
+
|
| 1106 |
+
return c
|
| 1107 |
+
}
|
| 1108 |
+
|
| 1109 |
+
function syntaxError (message) {
|
| 1110 |
+
const err = new SyntaxError(message)
|
| 1111 |
+
err.lineNumber = line
|
| 1112 |
+
err.columnNumber = column
|
| 1113 |
+
return err
|
| 1114 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/register.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const fs = require('fs')
|
| 2 |
+
const JSON5 = require('./')
|
| 3 |
+
|
| 4 |
+
// eslint-disable-next-line node/no-deprecated-api
|
| 5 |
+
require.extensions['.json5'] = function (module, filename) {
|
| 6 |
+
const content = fs.readFileSync(filename, 'utf8')
|
| 7 |
+
try {
|
| 8 |
+
module.exports = JSON5.parse(content)
|
| 9 |
+
} catch (err) {
|
| 10 |
+
err.message = filename + ': ' + err.message
|
| 11 |
+
throw err
|
| 12 |
+
}
|
| 13 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/require.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// This file is for backward compatibility with v0.5.1.
|
| 2 |
+
require('./register')
|
| 3 |
+
|
| 4 |
+
console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.")
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/stringify.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare type StringifyOptions = {
|
| 2 |
+
/**
|
| 3 |
+
* A function that alters the behavior of the stringification process, or an
|
| 4 |
+
* array of String and Number objects that serve as a allowlist for
|
| 5 |
+
* selecting/filtering the properties of the value object to be included in
|
| 6 |
+
* the JSON5 string. If this value is null or not provided, all properties
|
| 7 |
+
* of the object are included in the resulting JSON5 string.
|
| 8 |
+
*/
|
| 9 |
+
replacer?:
|
| 10 |
+
| ((this: any, key: string, value: any) => any)
|
| 11 |
+
| (string | number)[]
|
| 12 |
+
| null
|
| 13 |
+
|
| 14 |
+
/**
|
| 15 |
+
* A String or Number object that's used to insert white space into the
|
| 16 |
+
* output JSON5 string for readability purposes. If this is a Number, it
|
| 17 |
+
* indicates the number of space characters to use as white space; this
|
| 18 |
+
* number is capped at 10 (if it is greater, the value is just 10). Values
|
| 19 |
+
* less than 1 indicate that no space should be used. If this is a String,
|
| 20 |
+
* the string (or the first 10 characters of the string, if it's longer than
|
| 21 |
+
* that) is used as white space. If this parameter is not provided (or is
|
| 22 |
+
* null), no white space is used. If white space is used, trailing commas
|
| 23 |
+
* will be used in objects and arrays.
|
| 24 |
+
*/
|
| 25 |
+
space?: string | number | null
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
* A String representing the quote character to use when serializing
|
| 29 |
+
* strings.
|
| 30 |
+
*/
|
| 31 |
+
quote?: string | null
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/**
|
| 35 |
+
* Converts a JavaScript value to a JSON5 string.
|
| 36 |
+
* @param value The value to convert to a JSON5 string.
|
| 37 |
+
* @param replacer A function that alters the behavior of the stringification
|
| 38 |
+
* process. If this value is null or not provided, all properties of the object
|
| 39 |
+
* are included in the resulting JSON5 string.
|
| 40 |
+
* @param space A String or Number object that's used to insert white space into
|
| 41 |
+
* the output JSON5 string for readability purposes. If this is a Number, it
|
| 42 |
+
* indicates the number of space characters to use as white space; this number
|
| 43 |
+
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
|
| 44 |
+
* indicate that no space should be used. If this is a String, the string (or
|
| 45 |
+
* the first 10 characters of the string, if it's longer than that) is used as
|
| 46 |
+
* white space. If this parameter is not provided (or is null), no white space
|
| 47 |
+
* is used. If white space is used, trailing commas will be used in objects and
|
| 48 |
+
* arrays.
|
| 49 |
+
* @returns The JSON5 string converted from the JavaScript value.
|
| 50 |
+
*/
|
| 51 |
+
declare function stringify(
|
| 52 |
+
value: any,
|
| 53 |
+
replacer?: ((this: any, key: string, value: any) => any) | null,
|
| 54 |
+
space?: string | number | null,
|
| 55 |
+
): string
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* Converts a JavaScript value to a JSON5 string.
|
| 59 |
+
* @param value The value to convert to a JSON5 string.
|
| 60 |
+
* @param replacer An array of String and Number objects that serve as a
|
| 61 |
+
* allowlist for selecting/filtering the properties of the value object to be
|
| 62 |
+
* included in the JSON5 string. If this value is null or not provided, all
|
| 63 |
+
* properties of the object are included in the resulting JSON5 string.
|
| 64 |
+
* @param space A String or Number object that's used to insert white space into
|
| 65 |
+
* the output JSON5 string for readability purposes. If this is a Number, it
|
| 66 |
+
* indicates the number of space characters to use as white space; this number
|
| 67 |
+
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
|
| 68 |
+
* indicate that no space should be used. If this is a String, the string (or
|
| 69 |
+
* the first 10 characters of the string, if it's longer than that) is used as
|
| 70 |
+
* white space. If this parameter is not provided (or is null), no white space
|
| 71 |
+
* is used. If white space is used, trailing commas will be used in objects and
|
| 72 |
+
* arrays.
|
| 73 |
+
* @returns The JSON5 string converted from the JavaScript value.
|
| 74 |
+
*/
|
| 75 |
+
declare function stringify(
|
| 76 |
+
value: any,
|
| 77 |
+
replacer: (string | number)[],
|
| 78 |
+
space?: string | number | null,
|
| 79 |
+
): string
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* Converts a JavaScript value to a JSON5 string.
|
| 83 |
+
* @param value The value to convert to a JSON5 string.
|
| 84 |
+
* @param options An object specifying options.
|
| 85 |
+
* @returns The JSON5 string converted from the JavaScript value.
|
| 86 |
+
*/
|
| 87 |
+
declare function stringify(value: any, options: StringifyOptions): string
|
| 88 |
+
|
| 89 |
+
export = stringify
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/stringify.js
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const util = require('./util')
|
| 2 |
+
|
| 3 |
+
module.exports = function stringify (value, replacer, space) {
|
| 4 |
+
const stack = []
|
| 5 |
+
let indent = ''
|
| 6 |
+
let propertyList
|
| 7 |
+
let replacerFunc
|
| 8 |
+
let gap = ''
|
| 9 |
+
let quote
|
| 10 |
+
|
| 11 |
+
if (
|
| 12 |
+
replacer != null &&
|
| 13 |
+
typeof replacer === 'object' &&
|
| 14 |
+
!Array.isArray(replacer)
|
| 15 |
+
) {
|
| 16 |
+
space = replacer.space
|
| 17 |
+
quote = replacer.quote
|
| 18 |
+
replacer = replacer.replacer
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
if (typeof replacer === 'function') {
|
| 22 |
+
replacerFunc = replacer
|
| 23 |
+
} else if (Array.isArray(replacer)) {
|
| 24 |
+
propertyList = []
|
| 25 |
+
for (const v of replacer) {
|
| 26 |
+
let item
|
| 27 |
+
|
| 28 |
+
if (typeof v === 'string') {
|
| 29 |
+
item = v
|
| 30 |
+
} else if (
|
| 31 |
+
typeof v === 'number' ||
|
| 32 |
+
v instanceof String ||
|
| 33 |
+
v instanceof Number
|
| 34 |
+
) {
|
| 35 |
+
item = String(v)
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
if (item !== undefined && propertyList.indexOf(item) < 0) {
|
| 39 |
+
propertyList.push(item)
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
if (space instanceof Number) {
|
| 45 |
+
space = Number(space)
|
| 46 |
+
} else if (space instanceof String) {
|
| 47 |
+
space = String(space)
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
if (typeof space === 'number') {
|
| 51 |
+
if (space > 0) {
|
| 52 |
+
space = Math.min(10, Math.floor(space))
|
| 53 |
+
gap = ' '.substr(0, space)
|
| 54 |
+
}
|
| 55 |
+
} else if (typeof space === 'string') {
|
| 56 |
+
gap = space.substr(0, 10)
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
return serializeProperty('', {'': value})
|
| 60 |
+
|
| 61 |
+
function serializeProperty (key, holder) {
|
| 62 |
+
let value = holder[key]
|
| 63 |
+
if (value != null) {
|
| 64 |
+
if (typeof value.toJSON5 === 'function') {
|
| 65 |
+
value = value.toJSON5(key)
|
| 66 |
+
} else if (typeof value.toJSON === 'function') {
|
| 67 |
+
value = value.toJSON(key)
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
if (replacerFunc) {
|
| 72 |
+
value = replacerFunc.call(holder, key, value)
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
if (value instanceof Number) {
|
| 76 |
+
value = Number(value)
|
| 77 |
+
} else if (value instanceof String) {
|
| 78 |
+
value = String(value)
|
| 79 |
+
} else if (value instanceof Boolean) {
|
| 80 |
+
value = value.valueOf()
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
switch (value) {
|
| 84 |
+
case null: return 'null'
|
| 85 |
+
case true: return 'true'
|
| 86 |
+
case false: return 'false'
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
if (typeof value === 'string') {
|
| 90 |
+
return quoteString(value, false)
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
if (typeof value === 'number') {
|
| 94 |
+
return String(value)
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
if (typeof value === 'object') {
|
| 98 |
+
return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
return undefined
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
function quoteString (value) {
|
| 105 |
+
const quotes = {
|
| 106 |
+
"'": 0.1,
|
| 107 |
+
'"': 0.2,
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
const replacements = {
|
| 111 |
+
"'": "\\'",
|
| 112 |
+
'"': '\\"',
|
| 113 |
+
'\\': '\\\\',
|
| 114 |
+
'\b': '\\b',
|
| 115 |
+
'\f': '\\f',
|
| 116 |
+
'\n': '\\n',
|
| 117 |
+
'\r': '\\r',
|
| 118 |
+
'\t': '\\t',
|
| 119 |
+
'\v': '\\v',
|
| 120 |
+
'\0': '\\0',
|
| 121 |
+
'\u2028': '\\u2028',
|
| 122 |
+
'\u2029': '\\u2029',
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
let product = ''
|
| 126 |
+
|
| 127 |
+
for (let i = 0; i < value.length; i++) {
|
| 128 |
+
const c = value[i]
|
| 129 |
+
switch (c) {
|
| 130 |
+
case "'":
|
| 131 |
+
case '"':
|
| 132 |
+
quotes[c]++
|
| 133 |
+
product += c
|
| 134 |
+
continue
|
| 135 |
+
|
| 136 |
+
case '\0':
|
| 137 |
+
if (util.isDigit(value[i + 1])) {
|
| 138 |
+
product += '\\x00'
|
| 139 |
+
continue
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
if (replacements[c]) {
|
| 144 |
+
product += replacements[c]
|
| 145 |
+
continue
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
if (c < ' ') {
|
| 149 |
+
let hexString = c.charCodeAt(0).toString(16)
|
| 150 |
+
product += '\\x' + ('00' + hexString).substring(hexString.length)
|
| 151 |
+
continue
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
product += c
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)
|
| 158 |
+
|
| 159 |
+
product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])
|
| 160 |
+
|
| 161 |
+
return quoteChar + product + quoteChar
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
function serializeObject (value) {
|
| 165 |
+
if (stack.indexOf(value) >= 0) {
|
| 166 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
stack.push(value)
|
| 170 |
+
|
| 171 |
+
let stepback = indent
|
| 172 |
+
indent = indent + gap
|
| 173 |
+
|
| 174 |
+
let keys = propertyList || Object.keys(value)
|
| 175 |
+
let partial = []
|
| 176 |
+
for (const key of keys) {
|
| 177 |
+
const propertyString = serializeProperty(key, value)
|
| 178 |
+
if (propertyString !== undefined) {
|
| 179 |
+
let member = serializeKey(key) + ':'
|
| 180 |
+
if (gap !== '') {
|
| 181 |
+
member += ' '
|
| 182 |
+
}
|
| 183 |
+
member += propertyString
|
| 184 |
+
partial.push(member)
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
let final
|
| 189 |
+
if (partial.length === 0) {
|
| 190 |
+
final = '{}'
|
| 191 |
+
} else {
|
| 192 |
+
let properties
|
| 193 |
+
if (gap === '') {
|
| 194 |
+
properties = partial.join(',')
|
| 195 |
+
final = '{' + properties + '}'
|
| 196 |
+
} else {
|
| 197 |
+
let separator = ',\n' + indent
|
| 198 |
+
properties = partial.join(separator)
|
| 199 |
+
final = '{\n' + indent + properties + ',\n' + stepback + '}'
|
| 200 |
+
}
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
stack.pop()
|
| 204 |
+
indent = stepback
|
| 205 |
+
return final
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
function serializeKey (key) {
|
| 209 |
+
if (key.length === 0) {
|
| 210 |
+
return quoteString(key, true)
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
const firstChar = String.fromCodePoint(key.codePointAt(0))
|
| 214 |
+
if (!util.isIdStartChar(firstChar)) {
|
| 215 |
+
return quoteString(key, true)
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
for (let i = firstChar.length; i < key.length; i++) {
|
| 219 |
+
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
|
| 220 |
+
return quoteString(key, true)
|
| 221 |
+
}
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
return key
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
function serializeArray (value) {
|
| 228 |
+
if (stack.indexOf(value) >= 0) {
|
| 229 |
+
throw TypeError('Converting circular structure to JSON5')
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
stack.push(value)
|
| 233 |
+
|
| 234 |
+
let stepback = indent
|
| 235 |
+
indent = indent + gap
|
| 236 |
+
|
| 237 |
+
let partial = []
|
| 238 |
+
for (let i = 0; i < value.length; i++) {
|
| 239 |
+
const propertyString = serializeProperty(String(i), value)
|
| 240 |
+
partial.push((propertyString !== undefined) ? propertyString : 'null')
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
let final
|
| 244 |
+
if (partial.length === 0) {
|
| 245 |
+
final = '[]'
|
| 246 |
+
} else {
|
| 247 |
+
if (gap === '') {
|
| 248 |
+
let properties = partial.join(',')
|
| 249 |
+
final = '[' + properties + ']'
|
| 250 |
+
} else {
|
| 251 |
+
let separator = ',\n' + indent
|
| 252 |
+
let properties = partial.join(separator)
|
| 253 |
+
final = '[\n' + indent + properties + ',\n' + stepback + ']'
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
stack.pop()
|
| 258 |
+
indent = stepback
|
| 259 |
+
return final
|
| 260 |
+
}
|
| 261 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/unicode.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const Space_Separator: RegExp
|
| 2 |
+
export declare const ID_Start: RegExp
|
| 3 |
+
export declare const ID_Continue: RegExp
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/unicode.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// This is a generated file. Do not edit.
|
| 2 |
+
module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/
|
| 3 |
+
module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717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DCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/
|
| 4 |
+
module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0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u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\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E00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/util.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare function isSpaceSeparator(c?: string): boolean
|
| 2 |
+
export declare function isIdStartChar(c?: string): boolean
|
| 3 |
+
export declare function isIdContinueChar(c?: string): boolean
|
| 4 |
+
export declare function isDigit(c?: string): boolean
|
| 5 |
+
export declare function isHexDigit(c?: string): boolean
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/json5/lib/util.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const unicode = require('../lib/unicode')
|
| 2 |
+
|
| 3 |
+
module.exports = {
|
| 4 |
+
isSpaceSeparator (c) {
|
| 5 |
+
return typeof c === 'string' && unicode.Space_Separator.test(c)
|
| 6 |
+
},
|
| 7 |
+
|
| 8 |
+
isIdStartChar (c) {
|
| 9 |
+
return typeof c === 'string' && (
|
| 10 |
+
(c >= 'a' && c <= 'z') ||
|
| 11 |
+
(c >= 'A' && c <= 'Z') ||
|
| 12 |
+
(c === '$') || (c === '_') ||
|
| 13 |
+
unicode.ID_Start.test(c)
|
| 14 |
+
)
|
| 15 |
+
},
|
| 16 |
+
|
| 17 |
+
isIdContinueChar (c) {
|
| 18 |
+
return typeof c === 'string' && (
|
| 19 |
+
(c >= 'a' && c <= 'z') ||
|
| 20 |
+
(c >= 'A' && c <= 'Z') ||
|
| 21 |
+
(c >= '0' && c <= '9') ||
|
| 22 |
+
(c === '$') || (c === '_') ||
|
| 23 |
+
(c === '\u200C') || (c === '\u200D') ||
|
| 24 |
+
unicode.ID_Continue.test(c)
|
| 25 |
+
)
|
| 26 |
+
},
|
| 27 |
+
|
| 28 |
+
isDigit (c) {
|
| 29 |
+
return typeof c === 'string' && /[0-9]/.test(c)
|
| 30 |
+
},
|
| 31 |
+
|
| 32 |
+
isHexDigit (c) {
|
| 33 |
+
return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
|
| 34 |
+
},
|
| 35 |
+
}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/keyv/src/index.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {EventEmitter} from 'events';
|
| 2 |
+
|
| 3 |
+
type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
| 4 |
+
|
| 5 |
+
declare class Keyv<Value = any, Options extends Record<string, any> = Record<string, unknown>> extends EventEmitter {
|
| 6 |
+
/**
|
| 7 |
+
* `this.opts` is an object containing at least the properties listed
|
| 8 |
+
* below. However, `Keyv.Options` allows arbitrary properties as well.
|
| 9 |
+
* These properties can be specified as the second type parameter to `Keyv`.
|
| 10 |
+
*/
|
| 11 |
+
opts: WithRequiredProperties<
|
| 12 |
+
Keyv.Options<Value>,
|
| 13 |
+
'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri'
|
| 14 |
+
> &
|
| 15 |
+
Options;
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
| 19 |
+
*/
|
| 20 |
+
constructor(options?: Keyv.Options<Value> & Options);
|
| 21 |
+
/**
|
| 22 |
+
* @param uri The connection string URI.
|
| 23 |
+
*
|
| 24 |
+
* Merged into the options object as options.uri.
|
| 25 |
+
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
| 26 |
+
*/
|
| 27 |
+
constructor(uri?: string, options?: Keyv.Options<Value> & Options);
|
| 28 |
+
|
| 29 |
+
/** Returns the value. */
|
| 30 |
+
get(key: string, options?: {raw?: false}): Promise<Value | undefined>;
|
| 31 |
+
/** Returns the raw value. */
|
| 32 |
+
get(key: string, options: {raw: true}): Promise<Keyv.DeserializedData<Value> | undefined>;
|
| 33 |
+
|
| 34 |
+
/** Returns an array of values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
|
| 35 |
+
get(key: string[], options?: {raw?: false}): Promise<Array<Value | undefined>>;
|
| 36 |
+
/** Returns an array of raw values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
|
| 37 |
+
get(key: string[], options: {raw: true}): Promise<Array<Keyv.DeserializedData<Value> | undefined>>;
|
| 38 |
+
|
| 39 |
+
/**
|
| 40 |
+
* Set a value.
|
| 41 |
+
*
|
| 42 |
+
* By default keys are persistent. You can set an expiry TTL in milliseconds.
|
| 43 |
+
*/
|
| 44 |
+
set(key: string, value: Value, ttl?: number): Promise<true>;
|
| 45 |
+
/**
|
| 46 |
+
* Deletes an entry.
|
| 47 |
+
*
|
| 48 |
+
* Returns `true` if the key existed, `false` if not.
|
| 49 |
+
*/
|
| 50 |
+
delete(key: string | string[]): Promise<boolean>;
|
| 51 |
+
/** Delete all entries in the current namespace. */
|
| 52 |
+
clear(): Promise<void>;
|
| 53 |
+
/** Check if key exists in current namespace. */
|
| 54 |
+
has(key: string): Promise<boolean>;
|
| 55 |
+
/** Iterator */
|
| 56 |
+
iterator(namespace?: string): AsyncGenerator<any, void, any>;
|
| 57 |
+
/**
|
| 58 |
+
* Closes the connection.
|
| 59 |
+
*
|
| 60 |
+
* Returns `undefined` when the connection closes.
|
| 61 |
+
*/
|
| 62 |
+
disconnect(): Promise<void>;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
declare namespace Keyv {
|
| 66 |
+
interface Options<Value> {
|
| 67 |
+
[key: string]: any;
|
| 68 |
+
|
| 69 |
+
/** Namespace for the current instance. */
|
| 70 |
+
namespace?: string | undefined;
|
| 71 |
+
/** A custom serialization function. */
|
| 72 |
+
serialize?: ((data: DeserializedData<Value>) => string) | undefined;
|
| 73 |
+
/** A custom deserialization function. */
|
| 74 |
+
deserialize?: ((data: string) => DeserializedData<Value> | undefined) | undefined;
|
| 75 |
+
/** The connection string URI. */
|
| 76 |
+
uri?: string | undefined;
|
| 77 |
+
/** The storage adapter instance to be used by Keyv. */
|
| 78 |
+
store?: Store<string | undefined> | undefined;
|
| 79 |
+
/** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
|
| 80 |
+
ttl?: number | undefined;
|
| 81 |
+
/** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
|
| 82 |
+
adapter?: 'redis' | 'mongodb' | 'mongo' | 'sqlite' | 'postgresql' | 'postgres' | 'mysql' | undefined;
|
| 83 |
+
/** Enable compression option **/
|
| 84 |
+
compression?: CompressionAdapter | undefined;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
interface CompressionAdapter {
|
| 88 |
+
compress(value: any, options?: any): Promise<any>;
|
| 89 |
+
decompress(value: any, options?: any): Promise<any>;
|
| 90 |
+
serialize(value: any): Promise<any>;
|
| 91 |
+
deserialize(value: any): Promise<any>;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
interface DeserializedData<Value> {
|
| 95 |
+
value: Value; expires: number | undefined;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
type StoredData<Value> = DeserializedData<Value> | string | undefined;
|
| 99 |
+
|
| 100 |
+
interface Store<Value> {
|
| 101 |
+
get(key: string): Value | Promise<Value | undefined> | undefined;
|
| 102 |
+
set(key: string, value: Value, ttl?: number): any;
|
| 103 |
+
delete(key: string): boolean | Promise<boolean>;
|
| 104 |
+
clear(): void | Promise<void>;
|
| 105 |
+
has?(key: string): boolean | Promise<boolean>;
|
| 106 |
+
getMany?(
|
| 107 |
+
keys: string[]
|
| 108 |
+
): Array<StoredData<Value>> | Promise<Array<StoredData<Value>>> | undefined;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
export = Keyv;
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/keyv/src/index.js
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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options => {
|
| 7 |
+
const adapters = {
|
| 8 |
+
redis: '@keyv/redis',
|
| 9 |
+
rediss: '@keyv/redis',
|
| 10 |
+
mongodb: '@keyv/mongo',
|
| 11 |
+
mongo: '@keyv/mongo',
|
| 12 |
+
sqlite: '@keyv/sqlite',
|
| 13 |
+
postgresql: '@keyv/postgres',
|
| 14 |
+
postgres: '@keyv/postgres',
|
| 15 |
+
mysql: '@keyv/mysql',
|
| 16 |
+
etcd: '@keyv/etcd',
|
| 17 |
+
offline: '@keyv/offline',
|
| 18 |
+
tiered: '@keyv/tiered',
|
| 19 |
+
};
|
| 20 |
+
if (options.adapter || options.uri) {
|
| 21 |
+
const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0];
|
| 22 |
+
return new (require(adapters[adapter]))(options);
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
return new Map();
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
const iterableAdapters = [
|
| 29 |
+
'sqlite',
|
| 30 |
+
'postgres',
|
| 31 |
+
'mysql',
|
| 32 |
+
'mongo',
|
| 33 |
+
'redis',
|
| 34 |
+
'tiered',
|
| 35 |
+
];
|
| 36 |
+
|
| 37 |
+
class Keyv extends EventEmitter {
|
| 38 |
+
constructor(uri, {emitErrors = true, ...options} = {}) {
|
| 39 |
+
super();
|
| 40 |
+
this.opts = {
|
| 41 |
+
namespace: 'keyv',
|
| 42 |
+
serialize: JSONB.stringify,
|
| 43 |
+
deserialize: JSONB.parse,
|
| 44 |
+
...((typeof uri === 'string') ? {uri} : uri),
|
| 45 |
+
...options,
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
if (!this.opts.store) {
|
| 49 |
+
const adapterOptions = {...this.opts};
|
| 50 |
+
this.opts.store = loadStore(adapterOptions);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if (this.opts.compression) {
|
| 54 |
+
const compression = this.opts.compression;
|
| 55 |
+
this.opts.serialize = compression.serialize.bind(compression);
|
| 56 |
+
this.opts.deserialize = compression.deserialize.bind(compression);
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
if (typeof this.opts.store.on === 'function' && emitErrors) {
|
| 60 |
+
this.opts.store.on('error', error => this.emit('error', error));
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
this.opts.store.namespace = this.opts.namespace;
|
| 64 |
+
|
| 65 |
+
const generateIterator = iterator => async function * () {
|
| 66 |
+
for await (const [key, raw] of typeof iterator === 'function'
|
| 67 |
+
? iterator(this.opts.store.namespace)
|
| 68 |
+
: iterator) {
|
| 69 |
+
const data = await this.opts.deserialize(raw);
|
| 70 |
+
if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) {
|
| 71 |
+
continue;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
| 75 |
+
this.delete(key);
|
| 76 |
+
continue;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
yield [this._getKeyUnprefix(key), data.value];
|
| 80 |
+
}
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
// Attach iterators
|
| 84 |
+
if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) {
|
| 85 |
+
this.iterator = generateIterator(this.opts.store);
|
| 86 |
+
} else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts
|
| 87 |
+
&& this._checkIterableAdaptar()) {
|
| 88 |
+
this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store));
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
_checkIterableAdaptar() {
|
| 93 |
+
return iterableAdapters.includes(this.opts.store.opts.dialect)
|
| 94 |
+
|| iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
_getKeyPrefix(key) {
|
| 98 |
+
return `${this.opts.namespace}:${key}`;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
_getKeyPrefixArray(keys) {
|
| 102 |
+
return keys.map(key => `${this.opts.namespace}:${key}`);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
_getKeyUnprefix(key) {
|
| 106 |
+
return key
|
| 107 |
+
.split(':')
|
| 108 |
+
.splice(1)
|
| 109 |
+
.join(':');
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
get(key, options) {
|
| 113 |
+
const {store} = this.opts;
|
| 114 |
+
const isArray = Array.isArray(key);
|
| 115 |
+
const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key);
|
| 116 |
+
if (isArray && store.getMany === undefined) {
|
| 117 |
+
const promises = [];
|
| 118 |
+
for (const key of keyPrefixed) {
|
| 119 |
+
promises.push(Promise.resolve()
|
| 120 |
+
.then(() => store.get(key))
|
| 121 |
+
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data))
|
| 122 |
+
.then(data => {
|
| 123 |
+
if (data === undefined || data === null) {
|
| 124 |
+
return undefined;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
| 128 |
+
return this.delete(key).then(() => undefined);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
return (options && options.raw) ? data : data.value;
|
| 132 |
+
}),
|
| 133 |
+
);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
return Promise.allSettled(promises)
|
| 137 |
+
.then(values => {
|
| 138 |
+
const data = [];
|
| 139 |
+
for (const value of values) {
|
| 140 |
+
data.push(value.value);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
return data;
|
| 144 |
+
});
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
return Promise.resolve()
|
| 148 |
+
.then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed))
|
| 149 |
+
.then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data))
|
| 150 |
+
.then(data => {
|
| 151 |
+
if (data === undefined || data === null) {
|
| 152 |
+
return undefined;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
if (isArray) {
|
| 156 |
+
return data.map((row, index) => {
|
| 157 |
+
if ((typeof row === 'string')) {
|
| 158 |
+
row = this.opts.deserialize(row);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
if (row === undefined || row === null) {
|
| 162 |
+
return undefined;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
if (typeof row.expires === 'number' && Date.now() > row.expires) {
|
| 166 |
+
this.delete(key[index]).then(() => undefined);
|
| 167 |
+
return undefined;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
return (options && options.raw) ? row : row.value;
|
| 171 |
+
});
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
if (typeof data.expires === 'number' && Date.now() > data.expires) {
|
| 175 |
+
return this.delete(key).then(() => undefined);
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
return (options && options.raw) ? data : data.value;
|
| 179 |
+
});
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
set(key, value, ttl) {
|
| 183 |
+
const keyPrefixed = this._getKeyPrefix(key);
|
| 184 |
+
if (typeof ttl === 'undefined') {
|
| 185 |
+
ttl = this.opts.ttl;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
if (ttl === 0) {
|
| 189 |
+
ttl = undefined;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
const {store} = this.opts;
|
| 193 |
+
|
| 194 |
+
return Promise.resolve()
|
| 195 |
+
.then(() => {
|
| 196 |
+
const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null;
|
| 197 |
+
if (typeof value === 'symbol') {
|
| 198 |
+
this.emit('error', 'symbol cannot be serialized');
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
value = {value, expires};
|
| 202 |
+
return this.opts.serialize(value);
|
| 203 |
+
})
|
| 204 |
+
.then(value => store.set(keyPrefixed, value, ttl))
|
| 205 |
+
.then(() => true);
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
delete(key) {
|
| 209 |
+
const {store} = this.opts;
|
| 210 |
+
if (Array.isArray(key)) {
|
| 211 |
+
const keyPrefixed = this._getKeyPrefixArray(key);
|
| 212 |
+
if (store.deleteMany === undefined) {
|
| 213 |
+
const promises = [];
|
| 214 |
+
for (const key of keyPrefixed) {
|
| 215 |
+
promises.push(store.delete(key));
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
return Promise.allSettled(promises)
|
| 219 |
+
.then(values => values.every(x => x.value === true));
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
return Promise.resolve()
|
| 223 |
+
.then(() => store.deleteMany(keyPrefixed));
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
const keyPrefixed = this._getKeyPrefix(key);
|
| 227 |
+
return Promise.resolve()
|
| 228 |
+
.then(() => store.delete(keyPrefixed));
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
clear() {
|
| 232 |
+
const {store} = this.opts;
|
| 233 |
+
return Promise.resolve()
|
| 234 |
+
.then(() => store.clear());
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
has(key) {
|
| 238 |
+
const keyPrefixed = this._getKeyPrefix(key);
|
| 239 |
+
const {store} = this.opts;
|
| 240 |
+
return Promise.resolve()
|
| 241 |
+
.then(async () => {
|
| 242 |
+
if (typeof store.has === 'function') {
|
| 243 |
+
return store.has(keyPrefixed);
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
const value = await store.get(keyPrefixed);
|
| 247 |
+
return value !== undefined;
|
| 248 |
+
});
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
disconnect() {
|
| 252 |
+
const {store} = this.opts;
|
| 253 |
+
if (typeof store.disconnect === 'function') {
|
| 254 |
+
return store.disconnect();
|
| 255 |
+
}
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
module.exports = Keyv;
|
platform/dbops/archive/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
// Generated by LiveScript 1.6.0
|
| 2 |
+
(function(){
|
| 3 |
+
var parsedTypeCheck, types, toString$ = {}.toString;
|
| 4 |
+
parsedTypeCheck = require('type-check').parsedTypeCheck;
|
| 5 |
+
types = {
|
| 6 |
+
'*': function(value, options){
|
| 7 |
+
switch (toString$.call(value).slice(8, -1)) {
|
| 8 |
+
case 'Array':
|
| 9 |
+
return typeCast(value, {
|
| 10 |
+
type: 'Array'
|
| 11 |
+
}, options);
|
| 12 |
+
case 'Object':
|
| 13 |
+
return typeCast(value, {
|
| 14 |
+
type: 'Object'
|
| 15 |
+
}, options);
|
| 16 |
+
default:
|
| 17 |
+
return {
|
| 18 |
+
type: 'Just',
|
| 19 |
+
value: typesCast(value, [
|
| 20 |
+
{
|
| 21 |
+
type: 'Undefined'
|
| 22 |
+
}, {
|
| 23 |
+
type: 'Null'
|
| 24 |
+
}, {
|
| 25 |
+
type: 'NaN'
|
| 26 |
+
}, {
|
| 27 |
+
type: 'Boolean'
|
| 28 |
+
}, {
|
| 29 |
+
type: 'Number'
|
| 30 |
+
}, {
|
| 31 |
+
type: 'Date'
|
| 32 |
+
}, {
|
| 33 |
+
type: 'RegExp'
|
| 34 |
+
}, {
|
| 35 |
+
type: 'Array'
|
| 36 |
+
}, {
|
| 37 |
+
type: 'Object'
|
| 38 |
+
}, {
|
| 39 |
+
type: 'String'
|
| 40 |
+
}
|
| 41 |
+
], (options.explicit = true, options))
|
| 42 |
+
};
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
Undefined: function(it){
|
| 46 |
+
if (it === 'undefined' || it === void 8) {
|
| 47 |
+
return {
|
| 48 |
+
type: 'Just',
|
| 49 |
+
value: void 8
|
| 50 |
+
};
|
| 51 |
+
} else {
|
| 52 |
+
return {
|
| 53 |
+
type: 'Nothing'
|
| 54 |
+
};
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
Null: function(it){
|
| 58 |
+
if (it === 'null') {
|
| 59 |
+
return {
|
| 60 |
+
type: 'Just',
|
| 61 |
+
value: null
|
| 62 |
+
};
|
| 63 |
+
} else {
|
| 64 |
+
return {
|
| 65 |
+
type: 'Nothing'
|
| 66 |
+
};
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
NaN: function(it){
|
| 70 |
+
if (it === 'NaN') {
|
| 71 |
+
return {
|
| 72 |
+
type: 'Just',
|
| 73 |
+
value: NaN
|
| 74 |
+
};
|
| 75 |
+
} else {
|
| 76 |
+
return {
|
| 77 |
+
type: 'Nothing'
|
| 78 |
+
};
|
| 79 |
+
}
|
| 80 |
+
},
|
| 81 |
+
Boolean: function(it){
|
| 82 |
+
if (it === 'true') {
|
| 83 |
+
return {
|
| 84 |
+
type: 'Just',
|
| 85 |
+
value: true
|
| 86 |
+
};
|
| 87 |
+
} else if (it === 'false') {
|
| 88 |
+
return {
|
| 89 |
+
type: 'Just',
|
| 90 |
+
value: false
|
| 91 |
+
};
|
| 92 |
+
} else {
|
| 93 |
+
return {
|
| 94 |
+
type: 'Nothing'
|
| 95 |
+
};
|
| 96 |
+
}
|
| 97 |
+
},
|
| 98 |
+
Number: function(it){
|
| 99 |
+
return {
|
| 100 |
+
type: 'Just',
|
| 101 |
+
value: +it
|
| 102 |
+
};
|
| 103 |
+
},
|
| 104 |
+
Int: function(it){
|
| 105 |
+
return {
|
| 106 |
+
type: 'Just',
|
| 107 |
+
value: +it
|
| 108 |
+
};
|
| 109 |
+
},
|
| 110 |
+
Float: function(it){
|
| 111 |
+
return {
|
| 112 |
+
type: 'Just',
|
| 113 |
+
value: +it
|
| 114 |
+
};
|
| 115 |
+
},
|
| 116 |
+
Date: function(value, options){
|
| 117 |
+
var that;
|
| 118 |
+
if (that = /^\#([\s\S]*)\#$/.exec(value)) {
|
| 119 |
+
return {
|
| 120 |
+
type: 'Just',
|
| 121 |
+
value: new Date(+that[1] || that[1])
|
| 122 |
+
};
|
| 123 |
+
} else if (options.explicit) {
|
| 124 |
+
return {
|
| 125 |
+
type: 'Nothing'
|
| 126 |
+
};
|
| 127 |
+
} else {
|
| 128 |
+
return {
|
| 129 |
+
type: 'Just',
|
| 130 |
+
value: new Date(+value || value)
|
| 131 |
+
};
|
| 132 |
+
}
|
| 133 |
+
},
|
| 134 |
+
RegExp: function(value, options){
|
| 135 |
+
var that;
|
| 136 |
+
if (that = /^\/([\s\S]*)\/([gimy]*)$/.exec(value)) {
|
| 137 |
+
return {
|
| 138 |
+
type: 'Just',
|
| 139 |
+
value: new RegExp(that[1], that[2])
|
| 140 |
+
};
|
| 141 |
+
} else if (options.explicit) {
|
| 142 |
+
return {
|
| 143 |
+
type: 'Nothing'
|
| 144 |
+
};
|
| 145 |
+
} else {
|
| 146 |
+
return {
|
| 147 |
+
type: 'Just',
|
| 148 |
+
value: new RegExp(value)
|
| 149 |
+
};
|
| 150 |
+
}
|
| 151 |
+
},
|
| 152 |
+
Array: function(value, options){
|
| 153 |
+
return castArray(value, {
|
| 154 |
+
of: [{
|
| 155 |
+
type: '*'
|
| 156 |
+
}]
|
| 157 |
+
}, options);
|
| 158 |
+
},
|
| 159 |
+
Object: function(value, options){
|
| 160 |
+
return castFields(value, {
|
| 161 |
+
of: {}
|
| 162 |
+
}, options);
|
| 163 |
+
},
|
| 164 |
+
String: function(it){
|
| 165 |
+
var replace, that;
|
| 166 |
+
if (toString$.call(it).slice(8, -1) !== 'String') {
|
| 167 |
+
return {
|
| 168 |
+
type: 'Nothing'
|
| 169 |
+
};
|
| 170 |
+
}
|
| 171 |
+
replace = function(value, quote){
|
| 172 |
+
return value.replace(/\\([^u]|u[0-9a-fA-F]{4})/g, function(all, escaped){
|
| 173 |
+
switch (escaped[0]) {
|
| 174 |
+
case quote:
|
| 175 |
+
return quote;
|
| 176 |
+
case '\\':
|
| 177 |
+
return '\\';
|
| 178 |
+
case 'b':
|
| 179 |
+
return '\b';
|
| 180 |
+
case 'f':
|
| 181 |
+
return '\f';
|
| 182 |
+
case 'n':
|
| 183 |
+
return '\n';
|
| 184 |
+
case 'r':
|
| 185 |
+
return '\r';
|
| 186 |
+
case 't':
|
| 187 |
+
return '\t';
|
| 188 |
+
case 'u':
|
| 189 |
+
return JSON.parse("\"" + all + "\"");
|
| 190 |
+
default:
|
| 191 |
+
return escaped;
|
| 192 |
+
}
|
| 193 |
+
});
|
| 194 |
+
};
|
| 195 |
+
if (that = it.match(/^'([\s\S]*)'$/)) {
|
| 196 |
+
return {
|
| 197 |
+
type: 'Just',
|
| 198 |
+
value: replace(that[1], "'")
|
| 199 |
+
};
|
| 200 |
+
} else if (that = it.match(/^"([\s\S]*)"$/)) {
|
| 201 |
+
return {
|
| 202 |
+
type: 'Just',
|
| 203 |
+
value: replace(that[1], '"')
|
| 204 |
+
};
|
| 205 |
+
} else {
|
| 206 |
+
return {
|
| 207 |
+
type: 'Just',
|
| 208 |
+
value: it
|
| 209 |
+
};
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
};
|
| 213 |
+
function castArray(node, type, options){
|
| 214 |
+
var typeOf, element;
|
| 215 |
+
if (toString$.call(node).slice(8, -1) !== 'Array') {
|
| 216 |
+
return {
|
| 217 |
+
type: 'Nothing'
|
| 218 |
+
};
|
| 219 |
+
}
|
| 220 |
+
typeOf = type.of;
|
| 221 |
+
return {
|
| 222 |
+
type: 'Just',
|
| 223 |
+
value: (function(){
|
| 224 |
+
var i$, ref$, len$, results$ = [];
|
| 225 |
+
for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) {
|
| 226 |
+
element = ref$[i$];
|
| 227 |
+
results$.push(typesCast(element, typeOf, options));
|
| 228 |
+
}
|
| 229 |
+
return results$;
|
| 230 |
+
}())
|
| 231 |
+
};
|
| 232 |
+
}
|
| 233 |
+
function castTuple(node, type, options){
|
| 234 |
+
var result, i, i$, ref$, len$, types, cast;
|
| 235 |
+
if (toString$.call(node).slice(8, -1) !== 'Array') {
|
| 236 |
+
return {
|
| 237 |
+
type: 'Nothing'
|
| 238 |
+
};
|
| 239 |
+
}
|
| 240 |
+
result = [];
|
| 241 |
+
i = 0;
|
| 242 |
+
for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
|
| 243 |
+
types = ref$[i$];
|
| 244 |
+
cast = typesCast(node[i], types, options);
|
| 245 |
+
if (toString$.call(cast).slice(8, -1) !== 'Undefined') {
|
| 246 |
+
result.push(cast);
|
| 247 |
+
}
|
| 248 |
+
i++;
|
| 249 |
+
}
|
| 250 |
+
if (node.length <= i) {
|
| 251 |
+
return {
|
| 252 |
+
type: 'Just',
|
| 253 |
+
value: result
|
| 254 |
+
};
|
| 255 |
+
} else {
|
| 256 |
+
return {
|
| 257 |
+
type: 'Nothing'
|
| 258 |
+
};
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
function castFields(node, type, options){
|
| 262 |
+
var typeOf, key, value;
|
| 263 |
+
if (toString$.call(node).slice(8, -1) !== 'Object') {
|
| 264 |
+
return {
|
| 265 |
+
type: 'Nothing'
|
| 266 |
+
};
|
| 267 |
+
}
|
| 268 |
+
typeOf = type.of;
|
| 269 |
+
return {
|
| 270 |
+
type: 'Just',
|
| 271 |
+
value: (function(){
|
| 272 |
+
var ref$, resultObj$ = {};
|
| 273 |
+
for (key in ref$ = node) {
|
| 274 |
+
value = ref$[key];
|
| 275 |
+
resultObj$[typesCast(key, [{
|
| 276 |
+
type: 'String'
|
| 277 |
+
}], options)] = typesCast(value, typeOf[key] || [{
|
| 278 |
+
type: '*'
|
| 279 |
+
}], options);
|
| 280 |
+
}
|
| 281 |
+
return resultObj$;
|
| 282 |
+
}())
|
| 283 |
+
};
|
| 284 |
+
}
|
| 285 |
+
function typeCast(node, typeObj, options){
|
| 286 |
+
var type, structure, castFunc, ref$;
|
| 287 |
+
type = typeObj.type, structure = typeObj.structure;
|
| 288 |
+
if (type) {
|
| 289 |
+
castFunc = ((ref$ = options.customTypes[type]) != null ? ref$.cast : void 8) || types[type];
|
| 290 |
+
if (!castFunc) {
|
| 291 |
+
throw new Error("Type not defined: " + type + ".");
|
| 292 |
+
}
|
| 293 |
+
return castFunc(node, options, typesCast);
|
| 294 |
+
} else {
|
| 295 |
+
switch (structure) {
|
| 296 |
+
case 'array':
|
| 297 |
+
return castArray(node, typeObj, options);
|
| 298 |
+
case 'tuple':
|
| 299 |
+
return castTuple(node, typeObj, options);
|
| 300 |
+
case 'fields':
|
| 301 |
+
return castFields(node, typeObj, options);
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
function typesCast(node, types, options){
|
| 306 |
+
var i$, len$, type, ref$, valueType, value;
|
| 307 |
+
for (i$ = 0, len$ = types.length; i$ < len$; ++i$) {
|
| 308 |
+
type = types[i$];
|
| 309 |
+
ref$ = typeCast(node, type, options), valueType = ref$.type, value = ref$.value;
|
| 310 |
+
if (valueType === 'Nothing') {
|
| 311 |
+
continue;
|
| 312 |
+
}
|
| 313 |
+
if (parsedTypeCheck([type], value, {
|
| 314 |
+
customTypes: options.customTypes
|
| 315 |
+
})) {
|
| 316 |
+
return value;
|
| 317 |
+
}
|
| 318 |
+
}
|
| 319 |
+
throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + ".");
|
| 320 |
+
}
|
| 321 |
+
module.exports = function(node, types, options){
|
| 322 |
+
if (!options.explicit && types.length === 1 && types[0].type === 'String') {
|
| 323 |
+
return node;
|
| 324 |
+
}
|
| 325 |
+
return typesCast(node, types, options);
|
| 326 |
+
};
|
| 327 |
+
}).call(this);
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/levn/lib/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Generated by LiveScript 1.6.0
|
| 2 |
+
(function(){
|
| 3 |
+
var parseString, cast, parseType, VERSION, parsedTypeParse, parse;
|
| 4 |
+
parseString = require('./parse-string');
|
| 5 |
+
cast = require('./cast');
|
| 6 |
+
parseType = require('type-check').parseType;
|
| 7 |
+
VERSION = '0.4.1';
|
| 8 |
+
parsedTypeParse = function(parsedType, string, options){
|
| 9 |
+
options == null && (options = {});
|
| 10 |
+
options.explicit == null && (options.explicit = false);
|
| 11 |
+
options.customTypes == null && (options.customTypes = {});
|
| 12 |
+
return cast(parseString(parsedType, string, options), parsedType, options);
|
| 13 |
+
};
|
| 14 |
+
parse = function(type, string, options){
|
| 15 |
+
return parsedTypeParse(parseType(type), string, options);
|
| 16 |
+
};
|
| 17 |
+
module.exports = {
|
| 18 |
+
VERSION: VERSION,
|
| 19 |
+
parse: parse,
|
| 20 |
+
parsedTypeParse: parsedTypeParse
|
| 21 |
+
};
|
| 22 |
+
}).call(this);
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/levn/lib/parse-string.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Generated by LiveScript 1.6.0
|
| 2 |
+
(function(){
|
| 3 |
+
var reject, special, tokenRegex;
|
| 4 |
+
reject = require('prelude-ls').reject;
|
| 5 |
+
function consumeOp(tokens, op){
|
| 6 |
+
if (tokens[0] === op) {
|
| 7 |
+
return tokens.shift();
|
| 8 |
+
} else {
|
| 9 |
+
throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + ".");
|
| 10 |
+
}
|
| 11 |
+
}
|
| 12 |
+
function maybeConsumeOp(tokens, op){
|
| 13 |
+
if (tokens[0] === op) {
|
| 14 |
+
return tokens.shift();
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
function consumeList(tokens, arg$, hasDelimiters){
|
| 18 |
+
var open, close, result, untilTest;
|
| 19 |
+
open = arg$[0], close = arg$[1];
|
| 20 |
+
if (hasDelimiters) {
|
| 21 |
+
consumeOp(tokens, open);
|
| 22 |
+
}
|
| 23 |
+
result = [];
|
| 24 |
+
untilTest = "," + (hasDelimiters ? close : '');
|
| 25 |
+
while (tokens.length && (hasDelimiters && tokens[0] !== close)) {
|
| 26 |
+
result.push(consumeElement(tokens, untilTest));
|
| 27 |
+
maybeConsumeOp(tokens, ',');
|
| 28 |
+
}
|
| 29 |
+
if (hasDelimiters) {
|
| 30 |
+
consumeOp(tokens, close);
|
| 31 |
+
}
|
| 32 |
+
return result;
|
| 33 |
+
}
|
| 34 |
+
function consumeArray(tokens, hasDelimiters){
|
| 35 |
+
return consumeList(tokens, ['[', ']'], hasDelimiters);
|
| 36 |
+
}
|
| 37 |
+
function consumeTuple(tokens, hasDelimiters){
|
| 38 |
+
return consumeList(tokens, ['(', ')'], hasDelimiters);
|
| 39 |
+
}
|
| 40 |
+
function consumeFields(tokens, hasDelimiters){
|
| 41 |
+
var result, untilTest, key;
|
| 42 |
+
if (hasDelimiters) {
|
| 43 |
+
consumeOp(tokens, '{');
|
| 44 |
+
}
|
| 45 |
+
result = {};
|
| 46 |
+
untilTest = "," + (hasDelimiters ? '}' : '');
|
| 47 |
+
while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) {
|
| 48 |
+
key = consumeValue(tokens, ':');
|
| 49 |
+
consumeOp(tokens, ':');
|
| 50 |
+
result[key] = consumeElement(tokens, untilTest);
|
| 51 |
+
maybeConsumeOp(tokens, ',');
|
| 52 |
+
}
|
| 53 |
+
if (hasDelimiters) {
|
| 54 |
+
consumeOp(tokens, '}');
|
| 55 |
+
}
|
| 56 |
+
return result;
|
| 57 |
+
}
|
| 58 |
+
function consumeValue(tokens, untilTest){
|
| 59 |
+
var out;
|
| 60 |
+
untilTest == null && (untilTest = '');
|
| 61 |
+
out = '';
|
| 62 |
+
while (tokens.length && -1 === untilTest.indexOf(tokens[0])) {
|
| 63 |
+
out += tokens.shift();
|
| 64 |
+
}
|
| 65 |
+
return out;
|
| 66 |
+
}
|
| 67 |
+
function consumeElement(tokens, untilTest){
|
| 68 |
+
switch (tokens[0]) {
|
| 69 |
+
case '[':
|
| 70 |
+
return consumeArray(tokens, true);
|
| 71 |
+
case '(':
|
| 72 |
+
return consumeTuple(tokens, true);
|
| 73 |
+
case '{':
|
| 74 |
+
return consumeFields(tokens, true);
|
| 75 |
+
default:
|
| 76 |
+
return consumeValue(tokens, untilTest);
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
function consumeTopLevel(tokens, types, options){
|
| 80 |
+
var ref$, type, structure, origTokens, result, finalResult, x$, y$;
|
| 81 |
+
ref$ = types[0], type = ref$.type, structure = ref$.structure;
|
| 82 |
+
origTokens = tokens.concat();
|
| 83 |
+
if (!options.explicit && types.length === 1 && ((!type && structure) || (type === 'Array' || type === 'Object'))) {
|
| 84 |
+
result = structure === 'array' || type === 'Array'
|
| 85 |
+
? consumeArray(tokens, tokens[0] === '[')
|
| 86 |
+
: structure === 'tuple'
|
| 87 |
+
? consumeTuple(tokens, tokens[0] === '(')
|
| 88 |
+
: consumeFields(tokens, tokens[0] === '{');
|
| 89 |
+
finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array'
|
| 90 |
+
? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$)
|
| 91 |
+
: (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result;
|
| 92 |
+
} else {
|
| 93 |
+
finalResult = consumeElement(tokens);
|
| 94 |
+
}
|
| 95 |
+
return finalResult;
|
| 96 |
+
}
|
| 97 |
+
special = /\[\]\(\)}{:,/.source;
|
| 98 |
+
tokenRegex = RegExp('("(?:\\\\"|[^"])*")|(\'(?:\\\\\'|[^\'])*\')|(/(?:\\\\/|[^/])*/[a-zA-Z]*)|(#.*#)|([' + special + '])|([^\\s' + special + '](?:\\s*[^\\s' + special + ']+)*)|\\s*');
|
| 99 |
+
module.exports = function(types, string, options){
|
| 100 |
+
var tokens, node;
|
| 101 |
+
options == null && (options = {});
|
| 102 |
+
if (!options.explicit && types.length === 1 && types[0].type === 'String') {
|
| 103 |
+
return string;
|
| 104 |
+
}
|
| 105 |
+
tokens = reject(not$, string.split(tokenRegex));
|
| 106 |
+
node = consumeTopLevel(tokens, types, options);
|
| 107 |
+
if (!node) {
|
| 108 |
+
throw new Error("Error parsing '" + string + "'.");
|
| 109 |
+
}
|
| 110 |
+
return node;
|
| 111 |
+
};
|
| 112 |
+
function not$(x){ return !x; }
|
| 113 |
+
}).call(this);
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/lightningcss/node/ast.d.ts
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/lightningcss/node/ast.js.flow
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|