Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/ast.js +144 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/code.js +135 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/keyword.js +165 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/utils.js +33 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/fastq/.github/dependabot.yml +11 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/fastq/.github/workflows/ci.yml +75 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/cache.js +214 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/del.js +30 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/utils.js +42 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/cjs/index.js +125 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/cjs/package.json +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/esm/index.js +120 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/php/flatted.php +156 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/python/flatted.py +149 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/types/index.d.ts +4 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/gensync/test/.babelrc +5 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/gensync/test/index.test.js +489 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es2015/index.d.ts +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es2015/index.js +13 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es5/index.d.ts +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es5/index.js +15 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.d.ts +41 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.js +0 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.d.ts +32 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.js +169 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.d.ts +22 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.js +36 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.d.ts +35 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.js +38 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.d.ts +3 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.js +7 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +103 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.js +449 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.min.js +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/src/index.js +104 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.js +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.modern.js +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.modern.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js +2 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/i18next-browser-languagedetector/.github/stale.yml +24 -0
- novas/novacore-zephyr/claude-code-router/ui/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js +444 -0
novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/ast.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
documentation and/or other materials provided with the distribution.
|
| 12 |
+
|
| 13 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
|
| 14 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 15 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 16 |
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
| 17 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 18 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 19 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 20 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 21 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
| 22 |
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
(function () {
|
| 26 |
+
'use strict';
|
| 27 |
+
|
| 28 |
+
function isExpression(node) {
|
| 29 |
+
if (node == null) { return false; }
|
| 30 |
+
switch (node.type) {
|
| 31 |
+
case 'ArrayExpression':
|
| 32 |
+
case 'AssignmentExpression':
|
| 33 |
+
case 'BinaryExpression':
|
| 34 |
+
case 'CallExpression':
|
| 35 |
+
case 'ConditionalExpression':
|
| 36 |
+
case 'FunctionExpression':
|
| 37 |
+
case 'Identifier':
|
| 38 |
+
case 'Literal':
|
| 39 |
+
case 'LogicalExpression':
|
| 40 |
+
case 'MemberExpression':
|
| 41 |
+
case 'NewExpression':
|
| 42 |
+
case 'ObjectExpression':
|
| 43 |
+
case 'SequenceExpression':
|
| 44 |
+
case 'ThisExpression':
|
| 45 |
+
case 'UnaryExpression':
|
| 46 |
+
case 'UpdateExpression':
|
| 47 |
+
return true;
|
| 48 |
+
}
|
| 49 |
+
return false;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
function isIterationStatement(node) {
|
| 53 |
+
if (node == null) { return false; }
|
| 54 |
+
switch (node.type) {
|
| 55 |
+
case 'DoWhileStatement':
|
| 56 |
+
case 'ForInStatement':
|
| 57 |
+
case 'ForStatement':
|
| 58 |
+
case 'WhileStatement':
|
| 59 |
+
return true;
|
| 60 |
+
}
|
| 61 |
+
return false;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
function isStatement(node) {
|
| 65 |
+
if (node == null) { return false; }
|
| 66 |
+
switch (node.type) {
|
| 67 |
+
case 'BlockStatement':
|
| 68 |
+
case 'BreakStatement':
|
| 69 |
+
case 'ContinueStatement':
|
| 70 |
+
case 'DebuggerStatement':
|
| 71 |
+
case 'DoWhileStatement':
|
| 72 |
+
case 'EmptyStatement':
|
| 73 |
+
case 'ExpressionStatement':
|
| 74 |
+
case 'ForInStatement':
|
| 75 |
+
case 'ForStatement':
|
| 76 |
+
case 'IfStatement':
|
| 77 |
+
case 'LabeledStatement':
|
| 78 |
+
case 'ReturnStatement':
|
| 79 |
+
case 'SwitchStatement':
|
| 80 |
+
case 'ThrowStatement':
|
| 81 |
+
case 'TryStatement':
|
| 82 |
+
case 'VariableDeclaration':
|
| 83 |
+
case 'WhileStatement':
|
| 84 |
+
case 'WithStatement':
|
| 85 |
+
return true;
|
| 86 |
+
}
|
| 87 |
+
return false;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
function isSourceElement(node) {
|
| 91 |
+
return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
function trailingStatement(node) {
|
| 95 |
+
switch (node.type) {
|
| 96 |
+
case 'IfStatement':
|
| 97 |
+
if (node.alternate != null) {
|
| 98 |
+
return node.alternate;
|
| 99 |
+
}
|
| 100 |
+
return node.consequent;
|
| 101 |
+
|
| 102 |
+
case 'LabeledStatement':
|
| 103 |
+
case 'ForStatement':
|
| 104 |
+
case 'ForInStatement':
|
| 105 |
+
case 'WhileStatement':
|
| 106 |
+
case 'WithStatement':
|
| 107 |
+
return node.body;
|
| 108 |
+
}
|
| 109 |
+
return null;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
function isProblematicIfStatement(node) {
|
| 113 |
+
var current;
|
| 114 |
+
|
| 115 |
+
if (node.type !== 'IfStatement') {
|
| 116 |
+
return false;
|
| 117 |
+
}
|
| 118 |
+
if (node.alternate == null) {
|
| 119 |
+
return false;
|
| 120 |
+
}
|
| 121 |
+
current = node.consequent;
|
| 122 |
+
do {
|
| 123 |
+
if (current.type === 'IfStatement') {
|
| 124 |
+
if (current.alternate == null) {
|
| 125 |
+
return true;
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
current = trailingStatement(current);
|
| 129 |
+
} while (current);
|
| 130 |
+
|
| 131 |
+
return false;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
module.exports = {
|
| 135 |
+
isExpression: isExpression,
|
| 136 |
+
isStatement: isStatement,
|
| 137 |
+
isIterationStatement: isIterationStatement,
|
| 138 |
+
isSourceElement: isSourceElement,
|
| 139 |
+
isProblematicIfStatement: isProblematicIfStatement,
|
| 140 |
+
|
| 141 |
+
trailingStatement: trailingStatement
|
| 142 |
+
};
|
| 143 |
+
}());
|
| 144 |
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/code.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
| 3 |
+
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
|
| 4 |
+
|
| 5 |
+
Redistribution and use in source and binary forms, with or without
|
| 6 |
+
modification, are permitted provided that the following conditions are met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 11 |
+
notice, this list of conditions and the following disclaimer in the
|
| 12 |
+
documentation and/or other materials provided with the distribution.
|
| 13 |
+
|
| 14 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 15 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 16 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 17 |
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
| 18 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 19 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 20 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 21 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 22 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
| 23 |
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 24 |
+
*/
|
| 25 |
+
|
| 26 |
+
(function () {
|
| 27 |
+
'use strict';
|
| 28 |
+
|
| 29 |
+
var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
|
| 30 |
+
|
| 31 |
+
// See `tools/generate-identifier-regex.js`.
|
| 32 |
+
ES5Regex = {
|
| 33 |
+
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
|
| 34 |
+
NonAsciiIdentifierStart: /[\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\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\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EC4\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\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-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
|
| 35 |
+
// ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
|
| 36 |
+
NonAsciiIdentifierPart: /[\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\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\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\u0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0DD6\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-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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\u200C\u200D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\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]/
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
ES6Regex = {
|
| 40 |
+
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
|
| 41 |
+
NonAsciiIdentifierStart: /[\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\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\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-\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\u2118-\u211D\u2124\u2126\u2128\u212A-\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\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\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D76\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\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD87E[\uDC00-\uDE1D]/,
|
| 42 |
+
// ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
|
| 43 |
+
NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\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\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\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\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\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\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\u1369-\u1371\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-\u19DA\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-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\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\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\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-\u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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\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
function isDecimalDigit(ch) {
|
| 47 |
+
return 0x30 <= ch && ch <= 0x39; // 0..9
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
function isHexDigit(ch) {
|
| 51 |
+
return 0x30 <= ch && ch <= 0x39 || // 0..9
|
| 52 |
+
0x61 <= ch && ch <= 0x66 || // a..f
|
| 53 |
+
0x41 <= ch && ch <= 0x46; // A..F
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
function isOctalDigit(ch) {
|
| 57 |
+
return ch >= 0x30 && ch <= 0x37; // 0..7
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
// 7.2 White Space
|
| 61 |
+
|
| 62 |
+
NON_ASCII_WHITESPACES = [
|
| 63 |
+
0x1680,
|
| 64 |
+
0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
|
| 65 |
+
0x202F, 0x205F,
|
| 66 |
+
0x3000,
|
| 67 |
+
0xFEFF
|
| 68 |
+
];
|
| 69 |
+
|
| 70 |
+
function isWhiteSpace(ch) {
|
| 71 |
+
return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
|
| 72 |
+
ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
// 7.3 Line Terminators
|
| 76 |
+
|
| 77 |
+
function isLineTerminator(ch) {
|
| 78 |
+
return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// 7.6 Identifier Names and Identifiers
|
| 82 |
+
|
| 83 |
+
function fromCodePoint(cp) {
|
| 84 |
+
if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
|
| 85 |
+
var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
|
| 86 |
+
var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
|
| 87 |
+
return cu1 + cu2;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
IDENTIFIER_START = new Array(0x80);
|
| 91 |
+
for(ch = 0; ch < 0x80; ++ch) {
|
| 92 |
+
IDENTIFIER_START[ch] =
|
| 93 |
+
ch >= 0x61 && ch <= 0x7A || // a..z
|
| 94 |
+
ch >= 0x41 && ch <= 0x5A || // A..Z
|
| 95 |
+
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
IDENTIFIER_PART = new Array(0x80);
|
| 99 |
+
for(ch = 0; ch < 0x80; ++ch) {
|
| 100 |
+
IDENTIFIER_PART[ch] =
|
| 101 |
+
ch >= 0x61 && ch <= 0x7A || // a..z
|
| 102 |
+
ch >= 0x41 && ch <= 0x5A || // A..Z
|
| 103 |
+
ch >= 0x30 && ch <= 0x39 || // 0..9
|
| 104 |
+
ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
function isIdentifierStartES5(ch) {
|
| 108 |
+
return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
function isIdentifierPartES5(ch) {
|
| 112 |
+
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
function isIdentifierStartES6(ch) {
|
| 116 |
+
return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
function isIdentifierPartES6(ch) {
|
| 120 |
+
return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
module.exports = {
|
| 124 |
+
isDecimalDigit: isDecimalDigit,
|
| 125 |
+
isHexDigit: isHexDigit,
|
| 126 |
+
isOctalDigit: isOctalDigit,
|
| 127 |
+
isWhiteSpace: isWhiteSpace,
|
| 128 |
+
isLineTerminator: isLineTerminator,
|
| 129 |
+
isIdentifierStartES5: isIdentifierStartES5,
|
| 130 |
+
isIdentifierPartES5: isIdentifierPartES5,
|
| 131 |
+
isIdentifierStartES6: isIdentifierStartES6,
|
| 132 |
+
isIdentifierPartES6: isIdentifierPartES6
|
| 133 |
+
};
|
| 134 |
+
}());
|
| 135 |
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/keyword.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
documentation and/or other materials provided with the distribution.
|
| 12 |
+
|
| 13 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 14 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 15 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 16 |
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
| 17 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 18 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 19 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 20 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 21 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
| 22 |
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
(function () {
|
| 26 |
+
'use strict';
|
| 27 |
+
|
| 28 |
+
var code = require('./code');
|
| 29 |
+
|
| 30 |
+
function isStrictModeReservedWordES6(id) {
|
| 31 |
+
switch (id) {
|
| 32 |
+
case 'implements':
|
| 33 |
+
case 'interface':
|
| 34 |
+
case 'package':
|
| 35 |
+
case 'private':
|
| 36 |
+
case 'protected':
|
| 37 |
+
case 'public':
|
| 38 |
+
case 'static':
|
| 39 |
+
case 'let':
|
| 40 |
+
return true;
|
| 41 |
+
default:
|
| 42 |
+
return false;
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
function isKeywordES5(id, strict) {
|
| 47 |
+
// yield should not be treated as keyword under non-strict mode.
|
| 48 |
+
if (!strict && id === 'yield') {
|
| 49 |
+
return false;
|
| 50 |
+
}
|
| 51 |
+
return isKeywordES6(id, strict);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
function isKeywordES6(id, strict) {
|
| 55 |
+
if (strict && isStrictModeReservedWordES6(id)) {
|
| 56 |
+
return true;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
switch (id.length) {
|
| 60 |
+
case 2:
|
| 61 |
+
return (id === 'if') || (id === 'in') || (id === 'do');
|
| 62 |
+
case 3:
|
| 63 |
+
return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
|
| 64 |
+
case 4:
|
| 65 |
+
return (id === 'this') || (id === 'else') || (id === 'case') ||
|
| 66 |
+
(id === 'void') || (id === 'with') || (id === 'enum');
|
| 67 |
+
case 5:
|
| 68 |
+
return (id === 'while') || (id === 'break') || (id === 'catch') ||
|
| 69 |
+
(id === 'throw') || (id === 'const') || (id === 'yield') ||
|
| 70 |
+
(id === 'class') || (id === 'super');
|
| 71 |
+
case 6:
|
| 72 |
+
return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
|
| 73 |
+
(id === 'switch') || (id === 'export') || (id === 'import');
|
| 74 |
+
case 7:
|
| 75 |
+
return (id === 'default') || (id === 'finally') || (id === 'extends');
|
| 76 |
+
case 8:
|
| 77 |
+
return (id === 'function') || (id === 'continue') || (id === 'debugger');
|
| 78 |
+
case 10:
|
| 79 |
+
return (id === 'instanceof');
|
| 80 |
+
default:
|
| 81 |
+
return false;
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
function isReservedWordES5(id, strict) {
|
| 86 |
+
return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
function isReservedWordES6(id, strict) {
|
| 90 |
+
return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
function isRestrictedWord(id) {
|
| 94 |
+
return id === 'eval' || id === 'arguments';
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
function isIdentifierNameES5(id) {
|
| 98 |
+
var i, iz, ch;
|
| 99 |
+
|
| 100 |
+
if (id.length === 0) { return false; }
|
| 101 |
+
|
| 102 |
+
ch = id.charCodeAt(0);
|
| 103 |
+
if (!code.isIdentifierStartES5(ch)) {
|
| 104 |
+
return false;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
for (i = 1, iz = id.length; i < iz; ++i) {
|
| 108 |
+
ch = id.charCodeAt(i);
|
| 109 |
+
if (!code.isIdentifierPartES5(ch)) {
|
| 110 |
+
return false;
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
return true;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
function decodeUtf16(lead, trail) {
|
| 117 |
+
return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
function isIdentifierNameES6(id) {
|
| 121 |
+
var i, iz, ch, lowCh, check;
|
| 122 |
+
|
| 123 |
+
if (id.length === 0) { return false; }
|
| 124 |
+
|
| 125 |
+
check = code.isIdentifierStartES6;
|
| 126 |
+
for (i = 0, iz = id.length; i < iz; ++i) {
|
| 127 |
+
ch = id.charCodeAt(i);
|
| 128 |
+
if (0xD800 <= ch && ch <= 0xDBFF) {
|
| 129 |
+
++i;
|
| 130 |
+
if (i >= iz) { return false; }
|
| 131 |
+
lowCh = id.charCodeAt(i);
|
| 132 |
+
if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
|
| 133 |
+
return false;
|
| 134 |
+
}
|
| 135 |
+
ch = decodeUtf16(ch, lowCh);
|
| 136 |
+
}
|
| 137 |
+
if (!check(ch)) {
|
| 138 |
+
return false;
|
| 139 |
+
}
|
| 140 |
+
check = code.isIdentifierPartES6;
|
| 141 |
+
}
|
| 142 |
+
return true;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
function isIdentifierES5(id, strict) {
|
| 146 |
+
return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
function isIdentifierES6(id, strict) {
|
| 150 |
+
return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
module.exports = {
|
| 154 |
+
isKeywordES5: isKeywordES5,
|
| 155 |
+
isKeywordES6: isKeywordES6,
|
| 156 |
+
isReservedWordES5: isReservedWordES5,
|
| 157 |
+
isReservedWordES6: isReservedWordES6,
|
| 158 |
+
isRestrictedWord: isRestrictedWord,
|
| 159 |
+
isIdentifierNameES5: isIdentifierNameES5,
|
| 160 |
+
isIdentifierNameES6: isIdentifierNameES6,
|
| 161 |
+
isIdentifierES5: isIdentifierES5,
|
| 162 |
+
isIdentifierES6: isIdentifierES6
|
| 163 |
+
};
|
| 164 |
+
}());
|
| 165 |
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/esutils/lib/utils.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are met:
|
| 6 |
+
|
| 7 |
+
* Redistributions of source code must retain the above copyright
|
| 8 |
+
notice, this list of conditions and the following disclaimer.
|
| 9 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 10 |
+
notice, this list of conditions and the following disclaimer in the
|
| 11 |
+
documentation and/or other materials provided with the distribution.
|
| 12 |
+
|
| 13 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 14 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 15 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 16 |
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
| 17 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 18 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 19 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 20 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 21 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
| 22 |
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
(function () {
|
| 27 |
+
'use strict';
|
| 28 |
+
|
| 29 |
+
exports.ast = require('./ast');
|
| 30 |
+
exports.code = require('./code');
|
| 31 |
+
exports.keyword = require('./keyword');
|
| 32 |
+
}());
|
| 33 |
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/fastq/.github/dependabot.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: 2
|
| 2 |
+
updates:
|
| 3 |
+
- package-ecosystem: npm
|
| 4 |
+
directory: "/"
|
| 5 |
+
schedule:
|
| 6 |
+
interval: daily
|
| 7 |
+
open-pull-requests-limit: 10
|
| 8 |
+
ignore:
|
| 9 |
+
- dependency-name: standard
|
| 10 |
+
versions:
|
| 11 |
+
- 16.0.3
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/fastq/.github/workflows/ci.yml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: ci
|
| 2 |
+
|
| 3 |
+
on: [push, pull_request]
|
| 4 |
+
|
| 5 |
+
jobs:
|
| 6 |
+
legacy:
|
| 7 |
+
runs-on: ubuntu-latest
|
| 8 |
+
|
| 9 |
+
strategy:
|
| 10 |
+
matrix:
|
| 11 |
+
node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x]
|
| 12 |
+
|
| 13 |
+
steps:
|
| 14 |
+
- uses: actions/checkout@v3
|
| 15 |
+
with:
|
| 16 |
+
persist-credentials: false
|
| 17 |
+
|
| 18 |
+
- name: Use Node.js
|
| 19 |
+
uses: actions/setup-node@v1
|
| 20 |
+
with:
|
| 21 |
+
node-version: ${{ matrix.node-version }}
|
| 22 |
+
|
| 23 |
+
- name: Install
|
| 24 |
+
run: |
|
| 25 |
+
npm install --production && npm install tape
|
| 26 |
+
|
| 27 |
+
- name: Run tests
|
| 28 |
+
run: |
|
| 29 |
+
npm run legacy
|
| 30 |
+
|
| 31 |
+
test:
|
| 32 |
+
runs-on: ubuntu-latest
|
| 33 |
+
|
| 34 |
+
strategy:
|
| 35 |
+
matrix:
|
| 36 |
+
node-version: [18.x, 20.x, 22.x]
|
| 37 |
+
|
| 38 |
+
steps:
|
| 39 |
+
- uses: actions/checkout@v3
|
| 40 |
+
with:
|
| 41 |
+
persist-credentials: false
|
| 42 |
+
|
| 43 |
+
- name: Use Node.js
|
| 44 |
+
uses: actions/setup-node@v3
|
| 45 |
+
with:
|
| 46 |
+
node-version: ${{ matrix.node-version }}
|
| 47 |
+
|
| 48 |
+
- name: Install
|
| 49 |
+
run: |
|
| 50 |
+
npm install
|
| 51 |
+
|
| 52 |
+
- name: Run tests
|
| 53 |
+
run: |
|
| 54 |
+
npm run test
|
| 55 |
+
|
| 56 |
+
types:
|
| 57 |
+
runs-on: ubuntu-latest
|
| 58 |
+
|
| 59 |
+
steps:
|
| 60 |
+
- uses: actions/checkout@v3
|
| 61 |
+
with:
|
| 62 |
+
persist-credentials: false
|
| 63 |
+
|
| 64 |
+
- name: Use Node.js
|
| 65 |
+
uses: actions/setup-node@v3
|
| 66 |
+
with:
|
| 67 |
+
node-version: 16
|
| 68 |
+
|
| 69 |
+
- name: Install
|
| 70 |
+
run: |
|
| 71 |
+
npm install
|
| 72 |
+
|
| 73 |
+
- name: Run types tests
|
| 74 |
+
run: |
|
| 75 |
+
npm run typescript
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/cache.js
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const path = require('path');
|
| 2 |
+
const fs = require('fs');
|
| 3 |
+
const Keyv = require('keyv');
|
| 4 |
+
const { writeJSON, tryParse } = require('./utils');
|
| 5 |
+
const { del } = require('./del');
|
| 6 |
+
|
| 7 |
+
const cache = {
|
| 8 |
+
/**
|
| 9 |
+
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
|
| 10 |
+
* cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
|
| 11 |
+
* then the cache module directory `./cache` will be used instead
|
| 12 |
+
*
|
| 13 |
+
* @method load
|
| 14 |
+
* @param docId {String} the id of the cache, would also be used as the name of the file cache
|
| 15 |
+
* @param [cacheDir] {String} directory for the cache entry
|
| 16 |
+
*/
|
| 17 |
+
load: function (docId, cacheDir) {
|
| 18 |
+
const me = this;
|
| 19 |
+
me.keyv = new Keyv();
|
| 20 |
+
|
| 21 |
+
me.__visited = {};
|
| 22 |
+
me.__persisted = {};
|
| 23 |
+
|
| 24 |
+
me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);
|
| 25 |
+
|
| 26 |
+
if (fs.existsSync(me._pathToFile)) {
|
| 27 |
+
me._persisted = tryParse(me._pathToFile, {});
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
|
| 31 |
+
get _persisted() {
|
| 32 |
+
return this.__persisted;
|
| 33 |
+
},
|
| 34 |
+
|
| 35 |
+
set _persisted(value) {
|
| 36 |
+
this.__persisted = value;
|
| 37 |
+
},
|
| 38 |
+
|
| 39 |
+
get _visited() {
|
| 40 |
+
return this.__visited;
|
| 41 |
+
},
|
| 42 |
+
|
| 43 |
+
set _visited(value) {
|
| 44 |
+
this.__visited = value;
|
| 45 |
+
},
|
| 46 |
+
|
| 47 |
+
/**
|
| 48 |
+
* Load the cache from the provided file
|
| 49 |
+
* @method loadFile
|
| 50 |
+
* @param {String} pathToFile the path to the file containing the info for the cache
|
| 51 |
+
*/
|
| 52 |
+
loadFile: function (pathToFile) {
|
| 53 |
+
const me = this;
|
| 54 |
+
const dir = path.dirname(pathToFile);
|
| 55 |
+
const fName = path.basename(pathToFile);
|
| 56 |
+
|
| 57 |
+
me.load(fName, dir);
|
| 58 |
+
},
|
| 59 |
+
|
| 60 |
+
/**
|
| 61 |
+
* Returns the entire persisted object
|
| 62 |
+
* @method all
|
| 63 |
+
* @returns {*}
|
| 64 |
+
*/
|
| 65 |
+
all: function () {
|
| 66 |
+
return this._persisted;
|
| 67 |
+
},
|
| 68 |
+
|
| 69 |
+
keys: function () {
|
| 70 |
+
return Object.keys(this._persisted);
|
| 71 |
+
},
|
| 72 |
+
/**
|
| 73 |
+
* sets a key to a given value
|
| 74 |
+
* @method setKey
|
| 75 |
+
* @param key {string} the key to set
|
| 76 |
+
* @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
|
| 77 |
+
*/
|
| 78 |
+
setKey: function (key, value) {
|
| 79 |
+
this._visited[key] = true;
|
| 80 |
+
this._persisted[key] = value;
|
| 81 |
+
},
|
| 82 |
+
/**
|
| 83 |
+
* remove a given key from the cache
|
| 84 |
+
* @method removeKey
|
| 85 |
+
* @param key {String} the key to remove from the object
|
| 86 |
+
*/
|
| 87 |
+
removeKey: function (key) {
|
| 88 |
+
delete this._visited[key]; // esfmt-ignore-line
|
| 89 |
+
delete this._persisted[key]; // esfmt-ignore-line
|
| 90 |
+
},
|
| 91 |
+
/**
|
| 92 |
+
* Return the value of the provided key
|
| 93 |
+
* @method getKey
|
| 94 |
+
* @param key {String} the name of the key to retrieve
|
| 95 |
+
* @returns {*} the value from the key
|
| 96 |
+
*/
|
| 97 |
+
getKey: function (key) {
|
| 98 |
+
this._visited[key] = true;
|
| 99 |
+
return this._persisted[key];
|
| 100 |
+
},
|
| 101 |
+
|
| 102 |
+
/**
|
| 103 |
+
* Remove keys that were not accessed/set since the
|
| 104 |
+
* last time the `prune` method was called.
|
| 105 |
+
* @method _prune
|
| 106 |
+
* @private
|
| 107 |
+
*/
|
| 108 |
+
_prune: function () {
|
| 109 |
+
const me = this;
|
| 110 |
+
const obj = {};
|
| 111 |
+
|
| 112 |
+
const keys = Object.keys(me._visited);
|
| 113 |
+
|
| 114 |
+
// no keys visited for either get or set value
|
| 115 |
+
if (keys.length === 0) {
|
| 116 |
+
return;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
keys.forEach(function (key) {
|
| 120 |
+
obj[key] = me._persisted[key];
|
| 121 |
+
});
|
| 122 |
+
|
| 123 |
+
me._visited = {};
|
| 124 |
+
me._persisted = obj;
|
| 125 |
+
},
|
| 126 |
+
|
| 127 |
+
/**
|
| 128 |
+
* Save the state of the cache identified by the docId to disk
|
| 129 |
+
* as a JSON structure
|
| 130 |
+
* @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
|
| 131 |
+
* @method save
|
| 132 |
+
*/
|
| 133 |
+
save: function (noPrune) {
|
| 134 |
+
const me = this;
|
| 135 |
+
!noPrune && me._prune();
|
| 136 |
+
writeJSON(me._pathToFile, me._persisted);
|
| 137 |
+
},
|
| 138 |
+
|
| 139 |
+
/**
|
| 140 |
+
* remove the file where the cache is persisted
|
| 141 |
+
* @method removeCacheFile
|
| 142 |
+
* @return {Boolean} true or false if the file was successfully deleted
|
| 143 |
+
*/
|
| 144 |
+
removeCacheFile: function () {
|
| 145 |
+
return del(this._pathToFile);
|
| 146 |
+
},
|
| 147 |
+
/**
|
| 148 |
+
* Destroy the file cache and cache content.
|
| 149 |
+
* @method destroy
|
| 150 |
+
*/
|
| 151 |
+
destroy: function () {
|
| 152 |
+
const me = this;
|
| 153 |
+
me._visited = {};
|
| 154 |
+
me._persisted = {};
|
| 155 |
+
|
| 156 |
+
me.removeCacheFile();
|
| 157 |
+
},
|
| 158 |
+
};
|
| 159 |
+
|
| 160 |
+
module.exports = {
|
| 161 |
+
/**
|
| 162 |
+
* Alias for create. Should be considered depreacted. Will be removed in next releases
|
| 163 |
+
*
|
| 164 |
+
* @method load
|
| 165 |
+
* @param docId {String} the id of the cache, would also be used as the name of the file cache
|
| 166 |
+
* @param [cacheDir] {String} directory for the cache entry
|
| 167 |
+
* @returns {cache} cache instance
|
| 168 |
+
*/
|
| 169 |
+
load: function (docId, cacheDir) {
|
| 170 |
+
return this.create(docId, cacheDir);
|
| 171 |
+
},
|
| 172 |
+
|
| 173 |
+
/**
|
| 174 |
+
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
|
| 175 |
+
* cache storage.
|
| 176 |
+
*
|
| 177 |
+
* @method create
|
| 178 |
+
* @param docId {String} the id of the cache, would also be used as the name of the file cache
|
| 179 |
+
* @param [cacheDir] {String} directory for the cache entry
|
| 180 |
+
* @returns {cache} cache instance
|
| 181 |
+
*/
|
| 182 |
+
create: function (docId, cacheDir) {
|
| 183 |
+
const obj = Object.create(cache);
|
| 184 |
+
obj.load(docId, cacheDir);
|
| 185 |
+
return obj;
|
| 186 |
+
},
|
| 187 |
+
|
| 188 |
+
createFromFile: function (filePath) {
|
| 189 |
+
const obj = Object.create(cache);
|
| 190 |
+
obj.loadFile(filePath);
|
| 191 |
+
return obj;
|
| 192 |
+
},
|
| 193 |
+
/**
|
| 194 |
+
* Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
|
| 195 |
+
*
|
| 196 |
+
* @method clearCache
|
| 197 |
+
* @param docId {String} the id of the cache, would also be used as the name of the file cache
|
| 198 |
+
* @param cacheDir {String} the directory where the cache file was written
|
| 199 |
+
* @returns {Boolean} true if the cache folder was deleted. False otherwise
|
| 200 |
+
*/
|
| 201 |
+
clearCacheById: function (docId, cacheDir) {
|
| 202 |
+
const filePath = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);
|
| 203 |
+
return del(filePath);
|
| 204 |
+
},
|
| 205 |
+
/**
|
| 206 |
+
* Remove all cache stored in the cache directory
|
| 207 |
+
* @method clearAll
|
| 208 |
+
* @returns {Boolean} true if the cache folder was deleted. False otherwise
|
| 209 |
+
*/
|
| 210 |
+
clearAll: function (cacheDir) {
|
| 211 |
+
const filePath = cacheDir ? path.resolve(cacheDir) : path.resolve(__dirname, '../.cache/');
|
| 212 |
+
return del(filePath);
|
| 213 |
+
},
|
| 214 |
+
};
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/del.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const fs = require('fs');
|
| 2 |
+
const path = require('path');
|
| 3 |
+
|
| 4 |
+
function del(targetPath) {
|
| 5 |
+
if (!fs.existsSync(targetPath)) {
|
| 6 |
+
return false;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
try {
|
| 10 |
+
if (fs.statSync(targetPath).isDirectory()) {
|
| 11 |
+
// If it's a directory, delete its contents first
|
| 12 |
+
fs.readdirSync(targetPath).forEach(file => {
|
| 13 |
+
const curPath = path.join(targetPath, file);
|
| 14 |
+
|
| 15 |
+
if (fs.statSync(curPath).isFile()) {
|
| 16 |
+
fs.unlinkSync(curPath); // Delete file
|
| 17 |
+
}
|
| 18 |
+
});
|
| 19 |
+
fs.rmdirSync(targetPath); // Delete the now-empty directory
|
| 20 |
+
} else {
|
| 21 |
+
fs.unlinkSync(targetPath); // If it's a file, delete it directly
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
return true;
|
| 25 |
+
} catch (error) {
|
| 26 |
+
console.error(`Error while deleting ${targetPath}: ${error.message}`);
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
module.exports = { del };
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flat-cache/src/utils.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const fs = require('fs');
|
| 2 |
+
const path = require('path');
|
| 3 |
+
const flatted = require('flatted');
|
| 4 |
+
|
| 5 |
+
function tryParse(filePath, defaultValue) {
|
| 6 |
+
let result;
|
| 7 |
+
try {
|
| 8 |
+
result = readJSON(filePath);
|
| 9 |
+
} catch (ex) {
|
| 10 |
+
result = defaultValue;
|
| 11 |
+
}
|
| 12 |
+
return result;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
/**
|
| 16 |
+
* Read json file synchronously using flatted
|
| 17 |
+
*
|
| 18 |
+
* @param {String} filePath Json filepath
|
| 19 |
+
* @returns {*} parse result
|
| 20 |
+
*/
|
| 21 |
+
function readJSON(filePath) {
|
| 22 |
+
return flatted.parse(
|
| 23 |
+
fs.readFileSync(filePath, {
|
| 24 |
+
encoding: 'utf8',
|
| 25 |
+
})
|
| 26 |
+
);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* Write json file synchronously using circular-json
|
| 31 |
+
*
|
| 32 |
+
* @param {String} filePath Json filepath
|
| 33 |
+
* @param {*} data Object to serialize
|
| 34 |
+
*/
|
| 35 |
+
function writeJSON(filePath, data) {
|
| 36 |
+
fs.mkdirSync(path.dirname(filePath), {
|
| 37 |
+
recursive: true,
|
| 38 |
+
});
|
| 39 |
+
fs.writeFileSync(filePath, flatted.stringify(data));
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
module.exports = { tryParse, readJSON, writeJSON };
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/cjs/index.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
/// <reference types="../types/index.d.ts" />
|
| 3 |
+
|
| 4 |
+
// (c) 2020-present Andrea Giammarchi
|
| 5 |
+
|
| 6 |
+
const {parse: $parse, stringify: $stringify} = JSON;
|
| 7 |
+
const {keys} = Object;
|
| 8 |
+
|
| 9 |
+
const Primitive = String; // it could be Number
|
| 10 |
+
const primitive = 'string'; // it could be 'number'
|
| 11 |
+
|
| 12 |
+
const ignore = {};
|
| 13 |
+
const object = 'object';
|
| 14 |
+
|
| 15 |
+
const noop = (_, value) => value;
|
| 16 |
+
|
| 17 |
+
const primitives = value => (
|
| 18 |
+
value instanceof Primitive ? Primitive(value) : value
|
| 19 |
+
);
|
| 20 |
+
|
| 21 |
+
const Primitives = (_, value) => (
|
| 22 |
+
typeof value === primitive ? new Primitive(value) : value
|
| 23 |
+
);
|
| 24 |
+
|
| 25 |
+
const revive = (input, parsed, output, $) => {
|
| 26 |
+
const lazy = [];
|
| 27 |
+
for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
|
| 28 |
+
const k = ke[y];
|
| 29 |
+
const value = output[k];
|
| 30 |
+
if (value instanceof Primitive) {
|
| 31 |
+
const tmp = input[value];
|
| 32 |
+
if (typeof tmp === object && !parsed.has(tmp)) {
|
| 33 |
+
parsed.add(tmp);
|
| 34 |
+
output[k] = ignore;
|
| 35 |
+
lazy.push({k, a: [input, parsed, tmp, $]});
|
| 36 |
+
}
|
| 37 |
+
else
|
| 38 |
+
output[k] = $.call(output, k, tmp);
|
| 39 |
+
}
|
| 40 |
+
else if (output[k] !== ignore)
|
| 41 |
+
output[k] = $.call(output, k, value);
|
| 42 |
+
}
|
| 43 |
+
for (let {length} = lazy, i = 0; i < length; i++) {
|
| 44 |
+
const {k, a} = lazy[i];
|
| 45 |
+
output[k] = $.call(output, k, revive.apply(null, a));
|
| 46 |
+
}
|
| 47 |
+
return output;
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
const set = (known, input, value) => {
|
| 51 |
+
const index = Primitive(input.push(value) - 1);
|
| 52 |
+
known.set(value, index);
|
| 53 |
+
return index;
|
| 54 |
+
};
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* Converts a specialized flatted string into a JS value.
|
| 58 |
+
* @param {string} text
|
| 59 |
+
* @param {(this: any, key: string, value: any) => any} [reviver]
|
| 60 |
+
* @returns {any}
|
| 61 |
+
*/
|
| 62 |
+
const parse = (text, reviver) => {
|
| 63 |
+
const input = $parse(text, Primitives).map(primitives);
|
| 64 |
+
const value = input[0];
|
| 65 |
+
const $ = reviver || noop;
|
| 66 |
+
const tmp = typeof value === object && value ?
|
| 67 |
+
revive(input, new Set, value, $) :
|
| 68 |
+
value;
|
| 69 |
+
return $.call({'': tmp}, '', tmp);
|
| 70 |
+
};
|
| 71 |
+
exports.parse = parse;
|
| 72 |
+
|
| 73 |
+
/**
|
| 74 |
+
* Converts a JS value into a specialized flatted string.
|
| 75 |
+
* @param {any} value
|
| 76 |
+
* @param {((this: any, key: string, value: any) => any) | (string | number)[] | null | undefined} [replacer]
|
| 77 |
+
* @param {string | number | undefined} [space]
|
| 78 |
+
* @returns {string}
|
| 79 |
+
*/
|
| 80 |
+
const stringify = (value, replacer, space) => {
|
| 81 |
+
const $ = replacer && typeof replacer === object ?
|
| 82 |
+
(k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) :
|
| 83 |
+
(replacer || noop);
|
| 84 |
+
const known = new Map;
|
| 85 |
+
const input = [];
|
| 86 |
+
const output = [];
|
| 87 |
+
let i = +set(known, input, $.call({'': value}, '', value));
|
| 88 |
+
let firstRun = !i;
|
| 89 |
+
while (i < input.length) {
|
| 90 |
+
firstRun = true;
|
| 91 |
+
output[i] = $stringify(input[i++], replace, space);
|
| 92 |
+
}
|
| 93 |
+
return '[' + output.join(',') + ']';
|
| 94 |
+
function replace(key, value) {
|
| 95 |
+
if (firstRun) {
|
| 96 |
+
firstRun = !firstRun;
|
| 97 |
+
return value;
|
| 98 |
+
}
|
| 99 |
+
const after = $.call(this, key, value);
|
| 100 |
+
switch (typeof after) {
|
| 101 |
+
case object:
|
| 102 |
+
if (after === null) return after;
|
| 103 |
+
case primitive:
|
| 104 |
+
return known.get(after) || set(known, input, after);
|
| 105 |
+
}
|
| 106 |
+
return after;
|
| 107 |
+
}
|
| 108 |
+
};
|
| 109 |
+
exports.stringify = stringify;
|
| 110 |
+
|
| 111 |
+
/**
|
| 112 |
+
* Converts a generic value into a JSON serializable object without losing recursion.
|
| 113 |
+
* @param {any} value
|
| 114 |
+
* @returns {any}
|
| 115 |
+
*/
|
| 116 |
+
const toJSON = value => $parse(stringify(value));
|
| 117 |
+
exports.toJSON = toJSON;
|
| 118 |
+
|
| 119 |
+
/**
|
| 120 |
+
* Converts a previously serialized object with recursion into a recursive one.
|
| 121 |
+
* @param {any} value
|
| 122 |
+
* @returns {any}
|
| 123 |
+
*/
|
| 124 |
+
const fromJSON = value => parse($stringify(value));
|
| 125 |
+
exports.fromJSON = fromJSON;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"type":"commonjs"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/esm/index.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="../types/index.d.ts" />
|
| 2 |
+
|
| 3 |
+
// (c) 2020-present Andrea Giammarchi
|
| 4 |
+
|
| 5 |
+
const {parse: $parse, stringify: $stringify} = JSON;
|
| 6 |
+
const {keys} = Object;
|
| 7 |
+
|
| 8 |
+
const Primitive = String; // it could be Number
|
| 9 |
+
const primitive = 'string'; // it could be 'number'
|
| 10 |
+
|
| 11 |
+
const ignore = {};
|
| 12 |
+
const object = 'object';
|
| 13 |
+
|
| 14 |
+
const noop = (_, value) => value;
|
| 15 |
+
|
| 16 |
+
const primitives = value => (
|
| 17 |
+
value instanceof Primitive ? Primitive(value) : value
|
| 18 |
+
);
|
| 19 |
+
|
| 20 |
+
const Primitives = (_, value) => (
|
| 21 |
+
typeof value === primitive ? new Primitive(value) : value
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
const revive = (input, parsed, output, $) => {
|
| 25 |
+
const lazy = [];
|
| 26 |
+
for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
|
| 27 |
+
const k = ke[y];
|
| 28 |
+
const value = output[k];
|
| 29 |
+
if (value instanceof Primitive) {
|
| 30 |
+
const tmp = input[value];
|
| 31 |
+
if (typeof tmp === object && !parsed.has(tmp)) {
|
| 32 |
+
parsed.add(tmp);
|
| 33 |
+
output[k] = ignore;
|
| 34 |
+
lazy.push({k, a: [input, parsed, tmp, $]});
|
| 35 |
+
}
|
| 36 |
+
else
|
| 37 |
+
output[k] = $.call(output, k, tmp);
|
| 38 |
+
}
|
| 39 |
+
else if (output[k] !== ignore)
|
| 40 |
+
output[k] = $.call(output, k, value);
|
| 41 |
+
}
|
| 42 |
+
for (let {length} = lazy, i = 0; i < length; i++) {
|
| 43 |
+
const {k, a} = lazy[i];
|
| 44 |
+
output[k] = $.call(output, k, revive.apply(null, a));
|
| 45 |
+
}
|
| 46 |
+
return output;
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
const set = (known, input, value) => {
|
| 50 |
+
const index = Primitive(input.push(value) - 1);
|
| 51 |
+
known.set(value, index);
|
| 52 |
+
return index;
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* Converts a specialized flatted string into a JS value.
|
| 57 |
+
* @param {string} text
|
| 58 |
+
* @param {(this: any, key: string, value: any) => any} [reviver]
|
| 59 |
+
* @returns {any}
|
| 60 |
+
*/
|
| 61 |
+
export const parse = (text, reviver) => {
|
| 62 |
+
const input = $parse(text, Primitives).map(primitives);
|
| 63 |
+
const value = input[0];
|
| 64 |
+
const $ = reviver || noop;
|
| 65 |
+
const tmp = typeof value === object && value ?
|
| 66 |
+
revive(input, new Set, value, $) :
|
| 67 |
+
value;
|
| 68 |
+
return $.call({'': tmp}, '', tmp);
|
| 69 |
+
};
|
| 70 |
+
|
| 71 |
+
/**
|
| 72 |
+
* Converts a JS value into a specialized flatted string.
|
| 73 |
+
* @param {any} value
|
| 74 |
+
* @param {((this: any, key: string, value: any) => any) | (string | number)[] | null | undefined} [replacer]
|
| 75 |
+
* @param {string | number | undefined} [space]
|
| 76 |
+
* @returns {string}
|
| 77 |
+
*/
|
| 78 |
+
export const stringify = (value, replacer, space) => {
|
| 79 |
+
const $ = replacer && typeof replacer === object ?
|
| 80 |
+
(k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) :
|
| 81 |
+
(replacer || noop);
|
| 82 |
+
const known = new Map;
|
| 83 |
+
const input = [];
|
| 84 |
+
const output = [];
|
| 85 |
+
let i = +set(known, input, $.call({'': value}, '', value));
|
| 86 |
+
let firstRun = !i;
|
| 87 |
+
while (i < input.length) {
|
| 88 |
+
firstRun = true;
|
| 89 |
+
output[i] = $stringify(input[i++], replace, space);
|
| 90 |
+
}
|
| 91 |
+
return '[' + output.join(',') + ']';
|
| 92 |
+
function replace(key, value) {
|
| 93 |
+
if (firstRun) {
|
| 94 |
+
firstRun = !firstRun;
|
| 95 |
+
return value;
|
| 96 |
+
}
|
| 97 |
+
const after = $.call(this, key, value);
|
| 98 |
+
switch (typeof after) {
|
| 99 |
+
case object:
|
| 100 |
+
if (after === null) return after;
|
| 101 |
+
case primitive:
|
| 102 |
+
return known.get(after) || set(known, input, after);
|
| 103 |
+
}
|
| 104 |
+
return after;
|
| 105 |
+
}
|
| 106 |
+
};
|
| 107 |
+
|
| 108 |
+
/**
|
| 109 |
+
* Converts a generic value into a JSON serializable object without losing recursion.
|
| 110 |
+
* @param {any} value
|
| 111 |
+
* @returns {any}
|
| 112 |
+
*/
|
| 113 |
+
export const toJSON = value => $parse(stringify(value));
|
| 114 |
+
|
| 115 |
+
/**
|
| 116 |
+
* Converts a previously serialized object with recursion into a recursive one.
|
| 117 |
+
* @param {any} value
|
| 118 |
+
* @returns {any}
|
| 119 |
+
*/
|
| 120 |
+
export const fromJSON = value => parse($stringify(value));
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/php/flatted.php
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/*!
|
| 4 |
+
* ISC License
|
| 5 |
+
*
|
| 6 |
+
* Copyright (c) 2018-2021, Andrea Giammarchi, @WebReflection
|
| 7 |
+
*
|
| 8 |
+
* Permission to use, copy, modify, and/or distribute this software for any
|
| 9 |
+
* purpose with or without fee is hereby granted, provided that the above
|
| 10 |
+
* copyright notice and this permission notice appear in all copies.
|
| 11 |
+
*
|
| 12 |
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 13 |
+
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 14 |
+
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 15 |
+
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
| 16 |
+
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
| 17 |
+
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
| 18 |
+
* PERFORMANCE OF THIS SOFTWARE.
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
class FlattedString {
|
| 22 |
+
public $value = '';
|
| 23 |
+
public function __construct($value) {
|
| 24 |
+
$this->value = $value;
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
class Flatted {
|
| 29 |
+
|
| 30 |
+
// public utilities
|
| 31 |
+
public static function parse($json, $assoc = false, $depth = 512, $options = 0) {
|
| 32 |
+
$input = array_map(
|
| 33 |
+
'Flatted::asString',
|
| 34 |
+
array_map(
|
| 35 |
+
'Flatted::wrap',
|
| 36 |
+
json_decode($json, $assoc, $depth, $options)
|
| 37 |
+
)
|
| 38 |
+
);
|
| 39 |
+
$value = &$input[0];
|
| 40 |
+
$set = array();
|
| 41 |
+
$set[] = &$value;
|
| 42 |
+
if (is_array($value))
|
| 43 |
+
return Flatted::loop(false, array_keys($value), $input, $set, $value);
|
| 44 |
+
if (is_object($value))
|
| 45 |
+
return Flatted::loop(true, Flatted::keys($value), $input, $set, $value);
|
| 46 |
+
return $value;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
public static function stringify($value, $options = 0, $depth = 512) {
|
| 50 |
+
$known = new stdClass;
|
| 51 |
+
$known->key = array();
|
| 52 |
+
$known->value = array();
|
| 53 |
+
$input = array();
|
| 54 |
+
$output = array();
|
| 55 |
+
$i = intval(Flatted::index($known, $input, $value));
|
| 56 |
+
while ($i < count($input)) {
|
| 57 |
+
$output[$i] = Flatted::transform($known, $input, $input[$i]);
|
| 58 |
+
$i++;
|
| 59 |
+
}
|
| 60 |
+
return json_encode($output, $options, $depth);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
// private helpers
|
| 64 |
+
private static function asString($value) {
|
| 65 |
+
return $value instanceof FlattedString ? $value->value : $value;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
private static function index(&$known, &$input, &$value) {
|
| 69 |
+
$input[] = &$value;
|
| 70 |
+
$index = strval(count($input) - 1);
|
| 71 |
+
$known->key[] = &$value;
|
| 72 |
+
$known->value[] = &$index;
|
| 73 |
+
return $index;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
private static function keys(&$value) {
|
| 77 |
+
$obj = new ReflectionObject($value);
|
| 78 |
+
$props = $obj->getProperties();
|
| 79 |
+
$keys = array();
|
| 80 |
+
foreach ($props as $prop)
|
| 81 |
+
$keys[] = $prop->getName();
|
| 82 |
+
return $keys;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
private static function loop($obj, $keys, &$input, &$set, &$output) {
|
| 86 |
+
foreach ($keys as $key) {
|
| 87 |
+
$value = $obj ? $output->$key : $output[$key];
|
| 88 |
+
if ($value instanceof FlattedString)
|
| 89 |
+
Flatted::ref($obj, $key, $input[$value->value], $input, $set, $output);
|
| 90 |
+
}
|
| 91 |
+
return $output;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
private static function relate(&$known, &$input, &$value) {
|
| 95 |
+
if (is_string($value) || is_array($value) || is_object($value)) {
|
| 96 |
+
$key = array_search($value, $known->key, true);
|
| 97 |
+
if ($key !== false)
|
| 98 |
+
return $known->value[$key];
|
| 99 |
+
return Flatted::index($known, $input, $value);
|
| 100 |
+
}
|
| 101 |
+
return $value;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
private static function ref($obj, &$key, &$value, &$input, &$set, &$output) {
|
| 105 |
+
if (is_array($value) && !in_array($value, $set, true)) {
|
| 106 |
+
$set[] = $value;
|
| 107 |
+
$value = Flatted::loop(false, array_keys($value), $input, $set, $value);
|
| 108 |
+
}
|
| 109 |
+
elseif (is_object($value) && !in_array($value, $set, true)) {
|
| 110 |
+
$set[] = $value;
|
| 111 |
+
$value = Flatted::loop(true, Flatted::keys($value), $input, $set, $value);
|
| 112 |
+
}
|
| 113 |
+
if ($obj) {
|
| 114 |
+
$output->$key = &$value;
|
| 115 |
+
}
|
| 116 |
+
else {
|
| 117 |
+
$output[$key] = &$value;
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
private static function transform(&$known, &$input, &$value) {
|
| 122 |
+
if (is_array($value)) {
|
| 123 |
+
return array_map(
|
| 124 |
+
function ($value) use(&$known, &$input) {
|
| 125 |
+
return Flatted::relate($known, $input, $value);
|
| 126 |
+
},
|
| 127 |
+
$value
|
| 128 |
+
);
|
| 129 |
+
}
|
| 130 |
+
if (is_object($value)) {
|
| 131 |
+
$object = new stdClass;
|
| 132 |
+
$keys = Flatted::keys($value);
|
| 133 |
+
foreach ($keys as $key)
|
| 134 |
+
$object->$key = Flatted::relate($known, $input, $value->$key);
|
| 135 |
+
return $object;
|
| 136 |
+
}
|
| 137 |
+
return $value;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
private static function wrap($value) {
|
| 141 |
+
if (is_string($value)) {
|
| 142 |
+
return new FlattedString($value);
|
| 143 |
+
}
|
| 144 |
+
if (is_array($value)) {
|
| 145 |
+
return array_map('Flatted::wrap', $value);
|
| 146 |
+
}
|
| 147 |
+
if (is_object($value)) {
|
| 148 |
+
$keys = Flatted::keys($value);
|
| 149 |
+
foreach ($keys as $key) {
|
| 150 |
+
$value->$key = self::wrap($value->$key);
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
return $value;
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
?>
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/python/flatted.py
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ISC License
|
| 2 |
+
#
|
| 3 |
+
# Copyright (c) 2018-2025, Andrea Giammarchi, @WebReflection
|
| 4 |
+
#
|
| 5 |
+
# Permission to use, copy, modify, and/or distribute this software for any
|
| 6 |
+
# purpose with or without fee is hereby granted, provided that the above
|
| 7 |
+
# copyright notice and this permission notice appear in all copies.
|
| 8 |
+
#
|
| 9 |
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 10 |
+
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 11 |
+
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 12 |
+
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
| 13 |
+
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
| 14 |
+
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
| 15 |
+
# PERFORMANCE OF THIS SOFTWARE.
|
| 16 |
+
|
| 17 |
+
import json as _json
|
| 18 |
+
|
| 19 |
+
class _Known:
|
| 20 |
+
def __init__(self):
|
| 21 |
+
self.key = []
|
| 22 |
+
self.value = []
|
| 23 |
+
|
| 24 |
+
class _String:
|
| 25 |
+
def __init__(self, value):
|
| 26 |
+
self.value = value
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def _array_keys(value):
|
| 30 |
+
keys = []
|
| 31 |
+
i = 0
|
| 32 |
+
for _ in value:
|
| 33 |
+
keys.append(i)
|
| 34 |
+
i += 1
|
| 35 |
+
return keys
|
| 36 |
+
|
| 37 |
+
def _object_keys(value):
|
| 38 |
+
keys = []
|
| 39 |
+
for key in value:
|
| 40 |
+
keys.append(key)
|
| 41 |
+
return keys
|
| 42 |
+
|
| 43 |
+
def _is_array(value):
|
| 44 |
+
return isinstance(value, (list, tuple))
|
| 45 |
+
|
| 46 |
+
def _is_object(value):
|
| 47 |
+
return isinstance(value, dict)
|
| 48 |
+
|
| 49 |
+
def _is_string(value):
|
| 50 |
+
return isinstance(value, str)
|
| 51 |
+
|
| 52 |
+
def _index(known, input, value):
|
| 53 |
+
input.append(value)
|
| 54 |
+
index = str(len(input) - 1)
|
| 55 |
+
known.key.append(value)
|
| 56 |
+
known.value.append(index)
|
| 57 |
+
return index
|
| 58 |
+
|
| 59 |
+
def _loop(keys, input, known, output):
|
| 60 |
+
for key in keys:
|
| 61 |
+
value = output[key]
|
| 62 |
+
if isinstance(value, _String):
|
| 63 |
+
_ref(key, input[int(value.value)], input, known, output)
|
| 64 |
+
|
| 65 |
+
return output
|
| 66 |
+
|
| 67 |
+
def _ref(key, value, input, known, output):
|
| 68 |
+
if _is_array(value) and value not in known:
|
| 69 |
+
known.append(value)
|
| 70 |
+
value = _loop(_array_keys(value), input, known, value)
|
| 71 |
+
elif _is_object(value) and value not in known:
|
| 72 |
+
known.append(value)
|
| 73 |
+
value = _loop(_object_keys(value), input, known, value)
|
| 74 |
+
|
| 75 |
+
output[key] = value
|
| 76 |
+
|
| 77 |
+
def _relate(known, input, value):
|
| 78 |
+
if _is_string(value) or _is_array(value) or _is_object(value):
|
| 79 |
+
try:
|
| 80 |
+
return known.value[known.key.index(value)]
|
| 81 |
+
except:
|
| 82 |
+
return _index(known, input, value)
|
| 83 |
+
|
| 84 |
+
return value
|
| 85 |
+
|
| 86 |
+
def _transform(known, input, value):
|
| 87 |
+
if _is_array(value):
|
| 88 |
+
output = []
|
| 89 |
+
for val in value:
|
| 90 |
+
output.append(_relate(known, input, val))
|
| 91 |
+
return output
|
| 92 |
+
|
| 93 |
+
if _is_object(value):
|
| 94 |
+
obj = {}
|
| 95 |
+
for key in value:
|
| 96 |
+
obj[key] = _relate(known, input, value[key])
|
| 97 |
+
return obj
|
| 98 |
+
|
| 99 |
+
return value
|
| 100 |
+
|
| 101 |
+
def _wrap(value):
|
| 102 |
+
if _is_string(value):
|
| 103 |
+
return _String(value)
|
| 104 |
+
|
| 105 |
+
if _is_array(value):
|
| 106 |
+
i = 0
|
| 107 |
+
for val in value:
|
| 108 |
+
value[i] = _wrap(val)
|
| 109 |
+
i += 1
|
| 110 |
+
|
| 111 |
+
elif _is_object(value):
|
| 112 |
+
for key in value:
|
| 113 |
+
value[key] = _wrap(value[key])
|
| 114 |
+
|
| 115 |
+
return value
|
| 116 |
+
|
| 117 |
+
def parse(value, *args, **kwargs):
|
| 118 |
+
json = _json.loads(value, *args, **kwargs)
|
| 119 |
+
wrapped = []
|
| 120 |
+
for value in json:
|
| 121 |
+
wrapped.append(_wrap(value))
|
| 122 |
+
|
| 123 |
+
input = []
|
| 124 |
+
for value in wrapped:
|
| 125 |
+
if isinstance(value, _String):
|
| 126 |
+
input.append(value.value)
|
| 127 |
+
else:
|
| 128 |
+
input.append(value)
|
| 129 |
+
|
| 130 |
+
value = input[0]
|
| 131 |
+
|
| 132 |
+
if _is_array(value):
|
| 133 |
+
return _loop(_array_keys(value), input, [value], value)
|
| 134 |
+
|
| 135 |
+
if _is_object(value):
|
| 136 |
+
return _loop(_object_keys(value), input, [value], value)
|
| 137 |
+
|
| 138 |
+
return value
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
def stringify(value, *args, **kwargs):
|
| 142 |
+
known = _Known()
|
| 143 |
+
input = []
|
| 144 |
+
output = []
|
| 145 |
+
i = int(_index(known, input, value))
|
| 146 |
+
while i < len(input):
|
| 147 |
+
output.append(_transform(known, input, input[i]))
|
| 148 |
+
i += 1
|
| 149 |
+
return _json.dumps(output, *args, **kwargs)
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/flatted/types/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
| 2 |
+
export function stringify(value: any, replacer?: (string | number)[] | ((this: any, key: string, value: any) => any), space?: string | number | undefined): string;
|
| 3 |
+
export function toJSON(value: any): any;
|
| 4 |
+
export function fromJSON(value: any): any;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/gensync/test/.babelrc
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
presets: [
|
| 3 |
+
["env", { targets: { node: "current" }}],
|
| 4 |
+
],
|
| 5 |
+
}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/gensync/test/index.test.js
ADDED
|
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
const promisify = require("util.promisify");
|
| 4 |
+
const gensync = require("../");
|
| 5 |
+
|
| 6 |
+
const TEST_ERROR = new Error("TEST_ERROR");
|
| 7 |
+
|
| 8 |
+
const DID_ERROR = new Error("DID_ERROR");
|
| 9 |
+
|
| 10 |
+
const doSuccess = gensync({
|
| 11 |
+
sync: () => 42,
|
| 12 |
+
async: () => Promise.resolve(42),
|
| 13 |
+
});
|
| 14 |
+
|
| 15 |
+
const doError = gensync({
|
| 16 |
+
sync: () => {
|
| 17 |
+
throw DID_ERROR;
|
| 18 |
+
},
|
| 19 |
+
async: () => Promise.reject(DID_ERROR),
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
function throwTestError() {
|
| 23 |
+
throw TEST_ERROR;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
async function expectResult(
|
| 27 |
+
fn,
|
| 28 |
+
arg,
|
| 29 |
+
{ error, value, expectSync = false, syncErrback = expectSync }
|
| 30 |
+
) {
|
| 31 |
+
if (!expectSync) {
|
| 32 |
+
expect(() => fn.sync(arg)).toThrow(TEST_ERROR);
|
| 33 |
+
} else if (error) {
|
| 34 |
+
expect(() => fn.sync(arg)).toThrow(error);
|
| 35 |
+
} else {
|
| 36 |
+
expect(fn.sync(arg)).toBe(value);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
if (error) {
|
| 40 |
+
await expect(fn.async(arg)).rejects.toBe(error);
|
| 41 |
+
} else {
|
| 42 |
+
await expect(fn.async(arg)).resolves.toBe(value);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
await new Promise((resolve, reject) => {
|
| 46 |
+
let sync = true;
|
| 47 |
+
fn.errback(arg, (err, val) => {
|
| 48 |
+
try {
|
| 49 |
+
expect(err).toBe(error);
|
| 50 |
+
expect(val).toBe(value);
|
| 51 |
+
expect(sync).toBe(syncErrback);
|
| 52 |
+
|
| 53 |
+
resolve();
|
| 54 |
+
} catch (e) {
|
| 55 |
+
reject(e);
|
| 56 |
+
}
|
| 57 |
+
});
|
| 58 |
+
sync = false;
|
| 59 |
+
});
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
describe("gensync({})", () => {
|
| 63 |
+
describe("option validation", () => {
|
| 64 |
+
test("disallow async and errback handler together", () => {
|
| 65 |
+
try {
|
| 66 |
+
gensync({
|
| 67 |
+
sync: throwTestError,
|
| 68 |
+
async: throwTestError,
|
| 69 |
+
errback: throwTestError,
|
| 70 |
+
});
|
| 71 |
+
|
| 72 |
+
throwTestError();
|
| 73 |
+
} catch (err) {
|
| 74 |
+
expect(err.message).toMatch(
|
| 75 |
+
/Expected one of either opts.async or opts.errback, but got _both_\./
|
| 76 |
+
);
|
| 77 |
+
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
|
| 78 |
+
}
|
| 79 |
+
});
|
| 80 |
+
|
| 81 |
+
test("disallow missing sync handler", () => {
|
| 82 |
+
try {
|
| 83 |
+
gensync({
|
| 84 |
+
async: throwTestError,
|
| 85 |
+
});
|
| 86 |
+
|
| 87 |
+
throwTestError();
|
| 88 |
+
} catch (err) {
|
| 89 |
+
expect(err.message).toMatch(/Expected opts.sync to be a function./);
|
| 90 |
+
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
|
| 91 |
+
}
|
| 92 |
+
});
|
| 93 |
+
|
| 94 |
+
test("errback callback required", () => {
|
| 95 |
+
const fn = gensync({
|
| 96 |
+
sync: throwTestError,
|
| 97 |
+
async: throwTestError,
|
| 98 |
+
});
|
| 99 |
+
|
| 100 |
+
try {
|
| 101 |
+
fn.errback();
|
| 102 |
+
|
| 103 |
+
throwTestError();
|
| 104 |
+
} catch (err) {
|
| 105 |
+
expect(err.message).toMatch(/function called without callback/);
|
| 106 |
+
expect(err.code).toBe("GENSYNC_ERRBACK_NO_CALLBACK");
|
| 107 |
+
}
|
| 108 |
+
});
|
| 109 |
+
});
|
| 110 |
+
|
| 111 |
+
describe("generator function metadata", () => {
|
| 112 |
+
test("automatic naming", () => {
|
| 113 |
+
expect(
|
| 114 |
+
gensync({
|
| 115 |
+
sync: function readFileSync() {},
|
| 116 |
+
async: () => {},
|
| 117 |
+
}).name
|
| 118 |
+
).toBe("readFile");
|
| 119 |
+
expect(
|
| 120 |
+
gensync({
|
| 121 |
+
sync: function readFile() {},
|
| 122 |
+
async: () => {},
|
| 123 |
+
}).name
|
| 124 |
+
).toBe("readFile");
|
| 125 |
+
expect(
|
| 126 |
+
gensync({
|
| 127 |
+
sync: function readFileAsync() {},
|
| 128 |
+
async: () => {},
|
| 129 |
+
}).name
|
| 130 |
+
).toBe("readFileAsync");
|
| 131 |
+
|
| 132 |
+
expect(
|
| 133 |
+
gensync({
|
| 134 |
+
sync: () => {},
|
| 135 |
+
async: function readFileSync() {},
|
| 136 |
+
}).name
|
| 137 |
+
).toBe("readFileSync");
|
| 138 |
+
expect(
|
| 139 |
+
gensync({
|
| 140 |
+
sync: () => {},
|
| 141 |
+
async: function readFile() {},
|
| 142 |
+
}).name
|
| 143 |
+
).toBe("readFile");
|
| 144 |
+
expect(
|
| 145 |
+
gensync({
|
| 146 |
+
sync: () => {},
|
| 147 |
+
async: function readFileAsync() {},
|
| 148 |
+
}).name
|
| 149 |
+
).toBe("readFile");
|
| 150 |
+
|
| 151 |
+
expect(
|
| 152 |
+
gensync({
|
| 153 |
+
sync: () => {},
|
| 154 |
+
errback: function readFileSync() {},
|
| 155 |
+
}).name
|
| 156 |
+
).toBe("readFileSync");
|
| 157 |
+
expect(
|
| 158 |
+
gensync({
|
| 159 |
+
sync: () => {},
|
| 160 |
+
errback: function readFile() {},
|
| 161 |
+
}).name
|
| 162 |
+
).toBe("readFile");
|
| 163 |
+
expect(
|
| 164 |
+
gensync({
|
| 165 |
+
sync: () => {},
|
| 166 |
+
errback: function readFileAsync() {},
|
| 167 |
+
}).name
|
| 168 |
+
).toBe("readFileAsync");
|
| 169 |
+
});
|
| 170 |
+
|
| 171 |
+
test("explicit naming", () => {
|
| 172 |
+
expect(
|
| 173 |
+
gensync({
|
| 174 |
+
name: "readFile",
|
| 175 |
+
sync: () => {},
|
| 176 |
+
async: () => {},
|
| 177 |
+
}).name
|
| 178 |
+
).toBe("readFile");
|
| 179 |
+
});
|
| 180 |
+
|
| 181 |
+
test("default arity", () => {
|
| 182 |
+
expect(
|
| 183 |
+
gensync({
|
| 184 |
+
sync: function(a, b, c, d, e, f, g) {
|
| 185 |
+
throwTestError();
|
| 186 |
+
},
|
| 187 |
+
async: throwTestError,
|
| 188 |
+
}).length
|
| 189 |
+
).toBe(7);
|
| 190 |
+
});
|
| 191 |
+
|
| 192 |
+
test("explicit arity", () => {
|
| 193 |
+
expect(
|
| 194 |
+
gensync({
|
| 195 |
+
arity: 3,
|
| 196 |
+
sync: throwTestError,
|
| 197 |
+
async: throwTestError,
|
| 198 |
+
}).length
|
| 199 |
+
).toBe(3);
|
| 200 |
+
});
|
| 201 |
+
});
|
| 202 |
+
|
| 203 |
+
describe("'sync' handler", async () => {
|
| 204 |
+
test("success", async () => {
|
| 205 |
+
const fn = gensync({
|
| 206 |
+
sync: (...args) => JSON.stringify(args),
|
| 207 |
+
});
|
| 208 |
+
|
| 209 |
+
await expectResult(fn, 42, { value: "[42]", expectSync: true });
|
| 210 |
+
});
|
| 211 |
+
|
| 212 |
+
test("failure", async () => {
|
| 213 |
+
const fn = gensync({
|
| 214 |
+
sync: (...args) => {
|
| 215 |
+
throw JSON.stringify(args);
|
| 216 |
+
},
|
| 217 |
+
});
|
| 218 |
+
|
| 219 |
+
await expectResult(fn, 42, { error: "[42]", expectSync: true });
|
| 220 |
+
});
|
| 221 |
+
});
|
| 222 |
+
|
| 223 |
+
describe("'async' handler", async () => {
|
| 224 |
+
test("success", async () => {
|
| 225 |
+
const fn = gensync({
|
| 226 |
+
sync: throwTestError,
|
| 227 |
+
async: (...args) => Promise.resolve(JSON.stringify(args)),
|
| 228 |
+
});
|
| 229 |
+
|
| 230 |
+
await expectResult(fn, 42, { value: "[42]" });
|
| 231 |
+
});
|
| 232 |
+
|
| 233 |
+
test("failure", async () => {
|
| 234 |
+
const fn = gensync({
|
| 235 |
+
sync: throwTestError,
|
| 236 |
+
async: (...args) => Promise.reject(JSON.stringify(args)),
|
| 237 |
+
});
|
| 238 |
+
|
| 239 |
+
await expectResult(fn, 42, { error: "[42]" });
|
| 240 |
+
});
|
| 241 |
+
});
|
| 242 |
+
|
| 243 |
+
describe("'errback' sync handler", async () => {
|
| 244 |
+
test("success", async () => {
|
| 245 |
+
const fn = gensync({
|
| 246 |
+
sync: throwTestError,
|
| 247 |
+
errback: (...args) => args.pop()(null, JSON.stringify(args)),
|
| 248 |
+
});
|
| 249 |
+
|
| 250 |
+
await expectResult(fn, 42, { value: "[42]", syncErrback: true });
|
| 251 |
+
});
|
| 252 |
+
|
| 253 |
+
test("failure", async () => {
|
| 254 |
+
const fn = gensync({
|
| 255 |
+
sync: throwTestError,
|
| 256 |
+
errback: (...args) => args.pop()(JSON.stringify(args)),
|
| 257 |
+
});
|
| 258 |
+
|
| 259 |
+
await expectResult(fn, 42, { error: "[42]", syncErrback: true });
|
| 260 |
+
});
|
| 261 |
+
});
|
| 262 |
+
|
| 263 |
+
describe("'errback' async handler", async () => {
|
| 264 |
+
test("success", async () => {
|
| 265 |
+
const fn = gensync({
|
| 266 |
+
sync: throwTestError,
|
| 267 |
+
errback: (...args) =>
|
| 268 |
+
process.nextTick(() => args.pop()(null, JSON.stringify(args))),
|
| 269 |
+
});
|
| 270 |
+
|
| 271 |
+
await expectResult(fn, 42, { value: "[42]" });
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
test("failure", async () => {
|
| 275 |
+
const fn = gensync({
|
| 276 |
+
sync: throwTestError,
|
| 277 |
+
errback: (...args) =>
|
| 278 |
+
process.nextTick(() => args.pop()(JSON.stringify(args))),
|
| 279 |
+
});
|
| 280 |
+
|
| 281 |
+
await expectResult(fn, 42, { error: "[42]" });
|
| 282 |
+
});
|
| 283 |
+
});
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
+
describe("gensync(function* () {})", () => {
|
| 287 |
+
test("sync throw before body", async () => {
|
| 288 |
+
const fn = gensync(function*(arg = throwTestError()) {});
|
| 289 |
+
|
| 290 |
+
await expectResult(fn, undefined, {
|
| 291 |
+
error: TEST_ERROR,
|
| 292 |
+
syncErrback: true,
|
| 293 |
+
});
|
| 294 |
+
});
|
| 295 |
+
|
| 296 |
+
test("sync throw inside body", async () => {
|
| 297 |
+
const fn = gensync(function*() {
|
| 298 |
+
throwTestError();
|
| 299 |
+
});
|
| 300 |
+
|
| 301 |
+
await expectResult(fn, undefined, {
|
| 302 |
+
error: TEST_ERROR,
|
| 303 |
+
syncErrback: true,
|
| 304 |
+
});
|
| 305 |
+
});
|
| 306 |
+
|
| 307 |
+
test("async throw inside body", async () => {
|
| 308 |
+
const fn = gensync(function*() {
|
| 309 |
+
const val = yield* doSuccess();
|
| 310 |
+
throwTestError();
|
| 311 |
+
});
|
| 312 |
+
|
| 313 |
+
await expectResult(fn, undefined, {
|
| 314 |
+
error: TEST_ERROR,
|
| 315 |
+
});
|
| 316 |
+
});
|
| 317 |
+
|
| 318 |
+
test("error inside body", async () => {
|
| 319 |
+
const fn = gensync(function*() {
|
| 320 |
+
yield* doError();
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
await expectResult(fn, undefined, {
|
| 324 |
+
error: DID_ERROR,
|
| 325 |
+
expectSync: true,
|
| 326 |
+
syncErrback: false,
|
| 327 |
+
});
|
| 328 |
+
});
|
| 329 |
+
|
| 330 |
+
test("successful return value", async () => {
|
| 331 |
+
const fn = gensync(function*() {
|
| 332 |
+
const value = yield* doSuccess();
|
| 333 |
+
|
| 334 |
+
expect(value).toBe(42);
|
| 335 |
+
|
| 336 |
+
return 84;
|
| 337 |
+
});
|
| 338 |
+
|
| 339 |
+
await expectResult(fn, undefined, {
|
| 340 |
+
value: 84,
|
| 341 |
+
expectSync: true,
|
| 342 |
+
syncErrback: false,
|
| 343 |
+
});
|
| 344 |
+
});
|
| 345 |
+
|
| 346 |
+
test("successful final value", async () => {
|
| 347 |
+
const fn = gensync(function*() {
|
| 348 |
+
return 42;
|
| 349 |
+
});
|
| 350 |
+
|
| 351 |
+
await expectResult(fn, undefined, {
|
| 352 |
+
value: 42,
|
| 353 |
+
expectSync: true,
|
| 354 |
+
});
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
test("yield unexpected object", async () => {
|
| 358 |
+
const fn = gensync(function*() {
|
| 359 |
+
yield {};
|
| 360 |
+
});
|
| 361 |
+
|
| 362 |
+
try {
|
| 363 |
+
await fn.async();
|
| 364 |
+
|
| 365 |
+
throwTestError();
|
| 366 |
+
} catch (err) {
|
| 367 |
+
expect(err.message).toMatch(
|
| 368 |
+
/Got unexpected yielded value in gensync generator/
|
| 369 |
+
);
|
| 370 |
+
expect(err.code).toBe("GENSYNC_EXPECTED_START");
|
| 371 |
+
}
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
test("yield suspend yield", async () => {
|
| 375 |
+
const fn = gensync(function*() {
|
| 376 |
+
yield Symbol.for("gensync:v1:start");
|
| 377 |
+
|
| 378 |
+
// Should be "yield*" for no error.
|
| 379 |
+
yield {};
|
| 380 |
+
});
|
| 381 |
+
|
| 382 |
+
try {
|
| 383 |
+
await fn.async();
|
| 384 |
+
|
| 385 |
+
throwTestError();
|
| 386 |
+
} catch (err) {
|
| 387 |
+
expect(err.message).toMatch(/Expected GENSYNC_SUSPEND, got {}/);
|
| 388 |
+
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
|
| 389 |
+
}
|
| 390 |
+
});
|
| 391 |
+
|
| 392 |
+
test("yield suspend return", async () => {
|
| 393 |
+
const fn = gensync(function*() {
|
| 394 |
+
yield Symbol.for("gensync:v1:start");
|
| 395 |
+
|
| 396 |
+
// Should be "yield*" for no error.
|
| 397 |
+
return {};
|
| 398 |
+
});
|
| 399 |
+
|
| 400 |
+
try {
|
| 401 |
+
await fn.async();
|
| 402 |
+
|
| 403 |
+
throwTestError();
|
| 404 |
+
} catch (err) {
|
| 405 |
+
expect(err.message).toMatch(/Unexpected generator completion/);
|
| 406 |
+
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
|
| 407 |
+
}
|
| 408 |
+
});
|
| 409 |
+
});
|
| 410 |
+
|
| 411 |
+
describe("gensync.all()", () => {
|
| 412 |
+
test("success", async () => {
|
| 413 |
+
const fn = gensync(function*() {
|
| 414 |
+
const result = yield* gensync.all([doSuccess(), doSuccess()]);
|
| 415 |
+
|
| 416 |
+
expect(result).toEqual([42, 42]);
|
| 417 |
+
});
|
| 418 |
+
|
| 419 |
+
await expectResult(fn, undefined, {
|
| 420 |
+
value: undefined,
|
| 421 |
+
expectSync: true,
|
| 422 |
+
syncErrback: false,
|
| 423 |
+
});
|
| 424 |
+
});
|
| 425 |
+
|
| 426 |
+
test("error first", async () => {
|
| 427 |
+
const fn = gensync(function*() {
|
| 428 |
+
yield* gensync.all([doError(), doSuccess()]);
|
| 429 |
+
});
|
| 430 |
+
|
| 431 |
+
await expectResult(fn, undefined, {
|
| 432 |
+
error: DID_ERROR,
|
| 433 |
+
expectSync: true,
|
| 434 |
+
syncErrback: false,
|
| 435 |
+
});
|
| 436 |
+
});
|
| 437 |
+
|
| 438 |
+
test("error last", async () => {
|
| 439 |
+
const fn = gensync(function*() {
|
| 440 |
+
yield* gensync.all([doSuccess(), doError()]);
|
| 441 |
+
});
|
| 442 |
+
|
| 443 |
+
await expectResult(fn, undefined, {
|
| 444 |
+
error: DID_ERROR,
|
| 445 |
+
expectSync: true,
|
| 446 |
+
syncErrback: false,
|
| 447 |
+
});
|
| 448 |
+
});
|
| 449 |
+
|
| 450 |
+
test("empty list", async () => {
|
| 451 |
+
const fn = gensync(function*() {
|
| 452 |
+
yield* gensync.all([]);
|
| 453 |
+
});
|
| 454 |
+
|
| 455 |
+
await expectResult(fn, undefined, {
|
| 456 |
+
value: undefined,
|
| 457 |
+
expectSync: true,
|
| 458 |
+
syncErrback: false,
|
| 459 |
+
});
|
| 460 |
+
});
|
| 461 |
+
});
|
| 462 |
+
|
| 463 |
+
describe("gensync.race()", () => {
|
| 464 |
+
test("success", async () => {
|
| 465 |
+
const fn = gensync(function*() {
|
| 466 |
+
const result = yield* gensync.race([doSuccess(), doError()]);
|
| 467 |
+
|
| 468 |
+
expect(result).toEqual(42);
|
| 469 |
+
});
|
| 470 |
+
|
| 471 |
+
await expectResult(fn, undefined, {
|
| 472 |
+
value: undefined,
|
| 473 |
+
expectSync: true,
|
| 474 |
+
syncErrback: false,
|
| 475 |
+
});
|
| 476 |
+
});
|
| 477 |
+
|
| 478 |
+
test("error", async () => {
|
| 479 |
+
const fn = gensync(function*() {
|
| 480 |
+
yield* gensync.race([doError(), doSuccess()]);
|
| 481 |
+
});
|
| 482 |
+
|
| 483 |
+
await expectResult(fn, undefined, {
|
| 484 |
+
error: DID_ERROR,
|
| 485 |
+
expectSync: true,
|
| 486 |
+
syncErrback: false,
|
| 487 |
+
});
|
| 488 |
+
});
|
| 489 |
+
});
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es2015/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const setNonce: (nonce: string) => void;
|
| 2 |
+
export declare const getNonce: () => string | undefined;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es2015/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var currentNonce;
|
| 2 |
+
export var setNonce = function (nonce) {
|
| 3 |
+
currentNonce = nonce;
|
| 4 |
+
};
|
| 5 |
+
export var getNonce = function () {
|
| 6 |
+
if (currentNonce) {
|
| 7 |
+
return currentNonce;
|
| 8 |
+
}
|
| 9 |
+
if (typeof __webpack_nonce__ !== 'undefined') {
|
| 10 |
+
return __webpack_nonce__;
|
| 11 |
+
}
|
| 12 |
+
return undefined;
|
| 13 |
+
};
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es5/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const setNonce: (nonce: string) => void;
|
| 2 |
+
export declare const getNonce: () => string | undefined;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/get-nonce/dist/es5/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
var currentNonce;
|
| 4 |
+
exports.setNonce = function (nonce) {
|
| 5 |
+
currentNonce = nonce;
|
| 6 |
+
};
|
| 7 |
+
exports.getNonce = function () {
|
| 8 |
+
if (currentNonce) {
|
| 9 |
+
return currentNonce;
|
| 10 |
+
}
|
| 11 |
+
if (typeof __webpack_nonce__ !== 'undefined') {
|
| 12 |
+
return __webpack_nonce__;
|
| 13 |
+
}
|
| 14 |
+
return undefined;
|
| 15 |
+
};
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import GraphemerIterator from './GraphemerIterator';
|
| 2 |
+
export default class Graphemer {
|
| 3 |
+
/**
|
| 4 |
+
* Returns the next grapheme break in the string after the given index
|
| 5 |
+
* @param string {string}
|
| 6 |
+
* @param index {number}
|
| 7 |
+
* @returns {number}
|
| 8 |
+
*/
|
| 9 |
+
static nextBreak(string: string, index: number): number;
|
| 10 |
+
/**
|
| 11 |
+
* Breaks the given string into an array of grapheme clusters
|
| 12 |
+
* @param str {string}
|
| 13 |
+
* @returns {string[]}
|
| 14 |
+
*/
|
| 15 |
+
splitGraphemes(str: string): string[];
|
| 16 |
+
/**
|
| 17 |
+
* Returns an iterator of grapheme clusters in the given string
|
| 18 |
+
* @param str {string}
|
| 19 |
+
* @returns {GraphemerIterator}
|
| 20 |
+
*/
|
| 21 |
+
iterateGraphemes(str: string): GraphemerIterator;
|
| 22 |
+
/**
|
| 23 |
+
* Returns the number of grapheme clusters in the given string
|
| 24 |
+
* @param str {string}
|
| 25 |
+
* @returns {number}
|
| 26 |
+
*/
|
| 27 |
+
countGraphemes(str: string): number;
|
| 28 |
+
/**
|
| 29 |
+
* Given a Unicode code point, determines this symbol's grapheme break property
|
| 30 |
+
* @param code {number} Unicode code point
|
| 31 |
+
* @returns {number}
|
| 32 |
+
*/
|
| 33 |
+
static getGraphemeBreakProperty(code: number): number;
|
| 34 |
+
/**
|
| 35 |
+
* Given a Unicode code point, returns if symbol is an extended pictographic or some other break
|
| 36 |
+
* @param code {number} Unicode code point
|
| 37 |
+
* @returns {number}
|
| 38 |
+
*/
|
| 39 |
+
static getEmojiProperty(code: number): number;
|
| 40 |
+
}
|
| 41 |
+
//# sourceMappingURL=Graphemer.d.ts.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"Graphemer.d.ts","sourceRoot":"","sources":["../src/Graphemer.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IA2CvD;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAcrC;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAIhD;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAcnC;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAoySrD;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CA47B9C"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/Graphemer.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare class GraphemerHelper {
|
| 2 |
+
/**
|
| 3 |
+
* Check if the the character at the position {pos} of the string is surrogate
|
| 4 |
+
* @param str {string}
|
| 5 |
+
* @param pos {number}
|
| 6 |
+
* @returns {boolean}
|
| 7 |
+
*/
|
| 8 |
+
static isSurrogate(str: string, pos: number): boolean;
|
| 9 |
+
/**
|
| 10 |
+
* The String.prototype.codePointAt polyfill
|
| 11 |
+
* Private function, gets a Unicode code point from a JavaScript UTF-16 string
|
| 12 |
+
* handling surrogate pairs appropriately
|
| 13 |
+
* @param str {string}
|
| 14 |
+
* @param idx {number}
|
| 15 |
+
* @returns {number}
|
| 16 |
+
*/
|
| 17 |
+
static codePointAt(str: string, idx: number): number;
|
| 18 |
+
/**
|
| 19 |
+
* Private function, returns whether a break is allowed between the two given grapheme breaking classes
|
| 20 |
+
* Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters
|
| 21 |
+
* @param start {number}
|
| 22 |
+
* @param mid {Array<number>}
|
| 23 |
+
* @param end {number}
|
| 24 |
+
* @param startEmoji {number}
|
| 25 |
+
* @param midEmoji {Array<number>}
|
| 26 |
+
* @param endEmoji {number}
|
| 27 |
+
* @returns {number}
|
| 28 |
+
*/
|
| 29 |
+
static shouldBreak(start: number, mid: number[], end: number, startEmoji: number, midEmoji: number[], endEmoji: number): number;
|
| 30 |
+
}
|
| 31 |
+
export default GraphemerHelper;
|
| 32 |
+
//# sourceMappingURL=GraphemerHelper.d.ts.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"GraphemerHelper.d.ts","sourceRoot":"","sources":["../src/GraphemerHelper.ts"],"names":[],"mappings":"AAUA,cAAM,eAAe;IACnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IASrD;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAgCpD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,CAChB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EAAE,EACb,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,GACf,MAAM;CAyHV;AAED,eAAe,eAAe,CAAC"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerHelper.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
const boundaries_1 = require("./boundaries");
|
| 4 |
+
// BreakTypes
|
| 5 |
+
// @type {BreakType}
|
| 6 |
+
const NotBreak = 0;
|
| 7 |
+
const BreakStart = 1;
|
| 8 |
+
const Break = 2;
|
| 9 |
+
const BreakLastRegional = 3;
|
| 10 |
+
const BreakPenultimateRegional = 4;
|
| 11 |
+
class GraphemerHelper {
|
| 12 |
+
/**
|
| 13 |
+
* Check if the the character at the position {pos} of the string is surrogate
|
| 14 |
+
* @param str {string}
|
| 15 |
+
* @param pos {number}
|
| 16 |
+
* @returns {boolean}
|
| 17 |
+
*/
|
| 18 |
+
static isSurrogate(str, pos) {
|
| 19 |
+
return (0xd800 <= str.charCodeAt(pos) &&
|
| 20 |
+
str.charCodeAt(pos) <= 0xdbff &&
|
| 21 |
+
0xdc00 <= str.charCodeAt(pos + 1) &&
|
| 22 |
+
str.charCodeAt(pos + 1) <= 0xdfff);
|
| 23 |
+
}
|
| 24 |
+
/**
|
| 25 |
+
* The String.prototype.codePointAt polyfill
|
| 26 |
+
* Private function, gets a Unicode code point from a JavaScript UTF-16 string
|
| 27 |
+
* handling surrogate pairs appropriately
|
| 28 |
+
* @param str {string}
|
| 29 |
+
* @param idx {number}
|
| 30 |
+
* @returns {number}
|
| 31 |
+
*/
|
| 32 |
+
static codePointAt(str, idx) {
|
| 33 |
+
if (idx === undefined) {
|
| 34 |
+
idx = 0;
|
| 35 |
+
}
|
| 36 |
+
const code = str.charCodeAt(idx);
|
| 37 |
+
// if a high surrogate
|
| 38 |
+
if (0xd800 <= code && code <= 0xdbff && idx < str.length - 1) {
|
| 39 |
+
const hi = code;
|
| 40 |
+
const low = str.charCodeAt(idx + 1);
|
| 41 |
+
if (0xdc00 <= low && low <= 0xdfff) {
|
| 42 |
+
return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;
|
| 43 |
+
}
|
| 44 |
+
return hi;
|
| 45 |
+
}
|
| 46 |
+
// if a low surrogate
|
| 47 |
+
if (0xdc00 <= code && code <= 0xdfff && idx >= 1) {
|
| 48 |
+
const hi = str.charCodeAt(idx - 1);
|
| 49 |
+
const low = code;
|
| 50 |
+
if (0xd800 <= hi && hi <= 0xdbff) {
|
| 51 |
+
return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;
|
| 52 |
+
}
|
| 53 |
+
return low;
|
| 54 |
+
}
|
| 55 |
+
// just return the char if an unmatched surrogate half or a
|
| 56 |
+
// single-char codepoint
|
| 57 |
+
return code;
|
| 58 |
+
}
|
| 59 |
+
//
|
| 60 |
+
/**
|
| 61 |
+
* Private function, returns whether a break is allowed between the two given grapheme breaking classes
|
| 62 |
+
* Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters
|
| 63 |
+
* @param start {number}
|
| 64 |
+
* @param mid {Array<number>}
|
| 65 |
+
* @param end {number}
|
| 66 |
+
* @param startEmoji {number}
|
| 67 |
+
* @param midEmoji {Array<number>}
|
| 68 |
+
* @param endEmoji {number}
|
| 69 |
+
* @returns {number}
|
| 70 |
+
*/
|
| 71 |
+
static shouldBreak(start, mid, end, startEmoji, midEmoji, endEmoji) {
|
| 72 |
+
const all = [start].concat(mid).concat([end]);
|
| 73 |
+
const allEmoji = [startEmoji].concat(midEmoji).concat([endEmoji]);
|
| 74 |
+
const previous = all[all.length - 2];
|
| 75 |
+
const next = end;
|
| 76 |
+
const nextEmoji = endEmoji;
|
| 77 |
+
// Lookahead terminator for:
|
| 78 |
+
// GB12. ^ (RI RI)* RI ? RI
|
| 79 |
+
// GB13. [^RI] (RI RI)* RI ? RI
|
| 80 |
+
const rIIndex = all.lastIndexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR);
|
| 81 |
+
if (rIIndex > 0 &&
|
| 82 |
+
all.slice(1, rIIndex).every(function (c) {
|
| 83 |
+
return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;
|
| 84 |
+
}) &&
|
| 85 |
+
[boundaries_1.CLUSTER_BREAK.PREPEND, boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(previous) === -1) {
|
| 86 |
+
if (all.filter(function (c) {
|
| 87 |
+
return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;
|
| 88 |
+
}).length %
|
| 89 |
+
2 ===
|
| 90 |
+
1) {
|
| 91 |
+
return BreakLastRegional;
|
| 92 |
+
}
|
| 93 |
+
else {
|
| 94 |
+
return BreakPenultimateRegional;
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
// GB3. CR × LF
|
| 98 |
+
if (previous === boundaries_1.CLUSTER_BREAK.CR && next === boundaries_1.CLUSTER_BREAK.LF) {
|
| 99 |
+
return NotBreak;
|
| 100 |
+
}
|
| 101 |
+
// GB4. (Control|CR|LF) ÷
|
| 102 |
+
else if (previous === boundaries_1.CLUSTER_BREAK.CONTROL ||
|
| 103 |
+
previous === boundaries_1.CLUSTER_BREAK.CR ||
|
| 104 |
+
previous === boundaries_1.CLUSTER_BREAK.LF) {
|
| 105 |
+
return BreakStart;
|
| 106 |
+
}
|
| 107 |
+
// GB5. ÷ (Control|CR|LF)
|
| 108 |
+
else if (next === boundaries_1.CLUSTER_BREAK.CONTROL ||
|
| 109 |
+
next === boundaries_1.CLUSTER_BREAK.CR ||
|
| 110 |
+
next === boundaries_1.CLUSTER_BREAK.LF) {
|
| 111 |
+
return BreakStart;
|
| 112 |
+
}
|
| 113 |
+
// GB6. L × (L|V|LV|LVT)
|
| 114 |
+
else if (previous === boundaries_1.CLUSTER_BREAK.L &&
|
| 115 |
+
(next === boundaries_1.CLUSTER_BREAK.L ||
|
| 116 |
+
next === boundaries_1.CLUSTER_BREAK.V ||
|
| 117 |
+
next === boundaries_1.CLUSTER_BREAK.LV ||
|
| 118 |
+
next === boundaries_1.CLUSTER_BREAK.LVT)) {
|
| 119 |
+
return NotBreak;
|
| 120 |
+
}
|
| 121 |
+
// GB7. (LV|V) × (V|T)
|
| 122 |
+
else if ((previous === boundaries_1.CLUSTER_BREAK.LV || previous === boundaries_1.CLUSTER_BREAK.V) &&
|
| 123 |
+
(next === boundaries_1.CLUSTER_BREAK.V || next === boundaries_1.CLUSTER_BREAK.T)) {
|
| 124 |
+
return NotBreak;
|
| 125 |
+
}
|
| 126 |
+
// GB8. (LVT|T) × (T)
|
| 127 |
+
else if ((previous === boundaries_1.CLUSTER_BREAK.LVT || previous === boundaries_1.CLUSTER_BREAK.T) &&
|
| 128 |
+
next === boundaries_1.CLUSTER_BREAK.T) {
|
| 129 |
+
return NotBreak;
|
| 130 |
+
}
|
| 131 |
+
// GB9. × (Extend|ZWJ)
|
| 132 |
+
else if (next === boundaries_1.CLUSTER_BREAK.EXTEND || next === boundaries_1.CLUSTER_BREAK.ZWJ) {
|
| 133 |
+
return NotBreak;
|
| 134 |
+
}
|
| 135 |
+
// GB9a. × SpacingMark
|
| 136 |
+
else if (next === boundaries_1.CLUSTER_BREAK.SPACINGMARK) {
|
| 137 |
+
return NotBreak;
|
| 138 |
+
}
|
| 139 |
+
// GB9b. Prepend ×
|
| 140 |
+
else if (previous === boundaries_1.CLUSTER_BREAK.PREPEND) {
|
| 141 |
+
return NotBreak;
|
| 142 |
+
}
|
| 143 |
+
// GB11. \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
|
| 144 |
+
const previousNonExtendIndex = allEmoji
|
| 145 |
+
.slice(0, -1)
|
| 146 |
+
.lastIndexOf(boundaries_1.EXTENDED_PICTOGRAPHIC);
|
| 147 |
+
if (previousNonExtendIndex !== -1 &&
|
| 148 |
+
allEmoji[previousNonExtendIndex] === boundaries_1.EXTENDED_PICTOGRAPHIC &&
|
| 149 |
+
all.slice(previousNonExtendIndex + 1, -2).every(function (c) {
|
| 150 |
+
return c === boundaries_1.CLUSTER_BREAK.EXTEND;
|
| 151 |
+
}) &&
|
| 152 |
+
previous === boundaries_1.CLUSTER_BREAK.ZWJ &&
|
| 153 |
+
nextEmoji === boundaries_1.EXTENDED_PICTOGRAPHIC) {
|
| 154 |
+
return NotBreak;
|
| 155 |
+
}
|
| 156 |
+
// GB12. ^ (RI RI)* RI × RI
|
| 157 |
+
// GB13. [^RI] (RI RI)* RI × RI
|
| 158 |
+
if (mid.indexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) !== -1) {
|
| 159 |
+
return Break;
|
| 160 |
+
}
|
| 161 |
+
if (previous === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR &&
|
| 162 |
+
next === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) {
|
| 163 |
+
return NotBreak;
|
| 164 |
+
}
|
| 165 |
+
// GB999. Any ? Any
|
| 166 |
+
return BreakStart;
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
exports.default = GraphemerHelper;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* GraphemerIterator
|
| 3 |
+
*
|
| 4 |
+
* Takes a string and a "BreakHandler" method during initialisation
|
| 5 |
+
* and creates an iterable object that returns individual graphemes.
|
| 6 |
+
*
|
| 7 |
+
* @param str {string}
|
| 8 |
+
* @return GraphemerIterator
|
| 9 |
+
*/
|
| 10 |
+
declare class GraphemerIterator implements Iterator<string> {
|
| 11 |
+
private _index;
|
| 12 |
+
private _str;
|
| 13 |
+
private _nextBreak;
|
| 14 |
+
constructor(str: string, nextBreak: (str: string, index: number) => number);
|
| 15 |
+
[Symbol.iterator](): this;
|
| 16 |
+
next(): {
|
| 17 |
+
value: string;
|
| 18 |
+
done: boolean;
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
export default GraphemerIterator;
|
| 22 |
+
//# sourceMappingURL=GraphemerIterator.d.ts.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"GraphemerIterator.d.ts","sourceRoot":"","sources":["../src/GraphemerIterator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAM,iBAAkB,YAAW,QAAQ,CAAC,MAAM,CAAC;IACjD,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,UAAU,CAAyC;gBAE/C,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM;IAK1E,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB,IAAI;;;;CAcL;AAED,eAAe,iBAAiB,CAAC"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/GraphemerIterator.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
/**
|
| 4 |
+
* GraphemerIterator
|
| 5 |
+
*
|
| 6 |
+
* Takes a string and a "BreakHandler" method during initialisation
|
| 7 |
+
* and creates an iterable object that returns individual graphemes.
|
| 8 |
+
*
|
| 9 |
+
* @param str {string}
|
| 10 |
+
* @return GraphemerIterator
|
| 11 |
+
*/
|
| 12 |
+
class GraphemerIterator {
|
| 13 |
+
constructor(str, nextBreak) {
|
| 14 |
+
this._index = 0;
|
| 15 |
+
this._str = str;
|
| 16 |
+
this._nextBreak = nextBreak;
|
| 17 |
+
}
|
| 18 |
+
[Symbol.iterator]() {
|
| 19 |
+
return this;
|
| 20 |
+
}
|
| 21 |
+
next() {
|
| 22 |
+
let brk;
|
| 23 |
+
if ((brk = this._nextBreak(this._str, this._index)) < this._str.length) {
|
| 24 |
+
const value = this._str.slice(this._index, brk);
|
| 25 |
+
this._index = brk;
|
| 26 |
+
return { value: value, done: false };
|
| 27 |
+
}
|
| 28 |
+
if (this._index < this._str.length) {
|
| 29 |
+
const value = this._str.slice(this._index);
|
| 30 |
+
this._index = this._str.length;
|
| 31 |
+
return { value: value, done: false };
|
| 32 |
+
}
|
| 33 |
+
return { value: undefined, done: true };
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
exports.default = GraphemerIterator;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* The Grapheme_Cluster_Break property value
|
| 3 |
+
* @see https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table
|
| 4 |
+
*/
|
| 5 |
+
export declare enum CLUSTER_BREAK {
|
| 6 |
+
CR = 0,
|
| 7 |
+
LF = 1,
|
| 8 |
+
CONTROL = 2,
|
| 9 |
+
EXTEND = 3,
|
| 10 |
+
REGIONAL_INDICATOR = 4,
|
| 11 |
+
SPACINGMARK = 5,
|
| 12 |
+
L = 6,
|
| 13 |
+
V = 7,
|
| 14 |
+
T = 8,
|
| 15 |
+
LV = 9,
|
| 16 |
+
LVT = 10,
|
| 17 |
+
OTHER = 11,
|
| 18 |
+
PREPEND = 12,
|
| 19 |
+
E_BASE = 13,
|
| 20 |
+
E_MODIFIER = 14,
|
| 21 |
+
ZWJ = 15,
|
| 22 |
+
GLUE_AFTER_ZWJ = 16,
|
| 23 |
+
E_BASE_GAZ = 17
|
| 24 |
+
}
|
| 25 |
+
/**
|
| 26 |
+
* The Emoji character property is an extension of UCD but shares the same namespace and structure
|
| 27 |
+
* @see http://www.unicode.org/reports/tr51/tr51-14.html#Emoji_Properties_and_Data_Files
|
| 28 |
+
*
|
| 29 |
+
* Here we model Extended_Pictograhpic only to implement UAX #29 GB11
|
| 30 |
+
* \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
|
| 31 |
+
*
|
| 32 |
+
* The Emoji character property should not be mixed with Grapheme_Cluster_Break since they are not exclusive
|
| 33 |
+
*/
|
| 34 |
+
export declare const EXTENDED_PICTOGRAPHIC = 101;
|
| 35 |
+
//# sourceMappingURL=boundaries.d.ts.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../src/boundaries.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,aAAa;IACvB,EAAE,IAAI;IACN,EAAE,IAAI;IACN,OAAO,IAAI;IACX,MAAM,IAAI;IACV,kBAAkB,IAAI;IACtB,WAAW,IAAI;IACf,CAAC,IAAI;IACL,CAAC,IAAI;IACL,CAAC,IAAI;IACL,EAAE,IAAI;IACN,GAAG,KAAK;IACR,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,UAAU,KAAK;IACf,GAAG,KAAK;IACR,cAAc,KAAK;IACnB,UAAU,KAAK;CAChB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/boundaries.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
/**
|
| 3 |
+
* The Grapheme_Cluster_Break property value
|
| 4 |
+
* @see https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table
|
| 5 |
+
*/
|
| 6 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 7 |
+
exports.EXTENDED_PICTOGRAPHIC = exports.CLUSTER_BREAK = void 0;
|
| 8 |
+
var CLUSTER_BREAK;
|
| 9 |
+
(function (CLUSTER_BREAK) {
|
| 10 |
+
CLUSTER_BREAK[CLUSTER_BREAK["CR"] = 0] = "CR";
|
| 11 |
+
CLUSTER_BREAK[CLUSTER_BREAK["LF"] = 1] = "LF";
|
| 12 |
+
CLUSTER_BREAK[CLUSTER_BREAK["CONTROL"] = 2] = "CONTROL";
|
| 13 |
+
CLUSTER_BREAK[CLUSTER_BREAK["EXTEND"] = 3] = "EXTEND";
|
| 14 |
+
CLUSTER_BREAK[CLUSTER_BREAK["REGIONAL_INDICATOR"] = 4] = "REGIONAL_INDICATOR";
|
| 15 |
+
CLUSTER_BREAK[CLUSTER_BREAK["SPACINGMARK"] = 5] = "SPACINGMARK";
|
| 16 |
+
CLUSTER_BREAK[CLUSTER_BREAK["L"] = 6] = "L";
|
| 17 |
+
CLUSTER_BREAK[CLUSTER_BREAK["V"] = 7] = "V";
|
| 18 |
+
CLUSTER_BREAK[CLUSTER_BREAK["T"] = 8] = "T";
|
| 19 |
+
CLUSTER_BREAK[CLUSTER_BREAK["LV"] = 9] = "LV";
|
| 20 |
+
CLUSTER_BREAK[CLUSTER_BREAK["LVT"] = 10] = "LVT";
|
| 21 |
+
CLUSTER_BREAK[CLUSTER_BREAK["OTHER"] = 11] = "OTHER";
|
| 22 |
+
CLUSTER_BREAK[CLUSTER_BREAK["PREPEND"] = 12] = "PREPEND";
|
| 23 |
+
CLUSTER_BREAK[CLUSTER_BREAK["E_BASE"] = 13] = "E_BASE";
|
| 24 |
+
CLUSTER_BREAK[CLUSTER_BREAK["E_MODIFIER"] = 14] = "E_MODIFIER";
|
| 25 |
+
CLUSTER_BREAK[CLUSTER_BREAK["ZWJ"] = 15] = "ZWJ";
|
| 26 |
+
CLUSTER_BREAK[CLUSTER_BREAK["GLUE_AFTER_ZWJ"] = 16] = "GLUE_AFTER_ZWJ";
|
| 27 |
+
CLUSTER_BREAK[CLUSTER_BREAK["E_BASE_GAZ"] = 17] = "E_BASE_GAZ";
|
| 28 |
+
})(CLUSTER_BREAK = exports.CLUSTER_BREAK || (exports.CLUSTER_BREAK = {}));
|
| 29 |
+
/**
|
| 30 |
+
* The Emoji character property is an extension of UCD but shares the same namespace and structure
|
| 31 |
+
* @see http://www.unicode.org/reports/tr51/tr51-14.html#Emoji_Properties_and_Data_Files
|
| 32 |
+
*
|
| 33 |
+
* Here we model Extended_Pictograhpic only to implement UAX #29 GB11
|
| 34 |
+
* \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
|
| 35 |
+
*
|
| 36 |
+
* The Emoji character property should not be mixed with Grapheme_Cluster_Break since they are not exclusive
|
| 37 |
+
*/
|
| 38 |
+
exports.EXTENDED_PICTOGRAPHIC = 101;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Graphemer from './Graphemer';
|
| 2 |
+
export default Graphemer;
|
| 3 |
+
//# sourceMappingURL=index.d.ts.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,eAAe,SAAS,CAAC"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/graphemer/lib/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
| 3 |
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
| 4 |
+
};
|
| 5 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 6 |
+
const Graphemer_1 = __importDefault(require("./Graphemer"));
|
| 7 |
+
exports.default = Graphemer_1.default;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
var reactIs = require('react-is');
|
| 4 |
+
|
| 5 |
+
/**
|
| 6 |
+
* Copyright 2015, Yahoo! Inc.
|
| 7 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
| 8 |
+
*/
|
| 9 |
+
var REACT_STATICS = {
|
| 10 |
+
childContextTypes: true,
|
| 11 |
+
contextType: true,
|
| 12 |
+
contextTypes: true,
|
| 13 |
+
defaultProps: true,
|
| 14 |
+
displayName: true,
|
| 15 |
+
getDefaultProps: true,
|
| 16 |
+
getDerivedStateFromError: true,
|
| 17 |
+
getDerivedStateFromProps: true,
|
| 18 |
+
mixins: true,
|
| 19 |
+
propTypes: true,
|
| 20 |
+
type: true
|
| 21 |
+
};
|
| 22 |
+
var KNOWN_STATICS = {
|
| 23 |
+
name: true,
|
| 24 |
+
length: true,
|
| 25 |
+
prototype: true,
|
| 26 |
+
caller: true,
|
| 27 |
+
callee: true,
|
| 28 |
+
arguments: true,
|
| 29 |
+
arity: true
|
| 30 |
+
};
|
| 31 |
+
var FORWARD_REF_STATICS = {
|
| 32 |
+
'$$typeof': true,
|
| 33 |
+
render: true,
|
| 34 |
+
defaultProps: true,
|
| 35 |
+
displayName: true,
|
| 36 |
+
propTypes: true
|
| 37 |
+
};
|
| 38 |
+
var MEMO_STATICS = {
|
| 39 |
+
'$$typeof': true,
|
| 40 |
+
compare: true,
|
| 41 |
+
defaultProps: true,
|
| 42 |
+
displayName: true,
|
| 43 |
+
propTypes: true,
|
| 44 |
+
type: true
|
| 45 |
+
};
|
| 46 |
+
var TYPE_STATICS = {};
|
| 47 |
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
| 48 |
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
| 49 |
+
|
| 50 |
+
function getStatics(component) {
|
| 51 |
+
// React v16.11 and below
|
| 52 |
+
if (reactIs.isMemo(component)) {
|
| 53 |
+
return MEMO_STATICS;
|
| 54 |
+
} // React v16.12 and above
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
var defineProperty = Object.defineProperty;
|
| 61 |
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
| 62 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
| 63 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
| 64 |
+
var getPrototypeOf = Object.getPrototypeOf;
|
| 65 |
+
var objectPrototype = Object.prototype;
|
| 66 |
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
| 67 |
+
if (typeof sourceComponent !== 'string') {
|
| 68 |
+
// don't hoist over string (html) components
|
| 69 |
+
if (objectPrototype) {
|
| 70 |
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
| 71 |
+
|
| 72 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
| 73 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
var keys = getOwnPropertyNames(sourceComponent);
|
| 78 |
+
|
| 79 |
+
if (getOwnPropertySymbols) {
|
| 80 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
var targetStatics = getStatics(targetComponent);
|
| 84 |
+
var sourceStatics = getStatics(sourceComponent);
|
| 85 |
+
|
| 86 |
+
for (var i = 0; i < keys.length; ++i) {
|
| 87 |
+
var key = keys[i];
|
| 88 |
+
|
| 89 |
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
| 90 |
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
| 91 |
+
|
| 92 |
+
try {
|
| 93 |
+
// Avoid failures from read-only properties
|
| 94 |
+
defineProperty(targetComponent, key, descriptor);
|
| 95 |
+
} catch (e) {}
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
return targetComponent;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
module.exports = hoistNonReactStatics;
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.js
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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&& typeof module !== 'undefined' ? module.exports = factory() :
|
| 3 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
| 4 |
+
(global = global || self, global.hoistNonReactStatics = factory());
|
| 5 |
+
}(this, (function () { 'use strict';
|
| 6 |
+
|
| 7 |
+
function unwrapExports (x) {
|
| 8 |
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
function createCommonjsModule(fn, module) {
|
| 12 |
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
var reactIs_production_min = createCommonjsModule(function (module, exports) {
|
| 16 |
+
Object.defineProperty(exports,"__esModule",{value:!0});
|
| 17 |
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
|
| 18 |
+
60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function z(a){return y(a)===m}
|
| 19 |
+
exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
|
| 20 |
+
exports.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
|
| 21 |
+
exports.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
|
| 22 |
+
});
|
| 23 |
+
|
| 24 |
+
unwrapExports(reactIs_production_min);
|
| 25 |
+
var reactIs_production_min_1 = reactIs_production_min.typeOf;
|
| 26 |
+
var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
|
| 27 |
+
var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
|
| 28 |
+
var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
|
| 29 |
+
var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
|
| 30 |
+
var reactIs_production_min_6 = reactIs_production_min.Element;
|
| 31 |
+
var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
|
| 32 |
+
var reactIs_production_min_8 = reactIs_production_min.Fragment;
|
| 33 |
+
var reactIs_production_min_9 = reactIs_production_min.Lazy;
|
| 34 |
+
var reactIs_production_min_10 = reactIs_production_min.Memo;
|
| 35 |
+
var reactIs_production_min_11 = reactIs_production_min.Portal;
|
| 36 |
+
var reactIs_production_min_12 = reactIs_production_min.Profiler;
|
| 37 |
+
var reactIs_production_min_13 = reactIs_production_min.StrictMode;
|
| 38 |
+
var reactIs_production_min_14 = reactIs_production_min.Suspense;
|
| 39 |
+
var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
|
| 40 |
+
var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
|
| 41 |
+
var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
|
| 42 |
+
var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
|
| 43 |
+
var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
|
| 44 |
+
var reactIs_production_min_20 = reactIs_production_min.isElement;
|
| 45 |
+
var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
|
| 46 |
+
var reactIs_production_min_22 = reactIs_production_min.isFragment;
|
| 47 |
+
var reactIs_production_min_23 = reactIs_production_min.isLazy;
|
| 48 |
+
var reactIs_production_min_24 = reactIs_production_min.isMemo;
|
| 49 |
+
var reactIs_production_min_25 = reactIs_production_min.isPortal;
|
| 50 |
+
var reactIs_production_min_26 = reactIs_production_min.isProfiler;
|
| 51 |
+
var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
|
| 52 |
+
var reactIs_production_min_28 = reactIs_production_min.isSuspense;
|
| 53 |
+
|
| 54 |
+
var reactIs_development = createCommonjsModule(function (module, exports) {
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
if (process.env.NODE_ENV !== "production") {
|
| 59 |
+
(function() {
|
| 60 |
+
|
| 61 |
+
Object.defineProperty(exports, '__esModule', { value: true });
|
| 62 |
+
|
| 63 |
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
| 64 |
+
// nor polyfill, then a plain number is used for performance.
|
| 65 |
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
| 66 |
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
| 67 |
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
| 68 |
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
| 69 |
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
| 70 |
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
| 71 |
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
| 72 |
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
| 73 |
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
| 74 |
+
|
| 75 |
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
| 76 |
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
| 77 |
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
| 78 |
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
| 79 |
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
| 80 |
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
| 81 |
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
| 82 |
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
| 83 |
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
| 84 |
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
| 85 |
+
|
| 86 |
+
function isValidElementType(type) {
|
| 87 |
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
| 88 |
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
/**
|
| 92 |
+
* Forked from fbjs/warning:
|
| 93 |
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
| 94 |
+
*
|
| 95 |
+
* Only change is we use console.warn instead of console.error,
|
| 96 |
+
* and do nothing when 'console' is not supported.
|
| 97 |
+
* This really simplifies the code.
|
| 98 |
+
* ---
|
| 99 |
+
* Similar to invariant but only logs a warning if the condition is not met.
|
| 100 |
+
* This can be used to log issues in development environments in critical
|
| 101 |
+
* paths. Removing the logging code for production environments will keep the
|
| 102 |
+
* same logic and follow the same code paths.
|
| 103 |
+
*/
|
| 104 |
+
var lowPriorityWarningWithoutStack = function () {};
|
| 105 |
+
|
| 106 |
+
{
|
| 107 |
+
var printWarning = function (format) {
|
| 108 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
| 109 |
+
args[_key - 1] = arguments[_key];
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
var argIndex = 0;
|
| 113 |
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
| 114 |
+
return args[argIndex++];
|
| 115 |
+
});
|
| 116 |
+
|
| 117 |
+
if (typeof console !== 'undefined') {
|
| 118 |
+
console.warn(message);
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
try {
|
| 122 |
+
// --- Welcome to debugging React ---
|
| 123 |
+
// This error was thrown as a convenience so that you can use this stack
|
| 124 |
+
// to find the callsite that caused this warning to fire.
|
| 125 |
+
throw new Error(message);
|
| 126 |
+
} catch (x) {}
|
| 127 |
+
};
|
| 128 |
+
|
| 129 |
+
lowPriorityWarningWithoutStack = function (condition, format) {
|
| 130 |
+
if (format === undefined) {
|
| 131 |
+
throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
if (!condition) {
|
| 135 |
+
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
| 136 |
+
args[_key2 - 2] = arguments[_key2];
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
printWarning.apply(void 0, [format].concat(args));
|
| 140 |
+
}
|
| 141 |
+
};
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
|
| 145 |
+
|
| 146 |
+
function typeOf(object) {
|
| 147 |
+
if (typeof object === 'object' && object !== null) {
|
| 148 |
+
var $$typeof = object.$$typeof;
|
| 149 |
+
|
| 150 |
+
switch ($$typeof) {
|
| 151 |
+
case REACT_ELEMENT_TYPE:
|
| 152 |
+
var type = object.type;
|
| 153 |
+
|
| 154 |
+
switch (type) {
|
| 155 |
+
case REACT_ASYNC_MODE_TYPE:
|
| 156 |
+
case REACT_CONCURRENT_MODE_TYPE:
|
| 157 |
+
case REACT_FRAGMENT_TYPE:
|
| 158 |
+
case REACT_PROFILER_TYPE:
|
| 159 |
+
case REACT_STRICT_MODE_TYPE:
|
| 160 |
+
case REACT_SUSPENSE_TYPE:
|
| 161 |
+
return type;
|
| 162 |
+
|
| 163 |
+
default:
|
| 164 |
+
var $$typeofType = type && type.$$typeof;
|
| 165 |
+
|
| 166 |
+
switch ($$typeofType) {
|
| 167 |
+
case REACT_CONTEXT_TYPE:
|
| 168 |
+
case REACT_FORWARD_REF_TYPE:
|
| 169 |
+
case REACT_LAZY_TYPE:
|
| 170 |
+
case REACT_MEMO_TYPE:
|
| 171 |
+
case REACT_PROVIDER_TYPE:
|
| 172 |
+
return $$typeofType;
|
| 173 |
+
|
| 174 |
+
default:
|
| 175 |
+
return $$typeof;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
case REACT_PORTAL_TYPE:
|
| 181 |
+
return $$typeof;
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
return undefined;
|
| 186 |
+
} // AsyncMode is deprecated along with isAsyncMode
|
| 187 |
+
|
| 188 |
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
| 189 |
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
| 190 |
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
| 191 |
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
| 192 |
+
var Element = REACT_ELEMENT_TYPE;
|
| 193 |
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
| 194 |
+
var Fragment = REACT_FRAGMENT_TYPE;
|
| 195 |
+
var Lazy = REACT_LAZY_TYPE;
|
| 196 |
+
var Memo = REACT_MEMO_TYPE;
|
| 197 |
+
var Portal = REACT_PORTAL_TYPE;
|
| 198 |
+
var Profiler = REACT_PROFILER_TYPE;
|
| 199 |
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
| 200 |
+
var Suspense = REACT_SUSPENSE_TYPE;
|
| 201 |
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
| 202 |
+
|
| 203 |
+
function isAsyncMode(object) {
|
| 204 |
+
{
|
| 205 |
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
| 206 |
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
| 207 |
+
lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
| 212 |
+
}
|
| 213 |
+
function isConcurrentMode(object) {
|
| 214 |
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
| 215 |
+
}
|
| 216 |
+
function isContextConsumer(object) {
|
| 217 |
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
| 218 |
+
}
|
| 219 |
+
function isContextProvider(object) {
|
| 220 |
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
| 221 |
+
}
|
| 222 |
+
function isElement(object) {
|
| 223 |
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
| 224 |
+
}
|
| 225 |
+
function isForwardRef(object) {
|
| 226 |
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
| 227 |
+
}
|
| 228 |
+
function isFragment(object) {
|
| 229 |
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
| 230 |
+
}
|
| 231 |
+
function isLazy(object) {
|
| 232 |
+
return typeOf(object) === REACT_LAZY_TYPE;
|
| 233 |
+
}
|
| 234 |
+
function isMemo(object) {
|
| 235 |
+
return typeOf(object) === REACT_MEMO_TYPE;
|
| 236 |
+
}
|
| 237 |
+
function isPortal(object) {
|
| 238 |
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
| 239 |
+
}
|
| 240 |
+
function isProfiler(object) {
|
| 241 |
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
| 242 |
+
}
|
| 243 |
+
function isStrictMode(object) {
|
| 244 |
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
| 245 |
+
}
|
| 246 |
+
function isSuspense(object) {
|
| 247 |
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
exports.typeOf = typeOf;
|
| 251 |
+
exports.AsyncMode = AsyncMode;
|
| 252 |
+
exports.ConcurrentMode = ConcurrentMode;
|
| 253 |
+
exports.ContextConsumer = ContextConsumer;
|
| 254 |
+
exports.ContextProvider = ContextProvider;
|
| 255 |
+
exports.Element = Element;
|
| 256 |
+
exports.ForwardRef = ForwardRef;
|
| 257 |
+
exports.Fragment = Fragment;
|
| 258 |
+
exports.Lazy = Lazy;
|
| 259 |
+
exports.Memo = Memo;
|
| 260 |
+
exports.Portal = Portal;
|
| 261 |
+
exports.Profiler = Profiler;
|
| 262 |
+
exports.StrictMode = StrictMode;
|
| 263 |
+
exports.Suspense = Suspense;
|
| 264 |
+
exports.isValidElementType = isValidElementType;
|
| 265 |
+
exports.isAsyncMode = isAsyncMode;
|
| 266 |
+
exports.isConcurrentMode = isConcurrentMode;
|
| 267 |
+
exports.isContextConsumer = isContextConsumer;
|
| 268 |
+
exports.isContextProvider = isContextProvider;
|
| 269 |
+
exports.isElement = isElement;
|
| 270 |
+
exports.isForwardRef = isForwardRef;
|
| 271 |
+
exports.isFragment = isFragment;
|
| 272 |
+
exports.isLazy = isLazy;
|
| 273 |
+
exports.isMemo = isMemo;
|
| 274 |
+
exports.isPortal = isPortal;
|
| 275 |
+
exports.isProfiler = isProfiler;
|
| 276 |
+
exports.isStrictMode = isStrictMode;
|
| 277 |
+
exports.isSuspense = isSuspense;
|
| 278 |
+
})();
|
| 279 |
+
}
|
| 280 |
+
});
|
| 281 |
+
|
| 282 |
+
unwrapExports(reactIs_development);
|
| 283 |
+
var reactIs_development_1 = reactIs_development.typeOf;
|
| 284 |
+
var reactIs_development_2 = reactIs_development.AsyncMode;
|
| 285 |
+
var reactIs_development_3 = reactIs_development.ConcurrentMode;
|
| 286 |
+
var reactIs_development_4 = reactIs_development.ContextConsumer;
|
| 287 |
+
var reactIs_development_5 = reactIs_development.ContextProvider;
|
| 288 |
+
var reactIs_development_6 = reactIs_development.Element;
|
| 289 |
+
var reactIs_development_7 = reactIs_development.ForwardRef;
|
| 290 |
+
var reactIs_development_8 = reactIs_development.Fragment;
|
| 291 |
+
var reactIs_development_9 = reactIs_development.Lazy;
|
| 292 |
+
var reactIs_development_10 = reactIs_development.Memo;
|
| 293 |
+
var reactIs_development_11 = reactIs_development.Portal;
|
| 294 |
+
var reactIs_development_12 = reactIs_development.Profiler;
|
| 295 |
+
var reactIs_development_13 = reactIs_development.StrictMode;
|
| 296 |
+
var reactIs_development_14 = reactIs_development.Suspense;
|
| 297 |
+
var reactIs_development_15 = reactIs_development.isValidElementType;
|
| 298 |
+
var reactIs_development_16 = reactIs_development.isAsyncMode;
|
| 299 |
+
var reactIs_development_17 = reactIs_development.isConcurrentMode;
|
| 300 |
+
var reactIs_development_18 = reactIs_development.isContextConsumer;
|
| 301 |
+
var reactIs_development_19 = reactIs_development.isContextProvider;
|
| 302 |
+
var reactIs_development_20 = reactIs_development.isElement;
|
| 303 |
+
var reactIs_development_21 = reactIs_development.isForwardRef;
|
| 304 |
+
var reactIs_development_22 = reactIs_development.isFragment;
|
| 305 |
+
var reactIs_development_23 = reactIs_development.isLazy;
|
| 306 |
+
var reactIs_development_24 = reactIs_development.isMemo;
|
| 307 |
+
var reactIs_development_25 = reactIs_development.isPortal;
|
| 308 |
+
var reactIs_development_26 = reactIs_development.isProfiler;
|
| 309 |
+
var reactIs_development_27 = reactIs_development.isStrictMode;
|
| 310 |
+
var reactIs_development_28 = reactIs_development.isSuspense;
|
| 311 |
+
|
| 312 |
+
var reactIs = createCommonjsModule(function (module) {
|
| 313 |
+
|
| 314 |
+
if (process.env.NODE_ENV === 'production') {
|
| 315 |
+
module.exports = reactIs_production_min;
|
| 316 |
+
} else {
|
| 317 |
+
module.exports = reactIs_development;
|
| 318 |
+
}
|
| 319 |
+
});
|
| 320 |
+
var reactIs_1 = reactIs.typeOf;
|
| 321 |
+
var reactIs_2 = reactIs.AsyncMode;
|
| 322 |
+
var reactIs_3 = reactIs.ConcurrentMode;
|
| 323 |
+
var reactIs_4 = reactIs.ContextConsumer;
|
| 324 |
+
var reactIs_5 = reactIs.ContextProvider;
|
| 325 |
+
var reactIs_6 = reactIs.Element;
|
| 326 |
+
var reactIs_7 = reactIs.ForwardRef;
|
| 327 |
+
var reactIs_8 = reactIs.Fragment;
|
| 328 |
+
var reactIs_9 = reactIs.Lazy;
|
| 329 |
+
var reactIs_10 = reactIs.Memo;
|
| 330 |
+
var reactIs_11 = reactIs.Portal;
|
| 331 |
+
var reactIs_12 = reactIs.Profiler;
|
| 332 |
+
var reactIs_13 = reactIs.StrictMode;
|
| 333 |
+
var reactIs_14 = reactIs.Suspense;
|
| 334 |
+
var reactIs_15 = reactIs.isValidElementType;
|
| 335 |
+
var reactIs_16 = reactIs.isAsyncMode;
|
| 336 |
+
var reactIs_17 = reactIs.isConcurrentMode;
|
| 337 |
+
var reactIs_18 = reactIs.isContextConsumer;
|
| 338 |
+
var reactIs_19 = reactIs.isContextProvider;
|
| 339 |
+
var reactIs_20 = reactIs.isElement;
|
| 340 |
+
var reactIs_21 = reactIs.isForwardRef;
|
| 341 |
+
var reactIs_22 = reactIs.isFragment;
|
| 342 |
+
var reactIs_23 = reactIs.isLazy;
|
| 343 |
+
var reactIs_24 = reactIs.isMemo;
|
| 344 |
+
var reactIs_25 = reactIs.isPortal;
|
| 345 |
+
var reactIs_26 = reactIs.isProfiler;
|
| 346 |
+
var reactIs_27 = reactIs.isStrictMode;
|
| 347 |
+
var reactIs_28 = reactIs.isSuspense;
|
| 348 |
+
|
| 349 |
+
/**
|
| 350 |
+
* Copyright 2015, Yahoo! Inc.
|
| 351 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
| 352 |
+
*/
|
| 353 |
+
var REACT_STATICS = {
|
| 354 |
+
childContextTypes: true,
|
| 355 |
+
contextType: true,
|
| 356 |
+
contextTypes: true,
|
| 357 |
+
defaultProps: true,
|
| 358 |
+
displayName: true,
|
| 359 |
+
getDefaultProps: true,
|
| 360 |
+
getDerivedStateFromError: true,
|
| 361 |
+
getDerivedStateFromProps: true,
|
| 362 |
+
mixins: true,
|
| 363 |
+
propTypes: true,
|
| 364 |
+
type: true
|
| 365 |
+
};
|
| 366 |
+
var KNOWN_STATICS = {
|
| 367 |
+
name: true,
|
| 368 |
+
length: true,
|
| 369 |
+
prototype: true,
|
| 370 |
+
caller: true,
|
| 371 |
+
callee: true,
|
| 372 |
+
arguments: true,
|
| 373 |
+
arity: true
|
| 374 |
+
};
|
| 375 |
+
var FORWARD_REF_STATICS = {
|
| 376 |
+
'$$typeof': true,
|
| 377 |
+
render: true,
|
| 378 |
+
defaultProps: true,
|
| 379 |
+
displayName: true,
|
| 380 |
+
propTypes: true
|
| 381 |
+
};
|
| 382 |
+
var MEMO_STATICS = {
|
| 383 |
+
'$$typeof': true,
|
| 384 |
+
compare: true,
|
| 385 |
+
defaultProps: true,
|
| 386 |
+
displayName: true,
|
| 387 |
+
propTypes: true,
|
| 388 |
+
type: true
|
| 389 |
+
};
|
| 390 |
+
var TYPE_STATICS = {};
|
| 391 |
+
TYPE_STATICS[reactIs_7] = FORWARD_REF_STATICS;
|
| 392 |
+
TYPE_STATICS[reactIs_10] = MEMO_STATICS;
|
| 393 |
+
|
| 394 |
+
function getStatics(component) {
|
| 395 |
+
// React v16.11 and below
|
| 396 |
+
if (reactIs_24(component)) {
|
| 397 |
+
return MEMO_STATICS;
|
| 398 |
+
} // React v16.12 and above
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
var defineProperty = Object.defineProperty;
|
| 405 |
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
| 406 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
| 407 |
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
| 408 |
+
var getPrototypeOf = Object.getPrototypeOf;
|
| 409 |
+
var objectPrototype = Object.prototype;
|
| 410 |
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
| 411 |
+
if (typeof sourceComponent !== 'string') {
|
| 412 |
+
// don't hoist over string (html) components
|
| 413 |
+
if (objectPrototype) {
|
| 414 |
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
| 415 |
+
|
| 416 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
| 417 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
| 418 |
+
}
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
var keys = getOwnPropertyNames(sourceComponent);
|
| 422 |
+
|
| 423 |
+
if (getOwnPropertySymbols) {
|
| 424 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
var targetStatics = getStatics(targetComponent);
|
| 428 |
+
var sourceStatics = getStatics(sourceComponent);
|
| 429 |
+
|
| 430 |
+
for (var i = 0; i < keys.length; ++i) {
|
| 431 |
+
var key = keys[i];
|
| 432 |
+
|
| 433 |
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
| 434 |
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
| 435 |
+
|
| 436 |
+
try {
|
| 437 |
+
// Avoid failures from read-only properties
|
| 438 |
+
defineProperty(targetComponent, key, descriptor);
|
| 439 |
+
} catch (e) {}
|
| 440 |
+
}
|
| 441 |
+
}
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
return targetComponent;
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
return hoistNonReactStatics;
|
| 448 |
+
|
| 449 |
+
})));
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).hoistNonReactStatics=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,f=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,i=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,y=r?Symbol.for("react.concurrent_mode"):60111,l=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,d=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,S=r?Symbol.for("react.fundamental"):60117,$=r?Symbol.for("react.responder"):60118,v=r?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case y:case c:case f:case a:case p:return e;default:switch(e=e&&e.$$typeof){case i:case l:case b:case d:case s:return e;default:return t}}case n:return t}}}function P(e){return g(e)===y}t.typeOf=g,t.AsyncMode=u,t.ConcurrentMode=y,t.ContextConsumer=i,t.ContextProvider=s,t.Element=o,t.ForwardRef=l,t.Fragment=c,t.Lazy=b,t.Memo=d,t.Portal=n,t.Profiler=f,t.StrictMode=a,t.Suspense=p,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===y||e===f||e===a||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===d||e.$$typeof===s||e.$$typeof===i||e.$$typeof===l||e.$$typeof===S||e.$$typeof===$||e.$$typeof===v)},t.isAsyncMode=function(e){return P(e)||g(e)===u},t.isConcurrentMode=P,t.isContextConsumer=function(e){return g(e)===i},t.isContextProvider=function(e){return g(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return g(e)===l},t.isFragment=function(e){return g(e)===c},t.isLazy=function(e){return g(e)===b},t.isMemo=function(e){return g(e)===d},t.isPortal=function(e){return g(e)===n},t.isProfiler=function(e){return g(e)===f},t.isStrictMode=function(e){return g(e)===a},t.isSuspense=function(e){return g(e)===p}}));e(r);var o=t((function(e,t){"production"!==process.env.NODE_ENV&&function(){Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,i=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;var v=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;t>o;o++)r[o-1]=arguments[o];var n=0,c="Warning: "+e.replace(/%s/g,(function(){return r[n++]}));void 0!==console&&console.warn(c);try{throw Error(c)}catch(e){}},g=function(e,t){if(void 0===t)throw Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,o=Array(r>2?r-2:0),n=2;r>n;n++)o[n-2]=arguments[n];v.apply(void 0,[t].concat(o))}};function P(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:var p=e.type;switch(p){case i:case u:case n:case a:case c:case l:return p;default:var b=p&&p.$$typeof;switch(b){case s:case y:case d:case m:case f:return b;default:return t}}case o:return t}}}var h=i,w=u,M=s,x=f,C=r,O=y,_=n,j=d,E=m,F=o,N=a,R=c,T=l,A=!1;function z(e){return P(e)===u}t.typeOf=P,t.AsyncMode=h,t.ConcurrentMode=w,t.ContextConsumer=M,t.ContextProvider=x,t.Element=C,t.ForwardRef=O,t.Fragment=_,t.Lazy=j,t.Memo=E,t.Portal=F,t.Profiler=N,t.StrictMode=R,t.Suspense=T,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===u||e===a||e===c||e===l||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===m||e.$$typeof===f||e.$$typeof===s||e.$$typeof===y||e.$$typeof===b||e.$$typeof===S||e.$$typeof===$)},t.isAsyncMode=function(e){return A||(A=!0,g(!1,"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(e)||P(e)===i},t.isConcurrentMode=z,t.isContextConsumer=function(e){return P(e)===s},t.isContextProvider=function(e){return P(e)===f},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return P(e)===y},t.isFragment=function(e){return P(e)===n},t.isLazy=function(e){return P(e)===d},t.isMemo=function(e){return P(e)===m},t.isPortal=function(e){return P(e)===o},t.isProfiler=function(e){return P(e)===a},t.isStrictMode=function(e){return P(e)===c},t.isSuspense=function(e){return P(e)===l}}()}));e(o);var n=t((function(e){e.exports="production"===process.env.NODE_ENV?r:o})),c=n.Memo,a=n.isMemo,f={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},s={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function y(e){return a(e)?i:u[e.$$typeof]||f}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[c]=i;var l=Object.defineProperty,p=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,b=Object.getPrototypeOf,S=Object.prototype;return function e(t,r,o){if("string"!=typeof r){if(S){var n=b(r);n&&n!==S&&e(t,n,o)}var c=p(r);m&&(c=c.concat(m(r)));for(var a=y(t),f=y(r),i=0;c.length>i;++i){var u=c[i];if(!(s[u]||o&&o[u]||f&&f[u]||a&&a[u])){var $=d(r,u);try{l(t,u,$)}catch(e){}}}}return t}}));
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/hoist-non-react-statics/src/index.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Copyright 2015, Yahoo! Inc.
|
| 3 |
+
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
| 4 |
+
*/
|
| 5 |
+
import { ForwardRef, Memo, isMemo } from 'react-is';
|
| 6 |
+
|
| 7 |
+
const REACT_STATICS = {
|
| 8 |
+
childContextTypes: true,
|
| 9 |
+
contextType: true,
|
| 10 |
+
contextTypes: true,
|
| 11 |
+
defaultProps: true,
|
| 12 |
+
displayName: true,
|
| 13 |
+
getDefaultProps: true,
|
| 14 |
+
getDerivedStateFromError: true,
|
| 15 |
+
getDerivedStateFromProps: true,
|
| 16 |
+
mixins: true,
|
| 17 |
+
propTypes: true,
|
| 18 |
+
type: true
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
const KNOWN_STATICS = {
|
| 22 |
+
name: true,
|
| 23 |
+
length: true,
|
| 24 |
+
prototype: true,
|
| 25 |
+
caller: true,
|
| 26 |
+
callee: true,
|
| 27 |
+
arguments: true,
|
| 28 |
+
arity: true
|
| 29 |
+
};
|
| 30 |
+
|
| 31 |
+
const FORWARD_REF_STATICS = {
|
| 32 |
+
'$$typeof': true,
|
| 33 |
+
render: true,
|
| 34 |
+
defaultProps: true,
|
| 35 |
+
displayName: true,
|
| 36 |
+
propTypes: true
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
const MEMO_STATICS = {
|
| 40 |
+
'$$typeof': true,
|
| 41 |
+
compare: true,
|
| 42 |
+
defaultProps: true,
|
| 43 |
+
displayName: true,
|
| 44 |
+
propTypes: true,
|
| 45 |
+
type: true,
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
const TYPE_STATICS = {};
|
| 49 |
+
TYPE_STATICS[ForwardRef] = FORWARD_REF_STATICS;
|
| 50 |
+
TYPE_STATICS[Memo] = MEMO_STATICS;
|
| 51 |
+
|
| 52 |
+
function getStatics(component) {
|
| 53 |
+
// React v16.11 and below
|
| 54 |
+
if (isMemo(component)) {
|
| 55 |
+
return MEMO_STATICS;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
// React v16.12 and above
|
| 59 |
+
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
const defineProperty = Object.defineProperty;
|
| 63 |
+
const getOwnPropertyNames = Object.getOwnPropertyNames;
|
| 64 |
+
const getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
| 65 |
+
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
| 66 |
+
const getPrototypeOf = Object.getPrototypeOf;
|
| 67 |
+
const objectPrototype = Object.prototype;
|
| 68 |
+
|
| 69 |
+
export default function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
| 70 |
+
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
| 71 |
+
|
| 72 |
+
if (objectPrototype) {
|
| 73 |
+
const inheritedComponent = getPrototypeOf(sourceComponent);
|
| 74 |
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
| 75 |
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
let keys = getOwnPropertyNames(sourceComponent);
|
| 80 |
+
|
| 81 |
+
if (getOwnPropertySymbols) {
|
| 82 |
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
const targetStatics = getStatics(targetComponent);
|
| 86 |
+
const sourceStatics = getStatics(sourceComponent);
|
| 87 |
+
|
| 88 |
+
for (let i = 0; i < keys.length; ++i) {
|
| 89 |
+
const key = keys[i];
|
| 90 |
+
if (!KNOWN_STATICS[key] &&
|
| 91 |
+
!(blacklist && blacklist[key]) &&
|
| 92 |
+
!(sourceStatics && sourceStatics[key]) &&
|
| 93 |
+
!(targetStatics && targetStatics[key])
|
| 94 |
+
) {
|
| 95 |
+
const descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
| 96 |
+
try { // Avoid failures from read-only properties
|
| 97 |
+
defineProperty(targetComponent, key, descriptor);
|
| 98 |
+
} catch (e) {}
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
return targetComponent;
|
| 104 |
+
};
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var e,t=(e=require("void-elements"))&&"object"==typeof e&&"default"in e?e.default:e,n=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function r(e){var r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(r.name=i[1],(t[i[1]]||"/"===e.charAt(e.length-2))&&(r.voidElement=!0),r.name.startsWith("!--"))){var s=e.indexOf("--\x3e");return{type:"comment",comment:-1!==s?e.slice(4,s):""}}for(var c=new RegExp(n),a=null;null!==(a=c.exec(e));)if(a[0].trim())if(a[1]){var o=a[1].trim(),u=[o,""];o.indexOf("=")>-1&&(u=o.split("=")),r.attrs[u[0]]=u[1],c.lastIndex--}else a[2]&&(r.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return r}var i=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,s=/^\s*$/,c=Object.create(null);function a(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(a,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}module.exports={parse:function(e,t){t||(t={}),t.components||(t.components=c);var n,a=[],o=[],u=-1,l=!1;if(0!==e.indexOf("<")){var m=e.indexOf("<");a.push({type:"text",content:-1===m?e:e.substring(0,m)})}return e.replace(i,function(i,c){if(l){if(i!=="</"+n.name+">")return;l=!1}var m,d="/"!==i.charAt(1),f=i.startsWith("\x3c!--"),h=c+i.length,p=e.charAt(h);if(f){var v=r(i);return u<0?(a.push(v),a):((m=o[u]).children.push(v),a)}if(d&&(u++,"tag"===(n=r(i)).type&&t.components[n.name]&&(n.type="component",l=!0),n.voidElement||l||!p||"<"===p||n.children.push({type:"text",content:e.slice(h,e.indexOf("<",h))}),0===u&&a.push(n),(m=o[u-1])&&m.children.push(n),o[u]=n),(!d||n.voidElement)&&(u>-1&&(n.voidElement||n.name===i.slice(2,-1))&&(u--,n=-1===u?a:o[u]),!l&&"<"!==p&&p)){m=-1===u?a:o[u].children;var x=e.indexOf("<",h),g=e.slice(h,-1===x?void 0:x);s.test(g)&&(g=" "),(x>-1&&u+m.length>=0||" "!==g)&&m.push({type:"text",content:g})}}),a},stringify:function(e){return e.reduce(function(e,t){return e+a("",t)},"")}};
|
| 2 |
+
//# sourceMappingURL=html-parse-stringify.js.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"html-parse-stringify.js","sources":["../src/parse-tag.js","../src/parse.js","../src/stringify.js","../src/index.js"],"sourcesContent":["import lookup from 'void-elements'\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g\n\nexport default function stringify(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n }\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/)\n if (tagMatch) {\n res.name = tagMatch[1]\n if (\n lookup[tagMatch[1]] ||\n tag.charAt(tag.length - 2) === '/'\n ) {\n res.voidElement = true\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->')\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE)\n let result = null\n for (;;) {\n result = reg.exec(tag)\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim()\n let arr = [attr, '']\n\n if (attr.indexOf('=') > -1) {\n arr = attr.split('=')\n }\n\n res.attrs[arr[0]] = arr[1]\n reg.lastIndex--\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1)\n }\n }\n\n return res\n}\n","import parseTag from './parse-tag'\n\nconst tagRE = /<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g\nconst whitespaceRE = /^\\s*$/\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null)\n\nexport default function parse(html, options) {\n options || (options = {})\n options.components || (options.components = empty)\n const result = []\n const arr = []\n let current\n let level = -1\n let inComponent = false\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n var end = html.indexOf('<')\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n })\n }\n\n html.replace(tagRE, function (tag, index) {\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false\n }\n }\n const isOpen = tag.charAt(1) !== '/'\n const isComment = tag.startsWith('<!--')\n const start = index + tag.length\n const nextChar = html.charAt(start)\n let parent\n\n if (isComment) {\n const comment = parseTag(tag)\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment)\n return result\n }\n parent = arr[level]\n parent.children.push(comment)\n return result\n }\n\n if (isOpen) {\n level++\n\n current = parseTag(tag)\n if (current.type === 'tag' && options.components[current.name]) {\n current.type = 'component'\n inComponent = true\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n nextChar &&\n nextChar !== '<'\n ) {\n current.children.push({\n type: 'text',\n content: html.slice(start, html.indexOf('<', start)),\n })\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current)\n }\n\n parent = arr[level - 1]\n\n if (parent) {\n parent.children.push(current)\n }\n\n arr[level] = current\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level]\n }\n if (!inComponent && nextChar !== '<' && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children\n\n // calculate correct end of the content slice in case there's\n // no tag after the text node.\n const end = html.indexOf('<', start)\n let content = html.slice(start, end === -1 ? undefined : end)\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' '\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content: content,\n })\n }\n }\n }\n })\n\n return result\n}\n","function attrString(attrs) {\n const buff = []\n for (let key in attrs) {\n buff.push(key + '=\"' + attrs[key] + '\"')\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringify(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag':\n buff +=\n '<' +\n doc.name +\n (doc.attrs ? attrString(doc.attrs) : '') +\n (doc.voidElement ? '/>' : '>')\n if (doc.voidElement) {\n return buff\n }\n return buff + doc.children.reduce(stringify, '') + '</' + doc.name + '>'\n case 'comment':\n buff += '<!--' + doc.comment + '-->'\n return buff\n }\n}\n\nexport default function (doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringify('', rootEl)\n }, '')\n}\n","import parse from './parse'\nimport stringify from './stringify'\n\nexport default {\n parse,\n stringify,\n}\n"],"names":["attrRE","stringify","tag","res","type","name","voidElement","attrs","children","tagMatch","match","lookup","charAt","length","startsWith","endIndex","indexOf","comment","slice","reg","RegExp","result","exec","trim","attr","arr","split","lastIndex","substring","tagRE","whitespaceRE","empty","Object","create","buff","doc","content","key","push","join","attrString","reduce","parse","html","options","components","current","level","inComponent","end","replace","index","parent","isOpen","isComment","start","nextChar","parseTag","undefined","test","token","rootEl"],"mappings":"oFACMA,EAAS,8DAESC,EAAUC,GAChC,IAAMC,EAAM,CACVC,KAAM,MACNC,KAAM,GACNC,aAAa,EACbC,MAAO,GACPC,SAAU,IAGNC,EAAWP,EAAIQ,MAAM,uBAC3B,GAAID,IACFN,EAAIE,KAAOI,EAAS,IAElBE,EAAOF,EAAS,KACe,MAA/BP,EAAIU,OAAOV,EAAIW,OAAS,MAExBV,EAAIG,aAAc,GAIhBH,EAAIE,KAAKS,WAAW,QAAQ,CAC9B,IAAMC,EAAWb,EAAIc,QAAQ,UAC7B,MAAO,CACLZ,KAAM,UACNa,SAAuB,IAAdF,EAAkBb,EAAIgB,MAAM,EAAGH,GAAY,IAO1D,IAFA,IAAMI,EAAM,IAAIC,OAAOpB,GACnBqB,EAAS,KAII,QAFfA,EAASF,EAAIG,KAAKpB,KAMlB,GAAKmB,EAAO,GAAGE,OAIf,GAAIF,EAAO,GAAI,CACb,IAAMG,EAAOH,EAAO,GAAGE,OACnBE,EAAM,CAACD,EAAM,IAEbA,EAAKR,QAAQ,MAAQ,IACvBS,EAAMD,EAAKE,MAAM,MAGnBvB,EAAII,MAAMkB,EAAI,IAAMA,EAAI,GACxBN,EAAIQ,iBACKN,EAAO,KAChBlB,EAAII,MAAMc,EAAO,IAAMA,EAAO,GAAGE,OAAOK,UAAU,EAAGP,EAAO,GAAGR,OAAS,IAI5E,OAAOV,EC1DT,IAAM0B,EAAQ,kDACRC,EAAe,QAGfC,E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+
import t from"void-elements";const e=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function n(n){const s={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},c=n.match(/<\/?([^\s]+?)[/\s>]/);if(c&&(s.name=c[1],(t[c[1]]||"/"===n.charAt(n.length-2))&&(s.voidElement=!0),s.name.startsWith("!--"))){const t=n.indexOf("--\x3e");return{type:"comment",comment:-1!==t?n.slice(4,t):""}}const r=new RegExp(e);let i=null;for(;i=r.exec(n),null!==i;)if(i[0].trim())if(i[1]){const t=i[1].trim();let e=[t,""];t.indexOf("=")>-1&&(e=t.split("=")),s.attrs[e[0]]=e[1],r.lastIndex--}else i[2]&&(s.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return s}const s=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,c=/^\s*$/,r=Object.create(null);function i(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(t){const e=[];for(let n in t)e.push(n+'="'+t[n]+'"');return e.length?" "+e.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(i,"")+"</"+e.name+">";case"comment":return t+"\x3c!--"+e.comment+"--\x3e"}}var o={parse:function(t,e){e||(e={}),e.components||(e.components=r);const i=[],o=[];let l,m=-1,u=!1;if(0!==t.indexOf("<")){var a=t.indexOf("<");i.push({type:"text",content:-1===a?t:t.substring(0,a)})}return t.replace(s,function(s,r){if(u){if(s!=="</"+l.name+">")return;u=!1}const a="/"!==s.charAt(1),f=s.startsWith("\x3c!--"),h=r+s.length,p=t.charAt(h);let d;if(f){const t=n(s);return m<0?(i.push(t),i):(d=o[m],d.children.push(t),i)}if(a&&(m++,l=n(s),"tag"===l.type&&e.components[l.name]&&(l.type="component",u=!0),l.voidElement||u||!p||"<"===p||l.children.push({type:"text",content:t.slice(h,t.indexOf("<",h))}),0===m&&i.push(l),d=o[m-1],d&&d.children.push(l),o[m]=l),(!a||l.voidElement)&&(m>-1&&(l.voidElement||l.name===s.slice(2,-1))&&(m--,l=-1===m?i:o[m]),!u&&"<"!==p&&p)){d=-1===m?i:o[m].children;const e=t.indexOf("<",h);let n=t.slice(h,-1===e?void 0:e);c.test(n)&&(n=" "),(e>-1&&m+d.length>=0||" "!==n)&&d.push({type:"text",content:n})}}),i},stringify:function(t){return t.reduce(function(t,e){return t+i("",e)},"")}};export default o;
|
| 2 |
+
//# sourceMappingURL=html-parse-stringify.modern.js.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.modern.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"html-parse-stringify.modern.js","sources":["../src/parse-tag.js","../src/parse.js","../src/stringify.js","../src/index.js"],"sourcesContent":["import lookup from 'void-elements'\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g\n\nexport default function stringify(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n }\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/)\n if (tagMatch) {\n res.name = tagMatch[1]\n if (\n lookup[tagMatch[1]] ||\n tag.charAt(tag.length - 2) === '/'\n ) {\n res.voidElement = true\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->')\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE)\n let result = null\n for (;;) {\n result = reg.exec(tag)\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim()\n let arr = [attr, '']\n\n if (attr.indexOf('=') > -1) {\n arr = attr.split('=')\n }\n\n res.attrs[arr[0]] = arr[1]\n reg.lastIndex--\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1)\n }\n }\n\n return res\n}\n","import parseTag from './parse-tag'\n\nconst tagRE = /<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g\nconst whitespaceRE = /^\\s*$/\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null)\n\nexport default function parse(html, options) {\n options || (options = {})\n options.components || (options.components = empty)\n const result = []\n const arr = []\n let current\n let level = -1\n let inComponent = false\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n var end = html.indexOf('<')\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n })\n }\n\n html.replace(tagRE, function (tag, index) {\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false\n }\n }\n const isOpen = tag.charAt(1) !== '/'\n const isComment = tag.startsWith('<!--')\n const start = index + tag.length\n const nextChar = html.charAt(start)\n let parent\n\n if (isComment) {\n const comment = parseTag(tag)\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment)\n return result\n }\n parent = arr[level]\n parent.children.push(comment)\n return result\n }\n\n if (isOpen) {\n level++\n\n current = parseTag(tag)\n if (current.type === 'tag' && options.components[current.name]) {\n current.type = 'component'\n inComponent = true\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n nextChar &&\n nextChar !== '<'\n ) {\n current.children.push({\n type: 'text',\n content: html.slice(start, html.indexOf('<', start)),\n })\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current)\n }\n\n parent = arr[level - 1]\n\n if (parent) {\n parent.children.push(current)\n }\n\n arr[level] = current\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level]\n }\n if (!inComponent && nextChar !== '<' && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children\n\n // calculate correct end of the content slice in case there's\n // no tag after the text node.\n const end = html.indexOf('<', start)\n let content = html.slice(start, end === -1 ? undefined : end)\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' '\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content: content,\n })\n }\n }\n }\n })\n\n return result\n}\n","function attrString(attrs) {\n const buff = []\n for (let key in attrs) {\n buff.push(key + '=\"' + attrs[key] + '\"')\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringify(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag':\n buff +=\n '<' +\n doc.name +\n (doc.attrs ? attrString(doc.attrs) : '') +\n (doc.voidElement ? '/>' : '>')\n if (doc.voidElement) {\n return buff\n }\n return buff + doc.children.reduce(stringify, '') + '</' + doc.name + '>'\n case 'comment':\n buff += '<!--' + doc.comment + '-->'\n return buff\n }\n}\n\nexport default function (doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringify('', rootEl)\n }, '')\n}\n","import parse from './parse'\nimport stringify from './stringify'\n\nexport default {\n parse,\n stringify,\n}\n"],"names":["attrRE","stringify","tag","res","type","name","voidElement","attrs","children","tagMatch","match","lookup","charAt","length","startsWith","endIndex","indexOf","comment","slice","reg","RegExp","result","exec","trim","attr","arr","split","lastIndex","substring","tagRE","whitespaceRE","empty","Object","create","buff","doc","content","key","push","join","attrString","reduce","parse","html","options","components","current","level","inComponent","end","replace","index","isOpen","isComment","start","nextChar","parent","parseTag","undefined","test","token","rootEl"],"mappings":"6BACA,MAAMA,EAAS,8DAESC,EAAUC,GAChC,MAAMC,EAAM,CACVC,KAAM,MACNC,KAAM,GACNC,aAA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C,IAAVP,GACF1B,EAAOiB,KAAKQ,GAGdU,EAAS/B,EAAIsB,EAAQ,GAEjBS,GACFA,EAAOhD,SAAS8B,KAAKQ,GAGvBrB,EAAIsB,GAASD,KAGVM,GAAUN,EAAQxC,eAEnByC,GAAS,IACRD,EAAQxC,aAAewC,EAAQzC,OAASH,EAAIgB,MAAM,GAAI,MAEvD6B,IAEAD,GAAqB,IAAXC,EAAe1B,EAASI,EAAIsB,KAEnCC,GAA4B,MAAbO,GAAoBA,GAAU,CAIhDC,GAAoB,IAAXT,EAAe1B,EAASI,EAAIsB,GAAOvC,SAI5C,MAAMyC,EAAMN,EAAK3B,QAAQ,IAAKsC,GAC9B,IAAIlB,EAAUO,EAAKzB,MAAMoC,GAAgB,IAATL,OAAaS,EAAYT,GAGrDnB,EAAa6B,KAAKvB,KACpBA,EAAU,MAMPa,GAAO,GAAKF,EAAQS,EAAO3C,QAAU,GAAkB,MAAZuB,IAC9CoB,EAAOlB,KAAK,CACVlC,KAAM,OACNgC,QAASA,OAOZf,sBC/FgBc,GACvB,OAAOA,EAAIM,OAAO,SAAUmB,EAAOC,GACjC,OAAOD,EAAQ3D,EAAU,GAAI4D,IAC5B"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import e from"void-elements";var t=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function n(n){var r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(r.name=i[1],(e[i[1]]||"/"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith("!--"))){var s=n.indexOf("--\x3e");return{type:"comment",comment:-1!==s?n.slice(4,s):""}}for(var a=new RegExp(t),c=null;null!==(c=a.exec(n));)if(c[0].trim())if(c[1]){var o=c[1].trim(),l=[o,""];o.indexOf("=")>-1&&(l=o.split("=")),r.attrs[l[0]]=l[1],a.lastIndex--}else c[2]&&(r.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return r}var r=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,i=/^\s*$/,s=Object.create(null);function a(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(a,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var c={parse:function(e,t){t||(t={}),t.components||(t.components=s);var a,c=[],o=[],l=-1,m=!1;if(0!==e.indexOf("<")){var u=e.indexOf("<");c.push({type:"text",content:-1===u?e:e.substring(0,u)})}return e.replace(r,function(r,s){if(m){if(r!=="</"+a.name+">")return;m=!1}var u,f="/"!==r.charAt(1),h=r.startsWith("\x3c!--"),p=s+r.length,d=e.charAt(p);if(h){var v=n(r);return l<0?(c.push(v),c):((u=o[l]).children.push(v),c)}if(f&&(l++,"tag"===(a=n(r)).type&&t.components[a.name]&&(a.type="component",m=!0),a.voidElement||m||!d||"<"===d||a.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),0===l&&c.push(a),(u=o[l-1])&&u.children.push(a),o[l]=a),(!f||a.voidElement)&&(l>-1&&(a.voidElement||a.name===r.slice(2,-1))&&(l--,a=-1===l?c:o[l]),!m&&"<"!==d&&d)){u=-1===l?c:o[l].children;var x=e.indexOf("<",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=" "),(x>-1&&l+u.length>=0||" "!==g)&&u.push({type:"text",content:g})}}),c},stringify:function(e){return e.reduce(function(e,t){return e+a("",t)},"")}};export default c;
|
| 2 |
+
//# sourceMappingURL=html-parse-stringify.module.js.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"html-parse-stringify.module.js","sources":["../src/parse-tag.js","../src/parse.js","../src/stringify.js","../src/index.js"],"sourcesContent":["import lookup from 'void-elements'\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g\n\nexport default function stringify(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n }\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/)\n if (tagMatch) {\n res.name = tagMatch[1]\n if (\n lookup[tagMatch[1]] ||\n tag.charAt(tag.length - 2) === '/'\n ) {\n res.voidElement = true\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->')\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE)\n let result = null\n for (;;) {\n result = reg.exec(tag)\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim()\n let arr = [attr, '']\n\n if (attr.indexOf('=') > -1) {\n arr = attr.split('=')\n }\n\n res.attrs[arr[0]] = arr[1]\n reg.lastIndex--\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1)\n }\n }\n\n return res\n}\n","import parseTag from './parse-tag'\n\nconst tagRE = /<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g\nconst whitespaceRE = /^\\s*$/\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null)\n\nexport default function parse(html, options) {\n options || (options = {})\n options.components || (options.components = empty)\n const result = []\n const arr = []\n let current\n let level = -1\n let inComponent = false\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n var end = html.indexOf('<')\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n })\n }\n\n html.replace(tagRE, function (tag, index) {\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false\n }\n }\n const isOpen = tag.charAt(1) !== '/'\n const isComment = tag.startsWith('<!--')\n const start = index + tag.length\n const nextChar = html.charAt(start)\n let parent\n\n if (isComment) {\n const comment = parseTag(tag)\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment)\n return result\n }\n parent = arr[level]\n parent.children.push(comment)\n return result\n }\n\n if (isOpen) {\n level++\n\n current = parseTag(tag)\n if (current.type === 'tag' && options.components[current.name]) {\n current.type = 'component'\n inComponent = true\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n nextChar &&\n nextChar !== '<'\n ) {\n current.children.push({\n type: 'text',\n content: html.slice(start, html.indexOf('<', start)),\n })\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current)\n }\n\n parent = arr[level - 1]\n\n if (parent) {\n parent.children.push(current)\n }\n\n arr[level] = current\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level]\n }\n if (!inComponent && nextChar !== '<' && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children\n\n // calculate correct end of the content slice in case there's\n // no tag after the text node.\n const end = html.indexOf('<', start)\n let content = html.slice(start, end === -1 ? undefined : end)\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' '\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content: content,\n })\n }\n }\n }\n })\n\n return result\n}\n","function attrString(attrs) {\n const buff = []\n for (let key in attrs) {\n buff.push(key + '=\"' + attrs[key] + '\"')\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringify(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag':\n buff +=\n '<' +\n doc.name +\n (doc.attrs ? attrString(doc.attrs) : '') +\n (doc.voidElement ? '/>' : '>')\n if (doc.voidElement) {\n return buff\n }\n return buff + doc.children.reduce(stringify, '') + '</' + doc.name + '>'\n case 'comment':\n buff += '<!--' + doc.comment + '-->'\n return buff\n }\n}\n\nexport default function (doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringify('', rootEl)\n }, '')\n}\n","import parse from './parse'\nimport stringify from './stringify'\n\nexport default {\n parse,\n stringify,\n}\n"],"names":["attrRE","stringify","tag","res","type","name","voidElement","attrs","children","tagMatch","match","lookup","charAt","length","startsWith","endIndex","indexOf","comment","slice","reg","RegExp","result","exec","trim","attr","arr","split","lastIndex","substring","tagRE","whitespaceRE","empty","Object","create","buff","doc","content","key","push","join","attrString","reduce","parse","html","options","components","current","level","inComponent","end","replace","index","parent","isOpen","isComment","start","nextChar","parseTag","undefined","test","token","rootEl"],"mappings":"6BACA,IAAMA,EAAS,8DAESC,EAAUC,GAChC,IAAMC,EAAM,CACVC,KAAM,MACNC,KAAM,GACNC,aAAa,EACbC,MAAO,GACPC,SAAU,IAGNC,EAAWP,EAAIQ,MAAM,uBAC3B,GAAID,IACFN,EAAIE,KAAOI,EAAS,IAElBE,EAAOF,EAAS,KACe,MAA/BP,EAAIU,OAAOV,EAAIW,OAAS,MAExBV,EAAIG,aAAc,GAIhBH,EAAIE,KAAKS,WAAW,QAAQ,CAC9B,IAAMC,EAAWb,EAAIc,QAAQ,UAC7B,MAAO,CACLZ,KAAM,UACNa,SAAuB,IAAdF,EAAkBb,EAAIgB,MAAM,EAAGH,GAAY,IAO1D,IAFA,IAAMI,EAAM,IAAIC,OAAOpB,GACnBqB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B,MAAMqC,GAAgB,IAATN,OAAaS,EAAYT,GAGrDnB,EAAa6B,KAAKvB,KACpBA,EAAU,MAMPa,GAAO,GAAKF,EAAQK,EAAOvC,QAAU,GAAkB,MAAZuB,IAC9CgB,EAAOd,KAAK,CACVlC,KAAM,OACNgC,QAASA,OAOZf,GEzHPpB,mBD0BuBkC,GACvB,OAAOA,EAAIM,OAAO,SAAUmB,EAAOC,GACjC,OAAOD,EAAQ3D,EAAU,GAAI4D,IAC5B"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("void-elements")):"function"==typeof define&&define.amd?define(["void-elements"],t):(e=e||self).htmlParseStringify=t(e.voidElements)}(this,function(e){e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var t=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function n(n){var r={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(r.name=i[1],(e[i[1]]||"/"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith("!--"))){var s=n.indexOf("--\x3e");return{type:"comment",comment:-1!==s?n.slice(4,s):""}}for(var c=new RegExp(t),o=null;null!==(o=c.exec(n));)if(o[0].trim())if(o[1]){var a=o[1].trim(),l=[a,""];a.indexOf("=")>-1&&(l=a.split("=")),r.attrs[l[0]]=l[1],c.lastIndex--}else o[2]&&(r.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return r}var r=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,i=/^\s*$/,s=Object.create(null);function c(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'="'+e[n]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(c,"")+"</"+t.name+">";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}return{parse:function(e,t){t||(t={}),t.components||(t.components=s);var c,o=[],a=[],l=-1,u=!1;if(0!==e.indexOf("<")){var f=e.indexOf("<");o.push({type:"text",content:-1===f?e:e.substring(0,f)})}return e.replace(r,function(r,s){if(u){if(r!=="</"+c.name+">")return;u=!1}var f,m="/"!==r.charAt(1),d=r.startsWith("\x3c!--"),p=s+r.length,h=e.charAt(p);if(d){var v=n(r);return l<0?(o.push(v),o):((f=a[l]).children.push(v),o)}if(m&&(l++,"tag"===(c=n(r)).type&&t.components[c.name]&&(c.type="component",u=!0),c.voidElement||u||!h||"<"===h||c.children.push({type:"text",content:e.slice(p,e.indexOf("<",p))}),0===l&&o.push(c),(f=a[l-1])&&f.children.push(c),a[l]=c),(!m||c.voidElement)&&(l>-1&&(c.voidElement||c.name===r.slice(2,-1))&&(l--,c=-1===l?o:a[l]),!u&&"<"!==h&&h)){f=-1===l?o:a[l].children;var x=e.indexOf("<",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=" "),(x>-1&&l+f.length>=0||" "!==g)&&f.push({type:"text",content:g})}}),o},stringify:function(e){return e.reduce(function(e,t){return e+c("",t)},"")}}});
|
| 2 |
+
//# sourceMappingURL=html-parse-stringify.umd.js.map
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"html-parse-stringify.umd.js","sources":["../src/parse-tag.js","../src/parse.js","../src/stringify.js","../src/index.js"],"sourcesContent":["import lookup from 'void-elements'\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g\n\nexport default function stringify(tag) {\n const res = {\n type: 'tag',\n name: '',\n voidElement: false,\n attrs: {},\n children: [],\n }\n\n const tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/)\n if (tagMatch) {\n res.name = tagMatch[1]\n if (\n lookup[tagMatch[1]] ||\n tag.charAt(tag.length - 2) === '/'\n ) {\n res.voidElement = true\n }\n\n // handle comment tag\n if (res.name.startsWith('!--')) {\n const endIndex = tag.indexOf('-->')\n return {\n type: 'comment',\n comment: endIndex !== -1 ? tag.slice(4, endIndex) : '',\n }\n }\n }\n\n const reg = new RegExp(attrRE)\n let result = null\n for (;;) {\n result = reg.exec(tag)\n\n if (result === null) {\n break\n }\n\n if (!result[0].trim()) {\n continue\n }\n\n if (result[1]) {\n const attr = result[1].trim()\n let arr = [attr, '']\n\n if (attr.indexOf('=') > -1) {\n arr = attr.split('=')\n }\n\n res.attrs[arr[0]] = arr[1]\n reg.lastIndex--\n } else if (result[2]) {\n res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1)\n }\n }\n\n return res\n}\n","import parseTag from './parse-tag'\n\nconst tagRE = /<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g\nconst whitespaceRE = /^\\s*$/\n\n// re-used obj for quick lookups of components\nconst empty = Object.create(null)\n\nexport default function parse(html, options) {\n options || (options = {})\n options.components || (options.components = empty)\n const result = []\n const arr = []\n let current\n let level = -1\n let inComponent = false\n\n // handle text at top level\n if (html.indexOf('<') !== 0) {\n var end = html.indexOf('<')\n result.push({\n type: 'text',\n content: end === -1 ? html : html.substring(0, end),\n })\n }\n\n html.replace(tagRE, function (tag, index) {\n if (inComponent) {\n if (tag !== '</' + current.name + '>') {\n return\n } else {\n inComponent = false\n }\n }\n const isOpen = tag.charAt(1) !== '/'\n const isComment = tag.startsWith('<!--')\n const start = index + tag.length\n const nextChar = html.charAt(start)\n let parent\n\n if (isComment) {\n const comment = parseTag(tag)\n\n // if we're at root, push new base node\n if (level < 0) {\n result.push(comment)\n return result\n }\n parent = arr[level]\n parent.children.push(comment)\n return result\n }\n\n if (isOpen) {\n level++\n\n current = parseTag(tag)\n if (current.type === 'tag' && options.components[current.name]) {\n current.type = 'component'\n inComponent = true\n }\n\n if (\n !current.voidElement &&\n !inComponent &&\n nextChar &&\n nextChar !== '<'\n ) {\n current.children.push({\n type: 'text',\n content: html.slice(start, html.indexOf('<', start)),\n })\n }\n\n // if we're at root, push new base node\n if (level === 0) {\n result.push(current)\n }\n\n parent = arr[level - 1]\n\n if (parent) {\n parent.children.push(current)\n }\n\n arr[level] = current\n }\n\n if (!isOpen || current.voidElement) {\n if (\n level > -1 &&\n (current.voidElement || current.name === tag.slice(2, -1))\n ) {\n level--\n // move current up a level to match the end tag\n current = level === -1 ? result : arr[level]\n }\n if (!inComponent && nextChar !== '<' && nextChar) {\n // trailing text node\n // if we're at the root, push a base text node. otherwise add as\n // a child to the current node.\n parent = level === -1 ? result : arr[level].children\n\n // calculate correct end of the content slice in case there's\n // no tag after the text node.\n const end = html.indexOf('<', start)\n let content = html.slice(start, end === -1 ? undefined : end)\n // if a node is nothing but whitespace, collapse it as the spec states:\n // https://www.w3.org/TR/html4/struct/text.html#h-9.1\n if (whitespaceRE.test(content)) {\n content = ' '\n }\n // don't add whitespace-only text nodes if they would be trailing text nodes\n // or if they would be leading whitespace-only text nodes:\n // * end > -1 indicates this is not a trailing text node\n // * leading node is when level is -1 and parent has length 0\n if ((end > -1 && level + parent.length >= 0) || content !== ' ') {\n parent.push({\n type: 'text',\n content: content,\n })\n }\n }\n }\n })\n\n return result\n}\n","function attrString(attrs) {\n const buff = []\n for (let key in attrs) {\n buff.push(key + '=\"' + attrs[key] + '\"')\n }\n if (!buff.length) {\n return ''\n }\n return ' ' + buff.join(' ')\n}\n\nfunction stringify(buff, doc) {\n switch (doc.type) {\n case 'text':\n return buff + doc.content\n case 'tag':\n buff +=\n '<' +\n doc.name +\n (doc.attrs ? attrString(doc.attrs) : '') +\n (doc.voidElement ? '/>' : '>')\n if (doc.voidElement) {\n return buff\n }\n return buff + doc.children.reduce(stringify, '') + '</' + doc.name + '>'\n case 'comment':\n buff += '<!--' + doc.comment + '-->'\n return buff\n }\n}\n\nexport default function (doc) {\n return doc.reduce(function (token, rootEl) {\n return token + stringify('', rootEl)\n }, '')\n}\n","import parse from './parse'\nimport stringify from './stringify'\n\nexport default {\n parse,\n stringify,\n}\n"],"names":["attrRE","stringify","tag","res","type","name","voidElement","attrs","children","tagMatch","match","lookup","charAt","length","startsWith","endIndex","indexOf","comment","slice","reg","RegExp","result","exec","trim","attr","arr","split","lastIndex","substring","tagRE","whitespaceRE","empty","Object","create","buff","doc","content","key","push","join","attrString","reduce","parse","html","options","components","current","level","inComponent","end","replace","index","parent","isOpen","isComment","start","nextChar","parseTag","undefined","test","token","rootEl"],"mappings":"uTACA,IAAMA,EAAS,8DAESC,EAAUC,GAChC,IAAMC,EAAM,CACVC,KAAM,MACNC,KAAM,GACNC,aAAa,EACbC,MAAO,GACPC,SAAU,IAGNC,EAAWP,EAAIQ,MAAM,uBAC3B,GAAID,IACFN,EAAIE,KAAOI,EAAS,IAElBE,EAAOF,EAAS,KACe,MAA/BP,EAAIU,OAAOV,EAAIW,OAAS,MAExBV,EAAIG,aAAc,GAIhBH,EAAIE,KAAKS,WAAW,QAAQ,CAC9B,IAAMC,EAAWb,EAAIc,QAAQ,UAC7B,MAAO,CACLZ,KAAM,UACNa,SAAuB,IAAdF,EAAkBb,EAAIgB,MAAM,EAAGH,GAAY,IAO1D,IAFA,IAAMI,EAAM,IAAIC,OAAOpB,GACnBqB,EAAS,KAII,QAFfA,EAASF,EAAIG,KAAKpB,KAMlB,GAAKmB,EAAO,GAAGE,OAIf,GAAIF,EAAO,GAAI,CACb,IAAMG,EAAOH,EAAO,GAAGE,OACnBE,EAAM,CAACD,EAAM,IAEbA,EAAKR,QAAQ,MAAQ,IACvBS,EAAMD,EAAKE,MAAM,MAGnBvB,EAAII,MAAMkB,EAAI,IAAMA,EAAI,GACxBN,EAAIQ,iBACKN,EA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,EAAU,GAAI4D,IAC5B"}
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/i18next-browser-languagedetector/.github/stale.yml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
# Number of days of inactivity before an issue becomes stale
|
| 3 |
+
daysUntilStale: 7
|
| 4 |
+
# Number of days of inactivity before a stale issue is closed
|
| 5 |
+
daysUntilClose: 7
|
| 6 |
+
# Issues with these labels will never be considered stale
|
| 7 |
+
exemptLabels:
|
| 8 |
+
- "discussion"
|
| 9 |
+
- "feature request"
|
| 10 |
+
- "bug"
|
| 11 |
+
- "breaking change"
|
| 12 |
+
- "doc"
|
| 13 |
+
- "issue"
|
| 14 |
+
- "help wanted"
|
| 15 |
+
- "good first issue"
|
| 16 |
+
# Label to use when marking an issue as stale
|
| 17 |
+
staleLabel: stale
|
| 18 |
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
| 19 |
+
markComment: >
|
| 20 |
+
This issue has been automatically marked as stale because it has not had
|
| 21 |
+
recent activity. It will be closed if no further activity occurs. Thank you
|
| 22 |
+
for your contributions.
|
| 23 |
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
| 24 |
+
closeComment: false
|
novas/novacore-zephyr/claude-code-router/ui/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js
ADDED
|
@@ -0,0 +1,444 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const {
|
| 4 |
+
slice,
|
| 5 |
+
forEach
|
| 6 |
+
} = [];
|
| 7 |
+
function defaults(obj) {
|
| 8 |
+
forEach.call(slice.call(arguments, 1), source => {
|
| 9 |
+
if (source) {
|
| 10 |
+
for (const prop in source) {
|
| 11 |
+
if (obj[prop] === undefined) obj[prop] = source[prop];
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
});
|
| 15 |
+
return obj;
|
| 16 |
+
}
|
| 17 |
+
function hasXSS(input) {
|
| 18 |
+
if (typeof input !== 'string') return false;
|
| 19 |
+
|
| 20 |
+
// Common XSS attack patterns
|
| 21 |
+
const xssPatterns = [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i];
|
| 22 |
+
return xssPatterns.some(pattern => pattern.test(input));
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
// eslint-disable-next-line no-control-regex
|
| 26 |
+
const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
| 27 |
+
const serializeCookie = function (name, val) {
|
| 28 |
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
| 29 |
+
path: '/'
|
| 30 |
+
};
|
| 31 |
+
const opt = options;
|
| 32 |
+
const value = encodeURIComponent(val);
|
| 33 |
+
let str = `${name}=${value}`;
|
| 34 |
+
if (opt.maxAge > 0) {
|
| 35 |
+
const maxAge = opt.maxAge - 0;
|
| 36 |
+
if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
| 37 |
+
str += `; Max-Age=${Math.floor(maxAge)}`;
|
| 38 |
+
}
|
| 39 |
+
if (opt.domain) {
|
| 40 |
+
if (!fieldContentRegExp.test(opt.domain)) {
|
| 41 |
+
throw new TypeError('option domain is invalid');
|
| 42 |
+
}
|
| 43 |
+
str += `; Domain=${opt.domain}`;
|
| 44 |
+
}
|
| 45 |
+
if (opt.path) {
|
| 46 |
+
if (!fieldContentRegExp.test(opt.path)) {
|
| 47 |
+
throw new TypeError('option path is invalid');
|
| 48 |
+
}
|
| 49 |
+
str += `; Path=${opt.path}`;
|
| 50 |
+
}
|
| 51 |
+
if (opt.expires) {
|
| 52 |
+
if (typeof opt.expires.toUTCString !== 'function') {
|
| 53 |
+
throw new TypeError('option expires is invalid');
|
| 54 |
+
}
|
| 55 |
+
str += `; Expires=${opt.expires.toUTCString()}`;
|
| 56 |
+
}
|
| 57 |
+
if (opt.httpOnly) str += '; HttpOnly';
|
| 58 |
+
if (opt.secure) str += '; Secure';
|
| 59 |
+
if (opt.sameSite) {
|
| 60 |
+
const sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
|
| 61 |
+
switch (sameSite) {
|
| 62 |
+
case true:
|
| 63 |
+
str += '; SameSite=Strict';
|
| 64 |
+
break;
|
| 65 |
+
case 'lax':
|
| 66 |
+
str += '; SameSite=Lax';
|
| 67 |
+
break;
|
| 68 |
+
case 'strict':
|
| 69 |
+
str += '; SameSite=Strict';
|
| 70 |
+
break;
|
| 71 |
+
case 'none':
|
| 72 |
+
str += '; SameSite=None';
|
| 73 |
+
break;
|
| 74 |
+
default:
|
| 75 |
+
throw new TypeError('option sameSite is invalid');
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
if (opt.partitioned) str += '; Partitioned';
|
| 79 |
+
return str;
|
| 80 |
+
};
|
| 81 |
+
const cookie = {
|
| 82 |
+
create(name, value, minutes, domain) {
|
| 83 |
+
let cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
| 84 |
+
path: '/',
|
| 85 |
+
sameSite: 'strict'
|
| 86 |
+
};
|
| 87 |
+
if (minutes) {
|
| 88 |
+
cookieOptions.expires = new Date();
|
| 89 |
+
cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
|
| 90 |
+
}
|
| 91 |
+
if (domain) cookieOptions.domain = domain;
|
| 92 |
+
document.cookie = serializeCookie(name, value, cookieOptions);
|
| 93 |
+
},
|
| 94 |
+
read(name) {
|
| 95 |
+
const nameEQ = `${name}=`;
|
| 96 |
+
const ca = document.cookie.split(';');
|
| 97 |
+
for (let i = 0; i < ca.length; i++) {
|
| 98 |
+
let c = ca[i];
|
| 99 |
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
| 100 |
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
| 101 |
+
}
|
| 102 |
+
return null;
|
| 103 |
+
},
|
| 104 |
+
remove(name, domain) {
|
| 105 |
+
this.create(name, '', -1, domain);
|
| 106 |
+
}
|
| 107 |
+
};
|
| 108 |
+
var cookie$1 = {
|
| 109 |
+
name: 'cookie',
|
| 110 |
+
// Deconstruct the options object and extract the lookupCookie property
|
| 111 |
+
lookup(_ref) {
|
| 112 |
+
let {
|
| 113 |
+
lookupCookie
|
| 114 |
+
} = _ref;
|
| 115 |
+
if (lookupCookie && typeof document !== 'undefined') {
|
| 116 |
+
return cookie.read(lookupCookie) || undefined;
|
| 117 |
+
}
|
| 118 |
+
return undefined;
|
| 119 |
+
},
|
| 120 |
+
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
| 121 |
+
cacheUserLanguage(lng, _ref2) {
|
| 122 |
+
let {
|
| 123 |
+
lookupCookie,
|
| 124 |
+
cookieMinutes,
|
| 125 |
+
cookieDomain,
|
| 126 |
+
cookieOptions
|
| 127 |
+
} = _ref2;
|
| 128 |
+
if (lookupCookie && typeof document !== 'undefined') {
|
| 129 |
+
cookie.create(lookupCookie, lng, cookieMinutes, cookieDomain, cookieOptions);
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
};
|
| 133 |
+
|
| 134 |
+
var querystring = {
|
| 135 |
+
name: 'querystring',
|
| 136 |
+
// Deconstruct the options object and extract the lookupQuerystring property
|
| 137 |
+
lookup(_ref) {
|
| 138 |
+
let {
|
| 139 |
+
lookupQuerystring
|
| 140 |
+
} = _ref;
|
| 141 |
+
let found;
|
| 142 |
+
if (typeof window !== 'undefined') {
|
| 143 |
+
let {
|
| 144 |
+
search
|
| 145 |
+
} = window.location;
|
| 146 |
+
if (!window.location.search && window.location.hash?.indexOf('?') > -1) {
|
| 147 |
+
search = window.location.hash.substring(window.location.hash.indexOf('?'));
|
| 148 |
+
}
|
| 149 |
+
const query = search.substring(1);
|
| 150 |
+
const params = query.split('&');
|
| 151 |
+
for (let i = 0; i < params.length; i++) {
|
| 152 |
+
const pos = params[i].indexOf('=');
|
| 153 |
+
if (pos > 0) {
|
| 154 |
+
const key = params[i].substring(0, pos);
|
| 155 |
+
if (key === lookupQuerystring) {
|
| 156 |
+
found = params[i].substring(pos + 1);
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
return found;
|
| 162 |
+
}
|
| 163 |
+
};
|
| 164 |
+
|
| 165 |
+
var hash = {
|
| 166 |
+
name: 'hash',
|
| 167 |
+
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
| 168 |
+
lookup(_ref) {
|
| 169 |
+
let {
|
| 170 |
+
lookupHash,
|
| 171 |
+
lookupFromHashIndex
|
| 172 |
+
} = _ref;
|
| 173 |
+
let found;
|
| 174 |
+
if (typeof window !== 'undefined') {
|
| 175 |
+
const {
|
| 176 |
+
hash
|
| 177 |
+
} = window.location;
|
| 178 |
+
if (hash && hash.length > 2) {
|
| 179 |
+
const query = hash.substring(1);
|
| 180 |
+
if (lookupHash) {
|
| 181 |
+
const params = query.split('&');
|
| 182 |
+
for (let i = 0; i < params.length; i++) {
|
| 183 |
+
const pos = params[i].indexOf('=');
|
| 184 |
+
if (pos > 0) {
|
| 185 |
+
const key = params[i].substring(0, pos);
|
| 186 |
+
if (key === lookupHash) {
|
| 187 |
+
found = params[i].substring(pos + 1);
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
if (found) return found;
|
| 193 |
+
if (!found && lookupFromHashIndex > -1) {
|
| 194 |
+
const language = hash.match(/\/([a-zA-Z-]*)/g);
|
| 195 |
+
if (!Array.isArray(language)) return undefined;
|
| 196 |
+
const index = typeof lookupFromHashIndex === 'number' ? lookupFromHashIndex : 0;
|
| 197 |
+
return language[index]?.replace('/', '');
|
| 198 |
+
}
|
| 199 |
+
}
|
| 200 |
+
}
|
| 201 |
+
return found;
|
| 202 |
+
}
|
| 203 |
+
};
|
| 204 |
+
|
| 205 |
+
let hasLocalStorageSupport = null;
|
| 206 |
+
const localStorageAvailable = () => {
|
| 207 |
+
if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
|
| 208 |
+
try {
|
| 209 |
+
hasLocalStorageSupport = typeof window !== 'undefined' && window.localStorage !== null;
|
| 210 |
+
if (!hasLocalStorageSupport) {
|
| 211 |
+
return false;
|
| 212 |
+
}
|
| 213 |
+
const testKey = 'i18next.translate.boo';
|
| 214 |
+
window.localStorage.setItem(testKey, 'foo');
|
| 215 |
+
window.localStorage.removeItem(testKey);
|
| 216 |
+
} catch (e) {
|
| 217 |
+
hasLocalStorageSupport = false;
|
| 218 |
+
}
|
| 219 |
+
return hasLocalStorageSupport;
|
| 220 |
+
};
|
| 221 |
+
var localStorage = {
|
| 222 |
+
name: 'localStorage',
|
| 223 |
+
// Deconstruct the options object and extract the lookupLocalStorage property
|
| 224 |
+
lookup(_ref) {
|
| 225 |
+
let {
|
| 226 |
+
lookupLocalStorage
|
| 227 |
+
} = _ref;
|
| 228 |
+
if (lookupLocalStorage && localStorageAvailable()) {
|
| 229 |
+
return window.localStorage.getItem(lookupLocalStorage) || undefined; // Undefined ensures type consistency with the previous version of this function
|
| 230 |
+
}
|
| 231 |
+
return undefined;
|
| 232 |
+
},
|
| 233 |
+
// Deconstruct the options object and extract the lookupLocalStorage property
|
| 234 |
+
cacheUserLanguage(lng, _ref2) {
|
| 235 |
+
let {
|
| 236 |
+
lookupLocalStorage
|
| 237 |
+
} = _ref2;
|
| 238 |
+
if (lookupLocalStorage && localStorageAvailable()) {
|
| 239 |
+
window.localStorage.setItem(lookupLocalStorage, lng);
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
};
|
| 243 |
+
|
| 244 |
+
let hasSessionStorageSupport = null;
|
| 245 |
+
const sessionStorageAvailable = () => {
|
| 246 |
+
if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
|
| 247 |
+
try {
|
| 248 |
+
hasSessionStorageSupport = typeof window !== 'undefined' && window.sessionStorage !== null;
|
| 249 |
+
if (!hasSessionStorageSupport) {
|
| 250 |
+
return false;
|
| 251 |
+
}
|
| 252 |
+
const testKey = 'i18next.translate.boo';
|
| 253 |
+
window.sessionStorage.setItem(testKey, 'foo');
|
| 254 |
+
window.sessionStorage.removeItem(testKey);
|
| 255 |
+
} catch (e) {
|
| 256 |
+
hasSessionStorageSupport = false;
|
| 257 |
+
}
|
| 258 |
+
return hasSessionStorageSupport;
|
| 259 |
+
};
|
| 260 |
+
var sessionStorage = {
|
| 261 |
+
name: 'sessionStorage',
|
| 262 |
+
lookup(_ref) {
|
| 263 |
+
let {
|
| 264 |
+
lookupSessionStorage
|
| 265 |
+
} = _ref;
|
| 266 |
+
if (lookupSessionStorage && sessionStorageAvailable()) {
|
| 267 |
+
return window.sessionStorage.getItem(lookupSessionStorage) || undefined;
|
| 268 |
+
}
|
| 269 |
+
return undefined;
|
| 270 |
+
},
|
| 271 |
+
cacheUserLanguage(lng, _ref2) {
|
| 272 |
+
let {
|
| 273 |
+
lookupSessionStorage
|
| 274 |
+
} = _ref2;
|
| 275 |
+
if (lookupSessionStorage && sessionStorageAvailable()) {
|
| 276 |
+
window.sessionStorage.setItem(lookupSessionStorage, lng);
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
};
|
| 280 |
+
|
| 281 |
+
var navigator$1 = {
|
| 282 |
+
name: 'navigator',
|
| 283 |
+
lookup(options) {
|
| 284 |
+
const found = [];
|
| 285 |
+
if (typeof navigator !== 'undefined') {
|
| 286 |
+
const {
|
| 287 |
+
languages,
|
| 288 |
+
userLanguage,
|
| 289 |
+
language
|
| 290 |
+
} = navigator;
|
| 291 |
+
if (languages) {
|
| 292 |
+
// chrome only; not an array, so can't use .push.apply instead of iterating
|
| 293 |
+
for (let i = 0; i < languages.length; i++) {
|
| 294 |
+
found.push(languages[i]);
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
if (userLanguage) {
|
| 298 |
+
found.push(userLanguage);
|
| 299 |
+
}
|
| 300 |
+
if (language) {
|
| 301 |
+
found.push(language);
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
return found.length > 0 ? found : undefined;
|
| 305 |
+
}
|
| 306 |
+
};
|
| 307 |
+
|
| 308 |
+
var htmlTag = {
|
| 309 |
+
name: 'htmlTag',
|
| 310 |
+
// Deconstruct the options object and extract the htmlTag property
|
| 311 |
+
lookup(_ref) {
|
| 312 |
+
let {
|
| 313 |
+
htmlTag
|
| 314 |
+
} = _ref;
|
| 315 |
+
let found;
|
| 316 |
+
const internalHtmlTag = htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
|
| 317 |
+
if (internalHtmlTag && typeof internalHtmlTag.getAttribute === 'function') {
|
| 318 |
+
found = internalHtmlTag.getAttribute('lang');
|
| 319 |
+
}
|
| 320 |
+
return found;
|
| 321 |
+
}
|
| 322 |
+
};
|
| 323 |
+
|
| 324 |
+
var path = {
|
| 325 |
+
name: 'path',
|
| 326 |
+
// Deconstruct the options object and extract the lookupFromPathIndex property
|
| 327 |
+
lookup(_ref) {
|
| 328 |
+
let {
|
| 329 |
+
lookupFromPathIndex
|
| 330 |
+
} = _ref;
|
| 331 |
+
if (typeof window === 'undefined') return undefined;
|
| 332 |
+
const language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
| 333 |
+
if (!Array.isArray(language)) return undefined;
|
| 334 |
+
const index = typeof lookupFromPathIndex === 'number' ? lookupFromPathIndex : 0;
|
| 335 |
+
return language[index]?.replace('/', '');
|
| 336 |
+
}
|
| 337 |
+
};
|
| 338 |
+
|
| 339 |
+
var subdomain = {
|
| 340 |
+
name: 'subdomain',
|
| 341 |
+
lookup(_ref) {
|
| 342 |
+
let {
|
| 343 |
+
lookupFromSubdomainIndex
|
| 344 |
+
} = _ref;
|
| 345 |
+
// If given get the subdomain index else 1
|
| 346 |
+
const internalLookupFromSubdomainIndex = typeof lookupFromSubdomainIndex === 'number' ? lookupFromSubdomainIndex + 1 : 1;
|
| 347 |
+
// get all matches if window.location. is existing
|
| 348 |
+
// first item of match is the match itself and the second is the first group match which should be the first subdomain match
|
| 349 |
+
// is the hostname no public domain get the or option of localhost
|
| 350 |
+
const language = typeof window !== 'undefined' && window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
|
| 351 |
+
|
| 352 |
+
// if there is no match (null) return undefined
|
| 353 |
+
if (!language) return undefined;
|
| 354 |
+
// return the given group match
|
| 355 |
+
return language[internalLookupFromSubdomainIndex];
|
| 356 |
+
}
|
| 357 |
+
};
|
| 358 |
+
|
| 359 |
+
// some environments, throws when accessing document.cookie
|
| 360 |
+
let canCookies = false;
|
| 361 |
+
try {
|
| 362 |
+
// eslint-disable-next-line no-unused-expressions
|
| 363 |
+
document.cookie;
|
| 364 |
+
canCookies = true;
|
| 365 |
+
// eslint-disable-next-line no-empty
|
| 366 |
+
} catch (e) {}
|
| 367 |
+
const order = ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'];
|
| 368 |
+
if (!canCookies) order.splice(1, 1);
|
| 369 |
+
const getDefaults = () => ({
|
| 370 |
+
order,
|
| 371 |
+
lookupQuerystring: 'lng',
|
| 372 |
+
lookupCookie: 'i18next',
|
| 373 |
+
lookupLocalStorage: 'i18nextLng',
|
| 374 |
+
lookupSessionStorage: 'i18nextLng',
|
| 375 |
+
// cache user language
|
| 376 |
+
caches: ['localStorage'],
|
| 377 |
+
excludeCacheFor: ['cimode'],
|
| 378 |
+
// cookieMinutes: 10,
|
| 379 |
+
// cookieDomain: 'myDomain'
|
| 380 |
+
|
| 381 |
+
convertDetectedLanguage: l => l
|
| 382 |
+
});
|
| 383 |
+
class Browser {
|
| 384 |
+
constructor(services) {
|
| 385 |
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
| 386 |
+
this.type = 'languageDetector';
|
| 387 |
+
this.detectors = {};
|
| 388 |
+
this.init(services, options);
|
| 389 |
+
}
|
| 390 |
+
init() {
|
| 391 |
+
let services = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
| 392 |
+
languageUtils: {}
|
| 393 |
+
};
|
| 394 |
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
| 395 |
+
let i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
| 396 |
+
this.services = services;
|
| 397 |
+
this.options = defaults(options, this.options || {}, getDefaults());
|
| 398 |
+
if (typeof this.options.convertDetectedLanguage === 'string' && this.options.convertDetectedLanguage.indexOf('15897') > -1) {
|
| 399 |
+
this.options.convertDetectedLanguage = l => l.replace('-', '_');
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// backwards compatibility
|
| 403 |
+
if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
|
| 404 |
+
this.i18nOptions = i18nOptions;
|
| 405 |
+
this.addDetector(cookie$1);
|
| 406 |
+
this.addDetector(querystring);
|
| 407 |
+
this.addDetector(localStorage);
|
| 408 |
+
this.addDetector(sessionStorage);
|
| 409 |
+
this.addDetector(navigator$1);
|
| 410 |
+
this.addDetector(htmlTag);
|
| 411 |
+
this.addDetector(path);
|
| 412 |
+
this.addDetector(subdomain);
|
| 413 |
+
this.addDetector(hash);
|
| 414 |
+
}
|
| 415 |
+
addDetector(detector) {
|
| 416 |
+
this.detectors[detector.name] = detector;
|
| 417 |
+
return this;
|
| 418 |
+
}
|
| 419 |
+
detect() {
|
| 420 |
+
let detectionOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.order;
|
| 421 |
+
let detected = [];
|
| 422 |
+
detectionOrder.forEach(detectorName => {
|
| 423 |
+
if (this.detectors[detectorName]) {
|
| 424 |
+
let lookup = this.detectors[detectorName].lookup(this.options);
|
| 425 |
+
if (lookup && typeof lookup === 'string') lookup = [lookup];
|
| 426 |
+
if (lookup) detected = detected.concat(lookup);
|
| 427 |
+
}
|
| 428 |
+
});
|
| 429 |
+
detected = detected.filter(d => d !== undefined && d !== null && !hasXSS(d)).map(d => this.options.convertDetectedLanguage(d));
|
| 430 |
+
if (this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
|
| 431 |
+
return detected.length > 0 ? detected[0] : null; // a little backward compatibility
|
| 432 |
+
}
|
| 433 |
+
cacheUserLanguage(lng) {
|
| 434 |
+
let caches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.caches;
|
| 435 |
+
if (!caches) return;
|
| 436 |
+
if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
|
| 437 |
+
caches.forEach(cacheName => {
|
| 438 |
+
if (this.detectors[cacheName]) this.detectors[cacheName].cacheUserLanguage(lng, this.options);
|
| 439 |
+
});
|
| 440 |
+
}
|
| 441 |
+
}
|
| 442 |
+
Browser.type = 'languageDetector';
|
| 443 |
+
|
| 444 |
+
module.exports = Browser;
|