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,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _lowercase = require("./lowercase.js");
Object.keys(_lowercase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _lowercase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _lowercase[key];
}
});
});
var _uppercase = require("./uppercase.js");
Object.keys(_uppercase).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _uppercase[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _uppercase[key];
}
});
});
//# sourceMappingURL=index.js.map
@@ -0,0 +1,18 @@
import baseCreate from './_baseCreate.js';
import getPrototype from './_getPrototype.js';
import isPrototype from './_isPrototype.js';
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
export default initCloneObject;
@@ -0,0 +1,21 @@
"use strict"
const { isBuiltin } = require("node:module")
/**
* Extend traceMap.modules with `node:` prefixed modules
* @template {import('@eslint-community/eslint-utils').TraceMap<*>} TraceMap
* @param {TraceMap} modules Like `{assert: foo}`
* @returns {TraceMap} Like `{assert: foo}, "node:assert": foo}`
*/
module.exports = function extendTraceMapWithNodePrefix(modules) {
const ret = {
...modules,
...Object.fromEntries(
Object.entries(modules)
.map(([name, value]) => [`node:${name}`, value])
.filter(([name]) => typeof name === "string" && isBuiltin(name))
),
}
return ret
}
@@ -0,0 +1,37 @@
import transformThemeValue from './transformThemeValue'
export default function createUtilityPlugin(
themeKey,
utilityVariations = [[themeKey, [themeKey]]],
{ filterDefault = false, ...options } = {}
) {
let transformValue = transformThemeValue(themeKey)
return function ({ matchUtilities, theme }) {
for (let utilityVariation of utilityVariations) {
let group = Array.isArray(utilityVariation[0]) ? utilityVariation : [utilityVariation]
matchUtilities(
group.reduce((obj, [classPrefix, properties]) => {
return Object.assign(obj, {
[classPrefix]: (value) => {
return properties.reduce((obj, name) => {
if (Array.isArray(name)) {
return Object.assign(obj, { [name[0]]: name[1] })
}
return Object.assign(obj, { [name]: transformValue(value) })
}, {})
},
})
}, {}),
{
...options,
values: filterDefault
? Object.fromEntries(
Object.entries(theme(themeKey) ?? {}).filter(([modifier]) => modifier !== 'DEFAULT')
)
: theme(themeKey),
}
)
}
}
}
@@ -0,0 +1,6 @@
export { useReactAriaAccordion } from './use-accordion.mjs';
export { useReactAriaAccordionItem } from './use-accordion-item.mjs';
import '@react-types/accordion';
import 'react';
import '@react-types/shared';
import '@react-stately/tree';
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAqCM,SAAS,0CAAkB,KAA2B,EAAE,KAAuB,EAAE,GAA8B;IACpH,IAAI,QACF,OAAO,oBACP,UAAU,WACV,UAAU,SACX,GAAG;IAEJ,IAAI,gBAAgB,CAAA,GAAA,YAAI;IACxB,IAAI,gBAAC,YAAY,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;cAAC;IAAI,GAAG,OAAO;IAEpE,IAAI,YAAY,CAAC;QACf,IAAI,YACF;QAGF,IAAI,YAAY,eAAe,CAAC,EAAE,MAAM,EACtC;QAGF,IAAI,OAAO,IAAI,OAAO,EACpB,OAAQ,EAAE,GAAG;YACX,KAAK;YACL,KAAK;gBACH,IAAI,YAAY,aACd;YAEF,cAAc;YAChB,KAAK;gBACH,uEAAuE;gBACvE,IAAI,CAAE,CAAA,yBAAyB,CAAA,GAC7B,EAAE,eAAe;gBAEnB,EAAE,cAAc;gBAChB,MAAM,MAAM,CAAC;gBACb;YACF,KAAK;gBACH,IAAI,CAAE,CAAA,yBAAyB,CAAA,GAC7B,EAAE,eAAe;gBAEnB,EAAE,cAAc;gBAChB,MAAM,MAAM,CAAC;gBACb;YACF;gBACE,oBAAoB;gBACpB,IAAI,yBAAyB,GAC3B,EAAE,mBAAmB;QAE3B;IAEJ;IAEA,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAChE,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAClC,YAAY,cAAc,YAAY;QACtC,0BAA0B,gBAAgB,MAAM,CAAC;QACjD;YACE,MAAM,KAAK;QACb;QACA;YACE,MAAM,IAAI,CAAC;QACb;IACF;IAEA,IAAI,aAAc;QAChB,cAAa,CAAC;YACZ,8EAA8E;YAC9E,IAAI,EAAE,WAAW,KAAK,WAAW,EAAE,WAAW,KAAK,cAAc,CAAC,YAChE,6DAA6D;YAC7D,8CAA8C;YAC9C,MAAM,IAAI,CAAC,EAAE,WAAW,KAAK,YAAY,UAAU;QAEvD;QACA,SAAQ,CAAC;YACP,IAAI,EAAE,WAAW,KAAK,WAAW,CAAC,YAChC,MAAM,MAAM;QAEhB;IACF;IAEA,6DAA6D;IAC7D,OAAO,aAAa,OAAO;IAE3B,OAAO;QACL,2OAA2O;QAC3O,kBAAkB;YAChB,GAAG,YAAY;YACf,GAAI,YAAY,UAAU,aAAa,cAAc;YACrD,IAAI;uBACJ;QACF;QACA,WAAW;YACT,GAAG,YAAY;YACf,mBAAmB;YACnB,WAAW,MAAM,aAAa,IAAI;YAClC,SAAS,MAAM,KAAK;QACtB;IACF;AACF","sources":["packages/@react-aria/menu/src/useMenuTrigger.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 {AriaButtonProps} from '@react-types/button';\nimport {AriaMenuOptions} from './useMenu';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {RefObject} from '@react-types/shared';\nimport {useId} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\nexport interface AriaMenuTriggerProps {\n /** The type of menu that the menu trigger opens. */\n type?: 'menu' | 'listbox',\n /** Whether menu trigger is disabled. */\n isDisabled?: boolean,\n /** How menu is triggered. */\n trigger?: MenuTriggerType\n}\n\nexport interface MenuTriggerAria<T> {\n /** Props for the menu trigger element. */\n menuTriggerProps: AriaButtonProps,\n\n /** Props for the menu. */\n menuProps: AriaMenuOptions<T>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n * @param ref - Ref to the HTML element trigger for the menu.\n */\nexport function useMenuTrigger<T>(props: AriaMenuTriggerProps, state: MenuTriggerState, ref: RefObject<Element | null>): MenuTriggerAria<T> {\n let {\n type = 'menu',\n isDisabled,\n trigger = 'press'\n } = props;\n\n let menuTriggerId = useId();\n let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n let onKeyDown = (e) => {\n if (isDisabled) {\n return;\n }\n\n if (trigger === 'longPress' && !e.altKey) {\n return;\n }\n\n if (ref && ref.current) {\n switch (e.key) {\n case 'Enter':\n case ' ':\n if (trigger === 'longPress') {\n return;\n }\n // fallthrough\n case 'ArrowDown':\n // Stop propagation, unless it would already be handled by useKeyboard.\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('first');\n break;\n case 'ArrowUp':\n if (!('continuePropagation' in e)) {\n e.stopPropagation();\n }\n e.preventDefault();\n state.toggle('last');\n break;\n default:\n // Allow other keys.\n if ('continuePropagation' in e) {\n e.continuePropagation();\n }\n }\n }\n };\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/menu');\n let {longPressProps} = useLongPress({\n isDisabled: isDisabled || trigger !== 'longPress',\n accessibilityDescription: stringFormatter.format('longPressMessage'),\nLine truncated
@@ -0,0 +1,301 @@
"use strict";
// synchronous utility for filtering entries and calculating subwalks
Object.defineProperty(exports, "__esModule", { value: true });
exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0;
const minimatch_1 = require("minimatch");
/**
* A cache of which patterns have been processed for a given Path
*/
class HasWalkedCache {
store;
constructor(store = new Map()) {
this.store = store;
}
copy() {
return new HasWalkedCache(new Map(this.store));
}
hasWalked(target, pattern) {
return this.store.get(target.fullpath())?.has(pattern.globString());
}
storeWalked(target, pattern) {
const fullpath = target.fullpath();
const cached = this.store.get(fullpath);
if (cached)
cached.add(pattern.globString());
else
this.store.set(fullpath, new Set([pattern.globString()]));
}
}
exports.HasWalkedCache = HasWalkedCache;
/**
* A record of which paths have been matched in a given walk step,
* and whether they only are considered a match if they are a directory,
* and whether their absolute or relative path should be returned.
*/
class MatchRecord {
store = new Map();
add(target, absolute, ifDir) {
const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0);
const current = this.store.get(target);
this.store.set(target, current === undefined ? n : n & current);
}
// match, absolute, ifdir
entries() {
return [...this.store.entries()].map(([path, n]) => [
path,
!!(n & 2),
!!(n & 1),
]);
}
}
exports.MatchRecord = MatchRecord;
/**
* A collection of patterns that must be processed in a subsequent step
* for a given path.
*/
class SubWalks {
store = new Map();
add(target, pattern) {
if (!target.canReaddir()) {
return;
}
const subs = this.store.get(target);
if (subs) {
if (!subs.find(p => p.globString() === pattern.globString())) {
subs.push(pattern);
}
}
else
this.store.set(target, [pattern]);
}
get(target) {
const subs = this.store.get(target);
/* c8 ignore start */
if (!subs) {
throw new Error('attempting to walk unknown path');
}
/* c8 ignore stop */
return subs;
}
entries() {
return this.keys().map(k => [k, this.store.get(k)]);
}
keys() {
return [...this.store.keys()].filter(t => t.canReaddir());
}
}
exports.SubWalks = SubWalks;
/**
* The class that processes patterns for a given path.
*
* Handles child entry filtering, and determining whether a path's
* directory contents must be read.
*/
class Processor {
hasWalkedCache;
matches = new MatchRecord();
subwalks = new SubWalks();
patterns;
follow;
dot;
opts;
constructor(opts, hasWalkedCache) {
this.opts = opts;
this.follow = !!opts.follow;
this.dot = !!opts.dot;
this.hasWalkedCache =
hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache();
}
processPatterns(target, patterns) {
this.patterns = patterns;
const processingSet = patterns.map(p => [target, p]);
// map of paths to the magic-starting subwalks they need to walk
// first item in patterns is the filter
for (let [t, pattern] of processingSet) {
this.hasWalkedCache.storeWalked(t, pattern);
const root = pattern.root();
const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
// start absolute patterns at root
if (root) {
t = t.resolve(root === '/' && this.opts.root !== undefined ?
this.opts.root
: root);
const rest = pattern.rest();
if (!rest) {
this.matches.add(t, true, false);
continue;
}
else {
pattern = rest;
}
}
if (t.isENOENT())
continue;
let p;
let rest;
let changed = false;
while (typeof (p = pattern.pattern()) === 'string' &&
(rest = pattern.rest())) {
const c = t.resolve(p);
t = c;
pattern = rest;
changed = true;
}
p = pattern.pattern();
rest = pattern.rest();
if (changed) {
if (this.hasWalkedCache.hasWalked(t, pattern))
continue;
this.hasWalkedCache.storeWalked(t, pattern);
}
// now we have either a final string for a known entry,
// more strings for an unknown entry,
// or a pattern starting with magic, mounted on t.
if (typeof p === 'string') {
// must not be final entry, otherwise we would have
// concatenated it earlier.
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
continue;
}
else if (p === minimatch_1.GLOBSTAR) {
// if no rest, match and subwalk pattern
// if rest, process rest and subwalk pattern
// if it's a symlink, but we didn't get here by way of a
// globstar match (meaning it's the first time THIS globstar
// has traversed a symlink), then we follow it. Otherwise, stop.
if (!t.isSymbolicLink() ||
this.follow ||
pattern.checkFollowGlobstar()) {
this.subwalks.add(t, pattern);
}
const rp = rest?.pattern();
const rrest = rest?.rest();
if (!rest || ((rp === '' || rp === '.') && !rrest)) {
// only HAS to be a dir if it ends in **/ or **/.
// but ending in ** will match files as well.
this.matches.add(t, absolute, rp === '' || rp === '.');
}
else {
if (rp === '..') {
// this would mean you're matching **/.. at the fs root,
// and no thanks, I'm not gonna test that specific case.
/* c8 ignore start */
const tp = t.parent || t;
/* c8 ignore stop */
if (!rrest)
this.matches.add(tp, absolute, true);
else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
this.subwalks.add(tp, rrest);
}
}
}
}
else if (p instanceof RegExp) {
this.subwalks.add(t, pattern);
}
}
return this;
}
subwalkTargets() {
return this.subwalks.keys();
}
child() {
return new Processor(this.opts, this.hasWalkedCache);
}
// return a new Processor containing the subwalks for each
// child entry, and a set of matches, and
// a hasWalkedCache that's a copy of this one
// then we're going to call
filterEntries(parent, entries) {
const patterns = this.subwalks.get(parent);
// put matches and entry walks into the results processor
const results = this.child();
for (const e of entries) {
for (const pattern of patterns) {
const absolute = pattern.isAbsolute();
const p = pattern.pattern();
const rest = pattern.rest();
if (p === minimatch_1.GLOBSTAR) {
results.testGlobstar(e, pattern, rest, absolute);
}
else if (p instanceof RegExp) {
results.testRegExp(e, p, rest, absolute);
}
else {
results.testString(e, p, rest, absolute);
}
}
}
return results;
}
testGlobstar(e, pattern, rest, absolute) {
if (this.dot || !e.name.startsWith('.')) {
if (!pattern.hasMore()) {
this.matches.add(e, absolute, false);
}
if (e.canReaddir()) {
// if we're in follow mode or it's not a symlink, just keep
// testing the same pattern. If there's more after the globstar,
// then this symlink consumes the globstar. If not, then we can
// follow at most ONE symlink along the way, so we mark it, which
// also checks to ensure that it wasn't already marked.
if (this.follow || !e.isSymbolicLink()) {
this.subwalks.add(e, pattern);
}
else if (e.isSymbolicLink()) {
if (rest && pattern.checkFollowGlobstar()) {
this.subwalks.add(e, rest);
}
else if (pattern.markFollowGlobstar()) {
this.subwalks.add(e, pattern);
}
}
}
}
// if the NEXT thing matches this entry, then also add
// the rest.
if (rest) {
const rp = rest.pattern();
if (typeof rp === 'string' &&
// dots and empty were handled already
rp !== '..' &&
rp !== '' &&
rp !== '.') {
this.testString(e, rp, rest.rest(), absolute);
}
else if (rp === '..') {
/* c8 ignore start */
const ep = e.parent || e;
/* c8 ignore stop */
this.subwalks.add(ep, rest);
}
else if (rp instanceof RegExp) {
this.testRegExp(e, rp, rest.rest(), absolute);
}
}
}
testRegExp(e, p, rest, absolute) {
if (!p.test(e.name))
return;
if (!rest) {
this.matches.add(e, absolute, false);
}
else {
this.subwalks.add(e, rest);
}
}
testString(e, p, rest, absolute) {
// should never happen?
if (!e.isNamed(p))
return;
if (!rest) {
this.matches.add(e, absolute, false);
}
else {
this.subwalks.add(e, rest);
}
}
}
exports.Processor = Processor;
//# sourceMappingURL=processor.js.map
@@ -0,0 +1,6 @@
import overArg from './_overArg.js';
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
export default getPrototype;
@@ -0,0 +1,185 @@
class MockerRegistry {
registryByUrl = new Map();
registryById = new Map();
clear() {
this.registryByUrl.clear();
this.registryById.clear();
}
keys() {
return this.registryByUrl.keys();
}
add(mock) {
this.registryByUrl.set(mock.url, mock);
this.registryById.set(mock.id, mock);
}
register(typeOrEvent, raw, id, url, factoryOrRedirect) {
const type = typeof typeOrEvent === "object" ? typeOrEvent.type : typeOrEvent;
if (typeof typeOrEvent === "object") {
const event = typeOrEvent;
if (event instanceof AutomockedModule || event instanceof AutospiedModule || event instanceof ManualMockedModule || event instanceof RedirectedModule) {
throw new TypeError(`[vitest] Cannot register a mock that is already defined. ` + `Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${event.type}". ` + `Use "registry.add()" to update a mock instead.`);
}
if (event.type === "automock") {
const module = AutomockedModule.fromJSON(event);
this.add(module);
return module;
} else if (event.type === "autospy") {
const module = AutospiedModule.fromJSON(event);
this.add(module);
return module;
} else if (event.type === "redirect") {
const module = RedirectedModule.fromJSON(event);
this.add(module);
return module;
} else if (event.type === "manual") {
throw new Error(`Cannot set serialized manual mock. Define a factory function manually with \`ManualMockedModule.fromJSON()\`.`);
} else {
throw new Error(`Unknown mock type: ${event.type}`);
}
}
if (typeof raw !== "string") {
throw new TypeError("[vitest] Mocks require a raw string.");
}
if (typeof url !== "string") {
throw new TypeError("[vitest] Mocks require a url string.");
}
if (typeof id !== "string") {
throw new TypeError("[vitest] Mocks require an id string.");
}
if (type === "manual") {
if (typeof factoryOrRedirect !== "function") {
throw new TypeError("[vitest] Manual mocks require a factory function.");
}
const mock = new ManualMockedModule(raw, id, url, factoryOrRedirect);
this.add(mock);
return mock;
} else if (type === "automock" || type === "autospy") {
const mock = type === "automock" ? new AutomockedModule(raw, id, url) : new AutospiedModule(raw, id, url);
this.add(mock);
return mock;
} else if (type === "redirect") {
if (typeof factoryOrRedirect !== "string") {
throw new TypeError("[vitest] Redirect mocks require a redirect string.");
}
const mock = new RedirectedModule(raw, id, url, factoryOrRedirect);
this.add(mock);
return mock;
} else {
throw new Error(`[vitest] Unknown mock type: ${type}`);
}
}
delete(id) {
this.registryByUrl.delete(id);
}
deleteById(id) {
this.registryById.delete(id);
}
get(id) {
return this.registryByUrl.get(id);
}
getById(id) {
return this.registryById.get(id);
}
has(id) {
return this.registryByUrl.has(id);
}
}
class AutomockedModule {
type = "automock";
constructor(raw, id, url) {
this.raw = raw;
this.id = id;
this.url = url;
}
static fromJSON(data) {
return new AutospiedModule(data.raw, data.id, data.url);
}
toJSON() {
return {
type: this.type,
url: this.url,
raw: this.raw,
id: this.id
};
}
}
class AutospiedModule {
type = "autospy";
constructor(raw, id, url) {
this.raw = raw;
this.id = id;
this.url = url;
}
static fromJSON(data) {
return new AutospiedModule(data.raw, data.id, data.url);
}
toJSON() {
return {
type: this.type,
url: this.url,
id: this.id,
raw: this.raw
};
}
}
class RedirectedModule {
type = "redirect";
constructor(raw, id, url, redirect) {
this.raw = raw;
this.id = id;
this.url = url;
this.redirect = redirect;
}
static fromJSON(data) {
return new RedirectedModule(data.raw, data.id, data.url, data.redirect);
}
toJSON() {
return {
type: this.type,
url: this.url,
raw: this.raw,
id: this.id,
redirect: this.redirect
};
}
}
class ManualMockedModule {
cache;
type = "manual";
constructor(raw, id, url, factory) {
this.raw = raw;
this.id = id;
this.url = url;
this.factory = factory;
}
async resolve() {
if (this.cache) {
return this.cache;
}
let exports$1;
try {
exports$1 = await this.factory();
} catch (err) {
const vitestError = new Error("[vitest] There was an error when mocking a module. " + "If you are using \"vi.mock\" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. " + "Read more: https://vitest.dev/api/vi.html#vi-mock");
vitestError.cause = err;
throw vitestError;
}
if (exports$1 === null || typeof exports$1 !== "object" || Array.isArray(exports$1)) {
throw new TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);
}
return this.cache = exports$1;
}
static fromJSON(data, factory) {
return new ManualMockedModule(data.raw, data.id, data.url, factory);
}
toJSON() {
return {
type: this.type,
url: this.url,
id: this.id,
raw: this.raw
};
}
}
export { AutomockedModule as A, MockerRegistry as M, RedirectedModule as R, ManualMockedModule as a, AutospiedModule as b };
@@ -0,0 +1,36 @@
import type { SchemaOptions, TSchema } from '../schema/index.mjs';
import type { TupleToUnion, Evaluate } from '../helpers/index.mjs';
import { type TRecursive } from '../recursive/index.mjs';
import type { TMappedKey, TMappedResult } from '../mapped/index.mjs';
import { TComputed } from '../computed/index.mjs';
import { TLiteral, TLiteralValue } from '../literal/index.mjs';
import { type TIndexPropertyKeys } from '../indexed/index.mjs';
import { type TIntersect } from '../intersect/index.mjs';
import { type TUnion } from '../union/index.mjs';
import { type TObject, type TProperties } from '../object/index.mjs';
import { type TRef } from '../ref/index.mjs';
import { type TOmitFromMappedKey } from './omit-from-mapped-key.mjs';
import { type TOmitFromMappedResult } from './omit-from-mapped-result.mjs';
type TFromIntersect<Types extends TSchema[], PropertyKeys extends PropertyKey[], Result extends TSchema[] = []> = (Types extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromIntersect<R, PropertyKeys, [...Result, TOmit<L, PropertyKeys>]> : Result);
type TFromUnion<T extends TSchema[], K extends PropertyKey[], Result extends TSchema[] = []> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromUnion<R, K, [...Result, TOmit<L, K>]> : Result);
type TFromProperties<Properties extends TProperties, PropertyKeys extends PropertyKey[], UnionKey extends PropertyKey = TupleToUnion<PropertyKeys>> = (Evaluate<Omit<Properties, UnionKey>>);
type TFromObject<_Type extends TObject, PropertyKeys extends PropertyKey[], Properties extends TProperties, MappedProperties extends TProperties = TFromProperties<Properties, PropertyKeys>, Result extends TSchema = TObject<MappedProperties>> = Result;
type TUnionFromPropertyKeys<PropertyKeys extends PropertyKey[], Result extends TLiteral[] = []> = (PropertyKeys extends [infer Key extends PropertyKey, ...infer Rest extends PropertyKey[]] ? Key extends TLiteralValue ? TUnionFromPropertyKeys<Rest, [...Result, TLiteral<Key>]> : TUnionFromPropertyKeys<Rest, [...Result]> : TUnion<Result>);
export type TOmitResolve<Properties extends TProperties, PropertyKeys extends PropertyKey[]> = (Properties extends TRecursive<infer Types extends TSchema> ? TRecursive<TOmitResolve<Types, PropertyKeys>> : Properties extends TIntersect<infer Types extends TSchema[]> ? TIntersect<TFromIntersect<Types, PropertyKeys>> : Properties extends TUnion<infer Types extends TSchema[]> ? TUnion<TFromUnion<Types, PropertyKeys>> : Properties extends TObject<infer Properties extends TProperties> ? TFromObject<TObject, PropertyKeys, Properties> : TObject<{}>);
type TResolvePropertyKeys<Key extends TSchema | PropertyKey[]> = Key extends TSchema ? TIndexPropertyKeys<Key> : Key;
type TResolveTypeKey<Key extends TSchema | PropertyKey[]> = Key extends PropertyKey[] ? TUnionFromPropertyKeys<Key> : Key;
export type TOmit<Type extends TSchema, Key extends TSchema | PropertyKey[], IsTypeRef extends boolean = Type extends TRef ? true : false, IsKeyRef extends boolean = Key extends TRef ? true : false> = (Type extends TMappedResult ? TOmitFromMappedResult<Type, TResolvePropertyKeys<Key>> : Key extends TMappedKey ? TOmitFromMappedKey<Type, Key> : [
IsTypeRef,
IsKeyRef
] extends [true, true] ? TComputed<'Omit', [Type, TResolveTypeKey<Key>]> : [
IsTypeRef,
IsKeyRef
] extends [false, true] ? TComputed<'Omit', [Type, TResolveTypeKey<Key>]> : [
IsTypeRef,
IsKeyRef
] extends [true, false] ? TComputed<'Omit', [Type, TResolveTypeKey<Key>]> : TOmitResolve<Type, TResolvePropertyKeys<Key>>);
/** `[Json]` Constructs a type whose keys are picked from the given type */
export declare function Omit<Type extends TSchema, Key extends PropertyKey[]>(type: Type, key: readonly [...Key], options?: SchemaOptions): TOmit<Type, Key>;
/** `[Json]` Constructs a type whose keys are picked from the given type */
export declare function Omit<Type extends TSchema, Key extends TSchema>(type: Type, key: Key, options?: SchemaOptions): TOmit<Type, Key>;
export {};
@@ -0,0 +1,48 @@
/**
* @fileoverview Rule to flag usage of __iterator__ property
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getStaticPropertyName } = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow the use of the `__iterator__` property",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-iterator",
},
schema: [],
messages: {
noIterator: "Reserved name '__iterator__'.",
},
},
create(context) {
return {
MemberExpression(node) {
if (getStaticPropertyName(node) === "__iterator__") {
context.report({
node,
messageId: "noIterator",
});
}
},
};
},
};
@@ -0,0 +1,662 @@
import { createApi } from '@reduxjs/toolkit/query/react'
import { createAction } from '@reduxjs/toolkit'
import {
actionsReducer,
hookWaitFor,
setupApiStore,
} from '../../tests/utils/helpers'
import {
render,
renderHook,
act,
waitFor,
screen,
} from '@testing-library/react'
import { delay } from 'msw'
interface Post {
id: string
title: string
contents: string
}
interface FolderT {
id: number
children: FolderT[]
}
const baseQuery = vi.fn()
beforeEach(() => baseQuery.mockReset())
const postAddedAction = createAction<string>('postAdded')
const api = createApi({
baseQuery: (...args: any[]) => {
const result = baseQuery(...args)
if (typeof result === 'object' && 'then' in result)
return result
.then((data: any) => ({ data, meta: 'meta' }))
.catch((e: any) => ({ error: e }))
return { data: result, meta: 'meta' }
},
tagTypes: ['Post', 'Folder'],
endpoints: (build) => ({
getPosts: build.query<Post[], void>({ query: () => '/posts' }),
post: build.query<Post, string>({
query: (id) => `post/${id}`,
providesTags: ['Post'],
}),
updatePost: build.mutation<void, Pick<Post, 'id'> & Partial<Post>>({
query: ({ id, ...patch }) => ({
url: `post/${id}`,
method: 'PATCH',
body: patch,
}),
async onQueryStarted(arg, { dispatch, queryFulfilled, getState }) {
const currentItem = api.endpoints.post.select(arg.id)(getState())
if (currentItem?.data) {
dispatch(
api.util.upsertQueryData('post', arg.id, {
...currentItem.data,
...arg,
}),
)
}
},
invalidatesTags: (result) => (result ? ['Post'] : []),
}),
post2: build.query<Post, string>({
queryFn: async (id) => {
await delay(20)
return { data: { id, title: 'All about cheese.', contents: 'TODO' } }
},
}),
postWithSideEffect: build.query<Post, string>({
query: (id) => `post/${id}`,
providesTags: (result) => {
if (result) {
return [{ type: 'Post', id: result.id } as const]
}
return []
},
async onCacheEntryAdded(arg, api) {
// Verify that lifecycle promise resolution works
const res = await api.cacheDataLoaded
// and leave a side effect we can check in the test
api.dispatch(postAddedAction(res.data.id))
},
keepUnusedDataFor: 0.1,
}),
getFolder: build.query<FolderT, number>({
queryFn: async (args) => {
return {
data: {
id: args,
// Folder contains children that are as well folders
children: [{ id: 2, children: [] }],
},
}
},
providesTags: (result, err, args) => [{ type: 'Folder', id: args }],
onQueryStarted: async (args, queryApi) => {
const { data } = await queryApi.queryFulfilled
// Upsert getFolder endpoint with children from response data
const upsertData = data.children.map((child) => ({
arg: child.id,
endpointName: 'getFolder' as const,
value: child,
}))
queryApi.dispatch(api.util.upsertQueryEntries(upsertData))
},
}),
}),
})
const storeRef = setupApiStore(api, { ...actionsReducer })
describe('basic lifecycle', () => {
let onStart = vi.fn(),
onError = vi.fn(),
onSuccess = vi.fn()
const extendedApi = api.injectEndpoints({
endpoints: (build) => ({
test: build.mutation({
query: (x) => x,
async onQueryStarted(arg, api) {
onStart(arg)
try {
const result = await api.queryFulfilled
onSuccess(result)
} catch (e) {
onError(e)
}
},
}),
}),
overrideExisting: true,
})
beforeEach(() => {
onStart.mockReset()
onError.mockReset()
onSuccess.mockReset()
})
test('Does basic inserts and upserts', async () => {
const newPost: Post = {
id: '3',
contents: 'Inserted content',
title: 'Inserted title',
}
const insertPromise = storeRef.store.dispatch(
api.util.upsertQueryData('post', newPost.id, newPost),
)
await insertPromise
const selectPost3 = api.endpoints.post.select(newPost.id)
const insertedPostEntry = selectPost3(storeRef.store.getState())
expect(insertedPostEntry.isSuccess).toBe(true)
expect(insertedPostEntry.data).toEqual(newPost)
const updatedPost: Post = {
id: '3',
contents: 'Updated content',
title: 'Updated title',
}
const updatePromise = storeRef.store.dispatch(
api.util.upsertQueryData('post', updatedPost.id, updatedPost),
)
await updatePromise
const updatedPostEntry = selectPost3(storeRef.store.getState())
expect(updatedPostEntry.isSuccess).toBe(true)
expect(updatedPostEntry.data).toEqual(updatedPost)
})
test('success', async () => {
const { result } = renderHook(
() => extendedApi.endpoints.test.useMutation(),
{ wrapper: storeRef.wrapper },
)
baseQuery.mockResolvedValue('success')
expect(onStart).not.toHaveBeenCalled()
expect(baseQuery).not.toHaveBeenCalled()
act(() => void result.current[0]('arg'))
expect(onStart).toHaveBeenCalledWith('arg')
expect(baseQuery).toHaveBeenCalledWith('arg', expect.any(Object), undefined)
expect(onError).not.toHaveBeenCalled()
expect(onSuccess).not.toHaveBeenCalled()
await act(() => delay(5))
expect(onError).not.toHaveBeenCalled()
expect(onSuccess).toHaveBeenCalledWith({ data: 'success', meta: 'meta' })
})
test('error', async () => {
const { result } = renderHook(
() => extendedApi.endpoints.test.useMutation(),
{ wrapper: storeRef.wrapper },
)
baseQuery.mockRejectedValueOnce('error')
expect(onStart).not.toHaveBeenCalled()
expect(baseQuery).not.toHaveBeenCalled()
act(() => void result.current[0]('arg'))
expect(onStart).toHaveBeenCalledWith('arg')
expect(baseQuery).toHaveBeenCalledWith('arg', expect.any(Object), undefined)
expect(onError).not.toHaveBeenCalled()
expect(onSuccess).not.toHaveBeenCalled()
await act(() => delay(5))
expect(onError).toHaveBeenCalledWith({
error: 'error',
isUnhandledError: false,
meta: undefined,
})
expect(onSuccess).not.toHaveBeenCalled()
})
})
describe('upsertQueryData', () => {
test('inserts cache entry', async () => {
baseQuery
.mockResolvedValueOnce({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
// TODO I have no idea why the query is getting called multiple times,
// but passing an additional mocked value (_any_ value)
// seems to silence some annoying "got an undefined result" logging
.mockResolvedValueOnce(42)
const { result } = renderHook(() => api.endpoints.post.useQuery('3'), {
wrapper: storeRef.wrapper,
})
await hookWaitFor(() => expect(result.current.isSuccess).toBeTruthy())
const dataBefore = result.current.data
expect(dataBefore).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
await act(async () => {
storeRef.store.dispatch(
api.util.upsertQueryData('post', '3', {
id: '3',
title: 'All about cheese.',
contents: 'I love cheese!',
}),
)
})
expect(result.current.data).not.toBe(dataBefore)
expect(result.current.data).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'I love cheese!',
})
})
test('does update non-existing values', async () => {
baseQuery
// throw an error to make sure there is no cached data
.mockImplementationOnce(async () => {
throw new Error('failed to load')
})
.mockResolvedValueOnce(42)
// a subscriber is needed to have the data stay in the cache
// Not sure if this is the wanted behavior, I would have liked
// it to stay in the cache for the x amount of time the cache
// is preserved normally after the last subscriber was unmounted
const { result, rerender } = renderHook(
() => api.endpoints.post.useQuery('4'),
{ wrapper: storeRef.wrapper },
)
await hookWaitFor(() => expect(result.current.isError).toBeTruthy())
// upsert the data
act(() => {
storeRef.store.dispatch(
api.util.upsertQueryData('post', '4', {
id: '4',
title: 'All about cheese',
contents: 'I love cheese!',
}),
)
})
// rerender the hook
rerender()
// wait until everything has settled
await hookWaitFor(() => expect(result.current.isSuccess).toBeTruthy())
// the cached data is returned as the result
expect(result.current.data).toStrictEqual({
id: '4',
title: 'All about cheese',
contents: 'I love cheese!',
})
})
test('upsert while a normal query is running (success)', async () => {
const fetchedData = {
id: '3',
title: 'All about cheese.',
contents: 'Yummy',
}
baseQuery.mockImplementation(() => delay(20).then(() => fetchedData))
const upsertedData = {
id: '3',
title: 'Data from a SSR Render',
contents: 'This is just some random data',
}
const selector = api.endpoints.post.select('3')
const fetchRes = storeRef.store.dispatch(api.endpoints.post.initiate('3'))
const upsertRes = storeRef.store.dispatch(
api.util.upsertQueryData('post', '3', upsertedData),
)
await upsertRes
let state = selector(storeRef.store.getState())
expect(state.data).toEqual(upsertedData)
await fetchRes
state = selector(storeRef.store.getState())
expect(state.data).toEqual(fetchedData)
})
test('upsert while a normal query is running (rejected)', async () => {
baseQuery.mockImplementationOnce(async () => {
await delay(20)
// eslint-disable-next-line no-throw-literal
throw 'Error!'
})
const upsertedData = {
id: '3',
title: 'Data from a SSR Render',
contents: 'This is just some random data',
}
const selector = api.endpoints.post.select('3')
const fetchRes = storeRef.store.dispatch(api.endpoints.post.initiate('3'))
const upsertRes = storeRef.store.dispatch(
api.util.upsertQueryData('post', '3', upsertedData),
)
await upsertRes
let state = selector(storeRef.store.getState())
expect(state.data).toEqual(upsertedData)
expect(state.isSuccess).toBeTruthy()
await fetchRes
state = selector(storeRef.store.getState())
expect(state.data).toEqual(upsertedData)
expect(state.isError).toBeTruthy()
})
})
describe('upsertQueryEntries', () => {
const posts: Post[] = [
{ id: '1', contents: 'A', title: 'A' },
{ id: '2', contents: 'B', title: 'B' },
{ id: '3', contents: 'C', title: 'C' },
]
const entriesAction = api.util.upsertQueryEntries([
{ endpointName: 'getPosts', arg: undefined, value: posts },
...posts.map((post) => ({
endpointName: 'postWithSideEffect' as const,
arg: post.id,
value: post,
})),
])
test('Upserts many entries at once', async () => {
storeRef.store.dispatch(entriesAction)
const state = storeRef.store.getState()
expect(api.endpoints.getPosts.select()(state).data).toBe(posts)
for (const post of posts) {
expect(api.endpoints.postWithSideEffect.select(post.id)(state).data).toBe(
post,
)
// Should have added tags
expect(state.api.provided.tags.Post[post.id]).toEqual([
`postWithSideEffect("${post.id}")`,
])
}
})
test('Triggers cache lifecycles and side effects', async () => {
storeRef.store.dispatch(entriesAction)
// Tricky timing. The cache data promises will be resolved
// in microtasks. We need to wait for them. Best to do this
// in a loop just to avoid a hardcoded delay, but also this
// needs to complete before `keepUnusedDataFor` expires them.
await waitFor(
() => {
const state = storeRef.store.getState()
// onCacheEntryAdded should have run for each post,
// including cache data being resolved
for (const post of posts) {
const matchingSideEffectAction = state.actions.find(
(action) =>
postAddedAction.match(action) && action.payload === post.id,
)
expect(matchingSideEffectAction).toBeTruthy()
}
const selectedData =
api.endpoints.postWithSideEffect.select('1')(state).data
expect(selectedData).toBe(posts[0])
},
{ timeout: 150, interval: 5 },
)
// The cache data should be removed after the keepUnusedDataFor time,
// so wait longer than that
await delay(300)
const stateAfter = storeRef.store.getState()
expect(api.endpoints.postWithSideEffect.select('1')(stateAfter).data).toBe(
undefined,
)
})
test('Handles repeated upserts and async lifecycles', async () => {
const StateForUpsertFolder = ({ folderId }: { folderId: number }) => {
const { status } = api.useGetFolderQuery(folderId)
return (
<>
<div>
Status getFolder with ID (
{folderId === 1 ? 'original request' : 'upserted'}) {folderId}:{' '}
<span data-testid={`status-${folderId}`}>{status}</span>
</div>
</>
)
}
const Folder = () => {
const { data, isLoading, isError } = api.useGetFolderQuery(1)
return (
<div>
<h1>Folders</h1>
{isLoading && <div>Loading...</div>}
{isError && <div>Error...</div>}
<StateForUpsertFolder key={`state-${1}`} folderId={1} />
<StateForUpsertFolder key={`state-${2}`} folderId={2} />
</div>
)
}
render(<Folder />, { wrapper: storeRef.wrapper })
await waitFor(() => {
const { actions } = storeRef.store.getState()
// Inspection:
// - 2 inits
// - 2 pendings, 2 fulfilleds for the hook queries
// - 2 upserts
expect(actions.length).toBe(8)
expect(
actions.filter((a) => api.util.upsertQueryEntries.match(a)).length,
).toBe(2)
})
expect(screen.getByTestId('status-2').textContent).toBe('fulfilled')
})
})
describe('full integration', () => {
test('success case', async () => {
baseQuery
.mockResolvedValueOnce({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
.mockResolvedValueOnce({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'Delicious cheese!',
})
.mockResolvedValueOnce({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'Delicious cheese!',
})
.mockResolvedValueOnce(42)
const { result } = renderHook(
() => ({
query: api.endpoints.post.useQuery('3'),
mutation: api.endpoints.updatePost.useMutation(),
}),
{ wrapper: storeRef.wrapper },
)
await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy())
expect(result.current.query.data).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
await act(async () => {
await result.current.mutation[0]({
id: '3',
contents: 'Delicious cheese!',
})
})
expect(result.current.query.data).toEqual({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'Delicious cheese!',
})
await hookWaitFor(() =>
expect(result.current.query.data).toEqual({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'Delicious cheese!',
}),
)
})
test('error case', async () => {
baseQuery
.mockResolvedValueOnce({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
.mockRejectedValueOnce('some error!')
.mockResolvedValueOnce({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'TODO',
})
.mockResolvedValueOnce(42)
const { result } = renderHook(
() => ({
query: api.endpoints.post.useQuery('3'),
mutation: api.endpoints.updatePost.useMutation(),
}),
{ wrapper: storeRef.wrapper },
)
await hookWaitFor(() => expect(result.current.query.isSuccess).toBeTruthy())
expect(result.current.query.data).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
await act(async () => {
await result.current.mutation[0]({
id: '3',
contents: 'Delicious cheese!',
})
})
// optimistic update
expect(result.current.query.data).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'Delicious cheese!',
})
// mutation failed - will not invalidate query and not refetch data from the server
await expect(() =>
hookWaitFor(
() =>
expect(result.current.query.data).toEqual({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'TODO',
}),
50,
),
).rejects.toBeTruthy()
act(() => void result.current.query.refetch())
// manually refetching gives up-to-date data
await hookWaitFor(
() =>
expect(result.current.query.data).toEqual({
id: '3',
title: 'Meanwhile, this changed server-side.',
contents: 'TODO',
}),
50,
)
})
test('Interop with in-flight requests', async () => {
await act(async () => {
const fetchRes = storeRef.store.dispatch(
api.endpoints.post2.initiate('3'),
)
const upsertRes = storeRef.store.dispatch(
api.util.upsertQueryData('post2', '3', {
id: '3',
title: 'Upserted title',
contents: 'Upserted contents',
}),
)
const selectEntry = api.endpoints.post2.select('3')
await waitFor(
() => {
const entry1 = selectEntry(storeRef.store.getState())
expect(entry1.data).toEqual({
id: '3',
title: 'Upserted title',
contents: 'Upserted contents',
})
},
{ interval: 1, timeout: 15 },
)
await waitFor(
() => {
const entry2 = selectEntry(storeRef.store.getState())
expect(entry2.data).toEqual({
id: '3',
title: 'All about cheese.',
contents: 'TODO',
})
},
{ interval: 1 },
)
})
})
})
@@ -0,0 +1,239 @@
"use strict";
exports.__esModule = true;
exports.FIELDS = void 0;
exports["default"] = tokenize;
var t = _interopRequireWildcard(require("./tokenTypes"));
var _unescapable, _wordDelimiters;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
var hex = {};
var hexChars = "0123456789abcdefABCDEF";
for (var i = 0; i < hexChars.length; i++) {
hex[hexChars.charCodeAt(i)] = true;
}
/**
* Returns the last index of the bar css word
* @param {string} css The string in which the word begins
* @param {number} start The index into the string where word's first letter occurs
*/
function consumeWord(css, start) {
var next = start;
var code;
do {
code = css.charCodeAt(next);
if (wordDelimiters[code]) {
return next - 1;
} else if (code === t.backslash) {
next = consumeEscape(css, next) + 1;
} else {
// All other characters are part of the word
next++;
}
} while (next < css.length);
return next - 1;
}
/**
* Returns the last index of the escape sequence
* @param {string} css The string in which the sequence begins
* @param {number} start The index into the string where escape character (`\`) occurs.
*/
function consumeEscape(css, start) {
var next = start;
var code = css.charCodeAt(next + 1);
if (unescapable[code]) {
// just consume the escape char
} else if (hex[code]) {
var hexDigits = 0;
// consume up to 6 hex chars
do {
next++;
hexDigits++;
code = css.charCodeAt(next + 1);
} while (hex[code] && hexDigits < 6);
// if fewer than 6 hex chars, a trailing space ends the escape
if (hexDigits < 6 && code === t.space) {
next++;
}
} else {
// the next char is part of the current word
next++;
}
return next;
}
var FIELDS = {
TYPE: 0,
START_LINE: 1,
START_COL: 2,
END_LINE: 3,
END_COL: 4,
START_POS: 5,
END_POS: 6
};
exports.FIELDS = FIELDS;
function tokenize(input) {
var tokens = [];
var css = input.css.valueOf();
var _css = css,
length = _css.length;
var offset = -1;
var line = 1;
var start = 0;
var end = 0;
var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
function unclosed(what, fix) {
if (input.safe) {
// fyi: this is never set to true.
css += fix;
next = css.length - 1;
} else {
throw input.error('Unclosed ' + what, line, start - offset, start);
}
}
while (start < length) {
code = css.charCodeAt(start);
if (code === t.newline) {
offset = start;
line += 1;
}
switch (code) {
case t.space:
case t.tab:
case t.newline:
case t.cr:
case t.feed:
next = start;
do {
next += 1;
code = css.charCodeAt(next);
if (code === t.newline) {
offset = next;
line += 1;
}
} while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
tokenType = t.space;
endLine = line;
endColumn = next - offset - 1;
end = next;
break;
case t.plus:
case t.greaterThan:
case t.tilde:
case t.pipe:
next = start;
do {
next += 1;
code = css.charCodeAt(next);
} while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
tokenType = t.combinator;
endLine = line;
endColumn = start - offset;
end = next;
break;
// Consume these characters as single tokens.
case t.asterisk:
case t.ampersand:
case t.bang:
case t.comma:
case t.equals:
case t.dollar:
case t.caret:
case t.openSquare:
case t.closeSquare:
case t.colon:
case t.semicolon:
case t.openParenthesis:
case t.closeParenthesis:
next = start;
tokenType = code;
endLine = line;
endColumn = start - offset;
end = next + 1;
break;
case t.singleQuote:
case t.doubleQuote:
quote = code === t.singleQuote ? "'" : '"';
next = start;
do {
escaped = false;
next = css.indexOf(quote, next + 1);
if (next === -1) {
unclosed('quote', quote);
}
escapePos = next;
while (css.charCodeAt(escapePos - 1) === t.backslash) {
escapePos -= 1;
escaped = !escaped;
}
} while (escaped);
tokenType = t.str;
endLine = line;
endColumn = start - offset;
end = next + 1;
break;
default:
if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
next = css.indexOf('*/', start + 2) + 1;
if (next === 0) {
unclosed('comment', '*/');
}
content = css.slice(start, next + 1);
lines = content.split('\n');
last = lines.length - 1;
if (last > 0) {
nextLine = line + last;
nextOffset = next - lines[last].length;
} else {
nextLine = line;
nextOffset = offset;
}
tokenType = t.comment;
line = nextLine;
endLine = nextLine;
endColumn = next - nextOffset;
} else if (code === t.slash) {
next = start;
tokenType = code;
endLine = line;
endColumn = start - offset;
end = next + 1;
} else {
next = consumeWord(css, start);
tokenType = t.word;
endLine = line;
endColumn = next - offset;
}
end = next + 1;
break;
}
// Ensure that the token structure remains consistent
tokens.push([tokenType,
// [0] Token type
line,
// [1] Starting line
start - offset,
// [2] Starting column
endLine,
// [3] Ending line
endColumn,
// [4] Ending column
start,
// [5] Start position / Source index
end // [6] End position
]);
// Reset offset for the next token
if (nextOffset) {
offset = nextOffset;
nextOffset = null;
}
start = end;
}
return tokens;
}
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAWM,MAAM;IAkHX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAkC;QAClD,OAAO;eAAI,IAAI,CAAC,IAAI;SAAC;IACvB;IAEA,IAAI,OAAe;QACjB,OAAO;eAAI,IAAI,CAAC,IAAI;SAAC,CAAC,MAAM;IAC9B;IAEA,UAAiC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,aAAa,GAAQ,EAAc;QACjC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,YAAY,GAAQ,EAAc;QAChC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,cAA0B;YACjB;QAAP,QAAO,IAAA;eAAI,IAAI,CAAC,IAAI;SAAC,CAAC,EAAE,cAAjB,wBAAA,EAAmB,GAAG;IAC/B;IAEA,aAAyB;YAEhB;QADP,IAAI,OAAO;eAAI,IAAI,CAAC,IAAI;SAAC;QACzB,QAAO,SAAA,IAAI,CAAC,KAAK,MAAM,GAAG,EAAE,cAArB,6BAAA,OAAuB,GAAG;IACnC;IAEA,QAAQ,GAAQ,EAAsB;YAC7B;QAAP,OAAO,CAAA,mBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAhB,8BAAA,mBAAwB;IACjC;IAEA,GAAG,GAAW,EAAsB;QAClC,MAAM,OAAO;eAAI,IAAI,CAAC,OAAO;SAAG;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;IAC/B;IAEA,YAAY,GAAQ,EAAyB;QAC3C,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,OAAO,CAAA,iBAAA,2BAAA,KAAM,UAAU,KAAI,EAAE;IAC/B;IAxJA,YAAY,IAA8B,CAAE;aAJ5C,SAAgC,IAAI;QAKlC,IAAI,CAAC,MAAM,GAAG,IAAI;QAClB,IAAI,CAAC,WAAW,GAAG,iBAAA,2BAAA,KAAM,WAAW;QACpC,IAAI,CAAC,IAAI,GAAG,EAAE;QAEd,IAAI,QAAQ,CAAC;YACX,wEAAwE;YACxE,0EAA0E;YAC1E,yDAAyD;YACzD,IAAI,WAAW,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG;YACvC,IAAI,KAAK,SAAS,EAChB,OAAO,KAAK,SAAS,CAAC;YAGxB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YAE1B,IAAI,YAAY,IAAI;YACpB,IAAI,OAA2B;YAC/B,IAAI,wBAAwB;YAE5B,IAAI,KAAK,IAAI,KAAK,QAAQ;oBAElB;gBADN,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,IAAI,EAAA,eAAA,MAAM,KAAK,cAAX,mCAAA,aAAa,OAAO,MAAK,WAAW;oBACtC,wBAAwB;oBACxB;gBACF;YAEJ;YAEA,KAAK,IAAI,SAAS,KAAK,UAAU,CAA2B;gBAC1D,IAAI,MAAM,IAAI,KAAK,UAAU,uBAAuB;wBAClC,eACA;oBADhB,MAAM,OAAO,IAAG,gBAAA,MAAM,KAAK,cAAX,oCAAA,cAAa,OAAO;oBACpC,MAAM,OAAO,IAAG,gBAAA,MAAM,KAAK,cAAX,oCAAA,cAAa,OAAO;wBACI,gBAAgC;oBAAxE,MAAM,QAAQ,GAAG,CAAC,OAAO,MAAM,KAAK,GAAG,AAAC,CAAA,CAAA,iBAAA,KAAK,QAAQ,cAAb,4BAAA,iBAAiB,KAAK,KAAK,AAAD,IAAM,CAAA,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,CAAA;gBAC1F;gBAEA,IAAI,MAAM,IAAI,KAAK,UAAU,MAAM,SAAS,IAAI,MAC9C,4GAA4G;gBAC5G,MAAM,SAAS,GAAG,KAAK,GAAG;gBAE5B,UAAU,GAAG,CAAC,MAAM,GAAG;gBAEvB,IAAI,MAAM;oBACR,KAAK,OAAO,GAAG,MAAM,GAAG;oBACxB,MAAM,OAAO,GAAG,KAAK,GAAG;gBAC1B,OACE,MAAM,OAAO,GAAG;gBAGlB,MAAM;gBACN,OAAO;YACT;YAEA,IAAI,MACF,KAAK,OAAO,GAAG;YAGjB,2DAA2D;YAC3D,IAAI,UAAU;gBACZ,KAAK,IAAI,SAAS,SAAS,UAAU,CACnC,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,GAAG,GAC1B,OAAO;YAGb;QACF;QAEA,IAAI,SAAS,CAAC;YACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG;YAC3B,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,OACjC,OAAO;QAGb;QAEA,IAAI,OAA2B;QAC/B,KAAK,IAAI,CAAC,GAAG,KAAK,IAAI,KAAK,KAAK,CAAC,OAAO,GAAI;gBAGjC,aACF,WACC,YACC,aAII,iBACJ;YAVT,IAAI,UAAuB;gBACzB,GAAG,IAAI;gBACP,OAAO,CAAA,cAAA,KAAK,KAAK,cAAV,yBAAA,cAAc;gBACrB,KAAK,CAAA,YAAA,KAAK,GAAG,cAAR,uBAAA,YAAY,SAAS;gBAC1B,MAAM,CAAA,aAAA,KAAK,IAAI,cAAT,wBAAA,aAAa;gBACnB,OAAO,CAAA,cAAA,KAAK,KAAK,cAAV,yBAAA,cAAc;gBACrB,eAAe;gBACf,YAAY;uBAAI,KAAK,UAAU;iBAAC;gBAChC,UAAU,KAAK,QAAQ;gBACvB,WAAW,CAAA,kBAAA,KAAK,SAAS,cAAd,6BAAA,kBAAkB;gBAC7B,OAAO,CAAA,cAAA,KAAK,KAAK,cAAV,yBAAA,cAAc;YACvB;YAEA,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG,QAAQ,GAAG;gBAC1B,QAAQ,OAAO,GAAG,KAAK,GAAG;YAC5B,OACE,QAAQ,OAAO,GAAG;YAGpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACf,MAAM;YAEN,OAAO;QACT;QAEA,IAAI,MACF,KAAK,OAAO,GAAG;IAEnB;AA8CF","sources":["packages/@react-stately/grid/src/GridCollection.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 {GridNode, GridRow, GridCollection as IGridCollection} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\n\ninterface GridCollectionOptions<T> {\n columnCount: number,\n items: GridRow<T>[],\n visitNode?: (cell: GridNode<T>) => GridNode<T>\n}\n\nexport class GridCollection<T> implements IGridCollection<T> {\n keyMap: Map<Key, GridNode<T>> = new Map();\n columnCount: number;\n rows: GridNode<T>[];\n\n constructor(opts: GridCollectionOptions<T>) {\n this.keyMap = new Map();\n this.columnCount = opts?.columnCount;\n this.rows = [];\n\n let visit = (node: GridNode<T>) => {\n // If the node is the same object as the previous node for the same key,\n // we can skip this node and its children. We always visit columns though,\n // because we depend on order to build the columns array.\n let prevNode = this.keyMap.get(node.key);\n if (opts.visitNode) {\n Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"stringToPath.d.ts","sourceRoot":"","sources":["../../src/utils/stringToPath.ts"],"names":[],"mappings":"yBAEgB,OAAO,MAAM,KAAG,MAAM,EAAE;AAAxC,wBACyD"}
@@ -0,0 +1,199 @@
import { buildGetDefaultMiddleware } from '@internal/getDefaultMiddleware'
import type {
Action,
Dispatch,
Middleware,
ThunkAction,
ThunkDispatch,
ThunkMiddleware,
Tuple,
UnknownAction,
} from '@reduxjs/toolkit'
import { configureStore } from '@reduxjs/toolkit'
declare const middleware1: Middleware<{
(_: string): number
}>
declare const middleware2: Middleware<{
(_: number): string
}>
type ThunkReturn = Promise<'thunk'>
declare const thunkCreator: () => () => ThunkReturn
const getDefaultMiddleware = buildGetDefaultMiddleware()
describe('type tests', () => {
test('prepend single element', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().prepend(middleware1),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('prepend multiple (rest)', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().prepend(middleware1, middleware2),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(5)).toBeString()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('prepend multiple (array notation)', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().prepend([middleware1, middleware2] as const),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(5)).toBeString()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('concat single element', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().concat(middleware1),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('prepend multiple (rest)', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().concat(middleware1, middleware2),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(5)).toBeString()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('concat multiple (array notation)', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().concat([middleware1, middleware2] as const),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(5)).toBeString()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('concat and prepend', () => {
const store = configureStore({
reducer: () => 0,
middleware: (gDM) => gDM().concat(middleware1).prepend(middleware2),
})
expectTypeOf(store.dispatch('foo')).toBeNumber()
expectTypeOf(store.dispatch(5)).toBeString()
expectTypeOf(store.dispatch(thunkCreator())).toEqualTypeOf<ThunkReturn>()
expectTypeOf(store.dispatch('foo')).not.toBeString()
})
test('allows passing options to thunk', () => {
const extraArgument = 42 as const
const m2 = getDefaultMiddleware({
thunk: false,
})
expectTypeOf(m2).toMatchTypeOf<Tuple<[]>>()
const dummyMiddleware: Middleware<
{
(action: Action<'actionListenerMiddleware/add'>): () => void
},
{ counter: number }
> = (storeApi) => (next) => (action) => {
return next(action)
}
const dummyMiddleware2: Middleware<{}, { counter: number }> =
(storeApi) => (next) => (action) => {}
const testThunk: ThunkAction<
void,
{ counter: number },
number,
UnknownAction
> = (dispatch, getState, extraArg) => {
expect(extraArg).toBe(extraArgument)
}
const reducer = () => ({ counter: 123 })
const store = configureStore({
reducer,
middleware: (gDM) => {
const middleware = gDM({
thunk: { extraArgument },
immutableCheck: false,
serializableCheck: false,
actionCreatorCheck: false,
})
const m3 = middleware.concat(dummyMiddleware, dummyMiddleware2)
expectTypeOf(m3).toMatchTypeOf<
Tuple<
[
ThunkMiddleware<any, UnknownAction, 42>,
Middleware<
(action: Action<'actionListenerMiddleware/add'>) => () => void,
{
counter: number
},
Dispatch<UnknownAction>
>,
Middleware<{}, any, Dispatch<UnknownAction>>,
]
>
>()
return m3
},
})
expectTypeOf(store.dispatch).toMatchTypeOf<
ThunkDispatch<any, 42, UnknownAction> & Dispatch<UnknownAction>
>()
store.dispatch(testThunk)
})
})
@@ -0,0 +1,28 @@
"use strict";
exports.__esModule = true;
exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
var TAG = 'tag';
exports.TAG = TAG;
var STRING = 'string';
exports.STRING = STRING;
var SELECTOR = 'selector';
exports.SELECTOR = SELECTOR;
var ROOT = 'root';
exports.ROOT = ROOT;
var PSEUDO = 'pseudo';
exports.PSEUDO = PSEUDO;
var NESTING = 'nesting';
exports.NESTING = NESTING;
var ID = 'id';
exports.ID = ID;
var COMMENT = 'comment';
exports.COMMENT = COMMENT;
var COMBINATOR = 'combinator';
exports.COMBINATOR = COMBINATOR;
var CLASS = 'class';
exports.CLASS = CLASS;
var ATTRIBUTE = 'attribute';
exports.ATTRIBUTE = ATTRIBUTE;
var UNIVERSAL = 'universal';
exports.UNIVERSAL = UNIVERSAL;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classCallCheck;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
//# sourceMappingURL=classCallCheck.js.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,YAAY,CAAC;IACxE,qBAAqB,CAAC,+CAA+C,CAAC;IACtE,UAAU,CAAC,OAAI,CAAC;IAChB,eAAe,CAAC,qBAAqB,CAAC;IACtC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,qBAAqB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,cAAc,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,gBAAgB,CAAC;QAAA,GAAG,CAAC,CAAC;IACrO,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC;AACjD","sources":["packages/@react-aria/grid/intl/da-DK.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} ikke valgt.\",\n \"longPressToSelect\": \"Lav et langt tryk for at aktivere valgtilstand.\",\n \"select\": \"Vælg\",\n \"selectedAll\": \"Alle elementer valgt.\",\n \"selectedCount\": \"{count, plural, =0 {Ingen elementer valgt} one {# element valgt} other {# elementer valgt}}.\",\n \"selectedItem\": \"{item} valgt.\"\n}\n"],"names":[],"version":3,"file":"da-DK.module.js.map"}
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAgDM,SAAS,0CAAoB,KAAuB;IACzD,IAAI,iBAAC,gBAAgB,kCAAU,sBAAsB,cAAE,aAAa,OAAM,GAAG;IAC7E,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,yBAAiB,EACrD,CAAA,GAAA,cAAM,EAAE,IAAM,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,WAAW;QAAC,MAAM,YAAY;KAAC,GAChG,CAAA,GAAA,cAAM,EAAE,IAAM,MAAM,mBAAmB,GAAG,IAAI,IAAI,MAAM,mBAAmB,IAAI,IAAI,OAAO;QAAC,MAAM,mBAAmB;KAAC,GACrH,MAAM,iBAAiB;IAGzB,OAAO;uBACL;oBACA;sBACA;yBACA;QACA,WAAU,GAAG;YACX,IAAI;YACJ,IAAI,kBAAkB,YAAY;gBAChC,OAAO,IAAI,IAAI;gBACf,IAAI,KAAK,GAAG,CAAC,QAAS,CAAA,CAAC,0BAA0B,KAAK,IAAI,GAAG,CAAA,GAC3D,KAAK,MAAM,CAAC;qBAEZ,KAAK,GAAG,CAAC;YAEb,OACE,OAAO,IAAI,IAAI,aAAa,GAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,GAAG;gBAAC;aAAI;YAG9E,gBAAgB;QAClB;QACA,aAAY,GAAG,EAAE,UAAU;YACzB,IAAI,eAAe,aAAa,GAAG,CAAC,MAClC,IAAI,CAAC,SAAS,CAAC;QAEnB;IACF;AACF","sources":["packages/@react-stately/toggle/src/useToggleGroupState.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {Key} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface ToggleGroupProps {\n /**\n * Whether single or multiple selection is enabled.\n * @default 'single'\n */\n selectionMode?: 'single' | 'multiple',\n /** Whether the collection allows empty selection. */\n disallowEmptySelection?: boolean,\n /** The currently selected keys in the collection (controlled). */\n selectedKeys?: Iterable<Key>,\n /** The initial selected keys in the collection (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>,\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (keys: Set<Key>) => void,\n /** Whether all items are disabled. */\n isDisabled?: boolean\n}\n\nexport interface ToggleGroupState {\n /** Whether single or multiple selection is enabled. */\n readonly selectionMode: 'single' | 'multiple',\n\n /** Whether all items are disabled. */\n readonly isDisabled: boolean,\n \n /** A set of keys for items that are selected. */\n readonly selectedKeys: Set<Key>,\n\n /** Toggles the selected state for an item by its key. */\n toggleKey(key: Key): void,\n\n /** Sets whether the given key is selected. */\n setSelected(key: Key, isSelected: boolean): void,\n\n /** Replaces the set of selected keys. */\n setSelectedKeys(keys: Set<Key>): void\n}\n\n/**\n * Manages state for a group of toggles.\n * It supports both single and multiple selected items.\n */\nexport function useToggleGroupState(props: ToggleGroupProps): ToggleGroupState {\n let {selectionMode = 'single', disallowEmptySelection, isDisabled = false} = props;\n let [selectedKeys, setSelectedKeys] = useControlledState(\n useMemo(() => props.selectedKeys ? new Set(props.selectedKeys) : undefined, [props.selectedKeys]),\n useMemo(() => props.defaultSelectedKeys ? new Set(props.defaultSelectedKeys) : new Set(), [props.defaultSelectedKeys]),\n props.onSelectionChange\n );\n\n return {\n selectionMode,\n isDisabled,\n selectedKeys,\n setSelectedKeys,\n toggleKey(key) {\n let keys: Set<Key>;\n if (selectionMode === 'multiple') {\n keys = new Set(selectedKeys);\n if (keys.has(key) && (!disallowEmptySelection || keys.size > 1)) {\n keys.delete(key);\n } else {\n keys.add(key);\n }\n } else {\n keys = new Set(selectedKeys.has(key) && !disallowEmptySelection ? [] : [key]);\n }\n \n setSelectedKeys(keys);\n },\n setSelected(key, isSelected) {\n if (isSelected !== selectedKeys.has(key)) {\n this.toggleKey(key);\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"useToggleGroupState.module.js.map"}
@@ -0,0 +1,3 @@
# @react-types/menu
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,36 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _useBoolean = _interopRequireDefault(require("../useBoolean"));
var _useEventListener = _interopRequireDefault(require("../useEventListener"));
var _default = exports["default"] = function _default(target, options) {
var _a = options || {},
onEnter = _a.onEnter,
onLeave = _a.onLeave,
onChange = _a.onChange;
var _b = (0, _tslib.__read)((0, _useBoolean["default"])(false), 2),
state = _b[0],
_c = _b[1],
setTrue = _c.setTrue,
setFalse = _c.setFalse;
(0, _useEventListener["default"])('mouseenter', function () {
onEnter === null || onEnter === void 0 ? void 0 : onEnter();
setTrue();
onChange === null || onChange === void 0 ? void 0 : onChange(true);
}, {
target: target
});
(0, _useEventListener["default"])('mouseleave', function () {
onLeave === null || onLeave === void 0 ? void 0 : onLeave();
setFalse();
onChange === null || onChange === void 0 ? void 0 : onChange(false);
}, {
target: target
});
return state;
};
@@ -0,0 +1,11 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": 0,
"new-cap": [2, { "capIsNewExceptions": ["RequireObjectCoercible"] }],
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
},
}
@@ -0,0 +1,30 @@
import { LogStack } from '../../packet/context/clientContext';
import { NapCoreContext } from '../../packet/context/napCoreContext';
import { PacketLogger } from '../../packet/context/loggerContext';
import { OidbPacket, PacketBuf } from '../../packet/transformer/base';
export interface RecvPacket {
type: string;
data: RecvPacketData;
}
export interface RecvPacketData {
seq: number;
cmd: string;
data: Buffer;
}
export interface NativePacketExportType {
initHook?: (send: string, recv: string) => boolean;
}
export declare class NativePacketClient {
protected readonly napcore: NapCoreContext;
protected readonly logger: PacketLogger;
protected readonly cb: Map<string, (json: RecvPacketData) => Promise<any> | any>;
logStack: LogStack;
available: boolean;
private readonly supportedPlatforms;
private readonly MoeHooExport;
constructor(napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack);
check(): boolean;
init(_pid: number, recv: string, send: string): Promise<void>;
sendPacket(cmd: string, data: PacketBuf, rsp?: boolean, timeout?: number): Promise<RecvPacketData>;
sendOidbPacket(pkt: OidbPacket, rsp?: boolean, timeout?: number): Promise<RecvPacketData>;
}
@@ -0,0 +1,7 @@
"use client";
import {
useSkeleton
} from "./chunk-XB6FZTQR.mjs";
export {
useSkeleton
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,YAAY,CAAC;AACjD","sources":["packages/@react-aria/breadcrumbs/intl/es-ES.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Migas de pan\"\n}\n"],"names":[],"version":3,"file":"es-ES.main.js.map"}
@@ -0,0 +1,2 @@
export declare function jsxParseElement(): void;
export declare function nextJSXTagToken(): void;
@@ -0,0 +1 @@
{"name":"p-map","version":"7.0.4","requiresBuild":false,"files":{"license":{"checkedAt":1794532127689,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532127689,"integrity":"sha512-ThhI3ppU6irDhmjULuw0e+wwJPvhGjmPeloMsBHRS2Sx/3Os/kXxZsxQ0E4RahJF2S9w42CqEwd6hHXrmC1Phw==","mode":420,"size":7151},"package.json":{"checkedAt":1794532127689,"integrity":"sha512-2Xu6QqwY3c/XGrvsngDkAa/AVwGo6Wop9jlWIWWbSkVhdUnw6CJQ3JLm8WlYR6kGSJjc5frJy2xZTkDfMv0LsQ==","mode":420,"size":993},"readme.md":{"checkedAt":1794532127689,"integrity":"sha512-cp/0fspvvg7q5hCl6vjxTsbvU5GluKChXw0J6SEFKH2vuh2ZqCy995/wWnXHNc224Xj+L7sNWbe1bo8NgqMp1w==","mode":420,"size":5705},"index.d.ts":{"checkedAt":1794532127689,"integrity":"sha512-cndOQarMK0s8LEu+UrLA7cbyIszik8Csl4XW+yUGH7VqAikEKMkaFBlxWkfJ46uQMWBvde3eaBFcD2fhJ293eA==","mode":420,"size":6285}}}
@@ -0,0 +1,24 @@
var castPath = require('./_castPath'),
toKey = require('./_toKey');
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
@@ -0,0 +1,42 @@
'use strict'
let Container = require('./container')
let Input = require('./input')
let Parser = require('./parser')
function parse(css, opts) {
let input = new Input(css, opts)
let parser = new Parser(input)
try {
parser.parse()
} catch (e) {
if (process.env.NODE_ENV !== 'production') {
if (e.name === 'CssSyntaxError' && opts && opts.from) {
if (/\.scss$/i.test(opts.from)) {
e.message +=
'\nYou tried to parse SCSS with ' +
'the standard CSS parser; ' +
'try again with the postcss-scss parser'
} else if (/\.sass/i.test(opts.from)) {
e.message +=
'\nYou tried to parse Sass with ' +
'the standard CSS parser; ' +
'try again with the postcss-sass parser'
} else if (/\.less$/i.test(opts.from)) {
e.message +=
'\nYou tried to parse Less with ' +
'the standard CSS parser; ' +
'try again with the postcss-less parser'
}
}
}
throw e
}
return parser.root
}
module.exports = parse
parse.default = parse
Container.registerParse(parse)
@@ -0,0 +1,30 @@
const fs = require('fs');
const path = require('path');
function del(targetPath) {
if (!fs.existsSync(targetPath)) {
return false;
}
try {
if (fs.statSync(targetPath).isDirectory()) {
// If it's a directory, delete its contents first
fs.readdirSync(targetPath).forEach(file => {
const curPath = path.join(targetPath, file);
if (fs.statSync(curPath).isFile()) {
fs.unlinkSync(curPath); // Delete file
}
});
fs.rmdirSync(targetPath); // Delete the now-empty directory
} else {
fs.unlinkSync(targetPath); // If it's a file, delete it directly
}
return true;
} catch (error) {
console.error(`Error while deleting ${targetPath}: ${error.message}`);
}
}
module.exports = { del };
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAwDM,SAAS,0CAAsB,QAA4B,CAAC,CAAC;IAClE,IAAI,CAAC,gBAAgB,SAAS,GAAG,CAAA,GAAA,yBAAiB,EAAE,MAAM,KAAK,EAAE,MAAM,YAAY,IAAI,EAAE,EAAE,MAAM,QAAQ;IACzG,IAAI,aAAa,CAAC,CAAC,MAAM,UAAU,IAAI,eAAe,MAAM,KAAK;IAEjE,IAAI,gBAAgB,CAAA,GAAA,aAAK,EAAE,IAAI;IAC/B,IAAI,aAAa,CAAA,GAAA,6BAAqB,EAAE;QACtC,GAAG,KAAK;QACR,OAAO;IACT;IAEA,IAAI,YAAY,WAAW,iBAAiB,CAAC,SAAS;QAqDnC;IApDnB,MAAM,QAA4B;QAChC,GAAG,UAAU;QACb,OAAO;QACP,UAAS,KAAK;YACZ,IAAI,MAAM,UAAU,IAAI,MAAM,UAAU,EACtC;YAGF,SAAS;QACX;QACA,YAAY,MAAM,UAAU,IAAI;QAChC,YAAY,MAAM,UAAU,IAAI;QAChC,YAAW,KAAK;YACd,OAAO,eAAe,QAAQ,CAAC;QACjC;QACA,UAAS,KAAK;YACZ,IAAI,MAAM,UAAU,IAAI,MAAM,UAAU,EACtC;YAEF,IAAI,CAAC,eAAe,QAAQ,CAAC,QAC3B,SAAS,eAAe,MAAM,CAAC;QAEnC;QACA,aAAY,KAAK;YACf,IAAI,MAAM,UAAU,IAAI,MAAM,UAAU,EACtC;YAEF,IAAI,eAAe,QAAQ,CAAC,QAC1B,SAAS,eAAe,MAAM,CAAC,CAAA,gBAAiB,kBAAkB;QAEtE;QACA,aAAY,KAAK;YACf,IAAI,MAAM,UAAU,IAAI,MAAM,UAAU,EACtC;YAEF,IAAI,eAAe,QAAQ,CAAC,QAC1B,SAAS,eAAe,MAAM,CAAC,CAAA,gBAAiB,kBAAkB;iBAElE,SAAS,eAAe,MAAM,CAAC;QAEnC;QACA,YAAW,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,IAAI,IAAI,cAAc,OAAO;YACrC,IAAI,EAAE,SAAS,EACb,EAAE,GAAG,CAAC,OAAO;iBAEb,EAAE,MAAM,CAAC;YAGX,cAAc,OAAO,GAAG;YACxB,WAAW,gBAAgB,CAAC,CAAA,GAAA,sBAAc,KAAK,EAAE,MAAM;QACzD;QACA,iBAAiB,CAAA,yBAAA,MAAM,eAAe,cAArB,oCAAA,yBAA0B,YAAY,YAAY;mBACnE;oBACA;IACF;IAEA,OAAO;AACT","sources":["packages/@react-stately/checkbox/src/useCheckboxGroupState.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 {CheckboxGroupProps} from '@react-types/checkbox';\nimport {FormValidationState, mergeValidation, useFormValidationState} from '@react-stately/form';\nimport {useControlledState} from '@react-stately/utils';\nimport {useRef} from 'react';\nimport {ValidationResult, ValidationState} from '@react-types/shared';\n\nexport interface CheckboxGroupState extends FormValidationState {\n /** Current selected values. */\n readonly value: readonly string[],\n\n /** Whether the checkbox group is disabled. */\n readonly isDisabled: boolean,\n\n /** Whether the checkbox group is read only. */\n readonly isReadOnly: boolean,\n\n /**\n * The current validation state of the checkbox group.\n * @deprecated Use `isInvalid` instead.\n */\n readonly validationState: ValidationState | null,\n\n /** Whether the checkbox group is invalid. */\n readonly isInvalid: boolean,\n\n /**\n * Whether the checkboxes in the group are required.\n * This changes to false once at least one item is selected.\n */\n readonly isRequired: boolean,\n\n /** Returns whether the given value is selected. */\n isSelected(value: string): boolean,\n\n /** Sets the selected values. */\n setValue(value: string[]): void,\n\n /** Adds a value to the set of selected values. */\n addValue(value: string): void,\n\n /** Removes a value from the set of selected values. */\n removeValue(value: string): void,\n\n /** Toggles a value in the set of selected values. */\n toggleValue(value: string): void,\n\n /** Sets whether one of the checkboxes is invalid. */\n setInvalid(value: string, validation: ValidationResult): void\n}\n\n/**\n * Provides state management for a checkbox group component. Provides a name for the group,\n * and manages selection and focus state.\n */\nexport function useCheckboxGroupState(props: CheckboxGroupProps = {}): CheckboxGroupState {\n let [selectedValues, setValue] = useControlledState(props.value, props.defaultValue || [], props.onChange);\n let isRequired = !!props.isRequired && selectedValues.length === 0;\n\n let invalidValues = useRef(new Map<string, ValidationResult>());\n let validation = useFormValidationState({\n ...props,\n value: selectedValues\n });\n\n let isInvalid = validation.displayValidation.isInvalid;\n const state: CheckboxGroupState = {\n ...validation,\n value: selectedValues,\n setValue(value) {\n if (props.isReadOnly || props.isDisabled) {\n return;\n }\n\n setValue(value);\n },\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isSelected(value) {\n return selectedValues.includes(value);\n },\n addValue(value) {\n if (props.isReadOnly || props.isDisabled) {\n return;\n }\n if (!selectedValues.includes(value)) {\n setValue(selectedValues.concat(value));\n }\n },\n removeValue(value) {\n if (props.isReadOnly || props.isDisabLine truncated
@@ -0,0 +1,35 @@
var assocIndexOf = require('./_assocIndexOf');
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","16":"wC","132":"K D E F A"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","132":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB 0C 1C"},D:{"1":"0 1 2 3 4 5 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","132":"6 7 8 9 J ZB K D E F A B C L M G N O P aB"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","132":"J ZB K D E F 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","16":"F B C FD GD HD ID NC uC JD","132":"OC"},G:{"1":"RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","132":"E ZC KD vC LD MD ND OD PD QD"},H:{"132":"hD"},I:{"1":"I mD nD","132":"TC J iD jD kD lD vC"},J:{"132":"D A"},K:{"1":"H","16":"A B C NC uC","132":"OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"B","132":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","132":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","4":"1D"}},B:6,C:"localeCompare()",D:true};
@@ -0,0 +1,79 @@
/**
* @import {Options, State} from './types.js'
*/
const own = {}.hasOwnProperty
/**
* @param {State} base
* @param {Options} extension
* @returns {State}
*/
export function configure(base, extension) {
let index = -1
/** @type {keyof Options} */
let key
// First do subextensions.
if (extension.extensions) {
while (++index < extension.extensions.length) {
configure(base, extension.extensions[index])
}
}
for (key in extension) {
if (own.call(extension, key)) {
switch (key) {
case 'extensions': {
// Empty.
break
}
/* c8 ignore next 4 */
case 'unsafe': {
list(base[key], extension[key])
break
}
case 'join': {
list(base[key], extension[key])
break
}
case 'handlers': {
map(base[key], extension[key])
break
}
default: {
// @ts-expect-error: matches.
base.options[key] = extension[key]
}
}
}
}
return base
}
/**
* @template T
* @param {Array<T>} left
* @param {Array<T> | null | undefined} right
*/
function list(left, right) {
if (right) {
left.push(...right)
}
}
/**
* @template T
* @param {Record<string, T>} left
* @param {Record<string, T> | null | undefined} right
*/
function map(left, right) {
if (right) {
Object.assign(left, right)
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["index.js"],"names":["Object","defineProperty","exports","value","primitives_js_1","require","util_js_1","block_parser_js_1","source_parser_js_1","spec_parser_js_1","tag_js_1","type_js_1","name_js_1","description_js_1","getParser","startLine","fence","spacing","markers","Markers","tokenizers","default","Error","parseSource","parseBlock","parseSpec","joinDescription","getJoiner","source","blocks","line","splitLines","lines","sections","specs","slice","map","push","description","tags","problems","reduce","acc","spec","concat"],"mappings":"AAAA;;AACAA,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAAEC,EAAAA,KAAK,EAAE;AAAT,CAA7C;;AACA,MAAMC,eAAe,GAAGC,OAAH,qBAArB;;AACA,MAAMC,SAAS,GAAGD,OAAH,eAAf;;AACA,MAAME,iBAAiB,GAAGF,OAAH,sBAAvB;;AACA,MAAMG,kBAAkB,GAAGH,OAAH,uBAAxB;;AACA,MAAMI,gBAAgB,GAAGJ,OAAH,qBAAtB;;AACA,MAAMK,QAAQ,GAAGL,OAAH,wBAAd;;AACA,MAAMM,SAAS,GAAGN,OAAH,yBAAf;;AACA,MAAMO,SAAS,GAAGP,OAAH,yBAAf;;AACA,MAAMQ,gBAAgB,GAAGR,OAAH,gCAAtB;;AACA,SAASS,SAAT,CAAmB;AAAEC,EAAAA,SAAS,GAAG,CAAd;AAAiBC,EAAAA,KAAK,GAAG,KAAzB;AAAgCC,EAAAA,OAAO,GAAG,SAA1C;AAAqDC,EAAAA,OAAO,GAAGd,eAAe,CAACe,OAA/E;AAAwFC,EAAAA,UAAU,GAAG,CACpH,CAAC,GAAGV,QAAQ,CAACW,OAAb,GADoH,EAEpH,CAAC,GAAGV,SAAS,CAACU,OAAd,EAAuBJ,OAAvB,CAFoH,EAGpH,CAAC,GAAGL,SAAS,CAACS,OAAd,GAHoH,EAIpH,CAAC,GAAGR,gBAAgB,CAACQ,OAArB,EAA8BJ,OAA9B,CAJoH;AAArG,IAKZ,EALP,EAKW;AACP,MAAIF,SAAS,GAAG,CAAZ,IAAiBA,SAAS,GAAG,CAAZ,GAAgB,CAArC,EACI,MAAM,IAAIO,KAAJ,CAAU,mBAAV,CAAN;AACJ,QAAMC,WAAW,GAAG,CAAC,GAAGf,kBAAkB,CAACa,OAAvB,EAAgC;AAAEN,IAAAA,SAAF;AAAaG,IAAAA;AAAb,GAAhC,CAApB;AACA,QAAMM,UAAU,GAAG,CAAC,GAAGjB,iBAAiB,CAACc,OAAtB,EAA+B;AAAEL,IAAAA;AAAF,GAA/B,CAAnB;AACA,QAAMS,SAAS,GAAG,CAAC,GAAGhB,gBAAgB,CAACY,OAArB,EAA8B;AAAED,IAAAA;AAAF,GAA9B,CAAlB;AACA,QAAMM,eAAe,GAAG,CAAC,GAAGb,gBAAgB,CAACc,SAArB,EAAgCV,OAAhC,CAAxB;AACA,SAAO,UAAUW,MAAV,EAAkB;AACrB,UAAMC,MAAM,GAAG,EAAf;;AACA,SAAK,MAAMC,IAAX,IAAmB,CAAC,GAAGxB,SAAS,CAACyB,UAAd,EAA0BH,MAA1B,CAAnB,EAAsD;AAClD,YAAMI,KAAK,GAAGT,WAAW,CAACO,IAAD,CAAzB;AACA,UAAIE,KAAK,KAAK,IAAd,EACI;AACJ,YAAMC,QAAQ,GAAGT,UAAU,CAACQ,KAAD,CAA3B;AACA,YAAME,KAAK,GAAGD,QAAQ,CAACE,KAAT,CAAe,CAAf,EAAkBC,GAAlB,CAAsBX,SAAtB,CAAd;AACAI,MAAAA,MAAM,CAACQ,IAAP,CAAY;AACRC,QAAAA,WAAW,EAAEZ,eAAe,CAACO,QAAQ,CAAC,CAAD,CAAT,EAAcf,OAAd,CADpB;AAERqB,QAAAA,IAAI,EAAEL,KAFE;AAGRN,QAAAA,MAAM,EAAEI,KAHA;AAIRQ,QAAAA,QAAQ,EAAEN,KAAK,CAACO,MAAN,CAAa,CAACC,GAAD,EAAMC,IAAN,KAAeD,GAAG,CAACE,MAAJ,CAAWD,IAAI,CAACH,QAAhB,CAA5B,EAAuD,EAAvD;AAJF,OAAZ;AAMH;;AACD,WAAOX,MAAP;AACH,GAhBD;AAiBH;;AACD3B,OAAO,CAACmB,OAAR,GAAkBP,SAAlB","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst primitives_js_1 = require(\"../primitives.js\");\nconst util_js_1 = require(\"../util.js\");\nconst block_parser_js_1 = require(\"./block-parser.js\");\nconst source_parser_js_1 = require(\"./source-parser.js\");\nconst spec_parser_js_1 = require(\"./spec-parser.js\");\nconst tag_js_1 = require(\"./tokenizers/tag.js\");\nconst type_js_1 = require(\"./tokenizers/type.js\");\nconst name_js_1 = require(\"./tokenizers/name.js\");\nconst description_js_1 = require(\"./tokenizers/description.js\");\nfunction getParser({ startLine = 0, fence = '```', spacing = 'compact', markers = primitives_js_1.Markers, tokenizers = [\n (0, tag_js_1.default)(),\n (0, type_js_1.default)(spacing),\n (0, name_js_1.default)(),\n (0, description_js_1.default)(spacing),\n], } = {}) {\n if (startLine < 0 || startLine % 1 > 0)\n throw new Error('Invalid startLine');\n const parseSource = (0, source_parser_js_1.default)({ startLine, markers });\n const parseBlock = (0, block_parser_js_1.default)({ fence });\n const parseSpec = (0, spec_parser_js_1.default)({ tokenizers });\n const joinDescription = (0, description_js_1.getJoiner)(spacing);\n return function (source) {\n const blocks = [];\n for (const line of (0, util_js_1.splitLines)(source)) {\n const lines = parseSource(line);\n if (lines === null)\n continue;\n const sections = parseBlock(lines);\n const specs = sections.slice(1).map(parseSpec);\n blocks.push({\n description: joinDescription(sections[0], markers),\n tags: specs,\n source: lines,\n problems: specs.reduce((acc, spec) => acc.concat(spec.problems), []),\n });\n }\n return blocks;\n };\n}\nexports.default = getParser;\n"],"file":"index.cjs"}
@@ -0,0 +1,113 @@
/**
* @fileoverview Disallow shadowing of globalThis, NaN, undefined, and Infinity (ES2020 section 18.1)
* @author Michael Ficarra
*/
"use strict";
/**
* Determines if a variable safely shadows undefined.
* This is the case when a variable named `undefined` is never assigned to a value (i.e. it always shares the same value
* as the global).
* @param {eslintScope.Variable} variable The variable to check
* @returns {boolean} true if this variable safely shadows `undefined`
*/
function safelyShadowsUndefined(variable) {
return (
variable.name === "undefined" &&
variable.references.every(ref => !ref.isWrite()) &&
variable.defs.every(
def =>
def.node.type === "VariableDeclarator" &&
def.node.init === null,
)
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
{
reportGlobalThis: false,
},
],
docs: {
description: "Disallow identifiers from shadowing restricted names",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-shadow-restricted-names",
},
schema: [
{
type: "object",
properties: {
reportGlobalThis: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
shadowingRestrictedName: "Shadowing of global property '{{name}}'.",
},
},
create(context) {
const [{ reportGlobalThis }] = context.options;
const RESTRICTED = new Set([
"undefined",
"NaN",
"Infinity",
"arguments",
"eval",
]);
if (reportGlobalThis) {
RESTRICTED.add("globalThis");
}
const sourceCode = context.sourceCode;
// Track reported nodes to avoid duplicate reports. For example, on class declarations.
const reportedNodes = new Set();
return {
"VariableDeclaration, :function, CatchClause, ImportDeclaration, ClassDeclaration, ClassExpression"(
node,
) {
for (const variable of sourceCode.getDeclaredVariables(node)) {
if (
variable.defs.length > 0 &&
RESTRICTED.has(variable.name) &&
!safelyShadowsUndefined(variable)
) {
for (const def of variable.defs) {
const nodeToReport = def.name;
if (!reportedNodes.has(nodeToReport)) {
reportedNodes.add(nodeToReport);
context.report({
node: nodeToReport,
messageId: "shadowingRestrictedName",
data: {
name: variable.name,
},
});
}
}
}
}
},
};
},
};
@@ -0,0 +1 @@
export declare function useUniqueId(prefix: string, value?: string): string;
@@ -0,0 +1 @@
{"version":3,"file":"resolveScopedResolvedValueBindingNode.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScopedResolvedValueBindingNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAE1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,eAAO,MAAM,qCAAqC,EAAE,CAAC,UAAU,EAC7D,OAAO,EAAE,CACP,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,KAC7D,QAAQ,CAAC,UAAU,CAAC,KACtB,CACH,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,KAC7D,QAAQ,CAAC,UAAU,CAKgC,CAAC"}
@@ -0,0 +1,80 @@
import Benchmark from "benchmark";
import { z } from "zod/v3";
const doubleSuite = new Benchmark.Suite("z.union: double");
const manySuite = new Benchmark.Suite("z.union: many");
const aSchema = z.object({
type: z.literal("a"),
});
const objA = {
type: "a",
};
const bSchema = z.object({
type: z.literal("b"),
});
const objB = {
type: "b",
};
const cSchema = z.object({
type: z.literal("c"),
});
const objC = {
type: "c",
};
const dSchema = z.object({
type: z.literal("d"),
});
const double = z.union([aSchema, bSchema]);
const many = z.union([aSchema, bSchema, cSchema, dSchema]);
doubleSuite
.add("valid: a", () => {
double.parse(objA);
})
.add("valid: b", () => {
double.parse(objB);
})
.add("invalid: null", () => {
try {
double.parse(null);
} catch (_err) {}
})
.add("invalid: wrong shape", () => {
try {
double.parse(objC);
} catch (_err) {}
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${(doubleSuite as any).name}: ${e.target}`);
});
manySuite
.add("valid: a", () => {
many.parse(objA);
})
.add("valid: c", () => {
many.parse(objC);
})
.add("invalid: null", () => {
try {
many.parse(null);
} catch (_err) {}
})
.add("invalid: wrong shape", () => {
try {
many.parse({ type: "unknown" });
} catch (_err) {}
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${(manySuite as any).name}: ${e.target}`);
});
export default {
suites: [doubleSuite, manySuite],
};
@@ -0,0 +1,11 @@
import { TypeBoxError } from '../../type/error/index';
import type { TSchema } from '../../type/schema/index';
import type { Static } from '../../type/static/index';
export declare class ValueCastError extends TypeBoxError {
readonly schema: TSchema;
constructor(schema: TSchema, message: string);
}
/** Casts a value into a given type and references. The return value will retain as much information of the original value as possible. */
export declare function Cast<T extends TSchema>(schema: T, references: TSchema[], value: unknown): Static<T>;
/** Casts a value into a given type. The return value will retain as much information of the original value as possible. */
export declare function Cast<T extends TSchema>(schema: T, value: unknown): Static<T>;
@@ -0,0 +1,6 @@
import {
useKbd
} from "./chunk-33JVVCIB.mjs";
export {
useKbd
};
@@ -0,0 +1,27 @@
// Arabic (Lybia) [ar-ly]
import dayjs from '../index';
var locale = {
name: 'ar-ly',
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
weekStart: 6,
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
ordinal: function ordinal(n) {
return n;
},
meridiem: function meridiem(hour) {
return hour > 12 ? 'م' : 'ص';
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/‏M/‏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,5 @@
var convert = require('./convert'),
func = convert('floor', require('../floor'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,522 @@
/*
* 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 {
Collection, DisabledBehavior,
FocusStrategy,
Selection as ISelection,
Key,
LayoutDelegate,
LongPressEvent,
Node,
PressEvent,
SelectionBehavior,
SelectionMode
} from '@react-types/shared';
import {compareNodeOrder, getChildNodes, getFirstItem} from '@react-stately/collections';
import {MultipleSelectionManager, MultipleSelectionState} from './types';
import {Selection} from './Selection';
interface SelectionManagerOptions {
allowsCellSelection?: boolean,
layoutDelegate?: LayoutDelegate
}
/**
* An interface for reading and updating multiple selection state.
*/
export class SelectionManager implements MultipleSelectionManager {
collection: Collection<Node<unknown>>;
private state: MultipleSelectionState;
private allowsCellSelection: boolean;
private _isSelectAll: boolean | null;
private layoutDelegate: LayoutDelegate | null;
constructor(collection: Collection<Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions) {
this.collection = collection;
this.state = state;
this.allowsCellSelection = options?.allowsCellSelection ?? false;
this._isSelectAll = null;
this.layoutDelegate = options?.layoutDelegate || null;
}
/**
* The type of selection that is allowed in the collection.
*/
get selectionMode(): SelectionMode {
return this.state.selectionMode;
}
/**
* Whether the collection allows empty selection.
*/
get disallowEmptySelection(): boolean {
return this.state.disallowEmptySelection;
}
/**
* The selection behavior for the collection.
*/
get selectionBehavior(): SelectionBehavior {
return this.state.selectionBehavior;
}
/**
* Sets the selection behavior for the collection.
*/
setSelectionBehavior(selectionBehavior: SelectionBehavior): void {
this.state.setSelectionBehavior(selectionBehavior);
}
/**
* Whether the collection is currently focused.
*/
get isFocused(): boolean {
return this.state.isFocused;
}
/**
* Sets whether the collection is focused.
*/
setFocused(isFocused: boolean): void {
this.state.setFocused(isFocused);
}
/**
* The current focused key in the collection.
*/
get focusedKey(): Key | null {
return this.state.focusedKey;
}
/** Whether the first or last child of the focused key should receive focus. */
get childFocusStrategy(): FocusStrategy | null {
return this.state.childFocusStrategy;
}
/**
* Sets the focused key.
*/
setFocusedKey(key: Key | null, childFocusStrategy?: FocusStrategy): void {
if (key == null || this.collection.getItem(key)) {
this.state.setFocusedKey(key, childFocusStrategy);
}
}
/**
* The currently selected keys in the collection.
*/
get selectedKeys(): Set<Key> {
return this.state.selectedKeys === 'all'
? new Set(this.getSelectAllKeys())
: this.state.selectedKeys;
}
/**
* The raw selection value for the collection.
* Either 'all' for select all, or a set of keys.
*/
get rawSelection(): ISelection {
return this.state.selectedKeys;
}
/**
* Returns whether a key is selected.
*/
isSelected(key: Key): boolean {
if (this.state.selectionMode === 'none') {
return false;
}
let mappedKey = this.getKey(key);
if (mappedKey == null) {
return false;
}
return this.state.selectedKeys === 'all'
? this.canSelectItem(mappedKey)
: this.state.selectedKeys.has(mappedKey);
}
/**
* Whether the selection is empty.
*/
get isEmpty(): boolean {
return this.state.selectedKeys !== 'all' && this.state.selectedKeys.size === 0;
}
/**
* Whether all items in the collection are selected.
*/
get isSelectAll(): boolean {
if (this.isEmpty) {
return false;
}
if (this.state.selectedKeys === 'all') {
return true;
}
if (this._isSelectAll != null) {
return this._isSelectAll;
}
let allKeys = this.getSelectAllKeys();
let selectedKeys = this.state.selectedKeys;
this._isSelectAll = allKeys.every(k => selectedKeys.has(k));
return this._isSelectAll;
}
get firstSelectedKey(): Key | null {
let first: Node<unknown> | null = null;
for (let key of this.state.selectedKeys) {
let item = this.collection.getItem(key);
if (!first || (item && compareNodeOrder(this.collection, item, first) < 0)) {
first = item;
}
}
return first?.key ?? null;
}
get lastSelectedKey(): Key | null {
let last: Node<unknown> | null = null;
for (let key of this.state.selectedKeys) {
let item = this.collection.getItem(key);
if (!last || (item && compareNodeOrder(this.collection, item, last) > 0)) {
last = item;
}
}
return last?.key ?? null;
}
get disabledKeys(): Set<Key> {
return this.state.disabledKeys;
}
get disabledBehavior(): DisabledBehavior {
return this.state.disabledBehavior;
}
/**
* Extends the selection to the given key.
*/
extendSelection(toKey: Key): void {
if (this.selectionMode === 'none') {
return;
}
if (this.selectionMode === 'single') {
this.replaceSelection(toKey);
return;
}
let mappedToKey = this.getKey(toKey);
if (mappedToKey == null) {
return;
}
let selection: Selection;
// Only select the one key if coming from a select all.
if (this.state.selectedKeys === 'all') {
selection = new Selection([mappedToKey], mappedToKey, mappedToKey);
} else {
let selectedKeys = this.state.selectedKeys as Selection;
let anchorKey = selectedKeys.anchorKey ?? mappedToKey;
selection = new Selection(selectedKeys, anchorKey, mappedToKey);
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey ?? mappedToKey)) {
selection.delete(key);
}
for (let key of this.getKeyRange(mappedToKey, anchorKey)) {
if (this.canSelectItem(key)) {
selection.add(key);
}
}
}
this.state.setSelectedKeys(selection);
}
private getKeyRange(from: Key, to: Key) {
let fromItem = this.collection.getItem(from);
let toItem = this.collection.getItem(to);
if (fromItem && toItem) {
if (compareNodeOrder(this.collection, fromItem, toItem) <= 0) {
return this.getKeyRangeInternal(from, to);
}
return this.getKeyRangeInternal(to, from);
}
return [];
}
private getKeyRangeInternal(from: Key, to: Key) {
if (this.layoutDelegate?.getKeyRange) {
return this.layoutDelegate.getKeyRange(from, to);
}
let keys: Key[] = [];
let key: Key | null = from;
while (key != null) {
let item = this.collection.getItem(key);
if (item && (item.type === 'item' || (item.type === 'cell' && this.allowsCellSelection))) {
keys.push(key);
}
if (key === to) {
return keys;
}
key = this.collection.getKeyAfter(key);
}
return [];
}
private getKey(key: Key) {
let item = this.collection.getItem(key);
if (!item) {
// ¯\_(ツ)_/¯
return key;
}
// If cell selection is allowed, just return the key.
if (item.type === 'cell' && this.allowsCellSelection) {
return key;
}
// Find a parent item to select
while (item && item.type !== 'item' && item.parentKey != null) {
item = this.collection.getItem(item.parentKey);
}
if (!item || item.type !== 'item') {
return null;
}
return item.key;
}
/**
* Toggles whether the given key is selected.
*/
toggleSelection(key: Key): void {
if (this.selectionMode === 'none') {
return;
}
if (this.selectionMode === 'single' && !this.isSelected(key)) {
this.replaceSelection(key);
return;
}
let mappedKey = this.getKey(key);
if (mappedKey == null) {
return;
}
let keys = new Selection(this.state.selectedKeys === 'all' ? this.getSelectAllKeys() : this.state.selectedKeys);
if (keys.has(mappedKey)) {
keys.delete(mappedKey);
// TODO: move anchor to last selected key...
// Does `current` need to move here too?
} else if (this.canSelectItem(mappedKey)) {
keys.add(mappedKey);
keys.anchorKey = mappedKey;
keys.currentKey = mappedKey;
}
if (this.disallowEmptySelection && keys.size === 0) {
return;
}
this.state.setSelectedKeys(keys);
}
/**
* Replaces the selection with only the given key.
*/
replaceSelection(key: Key): void {
if (this.selectionMode === 'none') {
return;
}
let mappedKey = this.getKey(key);
if (mappedKey == null) {
return;
}
let selection = this.canSelectItem(mappedKey)
? new Selection([mappedKey], mappedKey, mappedKey)
: new Selection();
this.state.setSelectedKeys(selection);
}
/**
* Replaces the selection with the given keys.
*/
setSelectedKeys(keys: Iterable<Key>): void {
if (this.selectionMode === 'none') {
return;
}
let selection = new Selection();
for (let key of keys) {
let mappedKey = this.getKey(key);
if (mappedKey != null) {
selection.add(mappedKey);
if (this.selectionMode === 'single') {
break;
}
}
}
this.state.setSelectedKeys(selection);
}
private getSelectAllKeys() {
let keys: Key[] = [];
let addKeys = (key: Key | null) => {
while (key != null) {
if (this.canSelectItem(key)) {
let item = this.collection.getItem(key);
if (item?.type === 'item') {
keys.push(key);
}
// Add child keys. If cell selection is allowed, then include item children too.
if (item?.hasChildNodes && (this.allowsCellSelection || item.type !== 'item')) {
addKeys(getFirstItem(getChildNodes(item, this.collection))?.key ?? null);
}
}
key = this.collection.getKeyAfter(key);
}
};
addKeys(this.collection.getFirstKey());
return keys;
}
/**
* Selects all items in the collection.
*/
selectAll(): void {
if (!this.isSelectAll && this.selectionMode === 'multiple') {
this.state.setSelectedKeys('all');
}
}
/**
* Removes all keys from the selection.
*/
clearSelection(): void {
if (!this.disallowEmptySelection && (this.state.selectedKeys === 'all' || this.state.selectedKeys.size > 0)) {
this.state.setSelectedKeys(new Selection());
}
}
/**
* Toggles between select all and an empty selection.
*/
toggleSelectAll(): void {
if (this.isSelectAll) {
this.clearSelection();
} else {
this.selectAll();
}
}
select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void {
if (this.selectionMode === 'none') {
return;
}
if (this.selectionMode === 'single') {
if (this.isSelected(key) && !this.disallowEmptySelection) {
this.toggleSelection(key);
} else {
this.replaceSelection(key);
}
} else if (this.selectionBehavior === 'toggle' || (e && (e.pointerType === 'touch' || e.pointerType === 'virtual'))) {
// if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys
this.toggleSelection(key);
} else {
this.replaceSelection(key);
}
}
/**
* Returns whether the current selection is equal to the given selection.
*/
isSelectionEqual(selection: Set<Key>): boolean {
if (selection === this.state.selectedKeys) {
return true;
}
// Check if the set of keys match.
let selectedKeys = this.selectedKeys;
if (selection.size !== selectedKeys.size) {
return false;
}
for (let key of selection) {
if (!selectedKeys.has(key)) {
return false;
}
}
for (let key of selectedKeys) {
if (!selection.has(key)) {
return false;
}
}
return true;
}
canSelectItem(key: Key): boolean {
if (this.state.selectionMode === 'none' || this.state.disabledKeys.has(key)) {
return false;
}
let item = this.collection.getItem(key);
if (!item || item?.props?.isDisabled || (item.type === 'cell' && !this.allowsCellSelection)) {
return false;
}
return true;
}
isDisabled(key: Key): boolean {
return this.state.disabledBehavior === 'all' && (this.state.disabledKeys.has(key) || !!this.collection.getItem(key)?.props?.isDisabled);
}
isLink(key: Key): boolean {
return !!this.collection.getItem(key)?.props?.href;
}
getItemProps(key: Key): any {
return this.collection.getItem(key)?.props;
}
withCollection(collection: Collection<Node<unknown>>): SelectionManager {
return new SelectionManager(collection, this.state, {
allowsCellSelection: this.allowsCellSelection,
layoutDelegate: this.layoutDelegate || undefined
});
}
}
@@ -0,0 +1,4 @@
export * from './action';
export * from './highway';
export * from './message';
export * from './system';
@@ -0,0 +1,52 @@
"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/link.tsx
var link_exports = {};
__export(link_exports, {
LinkIcon: () => LinkIcon
});
module.exports = __toCommonJS(link_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var LinkIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
shapeRendering: "geometricPrecision",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 3h6v6" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10 14L21 3" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
LinkIcon
});
@@ -0,0 +1 @@
{"name":"trough","version":"2.2.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532115285,"integrity":"sha512-tq88+h3pfrBakvHIOFwuWGcf1sstP6LTHnmZ6a24lEgKUo+lNIIZMkcJV+86+C1UXvw9rYjKRRvaj/K7FqOQXQ==","mode":420,"size":1099},"index.js":{"checkedAt":1794532115285,"integrity":"sha512-+I/zfGQDaEy7mFbn9FpmenWEfwQ/JaxQyH0c33knHW/QI4etQv95RpaVzWZLDPFPd1d+R/TEhI31YSeRCVEKlw==","mode":420,"size":322},"lib/index.js":{"checkedAt":1794532115285,"integrity":"sha512-C0j0ll4sYNqPi8FLl12J9sb5VvMRfvAvecSuK2++cTSGVsQNKqRvrvg5Dg0eOGRFJqsXp4WtGNHj4b7quB3fqQ==","mode":420,"size":5001},"package.json":{"checkedAt":1794532115285,"integrity":"sha512-VegtrmtyayGYvwQ4i9eGfUmVsvWCzUbIsAV/1O8CsyrkeCOS8ylPD8AL1UUHvHYXzrlvzDP/7UQhJr8TRB9P/A==","mode":420,"size":1886},"index.d.ts.map":{"checkedAt":1794532115286,"integrity":"sha512-Cj3D8PakmlQ2XnhV1AdOsUktzwoY1ZSs/Fg2GKzDyx3kh1rxray0P0TipD7+4MBWKVxRAxOpRNsh0GI57d0MSw==","mode":420,"size":240},"lib/index.d.ts.map":{"checkedAt":1794532115286,"integrity":"sha512-arTfKDNVR2o6poR6ACuQLEpcvul9AeFKtFmNpc2auCoK07Lg5SYD/ps71eKJzYShDw0AVq3kZ+7vi9S8tQchGA==","mode":420,"size":452},"readme.md":{"checkedAt":1794532115286,"integrity":"sha512-eqS5/tKgrNv0l6rQazyvqfucZGhU+6RSf3bgEa4MuPxR9AnJ1GXPTaYt6r0m/lGQBsMF94osMVkohSLcD3qdDA==","mode":420,"size":10622},"index.d.ts":{"checkedAt":1794532115286,"integrity":"sha512-Cg17h426bDqUHqukg6RiZ1IEfWc39riWARGpCnwIe5qj3o0G6+XwdXGCJRG3uLAwoCAUAitFmIk9TEOPuh6M2Q==","mode":420,"size":356},"lib/index.d.ts":{"checkedAt":1794532115286,"integrity":"sha512-zIaJiKzB4wNY2ch75qxfAXT9c0ZKrE6WZU5qdwJDo+Jqe4ii3qQE6PNlkrSv19oOzgk0rkHYEMrETJawjWGS6g==","mode":420,"size":2899}}}
@@ -0,0 +1,24 @@
import { PluginFunc, ConfigType } from 'dayjs'
declare interface RelativeTimeThreshold {
l: string
r?: number
d?: string
}
declare interface RelativeTimeOptions {
rounding?: (num: number) => number
thresholds?: RelativeTimeThreshold[]
}
declare const plugin: PluginFunc<RelativeTimeOptions>
export = plugin
declare module 'dayjs' {
interface Dayjs {
fromNow(withoutSuffix?: boolean): string
from(compared: ConfigType, withoutSuffix?: boolean): string
toNow(withoutSuffix?: boolean): string
to(compared: ConfigType, withoutSuffix?: boolean): string
}
}
@@ -0,0 +1,2 @@
declare const useLatest: <T>(value: T) => any;
export default useLatest;
@@ -0,0 +1 @@
{"name":"react","version":"19.2.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532126200,"integrity":"sha512-O4KI5drJltpEvYGw6x2WkFxLkK2RVPPSnQc8lokLdc0oH6A68Ld/Mx2+wjnTQTY7X5syi6/qDUuNCj6QDRUPgA==","mode":420,"size":1088},"compiler-runtime.js":{"checkedAt":1794532126200,"integrity":"sha512-cPp+7+a2Elv4IllAwSZ7NbODgQ5sx/rxT3Uf0aGjQSdi7KrCfxK+49vX156xwQSF/dSzBtbE1W1xWpp3AsfrOg==","mode":420,"size":412},"index.js":{"checkedAt":1794532126200,"integrity":"sha512-zMH90REH6jiwartcvbLHqKMP6K3o4/glF7hfIRCJa2jkPfuBfoayl9xM26bvIs77e7d60IcLgcPN06yNWtF1OQ==","mode":420,"size":186},"jsx-dev-runtime.js":{"checkedAt":1794532126200,"integrity":"sha512-dLAJDfg7J3HlG0+PsdlLyOTjs//Q3N9RyxUNFKfKvjMP+ituwyAZ0ZmcssSQpHBwzG9E+LrInazkqdOUKOUxsQ==","mode":420,"size":218},"jsx-dev-runtime.react-server.js":{"checkedAt":1794532126200,"integrity":"sha512-9/oNPQ7JEMqFYvVRzhN7pIbCZLETl6/lu1A70LpkLiMk71J7+2COgcW5MDnM0C/nWXkpRqqRYmruP8GXsGFn9g==","mode":420,"size":244},"jsx-runtime.js":{"checkedAt":1794532126200,"integrity":"sha512-4xqWR/NAdfNd39IK45scbgQDY/gs7knAlhqUOxnj65gnDpx91Sx/vNJNrSqrhsCC8SRGtTiawi9QqWgIzLDrtg==","mode":420,"size":210},"jsx-runtime.react-server.js":{"checkedAt":1794532126201,"integrity":"sha512-otmvTuGIaHG3Woi1gW1IaQ9hezD2Uddw+aPFhAoU84lWTAzdz/BeUs6CGmFrnkj/2EmQf6WLK26kqVFoZplHDQ==","mode":420,"size":236},"cjs/react-compiler-runtime.development.js":{"checkedAt":1794532126201,"integrity":"sha512-/C8YYhdxDlZozW8TPt+CZJjWPn0dUVbl1EQBTOHPta1yf/fA4uAwtVQtZdDGwfHpnDaFgkGJZLMMK+o3yNqLTw==","mode":420,"size":1090},"cjs/react-compiler-runtime.production.js":{"checkedAt":1794532126201,"integrity":"sha512-1qFyDdnxRLAq/fvSw4Y1LpBa0Abnf/LYJbI1dGfbA1cokICIqdrZEA85pwNcV5mWA7nzwXZWbVv4jEEPnxRAuA==","mode":420,"size":463},"cjs/react-compiler-runtime.profiling.js":{"checkedAt":1794532126201,"integrity":"sha512-NU2t/IKdQZyLtUXijIi97FL3atnJS4TDrcWAmArtnmGEFLUpCD5TPoFY9pBeOXlUKRBntlRTXB4DZfzcehU1jg==","mode":420,"size":462},"cjs/react-jsx-dev-runtime.development.js":{"checkedAt":1794532126201,"integrity":"sha512-8GbVtb/H+OnMDi5q9GcbQFTEx8xfU2/UWlpAEseEyh0RftjRANBbYbLHATxtF+FEr83Eoj/6PH4i0X4482Ntxg==","mode":420,"size":12056},"cjs/react-jsx-dev-runtime.production.js":{"checkedAt":1794532126201,"integrity":"sha512-OLvq9bwXw+ggYvbjaVGFlp0ScQl6q71quraZEUnCB0dicA6eXeSgPcTTZeQYrw5oJ2TgvdOpXXoQeKEiM99aYA==","mode":420,"size":387},"cjs/react-jsx-dev-runtime.profiling.js":{"checkedAt":1794532126201,"integrity":"sha512-wswTb3+BsKS1ZxzIjbaQm9XGyh93XpFx7V8GKoCeWiZAe0MXgc4jUXuFhOiRIMl8nwL+uo14wT4CRzP+MwilWA==","mode":420,"size":386},"cjs/react-jsx-dev-runtime.react-server.development.js":{"checkedAt":1794532126201,"integrity":"sha512-M7Za6JptlnRAXehe9HjMFJxp3MpdUv/METqx2K6y+mdo0imK8h8RgUUbXPg8nDRxAjRDpYqlcPwEYmSlL3g9Kw==","mode":420,"size":13213},"cjs/react-jsx-dev-runtime.react-server.production.js":{"checkedAt":1794532126202,"integrity":"sha512-XkvkV4S/DfapUv3Dn+w8byPtkolH3MlnfpFdvcQCaJsOJdz17FAZX9EDkuSsO6JFD1NIPidYUY5r+eRxKMMQ0Q==","mode":420,"size":1316},"cjs/react-jsx-runtime.development.js":{"checkedAt":1794532126202,"integrity":"sha512-ECV/zR3hZi2TmO5mzXnRwhQaxNuZQ0FCJQ/Bwm6wK2E1q5j2IacBeDdC698hkqyNlQClENy8Ick8PZ6rOC42yg==","mode":420,"size":12452},"cjs/react-jsx-runtime.production.js":{"checkedAt":1794532126202,"integrity":"sha512-hnQ/XwpNoC7l07vfUBvibCmClQ6XzLgueWUtdFz3Rsdoe8+s6/lTKQSqH17FWJjO+vXKJA8QowQtg1RFOoR5wg==","mode":420,"size":976},"cjs/react-jsx-runtime.profiling.js":{"checkedAt":1794532126202,"integrity":"sha512-4sN1qCDF6UVjuGE94A+vtDru60b/2jBsScPiEvp6Qswe9Et0BE+ovennWF5Vr4VjpOQavLeHEYpu5OTT679R1g==","mode":420,"size":975},"cjs/react-jsx-runtime.react-server.development.js":{"checkedAt":1794532126202,"integrity":"sha512-OCzx/Drhs8L3VdQKVf3OTaxDncmoFuwHjKboejyEMCakNGR9NKI38yiXPGlvi5YjronaPQknfJYh57xzkwkOQA==","mode":420,"size":13209},"cjs/react-jsx-runtime.react-server.production.js":{"checkedAt":1794532126202,"integrity":"sha512-RlXzYzVeltEebAzVOU4j3D7GpFCnn3i4Tjy4REK7Cf7+kvOWCDNmiyWErUqu9gOBEROYmYfcHW+NEERIEl16rg==","mode":420,"size":1312},"cjs/react.development.js":{"checkedAt":1794532126203,"integrity":"sha512-+3K1NZ8Ei2+JQSdnc+6mqwKWntpl/cEODuDgad5xYSFYwHj1tLcAg0Eg9SibcHQctAVPvsIigBp/i8KdH0UFtg==","mode":420,"size":47219},"cjs/react.production.js":{"checkedAt":1794532126203,"integrity":"sha512-FQA54DgusXjCeJcA4tg0aSepDt/TEcLaO7XG35fEVXmzfz8OnPr7sGVF9JEJIdfNsKiSV85ITsg589asQJwKXw==","mode":420,"size":17217},"cjs/react.react-server.development.js":{"checkedAt":1794532126203,"integrity":"sha512-7/ltoqZ0VUJ9QKaVWynXmywT+IJXUHeXGbHMHqVT3oH89aMDZhgOELu4pVAIN9SK7V9Yy8cj7GEeoNhf4ctjvg==","mode":420,"size":30389},"react.react-server.js":{"checkedAt":1794532126203,"integrity":"sha512-iTu/CVbr+BIAjMi4BKzM9I/EEkQ+l0+teUeTwDAVvf5SfUO7BH/NpdAO5BAccXi6/UX2jVplAlUJvIkwIO+4xA==","mode":420,"size":212},"cjs/react.react-server.production.js":{"checkedAt":1794532126203,"integrity":"sha512-TcDe6RhS2yh9xP5x8DOJM3+dXG1pXLlXwiJzXU62jwZaXzPteRmTqBCJYYjPBqV1wxnnBJ4qXO+3SVVMtDs5bQ==","mode":420,"size":13270},"package.json":{"checkedAt":1Line truncated
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,QAAQ,CAAC;IACzC,iBAAiB,CAAC,OAAS,CAAC,sBAAsB,EAAE,KAAK,UAAU,CAAC,yBAAsB,CAAC;IAC3F,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,QAAQ,CAAC;IAC/C,cAAc,CAAC,QAAQ,CAAC;IACxB,kBAAkB,CAAC,OAAS,CAAC,sBAAsB,EAAE,KAAK,UAAU,CAAC,yBAAsB,CAAC;IAC5F,sBAAsB,CAAC,sDAA6C,CAAC;IACrE,UAAU,CAAC,IAAI,CAAC;IAChB,aAAa,CAAC,SAAS,CAAC;IACxB,YAAY,CAAC,wBAAwB,CAAC;AACxC","sources":["packages/@react-aria/table/intl/nb-NO.json"],"sourcesContent":["{\n \"ascending\": \"stigende\",\n \"ascendingSort\": \"sortert etter kolonne {columnName} i stigende rekkefølge\",\n \"columnSize\": \"{value} piksler\",\n \"descending\": \"synkende\",\n \"descendingSort\": \"sortert etter kolonne {columnName} i synkende rekkefølge\",\n \"resizerDescription\": \"Trykk på Enter for å starte størrelsesendring\",\n \"select\": \"Velg\",\n \"selectAll\": \"Velg alle\",\n \"sortable\": \"kolonne som kan sorteres\"\n}\n"],"names":[],"version":3,"file":"nb-NO.main.js.map"}
@@ -0,0 +1,155 @@
/// <reference types="node" />
import { EventEmitter } from 'events'
import { Stream } from 'stream'
declare namespace Minipass {
type Encoding = BufferEncoding | 'buffer' | null
interface Writable extends EventEmitter {
end(): any
write(chunk: any, ...args: any[]): any
}
interface Readable extends EventEmitter {
pause(): any
resume(): any
pipe(): any
}
interface Pipe<R, W> {
src: Minipass<R, W>
dest: Writable
opts: PipeOptions
}
type DualIterable<T> = Iterable<T> & AsyncIterable<T>
type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string
type BufferOrString = Buffer | string
interface StringOptions {
encoding: BufferEncoding
objectMode?: boolean
async?: boolean
}
interface BufferOptions {
encoding?: null | 'buffer'
objectMode?: boolean
async?: boolean
}
interface ObjectModeOptions {
objectMode: true
async?: boolean
}
interface PipeOptions {
end?: boolean
proxyErrors?: boolean
}
type Options<T> = T extends string
? StringOptions
: T extends Buffer
? BufferOptions
: ObjectModeOptions
}
declare class Minipass<
RType extends any = Buffer,
WType extends any = RType extends Minipass.BufferOrString
? Minipass.ContiguousData
: RType
>
extends Stream
implements Minipass.DualIterable<RType>
{
static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable
readonly bufferLength: number
readonly flowing: boolean
readonly writable: boolean
readonly readable: boolean
readonly paused: boolean
readonly emittedEnd: boolean
readonly destroyed: boolean
/**
* Not technically private or readonly, but not safe to mutate.
*/
private readonly buffer: RType[]
private readonly pipes: Minipass.Pipe<RType, WType>[]
/**
* Technically writable, but mutating it can change the type,
* so is not safe to do in TypeScript.
*/
readonly objectMode: boolean
async: boolean
/**
* Note: encoding is not actually read-only, and setEncoding(enc)
* exists. However, this type definition will insist that TypeScript
* programs declare the type of a Minipass stream up front, and if
* that type is string, then an encoding MUST be set in the ctor. If
* the type is Buffer, then the encoding must be missing, or set to
* 'buffer' or null. If the type is anything else, then objectMode
* must be set in the constructor options. So there is effectively
* no allowed way that a TS program can set the encoding after
* construction, as doing so will destroy any hope of type safety.
* TypeScript does not provide many options for changing the type of
* an object at run-time, which is what changing the encoding does.
*/
readonly encoding: Minipass.Encoding
// setEncoding(encoding: Encoding): void
// Options required if not reading buffers
constructor(
...args: RType extends Buffer
? [] | [Minipass.Options<RType>]
: [Minipass.Options<RType>]
)
write(chunk: WType, cb?: () => void): boolean
write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean
read(size?: number): RType
end(cb?: () => void): this
end(chunk: any, cb?: () => void): this
end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this
pause(): void
resume(): void
promise(): Promise<void>
collect(): Promise<RType[]>
concat(): RType extends Minipass.BufferOrString ? Promise<RType> : never
destroy(er?: any): void
pipe<W extends Minipass.Writable>(dest: W, opts?: Minipass.PipeOptions): W
unpipe<W extends Minipass.Writable>(dest: W): void
/**
* alias for on()
*/
addEventHandler(event: string, listener: (...args: any[]) => any): this
on(event: string, listener: (...args: any[]) => any): this
on(event: 'data', listener: (chunk: RType) => any): this
on(event: 'error', listener: (error: any) => any): this
on(
event:
| 'readable'
| 'drain'
| 'resume'
| 'end'
| 'prefinish'
| 'finish'
| 'close',
listener: () => any
): this
[Symbol.iterator](): Iterator<RType>
[Symbol.asyncIterator](): AsyncIterator<RType>
}
export = Minipass
@@ -0,0 +1,32 @@
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.module.js";
import {useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback} from "react";
/*
* Copyright 2023 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.
*/
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
const ref = (0, $lmaYr$useRef)(null);
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
ref.current = fn;
}, [
fn
]);
// @ts-ignore
return (0, $lmaYr$useCallback)((...args)=>{
const f = ref.current;
return f === null || f === void 0 ? void 0 : f(...args);
}, []);
}
export {$8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent};
//# sourceMappingURL=useEffectEvent.module.js.map
@@ -0,0 +1,7 @@
import { CreateType } from '../create/type.mjs';
import { Never } from '../never/index.mjs';
import * as KindGuard from '../guard/kind.mjs';
/** `[JavaScript]` Extracts the InstanceType from the given Constructor type */
export function InstanceType(schema, options) {
return (KindGuard.IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options));
}
@@ -0,0 +1,62 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var OwnPropertyKeys = require('own-keys');
var every = require('../helpers/every');
var forEach = require('../helpers/forEach');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
var ToNumber = require('./ToNumber');
var ToObject = require('./ToObject');
// https://262.ecma-international.org/11.0/#sec-copydataproperties
module.exports = function CopyDataProperties(target, source, excludedItems) {
if (!isObject(target)) {
throw new $TypeError('Assertion failed: "target" must be an Object');
}
if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
}
if (typeof source === 'undefined' || source === null) {
return target;
}
var from = ToObject(source);
var sourceKeys = OwnPropertyKeys(from);
forEach(sourceKeys, function (nextKey) {
var excluded = false;
forEach(excludedItems, function (e) {
if (SameValue(e, nextKey) === true) {
excluded = true;
}
});
var enumerable = $isEnumerable(from, nextKey) || (
// this is to handle string keys being non-enumerable in older engines
typeof source === 'string'
&& nextKey >= 0
&& IsInteger(ToNumber(nextKey))
);
if (excluded === false && enumerable) {
var propValue = Get(from, nextKey);
CreateDataPropertyOrThrow(target, nextKey, propValue);
}
});
return target;
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('assignInWith', require('../assignInWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"syntax.js","names":["Delta","ClassAttributor","Scope","Inline","Quill","Module","blockDelta","BreakBlot","CursorBlot","TextBlot","escapeText","CodeBlock","CodeBlockContainer","traverse","TokenAttributor","scope","INLINE","CodeToken","formats","node","scroll","domNode","classList","contains","className","parentNode","undefined","constructor","value","add","format","blotName","remove","statics","optimize","arguments","unwrap","SyntaxCodeBlock","create","setAttribute","getAttribute","register","name","replaceWith","formatAt","length","SyntaxCodeBlockContainer","attach","forceNext","emitMount","children","forEach","child","index","highlight","forced","head","nodes","Array","from","childNodes","filter","uiNode","text","map","textContent","join","language","cachedText","trim","oldDelta","reduce","delta","concat","diff","_ref","retain","attributes","Object","keys","includes","html","codeBlock","find","code","context","parent","allowedChildren","requiredContainer","lib","versionString","majorVersion","split","parseInt","Syntax","quill","options","hljs","Error","languages","memo","_ref2","key","highlightBlot","bind","initListener","initTimer","on","events","SCROLL_BLOT_MOUNT","blot","select","root","ownerDocument","createElement","_ref3","label","option","appendChild","addEventListener","focus","attachUI","timer","SCROLL_OPTIMIZE","clearTimeout","setTimeout","interval","force","selection","composing","update","sources","USER","range","getSelection","blots","descendants","container","SILENT","setSelection","line","i","insert","innerHTML","compose","data","nodeText","WeakMap","DEFAULTS","window","default"],"sources":["../../src/modules/syntax.ts"],"sourcesContent":["import Delta from 'quill-delta';\nimport { ClassAttributor, Scope } from 'parchment';\nimport type { Blot, ScrollBlot } from 'parchment';\nimport Inline from '../blots/inline.js';\nimport Quill from '../core/quill.js';\nimport Module from '../core/module.js';\nimport { blockDelta } from '../blots/block.js';\nimport BreakBlot from '../blots/break.js';\nimport CursorBlot from '../blots/cursor.js';\nimport TextBlot, { escapeText } from '../blots/text.js';\nimport CodeBlock, { CodeBlockContainer } from '../formats/code.js';\nimport { traverse } from './clipboard.js';\n\nconst TokenAttributor = new ClassAttributor('code-token', 'hljs', {\n scope: Scope.INLINE,\n});\nclass CodeToken extends Inline {\n static formats(node: Element, scroll: ScrollBlot) {\n while (node != null && node !== scroll.domNode) {\n if (node.classList && node.classList.contains(CodeBlock.className)) {\n // @ts-expect-error\n return super.formats(node, scroll);\n }\n // @ts-expect-error\n node = node.parentNode;\n }\n return undefined;\n }\n\n constructor(scroll: ScrollBlot, domNode: Node, value: unknown) {\n // @ts-expect-error\n super(scroll, domNode, value);\n TokenAttributor.add(this.domNode, value);\n }\n\n format(format: string, value: unknown) {\n if (format !== CodeToken.blotName) {\n super.format(format, value);\n } else if (value) {\n TokenAttributor.add(this.domNode, value);\n } else {\n TokenAttributor.remove(this.domNode);\n this.domNode.classList.remove(this.statics.className);\n }\n }\n\n optimize(...args: unknown[]) {\n // @ts-expect-error\n super.optimize(...args);\n if (!TokenAttributor.value(this.domNode)) {\n this.unwrap();\n }\n }\n}\nCodeToken.blotName = 'code-token';\nCodeToken.className = 'ql-token';\n\nclass SyntaxCodeBlock extends CodeBlock {\n static create(value: unknown) {\n const domNode = super.create(value);\n if (typeof value === 'string') {\n domNode.setAttribute('data-language', value);\n }\n return domNode;\n }\n\n static formats(domNode: Node) {\n // @ts-expect-error\n return domNode.getAttribute('data-language') || 'plain';\n }\n\n static register() {} // Syntax module will register\n\n format(name: string, value: unknown) {\n if (name === this.statics.blotName && value) {\n // @ts-expect-error\n this.domNode.setAttribute('data-language', value);\n } else {\n super.format(name, value);\n }\n }\n\n replaceWith(name: string | Blot, value?: any) {\n this.formatAt(0, this.length(), CodeToken.blotName, false);\n return super.replaceWith(name, value);\n }\n}\n\nclass SyntaxCodeBlockContainer extends CodeBlockContainer {\n forceNext?: boolean;\n cachedText?: string | null;\n\n attach() {\n super.attach();\n this.forceNext = false;\n // @ts-expect-error\n this.scroll.emitMount(this);\n }\n\n format(name: string, value: unknown) {\n if (name === SyntaxCodeBlock.blotName) {\n this.forceNext = true;\n this.children.forEach((child) => {\n // @ts-expect-error\n child.format(name, value);\n });\n }\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n if (name === SyntaxCodeBlock.blotName) {\nLine truncated
@@ -0,0 +1,76 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _dayjs = _interopRequireDefault(require("dayjs"));
var _react = require("react");
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _index = require("../utils/index");
var calcLeft = function calcLeft(target) {
if (!target) {
return 0;
}
// https://stackoverflow.com/questions/4310953/invalid-date-in-safari
var left = (0, _dayjs["default"])(target).valueOf() - Date.now();
return left < 0 ? 0 : left;
};
var parseMs = function parseMs(milliseconds) {
return {
days: Math.floor(milliseconds / 86400000),
hours: Math.floor(milliseconds / 3600000) % 24,
minutes: Math.floor(milliseconds / 60000) % 60,
seconds: Math.floor(milliseconds / 1000) % 60,
milliseconds: Math.floor(milliseconds) % 1000
};
};
var useCountdown = function useCountdown(options) {
if (options === void 0) {
options = {};
}
var _a = options || {},
leftTime = _a.leftTime,
targetDate = _a.targetDate,
_b = _a.interval,
interval = _b === void 0 ? 1000 : _b,
onEnd = _a.onEnd;
var memoLeftTime = (0, _react.useMemo)(function () {
return (0, _index.isNumber)(leftTime) && leftTime > 0 ? Date.now() + leftTime : undefined;
}, [leftTime]);
var target = 'leftTime' in options ? memoLeftTime : targetDate;
var _c = (0, _tslib.__read)((0, _react.useState)(function () {
return calcLeft(target);
}), 2),
timeLeft = _c[0],
setTimeLeft = _c[1];
var onEndRef = (0, _useLatest["default"])(onEnd);
(0, _react.useEffect)(function () {
if (!target) {
// for stop
setTimeLeft(0);
return;
}
// 立即执行一次
setTimeLeft(calcLeft(target));
var timer = setInterval(function () {
var _a;
var targetLeft = calcLeft(target);
setTimeLeft(targetLeft);
if (targetLeft === 0) {
clearInterval(timer);
(_a = onEndRef.current) === null || _a === void 0 ? void 0 : _a.call(onEndRef);
}
}, interval);
return function () {
return clearInterval(timer);
};
}, [target, interval]);
var formattedRes = (0, _react.useMemo)(function () {
return parseMs(timeLeft);
}, [timeLeft]);
return [timeLeft, formattedRes];
};
var _default = exports["default"] = useCountdown;
@@ -0,0 +1,7 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { TConstructor } from '../constructor/index.mjs';
import { type TTuple } from '../tuple/index.mjs';
import { type TNever } from '../never/index.mjs';
export type TConstructorParameters<Type extends TSchema> = (Type extends TConstructor<infer Parameters extends TSchema[], infer _InstanceType extends TSchema> ? TTuple<Parameters> : TNever);
/** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
export declare function ConstructorParameters<Type extends TSchema>(schema: Type, options?: SchemaOptions): TConstructorParameters<Type>;
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,7 @@
import { Provider } from '../../binding/models/Provider';
import { ProviderBinding } from '../../binding/models/ProviderBinding';
import { ResolutionParams } from '../models/ResolutionParams';
import { Resolved } from '../models/Resolved';
export declare const resolveProviderBinding: <TActivated extends Provider<unknown>>(// eslint-disable-line @typescript-eslint/no-deprecated
params: ResolutionParams, binding: ProviderBinding<TActivated>) => Resolved<TActivated>;
//# sourceMappingURL=resolveProviderBinding.d.ts.map
@@ -0,0 +1,24 @@
{
"name": "pump",
"version": "3.0.3",
"repository": "git://github.com/mafintosh/pump.git",
"license": "MIT",
"description": "pipe streams together and close all of them if one of them closes",
"browser": {
"fs": false
},
"keywords": [
"streams",
"pipe",
"destroy",
"callback"
],
"author": "Mathias Buus Madsen <mathiasbuus@gmail.com>",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
},
"scripts": {
"test": "node test-browser.js && node test-node.js"
}
}
@@ -0,0 +1 @@
{"name":"react-error-boundary","version":"5.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532112150,"integrity":"sha512-OMdM7QmeCbQmYLLXZ+7Aebn5wcO+kuHG8v/NzXWrLp/YrkPve1YP0WQ243y7h3RayeNA+s4daXNb/kjikVfREg==","mode":420,"size":1078},"dist/react-error-boundary.cjs.js":{"checkedAt":1794532112151,"integrity":"sha512-Qo7gS9iYujr2V+yBjetjo1IxtCn9NJItoTipdUitLfqSsIxLsVUzZSPO0GDLaFbaCUrtdPICUxfyRmfpQsRVRw==","mode":420,"size":4823},"dist/react-error-boundary.development.cjs.js":{"checkedAt":1794532112151,"integrity":"sha512-NTblAb7Mo/dU9zV8d3C248+boEuPy5Kvyo++rLCOwvOHSphOEx8xxXHDelLX8Vdv9UuKmsvirTAQZl6bLiS9Lg==","mode":420,"size":4962},"dist/react-error-boundary.development.esm.js":{"checkedAt":1794532112151,"integrity":"sha512-OpHHpzoWenhR60Y6Azk58X9D6SvRnfFciavO2Guq/+R2q8YnlQhQ8xZb2Bgxz2lE/LqQuhYeTrC506fDILtkKQ==","mode":420,"size":4802},"dist/react-error-boundary.esm.js":{"checkedAt":1794532112151,"integrity":"sha512-lArxJNvuFOqSnZtf+JorD0dXWxxF+voIG59ly0Orppzciwh1ZlsCw09Q44qd8fi4pnvWduLY4pyZu3zIzaEEIg==","mode":420,"size":4663},"package.json":{"checkedAt":1794532112151,"integrity":"sha512-tRG2+K9+kIUYx70ihAFkxW8HisyIa+rEmGcFoMHGsjHtJ9mmWlZ29DWN4DhNH/gIUtxx7s+gRnMYN8pIAxUkHw==","mode":420,"size":2765},"dist/react-error-boundary.cjs.d.mts.map":{"checkedAt":1794532112151,"integrity":"sha512-o5hp6K3OtTSkWbS8ISC9jICwQM8RkmK9EomjSMIhGBW7GY7aFmUvZdhHXFn+lmiDxlGd/kNLqN3cttI/iVCAkA==","mode":420,"size":143},"dist/react-error-boundary.cjs.d.ts.map":{"checkedAt":1794532112152,"integrity":"sha512-9zM9/6ft6ije9SVxuw81jGBQIyikA/z/q4n9sCuR25qoHjVjFDXf4WPQSRsZuQMapVapa9lGawBS6cLKwS98Hg==","mode":420,"size":142},"README.md":{"checkedAt":1794532112152,"integrity":"sha512-HW+5g/oYnPI/bT9wag7IkaWSh/U/iX9IRP97U864lKSbOqXwBKuxUVzt44iXC/L4abDOA3xTl5o/wEeAFzYKgw==","mode":420,"size":5753},"dist/react-error-boundary.cjs.mjs":{"checkedAt":1794532112152,"integrity":"sha512-m3K27vyGOhD0doWlXR6NRvxwCeTbA0RBbdLfA/r5BJ5G3B4BoedgguGBNyfvWth055NzpNebfyId1Wj6iTxjdA==","mode":420,"size":130},"dist/react-error-boundary.development.cjs.mjs":{"checkedAt":1794532112152,"integrity":"sha512-1Jus1qm+KHOk+gDwVX2RUpCspKq52fX5KPZm0Om01/EZbKS06AaTSDHO+W/NFbk4o/utwAtQPq/UIEUn/KoHkQ==","mode":420,"size":142},"dist/react-error-boundary.cjs.d.mts":{"checkedAt":1794532112152,"integrity":"sha512-XhQdiCNFCVXMP/pgs4EGRA+D0sPX22LCTUnNwOMcKGMKat0ajktlWs5FqGSYT+pdT/2AMaYiLBE7y7EloFJhJg==","mode":420,"size":101},"dist/declarations/src/ErrorBoundary.d.ts":{"checkedAt":1794532112152,"integrity":"sha512-0qnrrgXQNo9cYtr+gtWjK6Olmz2H3FXQ0WZ7dQnX2KSmMLGMEe7NWJ0Vq13Uw+pnJ7OW+/fbO/vD+tajA4K/8Q==","mode":420,"size":821},"dist/declarations/src/ErrorBoundaryContext.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-mJohpcUuwgxMf5e6Ukoqs5UmjtppL2dG8Z8wsFPuSfioHij/z5rR5yYqZ8dryevNbZ6wDg8pGrA0C14TImugHw==","mode":420,"size":234},"dist/declarations/src/index.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-E5lpHUJFKxVzy+H5qO3DQr9pgNTt304uVf4CqglK25M57z5jMicqiNUdC51E90Fcj7a1SZlamcp1bH6MXFiFKA==","mode":420,"size":186},"dist/react-error-boundary.cjs.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-fuGdxuNYaYDdqtDwUd+MiIeqL7FBzbAvRWlb5gb8wi1fWTX0ZKrIvzImyaYD7JtImQh5otYTstPi+FEw10frTg==","mode":420,"size":97},"dist/declarations/src/types.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-LPiXuTHwYj+5VHRdqpVxR+zTMb9cXDITvs02xnilOtoHpPFMlLHiBKQ2KKP0Y1tZqIJlvkrXyhST0w0T6GwOmw==","mode":420,"size":1178},"dist/declarations/src/useErrorBoundary.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-QqP/55KivV2YirnbwPDtleGUfqWzj5yza6e39pdfoMQYeLH2ws6okVA4ksvRixx2W8x3DeKxTK8zIztfVVQaWQ==","mode":420,"size":208},"dist/declarations/src/withErrorBoundary.d.ts":{"checkedAt":1794532112153,"integrity":"sha512-xtst5Csp08dic3wtXyXi1ObOJf4nc6gTQ9EioT1I2VaCRp5z9fJ9HDdKfN4yAawrarfc17UGpLVOodgmPTa1kw==","mode":420,"size":400}}}
@@ -0,0 +1,947 @@
module.exports = minimatch
minimatch.Minimatch = Minimatch
var path = (function () { try { return require('path') } catch (e) {}}()) || {
sep: '/'
}
minimatch.sep = path.sep
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
var expand = require('brace-expansion')
var plTypes = {
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
'?': { open: '(?:', close: ')?' },
'+': { open: '(?:', close: ')+' },
'*': { open: '(?:', close: ')*' },
'@': { open: '(?:', close: ')' }
}
// any single thing other than /
// don't need to escape / when using new RegExp()
var qmark = '[^/]'
// * => any number of characters
var star = qmark + '*?'
// ** when dots are allowed. Anything goes, except .. and .
// not (^ or / followed by one or two dots followed by $ or /),
// followed by anything, any number of times.
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
// not a ^ or / followed by a dot,
// followed by anything, any number of times.
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
// characters that need to be escaped in RegExp.
var reSpecials = charSet('().*{}+?[]^$\\!')
// "abc" -> { a:true, b:true, c:true }
function charSet (s) {
return s.split('').reduce(function (set, c) {
set[c] = true
return set
}, {})
}
// normalizes slashes.
var slashSplit = /\/+/
minimatch.filter = filter
function filter (pattern, options) {
options = options || {}
return function (p, i, list) {
return minimatch(p, pattern, options)
}
}
function ext (a, b) {
b = b || {}
var t = {}
Object.keys(a).forEach(function (k) {
t[k] = a[k]
})
Object.keys(b).forEach(function (k) {
t[k] = b[k]
})
return t
}
minimatch.defaults = function (def) {
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
return minimatch
}
var orig = minimatch
var m = function minimatch (p, pattern, options) {
return orig(p, pattern, ext(def, options))
}
m.Minimatch = function Minimatch (pattern, options) {
return new orig.Minimatch(pattern, ext(def, options))
}
m.Minimatch.defaults = function defaults (options) {
return orig.defaults(ext(def, options)).Minimatch
}
m.filter = function filter (pattern, options) {
return orig.filter(pattern, ext(def, options))
}
m.defaults = function defaults (options) {
return orig.defaults(ext(def, options))
}
m.makeRe = function makeRe (pattern, options) {
return orig.makeRe(pattern, ext(def, options))
}
m.braceExpand = function braceExpand (pattern, options) {
return orig.braceExpand(pattern, ext(def, options))
}
m.match = function (list, pattern, options) {
return orig.match(list, pattern, ext(def, options))
}
return m
}
Minimatch.defaults = function (def) {
return minimatch.defaults(def).Minimatch
}
function minimatch (p, pattern, options) {
assertValidPattern(pattern)
if (!options) options = {}
// shortcut: comments match nothing.
if (!options.nocomment && pattern.charAt(0) === '#') {
return false
}
return new Minimatch(pattern, options).match(p)
}
function Minimatch (pattern, options) {
if (!(this instanceof Minimatch)) {
return new Minimatch(pattern, options)
}
assertValidPattern(pattern)
if (!options) options = {}
pattern = pattern.trim()
// windows support: need to use /, not \
if (!options.allowWindowsEscape && path.sep !== '/') {
pattern = pattern.split(path.sep).join('/')
}
this.options = options
this.set = []
this.pattern = pattern
this.regexp = null
this.negate = false
this.comment = false
this.empty = false
this.partial = !!options.partial
// make the set of regexps etc.
this.make()
}
Minimatch.prototype.debug = function () {}
Minimatch.prototype.make = make
function make () {
var pattern = this.pattern
var options = this.options
// empty patterns and comments match nothing.
if (!options.nocomment && pattern.charAt(0) === '#') {
this.comment = true
return
}
if (!pattern) {
this.empty = true
return
}
// step 1: figure out negation, etc.
this.parseNegate()
// step 2: expand braces
var set = this.globSet = this.braceExpand()
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
this.debug(this.pattern, set)
// step 3: now we have a set, so turn each one into a series of path-portion
// matching patterns.
// These will be regexps, except in the case of "**", which is
// set to the GLOBSTAR object for globstar behavior,
// and will not contain any / characters
set = this.globParts = set.map(function (s) {
return s.split(slashSplit)
})
this.debug(this.pattern, set)
// glob --> regexps
set = set.map(function (s, si, set) {
return s.map(this.parse, this)
}, this)
this.debug(this.pattern, set)
// filter out everything that didn't compile properly.
set = set.filter(function (s) {
return s.indexOf(false) === -1
})
this.debug(this.pattern, set)
this.set = set
}
Minimatch.prototype.parseNegate = parseNegate
function parseNegate () {
var pattern = this.pattern
var negate = false
var options = this.options
var negateOffset = 0
if (options.nonegate) return
for (var i = 0, l = pattern.length
; i < l && pattern.charAt(i) === '!'
; i++) {
negate = !negate
negateOffset++
}
if (negateOffset) this.pattern = pattern.substr(negateOffset)
this.negate = negate
}
// Brace expansion:
// a{b,c}d -> abd acd
// a{b,}c -> abc ac
// a{0..3}d -> a0d a1d a2d a3d
// a{b,c{d,e}f}g -> abg acdfg acefg
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
//
// Invalid sets are not expanded.
// a{2..}b -> a{2..}b
// a{b}c -> a{b}c
minimatch.braceExpand = function (pattern, options) {
return braceExpand(pattern, options)
}
Minimatch.prototype.braceExpand = braceExpand
function braceExpand (pattern, options) {
if (!options) {
if (this instanceof Minimatch) {
options = this.options
} else {
options = {}
}
}
pattern = typeof pattern === 'undefined'
? this.pattern : pattern
assertValidPattern(pattern)
// Thanks to Yeting Li <https://github.com/yetingli> for
// improving this regexp to avoid a ReDOS vulnerability.
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
// shortcut. no need to expand.
return [pattern]
}
return expand(pattern)
}
var MAX_PATTERN_LENGTH = 1024 * 64
var assertValidPattern = function (pattern) {
if (typeof pattern !== 'string') {
throw new TypeError('invalid pattern')
}
if (pattern.length > MAX_PATTERN_LENGTH) {
throw new TypeError('pattern is too long')
}
}
// parse a component of the expanded set.
// At this point, no pattern may contain "/" in it
// so we're going to return a 2d array, where each entry is the full
// pattern, split on '/', and then turned into a regular expression.
// A regexp is made at the end which joins each array with an
// escaped /, and another full one which joins each regexp with |.
//
// Following the lead of Bash 4.1, note that "**" only has special meaning
// when it is the *only* thing in a path portion. Otherwise, any series
// of * is equivalent to a single *. Globstar behavior is enabled by
// default, and can be disabled by setting options.noglobstar.
Minimatch.prototype.parse = parse
var SUBPARSE = {}
function parse (pattern, isSub) {
assertValidPattern(pattern)
var options = this.options
// shortcuts
if (pattern === '**') {
if (!options.noglobstar)
return GLOBSTAR
else
pattern = '*'
}
if (pattern === '') return ''
var re = ''
var hasMagic = !!options.nocase
var escaping = false
// ? => one single character
var patternListStack = []
var negativeLists = []
var stateChar
var inClass = false
var reClassStart = -1
var classStart = -1
// . and .. never match anything that doesn't start with .,
// even when options.dot is set.
var patternStart = pattern.charAt(0) === '.' ? '' // anything
// not (start or / followed by . or .. followed by / or end)
: options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
: '(?!\\.)'
var self = this
function clearStateChar () {
if (stateChar) {
// we had some state-tracking character
// that wasn't consumed by this pass.
switch (stateChar) {
case '*':
re += star
hasMagic = true
break
case '?':
re += qmark
hasMagic = true
break
default:
re += '\\' + stateChar
break
}
self.debug('clearStateChar %j %j', stateChar, re)
stateChar = false
}
}
for (var i = 0, len = pattern.length, c
; (i < len) && (c = pattern.charAt(i))
; i++) {
this.debug('%s\t%s %s %j', pattern, i, re, c)
// skip over any that are escaped.
if (escaping && reSpecials[c]) {
re += '\\' + c
escaping = false
continue
}
switch (c) {
/* istanbul ignore next */
case '/': {
// completely not allowed, even escaped.
// Should already be path-split by now.
return false
}
case '\\':
clearStateChar()
escaping = true
continue
// the various stateChar values
// for the "extglob" stuff.
case '?':
case '*':
case '+':
case '@':
case '!':
this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
// all of those are literals inside a class, except that
// the glob [!a] means [^a] in regexp
if (inClass) {
this.debug(' in class')
if (c === '!' && i === classStart + 1) c = '^'
re += c
continue
}
// if we already have a stateChar, then it means
// that there was something like ** or +? in there.
// Handle the stateChar, then proceed with this one.
self.debug('call clearStateChar %j', stateChar)
clearStateChar()
stateChar = c
// if extglob is disabled, then +(asdf|foo) isn't a thing.
// just clear the statechar *now*, rather than even diving into
// the patternList stuff.
if (options.noext) clearStateChar()
continue
case '(':
if (inClass) {
re += '('
continue
}
if (!stateChar) {
re += '\\('
continue
}
patternListStack.push({
type: stateChar,
start: i - 1,
reStart: re.length,
open: plTypes[stateChar].open,
close: plTypes[stateChar].close
})
// negation is (?:(?!js)[^/]*)
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
this.debug('plType %j %j', stateChar, re)
stateChar = false
continue
case ')':
if (inClass || !patternListStack.length) {
re += '\\)'
continue
}
clearStateChar()
hasMagic = true
var pl = patternListStack.pop()
// negation is (?:(?!js)[^/]*)
// The others are (?:<pattern>)<type>
re += pl.close
if (pl.type === '!') {
negativeLists.push(pl)
}
pl.reEnd = re.length
continue
case '|':
if (inClass || !patternListStack.length || escaping) {
re += '\\|'
escaping = false
continue
}
clearStateChar()
re += '|'
continue
// these are mostly the same in regexp and glob
case '[':
// swallow any state-tracking char before the [
clearStateChar()
if (inClass) {
re += '\\' + c
continue
}
inClass = true
classStart = i
reClassStart = re.length
re += c
continue
case ']':
// a right bracket shall lose its special
// meaning and represent itself in
// a bracket expression if it occurs
// first in the list. -- POSIX.2 2.8.3.2
if (i === classStart + 1 || !inClass) {
re += '\\' + c
escaping = false
continue
}
// handle the case where we left a class open.
// "[z-a]" is valid, equivalent to "\[z-a\]"
// split where the last [ was, make sure we don't have
// an invalid re. if so, re-walk the contents of the
// would-be class to re-translate any characters that
// were passed through as-is
// TODO: It would probably be faster to determine this
// without a try/catch and a new RegExp, but it's tricky
// to do safely. For now, this is safe and works.
var cs = pattern.substring(classStart + 1, i)
try {
RegExp('[' + cs + ']')
} catch (er) {
// not a valid class!
var sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
hasMagic = hasMagic || sp[1]
inClass = false
continue
}
// finish up the class.
hasMagic = true
inClass = false
re += c
continue
default:
// swallow any state char that wasn't consumed
clearStateChar()
if (escaping) {
// no need
escaping = false
} else if (reSpecials[c]
&& !(c === '^' && inClass)) {
re += '\\'
}
re += c
} // switch
} // for
// handle the case where we left a class open.
// "[abc" is valid, equivalent to "\[abc"
if (inClass) {
// split where the last [ was, and escape it
// this is a huge pita. We now have to re-walk
// the contents of the would-be class to re-translate
// any characters that were passed through as-is
cs = pattern.substr(classStart + 1)
sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0]
hasMagic = hasMagic || sp[1]
}
// handle the case where we had a +( thing at the *end*
// of the pattern.
// each pattern list stack adds 3 chars, and we need to go through
// and escape any | chars that were passed through as-is for the regexp.
// Go through and escape them, taking care not to double-escape any
// | chars that were already escaped.
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
var tail = re.slice(pl.reStart + pl.open.length)
this.debug('setting tail', re, pl)
// maybe some even number of \, then maybe 1 \, followed by a |
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
if (!$2) {
// the | isn't already escaped, so escape it.
$2 = '\\'
}
// need to escape all those slashes *again*, without escaping the
// one that we need for escaping the | character. As it works out,
// escaping an even number of slashes can be done by simply repeating
// it exactly after itself. That's why this trick works.
//
// I am sorry that you have to see this.
return $1 + $1 + $2 + '|'
})
this.debug('tail=%j\n %s', tail, tail, pl, re)
var t = pl.type === '*' ? star
: pl.type === '?' ? qmark
: '\\' + pl.type
hasMagic = true
re = re.slice(0, pl.reStart) + t + '\\(' + tail
}
// handle trailing things that only matter at the very end.
clearStateChar()
if (escaping) {
// trailing \\
re += '\\\\'
}
// only need to apply the nodot start if the re starts with
// something that could conceivably capture a dot
var addPatternStart = false
switch (re.charAt(0)) {
case '[': case '.': case '(': addPatternStart = true
}
// Hack to work around lack of negative lookbehind in JS
// A pattern like: *.!(x).!(y|z) needs to ensure that a name
// like 'a.xyz.yz' doesn't match. So, the first negative
// lookahead, has to look ALL the way ahead, to the end of
// the pattern.
for (var n = negativeLists.length - 1; n > -1; n--) {
var nl = negativeLists[n]
var nlBefore = re.slice(0, nl.reStart)
var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
var nlAfter = re.slice(nl.reEnd)
nlLast += nlAfter
// Handle nested stuff like *(*.js|!(*.json)), where open parens
// mean that we should *not* include the ) in the bit that is considered
// "after" the negated section.
var openParensBefore = nlBefore.split('(').length - 1
var cleanAfter = nlAfter
for (i = 0; i < openParensBefore; i++) {
cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
}
nlAfter = cleanAfter
var dollar = ''
if (nlAfter === '' && isSub !== SUBPARSE) {
dollar = '$'
}
var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
re = newRe
}
// if the re is not "" at this point, then we need to make sure
// it doesn't match against an empty path part.
// Otherwise a/* will match a/, which it should not.
if (re !== '' && hasMagic) {
re = '(?=.)' + re
}
if (addPatternStart) {
re = patternStart + re
}
// parsing just a piece of a larger pattern.
if (isSub === SUBPARSE) {
return [re, hasMagic]
}
// skip the regexp for non-magical patterns
// unescape anything in it, though, so that it'll be
// an exact match against a file etc.
if (!hasMagic) {
return globUnescape(pattern)
}
var flags = options.nocase ? 'i' : ''
try {
var regExp = new RegExp('^' + re + '$', flags)
} catch (er) /* istanbul ignore next - should be impossible */ {
// If it was an invalid regular expression, then it can't match
// anything. This trick looks for a character after the end of
// the string, which is of course impossible, except in multi-line
// mode, but it's not a /m regex.
return new RegExp('$.')
}
regExp._glob = pattern
regExp._src = re
return regExp
}
minimatch.makeRe = function (pattern, options) {
return new Minimatch(pattern, options || {}).makeRe()
}
Minimatch.prototype.makeRe = makeRe
function makeRe () {
if (this.regexp || this.regexp === false) return this.regexp
// at this point, this.set is a 2d array of partial
// pattern strings, or "**".
//
// It's better to use .match(). This function shouldn't
// be used, really, but it's pretty convenient sometimes,
// when you just want to work with a regex.
var set = this.set
if (!set.length) {
this.regexp = false
return this.regexp
}
var options = this.options
var twoStar = options.noglobstar ? star
: options.dot ? twoStarDot
: twoStarNoDot
var flags = options.nocase ? 'i' : ''
var re = set.map(function (pattern) {
return pattern.map(function (p) {
return (p === GLOBSTAR) ? twoStar
: (typeof p === 'string') ? regExpEscape(p)
: p._src
}).join('\\\/')
}).join('|')
// must match entire pattern
// ending in a * or ** will make it less strict.
re = '^(?:' + re + ')$'
// can match anything, as long as it's not this.
if (this.negate) re = '^(?!' + re + ').*$'
try {
this.regexp = new RegExp(re, flags)
} catch (ex) /* istanbul ignore next - should be impossible */ {
this.regexp = false
}
return this.regexp
}
minimatch.match = function (list, pattern, options) {
options = options || {}
var mm = new Minimatch(pattern, options)
list = list.filter(function (f) {
return mm.match(f)
})
if (mm.options.nonull && !list.length) {
list.push(pattern)
}
return list
}
Minimatch.prototype.match = function match (f, partial) {
if (typeof partial === 'undefined') partial = this.partial
this.debug('match', f, this.pattern)
// short-circuit in the case of busted things.
// comments, etc.
if (this.comment) return false
if (this.empty) return f === ''
if (f === '/' && partial) return true
var options = this.options
// windows: need to use /, not \
if (path.sep !== '/') {
f = f.split(path.sep).join('/')
}
// treat the test path as a set of pathparts.
f = f.split(slashSplit)
this.debug(this.pattern, 'split', f)
// just ONE of the pattern sets in this.set needs to match
// in order for it to be valid. If negating, then just one
// match means that we have failed.
// Either way, return on the first hit.
var set = this.set
this.debug(this.pattern, 'set', set)
// Find the basename of the path by looking for the last non-empty segment
var filename
var i
for (i = f.length - 1; i >= 0; i--) {
filename = f[i]
if (filename) break
}
for (i = 0; i < set.length; i++) {
var pattern = set[i]
var file = f
if (options.matchBase && pattern.length === 1) {
file = [filename]
}
var hit = this.matchOne(file, pattern, partial)
if (hit) {
if (options.flipNegate) return true
return !this.negate
}
}
// didn't get any hits. this is success if it's a negative
// pattern, failure otherwise.
if (options.flipNegate) return false
return this.negate
}
// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
Minimatch.prototype.matchOne = function (file, pattern, partial) {
var options = this.options
this.debug('matchOne',
{ 'this': this, file: file, pattern: pattern })
this.debug('matchOne', file.length, pattern.length)
for (var fi = 0,
pi = 0,
fl = file.length,
pl = pattern.length
; (fi < fl) && (pi < pl)
; fi++, pi++) {
this.debug('matchOne loop')
var p = pattern[pi]
var f = file[fi]
this.debug(pattern, p, f)
// should be impossible.
// some invalid regexp stuff in the set.
/* istanbul ignore if */
if (p === false) return false
if (p === GLOBSTAR) {
this.debug('GLOBSTAR', [pattern, p, f])
// "**"
// a/**/b/**/c would match the following:
// a/b/x/y/z/c
// a/x/y/z/b/c
// a/b/x/b/x/c
// a/b/c
// To do this, take the rest of the pattern after
// the **, and see if it would match the file remainder.
// If so, return success.
// If not, the ** "swallows" a segment, and try again.
// This is recursively awful.
//
// a/**/b/**/c matching a/b/x/y/z/c
// - a matches a
// - doublestar
// - matchOne(b/x/y/z/c, b/**/c)
// - b matches b
// - doublestar
// - matchOne(x/y/z/c, c) -> no
// - matchOne(y/z/c, c) -> no
// - matchOne(z/c, c) -> no
// - matchOne(c, c) yes, hit
var fr = fi
var pr = pi + 1
if (pr === pl) {
this.debug('** at the end')
// a ** at the end will just swallow the rest.
// We have found a match.
// however, it will not swallow /.x, unless
// options.dot is set.
// . and .. are *never* matched by **, for explosively
// exponential reasons.
for (; fi < fl; fi++) {
if (file[fi] === '.' || file[fi] === '..' ||
(!options.dot && file[fi].charAt(0) === '.')) return false
}
return true
}
// ok, let's see if we can swallow whatever we can.
while (fr < fl) {
var swallowee = file[fr]
this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
// XXX remove this slice. Just pass the start index.
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug('globstar found match!', fr, fl, swallowee)
// found a match.
return true
} else {
// can't swallow "." or ".." ever.
// can only swallow ".foo" when explicitly asked.
if (swallowee === '.' || swallowee === '..' ||
(!options.dot && swallowee.charAt(0) === '.')) {
this.debug('dot detected!', file, fr, pattern, pr)
break
}
// ** swallows a segment, and continue.
this.debug('globstar swallow a segment, and continue')
fr++
}
}
// no match was found.
// However, in partial mode, we can't say this is necessarily over.
// If there's more *pattern* left, then
/* istanbul ignore if */
if (partial) {
// ran out of file
this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
if (fr === fl) return true
}
return false
}
// something other than **
// non-magic patterns just have to match exactly
// patterns with magic have been turned into regexps.
var hit
if (typeof p === 'string') {
hit = f === p
this.debug('string match', p, f, hit)
} else {
hit = f.match(p)
this.debug('pattern match', p, f, hit)
}
if (!hit) return false
}
// Note: ending in / means that we'll get a final ""
// at the end of the pattern. This can only match a
// corresponding "" at the end of the file.
// If the file ends in /, then it can only match a
// a pattern that ends in /, unless the pattern just
// doesn't have any more for it. But, a/b/ should *not*
// match "a/b/*", even though "" matches against the
// [^/]*? pattern, except in partial mode, where it might
// simply not be reached yet.
// However, a/b/ should still satisfy a/*
// now either we fell off the end of the pattern, or we're done.
if (fi === fl && pi === pl) {
// ran out of pattern and filename at the same time.
// an exact hit!
return true
} else if (fi === fl) {
// ran out of file, but still had pattern left.
// this is ok if we're doing the match as part of
// a glob fs traversal.
return partial
} else /* istanbul ignore else */ if (pi === pl) {
// ran out of pattern, still have file left.
// this is only acceptable if we're on the very last
// empty segment of a file with a trailing slash.
// a/* should match a/b/
return (fi === fl - 1) && (file[fi] === '')
}
// should be unreachable.
/* istanbul ignore next */
throw new Error('wtf?')
}
// replace stuff like \* with *
function globUnescape (s) {
return s.replace(/\\(.)/g, '$1')
}
function regExpEscape (s) {
return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
}
@@ -0,0 +1,13 @@
/**
* @import {HtmlExtension} from 'micromark-util-types'
*/
/**
* Create an HTML extension for `micromark` to support GFM strikethrough when
* serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions`, to
* support GFM strikethrough when serializing to HTML.
*/
export function gfmStrikethroughHtml(): HtmlExtension;
import type { HtmlExtension } from 'micromark-util-types';
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/index.ts","../../src/immerImports.ts","../../src/reselectImports.ts","../../src/createDraftSafeSelector.ts","../../src/reduxImports.ts","../../src/devtoolsExtension.ts","../../src/getDefaultMiddleware.ts","../../src/tsHelpers.ts","../../src/createAction.ts","../../src/actionCreatorInvariantMiddleware.ts","../../src/utils.ts","../../src/immutableStateInvariantMiddleware.ts","../../src/serializableStateInvariantMiddleware.ts","../../src/autoBatchEnhancer.ts","../../src/getDefaultEnhancers.ts","../../src/configureStore.ts","../../src/mapBuilders.ts","../../src/createReducer.ts","../../src/matchers.ts","../../src/nanoid.ts","../../src/createAsyncThunk.ts","../../src/createSlice.ts","../../src/entities/entity_state.ts","../../src/entities/state_selectors.ts","../../src/entities/state_adapter.ts","../../src/entities/utils.ts","../../src/entities/unsorted_state_adapter.ts","../../src/entities/sorted_state_adapter.ts","../../src/entities/create_adapter.ts","../../src/listenerMiddleware/exceptions.ts","../../src/listenerMiddleware/utils.ts","../../src/listenerMiddleware/task.ts","../../src/listenerMiddleware/index.ts","../../src/dynamicMiddleware/index.ts","../../src/combineSlices.ts","../../src/formatProdErrorMessage.ts"],"sourcesContent":["// This must remain here so that the `mangleErrors.cjs` build script\n// does not have to import this into each source file it rewrites.\nimport { formatProdErrorMessage } from './formatProdErrorMessage';\nexport * from 'redux';\nexport { freeze, original } from 'immer';\nexport { createNextState, current, isDraft } from './immerImports';\nexport type { Draft, WritableDraft } from 'immer';\nexport { createSelector, lruMemoize } from 'reselect';\nexport { createSelectorCreator, weakMapMemoize } from './reselectImports';\nexport type { Selector, OutputSelector } from 'reselect';\nexport { createDraftSafeSelector, createDraftSafeSelectorCreator } from './createDraftSafeSelector';\nexport type { ThunkAction, ThunkDispatch, ThunkMiddleware } from 'redux-thunk';\nexport {\n// js\nconfigureStore } from './configureStore';\nexport type {\n// types\nConfigureStoreOptions, EnhancedStore } from './configureStore';\nexport type { DevToolsEnhancerOptions } from './devtoolsExtension';\nexport {\n// js\ncreateAction, isActionCreator, isFSA as isFluxStandardAction } from './createAction';\nexport type {\n// types\nPayloadAction, PayloadActionCreator, ActionCreatorWithNonInferrablePayload, ActionCreatorWithOptionalPayload, ActionCreatorWithPayload, ActionCreatorWithoutPayload, ActionCreatorWithPreparedPayload, PrepareAction } from './createAction';\nexport {\n// js\ncreateReducer } from './createReducer';\nexport type {\n// types\nActions, CaseReducer, CaseReducers } from './createReducer';\nexport {\n// js\ncreateSlice, buildCreateSlice, asyncThunkCreator, ReducerType } from './createSlice';\nexport type {\n// types\nCreateSliceOptions, Slice, CaseReducerActions, SliceCaseReducers, ValidateSliceCaseReducers, CaseReducerWithPrepare, ReducerCreators, SliceSelectors } from './createSlice';\nexport type { ActionCreatorInvariantMiddlewareOptions } from './actionCreatorInvariantMiddleware';\nexport { createActionCreatorInvariantMiddleware } from './actionCreatorInvariantMiddleware';\nexport {\n// js\ncreateImmutableStateInvariantMiddleware, isImmutableDefault } from './immutableStateInvariantMiddleware';\nexport type {\n// types\nImmutableStateInvariantMiddlewareOptions } from './immutableStateInvariantMiddleware';\nexport {\n// js\ncreateSerializableStateInvariantMiddleware, findNonSerializableValue, isPlain } from './serializableStateInvariantMiddleware';\nexport type {\n// types\nSerializableStateInvariantMiddlewareOptions } from './serializableStateInvariantMiddleware';\nexport type {\n// types\nActionReducerMapBuilder, AsyncThunkReducers } from './mapBuilders';\nexport { Tuple } from './utils';\nexport { createEntityAdapter } from './entities/create_adapter';\nexport type { EntityState, EntityAdapter, EntitySelectors, EntityStateAdapter, EntityId, Update, IdSelector, Comparer } from './entities/models';\nexport { createAsyncThunk, unwrapResult, miniSerializeError } from './createAsyncThunk';\nexport type { AsyncThunk, AsyncThunkConfig, AsyncThunkDispatchConfig, AsyncThunkOptions, AsyncThunkAction, AsyncThunkPayloadCreatorReturnValue, AsyncThunkPayloadCreator, GetState, GetThunkAPI, SerializedError, CreateAsyncThunkFunction } from './createAsyncThunk';\nexport {\n// js\nisAllOf, isAnyOf, isPending, isRejected, isFulfilled, isAsyncThunkAction, isRejectedWithValue } from './matchers';\nexport type {\n// types\nActionMatchingAllOf, ActionMatchingAnyOf } from './matchers';\nexport { nanoid } from './nanoid';\nexport type { ListenerEffect, ListenerMiddleware, ListenerEffectAPI, ListenerMiddlewareInstance, CreateListenerMiddlewareOptions, ListenerErrorHandler, TypedStartListening, TypedAddListener, TypedStopListening, TypedRemoveListener, UnsubscribeListener, UnsubscLine truncated
@@ -0,0 +1,112 @@
import { addUniqueItem, removeItem } from 'motion-utils';
class NodeStack {
constructor() {
this.members = [];
}
add(node) {
addUniqueItem(this.members, node);
node.scheduleRender();
}
remove(node) {
removeItem(this.members, node);
if (node === this.prevLead) {
this.prevLead = undefined;
}
if (node === this.lead) {
const prevLead = this.members[this.members.length - 1];
if (prevLead) {
this.promote(prevLead);
}
}
}
relegate(node) {
const indexOfNode = this.members.findIndex((member) => node === member);
if (indexOfNode === 0)
return false;
/**
* Find the next projection node that is present
*/
let prevLead;
for (let i = indexOfNode; i >= 0; i--) {
const member = this.members[i];
if (member.isPresent !== false) {
prevLead = member;
break;
}
}
if (prevLead) {
this.promote(prevLead);
return true;
}
else {
return false;
}
}
promote(node, preserveFollowOpacity) {
const prevLead = this.lead;
if (node === prevLead)
return;
this.prevLead = prevLead;
this.lead = node;
node.show();
if (prevLead) {
prevLead.instance && prevLead.scheduleRender();
node.scheduleRender();
node.resumeFrom = prevLead;
if (preserveFollowOpacity) {
node.resumeFrom.preserveOpacity = true;
}
if (prevLead.snapshot) {
node.snapshot = prevLead.snapshot;
node.snapshot.latestValues =
prevLead.animationValues || prevLead.latestValues;
}
if (node.root && node.root.isUpdating) {
node.isLayoutDirty = true;
}
const { crossfade } = node.options;
if (crossfade === false) {
prevLead.hide();
}
/**
* TODO:
* - Test border radius when previous node was deleted
* - boxShadow mixing
* - Shared between element A in scrolled container and element B (scroll stays the same or changes)
* - Shared between element A in transformed container and element B (transform stays the same or changes)
* - Shared between element A in scrolled page and element B (scroll stays the same or changes)
* ---
* - Crossfade opacity of root nodes
* - layoutId changes after animation
* - layoutId changes mid animation
*/
}
}
exitAnimationComplete() {
this.members.forEach((node) => {
const { options, resumingFrom } = node;
options.onExitComplete && options.onExitComplete();
if (resumingFrom) {
resumingFrom.options.onExitComplete &&
resumingFrom.options.onExitComplete();
}
});
}
scheduleRender() {
this.members.forEach((node) => {
node.instance && node.scheduleRender(false);
});
}
/**
* Clear any leads that have been removed this render to prevent them from being
* used in future animations and to prevent memory leaks
*/
removeLeadSnapshot() {
if (this.lead && this.lead.snapshot) {
this.lead.snapshot = undefined;
}
}
}
export { NodeStack };
@@ -0,0 +1 @@
{"name":"pump","version":"3.0.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532099722,"integrity":"sha512-tSuhQwQoEtbdEDGhKUav3bbo+Ou8cWnFnBONFqr8XiYarpL+ax6pSj2A450kFcSyGXEO9Gk5ot8TXbJKDPcS+w==","mode":420,"size":1078},"index.js":{"checkedAt":1794532099722,"integrity":"sha512-JnpTwShO3BkvuE9XUlci+rPQx+VQxC8xFR87zRlCiao6tLRCXULdG6kqxo+FOlfqoi/DJdcPUaJMToO10WTSKg==","mode":420,"size":2292},"test-browser.js":{"checkedAt":1794532099722,"integrity":"sha512-jhcv0JRsaw3gpqO9D1h/vUoVmeCpS2MiNDJirghI980X8X05SG0WerVa0o59DLXdfzkzTiKgMwaW/bPWtkL6CQ==","mode":420,"size":1172},"test-node.js":{"checkedAt":1794532099722,"integrity":"sha512-WSkbXzspFBGVRn4g9TaM7C/0yXNiMCR0enRWpfLEoAouwP6BIbSIRLqhxt4B8kRCpVuSm8ERRnD/ZvBk6CMm3w==","mode":420,"size":992},"package.json":{"checkedAt":1794532099723,"integrity":"sha512-tnhMIG9pugsAgnjrprM3yFi10RnqPaaDtUkAuAd/QupCtIXtw+mb9dSPLFt4Drg0WnwXV8lYGjorsSCKlN+xnQ==","mode":420,"size":530},"README.md":{"checkedAt":1794532099723,"integrity":"sha512-MkAqOyKSYJEW2KHwDVffsCe/l11SA4Nm9AGBObZ09AL0P5A/G22ujMKVuuEAjYFIgjFb8ZOmUqYiGuMQffjZzg==","mode":420,"size":2449},"SECURITY.md":{"checkedAt":1794532099723,"integrity":"sha512-hY9IiLY1GqzGFHoJ+jDMxTmRUYlfUkIH9EP/pzpHgECpRmtrM9sT/OO8BbI803YfTua4o0Uv70Vspdzz+hpFLg==","mode":420,"size":193},".travis.yml":{"checkedAt":1794532099723,"integrity":"sha512-z06apwq8G+1XpliF7/dLtmUufL0NUEz+Aa8kIglQRtuCEVvgnLkARMRbk0VEo2W9BwnnvwjN2cU9mozxIa0/dA==","mode":420,"size":58},".github/FUNDING.yml":{"checkedAt":1794532099723,"integrity":"sha512-Ui3IhYv/N0qbta1f7nJrD1NsEwBnfn7k7zAt2WjMvGxNkPlRQydqLOvquIx74qufJaq4JMkYU1zd4tgrJNKkBw==","mode":420,"size":39}}}
@@ -0,0 +1,144 @@
"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.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "знаци", verb: "да имаат" },
file: { unit: "бајти", verb: "да имаат" },
array: { unit: "ставки", verb: "да имаат" },
set: { unit: "ставки", verb: "да имаат" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "број";
}
case "object": {
if (Array.isArray(data)) {
return "низа";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "внес",
email: "адреса на е-пошта",
url: "URL",
emoji: "емоџи",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO датум и време",
date: "ISO датум",
time: "ISO време",
duration: "ISO времетраење",
ipv4: "IPv4 адреса",
ipv6: "IPv6 адреса",
cidrv4: "IPv4 опсег",
cidrv6: "IPv6 опсег",
base64: "base64-енкодирана низа",
base64url: "base64url-енкодирана низа",
json_string: "JSON низа",
e164: "E.164 број",
jwt: "JWT",
template_literal: "внес",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Грешен внес: се очекува ${issue.expected}, примено ${parsedType(issue.input)}`;
// return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;
return `Грешана опција: се очекува една ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Премногу голем: се очекува ${issue.origin ?? "вредноста"} да има ${adj}${issue.maximum.toString()} ${sizing.unit ?? "елементи"}`;
return `Премногу голем: се очекува ${issue.origin ?? "вредноста"} да биде ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Премногу мал: се очекува ${issue.origin} да има ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Премногу мал: се очекува ${issue.origin} да биде ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Неважечка низа: мора да започнува со "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Неважечка низа: мора да завршува со "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Неважечка низа: мора да вклучува "${_issue.includes}"`;
if (_issue.format === "regex")
return `Неважечка низа: мора да одгоара на патернот ${_issue.pattern}`;
return `Invalid ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Грешен број: мора да биде делив со ${issue.divisor}`;
case "unrecognized_keys":
return `${issue.keys.length > 1 ? "Непрепознаени клучеви" : "Непрепознаен клуч"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Грешен клуч во ${issue.origin}`;
case "invalid_union":
return "Грешен внес";
case "invalid_element":
return `Грешна вредност во ${issue.origin}`;
default:
return `Грешен внес`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,7 @@
/**
* @fileoverview Types for the plugin-kit package.
* @author Nicholas C. Zakas
*/
export type StringConfig = Record<string, string | null>;
export type BooleanConfig = Record<string, boolean>;
@@ -0,0 +1,74 @@
import { motionValue } from './index.mjs';
import { JSAnimation } from '../animation/JSAnimation.mjs';
import { isMotionValue } from './utils/is-motion-value.mjs';
import { frame } from '../frameloop/frame.mjs';
/**
* Create a `MotionValue` that animates to its latest value using a spring.
* Can either be a value or track another `MotionValue`.
*
* ```jsx
* const x = motionValue(0)
* const y = transformValue(() => x.get() * 2) // double x
* ```
*
* @param transformer - A transform function. This function must be pure with no side-effects or conditional statements.
* @returns `MotionValue`
*
* @public
*/
function springValue(source, options) {
const initialValue = isMotionValue(source) ? source.get() : source;
const value = motionValue(initialValue);
attachSpring(value, source, options);
return value;
}
function attachSpring(value, source, options) {
const initialValue = value.get();
let activeAnimation = null;
let latestValue = initialValue;
let latestSetter;
const unit = typeof initialValue === "string"
? initialValue.replace(/[\d.-]/g, "")
: undefined;
const stopAnimation = () => {
if (activeAnimation) {
activeAnimation.stop();
activeAnimation = null;
}
};
const startAnimation = () => {
stopAnimation();
activeAnimation = new JSAnimation({
keyframes: [asNumber(value.get()), asNumber(latestValue)],
velocity: value.getVelocity(),
type: "spring",
restDelta: 0.001,
restSpeed: 0.01,
...options,
onUpdate: latestSetter,
});
};
value.attach((v, set) => {
latestValue = v;
latestSetter = (latest) => set(parseValue(latest, unit));
frame.postRender(startAnimation);
}, stopAnimation);
if (isMotionValue(source)) {
const removeSourceOnChange = source.on("change", (v) => value.set(parseValue(v, unit)));
const removeValueOnDestroy = value.on("destroy", removeSourceOnChange);
return () => {
removeSourceOnChange();
removeValueOnDestroy();
};
}
return stopAnimation;
}
function parseValue(v, unit) {
return unit ? v + unit : v;
}
function asNumber(v) {
return typeof v === "number" ? v : parseFloat(v);
}
export { attachSpring, springValue };
@@ -0,0 +1,72 @@
// @flow
let size: number = -1;
// This utility copied from "dom-helpers" package.
export function getScrollbarSize(recalculate?: boolean = false): number {
if (size === -1 || recalculate) {
const div = document.createElement('div');
const style = div.style;
style.width = '50px';
style.height = '50px';
style.overflow = 'scroll';
((document.body: any): HTMLBodyElement).appendChild(div);
size = div.offsetWidth - div.clientWidth;
((document.body: any): HTMLBodyElement).removeChild(div);
}
return size;
}
export type RTLOffsetType =
| 'negative'
| 'positive-descending'
| 'positive-ascending';
let cachedRTLResult: RTLOffsetType | null = null;
// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).
// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.
// The safest way to check this is to intentionally set a negative offset,
// and then verify that the subsequent "scroll" event matches the negative offset.
// If it does not match, then we can assume a non-standard RTL scroll implementation.
export function getRTLOffsetType(recalculate?: boolean = false): RTLOffsetType {
if (cachedRTLResult === null || recalculate) {
const outerDiv = document.createElement('div');
const outerStyle = outerDiv.style;
outerStyle.width = '50px';
outerStyle.height = '50px';
outerStyle.overflow = 'scroll';
outerStyle.direction = 'rtl';
const innerDiv = document.createElement('div');
const innerStyle = innerDiv.style;
innerStyle.width = '100px';
innerStyle.height = '100px';
outerDiv.appendChild(innerDiv);
((document.body: any): HTMLBodyElement).appendChild(outerDiv);
if (outerDiv.scrollLeft > 0) {
cachedRTLResult = 'positive-descending';
} else {
outerDiv.scrollLeft = 1;
if (outerDiv.scrollLeft === 0) {
cachedRTLResult = 'negative';
} else {
cachedRTLResult = 'positive-ascending';
}
}
((document.body: any): HTMLBodyElement).removeChild(outerDiv);
return cachedRTLResult;
}
return cachedRTLResult;
}
@@ -0,0 +1,45 @@
export * from './CanonicalizeLocaleList';
export * from './CanonicalizeTimeZoneName';
export * from './CoerceOptionsToObject';
export * from './GetNumberOption';
export * from './GetOption';
export * from './GetOptionsObject';
export * from './GetStringOrBooleanOption';
export * from './IsSanctionedSimpleUnitIdentifier';
export * from './IsValidTimeZoneName';
export * from './IsWellFormedCurrencyCode';
export * from './IsWellFormedUnitIdentifier';
export * from './NumberFormat/ApplyUnsignedRoundingMode';
export * from './NumberFormat/CollapseNumberRange';
export * from './NumberFormat/ComputeExponent';
export * from './NumberFormat/ComputeExponentForMagnitude';
export * from './NumberFormat/CurrencyDigits';
export { default as _formatToParts } from './NumberFormat/format_to_parts';
export * from './NumberFormat/FormatApproximately';
export * from './NumberFormat/FormatNumeric';
export * from './NumberFormat/FormatNumericRange';
export * from './NumberFormat/FormatNumericRangeToParts';
export * from './NumberFormat/FormatNumericToParts';
export * from './NumberFormat/FormatNumericToString';
export * from './NumberFormat/GetUnsignedRoundingMode';
export * from './NumberFormat/InitializeNumberFormat';
export * from './NumberFormat/PartitionNumberPattern';
export * from './NumberFormat/PartitionNumberRangePattern';
export * from './NumberFormat/SetNumberFormatDigitOptions';
export * from './NumberFormat/SetNumberFormatUnitOptions';
export * from './NumberFormat/ToRawFixed';
export * from './NumberFormat/ToRawPrecision';
export * from './PartitionPattern';
export * from './SupportedLocales';
export { createDataProperty, defineProperty, getInternalSlot, getMultiInternalSlots, isLiteralPart, setInternalSlot, setMultiInternalSlots, } from './utils';
export * from './262';
export { isMissingLocaleDataError } from './data';
export * from './types/date-time';
export * from './types/displaynames';
export * from './types/list';
export * from './types/number';
export * from './types/plural-rules';
export * from './types/relative-time';
export { createMemoizedDateTimeFormat, createMemoizedListFormat, createMemoizedLocale, createMemoizedNumberFormat, createMemoizedPluralRules, invariant, } from './utils';
export { ZERO } from './constants';
export { ToIntlMathematicalValue } from './ToIntlMathematicalValue';
@@ -0,0 +1,50 @@
/* eslint-disable yoda */
'use strict';
const isFullwidthCodePoint = codePoint => {
if (Number.isNaN(codePoint)) {
return false;
}
// Code points are derived from:
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
if (
codePoint >= 0x1100 && (
codePoint <= 0x115F || // Hangul Jamo
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
// CJK Unified Ideographs .. Yi Radicals
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
// Hangul Jamo Extended-A
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
// Hangul Syllables
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
// CJK Compatibility Ideographs
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
// Vertical Forms
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
// CJK Compatibility Forms .. Small Form Variants
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
// Halfwidth and Fullwidth Forms
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
// Kana Supplement
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
// Enclosed Ideographic Supplement
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
)
) {
return true;
}
return false;
};
module.exports = isFullwidthCodePoint;
module.exports.default = isFullwidthCodePoint;
@@ -0,0 +1,22 @@
import { expect, test } from "vitest";
import { parsedType } from "../../../locales/en.js";
test("parsedType", () => {
expect(parsedType("string")).toBe("string");
expect(parsedType(1)).toBe("number");
expect(parsedType(true)).toBe("boolean");
expect(parsedType(null)).toBe("null");
expect(parsedType(undefined)).toBe("undefined");
expect(parsedType([])).toBe("array");
expect(parsedType({})).toBe("object");
expect(parsedType(new Date())).toBe("Date");
expect(parsedType(new Map())).toBe("Map");
expect(parsedType(new Set())).toBe("Set");
expect(parsedType(new Error())).toBe("Error");
const nullPrototype = Object.create(null);
expect(parsedType(nullPrototype)).toBe("object");
const doubleNullPrototype = Object.create(Object.create(null));
expect(parsedType(doubleNullPrototype)).toBe("object");
});
@@ -0,0 +1,15 @@
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var wi=Object.create;var fe=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var Ii=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Li=Object.prototype.hasOwnProperty;var at=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vi=(e,t)=>{for(var i in t)fe(e,i,{get:t[i],enumerable:!0})},nt=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ii(t))!Li.call(e,r)&&r!==i&&fe(e,r,{get:()=>t[r],enumerable:!(s=Pi(t,r))||s.enumerable});return e};var ot=(e,t,i)=>(i=e!=null?wi(Ni(e)):{},nt(t||!e||!e.__esModule?fe(i,"default",{value:e,enumerable:!0}):i,e)),Ri=e=>nt(fe({},"__esModule",{value:!0}),e);var zt=at((dr,Xt)=>{Xt.exports={}});var Xe=at((mr,We)=>{"use strict";var bs=zt(),Ss=/^[\da-fA-F]+$/,_s=/^\d+$/,Qt=new WeakMap;function Yt(e){e=e.Parser.acorn||e;let t=Qt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("<tag",!1),o=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),u={tc_oTag:n,tc_cTag:o,tc_expr:p},c={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};c.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(n),this.exprAllowed=!1},c.jsxTagEnd.updateContext=function(f){let v=this.context.pop();v===n&&f===i.slash||v===o?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:u,tokTypes:c},Qt.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}We.exports=function(e){return e=e||{},function(t){return Ts({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(We.exports,"tokTypes",{get:function(){return Yt(void 0).tokTypes},configurable:!0,enumerable:!0});function Ts(e,t){let i=t.acorn||void 0,s=Yt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,p=s.tokContexts.tc_oTag,u=s.tokContexts.tc_cTag,c=s.tokContexts.tc_expr,f=i.isNewLine,v=i.isIdentifierStart,T=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let h="",m=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(x):(h+=this.input.slice(m,this.pos),this.finishToken(n.jsxText,h));case 38:h+=this.input.slice(m,this.pos),h+=this.jsx_readEntity(),m=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:f(x)?(h+=this.input.slice(m,this.pos),h+=this.jsx_readNewLine(!0),m=this.pos):++this.pos}}}jsx_readNewLine(h){let m=this.input.charCodeAt(this.pos),x;return++this.pos,m===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=h?`
`:`\r
`):x=String.fromCharCode(m),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(h){let m="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===h)break;g===38?(m+=this.input.slice(x,this.pos),m+=this.jsx_readEntity(),x=this.pos):f(g)?(m+=this.input.slice(x,this.pos),m+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return m+=this.input.slice(x,this.pos++),this.finishToken(r.string,m)}jsx_readEntity(){let h="",m=0,x,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&m++<10;){if(g=this.input[this.pos++],g===";"){h[0]==="#"?h[1]==="x"?(h=h.substr(2),Ss.test(h)&&(x=String.fromCharCode(parseInt(h,16)))):(h=h.substr(1),_s.test(h)&&(x=String.fromCharCode(parseInt(h,10)))):x=bs[h];break}h+=g}return x||(this.pos=N,"&")}jsx_readWord(){let h,m=this.pos;do h=this.input.charCodeAt(++this.pos);while(T(h)||h===45);return this.finishToken(n.jsxName,this.input.slice(m,this.pos))}jsx_parseIdentifier(){let h=this.startNode();return this.type===n.jsxName?h.name=this.value:this.type.keyword?h.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(h,"JSXIdentifier")}jsx_parseNamespacedName(){let h=this.start,m=this.startLoc,x=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return x;var g=this.startNodeAt(h,m);return g.namespace=x,g.name=this.jsx_parseIdentifier(),this.finishNode(g,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let h=this.start,m=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===r.dot&&x.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let g=this.startNodeAt(h,m);g.object=x,g.property=this.jsx_parseIdentifier(),x=this.finishNode(g,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let h=this.jsx_parseExpressionContainer();return h.expression.type==="JSXEmptyExpression"&&this.raise(h.start,"JSX attributes must only be assigned a non-empty expression"),h;case n.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let h=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(h,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let h=this.startNode();return this.next(),h.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(h,"JSXExpressionContainer")}jsx_parseAttribute(){let h=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),h.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(h,"JSXSpreadAttribute")):(h.name=this.jsx_parseNamespacedName(),h.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(h,"JSXAttribute"))}jsx_parseOpeningElementAt(h,m){let x=this.startNodeAt(h,m);x.attributes=[];let g=this.jsx_parseElementName();for(g&&(x.name=g);this.type!==r.slash&&this.type!==n.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(r.slash),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(h,m){let x=this.startNodeAt(h,m),g=this.jsx_parseElementName();return g&&(x.name=g),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(h,m){let x=this.startNodeAt(h,m),g=[],N=this.jsx_parseOpeningElementAt(h,m),le=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(h=this.start,m=this.startLoc,this.next(),this.eat(r.slash)){le=this.jsx_parseClosingElementAt(h,m);break e}g.push(this.jsx_parseElementAt(h,m));break;case n.jsxText:g.push(this.parseExprAtom());break;case r.braceL:g.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(le.name)!==pe(N.name)&&this.raise(le.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let Le=N.name?"Element":"Fragment";return x["opening"+Le]=N,x["closing"+Le]=le,x.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+Le)}jsx_parseText(){let h=this.parseLiteral(this.value);return h.type="JSXText",h}jsx_parseElement(){let h=this.start,m=this.startLoc;return this.next(),this.jsx_parseElementAt(h,m)}parseExprAtom(h){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(h)}readToken(h){let m=this.curContext();if(m===c)return this.jsx_readToken();if(m===p||m===u){if(v(h))return this.jsx_readWord();if(h==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((h===34||h===39)&&m==p)return this.jsx_readString(h)}return h===60&&this.exprAllowed&&this.input.charCodeAt(thLine truncated
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ut(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return ut(t.onComment)&&(t.onComment=Ki(t,t.onComment)),t}function Ki(e,t){return function(i,s,r,n,o,p){var u={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(u.loc=new ve(this,o,p)),e.ranges&&(u.range=[r,n]),t.push(u)}}var ne=1,Z=2,Ue=4,vt=8,Ge=16,bt=32,be=64,St=128,X=256,oe=512,Se=ne|Z|X;function qe(e,t){return Z|(e?Ue:0)|(t?vt:0)}var me=0,Je=1,J=2,_t=3,Tt=4,Ct=5,E=function(t,i,s){this.options=t=Hi(t),this.sourceFile=t.sourceFile,this.keywords=H(Di[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ve[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var n=(r?r+" ":"")+Ve.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Ve.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(V).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ne),this.regexpState=null,this.privateNameStack=[]},j={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};E.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};j.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};j.inGenerator.get=function(){return(this.currentVarScope().flags&vt)>0};j.inAsync.get=function(){return(this.currentVarScope().flags&Ue)>0};j.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe))return!1;if(i&Z)return(i&Ue)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};j.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&be)>0||this.options.allowSuperOutsideMethod};j.allowDirectSuper.get=function(){return(this.currentThisScope().flags&St)>0};j.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};j.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe)||i&Z&&!(i&Ge))return!0}return!1};j.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&X)>0};E.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};E.parse=function(t,i){return new this(i,t).parse()};E.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};E.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(E.prototype,j);var P=E.prototype,Wi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=e,e+=A.exec(this.input)[0].length;var t=Wi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){A.lastIndex=e+t[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||V.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,A.lastIndex=e,e+=A.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||V.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var _e=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!V.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,p),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(t,s.generator)|be|(i?St:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qe(i,!1)|Ge),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=Line truncated
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
`&&++this.pos;case`
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(K(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?M:K)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var gs="8.15.0";E.acorn={Parser:E,version:gs,defaultOptions:De,Position:ae,SourceLocation:ve,getLineInfo:gt,Node:Te,TokenType:_,tokTypes:a,keywordTypes:je,TokContext:F,tokContexts:C,isIdentifierChar:K,isIdentifierStart:M,Token:Ke,isNewLine:Y,lineBreak:V,lineBreakG:Ui,nonASCIIwhitespace:xt};var bi=ot(Xe(),1);function Cs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ee=Cs;function Es(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var ke=Es;var ks=(e,t,i)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(i);for(let s=t.length-1;s>=0;s--){let r=t[s];if(i(r,s,t))return r}}},$t=ks;var As=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},te=As;var ws=new Proxy(()=>{},{get:()=>ws});function w(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(w(i),t):t}function k(e){var i;return((i=e.range)==null?void 0:i[1])??e.end}function Ps(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var ie=Ps;function Is(e,t,i){let s=e.originalText.slice(t,i);for(let r of e[Symbol.for("comments")]){let n=w(r);if(n>i)break;let o=k(r);if(o<t)continue;let p=o-n;s=s.slice(0,n-t)+" ".repeat(p)+s.slice(o-t)}return s}var Zt=Is;var Ns=ie(["Block","CommentBlock","MultiLine"]),z=Ns;var Ls=ie(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ze=Ls;var Qe=new WeakMap;function Vs(e){return Qe.has(e)||Qe.set(e,z(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Qe.get(e)}var ei=Vs;function Rs(e){if(!z(e))return!1;let t=`*${e.value}*`.split(`
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Ye=new WeakMap;function Os(e){return Ye.has(e)||Ye.set(e,Rs(e)),Ye.get(e)}var $e=Os;function Bs(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&k(s)===w(t)&&$e(s)&&$e(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[w(s),k(t)]),!ze(s)&&!z(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var ti=Bs;var he=null;function ce(e){if(he!==null&&typeof he.property){let t=he;return he=ce.prototype=null,t}return he=ce.prototype=e??Object.create(null),new ce}var Ds=10;for(let e=0;e<=Ds;e++)ce();function Ze(e){return ce(e)}function Fs(e,t="type"){Ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ii=Fs;var si={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","tLine truncated
`;e=se(!1,e.replace(qs,"").replace(Gs,""),Ws,"$1");let i="";for(;i!==e;)i=e,e=se(!1,e,Ks,`${t}$1 $2${t}`);e=e.replace(ui,"").trimEnd();let s=Object.create(null),r=se(!1,e,pi,"").replace(ui,"").trimEnd(),n;for(;n=pi.exec(e);){let o=se(!1,n[2],Hs,"");if(typeof s[n[1]]=="string"||Array.isArray(s[n[1]])){let p=s[n[1]];s[n[1]]=[...Xs,...Array.isArray(p)?p:[p],o]}else s[n[1]]=o}return{comments:r,pragmas:s}}var li=["noformat","noprettier"],fi=["format","prettier"];function zs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
`);return t===-1?e:e.slice(0,t)}var di=zs;function mi(e){let t=di(e);t&&(e=e.slice(t.length+1));let i=hi(e),{pragmas:s,comments:r}=ci(i);return{shebang:t,text:e,pragmas:s,comments:r}}function xi(e){let{pragmas:t}=mi(e);return fi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function yi(e){let{pragmas:t}=mi(e);return li.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Qs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:xi,hasIgnorePragma:yi,locStart:w,locEnd:k,...e}}var we=Qs;var Pe="module",gi="script",Ie=[Pe,gi];function Ne(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return Pe;if(/\.(?:cjs|cts)$/iu.test(e))return gi}}var Ys={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function $s(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return Ee(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var vi,Zs=()=>(vi??(vi=E.extend((0,bi.default)())),vi);function er(e,t){let i=Zs(),s=[],r=i.parse(e,{...Ys,sourceType:t,allowImportExportEverywhere:t===Pe,onComment:s});return r.comments=s,r}function tr(e,t){let i=Ne(t==null?void 0:t.filepath),s=(i?[i]:Ie).map(n=>()=>er(e,n)),r;try{r=ke(s)}catch({errors:[n]}){throw $s(n)}return Ae(r,{text:e})}var Si=we(tr);var Ei=ot(Xe(),1);var I={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ir(e,t){let i=e[0],s=te(!1,e,-1),r={type:I.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function it(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}it.prototype={constructor:it,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=I.Identifier,e.value==="static"&&(e.type=I.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=I.Keyword);else if(i===s.privateId)e.type=I.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=I.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=I.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=I.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=I.Boolean:i.keyword==="null"?e.type=I.Null:e.type=I.Keyword;else if(i===s.num)e.type=I.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=I.JSXText):e.type=I.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=I.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(ir(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var _i=it;var Ti=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function sr(){return te(!1,Ti,-1)}function rr(e=5){let t=e==="latest"?sr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ti.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ar(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ci(e){let t=rr(e.ecmaVersion),i=ar(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'mLine truncated
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[st](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var or={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=E.extend(rt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=E.extend((0,Ei.default)(),rt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function ki(e,t){let i=or.get(t);return new i(t,e).parse()}var ur={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function pr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:Ee(t,{loc:{start:{line:i,column:s}},cause:e})}function hr(e,t){let i=Ne(t==null?void 0:t.filepath),s=(i?[i]:Ie).map(n=>()=>ki(e,{...ur,sourceType:n})),r;try{r=ke(s)}catch({errors:[n]}){throw pr(n)}return Ae(r,{parser:"espree",text:e})}var Ai=we(hr);var cr={acorn:Si,espree:Ai};return Ri(lr);});
@@ -0,0 +1 @@
{"name":"use-isomorphic-layout-effect","version":"1.2.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532108412,"integrity":"sha512-hl24CThjLMMHLko+57lF7FmXAt/7iupkUEhWaQ1bbsHgCtPJ+fPP5SDHbb99QVfYL1QDXcOBihSmqUbkcCxFSA==","mode":420,"size":1070},"dist/use-isomorphic-layout-effect.browser.cjs.default.js":{"checkedAt":1794532108412,"integrity":"sha512-4gajXoyoowY1+9QBsauOWxQ0RCAtmfVsoPO85h76OlFn49SB8czfDlZqJbH/MwjTkItjffOSvDG1/Lx1KhCapw==","mode":420,"size":85},"dist/use-isomorphic-layout-effect.browser.cjs.js":{"checkedAt":1794532108413,"integrity":"sha512-bCpw9enUieVMePLF0JqTDAxS8FkasJ7suapIhSqX1eDbviLRfsa+GMILyJTboXxwgvSvwXcKX3n9Zi8SzxaBhw==","mode":420,"size":175},"dist/use-isomorphic-layout-effect.browser.esm.js":{"checkedAt":1794532108413,"integrity":"sha512-UDlLj88GYR1geygt5bbOQSNB49ltSTxI8i9MbPbJotd5TCQrg0noi0I3m+lWMBFEE9POAZlFRS3ccHj8eHYpIQ==","mode":420,"size":102},"dist/use-isomorphic-layout-effect.cjs.default.js":{"checkedAt":1794532108413,"integrity":"sha512-Ahhwi/svvnIAMEsXJjqJFp+XDNkq8r9jiQvJZbUVtUyMUoJvTpqjhD0UWkuxfn5PJ2WQWkxmBxzfzcIt2OkKjw==","mode":420,"size":77},"dist/use-isomorphic-layout-effect.cjs.js":{"checkedAt":1794532108413,"integrity":"sha512-ndzhYDxpfz6E+R6iZR+W/09VTQYNeKrFG9mj3WTds0Fmu98HijzSnvvF+Kp6cW2aUz7X0NLw42mCCH2+oI+yDg==","mode":420,"size":272},"dist/use-isomorphic-layout-effect.esm.js":{"checkedAt":1794532108413,"integrity":"sha512-ECTvhV5tfNetzJzArHfYVqsYbZ/ImkvItqWk66Kdcahy4xt5GUGlnVWiVVa/NjPtz1GoIyhXja46ORjobwS1xA==","mode":420,"size":199},"package.json":{"checkedAt":1794532108413,"integrity":"sha512-fNi10PDbJh+8dCXBfDLeOflCn/mVDG8OzocXO/qqozXrCNm70AFGszJmUgq188F6KivDb3YAK/52fZrMuTbAqQ==","mode":420,"size":3075},"README.md":{"checkedAt":1794532108413,"integrity":"sha512-osZE7zkfnSsF2KJDZ4E6BwVvF1h3AQS/rPjrEo7LXRc2Blm6IBDkL7kP6T6dI2WyijAjiwJurSqxaWUWSxFiKw==","mode":420,"size":625},"dist/use-isomorphic-layout-effect.browser.cjs.mjs":{"checkedAt":1794532108414,"integrity":"sha512-C5H7CC88DLhvnjuYRGP6PBsIe8Nd2g7ZyYMHZgKhtR4SBtZX3jAZGaetsbfg+oV/yHIFx644jqvC7xeMN/gHmA==","mode":420,"size":149},"dist/use-isomorphic-layout-effect.cjs.mjs":{"checkedAt":1794532108414,"integrity":"sha512-6y/zq93jIlf24Djr/hWIqKJTQCVk82zlf0qXUonrEmLiHLhjb8tfRHSBCa6IfJ8WyLst3PDGKpN4cs9qeLjSjg==","mode":420,"size":133},"dist/use-isomorphic-layout-effect.cjs.d.mts":{"checkedAt":1794532108414,"integrity":"sha512-NNwkfXCOCYVneDa+Wnh52UPyRqhoRV6Y4avB6a78Wp0OEcpFtcgIe1umGV4yz93OqhQx0ox5zinJnXDHD3ZOHg==","mode":420,"size":395},"dist/declarations/src/index.d.ts":{"checkedAt":1794532108414,"integrity":"sha512-+VgxD0tocJ3FkgJVWBkb6S1hJ9fvIsb4bwYetlsYTKMkvLs+Yk0NgtoAtk5g2KvG27ZRTEvqN9Gja6QX+0Hg6g==","mode":420,"size":114},"dist/use-isomorphic-layout-effect.cjs.d.ts":{"checkedAt":1794532108414,"integrity":"sha512-yhtJHOO52kdniTTh59QssLYOwQpHIZq9av4g/FKIXO2QgVh/ft9aoz9H6LA4oKHNw5eeUg2lCyJnu9MLGpfCeA==","mode":420,"size":365},"dist/use-isomorphic-layout-effect.cjs.default.d.ts":{"checkedAt":1794532108370,"integrity":"sha512-Va8Lacg73xbU7KbjjLh4RTwMTfU2mFbYFGAGtVMEpObQ/JYJXfRtBSEiGgqJiVcdHN41GaDap2Ckv8vAK42BOg==","mode":420,"size":66}}}
@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.verifyOKP = verifyOKP;
const cose_js_1 = require("../../cose.js");
const index_js_1 = require("../../index.js");
const importKey_js_1 = require("./importKey.js");
const getWebCrypto_js_1 = require("./getWebCrypto.js");
async function verifyOKP(opts) {
const { cosePublicKey, signature, data } = opts;
const WebCrypto = await (0, getWebCrypto_js_1.getWebCrypto)();
const alg = cosePublicKey.get(cose_js_1.COSEKEYS.alg);
const crv = cosePublicKey.get(cose_js_1.COSEKEYS.crv);
const x = cosePublicKey.get(cose_js_1.COSEKEYS.x);
if (!alg) {
throw new Error('Public key was missing alg (OKP)');
}
if (!(0, cose_js_1.isCOSEAlg)(alg)) {
throw new Error(`Public key had invalid alg ${alg} (OKP)`);
}
if (!crv) {
throw new Error('Public key was missing crv (OKP)');
}
if (!x) {
throw new Error('Public key was missing x (OKP)');
}
// Pulled key import steps from here:
// https://wicg.github.io/webcrypto-secure-curves/#ed25519-operations
let _crv;
if (crv === cose_js_1.COSECRV.ED25519) {
_crv = 'Ed25519';
}
else {
throw new Error(`Unexpected COSE crv value of ${crv} (OKP)`);
}
const keyData = {
kty: 'OKP',
crv: _crv,
alg: 'EdDSA',
x: index_js_1.isoBase64URL.fromBuffer(x),
ext: false,
};
const keyAlgorithm = {
name: _crv,
namedCurve: _crv,
};
const key = await (0, importKey_js_1.importKey)({
keyData,
algorithm: keyAlgorithm,
});
const verifyAlgorithm = {
name: _crv,
};
return WebCrypto.subtle.verify(verifyAlgorithm, key, signature, data);
}
@@ -0,0 +1,143 @@
"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.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "символів", verb: "матиме" },
file: { unit: "байтів", verb: "матиме" },
array: { unit: "елементів", verb: "матиме" },
set: { unit: "елементів", verb: "матиме" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "число";
}
case "object": {
if (Array.isArray(data)) {
return "масив";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "вхідні дані",
email: "адреса електронної пошти",
url: "URL",
emoji: "емодзі",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "дата та час ISO",
date: "дата ISO",
time: "час ISO",
duration: "тривалість ISO",
ipv4: "адреса IPv4",
ipv6: "адреса IPv6",
cidrv4: "діапазон IPv4",
cidrv6: "діапазон IPv6",
base64: "рядок у кодуванні base64",
base64url: "рядок у кодуванні base64url",
json_string: "рядок JSON",
e164: "номер E.164",
jwt: "JWT",
template_literal: "вхідні дані",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Неправильні вхідні дані: очікується ${issue.expected}, отримано ${parsedType(issue.input)}`;
// return `Неправильні вхідні дані: очікується ${issue.expected}, отримано ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Неправильні вхідні дані: очікується ${util.stringifyPrimitive(issue.values[0])}`;
return `Неправильна опція: очікується одне з ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Занадто велике: очікується, що ${issue.origin ?? "значення"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "елементів"}`;
return `Занадто велике: очікується, що ${issue.origin ?? "значення"} буде ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Занадто мале: очікується, що ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Занадто мале: очікується, що ${issue.origin} буде ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Неправильний рядок: повинен починатися з "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Неправильний рядок: повинен закінчуватися на "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Неправильний рядок: повинен містити "${_issue.includes}"`;
if (_issue.format === "regex")
return `Неправильний рядок: повинен відповідати шаблону ${_issue.pattern}`;
return `Неправильний ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Неправильне число: повинно бути кратним ${issue.divisor}`;
case "unrecognized_keys":
return `Нерозпізнаний ключ${issue.keys.length > 1 ? "і" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Неправильний ключ у ${issue.origin}`;
case "invalid_union":
return "Неправильні вхідні дані";
case "invalid_element":
return `Неправильне значення у ${issue.origin}`;
default:
return `Неправильні вхідні дані`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"resolveFactoryBindingCallback.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/calculations/resolveFactoryBindingCallback.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,91 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.0.5](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.4...v3.0.5) - 2024-12-16
### Commits
- [types] use shared config [`6180b31`](https://github.com/fengyuanchen/is-array-buffer/commit/6180b3180cd15a49e6394cb6de0ae2667124d3f7)
- [actions] split out node 10-20, and 20+ [`1ea4712`](https://github.com/fengyuanchen/is-array-buffer/commit/1ea471223e393bfc124fdecdbeb23fe08209514f)
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`de2b6ab`](https://github.com/fengyuanchen/is-array-buffer/commit/de2b6aba5e88b382bd6707409aa39822707fed50)
- [Deps] update `call-bind`, `get-intrinsic` [`55b80a1`](https://github.com/fengyuanchen/is-array-buffer/commit/55b80a10ae9151e1bd52382610d7330f37a1dc05)
- [Deps] update `call-bind`, `get-intrinsic` [`184484a`](https://github.com/fengyuanchen/is-array-buffer/commit/184484ad7fd3a72426f78e2bce3246e8c23e9ccf)
- [Dev Deps] update `available-typed-arrays`, `tape` [`81582a7`](https://github.com/fengyuanchen/is-array-buffer/commit/81582a72d6ddb28f67ad542edcd673d6c01cc2c0)
- [Tests] add `@arethetypeswrong/cli` [`6d67841`](https://github.com/fengyuanchen/is-array-buffer/commit/6d6784170ec8a0b766428ce44be3157147860a09)
- [Refactor] use `call-bound` directly [`dd0bad1`](https://github.com/fengyuanchen/is-array-buffer/commit/dd0bad194e4ff0e5413be23d69018fa961ce4af7)
- [Tests] replace `aud` with `npm audit` [`99b62d1`](https://github.com/fengyuanchen/is-array-buffer/commit/99b62d1755b6965bbc236342215e28a10d6839a7)
- [Dev Deps] remove obsolete DT package [`9fc6971`](https://github.com/fengyuanchen/is-array-buffer/commit/9fc69715867796c5854fd5377d90da6f01fb981e)
- [Dev Deps] add missing peer dep [`a3b8dbb`](https://github.com/fengyuanchen/is-array-buffer/commit/a3b8dbb538c13abb8f1a4d4d9a682ec71c2f52f8)
## [v3.0.4](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.3...v3.0.4) - 2024-02-02
### Commits
- [patch] add types [`15fab4c`](https://github.com/fengyuanchen/is-array-buffer/commit/15fab4c68378904a12592969042e638dbc6be8e5)
## [v3.0.3](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.2...v3.0.3) - 2024-02-02
### Commits
- [Fix] TAs can take a DataView in node 0.8; use a simpler check [`69a03f6`](https://github.com/fengyuanchen/is-array-buffer/commit/69a03f671f892b724be1a899a3d90c981e7601c9)
- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`53ca341`](https://github.com/fengyuanchen/is-array-buffer/commit/53ca34182d2aab61e90e744ee47d01f6577b616e)
- [Deps] update `call-bind`, `get-intrinsic`, `is-typed-array` [`bec883f`](https://github.com/fengyuanchen/is-array-buffer/commit/bec883f31e83410a46927a843ded46ebffbbb1f6)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`944d4ce`](https://github.com/fengyuanchen/is-array-buffer/commit/944d4cea229ce29a0965665bf59df290c53ecbbb)
- [meta] add missing `engines.node` [`0852be6`](https://github.com/fengyuanchen/is-array-buffer/commit/0852be6f64188912d2383ff9b6a7cc12bd369006)
- [Deps] update `get-intrinsic` [`b59c4af`](https://github.com/fengyuanchen/is-array-buffer/commit/b59c4af432014649d6cd1f070cf6e9917e6ad524)
## [v3.0.2](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.1...v3.0.2) - 2023-03-01
### Commits
- [Fix] `node` 0.8: an object arg to a TA only throws a RangeError when it is an ArrayBuffer of an incompatible byte length [`d5108f6`](https://github.com/fengyuanchen/is-array-buffer/commit/d5108f6d06245e616b6c563995f214a38732243c)
- [Dev Deps] update `object-inspect`, `tape` [`400f456`](https://github.com/fengyuanchen/is-array-buffer/commit/400f4563ccbe27c7fbb485665352c76210bba9cb)
- [Deps] update `get-intrinsic` [`133732e`](https://github.com/fengyuanchen/is-array-buffer/commit/133732ec88f8dded1c705b758badc2240077a6d8)
## [v3.0.1](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.0...v3.0.1) - 2023-01-05
### Commits
- [Fix] in node 0.8, TAs do not coerce Uint8Arrays to an ArrayBuffer properly [`e488763`](https://github.com/fengyuanchen/is-array-buffer/commit/e48876346f446825dad619e55dcc830ed93f2853)
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8eebfa2`](https://github.com/fengyuanchen/is-array-buffer/commit/8eebfa21881f3a9fa5094f8c486f00e496658ea9)
## [v3.0.0](https://github.com/fengyuanchen/is-array-buffer/compare/v2.0.0...v3.0.0) - 2023-01-04
### Commits
- [Breaking] replace package implementation [`b65f929`](https://github.com/fengyuanchen/is-array-buffer/commit/b65f929d856d2a42f043be0f5a0fc2e067370ed1)
- Initial implementation, tests, readme [`06afa73`](https://github.com/fengyuanchen/is-array-buffer/commit/06afa73e775960802ea9257cc6b4cdf768c72d3f)
- Initial commit [`051813f`](https://github.com/fengyuanchen/is-array-buffer/commit/051813f15e3cbf515e2447306761dd9c42819150)
- npm init [`946d3de`](https://github.com/fengyuanchen/is-array-buffer/commit/946d3de82b15471fb2c00a4a2a5a52eb0515eb04)
- [meta] use `npmignore` to autogenerate an npmignore file [`ca4c446`](https://github.com/fengyuanchen/is-array-buffer/commit/ca4c446f37daf5ab8cc590f2194574c2706561ed)
- Only apps should have lockfiles [`be7d8eb`](https://github.com/fengyuanchen/is-array-buffer/commit/be7d8eb09dc5033c04df85d7ba9a8714f4e54357)
- docs: fix badge link [`9ea7fb6`](https://github.com/fengyuanchen/is-array-buffer/commit/9ea7fb638e79f8938161b3b7370cb965d8e93a8b)
<!-- auto-changelog-above -->
## 2.0.0 (Feb 12, 2021)
- Refactor in TypeScript.
- Drop the `dist` directory.
- Drop the UMD bundled file.
- Add a declaration file for TypeScript.
## 1.0.1 (Apr 1, 2018)
- Improve code style.
## 1.0.0 (Jul 25, 2017)
- Supports UMD, CommonJS and ES Module.
## 0.1.0 (Nov 28, 2015)
- Check if ArrayBuffer is defined first.
## 0.0.1 (Nov 11, 2015)
- Initial release.
@@ -0,0 +1,22 @@
import ary from './ary.js';
/**
* Creates a function that accepts up to one argument, ignoring any
* additional arguments.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.unary(parseInt));
* // => [6, 8, 10]
*/
function unary(func) {
return ary(func, 1);
}
export default unary;
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} nincs kijel\xf6lve.`,
"longPressToSelect": `Nyomja hosszan a kijel\xf6l\xe9shez.`,
"select": `Kijel\xf6l\xe9s`,
"selectedAll": `Az \xf6sszes elem kijel\xf6lve.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Egy elem sincs kijel\xf6lve`,
one: ()=>`${formatter.number(args.count)} elem kijel\xf6lve`,
other: ()=>`${formatter.number(args.count)} elem kijel\xf6lve`
})}.`,
"selectedItem": (args)=>`${args.item} kijel\xf6lve.`
};
//# sourceMappingURL=hu-HU.main.js.map
@@ -0,0 +1,29 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow async function declarations.",
category: "ES2017",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-async-functions.html",
},
fixable: null,
messages: {
forbidden: "ES2017 async function declarations are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
":function[async=true]"(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,346 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
/**
* Polyfill - Convert UTF32 codepoint into JS string.
* Note: The built-in String.fromCodePoint happens to be much slower
* due to additional sanity checks. We can avoid them since
* we always operate on legal UTF32 (granted by the input decoders)
* and use this faster version instead.
*/
export function stringFromCodePoint(codePoint: number): string {
if (codePoint > 0xFFFF) {
codePoint -= 0x10000;
return String.fromCharCode((codePoint >> 10) + 0xD800) + String.fromCharCode((codePoint % 0x400) + 0xDC00);
}
return String.fromCharCode(codePoint);
}
/**
* Convert UTF32 char codes into JS string.
* Basically the same as `stringFromCodePoint` but for multiple codepoints
* in a loop (which is a lot faster).
*/
export function utf32ToString(data: Uint32Array, start: number = 0, end: number = data.length): string {
let result = '';
for (let i = start; i < end; ++i) {
let codepoint = data[i];
if (codepoint > 0xFFFF) {
// JS strings are encoded as UTF16, thus a non BMP codepoint gets converted into a surrogate
// pair conversion rules:
// - subtract 0x10000 from code point, leaving a 20 bit number
// - add high 10 bits to 0xD800 --> first surrogate
// - add low 10 bits to 0xDC00 --> second surrogate
codepoint -= 0x10000;
result += String.fromCharCode((codepoint >> 10) + 0xD800) + String.fromCharCode((codepoint % 0x400) + 0xDC00);
} else {
result += String.fromCharCode(codepoint);
}
}
return result;
}
/**
* StringToUtf32 - decodes UTF16 sequences into UTF32 codepoints.
* To keep the decoder in line with JS strings it handles single surrogates as UCS2.
*/
export class StringToUtf32 {
private _interim: number = 0;
/**
* Clears interim and resets decoder to clean state.
*/
public clear(): void {
this._interim = 0;
}
/**
* Decode JS string to UTF32 codepoints.
* The methods assumes stream input and will store partly transmitted
* surrogate pairs and decode them with the next data chunk.
* Note: The method does no bound checks for target, therefore make sure
* the provided input data does not exceed the size of `target`.
* Returns the number of written codepoints in `target`.
*/
public decode(input: string, target: Uint32Array): number {
const length = input.length;
if (!length) {
return 0;
}
let size = 0;
let startPos = 0;
// handle leftover surrogate high
if (this._interim) {
const second = input.charCodeAt(startPos++);
if (0xDC00 <= second && second <= 0xDFFF) {
target[size++] = (this._interim - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
} else {
// illegal codepoint (USC2 handling)
target[size++] = this._interim;
target[size++] = second;
}
this._interim = 0;
}
for (let i = startPos; i < length; ++i) {
const code = input.charCodeAt(i);
// surrogate pair first
if (0xD800 <= code && code <= 0xDBFF) {
if (++i >= length) {
this._interim = code;
return size;
}
const second = input.charCodeAt(i);
if (0xDC00 <= second && second <= 0xDFFF) {
target[size++] = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
} else {
// illegal codepoint (USC2 handling)
target[size++] = code;
target[size++] = second;
}
continue;
}
if (code === 0xFEFF) {
// BOM
continue;
}
target[size++] = code;
}
return size;
}
}
/**
* Utf8Decoder - decodes UTF8 byte sequences into UTF32 codepoints.
*/
export class Utf8ToUtf32 {
public interim: Uint8Array = new Uint8Array(3);
/**
* Clears interim bytes and resets decoder to clean state.
*/
public clear(): void {
this.interim.fill(0);
}
/**
* Decodes UTF8 byte sequences in `input` to UTF32 codepoints in `target`.
* The methods assumes stream input and will store partly transmitted bytes
* and decode them with the next data chunk.
* Note: The method does no bound checks for target, therefore make sure
* the provided data chunk does not exceed the size of `target`.
* Returns the number of written codepoints in `target`.
*/
public decode(input: Uint8Array, target: Uint32Array): number {
const length = input.length;
if (!length) {
return 0;
}
let size = 0;
let byte1: number;
let byte2: number;
let byte3: number;
let byte4: number;
let codepoint = 0;
let startPos = 0;
// handle leftover bytes
if (this.interim[0]) {
let discardInterim = false;
let cp = this.interim[0];
cp &= ((((cp & 0xE0) === 0xC0)) ? 0x1F : (((cp & 0xF0) === 0xE0)) ? 0x0F : 0x07);
let pos = 0;
let tmp: number;
while ((tmp = this.interim[++pos] & 0x3F) && pos < 4) {
cp <<= 6;
cp |= tmp;
}
// missing bytes - read ahead from input
const type = (((this.interim[0] & 0xE0) === 0xC0)) ? 2 : (((this.interim[0] & 0xF0) === 0xE0)) ? 3 : 4;
const missing = type - pos;
while (startPos < missing) {
if (startPos >= length) {
return 0;
}
tmp = input[startPos++];
if ((tmp & 0xC0) !== 0x80) {
// wrong continuation, discard interim bytes completely
startPos--;
discardInterim = true;
break;
} else {
// need to save so we can continue short inputs in next call
this.interim[pos++] = tmp;
cp <<= 6;
cp |= tmp & 0x3F;
}
}
if (!discardInterim) {
// final test is type dependent
if (type === 2) {
if (cp < 0x80) {
// wrong starter byte
startPos--;
} else {
target[size++] = cp;
}
} else if (type === 3) {
if (cp < 0x0800 || (cp >= 0xD800 && cp <= 0xDFFF) || cp === 0xFEFF) {
// illegal codepoint or BOM
} else {
target[size++] = cp;
}
} else {
if (cp < 0x010000 || cp > 0x10FFFF) {
// illegal codepoint
} else {
target[size++] = cp;
}
}
}
this.interim.fill(0);
}
// loop through input
const fourStop = length - 4;
let i = startPos;
while (i < length) {
/**
* ASCII shortcut with loop unrolled to 4 consecutive ASCII chars.
* This is a compromise between speed gain for ASCII
* and penalty for non ASCII:
* For best ASCII performance the char should be stored directly into target,
* but even a single attempt to write to target and compare afterwards
* penalizes non ASCII really bad (-50%), thus we load the char into byteX first,
* which reduces ASCII performance by ~15%.
* This trial for ASCII reduces non ASCII performance by ~10% which seems acceptible
* compared to the gains.
* Note that this optimization only takes place for 4 consecutive ASCII chars,
* for any shorter it bails out. Worst case - all 4 bytes being read but
* thrown away due to the last being a non ASCII char (-10% performance).
*/
while (i < fourStop
&& !((byte1 = input[i]) & 0x80)
&& !((byte2 = input[i + 1]) & 0x80)
&& !((byte3 = input[i + 2]) & 0x80)
&& !((byte4 = input[i + 3]) & 0x80))
{
target[size++] = byte1;
target[size++] = byte2;
target[size++] = byte3;
target[size++] = byte4;
i += 4;
}
// reread byte1
byte1 = input[i++];
// 1 byte
if (byte1 < 0x80) {
target[size++] = byte1;
// 2 bytes
} else if ((byte1 & 0xE0) === 0xC0) {
if (i >= length) {
this.interim[0] = byte1;
return size;
}
byte2 = input[i++];
if ((byte2 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
codepoint = (byte1 & 0x1F) << 6 | (byte2 & 0x3F);
if (codepoint < 0x80) {
// wrong starter byte
i--;
continue;
}
target[size++] = codepoint;
// 3 bytes
} else if ((byte1 & 0xF0) === 0xE0) {
if (i >= length) {
this.interim[0] = byte1;
return size;
}
byte2 = input[i++];
if ((byte2 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
if (i >= length) {
this.interim[0] = byte1;
this.interim[1] = byte2;
return size;
}
byte3 = input[i++];
if ((byte3 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
codepoint = (byte1 & 0x0F) << 12 | (byte2 & 0x3F) << 6 | (byte3 & 0x3F);
if (codepoint < 0x0800 || (codepoint >= 0xD800 && codepoint <= 0xDFFF) || codepoint === 0xFEFF) {
// illegal codepoint or BOM, no i-- here
continue;
}
target[size++] = codepoint;
// 4 bytes
} else if ((byte1 & 0xF8) === 0xF0) {
if (i >= length) {
this.interim[0] = byte1;
return size;
}
byte2 = input[i++];
if ((byte2 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
if (i >= length) {
this.interim[0] = byte1;
this.interim[1] = byte2;
return size;
}
byte3 = input[i++];
if ((byte3 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
if (i >= length) {
this.interim[0] = byte1;
this.interim[1] = byte2;
this.interim[2] = byte3;
return size;
}
byte4 = input[i++];
if ((byte4 & 0xC0) !== 0x80) {
// wrong continuation
i--;
continue;
}
codepoint = (byte1 & 0x07) << 18 | (byte2 & 0x3F) << 12 | (byte3 & 0x3F) << 6 | (byte4 & 0x3F);
if (codepoint < 0x010000 || codepoint > 0x10FFFF) {
// illegal codepoint, no i-- here
continue;
}
target[size++] = codepoint;
} else {
// illegal byte, just skip
}
}
return size;
}
}
@@ -0,0 +1,7 @@
import { ServiceIdentifier } from '@inversifyjs/common';
import { BaseBinding } from './BaseBinding';
import { bindingTypeValues } from './BindingType';
export interface ServiceRedirectionBinding<TActivated> extends BaseBinding<typeof bindingTypeValues.ServiceRedirection, TActivated> {
targetServiceIdentifier: ServiceIdentifier;
}
//# sourceMappingURL=ServiceRedirectionBinding.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"match-path-data.js","sourceRoot":"","sources":["../../../src/__tests__/data/match-path-data.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,+CAAmD;AAiBnD,IAAM,oCAAoC,GAAG;IAC3C,KAAK;IACL,OAAO;IACP,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAC;AAEW,QAAA,KAAK,GAA2B;IAC3C;QACE,IAAI,EAAE,sDAAsD;QAC5D,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB;QACD,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/D,eAAe,EAAE,WAAW;QAC5B,YAAY,EAAE,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrE,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,wDAAwD;QAC9D,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC;SACtD;QACD,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/D,eAAe,EAAE,WAAW;QAC5B,UAAU,EAAE,CAAC,KAAK,CAAC;QACnB,YAAY,EAAE,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;KACtE;IACD;QACE,IAAI,EACF,sFAAsF;QACxF,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE;YACL,GAAG,EAAE,CAAC,YAAY,CAAC;YACnB,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB;QACD,aAAa,EAAE;YACb,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC;YACrD,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;SAC/C;QACD,eAAe,EAAE,WAAW;QAC5B,YAAY,EAAE,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrE,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,qEAAqE;QAC3E,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;QACzD,eAAe,EAAE,WAAW;QAC5B,UAAU,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;QAC7B,YAAY,EAAE,IAAA,4BAAe,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;KACxE;IACD;QACE,IAAI,EAAE,iDAAiD;QACvD,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QACtD,eAAe,EAAE,cAAc;QAC/B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;QACnD,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,yDAAyD;QAC/D,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE;YACL,SAAS,EAAE,CAAC,cAAc,CAAC;SAC5B;QACD,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QACpD,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,IAAA,4BAAe,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAClE,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,+DAA+D;QACrE,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/D,eAAe,EAAE,WAAW;QAC5B,YAAY,EAAE,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACrE,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,gDAAgD;QACtD,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC/D,WAAW,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QACnC,eAAe,EAAE,WAAW;QAC5B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;QAC5D,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,qDAAqD;QAC3D,eAAe,EAAE,OAAO;QACxB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAClE,WAAW,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;QACnC,eAAe,EAAE,cAAc;QAC/B,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;KAChE;IACD;QACE,IAAI,EAAE,gEAAgE;QACtE,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,UAAU,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;QAC1C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE;QAC3D,aAAa,EAAE;YACb,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC;YAC/C,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,kBAAkB;SACvE;QACD,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,eAAe,EAAE,aAAa;QAC9B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;KACjE;IACD;QACE,IAAI,EAAE,+DAA+D;QACrE,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;QAC/B,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QACjE,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE;YACX,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,WAAW;SACrB;QACD,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;KAC/D;IACD;QACE,IAAI,EAAE,uDAAuD;QAC7D,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE;QAClC,aAAa,EAAE;YACb,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;YAChD,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;SACnD;QACD,eAAe,EAAE,aAAa;QAC9B,WAAW,EAAE;YACX,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE;SACnE;QACD,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;KAC/D;IACD;QACE,IAAI,EAAE,oEAAoE;QAC1E,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACnD,eAAe,EAAE,OAAO;QACxB,YAAY,EAAE,IAAA,cAAO,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACzD,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,ELine truncated
@@ -0,0 +1 @@
{"version":3,"file":"resolveScopedInstanceBindingNode.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScopedInstanceBindingNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,eAAO,MAAM,gCAAgC,EAAE,CAAC,UAAU,EACxD,OAAO,EAAE,CACP,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,mBAAmB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,KACnD,QAAQ,CAAC,UAAU,CAAC,KACtB,CACH,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,mBAAmB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,KACnD,QAAQ,CAAC,UAAU,CAK2B,CAAC"}
@@ -0,0 +1,242 @@
/* MIT license */
var colorNames = require('color-name');
var swizzle = require('simple-swizzle');
var hasOwnProperty = Object.hasOwnProperty;
var reverseNames = Object.create(null);
// create a list of reverse color names
for (var name in colorNames) {
if (hasOwnProperty.call(colorNames, name)) {
reverseNames[colorNames[name]] = name;
}
}
var cs = module.exports = {
to: {},
get: {}
};
cs.get = function (string) {
var prefix = string.substring(0, 3).toLowerCase();
var val;
var model;
switch (prefix) {
case 'hsl':
val = cs.get.hsl(string);
model = 'hsl';
break;
case 'hwb':
val = cs.get.hwb(string);
model = 'hwb';
break;
default:
val = cs.get.rgb(string);
model = 'rgb';
break;
}
if (!val) {
return null;
}
return {model: model, value: val};
};
cs.get.rgb = function (string) {
if (!string) {
return null;
}
var abbr = /^#([a-f0-9]{3,4})$/i;
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var keyword = /^(\w+)$/;
var rgb = [0, 0, 0, 1];
var match;
var i;
var hexAlpha;
if (match = string.match(hex)) {
hexAlpha = match[2];
match = match[1];
for (i = 0; i < 3; i++) {
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
var i2 = i * 2;
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
}
if (hexAlpha) {
rgb[3] = parseInt(hexAlpha, 16) / 255;
}
} else if (match = string.match(abbr)) {
match = match[1];
hexAlpha = match[3];
for (i = 0; i < 3; i++) {
rgb[i] = parseInt(match[i] + match[i], 16);
}
if (hexAlpha) {
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
}
} else if (match = string.match(rgba)) {
for (i = 0; i < 3; i++) {
rgb[i] = parseInt(match[i + 1], 0);
}
if (match[4]) {
if (match[5]) {
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
}
} else if (match = string.match(per)) {
for (i = 0; i < 3; i++) {
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
}
if (match[4]) {
if (match[5]) {
rgb[3] = parseFloat(match[4]) * 0.01;
} else {
rgb[3] = parseFloat(match[4]);
}
}
} else if (match = string.match(keyword)) {
if (match[1] === 'transparent') {
return [0, 0, 0, 0];
}
if (!hasOwnProperty.call(colorNames, match[1])) {
return null;
}
rgb = colorNames[match[1]];
rgb[3] = 1;
return rgb;
} else {
return null;
}
for (i = 0; i < 3; i++) {
rgb[i] = clamp(rgb[i], 0, 255);
}
rgb[3] = clamp(rgb[3], 0, 1);
return rgb;
};
cs.get.hsl = function (string) {
if (!string) {
return null;
}
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
var match = string.match(hsl);
if (match) {
var alpha = parseFloat(match[4]);
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
var s = clamp(parseFloat(match[2]), 0, 100);
var l = clamp(parseFloat(match[3]), 0, 100);
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, s, l, a];
}
return null;
};
cs.get.hwb = function (string) {
if (!string) {
return null;
}
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
var match = string.match(hwb);
if (match) {
var alpha = parseFloat(match[4]);
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
var w = clamp(parseFloat(match[2]), 0, 100);
var b = clamp(parseFloat(match[3]), 0, 100);
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
return [h, w, b, a];
}
return null;
};
cs.to.hex = function () {
var rgba = swizzle(arguments);
return (
'#' +
hexDouble(rgba[0]) +
hexDouble(rgba[1]) +
hexDouble(rgba[2]) +
(rgba[3] < 1
? (hexDouble(Math.round(rgba[3] * 255)))
: '')
);
};
cs.to.rgb = function () {
var rgba = swizzle(arguments);
return rgba.length < 4 || rgba[3] === 1
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
};
cs.to.rgb.percent = function () {
var rgba = swizzle(arguments);
var r = Math.round(rgba[0] / 255 * 100);
var g = Math.round(rgba[1] / 255 * 100);
var b = Math.round(rgba[2] / 255 * 100);
return rgba.length < 4 || rgba[3] === 1
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
};
cs.to.hsl = function () {
var hsla = swizzle(arguments);
return hsla.length < 4 || hsla[3] === 1
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
};
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
// (hwb have alpha optional & 1 is default value)
cs.to.hwb = function () {
var hwba = swizzle(arguments);
var a = '';
if (hwba.length >= 4 && hwba[3] !== 1) {
a = ', ' + hwba[3];
}
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
};
cs.to.keyword = function (rgb) {
return reverseNames[rgb.slice(0, 3)];
};
// helpers
function clamp(num, min, max) {
return Math.min(Math.max(min, num), max);
}
function hexDouble(num) {
var str = Math.round(num).toString(16).toUpperCase();
return (str.length < 2) ? '0' + str : str;
}
@@ -0,0 +1,24 @@
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 = off
[CHANGELOG.md]
indent_style = space
indent_size = 2
[README.md]
indent_style = space
indent_size = 2
[*.json]
max_line_length = off
[Makefile]
max_line_length = off
@@ -0,0 +1,21 @@
(The MIT License)
Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>
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,50 @@
# math-intrinsics <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
ES Math-related intrinsics and helpers, robustly cached.
- `abs`
- `floor`
- `isFinite`
- `isInteger`
- `isNaN`
- `isNegativeZero`
- `max`
- `min`
- `mod`
- `pow`
- `round`
- `sign`
- `constants/maxArrayLength`
- `constants/maxSafeInteger`
- `constants/maxValue`
## Tests
Simply clone the repo, `npm install`, and run `npm test`
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
[package-url]: https://npmjs.org/package/math-intrinsics
[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg
[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg
[deps-url]: https://david-dm.org/es-shims/math-intrinsics
[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-object.svg
[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics
[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics
[actions-url]: https://github.com/es-shims/math-intrinsics/actions
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.elementAXObjects = exports.AXObjects = exports.AXObjectRoles = exports.AXObjectElements = void 0;
var _AXObjectElementMap = _interopRequireDefault(require("./AXObjectElementMap"));
var _AXObjectRoleMap = _interopRequireDefault(require("./AXObjectRoleMap"));
var _AXObjectsMap = _interopRequireDefault(require("./AXObjectsMap"));
var _elementAXObjectMap = _interopRequireDefault(require("./elementAXObjectMap"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AXObjectElements = _AXObjectElementMap.default;
exports.AXObjectElements = AXObjectElements;
var AXObjectRoles = _AXObjectRoleMap.default;
exports.AXObjectRoles = AXObjectRoles;
var AXObjects = _AXObjectsMap.default;
exports.AXObjects = AXObjects;
var elementAXObjects = _elementAXObjectMap.default;
exports.elementAXObjects = elementAXObjects;
@@ -0,0 +1,634 @@
export default `flf2a$ 6 6 15 -1 20
The elder futhark -- by Bryan Alexander <alexande@mathcs.rhodes.edu>
figlet release 2.1 -- 12 Aug 1994
This font consists of the runes in the elder futhark. It is accurate as
far as I know. Any corrections, or ideas on improving the font's appearance
are welcome. Modifying this font is fine with me; please e-mail me the
result.
3 point version of the runes used as uppercase added as lowercase letters
9/22/97 Jerrad Pierce <belg4mit@mit.edu>
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
6 - height of a character
6 - height of a character, not including descenders
15 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font
20 - number of comment lines
$ $@
$ $@
$ _ $@
$|_|$@
$ $@
$ $@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
__/\\__@
\\ /@
/_ _\\@
\\/ @
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
_ @
|_|@
_ @
|_|@
_ @
|_|@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
_ @
(_)@
@
(_)@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
|\\ @
| \\ @
|\\ @
| \\ @
| @
| @@
|~\\ @
| > @
|_/ @
|~\\ @
| > @
|_/ @@
| @
| @
| @
|\\ @
| \\ @
| \\ @@
|\\ /| @
| \\ / | @
| \\/ | @
| /\\ | @
| / \\ | @
|/ \\| @@
|\\ /| @
| \\ / | @
| \\/ | @
| | @
| | @
| | @@
| / / @
|/ / @
| / @
|/ @
| @
| @@
\\ / @
\\ / @
\\/ @
/\\ @
/ \\ @
/ \\ @@
| | @
|\\ | @
| \\ | @
| \\ | @
| \\| @
| | @@
| @
| @
| @
| @
| @
| @@
/ @
/ @
\\ \\ @
\\ \\ @
/ @
/ @@
/ @
/ @
/ @
\\ @
\\ @
\\ @@
|\\ @
| \\ @
| \\ @
| @
| @
| @@
|\\ /| @
| \\/ | @
| /\\ | @
|/ \\| @
| | @
| | @@
| @
\\ | @
\\| @
|\\ @
| \\ @
| @@
/~\\ @
/ \\ @
\\ / @
\\ / @
/ \\ @
/ \\ @@
|\\ / @
| \\/ @
| @
| @
| /\\ @
|/ \\ @@
@
@
@
@
@
@@
|~\\ @
| \\ @
| / @
|_/ @
| \\ @
| \\ @@
/ @
/ @
/____ @
/ @
/ @
/ @@
/|\\ @
/ | \\ @
/ | \\ @
| @
| @
| @@
|\\ @
| \\ @
| \\ @
| | @
| | @
| | @@
|\\ @
| \\ @
| \\ @
| | @
| | @
| | @@
|\\ @
| > @
|/ @
| @
| @
| @@
@
@
@
@
@
@@
|~~-__ @
| | @
|_____| @
| | | @
| | | @
| | | @@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
|\\ @
|\\ @
| @@
@
@
@
|\\ @
|< @
|/ @@
@
@
@
| @
| @
|\\ @@
@
@
@
|\\ /| @
| X | @
|/ \\| @@
@
@
@
|\\/| @
| | @
| | @@
@
@
@
|// @
|/ @
| @@
@
@
@
\\ / @
X @
/ \\ @@
@
@
@
| | @
|\\| @
| | @@
@
@
@
| @
| @
| @@
@
@
@
/ @
\\ \\ @
/ @@
@
@
@
/ @
< @
\\ @@
@
@
@
|\\ @
| @
| @@
@
@
@
|\\/| @
|/\\| @
| | @@
@
@
@
| @
\`| @
|\` @@
@
@
@
/\\ @
\\/ @
/\\ @@
@
@
@
|\\/ @
| @
|/\\ @@
@
@
@
@
@
@@
@
@
@
|\\ @
|/ @
|\\ @@
@
@
@
/ @
-- @
/ @@
@
@
@
/|\\ @
| @
| @@
@
@
@
|\\ @
| | @
| | @@
@
@
@
|\\ @
| | @
| | @@
@
@
@
|\\ @
|/ @
| @@
@
@
@
@
@
@@
@
@
@
|~\\ @
|_| @
||| @@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"resolveScopedBinding.js","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScopedBinding.ts"],"names":[],"mappings":";;;AAGA,+DAA4D;AAG5D,mDAAgD;AAEzC,MAAM,oBAAoB,GAS4C,CAK3E,OAGyB,EACzB,EAAE,CAAC,IAAA,6BAAa,EAAC,iBAAO,EAAE,OAAO,CAAC,CAAC;AAlBxB,QAAA,oBAAoB,wBAkBI"}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more