docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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,12 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/compress.ts
/**
* @module
* Constants for compression.
*/
/**
* Match for compressible content type.
*/
const COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/(?!event-stream(?:[;\s]|$))[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|msgpack|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|vnd\.msgpack|wasm|x-httpd-php|x-javascript|x-msgpack|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml|msgpack))(?:[;\s]|$)/i;
//#endregion
exports.COMPRESSIBLE_CONTENT_TYPE_REGEX = COMPRESSIBLE_CONTENT_TYPE_REGEX;
@@ -0,0 +1 @@
{"version":3,"file":"errors.mjs","sources":["../../src/errors.ts"],"sourcesContent":["import { formatErrorMessage } from \"./format-error-message\"\n\nexport type DevMessage = (\n check: boolean,\n message: string,\n errorCode?: string\n) => void\n\nlet warning: DevMessage = () => {}\nlet invariant: DevMessage = () => {}\n\nif (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n) {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode))\n }\n }\n\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode))\n }\n }\n}\n\nexport { invariant, warning }\n"],"names":[],"mappings":";;AAQA,IAAI,OAAO,GAAe,MAAK,EAAE;AACjC,IAAI,SAAS,GAAe,MAAK,EAAE;AAEnC,IACI,OAAO,OAAO,KAAK,WAAW;AAC9B,IAAA,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY,EACxC;IACE,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACpC,IAAI,CAAC,KAAK,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;YAC1C,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxD;AACJ,IAAA,CAAC;IAED,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,KAAI;QACtC,IAAI,CAAC,KAAK,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D;AACJ,IAAA,CAAC;AACL;;;;"}
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImplicitLibVariable = void 0;
const ESLintScopeVariable_1 = require("./ESLintScopeVariable");
/**
* An variable implicitly defined by the TS Lib
*/
class ImplicitLibVariable extends ESLintScopeVariable_1.ESLintScopeVariable {
/**
* `true` if the variable is valid in a type context, false otherwise
*/
isTypeVariable;
/**
* `true` if the variable is valid in a value context, false otherwise
*/
isValueVariable;
constructor(scope, name, { eslintImplicitGlobalSetting, isTypeVariable, isValueVariable, writeable, }) {
super(name, scope);
this.isTypeVariable = isTypeVariable ?? false;
this.isValueVariable = isValueVariable ?? false;
this.writeable = writeable ?? false;
this.eslintImplicitGlobalSetting =
eslintImplicitGlobalSetting ?? 'readonly';
}
}
exports.ImplicitLibVariable = ImplicitLibVariable;
@@ -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 MonitorOff = createLucideIcon("MonitorOff", [
["path", { d: "M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2", key: "k0q8oc" }],
["path", { d: "M22 15V5a2 2 0 0 0-2-2H9", key: "cp1ac0" }],
["path", { d: "M8 21h8", key: "1ev6f3" }],
["path", { d: "M12 17v4", key: "1riwvh" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { MonitorOff as default };
//# sourceMappingURL=monitor-off.js.map
@@ -0,0 +1,12 @@
import { HTMLProjectionNode } from 'motion-dom';
import { MeasureLayout } from './layout/MeasureLayout.mjs';
const layout = {
layout: {
ProjectionNode: HTMLProjectionNode,
MeasureLayout,
},
};
export { layout };
//# sourceMappingURL=layout.mjs.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_4D","2":"_KB"},C:{"1":"_7F","2":"_5D"},D:{"1":"_lO","2":"_pG"},E:{"1":"_KF","2":"_VD"},F:{"1":"_xM _AC _eF _uE","2":"F _BC _SH"},G:{"2":"_ND","129":"_mC"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"_B"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:1,C:"Color input type",D:true};
@@ -0,0 +1,38 @@
{
"name": "semver",
"version": "6.3.1",
"description": "The semantic version parser used by npm.",
"main": "semver.js",
"scripts": {
"test": "tap test/ --100 --timeout=30",
"lint": "echo linting disabled",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"snap": "tap test/ --100 --timeout=30",
"posttest": "npm run lint"
},
"devDependencies": {
"@npmcli/template-oss": "4.17.0",
"tap": "^12.7.0"
},
"license": "ISC",
"repository": {
"type": "git",
"url": "https://github.com/npm/node-semver.git"
},
"bin": {
"semver": "./bin/semver.js"
},
"files": [
"bin",
"range.bnf",
"semver.js"
],
"author": "GitHub Inc.",
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"content": "./scripts/template-oss",
"version": "4.17.0"
}
}
@@ -0,0 +1,5 @@
'use strict'
const compareBuild = require('./compare-build')
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
module.exports = rsort
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
var _utils = require("./utils.js");
const PLACEHOLDERS = exports.PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
const PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS_ALIAS = {
Declaration: ["Statement"],
Pattern: ["PatternLike", "LVal"]
};
for (const type of PLACEHOLDERS) {
const alias = _utils.ALIAS_KEYS[type];
if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias;
}
const PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_FLIPPED_ALIAS = {};
Object.keys(PLACEHOLDERS_ALIAS).forEach(type => {
PLACEHOLDERS_ALIAS[type].forEach(alias => {
if (!hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
}
PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
});
});
//# sourceMappingURL=placeholders.js.map
@@ -0,0 +1,11 @@
import { OptionsL33tTable } from '../../../../../types'
import TrieNode from './TrieNode'
export default (l33tTable: OptionsL33tTable, triNode: TrieNode) => {
Object.entries(l33tTable).forEach(([letter, substitutions]) => {
substitutions.forEach((substitution) => {
triNode.addSub(substitution, letter)
})
})
return triNode
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Tanner Linsley
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,829 @@
export default `flf2a$ 8 6 17 -1 11
nancyj-fancy.flf
named after the login of a woman who asked me to make her a
sig. this is the font that came out of it. this is my first
attempt at a figlet font, so leave me alone.
vampyr@acs.bu.edu
Modified to make tabs blanks by Paul Burton <solution@earthlink.net>
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @@
dP @
88 @
88 @
dP @
@
oo @
@
@@
dP dP @
dP dP @
@
@
@
@
@
@@
@
dP dP @
8888888 @
88 88 @
8888888 @
dP dP @
@
@@
# # @
.d8888P' @
Y8#oo#o. @
# #88 @
\`88888P' @
# # @
@
@@
d8P dP @
8 8 d8' @
Y8P d8' @
d8' d8P @
d8' 8 8 @
88 Y8P @
@
@@
d88b @
8\`'8 @
d8b @
d8P\`8b @
d8' \`8bP @
\`888P'\`YP @
@
@@
d8 @
88 @
.P @
@
@
@
@
@@
a88P @
d8' @
88 @
88 @
Y8. @
Y88b @
@
@@
Y88o @
\`8b @
88 @
88 @
.8P @
d88Y @
@
@@
dP @
8b. 88 .d8 @
\`8b88d8' @
.8P88Y8. @
8P' 88 \`Y8 @
dP @
@
@@
@
dP @
88 @
88888888 @
88 @
dP @
@
@@
@
@
@
@
dP @
88 @
.P @
@@
@
@
@
88888888 @
@
@
@
@@
@
@
@
@
dP @
88 @
@
@@
d8' @
d8' @
d8' @
d8' @
d8' @
88 @
@
@@
a8888a @
d8' ..8b @
88 .P 88 @
88 d' 88 @
Y8'' .8P @
Y8888P @
@
@@
d88 @
88 @
88 @
88 @
88 @
d88P @
@
@@
d8888b. @
\`88 @
.aaadP' @
88' @
88. @
Y88888P @
@
@@
d8888b. @
\`88 @
aaad8' @
\`88 @
.88 @
d88888P @
@
@@
dP dP @
88 88 @
88aaa88 @
88 @
88 @
dP @
@
@@
888888P @
88' @
88baaa. @
\`88 @
88 @
d88888P @
@
@@
.d8888P @
88' @
88baaa. @
88\` \`88 @
8b. .d8 @
\`Y888P' @
@
@@
d88888P @
d8' @
d8' @
d8' @
d8' @
d8' @
@
@@
.d888b. @
Y8' \`8P @
d8bad8b @
88\` \`88 @
8b. .88 @
Y88888P @
@
@@
.d888b. @
Y8' \`88 @
\`8bad88 @
\`88 @
d. .88 @
\`8888P @
@
@@
dP @
88 @
@
@
dP @
88 @
@
@@
dP @
88 @
@
@
dP @
88 @
.P @
@@
d8 @
d8' @
d8' @
Y8. @
Y8. @
Y8 @
@
@@
@
@
aaaaaaaa @
@
88888888 @
@
@
@@
8b @
\`8b @
\`8b @
.8P @
.8P @
8P @
@
@@
.d8888ba @
\`8' \`8b @
.d8' @
d8P' @
"" @
oo @
@
@@
a88888b. @
d8' \`88 @
88 d8P 88 @
88 Yo8b88 @
Y8. @
Y88888P' @
@
@@
MMP"""""""MM @
M' .mmmm MM @
M \`M @
M MMMMM MM @
M MMMMM MM @
M MMMMM MM @
MMMMMMMMMMMM @
@@
M#"""""""'M$ @
## mmmm. \`M @
#' .M @
M# MMMb.'YM @
M# MMMM' M @
M# .;M @
M#########M$ @
@@
MM'""""'YMM @
M' .mmm. \`M @
M MMMMMooM @
M MMMMMMMM @
M. \`MMM' .M @
MM. .dM @
MMMMMMMMMMM @
@@
M""""""'YMM @
M mmmm. \`M @
M MMMMM M @
M MMMMM M @
M MMMM' .M @
M .MM @
MMMMMMMMMMM @
@@
MM""""""""\`M @
MM mmmmmmmM @
M\` MMMM @
MM MMMMMMMM @
MM MMMMMMMM @
MM .M @
MMMMMMMMMMMM @
@@
MM""""""""\`M @
MM mmmmmmmM @
M' MMMM @
MM MMMMMMMM @
MM MMMMMMMM @
MM MMMMMMMM @
MMMMMMMMMMMM @
@@
MM'"""""\`MM @
M' .mmm. \`M @
M MMMMMMMM @
M MMM \`M @
M. \`MMM' .M @
MM. .MM @
MMMMMMMMMMM @
@@
M""MMMMM""MM @
M MMMMM MM @
M \`M @
M MMMMM MM @
M MMMMM MM @
M MMMMM MM @
MMMMMMMMMMMM @
@@
M""M @
M M @
M M @
M M @
M M @
M M @
MMMM @
@@
MMMMMMMM""M @
MMMMMMMM M @
MMMMMMMM M @
MMMMMMMM M @
M. \`MMM' .M @
MM. .MM @
MMMMMMMMMMM @
@@
M""MMMMM""M @
M MMMM' .M @
M .MM @
M MMMb. YM @
M MMMMb M @
M MMMMM M @
MMMMMMMMMMM @
@@
M""MMMMMMMM @
M MMMMMMMM @
M MMMMMMMM @
M MMMMMMMM @
M MMMMMMMM @
M M @
MMMMMMMMMMM @
@@
M"""""\`'"""\`YM @
M mm. mm. M @
M MMM MMM M @
M MMM MMM M @
M MMM MMM M @
M MMM MMM M @
MMMMMMMMMMMMMM @
@@
M"""""""\`YM @
M mmmm. M @
M MMMMM M @
M MMMMM M @
M MMMMM M @
M MMMMM M @
MMMMMMMMMMM @
@@
MMP"""""YMM @
M' .mmm. \`M @
M MMMMM M @
M MMMMM M @
M. \`MMM' .M @
MMb dMM @
MMMMMMMMMMM @
@@
MM"""""""\`YM @
MM mmmmm M @
M' .M @
MM MMMMMMMM @
MM MMMMMMMM @
MM MMMMMMMM @
MMMMMMMMMMMM @
@@
MM'"""""\`MMM @
M .mmm, MM @
M MMMMM MM @
M MM M MM @
M \`MM MM @
MM. .. \`M @
MMMMMMMMMMMM @
@@
MM"""""""\`MM @
MM mmmm, M @
M' .M @
MM MMMb. "M @
MM MMMMM M @
MM MMMMM M @
MMMMMMMMMMMM @
@@
MP""""""\`MM @
M mmmmm..M @
M. \`YM @
MMMMMMM. M @
M. .MMM' M @
Mb. .dM @
MMMMMMMMMMM @
@@
M""""""""M @
Mmmm mmmM @
MMMM MMMM @
MMMM MMMM @
MMMM MMMM @
MMMM MMMM @
MMMMMMMMMM @
@@
M""MMMMM""M @
M MMMMM M @
M MMMMM M @
M MMMMM M @
M \`MMM' M @
Mb dM @
MMMMMMMMMMM @
@@
M""MMMMM""M @
M MMMMM M @
M MMMMP M @
M MMMM' .M @
M MMP' .MM @
M .dMMM @
MMMMMMMMMMM @
@@
M""MMM""MMM""M @
M MMM MMM M @
M MMP MMP M @
M MM' MM' .M @
M \`' . '' .MM @
M .d .dMMM @
MMMMMMMMMMMMMM @
@@
M""MMMM""M @
M \`MM' M @
MM. .MM @
M .mm. M @
M MMMM M @
M MMMM M @
MMMMMMMMMM @
@@
M""MMMM""M @
M. \`MM' .M @
MM. .MM @
MMMb dMMM @
MMMM MMMM @
MMMM MMMM @
MMMMMMMMMM @
@@
M""""""""\`M @
Mmmmmm .M @
MMMMP .MMM @
MMP .MMMMM @
M' .MMMMMMM @
M M @
MMMMMMMMMMM @
@@
8888P @
88 @
88 @
88 @
88 @
88888 @
@
@@
Yb @
\`Yb @
\`Yb @
\`Yb @
\`Yb @
88 @
@
@@
d8888 @
88 @
88 @
88 @
88 @
88888 @
@
@@
db @
d8'\`8b @
\`" "' @
@
@
@
@
@@
@
@
@
@
@
@
oooooooooooo @
@@
dP @
88 @
Y. @
@
@
@
@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`88888P8 @
@
@@
dP @
88 @
88d888b. @
88' \`88 @
88. .88 @
88Y8888' @
@
@@
@
@
.d8888b. @
88' \`"" @
88. ... @
\`88888P' @
@
@@
dP @
88 @
.d888b88 @
88' \`88 @
88. .88 @
\`88888P8 @
@
@@
@
@
.d8888b. @
88ooood8 @
88. ... @
\`88888P' @
@
@@
.8888b @
88 " @
88aaa @
88 @
88 @
dP @
@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`8888P88 @
.88 @
d8888P @@
dP @
88 @
88d888b. @
88' \`88 @
88 88 @
dP dP @
@
@@
oo @
@
dP @
88 @
88 @
dP @
@
@@
oo @
@
dP @
88 @
88 @
88 @
88 @
dP @@
dP @
88 @
88 .dP @
88888" @
88 \`8b. @
dP \`YP @
@
@@
dP @
88 @
88 @
88 @
88 @
dP @
@
@@
@
@
88d8b.d8b. @
88'\`88'\`88 @
88 88 88 @
dP dP dP @
@
@@
@
@
88d888b. @
88' \`88 @
88 88 @
dP dP @
@
@@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`88888P' @
@
@@
@
@
88d888b. @
88' \`88 @
88. .88 @
88Y888P' @
88 @
dP @@
@
@
.d8888b. @
88' \`88 @
88. .88 @
\`8888P88 @
88 @
dP @@
@
@
88d888b. @
88' \`88 @
88 @
dP @
@
@@
@
@
.d8888b. @
Y8ooooo. @
88 @
\`88888P' @
@
@@
dP @
88 @
d8888P @
88 @
88 @
dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
\`88888P' @
@
@@
@
@
dP .dP @
88 d8' @
88 .88' @
8888P' @
@
@@
@
@
dP dP dP @
88 88 88 @
88.88b.88' @
8888P Y8P @
@
@@
@
@
dP. .dP @
\`8bd8' @
.d88b. @
dP' \`dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
\`8888P88 @
.88 @
d8888P @@
@
@
d888888b @
.d8P' @
.Y8P @
d888888P @
@
@@
.d88P @
8: @
.oY8. @
d8 @
8: @
\`Y88b @
@
@@
dP @
88 @
"' @
dP @
88 @
"' @
@
@@
d88b. @
:8 @
.8Yo. @
8b @
:8 @
Y88P' @
@
@@
.oo. .d @
dP" "d8P @
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,20 @@
import {TokenType as tt} from "../parser/tokenizer/types";
import Transformer from "./Transformer";
export default class NumericSeparatorTransformer extends Transformer {
constructor( tokens) {
super();this.tokens = tokens;;
}
process() {
if (this.tokens.matches1(tt.num)) {
const code = this.tokens.currentTokenCode();
if (code.includes("_")) {
this.tokens.replaceToken(code.replace(/_/g, ""));
return true;
}
}
return false;
}
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/use-previous.tsx"],
"sourcesContent": ["export { usePrevious } from './use-previous';\n", "import * as React from 'react';\n\nfunction usePrevious<T>(value: T) {\n const ref = React.useRef({ value, previous: value });\n\n // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\n\nexport { usePrevious };\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,SAAS,YAAe,OAAU;AAChC,QAAM,MAAY,aAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAKnD,SAAa,cAAQ,MAAM;AACzB,QAAI,IAAI,QAAQ,UAAU,OAAO;AAC/B,UAAI,QAAQ,WAAW,IAAI,QAAQ;AACnC,UAAI,QAAQ,QAAQ;AAAA,IACtB;AACA,WAAO,IAAI,QAAQ;AAAA,EACrB,GAAG,CAAC,KAAK,CAAC;AACZ;",
"names": []
}
@@ -0,0 +1,99 @@
# aria-hidden
[![NPM](https://nodei.co/npm/aria-hidden.png?downloads=true&stars=true)](https://nodei.co/npm/aria-hidden/)
Hides from ARIA everything, except provided node(s).
Helps to isolate modal dialogs and focused task - the content will be not accessible using
accessible tools.
Now with [HTML inert](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert) support
# API
Just call `hideOthers` with DOM-node you want to keep, and it will _hide_ everything else.
`targetNode` could be placed anywhere - its siblings would be hidden, but it and its parents - not.
> "hidden" in terms or `aria-hidden`
```js
import { hideOthers } from 'aria-hidden';
const undo = hideOthers(exceptThisDOMnode);
// everything else is "aria-hidden"
// undo changes
undo();
```
you also may limit the effect spread by providing top level node as a second parameter
```js
// keep only `anotherNode` node visible in #app
// the rest of document will be untouched
hideOthers(anotherNode, document.getElementById('app'));
```
> `parentNode` defaults to document.body
# Inert
While `aria-hidden` played important role in the past and will play in the future - the main
use case always was around isolating content and making elements "transparent" not only for aria, but for
user interaction as well.
This is why you might consider using `inertOthers`
```tsx
import { hideOthers, inertOthers, supportsInert } from 'aria-hidden';
// focus on element mean "hide others". Ideally disable interactions
const focusOnElement = (node) => (supportsInert() ? inertOthers(node) : hideOthers(node));
```
the same function as above is already contructed and exported as
```tsx
import { suppressOthers } from 'aria-hidden';
suppressOthers([keepThisNode, andThis]);
```
⚠️ Note - inert **will disable any interactions** with _suppressed_ elements ⚠️
### Suppressing interactivity without inert
One can `marker`, the third argument to a function, to mark hidden elements.
Later one can create a style matching given marker to apply `pointer-events:none`
```css
[hidden-node] {
pointer-events: none;
}
```
```tsx
hideOthers(notThisOne, undefined /*parent = document*/, 'hidden-node');
```
Generally speaking the same can be achieved by addressing `[aria-hidden]` nodes, but
not all `aria-hidden` nodes are expected to be non-interactive.
Hence, it's better to separate concerns.
# Inspiration
Based on [smooth-ui](https://github.com/smooth-code/smooth-ui) modal dialogs.
# See also
- [inert](https://github.com/WICG/inert) - The HTML attribute/property to mark parts of the DOM tree as "inert".
- [react-focus-lock](https://github.com/theKashey/react-focus-lock) to lock Focus inside modal.
- [react-scroll-lock](https://github.com/theKashey/react-scroll-lock) to disable page scroll while modal is opened.
# Size
Code is 30 lines long
# Licence
MIT
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReadBuffer = exports.STDIO_DEFAULT_MAX_BUFFER_SIZE = void 0;
exports.deserializeMessage = deserializeMessage;
exports.serializeMessage = serializeMessage;
const types_js_1 = require("../types.js");
exports.STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
/**
* Buffers a continuous stdio stream into discrete JSON-RPC messages.
*/
class ReadBuffer {
constructor(options) {
this._maxBufferSize = options?.maxBufferSize ?? exports.STDIO_DEFAULT_MAX_BUFFER_SIZE;
}
append(chunk) {
const newSize = (this._buffer?.length ?? 0) + chunk.length;
if (newSize > this._maxBufferSize) {
this.clear();
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
}
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
}
readMessage() {
if (!this._buffer) {
return null;
}
const index = this._buffer.indexOf('\n');
if (index === -1) {
return null;
}
const line = this._buffer.toString('utf8', 0, index).replace(/\r$/, '');
this._buffer = this._buffer.subarray(index + 1);
return deserializeMessage(line);
}
clear() {
this._buffer = undefined;
}
}
exports.ReadBuffer = ReadBuffer;
function deserializeMessage(line) {
return types_js_1.JSONRPCMessageSchema.parse(JSON.parse(line));
}
function serializeMessage(message) {
return JSON.stringify(message) + '\n';
}
//# sourceMappingURL=stdio.js.map
@@ -0,0 +1,33 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _charcodes = require('./charcodes');
// https://tc39.github.io/ecma262/#sec-white-space
const WHITESPACE_CHARS = [
0x0009,
0x000b,
0x000c,
_charcodes.charCodes.space,
_charcodes.charCodes.nonBreakingSpace,
_charcodes.charCodes.oghamSpaceMark,
0x2000, // EN QUAD
0x2001, // EM QUAD
0x2002, // EN SPACE
0x2003, // EM SPACE
0x2004, // THREE-PER-EM SPACE
0x2005, // FOUR-PER-EM SPACE
0x2006, // SIX-PER-EM SPACE
0x2007, // FIGURE SPACE
0x2008, // PUNCTUATION SPACE
0x2009, // THIN SPACE
0x200a, // HAIR SPACE
0x202f, // NARROW NO-BREAK SPACE
0x205f, // MEDIUM MATHEMATICAL SPACE
0x3000, // IDEOGRAPHIC SPACE
0xfeff, // ZERO WIDTH NO-BREAK SPACE
]; exports.WHITESPACE_CHARS = WHITESPACE_CHARS;
const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; exports.skipWhiteSpace = skipWhiteSpace;
const IS_WHITESPACE = new Uint8Array(65536); exports.IS_WHITESPACE = IS_WHITESPACE;
for (const char of exports.WHITESPACE_CHARS) {
exports.IS_WHITESPACE[char] = 1;
}
@@ -0,0 +1,147 @@
import { Console } from 'node:console';
import { relative } from 'node:path';
import { Writable } from 'node:stream';
import { getSafeTimers } from '@vitest/utils/timers';
import c from 'tinyrainbow';
import { R as RealDate } from './rpc.MzXet3jl.js';
import { g as getWorkerState } from './utils.BX5Fg8C4.js';
import './index.Chj8NDwU.js';
const UNKNOWN_TEST_ID = "__vitest__unknown_test__";
function getTaskIdByStack(root) {
const stack = (/* @__PURE__ */ new Error("STACK_TRACE_ERROR")).stack?.split("\n");
if (!stack) return UNKNOWN_TEST_ID;
const index = stack.findIndex((line) => line.includes("at Console.value"));
const line = index === -1 ? null : stack[index + 2];
if (!line) return UNKNOWN_TEST_ID;
const filepath = line.match(/at\s(.*)\s?/)?.[1];
if (filepath) return relative(root, filepath);
return UNKNOWN_TEST_ID;
}
function createCustomConsole(defaultState) {
const stdoutBuffer = /* @__PURE__ */ new Map();
const stderrBuffer = /* @__PURE__ */ new Map();
const timers = /* @__PURE__ */ new Map();
const { queueMicrotask } = getSafeTimers();
function queueCancelableMicrotask(callback) {
let canceled = false;
queueMicrotask(() => {
if (!canceled) callback();
});
return () => {
canceled = true;
};
}
const state = () => defaultState || getWorkerState();
// group sync console.log calls with micro task
function schedule(taskId) {
const timer = timers.get(taskId);
const { stdoutTime, stderrTime } = timer;
timer.cancel?.();
timer.cancel = queueCancelableMicrotask(() => {
if (stderrTime < stdoutTime) {
sendStderr(taskId);
sendStdout(taskId);
} else {
sendStdout(taskId);
sendStderr(taskId);
}
});
}
function sendStdout(taskId) {
sendBuffer("stdout", taskId);
}
function sendStderr(taskId) {
sendBuffer("stderr", taskId);
}
function sendBuffer(type, taskId) {
const buffers = type === "stdout" ? stdoutBuffer : stderrBuffer;
const buffer = buffers.get(taskId);
if (!buffer) return;
if (state().config.printConsoleTrace) buffer.forEach(([buffer, origin]) => {
sendLog(type, taskId, String(buffer), buffer.length, origin);
});
else sendLog(type, taskId, buffer.map((i) => String(i[0])).join(""), buffer.length);
const timer = timers.get(taskId);
buffers.delete(taskId);
if (type === "stderr") timer.stderrTime = 0;
else timer.stdoutTime = 0;
}
function sendLog(type, taskId, content, size, origin) {
const timer = timers.get(taskId);
const time = type === "stderr" ? timer.stderrTime : timer.stdoutTime;
state().rpc.onUserConsoleLog({
type,
content: content || "<empty line>",
taskId,
time: time || RealDate.now(),
size,
origin
});
}
return new Console({
stdout: new Writable({ write(data, encoding, callback) {
const s = state();
const id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
let timer = timers.get(id);
if (timer) timer.stdoutTime = timer.stdoutTime || RealDate.now();
else {
timer = {
stdoutTime: RealDate.now(),
stderrTime: RealDate.now()
};
timers.set(id, timer);
}
let buffer = stdoutBuffer.get(id);
if (!buffer) {
buffer = [];
stdoutBuffer.set(id, buffer);
}
if (state().config.printConsoleTrace) {
const limit = Error.stackTraceLimit;
Error.stackTraceLimit = limit + 6;
const trace = (/* @__PURE__ */ new Error("STACK_TRACE")).stack?.split("\n").slice(7).join("\n");
Error.stackTraceLimit = limit;
buffer.push([data, trace]);
} else buffer.push([data, void 0]);
schedule(id);
callback();
} }),
stderr: new Writable({ write(data, encoding, callback) {
const s = state();
const id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
let timer = timers.get(id);
if (timer) timer.stderrTime = timer.stderrTime || RealDate.now();
else {
timer = {
stderrTime: RealDate.now(),
stdoutTime: RealDate.now()
};
timers.set(id, timer);
}
let buffer = stderrBuffer.get(id);
if (!buffer) {
buffer = [];
stderrBuffer.set(id, buffer);
}
if (state().config.printConsoleTrace) {
const limit = Error.stackTraceLimit;
Error.stackTraceLimit = limit + 6;
const stack = (/* @__PURE__ */ new Error("STACK_TRACE")).stack?.split("\n");
Error.stackTraceLimit = limit;
if (stack?.some((line) => line.includes("at Console.trace"))) buffer.push([data, void 0]);
else {
const trace = stack?.slice(7).join("\n");
Error.stackTraceLimit = limit;
buffer.push([data, trace]);
}
} else buffer.push([data, void 0]);
schedule(id);
callback();
} }),
colorMode: c.isColorSupported,
groupIndentation: 2
});
}
export { UNKNOWN_TEST_ID, createCustomConsole };
@@ -0,0 +1 @@
{"version":3,"file":"visual-element-target.mjs","sources":["../../../../src/animation/interfaces/visual-element-target.ts"],"sourcesContent":["import { frame } from \"../../frameloop\"\nimport { getValueTransition } from \"../utils/get-value-transition\"\nimport { resolveTransition } from \"../utils/resolve-transition\"\nimport { positionalKeys } from \"../../render/utils/keys-position\"\nimport { setTarget } from \"../../render/utils/setters\"\nimport { addValueToWillChange } from \"../../value/will-change/add-will-change\"\nimport { getOptimisedAppearId } from \"../optimized-appear/get-appear-id\"\nimport { animateMotionValue } from \"./motion-value\"\nimport type { VisualElementAnimationOptions } from \"./types\"\nimport type { AnimationPlaybackControlsWithThen } from \"../types\"\nimport type { TargetAndTransition } from \"../../node/types\"\nimport type { AnimationTypeState } from \"../../render/utils/animation-state\"\nimport type { VisualElement } from \"../../render/VisualElement\"\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(\n { protectedKeys, needsAnimating }: AnimationTypeState,\n key: string\n) {\n const shouldBlock =\n protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true\n\n needsAnimating[key] = false\n return shouldBlock\n}\n\nexport function animateTarget(\n visualElement: VisualElement,\n targetAndTransition: TargetAndTransition,\n { delay = 0, transitionOverride, type }: VisualElementAnimationOptions = {}\n): AnimationPlaybackControlsWithThen[] {\n let {\n transition,\n transitionEnd,\n ...target\n } = targetAndTransition\n\n const defaultTransition = visualElement.getDefaultTransition()\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition\n\n const reduceMotion = (transition as { reduceMotion?: boolean })?.reduceMotion\n\n if (transitionOverride) transition = transitionOverride\n\n const animations: AnimationPlaybackControlsWithThen[] = []\n\n const animationTypeState =\n type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type]\n\n for (const key in target) {\n const value = visualElement.getValue(\n key,\n visualElement.latestValues[key] ?? null\n )\n const valueTarget = target[key as keyof typeof target]\n\n if (\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))\n ) {\n continue\n }\n\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n }\n\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get()\n if (\n currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity\n ) {\n frame.update(() => value.set(valueTarget as any))\n continue\n }\n\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement)\n\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(\n appearId,\n key,\n frame\n )\n\n if (startTime !== null) {\n valueTransition.startTime = startTime\n isHandoff = true\n }\n }\n }\n\n addValueToWillChange(visualElement, key)\n\n const shouldReduceMotion =\n reduceMotion ?? visualElement.shouldReduceMotion\n\n value.start(\n animateMotionValue(\n key,\n value,\n valueTarget,\n shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition,\n visualElement,\n isHandoff\n )\n )\n\n const animation = value.animation\n\n if (animation) {\n animations.push(animation)\n }\n }Line truncated
@@ -0,0 +1,6 @@
"use strict";
const isLeapYear$1 = require("./isLeapYear-CZo5eAQg.js");
function isLeapYear(date) {
return isLeapYear$1.isLeapYear(date.getFullYear());
}
module.exports = isLeapYear;
@@ -0,0 +1 @@
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../../lib/vocabularies/core/id.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,IAAI;IACb,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;IACzE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,118 @@
/**
* @fileoverview `Map` to load rules lazily.
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
const debug = require("debug")("eslint:rules");
/** @typedef {import("../../types").Rule.RuleModule} Rule */
/**
* The `Map` object that loads each rule when it's accessed.
* @example
* const rules = new LazyLoadingRuleMap([
* ["eqeqeq", () => require("eqeqeq")],
* ["semi", () => require("semi")],
* ["no-unused-vars", () => require("no-unused-vars")]
* ]);
*
* rules.get("semi"); // call `() => require("semi")` here.
*
* @extends {Map<string, Rule>}
*/
class LazyLoadingRuleMap extends Map {
/**
* Initialize this map.
* @param {Array<[string, function(): Rule]>} loaders The rule loaders.
*/
constructor(loaders) {
let remaining = loaders.length;
super(
debug.enabled
? loaders.map(([ruleId, load]) => {
let cache = null;
return [
ruleId,
() => {
if (!cache) {
debug(
"Loading rule %o (remaining=%d)",
ruleId,
--remaining,
);
cache = load();
}
return cache;
},
];
})
: loaders,
);
// `super(...iterable)` uses `this.set()`, so disable it here.
Object.defineProperty(LazyLoadingRuleMap.prototype, "set", {
configurable: true,
value: void 0,
});
}
/**
* Get a rule.
* Each rule will be loaded on the first access.
* @param {string} ruleId The rule ID to get.
* @returns {Rule|undefined} The rule.
*/
get(ruleId) {
const load = super.get(ruleId);
return load && load();
}
/**
* Iterate rules.
* @returns {IterableIterator<Rule>} Rules.
*/
*values() {
for (const load of super.values()) {
yield load();
}
}
/**
* Iterate rules.
* @returns {IterableIterator<[string, Rule]>} Rules.
*/
*entries() {
for (const [ruleId, load] of super.entries()) {
yield [ruleId, load()];
}
}
/**
* Call a function with each rule.
* @param {Function} callbackFn The callback function.
* @param {any} [thisArg] The object to pass to `this` of the callback function.
* @returns {void}
*/
forEach(callbackFn, thisArg) {
for (const [ruleId, load] of super.entries()) {
callbackFn.call(thisArg, load(), ruleId, this);
}
}
}
// Forbid mutation.
Object.defineProperties(LazyLoadingRuleMap.prototype, {
clear: { configurable: true, value: void 0 },
delete: { configurable: true, value: void 0 },
[Symbol.iterator]: {
configurable: true,
writable: true,
value: LazyLoadingRuleMap.prototype.entries,
},
});
module.exports = { LazyLoadingRuleMap };
@@ -0,0 +1,68 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var inspect = require('object-inspect');
var $TypeError = require('es-errors/type');
var $Map = GetIntrinsic('%Map%', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
var $mapGet = callBound('Map.prototype.get', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
var $mapSet = callBound('Map.prototype.set', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
var $mapHas = callBound('Map.prototype.has', true);
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
var $mapDelete = callBound('Map.prototype.delete', true);
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
var $mapSize = callBound('Map.prototype.size', true);
/** @type {import('.')} */
module.exports = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
/** @typedef {Parameters<Channel['get']>[0]} K */
/** @typedef {Parameters<Channel['set']>[1]} V */
/** @type {Map<K, V> | undefined} */ var $m;
/** @type {Channel} */
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
'delete': function (key) {
if ($m) {
var result = $mapDelete($m, key);
if ($mapSize($m) === 0) {
$m = void undefined;
}
return result;
}
return false;
},
get: function (key) { // eslint-disable-line consistent-return
if ($m) {
return $mapGet($m, key);
}
},
has: function (key) {
if ($m) {
return $mapHas($m, key);
}
return false;
},
set: function (key, value) {
if (!$m) {
// @ts-expect-error TS can't handle narrowing a variable inside a closure
$m = new $Map();
}
$mapSet($m, key, value);
}
};
// @ts-expect-error TODO: figure out why TS is erroring here
return channel;
};
@@ -0,0 +1,54 @@
{
"name": "p-locate",
"version": "5.0.0",
"description": "Get the first fulfilled promise that satisfies the provided testing function",
"license": "MIT",
"repository": "sindresorhus/p-locate",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"promise",
"locate",
"find",
"finder",
"search",
"searcher",
"test",
"array",
"collection",
"iterable",
"iterator",
"race",
"fulfilled",
"fastest",
"async",
"await",
"promises",
"bluebird"
],
"dependencies": {
"p-limit": "^3.0.2"
},
"devDependencies": {
"ava": "^2.4.0",
"delay": "^4.1.0",
"in-range": "^2.0.0",
"time-span": "^4.0.0",
"tsd": "^0.13.1",
"xo": "^0.32.1"
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_V","132":"_b"},B:{"1":"_J"},C:{"1":"_QO","132":"_TK"},D:{"1":"_Q"},E:{"1":"mB _zN K _UD _kL _yP _vE","132":"J M _e RD","2050":"_rH _xK"},F:{"1":"_dD","132":"_fB"},G:{"2":"_d","4100":"_7B","4868":"_wD _EJ pD","6148":"_nS _nI _XG"},H:{"2":"1D"},I:{"2":"_IG _n _y","132":"_PH"},J:{"260":"_B"},K:{"1":"_CB","132":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"2":"J","1028":"_U"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"CSS background-attachment",D:true};
@@ -0,0 +1,26 @@
//#region src/not-found.ts
/**
* Create a not-found error object recognized by TanStack Router.
*
* Throw this from loaders/actions to trigger the nearest `notFoundComponent`.
* Use `routeId` to target a specific route's not-found boundary. If `throw`
* is true, the error is thrown instead of returned.
*
* @param options Optional settings including `routeId`, `headers`, and `throw`.
* @returns A not-found error object that can be thrown or returned.
* @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction
*/
function notFound(options = {}) {
options.isNotFound = true;
if (options.throw) throw options;
return options;
}
/** Determine if a value is a TanStack Router not-found error. */
function isNotFound(obj) {
return obj?.isNotFound === true;
}
//#endregion
exports.isNotFound = isNotFound;
exports.notFound = notFound;
//# sourceMappingURL=not-found.cjs.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 Crop = createLucideIcon("Crop", [
["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
["path", { d: "M18 22V8a2 2 0 0 0-2-2H2", key: "7s9ehn" }]
]);
export { Crop as default };
//# sourceMappingURL=crop.js.map
@@ -0,0 +1,6 @@
import decompress from '@zxcvbn-ts/dictionary-compression/decompress';
var commonWords = decompress("AyouAtheBoA'sAitA'tAofAthatAandAisBnAmeAforAonAthisA'mAhaveAwasBeAmyA'reAyourAbeAknowAwhatAdoAnotAareAwithAcanAdonAheAjustAlikeA'llAhereAallAnoAoutAupAgetAaboutArightAhimAohAgoAatAthereAsoAherAoneA'veAyeahAgotAtheyAbutAwantBillAthinkAifAnowAsheAfromAwellAseeAasAgoingAhisAtimeAbackAusAdidAyesAanAthemAgonnaCodAbeenAwereBouldAhadAcomeAheyBowAwhoAneedAokayBurAwhenAtakeAsomeBayA'dAwhyAdidnAorAreallyAcouldAwayAmanAtooAdownAhasAletAbyAsomethingAmoreAtellAmakeAthenAmeanAoverAlittleAneverAsaidApeopleAshouldAlookAoffAveryAloveAonlyAdoingAmuchAamAthingAanyAwhereAtwoAintoAevenAthankAbecauseAstillAfindAgiveAsorryAworkAdayAhelpAlifeAfirstAanythingAsureAagainAtheirDseAotherAthanAgodAwonAawayAmr.AbeforeAthoughtAhomeAtalkAmustAtoldAnightAcallAthingsAbetterAaroundAlastBongAalwaysAfeelAputAyearsAafterApleaseAthoseAsirAplaceAlotAnameAmadeAdoesnAguysAmoneyAeverEythingAgreatAnothingAkeepAdoneAguyAthroughAleaveAwantedAkindAhappenedAnewAbeingClieveAoldAcomingAdoesAcameBourseAwrongAleftAbigAhouseAmightAgirlA..AbadAstopAhelloAownAuhAhearAworldAsomeoneAunderstandAelseAtalkingAisnAenoughAtodayAgettingAfatherAmaybeAcareAfoundAmusicAeveryAaskAsameAanotherAfineBamilyAkillAtryingAwentAlookingAthreeAwaitAcarAtogetherAshowAbestAstayAwasnAyourselfAjobAmanyAniceAdeadAalreadyAfriendArealCmemberAmindAsawBonAnextAhiAwhichAmotherAwannaAtryBhanksAroomAhellCardAseenAfuckingAwomanCuldnAmayAknewAliveAbabyBitAwholeAideaAheadAusedAboyAokAmorningAhardAwithoutAtookAcalledAalsoAshitBayingAdaysAmostAstartAmatterAuseAreadyAgottaAmeetAdoorAahAyetAbothAprettyAmyselfBoveAguessAactuallyAwhileAendAphoneAsuchAgoneAfewAhavenAwifeApersonAagoAbrotherAkilledAproblemAhappyAaloneAfriendsAmenAfaceAschoolAworryAcouldnBaseAlostAdadAplayArunAheartAonceAdieAanyoneAhopeAbringAwantsAfuckAtonightAbusinessAtrueAuntilAsinceAeachAsoonBaysAeveryoneAtomorrowAhandAthinkingAworkingAhappenCvingAyearApartAeatAmomAstuffAlooksAkidsAlaterBistenAhuhAminuteAsecondAlateAgaveAturnAwaterAkidBnowsAopenAchangeAmeansAdifferentAminutesAinsideAeyesAbeautifulAfarApoliceCintAunderAprobablyAcrazyAtakingAaskedAhurtAchanceAdealAainAmakingApayAdaughterAplayingAfunAtimesAhitAsideAhandsAmakesAableAbodyAimportantAholdAdeathAstoryAcomesAfightAsupposedAleastAmomentArestAumAsetBtartedAcloseAyoungAdrinkAagainstAexcuseAafraidAgameAanymoreAwordBishAfiveAweekAthoughAmissAeasyAsleepAreasonAmineAwaitingAdr.AwatchAgoesAexactlyAgetsAitsAcheckAhoursAbehindAnumberAwowApartyAtruthAquiteAhusbandAshotAmarriedAchildAbetweenAcauseAfireAquestionAmetAtellingAfourAbroughtBloodBreakAsisterAemAteamBroubleCiedAfrontAsitAforgetAreadAtownAdiedAcoupleAarenAneedsAlineAwalkAchildrenApowerAbecomeAofficeAplanAalmostAgirlsAfoodAspeakAyoursAgunAaliveAcutAfeelingAoutsideAsafeAtrustAnewsAaheadAsaveAeitherAsomebodyBtandAmrs.AfreeAanswerAhateBighAmonthsAeverybodyAbuyAhmmAwhateverAfullAhalfAloseAwomenAalongAseemsAfactArunningAcoolAdearAbedAlightAorderAwhoaAcountryAdoctorAclearA10AboysAsentDdAlivingAwarApastAbyeAdogAjohnAtakenAhotAleavingBivesApickAscaredAparentsAfunnyAcityApromiseAstupidAcannotAdinnerAshouldnAassCkingAcompanyAladyAwinApossibleAhimselfAseriousAbookAmrAsortAhourAanywayAsoundBhallAhappensAsixAlordAsickAtopAfeltAtouchAjackAsenseBmallA20AseemAmeetingAdamnAspecialAjesusAperfectAcaptainAluckAfastAcontrolAbitchAwordsAhumanAlaughsAhairBospitalAmurderAdreamAshutAknownAsighsAcoldAfutureAgladAworkedAdriveAcatchAanybodyAlaughingAmillionAlongerAoohAlieAcallingAfigureCnallyAlookedAothersA'amAblackAshootAfaultA30AworriedAhoneyAsomewhereAweeksAchangedAbossAhappeningAseeingAdanceAsecretAdateAfallAtakesAlovedAsignAquestionsAwerenApieceAairAchucklesCoiceAfeetAneededAturnedAbetAmovingAreturnAvoiceAamazingAgivingAstrongAlearnAgivenAsamAweirdBhiteAlessAworthAearlyAchristmasAbeatAtillA00AonesAcleanAeyeAsongCundsBtraightBhipAwriteAratherAsweetAfollowAmissingApainAnobodyApictureAwelcomeAexplainAtenAcoffeeAworksAkeptAyaAdefinitelyAwonderAprotectAbusyAcaughtAkiddingAluckyAevidenceAmistakeBadAweddingAmeantAdecidedAstepAroadAbuildingAinformationAreportAalrightAwatchingAcarefulAeveningAtvArideAlandAworseAsituationAentireApullAmmBovieAtiredAhurryAsexAhandleAsometimesBystemAmouthAactAbirthdayAthrowAattackAlawAfinishAdarkAmaAclassAyesterdayAmessageAkingAwonderfulAcompletelyAlyingAmichaelAbrokeAexpectAmonthApoorAmm-hmmAjoeAquietAsellAbagAusingAfloorAtalkedAleadAgroundAhasnApassAstreetAclothesAforeverAdangerousAwearAdropAredAdaddyAacrossAbornAsingleAthinksAspeakingAhangAfrankAtestAageAtableAdavidAms.AanywhereAyorkAhistoryA15AgeorgeAtrainAranAareaAnearAduringAswearApaidAmarryAfeelsAi-iAspendAboxAcharlieAmiddleAstrangeAuncleAroundAboughtAterribleAcourtAagreeAstateAboatAproudAquickAmikeAtomAspaceBecurityAjoinAsittingAaccidentAforgotDwardAtotallyAsavedAhaArelationshipAlistAcrimeAstationAnormalAsupposeAfishAgentlemenAwearingAmasterAsceneAchargeAmissedAfellAstoppedAkeyAbuddyAfixAofferApersonalAinsteadAshortAfearAringAprisonAsimpleAgroupAamericanAcalmAdifficultAfightingAmessAtripArecordApositionAangryAletterAwakeAfinishedAshareAhonestAdeepLine truncated
export { commonWords as default };
//# sourceMappingURL=commonWords.json.mjs.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isValidES3Identifier;
var _isValidIdentifier = require("./isValidIdentifier.js");
const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
function isValidES3Identifier(name) {
return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
}
//# sourceMappingURL=isValidES3Identifier.js.map
@@ -0,0 +1,101 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
type FunctionNode = TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression;
/**
* Gets the location of the given function node for reporting.
*
* - `function foo() {}`
* ^^^^^^^^^^^^
* - `(function foo() {})`
* ^^^^^^^^^^^^
* - `(function() {})`
* ^^^^^^^^
* - `function* foo() {}`
* ^^^^^^^^^^^^^
* - `(function* foo() {})`
* ^^^^^^^^^^^^^
* - `(function*() {})`
* ^^^^^^^^^
* - `() => {}`
* ^^
* - `async () => {}`
* ^^
* - `({ foo: function foo() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ foo: function() {} })`
* ^^^^^^^^^^^^^
* - `({ ['foo']: function() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ [foo]: function() {} })`
* ^^^^^^^^^^^^^^^
* - `({ foo() {} })`
* ^^^
* - `({ foo: function* foo() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ foo: function*() {} })`
* ^^^^^^^^^^^^^^
* - `({ ['foo']: function*() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ [foo]: function*() {} })`
* ^^^^^^^^^^^^^^^^
* - `({ *foo() {} })`
* ^^^^
* - `({ foo: async function foo() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ foo: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^
* - `({ ['foo']: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ [foo]: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^
* - `({ async foo() {} })`
* ^^^^^^^^^
* - `({ get foo() {} })`
* ^^^^^^^
* - `({ set foo(a) {} })`
* ^^^^^^^
* - `class A { constructor() {} }`
* ^^^^^^^^^^^
* - `class A { foo() {} }`
* ^^^
* - `class A { *foo() {} }`
* ^^^^
* - `class A { async foo() {} }`
* ^^^^^^^^^
* - `class A { ['foo']() {} }`
* ^^^^^^^
* - `class A { *['foo']() {} }`
* ^^^^^^^^
* - `class A { async ['foo']() {} }`
* ^^^^^^^^^^^^^
* - `class A { [foo]() {} }`
* ^^^^^
* - `class A { *[foo]() {} }`
* ^^^^^^
* - `class A { async [foo]() {} }`
* ^^^^^^^^^^^
* - `class A { get foo() {} }`
* ^^^^^^^
* - `class A { set foo(a) {} }`
* ^^^^^^^
* - `class A { static foo() {} }`
* ^^^^^^^^^^
* - `class A { static *foo() {} }`
* ^^^^^^^^^^^
* - `class A { static async foo() {} }`
* ^^^^^^^^^^^^^^^^
* - `class A { static get foo() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static set foo(a) {} }`
* ^^^^^^^^^^^^^^
* - `class A { foo = function() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static foo = function() {} }`
* ^^^^^^^^^^^^^^^^^^^^^
* - `class A { foo = (a, b) => {} }`
* ^^^^^^
* @param node The function node to get.
* @param sourceCode The source code object to get tokens.
* @returns The location of the function node for reporting.
*/
export declare function getFunctionHeadLoc(node: FunctionNode, sourceCode: TSESLint.SourceCode): TSESTree.SourceLocation;
export {};
@@ -0,0 +1,41 @@
import Client from './client'
import TPoolStats from './pool-stats'
import { URL } from 'node:url'
import Dispatcher from './dispatcher'
export default RoundRobinPool
type RoundRobinPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
declare class RoundRobinPool extends Dispatcher {
constructor (url: string | URL, options?: RoundRobinPool.Options)
/** `true` after `pool.close()` has been called. */
closed: boolean
/** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
destroyed: boolean
/** Aggregate stats for a RoundRobinPool. */
readonly stats: TPoolStats
// Override dispatcher APIs.
override connect (
options: RoundRobinPoolConnectOptions
): Promise<Dispatcher.ConnectData>
override connect (
options: RoundRobinPoolConnectOptions,
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
): void
}
declare namespace RoundRobinPool {
export type RoundRobinPoolStats = TPoolStats
export interface Options extends Client.Options {
/** Default: `(origin, opts) => new Client(origin, opts)`. */
factory?(origin: URL, opts: object): Dispatcher;
/** The max number of clients to create. `null` if no limit. Default `null`. */
connections?: number | null;
/** The amount of time before a client is removed from the pool and closed. `null` if no time limit. Default `null` */
clientTtl?: number | null;
interceptors?: { RoundRobinPool?: readonly Dispatcher.DispatchInterceptor[] } & Client.Options['interceptors']
}
}
@@ -0,0 +1,88 @@
{
"name": "@parcel/watcher",
"version": "2.5.6",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/watcher.git"
},
"description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"files": [
"index.js",
"index.js.flow",
"index.d.ts",
"wrapper.js",
"package.json",
"README.md",
"LICENSE",
"src",
"scripts/build-from-source.js",
"binding.gyp"
],
"scripts": {
"prebuild": "prebuildify --napi --strip --tag-libc",
"format": "prettier --write \"./**/*.{js,json,md}\"",
"build": "node-gyp rebuild",
"install": "node scripts/build-from-source.js",
"test": "mocha"
},
"engines": {
"node": ">= 10.0.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,md}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"detect-libc": "^2.0.3",
"is-glob": "^4.0.3",
"node-addon-api": "^7.0.0",
"picomatch": "^4.0.3"
},
"devDependencies": {
"esbuild": "^0.19.8",
"fs-extra": "^10.0.0",
"husky": "^7.0.2",
"lint-staged": "^11.1.2",
"mocha": "^9.1.1",
"napi-wasm": "^1.1.0",
"prebuildify": "^6.0.1",
"prettier": "^2.3.2"
},
"binary": {
"napi_versions": [
3
]
},
"optionalDependencies": {
"@parcel/watcher-darwin-x64": "2.5.6",
"@parcel/watcher-darwin-arm64": "2.5.6",
"@parcel/watcher-win32-x64": "2.5.6",
"@parcel/watcher-win32-arm64": "2.5.6",
"@parcel/watcher-win32-ia32": "2.5.6",
"@parcel/watcher-linux-x64-glibc": "2.5.6",
"@parcel/watcher-linux-x64-musl": "2.5.6",
"@parcel/watcher-linux-arm64-glibc": "2.5.6",
"@parcel/watcher-linux-arm64-musl": "2.5.6",
"@parcel/watcher-linux-arm-glibc": "2.5.6",
"@parcel/watcher-linux-arm-musl": "2.5.6",
"@parcel/watcher-android-arm64": "2.5.6",
"@parcel/watcher-freebsd-x64": "2.5.6"
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_gensync","data","require","ChainFormatter","exports","Programmatic","Config","Formatter","title","type","callerName","filepath","loc","index","envName","optionsAndDescriptors","opt","content","Object","assign","options","overrides","env","pluginDescriptors","plugins","length","map","d","descriptorToConfig","presetDescriptors","presets","JSON","stringify","undefined","_d$file","name","file","request","value","toString","slice","ConfigPrinter","constructor","_stack","configure","enabled","push","format","config","output","configs","gensync","all","s","join"],"sources":["../../src/config/printer.ts"],"sourcesContent":["import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors.ts\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig<API>(\n d: UnloadedDescriptor<API>,\n): string | [string, object] | [string, object, string] {\n let name: string = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n // @ts-expect-error FIXME\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: PrintableConfig[] = [];\n configure(\n enabled: boolean,\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler<string> {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler<string> {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUO,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5BE,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE;AACV,CAAC;AAWD,MAAMC,SAAS,GAALine truncated
@@ -0,0 +1,623 @@
flf2a$ 6 6 9 -1 10
Cyrillic font by Tracy Schuhwerk (Tracy.Schuhwerk@sdrc.com).
November 15th, 1993 Version 1.0
I sacrificed the following symbols for Cyrillic letters:
"\" (slash)
"/" (back slash)
"|" (pipe)
"~" (tilde)
"`" (single quote)
">" (greater than)
@
@
@
@
@
@@
@
# @
# @
# @
@
# @@
@
# # @
# # @
@
@
@@
@
# # @
### @
# # @
### @
# # @@
@
## @
## @
### @
## @
## @@
@
# # @
# @
# @
# @
# # @@
@
# @
# @
## @
# # @
### @@
@
# @
# @
# @
@
@@
@
# @
# @
# @
# @
# @@
@
# @
# @
# @
# @
# @@
@
# @
### @
# @
### @
# @@
@
@
# @
### @
# @
@@
@
@
@
@
# @
# @@
@
@
@
### @
@
@@
@
@
@
@
@
# @@
@
# @
# @
## @
# # @
## @@
@
### @
# # @
# # @
# # @
### @@
@
# @
## @
# @
# @
### @@
@
### @
# @
### @
# @
### @@
@
### @
# @
## @
# @
### @@
@
# # @
# # @
### @
# @
# @@
@
### @
# @
### @
# @
### @@
@
### @
# @
### @
# # @
### @@
@
### @
# @
# @
# @
# @@
@
### @
# # @
### @
# # @
### @@
@
### @
# # @
### @
# @
### @@
@
@
# @
@
# @
@@
@
@
# @
@
# @
# @@
@
# @
# @
# @
# @
# @@
@
@
### @
@
### @
@@
@
# # # @
# ## @
# # # @
## # @
# # @@
@
### @
# @
## @
@
# @@
@
### @
# # @
# @
### @
@@
@
# @
# # @
##### @
# # @
# # @@
@
#### @
# @
#### @
# # @
##### @@
@
# # @
# # @
#### @
# @
# @@
@
##### @
# # @
# # @
#### @
# # @@
@
##### @
# @
#### @
# @
##### @@
@
# @
### @
# # # @
### @
# @@
@
##### @
# # @
# @
# @
# @@
@
# # @
# # @
# @
# # @
# # @@
@
# # @
# ## @
# # # @
## # @
# # @@
@
# # # @
### @
# @
### @
# # # @@
@
# # @
# # @
### @
# # @
# # @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
## ## @
# # # @
# # @
# # @@
@
# # @
# # @
##### @
# # @
# # @@
@
### @
# # @
# # @
# # @
### @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
# # @
# # @
##### @
# @@
@
#### @
# # @
#### @
# @
# @@
@
#### @
# @
# @
# @
#### @@
@
##### @
# @
# @
# @
# @@
@
# # @
# # @
# @
# @
# @@
@
#### @
# # @
#### @
# # @
#### @@
@
# # @
# # # @
# # # @
# # # @
### @@
@
# # @
# # # @
# # # @
# # # @
##### @@
@
#### @
# # @
#### @
# # @
# # @@
@
#### @
# @
### @
# @
#### @@
@
## @
# @
# @
# @
## @@
@
## @
# @
## @
# # @
## @@
@
## @
# @
# @
# @
## @@
@
# @
# # @
@
@
@@
@
@
@
@
@
### @@
@
# ## @
# # # @
### # @
# # # @
# ## @@
@
# @
# # @
##### @
# # @
# # @@
@
#### @
# @
#### @
# # @
##### @@
@
# # @
# # @
#### @
# @
# @@
@
##### @
# # @
# # @
#### @
# # @@
@
##### @
# @
#### @
# @
##### @@
@
# @
### @
# # # @
### @
# @@
@
##### @
# # @
# @
# @
# @@
@
# # @
# # @
# @
# # @
# # @@
@
# # @
# ## @
# # # @
## # @
# # @@
@
# # # @
### @
# @
### @
# # # @@
@
# # @
# # @
### @
# # @
# # @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
## ## @
# # # @
# # @
# # @@
@
# # @
# # @
##### @
# # @
# # @@
@
### @
# # @
# # @
# # @
### @@
@
##### @
# # @
# # @
# # @
# # @@
@
# # @
# # @
# # @
##### @
# @@
@
#### @
# # @
#### @
# @
# @@
@
#### @
# @
# @
# @
#### @@
@
##### @
# @
# @
# @
# @@
@
# # @
# # @
# @
# @
# @@
@
#### @
# # @
#### @
# # @
#### @@
@
# # @
# # # @
# # # @
# # # @
### @@
@
# # @
# # # @
# # # @
# # # @
##### @@
@
#### @
# # @
#### @
# # @
# # @@
@
#### @
# @
### @
# @
#### @@
@
## @
# @
## @
# @
## @@
@
# # @
# # @
## # @
# # # @
## # @@
@
## @
# @
## @
# @
## @@
@
#### @
# @
##### @
# @
#### @@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-useless-constructor');
/**
* Check if method with accessibility is not useless
*/
function checkAccessibility(node) {
switch (node.accessibility) {
case 'protected':
case 'private':
return false;
case 'public':
if (node.parent.parent.superClass) {
return false;
}
break;
}
return true;
}
/**
* Check if method is not useless due to typescript parameter properties and decorators
*/
function checkParams(node) {
return !node.value.params.some(param => param.type === utils_1.AST_NODE_TYPES.TSParameterProperty ||
param.decorators.length);
}
exports.default = (0, util_1.createRule)({
name: 'no-useless-constructor',
meta: {
type: 'problem',
// defaultOptions, -- base rule does not use defaultOptions
docs: {
description: 'Disallow unnecessary constructors',
extendsBaseRule: true,
recommended: 'strict',
},
hasSuggestions: baseRule.meta.hasSuggestions,
messages: baseRule.meta.messages,
schema: baseRule.meta.schema,
},
defaultOptions: [],
create(context) {
const rules = baseRule.create(context);
return {
MethodDefinition(node) {
if (node.value.type === utils_1.AST_NODE_TYPES.FunctionExpression &&
checkAccessibility(node) &&
checkParams(node)) {
rules.MethodDefinition(node);
}
},
};
},
});
@@ -0,0 +1,13 @@
import { GroupAnimationWithThen } from 'motion-dom';
import { animateElements } from './animate-elements.mjs';
const createScopedWaapiAnimate = (scope) => {
function scopedAnimate(elementOrSelector, keyframes, options) {
return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));
}
return scopedAnimate;
};
const animateMini = /*@__PURE__*/ createScopedWaapiAnimate();
export { animateMini, createScopedWaapiAnimate };
//# sourceMappingURL=animate-style.mjs.map
@@ -0,0 +1,43 @@
/**
* JSON Web Token (JWT) Signing (JWT is in JWS format)
*
* @module
*/
import type * as types from '../types.d.ts';
/**
* The SignJWT class is used to build and sign Compact JWS formatted JSON Web Tokens.
*
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
* from its subpath export `'jose/jwt/sign'`.
*
*/
export declare class SignJWT implements types.ProduceJWT {
#private;
/**
* {@link SignJWT} constructor
*
* @param payload The JWT Claims Set object. Defaults to an empty object.
*/
constructor(payload?: types.JWTPayload);
setIssuer(issuer: string): this;
setSubject(subject: string): this;
setAudience(audience: string | string[]): this;
setJti(jwtId: string): this;
setNotBefore(input: number | string | Date): this;
setExpirationTime(input: number | string | Date): this;
setIssuedAt(input?: number | string | Date): this;
/**
* Sets the JWS Protected Header on the SignJWT object.
*
* @param protectedHeader JWS Protected Header. Must contain an "alg" (JWS Algorithm) property.
*/
setProtectedHeader(protectedHeader: types.JWTHeaderParameters): this;
/**
* Signs and returns the JWT.
*
* @param key Private Key or Secret to sign the JWT with. See
* {@link https://github.com/panva/jose/issues/210#jws-alg Algorithm Key Requirements}.
* @param options JWT Sign options.
*/
sign(key: types.CryptoKey | types.KeyObject | types.JWK | Uint8Array, options?: types.SignOptions): Promise<string>;
}
@@ -0,0 +1 @@
{"version":3,"file":"simpleOAuthClientProvider.d.ts","sourceRoot":"","sources":["../../../../src/examples/client/simpleOAuthClientProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAErG;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,mBAAmB;IAM/D,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;aAEhB,iBAAiB,CAAC,EAAE,MAAM;IAR9C,OAAO,CAAC,kBAAkB,CAAC,CAA8B;IACzD,OAAO,CAAC,OAAO,CAAC,CAAc;IAC9B,OAAO,CAAC,aAAa,CAAC,CAAS;gBAGV,YAAY,EAAE,MAAM,GAAG,GAAG,EAC1B,eAAe,EAAE,mBAAmB,EACrD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EACf,iBAAiB,CAAC,EAAE,MAAM,YAAA;IAS9C,OAAO,CAAC,WAAW,CAAqB;IAExC,IAAI,WAAW,IAAI,MAAM,GAAG,GAAG,CAE9B;IAED,IAAI,cAAc,IAAI,mBAAmB,CAExC;IAED,iBAAiB,IAAI,2BAA2B,GAAG,SAAS;IAI5D,qBAAqB,CAAC,iBAAiB,EAAE,2BAA2B,GAAG,IAAI;IAI3E,MAAM,IAAI,WAAW,GAAG,SAAS;IAIjC,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAIrC,uBAAuB,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI;IAIpD,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI5C,YAAY,IAAI,MAAM;CAMzB"}
@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/vocabularies/discriminator/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
@@ -0,0 +1,347 @@
/**
* @fileoverview A rule to suggest using template literals instead of string concatenation.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a concatenation.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is a concatenation.
*/
function isConcatenation(node) {
return node.type === "BinaryExpression" && node.operator === "+";
}
/**
* Gets the top binary expression node for concatenation in parents of a given node.
* @param {ASTNode} node A node to get.
* @returns {ASTNode} the top binary expression node in parents of a given node.
*/
function getTopConcatBinaryExpression(node) {
let currentNode = node;
while (isConcatenation(currentNode.parent)) {
currentNode = currentNode.parent;
}
return currentNode;
}
/**
* Checks whether or not a node contains a string literal with an octal or non-octal decimal escape sequence
* @param {ASTNode} node A node to check
* @returns {boolean} `true` if at least one string literal within the node contains
* an octal or non-octal decimal escape sequence
*/
function hasOctalOrNonOctalDecimalEscapeSequence(node) {
if (isConcatenation(node)) {
return (
hasOctalOrNonOctalDecimalEscapeSequence(node.left) ||
hasOctalOrNonOctalDecimalEscapeSequence(node.right)
);
}
// No need to check TemplateLiterals – would throw parsing error
if (node.type === "Literal" && typeof node.value === "string") {
return astUtils.hasOctalOrNonOctalDecimalEscapeSequence(node.raw);
}
return false;
}
/**
* Checks whether or not a given binary expression has string literals.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node has string literals.
*/
function hasStringLiteral(node) {
if (isConcatenation(node)) {
// `left` is deeper than `right` normally.
return hasStringLiteral(node.right) || hasStringLiteral(node.left);
}
return astUtils.isStringLiteral(node);
}
/**
* Checks whether or not a given binary expression has non string literals.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node has non string literals.
*/
function hasNonStringLiteral(node) {
if (isConcatenation(node)) {
// `left` is deeper than `right` normally.
return (
hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left)
);
}
return !astUtils.isStringLiteral(node);
}
/**
* Determines whether a given node will start with a template curly expression (`${}`) when being converted to a template literal.
* @param {ASTNode} node The node that will be fixed to a template literal
* @returns {boolean} `true` if the node will start with a template curly.
*/
function startsWithTemplateCurly(node) {
if (node.type === "BinaryExpression") {
return startsWithTemplateCurly(node.left);
}
if (node.type === "TemplateLiteral") {
return (
node.expressions.length &&
node.quasis.length &&
node.quasis[0].range[0] === node.quasis[0].range[1]
);
}
return node.type !== "Literal" || typeof node.value !== "string";
}
/**
* Determines whether a given node end with a template curly expression (`${}`) when being converted to a template literal.
* @param {ASTNode} node The node that will be fixed to a template literal
* @returns {boolean} `true` if the node will end with a template curly.
*/
function endsWithTemplateCurly(node) {
if (node.type === "BinaryExpression") {
return startsWithTemplateCurly(node.right);
}
if (node.type === "TemplateLiteral") {
return (
node.expressions.length &&
node.quasis.length &&
node.quasis.at(-1).range[0] === node.quasis.at(-1).range[1]
);
}
return node.type !== "Literal" || typeof node.value !== "string";
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Require template literals instead of string concatenation",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/prefer-template",
},
schema: [],
fixable: "code",
messages: {
unexpectedStringConcatenation: "Unexpected string concatenation.",
},
},
create(context) {
const sourceCode = context.sourceCode;
let done = Object.create(null);
/**
* Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens.
* @param {ASTNode} node1 The first node
* @param {ASTNode} node2 The second node
* @returns {string} The text between the nodes, excluding other tokens
*/
function getTextBetween(node1, node2) {
const allTokens = [node1]
.concat(sourceCode.getTokensBetween(node1, node2))
.concat(node2);
const sourceText = sourceCode.getText();
return allTokens
.slice(0, -1)
.reduce(
(accumulator, token, index) =>
accumulator +
sourceText.slice(
token.range[1],
allTokens[index + 1].range[0],
),
"",
);
}
/**
* Returns a template literal form of the given node.
* @param {ASTNode} currentNode A node that should be converted to a template literal
* @param {string} textBeforeNode Text that should appear before the node
* @param {string} textAfterNode Text that should appear after the node
* @returns {string} A string form of this node, represented as a template literal
*/
function getTemplateLiteral(
currentNode,
textBeforeNode,
textAfterNode,
) {
if (
currentNode.type === "Literal" &&
typeof currentNode.value === "string"
) {
/*
* If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted
* as a template placeholder. However, if the code already contains a backslash before the ${ or `
* for some reason, don't add another backslash, because that would change the meaning of the code (it would cause
* an actual backslash character to appear before the dollar sign).
*/
return `\`${currentNode.raw
.slice(1, -1)
.replace(/\\*(\$\{|`)/gu, matched => {
if (matched.lastIndexOf("\\") % 2) {
return `\\${matched}`;
}
return matched;
// Unescape any quotes that appear in the original Literal that no longer need to be escaped.
})
.replace(
new RegExp(`\\\\${currentNode.raw[0]}`, "gu"),
currentNode.raw[0],
)}\``;
}
if (currentNode.type === "TemplateLiteral") {
return sourceCode.getText(currentNode);
}
if (isConcatenation(currentNode) && hasStringLiteral(currentNode)) {
const plusSign = sourceCode.getFirstTokenBetween(
currentNode.left,
currentNode.right,
token => token.value === "+",
);
const textBeforePlus = getTextBetween(
currentNode.left,
plusSign,
);
const textAfterPlus = getTextBetween(
plusSign,
currentNode.right,
);
const leftEndsWithCurly = endsWithTemplateCurly(
currentNode.left,
);
const rightStartsWithCurly = startsWithTemplateCurly(
currentNode.right,
);
if (leftEndsWithCurly) {
// If the left side of the expression ends with a template curly, add the extra text to the end of the curly bracket.
// `foo${bar}` /* comment */ + 'baz' --> `foo${bar /* comment */ }${baz}`
return (
getTemplateLiteral(
currentNode.left,
textBeforeNode,
textBeforePlus + textAfterPlus,
).slice(0, -1) +
getTemplateLiteral(
currentNode.right,
null,
textAfterNode,
).slice(1)
);
}
if (rightStartsWithCurly) {
// Otherwise, if the right side of the expression starts with a template curly, add the text there.
// 'foo' /* comment */ + `${bar}baz` --> `foo${ /* comment */ bar}baz`
return (
getTemplateLiteral(
currentNode.left,
textBeforeNode,
null,
).slice(0, -1) +
getTemplateLiteral(
currentNode.right,
textBeforePlus + textAfterPlus,
textAfterNode,
).slice(1)
);
}
/*
* Otherwise, these nodes should not be combined into a template curly, since there is nowhere to put
* the text between them.
*/
return `${getTemplateLiteral(currentNode.left, textBeforeNode, null)}${textBeforePlus}+${textAfterPlus}${getTemplateLiteral(currentNode.right, textAfterNode, null)}`;
}
return `\`\${${textBeforeNode || ""}${sourceCode.getText(currentNode)}${textAfterNode || ""}}\``;
}
/**
* Returns a fixer object that converts a non-string binary expression to a template literal
* @param {SourceCodeFixer} fixer The fixer object
* @param {ASTNode} node A node that should be converted to a template literal
* @returns {Object} A fix for this binary expression
*/
function fixNonStringBinaryExpression(fixer, node) {
const topBinaryExpr = getTopConcatBinaryExpression(node.parent);
if (hasOctalOrNonOctalDecimalEscapeSequence(topBinaryExpr)) {
return null;
}
return fixer.replaceText(
topBinaryExpr,
getTemplateLiteral(topBinaryExpr, null, null),
);
}
/**
* Reports if a given node is string concatenation with non string literals.
* @param {ASTNode} node A node to check.
* @returns {void}
*/
function checkForStringConcat(node) {
if (
!astUtils.isStringLiteral(node) ||
!isConcatenation(node.parent)
) {
return;
}
const topBinaryExpr = getTopConcatBinaryExpression(node.parent);
// Checks whether or not this node had been checked already.
if (done[topBinaryExpr.range[0]]) {
return;
}
done[topBinaryExpr.range[0]] = true;
if (hasNonStringLiteral(topBinaryExpr)) {
context.report({
node: topBinaryExpr,
messageId: "unexpectedStringConcatenation",
fix: fixer => fixNonStringBinaryExpression(fixer, node),
});
}
}
return {
Program() {
done = Object.create(null);
},
Literal: checkForStringConcat,
TemplateLiteral: checkForStringConcat,
};
},
};
@@ -0,0 +1,4 @@
// Ignore the TypeScript errors
// Since this file will only be used in Deno runtime
export const processArgs = ['deno', 'cli'].concat(Deno.args);
export const platformInfo = `${Deno.build.os}-${Deno.build.arch} deno-${Deno.version.deno}`;
@@ -0,0 +1 @@
{"version":3,"file":"scoring.cjs","sources":["../../../src/matcher/spatial/scoring.ts"],"sourcesContent":[null],"names":["calcAverageDegree","graph","average","Object","keys","forEach","key","neighbors","filter","entry","length","entries","estimatePossiblePatterns","graphEntry","token","turns","startingPosition","averageDegree","guesses","tokenLength","i","possibleTurns","Math","min","j","utils","nCk","shiftedCount","options","graphs","unShiftedCount","shiftedVariations","round"],"mappings":";;;;AASA,MAAMA,iBAAiB,GAAIC,KAAwB,IAAI;EACrD,IAAIC,OAAO,GAAG,CAAC;EACfC,MAAM,CAACC,IAAI,CAACH,KAAK,CAAC,CAACI,OAAO,CAAEC,GAAG,IAAI;AACjC,IAAA,MAAMC,SAAS,GAAGN,KAAK,CAACK,GAAG,CAAC;AAC5BJ,IAAAA,OAAO,IAAIK,SAAS,CAACC,MAAM,CAAEC,KAAK,IAAK,CAAC,CAACA,KAAK,CAAC,CAACC,MAAM;AACxD,EAAA,CAAC,CAAC;EACFR,OAAO,IAAIC,MAAM,CAACQ,OAAO,CAACV,KAAK,CAAC,CAACS,MAAM;AACvC,EAAA,OAAOR,OAAO;AAChB,CAAC;AAED,MAAMU,wBAAwB,GAAGA,CAC/BC,UAA6B,EAC7B;EAAEC,KAAK;AAAEC,EAAAA;AAAK,CAAmC,KAC/C;EACF,MAAMC,gBAAgB,GAAGb,MAAM,CAACC,IAAI,CAACS,UAAU,CAAC,CAACH,MAAM;AACvD,EAAA,MAAMO,aAAa,GAAGjB,iBAAiB,CAACa,UAAU,CAAC;EAEnD,IAAIK,OAAO,GAAG,CAAC;AACf,EAAA,MAAMC,WAAW,GAAGL,KAAK,CAACJ,MAAM;AAChC;AACA,EAAA,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAID,WAAW,EAAEC,CAAC,IAAI,CAAC,EAAE;IACxC,MAAMC,aAAa,GAAGC,IAAI,CAACC,GAAG,CAACR,KAAK,EAAEK,CAAC,GAAG,CAAC,CAAC;AAC5C,IAAA,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIH,aAAa,EAAEG,CAAC,IAAI,CAAC,EAAE;AAC1CN,MAAAA,OAAO,IAAIO,KAAK,CAACC,GAAG,CAACN,CAAC,GAAG,CAAC,EAAEI,CAAC,GAAG,CAAC,CAAC,GAAGR,gBAAgB,GAAGC,aAAa,IAAIO,CAAC;AAC5E,IAAA;AACF,EAAA;AACA,EAAA,OAAON,OAAO;AAChB,CAAC;AAED,qBAAe,CACb;EAAEjB,KAAK;EAAEa,KAAK;EAAEa,YAAY;AAAEZ,EAAAA;AAAK,CAAkC,EACrEa,OAAgB,KACd;EACF,IAAIV,OAAO,GAAGN,wBAAwB,CAACgB,OAAO,CAACC,MAAM,CAAC5B,KAAK,CAAC,EAAE;IAC5Da,KAAK;AACLC,IAAAA;AACD,GAAA,CAAC;AAEF;AACA;AACA,EAAA,IAAIY,YAAY,EAAE;AAChB,IAAA,MAAMG,cAAc,GAAGhB,KAAK,CAACJ,MAAM,GAAGiB,YAAY;AAClD,IAAA,IAAIA,YAAY,KAAK,CAAC,IAAIG,cAAc,KAAK,CAAC,EAAE;AAC9CZ,MAAAA,OAAO,IAAI,CAAC;AACd,IAAA,CAAC,MAAM;MACL,IAAIa,iBAAiB,GAAG,CAAC;AACzB,MAAA,KAAK,IAAIX,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIE,IAAI,CAACC,GAAG,CAACI,YAAY,EAAEG,cAAc,CAAC,EAAEV,CAAC,IAAI,CAAC,EAAE;QACnEW,iBAAiB,IAAIN,KAAK,CAACC,GAAG,CAC3BC,YAAuB,GAAGG,cAAc,EACzCV,CAAC,CACF;AACH,MAAA;AACAF,MAAAA,OAAO,IAAIa,iBAAiB;AAC9B,IAAA;AACF,EAAA;AACA,EAAA,OAAOT,IAAI,CAACU,KAAK,CAACd,OAAO,CAAC;AAC5B,CAAC;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_AM","2":"_yJ"},D:{"1":"_qF","2":"_kF"},E:{"1":"_PC","2":"_3C"},F:{"1":"_MF","2":"_XI"},G:{"1":"_NC","2":"_0C"},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":"_xB","2":"_3B"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:2,C:"CSS caret-color",D:true};
@@ -0,0 +1,126 @@
export declare enum QuoteType {
NoValue = 0,
Unquoted = 1,
Single = 2,
Double = 3
}
export interface Callbacks {
onattribdata(start: number, endIndex: number): void;
onattribentity(codepoint: number): void;
onattribend(quote: QuoteType, endIndex: number): void;
onattribname(start: number, endIndex: number): void;
oncdata(start: number, endIndex: number, endOffset: number): void;
onclosetag(start: number, endIndex: number): void;
oncomment(start: number, endIndex: number, endOffset: number): void;
ondeclaration(start: number, endIndex: number): void;
onend(): void;
onopentagend(endIndex: number): void;
onopentagname(start: number, endIndex: number): void;
onprocessinginstruction(start: number, endIndex: number): void;
onselfclosingtag(endIndex: number): void;
ontext(start: number, endIndex: number): void;
ontextentity(codepoint: number, endIndex: number): void;
}
export default class Tokenizer {
private readonly cbs;
/** The current state the tokenizer is in. */
private state;
/** The read buffer. */
private buffer;
/** The beginning of the section that is currently being read. */
private sectionStart;
/** The index within the buffer that we are currently looking at. */
private index;
/** The start of the last entity. */
private entityStart;
/** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
private baseState;
/** For special parsing behavior inside of script and style tags. */
private isSpecial;
/** Indicates whether the tokenizer has been paused. */
running: boolean;
/** The offset of the current buffer. */
private offset;
private readonly xmlMode;
private readonly decodeEntities;
private readonly entityDecoder;
constructor({ xmlMode, decodeEntities, }: {
xmlMode?: boolean;
decodeEntities?: boolean;
}, cbs: Callbacks);
reset(): void;
write(chunk: string): void;
end(): void;
pause(): void;
resume(): void;
private stateText;
private currentSequence;
private sequenceIndex;
private stateSpecialStartSequence;
/** Look for an end tag. For <title> tags, also decode entities. */
private stateInSpecialTag;
private stateCDATASequence;
/**
* When we wait for one specific character, we can speed things up
* by skipping through the buffer until we find it.
*
* @returns Whether the character was found.
*/
private fastForwardTo;
/**
* Comments and CDATA end with `-->` and `]]>`.
*
* Their common qualities are:
* - Their end sequences have a distinct character they start with.
* - That character is then repeated, so we have to check multiple repeats.
* - All characters but the start character of the sequence can be skipped.
*/
private stateInCommentLike;
/**
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
*
* XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
* We allow anything that wouldn't end the tag.
*/
private isTagStartChar;
private startSpecial;
private stateBeforeTagName;
private stateInTagName;
private stateBeforeClosingTagName;
private stateInClosingTagName;
private stateAfterClosingTagName;
private stateBeforeAttributeName;
private stateInSelfClosingTag;
private stateInAttributeName;
private stateAfterAttributeName;
private stateBeforeAttributeValue;
private handleInAttributeValue;
private stateInAttributeValueDoubleQuotes;
private stateInAttributeValueSingleQuotes;
private stateInAttributeValueNoQuotes;
private stateBeforeDeclaration;
private stateInDeclaration;
private stateInProcessingInstruction;
private stateBeforeComment;
private stateInSpecialComment;
private stateBeforeSpecialS;
private stateBeforeSpecialT;
private startEntity;
private stateInEntity;
/**
* Remove data that has already been consumed from the buffer.
*/
private cleanup;
private shouldContinue;
/**
* Iterates through the buffer, calling the function corresponding to the current state.
*
* States that are more likely to be hit are higher up, as a performance improvement.
*/
private parse;
private finish;
/** Handle any trailing data. */
private handleTrailingData;
private emitCodePoint;
}
//# sourceMappingURL=Tokenizer.d.ts.map
@@ -0,0 +1,8 @@
import { c as MS_IN_SECOND } from "./constants-BuFquuHl.mjs";
import addMilliseconds from "./addMilliseconds.mjs";
function addSeconds(date, seconds) {
return addMilliseconds(date, seconds * MS_IN_SECOND);
}
export {
addSeconds as default
};
@@ -0,0 +1,55 @@
**💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**
---
# bundle-require
[![npm version](https://badgen.net/npm/v/bundle-require)](https://npm.im/bundle-require) [![npm downloads](https://badgen.net/npm/dm/bundle-require)](https://npm.im/bundle-require) [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/bundle-require)
## Use Case
Projects like [Vite](https://vitejs.dev) need to load config files provided by the user, but you can't do it with just `require()` because it's not necessarily a CommonJS module, it could also be a `.mjs` or even be written in TypeScript, and that's where the `bundle-require` package comes in, it loads the config file regardless what module format it is.
## How it works
- Bundle your file with esbuild, `node_modules` are excluded because it's problematic to try to bundle it
- `__filename`, `__dirname` and `import.meta.url` are replaced with source file's value instead of the one from the temporary output file
- Output file in `esm` format if possible (for `.ts`, `.js` input files)
- Load output file with `import()` if possible
- Return the loaded module and its dependencies (imported files)
## Install
```bash
npm i bundle-require esbuild
```
`esbuild` is a peer dependency.
## Usage
```ts
import { bundleRequire } from 'bundle-require'
const { mod } = await bundleRequire({
filepath: './project/vite.config.ts',
})
```
## API
https://www.jsdocs.io/package/bundle-require
## Projects Using bundle-require
Projects that use **bundle-require**:
- [VuePress](https://github.com/vuejs/vuepress): :memo: Minimalistic Vue-powered static site generator.
## Sponsors
[![sponsors](https://sponsors-images.egoist.dev/sponsors.svg)](https://github.com/sponsors/egoist)
## License
MIT &copy; [EGOIST](https://github.com/sponsors/egoist)
@@ -0,0 +1 @@
import{rectToClientRect as t,arrow as e,autoPlacement as n,detectOverflow as o,flip as i,hide as r,inline as c,limitShift as l,offset as s,shift as f,size as u,computePosition as a}from"@floating-ui/core";const h=Math.min,d=Math.max,p=Math.round,g=Math.floor,m=t=>({x:t,y:t});function y(){return"undefined"!=typeof window}function w(t){return b(t)?(t.nodeName||"").toLowerCase():"#document"}function x(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function v(t){var e;return null==(e=(b(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function b(t){return!!y()&&(t instanceof Node||t instanceof x(t).Node)}function L(t){return!!y()&&(t instanceof Element||t instanceof x(t).Element)}function R(t){return!!y()&&(t instanceof HTMLElement||t instanceof x(t).HTMLElement)}function T(t){return!(!y()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof x(t).ShadowRoot)}function C(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function S(t){return/^(table|td|th)$/.test(w(t))}function E(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const F=/transform|translate|scale|rotate|perspective|filter/,D=/paint|layout|strict|content/,W=t=>!!t&&"none"!==t;let O;function H(t){const e=L(t)?z(t):t;return W(e.transform)||W(e.translate)||W(e.scale)||W(e.rotate)||W(e.perspective)||!M()&&(W(e.backdropFilter)||W(e.filter))||F.test(e.willChange||"")||D.test(e.contain||"")}function M(){return null==O&&(O="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),O}function P(t){return/^(html|body|#document)$/.test(w(t))}function z(t){return x(t).getComputedStyle(t)}function B(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if("html"===w(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||v(t);return T(e)?e.host:e}function A(t){const e=V(t);return P(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&C(e)?e:A(e)}function N(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=A(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),c=x(i);if(r){const t=$(c);return e.concat(c,c.visualViewport||[],C(i)?i:[],t&&n?N(t):[])}return e.concat(i,N(i,[],n))}function $(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function k(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=R(t),r=i?t.offsetWidth:n,c=i?t.offsetHeight:o,l=p(n)!==r||p(o)!==c;return l&&(n=r,o=c),{width:n,height:o,$:l}}function I(t){return L(t)?t:t.contextElement}function q(t){const e=I(t);if(!R(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=k(e);let c=(r?p(n.width):n.width)/o,l=(r?p(n.height):n.height)/i;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const X=m(0);function Y(t){const e=x(t);return M()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:X}function _(e,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),c=I(e);let l=m(1);n&&(i?L(i)&&(l=q(i)):l=q(e));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==x(t))&&e}(c,o,i)?Y(c):m(0);let f=(r.left+s.x)/l.x,u=(r.top+s.y)/l.y,a=r.width/l.x,h=r.height/l.y;if(c){const t=x(c),e=i&&L(i)?x(i):i;let n=t,o=$(n);for(;o&&i&&e!==n;){const t=q(o),e=o.getBoundingClientRect(),i=z(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x,u*=t.y,a*=t.x,h*=t.y,f+=r,u+=c,n=x(o),o=$(n)}}return t({width:a,height:h,x:f,y:u})}function j(t,e){const n=B(t).scrollLeft;return e?e.left+n:_(v(t)).left+n}function G(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-j(t,n),y:n.top+e.scrollTop}}function J(e,n,o){let i;if("viewport"===n)i=function(t,e){const n=x(t),o=v(t),i=n.visualViewport;let r=o.clientWidth,c=o.clientHeight,l=0,s=0;if(i){r=i.width,c=i.height;const t=M();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,s=i.offsetTop)}const f=j(o);if(f<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(o.clientWidth-e.clientWidth-i);c<=25&&(r-=c)}else f<=25&&(r+=f);return{width:r,height:c,x:l,y:s}}(e,o);else if("document"===n)i=function(t){const e=v(t),n=B(t),o=t.ownerDocument.body,i=d(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=d(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+j(t);const l=-n.scrollTop;return"rtl"===z(o).direction&&(c+=d(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:c,y:l}}(v(e));else if(L(n))i=function(t,e){const n=_(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=R(t)?q(t):m(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,o);else{const t=Y(e);i={x:n.x-t.x,y:n.y-t.y,width:n.Line truncated
@@ -0,0 +1,33 @@
/**
* Program is a reimplementation of the `qss` package:
* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License
* https://github.com/lukeed/qss/blob/master/license.md
*
* This reimplementation uses modern browser APIs
* (namely URLSearchParams) and TypeScript while still
* maintaining the original functionality and interface.
*
* Update: this implementation has also been mangled to
* fit exactly our use-case (single value per key in encoding).
*/
/**
* Encodes an object into a query string.
* @param obj - The object to encode into a query string.
* @param stringify - An optional custom stringify function.
* @returns The encoded query string.
* @example
* ```
* // Example input: encode({ token: 'foo', key: 'value' })
* // Expected output: "token=foo&key=value"
* ```
*/
export declare function encode(obj: Record<string, any>, stringify?: (value: any) => string): string;
/**
* Decodes a query string into an object.
* @param str - The query string to decode.
* @returns The decoded key-value pairs in an object format.
* @example
* // Example input: decode("token=foo&key=value")
* // Expected output: { "token": "foo", "key": "value" }
*/
export declare function decode(str: any): any;
@@ -0,0 +1 @@
{"version":3,"file":"routerContext.js","names":[],"sources":["../../src/routerContext.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport type { AnyRouter } from '@tanstack/router-core'\n\nexport const routerContext = React.createContext<AnyRouter>(null!)\n"],"mappings":";;;AAKA,IAAa,gBAAgB,QAAM,cAAyB,KAAM"}
@@ -0,0 +1,191 @@
export declare const _resetIOSDetectionForTests: () => void;
export { approxEqual, debounce, memo, notUndefined } from './utils.js';
export type { NoInfer, PartialKeys } from './utils.js';
type ScrollDirection = 'forward' | 'backward';
type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';
type ScrollBehavior = 'auto' | 'smooth' | 'instant';
type ScrollAnchor = 'start' | 'end';
type FollowOnAppend = boolean | ScrollBehavior;
export interface ScrollToOptions {
align?: ScrollAlignment;
behavior?: ScrollBehavior;
}
type ScrollToOffsetOptions = ScrollToOptions;
type ScrollToIndexOptions = ScrollToOptions;
type ScrollToEndOptions = Pick<ScrollToOptions, 'behavior'>;
export interface Range {
startIndex: number;
endIndex: number;
overscan: number;
count: number;
}
type Key = number | string | bigint;
export interface VirtualItem {
key: Key;
index: number;
start: number;
end: number;
size: number;
lane: number;
}
export interface Rect {
width: number;
height: number;
}
export declare const defaultKeyExtractor: (index: number) => number;
export declare const defaultRangeExtractor: (range: Range) => number[];
export declare const observeElementRect: <T extends Element>(instance: Virtualizer<T, any>, cb: (rect: Rect) => void) => (() => void) | undefined;
export declare const observeWindowRect: (instance: Virtualizer<Window, any>, cb: (rect: Rect) => void) => (() => void) | undefined;
type ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void;
export declare const observeElementOffset: <T extends Element>(instance: Virtualizer<T, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const observeWindowOffset: (instance: Virtualizer<Window, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const measureElement: <TItemElement extends Element>(element: TItemElement, entry: ResizeObserverEntry | undefined, instance: Virtualizer<any, TItemElement>) => number;
export declare const windowScroll: <T extends Window>(offset: number, options: {
adjustments?: number;
behavior?: ScrollBehavior;
}, instance: Virtualizer<T, any>) => void;
export declare const elementScroll: <T extends Element>(offset: number, options: {
adjustments?: number;
behavior?: ScrollBehavior;
}, instance: Virtualizer<T, any>) => void;
type LaneAssignmentMode = 'estimate' | 'measured';
export interface VirtualizerOptions<TScrollElement extends Element | Window, TItemElement extends Element> {
count: number;
getScrollElement: () => TScrollElement | null;
estimateSize: (index: number) => number;
scrollToFn: (offset: number, options: {
adjustments?: number;
behavior?: ScrollBehavior;
}, instance: Virtualizer<TScrollElement, TItemElement>) => void;
observeElementRect: (instance: Virtualizer<TScrollElement, TItemElement>, cb: (rect: Rect) => void) => void | (() => void);
observeElementOffset: (instance: Virtualizer<TScrollElement, TItemElement>, cb: ObserveOffsetCallBack) => void | (() => void);
debug?: boolean;
initialRect?: Rect;
onChange?: (instance: Virtualizer<TScrollElement, TItemElement>, sync: boolean) => void;
measureElement?: (element: TItemElement, entry: ResizeObserverEntry | undefined, instance: Virtualizer<TScrollElement, TItemElement>) => number;
overscan?: number;
horizontal?: boolean;
paddingStart?: number;
paddingEnd?: number;
scrollPaddingStart?: number;
scrollPaddingEnd?: number;
initialOffset?: number | (() => number);
getItemKey?: (index: number) => Key;
rangeExtractor?: (range: Range) => Array<number>;
scrollMargin?: number;
gap?: number;
indexAttribute?: string;
initialMeasurementsCache?: Array<VirtualItem>;
lanes?: number;
anchorTo?: ScrollAnchor;
followOnAppend?: FollowOnAppend;
scrollEndThreshold?: number;
isScrollingResetDelay?: number;
useScrollendEvent?: boolean;
enabled?: boolean;
isRtl?: boolean;
useAnimationFrameWithResizeObserver?: boolean;
laneAssignmentMode?: LaneAssignmentMode;
useCachedMeasurements?: boolean;
}
export declare class Virtualizer<TScrollElement extends Element | Window, TItemElement extends Element> {
private unsubs;
options: Required<VirtualizerOptions<TScrollElement, TItemElement>>;
scrollElement: TScrollElement | null;
targetWindow: (Window & typeof globalThis) | null;
isScrolling: boolean;
private scrollState;
measurementsCache: Array<VirtualItem>;
private _flatMeasurements;
itemSizeCache: Map<Key, number>;
private itemSizeCacheVersion;
private laneAssignments;
private pendingMin;
private prevLanes;
private lanesChangedFlag;
private lanesSettling;
private pendingScrollAnchor;
scrollRect: Rect | null;
scrollOffset: number | null;
scrollDirection: ScrollDirection | null;
private scrollAdjustments;
private _iosDeferredAdjustment;
private _iosTouching;
private _iosJustTouchEnded;
private _iosTouchEndTimerId;
private _intendedScrollOffset;
shouldAdjustScrollPositionOnItemSizeChange: undefined | ((item: VirtualItem, delta: number, instance: Virtualizer<TScrollElement, TItemElement>) => boolean);
elementsCache: Map<Key, TItemElement>;
private now;
private observer;
range: {
startIndex: number;
endIndex: number;
} | null;
constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>);
setOptions: (opts: VirtualizerOptions<TScrollElement, TItemElement>) => void;
private notify;
private applyScrollAdjustment;
private maybeNotify;
private cleanup;
_didMount: () => () => void;
_willUpdate: () => void;
private _flushIosDeferredIfReady;
private rafId;
private scheduleScrollReconcile;
private reconcileScroll;
private getSize;
private getScrollOffset;
private getFurthestMeasurement;
private getMeasurementOptions;
private getMeasurements;
calculateRange: {
(): {
startIndex: number;
endIndex: number;
} | null;
updateDeps(newDeps: [VirtualItem[], number, number, number]): void;
};
getVirtualIndexes: {
(): number[];
updateDeps(newDeps: [(range: Range) => Array<number>, number, number, number | null, number | null]): void;
};
indexFromElement: (node: TItemElement) => number;
/**
* Determines if an item at the given index should be measured during smooth scroll.
* During smooth scroll, only items within a buffer range around the target are measured
* to prevent items far from the target from pushing it away.
*/
private shouldMeasureDuringScroll;
measureElement: (node: TItemElement | null) => void;
resizeItem: (index: number, size: number) => void;
getVirtualItems: {
(): VirtualItem[];
updateDeps(newDeps: [number[], VirtualItem[]]): void;
};
getVirtualItemForOffset: (offset: number) => VirtualItem | undefined;
private getMaxScrollOffset;
private getVirtualDistanceFromEnd;
getDistanceFromEnd: () => number;
isAtEnd: (threshold?: number) => boolean;
getOffsetForAlignment: (toOffset: number, align: ScrollAlignment, itemSize?: number) => number;
getOffsetForIndex: (index: number, align?: ScrollAlignment) => readonly [number, "auto"] | readonly [number, "start" | "center" | "end"] | undefined;
scrollToOffset: (toOffset: number, { align, behavior }?: ScrollToOffsetOptions) => void;
scrollToIndex: (index: number, { align: initialAlign, behavior, }?: ScrollToIndexOptions) => void;
scrollBy: (delta: number, { behavior }?: ScrollToOffsetOptions) => void;
scrollToEnd: ({ behavior }?: ScrollToEndOptions) => void;
getTotalSize: () => number;
/**
* Returns a snapshot of currently-measured items suitable for round-
* tripping through state storage (sessionStorage, history, etc.) and
* passing back as `initialMeasurementsCache` on remount. Pair with the
* current `scrollOffset` to restore exact scroll position after navigation.
*
* Only items the consumer has actually rendered (and thus measured) appear
* in the snapshot; unmeasured items will fall back to `estimateSize` on
* restore. Returns an empty array if no items have been measured.
*/
takeSnapshot: () => Array<VirtualItem>;
private _scrollToOffset;
measure: () => void;
}
@@ -0,0 +1,11 @@
# Security
Please file a private vulnerability report via GitHub, email [@ljharb](https://github.com/ljharb), or see https://tidelift.com/security if you have a potential security vulnerability to report.
## Incident Response Plan
Please see our [Incident Response Plan](https://github.com/ljharb/.github/blob/main/INCIDENT_RESPONSE_PLAN.md).
## Threat Model
Please see [THREAT_MODEL.md](./THREAT_MODEL.md).
@@ -0,0 +1 @@
{"version":3,"file":"mergeUserInputDictionary.cjs","sources":["../../src/utils/mergeUserInputDictionary.ts"],"sourcesContent":[null],"names":["optionsRankedDictionaries","optionsRankedDictionariesMaxWordSize","userInputsOptions","rankedDictionaries","rankedDictionariesMaxWordSize","userInputs","rankedDictionary","Math","max","rankedDictionaryMaxWordSize"],"mappings":";;AAEA,+BAAe,CACbA,yBAA6C,EAC7CC,oCAA4D,EAC5DC,iBAAqC,KACnC;EACF,IAAI,CAACA,iBAAiB,EAAE;IACtB,OAAO;AACLC,MAAAA,kBAAkB,EAAEH,yBAAyB;AAC7CI,MAAAA,6BAA6B,EAAEH;KAChC;AACH,EAAA;AACA,EAAA,MAAME,kBAAkB,GAAG;IACzB,GAAGH;GACJ;AACD,EAAA,MAAMI,6BAA6B,GAAG;IACpC,GAAGH;GACJ;EAEDE,kBAAkB,CAACE,UAAU,GAAG;AAC9B,IAAA,IAAIF,kBAAkB,CAACE,UAAU,IAAI,EAAE,CAAC;AACxC,IAAA,GAAGH,iBAAiB,CAACI;GACtB;AAEDF,EAAAA,6BAA6B,CAACC,UAAU,GAAGE,IAAI,CAACC,GAAG,CACjDN,iBAAiB,CAACO,2BAA2B,EAC7CL,6BAA6B,CAACC,UAAU,IAAI,CAAC,CAC9C;EAED,OAAO;IACLF,kBAAkB;AAClBC,IAAAA;GACD;AACH,CAAC;;;;"}
@@ -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 Ungroup = createLucideIcon("Ungroup", [
["rect", { width: "8", height: "6", x: "5", y: "4", rx: "1", key: "nzclkv" }],
["rect", { width: "8", height: "6", x: "11", y: "14", rx: "1", key: "4tytwb" }]
]);
export { Ungroup as default };
//# sourceMappingURL=ungroup.js.map
@@ -0,0 +1 @@
{"version":3,"file":"lru-cache.js","names":[],"sources":["../../src/lru-cache.ts"],"sourcesContent":["export type LRUCache<TKey, TValue> = {\n get: (key: TKey) => TValue | undefined\n set: (key: TKey, value: TValue) => void\n clear: () => void\n}\n\nexport function createLRUCache<TKey, TValue>(\n max: number,\n): LRUCache<TKey, TValue> {\n type Node = { prev?: Node; next?: Node; key: TKey; value: TValue }\n const cache = new Map<TKey, Node>()\n let oldest: Node | undefined\n let newest: Node | undefined\n\n const touch = (entry: Node) => {\n if (!entry.next) return\n if (!entry.prev) {\n entry.next.prev = undefined\n oldest = entry.next\n entry.next = undefined\n if (newest) {\n entry.prev = newest\n newest.next = entry\n }\n } else {\n entry.prev.next = entry.next\n entry.next.prev = entry.prev\n entry.next = undefined\n if (newest) {\n newest.next = entry\n entry.prev = newest\n }\n }\n newest = entry\n }\n\n return {\n get(key) {\n const entry = cache.get(key)\n if (!entry) return undefined\n touch(entry)\n return entry.value\n },\n set(key, value) {\n if (cache.size >= max && oldest) {\n const toDelete = oldest\n cache.delete(toDelete.key)\n if (toDelete.next) {\n oldest = toDelete.next\n toDelete.next.prev = undefined\n }\n if (toDelete === newest) {\n newest = undefined\n }\n }\n const existing = cache.get(key)\n if (existing) {\n existing.value = value\n touch(existing)\n } else {\n const entry: Node = { key, value, prev: newest }\n if (newest) newest.next = entry\n newest = entry\n if (!oldest) oldest = entry\n cache.set(key, entry)\n }\n },\n clear() {\n cache.clear()\n oldest = undefined\n newest = undefined\n },\n }\n}\n"],"mappings":";AAMA,SAAgB,eACd,KACwB;CAExB,MAAM,wBAAQ,IAAI,KAAiB;CACnC,IAAI;CACJ,IAAI;CAEJ,MAAM,SAAS,UAAgB;AAC7B,MAAI,CAAC,MAAM,KAAM;AACjB,MAAI,CAAC,MAAM,MAAM;AACf,SAAM,KAAK,OAAO,KAAA;AAClB,YAAS,MAAM;AACf,SAAM,OAAO,KAAA;AACb,OAAI,QAAQ;AACV,UAAM,OAAO;AACb,WAAO,OAAO;;SAEX;AACL,SAAM,KAAK,OAAO,MAAM;AACxB,SAAM,KAAK,OAAO,MAAM;AACxB,SAAM,OAAO,KAAA;AACb,OAAI,QAAQ;AACV,WAAO,OAAO;AACd,UAAM,OAAO;;;AAGjB,WAAS;;AAGX,QAAO;EACL,IAAI,KAAK;GACP,MAAM,QAAQ,MAAM,IAAI,IAAI;AAC5B,OAAI,CAAC,MAAO,QAAO,KAAA;AACnB,SAAM,MAAM;AACZ,UAAO,MAAM;;EAEf,IAAI,KAAK,OAAO;AACd,OAAI,MAAM,QAAQ,OAAO,QAAQ;IAC/B,MAAM,WAAW;AACjB,UAAM,OAAO,SAAS,IAAI;AAC1B,QAAI,SAAS,MAAM;AACjB,cAAS,SAAS;AAClB,cAAS,KAAK,OAAO,KAAA;;AAEvB,QAAI,aAAa,OACf,UAAS,KAAA;;GAGb,MAAM,WAAW,MAAM,IAAI,IAAI;AAC/B,OAAI,UAAU;AACZ,aAAS,QAAQ;AACjB,UAAM,SAAS;UACV;IACL,MAAM,QAAc;KAAE;KAAK;KAAO,MAAM;KAAQ;AAChD,QAAI,OAAQ,QAAO,OAAO;AAC1B,aAAS;AACT,QAAI,CAAC,OAAQ,UAAS;AACtB,UAAM,IAAI,KAAK,MAAM;;;EAGzB,QAAQ;AACN,SAAM,OAAO;AACb,YAAS,KAAA;AACT,YAAS,KAAA;;EAEZ"}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = buildMatchMemberExpression;
var _matchesPattern = require("./matchesPattern.js");
function buildMatchMemberExpression(match, allowPartial) {
const parts = match.split(".");
return member => (0, _matchesPattern.default)(member, parts, allowPartial);
}
//# sourceMappingURL=buildMatchMemberExpression.js.map
@@ -0,0 +1,24 @@
import { MatcherBaseClass, DateMatch, MatchOptions } from '../../types';
type DateMatchOptions = Pick<MatchOptions, 'password'>;
declare class MatchDate extends MatcherBaseClass {
match({ password }: DateMatchOptions): import("../..").MatchExtended[];
getMatchesWithSeparator(password: string): DateMatch[];
getMatchesWithoutSeparator(password: string): DateMatch[];
filterNoise(matches: DateMatch[]): DateMatch[];
mapIntegersToDayMonthYear(integers: number[]): {
year: number;
month: number;
day: number;
} | null;
getDayMonth(integers: number[]): {
year: number;
month: number;
day: number;
} | null;
mapIntegersToDayMonth(integers: number[]): {
day: number;
month: number;
} | null;
twoToFourDigitYear(year: number): number;
}
export default MatchDate;
@@ -0,0 +1,54 @@
type browserType = typeof import("./resolve-targets-browser");
type nodeType = typeof import("./resolve-targets");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
({}) as any as browserType as nodeType;
import type { InputOptions } from "./validation/options.ts";
import path from "node:path";
import getTargets, {
type InputTargets,
} from "@babel/helper-compilation-targets";
import type { Targets } from "@babel/helper-compilation-targets";
export function resolveBrowserslistConfigFile(
browserslistConfigFile: string,
configFileDir: string,
): string | undefined {
return path.resolve(configFileDir, browserslistConfigFile);
}
export function resolveTargets(options: InputOptions, root: string): Targets {
const optTargets = options.targets;
let targets: InputTargets;
if (typeof optTargets === "string" || Array.isArray(optTargets)) {
targets = { browsers: optTargets };
} else if (optTargets) {
if ("esmodules" in optTargets) {
targets = { ...optTargets, esmodules: "intersect" };
} else {
// https://github.com/microsoft/TypeScript/issues/17002
targets = optTargets as InputTargets;
}
}
const { browserslistConfigFile } = options;
let configFile;
let ignoreBrowserslistConfig = false;
if (typeof browserslistConfigFile === "string") {
configFile = browserslistConfigFile;
} else {
ignoreBrowserslistConfig = browserslistConfigFile === false;
}
return getTargets(targets, {
ignoreBrowserslistConfig,
configFile,
configPath: root,
browserslistEnv: options.browserslistEnv,
});
}
@@ -0,0 +1,2 @@
import type { TSESTree } from '@typescript-eslint/utils';
export declare function skipChainExpression<T extends TSESTree.Node>(node: T): T | TSESTree.ChainElement;
@@ -0,0 +1,64 @@
# yocto-queue [![](https://badgen.net/bundlephobia/minzip/yocto-queue)](https://bundlephobia.com/result?p=yocto-queue)
> Tiny queue data structure
You should use this package instead of an array if you do a lot of `Array#push()` and `Array#shift()` on large arrays, since `Array#shift()` has [linear time complexity](https://medium.com/@ariel.salem1989/an-easy-to-use-guide-to-big-o-time-complexity-5dcf4be8a444#:~:text=O(N)%E2%80%94Linear%20Time) *O(n)* while `Queue#dequeue()` has [constant time complexity](https://medium.com/@ariel.salem1989/an-easy-to-use-guide-to-big-o-time-complexity-5dcf4be8a444#:~:text=O(1)%20%E2%80%94%20Constant%20Time) *O(1)*. That makes a huge difference for large arrays.
> A [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) is an ordered list of elements where an element is inserted at the end of the queue and is removed from the front of the queue. A queue works based on the first-in, first-out ([FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics))) principle.
## Install
```
$ npm install yocto-queue
```
## Usage
```js
const Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('🦄');
queue.enqueue('🌈');
console.log(queue.size);
//=> 2
console.log(...queue);
//=> '🦄 🌈'
console.log(queue.dequeue());
//=> '🦄'
console.log(queue.dequeue());
//=> '🌈'
```
## API
### `queue = new Queue()`
The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow.
#### `.enqueue(value)`
Add a value to the queue.
#### `.dequeue()`
Remove the next value in the queue.
Returns the removed value or `undefined` if the queue is empty.
#### `.clear()`
Clear the queue.
#### `.size`
The size of the queue.
## Related
- [quick-lru](https://github.com/sindresorhus/quick-lru) - Simple “Least Recently Used” (LRU) cache
@@ -0,0 +1 @@
module.exports={C:{"112":0.00557,"115":0.03898,"119":0.00557,"120":0.7184,"121":1.41453,"123":0.05012,"124":0.00557,"125":0.00557,"128":0.00557,"132":0.00557,"133":0.00557,"134":0.01114,"135":0.00557,"136":0.00557,"140":0.01671,"147":0.01114,"149":0.01114,"150":0.02785,"151":0.01114,"152":0.02785,"153":0.02785,"154":0.26731,"155":0.3954,"156":0.42324,"157":0.01114,_:"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 71 72 73 74 75 76 77 78 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 113 114 116 117 118 122 126 127 129 130 131 137 138 139 141 142 143 144 145 146 148 158 159 160 3.5","3.6":0.00557},D:{"49":0.00557,"51":0.02228,"63":0.00557,"64":0.00557,"70":0.00557,"86":0.00557,"88":0.00557,"92":0.01114,"96":0.00557,"97":0.01114,"98":0.00557,"103":0.51235,"104":0.50121,"105":0.50121,"106":0.51792,"107":0.51792,"108":0.50678,"109":2.12736,"110":0.52349,"111":0.50678,"112":0.51235,"116":1.03027,"117":0.51235,"118":1.21404,"119":1.46465,"120":2.06053,"121":0.02785,"122":0.10024,"123":0.03341,"124":0.51235,"125":0.01114,"126":0.01114,"127":0.01114,"128":0.01671,"129":0.01671,"130":0.01114,"131":0.91889,"132":0.01671,"133":1.06368,"134":0.22833,"135":0.18935,"136":0.17821,"137":0.20605,"138":0.34528,"139":0.20605,"140":0.21162,"141":0.21162,"142":0.65157,"143":0.03341,"144":0.34528,"145":0.06683,"146":0.18378,"147":0.02785,"148":0.18935,"149":0.4845,"150":0.35642,"151":5.03995,"152":7.7242,"153":7.31767,"154":2.17191,"155":0.03341,_:"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 50 52 53 54 55 56 57 58 59 60 61 62 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 83 84 85 87 89 90 91 93 94 95 99 100 101 102 113 114 115 156 157"},F:{"52":0.00557,"53":0.00557,"54":0.00557,"55":0.00557,"56":0.00557,"57":0.00557,"70":0.00557,"80":0.00557,"84":0.00557,"88":0.00557,"90":0.00557,"95":0.0724,"99":0.00557,"101":0.01114,"102":0.01114,"105":0.00557,"106":0.01671,"107":0.00557,"120":0.00557,"131":0.00557,"133":0.00557,"134":0.08354,"135":1.31428,_:"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 58 60 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 81 82 83 85 86 87 89 91 92 93 94 96 97 98 100 103 104 108 109 110 111 112 113 114 115 116 117 118 119 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00557,"109":0.00557,"119":0.71283,"120":0.70726,"122":0.00557,"125":0.00557,"132":0.00557,"135":0.00557,"144":0.01114,"147":0.00557,"148":0.00557,"150":0.02228,"151":0.03898,"152":0.7184,"153":0.71283,"154":0.2339,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 126 127 128 129 130 131 133 134 136 137 138 139 140 141 142 143 145 146 149"},E:{"4":0.00557,"5":0.00557,"27":0.08354,_:"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 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.3 16.4 17.0 17.2 17.3 18.2 18.4 27.1 27.2 TP","15.6":0.01114,"16.2":0.00557,"16.5":0.00557,"16.6":0.02228,"17.1":0.00557,"17.4":0.02228,"17.5":0.01114,"17.6":0.02228,"18.0":0.00557,"18.1":0.00557,"18.3":0.00557,"18.5-18.7":0.32857,"26.0":0.00557,"26.1":0.01671,"26.2":0.01671,"26.3":0.03898,"26.4":0.02785,"26.5":0.22276,"26.6":0.49564},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00102,"5.0-5.1":0.00102,"6.0-6.1":0,"7.0-7.1":0.00204,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01022,"11.0-11.2":0.00102,"11.3-11.4":0.00204,"12.0-12.1":0,"12.2-12.5":0.02657,"13.0-13.1":0,"13.2":0.00511,"13.3":0,"13.4-13.7":0.00102,"14.0-14.4":0.00409,"14.5-14.8":0.00613,"15.0-15.1":0.00613,"15.2-15.3":0.00409,"15.4":0.00511,"15.5":0.00613,"15.6-15.8":0.13283,"16.0":0.01022,"16.1":0.01839,"16.2":0.01022,"16.3":0.02248,"16.4":0.00511,"16.5":0.00817,"16.6-16.7":0.18494,"17.0":0.00715,"17.1":0.01022,"17.2":0.01022,"17.3":0.01533,"17.4":0.02146,"17.5":0.04189,"17.6-17.7":0.10831,"18.0":0.02248,"18.1":0.04496,"18.2":0.06131,"18.3":0.10627,"18.4":0.06642,"18.5-18.7":1.37226,"26.0":0.06642,"26.1":0.06744,"26.2":0.17575,"26.3":0.19005,"26.4":0.13896,"26.5":0.93085,"26.6":5.74347,"27.0":0.44039,"27.1":0,"27.2":0.01124},P:{"22":0.00959,"23":0.00959,"24":0.00959,"25":0.00959,"26":0.01919,"27":0.03837,"28":0.07674,"29":0.16308,"30":1.4869,_:"4 20 21 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0 19.0","7.2-7.4":0.02878,"17.0":0.00959},I:{"0":0.00443,"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.58932,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.00557,"9":0.00557,_:"6 7 10 11 5.5"},S:{"2.5":0.00886,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":31.23065},R:{_:"0"},M:{"0":0.39436},Q:{"14.9":0.022Line truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_Z","1156":"_A"},B:{"1":"_K","1028":"_I"},C:{"1":"_CM","2":"_g","1028":"_x _YH","1284":"_A","1412":"_RC","1924":"_OU"},D:{"1":"_zL","16":"_wB","1028":"_9O","1156":"_rB","1412":"_dT _qK"},E:{"1":"_PC","2":"_k","1028":"_LC _lR","1156":"D OD","1412":"mB _iG"},F:{"1":"_pO","2":"_0D","132":"_gF","1028":"C _GL _dJ aC"},G:{"1":"_AB","2":"_d","1028":"_lC _JD","1156":"gD","1412":"_xC"},H:{"2":"1D"},I:{"1":"I","2":"_n","1028":"7D","1412":"6D","1924":"_GF"},J:{"1156":"A","1412":"D"},K:{"1":"H","2":"_gB","1028":"_DL"},L:{"1":"I"},M:{"1":"YC"},N:{"1156":"_A"},O:{"1":"bC"},P:{"1":"_U","1028":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"XMLHttpRequest advanced features",D:true};
@@ -0,0 +1,52 @@
import * as core from "./core.cjs";
import * as errors from "./errors.cjs";
import type * as schemas from "./schemas.cjs";
import * as util from "./util.cjs";
export type $ZodErrorClass = {
new (issues: errors.$ZodIssue[]): errors.$ZodError;
};
type $ParseParams = {
callee?: util.AnyFunc;
Err?: $ZodErrorClass | undefined;
};
export type $Parse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.output<T>;
export declare const _parse: (_Err: $ZodErrorClass) => $Parse;
export declare const parse: $Parse;
export type $ParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.output<T>>;
export declare const _parseAsync: (_Err: $ZodErrorClass) => $ParseAsync;
export declare const parseAsync: $ParseAsync;
export type $SafeParse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.output<T>>;
export declare const _safeParse: (_Err: $ZodErrorClass) => $SafeParse;
export declare const safeParse: $SafeParse;
export type $SafeParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.output<T>>>;
export declare const _safeParseAsync: (_Err: $ZodErrorClass) => $SafeParseAsync;
export declare const safeParseAsync: $SafeParseAsync;
export type $Validate = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => value is core.input<T>;
export declare const validate: $Validate;
export type $ValidateAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<boolean>;
export declare const validateAsync: $ValidateAsync;
export type $Encode = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.input<T>;
export declare const _encode: (_Err: $ZodErrorClass) => $Encode;
export declare const encode: $Encode;
export type $Decode = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.output<T>;
export declare const _decode: (_Err: $ZodErrorClass) => $Decode;
export declare const decode: $Decode;
export type $EncodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.input<T>>;
export declare const _encodeAsync: (_Err: $ZodErrorClass) => $EncodeAsync;
export declare const encodeAsync: $EncodeAsync;
export type $DecodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.output<T>>;
export declare const _decodeAsync: (_Err: $ZodErrorClass) => $DecodeAsync;
export declare const decodeAsync: $DecodeAsync;
export type $SafeEncode = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.input<T>>;
export declare const _safeEncode: (_Err: $ZodErrorClass) => $SafeEncode;
export declare const safeEncode: $SafeEncode;
export type $SafeDecode = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.output<T>>;
export declare const _safeDecode: (_Err: $ZodErrorClass) => $SafeDecode;
export declare const safeDecode: $SafeDecode;
export type $SafeEncodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.input<T>>>;
export declare const _safeEncodeAsync: (_Err: $ZodErrorClass) => $SafeEncodeAsync;
export declare const safeEncodeAsync: $SafeEncodeAsync;
export type $SafeDecodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.output<T>>>;
export declare const _safeDecodeAsync: (_Err: $ZodErrorClass) => $SafeDecodeAsync;
export declare const safeDecodeAsync: $SafeDecodeAsync;
export {};
@@ -0,0 +1 @@
module.exports={C:{"48":0.00465,"78":0.00465,"115":0.10219,"121":0.00465,"140":0.03252,"141":0.00465,"146":0.01858,"147":0.00465,"148":0.00465,"149":0.00465,"150":0.00465,"151":0.00929,"152":0.02323,"153":0.07897,"154":0.16722,"155":0.4227,"156":0.49702,"157":0.01394,_:"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 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 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 120 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 142 143 144 145 158 159 160 3.5 3.6"},D:{"49":0.00465,"103":0.01394,"104":0.00465,"105":0.00465,"106":0.00465,"107":0.00465,"108":0.00465,"109":0.06968,"110":0.00465,"111":0.00929,"112":0.00465,"114":0.00465,"116":0.04181,"117":0.00465,"118":0.00929,"119":0.00465,"120":0.01858,"121":0.00929,"122":0.01858,"123":0.00465,"124":0.00929,"125":0.00465,"126":0.02323,"128":0.03252,"130":0.01858,"131":0.03716,"132":0.00465,"133":0.05574,"134":0.04645,"135":0.02787,"136":0.03252,"137":0.04181,"138":0.1858,"139":0.03252,"140":0.85468,"141":0.09755,"142":0.0929,"143":0.02323,"144":0.58992,"145":0.06503,"146":0.21832,"147":0.06039,"148":0.17651,"149":0.11148,"150":0.36231,"151":1.62575,"152":5.6251,"153":7.36233,"154":1.63969,"155":0.02323,_:"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 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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 113 115 127 129 156 157"},F:{"69":0.00465,"73":0.00929,"79":0.05574,"82":0.00929,"83":0.00929,"84":0.00929,"85":0.04181,"86":0.02323,"87":0.00465,"89":0.02323,"90":0.00465,"95":0.96152,"97":0.00465,"98":0.00465,"99":0.00465,"100":0.06503,"101":0.34373,"102":0.06968,"106":0.00465,"112":0.00465,"113":0.00465,"114":0.01858,"119":0.01394,"131":0.00929,"133":0.06039,"134":0.71533,"135":6.11747,_:"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 70 71 72 74 75 76 77 78 80 81 88 91 92 93 94 96 103 104 105 107 108 109 110 111 115 116 117 118 120 121 122 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00465,"109":0.01858,"115":0.00465,"119":0.00465,"120":0.00465,"122":0.00465,"136":0.00465,"140":0.00929,"141":0.00465,"142":0.00465,"143":0.00465,"144":0.00465,"145":0.00929,"146":0.01858,"147":0.01394,"148":0.01394,"149":0.02323,"150":0.05574,"151":0.35302,"152":2.48043,"153":3.85071,"154":0.85468,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 116 117 118 121 123 124 125 126 127 128 129 130 131 132 133 134 135 137 138 139"},E:{"27":0.30193,_:"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 12.1 15.2-15.3 16.0 17.0 27.1 TP","13.1":0.01858,"14.1":0.00929,"15.1":0.00465,"15.4":0.00465,"15.5":0.00465,"15.6":0.13006,"16.1":0.00465,"16.2":0.01858,"16.3":0.01394,"16.4":0.00929,"16.5":0.00929,"16.6":0.20903,"17.1":0.2369,"17.2":0.01858,"17.3":0.01394,"17.4":0.02787,"17.5":0.08826,"17.6":0.15793,"18.0":0.01394,"18.1":0.03716,"18.2":0.00929,"18.3":0.05574,"18.4":0.00929,"18.5-18.7":0.06503,"26.0":0.02787,"26.1":0.02323,"26.2":0.11148,"26.3":0.13471,"26.4":0.08361,"26.5":0.55276,"26.6":2.68481,"27.2":0.00465},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00282,"5.0-5.1":0.00282,"6.0-6.1":0,"7.0-7.1":0.00564,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02818,"11.0-11.2":0.00282,"11.3-11.4":0.00564,"12.0-12.1":0,"12.2-12.5":0.07326,"13.0-13.1":0,"13.2":0.01409,"13.3":0,"13.4-13.7":0.00282,"14.0-14.4":0.01127,"14.5-14.8":0.01691,"15.0-15.1":0.01691,"15.2-15.3":0.01127,"15.4":0.01409,"15.5":0.01691,"15.6-15.8":0.36631,"16.0":0.02818,"16.1":0.05072,"16.2":0.02818,"16.3":0.06199,"16.4":0.01409,"16.5":0.02254,"16.6-16.7":0.51002,"17.0":0.01972,"17.1":0.02818,"17.2":0.02818,"17.3":0.04227,"17.4":0.05917,"17.5":0.11553,"17.6-17.7":0.29869,"18.0":0.06199,"18.1":0.12398,"18.2":0.16907,"18.3":0.29305,"18.4":0.18316,"18.5-18.7":3.78429,"26.0":0.18316,"26.1":0.18597,"26.2":0.48466,"26.3":0.52411,"26.4":0.38322,"26.5":2.56701,"26.6":15.83881,"27.0":1.21447,"27.1":0,"27.2":0.031},P:{"24":0.00953,"26":0.00953,"28":0.00953,"29":0.05716,"30":2.41016,_:"4 20 21 22 23 25 27 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 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.0107,"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":8.71957,_:"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":13.94626},R:{_:"0"},M:{"0":0.31065},Q:{_:"14.9"},O:{"0":0.00536},H:{all:0}};
@@ -0,0 +1,158 @@
'use strict'
const fs = require('graceful-fs').promises
const log = require('./log')
const path = require('path')
function parseConfigGypi (config) {
// translated from tools/js2c.py of Node.js
// 1. string comments
config = config.replace(/#.*/g, '')
// 2. join multiline strings
config = config.replace(/'$\s+'/mg, '')
// 3. normalize string literals from ' into "
config = config.replace(/'/g, '"')
return JSON.parse(config)
}
async function getBaseConfigGypi ({ gyp, nodeDir }) {
// try reading $nodeDir/include/node/config.gypi first when:
// 1. --dist-url or --nodedir is specified
// 2. and --force-process-config is not specified
const useCustomHeaders = gyp.opts.nodedir || gyp.opts.disturl || gyp.opts['dist-url']
const shouldReadConfigGypi = useCustomHeaders && !gyp.opts['force-process-config']
if (shouldReadConfigGypi && nodeDir) {
try {
const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi')
const baseConfigGypi = await fs.readFile(baseConfigGypiPath)
return parseConfigGypi(baseConfigGypi.toString())
} catch (err) {
log.warn('read config.gypi', err.message)
}
}
// fallback to process.config if it is invalid
return JSON.parse(JSON.stringify(process.config))
}
async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo, python }) {
const config = await getBaseConfigGypi({ gyp, nodeDir })
if (!config.target_defaults) {
config.target_defaults = {}
}
if (!config.variables) {
config.variables = {}
}
const defaults = config.target_defaults
const variables = config.variables
// don't inherit the "defaults" from the base config.gypi.
// doing so could cause problems in cases where the `node` executable was
// compiled on a different machine (with different lib/include paths) than
// the machine where the addon is being built to
defaults.cflags = []
defaults.defines = []
defaults.include_dirs = []
defaults.libraries = []
// set the default_configuration prop
if ('debug' in gyp.opts) {
defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release'
}
if (!defaults.default_configuration) {
defaults.default_configuration = 'Release'
}
// set the target_arch variable
variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
if (variables.target_arch === 'arm64') {
defaults.msvs_configuration_platform = 'ARM64'
defaults.xcode_configuration_platform = 'arm64'
}
// set the node development directory
variables.nodedir = nodeDir
// set the configured Python path
variables.python = python
// disable -T "thin" static archives by default
variables.standalone_static_library = gyp.opts.thin ? 0 : 1
if (process.platform === 'win32') {
defaults.msbuild_toolset = vsInfo.toolset
if (vsInfo.sdk) {
defaults.msvs_windows_target_platform_version = vsInfo.sdk
}
if (variables.target_arch === 'arm64') {
if (vsInfo.versionMajor > 15 ||
(vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) {
defaults.msvs_enable_marmasm = 1
} else {
log.warn('Compiling ARM64 assembly is only available in\n' +
'Visual Studio 2017 version 15.9 and above')
}
}
variables.msbuild_path = vsInfo.msBuild
if (config.variables.clang === 1) {
config.variables.clang = 0
}
// disable LTO for addon builds. node release builds may enable (thin) LTO,
// which leaks clang/lld-only flags like -flto=thin and /opt:lldltojobs into
// addons built with the default MSVC toolchain, which rejects those flags
variables.enable_lto = 'false'
variables.enable_thin_lto = 'false'
}
// loop through the rest of the opts and add the unknown ones as variables.
// this allows for module-specific configure flags like:
//
// $ node-gyp configure --shared-libxml2
Object.keys(gyp.opts).forEach(function (opt) {
if (opt === 'argv') {
return
}
if (opt in gyp.configDefs) {
return
}
variables[opt.replace(/-/g, '_')] = gyp.opts[opt]
})
return config
}
async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo, python }) {
const configFilename = 'config.gypi'
const configPath = path.resolve(buildDir, configFilename)
log.verbose('build/' + configFilename, 'creating config file')
const config = await getCurrentConfigGypi({ gyp, nodeDir, vsInfo, python })
// ensures that any boolean values in config.gypi get stringified
function boolsToString (k, v) {
if (typeof v === 'boolean') {
return String(v)
}
return v
}
log.silly('build/' + configFilename, config)
// now write out the config.gypi file to the build/ dir
const prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
const json = JSON.stringify(config, boolsToString, 2)
log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
await fs.writeFile(configPath, [prefix, json, ''].join('\n'))
return configPath
}
module.exports = {
createConfigGypi,
parseConfigGypi,
getCurrentConfigGypi
}
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './sparkles.js';
//# sourceMappingURL=stars.js.map
@@ -0,0 +1,189 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeManager = void 0;
const assert_1 = require("./assert");
const scope_1 = require("./scope");
const ClassFieldInitializerScope_1 = require("./scope/ClassFieldInitializerScope");
const ClassStaticBlockScope_1 = require("./scope/ClassStaticBlockScope");
/**
* @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface
*/
class ScopeManager {
#options;
currentScope;
declaredVariables;
/**
* The root scope
*/
globalScope;
nodeToScope;
/**
* All scopes
* @public
*/
scopes;
constructor(options) {
this.scopes = [];
this.globalScope = null;
this.nodeToScope = new WeakMap();
this.currentScope = null;
this.#options = options;
this.declaredVariables = new WeakMap();
}
isES6() {
return true;
}
isGlobalReturn() {
return this.#options.globalReturn === true;
}
isImpliedStrict() {
return this.#options.impliedStrict === true;
}
isModule() {
return this.#options.sourceType === 'module';
}
isStrictModeSupported() {
return true;
}
get variables() {
const variables = new Set();
function recurse(scope) {
scope.variables.forEach(v => variables.add(v));
scope.childScopes.forEach(recurse);
}
this.scopes.forEach(recurse);
return [...variables].sort((a, b) => a.$id - b.$id);
}
/**
* 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) {
return this.declaredVariables.get(node) ?? [];
}
/**
* 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, inner = false) {
function predicate(testScope) {
if (testScope.type === scope_1.ScopeType.function &&
testScope.functionExpressionScope) {
return false;
}
return true;
}
const scopes = this.nodeToScope.get(node);
if (!scopes || scopes.length === 0) {
return null;
}
// Heuristic selection from all scopes.
// If you would like to get all scopes, please use ScopeManager#acquireAll.
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
return null;
}
return scopes.find(predicate) ?? 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) {
this.globalScope?.addVariables(names);
}
nestBlockScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.BlockScope(this, this.currentScope, node));
}
nestCatchScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.CatchScope(this, this.currentScope, node));
}
nestClassFieldInitializerScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassFieldInitializerScope_1.ClassFieldInitializerScope(this, this.currentScope, node));
}
nestClassScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ClassScope(this, this.currentScope, node));
}
nestClassStaticBlockScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new ClassStaticBlockScope_1.ClassStaticBlockScope(this, this.currentScope, node));
}
nestConditionalTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ConditionalTypeScope(this, this.currentScope, node));
}
nestForScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ForScope(this, this.currentScope, node));
}
nestFunctionExpressionNameScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionExpressionNameScope(this, this.currentScope, node));
}
nestFunctionScope(node, isMethodDefinition) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionScope(this, this.currentScope, node, isMethodDefinition));
}
nestFunctionTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.FunctionTypeScope(this, this.currentScope, node));
}
nestGlobalScope(node) {
return this.nestScope(new scope_1.GlobalScope(this, node));
}
nestMappedTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.MappedTypeScope(this, this.currentScope, node));
}
nestModuleScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.ModuleScope(this, this.currentScope, node));
}
nestSwitchScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.SwitchScope(this, this.currentScope, node));
}
nestTSEnumScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSEnumScope(this, this.currentScope, node));
}
nestTSModuleScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TSModuleScope(this, this.currentScope, node));
}
nestTypeScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.TypeScope(this, this.currentScope, node));
}
nestWithScope(node) {
(0, assert_1.assert)(this.currentScope);
return this.nestScope(new scope_1.WithScope(this, this.currentScope, node));
}
nestScope(scope) {
if (scope instanceof scope_1.GlobalScope) {
(0, assert_1.assert)(this.currentScope == null);
this.globalScope = scope;
}
this.currentScope = scope;
return scope;
}
}
exports.ScopeManager = ScopeManager;
@@ -0,0 +1,106 @@
/**
* @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function
* @author James Allardice
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const {
CALL,
CONSTRUCT,
ReferenceTracker,
} = require("@eslint-community/eslint-utils");
const getPropertyName = require("./utils/ast-utils").getStaticPropertyName;
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const nonCallableGlobals = [
"Atomics",
"JSON",
"Math",
"Reflect",
"Intl",
"Temporal",
];
/**
* Returns the name of the node to report
* @param {ASTNode} node A node to report
* @returns {string} name to report
*/
function getReportNodeName(node) {
if (node.type === "ChainExpression") {
return getReportNodeName(node.expression);
}
if (node.type === "MemberExpression") {
return getPropertyName(node);
}
return node.name;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow calling global object properties as functions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-obj-calls",
},
schema: [],
messages: {
unexpectedCall: "'{{name}}' is not a function.",
unexpectedRefCall:
"'{{name}}' is reference to '{{ref}}', which is not a function.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
Program(node) {
const scope = sourceCode.getScope(node);
const tracker = new ReferenceTracker(scope);
const traceMap = {};
for (const g of nonCallableGlobals) {
traceMap[g] = {
[CALL]: true,
[CONSTRUCT]: true,
};
}
for (const {
node: refNode,
path,
} of tracker.iterateGlobalReferences(traceMap)) {
const name = getReportNodeName(refNode.callee);
const ref = path[0];
const messageId =
name === ref ? "unexpectedCall" : "unexpectedRefCall";
context.report({
node: refNode,
messageId,
data: { name, ref },
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"check-check.js","sources":["../../../src/icons/check-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CheckCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggNiA3IDE3bC01LTUiIC8+CiAgPHBhdGggZD0ibTIyIDEwLTcuNSA3LjVMMTMgMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/check-check\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 CheckCheck = createLucideIcon('CheckCheck', [\n ['path', { d: 'M18 6 7 17l-5-5', key: '116fxf' }],\n ['path', { d: 'm22 10-7.5 7.5L13 16', key: 'ke71qq' }],\n]);\n\nexport default CheckCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwB,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;AACvD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,457 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@floating-ui/dom'), require('react'), require('react-dom')) :
typeof define === 'function' && define.amd ? define(['exports', '@floating-ui/dom', 'react', 'react-dom'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FloatingUIReactDOM = {}, global.FloatingUIDOM, global.React, global.ReactDOM));
})(this, (function (exports, dom, React, ReactDOM) { 'use strict';
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
var isClient = typeof document !== 'undefined';
var noop = function noop() {};
var index = isClient ? React.useLayoutEffect : noop;
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
// functions
function deepEqual(a, b) {
if (a === b) {
return true;
}
if (typeof a !== typeof b) {
return false;
}
if (typeof a === 'function' && a.toString() === b.toString()) {
return true;
}
let length;
let i;
let keys;
if (a && b && typeof a === 'object') {
if (Array.isArray(a)) {
length = a.length;
if (length !== b.length) return false;
for (i = length; i-- !== 0;) {
if (!deepEqual(a[i], b[i])) {
return false;
}
}
return true;
}
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) {
return false;
}
for (i = length; i-- !== 0;) {
if (!{}.hasOwnProperty.call(b, keys[i])) {
return false;
}
}
for (i = length; i-- !== 0;) {
const key = keys[i];
if (key === '_owner' && a.$$typeof) {
continue;
}
if (!deepEqual(a[key], b[key])) {
return false;
}
}
return true;
}
return a !== a && b !== b;
}
function getDPR(element) {
if (typeof window === 'undefined') {
return 1;
}
const win = element.ownerDocument.defaultView || window;
return win.devicePixelRatio || 1;
}
function roundByDPR(element, value) {
const dpr = getDPR(element);
return Math.round(value * dpr) / dpr;
}
function useLatestRef(value) {
const ref = React__namespace.useRef(value);
index(() => {
ref.current = value;
});
return ref;
}
/**
* Provides data to position a floating element.
* @see https://floating-ui.com/docs/useFloating
*/
function useFloating(options) {
if (options === void 0) {
options = {};
}
const {
placement = 'bottom',
strategy = 'absolute',
middleware = [],
platform,
elements: {
reference: externalReference,
floating: externalFloating
} = {},
transform = true,
whileElementsMounted,
open
} = options;
const [data, setData] = React__namespace.useState({
x: 0,
y: 0,
strategy,
placement,
middlewareData: {},
isPositioned: false
});
const [latestMiddleware, setLatestMiddleware] = React__namespace.useState(middleware);
if (!deepEqual(latestMiddleware, middleware)) {
setLatestMiddleware(middleware);
}
const [_reference, _setReference] = React__namespace.useState(null);
const [_floating, _setFloating] = React__namespace.useState(null);
const setReference = React__namespace.useCallback(node => {
if (node !== referenceRef.current) {
referenceRef.current = node;
_setReference(node);
}
}, []);
const setFloating = React__namespace.useCallback(node => {
if (node !== floatingRef.current) {
floatingRef.current = node;
_setFloating(node);
}
}, []);
const referenceEl = externalReference || _reference;
const floatingEl = externalFloating || _floating;
const referenceRef = React__namespace.useRef(null);
const floatingRef = React__namespace.useRef(null);
const dataRef = React__namespace.useRef(data);
const hasWhileElementsMounted = whileElementsMounted != null;
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
const platformRef = useLatestRef(platform);
const openRef = useLatestRef(open);
const update = React__namespace.useCallback(() => {
if (!referenceRef.current || !floatingRef.current) {
return;
}
const config = {
placement,
strategy,
middleware: latestMiddleware
};
if (platformRef.current) {
config.platform = platformRef.current;
}
dom.computePosition(referenceRef.current, floatingRef.current, config).then(data => {
const fullData = {
...data,
// The floating element's position may be recomputed while it's closed
// but still mounted (such as when transitioning out). To ensure
// `isPositioned` will be `false` initially on the next open, avoid
// setting it to `true` when `open === false` (must be specified).
isPositioned: openRef.current !== false
};
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
dataRef.current = fullData;
ReactDOM__namespace.flushSync(() => {
setData(fullData);
});
}
});
}, [latestMiddleware, placement, strategy, platformRef, openRef]);
index(() => {
if (open === false && dataRef.current.isPositioned) {
dataRef.current.isPositioned = false;
setData(data => ({
...data,
isPositioned: false
}));
}
}, [open]);
const isMountedRef = React__namespace.useRef(false);
index(() => {
isMountedRef.current = true;
return () => {
isMountedRef.current = false;
};
}, []);
index(() => {
if (referenceEl) referenceRef.current = referenceEl;
if (floatingEl) floatingRef.current = floatingEl;
if (referenceEl && floatingEl) {
if (whileElementsMountedRef.current) {
return whileElementsMountedRef.current(referenceEl, floatingEl, update);
}
update();
}
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
const refs = React__namespace.useMemo(() => ({
reference: referenceRef,
floating: floatingRef,
setReference,
setFloating
}), [setReference, setFloating]);
const elements = React__namespace.useMemo(() => ({
reference: referenceEl,
floating: floatingEl
}), [referenceEl, floatingEl]);
const floatingStyles = React__namespace.useMemo(() => {
const initialStyles = {
position: strategy,
left: 0,
top: 0
};
if (!elements.floating) {
return initialStyles;
}
const x = roundByDPR(elements.floating, data.x);
const y = roundByDPR(elements.floating, data.y);
if (transform) {
return {
...initialStyles,
transform: "translate(" + x + "px, " + y + "px)",
...(getDPR(elements.floating) >= 1.5 && {
willChange: 'transform'
})
};
}
return {
position: strategy,
left: x,
top: y
};
}, [strategy, transform, elements.floating, data.x, data.y]);
return React__namespace.useMemo(() => ({
...data,
update,
refs,
elements,
floatingStyles
}), [data, update, refs, elements, floatingStyles]);
}
/**
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
* This wraps the core `arrow` middleware to allow React refs as the element.
* @see https://floating-ui.com/docs/arrow
*/
const arrow$1 = options => {
function isRef(value) {
return {}.hasOwnProperty.call(value, 'current');
}
return {
name: 'arrow',
options,
fn(state) {
const {
element,
padding
} = typeof options === 'function' ? options(state) : options;
if (element && isRef(element)) {
if (element.current != null) {
return dom.arrow({
element: element.current,
padding
}).fn(state);
}
return {};
}
if (element) {
return dom.arrow({
element,
padding
}).fn(state);
}
return {};
}
};
};
/**
* Modifies the placement by translating the floating element along the
* specified axes.
* A number (shorthand for `mainAxis` or distance), or an axes configuration
* object may be passed.
* @see https://floating-ui.com/docs/offset
*/
const offset = (options, deps) => {
const result = dom.offset(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Optimizes the visibility of the floating element by shifting it in order to
* keep it in view when it will overflow the clipping boundary.
* @see https://floating-ui.com/docs/shift
*/
const shift = (options, deps) => {
const result = dom.shift(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Built-in `limiter` that will stop `shift()` at a certain point.
*/
const limitShift = (options, deps) => {
const result = dom.limitShift(options);
return {
fn: result.fn,
options: [options, deps]
};
};
/**
* Optimizes the visibility of the floating element by flipping the `placement`
* in order to keep it in view when the preferred placement(s) will overflow the
* clipping boundary. Alternative to `autoPlacement`.
* @see https://floating-ui.com/docs/flip
*/
const flip = (options, deps) => {
const result = dom.flip(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Provides data that allows you to change the size of the floating element —
* for instance, prevent it from overflowing the clipping boundary or match the
* width of the reference element.
* @see https://floating-ui.com/docs/size
*/
const size = (options, deps) => {
const result = dom.size(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Optimizes the visibility of the floating element by choosing the placement
* that has the most space available automatically, without needing to specify a
* preferred placement. Alternative to `flip`.
* @see https://floating-ui.com/docs/autoPlacement
*/
const autoPlacement = (options, deps) => {
const result = dom.autoPlacement(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Provides data to hide the floating element in applicable situations, such as
* when it is not in the same clipping context as the reference element.
* @see https://floating-ui.com/docs/hide
*/
const hide = (options, deps) => {
const result = dom.hide(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Provides improved positioning for inline reference elements that can span
* over multiple lines, such as hyperlinks or range selections.
* @see https://floating-ui.com/docs/inline
*/
const inline = (options, deps) => {
const result = dom.inline(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
/**
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
* This wraps the core `arrow` middleware to allow React refs as the element.
* @see https://floating-ui.com/docs/arrow
*/
const arrow = (options, deps) => {
const result = arrow$1(options);
return {
name: result.name,
fn: result.fn,
options: [options, deps]
};
};
Object.defineProperty(exports, "autoUpdate", {
enumerable: true,
get: function () { return dom.autoUpdate; }
});
Object.defineProperty(exports, "computePosition", {
enumerable: true,
get: function () { return dom.computePosition; }
});
Object.defineProperty(exports, "detectOverflow", {
enumerable: true,
get: function () { return dom.detectOverflow; }
});
Object.defineProperty(exports, "getOverflowAncestors", {
enumerable: true,
get: function () { return dom.getOverflowAncestors; }
});
Object.defineProperty(exports, "platform", {
enumerable: true,
get: function () { return dom.platform; }
});
exports.arrow = arrow;
exports.autoPlacement = autoPlacement;
exports.flip = flip;
exports.hide = hide;
exports.inline = inline;
exports.limitShift = limitShift;
exports.offset = offset;
exports.shift = shift;
exports.size = size;
exports.useFloating = useFloating;
}));
@@ -0,0 +1,575 @@
"use strict";
var It = Object.create;
var v = Object.defineProperty;
var Lt = Object.getOwnPropertyDescriptor;
var jt = Object.getOwnPropertyNames;
var Ft = Object.getPrototypeOf, zt = Object.prototype.hasOwnProperty;
var l = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), Ht = (t, e) => {
for (var n in e)
v(t, n, { get: e[n], enumerable: !0 });
}, N = (t, e, n, r) => {
if (e && typeof e == "object" || typeof e == "function")
for (let s of jt(e))
!zt.call(t, s) && s !== n && v(t, s, { get: () => e[s], enumerable: !(r = Lt(e, s)) || r.enumerable });
return t;
};
var q = (t, e, n) => (n = t != null ? It(Ft(t)) : {}, N(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
e || !t || !t.__esModule ? v(n, "default", { value: t, enumerable: !0 }) : n,
t
)), Wt = (t) => N(v({}, "__esModule", { value: !0 }), t);
// node_modules/isexe/windows.js
var K = l((Pe, D) => {
"use strict";
D.exports = W;
W.sync = Xt;
var z = require("fs");
function Bt(t, e) {
var n = e.pathExt !== void 0 ? e.pathExt : process.env.PATHEXT;
if (!n || (n = n.split(";"), n.indexOf("") !== -1))
return !0;
for (var r = 0; r < n.length; r++) {
var s = n[r].toLowerCase();
if (s && t.substr(-s.length).toLowerCase() === s)
return !0;
}
return !1;
}
function H(t, e, n) {
return !t.isSymbolicLink() && !t.isFile() ? !1 : Bt(e, n);
}
function W(t, e, n) {
z.stat(t, function(r, s) {
n(r, r ? !1 : H(s, t, e));
});
}
function Xt(t, e) {
return H(z.statSync(t), t, e);
}
});
// node_modules/isexe/mode.js
var U = l((Oe, G) => {
"use strict";
G.exports = B;
B.sync = Gt;
var M = require("fs");
function B(t, e, n) {
M.stat(t, function(r, s) {
n(r, r ? !1 : X(s, e));
});
}
function Gt(t, e) {
return X(M.statSync(t), e);
}
function X(t, e) {
return t.isFile() && Ut(t, e);
}
function Ut(t, e) {
var n = t.mode, r = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), i = e.gid !== void 0 ? e.gid : process.getgid && process.getgid(), a = parseInt("100", 8), c = parseInt("010", 8), u = parseInt("001", 8), f = a | c, p = n & u || n & c && s === i || n & a && r === o || n & f && o === 0;
return p;
}
});
// node_modules/isexe/index.js
var V = l((ke, Y) => {
"use strict";
var Se = require("fs"), b;
process.platform === "win32" || global.TESTING_WINDOWS ? b = K() : b = U();
Y.exports = C;
C.sync = Yt;
function C(t, e, n) {
if (typeof e == "function" && (n = e, e = {}), !n) {
if (typeof Promise != "function")
throw new TypeError("callback not provided");
return new Promise(function(r, s) {
C(t, e || {}, function(o, i) {
o ? s(o) : r(i);
});
});
}
b(t, e || {}, function(r, s) {
r && (r.code === "EACCES" || e && e.ignoreErrors) && (r = null, s = !1), n(r, s);
});
}
function Yt(t, e) {
try {
return b.sync(t, e || {});
} catch (n) {
if (e && e.ignoreErrors || n.code === "EACCES")
return !1;
throw n;
}
}
});
// node_modules/which/which.js
var rt = l((Te, nt) => {
"use strict";
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", J = require("path"), Vt = g ? ";" : ":", Q = V(), Z = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), tt = (t, e) => {
let n = e.colon || Vt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
// windows always checks the cwd first
...g ? [process.cwd()] : [],
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
"").split(n)
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
pathEnv: r,
pathExt: o,
pathExtExe: s
};
}, et = (t, e, n) => {
typeof e == "function" && (n = e, e = {}), e || (e = {});
let { pathEnv: r, pathExt: s, pathExtExe: o } = tt(t, e), i = [], a = (u) => new Promise((f, p) => {
if (u === r.length)
return e.all && i.length ? f(i) : p(Z(t));
let d = r[u], x = /^".*"$/.test(d) ? d.slice(1, -1) : d, m = J.join(x, t), _ = !x && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + m : m;
f(c(_, u, 0));
}), c = (u, f, p) => new Promise((d, x) => {
if (p === s.length)
return d(a(f + 1));
let m = s[p];
Q(u + m, { pathExt: o }, (_, qt) => {
if (!_ && qt)
if (e.all)
i.push(u + m);
else
return d(u + m);
return d(c(u, f, p + 1));
});
});
return n ? a(0).then((u) => n(null, u), n) : a(0);
}, Jt = (t, e) => {
e = e || {};
let { pathEnv: n, pathExt: r, pathExtExe: s } = tt(t, e), o = [];
for (let i = 0; i < n.length; i++) {
let a = n[i], c = /^".*"$/.test(a) ? a.slice(1, -1) : a, u = J.join(c, t), f = !c && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + u : u;
for (let p = 0; p < r.length; p++) {
let d = f + r[p];
try {
if (Q.sync(d, { pathExt: s }))
if (e.all)
o.push(d);
else
return d;
} catch {
}
}
}
if (e.all && o.length)
return o;
if (e.nothrow)
return null;
throw Z(t);
};
nt.exports = et;
et.sync = Jt;
});
// node_modules/path-key/index.js
var ot = l((Ae, P) => {
"use strict";
var st = (t = {}) => {
let e = t.env || process.env;
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e).reverse().find((r) => r.toUpperCase() === "PATH") || "Path";
};
P.exports = st;
P.exports.default = st;
});
// node_modules/cross-spawn/lib/util/resolveCommand.js
var at = l((Re, ut) => {
"use strict";
var it = require("path"), Qt = rt(), Zt = ot();
function ct(t, e) {
let n = t.options.env || process.env, r = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.disabled;
if (o)
try {
process.chdir(t.options.cwd);
} catch {
}
let i;
try {
i = Qt.sync(t.command, {
path: n[Zt({ env: n })],
pathExt: e ? it.delimiter : void 0
});
} catch {
} finally {
o && process.chdir(r);
}
return i && (i = it.resolve(s ? t.options.cwd : "", i)), i;
}
function te(t) {
return ct(t) || ct(t, !0);
}
ut.exports = te;
});
// node_modules/cross-spawn/lib/util/escape.js
var lt = l(($e, S) => {
"use strict";
var O = /([()\][%!^"`<>&|;, *?])/g;
function ee(t) {
return t = t.replace(O, "^$1"), t;
}
function ne(t, e) {
return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(O, "^$1"), e && (t = t.replace(O, "^$1")), t;
}
S.exports.command = ee;
S.exports.argument = ne;
});
// node_modules/shebang-regex/index.js
var dt = l((Ne, pt) => {
"use strict";
pt.exports = /^#!(.*)/;
});
// node_modules/shebang-command/index.js
var ht = l((qe, ft) => {
"use strict";
var re = dt();
ft.exports = (t = "") => {
let e = t.match(re);
if (!e)
return null;
let [n, r] = e[0].replace(/#! ?/, "").split(" "), s = n.split("/").pop();
return s === "env" ? r : r ? `${s} ${r}` : s;
};
});
// node_modules/cross-spawn/lib/util/readShebang.js
var gt = l((Ie, mt) => {
"use strict";
var k = require("fs"), se = ht();
function oe(t) {
let n = Buffer.alloc(150), r;
try {
r = k.openSync(t, "r"), k.readSync(r, n, 0, 150, 0), k.closeSync(r);
} catch {
}
return se(n.toString());
}
mt.exports = oe;
});
// node_modules/cross-spawn/lib/parse.js
var vt = l((Le, xt) => {
"use strict";
var ie = require("path"), Et = at(), wt = lt(), ce = gt(), ue = process.platform === "win32", ae = /\.(?:com|exe)$/i, le = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
function pe(t) {
t.file = Et(t);
let e = t.file && ce(t.file);
return e ? (t.args.unshift(t.file), t.command = e, Et(t)) : t.file;
}
function de(t) {
if (!ue)
return t;
let e = pe(t), n = !ae.test(e);
if (t.options.forceShell || n) {
let r = le.test(e);
t.command = ie.normalize(t.command), t.command = wt.command(t.command), t.args = t.args.map((o) => wt.argument(o, r));
let s = [t.command].concat(t.args).join(" ");
t.args = ["/d", "/s", "/c", `"${s}"`], t.command = process.env.comspec || "cmd.exe", t.options.windowsVerbatimArguments = !0;
}
return t;
}
function fe(t, e, n) {
e && !Array.isArray(e) && (n = e, e = null), e = e ? e.slice(0) : [], n = Object.assign({}, n);
let r = {
command: t,
args: e,
options: n,
file: void 0,
original: {
command: t,
args: e
}
};
return n.shell ? r : de(r);
}
xt.exports = fe;
});
// node_modules/cross-spawn/lib/enoent.js
var _t = l((je, yt) => {
"use strict";
var T = process.platform === "win32";
function A(t, e) {
return Object.assign(new Error(`${e} ${t.command} ENOENT`), {
code: "ENOENT",
errno: "ENOENT",
syscall: `${e} ${t.command}`,
path: t.command,
spawnargs: t.args
});
}
function he(t, e) {
if (!T)
return;
let n = t.emit;
t.emit = function(r, s) {
if (r === "exit") {
let o = bt(s, e, "spawn");
if (o)
return n.call(t, "error", o);
}
return n.apply(t, arguments);
};
}
function bt(t, e) {
return T && t === 1 && !e.file ? A(e.original, "spawn") : null;
}
function me(t, e) {
return T && t === 1 && !e.file ? A(e.original, "spawnSync") : null;
}
yt.exports = {
hookChildProcess: he,
verifyENOENT: bt,
verifyENOENTSync: me,
notFoundError: A
};
});
// node_modules/cross-spawn/index.js
var Ot = l((Fe, E) => {
"use strict";
var Ct = require("child_process"), R = vt(), $ = _t();
function Pt(t, e, n) {
let r = R(t, e, n), s = Ct.spawn(r.command, r.args, r.options);
return $.hookChildProcess(s, r), s;
}
function ge(t, e, n) {
let r = R(t, e, n), s = Ct.spawnSync(r.command, r.args, r.options);
return s.error = s.error || $.verifyENOENTSync(s.status, r), s;
}
E.exports = Pt;
E.exports.spawn = Pt;
E.exports.sync = ge;
E.exports._parse = R;
E.exports._enoent = $;
});
// src/main.ts
var be = {};
Ht(be, {
ExecProcess: () => y,
NonZeroExitError: () => w,
exec: () => Nt,
x: () => $t
});
module.exports = Wt(be);
var St = require("child_process"), kt = require("path"), Tt = require("process");
// src/env.ts
var h = require("path"), Dt = /^path$/i, I = { key: "PATH", value: "" };
function Kt(t) {
for (let e in t) {
if (!Object.prototype.hasOwnProperty.call(t, e) || !Dt.test(e))
continue;
let n = t[e];
return n ? { key: e, value: n } : I;
}
return I;
}
function Mt(t, e) {
let n = e.value.split(h.delimiter), r = t, s;
do
n.push((0, h.resolve)(r, "node_modules", ".bin")), s = r, r = (0, h.dirname)(r);
while (r !== s);
return { key: e.key, value: n.join(h.delimiter) };
}
function L(t, e) {
let n = {
...process.env,
...e
}, r = Mt(t, Kt(n));
return n[r.key] = r.value, n;
}
// src/stream.ts
var j = require("stream");
var F = (t) => {
let e = t.length, n = new j.PassThrough(), r = () => {
--e === 0 && n.emit("end");
};
for (let s of t)
s.pipe(n, { end: !1 }), s.on("end", r);
return n;
};
// src/main.ts
var At = q(require("readline"), 1), Rt = q(Ot(), 1);
// src/non-zero-exit-error.ts
var w = class extends Error {
result;
output;
get exitCode() {
if (this.result.exitCode !== null)
return this.result.exitCode;
}
constructor(e, n) {
super(`Process exited with non-zero status (${e.exitCode})`), this.result = e, this.output = n;
}
};
// src/main.ts
var Ee = {
timeout: void 0,
persist: !1
}, we = {
windowsHide: !0
};
function xe(t, e) {
return {
command: (0, kt.normalize)(t),
args: e ?? []
};
}
function ve(t) {
let e = new AbortController();
for (let n of t) {
if (n.aborted)
return e.abort(), n;
let r = () => {
e.abort(n.reason);
};
n.addEventListener("abort", r, {
signal: e.signal
});
}
return e.signal;
}
var y = class {
_process;
_aborted = !1;
_options;
_command;
_args;
_resolveClose;
_processClosed;
_thrownError;
get process() {
return this._process;
}
get pid() {
return this._process?.pid;
}
get exitCode() {
if (this._process && this._process.exitCode !== null)
return this._process.exitCode;
}
constructor(e, n, r) {
this._options = {
...Ee,
...r
}, this._command = e, this._args = n ?? [], this._processClosed = new Promise((s) => {
this._resolveClose = s;
});
}
kill(e) {
return this._process?.kill(e) === !0;
}
get aborted() {
return this._aborted;
}
get killed() {
return this._process?.killed === !0;
}
pipe(e, n, r) {
return Nt(e, n, {
...r,
stdin: this
});
}
async *[Symbol.asyncIterator]() {
let e = this._process;
if (!e)
return;
let n = [];
this._streamErr && n.push(this._streamErr), this._streamOut && n.push(this._streamOut);
let r = F(n), s = At.default.createInterface({
input: r
});
for await (let o of s)
yield o.toString();
if (await this._processClosed, e.removeAllListeners(), this._thrownError)
throw this._thrownError;
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0)
throw new w(this);
}
async _waitForOutput() {
let e = this._process;
if (!e)
throw new Error("No process was started");
let n = "", r = "";
if (this._streamOut)
for await (let o of this._streamOut)
r += o.toString();
if (this._streamErr)
for await (let o of this._streamErr)
n += o.toString();
if (await this._processClosed, this._options?.stdin && await this._options.stdin, e.removeAllListeners(), this._thrownError)
throw this._thrownError;
let s = {
stderr: n,
stdout: r,
exitCode: this.exitCode
};
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0)
throw new w(this, s);
return s;
}
then(e, n) {
return this._waitForOutput().then(e, n);
}
_streamOut;
_streamErr;
spawn() {
let e = (0, Tt.cwd)(), n = this._options, r = {
...we,
...n.nodeOptions
}, s = [];
this._resetState(), n.timeout !== void 0 && s.push(AbortSignal.timeout(n.timeout)), n.signal !== void 0 && s.push(n.signal), n.persist === !0 && (r.detached = !0), s.length > 0 && (r.signal = ve(s)), r.env = L(e, r.env);
let { command: o, args: i } = xe(this._command, this._args), a = (0, Rt._parse)(o, i, r), c = (0, St.spawn)(
a.command,
a.args,
a.options
);
if (c.stderr && (this._streamErr = c.stderr), c.stdout && (this._streamOut = c.stdout), this._process = c, c.once("error", this._onError), c.once("close", this._onClose), n.stdin !== void 0 && c.stdin && n.stdin.process) {
let { stdout: u } = n.stdin.process;
u && u.pipe(c.stdin);
}
}
_resetState() {
this._aborted = !1, this._processClosed = new Promise((e) => {
this._resolveClose = e;
}), this._thrownError = void 0;
}
_onError = (e) => {
if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
this._aborted = !0;
return;
}
this._thrownError = e;
};
_onClose = () => {
this._resolveClose && this._resolveClose();
};
}, $t = (t, e, n) => {
let r = new y(t, e, n);
return r.spawn(), r;
}, Nt = $t;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ExecProcess,
NonZeroExitError,
exec,
x
});
@@ -0,0 +1,2 @@
export declare const IS_IDENTIFIER_CHAR: Uint8Array;
export declare const IS_IDENTIFIER_START: Uint8Array;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_z","132":"B"},B:{"1":"_RE","16":"_x"},C:{"1":"_H _JN","2":"_pL"},D:{"1":"_ZD","16":"_Y"},E:{"1":"_DB","16":"_e"},F:{"1":"_xL","2":"_0D"},G:{"1":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"16":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"16":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"1":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:6,C:"Built-in PDF viewer",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"l33tTable.mjs","sources":["../../src/data/l33tTable.ts"],"sourcesContent":[null],"names":["a","b","c","d","e","f","g","h","i","k","l","m","n","o","q","u","s","t","v","w","x","z"],"mappings":"AAAA,gBAAe;AACbA,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;EACbC,CAAC,EAAE,CAAC,GAAG,CAAC;EACRC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AACvBC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;EACdC,CAAC,EAAE,CAAC,GAAG,CAAC;EACRC,CAAC,EAAE,CAAC,GAAG,CAAC;AACRC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAClBC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AACfC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAClBC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;EACdC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;EACvBC,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC;EACnCC,CAAC,EAAE,CAAC,IAAI,CAAC;AACTC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;EACdC,CAAC,EAAE,CAAC,GAAG,CAAC;EACRC,CAAC,EAAE,CAAC,KAAK,CAAC;AACVC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACbC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACbC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAClBC,EAAAA,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC;AAC/CC,EAAAA,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;EACdC,CAAC,EAAE,CAAC,GAAG;CACR;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_template","require","helper","minVersion","source","metadata","Object","freeze","ast","template","program","preserveComments","helpers","exports","default","__proto__","OverloadYield","globals","locals","_OverloadYield","exportBindingAssignments","exportName","dependencies","internal","applyDecoratedDescriptor","_applyDecoratedDescriptor","applyDecs2311","checkInRHS","setFunctionName","toPropertyKey","arrayLikeToArray","_arrayLikeToArray","arrayWithHoles","_arrayWithHoles","arrayWithoutHoles","_arrayWithoutHoles","assertClassBrand","_assertClassBrand","assertThisInitialized","_assertThisInitialized","asyncGeneratorDelegate","_asyncGeneratorDelegate","asyncIterator","_asyncIterator","AsyncFromSyncIterator","asyncToGenerator","asyncGeneratorStep","_asyncToGenerator","awaitAsyncGenerator","_awaitAsyncGenerator","callSuper","_callSuper","getPrototypeOf","isNativeReflectConstruct","possibleConstructorReturn","_checkInRHS","checkPrivateRedeclaration","_checkPrivateRedeclaration","classCallCheck","_classCallCheck","classNameTDZError","_classNameTDZError","classPrivateFieldGet2","_classPrivateFieldGet2","classPrivateFieldInitSpec","_classPrivateFieldInitSpec","classPrivateFieldLooseBase","_classPrivateFieldBase","classPrivateFieldLooseKey","id","_classPrivateFieldKey","classPrivateFieldSet2","_classPrivateFieldSet2","classPrivateGetter","_classPrivateGetter","classPrivateMethodInitSpec","_classPrivateMethodInitSpec","classPrivateSetter","_classPrivateSetter","classStaticPrivateMethodGet","_classStaticPrivateMethodGet","construct","_construct","setPrototypeOf","createClass","_defineProperties","_createClass","createForOfIteratorHelper","_createForOfIteratorHelper","unsupportedIterableToArray","createForOfIteratorHelperLoose","_createForOfIteratorHelperLoose","createSuper","_createSuper","decorate","_decorate","_getDecoratorsApi","_createElementDescriptor","_coalesceGetterSetter","_coalesceClassElements","_hasDecorators","_isDataDescriptor","_optionalCallableProperty","toArray","defaults","_defaults","defineAccessor","_defineAccessor","defineProperty","_defineProperty","extends","_extends","get","_get","superPropBase","_getPrototypeOf","identity","_identity","importDeferProxy","_importDeferProxy","inherits","_inherits","inheritsLoose","_inheritsLoose","initializerDefineProperty","_initializerDefineProperty","initializerWarningHelper","_initializerWarningHelper","instanceof","_instanceof","interopRequireDefault","_interopRequireDefault","interopRequireWildcard","_interopRequireWildcard","isNativeFunction","_isNativeFunction","_isNativeReflectConstruct","iterableToArray","_iterableToArray","iterableToArrayLimit","_iterableToArrayLimit","jsx","REACT_ELEMENT_TYPE","_createRawReactElement","maybeArrayLike","_maybeArrayLike","newArrowCheck","_newArrowCheck","nonIterableRest","_nonIterableRest","nonIterableSpread","_nonIterableSpread","nullishReceiverError","_nullishReceiverError","objectDestructuringEmpty","_objectDestructuringEmpty","objectSpread2","ownKeys","_objectSpread2","objectWithoutProperties","_objectWithoutProperties","objectWithoutPropertiesLoose","_objectWithoutPropertiesLoose","_possibleConstructorReturn","readOnlyError","_readOnlyError","regenerator","_regenerator","regeneratorDefine","regeneratorAsync","_regeneratorAsync","regeneratorAsyncGen","_regeneratorAsyncGen","regeneratorAsyncIterator","AsyncIterator","regeneratorKeys","_regeneratorKeys","regeneratorValues","_regeneratorValues","set","_set","_setPrototypeOf","skipFirstGeneratorNext","_skipFirstGeneratorNext","slicedToArray","_slicedToArray","_superPropBase","superPropGet","_superPropGet","superPropSet","_superPropSet","taggedTemplateLiteral","_taggedTemplateLiteral","taggedTemplateLiteralLoose","_taggedTemplateLiteralLoose","tdz","_tdzError","temporalRef","_temporalRef","temporalUndefined","_temporalUndefined","_toArray","toConsumableArray","_toConsumableArray","toPrimitive","toSetter","_toSetter","tsRewriteRelativeImportExtensions","typeof","_typeof","_unsupportedIterableToArray","usingCtx","_usingCtx","wrapAsyncGenerator","_wrapAsyncGenerator","AsyncGenerator","wrapNativeSuper","_wrapNativeSuper","wrapRegExp","_wrapRegExp","writeOnlyError","_writeOnlyError","assign","AwaitValue","_AwaitValue","applyDecs","old_createMetadataMethodsForProperty","old_convertMetadataMapToFinal","old_createAddInitializerMethod","old_memberDec","old_assertNotFinished","old_assertMetadataKey","old_assertCallable","old_assertValidReturnValue","old_getInit","old_applyMemberDec","old_applyMemberDecs","old_pushInitializers","old_applyClassDecs","applyDecs2203","applyDecs2203Factory","applyDecs2203Impl","applyDecs2203R","applyDecs2203RFactory","applyDecs2301","applyDecs2301Factory","applyDecs2305","classApplyDescriptorDestructureSet","_classApplyDescriptorDestructureSet","classApplyDescriptorGet","_classApplyDescriptorGet","classApplyDescriptorSet","_classApplyDescriptorSet","classCheckPrivateStaticAccess","_classCheckPrivateStaticAccess","classCheckPriLine truncated
@@ -0,0 +1 @@
{"version":3,"names":["_getBindingIdentifiers","require","_index","_index2","_productions","_cloneNode","gatherSequenceExpressions","nodes","declars","exprs","ensureLastUndefined","node","isEmptyStatement","isExpression","push","isExpressionStatement","expression","isVariableDeclaration","kind","declar","declarations","bindings","getBindingIdentifiers","key","Object","keys","id","cloneNode","init","assignmentExpression","isIfStatement","consequent","buildUndefinedNode","alternate","conditionalExpression","test","isBlockStatement","body","indexOf","length","sequenceExpression"],"sources":["../../src/converters/gatherSequenceExpressions.ts"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING && process.env.IS_PUBLISH) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nimport getBindingIdentifiers from \"../retrievers/getBindingIdentifiers.ts\";\nimport {\n isExpression,\n isExpressionStatement,\n isVariableDeclaration,\n isIfStatement,\n isBlockStatement,\n isEmptyStatement,\n} from \"../validators/generated/index.ts\";\nimport {\n sequenceExpression,\n assignmentExpression,\n conditionalExpression,\n} from \"../builders/generated/index.ts\";\nimport { buildUndefinedNode } from \"../builders/productions.ts\";\nimport cloneNode from \"../clone/cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\nexport type DeclarationInfo = {\n kind: t.VariableDeclaration[\"kind\"];\n id: t.Identifier;\n};\n\nexport default function gatherSequenceExpressions(\n nodes: readonly t.Node[],\n declars: DeclarationInfo[],\n) {\n const exprs: t.Expression[] = [];\n let ensureLastUndefined = true;\n\n for (const node of nodes) {\n // if we encounter emptyStatement before a non-emptyStatement\n // we want to disregard that\n if (!isEmptyStatement(node)) {\n ensureLastUndefined = false;\n }\n\n if (isExpression(node)) {\n exprs.push(node);\n } else if (isExpressionStatement(node)) {\n exprs.push(node.expression);\n } else if (isVariableDeclaration(node)) {\n if (node.kind !== \"var\") return; // bailed\n\n for (const declar of node.declarations) {\n const bindings = getBindingIdentifiers(declar);\n for (const key of Object.keys(bindings)) {\n declars.push({\n kind: node.kind,\n id: cloneNode(bindings[key]),\n });\n }\n\n if (declar.init) {\n exprs.push(\n assignmentExpression(\n \"=\",\n // var declarator must not be a void pattern\n declar.id as Exclude<t.VariableDeclarator[\"id\"], t.VoidPattern>,\n declar.init,\n ),\n );\n }\n }\n\n ensureLastUndefined = true;\n } else if (isIfStatement(node)) {\n const consequent = node.consequent\n ? gatherSequenceExpressions([node.consequent], declars)\n : buildUndefinedNode();\n const alternate = node.alternate\n ? gatherSequenceExpressions([node.alternate], declars)\n : buildUndefinedNode();\n if (!consequent || !alternate) return; // bailed\n\n exprs.push(conditionalExpression(node.test, consequent, alternate));\n } else if (isBlockStatement(node)) {\n const body = gatherSequenceExpressions(node.body, declars);\n if (!body) return; // bailed\n\n exprs.push(body);\n } else if (isEmptyStatement(node)) {\n // empty statement so ensure the last item is undefined if we're last\n // checks if emptyStatement is first\n if (nodes.indexOf(node) === 0) {\n ensureLastUndefined = true;\n }\n } else {\n // bailed, we can't turn this statement into an expression\n return;\n }\n }\n\n if (ensureLastUndefined) {\n exprs.push(buildUndefinedNode());\n }\n\n if (exprs.length === 1) {\n return exprs[0];\n } else {\n return sequenceExpression(exprs);\n }\n}\n"],"mappings":";;;;;;AAOA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAQe,SAASK,yBAAyBA,CAC/CC,KAAwB,EACxBC,OAA0B,EAC1B;EACA,MAAMC,KAAqB,GAAG,EAAE;EAChC,IAAIC,mBAAmB,GAAG,IAAI;EAE9B,KAAK,MAAMC,IAAI,IAAIJ,KAAK,EAAE;IAGxB,IAAI,CAAC,IAAAK,uBAAgB,EAACD,IAAI,CAAC,EAAE;MAC3BD,mBAAmB,GAAG,KAAK;IAC7B;IAEA,IAAI,IAAAG,mBAAY,EAACF,IAAI,CAAC,EAAE;MACtBF,KAAK,CAACK,IAAI,CAACH,IAAI,CAAC;IAClB,CAAC,MAAM,IAAI,IAAAI,4BAAqB,EAACJ,IAAI,CAAC,EAAE;MACtCF,KAAK,CAACK,IAAI,CAACH,IAAI,CAACK,UAAU,CAAC;IAC7B,CAAC,MAAM,IAAI,IAAAC,4BAAqB,EAACN,IAAI,CAAC,EAAE;MACtC,IAAIA,IAAI,CAACO,IAAI,KAAK,KAAK,EAAE;MAEzB,KAAK,MAAMC,MAAM,IAAIR,IAAI,CAACS,YAAY,EAAE;QACtC,MAAMC,QAAQ,GAAG,IAAAC,8BAAqB,EAACH,MAAM,CAAC;QAC9C,KAAK,MAAMI,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACJ,QAAQ,CAAC,EAAE;UACvCb,OAAO,CAACM,IAAI,CAAC;YACXI,IAAI,EAAEP,IAAI,CAACO,IAAI;YACfQ,EAAE,EAAE,IAAAC,kBAAS,EAACN,QAAQ,CAACE,GAAG,CAAC;UAC7B,CAAC,CAAC;QACJ;QAEA,IAAIJ,MAAM,CAACS,IAAI,EAAE;UACfnB,KAAKLine truncated
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _regeneratorAsync;
var _regeneratorAsyncGen = require("./regeneratorAsyncGen.js");
function _regeneratorAsync(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
var iter = (0, _regeneratorAsyncGen.default)(innerFn, outerFn, self, tryLocsList, PromiseImpl);
return iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
}
//# sourceMappingURL=regeneratorAsync.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_index2","toComputedKey","node","key","property","computed","isIdentifier","stringLiteral","name"],"sources":["../../src/converters/toComputedKey.ts"],"sourcesContent":["import { isIdentifier } from \"../validators/generated/index.ts\";\nimport { stringLiteral } from \"../builders/generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function toComputedKey(\n node:\n | t.ObjectMember\n | t.ObjectProperty\n | t.ClassMethod\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.MemberExpression\n | t.OptionalMemberExpression,\n // @ts-expect-error todo(flow->ts): maybe check the type of node before accessing .key and .property\n key: t.Expression | t.PrivateName = node.key || node.property,\n) {\n if (!node.computed && isIdentifier(key)) key = stringLiteral(key.name);\n\n return key;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGe,SAASE,aAAaA,CACnCC,IAO8B,EAE9BC,GAAiC,GAAGD,IAAI,CAACC,GAAG,IAAID,IAAI,CAACE,QAAQ,EAC7D;EACA,IAAI,CAACF,IAAI,CAACG,QAAQ,IAAI,IAAAC,mBAAY,EAACH,GAAG,CAAC,EAAEA,GAAG,GAAG,IAAAI,qBAAa,EAACJ,GAAG,CAACK,IAAI,CAAC;EAEtE,OAAOL,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,69 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.containsAllTypesByName = containsAllTypesByName;
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const typeFlagUtils_1 = require("./typeFlagUtils");
/**
* @param type Type being checked by name.
* @param allowAny Whether to consider `any` and `unknown` to match.
* @param allowedNames Symbol names checking on the type.
* @param matchAnyInstead Whether to instead just check if any parts match, rather than all parts.
* @returns Whether the type is, extends, or contains the allowed names (or all matches the allowed names, if mustMatchAll is true).
*/
function containsAllTypesByName(type, allowAny, allowedNames, matchAnyInstead = false) {
if ((0, typeFlagUtils_1.isTypeFlagSet)(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
return !allowAny;
}
if (tsutils.isTypeReference(type)) {
type = type.target;
}
const symbol = type.getSymbol();
if (symbol && allowedNames.has(symbol.name)) {
return true;
}
const predicate = (t) => containsAllTypesByName(t, allowAny, allowedNames, matchAnyInstead);
if (tsutils.isUnionOrIntersectionType(type)) {
return matchAnyInstead
? type.types.some(predicate)
: type.types.every(predicate);
}
const bases = type.getBaseTypes();
return (bases != null &&
(matchAnyInstead
? bases.some(predicate)
: bases.length > 0 && bases.every(predicate)));
}
@@ -0,0 +1,7 @@
import { AnyRouter } from './router.js';
declare global {
interface Window {
__TSR_ROUTER__?: AnyRouter;
}
}
export {};