docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VariableBase = void 0;
const ID_1 = require("../ID");
const generator = (0, ID_1.createIdGenerator)();
class VariableBase {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
$id = generator();
/**
* The array of the definitions of this variable.
* @public
*/
defs = [];
/**
* True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise.
* @public
*/
eslintUsed = false;
/**
* The array of `Identifier` nodes which define this variable.
* If this variable is redeclared, this array includes two or more nodes.
* @public
*/
identifiers = [];
/**
* The variable name, as given in the source code.
* @public
*/
name;
/**
* List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes.
* For defining occurrences only see {@link Variable#defs}.
* @public
*/
references = [];
/**
* Reference to the enclosing Scope.
*/
scope;
constructor(name, scope) {
this.name = name;
this.scope = scope;
}
}
exports.VariableBase = VariableBase;
@@ -0,0 +1 @@
{"version":3,"file":"compass.js","sources":["../../../src/icons/compass.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Compass\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYuMjQgNy43Ni0xLjgwNCA1LjQxMWEyIDIgMCAwIDEtMS4yNjUgMS4yNjVMNy43NiAxNi4yNGwxLjgwNC01LjQxMWEyIDIgMCAwIDEgMS4yNjUtMS4yNjV6IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/compass\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Compass = createLucideIcon('Compass', [\n [\n 'path',\n {\n d: 'm16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z',\n key: '9ktpf1',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n]);\n\nexport default Compass;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,32 @@
/*!
* toidentifier
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = toIdentifier
/**
* Trasform the given string into a JavaScript identifier
*
* @param {string} str
* @returns {string}
* @public
*/
function toIdentifier (str) {
return str
.split(' ')
.map(function (token) {
return token.slice(0, 1).toUpperCase() + token.slice(1)
})
.join('')
.replace(/[^ _0-9a-z]/gi, '')
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_rQ _i","2":"_0 _HO"},C:{"1":"_wO","2":"_xD _0G"},D:{"1":"_rQ _l","2":"_v _HO"},E:{"2":"_R"},F:{"1":"_EK","2":"_VR"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"2":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_EC","2":"_MK"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly Tail Calls",D:false};
@@ -0,0 +1 @@
{"version":3,"names":["min","Math","levenshtein","a","b","t","u","i","j","m","length","n","findSuggestion","str","arr","distances","map","el","indexOf"],"sources":["../src/find-suggestion.ts"],"sourcesContent":["const { min } = Math;\n\n// a minimal leven distance implementation\n// balanced maintainability with code size\n// It is not blazingly fast but should be okay for Babel user case\n// where it will be run for at most tens of time on strings\n// that have less than 20 ASCII characters\n\n// https://rosettacode.org/wiki/Levenshtein_distance#ES5\nfunction levenshtein(a: string, b: string): number {\n let t = [],\n u: number[] = [],\n i,\n j;\n const m = a.length,\n n = b.length;\n if (!m) {\n return n;\n }\n if (!n) {\n return m;\n }\n for (j = 0; j <= n; j++) {\n t[j] = j;\n }\n for (i = 1; i <= m; i++) {\n for (u = [i], j = 1; j <= n; j++) {\n u[j] =\n a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;\n }\n t = u;\n }\n return u[n];\n}\n\n/**\n * Given a string `str` and an array of candidates `arr`,\n * return the first of elements in candidates that has minimal\n * Levenshtein distance with `str`.\n * @export\n * @param {string} str\n * @param {string[]} arr\n * @returns {string}\n */\nexport function findSuggestion(str: string, arr: readonly string[]): string {\n const distances = arr.map<number>(el => levenshtein(el, str));\n return arr[distances.indexOf(min(...distances))];\n}\n"],"mappings":";;;;;;AAAA,MAAM;EAAEA;AAAI,CAAC,GAAGC,IA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CAACG,OAAO,CAAClB,GAAG,CAAC,GAAGe,SAAS,CAAC,CAAC,CAAC;AAClD","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={C:{"71":0.01434,"78":0.10041,"115":0.19364,"120":0.00717,"121":0.02152,"124":0.07889,"125":0.02152,"135":0.00717,"140":0.00717,"144":0.06455,"149":0.00717,"150":0.08606,"152":0.01434,"153":0.0502,"154":2.2807,"155":4.79807,"156":0.88933,"157":0.01434,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 126 127 128 129 130 131 132 133 134 136 137 138 139 141 142 143 145 146 147 148 151 158 159 160 3.5 3.6"},D:{"87":0.00717,"103":0.10758,"104":0.00717,"107":0.00717,"108":0.02869,"109":0.55224,"111":0.00717,"112":0.00717,"116":0.06455,"117":0.02152,"118":0.04303,"119":0.00717,"120":0.01434,"121":0.02869,"122":0.01434,"124":0.05738,"128":0.0502,"130":0.00717,"131":0.23668,"133":0.08606,"134":0.0502,"135":0.07889,"136":0.10041,"137":0.09324,"138":0.1291,"139":0.1291,"140":0.09324,"141":0.08606,"142":0.24385,"143":0.03586,"145":0.25102,"146":0.03586,"147":0.0502,"148":0.08606,"149":0.06455,"150":0.33708,"151":1.78583,"152":8.70681,"153":13.56942,"154":2.48151,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 105 106 110 113 114 115 123 125 126 127 129 132 144 155 156 157"},F:{"75":0.00717,"95":0.00717,"133":0.00717,"134":0.02869,"135":0.42315,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"89":0.00717,"119":0.00717,"120":0.00717,"145":0.00717,"146":0.02152,"147":0.00717,"148":0.00717,"150":0.02869,"151":0.31557,"152":0.67417,"153":0.5881,"154":0.18647,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 149"},E:{"27":0.32991,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 15.2-15.3 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 18.1 18.4 18.5-18.7 27.1 27.2 TP","12.1":0.07889,"13.1":0.03586,"14.1":0.02152,"15.1":0.00717,"15.4":0.00717,"15.6":0.02869,"16.6":0.11475,"17.1":0.02869,"17.4":0.02152,"17.5":0.02152,"17.6":0.07172,"18.0":0.00717,"18.2":0.00717,"18.3":0.0502,"26.0":0.00717,"26.1":0.02152,"26.2":0.07172,"26.3":0.0502,"26.4":0.02152,"26.5":0.75306,"26.6":1.33399},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00079,"5.0-5.1":0.00079,"6.0-6.1":0,"7.0-7.1":0.00157,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00787,"11.0-11.2":0.00079,"11.3-11.4":0.00157,"12.0-12.1":0,"12.2-12.5":0.02047,"13.0-13.1":0,"13.2":0.00394,"13.3":0,"13.4-13.7":0.00079,"14.0-14.4":0.00315,"14.5-14.8":0.00472,"15.0-15.1":0.00472,"15.2-15.3":0.00315,"15.4":0.00394,"15.5":0.00472,"15.6-15.8":0.10235,"16.0":0.00787,"16.1":0.01417,"16.2":0.00787,"16.3":0.01732,"16.4":0.00394,"16.5":0.0063,"16.6-16.7":0.1425,"17.0":0.00551,"17.1":0.00787,"17.2":0.00787,"17.3":0.01181,"17.4":0.01653,"17.5":0.03228,"17.6-17.7":0.08346,"18.0":0.01732,"18.1":0.03464,"18.2":0.04724,"18.3":0.08188,"18.4":0.05118,"18.5-18.7":1.05737,"26.0":0.05118,"26.1":0.05196,"26.2":0.13542,"26.3":0.14644,"26.4":0.10708,"26.5":0.71725,"26.6":4.42552,"27.0":0.33933,"27.1":0,"27.2":0.00866},P:{"24":0.00039,"26":0.00039,"30":1.06462,_:"4 20 21 22 23 25 27 28 29 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 16.0 17.0 18.0 19.0","15.0":0.00039},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.00565,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":19.05549},R:{_:"0"},M:{"0":0.4297},Q:{_:"14.9"},O:{_:"0"},H:{all:0}};
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Egg = createLucideIcon("Egg", [
[
"path",
{
d: "M12 22c6.23-.05 7.87-5.57 7.5-10-.36-4.34-3.95-9.96-7.5-10-3.55.04-7.14 5.66-7.5 10-.37 4.43 1.27 9.95 7.5 10z",
key: "1c39pg"
}
]
]);
export { Egg as default };
//# sourceMappingURL=egg.js.map
@@ -0,0 +1 @@
{"version":3,"file":"club.js","sources":["../../../src/icons/club.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Club\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuMjggOS4wNWE1LjUgNS41IDAgMSAwLTEwLjU2IDBBNS41IDUuNSAwIDEgMCAxMiAxNy42NmE1LjUgNS41IDAgMSAwIDUuMjgtOC42WiIgLz4KICA8cGF0aCBkPSJNMTIgMTcuNjZMMTIgMjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/club\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Club = createLucideIcon('Club', [\n [\n 'path',\n {\n d: 'M17.28 9.05a5.5 5.5 0 1 0-10.56 0A5.5 5.5 0 1 0 12 17.66a5.5 5.5 0 1 0 5.28-8.6Z',\n key: '27yuqz',\n },\n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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_BQ _WC","2":"_o _vD _L"},D:{"1":"_2O","2":"_BR"},E:{"1":"_PC","2":"_qB","132":"B"},F:{"1":"_6P _2N","2":"_cF _SE _O"},G:{"1":"_NC","2":"_XB","132":"mD"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_DF","2":"_OD"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:7,C:"CSS Environment Variables env()",D:true};
@@ -0,0 +1,14 @@
import type { Linter } from "eslint";
declare const js: {
readonly meta: {
readonly name: string;
readonly version: string;
};
readonly configs: {
readonly recommended: { readonly rules: Readonly<Linter.RulesRecord> };
readonly all: { readonly rules: Readonly<Linter.RulesRecord> };
};
};
export = js;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_4D","2":"_KB"},C:{"1":"_KQ _bF","2":"_UN vB _L"},D:{"1":"_1H","2":"_8E"},E:{"1":"_BI","2":"_TB","132":"_A _ID"},F:{"1":"_BM","2":"_GP"},G:{"1":"_BB","2":"_OB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"WOFF 2.0 - Web Open Font Format",D:true};
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.umask = void 0;
// separate file so I stop getting nagged in vim about deprecated API.
const umask = () => process.umask();
exports.umask = umask;
//# sourceMappingURL=process-umask.js.map
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Wrench = createLucideIcon("Wrench", [
[
"path",
{
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",
key: "cbrjhi"
}
]
]);
export { Wrench as default };
//# sourceMappingURL=wrench.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subject.mjs","sources":["../../../../src/animation/animate/subject.ts"],"sourcesContent":["import {\n animateTarget,\n AnimationPlaybackControlsWithThen,\n AnimationScope,\n AnyResolvedKeyframe,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n isMotionValue,\n MotionValue,\n TargetAndTransition,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n visualElementStore,\n} from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { ObjectTarget } from \"../sequence/types\"\nimport {\n createDOMVisualElement,\n createObjectVisualElement,\n} from \"../utils/create-visual-element\"\nimport { isDOMKeyframes } from \"../utils/is-dom-keyframes\"\nimport { resolveSubjects } from \"./resolve-subjects\"\nimport { animateSingleValue } from \"motion-dom\"\n\nexport type AnimationSubject = Element | MotionValue<any> | any\n\nfunction isSingleValue(\n subject: unknown,\n keyframes: unknown\n): subject is MotionValue | AnyResolvedKeyframe {\n return (\n isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes))\n )\n}\n\n/**\n * Animate a string\n */\nexport function animateSubject(\n value: string | MotionValue<string>,\n keyframes: string | UnresolvedValueKeyframe<string>[],\n options?: ValueAnimationTransition<string>\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a number\n */\nexport function animateSubject(\n value: number | MotionValue<number>,\n keyframes: number | UnresolvedValueKeyframe<number>[],\n options?: ValueAnimationTransition<number>\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a Element\n */\nexport function animateSubject(\n element: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[]\n/**\n * Animate a object\n */\nexport function animateSubject<O extends Object>(\n object: O | O[],\n keyframes: ObjectTarget<O>,\n options?: DynamicAnimationOptions\n): AnimationPlaybackControlsWithThen[]\n/**\n * Implementation\n */\nexport function animateSubject<O extends Object>(\n subject:\n | MotionValue<number>\n | MotionValue<string>\n | number\n | string\n | ElementOrSelector\n | O\n | O[],\n keyframes:\n | number\n | string\n | UnresolvedValueKeyframe<number>[]\n | UnresolvedValueKeyframe<string>[]\n | DOMKeyframesDefinition\n | ObjectTarget<O>,\n options?:\n | ValueAnimationTransition<number>\n | ValueAnimationTransition<string>\n | DynamicAnimationOptions,\n scope?: AnimationScope\n): AnimationPlaybackControlsWithThen[] {\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n if (isSingleValue(subject, keyframes)) {\n animations.push(\n animateSingleValue(\n subject,\n isDOMKeyframes(keyframes)\n ? (keyframes as any).default || keyframes\n : keyframes,\n options ? (options as any).default || options : options\n )\n )\n } else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations\n }\n\n const subjects = resolveSubjects(\n subject,\n keyframes as DOMKeyframesDefinition,\n scope\n )\n\n const numSubjects = subjects.length\n\n invariant(\n Boolean(numSubjects),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i]\n\n const createVisualElement =\n thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement\n\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject as any)\n }\n\n const visualElement = visualElementStore.get(thisSubject)!\n const transition = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (\n \"delay\" in transition &&\n typeof transition.delay === \"function\"\n ) {\n transition.delay = transition.delay(i, numSubjects)\n }\n\n animations.push(\n ...animateTarget(\n visualElement,\n { ...(keyframes as {}), transition } as TargetAndTransition,\n {}\n )\n )\n }\n }\n\n return animations\n}\n"],"names":[],"mappLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"chevron-last.js","sources":["../../../src/icons/chevron-last.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronLast\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxOCA2LTYtNi02IiAvPgogIDxwYXRoIGQ9Ik0xNyA2djEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chevron-last\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLast = createLucideIcon('ChevronLast', [\n ['path', { d: 'm7 18 6-6-6-6', key: 'lwmzdw' }],\n ['path', { d: 'M17 6v12', key: '1o0aio' }],\n]);\n\nexport default ChevronLast;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,77 @@
import type { SourceType, TSESTree } from '@typescript-eslint/types';
import type { Scope } from './scope';
import type { Variable } from './variable';
import { BlockScope, CatchScope, ClassScope, ConditionalTypeScope, ForScope, FunctionExpressionNameScope, FunctionScope, FunctionTypeScope, GlobalScope, MappedTypeScope, ModuleScope, SwitchScope, TSEnumScope, TSModuleScope, TypeScope, WithScope } from './scope';
import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope';
import { ClassStaticBlockScope } from './scope/ClassStaticBlockScope';
interface ScopeManagerOptions {
globalReturn?: boolean;
impliedStrict?: boolean;
sourceType?: SourceType;
}
/**
* @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface
*/
export declare class ScopeManager {
#private;
currentScope: Scope | null;
readonly declaredVariables: WeakMap<TSESTree.Node, Variable[]>;
/**
* The root scope
*/
globalScope: GlobalScope | null;
readonly nodeToScope: WeakMap<TSESTree.Node, Scope[]>;
/**
* All scopes
* @public
*/
readonly scopes: Scope[];
constructor(options: ScopeManagerOptions);
isES6(): boolean;
isGlobalReturn(): boolean;
isImpliedStrict(): boolean;
isModule(): boolean;
isStrictModeSupported(): boolean;
get variables(): Variable[];
/**
* Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node.
* If the node does not define any variable, this returns an empty array.
* @param node An AST node to get their variables.
*/
getDeclaredVariables(node: TSESTree.Node): Variable[];
/**
* Get the scope of a given AST node. The gotten scope's `block` property is the node.
* This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`.
*
* @param node An AST node to get their scope.
* @param inner If the node has multiple scopes, this returns the outermost scope normally.
* If `inner` is `true` then this returns the innermost scope.
*/
acquire(node: TSESTree.Node, inner?: boolean): Scope | null;
/**
* Adds dynamically created globals to the global scope and resolve their references.
* This method is called by ESLint.
* @param names Names of the globals to create
*/
addGlobals(names: string[]): void;
nestBlockScope(node: BlockScope['block']): BlockScope;
nestCatchScope(node: CatchScope['block']): CatchScope;
nestClassFieldInitializerScope(node: ClassFieldInitializerScope['block']): ClassFieldInitializerScope;
nestClassScope(node: ClassScope['block']): ClassScope;
nestClassStaticBlockScope(node: ClassStaticBlockScope['block']): ClassStaticBlockScope;
nestConditionalTypeScope(node: ConditionalTypeScope['block']): ConditionalTypeScope;
nestForScope(node: ForScope['block']): ForScope;
nestFunctionExpressionNameScope(node: FunctionExpressionNameScope['block']): FunctionExpressionNameScope;
nestFunctionScope(node: FunctionScope['block'], isMethodDefinition: boolean): FunctionScope;
nestFunctionTypeScope(node: FunctionTypeScope['block']): FunctionTypeScope;
nestGlobalScope(node: GlobalScope['block']): GlobalScope;
nestMappedTypeScope(node: MappedTypeScope['block']): MappedTypeScope;
nestModuleScope(node: ModuleScope['block']): ModuleScope;
nestSwitchScope(node: SwitchScope['block']): SwitchScope;
nestTSEnumScope(node: TSEnumScope['block']): TSEnumScope;
nestTSModuleScope(node: TSModuleScope['block']): TSModuleScope;
nestTypeScope(node: TypeScope['block']): TypeScope;
nestWithScope(node: WithScope['block']): WithScope;
protected nestScope<T extends Scope>(scope: T): T;
}
export {};
@@ -0,0 +1,12 @@
'use strict'
const Range = require('../classes/range')
const satisfies = (version, range, options) => {
try {
range = new Range(range, options)
} catch (er) {
return false
}
return range.test(version)
}
module.exports = satisfies
@@ -0,0 +1 @@
{"version":3,"file":"user-x-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,203 @@
import { runInThisContext } from 'node:vm';
import * as spyModule from '@vitest/spy';
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.DXx9Dtk7.js';
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.k9zZ9sLh.js';
import { N as NativeModuleRunner } from './nativeModuleRunner.BIakptoF.js';
import { T as Traces } from './traces.DT5aQ62U.js';
import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startVitestModuleRunner.DB-7oCpn.js';
import { performance as performance$1 } from 'node:perf_hooks';
import { startTests, collectTests } from '@vitest/runner';
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from './setup-common.DYx3LtFI.js';
import { g as globalExpect, v as vi } from './test.DNmyFkvJ.js';
import { c as closeInspector } from './inspector.CvyFGlXm.js';
import { createRequire } from 'node:module';
import timers from 'node:timers';
import timersPromises from 'node:timers/promises';
import util from 'node:util';
import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
import { i as index } from './index.DdgEv5B1.js';
import { g as getWorkerState, r as resetModules, p as provideWorkerState, a as getSafeWorkerState } from './utils.BX5Fg8C4.js';
// this should only be used in Node
let globalSetup = false;
async function setupGlobalEnv(config, environment) {
await setupCommonEnv(config);
Object.defineProperty(globalThis, "__vitest_index__", {
value: index,
enumerable: false
});
globalExpect.setState({ environment: environment.name });
if (globalSetup) return;
globalSetup = true;
if ((environment.viteEnvironment || environment.name) === "client") {
const _require = createRequire(import.meta.url);
// always mock "required" `css` files, because we cannot process them
_require.extensions[".css"] = resolveCss;
_require.extensions[".scss"] = resolveCss;
_require.extensions[".sass"] = resolveCss;
_require.extensions[".less"] = resolveCss;
// since we are using Vite, we can assume how these will be resolved
KNOWN_ASSET_TYPES.forEach((type) => {
_require.extensions[`.${type}`] = resolveAsset;
});
process.env.SSR = "";
} else process.env.SSR = "1";
// @ts-expect-error not typed global for patched timers
globalThis.__vitest_required__ = {
util,
timers,
timersPromises
};
if (!config.disableConsoleIntercept) await setupConsoleLogSpy();
}
function resolveCss(mod) {
mod.exports = "";
}
function resolveAsset(mod, url) {
mod.exports = url;
}
async function setupConsoleLogSpy() {
const { createCustomConsole } = await import('./console.3WNpx0tS.js');
globalThis.console = createCustomConsole();
}
// browser shouldn't call this!
async function run(method, files, config, moduleRunner, environment, traces) {
const workerState = getWorkerState();
const [testRunner] = await Promise.all([
traces.$("vitest.runtime.runner", () => resolveTestRunner(config, moduleRunner, traces)),
traces.$("vitest.runtime.global_env", () => setupGlobalEnv(config, environment)),
traces.$("vitest.runtime.coverage.start", () => startCoverageInsideWorker(config.coverage, moduleRunner, { isolate: config.isolate })),
traces.$("vitest.runtime.snapshot.environment", async () => {
if (!workerState.config.snapshotOptions.snapshotEnvironment) workerState.config.snapshotOptions.snapshotEnvironment = await resolveSnapshotEnvironment(config, moduleRunner);
})
]);
workerState.onCancel((reason) => {
closeInspector(config);
testRunner.cancel?.(reason);
});
workerState.durations.prepare = performance$1.now() - workerState.durations.prepare;
await traces.$(`vitest.test.runner.${method}`, async () => {
for (const file of files) {
if (config.isolate) {
moduleRunner.mocker?.reset();
resetModules(workerState.evaluatedModules, true);
}
workerState.filepath = file.filepath;
if (method === "run") {
const collectAsyncLeaks = config.detectAsyncLeaks ? detectAsyncLeaks(file.filepath, workerState.ctx.projectName) : void 0;
await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => startTests([file], testRunner));
const leaks = await collectAsyncLeaks?.();
if (leaks?.length) workerState.rpc.onAsyncLeaks(leaks);
} else await traces.$(`vitest.test.runner.${method}.module`, { attributes: { "code.file.path": file.filepath } }, () => collectTests([file], testRunner));
// reset after tests, because user might call `vi.setConfig` in setupFile
vi.resetConfig();
// mocks should not affect different files
vi.restoreAllMocks();
}
});
await traces.$("vitest.runtime.coverage.stop", () => stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: config.isolate }));
}
let _moduleRunner;
const evaluatedModules = new VitestEvaluatedModules();
const moduleExecutionInfo = /* @__PURE__ */ new Map();
async function startModuleRunner(options) {
if (_moduleRunner) return _moduleRunner;
process.exit = (code = process.exitCode || 0) => {
throw new Error(`process.exit unexpectedly called with "${code}"`);
};
const state = () => getSafeWorkerState() || options.state;
listenForErrors(state);
if (options.state.config.experimental.viteModuleRunner === false) {
const root = options.state.config.root;
let mocker;
if (options.state.config.experimental.nodeLoader !== false) {
// this additionally imports acorn/magic-string
const { NativeModuleMocker } = await import('./nativeModuleMocker.BkNfQMkH.js');
mocker = new NativeModuleMocker({
async resolveId(id, importer) {
// TODO: use import.meta.resolve instead
return state().rpc.resolve(id, importer, "__vitest__");
},
root,
moduleDirectories: state().config.deps.moduleDirectories || ["/node_modules/"],
traces: options.traces || new Traces({ enabled: false }),
getCurrentTestFilepath() {
return state().filepath;
},
spyModule
});
}
_moduleRunner = new NativeModuleRunner(root, mocker);
return _moduleRunner;
}
_moduleRunner = startVitestModuleRunner(options);
return _moduleRunner;
}
let _currentEnvironment;
let _environmentTime;
/** @experimental */
async function setupBaseEnvironment(context) {
if (context.config.experimental.viteModuleRunner === false) {
const { setupNodeLoaderHooks } = await import('./native.DPzPHdi5.js');
await setupNodeLoaderHooks(context);
}
const startTime = performance.now();
const { environment: { name: environmentName, options: environmentOptions }, rpc, config } = context;
// we could load @vite/env, but it would take ~8ms, while this takes ~0,02ms
if (context.config.serializedDefines) try {
runInThisContext(`(() =>{\n${context.config.serializedDefines}})()`, {
lineOffset: 1,
filename: "virtual:load-defines.js"
});
} catch (error) {
throw new Error(`Failed to load custom "defines": ${error.message}`);
}
const otel = context.traces;
const { environment, loader } = await loadEnvironment(environmentName, config.root, rpc, otel, context.config.experimental.viteModuleRunner);
_currentEnvironment = environment;
const env = await otel.$("vitest.runtime.environment.setup", { attributes: {
"vitest.environment": environment.name,
"vitest.environment.vite_environment": environment.viteEnvironment || environment.name
} }, () => environment.setup(globalThis, environmentOptions || config.environmentOptions || {}));
_environmentTime = performance.now() - startTime;
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
return async () => {
await otel.$("vitest.runtime.environment.teardown", () => env.teardown(globalThis));
await loader?.close();
};
}
/** @experimental */
async function runBaseTests(method, state, traces) {
const { ctx } = state;
state.environment = _currentEnvironment;
state.durations.environment = _environmentTime;
// state has new context, but we want to reuse existing ones
state.evaluatedModules = evaluatedModules;
state.moduleExecutionInfo = moduleExecutionInfo;
provideWorkerState(globalThis, state);
if (ctx.invalidates) ctx.invalidates.forEach((filepath) => {
(state.evaluatedModules.fileToModulesMap.get(filepath) || []).forEach((module) => {
state.evaluatedModules.invalidateModule(module);
});
});
ctx.files.forEach((i) => {
const filepath = i.filepath;
(state.evaluatedModules.fileToModulesMap.get(filepath) || []).forEach((module) => {
state.evaluatedModules.invalidateModule(module);
});
});
const moduleRunner = await startModuleRunner({
state,
evaluatedModules: state.evaluatedModules,
spyModule,
createImportMeta: createNodeImportMeta,
traces
});
emitModuleRunner(moduleRunner);
await run(method, ctx.files, ctx.config, moduleRunner, _currentEnvironment, traces);
}
export { runBaseTests as r, setupBaseEnvironment as s };
@@ -0,0 +1 @@
{"version":3,"file":"book-heart.js","sources":["../../../src/icons/book-heart.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookHeart\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgOC4yQTIuMjIgMi4yMiAwIDAgMCAxMy44IDZjLS44IDAtMS40LjMtMS44LjktLjQtLjYtMS0uOS0xLjgtLjlBMi4yMiAyLjIyIDAgMCAwIDggOC4yYzAgLjYuMyAxLjIuNyAxLjZBMjI2LjY1MiAyMjYuNjUyIDAgMCAwIDEyIDEzYTQwNCA0MDQgMCAwIDAgMy4zLTMuMSAyLjQxMyAyLjQxMyAwIDAgMCAuNy0xLjciIC8+CiAgPHBhdGggZD0iTTQgMTkuNXYtMTVBMi41IDIuNSAwIDAgMSA2LjUgMkgxOWExIDEgMCAwIDEgMSAxdjE4YTEgMSAwIDAgMS0xIDFINi41YTEgMSAwIDAgMSAwLTVIMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/book-heart\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BookHeart = createLucideIcon('BookHeart', [\n [\n 'path',\n {\n d: 'M16 8.2A2.22 2.22 0 0 0 13.8 6c-.8 0-1.4.3-1.8.9-.4-.6-1-.9-1.8-.9A2.22 2.22 0 0 0 8 8.2c0 .6.3 1.2.7 1.6A226.652 226.652 0 0 0 12 13a404 404 0 0 0 3.3-3.1 2.413 2.413 0 0 0 .7-1.7',\n key: '1t75a8',\n },\n ],\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 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A,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"is-supported.mjs","sources":["../../../../../src/animation/waapi/easing/is-supported.ts"],"sourcesContent":["import { Easing, isBezierDefinition } from \"motion-utils\"\nimport { supportsLinearEasing } from \"../../../utils/supports/linear-easing\"\nimport { supportedWaapiEasing } from \"./supported\"\n\nexport function isWaapiSupportedEasing(easing?: Easing | Easing[]): boolean {\n return Boolean(\n (typeof easing === \"function\" && supportsLinearEasing()) ||\n !easing ||\n (typeof easing === \"string\" &&\n (easing in supportedWaapiEasing || supportsLinearEasing())) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing))\n )\n}\n"],"names":[],"mappings":";;;;AAIM,SAAU,sBAAsB,CAAC,MAA0B,EAAA;IAC7D,OAAO,OAAO,CACV,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,oBAAoB,EAAE;AACnD,QAAA,CAAC,MAAM;SACN,OAAO,MAAM,KAAK,QAAQ;AACvB,aAAC,MAAM,IAAI,oBAAoB,IAAI,oBAAoB,EAAE,CAAC,CAAC;QAC/D,kBAAkB,CAAC,MAAM,CAAC;AAC1B,SAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CACtE;AACL;;;;"}
@@ -0,0 +1,2 @@
const require_figlet = require("./figlet-Bofe-fvw.cjs");
module.exports = require_figlet.figlet;
@@ -0,0 +1 @@
{"version":3,"file":"bar-chart-4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"is-ref-object.mjs","sources":["../../../src/utils/is-ref-object.ts"],"sourcesContent":["import { MutableRefObject } from \"./safe-react-types\"\n\nexport function isRefObject<E = any>(ref: any): ref is MutableRefObject<E> {\n return (\n ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\")\n )\n}\n"],"names":[],"mappings":"AAEM,SAAU,WAAW,CAAU,GAAQ,EAAA;AACzC,IAAA,QACI,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC;AAE5D;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_default","exports","default","toExpression","node","isExpressionStatement","expression","isExpression","isClass","type","abstract","isFunction","Error"],"sources":["../../src/converters/toExpression.ts"],"sourcesContent":["import {\n isExpression,\n isFunction,\n isClass,\n isExpressionStatement,\n} from \"../validators/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default toExpression as {\n (node: t.Function): t.FunctionExpression;\n (node: t.Class): t.ClassExpression;\n (\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n ): t.Expression;\n};\n\nfunction toExpression(\n node: t.ExpressionStatement | t.Expression | t.Class | t.Function,\n): t.Expression {\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n // return unmodified node\n // important for things like ArrowFunctions where\n // type change from ArrowFunction to FunctionExpression\n // produces bugs like -> `()=>a` to `function () a`\n // without generating a BlockStatement for it\n // ref: https://github.com/babel/babili/issues/130\n if (isExpression(node)) {\n return node;\n }\n\n // convert all classes and functions\n // ClassDeclaration -> ClassExpression\n // FunctionDeclaration, ObjectMethod, ClassMethod -> FunctionExpression\n if (isClass(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"ClassExpression\";\n // abstract modifiers are only allowed on class declarations\n node.abstract = false;\n } else if (isFunction(node)) {\n // @ts-expect-error todo(flow->ts): avoid type unsafe mutations\n node.type = \"FunctionExpression\";\n }\n\n // if it's still not an expression\n if (!isExpression(node)) {\n throw new Error(`cannot turn ${node.type} to an expression`);\n }\n\n return node;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAK0C,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG3BC,YAAY;AAQ3B,SAASA,YAAYA,CACnBC,IAAiE,EACnD;EACd,IAAI,IAAAC,4BAAqB,EAACD,IAAI,CAAC,EAAE;IAC/BA,IAAI,GAAGA,IAAI,CAACE,UAAU;EACxB;EAQA,IAAI,IAAAC,mBAAY,EAACH,IAAI,CAAC,EAAE;IACtB,OAAOA,IAAI;EACb;EAKA,IAAI,IAAAI,cAAO,EAACJ,IAAI,CAAC,EAAE;IAEjBA,IAAI,CAACK,IAAI,GAAG,iBAAiB;IAE7BL,IAAI,CAACM,QAAQ,GAAG,KAAK;EACvB,CAAC,MAAM,IAAI,IAAAC,iBAAU,EAACP,IAAI,CAAC,EAAE;IAE3BA,IAAI,CAACK,IAAI,GAAG,oBAAoB;EAClC;EAGA,IAAI,CAAC,IAAAF,mBAAY,EAACH,IAAI,CAAC,EAAE;IACvB,MAAM,IAAIQ,KAAK,CAAC,eAAeR,IAAI,CAACK,IAAI,mBAAmB,CAAC;EAC9D;EAEA,OAAOL,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,186 @@
tlf2a 1 1 3 -1 15 0 0 0
===============================================================================
This is circle.tlf, or “Circle”, by Sam Hocevar <sam@hocevar.net>. It was
created on October 1st, 2006.
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing: ! " # $ % & ' ( ) , : ; < > ? @ [ \ ] ^ _ ` { | } ~ Ä Ö Ü ä ö ü ß
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
⊛*
⊕+
,@
⊖-
⊙.
⊘/
⓪0
①1
②2
③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0AC 사 HANGUL SYLLABLE SA
㉴@
0xC544 아 HANGUL SYLLABLE A
㉵@
0xC790 자 HANGUL SYLLABLE JA
㉶@
0xCC28 차 HANGUL SYLLABLE CA
㉷@
0xCE74 카 HANGUL SYLLABLE KA
㉸@
0xD0C0 타 HANGUL SYLLABLE TA
㉹@
0xD30C 파 HANGUL SYLLABLE PA
㉺@
0xD558 하 HANGUL SYLLABLE HA
㉻@
0x6B63 正 CJK UNIFIED IDEOGRAPH-6B63
㊣@
0x4E0A 上 CJK UNIFIED IDEOGRAPH-4E0A
㊤@
0x4E2D 中 CJK UNIFIED IDEOGRAPH-4E2D
㊥@
0x4E0B 下 CJK UNIFIED IDEOGRAPH-4E0B
㊦@
0x5DE6 左 CJK UNIFIED IDEOGRAPH-5DE6
㊧@
0x53F3 右 CJK UNIFIED IDEOGRAPH-53F3
㊨@
@@ -0,0 +1 @@
{"version":3,"file":"is-object.mjs","sources":["../../src/is-object.ts"],"sourcesContent":["export function isObject(value: unknown): value is object {\n return typeof value === \"object\" && value !== null\n}\n"],"names":[],"mappings":"AAAM,SAAU,QAAQ,CAAC,KAAc,EAAA;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AACtD;;;;"}
@@ -0,0 +1,73 @@
{
"name": "@typescript-eslint/visitor-keys",
"version": "8.58.2",
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
"!**/*.tsbuildinfo",
"package.json",
"README.md",
"LICENSE"
],
"type": "commonjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"types": "./dist/index.d.ts",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/typescript-eslint/typescript-eslint.git",
"directory": "packages/visitor-keys"
},
"bugs": {
"url": "https://github.com/typescript-eslint/typescript-eslint/issues"
},
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"keywords": [
"eslint",
"typescript",
"estree"
],
"dependencies": {
"eslint-visitor-keys": "^5.0.0",
"@typescript-eslint/types": "8.58.2"
},
"devDependencies": {
"@vitest/coverage-v8": "^4.0.18",
"eslint": "^10.0.0",
"rimraf": "^5.0.10",
"typescript": ">=4.8.4 <6.1.0",
"vitest": "^4.0.18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"nx": {
"name": "visitor-keys",
"includedScripts": [
"clean"
],
"targets": {
"lint": {
"command": "eslint"
}
}
},
"scripts": {
"build": "pnpm exec nx build",
"clean": "rimraf dist/ coverage/",
"format": "pnpm -w run format",
"lint": "pnpm -w exec nx lint",
"test": "pnpm -w exec nx test",
"typecheck": "pnpm -w exec nx typecheck"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"arrow-big-up-dash.js","sources":["../../../src/icons/arrow-big-up-dash.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowBigUpDash\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAxOWg2IiAvPgogIDxwYXRoIGQ9Ik05IDE1di0zSDVsNy03IDcgN2gtNHYzSDl6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-big-up-dash\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowBigUpDash = createLucideIcon('ArrowBigUpDash', [\n ['path', { d: 'M9 19h6', key: '456am0' }],\n ['path', { d: 'M9 15v-3H5l7-7 7 7h-4v3H9z', key: '1r2uve' }],\n]);\n\nexport default ArrowBigUpDash;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,331 @@
/**
* dd-resizable.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
import { DDResizableHandle } from './dd-resizable-handle';
import { DDBaseImplement } from './dd-base-impl';
import { Utils } from './utils';
import { DDManager } from './dd-manager';
class DDResizable extends DDBaseImplement {
// have to be public else complains for HTMLElementExtendOpt ?
constructor(el, option = {}) {
super();
this.el = el;
this.option = option;
/** @internal */
this.rectScale = { x: 1, y: 1 };
/** @internal */
this._ui = () => {
const containmentEl = this.el.parentElement;
const containmentRect = containmentEl.getBoundingClientRect();
const newRect = {
width: this.originalRect.width,
height: this.originalRect.height + this.scrolled,
left: this.originalRect.left,
right: this.originalRect.right,
top: this.originalRect.top - this.scrolled
};
const rect = this.temporalRect || newRect;
const leftPos = this.option.rtl
? (containmentRect.right - rect.right) * this.rectScale.x
: (rect.left - containmentRect.left) * this.rectScale.x;
return {
position: {
left: leftPos,
top: (rect.top - containmentRect.top) * this.rectScale.y
},
size: {
width: rect.width * this.rectScale.x,
height: rect.height * this.rectScale.y
}
/* Gridstack ONLY needs position set above... keep around in case.
element: [this.el], // The object representing the element to be resized
helper: [], // TODO: not support yet - The object representing the helper that's being resized
originalElement: [this.el],// we don't wrap here, so simplify as this.el //The object representing the original element before it is wrapped
originalPosition: { // The position represented as { left, top } before the resizable is resized
left: this.originalRect.left - containmentRect.left,
top: this.originalRect.top - containmentRect.top
},
originalSize: { // The size represented as { width, height } before the resizable is resized
width: this.originalRect.width,
height: this.originalRect.height
}
*/
};
};
// create var event binding so we can easily remove and still look like TS methods (unlike anonymous functions)
this._mouseOver = this._mouseOver.bind(this);
this._mouseOut = this._mouseOut.bind(this);
this.enable();
this._setupAutoHide(this.option.autoHide);
this._setupHandlers();
}
on(event, callback) {
super.on(event, callback);
}
off(event) {
super.off(event);
}
enable() {
super.enable();
this.el.classList.remove('ui-resizable-disabled');
this._setupAutoHide(this.option.autoHide);
}
disable() {
super.disable();
this.el.classList.add('ui-resizable-disabled');
this._setupAutoHide(false);
}
destroy() {
this._removeHandlers();
this._setupAutoHide(false);
delete this.el;
super.destroy();
}
updateOption(opts) {
const updateHandles = (opts.handles && opts.handles !== this.option.handles);
const updateAutoHide = (opts.autoHide && opts.autoHide !== this.option.autoHide);
Object.keys(opts).forEach(key => this.option[key] = opts[key]);
if (updateHandles) {
this._removeHandlers();
this._setupHandlers();
}
if (updateAutoHide) {
this._setupAutoHide(this.option.autoHide);
}
return this;
}
/** @internal turns auto hide on/off */
_setupAutoHide(auto) {
if (auto) {
this.el.classList.add('ui-resizable-autohide');
// use mouseover and not mouseenter to get better performance and track for nested cases
this.el.addEventListener('mouseover', this._mouseOver);
this.el.addEventListener('mouseout', this._mouseOut);
}
else {
this.el.classList.remove('ui-resizable-autohide');
this.el.removeEventListener('mouseover', this._mouseOver);
this.el.removeEventListener('mouseout', this._mouseOut);
if (DDManager.overResizeElement === this) {
delete DDManager.overResizeElement;
}
}
return this;
}
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_mouseOver(e) {
// console.log(`${count++} pre-enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`)
// already over a child, ignore. Ideally we just call e.stopPropagation() but see https://github.com/gridstack/gridstack.js/issues/2018
if (DDManager.overResizeElement || DDManager.dragElement)
return;
DDManager.overResizeElement = this;
// console.log(`${count++} enter ${(this.el as GridItemHTMLElement).gridstackNode._id}`)
this.el.classList.remove('ui-resizable-autohide');
}
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_mouseOut(e) {
// console.log(`${count++} pre-leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`)
if (DDManager.overResizeElement !== this)
return;
delete DDManager.overResizeElement;
// console.log(`${count++} leave ${(this.el as GridItemHTMLElement).gridstackNode._id}`)
this.el.classList.add('ui-resizable-autohide');
}
/** @internal */
_setupHandlers() {
this.handlers = this.option.handles.split(',')
.map(dir => dir.trim())
.map(dir => new DDResizableHandle(this.el, dir, {
element: this.option.element,
start: (event) => this._resizeStart(event),
stop: (event) => this._resizeStop(event),
move: (event) => this._resizing(event, dir)
}));
return this;
}
/** @internal */
_resizeStart(event) {
this.sizeToContent = Utils.shouldSizeToContent(this.el.gridstackNode, true); // strick true only and not number
this.originalRect = this.el.getBoundingClientRect();
this.scrollEl = Utils.getScrollElement(this.el);
this.scrollY = this.scrollEl.scrollTop;
this.scrolled = 0;
this.startEvent = event;
this._setupHelper();
this._applyChange();
const ev = Utils.initEvent(event, { type: 'resizestart', target: this.el });
if (this.option.start) {
this.option.start(ev, this._ui());
}
this.el.classList.add('ui-resizable-resizing');
this.triggerEvent('resizestart', ev);
return this;
}
/** @internal */
_resizing(event, dir) {
this.scrolled = this.scrollEl.scrollTop - this.scrollY;
this.temporalRect = this._getChange(event, dir);
this._applyChange();
const ev = Utils.initEvent(event, { type: 'resize', target: this.el });
ev.resizeDir = dir; // expose handle direction so _dragOrResize can avoid position drift
ev.hasMovedX = this.option.rtl ? dir.includes('e') : dir.includes('w');
ev.hasMovedY = dir.includes('n');
if (this.option.resize) {
this.option.resize(ev, this._ui());
}
this.triggerEvent('resize', ev);
return this;
}
/** @internal */
_resizeStop(event) {
const ev = Utils.initEvent(event, { type: 'resizestop', target: this.el });
// Remove style attr now, so the stop handler can rebuild style attrs
this._cleanHelper();
if (this.option.stop) {
this.option.stop(ev); // Note: ui() not used by gridstack so don't pass
}
this.el.classList.remove('ui-resizable-resizing');
this.triggerEvent('resizestop', ev);
delete this.startEvent;
delete this.originalRect;
delete this.temporalRect;
delete this.scrollY;
delete this.scrolled;
return this;
}
/** @internal */
_setupHelper() {
this.elOriginStyleVal = DDResizable._originStyleProp.map(prop => this.el.style[prop]);
this.parentOriginStylePosition = this.el.parentElement.style.position;
const parent = this.el.parentElement;
const dragTransform = Utils.getValuesFromTransformedElement(parent);
this.rectScale = {
x: dragTransform.xScale,
y: dragTransform.yScale
};
if (getComputedStyle(this.el.parentElement).position.match(/static/)) {
this.el.parentElement.style.position = 'relative';
}
this.el.style.position = 'absolute';
this.el.style.opacity = '0.8';
return this;
}
/** @internal */
_cleanHelper() {
DDResizable._originStyleProp.forEach((prop, i) => {
this.el.style[prop] = this.elOriginStyleVal[i] || null;
});
this.el.parentElement.style.position = this.parentOriginStylePosition || null;
return this;
}
/** @internal */
_getChange(event, dir) {
const oEvent = this.startEvent;
const newRect = {
width: this.originalRect.width,
height: this.originalRect.height + this.scrolled,
left: this.originalRect.left,
right: this.originalRect.right,
top: this.originalRect.top - this.scrolled,
};
const offsetX = event.clientX - oEvent.clientX;
const offsetY = this.sizeToContent ? 0 : event.clientY - oEvent.clientY; // prevent vert resize
let moveLeft;
let moveUp;
const isRtl = this.option.rtl;
if (!isRtl && dir.indexOf('e') > -1) {
newRect.width += offsetX;
}
else if (isRtl && dir.indexOf('w') > -1) {
newRect.width -= offsetX;
}
else if (!isRtl && dir.indexOf('w') > -1) {
newRect.width -= offsetX;
newRect.left += offsetX;
moveLeft = true;
}
else if (isRtl && dir.indexOf('e') > -1) {
newRect.width += offsetX;
newRect.right += offsetX;
moveLeft = true;
}
if (dir.indexOf('s') > -1) {
newRect.height += offsetY;
}
else if (dir.indexOf('n') > -1) {
newRect.height -= offsetY;
newRect.top += offsetY;
moveUp = true;
}
const constrain = this._constrainSize(newRect.width, newRect.height, moveLeft, moveUp);
if (Math.round(newRect.width) !== Math.round(constrain.width)) { // round to ignore slight round-off errors
if (!isRtl && dir.indexOf('w') > -1) {
newRect.left += newRect.width - constrain.width;
}
else if (isRtl && dir.indexOf('e') > -1) {
newRect.right -= newRect.width - constrain.width;
}
newRect.width = constrain.width;
}
if (Math.round(newRect.height) !== Math.round(constrain.height)) {
if (dir.indexOf('n') > -1) {
newRect.top += newRect.height - constrain.height;
}
newRect.height = constrain.height;
}
return newRect;
}
/** @internal constrain the size to the set min/max values */
_constrainSize(oWidth, oHeight, moveLeft, moveUp) {
const o = this.option;
const maxWidth = (moveLeft ? o.maxWidthMoveLeft : o.maxWidth) || Number.MAX_SAFE_INTEGER;
const minWidth = o.minWidth / this.rectScale.x || oWidth;
const maxHeight = (moveUp ? o.maxHeightMoveUp : o.maxHeight) || Number.MAX_SAFE_INTEGER;
const minHeight = o.minHeight / this.rectScale.y || oHeight;
const width = Math.min(maxWidth, Math.max(minWidth, oWidth));
const height = Math.min(maxHeight, Math.max(minHeight, oHeight));
return { width, height };
}
/** @internal */
_applyChange() {
let containmentRect = { left: 0, right: 0, top: 0, width: 0, height: 0 };
if (this.el.style.position === 'absolute') {
const containmentEl = this.el.parentElement;
const { left, right, top } = containmentEl.getBoundingClientRect();
containmentRect = { left, right, top, width: 0, height: 0 };
}
if (!this.temporalRect)
return this;
Object.entries(this.temporalRect).forEach(([key, value]) => {
if (this.option.rtl ? key === 'left' : key === 'right')
return;
const scaleReciprocal = key === 'width' || key === 'left' || key === 'right'
? this.rectScale.x
: key === 'height' || key === 'top'
? this.rectScale.y
: 1;
let finalValue;
if (key === 'right') {
finalValue = (containmentRect.right - value) * this.rectScale.x + 'px';
}
else {
finalValue = (value - containmentRect[key]) * scaleReciprocal + 'px';
}
this.el.style[key] = finalValue;
});
return this;
}
/** @internal */
_removeHandlers() {
this.handlers.forEach(handle => handle.destroy());
delete this.handlers;
return this;
}
}
/** @internal */
DDResizable._originStyleProp = ['width', 'height', 'position', 'left', 'right', 'top', 'opacity', 'zIndex'];
export { DDResizable };
//# sourceMappingURL=dd-resizable.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const TrendingUp = createLucideIcon("TrendingUp", [
["polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17", key: "126l90" }],
["polyline", { points: "16 7 22 7 22 13", key: "kwv8wd" }]
]);
export { TrendingUp as default };
//# sourceMappingURL=trending-up.js.map
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = {
major: 4,
minor: 6,
patch: 7,
};
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_IB","129":"_LC"},B:{"1":"_J"},C:{"1":"_tH","2":"_WD _eT"},D:{"1":"_Q"},E:{"1":"_DB","2":"_e"},F:{"1":"_a","2":"_T"},G:{"1":"_eB","2":"lC"},H:{"2":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"129":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"2":"_C"}},B:5,C:"CSS zoom",D:true};
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListFilterPlus = createLucideIcon("ListFilterPlus", [
["path", { d: "M10 18h4", key: "1ulq68" }],
["path", { d: "M11 6H3", key: "1u26ik" }],
["path", { d: "M15 6h6", key: "1jlkvy" }],
["path", { d: "M18 9V3", key: "xwwp7m" }],
["path", { d: "M7 12h8", key: "7a1bxv" }]
]);
export { ListFilterPlus as default };
//# sourceMappingURL=list-filter-plus.js.map
@@ -0,0 +1,206 @@
# MockCallHistoryLog
<!--introduced_in=v7.5.0-->
<!--type=module-->
<!-- source_link=lib/mock/mock-call-history.js -->
> Stability: 2 - Stable
A `MockCallHistoryLog` is an immutable snapshot of the configuration of a single
request that was intercepted by a [`MockAgent`][]. Each property mirrors a part
of the request, with the URL components already parsed by the WHATWG URL parser.
Instances are not created directly. They are produced by a [`MockCallHistory`][]
when call history is enabled on a [`MockAgent`][], and can be retrieved through
the call history helpers such as `firstCall()`, `lastCall()`, `nthCall()`,
`calls()`, and `filterCalls()`.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent({ enableCallHistory: true })
// after some requests have been intercepted:
const log = mockAgent.getCallHistory()?.firstCall()
```
## Class: `MockCallHistoryLog`
<!-- YAML
added: v7.5.0
-->
Represents the configuration of one intercepted request.
### `new MockCallHistoryLog(requestInit)`
<!-- YAML
added: v7.5.0
-->
* `requestInit` {DispatchOptions} The dispatch options of the intercepted
request. **Default:** `{}`.
Creates a new `MockCallHistoryLog`. The `body`, `headers`, and `method`
properties are copied directly from `requestInit`, while the URL-derived
properties (`fullUrl`, `origin`, `path`, `searchParams`, `protocol`, `host`,
`port`, and `hash`) are computed from `requestInit.path` and `requestInit.origin`
using the WHATWG URL parser.
This constructor is internal-facing: instances are created by
[`MockCallHistory`][] when a request is intercepted. It is documented because the
class is part of the public API surface.
### `mockCallHistoryLog.body`
<!-- YAML
added: v7.5.0
-->
* Type: {string|null|undefined}
The body of the intercepted request, exactly as supplied to the dispatcher.
### `mockCallHistoryLog.headers`
<!-- YAML
added: v7.5.0
-->
* Type: {Record<string, string|string[]>|null|undefined}
The headers of the intercepted request.
### `mockCallHistoryLog.method`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The HTTP method of the intercepted request, for example `'GET'` or `'PUT'`.
### `mockCallHistoryLog.fullUrl`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The full URL of the intercepted request, including protocol, host, path, search
parameters, and hash.
### `mockCallHistoryLog.origin`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The origin of the intercepted request, comprising the protocol and host, for
example `'https://localhost:4000'`.
### `mockCallHistoryLog.path`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The pathname of the intercepted request. It always starts with `/` and never
contains search parameters.
### `mockCallHistoryLog.searchParams`
<!-- YAML
added: v7.5.0
-->
* Type: {Record<string, string>}
The search parameters of the intercepted request as a plain object of key/value
pairs.
### `mockCallHistoryLog.protocol`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The protocol of the intercepted request, including the trailing colon, for
example `'https:'` or `'http:'`.
### `mockCallHistoryLog.host`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The host of the intercepted request, including the port when present.
### `mockCallHistoryLog.port`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The port of the intercepted request. It is an empty string when no explicit port
was used, otherwise a string of digits.
### `mockCallHistoryLog.hash`
<!-- YAML
added: v7.5.0
-->
* Type: {string}
The hash fragment of the intercepted request. It is an empty string when absent,
otherwise a string starting with `#`.
### `mockCallHistoryLog.toMap()`
<!-- YAML
added: v7.5.0
-->
* Returns: {Map} A `Map` whose keys are the property names `protocol`, `host`,
`port`, `origin`, `path`, `hash`, `searchParams`, `fullUrl`, `method`, `body`,
and `headers`, each mapped to the corresponding value of this log.
Returns the log as a `Map` of property name to value.
```mjs
mockAgent.getCallHistory()?.firstCall()?.toMap().get('hash')
// '#hash'
```
### `mockCallHistoryLog.toString()`
<!-- YAML
added: v7.5.0
-->
* Returns: {string} A string representation of the log.
Returns a string built from every property name and value pair. Each pair is
joined with `->` and pairs are separated with `|`. Object values such as
`searchParams` and `headers` are serialized with `JSON.stringify()`.
```mjs
mockAgent.getCallHistory()?.firstCall()?.toString()
// protocol->https:|host->localhost:4000|port->4000|origin->https://localhost:4000|path->/endpoint|hash->#here|searchParams->{"query":"value"}|fullUrl->https://localhost:4000/endpoint?query=value#here|method->PUT|body->"{ "data": "hello" }"|headers->{"content-type":"application/json"}
```
[`MockAgent`]: MockAgent.md#class-mockagent
[`MockCallHistory`]: MockCallHistory.md#class-mockcallhistory
@@ -0,0 +1,39 @@
class TrieNode {
constructor(parents = []) {
this.parents = parents;
this.children = new Map();
}
addSub(key, ...subs) {
const firstChar = key.charAt(0);
if (!this.children.has(firstChar)) {
this.children.set(firstChar, new TrieNode([...this.parents, firstChar]));
}
let cur = this.children.get(firstChar);
for (let i = 1; i < key.length; i += 1) {
const c = key.charAt(i);
if (!cur.hasChild(c)) {
cur.addChild(c);
}
cur = cur.getChild(c);
}
cur.subs = (cur.subs || []).concat(subs);
return this;
}
getChild(child) {
return this.children.get(child);
}
isTerminal() {
return !!this.subs;
}
addChild(child) {
if (!this.hasChild(child)) {
this.children.set(child, new TrieNode([...this.parents, child]));
}
}
hasChild(child) {
return this.children.has(child);
}
}
export { TrieNode as default };
//# sourceMappingURL=TrieNode.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"hash-scroll.cjs","names":[],"sources":["../../src/hash-scroll.ts"],"sourcesContent":["import type { AnyRouter } from './router'\n\n/**\n * @private\n * Handles hash-based scrolling after navigation completes.\n * To be used in framework-specific <Transitioner> components during the onResolved event.\n */\nexport function handleHashScroll(router: AnyRouter) {\n if (typeof document !== 'undefined' && (document as any).querySelector) {\n const location = router.stores.location.get()\n const hashScrollIntoViewOptions =\n location.state.__hashScrollIntoViewOptions ?? true\n\n if (hashScrollIntoViewOptions && location.hash !== '') {\n const el = document.getElementById(location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,iBAAiB,QAAmB;AAClD,KAAI,OAAO,aAAa,eAAgB,SAAiB,eAAe;EACtE,MAAM,WAAW,OAAO,OAAO,SAAS,KAAK;EAC7C,MAAM,4BACJ,SAAS,MAAM,+BAA+B;AAEhD,MAAI,6BAA6B,SAAS,SAAS,IAAI;GACrD,MAAM,KAAK,SAAS,eAAe,SAAS,KAAK;AACjD,OAAI,GACF,IAAG,eAAe,0BAA0B"}
@@ -0,0 +1,83 @@
/**
* @fileoverview Rule to flag the use of empty character classes in regular expressions
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const parser = new RegExpParser();
const QUICK_TEST_REGEX = /\[\]/u;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow empty character classes in regular expressions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-empty-character-class",
},
schema: [],
messages: {
unexpected: "Empty class.",
},
},
create(context) {
return {
"Literal[regex]"(node) {
const { pattern, flags } = node.regex;
if (!QUICK_TEST_REGEX.test(pattern)) {
return;
}
let regExpAST;
try {
regExpAST = parser.parsePattern(
pattern,
0,
pattern.length,
{
unicode: flags.includes("u"),
unicodeSets: flags.includes("v"),
},
);
} catch {
// Ignore regular expressions that regexpp cannot parse
return;
}
visitRegExpAST(regExpAST, {
onCharacterClassEnter(characterClass) {
if (
!characterClass.negate &&
characterClass.elements.length === 0
) {
context.report({ node, messageId: "unexpected" });
}
},
});
},
};
},
};
@@ -0,0 +1,3 @@
#!/usr/bin/env node
export {};
//# sourceMappingURL=simpleOAuthClient.d.ts.map
@@ -0,0 +1,46 @@
const namedEdges = {
start: 0,
center: 0.5,
end: 1,
};
function resolveEdge(edge, length, inset = 0) {
let delta = 0;
/**
* If we have this edge defined as a preset, replace the definition
* with the numerical value.
*/
if (edge in namedEdges) {
edge = namedEdges[edge];
}
/**
* Handle unit values
*/
if (typeof edge === "string") {
const asNumber = parseFloat(edge);
if (edge.endsWith("px")) {
delta = asNumber;
}
else if (edge.endsWith("%")) {
edge = asNumber / 100;
}
else if (edge.endsWith("vw")) {
delta = (asNumber / 100) * document.documentElement.clientWidth;
}
else if (edge.endsWith("vh")) {
delta = (asNumber / 100) * document.documentElement.clientHeight;
}
else {
edge = asNumber;
}
}
/**
* If the edge is defined as a number, handle as a progress value.
*/
if (typeof edge === "number") {
delta = length * edge;
}
return inset + delta;
}
export { namedEdges, resolveEdge };
//# sourceMappingURL=edge.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"file-sliders.js","sources":["../../../src/icons/file-sliders.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileSliders\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik04IDEyaDgiIC8+CiAgPHBhdGggZD0iTTEwIDExdjIiIC8+CiAgPHBhdGggZD0iTTggMTdoOCIgLz4KICA8cGF0aCBkPSJNMTQgMTZ2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-sliders\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileSliders = createLucideIcon('FileSliders', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['path', { d: 'M10 11v2', key: '1s651w' }],\n ['path', { d: 'M8 17h8', key: 'wh5c61' }],\n ['path', { d: 'M14 16v2', key: '12fp5e' }],\n]);\n\nexport default FileSliders;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc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,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,731 @@
# Immutable collections for JavaScript
[![Build Status](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/immutable-js/immutable-js/actions/workflows/ci.yml?query=branch%3Amain) [Chat on slack](https://immutable-js.slack.com)
[Read the docs](https://immutable-js.com/docs/) and eat your vegetables.
Docs are automatically generated from [README.md][] and [immutable.d.ts][].
Please contribute! Also, don't miss the [wiki][] which contains articles on
additional specific topics. Can't find something? Open an [issue][].
**Table of contents:**
- [Introduction](#introduction)
- [Getting started](#getting-started)
- [The case for Immutability](#the-case-for-immutability)
- [JavaScript-first API](#javascript-first-api)
- [Nested Structures](#nested-structures)
- [Equality treats Collections as Values](#equality-treats-collections-as-values)
- [Batching Mutations](#batching-mutations)
- [Lazy Seq](#lazy-seq)
- [Additional Tools and Resources](#additional-tools-and-resources)
- [Contributing](#contributing)
## Introduction
[Immutable][] data cannot be changed once created, leading to much simpler
application development, no defensive copying, and enabling advanced memoization
and change detection techniques with simple logic. [Persistent][] data presents
a mutative API which does not update the data in-place, but instead always
yields new updated data.
Immutable.js provides many Persistent Immutable data structures including:
`List`, `Stack`, `Map`, `OrderedMap`, `Set`, `OrderedSet` and `Record`.
These data structures are highly efficient on modern JavaScript VMs by using
structural sharing via [hash maps tries][] and [vector tries][] as popularized
by Clojure and Scala, minimizing the need to copy or cache data.
Immutable.js also provides a lazy `Seq`, allowing efficient
chaining of collection methods like `map` and `filter` without creating
intermediate representations. Create some `Seq` with `Range` and `Repeat`.
Want to hear more? Watch the presentation about Immutable.js:
[![Immutable Data and React](website/public/Immutable-Data-and-React-YouTube.png)](https://youtu.be/I7IdS-PbEgI)
[README.md]: https://github.com/immutable-js/immutable-js/blob/main/README.md
[immutable.d.ts]: https://github.com/immutable-js/immutable-js/blob/main/type-definitions/immutable.d.ts
[wiki]: https://github.com/immutable-js/immutable-js/wiki
[issue]: https://github.com/immutable-js/immutable-js/issues
[Persistent]: https://en.wikipedia.org/wiki/Persistent_data_structure
[Immutable]: https://en.wikipedia.org/wiki/Immutable_object
[hash maps tries]: https://en.wikipedia.org/wiki/Hash_array_mapped_trie
[vector tries]: https://hypirion.com/musings/understanding-persistent-vector-pt-1
## Getting started
Install `immutable` using npm.
```shell
# using npm
npm install immutable
# using Yarn
yarn add immutable
# using pnpm
pnpm add immutable
# using Bun
bun add immutable
```
Then require it into any module.
```js
import { Map } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = map1.set('b', 50);
map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50
```
### Browser
Immutable.js has no dependencies, which makes it predictable to include in a Browser.
It's highly recommended to use a module bundler like [webpack](https://webpack.js.org/),
[rollup](https://rollupjs.org/), or
[browserify](https://browserify.org/). The `immutable` npm module works
without any additional consideration. All examples throughout the documentation
will assume use of this kind of tool.
Alternatively, Immutable.js may be directly included as a script tag. Download
or link to a CDN such as [CDNJS](https://cdnjs.com/libraries/immutable)
or [jsDelivr](https://www.jsdelivr.com/package/npm/immutable).
Use a script tag to directly add `Immutable` to the global scope:
```html
<script src="immutable.min.js"></script>
<script>
var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);
map1.get('b'); // 2
map2.get('b'); // 50
</script>
```
Or use an AMD-style loader (such as [RequireJS](https://requirejs.org/)):
```js
require(['./immutable.min.js'], function (Immutable) {
var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);
map1.get('b'); // 2
map2.get('b'); // 50
});
```
### Flow & TypeScript
Use these Immutable collections and sequences as you would use native
collections in your [Flowtype](https://flowtype.org/) or [TypeScript](https://typescriptlang.org) programs while still taking
advantage of type generics, error detection, and auto-complete in your IDE.
Installing `immutable` via npm brings with it type definitions for Flow (v0.55.0 or higher)
and TypeScript (v4.5 or higher), so you shouldn't need to do anything at all!
#### Using TypeScript with Immutable.js v4+
Immutable.js type definitions embrace ES2015. While Immutable.js itself supports
legacy browsers and environments, its type definitions require TypeScript's 2015
lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your
`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the
`tsc` command.
```js
import { Map } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = map1.set('b', 50);
map1.get('b') + ' vs. ' + map2.get('b'); // 2 vs. 50
```
#### Using TypeScript with Immutable.js v3 and earlier:
Previous versions of Immutable.js include a reference file which you can include
via relative path to the type definitions at the top of your file.
```js
///<reference path='./node_modules/immutable/dist/immutable.d.ts'/>
import { Map } from 'immutable';
var map1: Map<string, number>;
map1 = Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);
map1.get('b'); // 2
map2.get('b'); // 50
```
## The case for Immutability
Much of what makes application development difficult is tracking mutation and
maintaining state. Developing with immutable data encourages you to think
differently about how data flows through your application.
Subscribing to data events throughout your application creates a huge overhead of
book-keeping which can hurt performance, sometimes dramatically, and creates
opportunities for areas of your application to get out of sync with each other
due to easy to make programmer error. Since immutable data never changes,
subscribing to changes throughout the model is a dead-end and new data can only
ever be passed from above.
This model of data flow aligns well with the architecture of [React][]
and especially well with an application designed using the ideas of [Flux][].
When data is passed from above rather than being subscribed to, and you're only
interested in doing work when something has changed, you can use equality.
Immutable collections should be treated as _values_ rather than _objects_. While
objects represent some thing which could change over time, a value represents
the state of that thing at a particular instance of time. This principle is most
important to understanding the appropriate use of immutable data. In order to
treat Immutable.js collections as values, it's important to use the
`Immutable.is()` function or `.equals()` method to determine _value equality_
instead of the `===` operator which determines object _reference identity_.
```js
import { Map } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
map1.equals(map2); // true
map1 === map2; // false
```
Note: As a performance optimization Immutable.js attempts to return the existing
collection when an operation would result in an identical collection, allowing
for using `===` reference equality to determine if something definitely has not
changed. This can be extremely useful when used within a memoization function
which would prefer to re-run the function if a deeper equality check could
potentially be more costly. The `===` equality check is also used internally by
`Immutable.is` and `.equals()` as a performance optimization.
```js
import { Map } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = map1.set('b', 2); // Set to same value
map1 === map2; // true
```
If an object is immutable, it can be "copied" simply by making another reference
to it instead of copying the entire object. Because a reference is much smaller
than the object itself, this results in memory savings and a potential boost in
execution speed for programs which rely on copies (such as an undo-stack).
```js
import { Map } from 'immutable';
const map = Map({ a: 1, b: 2, c: 3 });
const mapCopy = map; // Look, "copies" are free!
```
[React]: https://reactjs.org/
[Flux]: https://facebook.github.io/flux/docs/in-depth-overview/
## JavaScript-first API
While Immutable.js is inspired by Clojure, Scala, Haskell and other functional
programming environments, it's designed to bring these powerful concepts to
JavaScript, and therefore has an Object-Oriented API that closely mirrors that
of [ES2015][] [Array][], [Map][], and [Set][].
[es2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla
[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
[map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
[set]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
The difference for the immutable collections is that methods which would mutate
the collection, like `push`, `set`, `unshift` or `splice`, instead return a new
immutable collection. Methods which return new arrays, like `slice` or `concat`,
instead return new immutable collections.
```js
import { List } from 'immutable';
const list1 = List([1, 2]);
const list2 = list1.push(3, 4, 5);
const list3 = list2.unshift(0);
const list4 = list1.concat(list2, list3);
assert.equal(list1.size, 2);
assert.equal(list2.size, 5);
assert.equal(list3.size, 6);
assert.equal(list4.size, 13);
assert.equal(list4.get(0), 1);
```
Almost all of the methods on [Array][] will be found in similar form on
`Immutable.List`, those of [Map][] found on `Immutable.Map`, and those of [Set][]
found on `Immutable.Set`, including collection operations like `forEach()`
and `map()`.
```js
import { Map } from 'immutable';
const alpha = Map({ a: 1, b: 2, c: 3, d: 4 });
alpha.map((v, k) => k.toUpperCase()).join();
// 'A,B,C,D'
```
### Convert from raw JavaScript objects and arrays.
Designed to inter-operate with your existing JavaScript, Immutable.js
accepts plain JavaScript Arrays and Objects anywhere a method expects a
`Collection`.
```js
import { Map, List } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3, d: 4 });
const map2 = Map({ c: 10, a: 20, t: 30 });
const obj = { d: 100, o: 200, g: 300 };
const map3 = map1.merge(map2, obj);
// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 }
const list1 = List([1, 2, 3]);
const list2 = List([4, 5, 6]);
const array = [7, 8, 9];
const list3 = list1.concat(list2, array);
// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
```
This is possible because Immutable.js can treat any JavaScript Array or Object
as a Collection. You can take advantage of this in order to get sophisticated
collection methods on JavaScript Objects, which otherwise have a very sparse
native API. Because Seq evaluates lazily and does not cache intermediate
results, these operations can be extremely efficient.
```js
import { Seq } from 'immutable';
const myObject = { a: 1, b: 2, c: 3 };
Seq(myObject)
.map((x) => x * x)
.toObject();
// { a: 1, b: 4, c: 9 }
```
Keep in mind, when using JS objects to construct Immutable Maps, that
JavaScript Object properties are always strings, even if written in a quote-less
shorthand, while Immutable Maps accept keys of any type.
```js
import { fromJS } from 'immutable';
const obj = { 1: 'one' };
console.log(Object.keys(obj)); // [ "1" ]
console.log(obj['1'], obj[1]); // "one", "one"
const map = fromJS(obj);
console.log(map.get('1'), map.get(1)); // "one", undefined
```
Property access for JavaScript Objects first converts the key to a string, but
since Immutable Map keys can be of any type the argument to `get()` is
not altered.
### Converts back to raw JavaScript objects.
All Immutable.js Collections can be converted to plain JavaScript Arrays and
Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`.
All Immutable Collections also implement `toJSON()` allowing them to be passed
to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of
nested objects.
```js
import { Map, List } from 'immutable';
const deep = Map({ a: 1, b: 2, c: List([3, 4, 5]) });
console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] }
console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ]
console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] }
JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}'
```
### Embraces ES2015
Immutable.js supports all JavaScript environments, including legacy
browsers (even IE11). However it also takes advantage of features added to
JavaScript in [ES2015][], the latest standard version of JavaScript, including
[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired
by the native [Map][] and [Set][] collections added to ES2015.
All examples in the Documentation are presented in ES2015. To run in all
browsers, they need to be translated to ES5.
```js
// ES2015
const mapped = foo.map((x) => x * x);
// ES5
var mapped = foo.map(function (x) {
return x * x;
});
```
All Immutable.js collections are [Iterable][iterators], which allows them to be
used anywhere an Iterable is expected, such as when spreading into an Array.
```js
import { List } from 'immutable';
const aList = List([1, 2, 3]);
const anArray = [0, ...aList, 4, 5]; // [ 0, 1, 2, 3, 4, 5 ]
```
Note: A Collection is always iterated in the same order, however that order may
not always be well defined, as is the case for the `Map` and `Set`.
[Iterators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol
[Arrow Functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
[Classes]: https://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes
[Modules]: https://www.2ality.com/2014/09/es6-modules-final.html
## Nested Structures
The collections in Immutable.js are intended to be nested, allowing for deep
trees of data, similar to JSON.
```js
import { fromJS } from 'immutable';
const nested = fromJS({ a: { b: { c: [3, 4, 5] } } });
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } }
```
A few power-tools allow for reading and operating on nested data. The
most useful are `mergeDeep`, `getIn`, `setIn`, and `updateIn`, found on `List`,
`Map` and `OrderedMap`.
```js
import { fromJS } from 'immutable';
const nested = fromJS({ a: { b: { c: [3, 4, 5] } } });
const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } });
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } }
console.log(nested2.getIn(['a', 'b', 'd'])); // 6
const nested3 = nested2.updateIn(['a', 'b', 'd'], (value) => value + 1);
console.log(nested3);
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } }
const nested4 = nested3.updateIn(['a', 'b', 'c'], (list) => list.push(6));
// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } }
```
## Equality treats Collections as Values
Immutable.js collections are treated as pure data _values_. Two immutable
collections are considered _value equal_ (via `.equals()` or `is()`) if they
represent the same collection of values. This differs from JavaScript's typical
_reference equal_ (via `===` or `==`) for Objects and Arrays which only
determines if two variables represent references to the same object instance.
Consider the example below where two identical `Map` instances are not
_reference equal_ but are _value equal_.
```js
// First consider:
const obj1 = { a: 1, b: 2, c: 3 };
const obj2 = { a: 1, b: 2, c: 3 };
obj1 !== obj2; // two different instances are always not equal with ===
import { Map, is } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
map1 !== map2; // two different instances are not reference-equal
map1.equals(map2); // but are value-equal if they have the same values
is(map1, map2); // alternatively can use the is() function
```
Value equality allows Immutable.js collections to be used as keys in Maps or
values in Sets, and retrieved with different but equivalent collections:
```js
import { Map, Set } from 'immutable';
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
const set = Set().add(map1);
set.has(map2); // true because these are value-equal
```
Note: `is()` uses the same measure of equality as [Object.is][] for scalar
strings and numbers, but uses value equality for Immutable collections,
determining if both are immutable and all keys and values are equal
using the same measure of equality.
[object.is]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
#### Performance tradeoffs
While value equality is useful in many circumstances, it has different
performance characteristics than reference equality. Understanding these
tradeoffs may help you decide which to use in each case, especially when used
to memoize some operation.
When comparing two collections, value equality may require considering every
item in each collection, on an `O(N)` time complexity. For large collections of
values, this could become a costly operation. Though if the two are not equal
and hardly similar, the inequality is determined very quickly. In contrast, when
comparing two collections with reference equality, only the initial references
to memory need to be compared which is not based on the size of the collections,
which has an `O(1)` time complexity. Checking reference equality is always very
fast, however just because two collections are not reference-equal does not rule
out the possibility that they may be value-equal.
#### Return self on no-op optimization
When possible, Immutable.js avoids creating new objects for updates where no
change in _value_ occurred, to allow for efficient _reference equality_ checking
to quickly determine if no change occurred.
```js
import { Map } from 'immutable';
const originalMap = Map({ a: 1, b: 2, c: 3 });
const updatedMap = originalMap.set('b', 2);
updatedMap === originalMap; // No-op .set() returned the original reference.
```
However updates which do result in a change will return a new reference. Each
of these operations occur independently, so two similar updates will not return
the same reference:
```js
import { Map } from 'immutable';
const originalMap = Map({ a: 1, b: 2, c: 3 });
const updatedMap = originalMap.set('b', 1000);
// New instance, leaving the original immutable.
updatedMap !== originalMap;
const anotherUpdatedMap = originalMap.set('b', 1000);
// Despite both the results of the same operation, each created a new reference.
anotherUpdatedMap !== updatedMap;
// However the two are value equal.
anotherUpdatedMap.equals(updatedMap);
```
## Batching Mutations
> If a tree falls in the woods, does it make a sound?
>
> If a pure function mutates some local data in order to produce an immutable
> return value, is that ok?
>
> — Rich Hickey, Clojure
Applying a mutation to create a new immutable object results in some overhead,
which can add up to a minor performance penalty. If you need to apply a series
of mutations locally before returning, Immutable.js gives you the ability to
create a temporary mutable (transient) copy of a collection and apply a batch of
mutations in a performant manner by using `withMutations`. In fact, this is
exactly how Immutable.js applies complex mutations itself.
As an example, building `list2` results in the creation of 1, not 3, new
immutable Lists.
```js
import { List } from 'immutable';
const list1 = List([1, 2, 3]);
const list2 = list1.withMutations(function (list) {
list.push(4).push(5).push(6);
});
assert.equal(list1.size, 3);
assert.equal(list2.size, 6);
```
Note: Immutable.js also provides `asMutable` and `asImmutable`, but only
encourages their use when `withMutations` will not suffice. Use caution to not
return a mutable copy, which could result in undesired behavior.
_Important!_: Only a select few methods can be used in `withMutations` including
`set`, `push` and `pop`. These methods can be applied directly against a
persistent data-structure where other methods like `map`, `filter`, `sort`,
and `splice` will always return new immutable data-structures and never mutate
a mutable collection.
## Lazy Seq
`Seq` describes a lazy operation, allowing them to efficiently chain
use of all the higher-order collection methods (such as `map` and `filter`)
by not creating intermediate collections.
**Seq is immutable** — Once a Seq is created, it cannot be
changed, appended to, rearranged or otherwise modified. Instead, any mutative
method called on a `Seq` will return a new `Seq`.
**Seq is lazy** — `Seq` does as little work as necessary to respond to any
method call. Values are often created during iteration, including implicit
iteration when reducing or converting to a concrete data structure such as
a `List` or JavaScript `Array`.
For example, the following performs no work, because the resulting
`Seq`'s values are never iterated:
```js
import { Seq } from 'immutable';
const oddSquares = Seq([1, 2, 3, 4, 5, 6, 7, 8])
.filter((x) => x % 2 !== 0)
.map((x) => x * x);
```
Once the `Seq` is used, it performs only the work necessary. In this
example, no intermediate arrays are ever created, filter is called three
times, and map is only called once:
```js
oddSquares.get(1); // 9
```
Any collection can be converted to a lazy Seq with `Seq()`.
```js
import { Map, Seq } from 'immutable';
const map = Map({ a: 1, b: 2, c: 3 });
const lazySeq = Seq(map);
```
`Seq` allows for the efficient chaining of operations, allowing for the
expression of logic that can otherwise be very tedious:
```js
lazySeq
.flip()
.map((key) => key.toUpperCase())
.flip();
// Seq { A: 1, B: 2, C: 3 }
```
As well as expressing logic that would otherwise seem memory or time
limited, for example `Range` is a special kind of Lazy sequence.
```js
import { Range } from 'immutable';
Range(1, Infinity)
.skip(1000)
.map((n) => -n)
.filter((n) => n % 2 === 0)
.take(2)
.reduce((r, n) => r * n, 1);
// 1006008
```
## Comparison of filter(), groupBy(), and partition()
The `filter()`, `groupBy()`, and `partition()` methods are similar in that they
all divide a collection into parts based on applying a function to each element.
All three call the predicate or grouping function once for each item in the
input collection. All three return zero or more collections of the same type as
their input. The returned collections are always distinct from the input
(according to `===`), even if the contents are identical.
Of these methods, `filter()` is the only one that is lazy and the only one which
discards items from the input collection. It is the simplest to use, and the
fact that it returns exactly one collection makes it easy to combine with other
methods to form a pipeline of operations.
The `partition()` method is similar to an eager version of `filter()`, but it
returns two collections; the first contains the items that would have been
discarded by `filter()`, and the second contains the items that would have been
kept. It always returns an array of exactly two collections, which can make it
easier to use than `groupBy()`. Compared to making two separate calls to
`filter()`, `partition()` makes half as many calls it the predicate passed to
it.
The `groupBy()` method is a more generalized version of `partition()` that can
group by an arbitrary function rather than just a predicate. It returns a map
with zero or more entries, where the keys are the values returned by the
grouping function, and the values are nonempty collections of the corresponding
arguments. Although `groupBy()` is more powerful than `partition()`, it can be
harder to use because it is not always possible predict in advance how many
entries the returned map will have and what their keys will be.
| Summary | `filter` | `partition` | `groupBy` |
| :---------------------------- | :------- | :---------- | :------------- |
| ease of use | easiest | moderate | hardest |
| generality | least | moderate | most |
| laziness | lazy | eager | eager |
| # of returned sub-collections | 1 | 2 | 0 or more |
| sub-collections may be empty | yes | yes | no |
| can discard items | yes | no | no |
| wrapping container | none | array | Map/OrderedMap |
## Additional Tools and Resources
- [Atom-store](https://github.com/jameshopkins/atom-store/)
- A Clojure-inspired atom implementation in Javascript with configurability
for external persistance.
- [Chai Immutable](https://github.com/astorije/chai-immutable)
- If you are using the [Chai Assertion Library](https://chaijs.com/), this
provides a set of assertions to use against Immutable.js collections.
- [Fantasy-land](https://github.com/fantasyland/fantasy-land)
- Specification for interoperability of common algebraic structures in JavaScript.
- [Immutagen](https://github.com/pelotom/immutagen)
- A library for simulating immutable generators in JavaScript.
- [Immutable-cursor](https://github.com/redbadger/immutable-cursor)
- Immutable cursors incorporating the Immutable.js interface over
Clojure-inspired atom.
- [Immutable-ext](https://github.com/DrBoolean/immutable-ext)
- Fantasyland extensions for immutablejs
- [Immutable-js-tools](https://github.com/madeinfree/immutable-js-tools)
- Util tools for immutable.js
- [Immutable-Redux](https://github.com/gajus/redux-immutable)
- redux-immutable is used to create an equivalent function of Redux
combineReducers that works with Immutable.js state.
- [Immutable-Treeutils](https://github.com/lukasbuenger/immutable-treeutils)
- Functional tree traversal helpers for ImmutableJS data structures.
- [Irecord](https://github.com/ericelliott/irecord)
- An immutable store that exposes an RxJS observable. Great for React.
- [Mudash](https://github.com/brianneisler/mudash)
- Lodash wrapper providing Immutable.JS support.
- [React-Immutable-PropTypes](https://github.com/HurricaneJames/react-immutable-proptypes)
- PropType validators that work with Immutable.js.
- [Redux-Immutablejs](https://github.com/indexiatech/redux-immutablejs)
- Redux Immutable facilities.
- [Rxstate](https://github.com/yamalight/rxstate)
- Simple opinionated state management library based on RxJS and Immutable.js.
- [Transit-Immutable-js](https://github.com/glenjamin/transit-immutable-js)
- Transit serialisation for Immutable.js.
- See also: [Transit-js](https://github.com/cognitect/transit-js)
Have an additional tool designed to work with Immutable.js?
Submit a PR to add it to this list in alphabetical order.
## Contributing
Use [Github issues](https://github.com/immutable-js/immutable-js/issues) for requests.
We actively welcome pull requests, learn how to [contribute](https://github.com/immutable-js/immutable-js/blob/main/.github/CONTRIBUTING.md).
Immutable.js is maintained within the [Contributor Covenant's Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/).
### Changelog
Changes are tracked as [Github releases](https://github.com/immutable-js/immutable-js/releases).
### License
Immutable.js is [MIT-licensed](./LICENSE).
### Thanks
[Phil Bagwell](https://www.youtube.com/watch?v=K2NYwP90bNs), for his inspiration
and research in persistent data structures.
[Hugh Jackson](https://github.com/hughfdjackson/), for providing the npm package
name. If you're looking for his unsupported package, see [this repository](https://github.com/hughfdjackson/immutable).
@@ -0,0 +1 @@
{"version":3,"file":"bearerAuth.js","sourceRoot":"","sources":["../../../../../src/server/auth/middleware/bearerAuth.ts"],"names":[],"mappings":";;AA6DA,8CAwEC;AApID,4CAAkG;AA8BlG,4EAA4E;AAC5E,SAAS,kBAAkB,CAAC,KAAU;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,gIAAgI;AAChI,SAAS,YAAY,CAAC,QAAyB,EAAE,QAAa;IAC1D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAO,kBAAkB,CAAC,QAAQ,CAAC,KAAK,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AACzE,CAAC;AAWD;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAAC,EAC9B,QAAQ,EACR,cAAc,GAAG,EAAE,EACnB,mBAAmB,EACnB,gBAAgB,EACU;IAC1B,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC5B,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;YAC7C,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,MAAM,IAAI,6BAAiB,CAAC,8BAA8B,CAAC,CAAC;YAChE,CAAC;YAED,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;Y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YACnD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2016, Jon Schlinkert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,62 @@
{
"name": "@radix-ui/rect",
"version": "1.1.1",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"publishConfig": {
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
},
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"lint": "eslint --max-warnings 0 src",
"clean": "rm -rf dist",
"version": "yarn version"
},
"devDependencies": {
"@repo/eslint-config": "0.0.0",
"@repo/typescript-config": "0.0.0",
"eslint": "^9.18.0",
"typescript": "^5.7.3"
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"types": "./dist/index.d.ts"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_NI","2":"_aB","132":"P"},C:{"1":"_GJ _lB","2":"_NP"},D:{"1":"_MM","2":"_eL","132":"7B _KD _vD"},E:{"1":"_PB","2":"_UB"},F:{"1":"_RI","2":"_qO","132":"_AJ _eJ"},G:{"1":"_s","2":"_3"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_sF","2":"J","132":"_mJ BE"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"relList (DOMTokenList)",D:true};
@@ -0,0 +1,622 @@
# MockAgent
<!--introduced_in=v4.0.0-->
<!--type=module-->
<!-- source_link=lib/mock/mock-agent.js -->
> Stability: 2 - Stable
A `MockAgent` is a {Dispatcher} that intercepts HTTP requests made through
undici and replies with programmed mock responses instead of contacting the
network. It is useful for testing code that performs HTTP requests without
relying on a live server.
A `MockAgent` does not intercept requests on its own. Mock responses are
registered on the {MockClient} or {MockPool} instances returned by
[`mockAgent.get(origin)`][], and requests are routed through them once the
`MockAgent` is set as the dispatcher (for example through
[`setGlobalDispatcher()`][] or a per-request `dispatcher` option).
> [!NOTE]
> [`setGlobalDispatcher()`][] only affects undici APIs that use the global
> dispatcher, such as `request()` and `fetch()`. It does not replace or
> monkeypatch {Pool} or {Client} instances that were created separately. To test
> code that accepts or creates a pool/client directly, pass the {MockPool} or
> {MockClient} returned by [`mockAgent.get(origin)`][] into that code.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
```
## Class: `MockAgent`
<!-- YAML
added: v4.0.0
-->
* Extends: {Dispatcher}
Intercepts HTTP requests made through undici and returns mocked responses.
### `new MockAgent([options])`
<!-- YAML
added: v4.0.0
changes:
- version: v7.16.0
pr-url: https://github.com/nodejs/undici/pull/4479
description: Mock options are always normalized to an object internally.
-->
* `options` {MockAgentOptions} (optional)
* Returns: {MockAgent}
When instantiated, a `MockAgent` is automatically activated. It does not
intercept any request until mock interceptors are registered on the dispatchers
returned by [`mockAgent.get(origin)`][].
#### Parameter: `MockAgentOptions`
* Extends: {AgentOptions}
* `agent` {Dispatcher} (optional) A custom agent to be encapsulated by the
`MockAgent`. It must implement the `Agent` API (that is, expose a `dispatch`
function). **Default:** a new {Agent} constructed from `options`.
* `ignoreTrailingSlash` {boolean} (optional) Whether trailing slashes in the
request path are ignored when matching interceptors. **Default:** `false`.
* `acceptNonStandardSearchParameters` {boolean} (optional) Whether the matcher
also accepts URLs using non-standard search-parameter syntaxes, such as
multi-value items written with `[]` (for example `param[]=1&param[]=2`) or
comma-separated values (for example `param=1,2,3`). **Default:** `false`.
* `enableCallHistory` {boolean} (optional) Whether call history recording is
enabled. See [`mockAgent.getCallHistory()`][]. **Default:** `false`.
```mjs displayName="Basic instantiation"
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
```
```mjs displayName="Instantiation with a custom agent"
import { Agent, MockAgent } from 'undici'
const agent = new Agent()
const mockAgent = new MockAgent({ agent })
```
### `mockAgent.get(origin)`
<!-- YAML
added: v4.0.0
-->
* `origin` {string|RegExp|Function} A matcher for the origin to retrieve. The
function form has the signature `(origin) => boolean`.
* Returns: {MockClient|MockPool}
Creates and retrieves the mock dispatcher used to intercept requests for the
given origin. When the `connections` option of the `MockAgent` is `1`, a
{MockClient} is returned; otherwise a {MockPool} is returned. Subsequent calls
with the same origin return the same instance.
The way `origin` is matched against incoming requests depends on its type:
| Matcher type | Condition to pass |
| :----------: | ---------------------------- |
| `string` | Exact match against the value |
| `RegExp` | The regular expression matches |
| `Function` | The function returns `true` |
```mjs displayName="Basic mocked request"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
const mockPool = mockAgent.get('http://localhost:3000')
mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode, body } = await request('http://localhost:3000/foo')
console.log('response received', statusCode) // response received 200
for await (const data of body) {
console.log('data', data.toString('utf8')) // data foo
}
```
```mjs displayName="Mocked request using a local dispatcher"
import { MockAgent, request } from 'undici'
const mockAgent = new MockAgent()
const mockPool = mockAgent.get('http://localhost:3000')
mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode, body } = await request('http://localhost:3000/foo', {
dispatcher: mockAgent
})
console.log('response received', statusCode) // response received 200
for await (const data of body) {
console.log('data', data.toString('utf8')) // data foo
}
```
```mjs displayName="Testing code that accepts a pool"
import { MockAgent } from 'undici'
async function getStatus (pool) {
const { statusCode } = await pool.request({
path: '/foo',
method: 'GET'
})
return statusCode
}
const mockAgent = new MockAgent()
const mockPool = mockAgent.get('http://localhost:3000')
mockPool.intercept({ path: '/foo', method: 'GET' }).reply(200)
console.log(await getStatus(mockPool)) // 200
```
```mjs displayName="Returning a MockClient"
import { MockAgent, request } from 'undici'
const mockAgent = new MockAgent({ connections: 1 })
const mockClient = mockAgent.get('http://localhost:3000')
mockClient.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode, body } = await request('http://localhost:3000/foo', {
dispatcher: mockClient
})
console.log('response received', statusCode) // response received 200
for await (const data of body) {
console.log('data', data.toString('utf8')) // data foo
}
```
```mjs displayName="Matching the origin with a regular expression"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
const mockPool = mockAgent.get(new RegExp('http://localhost:3000'))
mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode } = await request('http://localhost:3000/foo')
console.log('response received', statusCode) // response received 200
```
```mjs displayName="Matching the origin with a function"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
const mockPool = mockAgent.get((origin) => origin === 'http://localhost:3000')
mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode } = await request('http://localhost:3000/foo')
console.log('response received', statusCode) // response received 200
```
### `mockAgent.dispatch(options, handler)`
<!-- YAML
added: v4.0.0
-->
* `options` {AgentDispatchOptions}
* `handler` {DispatchHandler}
* Returns: {boolean}
Dispatches a mocked request. This implements
[`Dispatcher.dispatch()`][] for the encapsulated agent: it ensures the mock
dispatcher for `options.origin` exists, records the call in the call history
when enabled, and forwards the request to the underlying agent. It is normally
invoked indirectly through higher-level methods such as
[`mockAgent.request()`][].
```mjs displayName="Using mockAgent.request()"
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
const mockPool = mockAgent.get('http://localhost:3000')
mockPool.intercept({ path: '/foo' }).reply(200, 'foo')
const { statusCode, body } = await mockAgent.request({
origin: 'http://localhost:3000',
path: '/foo',
method: 'GET'
})
console.log('response received', statusCode) // response received 200
for await (const data of body) {
console.log('data', data.toString('utf8')) // data foo
}
```
### `mockAgent.close()`
<!-- YAML
added: v4.0.0
-->
* Returns: {Promise<void>} Resolves once the agent and its registered mock pools
and clients have closed.
Clears the call history, closes the encapsulated agent, and waits for all
registered mock pools and clients to close.
```mjs displayName="Clean up after tests"
import { MockAgent, setGlobalDispatcher } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
await mockAgent.close()
```
### `mockAgent.deactivate()`
<!-- YAML
added: v4.0.0
-->
* Returns: {undefined}
Disables mocking on the `MockAgent`. While deactivated, requests are no longer
intercepted.
```mjs displayName="Deactivate mocking"
import { MockAgent, setGlobalDispatcher } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
mockAgent.deactivate()
```
### `mockAgent.activate()`
<!-- YAML
added: v4.0.0
-->
* Returns: {undefined}
Enables mocking on the `MockAgent`. A `MockAgent` is activated automatically
when instantiated, so this method is only required after
[`mockAgent.deactivate()`][] has been called.
```mjs displayName="Re-activate mocking"
import { MockAgent, setGlobalDispatcher } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
mockAgent.deactivate()
// No mocking will occur
// Later
mockAgent.activate()
```
### `mockAgent.enableNetConnect([matcher])`
<!-- YAML
added: v4.0.0
-->
* `matcher` {string|RegExp|Function} (optional) A host matcher. When a string is
used it should only contain the hostname and, optionally, the port. The
function form has the signature `(host) => boolean`. When omitted, all
non-matching requests are allowed to perform a real request.
* Returns: {undefined}
Defines host matchers so that requests that are not intercepted by a mock
dispatcher are allowed to perform a real HTTP request. Calling this method
multiple times with a string appends each value to the list of allowed hosts.
```mjs displayName="Allow all non-matching requests"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
mockAgent.enableNetConnect()
await request('http://example.com')
// A real request is made
```
```mjs displayName="Allow requests matching specific hosts"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
mockAgent.enableNetConnect('example-1.com')
mockAgent.enableNetConnect('example-2.com:8080')
await request('http://example-1.com')
// A real request is made
await request('http://example-2.com:8080')
// A real request is made
await request('http://example-3.com')
// Will throw
```
```mjs displayName="Allow requests matching a regular expression or function"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent()
setGlobalDispatcher(mockAgent)
mockAgent.enableNetConnect(new RegExp('example.com'))
mockAgent.enableNetConnect((host) => host === 'example.org')
await request('http://example.com')
// A real request is made
```
### `mockAgent.disableNetConnect()`
<!-- YAML
added: v4.0.0
-->
* Returns: {undefined}
Causes every request that is not matched by a mock interceptor to throw,
disallowing real HTTP requests.
```mjs displayName="Throw on every non-matching request"
import { MockAgent, request } from 'undici'
const mockAgent = new MockAgent()
mockAgent.disableNetConnect()
await request('http://example.com')
// Will throw
```
### `mockAgent.enableCallHistory()`
<!-- YAML
added: v7.5.0
-->
* Returns: {MockAgent} The same `MockAgent` instance, for chaining.
Enables call history recording. Once enabled, subsequent calls are registered
and can be retrieved through [`mockAgent.getCallHistory()`][]. Call history can
also be enabled at construction time with the `enableCallHistory` option.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
mockAgent.enableCallHistory()
```
### `mockAgent.disableCallHistory()`
<!-- YAML
added: v7.5.0
-->
* Returns: {MockAgent} The same `MockAgent` instance, for chaining.
Disables call history recording. Subsequent calls are no longer registered.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent({ enableCallHistory: true })
mockAgent.disableCallHistory()
```
### `mockAgent.getCallHistory()`
<!-- YAML
added: v7.5.0
-->
* Returns: {MockCallHistory|undefined} The {MockCallHistory} instance, or
`undefined` when call history is not enabled.
Returns the call history instance, which records every request made through the
`MockAgent` (whether intercepted or not). Call history is not enabled by
default; enable it with the `enableCallHistory` option or
[`mockAgent.enableCallHistory()`][].
```mjs displayName="Inspect recorded calls"
import { MockAgent, setGlobalDispatcher, request } from 'undici'
const mockAgent = new MockAgent({ enableCallHistory: true })
setGlobalDispatcher(mockAgent)
await request('http://example.com', { query: { item: 1 } })
mockAgent.getCallHistory()?.firstCall()
// Returns
// MockCallHistoryLog {
// body: undefined,
// headers: undefined,
// method: 'GET',
// origin: 'http://example.com',
// fullUrl: 'http://example.com/?item=1',
// path: '/',
// searchParams: { item: '1' },
// protocol: 'http:',
// host: 'example.com',
// port: ''
// }
```
### `mockAgent.clearCallHistory()`
<!-- YAML
added: v7.5.0
-->
* Returns: {undefined}
Clears the call history, deleting every recorded {MockCallHistoryLog} on the
{MockCallHistory} instance. It is a no-op when call history has never been
enabled.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent({ enableCallHistory: true })
mockAgent.clearCallHistory()
```
### `mockAgent.pendingInterceptors()`
<!-- YAML
added: v5.1.0
-->
* Returns: {PendingInterceptor[]} A `PendingInterceptor` is a `MockDispatch`
with an additional `origin` {string} property.
Returns the interceptors registered on the `MockAgent` that are still pending.
An interceptor is pending when it meets one of the following criteria:
* It is registered with neither `.times(<number>)` nor `.persist()` and has not
been invoked.
* It is persistent (registered with `.persist()`) and has not been invoked.
* It is registered with `.times(<number>)` and has not been invoked `<number>`
times.
```mjs displayName="List pending interceptors"
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
mockAgent.disableNetConnect()
mockAgent
.get('https://example.com')
.intercept({ method: 'GET', path: '/' })
.reply(200)
const pendingInterceptors = mockAgent.pendingInterceptors()
// Returns [
// {
// timesInvoked: 0,
// times: 1,
// persist: false,
// consumed: false,
// pending: true,
// path: '/',
// method: 'GET',
// body: undefined,
// headers: undefined,
// data: {
// error: null,
// statusCode: 200,
// data: '',
// headers: {},
// trailers: {}
// },
// origin: 'https://example.com'
// }
// ]
```
### `mockAgent.assertNoPendingInterceptors([options])`
<!-- YAML
added: v5.1.0
-->
* `options` {Object} (optional)
* `pendingInterceptorsFormatter` {Object} An object exposing a
`format(pendingInterceptors)` method used to render the pending interceptors
in the thrown error message. **Default:** a built-in formatter that prints a
table.
* Returns: {undefined}
Throws an {UndiciError} when the `MockAgent` has any pending interceptors. The
criteria for an interceptor being pending are the same as for
[`mockAgent.pendingInterceptors()`][].
```mjs displayName="Assert there are no pending interceptors"
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
mockAgent.disableNetConnect()
mockAgent
.get('https://example.com')
.intercept({ method: 'GET', path: '/' })
.reply(200)
mockAgent.assertNoPendingInterceptors()
// Throws an UndiciError with the following message:
//
// 1 interceptor is pending:
//
// ┌─────────┬────────┬───────────────────────┬──────┬─────────────┬────────────┬─────────────┬───────────┐
// │ (index) │ Method │ Origin │ Path │ Status code │ Persistent │ Invocations │ Remaining │
// ├─────────┼────────┼───────────────────────┼──────┼─────────────┼────────────┼─────────────┼───────────┤
// │ 0 │ 'GET' │ 'https://example.com' │ '/' │ 200 │ '❌' │ 0 │ 1 │
// └─────────┴────────┴───────────────────────┴──────┴─────────────┴────────────┴─────────────┴───────────┘
```
### `mockAgent.isMockActive`
<!-- YAML
added: v5.3.0
-->
* Type: {boolean} `true` while mocking is active, `false` after
[`mockAgent.deactivate()`][] has been called.
A read-only property indicating whether mocking is currently active on the
`MockAgent`.
```mjs
import { MockAgent } from 'undici'
const mockAgent = new MockAgent()
console.log(mockAgent.isMockActive) // true
mockAgent.deactivate()
console.log(mockAgent.isMockActive) // false
```
[`Dispatcher.dispatch()`]: Dispatcher.md#dispatcherdispatchoptions-handler
[`mockAgent.deactivate()`]: #mockagentdeactivate
[`mockAgent.enableCallHistory()`]: #mockagentenablecallhistory
[`mockAgent.get(origin)`]: #mockagentgetorigin
[`mockAgent.getCallHistory()`]: #mockagentgetcallhistory
[`mockAgent.pendingInterceptors()`]: #mockagentpendinginterceptors
[`mockAgent.request()`]: Dispatcher.md#dispatcherrequestoptions-callback
[`setGlobalDispatcher()`]: Dispatcher.md#setglobaldispatcherdispatcher
@@ -0,0 +1,29 @@
import { isDragging } from './is-active.mjs';
function setDragLock(axis) {
if (axis === "x" || axis === "y") {
if (isDragging[axis]) {
return null;
}
else {
isDragging[axis] = true;
return () => {
isDragging[axis] = false;
};
}
}
else {
if (isDragging.x || isDragging.y) {
return null;
}
else {
isDragging.x = isDragging.y = true;
return () => {
isDragging.x = isDragging.y = false;
};
}
}
}
export { setDragLock };
//# sourceMappingURL=set-active.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../web/response.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,cAAc,KA4ClB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_LC","2":"_IB"},B:{"1":"_J"},C:{"1":"_fD","132":"GD"},D:{"1":"_Q"},E:{"1":"_R"},F:{"1":"_c"},G:{"1":"_M"},H:{"1":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:2,C:"CSS Table display",D:true};
@@ -0,0 +1,23 @@
Copyright (c) Donald Stufft and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,40 @@
{
"name": "estraverse",
"description": "ECMAScript JS AST traversal functions",
"homepage": "https://github.com/estools/estraverse",
"main": "estraverse.js",
"version": "5.3.0",
"engines": {
"node": ">=4.0"
},
"maintainers": [
{
"name": "Yusuke Suzuki",
"email": "utatane.tea@gmail.com",
"web": "http://github.com/Constellation"
}
],
"repository": {
"type": "git",
"url": "http://github.com/estools/estraverse.git"
},
"devDependencies": {
"babel-preset-env": "^1.6.1",
"babel-register": "^6.3.13",
"chai": "^2.1.1",
"espree": "^1.11.0",
"gulp": "^3.8.10",
"gulp-bump": "^0.2.2",
"gulp-filter": "^2.0.0",
"gulp-git": "^1.0.1",
"gulp-tag-version": "^1.3.0",
"jshint": "^2.5.6",
"mocha": "^2.1.0"
},
"license": "BSD-2-Clause",
"scripts": {
"test": "npm run-script lint && npm run-script unit-test",
"lint": "jshint estraverse.js",
"unit-test": "mocha --compilers js:babel-register"
}
}
@@ -0,0 +1,63 @@
{
"name": "@radix-ui/react-slot",
"version": "1.3.0",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.3"
},
"devDependencies": {
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"typescript": "^5.9.3",
"@repo/typescript-config": "0.0.0",
"@repo/builder": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git",
"directory": "packages/react/slot"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "oxlint --max-warnings 0 src",
"clean": "rm -rf dist",
"reset": "rm -rf dist node_modules",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1,380 @@
const { InvalidArgumentError } = require('./error.js');
class Option {
/**
* Initialize a new `Option` with the given `flags` and `description`.
*
* @param {string} flags
* @param {string} [description]
*/
constructor(flags, description) {
this.flags = flags;
this.description = description || '';
this.required = flags.includes('<'); // A value must be supplied when the option is specified.
this.optional = flags.includes('['); // A value is optional when the option is specified.
// variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument
this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values.
this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.
const optionFlags = splitOptionFlags(flags);
this.short = optionFlags.shortFlag; // May be a short flag, undefined, or even a long flag (if option has two long flags).
this.long = optionFlags.longFlag;
this.negate = false;
if (this.long) {
this.negate = this.long.startsWith('--no-');
}
this.defaultValue = undefined;
this.defaultValueDescription = undefined;
this.presetArg = undefined;
this.envVar = undefined;
this.parseArg = undefined;
this.hidden = false;
this.argChoices = undefined;
this.conflictsWith = [];
this.implied = undefined;
this.helpGroupHeading = undefined; // soft initialised when option added to command
}
/**
* Set the default value, and optionally supply the description to be displayed in the help.
*
* @param {*} value
* @param {string} [description]
* @return {Option}
*/
default(value, description) {
this.defaultValue = value;
this.defaultValueDescription = description;
return this;
}
/**
* Preset to use when option used without option-argument, especially optional but also boolean and negated.
* The custom processing (parseArg) is called.
*
* @example
* new Option('--color').default('GREYSCALE').preset('RGB');
* new Option('--donate [amount]').preset('20').argParser(parseFloat);
*
* @param {*} arg
* @return {Option}
*/
preset(arg) {
this.presetArg = arg;
return this;
}
/**
* Add option name(s) that conflict with this option.
* An error will be displayed if conflicting options are found during parsing.
*
* @example
* new Option('--rgb').conflicts('cmyk');
* new Option('--js').conflicts(['ts', 'jsx']);
*
* @param {(string | string[])} names
* @return {Option}
*/
conflicts(names) {
this.conflictsWith = this.conflictsWith.concat(names);
return this;
}
/**
* Specify implied option values for when this option is set and the implied options are not.
*
* The custom processing (parseArg) is not called on the implied values.
*
* @example
* program
* .addOption(new Option('--log', 'write logging information to file'))
* .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));
*
* @param {object} impliedOptionValues
* @return {Option}
*/
implies(impliedOptionValues) {
let newImplied = impliedOptionValues;
if (typeof impliedOptionValues === 'string') {
// string is not documented, but easy mistake and we can do what user probably intended.
newImplied = { [impliedOptionValues]: true };
}
this.implied = Object.assign(this.implied || {}, newImplied);
return this;
}
/**
* Set environment variable to check for option value.
*
* An environment variable is only used if when processed the current option value is
* undefined, or the source of the current value is 'default' or 'config' or 'env'.
*
* @param {string} name
* @return {Option}
*/
env(name) {
this.envVar = name;
return this;
}
/**
* Set the custom handler for processing CLI option arguments into option values.
*
* @param {Function} [fn]
* @return {Option}
*/
argParser(fn) {
this.parseArg = fn;
return this;
}
/**
* Whether the option is mandatory and must have a value after parsing.
*
* @param {boolean} [mandatory=true]
* @return {Option}
*/
makeOptionMandatory(mandatory = true) {
this.mandatory = !!mandatory;
return this;
}
/**
* Hide option in help.
*
* @param {boolean} [hide=true]
* @return {Option}
*/
hideHelp(hide = true) {
this.hidden = !!hide;
return this;
}
/**
* @package
*/
_collectValue(value, previous) {
if (previous === this.defaultValue || !Array.isArray(previous)) {
return [value];
}
previous.push(value);
return previous;
}
/**
* Only allow option value to be one of choices.
*
* @param {string[]} values
* @return {Option}
*/
choices(values) {
this.argChoices = values.slice();
this.parseArg = (arg, previous) => {
if (!this.argChoices.includes(arg)) {
throw new InvalidArgumentError(
`Allowed choices are ${this.argChoices.join(', ')}.`,
);
}
if (this.variadic) {
return this._collectValue(arg, previous);
}
return arg;
};
return this;
}
/**
* Return option name.
*
* @return {string}
*/
name() {
if (this.long) {
return this.long.replace(/^--/, '');
}
return this.short.replace(/^-/, '');
}
/**
* Return option name, in a camelcase format that can be used
* as an object attribute key.
*
* @return {string}
*/
attributeName() {
if (this.negate) {
return camelcase(this.name().replace(/^no-/, ''));
}
return camelcase(this.name());
}
/**
* Set the help group heading.
*
* @param {string} heading
* @return {Option}
*/
helpGroup(heading) {
this.helpGroupHeading = heading;
return this;
}
/**
* Check if `arg` matches the short or long flag.
*
* @param {string} arg
* @return {boolean}
* @package
*/
is(arg) {
return this.short === arg || this.long === arg;
}
/**
* Return whether a boolean option.
*
* Options are one of boolean, negated, required argument, or optional argument.
*
* @return {boolean}
* @package
*/
isBoolean() {
return !this.required && !this.optional && !this.negate;
}
}
/**
* This class is to make it easier to work with dual options, without changing the existing
* implementation. We support separate dual options for separate positive and negative options,
* like `--build` and `--no-build`, which share a single option value. This works nicely for some
* use cases, but is tricky for others where we want separate behaviours despite
* the single shared option value.
*/
class DualOptions {
/**
* @param {Option[]} options
*/
constructor(options) {
this.positiveOptions = new Map();
this.negativeOptions = new Map();
this.dualOptions = new Set();
options.forEach((option) => {
if (option.negate) {
this.negativeOptions.set(option.attributeName(), option);
} else {
this.positiveOptions.set(option.attributeName(), option);
}
});
this.negativeOptions.forEach((value, key) => {
if (this.positiveOptions.has(key)) {
this.dualOptions.add(key);
}
});
}
/**
* Did the value come from the option, and not from possible matching dual option?
*
* @param {*} value
* @param {Option} option
* @returns {boolean}
*/
valueFromOption(value, option) {
const optionKey = option.attributeName();
if (!this.dualOptions.has(optionKey)) return true;
// Use the value to deduce if (probably) came from the option.
const preset = this.negativeOptions.get(optionKey).presetArg;
const negativeValue = preset !== undefined ? preset : false;
return option.negate === (negativeValue === value);
}
}
/**
* Convert string from kebab-case to camelCase.
*
* @param {string} str
* @return {string}
* @private
*/
function camelcase(str) {
return str.split('-').reduce((str, word) => {
return str + word[0].toUpperCase() + word.slice(1);
});
}
/**
* Split the short and long flag out of something like '-m,--mixed <value>'
*
* @private
*/
function splitOptionFlags(flags) {
let shortFlag;
let longFlag;
// short flag, single dash and single character
const shortFlagExp = /^-[^-]$/;
// long flag, double dash and at least one character
const longFlagExp = /^--[^-]/;
const flagParts = flags.split(/[ |,]+/).concat('guard');
// Normal is short and/or long.
if (shortFlagExp.test(flagParts[0])) shortFlag = flagParts.shift();
if (longFlagExp.test(flagParts[0])) longFlag = flagParts.shift();
// Long then short. Rarely used but fine.
if (!shortFlag && shortFlagExp.test(flagParts[0]))
shortFlag = flagParts.shift();
// Allow two long flags, like '--ws, --workspace'
// This is the supported way to have a shortish option flag.
if (!shortFlag && longFlagExp.test(flagParts[0])) {
shortFlag = longFlag;
longFlag = flagParts.shift();
}
// Check for unprocessed flag. Fail noisily rather than silently ignore.
if (flagParts[0].startsWith('-')) {
const unsupportedFlag = flagParts[0];
const baseError = `option creation failed due to '${unsupportedFlag}' in option flags '${flags}'`;
if (/^-[^-][^-]/.test(unsupportedFlag))
throw new Error(
`${baseError}
- a short flag is a single dash and a single character
- either use a single dash and a single character (for a short flag)
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`,
);
if (shortFlagExp.test(unsupportedFlag))
throw new Error(`${baseError}
- too many short flags`);
if (longFlagExp.test(unsupportedFlag))
throw new Error(`${baseError}
- too many long flags`);
throw new Error(`${baseError}
- unrecognised flag format`);
}
if (shortFlag === undefined && longFlag === undefined)
throw new Error(
`option creation failed due to no flags found in '${flags}'.`,
);
return { shortFlag, longFlag };
}
exports.Option = Option;
exports.DualOptions = DualOptions;
@@ -0,0 +1,40 @@
import * as React from 'react';
type ChangeHandler$1<T> = (state: T) => void;
type SetStateFn<T> = React.Dispatch<React.SetStateAction<T>>;
interface UseControllableStateParams$1<T> {
prop?: T | undefined;
defaultProp: T;
onChange?: ChangeHandler$1<T>;
caller?: string;
}
declare function useControllableState<T>({ prop, defaultProp, onChange, caller, }: UseControllableStateParams$1<T>): [T, SetStateFn<T>];
type ChangeHandler<T> = (state: T) => void;
interface UseControllableStateParams<T> {
prop: T | undefined;
defaultProp: T;
onChange: ChangeHandler<T> | undefined;
caller: string;
}
interface AnyAction {
type: string;
}
declare function useControllableStateReducer<T, S extends {}, A extends AnyAction>(reducer: (prevState: S & {
state: T;
}, action: A) => S & {
state: T;
}, userArgs: UseControllableStateParams<T>, initialState: S): [S & {
state: T;
}, React.Dispatch<A>];
declare function useControllableStateReducer<T, S extends {}, I, A extends AnyAction>(reducer: (prevState: S & {
state: T;
}, action: A) => S & {
state: T;
}, userArgs: UseControllableStateParams<T>, initialArg: I, init: (i: I & {
state: T;
}) => S): [S & {
state: T;
}, React.Dispatch<A>];
export { useControllableState, useControllableStateReducer };
@@ -0,0 +1,305 @@
/*
Copyright 2012-2015, Yahoo Inc.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
const InsertionText = require('./insertion-text');
const lt = '\u0001';
const gt = '\u0002';
const RE_LT = /</g;
const RE_GT = />/g;
const RE_AMP = /&/g;
// eslint-disable-next-line
var RE_lt = /\u0001/g;
// eslint-disable-next-line
var RE_gt = /\u0002/g;
function title(str) {
return ' title="' + str + '" ';
}
function customEscape(text) {
text = String(text);
return text
.replace(RE_AMP, '&amp;')
.replace(RE_LT, '&lt;')
.replace(RE_GT, '&gt;')
.replace(RE_lt, '<')
.replace(RE_gt, '>');
}
function annotateLines(fileCoverage, structuredText) {
const lineStats = fileCoverage.getLineCoverage();
if (!lineStats) {
return;
}
Object.entries(lineStats).forEach(([lineNumber, count]) => {
if (structuredText[lineNumber]) {
structuredText[lineNumber].covered = count > 0 ? 'yes' : 'no';
structuredText[lineNumber].hits = count;
}
});
}
function annotateStatements(fileCoverage, structuredText) {
const statementStats = fileCoverage.s;
const statementMeta = fileCoverage.statementMap;
Object.entries(statementStats).forEach(([stName, count]) => {
const meta = statementMeta[stName];
const type = count > 0 ? 'yes' : 'no';
const startCol = meta.start.column;
let endCol = meta.end.column + 1;
const startLine = meta.start.line;
const endLine = meta.end.line;
const openSpan =
lt +
'span class="' +
(meta.skip ? 'cstat-skip' : 'cstat-no') +
'"' +
title('statement not covered') +
gt;
const closeSpan = lt + '/span' + gt;
let text;
if (type === 'no' && structuredText[startLine]) {
if (endLine !== startLine) {
endCol = structuredText[startLine].text.originalLength();
}
text = structuredText[startLine].text;
text.wrap(
startCol,
openSpan,
startCol < endCol ? endCol : text.originalLength(),
closeSpan
);
}
});
}
function annotateFunctions(fileCoverage, structuredText) {
const fnStats = fileCoverage.f;
const fnMeta = fileCoverage.fnMap;
if (!fnStats) {
return;
}
Object.entries(fnStats).forEach(([fName, count]) => {
const meta = fnMeta[fName];
const type = count > 0 ? 'yes' : 'no';
// Some versions of the instrumenter in the wild populate 'func'
// but not 'decl':
const decl = meta.decl || meta.loc;
const startCol = decl.start.column;
let endCol = decl.end.column + 1;
const startLine = decl.start.line;
const endLine = decl.end.line;
const openSpan =
lt +
'span class="' +
(meta.skip ? 'fstat-skip' : 'fstat-no') +
'"' +
title('function not covered') +
gt;
const closeSpan = lt + '/span' + gt;
let text;
if (type === 'no' && structuredText[startLine]) {
if (endLine !== startLine) {
endCol = structuredText[startLine].text.originalLength();
}
text = structuredText[startLine].text;
text.wrap(
startCol,
openSpan,
startCol < endCol ? endCol : text.originalLength(),
closeSpan
);
}
});
}
function annotateBranches(fileCoverage, structuredText) {
const branchStats = fileCoverage.b;
const branchMeta = fileCoverage.branchMap;
if (!branchStats) {
return;
}
Object.entries(branchStats).forEach(([branchName, branchArray]) => {
const sumCount = branchArray.reduce((p, n) => p + n, 0);
const metaArray = branchMeta[branchName].locations;
let i;
let count;
let meta;
let startCol;
let endCol;
let startLine;
let endLine;
let openSpan;
let closeSpan;
let text;
// only highlight if partial branches are missing or if there is a
// single uncovered branch.
if (sumCount > 0 || (sumCount === 0 && branchArray.length === 1)) {
// Need to recover the metaArray placeholder item to count an implicit else
if (
// Check if the branch is a conditional if branch.
branchMeta[branchName].type === 'if' &&
// Check if the branch has an implicit else.
branchArray.length === 2 &&
// Check if the implicit else branch is unaccounted for.
metaArray.length === 1 &&
// Check if the implicit else branch is uncovered.
branchArray[1] === 0
) {
metaArray[1] = {
start: {},
end: {}
};
}
for (
i = 0;
i < branchArray.length && i < metaArray.length;
i += 1
) {
count = branchArray[i];
meta = metaArray[i];
startCol = meta.start.column;
endCol = meta.end.column + 1;
startLine = meta.start.line;
endLine = meta.end.line;
openSpan =
lt +
'span class="branch-' +
i +
' ' +
(meta.skip ? 'cbranch-skip' : 'cbranch-no') +
'"' +
title('branch not covered') +
gt;
closeSpan = lt + '/span' + gt;
// If the branch is an implicit else from an if statement,
// then the coverage report won't show a statistic.
// Therefore, the previous branch will be used to report that
// there is no coverage on that implicit branch.
if (
count === 0 &&
startLine === undefined &&
branchMeta[branchName].type === 'if'
) {
const prevMeta = metaArray[i - 1];
startCol = prevMeta.start.column;
endCol = prevMeta.end.column + 1;
startLine = prevMeta.start.line;
endLine = prevMeta.end.line;
}
if (count === 0 && structuredText[startLine]) {
//skip branches taken
if (endLine !== startLine) {
endCol = structuredText[
startLine
].text.originalLength();
}
text = structuredText[startLine].text;
if (branchMeta[branchName].type === 'if') {
// 'if' is a special case
// since the else branch might not be visible, being nonexistent
text.insertAt(
startCol,
lt +
'span class="' +
(meta.skip
? 'skip-if-branch'
: 'missing-if-branch') +
'"' +
title(
(i === 0 ? 'if' : 'else') +
' path not taken'
) +
gt +
(i === 0 ? 'I' : 'E') +
lt +
'/span' +
gt,
true,
false
);
} else {
text.wrap(
startCol,
openSpan,
startCol < endCol ? endCol : text.originalLength(),
closeSpan
);
}
}
}
}
});
}
function annotateSourceCode(fileCoverage, sourceStore) {
let codeArray;
let lineCoverageArray;
try {
const sourceText = sourceStore.getSource(fileCoverage.path);
const code = sourceText.split(/(?:\r?\n)|\r/);
let count = 0;
const structured = code.map(str => {
count += 1;
return {
line: count,
covered: 'neutral',
hits: 0,
text: new InsertionText(str, true)
};
});
structured.unshift({
line: 0,
covered: null,
text: new InsertionText('')
});
annotateLines(fileCoverage, structured);
//note: order is important, since statements typically result in spanning the whole line and doing branches late
//causes mismatched tags
annotateBranches(fileCoverage, structured);
annotateFunctions(fileCoverage, structured);
annotateStatements(fileCoverage, structured);
structured.shift();
codeArray = structured.map(
item => customEscape(item.text.toString()) || '&nbsp;'
);
lineCoverageArray = structured.map(item => ({
covered: item.covered,
hits: item.hits > 0 ? item.hits + 'x' : '&nbsp;'
}));
return {
annotatedCode: codeArray,
lineCoverage: lineCoverageArray,
maxLines: structured.length
};
} catch (ex) {
codeArray = [ex.message];
lineCoverageArray = [{ covered: 'no', hits: 0 }];
String(ex.stack || '')
.split(/\r?\n/)
.forEach(line => {
codeArray.push(line);
lineCoverageArray.push({ covered: 'no', hits: 0 });
});
return {
annotatedCode: codeArray,
lineCoverage: lineCoverageArray,
maxLines: codeArray.length
};
}
}
module.exports = annotateSourceCode;
@@ -0,0 +1,221 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeVisitor = void 0;
const types_1 = require("@typescript-eslint/types");
const definition_1 = require("../definition");
const scope_1 = require("../scope");
const Visitor_1 = require("./Visitor");
class TypeVisitor extends Visitor_1.Visitor {
#referencer;
constructor(referencer) {
super(referencer);
this.#referencer = referencer;
}
static visit(referencer, node) {
const typeReferencer = new TypeVisitor(referencer);
typeReferencer.visit(node);
}
///////////////////
// Visit helpers //
///////////////////
visitFunctionType(node) {
// arguments and type parameters can only be referenced from within the function
this.#referencer.scopeManager.nestFunctionTypeScope(node);
this.visit(node.typeParameters);
for (const param of node.params) {
let didVisitAnnotation = false;
this.visitPattern(param, (pattern, info) => {
// a parameter name creates a value type variable which can be referenced later via typeof arg
this.#referencer
.currentScope()
.defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest));
if (pattern.typeAnnotation) {
this.visit(pattern.typeAnnotation);
didVisitAnnotation = true;
}
});
// there are a few special cases where the type annotation is owned by the parameter, not the pattern
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!didVisitAnnotation && 'typeAnnotation' in param) {
this.visit(param.typeAnnotation);
}
}
this.visit(node.returnType);
this.#referencer.close(node);
}
visitPropertyKey(node) {
if (!node.computed) {
return;
}
// computed members are treated as value references, and TS expects they have a literal type
this.#referencer.visit(node.key);
}
/////////////////////
// Visit selectors //
/////////////////////
Identifier(node) {
this.#referencer.currentScope().referenceType(node);
}
MemberExpression(node) {
this.visit(node.object);
// don't visit the property
}
TSCallSignatureDeclaration(node) {
this.visitFunctionType(node);
}
TSConditionalType(node) {
// conditional types can define inferred type parameters
// which are only accessible from inside the conditional parameter
this.#referencer.scopeManager.nestConditionalTypeScope(node);
// type parameters inferred in the condition clause are not accessible within the false branch
this.visitChildren(node, ['falseType']);
this.#referencer.close(node);
this.visit(node.falseType);
}
TSConstructorType(node) {
this.visitFunctionType(node);
}
TSConstructSignatureDeclaration(node) {
this.visitFunctionType(node);
}
TSFunctionType(node) {
this.visitFunctionType(node);
}
TSImportType(node) {
// the TS parser allows any type to be the parameter, but it's a syntax error - so we can ignore it
this.visit(node.typeArguments);
// the qualifier is just part of a standard EntityName, so it should not be visited
}
TSIndexSignature(node) {
for (const param of node.parameters) {
if (param.type === types_1.AST_NODE_TYPES.Identifier) {
this.visit(param.typeAnnotation);
}
}
this.visit(node.typeAnnotation);
}
TSInferType(node) {
const typeParameter = node.typeParameter;
let scope = this.#referencer.currentScope();
/*
In cases where there is a sub-type scope created within a conditional type, then the generic should be defined in the
conditional type's scope, not the child type scope.
If we define it within the child type's scope then it won't be able to be referenced outside the child type
*/
if (scope.type === scope_1.ScopeType.functionType ||
scope.type === scope_1.ScopeType.mappedType) {
// search up the scope tree to figure out if we're in a nested type scope
let currentScope = scope.upper;
while (currentScope) {
if (currentScope.type === scope_1.ScopeType.functionType ||
currentScope.type === scope_1.ScopeType.mappedType) {
// ensure valid type parents only
currentScope = currentScope.upper;
continue;
}
if (currentScope.type === scope_1.ScopeType.conditionalType) {
scope = currentScope;
break;
}
break;
}
}
scope.defineIdentifier(typeParameter.name, new definition_1.TypeDefinition(typeParameter.name, typeParameter));
this.visit(typeParameter.constraint);
}
TSInterfaceDeclaration(node) {
this.#referencer
.currentScope()
.defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node));
if (node.typeParameters) {
// type parameters cannot be referenced from outside their current scope
this.#referencer.scopeManager.nestTypeScope(node);
this.visit(node.typeParameters);
}
node.extends.forEach(this.visit, this);
this.visit(node.body);
if (node.typeParameters) {
this.#referencer.close(node);
}
}
TSMappedType(node) {
// mapped types key can only be referenced within their return value
this.#referencer.scopeManager.nestMappedTypeScope(node);
this.#referencer
.currentScope()
.defineIdentifier(node.key, new definition_1.TypeDefinition(node.key, node));
this.visit(node.constraint);
this.visit(node.nameType);
this.visit(node.typeAnnotation);
this.#referencer.close(node);
}
TSMethodSignature(node) {
this.visitPropertyKey(node);
this.visitFunctionType(node);
}
TSNamedTupleMember(node) {
this.visit(node.elementType);
// we don't visit the label as the label only exists for the purposes of documentation
}
TSPropertySignature(node) {
this.visitPropertyKey(node);
this.visit(node.typeAnnotation);
}
TSQualifiedName(node) {
this.visit(node.left);
// we don't visit the right as it a name on the thing, not a name to reference
}
TSTypeAliasDeclaration(node) {
this.#referencer
.currentScope()
.defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node));
if (node.typeParameters) {
// type parameters cannot be referenced from outside their current scope
this.#referencer.scopeManager.nestTypeScope(node);
this.visit(node.typeParameters);
}
this.visit(node.typeAnnotation);
if (node.typeParameters) {
this.#referencer.close(node);
}
}
TSTypeParameter(node) {
this.#referencer
.currentScope()
.defineIdentifier(node.name, new definition_1.TypeDefinition(node.name, node));
this.visit(node.constraint);
this.visit(node.default);
}
TSTypePredicate(node) {
if (node.parameterName.type !== types_1.AST_NODE_TYPES.TSThisType) {
this.#referencer.currentScope().referenceValue(node.parameterName);
}
this.visit(node.typeAnnotation);
}
// a type query `typeof foo` is a special case that references a _non-type_ variable,
TSTypeAnnotation(node) {
// check
this.visitChildren(node);
}
TSTypeQuery(node) {
let entityName;
if (node.exprName.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
let iter = node.exprName;
while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
iter = iter.left;
}
entityName = iter.left;
}
else {
entityName = node.exprName;
if (node.exprName.type === types_1.AST_NODE_TYPES.TSImportType) {
this.visit(node.exprName);
}
}
if (entityName.type === types_1.AST_NODE_TYPES.Identifier) {
this.#referencer.currentScope().referenceValue(entityName);
}
this.visit(node.typeArguments);
}
}
exports.TypeVisitor = TypeVisitor;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Pooya Parsa <pooya@pi0.io> and Anthony Fu <https://github.com/antfu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_0H _i","2":"_0 _VG"},C:{"1":"6 _WG _p","2":"_xD 5 _0G"},D:{"1":"_0H _l","2":"_OR"},E:{"1":"K _mI _UT","2":"_QR"},F:{"1":"_5H _h","2":"_8 _5G _O"},G:{"1":"_kB","2":"_yC"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"1":"_6B","2":"_gN","16":"HB"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:6,C:"Passkeys",D:true};
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2021_full: LibDefinition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AAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,OAAO,CAAC,GAAW;;QACxB,IAAI,IAAY,CAAC;QACjB,IAAI,IAAI,GAA2B,IAAI,CAAC;QACxC,IAAI,MAA8B,CAAC;QACnC,IAAI,KAAa,CAAC;QAElB,qCAAqC;QACrC,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC;QAE7D,iDAAiD;QACjD,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAClE,KAAK,GAAG,mCAAmC,CAAC;YAC5C,MAAM,GAAG,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEpD,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBACpB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC9C,CAALine truncated
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleArrowLeft = createLucideIcon("CircleArrowLeft", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M16 12H8", key: "1fr5h0" }],
["path", { d: "m12 8-4 4 4 4", key: "15vm53" }]
]);
export { CircleArrowLeft as default };
//# sourceMappingURL=circle-arrow-left.js.map
@@ -0,0 +1 @@
{"version":3,"file":"circle-check-big.js","sources":["../../../src/icons/circle-check-big.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleCheckBig\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuODAxIDEwQTEwIDEwIDAgMSAxIDE3IDMuMzM1IiAvPgogIDxwYXRoIGQ9Im05IDExIDMgM0wyMiA0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-check-big\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleCheckBig = createLucideIcon('CircleCheckBig', [\n ['path', { d: 'M21.801 10A10 10 0 1 1 17 3.335', key: 'yps3ct' }],\n ['path', { d: 'm9 11 3 3L22 4', key: '1pflzl' }],\n]);\n\nexport default CircleCheckBig;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
import { MatcherBaseClass, MatchOptions, OptionsGraphEntry, SpatialMatch } from '../../types';
type SpatialMatchOptions = Pick<MatchOptions, 'password'>;
declare class MatchSpatial extends MatcherBaseClass {
SHIFTED_RX: RegExp;
match({ password }: SpatialMatchOptions): import("../..").MatchExtended[];
checkIfShifted(graphName: string, password: string, index: number): 0 | 1;
helper(password: string, graph: OptionsGraphEntry, graphName: string): SpatialMatch[];
}
export default MatchSpatial;
@@ -0,0 +1 @@
module.exports={C:{"4":0.37113,"48":0.00288,"53":0.00288,"54":0.00863,"56":0.00863,"57":0.04316,"60":0.00288,"62":0.00288,"63":0.00288,"64":0.00288,"66":0.00575,"68":0.00575,"70":0.00288,"72":0.00863,"79":0.00288,"80":0.00288,"85":0.00288,"87":0.00288,"88":0.00288,"90":0.00575,"91":0.00288,"94":0.01151,"95":0.00288,"97":0.00288,"99":0.00288,"100":0.01151,"102":0.00575,"103":0.00288,"105":0.00288,"108":0.00575,"109":0.00288,"110":0.00575,"111":0.00575,"113":0.01151,"115":0.77679,"117":0.00288,"118":0.00288,"120":0.01439,"121":0.03165,"122":0.01151,"124":0.00288,"125":0.00288,"126":0.01439,"127":0.1496,"128":0.00575,"129":0.00863,"130":0.00863,"131":0.01151,"132":0.00575,"133":0.00288,"134":0.01439,"135":0.00863,"136":0.01439,"137":0.00863,"138":0.00863,"139":0.00575,"140":0.15248,"141":0.01726,"142":0.03452,"143":0.05754,"144":0.03452,"145":0.05754,"146":0.05179,"147":0.0748,"148":0.02589,"149":0.06329,"150":0.04603,"151":0.10933,"152":0.15824,"153":0.20139,"154":0.83433,"155":1.97075,"156":1.87293,"157":0.08631,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 55 58 59 61 65 67 69 71 73 74 75 76 77 78 81 82 83 84 86 89 92 93 96 98 101 104 106 107 112 114 116 119 123 158 159 160 3.5 3.6"},D:{"50":0.00288,"51":0.00575,"53":0.00288,"55":0.00288,"60":0.00288,"61":0.00288,"62":0.00575,"64":0.00575,"67":0.00575,"68":0.00288,"69":0.01726,"70":0.00288,"71":0.00863,"72":0.00575,"74":0.00575,"75":0.00575,"77":0.00575,"78":0.00288,"79":0.01151,"80":0.00575,"81":0.01151,"86":0.01151,"87":0.00288,"88":0.04028,"89":0.00288,"90":0.0748,"91":0.00575,"92":0.00863,"93":0.00863,"94":0.00288,"96":0.00863,"97":0.02302,"98":0.00575,"100":0.00575,"101":0.00288,"102":0.00288,"103":0.00863,"104":0.00575,"105":0.01151,"106":0.00575,"107":0.00575,"108":0.01439,"109":0.2129,"110":0.01151,"111":0.01151,"112":0.02014,"114":0.00863,"115":0.00575,"116":0.0374,"117":0.00863,"118":0.09494,"119":0.04891,"120":0.04028,"121":0.00575,"122":0.12659,"123":0.01726,"124":0.00575,"125":0.00863,"126":0.01726,"127":0.01151,"128":0.00575,"129":0.00288,"130":0.00863,"131":0.34524,"132":0.01726,"133":0.00863,"134":0.03165,"135":0.01439,"136":0.02877,"137":0.02589,"138":0.07768,"139":0.01726,"140":0.02589,"141":0.01726,"142":0.05179,"143":0.07193,"144":0.05179,"145":0.08919,"146":0.04603,"147":0.11796,"148":0.05466,"149":0.12659,"150":0.17837,"151":0.57828,"152":2.14337,"153":1.71757,"154":0.46607,"155":0.00575,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 52 54 56 57 58 59 63 65 66 73 76 83 84 85 95 99 113 156 157"},F:{"36":0.00288,"42":0.00288,"45":0.00288,"51":0.00288,"62":0.13522,"64":0.00288,"79":0.00575,"86":0.00288,"95":0.02589,"97":0.00288,"100":0.01439,"101":0.00863,"105":0.00575,"108":0.01439,"109":0.00288,"119":0.00288,"120":0.00863,"121":0.00575,"124":0.00575,"125":0.00288,"126":0.00863,"127":0.04028,"131":0.08056,"132":0.00863,"133":0.0374,"134":0.15824,"135":0.78542,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 43 44 46 47 48 49 50 52 53 54 55 56 57 58 60 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 87 88 89 90 91 92 93 94 96 98 99 102 103 104 106 107 110 111 112 113 114 115 116 117 118 122 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.00288,"15":0.01151,"16":0.00863,"17":0.01151,"18":0.02589,"79":0.00575,"80":0.00863,"83":0.00288,"84":0.03452,"88":0.00288,"89":0.01151,"90":0.01151,"92":0.29633,"96":0.01151,"100":0.04316,"106":0.00863,"109":0.01726,"114":0.01439,"115":0.00288,"118":0.00575,"119":0.01439,"120":0.01726,"121":0.00575,"122":0.08056,"123":0.00288,"126":0.00288,"127":0.00288,"128":0.00575,"130":0.02014,"131":0.01439,"132":0.00288,"134":0.00575,"135":0.00575,"136":0.01439,"137":0.01439,"138":0.01151,"139":0.02589,"140":0.04891,"141":0.03452,"142":0.0374,"143":0.04028,"144":0.03165,"145":0.0374,"146":0.04028,"147":0.0374,"148":0.04316,"149":0.15824,"150":1.45289,"151":0.31359,"152":2.49436,"153":1.263,"154":0.24167,_:"12 13 81 85 86 87 91 93 94 95 97 98 99 101 102 103 104 105 107 108 110 111 112 113 116 117 124 125 129 133"},E:{"27":0.06042,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.4 17.5 18.0 18.1 18.2 18.3 18.5-18.7 26.0 27.1 27.2 TP","11.1":0.00863,"12.1":0.00288,"13.1":0.00288,"15.6":0.00288,"16.6":0.00575,"17.3":0.00575,"17.6":0.01151,"18.4":0.00288,"26.1":0.00863,"26.2":0.00288,"26.3":0.00575,"26.4":0.00288,"26.5":0.16687,"26.6":0.0748},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00025,"5.0-5.1":0.00025,"6.0-6.1":0,"7.0-7.1":0.00051,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00254,"11.0-11.2":0.00025,"11.3-11.4":0.00051,"12.0-12.1":0,"12.2-12.5":0.00659,"13.0-13.1":0,"13.2":0.00127,"13.3":0,"13.4-13.7":0.00025,"14.0-14.4":0.00101,"14.5-14.8":0.00152,"15.0-15.1":0.0Line truncated
@@ -0,0 +1,22 @@
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeHTML(input: string): string;
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeNonAsciiHTML(input: string): string;
//# sourceMappingURL=encode.d.ts.map