docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,127 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "caràcters", verb: "contenir" },
file: { unit: "bytes", verb: "contenir" },
array: { unit: "elements", verb: "contenir" },
set: { unit: "elements", verb: "contenir" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "entrada",
email: "adreça electrònica",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "data i hora ISO",
date: "data ISO",
time: "hora ISO",
duration: "durada ISO",
ipv4: "adreça IPv4",
ipv6: "adreça IPv6",
cidrv4: "rang IPv4",
cidrv6: "rang IPv6",
base64: "cadena codificada en base64",
base64url: "cadena codificada en base64url",
json_string: "cadena JSON",
e164: "número E.164",
jwt: "JWT",
template_literal: "entrada",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Tipus invàlid: s'esperava ${issue.expected}, s'ha rebut ${parsedType(issue.input)}`;
// return `Tipus invàlid: s'esperava ${issue.expected}, s'ha rebut ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Valor invàlid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;
return `Opció invàlida: s'esperava una de ${util.joinValues(issue.values, " o ")}`;
case "too_big": {
const adj = issue.inclusive ? "com a màxim" : "menys de";
const sizing = getSizing(issue.origin);
if (sizing)
return `Massa gran: s'esperava que ${issue.origin ?? "el valor"} contingués ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Massa gran: s'esperava que ${issue.origin ?? "el valor"} fos ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "com a mínim" : "més de";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Massa petit: s'esperava que ${issue.origin} contingués ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `Format invàlid: ha de començar amb "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `Format invàlid: ha d'acabar amb "${_issue.suffix}"`;
if (_issue.format === "includes") return `Format invàlid: ha d'incloure "${_issue.includes}"`;
if (_issue.format === "regex") return `Format invàlid: ha de coincidir amb el patró ${_issue.pattern}`;
return `Format invàlid per a ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Número invàlid: ha de ser múltiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clau${issue.keys.length > 1 ? "s" : ""} no reconeguda${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clau invàlida a ${issue.origin}`;
case "invalid_union":
return "Entrada invàlida"; // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
case "invalid_element":
return `Element invàlid a ${issue.origin}`;
default:
return `Entrada invàlida`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,89 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import type { ImportSettings, PluginName, PluginSettings } from 'eslint-import-context';
import type { MinimatchOptions } from 'minimatch';
import type { ImportType as ImportType_ } from './utils/index.js';
export type { LegacyResolver, LegacyResolverName, LegacyResolverName as ResolverName, LegacyImportResolver, LegacyImportResolver as ImportResolver, LegacyResolverResolve, LegacyResolverResolve as ResolverResolve, LegacyResolverResolveImport, LegacyResolverResolveImport as ResolverResolveImport, LegacyResolverRecord, LegacyResolverRecord as ResolverRecord, LegacyResolverObject, LegacyResolverObject as ResolverObject, NodeResolverOptions, WebpackResolverOptions, TsResolverOptions, NewResolverResolve, NewResolver, FileExtension, DocStyle, ResultNotFound, ResultFound, Resolver, ResolvedResult, ImportSettings, WithPluginName, PluginSettings, RuleContext, ChildContext, } from 'eslint-import-context';
export type ImportType = ImportType_ | 'object' | 'type';
export type Arrayable<T> = T | readonly T[];
export interface PluginConfig extends TSESLint.ClassicConfig.Config {
plugins?: [PluginName];
settings?: PluginSettings;
rules?: Record<`${PluginName}/${string}`, TSESLint.ClassicConfig.RuleEntry>;
}
export interface PluginFlatBaseConfig extends TSESLint.FlatConfig.Config {
settings?: PluginSettings;
rules?: Record<`${PluginName}/${string}`, TSESLint.FlatConfig.RuleEntry>;
}
export interface PluginFlatConfig extends PluginFlatBaseConfig {
name?: `${PluginName}/${string}`;
}
export interface ParseError extends Error {
lineNumber: number;
column: number;
}
export interface CustomESTreeNode<Type extends string> extends Omit<TSESTree.BaseNode, 'type'> {
type: Type;
}
export type ExportDefaultSpecifier = CustomESTreeNode<'ExportDefaultSpecifier'>;
export interface ExportNamespaceSpecifier extends CustomESTreeNode<'ExportNamespaceSpecifier'> {
exported: TSESTree.Identifier;
}
export interface PathGroup {
pattern: string;
group: ImportType;
patternOptions?: MinimatchOptions;
position?: 'before' | 'after';
}
export type ExportAndImportKind = 'value' | 'type';
export type NewLinesOptions = 'always' | 'always-and-inside-groups' | 'ignore' | 'never';
export type NamedTypes = 'mixed' | 'types-first' | 'types-last';
export interface NamedOptions {
enabled?: boolean;
import?: boolean;
export?: boolean;
require?: boolean;
cjsExports?: boolean;
types?: NamedTypes;
}
export interface AlphabetizeOptions {
caseInsensitive: boolean;
order: 'ignore' | 'asc' | 'desc';
orderImportKind: 'ignore' | 'asc' | 'desc';
}
export type ImportEntryType = 'import:object' | 'import' | 'require' | 'export';
export type LiteralNodeValue = string | number | bigint | boolean | RegExp | null;
export interface ImportEntry {
type: ImportEntryType;
node: TSESTree.Node & {
importKind?: ExportAndImportKind;
exportKind?: ExportAndImportKind;
};
value: LiteralNodeValue;
alias?: string;
kind?: ExportAndImportKind;
displayName?: LiteralNodeValue;
}
export interface ImportEntryWithRank extends ImportEntry {
rank: number;
isMultiline?: boolean;
}
export interface RanksPathGroup {
pattern: string;
patternOptions?: MinimatchOptions;
group: string;
position?: number;
}
export type RanksGroups = Record<string, number>;
export interface Ranks {
omittedTypes: string[];
groups: RanksGroups;
pathGroups: RanksPathGroup[];
maxPosition: number;
}
export interface CjsRequire extends NodeJS.Require {
<T>(id: string): T;
}
export type SetValue<T extends Set<unknown>> = T extends Set<infer U> ? U : never;
export interface NormalizedCacheSettings extends NonNullable<ImportSettings['cache']> {
lifetime: number;
}
@@ -0,0 +1,14 @@
import { CamelCaseOptions } from './utilities';
type StyleObject = Record<string, string>;
interface StyleToJSOptions extends CamelCaseOptions {
}
/**
* Parses CSS inline style to JavaScript object (camelCased).
*/
declare function StyleToJS(style: string, options?: StyleToJSOptions): StyleObject;
declare namespace StyleToJS {
var _a: typeof StyleToJS;
export { _a as default };
}
export = StyleToJS;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,72 @@
import type { ClassicConfig } from '../Config';
import type { Linter } from '../Linter';
import type * as Shared from './ESLintShared';
declare class LegacyESLintBase extends Shared.ESLintBase<ClassicConfig.Config, LegacyESLint.ESLintOptions> {
static readonly configType: 'eslintrc';
}
declare const LegacyESLint_base: typeof LegacyESLintBase;
/**
* The ESLint class is the primary class to use in Node.js applications.
* This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
*
* If you want to lint code on browsers, use the Linter class instead.
*/
export declare class LegacyESLint extends LegacyESLint_base {
}
export declare namespace LegacyESLint {
interface ESLintOptions extends Shared.ESLintOptions<ClassicConfig.Config> {
/**
* If you pass directory paths to the eslint.lintFiles() method, ESLint checks the files in those directories that
* have the given extensions. For example, when passing the src/ directory and extensions is [".js", ".ts"], ESLint
* will lint *.js and *.ts files in src/. If extensions is null, ESLint checks *.js files and files that match
* overrides[].files patterns in your configuration.
* Note: This option only applies when you pass directory paths to the eslint.lintFiles() method.
* If you pass glob patterns, ESLint will lint all files matching the glob pattern regardless of extension.
*/
extensions?: string[] | null;
/**
* If false is present, the eslint.lintFiles() method doesn't respect `.eslintignore` files in your configuration.
* @default true
*/
ignore?: boolean;
/**
* The path to a file ESLint uses instead of `$CWD/.eslintignore`.
* If a path is present and the file doesn't exist, this constructor will throw an error.
*/
ignorePath?: string;
/**
* The path to a configuration file, overrides all configurations used with this instance.
* The options.overrideConfig option is applied after this option is applied.
*/
overrideConfigFile?: string | null;
/**
* The severity to report unused eslint-disable directives.
* If this option is a severity, it overrides the reportUnusedDisableDirectives setting in your configurations.
*/
reportUnusedDisableDirectives?: Linter.SeverityString | null;
/**
* The path to a directory where plugins should be resolved from.
* If null is present, ESLint loads plugins from the location of the configuration file that contains the plugin
* setting.
* If a path is present, ESLint loads all plugins from there.
*/
resolvePluginsRelativeTo?: string | null;
/**
* An array of paths to directories to load custom rules from.
*/
rulePaths?: string[];
/**
* If false is present, ESLint doesn't load configuration files (.eslintrc.* files).
* Only the configuration of the constructor options is valid.
*/
useEslintrc?: boolean;
}
type DeprecatedRuleInfo = Shared.DeprecatedRuleInfo;
type EditInfo = Shared.EditInfo;
type Formatter = Shared.Formatter;
type LintMessage = Shared.LintMessage;
type LintResult = Omit<Shared.LintResult, 'stats'>;
type LintTextOptions = Shared.LintTextOptions;
type SuppressedLintMessage = Shared.SuppressedLintMessage;
}
export {};
@@ -0,0 +1,88 @@
'use strict';
var test = require('tape');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var isSymbol = require('../index');
var hasSymbols = require('has-symbols')();
var hasToStringTag = require('has-tostringtag/shams')();
var inspect = require('object-inspect');
test('non-symbol values', function (t) {
var nonSymbols = v.nonSymbolPrimitives.concat(
Object(true),
Object(false),
// @ts-expect-error TS sucks with concat
{},
[],
/a/g,
new Date(),
function () {},
NaN
);
t.plan(nonSymbols.length);
forEach(nonSymbols, function (nonSymbol) {
t.equal(isSymbol(nonSymbol), false, inspect(nonSymbol) + ' is not a symbol');
});
t.end();
});
test('faked symbol values', function (t) {
t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) {
var fakeSymbol = { valueOf: function () { return Symbol('foo'); } };
st.equal(isSymbol(fakeSymbol), false, 'object with valueOf returning a symbol is not a symbol');
st.end();
});
t.test('faked @@toStringTag', { skip: !hasToStringTag }, function (st) {
/** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */
var fakeSymbol = { valueOf: function () { return Symbol('foo'); } };
fakeSymbol[Symbol.toStringTag] = 'Symbol';
st.equal(isSymbol(fakeSymbol), false, 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol');
/** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */
var notSoFakeSymbol = { valueOf: function () { return 42; } };
notSoFakeSymbol[Symbol.toStringTag] = 'Symbol';
st.equal(isSymbol(notSoFakeSymbol), false, 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol');
st.end();
});
var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } };
t.equal(isSymbol(fakeSymbolString), false, 'object with toString returning Symbol(foo) is not a symbol');
t.end();
});
test('Symbol support', { skip: !hasSymbols }, function (t) {
t.test('well-known Symbols', function (st) {
/** @type {(name: string) => name is Exclude<keyof SymbolConstructor, 'for' | 'keyFor'>} */
var isWellKnown = function filterer(name) {
return name !== 'for' && name !== 'keyFor' && !(name in filterer);
};
var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown);
wellKnownSymbols.forEach(function (name) {
// eslint-disable-next-line no-extra-parens
var sym = Symbol[/** @type {keyof SymbolConstructor} */ (name)];
st.equal(isSymbol(sym), true, inspect(sym) + ' is a symbol');
});
st.end();
});
t.test('user-created symbols', function (st) {
var symbols = v.symbols.concat(
Symbol(),
Symbol('foo'),
Symbol['for']('foo'),
Object(Symbol('object'))
);
symbols.forEach(function (sym) {
st.equal(isSymbol(sym), true, inspect(sym) + ' is a symbol');
});
st.end();
});
t.end();
});
@@ -0,0 +1,110 @@
import $5FSX7$arAEmodulejs from "./ar-AE.module.js";
import $5FSX7$bgBGmodulejs from "./bg-BG.module.js";
import $5FSX7$csCZmodulejs from "./cs-CZ.module.js";
import $5FSX7$daDKmodulejs from "./da-DK.module.js";
import $5FSX7$deDEmodulejs from "./de-DE.module.js";
import $5FSX7$elGRmodulejs from "./el-GR.module.js";
import $5FSX7$enUSmodulejs from "./en-US.module.js";
import $5FSX7$esESmodulejs from "./es-ES.module.js";
import $5FSX7$etEEmodulejs from "./et-EE.module.js";
import $5FSX7$fiFImodulejs from "./fi-FI.module.js";
import $5FSX7$frFRmodulejs from "./fr-FR.module.js";
import $5FSX7$heILmodulejs from "./he-IL.module.js";
import $5FSX7$hrHRmodulejs from "./hr-HR.module.js";
import $5FSX7$huHUmodulejs from "./hu-HU.module.js";
import $5FSX7$itITmodulejs from "./it-IT.module.js";
import $5FSX7$jaJPmodulejs from "./ja-JP.module.js";
import $5FSX7$koKRmodulejs from "./ko-KR.module.js";
import $5FSX7$ltLTmodulejs from "./lt-LT.module.js";
import $5FSX7$lvLVmodulejs from "./lv-LV.module.js";
import $5FSX7$nbNOmodulejs from "./nb-NO.module.js";
import $5FSX7$nlNLmodulejs from "./nl-NL.module.js";
import $5FSX7$plPLmodulejs from "./pl-PL.module.js";
import $5FSX7$ptBRmodulejs from "./pt-BR.module.js";
import $5FSX7$ptPTmodulejs from "./pt-PT.module.js";
import $5FSX7$roROmodulejs from "./ro-RO.module.js";
import $5FSX7$ruRUmodulejs from "./ru-RU.module.js";
import $5FSX7$skSKmodulejs from "./sk-SK.module.js";
import $5FSX7$slSImodulejs from "./sl-SI.module.js";
import $5FSX7$srSPmodulejs from "./sr-SP.module.js";
import $5FSX7$svSEmodulejs from "./sv-SE.module.js";
import $5FSX7$trTRmodulejs from "./tr-TR.module.js";
import $5FSX7$ukUAmodulejs from "./uk-UA.module.js";
import $5FSX7$zhCNmodulejs from "./zh-CN.module.js";
import $5FSX7$zhTWmodulejs from "./zh-TW.module.js";
var $2cbb7ca666678a14$exports = {};
$2cbb7ca666678a14$exports = {
"ar-AE": $5FSX7$arAEmodulejs,
"bg-BG": $5FSX7$bgBGmodulejs,
"cs-CZ": $5FSX7$csCZmodulejs,
"da-DK": $5FSX7$daDKmodulejs,
"de-DE": $5FSX7$deDEmodulejs,
"el-GR": $5FSX7$elGRmodulejs,
"en-US": $5FSX7$enUSmodulejs,
"es-ES": $5FSX7$esESmodulejs,
"et-EE": $5FSX7$etEEmodulejs,
"fi-FI": $5FSX7$fiFImodulejs,
"fr-FR": $5FSX7$frFRmodulejs,
"he-IL": $5FSX7$heILmodulejs,
"hr-HR": $5FSX7$hrHRmodulejs,
"hu-HU": $5FSX7$huHUmodulejs,
"it-IT": $5FSX7$itITmodulejs,
"ja-JP": $5FSX7$jaJPmodulejs,
"ko-KR": $5FSX7$koKRmodulejs,
"lt-LT": $5FSX7$ltLTmodulejs,
"lv-LV": $5FSX7$lvLVmodulejs,
"nb-NO": $5FSX7$nbNOmodulejs,
"nl-NL": $5FSX7$nlNLmodulejs,
"pl-PL": $5FSX7$plPLmodulejs,
"pt-BR": $5FSX7$ptBRmodulejs,
"pt-PT": $5FSX7$ptPTmodulejs,
"ro-RO": $5FSX7$roROmodulejs,
"ru-RU": $5FSX7$ruRUmodulejs,
"sk-SK": $5FSX7$skSKmodulejs,
"sl-SI": $5FSX7$slSImodulejs,
"sr-SP": $5FSX7$srSPmodulejs,
"sv-SE": $5FSX7$svSEmodulejs,
"tr-TR": $5FSX7$trTRmodulejs,
"uk-UA": $5FSX7$ukUAmodulejs,
"zh-CN": $5FSX7$zhCNmodulejs,
"zh-TW": $5FSX7$zhTWmodulejs
};
export {$2cbb7ca666678a14$exports as default};
//# sourceMappingURL=intlStrings.module.js.map
@@ -0,0 +1,65 @@
# remove-bom-buffer [![NPM version](https://img.shields.io/npm/v/remove-bom-buffer.svg?style=flat)](https://www.npmjs.com/package/remove-bom-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/remove-bom-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/remove-bom-buffer)
> Remove a byte order mark (BOM) from a buffer.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save remove-bom-buffer
```
## Usage
```js
var remove = require('remove-bom-buffer');
remove(new Buffer('\ufefffoo'));
```
## About
### Related projects
* [cr](https://www.npmjs.com/package/cr): Strip windows carriage returns, or convert carriage returns to newlines. | [homepage](https://github.com/jonschlinkert/cr "Strip windows carriage returns, or convert carriage returns to newlines.")
* [has-bom](https://www.npmjs.com/package/has-bom): Returns true if a buffer or string has a byte order mark (BOM) | [homepage](https://github.com/jonschlinkert/has-bom "Returns true if a buffer or string has a byte order mark (BOM)")
* [read-file](https://www.npmjs.com/package/read-file): Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding… [more](https://github.com/jonschlinkert/read-file) | [homepage](https://github.com/jonschlinkert/read-file "Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding is chosen. Also optionally replaces windows newlines with unix newlines.")
* [strip-bom-string](https://www.npmjs.com/package/strip-bom-string): Strip a byte order mark (BOM) from a string. | [homepage](https://github.com/jonschlinkert/strip-bom-string "Strip a byte order mark (BOM) from a string.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 16, 2017._
@@ -0,0 +1,14 @@
import { describe, it, expect } from "vitest";
import * as entities from "./index.js";
describe("escape HTML", () => {
it("should escape HTML attribute values", () =>
expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe(
"<a &quot; attr > &amp; value &nbsp;!",
));
it("should escape HTML text", () =>
expect(entities.escapeText('<a " text > & value \u00A0!')).toBe(
'&lt;a " text &gt; &amp; value &nbsp;!',
));
});
@@ -0,0 +1 @@
{"version":3,"names":["_async","require","once","fn","result","resultP","promiseReferenced","waitFor","isAsync","ok","value","error","resolve","reject","Promise","res","rej"],"sources":["../../src/gensync-utils/functional.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async.ts\";\n\nexport function once<R>(fn: () => Handler<R>): () => Handler<R> {\n let result: { ok: true; value: R } | { ok: false; value: unknown };\n let resultP: Promise<R>;\n let promiseReferenced = false;\n return function* () {\n if (!result) {\n if (resultP) {\n promiseReferenced = true;\n return yield* waitFor(resultP);\n }\n\n if (!(yield* isAsync())) {\n try {\n result = { ok: true, value: yield* fn() };\n } catch (error) {\n result = { ok: false, value: error };\n }\n } else {\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = { ok: true, value: yield* fn() };\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n // We only resolve/reject the promise if it has been actually\n // referenced. If there are no listeners we can forget about it.\n // In the reject case, this avoid uncatchable unhandledRejection\n // events.\n if (promiseReferenced) resolve(result.value);\n } catch (error) {\n result = { ok: false, value: error };\n resultP = null;\n if (promiseReferenced) reject(error);\n }\n }\n }\n\n if (result.ok) return result.value;\n else throw result.value;\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,IAAIA,CAAIC,EAAoB,EAAoB;EAC9D,IAAIC,MAA8D;EAClE,IAAIC,OAAmB;EACvB,IAAIC,iBAAiB,GAAG,KAAK;EAC7B,OAAO,aAAa;IAClB,IAAI,CAACF,MAAM,EAAE;MACX,IAAIC,OAAO,EAAE;QACXC,iBAAiB,GAAG,IAAI;QACxB,OAAO,OAAO,IAAAC,cAAO,EAACF,OAAO,CAAC;MAChC;MAEA,IAAI,EAAE,OAAO,IAAAG,cAAO,EAAC,CAAC,CAAC,EAAE;QACvB,IAAI;UACFJ,MAAM,GAAG;YAAEK,EAAE,EAAE,IAAI;YAAEC,KAAK,EAAE,OAAOP,EAAE,CAAC;UAAE,CAAC;QAC3C,CAAC,CAAC,OAAOQ,KAAK,EAAE;UACdP,MAAM,GAAG;YAAEK,EAAE,EAAE,KAAK;YAAEC,KAAK,EAAEC;UAAM,CAAC;QACtC;MACF,CAAC,MAAM;QACL,IAAIC,OAA4B,EAAEC,MAAgC;QAClER,OAAO,GAAG,IAAIS,OAAO,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;UAClCJ,OAAO,GAAGG,GAAG;UACbF,MAAM,GAAGG,GAAG;QACd,CAAC,CAAC;QAEF,IAAI;UACFZ,MAAM,GAAG;YAAEK,EAAE,EAAE,IAAI;YAAEC,KAAK,EAAE,OAAOP,EAAE,CAAC;UAAE,CAAC;UAGzCE,OAAO,GAAG,IAAI;UAKd,IAAIC,iBAAiB,EAAEM,OAAO,CAACR,MAAM,CAACM,KAAK,CAAC;QAC9C,CAAC,CAAC,OAAOC,KAAK,EAAE;UACdP,MAAM,GAAG;YAAEK,EAAE,EAAE,KAAK;YAAEC,KAAK,EAAEC;UAAM,CAAC;UACpCN,OAAO,GAAG,IAAI;UACd,IAAIC,iBAAiB,EAAEO,MAAM,CAACF,KAAK,CAAC;QACtC;MACF;IACF;IAEA,IAAIP,MAAM,CAACK,EAAE,EAAE,OAAOL,MAAM,CAACM,KAAK,CAAC,KAC9B,MAAMN,MAAM,CAACM,KAAK;EACzB,CAAC;AACH;AAAC","ignoreList":[]}
@@ -0,0 +1,37 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/avatar-group-context.ts
var avatar_group_context_exports = {};
__export(avatar_group_context_exports, {
AvatarGroupProvider: () => AvatarGroupProvider,
useAvatarGroupContext: () => useAvatarGroupContext
});
module.exports = __toCommonJS(avatar_group_context_exports);
var import_react_utils = require("@heroui/react-utils");
var [AvatarGroupProvider, useAvatarGroupContext] = (0, import_react_utils.createContext)({
name: "AvatarGroupContext",
strict: false
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AvatarGroupProvider,
useAvatarGroupContext
});
@@ -0,0 +1,38 @@
'use strict';
var $TypeError = require('es-errors/type');
var IsDataDescriptor = require('./IsDataDescriptor');
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.4
module.exports = function FromPropertyDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return Desc;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (IsDataDescriptor(Desc)) {
return {
value: Desc['[[Value]]'],
writable: !!Desc['[[Writable]]'],
enumerable: !!Desc['[[Enumerable]]'],
configurable: !!Desc['[[Configurable]]']
};
} else if (IsAccessorDescriptor(Desc)) {
return {
get: Desc['[[Get]]'],
set: Desc['[[Set]]'],
enumerable: !!Desc['[[Enumerable]]'],
configurable: !!Desc['[[Configurable]]']
};
}
throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor');
};
@@ -0,0 +1,18 @@
"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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./awaited"), exports);
@@ -0,0 +1,208 @@
import type { $ZodCheck, $ZodStringFormats } from "./checks.js";
import { $constructor } from "./core.js";
import type { $ZodType } from "./schemas.js";
import * as util from "./util.js";
export interface $ZodIssueBase {
readonly code?: string;
readonly input?: unknown;
readonly path: PropertyKey[];
readonly message: string;
}
export interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {
readonly code: "invalid_type";
readonly expected: $ZodType["_zod"]["def"]["type"];
readonly input: Input;
}
export interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {
readonly code: "too_big";
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
readonly maximum: number | bigint;
readonly inclusive?: boolean;
readonly exact?: boolean;
readonly input: Input;
}
export interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {
readonly code: "too_small";
readonly origin: "number" | "int" | "bigint" | "date" | "string" | "array" | "set" | "file" | (string & {});
readonly minimum: number | bigint;
/** True if the allowable range includes the minimum */
readonly inclusive?: boolean;
/** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */
readonly exact?: boolean;
readonly input: Input;
}
export interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {
readonly code: "invalid_format";
readonly format: $ZodStringFormats | (string & {});
readonly pattern?: string;
readonly input: string;
}
export interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {
readonly code: "not_multiple_of";
readonly divisor: number;
readonly input: Input;
}
export interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {
readonly code: "unrecognized_keys";
readonly keys: string[];
readonly input: Record<string, unknown>;
}
export interface $ZodIssueInvalidUnion extends $ZodIssueBase {
readonly code: "invalid_union";
readonly errors: $ZodIssue[][];
readonly input: unknown;
}
export interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
readonly code: "invalid_key";
readonly origin: "map" | "record";
readonly issues: $ZodIssue[];
readonly input: Input;
}
export interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {
readonly code: "invalid_element";
readonly origin: "map" | "set";
readonly key: unknown;
readonly issues: $ZodIssue[];
readonly input: Input;
}
export interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {
readonly code: "invalid_value";
readonly values: util.Primitive[];
readonly input: Input;
}
export interface $ZodIssueCustom extends $ZodIssueBase {
readonly code: "custom";
readonly params?: Record<string, any> | undefined;
readonly input: unknown;
}
export interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {
format: Exclude<$ZodStringFormats, "regex" | "jwt" | "starts_with" | "ends_with" | "includes">;
}
export interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {
format: "regex";
pattern: string;
}
export interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {
format: "jwt";
algorithm?: string;
}
export interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {
format: "starts_with";
prefix: string;
}
export interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {
format: "ends_with";
suffix: string;
}
export interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {
format: "includes";
includes: string;
}
export type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;
export type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;
export type $ZodIssueCode = $ZodIssue["code"];
export type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
type RawIssue<T extends $ZodIssueBase> = util.Flatten<util.MakePartial<T, "message" | "path"> & {
/** The input data */
readonly input?: unknown;
/** The schema or check that originated this issue. */
readonly inst?: $ZodType | $ZodCheck;
/** @deprecated Internal use only. If `true`, Zod will continue executing validation despite this issue. */
readonly continue?: boolean | undefined;
} & Record<string, any>>;
export interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {
(issue: $ZodRawIssue<T>): {
message: string;
} | string | undefined | null;
}
export interface $ZodError<T = unknown> extends Error {
type: T;
issues: $ZodIssue[];
_zod: {
output: T;
def: $ZodIssue[];
};
stack?: string;
name: string;
}
export declare const $ZodError: $constructor<$ZodError>;
interface $ZodRealError<T = any> extends $ZodError<T> {
}
export declare const $ZodRealError: $constructor<$ZodRealError>;
export type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;
type _FlattenedError<T, U = string> = {
formErrors: U[];
fieldErrors: {
[P in keyof T]?: U[];
};
};
export declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;
export declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? {
[K in keyof T]?: $ZodFormattedError<T[K], U>;
} : T extends any[] ? {
[k: number]: $ZodFormattedError<T[number], U>;
} : T extends object ? util.Flatten<{
[K in keyof T]?: $ZodFormattedError<T[K], U>;
}> : any;
export type $ZodFormattedError<T, U = string> = {
_errors: U[];
} & util.Flatten<_ZodFormattedError<T, U>>;
export declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;
export declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;
export type $ZodErrorTree<T, U = string> = T extends [any, ...any[]] ? {
errors: U[];
items?: {
[K in keyof T]?: $ZodErrorTree<T[K], U>;
};
} : T extends any[] ? {
errors: U[];
items?: Array<$ZodErrorTree<T[number], U>>;
} : T extends object ? {
errors: U[];
properties?: {
[K in keyof T]?: $ZodErrorTree<T[K], U>;
};
} : {
errors: U[];
};
export declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;
export declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;
/** Format a ZodError as a human-readable string in the following form.
*
* From
*
* ```ts
* ZodError {
* issues: [
* {
* expected: 'string',
* code: 'invalid_type',
* path: [ 'username' ],
* message: 'Invalid input: expected string'
* },
* {
* expected: 'number',
* code: 'invalid_type',
* path: [ 'favoriteNumbers', 1 ],
* message: 'Invalid input: expected number'
* }
* ];
* }
* ```
*
* to
*
* ```
* username
* ✖ Expected number, received string at "username
* favoriteNumbers[0]
* ✖ Invalid input: expected number
* ```
*/
export declare function toDotPath(path: (string | number | symbol)[]): string;
interface BaseError {
issues: $ZodIssueBase[];
}
export declare function prettifyError(error: BaseError): string;
export {};
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Alexander Reardon
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,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isMissingLocaleDataError = isMissingLocaleDataError;
var tslib_1 = require("tslib");
var MissingLocaleDataError = /** @class */ (function (_super) {
tslib_1.__extends(MissingLocaleDataError, _super);
function MissingLocaleDataError() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = 'MISSING_LOCALE_DATA';
return _this;
}
return MissingLocaleDataError;
}(Error));
function isMissingLocaleDataError(e) {
return e.type === 'MISSING_LOCALE_DATA';
}
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,gBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;QAAK;KAAY;AACvB","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref, handleReset]);\n}\n"],"names":[],"version":3,"file":"useFormReset.module.js.map"}
@@ -0,0 +1,36 @@
{
"name": "@types/http-errors",
"version": "2.0.5",
"description": "TypeScript definitions for http-errors",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors",
"license": "MIT",
"contributors": [
{
"name": "Tanguy Krotoff",
"githubUsername": "tkrotoff",
"url": "https://github.com/tkrotoff"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
},
{
"name": "Sebastian Beltran",
"githubUsername": "bjohansebas",
"url": "https://github.com/bjohansebas"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/http-errors"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "621b9125a6493a2fa928b9150e335cb57429fb00e3bc0257426f1173903f7a4a",
"typeScriptVersion": "5.1"
}
@@ -0,0 +1,671 @@
// Generated file, do not edit! Run "yarn generate" to re-generate this file.
import {ContextualKeyword} from "./keywords";
import {TokenType as tt} from "./types";
// prettier-ignore
export const READ_WORD_TREE = new Int32Array([
// ""
-1, 27, 783, 918, 1755, 2376, 2862, 3483, -1, 3699, -1, 4617, 4752, 4833, 5130, 5508, 5940, -1, 6480, 6939, 7749, 8181, 8451, 8613, -1, 8829, -1,
// "a"
-1, -1, 54, 243, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 432, -1, -1, -1, 675, -1, -1, -1,
// "ab"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, -1, -1, -1, -1, -1, -1, -1,
// "abs"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, -1, -1, -1,
// "abst"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
// "abstr"
-1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "abstra"
-1, -1, -1, 189, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "abstrac"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 216, -1, -1, -1, -1, -1, -1,
// "abstract"
ContextualKeyword._abstract << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ac"
-1, -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "acc"
-1, -1, -1, -1, -1, 297, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "acce"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 324, -1, -1, -1, -1, -1, -1, -1,
// "acces"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, -1, -1,
// "access"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 378, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "accesso"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 405, -1, -1, -1, -1, -1, -1, -1, -1,
// "accessor"
ContextualKeyword._accessor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "as"
ContextualKeyword._as << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, -1, -1, -1, -1, -1, 594, -1,
// "ass"
-1, -1, -1, -1, -1, 486, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "asse"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 513, -1, -1, -1, -1, -1, -1, -1, -1,
// "asser"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 540, -1, -1, -1, -1, -1, -1,
// "assert"
ContextualKeyword._assert << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 567, -1, -1, -1, -1, -1, -1, -1,
// "asserts"
ContextualKeyword._asserts << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "asy"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 621, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "asyn"
-1, -1, -1, 648, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "async"
ContextualKeyword._async << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "aw"
-1, 702, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "awa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 729, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "awai"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 756, -1, -1, -1, -1, -1, -1,
// "await"
ContextualKeyword._await << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "b"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 810, -1, -1, -1, -1, -1, -1, -1, -1,
// "br"
-1, -1, -1, -1, -1, 837, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "bre"
-1, 864, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "brea"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "break"
(tt._break << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "c"
-1, 945, -1, -1, -1, -1, -1, -1, 1107, -1, -1, -1, 1242, -1, -1, 1350, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ca"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 972, 1026, -1, -1, -1, -1, -1, -1,
// "cas"
-1, -1, -1, -1, -1, 999, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "case"
(tt._case << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "cat"
-1, -1, -1, 1053, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "catc"
-1, -1, -1, -1, -1, -1, -1, -1, 1080, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "catch"
(tt._catch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ch"
-1, -1, -1, -1, -1, 1134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "che"
-1, -1, -1, 1161, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "chec"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1188, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "check"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1215, -1, -1, -1, -1, -1, -1, -1,
// "checks"
ContextualKeyword._checks << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "cl"
-1, 1269, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "cla"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1296, -1, -1, -1, -1, -1, -1, -1,
// "clas"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1323, -1, -1, -1, -1, -1, -1, -1,
// "class"
(tt._class << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "co"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1377, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "con"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1404, 1620, -1, -1, -1, -1, -1, -1,
// "cons"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1431, -1, -1, -1, -1, -1, -1,
// "const"
(tt._const << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1458, -1, -1, -1, -1, -1, -1, -1, -1,
// "constr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1485, -1, -1, -1, -1, -1,
// "constru"
-1, -1, -1, 1512, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "construc"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1539, -1, -1, -1, -1, -1, -1,
// "construct"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1566, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "constructo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1593, -1, -1, -1, -1, -1, -1, -1, -1,
// "constructor"
ContextualKeyword._constructor << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "cont"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 1647, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "conti"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1674, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "contin"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1701, -1, -1, -1, -1, -1,
// "continu"
-1, -1, -1, -1, -1, 1728, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "continue"
(tt._continue << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "d"
-1, -1, -1, -1, -1, 1782, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2349, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "de"
-1, -1, 1809, 1971, -1, -1, 2106, -1, -1, -1, -1, -1, 2241, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "deb"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1836, -1, -1, -1, -1, -1,
// "debu"
-1, -1, -1, -1, -1, -1, -1, 1863, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "debug"
-1, -1, -1, -1, -1, -1, -1, 1890, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "debugg"
-1, -1, -1, -1, -1, 1917, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "debugge"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1944, -1, -1, -1, -1, -1, -1, -1, -1,
// "debugger"
(tt._debugger << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "dec"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1998, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "decl"
-1, 2025, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "decla"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2052, -1, -1, -1, -1, -1, -1, -1, -1,
// "declar"
-1, -1, -1, -1, -1, 2079, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "declare"
ContextualKeyword._declare << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "def"
-1, 2133, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "defa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2160, -1, -1, -1, -1, -1,
// "defau"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2187, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "defaul"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2214, -1, -1, -1, -1, -1, -1,
// "default"
(tt._default << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "del"
-1, -1, -1, -1, -1, 2268, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "dele"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2295, -1, -1, -1, -1, -1, -1,
// "delet"
-1, -1, -1, -1, -1, 2322, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "delete"
(tt._delete << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "do"
(tt._do << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "e"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2403, -1, 2484, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2565, -1, -1,
// "el"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2430, -1, -1, -1, -1, -1, -1, -1,
// "els"
-1, -1, -1, -1, -1, 2457, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "else"
(tt._else << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "en"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2511, -1, -1, -1, -1, -1,
// "enu"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2538, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "enum"
ContextualKeyword._enum << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ex"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2592, -1, -1, -1, 2727, -1, -1, -1, -1, -1, -1,
// "exp"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2619, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "expo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2646, -1, -1, -1, -1, -1, -1, -1, -1,
// "expor"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2673, -1, -1, -1, -1, -1, -1,
// "export"
(tt._export << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2700, -1, -1, -1, -1, -1, -1, -1,
// "exports"
ContextualKeyword._exports << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ext"
-1, -1, -1, -1, -1, 2754, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "exte"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2781, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "exten"
-1, -1, -1, -1, 2808, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "extend"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2835, -1, -1, -1, -1, -1, -1, -1,
// "extends"
(tt._extends << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "f"
-1, 2889, -1, -1, -1, -1, -1, -1, -1, 2997, -1, -1, -1, -1, -1, 3159, -1, -1, 3213, -1, -1, 3294, -1, -1, -1, -1, -1,
// "fa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2916, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fal"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2943, -1, -1, -1, -1, -1, -1, -1,
// "fals"
-1, -1, -1, -1, -1, 2970, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "false"
(tt._false << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3024, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fin"
-1, 3051, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fina"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3078, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "final"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "finall"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3132, -1,
// "finally"
(tt._finally << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3186, -1, -1, -1, -1, -1, -1, -1, -1,
// "for"
(tt._for << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fro"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "from"
ContextualKeyword._from << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fu"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3321, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "fun"
-1, -1, -1, 3348, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "func"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3375, -1, -1, -1, -1, -1, -1,
// "funct"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 3402, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "functi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3429, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "functio"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3456, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "function"
(tt._function << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "g"
-1, -1, -1, -1, -1, 3510, -1, -1, -1, -1, -1, -1, 3564, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ge"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3537, -1, -1, -1, -1, -1, -1,
// "get"
ContextualKeyword._get << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "gl"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3591, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "glo"
-1, -1, 3618, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "glob"
-1, 3645, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "globa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3672, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "global"
ContextualKeyword._global << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "i"
-1, -1, -1, -1, -1, -1, 3726, -1, -1, -1, -1, -1, -1, 3753, 4077, -1, -1, -1, -1, 4590, -1, -1, -1, -1, -1, -1, -1,
// "if"
(tt._if << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "im"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3780, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "imp"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3807, -1, -1, 3996, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "impl"
-1, -1, -1, -1, -1, 3834, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "imple"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3861, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "implem"
-1, -1, -1, -1, -1, 3888, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "impleme"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3915, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "implemen"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3942, -1, -1, -1, -1, -1, -1,
// "implement"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3969, -1, -1, -1, -1, -1, -1, -1,
// "implements"
ContextualKeyword._implements << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "impo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4023, -1, -1, -1, -1, -1, -1, -1, -1,
// "impor"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4050, -1, -1, -1, -1, -1, -1,
// "import"
(tt._import << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "in"
(tt._in << 1) + 1, -1, -1, -1, -1, -1, 4104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4185, 4401, -1, -1, -1, -1, -1, -1,
// "inf"
-1, -1, -1, -1, -1, 4131, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "infe"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4158, -1, -1, -1, -1, -1, -1, -1, -1,
// "infer"
ContextualKeyword._infer << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ins"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4212, -1, -1, -1, -1, -1, -1,
// "inst"
-1, 4239, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "insta"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4266, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "instan"
-1, -1, -1, 4293, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "instanc"
-1, -1, -1, -1, -1, 4320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "instance"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "instanceo"
-1, -1, -1, -1, -1, -1, 4374, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "instanceof"
(tt._instanceof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "int"
-1, -1, -1, -1, -1, 4428, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "inte"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4455, -1, -1, -1, -1, -1, -1, -1, -1,
// "inter"
-1, -1, -1, -1, -1, -1, 4482, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "interf"
-1, 4509, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "interfa"
-1, -1, -1, 4536, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "interfac"
-1, -1, -1, -1, -1, 4563, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "interface"
ContextualKeyword._interface << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "is"
ContextualKeyword._is << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "k"
-1, -1, -1, -1, -1, 4644, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ke"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4671, -1,
// "key"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4698, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "keyo"
-1, -1, -1, -1, -1, -1, 4725, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "keyof"
ContextualKeyword._keyof << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "l"
-1, -1, -1, -1, -1, 4779, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "le"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4806, -1, -1, -1, -1, -1, -1,
// "let"
(tt._let << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "m"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 4860, -1, -1, -1, -1, -1, 4995, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "mi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4887, -1, -1,
// "mix"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 4914, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "mixi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4941, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "mixin"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4968, -1, -1, -1, -1, -1, -1, -1,
// "mixins"
ContextualKeyword._mixins << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "mo"
-1, -1, -1, -1, 5022, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "mod"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5049, -1, -1, -1, -1, -1,
// "modu"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5076, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "modul"
-1, -1, -1, -1, -1, 5103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "module"
ContextualKeyword._module << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "n"
-1, 5157, -1, -1, -1, 5373, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5427, -1, -1, -1, -1, -1,
// "na"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5184, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "nam"
-1, -1, -1, -1, -1, 5211, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "name"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5238, -1, -1, -1, -1, -1, -1, -1,
// "names"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "namesp"
-1, 5292, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "namespa"
-1, -1, -1, 5319, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "namespac"
-1, -1, -1, -1, -1, 5346, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "namespace"
ContextualKeyword._namespace << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ne"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5400, -1, -1, -1,
// "new"
(tt._new << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "nu"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5454, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "nul"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5481, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "null"
(tt._null << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "o"
-1, -1, -1, -1, -1, -1, 5535, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5562, -1, -1, -1, -1, 5697, 5751, -1, -1, -1, -1,
// "of"
ContextualKeyword._of << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "op"
-1, 5589, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "opa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5616, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "opaq"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5643, -1, -1, -1, -1, -1,
// "opaqu"
-1, -1, -1, -1, -1, 5670, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "opaque"
ContextualKeyword._opaque << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ou"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5724, -1, -1, -1, -1, -1, -1,
// "out"
ContextualKeyword._out << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ov"
-1, -1, -1, -1, -1, 5778, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ove"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5805, -1, -1, -1, -1, -1, -1, -1, -1,
// "over"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5832, -1, -1, -1, -1, -1, -1, -1, -1,
// "overr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 5859, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "overri"
-1, -1, -1, -1, 5886, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "overrid"
-1, -1, -1, -1, -1, 5913, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "override"
ContextualKeyword._override << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "p"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5967, -1, -1, 6345, -1, -1, -1, -1, -1,
// "pr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 5994, -1, -1, -1, -1, -1, 6129, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "pri"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6021, -1, -1, -1, -1,
// "priv"
-1, 6048, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "priva"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6075, -1, -1, -1, -1, -1, -1,
// "privat"
-1, -1, -1, -1, -1, 6102, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "private"
ContextualKeyword._private << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "pro"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6156, -1, -1, -1, -1, -1, -1,
// "prot"
-1, -1, -1, -1, -1, 6183, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6318, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "prote"
-1, -1, -1, 6210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "protec"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6237, -1, -1, -1, -1, -1, -1,
// "protect"
-1, -1, -1, -1, -1, 6264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "protecte"
-1, -1, -1, -1, 6291, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "protected"
ContextualKeyword._protected << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "proto"
ContextualKeyword._proto << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "pu"
-1, -1, 6372, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "pub"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6399, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "publ"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 6426, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "publi"
-1, -1, -1, 6453, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "public"
ContextualKeyword._public << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "r"
-1, -1, -1, -1, -1, 6507, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "re"
-1, 6534, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6696, -1, -1, 6831, -1, -1, -1, -1, -1, -1,
// "rea"
-1, -1, -1, -1, 6561, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "read"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6588, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "reado"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6615, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "readon"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6642, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "readonl"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6669, -1,
// "readonly"
ContextualKeyword._readonly << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "req"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6723, -1, -1, -1, -1, -1,
// "requ"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 6750, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "requi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6777, -1, -1, -1, -1, -1, -1, -1, -1,
// "requir"
-1, -1, -1, -1, -1, 6804, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "require"
ContextualKeyword._require << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ret"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6858, -1, -1, -1, -1, -1,
// "retu"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6885, -1, -1, -1, -1, -1, -1, -1, -1,
// "retur"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6912, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "return"
(tt._return << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "s"
-1, 6966, -1, -1, -1, 7182, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7236, 7371, -1, 7479, -1, 7614, -1,
// "sa"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 6993, -1, -1, -1, -1, -1, -1,
// "sat"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 7020, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sati"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7047, -1, -1, -1, -1, -1, -1, -1,
// "satis"
-1, -1, -1, -1, -1, -1, 7074, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "satisf"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 7101, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "satisfi"
-1, -1, -1, -1, -1, 7128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "satisfie"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7155, -1, -1, -1, -1, -1, -1, -1,
// "satisfies"
ContextualKeyword._satisfies << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "se"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7209, -1, -1, -1, -1, -1, -1,
// "set"
ContextualKeyword._set << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "st"
-1, 7263, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sta"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7290, -1, -1, -1, -1, -1, -1,
// "stat"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 7317, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "stati"
-1, -1, -1, 7344, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "static"
ContextualKeyword._static << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "su"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sup"
-1, -1, -1, -1, -1, 7425, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "supe"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7452, -1, -1, -1, -1, -1, -1, -1, -1,
// "super"
(tt._super << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sw"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 7506, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "swi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7533, -1, -1, -1, -1, -1, -1,
// "swit"
-1, -1, -1, 7560, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "switc"
-1, -1, -1, -1, -1, -1, -1, -1, 7587, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "switch"
(tt._switch << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sy"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7641, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "sym"
-1, -1, 7668, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "symb"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7695, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "symbo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7722, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "symbol"
ContextualKeyword._symbol << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "t"
-1, -1, -1, -1, -1, -1, -1, -1, 7776, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7938, -1, -1, -1, -1, -1, -1, 8046, -1,
// "th"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 7803, -1, -1, -1, -1, -1, -1, -1, -1, 7857, -1, -1, -1, -1, -1, -1, -1, -1,
// "thi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7830, -1, -1, -1, -1, -1, -1, -1,
// "this"
(tt._this << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "thr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7884, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "thro"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7911, -1, -1, -1,
// "throw"
(tt._throw << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "tr"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7965, -1, -1, -1, 8019, -1,
// "tru"
-1, -1, -1, -1, -1, 7992, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "true"
(tt._true << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "try"
(tt._try << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "ty"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8073, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "typ"
-1, -1, -1, -1, -1, 8100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "type"
ContextualKeyword._type << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8127, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "typeo"
-1, -1, -1, -1, -1, -1, 8154, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "typeof"
(tt._typeof << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "u"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8208, -1, -1, -1, -1, 8343, -1, -1, -1, -1, -1, -1, -1,
// "un"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 8235, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "uni"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8262, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "uniq"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8289, -1, -1, -1, -1, -1,
// "uniqu"
-1, -1, -1, -1, -1, 8316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "unique"
ContextualKeyword._unique << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "us"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 8370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "usi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8397, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "usin"
-1, -1, -1, -1, -1, -1, -1, 8424, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "using"
ContextualKeyword._using << 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "v"
-1, 8478, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8532, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "va"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8505, -1, -1, -1, -1, -1, -1, -1, -1,
// "var"
(tt._var << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "vo"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 8559, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "voi"
-1, -1, -1, -1, 8586, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "void"
(tt._void << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "w"
-1, -1, -1, -1, -1, -1, -1, -1, 8640, 8748, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "wh"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 8667, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "whi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8694, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "whil"
-1, -1, -1, -1, -1, 8721, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "while"
(tt._while << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "wi"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8775, -1, -1, -1, -1, -1, -1,
// "wit"
-1, -1, -1, -1, -1, -1, -1, -1, 8802, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "with"
(tt._with << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "y"
-1, -1, -1, -1, -1, -1, -1, -1, -1, 8856, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "yi"
-1, -1, -1, -1, -1, 8883, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "yie"
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8910, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "yiel"
-1, -1, -1, -1, 8937, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
// "yield"
(tt._yield << 1) + 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
]);
@@ -0,0 +1,80 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("create enum", () => {
const MyEnum = z.enum(["Red", "Green", "Blue"]);
expect(MyEnum.Values.Red).toEqual("Red");
expect(MyEnum.Enum.Red).toEqual("Red");
expect(MyEnum.enum.Red).toEqual("Red");
});
test("infer enum", () => {
const MyEnum = z.enum(["Red", "Green", "Blue"]);
type MyEnum = z.infer<typeof MyEnum>;
util.assertEqual<MyEnum, "Red" | "Green" | "Blue">(true);
});
test("get options", () => {
expect(z.enum(["tuna", "trout"]).options).toEqual(["tuna", "trout"]);
});
test("readonly enum", () => {
const HTTP_SUCCESS = ["200", "201"] as const;
const arg = z.enum(HTTP_SUCCESS);
type arg = z.infer<typeof arg>;
util.assertEqual<arg, "200" | "201">(true);
arg.parse("201");
expect(() => arg.parse("202")).toThrow();
});
test("error params", () => {
const result = z.enum(["test"], { required_error: "REQUIRED" }).safeParse(undefined);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].message).toEqual("REQUIRED");
}
});
test("extract/exclude", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
const FoodEnum = z.enum(foods);
const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
const UnhealthyEnum = FoodEnum.exclude(["Salad"]);
const EmptyFoodEnum = FoodEnum.exclude(foods);
util.assertEqual<z.infer<typeof ItalianEnum>, "Pasta" | "Pizza">(true);
util.assertEqual<z.infer<typeof UnhealthyEnum>, "Pasta" | "Pizza" | "Tacos" | "Burgers">(true);
// @ts-expect-error TS2344
util.assertEqual<typeof EmptyFoodEnum, z.ZodEnum<[]>>(true);
util.assertEqual<z.infer<typeof EmptyFoodEnum>, never>(true);
});
test("error map in extract/exclude", () => {
const foods = ["Pasta", "Pizza", "Tacos", "Burgers", "Salad"] as const;
const FoodEnum = z.enum(foods, {
errorMap: () => ({ message: "This is not food!" }),
});
const ItalianEnum = FoodEnum.extract(["Pasta", "Pizza"]);
const foodsError = FoodEnum.safeParse("Cucumbers");
const italianError = ItalianEnum.safeParse("Tacos");
if (!foodsError.success && !italianError.success) {
expect(foodsError.error.issues[0].message).toEqual(italianError.error.issues[0].message);
}
const UnhealthyEnum = FoodEnum.exclude(["Salad"], {
errorMap: () => ({ message: "This is not healthy food!" }),
});
const unhealthyError = UnhealthyEnum.safeParse("Salad");
if (!unhealthyError.success) {
expect(unhealthyError.error.issues[0].message).toEqual("This is not healthy food!");
}
});
test("readonly in ZodEnumDef", () => {
let _t!: z.ZodEnumDef<readonly ["a", "b"]>;
_t;
});
@@ -0,0 +1,22 @@
/**
* @fileoverview Universal module importer
*/
//-----------------------------------------------------------------------------
// Imports
//-----------------------------------------------------------------------------
import { createRequire } from "module";
import { fileURLToPath } from "url";
import { dirname } from "path";
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(__dirname + "/");
const { ModuleImporter } = require("./module-importer.cjs");
export { ModuleImporter };
@@ -0,0 +1 @@
{"version":3,"file":"no-dynamic-require.js","sourceRoot":"","sources":["../../src/rules/no-dynamic-require.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,SAAS,SAAS,CAAC,IAA6B;IAC9C,OAAO,CACL,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,YAAY;QAClC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;QAC9B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAC1B,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAA6B;IACpD,OAAO,CACL,IAAI,EAAE,MAAM;QAEZ,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAC9B,CAAA;AACH,CAAC;AAED,SAAS,aAAa,CACpB,IAAmB;IAEnB,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,SAAS;QACvB,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CACnE,CAAA;AACH,CAAC;AAQD,eAAe,UAAU,CAAwB;IAC/C,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,4CAA4C;SAC1D;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C;YACtD,OAAO,EAAE,+CAA+C;SACzD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAExC,OAAO;YACL,cAAc,CAAC,IAAI;gBACjB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3D,OAAM;gBACR,CAAC;gBACD,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpB,OAAO,OAAO,CAAC,MAAM,CAAC;wBACpB,IAAI;wBACJ,SAAS,EAAE,SAAS;qBACrB,CAAC,CAAA;gBACJ,CAAC;gBACD,IAAI,OAAO,CAAC,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC9C,OAAO,OAAO,CAAC,MAAM,CAAC;wBACpB,IAAI;wBACJ,SAAS,EAAE,QAAQ;qBACpB,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC;YACD,gBAAgB,CAAC,IAAI;gBACnB,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;oBACpD,OAAM;gBACR,CAAC;gBACD,OAAO,OAAO,CAAC,MAAM,CAAC;oBACpB,IAAI;oBACJ,SAAS,EAAE,QAAQ;iBACpB,CAAC,CAAA;YACJ,CAAC;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"validators.mjs","sources":["../../src/lib/validators.ts"],"sourcesContent":["const arbitraryValueRegex = /^\\[(?:([a-z-]+):)?(.+)\\]$/i\nconst fractionRegex = /^\\d+\\/\\d+$/\nconst stringLengths = new Set(['px', 'full', 'screen'])\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/\nconst lengthUnitRegex =\n /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/\n// Shadow always begins with x and y offset separated by underscore\nconst shadowRegex = /^-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/\n\nexport function isLength(value: string) {\n return (\n isNumber(value) ||\n stringLengths.has(value) ||\n fractionRegex.test(value) ||\n isArbitraryLength(value)\n )\n}\n\nexport function isArbitraryLength(value: string) {\n return getIsArbitraryValue(value, 'length', isLengthOnly)\n}\n\nexport function isArbitrarySize(value: string) {\n return getIsArbitraryValue(value, 'size', isNever)\n}\n\nexport function isArbitraryPosition(value: string) {\n return getIsArbitraryValue(value, 'position', isNever)\n}\n\nexport function isArbitraryUrl(value: string) {\n return getIsArbitraryValue(value, 'url', isUrl)\n}\n\nexport function isArbitraryNumber(value: string) {\n return getIsArbitraryValue(value, 'number', isNumber)\n}\n\n/**\n * @deprecated Will be removed in next major version. Use `isArbitraryNumber` instead.\n */\nexport const isArbitraryWeight = isArbitraryNumber\n\nexport function isNumber(value: string) {\n return !Number.isNaN(Number(value))\n}\n\nexport function isPercent(value: string) {\n return value.endsWith('%') && isNumber(value.slice(0, -1))\n}\n\nexport function isInteger(value: string) {\n return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly)\n}\n\nexport function isArbitraryValue(value: string) {\n return arbitraryValueRegex.test(value)\n}\n\nexport function isAny() {\n return true\n}\n\nexport function isTshirtSize(value: string) {\n return tshirtUnitRegex.test(value)\n}\n\nexport function isArbitraryShadow(value: string) {\n return getIsArbitraryValue(value, '', isShadow)\n}\n\nfunction getIsArbitraryValue(value: string, label: string, testValue: (value: string) => boolean) {\n const result = arbitraryValueRegex.exec(value)\n\n if (result) {\n if (result[1]) {\n return result[1] === label\n }\n\n return testValue(result[2]!)\n }\n\n return false\n}\n\nfunction isLengthOnly(value: string) {\n return lengthUnitRegex.test(value)\n}\n\nfunction isNever() {\n return false\n}\n\nfunction isUrl(value: string) {\n return value.startsWith('url(')\n}\n\nfunction isIntegerOnly(value: string) {\n return Number.isInteger(Number(value))\n}\n\nfunction isShadow(value: string) {\n return shadowRegex.test(value)\n}\n"],"names":["arbitraryValueRegex","fractionRegex","stringLengths","Set","tshirtUnitRegex","lengthUnitRegex","shadowRegex","isLength","value","isNumber","has","test","isArbitraryLength","getIsArbitraryValue","isLengthOnly","isArbitrarySize","isNever","isArbitraryPosition","isArbitraryUrl","isUrl","isArbitraryNumber","isArbitraryWeight","Number","isNaN","isPercent","endsWith","slice","isInteger","isIntegerOnly","isArbitraryValue","isAny","isTshirtSize","isArbitraryShadow","isShadow","label","testValue","result","exec","startsWith"],"mappings":"AAAA,IAAMA,mBAAmB,GAAG,4BAA4B,CAAA;AACxD,IAAMC,aAAa,GAAG,YAAY,CAAA;AAClC,IAAMC,aAAa,gBAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;AACvD,IAAMC,eAAe,GAAG,kCAAkC,CAAA;AAC1D,IAAMC,eAAe,GACjB,2HAA2H,CAAA;AAC/H;AACA,IAAMC,WAAW,GAAG,wDAAwD,CAAA;AAEtE,SAAUC,QAAQ,CAACC,KAAa,EAAA;EAClC,OACIC,QAAQ,CAACD,KAAK,CAAC,IACfN,aAAa,CAACQ,GAAG,CAACF,KAAK,CAAC,IACxBP,aAAa,CAACU,IAAI,CAACH,KAAK,CAAC,IACzBI,iBAAiB,CAACJ,KAAK,CAAC,CAAA;AAEhC,CAAA;AAEM,SAAUI,iBAAiB,CAACJ,KAAa,EAAA;AAC3C,EAAA,OAAOK,mBAAmB,CAACL,KAAK,EAAE,QAAQ,EAAEM,YAAY,CAAC,CAAA;AAC7D,CAAA;AAEM,SAAUC,eAAe,CAACP,KAAa,EAAA;AACzC,EAAA,OAAOK,mBAAmB,CAACL,KAAK,EAAE,MAAM,EAAEQ,OAAO,CAAC,CAAA;AACtD,CAAA;AAEM,SAAUC,mBAAmB,CAACT,KAAa,EAAA;AAC7C,EAAA,OAAOK,mBAAmB,CAACL,KAAK,EAAE,UAAU,EAAEQ,OAAO,CAAC,CAAA;AAC1D,CAAA;AAEM,SAAUE,cAAc,CAACV,KAAa,EAAA;AACxC,EAAA,OAAOK,mBAAmB,CAACL,KAAK,EAAE,KAAK,EAAEW,KAAK,CAAC,CAAA;AACnD,CAAA;AAEM,SAAUC,iBAAiB,CAACZ,KAAa,EAAA;AAC3C,EAAA,OAAOK,mBAAmB,CAACL,KAAK,EAAE,QAAQ,EAAEC,QAAQ,CAAC,CAAA;AACzD,CAAA;AAEA;;AAEG;AACI,IAAMY,iBAAiB,GAAGD,kBAAiB;AAE5C,SAAUX,QAAQ,CAACD,KAAa,EAAA;EAClC,OAAO,CAACc,MAAM,CAACC,KAAK,CAACD,MAAM,CAACd,KAAK,CAAC,CAAC,CAAA;AACvC,CAAA;AAEM,SAAUgB,SAAS,CAAChB,KAAa,EAAA;AACnC,EAAA,OAAOA,KAAK,CAACiB,QAAQ,CAAC,GAAG,CAAC,IAAIhB,QAAQ,CAACD,KAAK,CAACkB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;AAC9D,CAAA;AAEM,SAAUC,SAAS,CAACnB,KAAa,EAAA;AACnC,EAAA,OAAOoB,aAAa,CAACpB,KAAK,CAAC,IAAIK,mBAAmB,CAACL,KAAK,EAAE,QAAQ,EAAEoB,aAAa,CAAC,CAAA;AACtF,CAAA;AAEM,SAAUC,gBAAgB,CAACrB,KAAa,EAAA;AAC1C,EALine truncated
@@ -0,0 +1,15 @@
function formatDependency(params, idx) {
if (params === null) {
return `at position #${idx}`;
}
const argName = params.split(",")[idx].trim();
return `"${argName}" at position #${idx}`;
}
function composeErrorMessage(msg, e, indent = " ") {
return [msg, ...e.message.split("\n").map(l => indent + l)].join("\n");
}
export function formatErrorCtor(ctor, paramIdx, error) {
const [, params = null] = ctor.toString().match(/constructor\(([\w, ]+)\)/) || [];
const dep = formatDependency(params, paramIdx);
return composeErrorMessage(`Cannot inject the dependency ${dep} of "${ctor.name}" constructor. Reason:`, error);
}
@@ -0,0 +1,9 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const InfoCircleIcon: (props: IconSvgProps & {
className?: string;
}) => react_jsx_runtime.JSX.Element;
export { InfoCircleIcon };
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_te=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"te",weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAID,MAAM,qCAAe,IAAI,IAAI;IAC3B;CACD;AAED,MAAM,2CAAqB,IAAI,IAAI;IACjC;IACA;IACA;IACA;CACD;AAED,gCAAgC;AAChC,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAM,oCAAc,IAAI,IAAI;IAC1B;IACA;IACA;IACA;IACA;CACD;AAED,MAAM,qCAAe,IAAI,IAAI;IAC3B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAmBD,MAAM,+BAAS;AAOR,SAAS,0CAAe,KAAwE,EAAE,OAAgB,CAAC,CAAC;IACzH,IAAI,aAAC,SAAS,UAAE,MAAM,UAAE,MAAM,UAAE,SAAS,mBAAQ,SAAS,EAAC,GAAG;IAC9D,IAAI,gBAAgB,CAAC;IAErB,IAAK,MAAM,QAAQ,MACjB,IACE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,SAC1C,CAAA,mCAAa,GAAG,CAAC,SAChB,aAAa,yCAAmB,GAAG,CAAC,SACpC,UAAU,oCAAc,GAAG,CAAC,SAC5B,UAAU,kCAAY,GAAG,CAAC,SAC1B,UAAU,mCAAa,GAAG,CAAC,SAAU,KAAK,QAAQ,CAAC,cAAc,mCAAa,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,SACjG,sBAAA,gCAAA,UAAW,GAAG,CAAC,UACf,6BAAO,IAAI,CAAC,KAAI,GAGlB,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAIrC,OAAO;AACT","sources":["packages/@react-aria/utils/src/filterDOMProps.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, GlobalDOMAttributes, LinkDOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n 'id'\n]);\n\nconst labelablePropNames = new Set([\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-details'\n]);\n\n// See LinkDOMProps in dom.d.ts.\nconst linkPropNames = new Set([\n 'href',\n 'hrefLang',\n 'target',\n 'rel',\n 'download',\n 'ping',\n 'referrerPolicy'\n]);\n\nconst globalAttrs = new Set([\n 'dir',\n 'lang',\n 'hidden',\n 'inert',\n 'translate'\n]);\n\nconst globalEvents = new Set([\n 'onClick',\n 'onAuxClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onPointerDown',\n 'onPointerMove',\n 'onPointerUp',\n 'onPointerCancel',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerOver',\n 'onPointerOut',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n 'onScroll',\n 'onWheel',\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n 'onTransitionCancel',\n 'onTransitionEnd',\n 'onTransitionRun',\n 'onTransitionStart'\n]);\n\ninterface Options {\n /**\n * If labelling associated aria properties should be included in the filter.\n */\n labelable?: boolean,\n /** Whether the element is a link and should include DOM props for <a> elements. */\n isLink?: boolean,\n /** Whether to include global DOM attributes. */\n global?: boolean,\n /** Whether to include DOM events. */\n events?: boolean,\n /**\n * A Set of other property names that should be included in the filter.\n */\n propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps & GlobalDOMAttributes, opts: Options = {}): DOMProps & AriaLabelingProps & GlobalDOMAttributes {\n let {labelable, isLink, global, events = global, propNames} = opts;\n let filteredProps = {};\n\n for (const prop in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, prop) && (\n DOMPropNames.has(prop) ||\n (labelable && labelablePropNames.has(prop)) ||\n (isLink && linkPropNames.has(prop)) ||\n (global && globalAttrs.has(prop)) ||\n (events && globalEvents.has(prop) || (prop.endsWith('Capture') && globalEvents.has(prop.slice(0, -7)))) ||\n propNames?.has(prop) ||\n propRe.test(prop)\n )\n ) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n"],"names":[],"version":3,"file":"filterDOMProps.module.js.map"}
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AA8BM,SAAS,0CAAU,KAAsB,EAAE,KAAkB,EAAE,GAAuC;IAC3G,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,cAAE,UAAU,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE,OAAO,OAAO;IAEtG,OAAO;oBACL;QACA,YAAY;YACV,GAAG,UAAU;YACb,MAAM;YACN,SAAS;QACX;oBACA;mBACA;oBACA;oBACA;IACF;AACF","sources":["packages/@react-aria/switch/src/useSwitch.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaSwitchProps} from '@react-types/switch';\nimport {InputHTMLAttributes, LabelHTMLAttributes} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {ToggleState} from '@react-stately/toggle';\nimport {useToggle} from '@react-aria/toggle';\n\nexport interface SwitchAria {\n /** Props for the label wrapper element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props for the input element. */\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n /** Whether the switch is selected. */\n isSelected: boolean,\n /** Whether the switch is in a pressed state. */\n isPressed: boolean,\n /** Whether the switch is disabled. */\n isDisabled: boolean,\n /** Whether the switch is read only. */\n isReadOnly: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a switch component.\n * A switch is similar to a checkbox, but represents on/off values as opposed to selection.\n * @param props - Props for the switch.\n * @param state - State for the switch, as returned by `useToggleState`.\n * @param ref - Ref to the HTML input element.\n */\nexport function useSwitch(props: AriaSwitchProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): SwitchAria {\n let {labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly} = useToggle(props, state, ref);\n\n return {\n labelProps,\n inputProps: {\n ...inputProps,\n role: 'switch',\n checked: isSelected\n },\n isSelected,\n isPressed,\n isDisabled,\n isReadOnly\n };\n}\n"],"names":[],"version":3,"file":"useSwitch.module.js.map"}
@@ -0,0 +1,41 @@
# jsx-a11y/no-distracting-elements
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Enforces that no distracting elements are used. Elements that can be visually distracting can cause accessibility issues with visually impaired users. Such elements are most likely deprecated, and should be avoided. By default, the following elements are visually distracting: `<marquee>` and `<blink>`.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/no-distracting-elements": [ 2, {
"elements": [ "marquee", "blink" ],
}],
}
}
```
For the `elements` option, these strings determine which JSX elements should be checked for usage. This shouldn't need to be configured unless you have a seriously compelling use case for these elements. You cannot add any additional elements than what is offered, as the schema is only valid with the provided enumerated list. If you have another element that you think may cause a11y issues due to visual impairment, please feel free to file an issue or send a PR!
### Succeed
```jsx
<div />
```
### Fail
```jsx
<marquee />
<blink />
```
## Accessibility guidelines
- [WCAG 2.2.2](https://www.w3.org/WAI/WCAG21/Understanding/pause-stop-hide)
### Resources
- [axe-core, marquee](https://dequeuniversity.com/rules/axe/3.2/marquee)
- [axe-core, blink](https://dequeuniversity.com/rules/axe/3.2/blink)
@@ -0,0 +1 @@
{"name":"@react-aria/i18n","version":"3.12.13","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/context.main.js":{"checkedAt":1794532106045,"integrity":"sha512-kmjmsYDlke5/bwC6YcheEoOpPFkheeNJHGF2JkGq6bw3mJfr457hS4mk/BSXWiVMdnojj3P2lT1s96GmAzWHIw==","mode":420,"size":3294},"dist/context.module.js":{"checkedAt":1794532106046,"integrity":"sha512-0IW/jgID4ET+Yb+MYVmdrsphc9tS14+9sxoSYXVkEw3TdAC6ZtcSCgknItEbshIsk6fnNYtw12VR6rJwVBrm1A==","mode":420,"size":2957},"server/index.js":{"checkedAt":1794532106046,"integrity":"sha512-FaTHqrL+29QqBfuWdveWzd1oKwGI/4DnBT5Td7XrIf4/HT+BeOQTnfKGE5N8rXRsIvHGWo7zyiiSGxo5k+kP6w==","mode":420,"size":3526},"dist/main.js":{"checkedAt":1794532106046,"integrity":"sha512-WNWNzANHtAo8Cp5gUqD9Mbcsn9F2bN+mVFNBoiue6NwvDmb7dV2KOo6S01WmTHdxVK1LCFiUbPI1HukvZIDPXg==","mode":420,"size":2527},"src/main.js":{"checkedAt":1794532106046,"integrity":"sha512-ysLxfVpcf8l4u59UTkvnBR/Dd3BAIVd3QarR2pf/ZmckU3INF+hx+J1nTuxbcPe9VhJnfFq8pl2FBzRtpiGiFg==","mode":420,"size":496},"dist/module.js":{"checkedAt":1794532106046,"integrity":"sha512-cOfm5e/va76Hz3c4daCn6DJ6s/YR7RYbIrXzfV7WahP3o2SaTt/cjVW+wHfzobGZHNEitIty4ponOz0Uqav6jg==","mode":420,"size":2435},"src/module.js":{"checkedAt":1794532106046,"integrity":"sha512-5VTr1yCdT5aztFZEB7iudCU2fA3vdueS2hzEv5I4eOKiLTkAhviijcCwQ33C3qiAMJdcXTESZz4vaLNQjRkI1A==","mode":420,"size":423},"dist/useCollator.main.js":{"checkedAt":1794532106047,"integrity":"sha512-Yj2JNDH0TqI3Mrgp6tpfiatuwKURCwF+Mi1Y5o3s0ZnI5Ag2DpP64+fB3smhOsJTKcn/PFfF+oBfu5+p5wzN/A==","mode":420,"size":1487},"dist/useCollator.module.js":{"checkedAt":1794532106047,"integrity":"sha512-tfSJlW6p3w4eqXFW0b45ZPPuH4nJPTAUZFjkfjFQfmYe0oUep+gHIH7f0Lh3OhijI5I5vtZiJ1kzRqRRrjWa9g==","mode":420,"size":1367},"dist/useDateFormatter.main.js":{"checkedAt":1794532106047,"integrity":"sha512-NoxllaJBahDI0mwGLqE3b0sNYCdDV3o4LVio6S11AQpnBOuKZjrIU76ttj6qFNv5+gdqQj0BZW6kHhuuqW4UgA==","mode":420,"size":1967},"dist/useDateFormatter.module.js":{"checkedAt":1794532106047,"integrity":"sha512-ueTyoPGzDhk70NAiR521c3x+QjvwhHf8Y2ndff8IWkxspZzynNTFHMKl454sbQ/+mxFkx+5ZBRYBR/x/OCCZ7g==","mode":420,"size":1835},"dist/useDefaultLocale.main.js":{"checkedAt":1794532106047,"integrity":"sha512-egBRYZluf9WhvO9JcfeDNyYA03JHiTAJdfy0pcOZSJUQbopztbEHQ0nDTfnnbAZNXgMILcMSeVAzrjOU0yVzaw==","mode":420,"size":3069},"dist/useDefaultLocale.module.js":{"checkedAt":1794532106048,"integrity":"sha512-XKctwR8/uVC0Gw1KirJzPCcexAHsyCNNjVZtgmD9gdO+RByoNFFVyfptRAJ7PalbT3nVNJ9rrH2s+rh1G2wZxg==","mode":420,"size":3039},"dist/useFilter.main.js":{"checkedAt":1794532106048,"integrity":"sha512-7RoGiOX7aCz3y8felQNatCoWNvXm5R6+V7zrqoiKYl8kx8SFLS1tCVJfQhtQEXFBATwr0GmsN3N3+44ROKJ2Cw==","mode":420,"size":2801},"dist/useFilter.module.js":{"checkedAt":1794532106048,"integrity":"sha512-zHIK7CLCr5QJ/2zw4AG56KJWSyTfIXUlJZK/7NWoBDdFTunwpLBajba0gigPDyiWQlmraOrj/YTdDbSYtq5I/Q==","mode":420,"size":2704},"dist/useListFormatter.main.js":{"checkedAt":1794532106048,"integrity":"sha512-uDFCS8YGIdRWvfRXOHGPKL3+IXB6eazBNnVl1a+mx7Dhg5iPZfSKvm4BQ0wgm9c8IVHEmH/wvb+dgel32/cTjA==","mode":420,"size":1265},"dist/useListFormatter.module.js":{"checkedAt":1794532106048,"integrity":"sha512-RQbKfNv8fvi557hjOO5H4n9m2mhuwifARoPhyNwIobWPlPrCDJLP0eo1qpBlKnef9w56bf/lF4/cNB72ujWaXQ==","mode":420,"size":1151},"dist/useLocalizedStringFormatter.main.js":{"checkedAt":1794532106048,"integrity":"sha512-JKacSsWSIFgpBIEBCdmA044ltToyoACqiMFHUNajgQl01jNUN6wO6/taziyiVpyF/8TPwDshg+OvXGE+noIUPg==","mode":420,"size":2275},"dist/useLocalizedStringFormatter.module.js":{"checkedAt":1794532106048,"integrity":"sha512-aLOB9HE0M2WBai3oQZ3cvts0gwMBlqHJmkDpHCOXUnAN3Fe/ov+tBIBj0eozUSwZcx4otfDe5aJw200XmSbkaQ==","mode":420,"size":2142},"dist/useMessageFormatter.main.js":{"checkedAt":1794532106049,"integrity":"sha512-zCqdt9ZmlXOgqnN0YiZVPHr0yLU5Bm7HKlb+GCxK4XlquW8BmEM3ZHX7qnOl+VbQJ0ym4KEtf4HyxpurY14lxw==","mode":420,"size":2031},"dist/useMessageFormatter.module.js":{"checkedAt":1794532106049,"integrity":"sha512-hXPS5PPkjwKiGe8dJm8GqEwqz3AtqA3w2ldSEiV3ayB3s5xOrUONSFZWnn1V62i6nLvukBr/4QcafQUjNX2+Cg==","mode":420,"size":1948},"dist/useNumberFormatter.main.js":{"checkedAt":1794532106049,"integrity":"sha512-Y25i2cGO0TFYUPv5up8SAPWU7p8bSdw62x3GsCuPmypEmQi3MJHDUuYglMD1b1ZYZ2FO48WlA9ULO9weW6CoMA==","mode":420,"size":1383},"dist/useNumberFormatter.module.js":{"checkedAt":1794532106049,"integrity":"sha512-R4/fxdbd4MrRXUdVOjSopYcy7RUNwTS+vuxTVdmSODPXLm5jlmD1/kuTvgFt6AWViJFlXgSzApJIjaA3YB2a7A==","mode":420,"size":1255},"dist/utils.main.js":{"checkedAt":1794532106049,"integrity":"sha512-gxIZnhAMiHTD3Jkh5A8jPhd2lIM+AhfaNTjmbBvLOZktWpkL3pZd6YERDXQZavdCW2etSaK2AzOlsy6b6a5/Zg==","mode":420,"size":2481},"dist/utils.module.js":{"checkedAt":1794532106049,"integrity":"sha512-YujFCAaHPaDY6IBcEoQhOIm9dmF611abuwufv7EJbLi1Zs2qtT09fc5l2/NwjeBxCd8u0WPgdwuuidBZuZpKGw==","mode":420,"size":2325},"package.json":{"cLine truncated
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,kEAAkE;AAClE,2DAA2D;AAC3D,yDAAyD;AACzD,kHAAkH;;;;AAqB3G,SAAS,0CAA6D,KAAyB;IACpG,IAAI,cACF,UAAU,EACV,SAAS,WAAW,EACpB,QAAQ,UAAU,iBAClB,aAAa,EACd,GAAG;IAEJ,MAAM,SAAuC,CAAA,GAAA,kBAAU,EAAE,CAAC;QACxD,IAAI,EAAE,MAAM,KAAK,EAAE,aAAa,EAAE;YAChC,IAAI,YACF,WAAW;YAGb,IAAI,eACF,cAAc;YAGhB,OAAO;QACT;IACF,GAAG;QAAC;QAAY;KAAc;IAG9B,MAAM,mBAAmB,CAAA,GAAA,yCAAoB,EAAU;IAEvD,MAAM,UAAyC,CAAA,GAAA,kBAAU,EAAE,CAAC;QAC1D,kGAAkG;QAClG,oDAAoD;QAEpD,MAAM,gBAAgB,CAAA,GAAA,uBAAe,EAAE,EAAE,MAAM;QAC/C,MAAM,gBAAgB,gBAAgB,CAAA,GAAA,uBAAe,EAAE,iBAAiB,CAAA,GAAA,uBAAe;QACvF,IAAI,EAAE,MAAM,KAAK,EAAE,aAAa,IAAI,kBAAkB,CAAA,GAAA,qBAAa,EAAE,EAAE,WAAW,GAAG;YACnF,IAAI,aACF,YAAY;YAGd,IAAI,eACF,cAAc;YAGhB,iBAAiB;QACnB;IACF,GAAG;QAAC;QAAe;QAAa;KAAiB;IAEjD,OAAO;QACL,YAAY;YACV,SAAS,AAAC,CAAC,cAAe,CAAA,eAAe,iBAAiB,UAAS,IAAM,UAAU;YACnF,QAAQ,AAAC,CAAC,cAAe,CAAA,cAAc,aAAY,IAAM,SAAS;QACpE;IACF;AACF","sources":["packages/@react-aria/interactions/src/useFocus.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {DOMAttributes, FocusableElement, FocusEvents} from '@react-types/shared';\nimport {FocusEvent, useCallback} from 'react';\nimport {getActiveElement, getEventTarget, getOwnerDocument} from '@react-aria/utils';\nimport {useSyntheticBlurEvent} from './utils';\n\nexport interface FocusProps<Target = FocusableElement> extends FocusEvents<Target> {\n /** Whether the focus events should be disabled. */\n isDisabled?: boolean\n}\n\nexport interface FocusResult<Target = FocusableElement> {\n /** Props to spread onto the target element. */\n focusProps: DOMAttributes<Target>\n}\n\n/**\n * Handles focus events for the immediate target.\n * Focus events on child elements will be ignored.\n */\nexport function useFocus<Target extends FocusableElement = FocusableElement>(props: FocusProps<Target>): FocusResult<Target> {\n let {\n isDisabled,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n onFocusChange\n } = props;\n\n const onBlur: FocusProps<Target>['onBlur'] = useCallback((e: FocusEvent<Target>) => {\n if (e.target === e.currentTarget) {\n if (onBlurProp) {\n onBlurProp(e);\n }\n\n if (onFocusChange) {\n onFocusChange(false);\n }\n\n return true;\n }\n }, [onBlurProp, onFocusChange]);\n\n\n const onSyntheticFocus = useSyntheticBlurEvent<Target>(onBlur);\n\n const onFocus: FocusProps<Target>['onFocus'] = useCallback((e: FocusEvent<Target>) => {\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n\n const ownerDocument = getOwnerDocument(e.target);\n const activeElement = ownerDocument ? getActiveElement(ownerDocument) : getActiveElement();\n if (e.target === e.currentTarget && activeElement === getEventTarget(e.nativeEvent)) {\n if (onFocusProp) {\n onFocusProp(e);\n }\n\n if (onFocusChange) {\n onFocusChange(true);\n }\n\n onSyntheticFocus(e);\n }\n }, [onFocusChange, onFocusProp, onSyntheticFocus]);\n\n return {\n focusProps: {\n onFocus: (!isDisabled && (onFocusProp || onFocusChange || onBlurProp)) ? onFocus : undefined,\n onBlur: (!isDisabled && (onBlurProp || onFocusChange)) ? onBlur : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useFocus.module.js.map"}
@@ -0,0 +1,24 @@
(The MIT License)
Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
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,42 @@
{
"name": "@img/sharp-libvips-linux-x64",
"version": "1.2.4",
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
"repository": {
"type": "git",
"url": "git+https://github.com/lovell/sharp-libvips.git",
"directory": "npm/linux-x64"
},
"license": "LGPL-3.0-or-later",
"funding": {
"url": "https://opencollective.com/libvips"
},
"preferUnplugged": true,
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"versions.json"
],
"type": "commonjs",
"exports": {
"./lib": "./lib/index.js",
"./package": "./package.json",
"./versions": "./versions.json"
},
"config": {
"glibc": ">=2.26"
},
"os": [
"linux"
],
"libc": [
"glibc"
],
"cpu": [
"x64"
]
}
@@ -0,0 +1,4 @@
import Matcher from './matcher';
export default class PartialMatcher extends Matcher {
match(filepath: string): boolean;
}
@@ -0,0 +1,53 @@
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker.js').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => void} SyncHandler */
export class SyncWalker extends WalkerBase {
/**
*
* @param {SyncHandler} enter
* @param {SyncHandler} leave
*/
constructor(enter: (this: {
skip: () => void;
remove: () => void;
replace: (node: import("estree").BaseNode) => void;
}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void, leave: (this: {
skip: () => void;
remove: () => void;
replace: (node: import("estree").BaseNode) => void;
}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void);
/** @type {SyncHandler} */
enter: SyncHandler;
/** @type {SyncHandler} */
leave: SyncHandler;
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {BaseNode}
*/
visit(node: import("estree").BaseNode, parent: import("estree").BaseNode, prop?: string, index?: number): import("estree").BaseNode;
should_skip: any;
should_remove: any;
replacement: any;
}
export type BaseNode = import("estree").BaseNode;
export type WalkerContext = {
skip: () => void;
remove: () => void;
replace: (node: import("estree").BaseNode) => void;
};
export type SyncHandler = (this: {
skip: () => void;
remove: () => void;
replace: (node: import("estree").BaseNode) => void;
}, node: import("estree").BaseNode, parent: import("estree").BaseNode, key: string, index: number) => void;
import { WalkerBase } from "./walker.js";
@@ -0,0 +1,36 @@
'use strict';
exports.__esModule = true;
const Module = require('module');
const path = require('path');
// borrowed from babel-eslint
/** @type {(filename: string) => Module} */
function createModule(filename) {
const mod = new Module(filename);
mod.filename = filename;
// @ts-expect-error _nodeModulesPaths are undocumented
mod.paths = Module._nodeModulePaths(path.dirname(filename));
return mod;
}
/** @type {import('./module-require').default} */
exports.default = function moduleRequire(p) {
try {
// attempt to get espree relative to eslint
const eslintPath = require.resolve('eslint');
const eslintModule = createModule(eslintPath);
// @ts-expect-error _resolveFilename is undocumented
return require(Module._resolveFilename(p, eslintModule));
} catch (err) { /* ignore */ }
try {
// try relative to entry point
// @ts-expect-error TODO: figure out what this is
return require.main.require(p);
} catch (err) { /* ignore */ }
// finally, try from here
return require(p);
};
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.setCache = exports.getCache = exports.clearCache = void 0;
var _tslib = require("tslib");
var cache = new Map();
var setCache = exports.setCache = function setCache(key, cacheTime, cachedData) {
var currentCache = cache.get(key);
if (currentCache === null || currentCache === void 0 ? void 0 : currentCache.timer) {
clearTimeout(currentCache.timer);
}
var timer = undefined;
if (cacheTime > -1) {
// if cache out, clear it
timer = setTimeout(function () {
cache["delete"](key);
}, cacheTime);
}
cache.set(key, (0, _tslib.__assign)((0, _tslib.__assign)({}, cachedData), {
timer: timer
}));
};
var getCache = exports.getCache = function getCache(key) {
return cache.get(key);
};
var clearCache = exports.clearCache = function clearCache(key) {
if (key) {
var cacheKeys = Array.isArray(key) ? key : [key];
cacheKeys.forEach(function (cacheKey) {
return cache["delete"](cacheKey);
});
} else {
cache.clear();
}
};
@@ -0,0 +1,9 @@
export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts';
export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts';
export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
export type SourceMapLine = SourceMapSegment[];
export type SourceMapMappings = SourceMapLine[];
export declare function decode(mappings: string): SourceMapMappings;
export declare function encode(decoded: SourceMapMappings): string;
export declare function encode(decoded: Readonly<SourceMapMappings>): string;
//# sourceMappingURL=sourcemap-codec.d.ts.map
@@ -0,0 +1,87 @@
// Polish [pl]
import dayjs from '../index';
function plural(n) {
return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; // eslint-disable-line
}
/* eslint-disable */
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
}
/* eslint-enable */
var monthFormat = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
var monthStandalone = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
var MONTHS_IN_FORMAT = /D MMMM/;
var months = function months(dayjsInstance, format) {
if (MONTHS_IN_FORMAT.test(format)) {
return monthFormat[dayjsInstance.month()];
}
return monthStandalone[dayjsInstance.month()];
};
months.s = monthStandalone;
months.f = monthFormat;
var locale = {
name: 'pl',
weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
months: months,
monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
ordinal: function ordinal(n) {
return n + ".";
},
weekStart: 1,
yearStart: 4,
relativeTime: {
future: 'za %s',
past: '%s temu',
s: 'kilka sekund',
m: translate,
mm: translate,
h: translate,
hh: translate,
d: '1 dzień',
dd: '%d dni',
M: 'miesiąc',
MM: translate,
y: 'rok',
yy: translate
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"names":["_getBindingIdentifiers","require","isBinding","node","parent","grandparent","type","keys","getBindingIdentifiers","i","length","key","val","Array","isArray","includes"],"sources":["../../src/validators/isBinding.ts"],"sourcesContent":["import getBindingIdentifiers from \"../retrievers/getBindingIdentifiers.ts\";\nimport type * as t from \"../index.ts\";\n/**\n * Check if the input `node` is a binding identifier.\n */\nexport default function isBinding(\n node: t.Node,\n parent: t.Node,\n grandparent?: t.Node,\n): boolean {\n if (\n grandparent &&\n node.type === \"Identifier\" &&\n parent.type === \"ObjectProperty\" &&\n grandparent.type === \"ObjectExpression\"\n ) {\n // We need to special-case this, because getBindingIdentifiers\n // has an ObjectProperty->value entry for destructuring patterns.\n return false;\n }\n\n const keys = getBindingIdentifiers.keys[parent.type];\n if (keys) {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const val =\n // @ts-expect-error key must present in parent\n parent[key];\n if (Array.isArray(val)) {\n if (val.includes(node)) return true;\n } else {\n if (val === node) return true;\n }\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKe,SAASC,SAASA,CAC/BC,IAAY,EACZC,MAAc,EACdC,WAAoB,EACX;EACT,IACEA,WAAW,IACXF,IAAI,CAACG,IAAI,KAAK,YAAY,IAC1BF,MAAM,CAACE,IAAI,KAAK,gBAAgB,IAChCD,WAAW,CAACC,IAAI,KAAK,kBAAkB,EACvC;IAGA,OAAO,KAAK;EACd;EAEA,MAAMC,IAAI,GAAGC,8BAAqB,CAACD,IAAI,CAACH,MAAM,CAACE,IAAI,CAAC;EACpD,IAAIC,IAAI,EAAE;IACR,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,IAAI,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;MACpC,MAAME,GAAG,GAAGJ,IAAI,CAACE,CAAC,CAAC;MACnB,MAAMG,GAAG,GAEPR,MAAM,CAACO,GAAG,CAAC;MACb,IAAIE,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE;QACtB,IAAIA,GAAG,CAACG,QAAQ,CAACZ,IAAI,CAAC,EAAE,OAAO,IAAI;MACrC,CAAC,MAAM;QACL,IAAIS,GAAG,KAAKT,IAAI,EAAE,OAAO,IAAI;MAC/B;IACF;EACF;EAEA,OAAO,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"OneToManyMapStar.d.ts","sourceRoot":"","sources":["../../../../../src/common/models/__mocks__/OneToManyMapStar.ts"],"names":[],"mappings":"AAaA,qBAAa,gBAAgB,CAAC,MAAM,EAAE,SAAS,SAAS,MAAM;IAC5D,SAAgB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;IAClE,SAAgB,KAAK,EAAE,MAAM,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjE,SAAgB,GAAG,EAAE,CAAC,IAAI,SAAS,MAAM,SAAS,EAChD,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,KAC7B,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAElC,SAAgB,UAAU,EAAE,CAAC,IAAI,SAAS,MAAM,SAAS,EACvD,GAAG,EAAE,IAAI,KACN,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAE/B,SAAgB,gBAAgB,EAAE,CAAC,IAAI,SAAS,MAAM,SAAS,EAC7D,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,KAC7B,IAAI,CAAC;;CASX"}
@@ -0,0 +1,5 @@
<svg viewbox="0 0 18 18">
<path class="ql-fill" d="M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z"/>
<path class="ql-fill" d="M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z"/>
<rect class="ql-fill" x="3" y="6" width="12" height="6" rx="1" ry="1"/>
</svg>

After

Width:  |  Height:  |  Size: 250 B

@@ -0,0 +1 @@
{"name":"fonteditor-core","version":"2.6.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532118827,"integrity":"sha512-cMNS2+2RhmuKoCDXBXi0GCzpepc+JrQHLXqnQfOfyhM9Fy5R7egIkjlY2rW88rNun6MVpIbQsC9iulUkSRjsaA==","mode":420,"size":1072},"lib/common/ajaxFile.js":{"checkedAt":1794532118827,"integrity":"sha512-meQ71qFnvkU4WEwaigLCmJStvEWKWv7rDx7e4MGP0hvJYahRqq4fkxh39dKHJlVvgCp25gKUkxS60bZe8Or4Gw==","mode":420,"size":2251},"src/common/ajaxFile.js":{"checkedAt":1794532118827,"integrity":"sha512-//cX/XhOxW+ibYrqJkBcPPsm3MuXq34x3iudwYvLgW4wHQb0AWY0gBu3NoxebW0xmU2N7HMD5UgyzsZB3OOfYA==","mode":420,"size":2398},"lib/ttf/util/base642bytes.js":{"checkedAt":1794532118827,"integrity":"sha512-yrTT/Nr2qEjMhVwDXJTGkV6T1yMiR+l6UI1bUgEyQOcdXxnvS8VSfdJvoG2FNzw/jHZsjzOWTZrbMZ816I7hmw==","mode":420,"size":490},"src/ttf/util/base642bytes.js":{"checkedAt":1794532118827,"integrity":"sha512-yA9L0GWKh6mdIIAAVWq8Y3huM8nBd2NURHjfkVod5P52hQR8U3RNPqiPZB2O2KmCOpUOCQRMQfF9r23plRnWew==","mode":420,"size":412},"lib/math/bezierCubic2Q2.js":{"checkedAt":1794532118827,"integrity":"sha512-304sPBGKi0mCmNsT/R9bV1VeYF4tXFHs3qfUWaW4AML+Ov32abMVGrNGQYpE7pWXzdpapzDM6VAcZ1osSPjW4w==","mode":420,"size":1770},"src/math/bezierCubic2Q2.js":{"checkedAt":1794532118827,"integrity":"sha512-B1u4sRQ5Nk8CNbfKFMdmP5xK/gUoCkasXM3DIBCd1KRs5K2FVRPQqXtIS/wXse/byPYisnYzk7QLB0Kx2frHnQ==","mode":420,"size":2170},"lib/nodejs/buffer.js":{"checkedAt":1794532118828,"integrity":"sha512-Kr96055Peu/d8jfJSKZI35RKtnkbmRI5anKE51ujhTjR8mEta86LQZRPVRSY4OTVrt6ITHzvR4Q5pF4J4YiqoA==","mode":420,"size":1145},"src/nodejs/buffer.js":{"checkedAt":1794532118828,"integrity":"sha512-N2WrtIuGfgDieNs88Sbf0JV/wrFFyW4JGwrfCJ9mbjq+s/GXOjWC3mFtPLzalrVyf9/bkm01SnN1v6xXXYfryg==","mode":420,"size":1095},"lib/ttf/util/bytes2base64.js":{"checkedAt":1794532118828,"integrity":"sha512-FGqHjiHizVvJ8kx3epv0V5IOiGFNrX0WDrEHKuy87vsNoE41gRyTbE0b7b9IaTk686x9XpHxwE/8pFBuXMjWJQ==","mode":420,"size":936},"src/ttf/util/bytes2base64.js":{"checkedAt":1794532118828,"integrity":"sha512-L7MR0TB6a7L2KMamj/zh0s5r6eptsBi36lB+1qghcMGIdlWjWFYMNCBqyid0d8+2QK5tGEKMv/dNdlJ1b0VKZA==","mode":420,"size":927},"lib/ttf/table/CFF.js":{"checkedAt":1794532118828,"integrity":"sha512-rzJuUkLkDKvAZ/HcAfKXXDk35XgAgeqpa6iDwb6u+9dj1vM2+tgNcfp5lWg6nCRkjDc9l9YT8YCqK9HB2JoOcw==","mode":420,"size":7258},"src/ttf/table/CFF.js":{"checkedAt":1794532118828,"integrity":"sha512-LCg0Y0ilQCCblvksmeC7nBGnkXOB/+qo6r6pbgngWdzo/N1S9Okp3ZqY8Zr3HfGz0tcnOjMhfvpq7Oo5bl1Jvg==","mode":420,"size":8021},"lib/ttf/table/cff/cffStandardStrings.js":{"checkedAt":1794532118829,"integrity":"sha512-BifnBlbOeNAkI+Mzz9j5w+li2Vu2Ovo4a4EXBJwYsmbisfVzSWCC3SWKeVLK62MWONHSnNqzGrENhBPV/JdjUw==","mode":420,"size":4872},"src/ttf/table/cff/cffStandardStrings.js":{"checkedAt":1794532118829,"integrity":"sha512-IezMa0dYZOUcn9l+dLmmtbGsTne71+Aa0xoZ2Bl/n1/wcdGzCWGVwu1dCXR+zZsljuKN7pMKn6WXm03MA5fmIA==","mode":420,"size":4990},"lib/ttf/util/checkSum.js":{"checkedAt":1794532118829,"integrity":"sha512-5YZlhGz9/XEoHmu66RAFVz9qZURKY0ycOtpUY7UY3dI0D4sjo2PRIDm1Ok6FPoChLC/KjpRg8jN3bdKQDpAudg==","mode":420,"size":2156},"src/ttf/util/checkSum.js":{"checkedAt":1794532118829,"integrity":"sha512-UGSb6RmOrkRv1HfKA2pHwCOko4SILEax9Q7DNsM9eQAXvtVfQHZ3DKm+8K36gQgwDoClZ0840pcl3unbTHg7Kw==","mode":420,"size":2007},"lib/graphics/path/circle.js":{"checkedAt":1794532118829,"integrity":"sha512-IabnLHGRFLgeHPN70UdTobr30Xdl3e3vDs6z8Jm24ZFCI3k8R3XW/88J78ctutT2laaKYIf8slaYOqRh9d7pBw==","mode":420,"size":597},"src/graphics/path/circle.js":{"checkedAt":1794532118829,"integrity":"sha512-/B5ud7/30eMBZgP0kMnUi1Ja7FIPWZUp2fI0pvfLmbGhw7PnF794LuGxJ9Ij68lsSMmUTcS+/7IMSuuUBMmVLQ==","mode":420,"size":797},"lib/ttf/table/cmap.js":{"checkedAt":1794532118829,"integrity":"sha512-N6mzyJVxzPQoCEjZtRWMeeN6AurfKsquRPeHlxXeg8nGyT59e4QSt4w+QpMHE5/BdgtZf5LWX7XuqlwNbP7odA==","mode":420,"size":752},"src/ttf/table/cmap.js":{"checkedAt":1794532118830,"integrity":"sha512-oIJ/EIjmMoCNBQnd9cj3Hl5apj+FIQOppKKFjBAxjSDC9cTlvYE1g/cIWFZ0wQ4HBZuymqToVnJU5mwPmBwrpQ==","mode":420,"size":417},"lib/ttf/enum/componentFlag.js":{"checkedAt":1794532118830,"integrity":"sha512-kX6o7Erq6J/Fys+vApCvjfHJICblKIPrx6quumf7I/3FcOHU1/q5boglNRM+GJ26ejYhglqElBllkeuLnw/Z3w==","mode":420,"size":703},"src/ttf/enum/componentFlag.js":{"checkedAt":1794532118830,"integrity":"sha512-+zu0LLolvqFRrClkC43eATxgJJ871mK8TDqtjusWr/tpW/+YzcBc3eiFQr4PgspquuAKtjrmDfBsnI3AbJZr7Q==","mode":420,"size":607},"lib/ttf/util/compound2simple.js":{"checkedAt":1794532118830,"integrity":"sha512-6y6t0gWXvOA458CKczsxDw4NfA9n8bfsRHWqltaheglg/23FufDOAleYeEfMQxzu4hnUUO4D3GO9t6DOrncz6A==","mode":420,"size":593},"src/ttf/util/compound2simple.js":{"checkedAt":1794532118830,"integrity":"sha512-ukcLnSZXSJS99F3BcnN6RpJtYbiahsFTnH/pyZSDsEEda+dXqSMwnpRqE64bws9KqdNliVPgG/p/NQZFrqbMOg==","mode":420,"size":506},"lib/ttf/util/compound2simpleglyf.js":{"checkedAt":1794532118830,"integrity":"sha512-QTM7AVAcXDPFtE6ZkQcNk/W7evakgXgdJwTy6RrrOA+cPhDDKoPPRlXSwOzivut2SJYPPej9MnnM1cbI/2kPtw==","mode":420,"size":1496},Line truncated
@@ -0,0 +1,35 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
var hasToStringTag = require('has-tostringtag/shams')();
var hasOwn = require('hasown');
var $TypeError = require('es-errors/type');
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
/** @type {import('.')} */
module.exports = function setToStringTag(object, value) {
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
if (
(typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
|| (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
) {
throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
}
if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
if ($defineProperty) {
$defineProperty(object, toStringTag, {
configurable: !nonConfigurable,
enumerable: false,
value: value,
writable: false
});
} else {
object[toStringTag] = value; // eslint-disable-line no-param-reassign
}
}
};
@@ -0,0 +1,47 @@
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const path = {
delimiter: { [READ]: { supported: ["0.9.3"] } },
sep: { [READ]: { supported: ["0.7.9"] } },
basename: { [READ]: { supported: ["0.1.25"] } },
dirname: { [READ]: { supported: ["0.1.16"] } },
extname: { [READ]: { supported: ["0.1.25"] } },
format: { [READ]: { supported: ["0.11.15"] } },
matchesGlob: { [READ]: { experimental: ["22.5.0", "20.17.0"] } },
isAbsolute: { [READ]: { supported: ["0.11.2"] } },
join: { [READ]: { supported: ["0.1.16"] } },
normalize: { [READ]: { supported: ["0.1.23"] } },
parse: { [READ]: { supported: ["0.11.15"] } },
relative: { [READ]: { supported: ["0.5.0"] } },
resolve: { [READ]: { supported: ["0.3.4"] } },
toNamespacedPath: { [READ]: { supported: ["9.0.0"] } },
}
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
module.exports = {
path: {
[READ]: { supported: ["0.1.16"] },
posix: { [READ]: { supported: ["0.11.15"] }, ...path },
win32: { [READ]: { supported: ["0.11.15"] }, ...path },
...path,
},
"node:path": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
posix: { [READ]: { supported: ["0.11.15"] }, ...path },
win32: { [READ]: { supported: ["0.11.15"] }, ...path },
...path,
},
"path/posix": { [READ]: { supported: ["15.3.0"] }, ...path },
"node:path/posix": { [READ]: { supported: ["15.3.0"] }, ...path },
"path/win32": { [READ]: { supported: ["15.3.0"] }, ...path },
"node:path/win32": { [READ]: { supported: ["15.3.0"] }, ...path },
}
@@ -0,0 +1 @@
{"name":"wrap-ansi","version":"7.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532105700,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532105700,"integrity":"sha512-W1YCVU01xzlgEAzuYX6PIhQa0Rdkoa0qtft1ZdP4Y6ZmZrnr2coSwd8deGCg2zeTYfxIfL5mXonomh/dikRXrQ==","mode":493,"size":5772},"package.json":{"checkedAt":1794532105700,"integrity":"sha512-nGCxnbNKlLNwzcdIPCCWmhawz/l1k7NGx/C5ybzoBWf1S+v7mGjvROUURCeIclpHWA1ETGcO9KVhhEYhN0Tq9w==","mode":420,"size":1014},"readme.md":{"checkedAt":1794532105700,"integrity":"sha512-k3WuiBX0kOsXtTN5uGv6BYC3Gbs6lL4hKz+MnZrhTEywFcpPMXBe5H0WRsde0wdkT6L1ylQV9qXpgXbQIvRoXg==","mode":420,"size":2745}}}
@@ -0,0 +1,151 @@
#include <windows.h>
#include "TestUtil.cc"
const char *g_prefix = "";
static void dumpHandles() {
trace("%sSTDIN=0x%I64x STDOUT=0x%I64x STDERR=0x%I64x",
g_prefix,
(long long)GetStdHandle(STD_INPUT_HANDLE),
(long long)GetStdHandle(STD_OUTPUT_HANDLE),
(long long)GetStdHandle(STD_ERROR_HANDLE));
}
static HANDLE createBuffer() {
// If sa isn't provided, the handle defaults to not-inheritable.
SECURITY_ATTRIBUTES sa = {0};
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
trace("%sCreating a new buffer...", g_prefix);
HANDLE conout = CreateConsoleScreenBuffer(
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
&sa,
CONSOLE_TEXTMODE_BUFFER, NULL);
trace("%sCreating a new buffer... 0x%I64x", g_prefix, (long long)conout);
return conout;
}
static const char *successOrFail(BOOL ret) {
return ret ? "ok" : "FAILED";
}
static void setConsoleActiveScreenBuffer(HANDLE conout) {
trace("%sSetConsoleActiveScreenBuffer(0x%I64x) called...",
g_prefix, (long long)conout);
trace("%sSetConsoleActiveScreenBuffer(0x%I64x) called... %s",
g_prefix, (long long)conout,
successOrFail(SetConsoleActiveScreenBuffer(conout)));
}
static void writeTest(HANDLE conout, const char *msg) {
char writeData[256];
sprintf(writeData, "%s%s\n", g_prefix, msg);
trace("%sWriting to 0x%I64x: '%s'...",
g_prefix, (long long)conout, msg);
DWORD actual = 0;
BOOL ret = WriteConsoleA(conout, writeData, strlen(writeData), &actual, NULL);
trace("%sWriting to 0x%I64x: '%s'... %s",
g_prefix, (long long)conout, msg,
successOrFail(ret && actual == strlen(writeData)));
}
static HANDLE startChildInSameConsole(const wchar_t *args, BOOL
bInheritHandles=FALSE) {
wchar_t program[1024];
wchar_t cmdline[1024];
GetModuleFileNameW(NULL, program, 1024);
swprintf(cmdline, L"\"%ls\" %ls", program, args);
STARTUPINFOW sui;
PROCESS_INFORMATION pi;
memset(&sui, 0, sizeof(sui));
memset(&pi, 0, sizeof(pi));
sui.cb = sizeof(sui);
CreateProcessW(program, cmdline,
NULL, NULL,
/*bInheritHandles=*/bInheritHandles,
/*dwCreationFlags=*/0,
NULL, NULL,
&sui, &pi);
return pi.hProcess;
}
static HANDLE dup(HANDLE h, HANDLE targetProcess) {
HANDLE h2 = INVALID_HANDLE_VALUE;
BOOL ret = DuplicateHandle(
GetCurrentProcess(), h,
targetProcess, &h2,
0, TRUE, DUPLICATE_SAME_ACCESS);
trace("dup(0x%I64x) to process 0x%I64x... %s, 0x%I64x",
(long long)h,
(long long)targetProcess,
successOrFail(ret),
(long long)h2);
return h2;
}
int main(int argc, char *argv[]) {
if (argc == 1) {
startChildProcess(L"parent");
return 0;
}
if (!strcmp(argv[1], "parent")) {
g_prefix = "parent: ";
dumpHandles();
HANDLE hChild = startChildInSameConsole(L"child");
// Windows 10.
HANDLE orig1 = GetStdHandle(STD_OUTPUT_HANDLE);
HANDLE new1 = createBuffer();
Sleep(2000);
setConsoleActiveScreenBuffer(new1);
// Handle duplication results to child process in same console:
// - Windows XP: fails
// - Windows 7 Ultimate SP1 32-bit: fails
// - Windows Server 2008 R2 Datacenter SP1 64-bit: fails
// - Windows 8 Enterprise 32-bit: succeeds
// - Windows 10: succeeds
HANDLE orig2 = dup(orig1, GetCurrentProcess());
HANDLE new2 = dup(new1, GetCurrentProcess());
dup(orig1, hChild);
dup(new1, hChild);
// The writes to orig1/orig2 are invisible. The writes to new1/new2
// are visible.
writeTest(orig1, "write to orig1");
writeTest(orig2, "write to orig2");
writeTest(new1, "write to new1");
writeTest(new2, "write to new2");
Sleep(120000);
return 0;
}
if (!strcmp(argv[1], "child")) {
g_prefix = "child: ";
dumpHandles();
Sleep(4000);
for (unsigned int i = 0x1; i <= 0xB0; ++i) {
char msg[256];
sprintf(msg, "Write to handle 0x%x", i);
HANDLE h = reinterpret_cast<HANDLE>(i);
writeTest(h, msg);
}
Sleep(120000);
return 0;
}
return 0;
}
@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.delay = exports.DelayedConstructor = void 0;
class DelayedConstructor {
constructor(wrap) {
this.wrap = wrap;
this.reflectMethods = [
"get",
"getPrototypeOf",
"setPrototypeOf",
"getOwnPropertyDescriptor",
"defineProperty",
"has",
"set",
"deleteProperty",
"apply",
"construct",
"ownKeys"
];
}
createProxy(createObject) {
const target = {};
let init = false;
let value;
const delayedObject = () => {
if (!init) {
value = createObject(this.wrap());
init = true;
}
return value;
};
return new Proxy(target, this.createHandler(delayedObject));
}
createHandler(delayedObject) {
const handler = {};
const install = (name) => {
handler[name] = (...args) => {
args[0] = delayedObject();
const method = Reflect[name];
return method(...args);
};
};
this.reflectMethods.forEach(install);
return handler;
}
}
exports.DelayedConstructor = DelayedConstructor;
function delay(wrappedConstructor) {
if (typeof wrappedConstructor === "undefined") {
throw new Error("Attempt to `delay` undefined. Constructor must be wrapped in a callback");
}
return new DelayedConstructor(wrappedConstructor);
}
exports.delay = delay;
@@ -0,0 +1,16 @@
The ISC License
Copyright (c) Isaac Z. Schlueter
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cloneDeepWithoutLoc;
var _cloneNode = require("./cloneNode.js");
function cloneDeepWithoutLoc(node) {
return (0, _cloneNode.default)(node, true, true);
}
//# sourceMappingURL=cloneDeepWithoutLoc.js.map
@@ -0,0 +1,206 @@
exports.parse = exports.decode = decode
exports.stringify = exports.encode = encode
exports.safe = safe
exports.unsafe = unsafe
var eol = typeof process !== 'undefined' &&
process.platform === 'win32' ? '\r\n' : '\n'
function encode (obj, opt) {
var children = []
var out = ''
if (typeof opt === 'string') {
opt = {
section: opt,
whitespace: false,
}
} else {
opt = opt || {}
opt.whitespace = opt.whitespace === true
}
var separator = opt.whitespace ? ' = ' : '='
Object.keys(obj).forEach(function (k, _, __) {
var val = obj[k]
if (val && Array.isArray(val)) {
val.forEach(function (item) {
out += safe(k + '[]') + separator + safe(item) + '\n'
})
} else if (val && typeof val === 'object')
children.push(k)
else
out += safe(k) + separator + safe(val) + eol
})
if (opt.section && out.length)
out = '[' + safe(opt.section) + ']' + eol + out
children.forEach(function (k, _, __) {
var nk = dotSplit(k).join('\\.')
var section = (opt.section ? opt.section + '.' : '') + nk
var child = encode(obj[k], {
section: section,
whitespace: opt.whitespace,
})
if (out.length && child.length)
out += eol
out += child
})
return out
}
function dotSplit (str) {
return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
.replace(/\\\./g, '\u0001')
.split(/\./).map(function (part) {
return part.replace(/\1/g, '\\.')
.replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
})
}
function decode (str) {
var out = {}
var p = out
var section = null
// section |key = value
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
var lines = str.split(/[\r\n]+/g)
lines.forEach(function (line, _, __) {
if (!line || line.match(/^\s*[;#]/))
return
var match = line.match(re)
if (!match)
return
if (match[1] !== undefined) {
section = unsafe(match[1])
if (section === '__proto__') {
// not allowed
// keep parsing the section, but don't attach it.
p = {}
return
}
p = out[section] = out[section] || {}
return
}
var key = unsafe(match[2])
if (key === '__proto__')
return
var value = match[3] ? unsafe(match[4]) : true
switch (value) {
case 'true':
case 'false':
case 'null': value = JSON.parse(value)
}
// Convert keys with '[]' suffix to an array
if (key.length > 2 && key.slice(-2) === '[]') {
key = key.substring(0, key.length - 2)
if (key === '__proto__')
return
if (!p[key])
p[key] = []
else if (!Array.isArray(p[key]))
p[key] = [p[key]]
}
// safeguard against resetting a previously defined
// array by accidentally forgetting the brackets
if (Array.isArray(p[key]))
p[key].push(value)
else
p[key] = value
})
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
// use a filter to return the keys that have to be deleted.
Object.keys(out).filter(function (k, _, __) {
if (!out[k] ||
typeof out[k] !== 'object' ||
Array.isArray(out[k]))
return false
// see if the parent section is also an object.
// if so, add it to that, and mark this one for deletion
var parts = dotSplit(k)
var p = out
var l = parts.pop()
var nl = l.replace(/\\\./g, '.')
parts.forEach(function (part, _, __) {
if (part === '__proto__')
return
if (!p[part] || typeof p[part] !== 'object')
p[part] = {}
p = p[part]
})
if (p === out && nl === l)
return false
p[nl] = out[k]
return true
}).forEach(function (del, _, __) {
delete out[del]
})
return out
}
function isQuoted (val) {
return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
(val.charAt(0) === "'" && val.slice(-1) === "'")
}
function safe (val) {
return (typeof val !== 'string' ||
val.match(/[=\r\n]/) ||
val.match(/^\[/) ||
(val.length > 1 &&
isQuoted(val)) ||
val !== val.trim())
? JSON.stringify(val)
: val.replace(/;/g, '\\;').replace(/#/g, '\\#')
}
function unsafe (val, doUnesc) {
val = (val || '').trim()
if (isQuoted(val)) {
// remove the single quotes before calling JSON.parse
if (val.charAt(0) === "'")
val = val.substr(1, val.length - 2)
try {
val = JSON.parse(val)
} catch (_) {}
} else {
// walk the val to find the first not-escaped ; character
var esc = false
var unesc = ''
for (var i = 0, l = val.length; i < l; i++) {
var c = val.charAt(i)
if (esc) {
if ('\\;#'.indexOf(c) !== -1)
unesc += c
else
unesc += '\\' + c
esc = false
} else if (';#'.indexOf(c) !== -1)
break
else if (c === '\\')
esc = true
else
unesc += c
}
if (esc)
unesc += '\\'
return unesc.trim()
}
return val
}
@@ -0,0 +1,24 @@
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const string_decoder = {
StringDecoder: { [READ]: { supported: ["0.1.99"] } },
}
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
module.exports = {
string_decoder: {
[READ]: { supported: ["0.1.99"] },
...string_decoder,
},
"node:string_decoder": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...string_decoder,
},
}
@@ -0,0 +1,114 @@
# Lazy Streams
> *Create streams lazily when they are read from or written to.*
> `lazystream: 1.0.1`
## Why?
Sometimes you feel the itch to open *all the files* at once. You want to pass a bunch of streams around, so the consumer does not need to worry where the data comes from.
From a software design point-of-view this sounds entirely reasonable. Then there is that neat little function `fs.createReadStream()` that opens a file and gives you a nice `fs.ReadStream` to pass around, so you use what the mighty creator deities of node bestowed upon you.
> `Error: EMFILE, too many open files`
> ─ *node*
This package provides two classes based on the node's Streams3 API (courtesy of `readable-stream` to ensure a stable version).
## Class: lazystream.Readable
A wrapper for readable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough).
### new lazystream.Readable(fn [, options])
* `fn` *{Function}*
The function that the lazy stream will call to obtain the stream to actually read from.
* `options` *{Object}*
Options for the underlying `PassThrough` stream, accessible by `fn`.
Creates a new readable stream. Once the stream is accessed (for example when you call its `read()` method, or attach a `data`-event listener) the `fn` function is called with the outer `lazystream.Readable` instance bound to `this`.
If you pass an `options` object to the constuctor, you can access it in your `fn` function.
```javascript
new lazystream.Readable(function (options) {
return fs.createReadStream('/dev/urandom');
});
```
## Class: lazystream.Writable
A wrapper for writable streams. Extends [`stream.PassThrough`](http://nodejs.org/api/stream.html#stream_class_stream_passthrough).
### new lazystream.Writable(fn [, options])
* `fn` *{Function}*
The function that the lazy stream will call to obtain the stream to actually write to.
* `options` *{Object}*
Options for the underlying `PassThrough` stream, accessible by `fn`.
Creates a new writable stream. Just like the one above but for writable streams.
```javascript
new lazystream.Writable(function () {
return fs.createWriteStream('/dev/null');
});
```
## Install
```console
$ npm install lazystream --save
lazystream@1.0.1 node_modules/lazystream
└── readable-stream@2.0.5
```
## Changelog
### v1.0.1
- [#3](https://github.com/jpommerening/node-lazystream/issues/3): (finally) fixed a long-standing publishing error
### v1.0.0
- [#2](https://github.com/jpommerening/node-lazystream/issues/2): [unconditionally](https://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html) use `readable-stream` _2.x_.
### v0.2.0
- [#1](https://github.com/jpommerening/node-lazystream/pull/1): error events are now propagated
### v0.1.0
- _(this was the first release)_
## Contributing
Fork it, branch it, send me a pull request. We'll work out the rest together.
## Credits
[Chris Talkington](https://github.com/ctalkington) and his [node-archiver](https://github.com/ctalkington/node-archiver) for providing a use-case.
## [License](LICENSE)
Copyright (c) 2013 J. Pommerening, contributors.
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,15 @@
module.exports = {
"deselectedItem": (args)=>`\u{672A}\u{9009}\u{62E9} ${args.item}\u{3002}`,
"longPressToSelect": `\u{957F}\u{6309}\u{4EE5}\u{8FDB}\u{5165}\u{9009}\u{62E9}\u{6A21}\u{5F0F}\u{3002}`,
"select": `\u{9009}\u{62E9}`,
"selectedAll": `\u{5DF2}\u{9009}\u{62E9}\u{6240}\u{6709}\u{9879}\u{76EE}\u{3002}`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{672A}\u{9009}\u{62E9}\u{9879}\u{76EE}`,
one: ()=>`\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`,
other: ()=>`\u{5DF2}\u{9009}\u{62E9} ${formatter.number(args.count)} \u{4E2A}\u{9879}\u{76EE}`
})}\u{3002}`,
"selectedItem": (args)=>`\u{5DF2}\u{9009}\u{62E9} ${args.item}\u{3002}`
};
//# sourceMappingURL=zh-CN.main.js.map
@@ -0,0 +1,8 @@
export namespace errorUtil {
export type ErrMessage = string | { message?: string | undefined };
export const errToObj = (message?: ErrMessage): { message?: string | undefined } =>
typeof message === "string" ? { message } : message || {};
// biome-ignore lint:
export const toString = (message?: ErrMessage): string | undefined =>
typeof message === "string" ? message : message?.message;
}
@@ -0,0 +1 @@
{"name":"qs","version":"6.14.0","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532089019,"integrity":"sha512-MEH8Ph99bixU/whoYO3pkwBIjXKw3vHHAzVRWR59zf4oU4XY08fSzAGsC1SwC5+CHafox3+4uPdtv7VljogcqQ==","mode":420,"size":597},".eslintrc":{"checkedAt":1794532089019,"integrity":"sha512-6TWwbljnw7kSHZI9f3wVHf1hWN+zJ9gS7xs7NLrTSxbjpjewzC2AkDKbXLNueEHu9JpdmQiIg0LKxoVbIfg7BQ==","mode":420,"size":1050},".nycrc":{"checkedAt":1794532089019,"integrity":"sha512-wRWNfuCzyGaL0jcL+DSbPh36vDFUiqoLFkk8Ul/P1AeSVOwHv7tNb+Hst4AWeaP8kxhCinlTs8JhyHM3BT2Ztg==","mode":420,"size":216},"test/empty-keys-cases.js":{"checkedAt":1794532089019,"integrity":"sha512-UmJEfLt1qOs6mZsLirbBPQLzy7pIL8q4NMHW2Smh4QZUtrOsog6d/UiQqDdvusYpd8gKjq44Z20iAiNPmJgw/w==","mode":420,"size":7698},"lib/formats.js":{"checkedAt":1794532089020,"integrity":"sha512-OcHHLclFNqz/Rjviob99wosOMew3erp28OyGiR7kypS0168aqmU+UA2eH45GU48691Rpw6pC7TnrIdGnCAwMFw==","mode":420,"size":476},"lib/index.js":{"checkedAt":1794532089020,"integrity":"sha512-UDZdA1gOXbn9B/0Hccy3AuWxgXPnIAyj6MeSytulcfbt1bbMEkWClidxQ8PGPNOtres8jcoUCmoYxSWxB8rmag==","mode":420,"size":211},"lib/parse.js":{"checkedAt":1794532089020,"integrity":"sha512-u2wxUoG6oLdfFAFG/tsYl6q/u3kllLTnl9WPAvuUWo3I9WaLmIHUu/O8Zyf7WT467vl1ETJ9Fja1mimol88oaA==","mode":420,"size":12620},"test/parse.js":{"checkedAt":1794532089021,"integrity":"sha512-QEIE/JBCtAWKdPDlkVX53UOw9S1PU8V7TqqS4EOwvW7NcHtnGKOn6Lh/0GTjSKYvUNdsPaEbgfH4mhbxVjb/Dw==","mode":420,"size":51326},"dist/qs.js":{"checkedAt":1794532089021,"integrity":"sha512-+J/QMMqYrseoEqavwiQInC29337mi8k+dK85509Fsggy3ZZ9WszHUe5IvlMrjv0BtawKSuZwvksI87UElTk9Fg==","mode":420,"size":49512},"lib/stringify.js":{"checkedAt":1794532089021,"integrity":"sha512-1m1YIB1E6pMtdKUzL9+yMT8rc2bYLeqBYe1kJ44wDhrW7Ib59B/fuhN1fNrJzVnSKG19gtMqn6/2W5pHuwGNbg==","mode":420,"size":11475},"test/stringify.js":{"checkedAt":1794532089022,"integrity":"sha512-oK5o1oUtlloLOClvkufN0dqrKF9qCf51BZ5njpdUD6Sr0Z1jNncg+l75uLUlaDo7pFfZBBcZknGlOWvw8svptw==","mode":420,"size":53219},"lib/utils.js":{"checkedAt":1794532089022,"integrity":"sha512-78k0AZRl/D1jd4pPcX5QqODsPU/KaJblCmnix+fZMCKQNvkcPbdDCL80VpqW8rVDs70roa1NeCigJMbVSeNt6Q==","mode":420,"size":7352},"test/utils.js":{"checkedAt":1794532089022,"integrity":"sha512-ykU3fflnsPjwyuHKNJqLuxs8f9YNugCTlrEU/G+f1uTv3lefChpbaHEfMy9Wqz8zAJ9+aRdd8vHkweZv9jiuOA==","mode":420,"size":8197},"package.json":{"checkedAt":1794532089022,"integrity":"sha512-b1dsiAnpQkHL61RM2D5GsigvKxKPe1mn8hKF06wodWkF/haLXLsJslEBvHXesNgPbWIk7Gm5Ec1la9Q1nGSUrQ==","mode":420,"size":3137},"CHANGELOG.md":{"checkedAt":1794532089022,"integrity":"sha512-ZxrFRNYeQS+ymVvgfeeqv3V/T/ZLE0/PaMBiEhTfAyvbs4Db4XcKdMk/hop26Nhx0idawSZ5WymnoqP1kfpmrA==","mode":420,"size":33117},"LICENSE.md":{"checkedAt":1794532089023,"integrity":"sha512-ws1xNdJWTK1MR8J+u0YjLEp7hwBhsTSWvUQ5BLWe8A32LtaBkY0LnbVEXVTKrrMC6R+yTdUIR9dcbwpINA+Djw==","mode":420,"size":1600},"README.md":{"checkedAt":1794532089023,"integrity":"sha512-MTX8vMj+zwnoMTKK27un4Ws2zWU6wwE2pVCDbnbFpO2MG0zsqrZr18gEg3kNtXOC+KdFQXQBJNDvUs29lPRXTA==","mode":420,"size":25887},".github/FUNDING.yml":{"checkedAt":1794532089023,"integrity":"sha512-tXO9jRSSF4NXCoZ08c2b/IQDCBYFNnlHpjqDabIG2ApCM2azI4Jd3DbgeTi9Pl9xDEUxpFIG0zH2MasyvLbuWQ==","mode":420,"size":548}}}
@@ -0,0 +1,50 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.prototype.includes` method.",
category: "ES2016",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-includes.html",
},
fixable: null,
messages: {
forbidden: "ES2016 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["includes"],
Int8Array: ["includes"],
Uint8Array: ["includes"],
Uint8ClampedArray: ["includes"],
Int16Array: ["includes"],
Uint16Array: ["includes"],
Int32Array: ["includes"],
Uint32Array: ["includes"],
Float32Array: ["includes"],
Float64Array: ["includes"],
BigInt64Array: ["includes"],
BigUint64Array: ["includes"],
})
},
}
@@ -0,0 +1,259 @@
import { __values } from "tslib";
import useLatest from '../useLatest';
import { isFunction, isNumber, isString } from '../utils';
import { getTargetElement } from '../utils/domTarget';
import useDeepCompareEffectWithTarget from '../utils/useDeepCompareWithTarget';
import isAppleDevice from '../utils/isAppleDevice';
// 键盘事件 keyCode 别名
var aliasKeyCodeMap = {
'0': 48,
'1': 49,
'2': 50,
'3': 51,
'4': 52,
'5': 53,
'6': 54,
'7': 55,
'8': 56,
'9': 57,
backspace: 8,
tab: 9,
enter: 13,
shift: 16,
ctrl: 17,
alt: 18,
pausebreak: 19,
capslock: 20,
esc: 27,
space: 32,
pageup: 33,
pagedown: 34,
end: 35,
home: 36,
leftarrow: 37,
uparrow: 38,
rightarrow: 39,
downarrow: 40,
insert: 45,
delete: 46,
a: 65,
b: 66,
c: 67,
d: 68,
e: 69,
f: 70,
g: 71,
h: 72,
i: 73,
j: 74,
k: 75,
l: 76,
m: 77,
n: 78,
o: 79,
p: 80,
q: 81,
r: 82,
s: 83,
t: 84,
u: 85,
v: 86,
w: 87,
x: 88,
y: 89,
z: 90,
leftwindowkey: 91,
rightwindowkey: 92,
meta: isAppleDevice ? [91, 93] : [91, 92],
selectkey: 93,
numpad0: 96,
numpad1: 97,
numpad2: 98,
numpad3: 99,
numpad4: 100,
numpad5: 101,
numpad6: 102,
numpad7: 103,
numpad8: 104,
numpad9: 105,
multiply: 106,
add: 107,
subtract: 109,
decimalpoint: 110,
divide: 111,
f1: 112,
f2: 113,
f3: 114,
f4: 115,
f5: 116,
f6: 117,
f7: 118,
f8: 119,
f9: 120,
f10: 121,
f11: 122,
f12: 123,
numlock: 144,
scrolllock: 145,
semicolon: 186,
equalsign: 187,
comma: 188,
dash: 189,
period: 190,
forwardslash: 191,
graveaccent: 192,
openbracket: 219,
backslash: 220,
closebracket: 221,
singlequote: 222,
};
// 修饰键
var modifierKey = {
ctrl: function (event) { return event.ctrlKey; },
shift: function (event) { return event.shiftKey; },
alt: function (event) { return event.altKey; },
meta: function (event) {
if (event.type === 'keyup') {
return aliasKeyCodeMap.meta.includes(event.keyCode);
}
return event.metaKey;
},
};
// 判断合法的按键类型
function isValidKeyType(value) {
return isString(value) || isNumber(value);
}
// 根据 event 计算激活键数量
function countKeyByEvent(event) {
var countOfModifier = Object.keys(modifierKey).reduce(function (total, key) {
if (modifierKey[key](event)) {
return total + 1;
}
return total;
}, 0);
// 16 17 18 91 92 是修饰键的 keyCode,如果 keyCode 是修饰键,那么激活数量就是修饰键的数量,如果不是,那么就需要 +1
return [16, 17, 18, 91, 92].includes(event.keyCode) ? countOfModifier : countOfModifier + 1;
}
/**
* 判断按键是否激活
* @param [event: KeyboardEvent]键盘事件
* @param [keyFilter: any] 当前键
* @returns string | number | boolean
*/
function genFilterKey(event, keyFilter, exactMatch) {
var e_1, _a;
// 浏览器自动补全 input 的时候,会触发 keyDown、keyUp 事件,但此时 event.key 等为空
if (!event.key) {
return false;
}
// 数字类型直接匹配事件的 keyCode
if (isNumber(keyFilter)) {
return event.keyCode === keyFilter ? keyFilter : false;
}
// 字符串依次判断是否有组合键
var genArr = keyFilter.split('.');
var genLen = 0;
try {
for (var genArr_1 = __values(genArr), genArr_1_1 = genArr_1.next(); !genArr_1_1.done; genArr_1_1 = genArr_1.next()) {
var key = genArr_1_1.value;
// 组合键
var genModifier = modifierKey[key];
// keyCode 别名
var aliasKeyCode = aliasKeyCodeMap[key.toLowerCase()];
if ((genModifier && genModifier(event)) || (aliasKeyCode && aliasKeyCode === event.keyCode)) {
genLen++;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (genArr_1_1 && !genArr_1_1.done && (_a = genArr_1.return)) _a.call(genArr_1);
}
finally { if (e_1) throw e_1.error; }
}
/**
* 需要判断触发的键位和监听的键位完全一致,判断方法就是触发的键位里有且等于监听的键位
* genLen === genArr.length 能判断出来触发的键位里有监听的键位
* countKeyByEvent(event) === genArr.length 判断出来触发的键位数量里有且等于监听的键位数量
* 主要用来防止按组合键其子集也会触发的情况,例如监听 ctrl+a 会触发监听 ctrl 和 a 两个键的事件。
*/
if (exactMatch) {
return genLen === genArr.length && countKeyByEvent(event) === genArr.length ? keyFilter : false;
}
return genLen === genArr.length ? keyFilter : false;
}
/**
* 键盘输入预处理方法
* @param [keyFilter: any] 当前键
* @returns () => Boolean
*/
function genKeyFormatter(keyFilter, exactMatch) {
if (isFunction(keyFilter)) {
return keyFilter;
}
if (isValidKeyType(keyFilter)) {
return function (event) { return genFilterKey(event, keyFilter, exactMatch); };
}
if (Array.isArray(keyFilter)) {
return function (event) {
return keyFilter.find(function (item) { return genFilterKey(event, item, exactMatch); });
};
}
return function () { return Boolean(keyFilter); };
}
var defaultEvents = ['keydown'];
function useKeyPress(keyFilter, eventHandler, option) {
var _a = option || {}, _b = _a.events, events = _b === void 0 ? defaultEvents : _b, target = _a.target, _c = _a.exactMatch, exactMatch = _c === void 0 ? false : _c, _d = _a.useCapture, useCapture = _d === void 0 ? false : _d;
var eventHandlerRef = useLatest(eventHandler);
var keyFilterRef = useLatest(keyFilter);
useDeepCompareEffectWithTarget(function () {
var e_2, _a;
var _b;
var el = getTargetElement(target, window);
if (!el) {
return;
}
var callbackHandler = function (event) {
var _a;
var keyEvent = event;
var genGuard = genKeyFormatter(keyFilterRef.current, exactMatch);
var keyGuard = genGuard(keyEvent);
var firedKey = isValidKeyType(keyGuard) ? keyGuard : keyEvent.key;
if (keyGuard) {
return (_a = eventHandlerRef.current) === null || _a === void 0 ? void 0 : _a.call(eventHandlerRef, keyEvent, firedKey);
}
};
try {
for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
var eventName = events_1_1.value;
(_b = el === null || el === void 0 ? void 0 : el.addEventListener) === null || _b === void 0 ? void 0 : _b.call(el, eventName, callbackHandler, useCapture);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1);
}
finally { if (e_2) throw e_2.error; }
}
return function () {
var e_3, _a;
var _b;
try {
for (var events_2 = __values(events), events_2_1 = events_2.next(); !events_2_1.done; events_2_1 = events_2.next()) {
var eventName = events_2_1.value;
(_b = el === null || el === void 0 ? void 0 : el.removeEventListener) === null || _b === void 0 ? void 0 : _b.call(el, eventName, callbackHandler, useCapture);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (events_2_1 && !events_2_1.done && (_a = events_2.return)) _a.call(events_2);
}
finally { if (e_3) throw e_3.error; }
}
};
}, [events], target);
}
export default useKeyPress;
@@ -0,0 +1,84 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {chain} from '@react-aria/utils';
import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
import {GridCollection, GridNode} from '@react-types/grid';
import {gridMap} from './utils';
import {GridState} from '@react-stately/grid';
import {SelectableItemStates, useSelectableItem} from '@react-aria/selection';
export interface GridRowProps<T> {
/** An object representing the grid row. Contains all the relevant information that makes up the grid row. */
node: GridNode<T>,
/** Whether the grid row is contained in a virtual scroller. */
isVirtualized?: boolean,
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean,
/**
* Handler that is called when a user performs an action on the row.
* Please use onCellAction at the collection level instead.
* @deprecated
**/
onAction?: () => void
}
export interface GridRowAria extends SelectableItemStates {
/** Props for the grid row element. */
rowProps: DOMAttributes,
/** Whether the row is currently in a pressed state. */
isPressed: boolean
}
/**
* Provides the behavior and accessibility implementation for a row in a grid.
* @param props - Props for the row.
* @param state - State of the parent grid, as returned by `useGridState`.
*/
export function useGridRow<T, C extends GridCollection<T>, S extends GridState<T, C>>(props: GridRowProps<T>, state: S, ref: RefObject<FocusableElement | null>): GridRowAria {
let {
node,
isVirtualized,
shouldSelectOnPressUp,
onAction
} = props;
let {actions, shouldSelectOnPressUp: gridShouldSelectOnPressUp} = gridMap.get(state)!;
let onRowAction = actions.onRowAction ? () => actions.onRowAction?.(node.key) : onAction;
let {itemProps, ...states} = useSelectableItem({
selectionManager: state.selectionManager,
key: node.key,
ref,
isVirtualized,
shouldSelectOnPressUp: gridShouldSelectOnPressUp || shouldSelectOnPressUp,
onAction: onRowAction || node?.props?.onAction ? chain(node?.props?.onAction, onRowAction) : undefined,
isDisabled: state.collection.size === 0
});
let isSelected = state.selectionManager.isSelected(node.key);
let rowProps: DOMAttributes = {
role: 'row',
'aria-selected': state.selectionManager.selectionMode !== 'none' ? isSelected : undefined,
'aria-disabled': states.isDisabled || undefined,
...itemProps
};
if (isVirtualized) {
rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based
}
return {
rowProps,
...states
};
}
@@ -0,0 +1,116 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _axobjectQuery = require("axobject-query");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
var _attributesComparator = _interopRequireDefault(require("./attributesComparator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
var roleKeys = _ariaQuery.roles.keys();
var elementRoleEntries = _toConsumableArray(_ariaQuery.elementRoles);
var nonInteractiveRoles = new Set(roleKeys.filter(function (name) {
var role = _ariaQuery.roles.get(name);
return !role["abstract"]
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
&& name !== 'toolbar' && !role.superClass.some(function (classes) {
return (0, _arrayIncludes["default"])(classes, 'widget');
});
}).concat(
// The `progressbar` is descended from `widget`, but in practice, its
// value is always `readonly`, so we treat it as a non-interactive role.
'progressbar'));
var interactiveRoles = new Set(roleKeys.filter(function (name) {
var role = _ariaQuery.roles.get(name);
return !role["abstract"]
// The `progressbar` is descended from `widget`, but in practice, its
// value is always `readonly`, so we treat it as a non-interactive role.
&& name !== 'progressbar' && role.superClass.some(function (classes) {
return (0, _arrayIncludes["default"])(classes, 'widget');
});
}).concat(
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
'toolbar'));
var interactiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
elementSchema = _ref2[0],
rolesArr = _ref2[1];
return rolesArr.some(function (role) {
return interactiveRoles.has(role);
}) ? [elementSchema] : [];
});
var nonInteractiveElementRoleSchemas = (0, _arrayPrototype["default"])(elementRoleEntries, function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
elementSchema = _ref4[0],
rolesArr = _ref4[1];
return rolesArr.every(function (role) {
return nonInteractiveRoles.has(role);
}) ? [elementSchema] : [];
});
var interactiveAXObjects = new Set(_axobjectQuery.AXObjects.keys().filter(function (name) {
return _axobjectQuery.AXObjects.get(name).type === 'widget';
}));
var interactiveElementAXObjectSchemas = (0, _arrayPrototype["default"])(_toConsumableArray(_axobjectQuery.elementAXObjects), function (_ref5) {
var _ref6 = _slicedToArray(_ref5, 2),
elementSchema = _ref6[0],
AXObjectsArr = _ref6[1];
return AXObjectsArr.every(function (role) {
return interactiveAXObjects.has(role);
}) ? [elementSchema] : [];
});
function checkIsInteractiveElement(tagName, attributes) {
function elementSchemaMatcher(elementSchema) {
return tagName === elementSchema.name && (0, _attributesComparator["default"])(elementSchema.attributes, attributes);
}
// Check in elementRoles for inherent interactive role associations for
// this element.
var isInherentInteractiveElement = interactiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentInteractiveElement) {
return true;
}
// Check in elementRoles for inherent non-interactive role associations for
// this element.
var isInherentNonInteractiveElement = nonInteractiveElementRoleSchemas.some(elementSchemaMatcher);
if (isInherentNonInteractiveElement) {
return false;
}
// Check in elementAXObjects for AX Tree associations for this element.
var isInteractiveAXElement = interactiveElementAXObjectSchemas.some(elementSchemaMatcher);
if (isInteractiveAXElement) {
return true;
}
return false;
}
/**
* Returns boolean indicating whether the given element is
* interactive on the DOM or not. Usually used when an element
* has a dynamic handler on it and we need to discern whether or not
* it's intention is to be interacted with on the DOM.
*/
var isInteractiveElement = function isInteractiveElement(tagName, attributes) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
if (!_ariaQuery.dom.has(tagName)) {
return false;
}
return checkIsInteractiveElement(tagName, attributes);
};
var _default = exports["default"] = isInteractiveElement;
module.exports = exports.default;
@@ -0,0 +1,8 @@
var $309d73dc65f78055$exports = {};
$309d73dc65f78055$exports = {
"dismiss": `Descartar`
};
export {$309d73dc65f78055$exports as default};
//# sourceMappingURL=es-ES.module.js.map
@@ -0,0 +1,56 @@
/*
* Sending VK_PAUSE to the console window almost works as a mechanism for
* pausing it, but it doesn't because the console could turn off the
* ENABLE_LINE_INPUT console mode flag.
*/
#define _WIN32_WINNT 0x0501
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
CALLBACK DWORD pausingThread(LPVOID dummy)
{
if (1) {
Sleep(1000);
HWND hwnd = GetConsoleWindow();
SendMessage(hwnd, WM_KEYDOWN, VK_PAUSE, 1);
Sleep(1000);
SendMessage(hwnd, WM_KEYDOWN, VK_ESCAPE, 1);
}
if (0) {
INPUT_RECORD ir;
memset(&ir, 0, sizeof(ir));
ir.EventType = KEY_EVENT;
ir.Event.KeyEvent.bKeyDown = TRUE;
ir.Event.KeyEvent.wVirtualKeyCode = VK_PAUSE;
ir.Event.KeyEvent.wRepeatCount = 1;
}
return 0;
}
int main()
{
HANDLE hin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
COORD c = { 0, 0 };
DWORD mode;
GetConsoleMode(hin, &mode);
SetConsoleMode(hin, mode &
~(ENABLE_LINE_INPUT));
CreateThread(NULL, 0,
pausingThread, NULL,
0, NULL);
int i = 0;
while (true) {
Sleep(100);
printf("%d\n", ++i);
}
return 0;
}
@@ -0,0 +1,47 @@
"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 (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.string = string;
exports.number = number;
exports.boolean = boolean;
exports.bigint = bigint;
exports.date = date;
const core = __importStar(require("../core/index.cjs"));
const schemas = __importStar(require("./schemas.cjs"));
function string(params) {
return core._coercedString(schemas.ZodString, params);
}
function number(params) {
return core._coercedNumber(schemas.ZodNumber, params);
}
function boolean(params) {
return core._coercedBoolean(schemas.ZodBoolean, params);
}
function bigint(params) {
return core._coercedBigint(schemas.ZodBigInt, params);
}
function date(params) {
return core._coercedDate(schemas.ZodDate, params);
}
@@ -0,0 +1,198 @@
[![npm version](https://img.shields.io/npm/v/eslint-scope.svg)](https://www.npmjs.com/package/eslint-scope)
[![Downloads](https://img.shields.io/npm/dm/eslint-scope.svg)](https://www.npmjs.com/package/eslint-scope)
[![Build Status](https://github.com/eslint/js/workflows/CI/badge.svg)](https://github.com/eslint/js/actions)
# ESLint Scope
ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope).
## Install
```
npm i eslint-scope --save
```
## 📖 Usage
To use in an ESM file:
```js
import * as eslintScope from 'eslint-scope';
```
To use in a CommonJS file:
```js
const eslintScope = require('eslint-scope');
```
In order to analyze scope, you'll need to have an [ESTree](https://github.com/estree/estree) compliant AST structure to run it on. The primary method is `eslintScope.analyze()`, which takes two arguments:
1. `ast` - the ESTree-compliant AST structure to analyze.
2. `options` (optional) - Options to adjust how the scope is analyzed, including:
* `ignoreEval` (default: `false`) - Set to `true` to ignore all `eval()` calls (which would normally create scopes).
* `nodejsScope` (default: `false`) - Set to `true` to create a top-level function scope needed for CommonJS evaluation.
* `impliedStrict` (default: `false`) - Set to `true` to evaluate the code in strict mode even outside of modules and without `"use strict"`.
* `ecmaVersion` (default: `5`) - The version of ECMAScript to use to evaluate the code.
* `sourceType` (default: `"script"`) - The type of JavaScript file to evaluate. Change to `"module"` for ECMAScript module code.
* `childVisitorKeys` (default: `null`) - An object with visitor key information (like [`eslint-visitor-keys`](https://github.com/eslint/js/tree/main/packages/eslint-visitor-keys)). Without this, `eslint-scope` finds child nodes to visit algorithmically. Providing this option is a performance enhancement.
* `fallback` (default: `"iteration"`) - The strategy to use when `childVisitorKeys` is not specified. May be a function.
* `jsx` (default: `false`) - Enables the tracking of JSX components as variable references.
Example:
```js
import * as eslintScope from 'eslint-scope';
import * as espree from 'espree';
import estraverse from 'estraverse';
const options = {
ecmaVersion: 2022,
sourceType: "module"
};
const ast = espree.parse(code, { range: true, ...options });
const scopeManager = eslintScope.analyze(ast, options);
const currentScope = scopeManager.acquire(ast); // global scope
estraverse.traverse(ast, {
enter (node, parent) {
// do stuff
if (/Function/.test(node.type)) {
currentScope = scopeManager.acquire(node); // get current function scope
}
},
leave(node, parent) {
if (/Function/.test(node.type)) {
currentScope = currentScope.upper; // set to parent scope
}
// do stuff
}
});
```
## API
The following section describes the API for this package. You can also read [the docs](https://eslint.org/docs/latest/extend/scope-manager-interface).
### ScopeManager
The `ScopeManager` class is at the core of eslint-scope and is returned when you call `eslintScope.analyze()`. It manages all scopes in a given AST.
#### Properties
- `scopes` - An array of all scopes.
- `globalScope` - Reference to the global scope.
#### Methods
- **`acquire(node, inner)`**
Acquires the appropriate scope for a given node.
- `node` - The AST node to acquire the scope from.
- `inner` - Optional boolean. When `true`, returns the innermost scope, otherwise returns the outermost scope. Default is `false`.
- Returns: The acquired scope or `null` if no scope is found.
- **`acquireAll(node)`**
Acquires all scopes for a given node.
- `node` - The AST node to acquire scopes from.
- Returns: An array of scopes or `undefined` if none are found.
- **`release(node, inner)`**
Returns the upper scope for a given node.
- `node` - The AST node to release.
- `inner` - Optional boolean. When `true`, returns the innermost upper scope, otherwise returns the outermost upper scope. Default is `false`.
- Returns: The upper scope or `null` if no upper scope exists.
- **`getDeclaredVariables(node)`**
Get variables that are declared by the node.
- `node` - The AST node to get declarations from.
- Returns: An array of variable objects declared by the node. If the node doesn't declare any variables, it returns an empty array.
- **`isGlobalReturn()`**
Determines if the global return statement should be allowed.
- Returns: `true` if the global return is enabled.
- **`isModule()`**
Checks if the code should be handled as an ECMAScript module.
- Returns: `true` if the sourceType is "module".
- **`isImpliedStrict()`**
Checks if implied strict mode is enabled.
- Returns: `true` if implied strict mode is enabled.
- **`isStrictModeSupported()`**
Checks if strict mode is supported based on ECMAScript version.
- Returns: `true` if the ECMAScript version supports strict mode.
### Scope Objects
Scopes returned by the ScopeManager methods have the following properties:
- `type` - The type of scope (e.g., "function", "block", "global").
- `variables` - Array of variables declared in this scope.
- `set` - A Map of variable names to Variable objects for variables declared in this scope.
- `references` - Array of references in this scope.
- `through` - Array of references in this scope and its child scopes that aren't resolved in this scope or its child scopes.
- `variableScope` - Reference to the closest variable scope.
- `upper` - Reference to the parent scope.
- `childScopes` - Array of child scopes.
- `block` - The AST node that created this scope.
### GlobalScope
The `GlobalScope` class is a specialized scope representing the global execution context. It extends the base `Scope` class with additional functionality for handling implicitly defined global variables.
#### Properties
- **`implicit`** - Tracks implicitly defined global variables (those used without declaration).
- `set` - A Map of variable names to Variable objects for implicitly defined globals.
- `variables` - Array of implicit global Variable objects.
- `left` - Array of References that need to be linked to the variable they refer to.
### Variable Objects
Each variable object has the following properties:
- `name` - The variable name.
- `identifiers` - Array of identifier nodes declaring this variable.
- `references` - Array of references to this variable.
- `defs` - Array of definition objects for this variable.
- `scope` - The scope object where this variable is defined.
## Contributing
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/js/issues).
## Security Policy
We work hard to ensure that ESLint Scope is safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md).
## Build Commands
* `npm test` - run all linting and tests
* `npm run lint` - run all linting
## License
ESLint Scope is licensed under a permissive BSD 2-clause license.
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Diamond Sponsors</h3>
<p><a href="https://www.ag-grid.com/"><img src="https://images.opencollective.com/ag-grid/bec0580/logo.png" alt="AG Grid" height="128"></a></p><h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
<!--sponsorsend-->
@@ -0,0 +1,81 @@
'use strict';
module.exports = function generate_contains(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $errs = 'errs__' + $lvl;
var $it = it.util.copy(it);
var $closingBraces = '';
$it.level++;
var $nextValid = 'valid' + $it.level;
var $idx = 'i' + $lvl,
$dataNxt = $it.dataLevel = it.dataLevel + 1,
$nextData = 'data' + $dataNxt,
$currentBaseId = it.baseId,
$nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));
out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';
if ($nonEmptySchema) {
var $wasComposite = it.compositeRule;
it.compositeRule = $it.compositeRule = true;
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;
out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';
$it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);
var $passData = $data + '[' + $idx + ']';
$it.dataPathArr[$dataNxt] = $idx;
var $code = it.validate($it);
$it.baseId = $currentBaseId;
if (it.util.varOccurences($code, $nextData) < 2) {
out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';
} else {
out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';
}
out += ' if (' + ($nextValid) + ') break; } ';
it.compositeRule = $it.compositeRule = $wasComposite;
out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';
} else {
out += ' if (' + ($data) + '.length == 0) {';
}
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';
if (it.opts.messages !== false) {
out += ' , message: \'should contain a valid item\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } else { ';
if ($nonEmptySchema) {
out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';
}
if (it.opts.allErrors) {
out += ' } ';
}
return out;
}
@@ -0,0 +1,84 @@
{
"name": "unbox-primitive",
"version": "1.1.0",
"description": "Unbox a boxed JS primitive value.",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/unbox-primitive.git"
},
"keywords": [
"unbox",
"boxed",
"primitive",
"object",
"javascript",
"ecmascript"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/unbox-primitive/issues"
},
"homepage": "https://github.com/ljharb/unbox-primitive#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.13.0",
"@types/object-is": "^1.1.0",
"@types/tape": "^5.7.0",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"object-is": "^1.1.6",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"dependencies": {
"call-bound": "^1.0.3",
"has-bigints": "^1.0.2",
"has-symbols": "^1.1.0",
"which-boxed-primitive": "^1.1.1"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"from-theme.mjs","sources":["../../src/lib/from-theme.ts"],"sourcesContent":["import { ThemeGetter, ThemeObject } from './types'\n\nexport function fromTheme(key: string): ThemeGetter {\n const themeGetter = (theme: ThemeObject) => theme[key] || []\n\n themeGetter.isThemeGetter = true as const\n\n return themeGetter\n}\n"],"names":["fromTheme","key","themeGetter","theme","isThemeGetter"],"mappings":"AAEM,SAAUA,SAAS,CAACC,GAAW,EAAA;AACjC,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAW,CAAIC,KAAkB,EAAA;AAAA,IAAA,OAAKA,KAAK,CAACF,GAAG,CAAC,IAAI,EAAE,CAAA;AAAA,GAAA,CAAA;EAE5DC,WAAW,CAACE,aAAa,GAAG,IAAa,CAAA;AAEzC,EAAA,OAAOF,WAAW,CAAA;AACtB;;;;"}
@@ -0,0 +1,166 @@
/**
* @file name表
* @author mengke01(kekee000@gmail.com)
*/
import table from './table';
import nameIdTbl from '../enum/nameId';
import string from '../util/string';
import platformTbl from '../enum/platform';
import {mac, win} from '../enum/encoding';
export default table.create(
'name',
[],
{
read(reader) {
let offset = this.offset;
reader.seek(offset);
const nameTbl = {};
nameTbl.format = reader.readUint16();
nameTbl.count = reader.readUint16();
nameTbl.stringOffset = reader.readUint16();
const nameRecordTbl = [];
const count = nameTbl.count;
let i;
let nameRecord;
for (i = 0; i < count; ++i) {
nameRecord = {};
nameRecord.platform = reader.readUint16();
nameRecord.encoding = reader.readUint16();
nameRecord.language = reader.readUint16();
nameRecord.nameId = reader.readUint16();
nameRecord.length = reader.readUint16();
nameRecord.offset = reader.readUint16();
nameRecordTbl.push(nameRecord);
}
offset += nameTbl.stringOffset;
// 读取字符名字
for (i = 0; i < count; ++i) {
nameRecord = nameRecordTbl[i];
nameRecord.name = reader.readBytes(offset + nameRecord.offset, nameRecord.length);
}
const names = {};
// mac 下的english name
let platform = platformTbl.Macintosh;
let encoding = mac.Default;
let language = 0;
// 如果有windows 下的 english,则用windows下的 name
if (nameRecordTbl.some((record) => record.platform === platformTbl.Microsoft
&& record.encoding === win.UCS2
&& record.language === 1033)) {
platform = platformTbl.Microsoft;
encoding = win.UCS2;
language = 1033;
}
for (i = 0; i < count; ++i) {
nameRecord = nameRecordTbl[i];
if (nameRecord.platform === platform
&& nameRecord.encoding === encoding
&& nameRecord.language === language
&& nameIdTbl[nameRecord.nameId]) {
names[nameIdTbl[nameRecord.nameId]] = language === 0
? string.getUTF8String(nameRecord.name)
: string.getUCS2String(nameRecord.name);
}
}
return names;
},
write(writer, ttf) {
const nameRecordTbl = ttf.support.name;
writer.writeUint16(0); // format
writer.writeUint16(nameRecordTbl.length); // count
writer.writeUint16(6 + nameRecordTbl.length * 12); // string offset
// write name tbl header
let offset = 0;
nameRecordTbl.forEach((nameRecord) => {
writer.writeUint16(nameRecord.platform);
writer.writeUint16(nameRecord.encoding);
writer.writeUint16(nameRecord.language);
writer.writeUint16(nameRecord.nameId);
writer.writeUint16(nameRecord.name.length);
writer.writeUint16(offset); // offset
offset += nameRecord.name.length;
});
// write name tbl strings
nameRecordTbl.forEach((nameRecord) => {
writer.writeBytes(nameRecord.name);
});
return writer;
},
size(ttf) {
const names = ttf.name;
let nameRecordTbl = [];
// 写入name信息
// 这里为了简化书写,仅支持英文编码字符,
// 中文编码字符将被转化成url encode
let size = 6;
Object.keys(names).forEach((name) => {
const id = nameIdTbl.names[name];
const utf8Bytes = string.toUTF8Bytes(names[name]);
const usc2Bytes = string.toUCS2Bytes(names[name]);
if (undefined !== id) {
// mac
nameRecordTbl.push({
nameId: id,
platform: 1,
encoding: 0,
language: 0,
name: utf8Bytes
});
// windows
nameRecordTbl.push({
nameId: id,
platform: 3,
encoding: 1,
language: 1033,
name: usc2Bytes
});
// 子表大小
size += 12 * 2 + utf8Bytes.length + usc2Bytes.length;
}
});
const namingOrder = ['platform', 'encoding', 'language', 'nameId'];
nameRecordTbl = nameRecordTbl.sort((a, b) => {
let l = 0;
namingOrder.some(name => {
const o = a[name] - b[name];
if (o) {
l = o;
return true;
}
return false;
});
return l;
});
// 保存预处理信息
ttf.support.name = nameRecordTbl;
return size;
}
}
);
@@ -0,0 +1,17 @@
import { AlgorithmIdentifier } from "./algorithm_identifier";
import { TBSCertificate } from "./tbs_certificate";
/**
* ```asn1
* Certificate ::= SEQUENCE {
* tbsCertificate TBSCertificate,
* signatureAlgorithm AlgorithmIdentifier,
* signatureValue BIT STRING }
* ```
*/
export declare class Certificate {
tbsCertificate: TBSCertificate;
tbsCertificateRaw?: ArrayBuffer;
signatureAlgorithm: AlgorithmIdentifier;
signatureValue: ArrayBuffer;
constructor(params?: Partial<Certificate>);
}
@@ -0,0 +1 @@
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/v6/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAQ7D;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,EAAE,CAU/E"}
@@ -0,0 +1,718 @@
export default `flf2a$ 7 5 20 -1 2
rozzo.flf font by Mike Rosulek [unar2@sfa.ope.ed.gov] 1/12/95
This was based on FujiyamaBlack TrueType Font.
$$#
$$#
$$#
$$#
$$#
$$#
$$##
888$#
888$#
"8"$#
e $#
"8"$#
$#
$##
8 8$#
8 8$#
$#
$#
$#
$#
$##
d8P d8"$#
88888888888$#
d8P d8P $#
88888888888$#
e8P d8P $#
$#
$##
8 $#
d8 8e $#
C88 $#
Y8 8b $#
88D$#
"8 8P $#
8 $##
,8, / $#
"8"/ $#
/ $#
/,8, $#
/ "8" $#
$#
$##
d8b,$#
,db YP'$#
e Y8b ,$#
d8b Y8b" $#
Y88b Y8b $#
$#
$##
d8b$#
Y8P$#
,P $#
P $#
$#
$#
$##
e88$#
d888$#
e8888$#
88888$#
"8888$#
Y888$#
"88$##
88e $#
888b $#
8888e$#
88888$#
8888"$#
888P $#
88" $##
Yb 8 dP$#
\`D8K' $#
dP 8 Yb$#
$#
$#
$#
$##
$#
8 $#
88888$#
8 $#
$#
$#
$##
$#
$#
$#
d8b$#
Y8P$#
,P $#
P $##
$#
$#
888$#
$#
$#
$#
$##
$#
$#
$#
d8b$#
Y8P$#
$#
$##
d8P$#
d8P $#
d8P $#
d8P $#
d8P $#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
$#
$##
d88$#
d888$#
d"888$#
888$#
888$#
$#
$##
,8,"88e $#
" 888D$#
88P $#
,*" $#
8888888$#
$#
$##
,8,"88b,$#
" ,88P'$#
C8K $#
e \`88b,$#
"8",88P'$#
$#
$##
d 888 $#
d8 888 $#
d88 888e$#
""" 888"$#
888 $#
$#
$##
8888888$#
88 $#
"""Y88b$#
e 888$#
"8",88P$#
$#
$##
e88",8, $#
d888 " $#
C8888 88e $#
Y888 888D$#
"88 88" $#
$#
$##
888888$#
,e$#
,eP $#
,e8P $#
88P $#
$#
$##
,d8 8b, $#
"Y8 8P" $#
,d8 8b, $#
C888 888D$#
"Y8 8P" $#
$#
$##
e88 88e $#
C888 888b $#
"88 8888D$#
e 888P $#
"8",88" $#
$#
$##
d8b$#
Y8P$#
$#
d8b$#
Y8P$#
$#
$##
d8b$#
Y8P$#
$#
d8b$#
Y8P$#
,P $#
P $##
d8P$#
d8P $#
C8K $#
Y8b $#
Y8b$#
$#
$##
$#
8888888$#
$#
8888888$#
$#
$#
$##
Y8b $#
Y8b $#
D8D$#
d8P $#
d8P $#
$#
$##
,8,'88b $#
" 888D$#
88P $#
,"' $#
"8" $#
$#
$##
,e""""e, $#
e" e"""e"e$#
8 C 8 8$#
"e "*ee"*"$#
\`"eeeee" $#
$#
$##
e Y8b $#
d8b Y8b $#
d888b Y8b $#
d888888888b $#
d8888888b Y8b$#
$#
$##
888 88b,$#
888 88P'$#
888 8K $#
888 88b,$#
888 88P'$#
$#
$##
e88'Y88$#
d888 'Y$#
C8888 $#
Y888 ,d$#
"88,d88$#
$#
$##
888 88e $#
888 888b $#
888 8888D$#
888 888P $#
888 88" $#
$#
$##
888'Y88$#
888 ,'Y$#
888C8 $#
888 ",d$#
888,d88$#
$#
$##
888'Y88$#
888 ,'Y$#
888C8 $#
888 " $#
888 $#
$#
$##
e88'Y88 $#
d888 'Y $#
C8888 eeee$#
Y888 888P$#
"88 88" $#
$#
$##
888 888$#
888 888$#
8888888$#
888 888$#
888 888$#
$#
$##
888$#
888$#
888$#
888$#
888$#
$#
$##
888$#
888$#
888$#
e 88P$#
"8",P' $#
$#
$##
888 88P$#
888 8P $#
888 K $#
888 8b $#
888 88b$#
$#
$##
888 $#
888 $#
888 $#
888 ,d$#
888,d88$#
$#
$##
e e $#
d8b d8b $#
e Y8b Y8b $#
d8b Y8b Y8b $#
d888b Y8b Y8b$#
$#
$##
Y88b Y88$#
Y88b Y8$#
b Y88b Y$#
8b Y88b $#
88b Y88b$#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
$#
$##
888 88e $#
888 888D$#
888 88" $#
888 $#
888 $#
$#
$##
e88 88e $#
d888 888b $#
C8888 8888D$#
Y888 888P $#
"88 88" $#
b $#
8b, $##
888 88e $#
888 888D$#
888 88" $#
888 b, $#
888 88b,$#
$#
$##
dP"8$#
C8b Y$#
Y8b $#
b Y8D$#
8edP $#
$#
$##
88P'888'Y88$#
P' 888 'Y$#
888 $#
888 $#
888 $#
$#
$##
8888 8888$#
8888 8888$#
8888 8888$#
8888 8888$#
'Y88 88P'$#
$#
$##
Y8b Y88888P$#
Y8b Y888P $#
Y8b Y8P $#
Y8b Y $#
Y8P $#
$#
$##
Y8b Y8b Y888P$#
Y8b Y8b Y8P $#
Y8b Y8b Y $#
Y8b Y8b $#
Y8P Y $#
$#
$##
Y8b Y8P$#
Y8b Y $#
Y8b $#
e Y8b $#
d8b Y8b$#
$#
$##
Y88b Y8P$#
Y88b Y $#
Y88b $#
888 $#
888 $#
$#
$##
8P d8P$#
P d8P $#
d8P d$#
d8P d8$#
d8P d88$#
$#
$##
8888$#
88 $#
88 $#
88 $#
88 $#
88 $#
8888$##
d8P$#
d8P $#
d8P $#
d8P $#
d8P $#
$#
$##
8888$#
88$#
88$#
88$#
88$#
88$#
8888$##
d8b $#
dP Yb$#
$#
$#
$#
$#
$##
$#
$#
$#
$#
$#
888$#
$##
Y88$#
Y8$#
Y$#
$#
$#
$#
$##
$#
,"Y88b$#
"8" 888$#
,ee 888$#
"88 888$#
$#
$##
888 $#
888 88e $#
888 888b$#
888 888P$#
888 88" $#
$#
$##
$#
e88'888$#
d888 '8$#
Y888 ,$#
"88,e8'$#
$#
$##
888$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
$#
$##
$#
,e e, $#
d88 88b$#
888 ,$#
"YeeP"$#
$#
$##
dP,e,$#
8b " $#
888888$#
888 $#
888 $#
$#
$##
$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
, 88P$#
"8",P" $##
888 $#
888 ee $#
888 88b$#
888 888$#
888 888$#
$#
$##
,e,$#
" $#
888$#
888$#
888$#
$#
$##
,e,$#
" $#
888$#
888$#
888$#
88P$#
8" $##
888 $#
888 ee$#
888 P $#
888 b $#
888 8b$#
$#
$##
888$#
888$#
888$#
888$#
888$#
$#
$##
$#
888 888 8e $#
888 888 88b$#
888 888 888$#
888 888 888$#
$#
$##
$#
888 8e $#
888 88b$#
888 888$#
888 888$#
$#
$##
$#
e88 88e $#
d888 888b$#
Y888 888P$#
"88 88" $#
$#
$##
$#
888 88e $#
888 888b$#
888 888P$#
888 88" $#
888 $#
888 $##
$#
e88 888$#
d888 888$#
Y888 888$#
"88 888$#
888$#
888$##
$#
888,8,$#
888 " $#
888 $#
888 $#
$#
$##
$#
dP"Y$#
C88b $#
Y88D$#
d,dP $#
$#
$##
d8 $#
d88 $#
d88888$#
888 $#
888 $#
$#
$##
$#
8888 8888$#
8888 8888$#
Y888 888P$#
"88 88" $#
$#
$##
$#
Y8b Y888P$#
Y8b Y8P $#
Y8b " $#
Y8P $#
$#
$##
$#
Y8b Y8b Y888P$#
Y8b Y8b Y8P $#
Y8b Y8b " $#
YP Y8P $#
$#
$##
$#
Y8b Y8Y$#
Y8b Y $#
e Y8b $#
d8b Y8b $#
$#
$##
$#
Y8b Y888P$#
Y8b Y8P $#
Y8b Y $#
888 $#
888 $#
888 $##
$#
8P d8P$#
P d8P $#
d8P d$#
d8P d8$#
$#
$##
,888$#
88 $#
e8P $#
C8K $#
"8b $#
88 $#
"888$##
88$#
88$#
88$#
88$#
88$#
88$#
88$##
888, $#
88 $#
Y8 $#
D8D$#
d8 $#
88 $#
888" $##
,d8b,d8$#
8P"Y8P"$#
$#
$#
$#
$#
$##
e e Y8b e $#
"8"d8b Y8b"8"$#
d888b Y8b $#
d888888888b $#
d8888888b Y8b$#
$#
$##
e e88 88e e $#
"8"d888 888b"8"$#
C8888 8888D $#
Y888 888P $#
"88 88" $#
$#
$##
e 8888 8888 e $#
"8" 8888 8888 "8"$#
8888 8888 $#
Y888 888P $#
"88 88" $#
$#
$##
e e $#
"8","Y88b"8"$#
"8" 888 $#
,ee 888 $#
"88 888 $#
$#
$##
$#
e e88 88e e $#
"8"d888 888b"8"$#
Y888 888P $#
"88 88" $#
$#
$##
e e $#
"8"8888 8888"8"$#
8888 8888 $#
Y888 888P $#
"88 88" $#
$#
$##
$#
dP"Y$#
C88b $#
Y88D$#
d,dP $#
$#
$##
`
@@ -0,0 +1,17 @@
import { twJoin } from './lib/tw-join.mjs';
export { createTailwindMerge } from './lib/create-tailwind-merge.mjs';
export { getDefaultConfig } from './lib/default-config.mjs';
export { extendTailwindMerge } from './lib/extend-tailwind-merge.mjs';
export { fromTheme } from './lib/from-theme.mjs';
export { mergeConfigs } from './lib/merge-configs.mjs';
export { twMerge } from './lib/tw-merge.mjs';
import * as validators from './lib/validators.mjs';
export { validators };
/**
* @deprecated Will be removed in next major version. Use `twJoin` instead.
*/
var join = twJoin;
export { join, twJoin };
//# sourceMappingURL=tailwind-merge.mjs.map
@@ -0,0 +1,61 @@
'use strict';
var Writable = require('flush-write-stream');
function listenerCount(stream, evt) {
return stream.listeners(evt).length;
}
function hasListeners(stream) {
return !!(listenerCount(stream, 'readable') || listenerCount(stream, 'data'));
}
function sinker(file, enc, callback) {
callback();
}
function sink(stream) {
var sinkAdded = false;
var sinkOptions = {
objectMode: stream._readableState.objectMode,
};
var sinkStream = new Writable(sinkOptions, sinker);
function addSink() {
if (sinkAdded) {
return;
}
if (hasListeners(stream)) {
return;
}
sinkAdded = true;
stream.pipe(sinkStream);
}
function removeSink(evt) {
if (evt !== 'readable' && evt !== 'data') {
return;
}
if (hasListeners(stream)) {
sinkAdded = false;
stream.unpipe(sinkStream);
}
}
stream.on('newListener', removeSink);
stream.on('removeListener', removeSink);
stream.on('removeListener', addSink);
// Sink the stream to start flowing
// Do this on nextTick, it will flow at slowest speed of piped streams
process.nextTick(addSink);
return stream;
}
module.exports = sink;
@@ -0,0 +1,5 @@
export * from './message';
export * from './meta';
export * from './notice';
export * from './request';
export * from './OneBotEvent';
@@ -0,0 +1,6 @@
module.exports = {
"dismiss": `Hylk\xe4\xe4`
};
//# sourceMappingURL=fi-FI.main.js.map
@@ -0,0 +1,2 @@
import { Transform } from './index.js';
export default function indent(pos: number): Transform;
@@ -0,0 +1,37 @@
{
"name": "@types/jsonfile",
"version": "6.1.4",
"description": "TypeScript definitions for jsonfile",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonfile",
"license": "MIT",
"contributors": [
{
"name": "Daniel Bowring",
"githubUsername": "dbowring",
"url": "https://github.com/dbowring"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
},
{
"name": "Piotr Błażejewicz",
"githubUsername": "peterblazejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/jsonfile"
},
"scripts": {},
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "c4c437c24ccd22e0fd74368adceefc3c6ed726b74d1cc5188deeb5b0119b9523",
"typeScriptVersion": "4.5"
}
@@ -0,0 +1,6 @@
module.exports = {
"dismiss": `Zru\u{161}i\u{165}`
};
//# sourceMappingURL=sk-SK.main.js.map
@@ -0,0 +1,59 @@
import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from "./utils.module.js";
import {useCallback as $hf0lj$useCallback} from "react";
import {getOwnerDocument as $hf0lj$getOwnerDocument} from "@react-aria/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from react.
// Original licensing for the following can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
const onBlur = (0, $hf0lj$useCallback)((e)=>{
if (e.target === e.currentTarget) {
if (onBlurProp) onBlurProp(e);
if (onFocusChange) onFocusChange(false);
return true;
}
}, [
onBlurProp,
onFocusChange
]);
const onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
const onFocus = (0, $hf0lj$useCallback)((e)=>{
// Double check that document.activeElement actually matches e.target in case a previously chained
// focus handler already moved focus somewhere else.
const ownerDocument = (0, $hf0lj$getOwnerDocument)(e.target);
if (e.target === e.currentTarget && ownerDocument.activeElement === e.target) {
if (onFocusProp) onFocusProp(e);
if (onFocusChange) onFocusChange(true);
onSyntheticFocus(e);
}
}, [
onFocusChange,
onFocusProp,
onSyntheticFocus
]);
return {
focusProps: {
onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,
onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined
}
};
}
export {$a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus};
//# sourceMappingURL=useFocus.module.js.map
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.js';
import 'react';
declare const CheckLinearIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { CheckLinearIcon };
@@ -0,0 +1 @@
{"version":3,"file":"buildUnmanagedMetadataFromMaybeManagedMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/buildUnmanagedMetadataFromMaybeManagedMetadata.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
"use strict"
module.exports = function (parentLayer, childLayer) {
if (!parentLayer.length && childLayer.length) return childLayer
if (parentLayer.length && !childLayer.length) return parentLayer
if (!parentLayer.length && !childLayer.length) return []
return parentLayer.concat(childLayer)
}
@@ -0,0 +1 @@
{"name":"safer-buffer","version":"2.1.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532089056,"integrity":"sha512-Egz/c4PXi793RvERAelz7Qr50N7WU3gj9Ky/plnSnBvQnVXsQ0vcdmHybLUni6zHalXZUkh1NDH0CZ+Y+VMvlA==","mode":420,"size":822},"dangerous.js":{"checkedAt":1794532089057,"integrity":"sha512-V1ijNeeQWWDiDwl0EHj2WEoS1YFSxGKhehNLyKHc1d3tMXN4Swia06XMwaywcNIYVSou4CY/u9zows5kYyexbA==","mode":420,"size":1483},"LICENSE":{"checkedAt":1794532089057,"integrity":"sha512-k0AAPl2+l2aXJELal/gk/Evs4mwZH85TEJk4NnF82dBm6oAIzWhWR+8/xzv/3O645VSxacdBHswzak8kcPEEaQ==","mode":420,"size":1094},"Porting-Buffer.md":{"checkedAt":1794532089057,"integrity":"sha512-B1GbhdmFcCgi3NXgtqETcnvFP5WjPpiwxa5u4UCx0ZFwsFhVvGJqsOJQDDA1HlYNQE4VKed1aL+Aulm71FMMIQ==","mode":420,"size":12794},"Readme.md":{"checkedAt":1794532089057,"integrity":"sha512-YGqyINPpACrXk3S76qHYgi68ud6aPdLTHRssGBsZPPMS0NvCXVRnf+MCkA3R3UB1uzQMpQ7U3WSEX8ADpHdaHQ==","mode":420,"size":8261},"safer.js":{"checkedAt":1794532089057,"integrity":"sha512-azwWVBJG3fG9EsDPU3/FTdntkyxwqDTY31fWdYvJUyr1VJENSykvafpbP9C19m3OJFHrP2zxm6KV0Tl7ytildA==","mode":420,"size":2110},"tests.js":{"checkedAt":1794532089058,"integrity":"sha512-GAN5rI1j8l0nYSvxhaq2c2FivEaiGaf0JHwXS1JaCIq+oHr0f0ahpYh3S2uXXXLxbkihbkI+kyCFkd+jlCgrLQ==","mode":420,"size":15735}}}
@@ -0,0 +1,201 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.state = factory());
}(this, (function () { 'use strict';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
}
function curry(fn) {
return function curried() {
var _this = this;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
nextArgs[_key3] = arguments[_key3];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
function isObject(value) {
return {}.toString.call(value).includes('Object');
}
function isEmpty(obj) {
return !Object.keys(obj).length;
}
function isFunction(value) {
return typeof value === 'function';
}
function hasOwnProperty(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}
function validateChanges(initial, changes) {
if (!isObject(changes)) errorHandler('changeType');
if (Object.keys(changes).some(function (field) {
return !hasOwnProperty(initial, field);
})) errorHandler('changeField');
return changes;
}
function validateSelector(selector) {
if (!isFunction(selector)) errorHandler('selectorType');
}
function validateHandler(handler) {
if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');
if (isObject(handler) && Object.values(handler).some(function (_handler) {
return !isFunction(_handler);
})) errorHandler('handlersType');
}
function validateInitial(initial) {
if (!initial) errorHandler('initialIsRequired');
if (!isObject(initial)) errorHandler('initialType');
if (isEmpty(initial)) errorHandler('initialContent');
}
function throwError(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages = {
initialIsRequired: 'initial state is required',
initialType: 'initial state should be an object',
initialContent: 'initial state shouldn\'t be an empty object',
handlerType: 'handler should be an object or a function',
handlersType: 'all handlers should be a functions',
selectorType: 'selector should be a function',
changeType: 'provided value of changes should be an object',
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
"default": 'an unknown error accured in `state-local` package'
};
var errorHandler = curry(throwError)(errorMessages);
var validators = {
changes: validateChanges,
selector: validateSelector,
handler: validateHandler,
initial: validateInitial
};
function create(initial) {
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
validators.initial(initial);
validators.handler(handler);
var state = {
current: initial
};
var didUpdate = curry(didStateUpdate)(state, handler);
var update = curry(updateState)(state);
var validate = curry(validators.changes)(initial);
var getChanges = curry(extractChanges)(state);
function getState() {
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {
return state;
};
validators.selector(selector);
return selector(state.current);
}
function setState(causedChanges) {
compose(didUpdate, update, validate, getChanges)(causedChanges);
}
return [getState, setState];
}
function extractChanges(state, causedChanges) {
return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;
}
function updateState(state, changes) {
state.current = _objectSpread2(_objectSpread2({}, state.current), changes);
return changes;
}
function didStateUpdate(state, handler, changes) {
isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {
var _handler$field;
return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);
});
return changes;
}
var index = {
create: create
};
return index;
})));
@@ -0,0 +1,17 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.decorators_legacy = void 0;
const base_config_1 = require("./base-config");
exports.decorators_legacy = {
libs: [],
variables: [
['ClassDecorator', base_config_1.TYPE],
['PropertyDecorator', base_config_1.TYPE],
['MethodDecorator', base_config_1.TYPE],
['ParameterDecorator', base_config_1.TYPE],
],
};
@@ -0,0 +1,102 @@
import { Kind, OptionalKind, ReadonlyKind } from '../symbols/index.mjs';
import { Discard } from '../discard/index.mjs';
// evaluation types
import { Array } from '../array/index.mjs';
import { AsyncIterator } from '../async-iterator/index.mjs';
import { Constructor } from '../constructor/index.mjs';
import { Function as FunctionType } from '../function/index.mjs';
import { IndexPropertyKeys } from '../indexed/index.mjs';
import { Intersect } from '../intersect/index.mjs';
import { Iterator } from '../iterator/index.mjs';
import { Literal } from '../literal/index.mjs';
import { Object } from '../object/index.mjs';
import { Optional } from '../optional/index.mjs';
import { Promise } from '../promise/index.mjs';
import { Readonly } from '../readonly/index.mjs';
import { Tuple } from '../tuple/index.mjs';
import { Union } from '../union/index.mjs';
// operator
import { SetIncludes } from '../sets/index.mjs';
// mapping types
import { MappedResult } from './mapped-result.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsArray, IsAsyncIterator, IsConstructor, IsFunction, IsIntersect, IsIterator, IsReadonly, IsMappedResult, IsMappedKey, IsObject, IsOptional, IsPromise, IsSchema, IsTuple, IsUnion } from '../guard/kind.mjs';
// prettier-ignore
function FromMappedResult(K, P) {
return (K in P
? FromSchemaType(K, P[K])
: MappedResult(P));
}
// prettier-ignore
function MappedKeyToKnownMappedResultProperties(K) {
return { [K]: Literal(K) };
}
// prettier-ignore
function MappedKeyToUnknownMappedResultProperties(P) {
const Acc = {};
for (const L of P)
Acc[L] = Literal(L);
return Acc;
}
// prettier-ignore
function MappedKeyToMappedResultProperties(K, P) {
return (SetIncludes(P, K)
? MappedKeyToKnownMappedResultProperties(K)
: MappedKeyToUnknownMappedResultProperties(P));
}
// prettier-ignore
function FromMappedKey(K, P) {
const R = MappedKeyToMappedResultProperties(K, P);
return FromMappedResult(K, R);
}
// prettier-ignore
function FromRest(K, T) {
return T.map(L => FromSchemaType(K, L));
}
// prettier-ignore
function FromProperties(K, T) {
const Acc = {};
for (const K2 of globalThis.Object.getOwnPropertyNames(T))
Acc[K2] = FromSchemaType(K, T[K2]);
return Acc;
}
// prettier-ignore
function FromSchemaType(K, T) {
// required to retain user defined options for mapped type
const options = { ...T };
return (
// unevaluated modifier types
IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) :
IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) :
// unevaluated mapped types
IsMappedResult(T) ? FromMappedResult(K, T.properties) :
IsMappedKey(T) ? FromMappedKey(K, T.keys) :
// unevaluated types
IsConstructor(T) ? Constructor(FromRest(K, T.parameters), FromSchemaType(K, T.returns), options) :
IsFunction(T) ? FunctionType(FromRest(K, T.parameters), FromSchemaType(K, T.returns), options) :
IsAsyncIterator(T) ? AsyncIterator(FromSchemaType(K, T.items), options) :
IsIterator(T) ? Iterator(FromSchemaType(K, T.items), options) :
IsIntersect(T) ? Intersect(FromRest(K, T.allOf), options) :
IsUnion(T) ? Union(FromRest(K, T.anyOf), options) :
IsTuple(T) ? Tuple(FromRest(K, T.items ?? []), options) :
IsObject(T) ? Object(FromProperties(K, T.properties), options) :
IsArray(T) ? Array(FromSchemaType(K, T.items), options) :
IsPromise(T) ? Promise(FromSchemaType(K, T.item), options) :
T);
}
// prettier-ignore
export function MappedFunctionReturnType(K, T) {
const Acc = {};
for (const L of K)
Acc[L] = FromSchemaType(L, T);
return Acc;
}
/** `[Json]` Creates a Mapped object type */
export function Mapped(key, map, options) {
const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
const RT = map({ [Kind]: 'MappedKey', keys: K });
const R = MappedFunctionReturnType(K, RT);
return Object(R, options);
}
@@ -0,0 +1 @@
{"name":"@formatjs/fast-memoize","version":"2.2.7","requiresBuild":false,"files":{"index.js":{"checkedAt":1794532106101,"integrity":"sha512-eauZPs5bMGMiIixYUY8MS5We4wzs92zXnE2RTNyRht5A2H0CyL0aJBsECJrwyWyzTflsypnlKJlf5+vZEgj/+Q==","mode":420,"size":2690},"lib/index.js":{"checkedAt":1794532106101,"integrity":"sha512-1JkfqK0qGes+ZCGvO7k0HHoQ6JfTsXDsxE3bQDVtwN+9Qa7ne5Omue1t4VlmYlFQOcS6FZHlkzw/zjzDELldjQ==","mode":420,"size":2567},"package.json":{"checkedAt":1794532106101,"integrity":"sha512-TubmfOpQ88JrMCfk2WaZHtZhAIZrP15orEtfINqjnOkC+/WTItkNKdJLW2bpsy9UHHO9lIKzkqWbd3GMRGPbcQ==","mode":420,"size":520},"LICENSE.md":{"checkedAt":1794532106101,"integrity":"sha512-ccP4x15RKluRGK98bepkv531ywxfbjzAORRpvAUP4HZUQ21686RCj2i8Yze08vlAxp0uyVnbIalgS4SBbLEVrA==","mode":420,"size":1065},"README.md":{"checkedAt":1794532106101,"integrity":"sha512-hgKJbYUwoG7wx8dnkQj1lnROGv2CFhXTif5GNwUwMOvREvUxIvq+vpA6psc70aC3w/60ENbJqF2hnUbWXJaHQw==","mode":420,"size":65},"index.d.ts":{"checkedAt":1794532106101,"integrity":"sha512-fY/JMzqju8diHWQ5zdqgnBJypSt+KyBNMnAIOIQePYFXUros8an66xec988aMtXHkMfOaQ7HW3NFKKxeWGVRyw==","mode":420,"size":1107},"lib/index.d.ts":{"checkedAt":1794532106101,"integrity":"sha512-fY/JMzqju8diHWQ5zdqgnBJypSt+KyBNMnAIOIQePYFXUros8an66xec988aMtXHkMfOaQ7HW3NFKKxeWGVRyw==","mode":420,"size":1107}}}
@@ -0,0 +1,32 @@
// ------------------------------------------------------------------
// Errors (re-export)
// ------------------------------------------------------------------
export { ValueErrorType, ValueErrorIterator } from '../errors/index.mjs';
// ------------------------------------------------------------------
// Guards
// ------------------------------------------------------------------
export * from './guard/index.mjs';
// ------------------------------------------------------------------
// Operators
// ------------------------------------------------------------------
export * from './assert/index.mjs';
export * from './cast/index.mjs';
export * from './check/index.mjs';
export * from './clean/index.mjs';
export * from './clone/index.mjs';
export * from './convert/index.mjs';
export * from './create/index.mjs';
export * from './decode/index.mjs';
export * from './default/index.mjs';
export * from './delta/index.mjs';
export * from './encode/index.mjs';
export * from './equal/index.mjs';
export * from './hash/index.mjs';
export * from './mutate/index.mjs';
export * from './parse/index.mjs';
export * from './pointer/index.mjs';
export * from './transform/index.mjs';
// ------------------------------------------------------------------
// Namespace
// ------------------------------------------------------------------
export { Value } from './value/index.mjs';
@@ -0,0 +1,55 @@
import { indentWithTab } from '@codemirror/commands';
import { basicSetup } from '@uiw/codemirror-extensions-basic-setup';
import { EditorView, keymap, placeholder } from '@codemirror/view';
import { oneDark } from '@codemirror/theme-one-dark';
import { EditorState } from '@codemirror/state';
import { defaultLightThemeOption } from "./theme/light.js";
export * from '@codemirror/theme-one-dark';
export * from "./theme/light.js";
export var getDefaultExtensions = function getDefaultExtensions(optios) {
if (optios === void 0) {
optios = {};
}
var {
indentWithTab: defaultIndentWithTab = true,
editable = true,
readOnly = false,
theme = 'light',
placeholder: placeholderStr = '',
basicSetup: defaultBasicSetup = true
} = optios;
var getExtensions = [];
if (defaultIndentWithTab) {
getExtensions.unshift(keymap.of([indentWithTab]));
}
if (defaultBasicSetup) {
if (typeof defaultBasicSetup === 'boolean') {
getExtensions.unshift(basicSetup());
} else {
getExtensions.unshift(basicSetup(defaultBasicSetup));
}
}
if (placeholderStr) {
getExtensions.unshift(placeholder(placeholderStr));
}
switch (theme) {
case 'light':
getExtensions.push(defaultLightThemeOption);
break;
case 'dark':
getExtensions.push(oneDark);
break;
case 'none':
break;
default:
getExtensions.push(theme);
break;
}
if (editable === false) {
getExtensions.push(EditorView.editable.of(false));
}
if (readOnly) {
getExtensions.push(EditorState.readOnly.of(true));
}
return [...getExtensions];
};
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.prototype.find` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-find.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["find"],
})
},
}
@@ -0,0 +1,22 @@
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150
[CHANGELOG.md]
indent_style = space
indent_size = 2
[.github/workflows/*.yml]
indent_style = off
indent_size = off
max_line_length = off
[{CHANGELOG.md,*.json}]
max_line_length = off
@@ -0,0 +1,17 @@
# @dnd-kit/core
[![Stable release](https://img.shields.io/npm/v/@dnd-kit/core.svg)](https://npm.im/@dnd-kit/core)
@dnd-kit – a lightweight React library for building performant and accessible drag and drop experiences.
## Installation
To get started, install the `@dnd-kit/core` package via npm or yarn:
```
npm install @dnd-kit/core
```
## Usage
Visit [docs.dndkit.com](https://docs.dndkit.com) to learn how to get started with @dnd-kit.
@@ -0,0 +1,61 @@
import type { EntityAdapter } from '../index'
import { createEntityAdapter } from '../index'
import type { PayloadAction } from '../../createAction'
import { configureStore } from '../../configureStore'
import { createSlice } from '../../createSlice'
import type { BookModel } from './fixtures/book'
describe('createStateOperator', () => {
let adapter: EntityAdapter<BookModel, string>
beforeEach(() => {
adapter = createEntityAdapter({
selectId: (book: BookModel) => book.id,
})
})
it('Correctly mutates a draft state when inside `createNextState', () => {
const booksSlice = createSlice({
name: 'books',
initialState: adapter.getInitialState(),
reducers: {
// We should be able to call an adapter method as a mutating helper in a larger reducer
addOne(state, action: PayloadAction<BookModel>) {
// Originally, having nested `produce` calls don't mutate `state` here as I would have expected.
// (note that `state` here is actually an Immer Draft<S>, from `createReducer`)
// One woarkound was to return the new plain result value instead
// See https://github.com/immerjs/immer/issues/533
// However, after tweaking `createStateOperator` to check if the argument is a draft,
// we can just treat the operator as strictly mutating, without returning a result,
// and the result should be correct.
const result = adapter.addOne(state, action)
expect(result.ids.length).toBe(1)
//Deliberately _don't_ return result
},
// We should also be able to pass them individually as case reducers
addAnother: adapter.addOne,
},
})
const { addOne, addAnother } = booksSlice.actions
const store = configureStore({
reducer: {
books: booksSlice.reducer,
},
})
const book1: BookModel = { id: 'a', title: 'First' }
store.dispatch(addOne(book1))
const state1 = store.getState()
expect(state1.books.ids.length).toBe(1)
expect(state1.books.entities['a']).toBe(book1)
const book2: BookModel = { id: 'b', title: 'Second' }
store.dispatch(addAnother(book2))
const state2 = store.getState()
expect(state2.books.ids.length).toBe(2)
expect(state2.books.entities['b']).toBe(book2)
})
})
@@ -0,0 +1,45 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/overlays/ariaShouldCloseOnInteractOutside.ts
var ariaShouldCloseOnInteractOutside_exports = {};
__export(ariaShouldCloseOnInteractOutside_exports, {
ariaShouldCloseOnInteractOutside: () => ariaShouldCloseOnInteractOutside
});
module.exports = __toCommonJS(ariaShouldCloseOnInteractOutside_exports);
var ariaShouldCloseOnInteractOutside = (element, triggerRef, state) => {
const trigger = triggerRef == null ? void 0 : triggerRef.current;
if (!trigger || !trigger.contains(element)) {
const startElements = document.querySelectorAll("body > span[data-focus-scope-start]");
let focusScopeElements = [];
startElements.forEach((startElement) => {
focusScopeElements.push(startElement.nextElementSibling);
});
if (focusScopeElements.length === 1) {
state.close();
return false;
}
}
return !trigger || !trigger.contains(element);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ariaShouldCloseOnInteractOutside
});
@@ -0,0 +1,37 @@
import { AriaLabelingProps, DOMAttributes, DOMProps, LabelableProps, HelpTextProps, Validation } from "@react-types/shared";
import { ElementType, LabelHTMLAttributes } from "react";
export interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {
/**
* The HTML element used to render the label, e.g. 'label', or 'span'.
* @default 'label'
*/
labelElementType?: ElementType;
}
export interface LabelAria {
/** Props to apply to the label container element. */
labelProps: DOMAttributes | LabelHTMLAttributes<HTMLLabelElement>;
/** Props to apply to the field container element being labeled. */
fieldProps: AriaLabelingProps & DOMProps;
}
/**
* Provides the accessibility implementation for labels and their associated elements.
* Labels provide context for user inputs.
* @param props - The props for labels and fields.
*/
export function useLabel(props: LabelAriaProps): LabelAria;
export interface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation<any>, 'isRequired'> {
}
export interface FieldAria extends LabelAria {
/** Props for the description element, if any. */
descriptionProps: DOMAttributes;
/** Props for the error message element, if any. */
errorMessageProps: DOMAttributes;
}
/**
* Provides the accessibility implementation for input fields.
* Fields accept user input, gain context from their label, and may display a description or error message.
* @param props - Props for the Field.
*/
export function useField(props: AriaFieldProps): FieldAria;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,YAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/fi-FI.json"],"sourcesContent":["{\n \"dismiss\": \"Hylkää\"\n}\n"],"names":[],"version":3,"file":"fi-FI.module.js.map"}
@@ -0,0 +1,115 @@
import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';
import { COLUMN } from './sourcemap-segment';
export type MemoState = {
lastKey: number;
lastNeedle: number;
lastIndex: number;
};
export let found = false;
/**
* A binary search implementation that returns the index if a match is found.
* If no match is found, then the left-index (the index associated with the item that comes just
* before the desired index) is returned. To maintain proper sort order, a splice would happen at
* the next index:
*
* ```js
* const array = [1, 3];
* const needle = 2;
* const index = binarySearch(array, needle, (item, needle) => item - needle);
*
* assert.equal(index, 0);
* array.splice(index + 1, 0, needle);
* assert.deepEqual(array, [1, 2, 3]);
* ```
*/
export function binarySearch(
haystack: SourceMapSegment[] | ReverseSegment[],
needle: number,
low: number,
high: number,
): number {
while (low <= high) {
const mid = low + ((high - low) >> 1);
const cmp = haystack[mid][COLUMN] - needle;
if (cmp === 0) {
found = true;
return mid;
}
if (cmp < 0) {
low = mid + 1;
} else {
high = mid - 1;
}
}
found = false;
return low - 1;
}
export function upperBound(
haystack: SourceMapSegment[] | ReverseSegment[],
needle: number,
index: number,
): number {
for (let i = index + 1; i < haystack.length; index = i++) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
export function lowerBound(
haystack: SourceMapSegment[] | ReverseSegment[],
needle: number,
index: number,
): number {
for (let i = index - 1; i >= 0; index = i--) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
export function memoizedState(): MemoState {
return {
lastKey: -1,
lastNeedle: -1,
lastIndex: -1,
};
}
/**
* This overly complicated beast is just to record the last tested line/column and the resulting
* index, allowing us to skip a few tests if mappings are monotonically increasing.
*/
export function memoizedBinarySearch(
haystack: SourceMapSegment[] | ReverseSegment[],
needle: number,
state: MemoState,
key: number,
): number {
const { lastKey, lastNeedle, lastIndex } = state;
let low = 0;
let high = haystack.length - 1;
if (key === lastKey) {
if (needle === lastNeedle) {
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
return lastIndex;
}
if (needle >= lastNeedle) {
// lastIndex may be -1 if the previous needle was not found.
low = lastIndex === -1 ? 0 : lastIndex;
} else {
high = lastIndex;
}
}
state.lastKey = key;
state.lastNeedle = needle;
return (state.lastIndex = binarySearch(haystack, needle, low, high));
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more