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,3 @@
# @formatjs/fast-memoize
This is just a fork of `fast-memoize`.
@@ -0,0 +1,43 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = timesLimit;
var _mapLimit = require('./mapLimit.js');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _range = require('./internal/range.js');
var _range2 = _interopRequireDefault(_range);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
* time.
*
* @name timesLimit
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.times]{@link module:ControlFlow.times}
* @category Control Flow
* @param {number} count - The number of times to run the function.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - The async function to call `n` times.
* Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see [async.map]{@link module:Collections.map}.
* @returns {Promise} a promise, if no callback is provided
*/
function timesLimit(count, limit, iteratee, callback) {
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _mapLimit2.default)((0, _range2.default)(count), limit, _iteratee, callback);
}
module.exports = exports.default;
@@ -0,0 +1,38 @@
// Lao [lo]
import dayjs from '../index';
var locale = {
name: 'lo',
weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'ວັນdddd D MMMM YYYY HH:mm'
},
relativeTime: {
future: 'ອີກ %s',
past: '%sຜ່ານມາ',
s: 'ບໍ່ເທົ່າໃດວິນາທີ',
m: '1 ນາທີ',
mm: '%d ນາທີ',
h: '1 ຊົ່ວໂມງ',
hh: '%d ຊົ່ວໂມງ',
d: '1 ມື້',
dd: '%d ມື້',
M: '1 ເດືອນ',
MM: '%d ເດືອນ',
y: '1 ປີ',
yy: '%d ປີ'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,110 @@
/**
* @fileoverview Rule to check for tabs inside a file
* @author Gyandeep Singh
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const tabRegex = /\t+/gu;
const anyNonWhitespaceRegex = /\S/u;
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-tabs",
url: "https://eslint.style/rules/no-tabs",
},
},
],
},
type: "layout",
docs: {
description: "Disallow all tabs",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-tabs",
},
schema: [
{
type: "object",
properties: {
allowIndentationTabs: {
type: "boolean",
default: false,
},
},
additionalProperties: false,
},
],
messages: {
unexpectedTab: "Unexpected tab character.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const allowIndentationTabs =
context.options &&
context.options[0] &&
context.options[0].allowIndentationTabs;
return {
Program(node) {
sourceCode.getLines().forEach((line, index) => {
let match;
while ((match = tabRegex.exec(line)) !== null) {
if (
allowIndentationTabs &&
!anyNonWhitespaceRegex.test(
line.slice(0, match.index),
)
) {
continue;
}
context.report({
node,
loc: {
start: {
line: index + 1,
column: match.index,
},
end: {
line: index + 1,
column: match.index + match[0].length,
},
},
messageId: "unexpectedTab",
});
}
});
},
};
},
};
@@ -0,0 +1,30 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `for-of` statements.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-for-of-loops.html",
},
fixable: null,
messages: {
forbidden: "ES2015 'for-of' statements are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
ForOfStatement(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,40 @@
const defaultOptions = {
maxLength: 200,
// locale: "en-IN"
}
const localeMap = {
"$":"en-US",
"€":"de-DE",
"£":"en-GB",
"¥":"ja-JP",
"₹":"en-IN",
}
const sign = "(?:-|\+)?";
const digitsAndSeparator = "(?:\d+|\d{1,3}(?:,\d{3})+)";
const decimalPart = "(?:\.\d{1,2})?";
const symbol = "(?:\$|€|¥|₹)?";
const currencyCheckRegex = /^\s*(?:-|\+)?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d{1,2})?\s*(?:\$|€|¥|₹)?\s*$/u;
class CurrencyParser{
constructor(options){
this.options = options || defaultOptions;
}
parse(val){
if (typeof val === 'string' && val.length <= this.options.maxLength) {
if(val.indexOf(",,") !== -1 && val.indexOf(".." !== -1)){
const match = val.match(currencyCheckRegex);
if(match){
const locale = this.options.locale || localeMap[match[2]||match[5]||"₹"];
const formatter = new Intl.NumberFormat(locale)
val = val.replace(/[^0-9,.]/g, '').trim();
val = Number(val.replace(formatter.format(1000)[1], ''));
}
}
}
return val;
}
}
CurrencyParser.defaultOptions = defaultOptions;
module.exports = CurrencyParser;
@@ -0,0 +1,3 @@
export { Hfs } from "./hfs.js";
export { Path } from "./path.js";
export * from "./errors.js";
@@ -0,0 +1,82 @@
/**
* Compile markdown to HTML.
*
* > Note: which encodings are supported depends on the engine.
* > For info on Node.js, see:
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
*
* @overload
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Encoding | null | undefined} encoding
* Character encoding to understand `value` as when it’s a `Uint8Array`
* (`string`, default: `'utf8'`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*
* @overload
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding to understand `value` as when it’s a `Uint8Array`
* (`string`, default: `'utf8'`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*/
export function micromark(value: Value, encoding: Encoding | null | undefined, options?: Options | null | undefined): string;
/**
* Compile markdown to HTML.
*
* > Note: which encodings are supported depends on the engine.
* > For info on Node.js, see:
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
*
* @overload
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Encoding | null | undefined} encoding
* Character encoding to understand `value` as when it’s a `Uint8Array`
* (`string`, default: `'utf8'`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*
* @overload
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*
* @param {Value} value
* Markdown to parse (`string` or `Uint8Array`).
* @param {Encoding | Options | null | undefined} [encoding]
* Character encoding to understand `value` as when it’s a `Uint8Array`
* (`string`, default: `'utf8'`).
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {string}
* Compiled HTML.
*/
export function micromark(value: Value, options?: Options | null | undefined): string;
export { compile } from "./lib/compile.js";
export { parse } from "./lib/parse.js";
export { postprocess } from "./lib/postprocess.js";
export { preprocess } from "./lib/preprocess.js";
export type Options = import("micromark-util-types").Options;
import type { Value } from 'micromark-util-types';
import type { Encoding } from 'micromark-util-types';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"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","194":"x y z"},C:{"1":"0 1 2 3 4 5 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","2":"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 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 0C 1C"},D:{"1":"0 1 2 3 4 5 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M 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 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","194":"x y z"},E:{"1":"QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD"},F:{"1":"0 1 2 3 4 5 m n o p q r s t u v w x y z","2":"6 7 8 9 F B C 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 FD GD HD ID NC uC JD OC","194":"j k l"},G:{"1":"QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"AB BB CB DB EB FB","2":"6 7 8 9 J oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"1":"2D","2":"1D"}},B:4,C:"CSS Subgrid",D:true};
@@ -0,0 +1,115 @@
/**
* @fileoverview Virtual file
* @author Nicholas C. Zakas
*/
"use strict";
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/** @typedef {import("@eslint/core").File} File */
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Determines if a given value has a byte order mark (BOM).
* @param {string|Uint8Array} value The value to check.
* @returns {boolean} `true` if the value has a BOM, `false` otherwise.
*/
function hasUnicodeBOM(value) {
return typeof value === "string"
? value.charCodeAt(0) === 0xfeff
: value[0] === 0xef && value[1] === 0xbb && value[2] === 0xbf;
}
/**
* Strips Unicode BOM from the given value.
* @param {string|Uint8Array} value The value to remove the BOM from.
* @returns {string|Uint8Array} The stripped value.
*/
function stripUnicodeBOM(value) {
if (!hasUnicodeBOM(value)) {
return value;
}
if (typeof value === "string") {
/*
* Check Unicode BOM.
* In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
* http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
*/
return value.slice(1);
}
/*
* In a Uint8Array, the BOM is represented by three bytes: 0xEF, 0xBB, and 0xBF,
* so we can just remove the first three bytes.
*/
return value.slice(3);
}
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* Represents a virtual file inside of ESLint.
* @implements {File}
*/
class VFile {
/**
* The file path including any processor-created virtual path.
* @type {string}
* @readonly
*/
path;
/**
* The file path on disk.
* @type {string}
* @readonly
*/
physicalPath;
/**
* The file contents.
* @type {string|Uint8Array}
* @readonly
*/
body;
/**
* The raw body of the file, including a BOM if present.
* @type {string|Uint8Array}
* @readonly
*/
rawBody;
/**
* Indicates whether the file has a byte order mark (BOM).
* @type {boolean}
* @readonly
*/
bom;
/**
* Creates a new instance.
* @param {string} path The file path.
* @param {string|Uint8Array} body The file contents.
* @param {Object} [options] Additional options.
* @param {string} [options.physicalPath] The file path on disk.
*/
constructor(path, body, { physicalPath } = {}) {
this.path = path;
this.physicalPath = physicalPath ?? path;
this.bom = hasUnicodeBOM(body);
this.body = stripUnicodeBOM(body);
this.rawBody = body;
}
}
module.exports = { VFile };
@@ -0,0 +1,25 @@
'use strict'
let Container = require('./container')
class AtRule extends Container {
constructor(defaults) {
super(defaults)
this.type = 'atrule'
}
append(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.append(...children)
}
prepend(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.prepend(...children)
}
}
module.exports = AtRule
AtRule.default = AtRule
Container.registerAtRule(AtRule)
@@ -0,0 +1 @@
{"name":"@heroui/react-utils","version":"2.1.14","requiresBuild":false,"files":{"dist/context.js":{"checkedAt":1794532104186,"integrity":"sha512-v/zuJzqyOw3ubEt3vnjvP3GoxdYQTam55tsprqGYuhnVUkdYJo4p2JXUSG4Wyxi02a5nsH1ZugMvR9gBCD633A==","mode":420,"size":2392},"dist/dimensions.js":{"checkedAt":1794532104186,"integrity":"sha512-NyInfD7mMEmpYhzlyFcN7dS+vyJMi0hDssvgKv7j+y4/AzMIJLbSPmBF4jyRd3JOKkIRoR8CtAkPycwQ1EaCfg==","mode":420,"size":1753},"dist/dom.js":{"checkedAt":1794532104186,"integrity":"sha512-pkuqbtO9+QXjuVHSg7nOrd9MxfMy/wsr7uBcVs2O8tSswAEzxXui1PK8xElpfOJ6/+GAQ14TkvwYWCOx18ceGw==","mode":420,"size":5053},"dist/index.js":{"checkedAt":1794532104186,"integrity":"sha512-KJymA60pIyQao7VYHSsKltEPlzSqWBdZYy+Cgo+U3ydsmOiVhil9SOlOZp8xUKfjqhAWU05lS3rpRLmkffIfyA==","mode":420,"size":8549},"dist/refs.js":{"checkedAt":1794532104186,"integrity":"sha512-/dG1WkCOYEZe1Pb/mi/0zO1bzUEIE8qlGRZ8tCQNfSk4vhZQoH6NW2KAld4CmgZGk0Ur2TeNK9g6qZy5VMrw6g==","mode":420,"size":1531},"dist/use-is-hydrated.js":{"checkedAt":1794532104186,"integrity":"sha512-xRtMxiep89Nm1qWWLqn34lzTO+KmsQaKpa06rjbBy6s/kqEGB95cI3OZUsrNsMpgX1V6eBw2WAQdym3+Lav1DA==","mode":420,"size":1907},"package.json":{"checkedAt":1794532104187,"integrity":"sha512-LHY1jAii5CC0jOAi1S482va54O8Nuj4nl20wTwdaw05ikM2TarbZxbVXgnAhI7m812e3PMvcauKuODEaoRGOEw==","mode":420,"size":1269},"README.md":{"checkedAt":1794532104187,"integrity":"sha512-pDAVygGLxBfpTPjKwBDk/RrucObE8yzZkLFlmRJL5g15i2vH6jzJJLKVtObQXU8tl64X66edHtq2LGFuqJcbig==","mode":420,"size":488},"dist/chunk-3XT5V4LF.mjs":{"checkedAt":1794532104187,"integrity":"sha512-WsGFGGqJUVIhQXYBYYsfkBht+p/jxaZ4sIdbnHJgoAKXWIoxv4wqMzpJNcLlPu1TUZ6Z1YvbcAtIHEJUk6WNoA==","mode":420,"size":785},"dist/chunk-6UBKM7F3.mjs":{"checkedAt":1794532104187,"integrity":"sha512-JhpanXqNNE+iq6VfiQDGqemH5E+40Q94EJ8cKMauEbpb5v69Af2M+k6OoaWcy+Iu68LAonRV6RzEAYddnOXr2A==","mode":420,"size":259},"dist/chunk-BDGLNRCW.mjs":{"checkedAt":1794532104187,"integrity":"sha512-Wy36ZNgkW/HPY0Iwly9/nPkmc0rWuCnAphYYejS5FZQfDZ0qjb0giR95qkAx1MjMpx59S1i72/q/cZTbfWpMCA==","mode":420,"size":3492},"dist/chunk-LGMZDQT5.mjs":{"checkedAt":1794532104187,"integrity":"sha512-slXCToBwRvVGyBOKXJ+2CzQ+gkqyKWCbfESCSnitzhNwPGhXLuKgVGwj/B8kmoedJ0U0+EnrMb1W/chiH+xZ4A==","mode":420,"size":465},"dist/chunk-VKMEMDAU.mjs":{"checkedAt":1794532104187,"integrity":"sha512-KRJeiA0iov7frwI3nxH7lO1G3PTJQF7O5lId4o0MpzVCKcrm46ZDSY3BxDY4uHabIP5kCePgBYS+TKals0D0Jw==","mode":420,"size":686},"dist/context.mjs":{"checkedAt":1794532104187,"integrity":"sha512-8Rshh1wTXb/+T+j+eJClaBpkxQVvcDfud52MAvNUZBHoablrVqopEH3NvpfA9oeKN9gsrGYY3alI2CaWlfFbxA==","mode":420,"size":98},"dist/dimensions.mjs":{"checkedAt":1794532104187,"integrity":"sha512-x7Aoq9E7UN6ZIwsia27Tyd9STgmDZZ1J88VvAHNfDNJoGKBF+57Pq0gjf/2egDcVAF9TasVMwPCFGdePHlzryg==","mode":420,"size":132},"dist/dom.mjs":{"checkedAt":1794532104188,"integrity":"sha512-GxclX7Vx0A6MW+KCC6z5nPS6zMCZSpW3dtvzUv4nBpVq/UYSjx9wJfuT3SRVV7kr15rJXWkscxOdpSS1vnFZwg==","mode":420,"size":542},"dist/index.mjs":{"checkedAt":1794532104188,"integrity":"sha512-DCHlEGYZKlGGjf+G24DI4W367vEyWLHk7Lk6rf9ZDXiUevb/LOM1hcS8ip1N8KzgcHLnSiybW/8HBmSyCOn8hg==","mode":420,"size":1143},"dist/refs.mjs":{"checkedAt":1794532104188,"integrity":"sha512-SbWvihcwhQm8Gk8/SJL6ACy7aygC+8SbiwbeqzuxHVg3tGDA2Z4eBz0twLu5cmNL0xNoNbVUEnU3CvpbwjhnMw==","mode":420,"size":116},"dist/use-is-hydrated.mjs":{"checkedAt":1794532104188,"integrity":"sha512-VGpDii9dqcPODF3qGml9ByWFj8olUoJsKl5cMXqrqjbluqmImmc5j11HpcvjJ4qAhu0U9B5Sd7nwylAjGlSZiA==","mode":420,"size":98},"dist/context.d.mts":{"checkedAt":1794532104188,"integrity":"sha512-sQRSWaXM479cHuv30ar808pmUaMTYd3Jh+ZI+/4Xl0pSjFH4oROFAiZk89yrZdfSMH9ynoerBsrRjuRS7XAHNA==","mode":420,"size":816},"dist/dimensions.d.mts":{"checkedAt":1794532104188,"integrity":"sha512-66xjfa7Wedbz3TLfbY6fQYTM7oQlnyZCMzdWUIhZYFgc9n+yXD+36Y35Tl3dBvsePx2/Ki4IqtpEzUsJ4XSe3Q==","mode":420,"size":260},"dist/dom.d.mts":{"checkedAt":1794532104188,"integrity":"sha512-aWy/s2pCOZK+o/qxM+9DLPNiFIwx8SE/w22MT9k8M8dmHvrmnBNNPT8i4P1yI7Te0/pCvf82TXW3PqF223i3Ig==","mode":420,"size":2281},"dist/index.d.mts":{"checkedAt":1794532104189,"integrity":"sha512-Ie7qC7xVhPrdscYqz5vZOlEyUFnX6BcAfF6W3zhHQrMAlH3c2gC1m+mEJF4aKFSEQKJyCMA5u3VGz6V8AuqSxQ==","mode":420,"size":762},"dist/refs.d.mts":{"checkedAt":1794532104189,"integrity":"sha512-EDY/fjoUlm6HoGf7Sak6n4ZBzAu5nybyRQ8KwJ397CSsGUzSTjh2X3fUQ5uqUlUC8wvgSGFQmgteAXb716e76Q==","mode":420,"size":668},"dist/use-is-hydrated.d.mts":{"checkedAt":1794532104189,"integrity":"sha512-N56IzyRMpBz7IaXNnmJ/wIVRtXliqPYoJCkqrJLOR29+Ajz+YyBO4DhOumHZ8MTfPWkuuqvFyFd3W+6SFUVv1A==","mode":420,"size":485},"dist/context.d.ts":{"checkedAt":1794532104188,"integrity":"sha512-sQRSWaXM479cHuv30ar808pmUaMTYd3Jh+ZI+/4Xl0pSjFH4oROFAiZk89yrZdfSMH9ynoerBsrRjuRS7XAHNA==","mode":420,"size":816},"dist/dimensions.d.ts":{"checkedAt":1794532104188,"integrity":"sha512-66xjfa7Wedbz3TLfbY6fQYTM7oQlnyZCMzdWUIhZYFgc9n+yXD+36Y35Tl3dBvsePx2/Ki4IqtpEzUsJ4XSe3Q==","mode":420,"size":260},"dist/dom.d.ts":{"checkedAt":17945321Line truncated
@@ -0,0 +1,32 @@
import type CJSImportProcessor from "../CJSImportProcessor";
import type NameManager from "../NameManager";
import type TokenProcessor from "../TokenProcessor";
import type RootTransformer from "./RootTransformer";
import Transformer from "./Transformer";
/**
* Implementation of babel-plugin-jest-hoist, which hoists up some jest method
* calls above the imports to allow them to override other imports.
*
* To preserve line numbers, rather than directly moving the jest.mock code, we
* wrap each invocation in a function statement and then call the function from
* the top of the file.
*/
export default class JestHoistTransformer extends Transformer {
readonly rootTransformer: RootTransformer;
readonly tokens: TokenProcessor;
readonly nameManager: NameManager;
readonly importProcessor: CJSImportProcessor | null;
private readonly hoistedFunctionNames;
constructor(rootTransformer: RootTransformer, tokens: TokenProcessor, nameManager: NameManager, importProcessor: CJSImportProcessor | null);
process(): boolean;
getHoistedCode(): string;
/**
* Extracts any methods calls on the jest-object that should be hoisted.
*
* According to the jest docs, https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options,
* mock, unmock, enableAutomock, disableAutomock, are the methods that should be hoisted.
*
* We do not apply the same checks of the arguments as babel-plugin-jest-hoist does.
*/
private extractHoistedCalls;
}
@@ -0,0 +1 @@
{"version":3,"file":"SingleImmutableLinkedList.spec.d.ts","sourceRoot":"","sources":["../../../../src/common/models/SingleImmutableLinkedList.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,244 @@
// @flow
import createGridComponent from './createGridComponent';
import type { Props, ScrollToAlign } from './createGridComponent';
const FixedSizeGrid = createGridComponent({
getColumnOffset: ({ columnWidth }: Props<any>, index: number): number =>
index * ((columnWidth: any): number),
getColumnWidth: ({ columnWidth }: Props<any>, index: number): number =>
((columnWidth: any): number),
getRowOffset: ({ rowHeight }: Props<any>, index: number): number =>
index * ((rowHeight: any): number),
getRowHeight: ({ rowHeight }: Props<any>, index: number): number =>
((rowHeight: any): number),
getEstimatedTotalHeight: ({ rowCount, rowHeight }: Props<any>) =>
((rowHeight: any): number) * rowCount,
getEstimatedTotalWidth: ({ columnCount, columnWidth }: Props<any>) =>
((columnWidth: any): number) * columnCount,
getOffsetForColumnAndAlignment: (
{ columnCount, columnWidth, width }: Props<any>,
columnIndex: number,
align: ScrollToAlign,
scrollLeft: number,
instanceProps: typeof undefined,
scrollbarSize: number
): number => {
const lastColumnOffset = Math.max(
0,
columnCount * ((columnWidth: any): number) - width
);
const maxOffset = Math.min(
lastColumnOffset,
columnIndex * ((columnWidth: any): number)
);
const minOffset = Math.max(
0,
columnIndex * ((columnWidth: any): number) -
width +
scrollbarSize +
((columnWidth: any): number)
);
if (align === 'smart') {
if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {
align = 'auto';
} else {
align = 'center';
}
}
switch (align) {
case 'start':
return maxOffset;
case 'end':
return minOffset;
case 'center':
// "Centered" offset is usually the average of the min and max.
// But near the edges of the list, this doesn't hold true.
const middleOffset = Math.round(
minOffset + (maxOffset - minOffset) / 2
);
if (middleOffset < Math.ceil(width / 2)) {
return 0; // near the beginning
} else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {
return lastColumnOffset; // near the end
} else {
return middleOffset;
}
case 'auto':
default:
if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
return scrollLeft;
} else if (minOffset > maxOffset) {
// Because we only take into account the scrollbar size when calculating minOffset
// this value can be larger than maxOffset when at the end of the list
return minOffset;
} else if (scrollLeft < minOffset) {
return minOffset;
} else {
return maxOffset;
}
}
},
getOffsetForRowAndAlignment: (
{ rowHeight, height, rowCount }: Props<any>,
rowIndex: number,
align: ScrollToAlign,
scrollTop: number,
instanceProps: typeof undefined,
scrollbarSize: number
): number => {
const lastRowOffset = Math.max(
0,
rowCount * ((rowHeight: any): number) - height
);
const maxOffset = Math.min(
lastRowOffset,
rowIndex * ((rowHeight: any): number)
);
const minOffset = Math.max(
0,
rowIndex * ((rowHeight: any): number) -
height +
scrollbarSize +
((rowHeight: any): number)
);
if (align === 'smart') {
if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {
align = 'auto';
} else {
align = 'center';
}
}
switch (align) {
case 'start':
return maxOffset;
case 'end':
return minOffset;
case 'center':
// "Centered" offset is usually the average of the min and max.
// But near the edges of the list, this doesn't hold true.
const middleOffset = Math.round(
minOffset + (maxOffset - minOffset) / 2
);
if (middleOffset < Math.ceil(height / 2)) {
return 0; // near the beginning
} else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {
return lastRowOffset; // near the end
} else {
return middleOffset;
}
case 'auto':
default:
if (scrollTop >= minOffset && scrollTop <= maxOffset) {
return scrollTop;
} else if (minOffset > maxOffset) {
// Because we only take into account the scrollbar size when calculating minOffset
// this value can be larger than maxOffset when at the end of the list
return minOffset;
} else if (scrollTop < minOffset) {
return minOffset;
} else {
return maxOffset;
}
}
},
getColumnStartIndexForOffset: (
{ columnWidth, columnCount }: Props<any>,
scrollLeft: number
): number =>
Math.max(
0,
Math.min(
columnCount - 1,
Math.floor(scrollLeft / ((columnWidth: any): number))
)
),
getColumnStopIndexForStartIndex: (
{ columnWidth, columnCount, width }: Props<any>,
startIndex: number,
scrollLeft: number
): number => {
const left = startIndex * ((columnWidth: any): number);
const numVisibleColumns = Math.ceil(
(width + scrollLeft - left) / ((columnWidth: any): number)
);
return Math.max(
0,
Math.min(
columnCount - 1,
startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive
)
);
},
getRowStartIndexForOffset: (
{ rowHeight, rowCount }: Props<any>,
scrollTop: number
): number =>
Math.max(
0,
Math.min(rowCount - 1, Math.floor(scrollTop / ((rowHeight: any): number)))
),
getRowStopIndexForStartIndex: (
{ rowHeight, rowCount, height }: Props<any>,
startIndex: number,
scrollTop: number
): number => {
const top = startIndex * ((rowHeight: any): number);
const numVisibleRows = Math.ceil(
(height + scrollTop - top) / ((rowHeight: any): number)
);
return Math.max(
0,
Math.min(
rowCount - 1,
startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive
)
);
},
initInstanceProps(props: Props<any>): any {
// Noop
},
shouldResetStyleCacheOnItemSizeChange: true,
validateProps: ({ columnWidth, rowHeight }: Props<any>): void => {
if (process.env.NODE_ENV !== 'production') {
if (typeof columnWidth !== 'number') {
throw Error(
'An invalid "columnWidth" prop has been specified. ' +
'Value should be a number. ' +
`"${
columnWidth === null ? 'null' : typeof columnWidth
}" was specified.`
);
}
if (typeof rowHeight !== 'number') {
throw Error(
'An invalid "rowHeight" prop has been specified. ' +
'Value should be a number. ' +
`"${rowHeight === null ? 'null' : typeof rowHeight}" was specified.`
);
}
}
},
});
export default FixedSizeGrid;
@@ -0,0 +1,235 @@
import * as ValueGuard from './value.mjs';
import { Kind, Hint, TransformKind, ReadonlyKind, OptionalKind } from '../symbols/index.mjs';
/** `[Kind-Only]` Returns true if this value has a Readonly symbol */
export function IsReadonly(value) {
return ValueGuard.IsObject(value) && value[ReadonlyKind] === 'Readonly';
}
/** `[Kind-Only]` Returns true if this value has a Optional symbol */
export function IsOptional(value) {
return ValueGuard.IsObject(value) && value[OptionalKind] === 'Optional';
}
/** `[Kind-Only]` Returns true if the given value is TAny */
export function IsAny(value) {
return IsKindOf(value, 'Any');
}
/** `[Kind-Only]` Returns true if the given value is TArgument */
export function IsArgument(value) {
return IsKindOf(value, 'Argument');
}
/** `[Kind-Only]` Returns true if the given value is TArray */
export function IsArray(value) {
return IsKindOf(value, 'Array');
}
/** `[Kind-Only]` Returns true if the given value is TAsyncIterator */
export function IsAsyncIterator(value) {
return IsKindOf(value, 'AsyncIterator');
}
/** `[Kind-Only]` Returns true if the given value is TBigInt */
export function IsBigInt(value) {
return IsKindOf(value, 'BigInt');
}
/** `[Kind-Only]` Returns true if the given value is TBoolean */
export function IsBoolean(value) {
return IsKindOf(value, 'Boolean');
}
/** `[Kind-Only]` Returns true if the given value is TComputed */
export function IsComputed(value) {
return IsKindOf(value, 'Computed');
}
/** `[Kind-Only]` Returns true if the given value is TConstructor */
export function IsConstructor(value) {
return IsKindOf(value, 'Constructor');
}
/** `[Kind-Only]` Returns true if the given value is TDate */
export function IsDate(value) {
return IsKindOf(value, 'Date');
}
/** `[Kind-Only]` Returns true if the given value is TFunction */
export function IsFunction(value) {
return IsKindOf(value, 'Function');
}
/** `[Kind-Only]` Returns true if the given value is TInteger */
export function IsImport(value) {
return IsKindOf(value, 'Import');
}
/** `[Kind-Only]` Returns true if the given value is TInteger */
export function IsInteger(value) {
return IsKindOf(value, 'Integer');
}
/** `[Kind-Only]` Returns true if the given schema is TProperties */
export function IsProperties(value) {
return ValueGuard.IsObject(value);
}
/** `[Kind-Only]` Returns true if the given value is TIntersect */
export function IsIntersect(value) {
return IsKindOf(value, 'Intersect');
}
/** `[Kind-Only]` Returns true if the given value is TIterator */
export function IsIterator(value) {
return IsKindOf(value, 'Iterator');
}
/** `[Kind-Only]` Returns true if the given value is a TKind with the given name. */
export function IsKindOf(value, kind) {
return ValueGuard.IsObject(value) && Kind in value && value[Kind] === kind;
}
/** `[Kind-Only]` Returns true if the given value is TLiteral<string> */
export function IsLiteralString(value) {
return IsLiteral(value) && ValueGuard.IsString(value.const);
}
/** `[Kind-Only]` Returns true if the given value is TLiteral<number> */
export function IsLiteralNumber(value) {
return IsLiteral(value) && ValueGuard.IsNumber(value.const);
}
/** `[Kind-Only]` Returns true if the given value is TLiteral<boolean> */
export function IsLiteralBoolean(value) {
return IsLiteral(value) && ValueGuard.IsBoolean(value.const);
}
/** `[Kind-Only]` Returns true if the given value is TLiteralValue */
export function IsLiteralValue(value) {
return ValueGuard.IsBoolean(value) || ValueGuard.IsNumber(value) || ValueGuard.IsString(value);
}
/** `[Kind-Only]` Returns true if the given value is TLiteral */
export function IsLiteral(value) {
return IsKindOf(value, 'Literal');
}
/** `[Kind-Only]` Returns true if the given value is a TMappedKey */
export function IsMappedKey(value) {
return IsKindOf(value, 'MappedKey');
}
/** `[Kind-Only]` Returns true if the given value is TMappedResult */
export function IsMappedResult(value) {
return IsKindOf(value, 'MappedResult');
}
/** `[Kind-Only]` Returns true if the given value is TNever */
export function IsNever(value) {
return IsKindOf(value, 'Never');
}
/** `[Kind-Only]` Returns true if the given value is TNot */
export function IsNot(value) {
return IsKindOf(value, 'Not');
}
/** `[Kind-Only]` Returns true if the given value is TNull */
export function IsNull(value) {
return IsKindOf(value, 'Null');
}
/** `[Kind-Only]` Returns true if the given value is TNumber */
export function IsNumber(value) {
return IsKindOf(value, 'Number');
}
/** `[Kind-Only]` Returns true if the given value is TObject */
export function IsObject(value) {
return IsKindOf(value, 'Object');
}
/** `[Kind-Only]` Returns true if the given value is TPromise */
export function IsPromise(value) {
return IsKindOf(value, 'Promise');
}
/** `[Kind-Only]` Returns true if the given value is TRecord */
export function IsRecord(value) {
return IsKindOf(value, 'Record');
}
/** `[Kind-Only]` Returns true if this value is TRecursive */
export function IsRecursive(value) {
return ValueGuard.IsObject(value) && Hint in value && value[Hint] === 'Recursive';
}
/** `[Kind-Only]` Returns true if the given value is TRef */
export function IsRef(value) {
return IsKindOf(value, 'Ref');
}
/** `[Kind-Only]` Returns true if the given value is TRegExp */
export function IsRegExp(value) {
return IsKindOf(value, 'RegExp');
}
/** `[Kind-Only]` Returns true if the given value is TString */
export function IsString(value) {
return IsKindOf(value, 'String');
}
/** `[Kind-Only]` Returns true if the given value is TSymbol */
export function IsSymbol(value) {
return IsKindOf(value, 'Symbol');
}
/** `[Kind-Only]` Returns true if the given value is TTemplateLiteral */
export function IsTemplateLiteral(value) {
return IsKindOf(value, 'TemplateLiteral');
}
/** `[Kind-Only]` Returns true if the given value is TThis */
export function IsThis(value) {
return IsKindOf(value, 'This');
}
/** `[Kind-Only]` Returns true of this value is TTransform */
export function IsTransform(value) {
return ValueGuard.IsObject(value) && TransformKind in value;
}
/** `[Kind-Only]` Returns true if the given value is TTuple */
export function IsTuple(value) {
return IsKindOf(value, 'Tuple');
}
/** `[Kind-Only]` Returns true if the given value is TUndefined */
export function IsUndefined(value) {
return IsKindOf(value, 'Undefined');
}
/** `[Kind-Only]` Returns true if the given value is TUnion */
export function IsUnion(value) {
return IsKindOf(value, 'Union');
}
/** `[Kind-Only]` Returns true if the given value is TUint8Array */
export function IsUint8Array(value) {
return IsKindOf(value, 'Uint8Array');
}
/** `[Kind-Only]` Returns true if the given value is TUnknown */
export function IsUnknown(value) {
return IsKindOf(value, 'Unknown');
}
/** `[Kind-Only]` Returns true if the given value is a raw TUnsafe */
export function IsUnsafe(value) {
return IsKindOf(value, 'Unsafe');
}
/** `[Kind-Only]` Returns true if the given value is TVoid */
export function IsVoid(value) {
return IsKindOf(value, 'Void');
}
/** `[Kind-Only]` Returns true if the given value is TKind */
export function IsKind(value) {
return ValueGuard.IsObject(value) && Kind in value && ValueGuard.IsString(value[Kind]);
}
/** `[Kind-Only]` Returns true if the given value is TSchema */
export function IsSchema(value) {
// prettier-ignore
return (IsAny(value) ||
IsArgument(value) ||
IsArray(value) ||
IsBoolean(value) ||
IsBigInt(value) ||
IsAsyncIterator(value) ||
IsComputed(value) ||
IsConstructor(value) ||
IsDate(value) ||
IsFunction(value) ||
IsInteger(value) ||
IsIntersect(value) ||
IsIterator(value) ||
IsLiteral(value) ||
IsMappedKey(value) ||
IsMappedResult(value) ||
IsNever(value) ||
IsNot(value) ||
IsNull(value) ||
IsNumber(value) ||
IsObject(value) ||
IsPromise(value) ||
IsRecord(value) ||
IsRef(value) ||
IsRegExp(value) ||
IsString(value) ||
IsSymbol(value) ||
IsTemplateLiteral(value) ||
IsThis(value) ||
IsTuple(value) ||
IsUndefined(value) ||
IsUnion(value) ||
IsUint8Array(value) ||
IsUnknown(value) ||
IsUnsafe(value) ||
IsVoid(value) ||
IsKind(value));
}
@@ -0,0 +1,285 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { RenderDebouncer } from 'browser/RenderDebouncer';
import { IRenderDebouncerWithCallback } from 'browser/Types';
import { IRenderDimensions, IRenderer } from 'browser/renderer/shared/Types';
import { ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
import { EventEmitter } from 'common/EventEmitter';
import { Disposable, MutableDisposable, toDisposable } from 'common/Lifecycle';
import { DebouncedIdleTask } from 'common/TaskQueue';
import { IBufferService, IDecorationService, IOptionsService } from 'common/services/Services';
interface ISelectionState {
start: [number, number] | undefined;
end: [number, number] | undefined;
columnSelectMode: boolean;
}
export class RenderService extends Disposable implements IRenderService {
public serviceBrand: undefined;
private _renderer: MutableDisposable<IRenderer> = this.register(new MutableDisposable());
private _renderDebouncer: IRenderDebouncerWithCallback;
private _pausedResizeTask = new DebouncedIdleTask();
private _observerDisposable = this.register(new MutableDisposable());
private _isPaused: boolean = false;
private _needsFullRefresh: boolean = false;
private _isNextRenderRedrawOnly: boolean = true;
private _needsSelectionRefresh: boolean = false;
private _canvasWidth: number = 0;
private _canvasHeight: number = 0;
private _selectionState: ISelectionState = {
start: undefined,
end: undefined,
columnSelectMode: false
};
private readonly _onDimensionsChange = this.register(new EventEmitter<IRenderDimensions>());
public readonly onDimensionsChange = this._onDimensionsChange.event;
private readonly _onRenderedViewportChange = this.register(new EventEmitter<{ start: number, end: number }>());
public readonly onRenderedViewportChange = this._onRenderedViewportChange.event;
private readonly _onRender = this.register(new EventEmitter<{ start: number, end: number }>());
public readonly onRender = this._onRender.event;
private readonly _onRefreshRequest = this.register(new EventEmitter<{ start: number, end: number }>());
public readonly onRefreshRequest = this._onRefreshRequest.event;
public get dimensions(): IRenderDimensions { return this._renderer.value!.dimensions; }
constructor(
private _rowCount: number,
screenElement: HTMLElement,
@IOptionsService optionsService: IOptionsService,
@ICharSizeService private readonly _charSizeService: ICharSizeService,
@IDecorationService decorationService: IDecorationService,
@IBufferService bufferService: IBufferService,
@ICoreBrowserService coreBrowserService: ICoreBrowserService,
@IThemeService themeService: IThemeService
) {
super();
this._renderDebouncer = new RenderDebouncer((start, end) => this._renderRows(start, end), coreBrowserService);
this.register(this._renderDebouncer);
this.register(coreBrowserService.onDprChange(() => this.handleDevicePixelRatioChange()));
this.register(bufferService.onResize(() => this._fullRefresh()));
this.register(bufferService.buffers.onBufferActivate(() => this._renderer.value?.clear()));
this.register(optionsService.onOptionChange(() => this._handleOptionsChanged()));
this.register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged()));
// Do a full refresh whenever any decoration is added or removed. This may not actually result
// in changes but since decorations should be used sparingly or added/removed all in the same
// frame this should have minimal performance impact.
this.register(decorationService.onDecorationRegistered(() => this._fullRefresh()));
this.register(decorationService.onDecorationRemoved(() => this._fullRefresh()));
// Clear the renderer when the a change that could affect glyphs occurs
this.register(optionsService.onMultipleOptionChange([
'customGlyphs',
'drawBoldTextInBrightColors',
'letterSpacing',
'lineHeight',
'fontFamily',
'fontSize',
'fontWeight',
'fontWeightBold',
'minimumContrastRatio',
'rescaleOverlappingGlyphs'
], () => {
this.clear();
this.handleResize(bufferService.cols, bufferService.rows);
this._fullRefresh();
}));
// Refresh the cursor line when the cursor changes
this.register(optionsService.onMultipleOptionChange([
'cursorBlink',
'cursorStyle'
], () => this.refreshRows(bufferService.buffer.y, bufferService.buffer.y, true)));
this.register(themeService.onChangeColors(() => this._fullRefresh()));
this._registerIntersectionObserver(coreBrowserService.window, screenElement);
this.register(coreBrowserService.onWindowChange((w) => this._registerIntersectionObserver(w, screenElement)));
}
private _registerIntersectionObserver(w: Window & typeof globalThis, screenElement: HTMLElement): void {
// Detect whether IntersectionObserver is detected and enable renderer pause
// and resume based on terminal visibility if so
if ('IntersectionObserver' in w) {
const observer = new w.IntersectionObserver(e => this._handleIntersectionChange(e[e.length - 1]), { threshold: 0 });
observer.observe(screenElement);
this._observerDisposable.value = toDisposable(() => observer.disconnect());
}
}
private _handleIntersectionChange(entry: IntersectionObserverEntry): void {
this._isPaused = entry.isIntersecting === undefined ? (entry.intersectionRatio === 0) : !entry.isIntersecting;
// Terminal was hidden on open
if (!this._isPaused && !this._charSizeService.hasValidSize) {
this._charSizeService.measure();
}
if (!this._isPaused && this._needsFullRefresh) {
this._pausedResizeTask.flush();
this.refreshRows(0, this._rowCount - 1);
this._needsFullRefresh = false;
}
}
public refreshRows(start: number, end: number, isRedrawOnly: boolean = false): void {
if (this._isPaused) {
this._needsFullRefresh = true;
return;
}
if (!isRedrawOnly) {
this._isNextRenderRedrawOnly = false;
}
this._renderDebouncer.refresh(start, end, this._rowCount);
}
private _renderRows(start: number, end: number): void {
if (!this._renderer.value) {
return;
}
// Since this is debounced, a resize event could have happened between the time a refresh was
// requested and when this triggers. Clamp the values of start and end to ensure they're valid
// given the current viewport state.
start = Math.min(start, this._rowCount - 1);
end = Math.min(end, this._rowCount - 1);
// Render
this._renderer.value.renderRows(start, end);
// Update selection if needed
if (this._needsSelectionRefresh) {
this._renderer.value.handleSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode);
this._needsSelectionRefresh = false;
}
// Fire render event only if it was not a redraw
if (!this._isNextRenderRedrawOnly) {
this._onRenderedViewportChange.fire({ start, end });
}
this._onRender.fire({ start, end });
this._isNextRenderRedrawOnly = true;
}
public resize(cols: number, rows: number): void {
this._rowCount = rows;
this._fireOnCanvasResize();
}
private _handleOptionsChanged(): void {
if (!this._renderer.value) {
return;
}
this.refreshRows(0, this._rowCount - 1);
this._fireOnCanvasResize();
}
private _fireOnCanvasResize(): void {
if (!this._renderer.value) {
return;
}
// Don't fire the event if the dimensions haven't changed
if (this._renderer.value.dimensions.css.canvas.width === this._canvasWidth && this._renderer.value.dimensions.css.canvas.height === this._canvasHeight) {
return;
}
this._onDimensionsChange.fire(this._renderer.value.dimensions);
}
public hasRenderer(): boolean {
return !!this._renderer.value;
}
public setRenderer(renderer: IRenderer): void {
this._renderer.value = renderer;
// If the value was not set, the terminal is being disposed so ignore it
if (this._renderer.value) {
this._renderer.value.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));
// Force a refresh
this._needsSelectionRefresh = true;
this._fullRefresh();
}
}
public addRefreshCallback(callback: FrameRequestCallback): number {
return this._renderDebouncer.addRefreshCallback(callback);
}
private _fullRefresh(): void {
if (this._isPaused) {
this._needsFullRefresh = true;
} else {
this.refreshRows(0, this._rowCount - 1);
}
}
public clearTextureAtlas(): void {
if (!this._renderer.value) {
return;
}
this._renderer.value.clearTextureAtlas?.();
this._fullRefresh();
}
public handleDevicePixelRatioChange(): void {
// Force char size measurement as DomMeasureStrategy(getBoundingClientRect) is not stable
// when devicePixelRatio changes
this._charSizeService.measure();
if (!this._renderer.value) {
return;
}
this._renderer.value.handleDevicePixelRatioChange();
this.refreshRows(0, this._rowCount - 1);
}
public handleResize(cols: number, rows: number): void {
if (!this._renderer.value) {
return;
}
if (this._isPaused) {
this._pausedResizeTask.set(() => this._renderer.value?.handleResize(cols, rows));
} else {
this._renderer.value.handleResize(cols, rows);
}
this._fullRefresh();
}
// TODO: Is this useful when we have onResize?
public handleCharSizeChanged(): void {
this._renderer.value?.handleCharSizeChanged();
}
public handleBlur(): void {
this._renderer.value?.handleBlur();
}
public handleFocus(): void {
this._renderer.value?.handleFocus();
}
public handleSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {
this._selectionState.start = start;
this._selectionState.end = end;
this._selectionState.columnSelectMode = columnSelectMode;
this._renderer.value?.handleSelectionChanged(start, end, columnSelectMode);
}
public handleCursorMove(): void {
this._renderer.value?.handleCursorMove();
}
public clear(): void {
this._renderer.value?.clear();
}
}
@@ -0,0 +1 @@
export declare function isTouchEvent(event: Event | undefined | null): event is TouchEvent;
@@ -0,0 +1,834 @@
export default `flf2a$ 8 8 13 0 16 0 16255 0
Author : myflix
Date : 2004/9/26 12:32:07
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
,---. #
| | #
| | #
| | #
| .' #
\`--' #
.--. #
\`--' ##
#
,--.,--. #
\\ |\\ | #
\`-' \`-' #
#
#
#
##
#
#
,-.,-. #
,-| || |-. #
,-| || |-. #
'-| || |-' #
\`-'\`-' #
##
,-. #
.-|-|-. #
| | |_| #
\`-|.| '. #
.-| | | #
| |-| / #
\`|-|'' #
\`-' ##
,-. #
,-. / / #
'-'/ / #
/ / #
/ / #
/ /,-. #
/ / '-' #
\`-' ##
#
.---. #
/ .-. \\ #
\\ '-' ,-. #
/ /'. / #
\\ '-' .__) #
\`---' #
##
#
,--. #
\\ | #
\`-' #
#
#
#
##
,-. #
/ | #
' .' #
| | #
| | #
' '. #
\\ | #
\`-' ##
,-. #
| \\ #
'. ' #
| | #
| | #
.' ' #
| / #
\`-' ##
#
_ #
.-,| |,-. #
_\\ ' ' /_ #
(__ __)#
/ . . \\ #
\`-'|_|\`-' #
##
#
#
,-. #
,-| |-. #
'-| |-' #
\`-' #
#
##
#
#
#
#
#
#
,-. #
'./ ##
#
#
(\`-') #
( OO).-> #
(,------. #
\`------' #
#
##
#
#
#
#
#
#
,-. #
'-' ##
,-. #
/ / #
/ / #
/ / #
/ / #
/ / #
/ / #
\`-' ##
#
#
.----. #
/ .. \\ #
| / \\ . #
' \\ / ' #
\\ \`' / #
\`---'' ##
#
#
.--. #
/_ | #
| | #
| | #
| | #
\`--' ##
#
#
.----. #
\\_,-. | #
.' .' #
.' /_ #
| | #
\`------' ##
#
#
.----. #
\\_.-, | #
|_ < #
.-. \\ | #
\\ \`-' / #
\`---'' ##
#
#
.---. #
/ . | #
/ /| | #
/ '-' || #
\`---| |' #
\`--' ##
#
#
.-----. #
| __| #
\`--. '. #
.- | | #
| \`-' / #
\`---'' ##
#
#
,--. #
/ .' #
. / -. #
' .-. \\ #
\\ \`-' / #
\`----' ##
#
#
.-------. #
| _ ' #
\`-' / / #
. / #
/ / #
\`--' ##
#
#
.----. #
/ .-. \\ #
\\ '-' / #
/ /\`. \\ #
\\ '-' / #
\`---'' ##
#
#
.----. #
/ ,-. \\ #
\\ '-' . #
\`- / .' #
.' / #
\`--' ##
#
#
,-. #
'-' #
,-. #
'-' #
#
##
#
#
,-. #
'-' #
,-. #
'./ #
#
##
,-. #
/ | #
/ .' #
/ / #
\\ \\ #
\\ '. #
\\ | #
\`-' ##
#
#
,-----. #
'-----' #
,-----. #
'-----' #
#
##
,-. #
| \\ #
'. \\ #
\\ \\ #
/ / #
.' / #
| / #
\`-' ##
,------. #
/ .--. ' #
| | | | #
\`--'__. | #
| .' #
|___| #
.---. #
\`---' ##
#
<-. #
,----.' #
' (\`-')| #
| (OO / #
' '-'\\ #
\`----' #
##
(\`-') _ #
(OO ).-/ #
/ ,---. #
| \\ /\`.\\ #
'-'|_.' | #
(| .-. | #
| | | | #
\`--' \`--' ##
<-.(\`-') #
__( OO) #
'-'---.\\ #
| .-. (/ #
| '-' \`.) #
| /\`'. | #
| '--' / #
\`------' ##
#
_ #
\\-,-----. #
| .--./ #
/_) (\`-') #
|| |OO ) #
(_' '--'\\ #
\`-----' ##
_(\`-') #
( (OO ).-> #
\\ .'_ #
'\`'-..__) #
| | ' | #
| | / : #
| '-' / #
\`------' ##
(\`-') _ #
( OO).-/ #
(,------. #
| .---' #
(| '--. #
| .--' #
| \`---. #
\`------' ##
#
<-. #
(\`-')-----.#
(OO|(_\\---'#
/ | '--. #
\\_) .--' #
\`| |_) #
\`--' ##
#
.-> #
,---(\`-') #
' .-(OO ) #
| | .-, \\ #
| | '.(_/ #
| '-' | #
\`-----' ##
(\`-').-> #
(OO )__ #
,--. ,'-' #
| | | | #
| \`-' | #
| .-. | #
| | | | #
\`--' \`--' ##
_ #
(_) #
,-(\`-') #
| ( OO) #
| | ) #
(| |_/ #
| |'-> #
\`--' ##
#
#
<-.--. #
(\`-'| ,| #
(OO |(_| #
,--. | | #
| '-' / #
\`-----' ##
<-.(\`-') #
__( OO) #
'-'. ,--. #
| .' / #
| /) #
| . ' #
| |\\ \\ #
\`--' '--' ##
#
<-. #
,--. ) #
| (\`-') #
| |OO ) #
(| '__ | #
| |' #
\`-----' ##
<-. (\`-') #
\\(OO )_ #
,--./ ,-.)#
| \`.' |#
| |'.'| |#
| | | |#
| | | |#
\`--' \`--'##
<-. (\`-')_ #
\\( OO) )#
,--./ ,--/ #
| \\ | | #
| . '| |)#
| |\\ | #
| | \\ | #
\`--' \`--' ##
#
.-> #
(\`-')----. #
( OO).-. '#
( _) | | |#
\\| |)| |#
' '-' '#
\`-----' ##
_ (\`-') #
\\-.(OO ) #
_.' \\ #
(_...--'' #
| |_.' | #
| .___.' #
| | #
\`--' ##
<-.(\`-') #
__( OO) #
'-'---\\_) #
| .-. | #
| | | <-' #
| | | | #
' '-' '-.#
\`-----'--'##
(\`-') #
<-.(OO ) #
,------,) #
| /\`. ' #
| |_.' | #
| . .' #
| |\\ \\ #
\`--' '--' ##
(\`-').-> #
( OO)_ #
(_)--\\_) #
/ _ / #
\\_..\`--. #
.-._) \\ #
\\ / #
\`-----' ##
(\`-') #
( OO).-> #
/ '._ #
|'--...__) #
\`--. .--' #
| | #
| | #
\`--' ##
#
.-> #
,--.(,--. #
| | |(\`-')#
| | |(OO )#
| | | | \\#
\\ '-'(_ .'#
\`-----' ##
(\`-')#
_(OO )#
,--.(_/,-.\\#
\\ \\ / (_/#
\\ / / #
_ \\ /_)#
\\-'\\ / #
\`-' ##
.-> #
(\`(\`-')/\`)#
,-\`( OO).',#
| |\\ | |#
| | '.| |#
| |.'.| |#
| ,'. |#
\`--' '--'##
(\`-') #
(OO )_.-> #
(_| \\_)--.#
\\ \`.' / #
\\ .') #
.' \\ #
/ .'. \\ #
\`--' '--'##
#
.-> #
,--.' ,-.#
(\`-')'.' /#
(OO \\ / #
| / /) #
\`-/ /\` #
\`--' ##
(\`-') #
( OO).-> #
,(_/----. #
|__, | #
(_/ / #
.' .'_ #
| | #
\`-------' ##
,----. #
| | #
| .-' #
| | #
| | #
| '-. #
| | #
\`----' ##
,-. #
\\ \\ #
\\ \\ #
\\ \\ #
\\ \\ #
\\ \\ #
\\ \\ #
\`-' ##
,----. #
| | #
\`-. | #
| | #
| | #
.-' | #
| | #
\`----' ##
#
,--. #
/ \\ \\ #
\`--'\`-- #
#
#
#
##
#
#
#
#
(\`-') #
<-.(OO ) #
,------.) #
\`------' ##
#
,--. #
'. \\ #
\`--' #
#
#
#
##
(\`-') _ #
(OO ).-/ #
/ ,---. #
| \\ /\`.\\ #
'-'|_.' | #
(| .-. | #
| | | | #
\`--' \`--' ##
<-.(\`-') #
__( OO) #
'-'---.\\ #
| .-. (/ #
| '-' \`.) #
| /\`'. | #
| '--' / #
\`------' ##
#
_ #
\\-,-----. #
| .--./ #
/_) (\`-') #
|| |OO ) #
(_' '--'\\ #
\`-----' ##
_(\`-') #
( (OO ).-> #
\\ .'_ #
'\`'-..__) #
| | ' | #
| | / : #
| '-' / #
\`------' ##
(\`-') _ #
( OO).-/ #
(,------. #
| .---' #
(| '--. #
| .--' #
| \`---. #
\`------' ##
#
<-. #
(\`-')-----.#
(OO|(_\\---'#
/ | '--. #
\\_) .--' #
\`| |_) #
\`--' ##
#
.-> #
,---(\`-') #
' .-(OO ) #
| | .-, \\ #
| | '.(_/ #
| '-' | #
\`-----' ##
(\`-').-> #
(OO )__ #
,--. ,'-' #
| | | | #
| \`-' | #
| .-. | #
| | | | #
\`--' \`--' ##
_ #
(_) #
,-(\`-') #
| ( OO) #
| | ) #
(| |_/ #
| |'-> #
\`--' ##
#
#
<-.--. #
(\`-'| ,| #
(OO |(_| #
,--. | | #
| '-' / #
\`-----' ##
<-.(\`-') #
__( OO) #
'-'. ,--. #
| .' / #
| /) #
| . ' #
| |\\ \\ #
\`--' '--' ##
#
<-. #
,--. ) #
| (\`-') #
| |OO ) #
(| '__ | #
| |' #
\`-----' ##
<-. (\`-') #
\\(OO )_ #
,--./ ,-.)#
| \`.' |#
| |'.'| |#
| | | |#
| | | |#
\`--' \`--'##
<-. (\`-')_ #
\\( OO) )#
,--./ ,--/ #
| \\ | | #
| . '| |)#
| |\\ | #
| | \\ | #
\`--' \`--' ##
#
.-> #
(\`-')----. #
( OO).-. '#
( _) | | |#
\\| |)| |#
' '-' '#
\`-----' ##
_ (\`-') #
\\-.(OO ) #
_.' \\ #
(_...--'' #
| |_.' | #
| .___.' #
| | #
\`--' ##
<-.(\`-') #
__( OO) #
'-'---\\_) #
| .-. | #
| | | <-' #
| | | | #
' '-' '-.#
\`-----'--'##
(\`-') #
<-.(OO ) #
,------,) #
| /\`. ' #
| |_.' | #
| . .' #
| |\\ \\ #
\`--' '--' ##
(\`-').-> #
( OO)_ #
(_)--\\_) #
/ _ / #
\\_..\`--. #
.-._) \\ #
\\ / #
\`-----' ##
(\`-') #
( OO).-> #
/ '._ #
|'--...__) #
\`--. .--' #
| | #
| | #
\`--' ##
#
.-> #
,--.(,--. #
| | |(\`-')#
| | |(OO )#
| | | | \\#
\\ '-'(_ .'#
\`-----' ##
(\`-')#
_(OO )#
,--.(_/,-.\\#
\\ \\ / (_/#
\\ / / #
_ \\ /_)#
\\-'\\ / #
\`-' ##
.-> #
(\`(\`-')/\`)#
,-\`( OO).',#
| |\\ | |#
| | '.| |#
| |.'.| |#
| ,'. |#
\`--' '--'##
(\`-') #
(OO )_.-> #
(_| \\_)--.#
\\ \`.' / #
\\ .') #
.' \\ #
/ .'. \\ #
\`--' '--'##
#
.-> #
,--.' ,-.#
(\`-')'.' /#
(OO \\ / #
| / /) #
\`-/ /\` #
\`--' ##
(\`-') #
( OO).-> #
,(_/----. #
|__, | #
(_/ / #
.' .'_ #
| | #
\`-------' ##
,--. #
| | #
| .' #
/ / #
\\ \\ #
| '. #
| | #
\`--' ##
,-. #
| | #
| | #
| | #
| | #
| | #
| | #
\`-' ##
,--. #
| | #
'. | #
\\ \\ #
/ / #
.' | #
| | #
\`--' ##
.--, #
.-' / #
/ --\` #
\`--' #
#
#
#
##
(\`-') _ #
(OO ).-/ #
/ ,---. #
| \\ /\`.\\ #
'-'|_.' | #
(| .-. | #
| | | | #
\`--' \`--' ##
#
.-> #
(\`-')----. #
( OO).-. '#
( _) | | |#
\\| |)| |#
' '-' '#
\`-----' ##
#
.-> #
,--.(,--. #
| | |(\`-')#
| | |(OO )#
| | | | \\#
\\ '-'(_ .'#
\`-----' ##
(\`-') _ #
(OO ).-/ #
/ ,---. #
| \\ /\`.\\ #
'-'|_.' | #
(| .-. | #
| | | | #
\`--' \`--' ##
#
.-> #
(\`-')----. #
( OO).-. '#
( _) | | |#
\\| |)| |#
' '-' '#
\`-----' ##
#
.-> #
,--.(,--. #
| | |(\`-')#
| | |(OO )#
| | | | \\#
\\ '-'(_ .'#
\`-----' ##
�#
#
#
#
#
#
#
##
`
@@ -0,0 +1,68 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CreateDataProperty = require('./CreateDataProperty');
var EnumerableOwnNames = require('./EnumerableOwnNames');
var Get = require('./Get');
var IsArray = require('./IsArray');
var ToLength = require('./ToLength');
var ToString = require('./ToString');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/6.0/#sec-internalizejsonproperty
// note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
module.exports = function InternalizeJSONProperty(holder, name, reviver) {
if (!isObject(holder)) {
throw new $TypeError('Assertion failed: `holder` is not an Object');
}
if (typeof name !== 'string') {
throw new $TypeError('Assertion failed: `name` is not a String');
}
if (typeof reviver !== 'function') {
throw new $TypeError('Assertion failed: `reviver` is not a Function');
}
var val = Get(holder, name); // step 1
if (isObject(val)) { // step 3
var isArray = IsArray(val); // step 3.a
if (isArray) { // step 3.c
var I = 0; // step 3.c.i
var len = ToLength(Get(val, 'length')); // step 3.b.ii
while (I < len) { // step 3.b.iv
var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 3.b.iv.1
if (typeof newElement === 'undefined') { // step 3.b.iv.3
delete val[ToString(I)]; // step 3.b.iv.3.a
} else { // step 3.b.iv.4
CreateDataProperty(val, ToString(I), newElement); // step 3.b.iv.4.a
}
I += 1; // step 3.b.iv.6
}
} else {
var keys = EnumerableOwnNames(val); // step 3.d.i
forEach(keys, function (P) { // step 3.d.iii
// eslint-disable-next-line no-shadow
var newElement = InternalizeJSONProperty(val, P, reviver); // step 3.d.iii.1
if (typeof newElement === 'undefined') { // step 3.d.iii.3
delete val[P]; // step 3.d.iii.3.a
} else { // step 3.d.iii.4
CreateDataProperty(val, P, newElement); // step 3.d.iii.4.a
}
});
}
}
return Call(reviver, holder, [name, val]); // step 4
};
@@ -0,0 +1 @@
{"version":3,"file":"injectable.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectable.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromLogicalExpression;
/**
* Extractor function for a LogicalExpression type value node.
* A logical expression is `a && b` or `a || b`, so we evaluate both sides
* and return the extracted value of the expression.
*
* @param - value - AST Value object with type `LogicalExpression`
* @returns - The extracted value converted to correct type.
*/
function extractValueFromLogicalExpression(value) {
// eslint-disable-next-line global-require
var getValue = require('.').default;
var operator = value.operator,
left = value.left,
right = value.right;
var leftVal = getValue(left);
var rightVal = getValue(right);
if (operator === '&&') {
return leftVal && rightVal;
}
if (operator === '??') {
// return leftVal ?? rightVal; // TODO: update to babel 7
return leftVal === null || typeof leftVal === 'undefined' ? rightVal : leftVal;
}
return leftVal || rightVal;
}
@@ -0,0 +1,67 @@
{
"name": "eventemitter3",
"version": "5.0.1",
"description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.mjs",
"require": "./index.js"
},
"./package.json": "./package.json"
},
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"rollup": "rimraf dist umd && rollup -c",
"benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
"test": "c8 --reporter=lcov --reporter=text mocha test/test.js",
"test-esm": "mocha test/test.mjs",
"prepublishOnly": "npm run rollup",
"test-browser": "node test/browser.js"
},
"files": [
"index.js",
"index.mjs",
"index.d.ts",
"dist"
],
"repository": {
"type": "git",
"url": "git://github.com/primus/eventemitter3.git"
},
"keywords": [
"EventEmitter",
"EventEmitter2",
"EventEmitter3",
"Events",
"addEventListener",
"addListener",
"emit",
"emits",
"emitter",
"event",
"once",
"pub/sub",
"publish",
"reactor",
"subscribe"
],
"author": "Arnout Kazemier",
"license": "MIT",
"bugs": {
"url": "https://github.com/primus/eventemitter3/issues"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-terser": "^0.4.0",
"assume": "^2.2.0",
"c8": "^7.3.1",
"mocha": "^10.0.0",
"pre-commit": "^1.2.0",
"rimraf": "^4.1.2",
"rollup": "^3.4.0",
"sauce-browsers": "^3.0.0",
"sauce-test": "^1.3.3"
}
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('unary', require('../unary'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mul = mul;
exports.multiply = multiply;
/**
* @file matrix变换操作
* @author mengke01(kekee000@gmail.com)
*/
/**
* 仿射矩阵相乘
*
* @param {Array=} matrix1 矩阵1
* @param {Array=} matrix2 矩阵2
* @return {Array} 新矩阵
*/
function mul() {
var matrix1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [1, 0, 0, 1];
var matrix2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [1, 0, 0, 1];
// 旋转变换 4 个参数
if (matrix1.length === 4) {
return [matrix1[0] * matrix2[0] + matrix1[2] * matrix2[1], matrix1[1] * matrix2[0] + matrix1[3] * matrix2[1], matrix1[0] * matrix2[2] + matrix1[2] * matrix2[3], matrix1[1] * matrix2[2] + matrix1[3] * matrix2[3]];
}
// 旋转位移变换, 6 个参数
return [matrix1[0] * matrix2[0] + matrix1[2] * matrix2[1], matrix1[1] * matrix2[0] + matrix1[3] * matrix2[1], matrix1[0] * matrix2[2] + matrix1[2] * matrix2[3], matrix1[1] * matrix2[2] + matrix1[3] * matrix2[3], matrix1[0] * matrix2[4] + matrix1[2] * matrix2[5] + matrix1[4], matrix1[1] * matrix2[4] + matrix1[3] * matrix2[5] + matrix1[5]];
}
/**
* 多个仿射矩阵相乘
*
* @param {...Array} matrixs matrix array
* @return {Array} 新矩阵
*/
function multiply() {
var result = arguments.length <= 0 ? undefined : arguments[0];
for (var i = 1, matrix; matrix = i < 0 || arguments.length <= i ? undefined : arguments[i]; i++) {
result = mul(result, matrix);
}
return result;
}
@@ -0,0 +1,144 @@
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
var bufferFrom = require('buffer-from')
if (typeof Uint8Array === 'undefined') {
var U8 = require('typedarray').Uint8Array
} else {
var U8 = Uint8Array
}
function ConcatStream(opts, cb) {
if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb)
if (typeof opts === 'function') {
cb = opts
opts = {}
}
if (!opts) opts = {}
var encoding = opts.encoding
var shouldInferEncoding = false
if (!encoding) {
shouldInferEncoding = true
} else {
encoding = String(encoding).toLowerCase()
if (encoding === 'u8' || encoding === 'uint8') {
encoding = 'uint8array'
}
}
Writable.call(this, { objectMode: true })
this.encoding = encoding
this.shouldInferEncoding = shouldInferEncoding
if (cb) this.on('finish', function () { cb(this.getBody()) })
this.body = []
}
module.exports = ConcatStream
inherits(ConcatStream, Writable)
ConcatStream.prototype._write = function(chunk, enc, next) {
this.body.push(chunk)
next()
}
ConcatStream.prototype.inferEncoding = function (buff) {
var firstBuffer = buff === undefined ? this.body[0] : buff;
if (Buffer.isBuffer(firstBuffer)) return 'buffer'
if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array'
if (Array.isArray(firstBuffer)) return 'array'
if (typeof firstBuffer === 'string') return 'string'
if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object'
return 'buffer'
}
ConcatStream.prototype.getBody = function () {
if (!this.encoding && this.body.length === 0) return []
if (this.shouldInferEncoding) this.encoding = this.inferEncoding()
if (this.encoding === 'array') return arrayConcat(this.body)
if (this.encoding === 'string') return stringConcat(this.body)
if (this.encoding === 'buffer') return bufferConcat(this.body)
if (this.encoding === 'uint8array') return u8Concat(this.body)
return this.body
}
var isArray = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]'
}
function isArrayish (arr) {
return /Array\]$/.test(Object.prototype.toString.call(arr))
}
function isBufferish (p) {
return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function')
}
function stringConcat (parts) {
var strings = []
var needsToString = false
for (var i = 0; i < parts.length; i++) {
var p = parts[i]
if (typeof p === 'string') {
strings.push(p)
} else if (Buffer.isBuffer(p)) {
strings.push(p)
} else if (isBufferish(p)) {
strings.push(bufferFrom(p))
} else {
strings.push(bufferFrom(String(p)))
}
}
if (Buffer.isBuffer(parts[0])) {
strings = Buffer.concat(strings)
strings = strings.toString('utf8')
} else {
strings = strings.join('')
}
return strings
}
function bufferConcat (parts) {
var bufs = []
for (var i = 0; i < parts.length; i++) {
var p = parts[i]
if (Buffer.isBuffer(p)) {
bufs.push(p)
} else if (isBufferish(p)) {
bufs.push(bufferFrom(p))
} else {
bufs.push(bufferFrom(String(p)))
}
}
return Buffer.concat(bufs)
}
function arrayConcat (parts) {
var res = []
for (var i = 0; i < parts.length; i++) {
res.push.apply(res, parts[i])
}
return res
}
function u8Concat (parts) {
var len = 0
for (var i = 0; i < parts.length; i++) {
if (typeof parts[i] === 'string') {
parts[i] = bufferFrom(parts[i])
}
len += parts[i].length
}
var u8 = new U8(len)
for (var i = 0, offset = 0; i < parts.length; i++) {
var part = parts[i]
for (var j = 0; j < part.length; j++) {
u8[offset++] = part[j]
}
}
return u8
}
@@ -0,0 +1,47 @@
import {Map} from './shims/es6-collections.js';
import ResizeObserverController from './ResizeObserverController.js';
import ResizeObserverSPI from './ResizeObserverSPI.js';
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
const observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new Map();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
class ResizeObserver {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
constructor(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError('Cannot call a class as a function.');
}
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
const controller = ResizeObserverController.getInstance();
const observer = new ResizeObserverSPI(callback, controller, this);
observers.set(this, observer);
}
}
// Expose public methods of ResizeObserver.
[
'observe',
'unobserve',
'disconnect'
].forEach(method => {
ResizeObserver.prototype[method] = function () {
return observers.get(this)[method](...arguments);
};
});
export default ResizeObserver;
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.format.Hex;
@@ -0,0 +1 @@
{"version":3,"file":"isAnyAncestorBindingConstraintsWithName.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isAnyAncestorBindingConstraintsWithName.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveScopedResolvedValueBindingNode = void 0;
const getResolvedValueNodeBinding_1 = require("../calculations/getResolvedValueNodeBinding");
const resolveScoped_1 = require("./resolveScoped");
const resolveScopedResolvedValueBindingNode = (resolve) => (0, resolveScoped_1.resolveScoped)(getResolvedValueNodeBinding_1.getResolvedValueNodeBinding, resolve);
exports.resolveScopedResolvedValueBindingNode = resolveScopedResolvedValueBindingNode;
//# sourceMappingURL=resolveScopedResolvedValueBindingNode.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getContainerModuleId.spec.d.ts.map
@@ -0,0 +1,17 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": 0,
"max-statements": [2, 25],
"new-cap": [2, {
"capIsNewExceptions": [
"GetIntrinsic",
"IsCallable",
"Type",
],
}],
},
}
@@ -0,0 +1,175 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {chain, filterDOMProps, isMac, isWebKit, mergeProps, useLinkProps, useSlotId} from '@react-aria/utils';
import {DOMAttributes, FocusableElement, Key, RefObject} from '@react-types/shared';
import {getItemCount} from '@react-stately/collections';
import {getItemId, listData} from './utils';
import {isFocusVisible, useHover} from '@react-aria/interactions';
import {ListState} from '@react-stately/list';
import {SelectableItemStates, useSelectableItem} from '@react-aria/selection';
export interface OptionAria extends SelectableItemStates {
/** Props for the option element. */
optionProps: DOMAttributes,
/** Props for the main text element inside the option. */
labelProps: DOMAttributes,
/** Props for the description text element inside the option, if any. */
descriptionProps: DOMAttributes,
/** Whether the option is currently focused. */
isFocused: boolean,
/** Whether the option is keyboard focused. */
isFocusVisible: boolean
}
export interface AriaOptionProps {
/**
* Whether the option is disabled.
* @deprecated
*/
isDisabled?: boolean,
/**
* Whether the option is selected.
* @deprecated
*/
isSelected?: boolean,
/** A screen reader only label for the option. */
'aria-label'?: string,
/** The unique key for the option. */
key: Key,
/**
* Whether selection should occur on press up instead of press down.
* @deprecated
*/
shouldSelectOnPressUp?: boolean,
/**
* Whether the option should be focused when the user hovers over it.
* @deprecated
*/
shouldFocusOnHover?: boolean,
/**
* Whether the option is contained in a virtual scrolling listbox.
* @deprecated
*/
isVirtualized?: boolean,
/**
* Whether the option should use virtual focus instead of being focused directly.
* @deprecated
*/
shouldUseVirtualFocus?: boolean
}
/**
* Provides the behavior and accessibility implementation for an option in a listbox.
* See `useListBox` for more details about listboxes.
* @param props - Props for the option.
* @param state - State for the listbox, as returned by `useListState`.
*/
export function useOption<T>(props: AriaOptionProps, state: ListState<T>, ref: RefObject<FocusableElement | null>): OptionAria {
let {
key
} = props;
let data = listData.get(state);
let isDisabled = props.isDisabled ?? state.selectionManager.isDisabled(key);
let isSelected = props.isSelected ?? state.selectionManager.isSelected(key);
let shouldSelectOnPressUp = props.shouldSelectOnPressUp ?? data?.shouldSelectOnPressUp;
let shouldFocusOnHover = props.shouldFocusOnHover ?? data?.shouldFocusOnHover;
let shouldUseVirtualFocus = props.shouldUseVirtualFocus ?? data?.shouldUseVirtualFocus;
let isVirtualized = props.isVirtualized ?? data?.isVirtualized;
let labelId = useSlotId();
let descriptionId = useSlotId();
let optionProps = {
role: 'option',
'aria-disabled': isDisabled || undefined,
'aria-selected': state.selectionManager.selectionMode !== 'none' ? isSelected : undefined
};
// Safari with VoiceOver on macOS misreads options with aria-labelledby or aria-label as simply "text".
// We should not map slots to the label and description on Safari and instead just have VoiceOver read the textContent.
// https://bugs.webkit.org/show_bug.cgi?id=209279
if (!(isMac() && isWebKit())) {
optionProps['aria-label'] = props['aria-label'];
optionProps['aria-labelledby'] = labelId;
optionProps['aria-describedby'] = descriptionId;
}
let item = state.collection.getItem(key);
if (isVirtualized) {
let index = Number(item?.index);
optionProps['aria-posinset'] = Number.isNaN(index) ? undefined : index + 1;
optionProps['aria-setsize'] = getItemCount(state.collection);
}
let onAction = data?.onAction ? () => data?.onAction?.(key) : undefined;
let {itemProps, isPressed, isFocused, hasAction, allowsSelection} = useSelectableItem({
selectionManager: state.selectionManager,
key,
ref,
shouldSelectOnPressUp,
allowsDifferentPressOrigin: shouldSelectOnPressUp && shouldFocusOnHover,
isVirtualized,
shouldUseVirtualFocus,
isDisabled,
onAction: onAction || item?.props?.onAction ? chain(item?.props?.onAction, onAction) : undefined,
linkBehavior: data?.linkBehavior
});
let {hoverProps} = useHover({
isDisabled: isDisabled || !shouldFocusOnHover,
onHoverStart() {
if (!isFocusVisible()) {
state.selectionManager.setFocused(true);
state.selectionManager.setFocusedKey(key);
}
}
});
let domProps = filterDOMProps(item?.props);
delete domProps.id;
let linkProps = useLinkProps(item?.props);
return {
optionProps: {
...optionProps,
...mergeProps(domProps, itemProps, hoverProps, linkProps),
id: getItemId(state, key)
},
labelProps: {
id: labelId
},
descriptionProps: {
id: descriptionId
},
isFocused,
isFocusVisible: isFocused && isFocusVisible(),
isSelected,
isDisabled,
isPressed,
allowsSelection,
hasAction
};
}
@@ -0,0 +1 @@
{"version":3,"file":"buildDefaultManagedMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/buildDefaultManagedMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,wBAAwB,CAAC,eAAe,EAC9C,iBAAiB,EAAE,iBAAiB,GAAG,qBAAqB,GAC3D,2BAA2B,CAAC;AAC/B,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,wBAAwB,CAAC,iBAAiB,EAChD,iBAAiB,EAAE,iBAAiB,GAAG,qBAAqB,EAC5D,OAAO,EAAE,kBAAkB,GAAG,SAAS,GACtC,2BAA2B,CAAC"}
@@ -0,0 +1 @@
{"name":"string_decoder","version":"1.3.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101522,"integrity":"sha512-p//vQZwkqUIM4mim88fMoTa7R9KjPaN9CL1eohOj9Y6eKDde07tFfs98DBs/FDQ2baTovvIZSC/PWZ2ARXXl+w==","mode":420,"size":2338},"lib/string_decoder.js":{"checkedAt":1794532101522,"integrity":"sha512-9Sf8qig4ekOk3yHDwuQ+ABsDaheTg6YcWOGUoz9nrDzkRe9pLSHo95E5N09KB0nRzr0s21mk2bTS7HG//Ys74g==","mode":420,"size":9465},"package.json":{"checkedAt":1794532101522,"integrity":"sha512-sf/NC/LcHHjbkD8A5RlsM2AGV1hAtqFVpjbl8Zd1eKQJpS+ZDws70eIyHyYjLSRh2AioknXTZ23ximnDYRQPBg==","mode":420,"size":823},"README.md":{"checkedAt":1794532101522,"integrity":"sha512-LPN/sX6SDBz4KvBazd582dsJ9eDVAqKbxdd6trUowitcd+/o2P0Dc2rWFzwm90QuW4bxXKo6WY8bpbj3gx7lFw==","mode":420,"size":1801}}}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},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 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 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","2":"xC TC J ZB K D E F A B C L M G N 0C 1C","4":"6 7 8 9 O P aB AB BB CB DB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 ZB K D E F A B C L M 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 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","2":"J"},E:{"1":"ZB K D E F A B C L M G 3C 4C 5C 6C 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","2":"J 2C ZC"},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","2":"F B C FD GD HD ID NC uC JD OC"},G:{"1":"E KD vC LD MD ND OD PD QD 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","2":"ZC"},H:{"2":"hD"},I:{"1":"TC J I jD kD lD vC mD nD","2":"iD"},J:{"1":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"sandbox attribute for iframes",D:true};
@@ -0,0 +1,143 @@
var test = require('tape');
var path = require('path');
var parse = path.parse || require('path-parse');
var keys = require('object-keys');
var nodeModulesPaths = require('../lib/node-modules-paths');
var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) {
var moduleDirs = [].concat(moduleDirectories || 'node_modules');
if (paths) {
for (var k = 0; k < paths.length; ++k) {
moduleDirs.push(path.basename(paths[k]));
}
}
var foundModuleDirs = {};
var uniqueDirs = {};
var parsedDirs = {};
for (var i = 0; i < dirs.length; ++i) {
var parsed = parse(dirs[i]);
if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; }
foundModuleDirs[parsed.base] += 1;
parsedDirs[parsed.dir] = true;
uniqueDirs[dirs[i]] = true;
}
t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has');
var foundModuleDirNames = keys(foundModuleDirs);
t.deepEqual(foundModuleDirNames, moduleDirs, 'all desired module dirs were found');
t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique');
var counts = {};
for (var j = 0; j < foundModuleDirNames.length; ++j) {
counts[foundModuleDirs[j]] = true;
}
t.equal(keys(counts).length, 1, 'all found module directories had the same count');
};
test('node-modules-paths', function (t) {
t.test('no options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start);
verifyDirs(t, start, dirs);
t.end();
});
t.test('empty options', function (t) {
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, {});
verifyDirs(t, start, dirs);
t.end();
});
t.test('with paths=array option', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var dirs = nodeModulesPaths(start, { paths: paths });
verifyDirs(t, start, dirs, null, paths);
t.end();
});
t.test('with paths=function option', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return getNodeModulesDirs().concat(path.join(absoluteStart, 'not node modules', request));
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths }, 'pkg');
verifyDirs(t, start, dirs, null, [path.join(start, 'not node modules', 'pkg')]);
t.end();
});
t.test('with paths=function skipping node modules resolution', function (t) {
var paths = function paths(request, absoluteStart, getNodeModulesDirs, opts) {
return [];
};
var start = path.join(__dirname, 'resolver');
var dirs = nodeModulesPaths(start, { paths: paths });
t.deepEqual(dirs, [], 'no node_modules was computed');
t.end();
});
t.test('with moduleDirectory option', function (t) {
var start = path.join(__dirname, 'resolver');
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory);
t.end();
});
t.test('with 1 moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectory = 'not node modules';
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory });
verifyDirs(t, start, dirs, moduleDirectory, paths);
t.end();
});
t.test('with 1+ moduleDirectory and paths options', function (t) {
var start = path.join(__dirname, 'resolver');
var paths = ['a', 'b'];
var moduleDirectories = ['not node modules', 'other modules'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
verifyDirs(t, start, dirs, moduleDirectories, paths);
t.end();
});
t.test('combine paths correctly on Windows', function (t) {
var start = 'C:\\Users\\username\\myProject\\src';
var paths = [];
var moduleDirectories = ['node_modules', start];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
t.test('combine paths correctly on non-Windows', { skip: process.platform === 'win32' }, function (t) {
var start = '/Users/username/git/myProject/src';
var paths = [];
var moduleDirectories = ['node_modules', '/Users/username/git/myProject/src'];
var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories });
t.equal(dirs.indexOf(path.resolve(start)) > -1, true, 'should contain start dir');
t.end();
});
});
@@ -0,0 +1,10 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import { Kind } from '../symbols/index.mjs';
export type TLiteralValue = boolean | number | string;
export interface TLiteral<T extends TLiteralValue = TLiteralValue> extends TSchema {
[Kind]: 'Literal';
static: T;
const: T;
}
/** `[Json]` Creates a Literal type */
export declare function Literal<T extends TLiteralValue>(value: T, options?: SchemaOptions): TLiteral<T>;
@@ -0,0 +1,23 @@
import { BitString } from "@peculiar/asn1-schema";
export declare enum ClassListFlags {
unmarked = 1,
unclassified = 2,
restricted = 4,
confidential = 8,
secret = 16,
topSecret = 32
}
/**
* ```asn1
* ClassList ::= BIT STRING {
* unmarked (0),
* unclassified (1),
* restricted (2),
* confidential (3),
* secret (4),
* topSecret (5)
* }
* ```
*/
export declare class ClassList extends BitString<ClassListFlags> {
}
@@ -0,0 +1,2 @@
declare const useFavicon: (href: string) => void;
export default useFavicon;
@@ -0,0 +1,13 @@
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
sourceType; /**
* @param {import('eslint').Rule.RuleContext} context
* @returns 'module' | 'script' | 'commonjs' | undefined
*/function sourceType(context) {if ('sourceType' in context.parserOptions) {return context.parserOptions.sourceType;}
if ('languageOptions' in context && context.languageOptions) {
return context.languageOptions.sourceType;
}
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3NvdXJjZVR5cGUuanMiXSwibmFtZXMiOlsic291cmNlVHlwZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwibGFuZ3VhZ2VPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7O0FBSXdCQSxVLEVBSnhCOzs7ZUFJZSxTQUFTQSxVQUFULENBQW9CQyxPQUFwQixFQUE2QixDQUMxQyxJQUFJLGdCQUFnQkEsUUFBUUMsYUFBNUIsRUFBMkMsQ0FDekMsT0FBT0QsUUFBUUMsYUFBUixDQUFzQkYsVUFBN0IsQ0FDRDtBQUNELE1BQUkscUJBQXFCQyxPQUFyQixJQUFnQ0EsUUFBUUUsZUFBNUMsRUFBNkQ7QUFDM0QsV0FBT0YsUUFBUUUsZUFBUixDQUF3QkgsVUFBL0I7QUFDRDtBQUNGIiwiZmlsZSI6InNvdXJjZVR5cGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBwYXJhbSB7aW1wb3J0KCdlc2xpbnQnKS5SdWxlLlJ1bGVDb250ZXh0fSBjb250ZXh0XG4gKiBAcmV0dXJucyAnbW9kdWxlJyB8ICdzY3JpcHQnIHwgJ2NvbW1vbmpzJyB8IHVuZGVmaW5lZFxuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzb3VyY2VUeXBlKGNvbnRleHQpIHtcbiAgaWYgKCdzb3VyY2VUeXBlJyBpbiBjb250ZXh0LnBhcnNlck9wdGlvbnMpIHtcbiAgICByZXR1cm4gY29udGV4dC5wYXJzZXJPcHRpb25zLnNvdXJjZVR5cGU7XG4gIH1cbiAgaWYgKCdsYW5ndWFnZU9wdGlvbnMnIGluIGNvbnRleHQgJiYgY29udGV4dC5sYW5ndWFnZU9wdGlvbnMpIHtcbiAgICByZXR1cm4gY29udGV4dC5sYW5ndWFnZU9wdGlvbnMuc291cmNlVHlwZTtcbiAgfVxufVxuIl19
@@ -0,0 +1,21 @@
'use strict';
var test = require('tape');
var hasSymbolToStringTag = require('../');
var runSymbolTests = require('./tests');
test('interface', function (t) {
t.equal(typeof hasSymbolToStringTag, 'function', 'is a function');
t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean');
t.end();
});
test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) {
runSymbolTests(t);
t.end();
});
test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) {
t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined');
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingServiceActivations.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingServiceActivations.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
'use strict'
const numeric = /^[0-9]+$/
const compareIdentifiers = (a, b) => {
if (typeof a === 'number' && typeof b === 'number') {
return a === b ? 0 : a < b ? -1 : 1
}
const anum = numeric.test(a)
const bnum = numeric.test(b)
if (anum && bnum) {
a = +a
b = +b
}
return a === b ? 0
: (anum && !bnum) ? -1
: (bnum && !anum) ? 1
: a < b ? -1
: 1
}
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
module.exports = {
compareIdentifiers,
rcompareIdentifiers,
}
@@ -0,0 +1,70 @@
import { getSheet } from '../get-sheet';
describe('getSheet', () => {
it('regression', () => {
const target = getSheet();
expect(target.nodeType).toEqual(3);
});
it('custom target', () => {
const custom = document.createElement('div');
const sheet = getSheet(custom);
expect(sheet.nodeType).toEqual(3);
expect(sheet.parentElement.nodeType).toEqual(1);
expect(sheet.parentElement.getAttribute('id')).toEqual('_goober');
});
it('reuse sheet', () => {
const custom = document.createElement('div');
const sheet = getSheet(custom);
const second = getSheet(custom);
expect(sheet === second).toBeTruthy();
});
it('applies nonce from window.__nonce__', () => {
const sheet = getSheet();
const style = sheet.parentElement;
const prevAttr = style.getAttribute('nonce');
const hadAttr = style.hasAttribute('nonce');
const prevNonce = window.__nonce__;
style.removeAttribute('nonce');
delete window.__nonce__;
window.__nonce__ = 'secure-nonce';
getSheet();
expect(style.getAttribute('nonce')).toEqual('secure-nonce');
if (prevAttr != null) style.setAttribute('nonce', prevAttr);
else if (!hadAttr) style.removeAttribute('nonce');
if (prevNonce === undefined) delete window.__nonce__;
else window.__nonce__ = prevNonce;
});
it('server side', () => {
const bkp = global.document;
delete global.document;
expect(() => getSheet()).not.toThrow();
global.document = bkp;
});
it('server side with custom collector', () => {
const bkp = global.document;
const win = global.window;
delete global.document;
delete global.window;
const collector = { data: '' };
expect(collector === getSheet(collector)).toBeTruthy();
global.document = bkp;
global.window = win;
});
});
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveScoped = resolveScoped;
const BindingScope_1 = require("../../binding/models/BindingScope");
const cacheResolvedValue_1 = require("./cacheResolvedValue");
const resolveBindingActivations_1 = require("./resolveBindingActivations");
function resolveScoped(getBinding, resolve) {
return (params, arg) => {
const binding = getBinding(arg);
switch (binding.scope) {
case BindingScope_1.bindingScopeValues.Singleton: {
if (binding.cache.isRight) {
return binding.cache.value;
}
const resolvedValue = (0, resolveBindingActivations_1.resolveBindingActivations)(params, binding, resolve(params, arg));
return (0, cacheResolvedValue_1.cacheResolvedValue)(binding, resolvedValue);
}
case BindingScope_1.bindingScopeValues.Request: {
if (params.requestScopeCache.has(binding.id)) {
return params.requestScopeCache.get(binding.id);
}
const resolvedValue = (0, resolveBindingActivations_1.resolveBindingActivations)(params, binding, resolve(params, arg));
params.requestScopeCache.set(binding.id, resolvedValue);
return resolvedValue;
}
case BindingScope_1.bindingScopeValues.Transient:
return (0, resolveBindingActivations_1.resolveBindingActivations)(params, binding, resolve(params, arg));
}
};
}
//# sourceMappingURL=resolveScoped.js.map
@@ -0,0 +1,26 @@
var createRound = require('./_createRound');
/**
* Computes `number` rounded up to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round up.
* @param {number} [precision=0] The precision to round up to.
* @returns {number} Returns the rounded up number.
* @example
*
* _.ceil(4.006);
* // => 5
*
* _.ceil(6.004, 2);
* // => 6.01
*
* _.ceil(6040, -2);
* // => 6100
*/
var ceil = createRound('ceil');
module.exports = ceil;
@@ -0,0 +1 @@
{"version":3,"file":"decorate.d.ts","sourceRoot":"","sources":["../../../../src/decorator/actions/decorate.ts"],"names":[],"mappings":"AACA,wBAAgB,QAAQ,CACtB,UAAU,EAAE,cAAc,GAAG,cAAc,EAAE,EAC7C,MAAM,EAAE,QAAQ,GACf,IAAI,CAAC;AACR,wBAAgB,QAAQ,CACtB,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,EACrD,MAAM,EAAE,QAAQ,EAChB,cAAc,EAAE,MAAM,GACrB,IAAI,CAAC;AACR,wBAAgB,QAAQ,CACtB,UAAU,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,EACrD,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,cAAc,EAAE,MAAM,GACrB,IAAI,CAAC;AACR,wBAAgB,QAAQ,CACtB,UAAU,EACN,eAAe,GACf,iBAAiB,GACjB,eAAe,EAAE,GACjB,iBAAiB,EAAE,EACvB,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,MAAM,GAAG,MAAM,GACxB,IAAI,CAAC"}
@@ -0,0 +1,3 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"disallowedPromiseAwait" | "disallowedPromiseAwaitSuggestion" | "nonPromiseAwait" | "requiredPromiseAwait" | "requiredPromiseAwaitSuggestion", [string], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Mateusz Burzyński
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,2 @@
declare function fallback<T = unknown>(packageJsonPath: string, checkVersion?: boolean): T;
export = fallback;
@@ -0,0 +1,2 @@
/** Clones a value */
export declare function Clone<T>(value: T): T;
@@ -0,0 +1,9 @@
import { isCSSVar } from './is-css-var.mjs';
function setStyle(element, name, value) {
isCSSVar(name)
? element.style.setProperty(name, value)
: (element.style[name] = value);
}
export { setStyle };
@@ -0,0 +1,18 @@
'use strict';
var callBind = require('call-bind');
var I402 = typeof Intl === 'undefined' ? null : Intl;
var DateTimeFormat = I402 && I402.DateTimeFormat;
var resolvedOptions = DateTimeFormat && callBind(DateTimeFormat.prototype.resolvedOptions);
// https://262.ecma-international.org/15.0/#sec-systemtimezoneidentifier
module.exports = function SystemTimeZoneIdentifier() {
if (DateTimeFormat && resolvedOptions) {
return resolvedOptions(new DateTimeFormat()).timeZone; // steps 2 - 3
}
return 'UTC'; // step 1
};
@@ -0,0 +1 @@
{"version":3,"file":"BaseResolvedValueElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/models/BaseResolvedValueElementMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
import type * as TSESLint from '../../ts-eslint';
import type { TSESTree } from '../../ts-estree';
declare const ReferenceTrackerREAD: unique symbol;
declare const ReferenceTrackerCALL: unique symbol;
declare const ReferenceTrackerCONSTRUCT: unique symbol;
declare const ReferenceTrackerESM: unique symbol;
interface ReferenceTracker {
/**
* Iterate the references that the given `traceMap` determined.
* This method starts to search from `require()` expression.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iteratecjsreferences}
*/
iterateCjsReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
/**
* Iterate the references that the given `traceMap` determined.
* This method starts to search from `import`/`export` declarations.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateesmreferences}
*/
iterateEsmReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
/**
* Iterate the references that the given `traceMap` determined.
* This method starts to search from global variables.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#tracker-iterateglobalreferences}
*/
iterateGlobalReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
}
interface ReferenceTrackerStatic {
readonly CALL: typeof ReferenceTrackerCALL;
readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT;
readonly ESM: typeof ReferenceTrackerESM;
new (globalScope: TSESLint.Scope.Scope, options?: {
/**
* The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`.
*/
globalObjectNames?: readonly string[];
/**
* The mode which determines how the `tracker.iterateEsmReferences()` method scans CommonJS modules.
* If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds
* CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`.
*/
mode?: 'legacy' | 'strict';
}): ReferenceTracker;
readonly READ: typeof ReferenceTrackerREAD;
}
declare namespace ReferenceTracker {
type READ = ReferenceTrackerStatic['READ'];
type CALL = ReferenceTrackerStatic['CALL'];
type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT'];
type ESM = ReferenceTrackerStatic['ESM'];
type ReferenceType = CALL | CONSTRUCT | READ;
type TraceMap<T = any> = Record<string, TraceMapElement<T>>;
interface TraceMapElement<T> {
[key: string]: TraceMapElement<T>;
[ReferenceTrackerCALL]?: T;
[ReferenceTrackerCONSTRUCT]?: T;
[ReferenceTrackerESM]?: true;
[ReferenceTrackerREAD]?: T;
}
interface FoundReference<T = any> {
info: T;
node: TSESTree.Node;
path: readonly string[];
type: ReferenceType;
}
}
/**
* The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class}
*/
export declare const ReferenceTracker: ReferenceTrackerStatic;
export {};
@@ -0,0 +1 @@
{"name":"is-alphanumerical","version":"2.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532112684,"integrity":"sha512-cQvy4TvDNGTww5W7wo7SHRjv/0G8g3u/v8V2BhwwrAM+M5M2Z7W8hy+cQrU+e4exnULY2LrZ0EQqBk6Fj/Sdrw==","mode":420,"size":1099},"index.js":{"checkedAt":1794532114065,"integrity":"sha512-OYzgfpBNRtGHnQzwC6VAEs82zfCdpE2d5STTAWAG4C/U0ewVtUqNZmSsS+krrxFzb2FDOIw0hvzVgo/f1upEnA==","mode":420,"size":406},"package.json":{"checkedAt":1794532114065,"integrity":"sha512-Tds2jdYCTOIi0lThxIkGceJPMP5VpMS0E2bOh/xMfYKSM3UsutToxkUetEa8gnUgpLNG3k9bo0THtpzdStidoA==","mode":420,"size":2005},"readme.md":{"checkedAt":1794532114065,"integrity":"sha512-ZjRRMdrt4SITKEoU+vQpviNyhCcvbdGowlZWG0ZYcK6rSk0HpYr5ZXo1uasLU+lHj+nBRm4hBX56QtJm7Qimbw==","mode":420,"size":3599},"index.d.ts":{"checkedAt":1794532114065,"integrity":"sha512-c8t9fWlGkLY2+POuCJwyZB5rCnSPWUmwHqumsGbNN/FErSEBQXPwj1frln51ocMeFc6RtzVkK2AHdD2bG6vbwQ==","mode":420,"size":284}}}
@@ -0,0 +1,67 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bound');
var $RangeError = require('es-errors/range');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $BigInt = GetIntrinsic('%BigInt%', true);
var hasOwnProperty = require('./HasOwnProperty');
var IsArray = require('./IsArray');
var IsBigIntElementType = require('./IsBigIntElementType');
var IsUnsignedElementType = require('./IsUnsignedElementType');
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
var bytesAsInteger = require('../helpers/bytesAsInteger');
var every = require('../helpers/every');
var isByteValue = require('../helpers/isByteValue');
var $reverse = callBound('Array.prototype.reverse');
var $slice = callBound('Array.prototype.slice');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric
module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) {
if (typeof type !== 'string' || !hasOwnProperty(tableTAO.size, '$' + type)) {
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type');
}
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
}
if (typeof isLittleEndian !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
}
var elementSize = tableTAO.size['$' + type]; // step 1
if (rawBytes.length !== elementSize) {
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
}
var isBigInt = IsBigIntElementType(type);
if (isBigInt && !$BigInt) {
throw new $SyntaxError('this environment does not support BigInts');
}
// eslint-disable-next-line no-param-reassign
rawBytes = $slice(rawBytes, 0, elementSize);
if (!isLittleEndian) {
$reverse(rawBytes); // step 2
}
if (type === 'Float32') { // step 3
return bytesAsFloat32(rawBytes);
}
if (type === 'Float64') { // step 4
return bytesAsFloat64(rawBytes);
}
return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt);
};
@@ -0,0 +1,309 @@
import "./chunk-3ARAAK6Z.mjs";
import {
CopyLinearIcon
} from "./chunk-W5SCNTSN.mjs";
import {
SearchLinearIcon
} from "./chunk-O65ECHHD.mjs";
import "./chunk-V2PVPQWW.mjs";
import {
AddNoteBulkIcon
} from "./chunk-DF2IDUIR.mjs";
import {
CopyDocumentBulkIcon
} from "./chunk-F2DAVTM3.mjs";
import {
DeleteDocumentBulkIcon
} from "./chunk-NXV7NGR3.mjs";
import {
EditDocumentBulkIcon
} from "./chunk-T2EG23QZ.mjs";
import {
CheckLinearIcon
} from "./chunk-6O2NYG7W.mjs";
import {
ChevronCircleTopLinearIcon
} from "./chunk-D7KR3R5S.mjs";
import {
ClockCircleLinearIcon
} from "./chunk-3KV3RZ3C.mjs";
import "./chunk-GQGYXTXM.mjs";
import {
ClockSquareBoldIcon
} from "./chunk-C4AGHOLG.mjs";
import {
PetBoldIcon
} from "./chunk-AZSWQWCV.mjs";
import {
PlusFilledIcon
} from "./chunk-OG4N5BYW.mjs";
import {
SendFilledIcon
} from "./chunk-DIGVROZI.mjs";
import {
ShoppingCartBoldIcon
} from "./chunk-TAQLMOFL.mjs";
import {
VolumeHighBoldIcon
} from "./chunk-BJ4U5HLX.mjs";
import {
VolumeLowBoldIcon
} from "./chunk-CQZP7JER.mjs";
import {
WarningIcon
} from "./chunk-JELBARVK.mjs";
import {
AlignBottomBoldIcon
} from "./chunk-NDD37WXM.mjs";
import {
AlignHorizontallyBoldIcon
} from "./chunk-GWSPO6AT.mjs";
import {
AlignLeftBoldIcon
} from "./chunk-VRKAJVF2.mjs";
import {
AlignRightBoldIcon
} from "./chunk-M4HZWITS.mjs";
import {
AlignTopBoldIcon
} from "./chunk-4CUIXA2N.mjs";
import {
AlignVerticallyBoldIcon
} from "./chunk-74IIVLS4.mjs";
import {
CalendarBoldIcon
} from "./chunk-LUENRYJZ.mjs";
import {
MoonIcon
} from "./chunk-LQ7V7SFR.mjs";
import {
SearchIcon
} from "./chunk-VFECWIRF.mjs";
import {
SelectorIcon
} from "./chunk-N63WUTHU.mjs";
import {
ShieldSecurityIcon
} from "./chunk-RDECS4HA.mjs";
import {
SuccessIcon
} from "./chunk-AMTP7UL3.mjs";
import {
SunFilledIcon
} from "./chunk-E6UBK7SP.mjs";
import {
SunIcon
} from "./chunk-Z3FKEITW.mjs";
import {
InfoIcon
} from "./chunk-TQ5NV33I.mjs";
import {
InvalidCardIcon
} from "./chunk-ZXYURTAY.mjs";
import {
LinkIcon
} from "./chunk-MQHFHAHG.mjs";
import {
LockFilledIcon
} from "./chunk-AXKFGFLQ.mjs";
import {
MailFilledIcon
} from "./chunk-65C5BFX4.mjs";
import {
MailIcon
} from "./chunk-57XIBYQE.mjs";
import {
MonitorMobileIcon
} from "./chunk-UMZA7SPC.mjs";
import {
MoonFilledIcon
} from "./chunk-2723QZDQ.mjs";
import {
EyeFilledIcon
} from "./chunk-YA3R5U3J.mjs";
import {
EyeSlashFilledIcon
} from "./chunk-OTX7J53G.mjs";
import {
EyeIcon
} from "./chunk-ZFNQRZXI.mjs";
import {
ForwardIcon
} from "./chunk-M5FBVHRQ.mjs";
import {
HeadphonesIcon
} from "./chunk-SX4NWTRP.mjs";
import {
Activity,
AddNoteBulk,
Camera,
CartIcon,
ChevronDown,
ChevronDownBold,
CopyDocumentBulk,
Delete,
DeleteDocumentBulk,
Edit,
EditDocumentBulk,
Eye,
Flash,
Lock,
Mail,
Minus,
Moon,
NewFile,
Notification,
Password,
Plus,
Scale,
Search,
Server,
Sun,
TagUser,
Unlock,
User,
VolumeUp
} from "./chunk-ZNORX7MG.mjs";
import {
InfoCircleIcon
} from "./chunk-BK5TVFNQ.mjs";
import {
ChevronIcon
} from "./chunk-OH2E76JR.mjs";
import {
CloseFilledIcon
} from "./chunk-M3MASYO7.mjs";
import {
CloseIcon
} from "./chunk-LJROZDOV.mjs";
import {
CopyIcon
} from "./chunk-ZXDZZS7M.mjs";
import {
DangerIcon
} from "./chunk-PHPAKJFX.mjs";
import {
DeleteIcon
} from "./chunk-24KJWBGA.mjs";
import {
EditIcon
} from "./chunk-6SIT7J74.mjs";
import {
EllipsisIcon
} from "./chunk-BU32PI3O.mjs";
import {
AnchorIcon
} from "./chunk-NS3FXBQF.mjs";
import {
ArrowLeftIcon
} from "./chunk-TWGNUALX.mjs";
import {
ArrowRightIcon
} from "./chunk-SJODKNZO.mjs";
import {
AvatarIcon
} from "./chunk-FJH2EZEY.mjs";
import {
CheckIcon
} from "./chunk-FVWMVR6N.mjs";
import {
ChevronDownIcon
} from "./chunk-7F3ZLNJ6.mjs";
import {
ChevronRightIcon
} from "./chunk-534KRDYK.mjs";
import {
ChevronUpIcon
} from "./chunk-5SI6FX4K.mjs";
export {
Activity,
AddNoteBulk,
AddNoteBulkIcon,
AlignBottomBoldIcon,
AlignHorizontallyBoldIcon,
AlignLeftBoldIcon,
AlignRightBoldIcon,
AlignTopBoldIcon,
AlignVerticallyBoldIcon,
AnchorIcon,
ArrowLeftIcon,
ArrowRightIcon,
AvatarIcon,
CalendarBoldIcon,
Camera,
CartIcon,
CheckIcon,
CheckLinearIcon,
ChevronCircleTopLinearIcon,
ChevronDown,
ChevronDownBold,
ChevronDownIcon,
ChevronIcon,
ChevronRightIcon,
ChevronUpIcon,
ClockCircleLinearIcon,
ClockSquareBoldIcon,
CloseFilledIcon,
CloseIcon,
CopyDocumentBulk,
CopyDocumentBulkIcon,
CopyIcon,
CopyLinearIcon,
DangerIcon,
Delete,
DeleteDocumentBulk,
DeleteDocumentBulkIcon,
DeleteIcon,
Edit,
EditDocumentBulk,
EditDocumentBulkIcon,
EditIcon,
EllipsisIcon,
Eye,
EyeFilledIcon,
EyeIcon,
EyeSlashFilledIcon,
Flash,
ForwardIcon,
HeadphonesIcon,
InfoCircleIcon,
InfoIcon,
InvalidCardIcon,
LinkIcon,
Lock,
LockFilledIcon,
Mail,
MailFilledIcon,
MailIcon,
Minus,
MonitorMobileIcon,
Moon,
MoonFilledIcon,
MoonIcon,
NewFile,
Notification,
Password,
PetBoldIcon,
Plus,
PlusFilledIcon,
Scale,
Search,
SearchIcon,
SearchLinearIcon,
SelectorIcon,
SendFilledIcon,
Server,
ShieldSecurityIcon,
ShoppingCartBoldIcon,
SuccessIcon,
Sun,
SunFilledIcon,
SunIcon,
TagUser,
Unlock,
User,
VolumeHighBoldIcon,
VolumeLowBoldIcon,
VolumeUp,
WarningIcon
};
@@ -0,0 +1,528 @@
'use strict';
const zlib = require('zlib');
const bufferUtil = require('./buffer-util');
const Limiter = require('./limiter');
const { kStatusCode } = require('./constants');
const FastBuffer = Buffer[Symbol.species];
const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]);
const kPerMessageDeflate = Symbol('permessage-deflate');
const kTotalLength = Symbol('total-length');
const kCallback = Symbol('callback');
const kBuffers = Symbol('buffers');
const kError = Symbol('error');
//
// We limit zlib concurrency, which prevents severe memory fragmentation
// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
// and https://github.com/websockets/ws/issues/1202
//
// Intentionally global; it's the global thread pool that's an issue.
//
let zlibLimiter;
/**
* permessage-deflate implementation.
*/
class PerMessageDeflate {
/**
* Creates a PerMessageDeflate instance.
*
* @param {Object} [options] Configuration options
* @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
* for, or request, a custom client window size
* @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
* acknowledge disabling of client context takeover
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
* calls to zlib
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
* use of a custom server window size
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
* disabling of server context takeover
* @param {Number} [options.threshold=1024] Size (in bytes) below which
* messages should not be compressed if context takeover is disabled
* @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
* deflate
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
* inflate
* @param {Boolean} [isServer=false] Create the instance in either server or
* client mode
* @param {Number} [maxPayload=0] The maximum allowed message length
*/
constructor(options, isServer, maxPayload) {
this._maxPayload = maxPayload | 0;
this._options = options || {};
this._threshold =
this._options.threshold !== undefined ? this._options.threshold : 1024;
this._isServer = !!isServer;
this._deflate = null;
this._inflate = null;
this.params = null;
if (!zlibLimiter) {
const concurrency =
this._options.concurrencyLimit !== undefined
? this._options.concurrencyLimit
: 10;
zlibLimiter = new Limiter(concurrency);
}
}
/**
* @type {String}
*/
static get extensionName() {
return 'permessage-deflate';
}
/**
* Create an extension negotiation offer.
*
* @return {Object} Extension parameters
* @public
*/
offer() {
const params = {};
if (this._options.serverNoContextTakeover) {
params.server_no_context_takeover = true;
}
if (this._options.clientNoContextTakeover) {
params.client_no_context_takeover = true;
}
if (this._options.serverMaxWindowBits) {
params.server_max_window_bits = this._options.serverMaxWindowBits;
}
if (this._options.clientMaxWindowBits) {
params.client_max_window_bits = this._options.clientMaxWindowBits;
} else if (this._options.clientMaxWindowBits == null) {
params.client_max_window_bits = true;
}
return params;
}
/**
* Accept an extension negotiation offer/response.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Object} Accepted configuration
* @public
*/
accept(configurations) {
configurations = this.normalizeParams(configurations);
this.params = this._isServer
? this.acceptAsServer(configurations)
: this.acceptAsClient(configurations);
return this.params;
}
/**
* Releases all resources used by the extension.
*
* @public
*/
cleanup() {
if (this._inflate) {
this._inflate.close();
this._inflate = null;
}
if (this._deflate) {
const callback = this._deflate[kCallback];
this._deflate.close();
this._deflate = null;
if (callback) {
callback(
new Error(
'The deflate stream was closed while data was being processed'
)
);
}
}
}
/**
* Accept an extension negotiation offer.
*
* @param {Array} offers The extension negotiation offers
* @return {Object} Accepted configuration
* @private
*/
acceptAsServer(offers) {
const opts = this._options;
const accepted = offers.find((params) => {
if (
(opts.serverNoContextTakeover === false &&
params.server_no_context_takeover) ||
(params.server_max_window_bits &&
(opts.serverMaxWindowBits === false ||
(typeof opts.serverMaxWindowBits === 'number' &&
opts.serverMaxWindowBits > params.server_max_window_bits))) ||
(typeof opts.clientMaxWindowBits === 'number' &&
!params.client_max_window_bits)
) {
return false;
}
return true;
});
if (!accepted) {
throw new Error('None of the extension offers can be accepted');
}
if (opts.serverNoContextTakeover) {
accepted.server_no_context_takeover = true;
}
if (opts.clientNoContextTakeover) {
accepted.client_no_context_takeover = true;
}
if (typeof opts.serverMaxWindowBits === 'number') {
accepted.server_max_window_bits = opts.serverMaxWindowBits;
}
if (typeof opts.clientMaxWindowBits === 'number') {
accepted.client_max_window_bits = opts.clientMaxWindowBits;
} else if (
accepted.client_max_window_bits === true ||
opts.clientMaxWindowBits === false
) {
delete accepted.client_max_window_bits;
}
return accepted;
}
/**
* Accept the extension negotiation response.
*
* @param {Array} response The extension negotiation response
* @return {Object} Accepted configuration
* @private
*/
acceptAsClient(response) {
const params = response[0];
if (
this._options.clientNoContextTakeover === false &&
params.client_no_context_takeover
) {
throw new Error('Unexpected parameter "client_no_context_takeover"');
}
if (!params.client_max_window_bits) {
if (typeof this._options.clientMaxWindowBits === 'number') {
params.client_max_window_bits = this._options.clientMaxWindowBits;
}
} else if (
this._options.clientMaxWindowBits === false ||
(typeof this._options.clientMaxWindowBits === 'number' &&
params.client_max_window_bits > this._options.clientMaxWindowBits)
) {
throw new Error(
'Unexpected or invalid parameter "client_max_window_bits"'
);
}
return params;
}
/**
* Normalize parameters.
*
* @param {Array} configurations The extension negotiation offers/reponse
* @return {Array} The offers/response with normalized parameters
* @private
*/
normalizeParams(configurations) {
configurations.forEach((params) => {
Object.keys(params).forEach((key) => {
let value = params[key];
if (value.length > 1) {
throw new Error(`Parameter "${key}" must have only a single value`);
}
value = value[0];
if (key === 'client_max_window_bits') {
if (value !== true) {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (!this._isServer) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else if (key === 'server_max_window_bits') {
const num = +value;
if (!Number.isInteger(num) || num < 8 || num > 15) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
value = num;
} else if (
key === 'client_no_context_takeover' ||
key === 'server_no_context_takeover'
) {
if (value !== true) {
throw new TypeError(
`Invalid value for parameter "${key}": ${value}`
);
}
} else {
throw new Error(`Unknown parameter "${key}"`);
}
params[key] = value;
});
});
return configurations;
}
/**
* Decompress data. Concurrency limited.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
decompress(data, fin, callback) {
zlibLimiter.add((done) => {
this._decompress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Compress data. Concurrency limited.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @public
*/
compress(data, fin, callback) {
zlibLimiter.add((done) => {
this._compress(data, fin, (err, result) => {
done();
callback(err, result);
});
});
}
/**
* Decompress data.
*
* @param {Buffer} data Compressed data
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_decompress(data, fin, callback) {
const endpoint = this._isServer ? 'client' : 'server';
if (!this._inflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._inflate = zlib.createInflateRaw({
...this._options.zlibInflateOptions,
windowBits
});
this._inflate[kPerMessageDeflate] = this;
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
this._inflate.on('error', inflateOnError);
this._inflate.on('data', inflateOnData);
}
this._inflate[kCallback] = callback;
this._inflate.write(data);
if (fin) this._inflate.write(TRAILER);
this._inflate.flush(() => {
const err = this._inflate[kError];
if (err) {
this._inflate.close();
this._inflate = null;
callback(err);
return;
}
const data = bufferUtil.concat(
this._inflate[kBuffers],
this._inflate[kTotalLength]
);
if (this._inflate._readableState.endEmitted) {
this._inflate.close();
this._inflate = null;
} else {
this._inflate[kTotalLength] = 0;
this._inflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._inflate.reset();
}
}
callback(null, data);
});
}
/**
* Compress data.
*
* @param {(Buffer|String)} data Data to compress
* @param {Boolean} fin Specifies whether or not this is the last fragment
* @param {Function} callback Callback
* @private
*/
_compress(data, fin, callback) {
const endpoint = this._isServer ? 'server' : 'client';
if (!this._deflate) {
const key = `${endpoint}_max_window_bits`;
const windowBits =
typeof this.params[key] !== 'number'
? zlib.Z_DEFAULT_WINDOWBITS
: this.params[key];
this._deflate = zlib.createDeflateRaw({
...this._options.zlibDeflateOptions,
windowBits
});
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
this._deflate.on('data', deflateOnData);
}
this._deflate[kCallback] = callback;
this._deflate.write(data);
this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
if (!this._deflate) {
//
// The deflate stream was closed while data was being processed.
//
return;
}
let data = bufferUtil.concat(
this._deflate[kBuffers],
this._deflate[kTotalLength]
);
if (fin) {
data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4);
}
//
// Ensure that the callback will not be called again in
// `PerMessageDeflate#cleanup()`.
//
this._deflate[kCallback] = null;
this._deflate[kTotalLength] = 0;
this._deflate[kBuffers] = [];
if (fin && this.params[`${endpoint}_no_context_takeover`]) {
this._deflate.reset();
}
callback(null, data);
});
}
}
module.exports = PerMessageDeflate;
/**
* The listener of the `zlib.DeflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function deflateOnData(chunk) {
this[kBuffers].push(chunk);
this[kTotalLength] += chunk.length;
}
/**
* The listener of the `zlib.InflateRaw` stream `'data'` event.
*
* @param {Buffer} chunk A chunk of data
* @private
*/
function inflateOnData(chunk) {
this[kTotalLength] += chunk.length;
if (
this[kPerMessageDeflate]._maxPayload < 1 ||
this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload
) {
this[kBuffers].push(chunk);
return;
}
this[kError] = new RangeError('Max payload size exceeded');
this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
this[kError][kStatusCode] = 1009;
this.removeListener('data', inflateOnData);
//
// The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the
// fact that in Node.js versions prior to 13.10.0, the callback for
// `zlib.flush()` is not called if `zlib.close()` is used. Utilizing
// `zlib.reset()` ensures that either the callback is invoked or an error is
// emitted.
//
this.reset();
}
/**
* The listener of the `zlib.InflateRaw` stream `'error'` event.
*
* @param {Error} err The emitted error
* @private
*/
function inflateOnError(err) {
//
// There is no need to call `Zlib#close()` as the handle is automatically
// closed when an error is emitted.
//
this[kPerMessageDeflate]._inflate = null;
if (this[kError]) {
this[kCallback](this[kError]);
return;
}
err[kStatusCode] = 1007;
this[kCallback](err);
}
@@ -0,0 +1,32 @@
import { AsnArray } from "@peculiar/asn1-schema";
import { CMSVersion } from "./types";
import { Attribute } from "./attribute";
import { RecipientInfos } from "./recipient_infos";
import { OriginatorInfo } from "./originator_info";
import { EncryptedContentInfo } from "./encrypted_content_info";
/**
* ```asn
* UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export declare class UnprotectedAttributes extends AsnArray<Attribute> {
constructor(items?: Attribute[]);
}
/**
* ```asn
* EnvelopedData ::= SEQUENCE {
* version CMSVersion,
* originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
* recipientInfos RecipientInfos,
* encryptedContentInfo EncryptedContentInfo,
* unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
* ```
*/
export declare class EnvelopedData {
version: CMSVersion;
originatorInfo?: OriginatorInfo;
recipientInfos: RecipientInfos;
encryptedContentInfo: EncryptedContentInfo;
unprotectedAttrs?: UnprotectedAttributes;
constructor(params?: Partial<EnvelopedData>);
}
@@ -0,0 +1,143 @@
'use strict'
const ANY = Symbol('SemVer ANY')
// hoisted class for cyclic dependency
class Comparator {
static get ANY () {
return ANY
}
constructor (comp, options) {
options = parseOptions(options)
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp
} else {
comp = comp.value
}
}
comp = comp.trim().split(/\s+/).join(' ')
debug('comparator', comp, options)
this.options = options
this.loose = !!options.loose
this.parse(comp)
if (this.semver === ANY) {
this.value = ''
} else {
this.value = this.operator + this.semver.version
}
debug('comp', this)
}
parse (comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
const m = comp.match(r)
if (!m) {
throw new TypeError(`Invalid comparator: ${comp}`)
}
this.operator = m[1] !== undefined ? m[1] : ''
if (this.operator === '=') {
this.operator = ''
}
// if it literally is just '>' or '' then allow anything.
if (!m[2]) {
this.semver = ANY
} else {
this.semver = new SemVer(m[2], this.options.loose)
}
}
toString () {
return this.value
}
test (version) {
debug('Comparator.test', version, this.options.loose)
if (this.semver === ANY || version === ANY) {
return true
}
if (typeof version === 'string') {
try {
version = new SemVer(version, this.options)
} catch (er) {
return false
}
}
return cmp(version, this.operator, this.semver, this.options)
}
intersects (comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError('a Comparator is required')
}
if (this.operator === '') {
if (this.value === '') {
return true
}
return new Range(comp.value, options).test(this.value)
} else if (comp.operator === '') {
if (comp.value === '') {
return true
}
return new Range(this.value, options).test(comp.semver)
}
options = parseOptions(options)
// Special cases where nothing can possibly be lower
if (options.includePrerelease &&
(this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
return false
}
if (!options.includePrerelease &&
(this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
return false
}
// Same direction increasing (> or >=)
if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
return true
}
// Same direction decreasing (< or <=)
if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
return true
}
// same SemVer and both sides are inclusive (<= or >=)
if (
(this.semver.version === comp.semver.version) &&
this.operator.includes('=') && comp.operator.includes('=')) {
return true
}
// opposite directions less than
if (cmp(this.semver, '<', comp.semver, options) &&
this.operator.startsWith('>') && comp.operator.startsWith('<')) {
return true
}
// opposite directions greater than
if (cmp(this.semver, '>', comp.semver, options) &&
this.operator.startsWith('<') && comp.operator.startsWith('>')) {
return true
}
return false
}
}
module.exports = Comparator
const parseOptions = require('../internal/parse-options')
const { safeRe: re, t } = require('../internal/re')
const cmp = require('../functions/cmp')
const debug = require('../internal/debug')
const SemVer = require('./semver')
const Range = require('./range')
@@ -0,0 +1,224 @@
export namespace util {
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type isAny<T> = 0 extends 1 & T ? true : false;
export const assertEqual = <A, B>(_: AssertEqual<A, B>): void => {};
export function assertIs<T>(_arg: T): void {}
export function assertNever(_x: never): never {
throw new Error();
}
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type InexactPartial<T> = { [k in keyof T]?: T[k] | undefined };
export const arrayToEnum = <T extends string, U extends [T, ...T[]]>(items: U): { [k in U[number]]: k } => {
const obj: any = {};
for (const item of items) {
obj[item] = item;
}
return obj;
};
export const getValidEnumValues = (obj: any): any[] => {
const validKeys = objectKeys(obj).filter((k: any) => typeof obj[obj[k]] !== "number");
const filtered: any = {};
for (const k of validKeys) {
filtered[k] = obj[k];
}
return objectValues(filtered);
};
export const objectValues = (obj: any): any[] => {
return objectKeys(obj).map(function (e) {
return obj[e];
});
};
export const objectKeys: ObjectConstructor["keys"] =
typeof Object.keys === "function" // eslint-disable-line ban/ban
? (obj: any) => Object.keys(obj) // eslint-disable-line ban/ban
: (object: any) => {
const keys = [];
for (const key in object) {
if (Object.prototype.hasOwnProperty.call(object, key)) {
keys.push(key);
}
}
return keys;
};
export const find = <T>(arr: T[], checker: (arg: T) => any): T | undefined => {
for (const item of arr) {
if (checker(item)) return item;
}
return undefined;
};
export type identity<T> = objectUtil.identity<T>;
export type flatten<T> = objectUtil.flatten<T>;
export type noUndefined<T> = T extends undefined ? never : T;
export const isInteger: NumberConstructor["isInteger"] =
typeof Number.isInteger === "function"
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
: (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
export function joinValues<T extends any[]>(array: T, separator = " | "): string {
return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator);
}
export const jsonStringifyReplacer = (_: string, value: any): any => {
if (typeof value === "bigint") {
return value.toString();
}
return value;
};
}
export namespace objectUtil {
export type MergeShapes<U, V> =
// fast path when there is no keys overlap
keyof U & keyof V extends never
? U & V
: {
[k in Exclude<keyof U, keyof V>]: U[k];
} & V;
type optionalKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? k : never;
}[keyof T];
type requiredKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? never : k;
}[keyof T];
export type addQuestionMarks<T extends object, _O = any> = {
[K in requiredKeys<T>]: T[K];
} & {
[K in optionalKeys<T>]?: T[K];
} & { [k in keyof T]?: unknown };
export type identity<T> = T;
export type flatten<T> = identity<{ [k in keyof T]: T[k] }>;
export type noNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type noNever<T> = identity<{
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export const mergeShapes = <U, T>(first: U, second: T): T & U => {
return {
...first,
...second, // second overwrites first
};
};
export type extendShape<A extends object, B extends object> = keyof A & keyof B extends never // fast path when there is no keys overlap
? A & B
: {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
};
}
export const ZodParsedType: {
string: "string";
nan: "nan";
number: "number";
integer: "integer";
float: "float";
boolean: "boolean";
date: "date";
bigint: "bigint";
symbol: "symbol";
function: "function";
undefined: "undefined";
null: "null";
array: "array";
object: "object";
unknown: "unknown";
promise: "promise";
void: "void";
never: "never";
map: "map";
set: "set";
} = util.arrayToEnum([
"string",
"nan",
"number",
"integer",
"float",
"boolean",
"date",
"bigint",
"symbol",
"function",
"undefined",
"null",
"array",
"object",
"unknown",
"promise",
"void",
"never",
"map",
"set",
]);
export type ZodParsedType = keyof typeof ZodParsedType;
export const getParsedType = (data: any): ZodParsedType => {
const t = typeof data;
switch (t) {
case "undefined":
return ZodParsedType.undefined;
case "string":
return ZodParsedType.string;
case "number":
return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
case "boolean":
return ZodParsedType.boolean;
case "function":
return ZodParsedType.function;
case "bigint":
return ZodParsedType.bigint;
case "symbol":
return ZodParsedType.symbol;
case "object":
if (Array.isArray(data)) {
return ZodParsedType.array;
}
if (data === null) {
return ZodParsedType.null;
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return ZodParsedType.promise;
}
if (typeof Map !== "undefined" && data instanceof Map) {
return ZodParsedType.map;
}
if (typeof Set !== "undefined" && data instanceof Set) {
return ZodParsedType.set;
}
if (typeof Date !== "undefined" && data instanceof Date) {
return ZodParsedType.date;
}
return ZodParsedType.object;
default:
return ZodParsedType.unknown;
}
};
@@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var tooltipRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = tooltipRole;
@@ -0,0 +1,44 @@
{
"name": "range-parser",
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
"description": "Range header field string parser",
"version": "1.2.1",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"James Wyatt Cready <wyatt.cready@lanetix.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"keywords": [
"range",
"parser",
"http"
],
"repository": "jshttp/range-parser",
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "5.16.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-markdown": "1.0.0",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-node": "8.0.1",
"eslint-plugin-promise": "4.1.1",
"eslint-plugin-standard": "4.0.0",
"mocha": "6.1.4",
"nyc": "14.1.1"
},
"files": [
"HISTORY.md",
"LICENSE",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"test-travis": "nyc --reporter=text npm test"
}
}
@@ -0,0 +1,162 @@
import { Static } from '../parser/index.mjs';
import * as T from '../type/index.mjs';
import * as S from './mapping.mjs';
export type TGenericReferenceParameterList_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = (TType<Input, Context> extends [infer _0, infer Input extends string] ? (Static.Token.Const<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TGenericReferenceParameterList_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TGenericReferenceParameterList<Input extends string, Context extends T.TProperties = {}> = (TGenericReferenceParameterList_0<Input, Context> extends [infer _0, infer Input extends string] ? ((TType<Input, Context> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : [] : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TGenericReferenceParameterListMapping<_0, Context>, Input] : [];
export type TGenericReference<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Ident<Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TGenericReferenceParameterList<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TGenericReferenceMapping<_0, Context>, Input] : [];
export type TGenericArgumentsList_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = (Static.Token.Ident<Input> extends [infer _0, infer Input extends string] ? (Static.Token.Const<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TGenericArgumentsList_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TGenericArgumentsList<Input extends string, Context extends T.TProperties = {}> = (TGenericArgumentsList_0<Input, Context> extends [infer _0, infer Input extends string] ? ((Static.Token.Ident<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : [] : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TGenericArgumentsListMapping<_0, Context>, Input] : [];
export type TGenericArguments<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'<', Input> extends [infer _0, infer Input extends string] ? TGenericArgumentsList<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TGenericArgumentsMapping<_0, Context>, Input] : [];
export type TKeywordString<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'string', Input> extends [infer _0 extends 'string', infer Input extends string] ? [S.TKeywordStringMapping<_0, Context>, Input] : [];
export type TKeywordNumber<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'number', Input> extends [infer _0 extends 'number', infer Input extends string] ? [S.TKeywordNumberMapping<_0, Context>, Input] : [];
export type TKeywordBoolean<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'boolean', Input> extends [infer _0 extends 'boolean', infer Input extends string] ? [S.TKeywordBooleanMapping<_0, Context>, Input] : [];
export type TKeywordUndefined<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'undefined', Input> extends [infer _0 extends 'undefined', infer Input extends string] ? [S.TKeywordUndefinedMapping<_0, Context>, Input] : [];
export type TKeywordNull<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'null', Input> extends [infer _0 extends 'null', infer Input extends string] ? [S.TKeywordNullMapping<_0, Context>, Input] : [];
export type TKeywordInteger<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'integer', Input> extends [infer _0 extends 'integer', infer Input extends string] ? [S.TKeywordIntegerMapping<_0, Context>, Input] : [];
export type TKeywordBigInt<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'bigint', Input> extends [infer _0 extends 'bigint', infer Input extends string] ? [S.TKeywordBigIntMapping<_0, Context>, Input] : [];
export type TKeywordUnknown<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'unknown', Input> extends [infer _0 extends 'unknown', infer Input extends string] ? [S.TKeywordUnknownMapping<_0, Context>, Input] : [];
export type TKeywordAny<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'any', Input> extends [infer _0 extends 'any', infer Input extends string] ? [S.TKeywordAnyMapping<_0, Context>, Input] : [];
export type TKeywordNever<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'never', Input> extends [infer _0 extends 'never', infer Input extends string] ? [S.TKeywordNeverMapping<_0, Context>, Input] : [];
export type TKeywordSymbol<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'symbol', Input> extends [infer _0 extends 'symbol', infer Input extends string] ? [S.TKeywordSymbolMapping<_0, Context>, Input] : [];
export type TKeywordVoid<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'void', Input> extends [infer _0 extends 'void', infer Input extends string] ? [S.TKeywordVoidMapping<_0, Context>, Input] : [];
export type TKeyword<Input extends string, Context extends T.TProperties = {}> = (TKeywordString<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNumber<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBoolean<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUndefined<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNull<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordInteger<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBigInt<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUnknown<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordAny<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNever<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordSymbol<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordVoid<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TKeywordMapping<_0, Context>, Input] : [];
export type TLiteralString<Input extends string, Context extends T.TProperties = {}> = Static.Token.String<["'", '"', '`'], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TLiteralStringMapping<_0, Context>, Input] : [];
export type TLiteralNumber<Input extends string, Context extends T.TProperties = {}> = Static.Token.Number<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TLiteralNumberMapping<_0, Context>, Input] : [];
export type TLiteralBoolean<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Static.Token.Const<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TLiteralBooleanMapping<_0, Context>, Input] : [];
export type TLiteral<Input extends string, Context extends T.TProperties = {}> = (TLiteralBoolean<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralNumber<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralString<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TLiteralMapping<_0, Context>, Input] : [];
export type TKeyOf<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'keyof', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown] | [], infer Input extends string] ? [S.TKeyOfMapping<_0, Context>, Input] : [];
export type TIndexArray_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = ((Static.Token.Const<'[', Input> extends [infer _0, infer Input extends string] ? TType<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Static.Token.Const<'[', Input> extends [infer _0, infer Input extends string] ? (Static.Token.Const<']', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [
infer _0,
infer Input extends string
] ? [_0, Input] : []) extends [infer _0, infer Input extends string] ? TIndexArray_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TIndexArray<Input extends string, Context extends T.TProperties = {}> = TIndexArray_0<Input, Context> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0, Context>, Input] : [];
export type TExtends<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'extends', Input> extends [infer _0, infer Input extends string] ? TType<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<'?', Input> extends [infer _2, infer Input extends string] ? TType<Input, Context> extends [infer _3, infer Input extends string] ? Static.Token.Const<':', Input> extends [infer _4, infer Input extends string] ? TType<Input, Context> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0, Context>, Input] : [];
export type TBase<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'(', Input> extends [infer _0, infer Input extends string] ? TType<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeyword<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TObject<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TTuple<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteral<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TConstructor<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TFunction<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TMapped<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TAsyncIterator<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TIterator<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TConstructorParameters<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TFunctionParameters<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TInstanceType<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TReturnType<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TArgument<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TAwaited<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TArray<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TRecord<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TPromise<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TPartial<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TRequired<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TPick<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TOmit<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TExclude<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TExtract<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TUppercase<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TLowercase<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TCapitalize<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TUncapitalize<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TDate<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TUint8Array<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericReference<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0, Context>, Input] : [];
export type TFactor<Input extends string, Context extends T.TProperties = {}> = (TKeyOf<Input, Context> extends [infer _0, infer Input extends string] ? TBase<Input, Context> extends [infer _1, infer Input extends string] ? TIndexArray<Input, Context> extends [infer _2, infer Input extends string] ? TExtends<Input, Context> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0, Context>, Input] : [];
export type TExprTermTail<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'&', Input> extends [infer _0, infer Input extends string] ? TFactor<Input, Context> extends [infer _1, infer Input extends string] ? TExprTermTail<Input, Context> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0, Context>, Input] : [];
export type TExprTerm<Input extends string, Context extends T.TProperties = {}> = (TFactor<Input, Context> extends [infer _0, infer Input extends string] ? (TExprTermTail<Input, Context> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprTermMapping<_0, Context>, Input] : [];
export type TExprTail<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'|', Input> extends [infer _0, infer Input extends string] ? TExprTerm<Input, Context> extends [infer _1, infer Input extends string] ? TExprTail<Input, Context> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTailMapping<_0, Context>, Input] : [];
export type TExpr<Input extends string, Context extends T.TProperties = {}> = (TExprTerm<Input, Context> extends [infer _0, infer Input extends string] ? (TExprTail<Input, Context> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprMapping<_0, Context>, Input] : [];
export type TType<Input extends string, Context extends T.TProperties = {}> = (TGenericArguments<Input, Context> extends [infer _0 extends T.TProperties, infer Input extends string] ? TExpr<Input, _0> : [] extends [infer _0, infer Input extends string] ? [_0, Input] : TExpr<Input, Context> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TTypeMapping<_0, Context>, Input] : [];
export type TPropertyKey<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Ident<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Static.Token.String<["'", '"'], Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends string, infer Input extends string] ? [S.TPropertyKeyMapping<_0, Context>, Input] : [];
export type TReadonly<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'readonly', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown] | [], infer Input extends string] ? [S.TReadonlyMapping<_0, Context>, Input] : [];
export type TOptional<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<'?', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown] | [], infer Input extends string] ? [S.TOptionalMapping<_0, Context>, Input] : [];
export type TProperty<Input extends string, Context extends T.TProperties = {}> = (TReadonly<Input, Context> extends [infer _0, infer Input extends string] ? TPropertyKey<Input, Context> extends [infer _1, infer Input extends string] ? TOptional<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<':', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TPropertyMapping<_0, Context>, Input] : [];
export type TPropertyDelimiter<Input extends string, Context extends T.TProperties = {}> = ((Static.Token.Const<',', Input> extends [infer _0, infer Input extends string] ? (Static.Token.Const<'\n', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [
infer _0,
infer Input extends string
] ? [_0, Input] : (Static.Token.Const<';', Input> extends [infer _0, infer Input extends string] ? (Static.Token.Const<'\n', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [
infer _0,
infer Input extends string
] ? [_0, Input] : (Static.Token.Const<',', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Static.Token.Const<';', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : (Static.Token.Const<'\n', Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [unknown], infer Input extends string] ? [S.TPropertyDelimiterMapping<_0, Context>, Input] : [];
export type TPropertyList_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = (TProperty<Input, Context> extends [infer _0, infer Input extends string] ? (TPropertyDelimiter<Input, Context> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TPropertyList_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TPropertyList<Input extends string, Context extends T.TProperties = {}> = (TPropertyList_0<Input, Context> extends [infer _0, infer Input extends string] ? ((TProperty<Input, Context> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : [] : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TPropertyListMapping<_0, Context>, Input] : [];
export type TObject<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'{', Input> extends [infer _0, infer Input extends string] ? TPropertyList<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<'}', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TObjectMapping<_0, Context>, Input] : [];
export type TElementList_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = (TType<Input, Context> extends [infer _0, infer Input extends string] ? (Static.Token.Const<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TElementList_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TElementList<Input extends string, Context extends T.TProperties = {}> = (TElementList_0<Input, Context> extends [infer _0, infer Input extends string] ? ((TType<Input, Context> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : [] : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TElementListMapping<_0, Context>, Input] : [];
export type TTuple<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'[', Input> extends [infer _0, infer Input extends string] ? TElementList<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TTupleMapping<_0, Context>, Input] : [];
export type TParameter<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Ident<Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<':', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TParameterMapping<_0, Context>, Input] : [];
export type TParameterList_0<Input extends string, Context extends T.TProperties, Result extends unknown[] = []> = (TParameter<Input, Context> extends [infer _0, infer Input extends string] ? (Static.Token.Const<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TParameterList_0<Input, Context, [...Result, _0]> : [Result, Input];
export type TParameterList<Input extends string, Context extends T.TProperties = {}> = (TParameterList_0<Input, Context> extends [infer _0, infer Input extends string] ? ((TParameter<Input, Context> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : [] : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TParameterListMapping<_0, Context>, Input] : [];
export type TFunction<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'(', Input> extends [infer _0, infer Input extends string] ? TParameterList<Input, Context> extends [infer _1, infer Input extends string] ? Static.Token.Const<')', Input> extends [infer _2, infer Input extends string] ? Static.Token.Const<'=>', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFunctionMapping<_0, Context>, Input] : [];
export type TConstructor<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'new', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'(', Input> extends [infer _1, infer Input extends string] ? TParameterList<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<')', Input> extends [infer _3, infer Input extends string] ? Static.Token.Const<'=>', Input> extends [infer _4, infer Input extends string] ? TType<Input, Context> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TConstructorMapping<_0, Context>, Input] : [];
export type TMapped<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'{', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'[', Input> extends [infer _1, infer Input extends string] ? Static.Token.Ident<Input> extends [infer _2, infer Input extends string] ? Static.Token.Const<'in', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<']', Input> extends [infer _5, infer Input extends string] ? Static.Token.Const<':', Input> extends [infer _6, infer Input extends string] ? TType<Input, Context> extends [infer _7, infer Input extends string] ? Static.Token.Const<'}', Input> extends [infer _8, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5, _6, _7, _8], Input] : [] : [] : [] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TMappedMapping<_0, Context>, Input] : [];
export type TAsyncIterator<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'AsyncIterator', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TAsyncIteratorMapping<_0, Context>, Input] : [];
export type TIterator<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Iterator', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TIteratorMapping<_0, Context>, Input] : [];
export type TArgument<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Argument', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TArgumentMapping<_0, Context>, Input] : [];
export type TAwaited<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Awaited', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TAwaitedMapping<_0, Context>, Input] : [];
export type TArray<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Array', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TArrayMapping<_0, Context>, Input] : [];
export type TRecord<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Record', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<',', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TRecordMapping<_0, Context>, Input] : [];
export type TPromise<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Promise', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TPromiseMapping<_0, Context>, Input] : [];
export type TConstructorParameters<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'ConstructorParameters', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TConstructorParametersMapping<_0, Context>, Input] : [];
export type TFunctionParameters<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Parameters', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFunctionParametersMapping<_0, Context>, Input] : [];
export type TInstanceType<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'InstanceType', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TInstanceTypeMapping<_0, Context>, Input] : [];
export type TReturnType<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'ReturnType', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TReturnTypeMapping<_0, Context>, Input] : [];
export type TPartial<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Partial', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TPartialMapping<_0, Context>, Input] : [];
export type TRequired<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Required', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TRequiredMapping<_0, Context>, Input] : [];
export type TPick<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Pick', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<',', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TPickMapping<_0, Context>, Input] : [];
export type TOmit<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Omit', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<',', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TOmitMapping<_0, Context>, Input] : [];
export type TExclude<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Exclude', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<',', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TExcludeMapping<_0, Context>, Input] : [];
export type TExtract<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Extract', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<',', Input> extends [infer _3, infer Input extends string] ? TType<Input, Context> extends [infer _4, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : [] : [] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TExtractMapping<_0, Context>, Input] : [];
export type TUppercase<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Uppercase', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TUppercaseMapping<_0, Context>, Input] : [];
export type TLowercase<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Lowercase', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TLowercaseMapping<_0, Context>, Input] : [];
export type TCapitalize<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Capitalize', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TCapitalizeMapping<_0, Context>, Input] : [];
export type TUncapitalize<Input extends string, Context extends T.TProperties = {}> = (Static.Token.Const<'Uncapitalize', Input> extends [infer _0, infer Input extends string] ? Static.Token.Const<'<', Input> extends [infer _1, infer Input extends string] ? TType<Input, Context> extends [infer _2, infer Input extends string] ? Static.Token.Const<'>', Input> extends [infer _3, infer Input extends string] ? [[_0, _1, _2, _3], Input] : [] : [] : [] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TUncapitalizeMapping<_0, Context>, Input] : [];
export type TDate<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'Date', Input> extends [infer _0 extends 'Date', infer Input extends string] ? [S.TDateMapping<_0, Context>, Input] : [];
export type TUint8Array<Input extends string, Context extends T.TProperties = {}> = Static.Token.Const<'Uint8Array', Input> extends [infer _0 extends 'Uint8Array', infer Input extends string] ? [S.TUint8ArrayMapping<_0, Context>, Input] : [];
export type TReference<Input extends string, Context extends T.TProperties = {}> = Static.Token.Ident<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TReferenceMapping<_0, Context>, Input] : [];
export declare const GenericReferenceParameterList_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const GenericReferenceParameterList: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const GenericReference: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const GenericArgumentsList_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const GenericArgumentsList: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const GenericArguments: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordString: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordNumber: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordBoolean: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordUndefined: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordNull: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordInteger: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordBigInt: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordUnknown: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordAny: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordNever: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordSymbol: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeywordVoid: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Keyword: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const LiteralString: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const LiteralNumber: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const LiteralBoolean: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Literal: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const KeyOf: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const IndexArray_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const IndexArray: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Extends: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Base: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Factor: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ExprTermTail: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ExprTerm: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ExprTail: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Expr: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Type: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const PropertyKey: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Readonly: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Optional: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Property: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const PropertyDelimiter: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const PropertyList_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const PropertyList: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const _Object: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ElementList_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const ElementList: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Tuple: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Parameter: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ParameterList_0: (input: string, context: T.TProperties, result?: unknown[]) => [unknown[], string];
export declare const ParameterList: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Function: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Constructor: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Mapped: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const AsyncIterator: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Iterator: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Argument: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Awaited: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Array: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Record: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Promise: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ConstructorParameters: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const FunctionParameters: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const InstanceType: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const ReturnType: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Partial: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Required: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Pick: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Omit: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Exclude: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Extract: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Uppercase: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Lowercase: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Capitalize: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Uncapitalize: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Date: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Uint8Array: (input: string, context?: T.TProperties) => [unknown, string] | [];
export declare const Reference: (input: string, context?: T.TProperties) => [unknown, string] | [];
@@ -0,0 +1,100 @@
import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from "@react-aria/focus";
import {useEffect as $jtpZv$useEffect} from "react";
import {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from "@react-aria/interactions";
/*
* 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.
*/
const $a11501f3d1d39e6c$var$visibleOverlays = [];
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
(0, $jtpZv$useEffect)(()=>{
if (isOpen) $a11501f3d1d39e6c$var$visibleOverlays.push(ref);
return ()=>{
let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);
};
}, [
isOpen,
ref
]);
// Only hide the overlay when it is the topmost visible overlay in the stack
let onHide = ()=>{
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
};
let onInteractOutsideStart = (e)=>{
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
}
};
let onInteractOutside = (e)=>{
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
onHide();
}
};
// Handle the escape key
let onKeyDown = (e)=>{
if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {
e.stopPropagation();
e.preventDefault();
onHide();
}
};
// Handle clicking outside the overlay to close it
(0, $jtpZv$useInteractOutside)({
ref: ref,
onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,
onInteractOutsideStart: onInteractOutsideStart
});
let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({
isDisabled: !shouldCloseOnBlur,
onBlurWithin: (e)=>{
// Do not close if relatedTarget is null, which means focus is lost to the body.
// That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.
// Clicking on the body to close the overlay should already be handled by useInteractOutside.
// https://github.com/adobe/react-spectrum/issues/4130
// https://github.com/adobe/react-spectrum/issues/4922
//
// If focus is moving into a child focus scope (e.g. menu inside a dialog),
// do not close the outer overlay. At this point, the active scope should
// still be the outer overlay, since blur events run before focus.
if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();
}
});
let onPointerDownUnderlay = (e)=>{
// fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846
if (e.target === e.currentTarget) e.preventDefault();
};
return {
overlayProps: {
onKeyDown: onKeyDown,
...focusWithinProps
},
underlayProps: {
onPointerDown: onPointerDownUnderlay
}
};
}
export {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};
//# sourceMappingURL=useOverlay.module.js.map
@@ -0,0 +1,141 @@
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2018 NAN contributors
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef NAN_CALLBACKS_H_
#define NAN_CALLBACKS_H_
template<typename T> class FunctionCallbackInfo;
template<typename T> class PropertyCallbackInfo;
template<typename T> class Global;
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
namespace Intercepted {
constexpr v8::Intercepted No() { return v8::Intercepted::kNo; }
constexpr v8::Intercepted Yes() { return v8::Intercepted::kYes; }
};
#else
namespace Intercepted {
inline void No() {}
inline void Yes() {}
};
#endif
typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
typedef void(*GetterCallback)
(v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
typedef void(*SetterCallback)(
v8::Local<v8::String>,
v8::Local<v8::Value>,
const PropertyCallbackInfo<void>&);
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
typedef v8::Intercepted(*PropertyGetterCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Value>&);
typedef v8::Intercepted(*PropertySetterCallback)(
v8::Local<v8::String>,
v8::Local<v8::Value>,
const PropertyCallbackInfo<void>&);
#else
typedef void(*PropertyGetterCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Value>&);
typedef void(*PropertySetterCallback)(
v8::Local<v8::String>,
v8::Local<v8::Value>,
const PropertyCallbackInfo<v8::Value>&);
#endif
typedef void(*PropertyEnumeratorCallback)
(const PropertyCallbackInfo<v8::Array>&);
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
typedef v8::Intercepted(*PropertyDeleterCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Boolean>&);
typedef v8::Intercepted(*PropertyQueryCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Integer>&);
typedef v8::Intercepted(*IndexGetterCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Value>&);
typedef v8::Intercepted(*IndexSetterCallback)(
uint32_t,
v8::Local<v8::Value>,
const PropertyCallbackInfo<void>&);
typedef v8::Intercepted(*IndexEnumeratorCallback)
(const PropertyCallbackInfo<v8::Array>&);
typedef v8::Intercepted(*IndexDeleterCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Boolean>&);
typedef v8::Intercepted(*IndexQueryCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Integer>&);
#else
typedef void(*PropertyDeleterCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Boolean>&);
typedef void(*PropertyQueryCallback)(
v8::Local<v8::String>,
const PropertyCallbackInfo<v8::Integer>&);
typedef void(*IndexGetterCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Value>&);
typedef void(*IndexSetterCallback)(
uint32_t,
v8::Local<v8::Value>,
const PropertyCallbackInfo<v8::Value>&);
typedef void(*IndexEnumeratorCallback)
(const PropertyCallbackInfo<v8::Array>&);
typedef void(*IndexDeleterCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Boolean>&);
typedef void(*IndexQueryCallback)(
uint32_t,
const PropertyCallbackInfo<v8::Integer>&);
#endif
namespace imp {
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
typedef v8::Local<v8::AccessorSignature> Sig;
#else
typedef v8::Local<v8::Data> Sig;
#endif
static const int kDataIndex = 0;
static const int kFunctionIndex = 1;
static const int kFunctionFieldCount = 2;
static const int kGetterIndex = 1;
static const int kSetterIndex = 2;
static const int kAccessorFieldCount = 3;
static const int kPropertyGetterIndex = 1;
static const int kPropertySetterIndex = 2;
static const int kPropertyEnumeratorIndex = 3;
static const int kPropertyDeleterIndex = 4;
static const int kPropertyQueryIndex = 5;
static const int kPropertyFieldCount = 6;
static const int kIndexPropertyGetterIndex = 1;
static const int kIndexPropertySetterIndex = 2;
static const int kIndexPropertyEnumeratorIndex = 3;
static const int kIndexPropertyDeleterIndex = 4;
static const int kIndexPropertyQueryIndex = 5;
static const int kIndexPropertyFieldCount = 6;
} // end of namespace imp
#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
# include "nan_callbacks_12_inl.h" // NOLINT(build/include)
#else
# include "nan_callbacks_pre_12_inl.h" // NOLINT(build/include)
#endif
#endif // NAN_CALLBACKS_H_
@@ -0,0 +1,194 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
enum testEnum {
A = 0,
B = 1,
}
const schemas = [
z.string().readonly(),
z.number().readonly(),
z.nan().readonly(),
z.bigint().readonly(),
z.boolean().readonly(),
z.date().readonly(),
z.undefined().readonly(),
z.null().readonly(),
z.any().readonly(),
z.unknown().readonly(),
z.void().readonly(),
z.function().args(z.string(), z.number()).readonly(),
z.array(z.string()).readonly(),
z.tuple([z.string(), z.number()]).readonly(),
z.map(z.string(), z.date()).readonly(),
z.set(z.promise(z.string())).readonly(),
z.record(z.string()).readonly(),
z.record(z.string(), z.number()).readonly(),
z.object({ a: z.string(), 1: z.number() }).readonly(),
z.nativeEnum(testEnum).readonly(),
z.promise(z.string()).readonly(),
] as const;
test("flat inference", () => {
util.assertEqual<z.infer<(typeof schemas)[0]>, string>(true);
util.assertEqual<z.infer<(typeof schemas)[1]>, number>(true);
util.assertEqual<z.infer<(typeof schemas)[2]>, number>(true);
util.assertEqual<z.infer<(typeof schemas)[3]>, bigint>(true);
util.assertEqual<z.infer<(typeof schemas)[4]>, boolean>(true);
util.assertEqual<z.infer<(typeof schemas)[5]>, Date>(true);
util.assertEqual<z.infer<(typeof schemas)[6]>, undefined>(true);
util.assertEqual<z.infer<(typeof schemas)[7]>, null>(true);
util.assertEqual<z.infer<(typeof schemas)[8]>, any>(true);
util.assertEqual<z.infer<(typeof schemas)[9]>, Readonly<unknown>>(true);
util.assertEqual<z.infer<(typeof schemas)[10]>, void>(true);
util.assertEqual<z.infer<(typeof schemas)[11]>, (args_0: string, args_1: number, ...args_2: unknown[]) => unknown>(
true
);
util.assertEqual<z.infer<(typeof schemas)[12]>, readonly string[]>(true);
util.assertEqual<z.infer<(typeof schemas)[13]>, readonly [string, number]>(true);
util.assertEqual<z.infer<(typeof schemas)[14]>, ReadonlyMap<string, Date>>(true);
util.assertEqual<z.infer<(typeof schemas)[15]>, ReadonlySet<Promise<string>>>(true);
util.assertEqual<z.infer<(typeof schemas)[16]>, Readonly<Record<string, string>>>(true);
util.assertEqual<z.infer<(typeof schemas)[17]>, Readonly<Record<string, number>>>(true);
util.assertEqual<z.infer<(typeof schemas)[18]>, { readonly a: string; readonly 1: number }>(true);
util.assertEqual<z.infer<(typeof schemas)[19]>, Readonly<testEnum>>(true);
util.assertEqual<z.infer<(typeof schemas)[20]>, Promise<string>>(true);
});
// test("deep inference", () => {
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[0]>, string>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[1]>, number>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[2]>, number>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[3]>, bigint>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[4]>, boolean>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[5]>, Date>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[6]>, undefined>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[7]>, null>(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[8]>, any>(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[9]>,
// Readonly<unknown>
// >(true);
// util.assertEqual<z.infer<(typeof deepReadonlySchemas_0)[10]>, void>(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[11]>,
// (args_0: string, args_1: number, ...args_2: unknown[]) => unknown
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[12]>,
// readonly string[]
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[13]>,
// readonly [string, number]
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[14]>,
// ReadonlyMap<string, Date>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[15]>,
// ReadonlySet<Promise<string>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[16]>,
// Readonly<Record<string, string>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[17]>,
// Readonly<Record<string, number>>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[18]>,
// { readonly a: string; readonly 1: number }
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[19]>,
// Readonly<testEnum>
// >(true);
// util.assertEqual<
// z.infer<(typeof deepReadonlySchemas_0)[20]>,
// Promise<string>
// >(true);
// util.assertEqual<
// z.infer<typeof crazyDeepReadonlySchema>,
// ReadonlyMap<
// ReadonlySet<readonly [string, number]>,
// {
// readonly a: {
// readonly [x: string]: readonly any[];
// };
// readonly b: {
// readonly c: {
// readonly d: {
// readonly e: {
// readonly f: {
// readonly g?: {};
// };
// };
// };
// };
// };
// }
// >
// >(true);
// });
test("object freezing", () => {
expect(Object.isFrozen(z.array(z.string()).readonly().parse(["a"]))).toBe(true);
expect(Object.isFrozen(z.tuple([z.string(), z.number()]).readonly().parse(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
z
.map(z.string(), z.date())
.readonly()
.parse(new Map([["a", new Date()]]))
)
).toBe(true);
expect(
Object.isFrozen(
z
.set(z.promise(z.string()))
.readonly()
.parse(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(z.record(z.string()).readonly().parse({ a: "b" }))).toBe(true);
expect(Object.isFrozen(z.record(z.string(), z.number()).readonly().parse({ a: 1 }))).toBe(true);
expect(Object.isFrozen(z.object({ a: z.string(), 1: z.number() }).readonly().parse({ a: "b", 1: 2 }))).toBe(true);
expect(Object.isFrozen(z.promise(z.string()).readonly().parse(Promise.resolve("a")))).toBe(true);
});
test("async object freezing", async () => {
expect(Object.isFrozen(await z.array(z.string()).readonly().parseAsync(["a"]))).toBe(true);
expect(Object.isFrozen(await z.tuple([z.string(), z.number()]).readonly().parseAsync(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
await z
.map(z.string(), z.date())
.readonly()
.parseAsync(new Map([["a", new Date()]]))
)
).toBe(true);
expect(
Object.isFrozen(
await z
.set(z.promise(z.string()))
.readonly()
.parseAsync(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(await z.record(z.string()).readonly().parseAsync({ a: "b" }))).toBe(true);
expect(Object.isFrozen(await z.record(z.string(), z.number()).readonly().parseAsync({ a: 1 }))).toBe(true);
expect(
Object.isFrozen(await z.object({ a: z.string(), 1: z.number() }).readonly().parseAsync({ a: "b", 1: 2 }))
).toBe(true);
expect(Object.isFrozen(await z.promise(z.string()).readonly().parseAsync(Promise.resolve("a")))).toBe(true);
});
@@ -0,0 +1,149 @@
# 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).
## [v1.1.1](https://github.com/inspect-js/is-number-object/compare/v1.1.0...v1.1.1) - 2024-12-15
### Commits
- [Dev Deps] update `@arethetypeswrong/cli`,` @ljharb/tsconfig`, `@types/tape` [`00d566d`](https://github.com/inspect-js/is-number-object/commit/00d566d869ee316c896aa6f3cd694996bab6f482)
- [Refactor] use `call-bound` directly [`073d5df`](https://github.com/inspect-js/is-number-object/commit/073d5df97278ab54e32750f24d4eeee1d94965d4)
- [Deps] update `call-bind` [`36c84af`](https://github.com/inspect-js/is-number-object/commit/36c84afd5553a538cceb3da56a8721b597f540bc)
## [v1.1.0](https://github.com/inspect-js/is-number-object/compare/v1.0.7...v1.1.0) - 2024-12-01
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`cb8423c`](https://github.com/inspect-js/is-number-object/commit/cb8423cd42bded7c9321e785a97c5305c2706b02)
- [New] add types [`273e406`](https://github.com/inspect-js/is-number-object/commit/273e4063e786210ce135237f1232630eecc22a88)
- [actions] split out node 10-20, and 20+ [`3da6267`](https://github.com/inspect-js/is-number-object/commit/3da6267437bbc8d8322abc231f6fbcdbdce1b9b4)
- [Robustness] use `call-bind` [`834c098`](https://github.com/inspect-js/is-number-object/commit/834c09801d923ddf638585a94020b7c3b3cec3dc)
- [actions] update rebase action to use reusable workflow [`84a8a9f`](https://github.com/inspect-js/is-number-object/commit/84a8a9f61b1e098cba7d2603d98c06fc96b60d60)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `npmignore`, `tape` [`7275bca`](https://github.com/inspect-js/is-number-object/commit/7275bcad3910fe3073ca960fdb8018904f4eb5a0)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`49a83aa`](https://github.com/inspect-js/is-number-object/commit/49a83aa830081afcbeae32adcd853f19202acc89)
- [Tests] replace `aud` with `npm audit` [`061492b`](https://github.com/inspect-js/is-number-object/commit/061492b782012e0d58714bdf8a1423910d6ea49a)
- [Refactor] avoid an expensive check, for null [`08d29a8`](https://github.com/inspect-js/is-number-object/commit/08d29a8442f5340eedc3817eddd8d1f4bfd02be2)
- [Deps] update `has-tostringtag` [`4e2ad65`](https://github.com/inspect-js/is-number-object/commit/4e2ad656b23fcfdc3fe8979c7865f501f49c4704)
- [Dev Deps] add missing peer dep [`8228bfa`](https://github.com/inspect-js/is-number-object/commit/8228bfa94317d0cd5a5e880991cb3c0f0c5e119b)
## [v1.0.7](https://github.com/inspect-js/is-number-object/compare/v1.0.6...v1.0.7) - 2022-04-01
### Commits
- [actions] reuse common workflows [`8f9a1b0`](https://github.com/inspect-js/is-number-object/commit/8f9a1b040a435a5c5d12150952d0e6f96d4f713a)
- [meta] better `eccheck` command [`9dc8dff`](https://github.com/inspect-js/is-number-object/commit/9dc8dff273e4d0b954fd4f2a2eacc849d321b646)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`c50ecbf`](https://github.com/inspect-js/is-number-object/commit/c50ecbfc7577c69324fca4d2b40dd354c5156be9)
- [actions] update codecov uploader [`f1a2560`](https://github.com/inspect-js/is-number-object/commit/f1a2560d4a996abea90f7a792069a35359869b67)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`4b06ace`](https://github.com/inspect-js/is-number-object/commit/4b06aceeba2ebf0887af020aa89caad8950e5f47)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `tape` [`3dc0e8b`](https://github.com/inspect-js/is-number-object/commit/3dc0e8b0fcc96a9bc9936e9a62a523fe67bafca5)
- [meta] add `bugs`/`homepage` package.json fields [`d7e0bcf`](https://github.com/inspect-js/is-number-object/commit/d7e0bcf1fe1b4a48d6500266c8b4058c854fecba)
## [v1.0.6](https://github.com/inspect-js/is-number-object/compare/v1.0.5...v1.0.6) - 2021-08-05
### Commits
- [Tests] run tests with core-js as well [`5177312`](https://github.com/inspect-js/is-number-object/commit/51773120b18e27bfe8a3bd228ef2e21f5802f338)
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`ca2b31d`](https://github.com/inspect-js/is-number-object/commit/ca2b31d81c5d7d9b11e812dee58cd627a6d634e2)
- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`50950f9`](https://github.com/inspect-js/is-number-object/commit/50950f962a4b1188c478f6034194d7eb4314c884)
## [v1.0.5](https://github.com/inspect-js/is-number-object/compare/v1.0.4...v1.0.5) - 2021-05-07
### Commits
- [Tests] migrate tests to Github Actions [`9666737`](https://github.com/inspect-js/is-number-object/commit/96667372f8e36f70516218f86318f957f8c175ad)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7815ce2`](https://github.com/inspect-js/is-number-object/commit/7815ce21cb5662c2d1651b3ec302f186aa8a016b)
- [meta] do not publish github action workflow files [`80ccb75`](https://github.com/inspect-js/is-number-object/commit/80ccb7509f91732675b018cc1a636d649a92889e)
- [Tests] run `nyc` on all tests [`c9ffb74`](https://github.com/inspect-js/is-number-object/commit/c9ffb74443690ef22f9aa7dd35855fd1e3be5184)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7e84161`](https://github.com/inspect-js/is-number-object/commit/7e84161d089c87ef42e3639ac1889642624ebd28)
- [readme] add actions and codecov badges [`0c5ec7a`](https://github.com/inspect-js/is-number-object/commit/0c5ec7aa87dac27bdcda2365124c3aa0ccf9c278)
- [actions] add Require Allow Edits workflow [`dd0fb74`](https://github.com/inspect-js/is-number-object/commit/dd0fb74b2ecb630ea7778a6f06dcc017323a3c1d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` [`2d36f80`](https://github.com/inspect-js/is-number-object/commit/2d36f809a7b9896958b0b0f3b69be0067caedb45)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`77d3140`](https://github.com/inspect-js/is-number-object/commit/77d3140557d483e467ce070b21bf384e9a7562d5)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`75d4abf`](https://github.com/inspect-js/is-number-object/commit/75d4abf34168e69d73f621c696a16179ddc0873c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`0c2a917`](https://github.com/inspect-js/is-number-object/commit/0c2a917e4802b102888759fad912bd9faa5587f7)
- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`8b6ebc4`](https://github.com/inspect-js/is-number-object/commit/8b6ebc489db14a0c369214e081413f326fc0d598)
- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`62045fc`](https://github.com/inspect-js/is-number-object/commit/62045fcaddb9e4d3ef81068e99d07d21cd62023b)
- [actions] use checkout v2; remove unneeded env [`d48cd06`](https://github.com/inspect-js/is-number-object/commit/d48cd06720ea71f278a6d35c6f0a8ec04242a58f)
- [meta] use `prepublishOnly` script for npm 7+ [`827ab0d`](https://github.com/inspect-js/is-number-object/commit/827ab0d52d25f46d232ae7442ece270dec2de1df)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfed500`](https://github.com/inspect-js/is-number-object/commit/bfed500e6cc3cd3b9e7ffea78429c59857035791)
- [meta] remove explicit audit level config [`ce23e5e`](https://github.com/inspect-js/is-number-object/commit/ce23e5e49fbebe190267d8c99ddfd880a963b7ee)
- [meta] gitignore coverage output [`f1ad981`](https://github.com/inspect-js/is-number-object/commit/f1ad98106549c1c88322d8cb206068ea4c5bd424)
## [v1.0.4](https://github.com/inspect-js/is-number-object/compare/v1.0.3...v1.0.4) - 2019-12-18
### Commits
- [Tests] use shared travis-ci configs [`792b5aa`](https://github.com/inspect-js/is-number-object/commit/792b5aa5e7313ddf5507f7283bb7d5d5c646b11b)
- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`dc66db7`](https://github.com/inspect-js/is-number-object/commit/dc66db7dd1eca0263f6602597eb40601519e912e)
- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`7660fed`](https://github.com/inspect-js/is-number-object/commit/7660fed03a7060eb5c91e74b9a17303d4fac1056)
- [Tests] remove `jscs` [`f1fee97`](https://github.com/inspect-js/is-number-object/commit/f1fee97423478bcc653c844fadda55138d9b9a54)
- [meta] add `auto-changelog` [`4b1c225`](https://github.com/inspect-js/is-number-object/commit/4b1c2253770eb18761a1e8b157772028d6f742c4)
- [meta] remove unused Makefile and associated utilities [`379b979`](https://github.com/inspect-js/is-number-object/commit/379b9793d9c61d7889e53bd9de9578dca9964ebc)
- Update `covert`, `jscs`, `eslint`, `semver` [`16d2af8`](https://github.com/inspect-js/is-number-object/commit/16d2af82a6c93aee614f7a4b2c468411c743e95f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is`, `replace`, `semver`, `tape` [`21c0f04`](https://github.com/inspect-js/is-number-object/commit/21c0f0431984b87443c6acb9f003368feb7b4368)
- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver`. Add `replace`. Use `^` instead of `~`. [`19d6ee3`](https://github.com/inspect-js/is-number-object/commit/19d6ee3a3d4a87764d57316804fd8b882ba5197c)
- Update `eslint` [`d32754b`](https://github.com/inspect-js/is-number-object/commit/d32754bcca0033e01eba531c4353d1239e992203)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace` [`1df8165`](https://github.com/inspect-js/is-number-object/commit/1df8165dd63d9f2f78ccb78e905d0a6b3e302884)
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`675372b`](https://github.com/inspect-js/is-number-object/commit/675372b115fb20b5034f40bcbb5560c6c0512746)
- [readme] clean up readme; remove testling; fix repo URLs [`80e29c4`](https://github.com/inspect-js/is-number-object/commit/80e29c4d6d0811fc361e95ee83b81280bf3ae3f5)
- [Tests] up to `node` `v12.7`, `v10.16`, `v8.16` [`287a968`](https://github.com/inspect-js/is-number-object/commit/287a9687b1fc3d091ec231c06f19a19ff7b0e8f6)
- Test on latest `iojs` and `node` versions. [`11c98a2`](https://github.com/inspect-js/is-number-object/commit/11c98a23b232cb21c7daab797fd63875c2970681)
- [actions] add automatic rebasing / merge commit blocking [`022d026`](https://github.com/inspect-js/is-number-object/commit/022d026129df445f239ba2ecd8d47a2786242d75)
- [meta] create FUNDING.yml [`7f52710`](https://github.com/inspect-js/is-number-object/commit/7f527107168aad7108b7c262d295dcf44e03214d)
- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`bc8cd50`](https://github.com/inspect-js/is-number-object/commit/bc8cd508fe4440168f9b049be3ddf93c56c06c49)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`1f9200b`](https://github.com/inspect-js/is-number-object/commit/1f9200b7c56840dc23eeeca5d0ee4f64a0446e08)
- [Tests] up to `node` `v12.11` [`706d50a`](https://github.com/inspect-js/is-number-object/commit/706d50a779b90feb3f4d2ae88d8189d19b913073)
- [Dev Deps] update `jscs` [`e3591a4`](https://github.com/inspect-js/is-number-object/commit/e3591a445b1af25d46632eafea51efa07b4eb6dc)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`baf4ee7`](https://github.com/inspect-js/is-number-object/commit/baf4ee749fb65ec12e9cab102e77aa0e14312109)
- Update `nsp`, `eslint` [`61b18d5`](https://github.com/inspect-js/is-number-object/commit/61b18d5b44542fddf4950534d506b20d8c8b1f44)
- Update `eslint`, `semver` [`52e61bd`](https://github.com/inspect-js/is-number-object/commit/52e61bd4334c0a1afacd147fd0bc1e2c1be10df5)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`; add `safe-publish-latest` [`79db7f6`](https://github.com/inspect-js/is-number-object/commit/79db7f610d2bcf5f0d6e8ca834f7402504101072)
- Only apps should have lockfiles [`677b9b4`](https://github.com/inspect-js/is-number-object/commit/677b9b4fb6ad9d7b984cb0f89c8b5a6df143b29a)
- Test on `io.js` `v2.2` [`e8a38b2`](https://github.com/inspect-js/is-number-object/commit/e8a38b2fe73b841b0ed55d9f60573d460a4f2a62)
- [meta] add `funding` field [`85315e7`](https://github.com/inspect-js/is-number-object/commit/85315e75c119a2aef70a766f2ddc1079b64d006b)
- [Dev Deps] update `eslint`, `tape` [`f3581aa`](https://github.com/inspect-js/is-number-object/commit/f3581aaea310546f6ee4612990468d39f058d320)
- [Tests] use `eclint` instead of `editorconfig-tools` [`7b53680`](https://github.com/inspect-js/is-number-object/commit/7b5368071000eb1c715aeeee5ff47ffdbee9fe5c)
- [Dev Deps] update `semver`, `tape` [`d6b524a`](https://github.com/inspect-js/is-number-object/commit/d6b524ac2e8c0240c436cbe8828671e383d51fd5)
- [Dev Deps] Update `tape`, `eslint` [`be19203`](https://github.com/inspect-js/is-number-object/commit/be19203dee0aa70ff8f09823bf880a38b824e1ed)
- Test up to `io.js` `v2.1` [`feb7ba6`](https://github.com/inspect-js/is-number-object/commit/feb7ba63a0816f1d36419ce240f96e9b4e4c90ba)
- Test up to `io.js` `v3.0` [`7be1f0a`](https://github.com/inspect-js/is-number-object/commit/7be1f0a25dc59b6606be9ee1ace38cb7039a59d2)
- [Dev Deps] update `tape` [`d9a2318`](https://github.com/inspect-js/is-number-object/commit/d9a2318bc82477e9321e961def11e28d364e5562)
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a6cd411`](https://github.com/inspect-js/is-number-object/commit/a6cd411c6bd92691a48b52683afce584c2c6b21b)
- Test on `io.js` `v2.4` [`46c2e7f`](https://github.com/inspect-js/is-number-object/commit/46c2e7f2ce8ad7f8ab3c1da827d93fc2780eff06)
- Test on `io.js` `v2.3` [`9c344b0`](https://github.com/inspect-js/is-number-object/commit/9c344b0df83628908a1f776a3f2e5fc4fae1d4d2)
- Fix tests for faked @@toStringTag [`f8c446e`](https://github.com/inspect-js/is-number-object/commit/f8c446e9fc320c23807717356e259529f494b9f3)
## [v1.0.3](https://github.com/inspect-js/is-number-object/compare/v1.0.2...v1.0.3) - 2015-01-29
### Commits
- If @@toStringTag is not present, use the old-school Object#toString test. [`9b2a4df`](https://github.com/inspect-js/is-number-object/commit/9b2a4df6ccf903e89198d4244eeb7f47a7056327)
## [v1.0.2](https://github.com/inspect-js/is-number-object/compare/v1.0.1...v1.0.2) - 2015-01-29
### Commits
- Improve optimizability of the non-try/catch part. [`7e6be2f`](https://github.com/inspect-js/is-number-object/commit/7e6be2fd2346557fc81bd544ac8745021c50e266)
- Fix package.json [`4f2ebea`](https://github.com/inspect-js/is-number-object/commit/4f2ebeae09c45e1eefeb2c10a011ff2ef0aca921)
## [v1.0.1](https://github.com/inspect-js/is-number-object/compare/v1.0.0...v1.0.1) - 2015-01-29
### Commits
- Use Object() instead of new Number() [`1aaa746`](https://github.com/inspect-js/is-number-object/commit/1aaa746c26878a0f698aabea4d88215311f2a38d)
- Add early exits for typeof number, or typeof not "object". [`eae4337`](https://github.com/inspect-js/is-number-object/commit/eae43375d3f88e04bb10eabd954e5a6b66ad5305)
## v1.0.0 - 2015-01-28
### Commits
- Dotfiles. [`9c74e3e`](https://github.com/inspect-js/is-number-object/commit/9c74e3eb2b10398d4022de7c4015531e874f06c8)
- `make release` [`a99e5ae`](https://github.com/inspect-js/is-number-object/commit/a99e5aeb3995a7d543fc5833722bc02011fabad6)
- package.json [`4fed9ef`](https://github.com/inspect-js/is-number-object/commit/4fed9ef7c35ccfc45ca8acd3c92c9cb91c7daa6d)
- Read me [`c91d6ba`](https://github.com/inspect-js/is-number-object/commit/c91d6ba00de79eaaac5fec7c9d8866d61d0abb62)
- Initial commit [`629fb96`](https://github.com/inspect-js/is-number-object/commit/629fb969f076e0802c799b368c7b02556bb0750e)
- Tests. [`a39de62`](https://github.com/inspect-js/is-number-object/commit/a39de624785cc204ed7c0ea5518f1c878870ceb1)
- Implementation. [`aedd91e`](https://github.com/inspect-js/is-number-object/commit/aedd91e6fc23f00852ad1266b6c19f32b7f93a22)
@@ -0,0 +1,6 @@
module.exports = {
"breadcrumbs": `\u{41D}\u{430}\u{432}\u{456}\u{433}\u{430}\u{446}\u{456}\u{439}\u{43D}\u{430} \u{441}\u{442}\u{435}\u{436}\u{43A}\u{430}`
};
//# sourceMappingURL=uk-UA.main.js.map
@@ -0,0 +1,36 @@
const ALIAS = Symbol.for('yaml.alias');
const DOC = Symbol.for('yaml.document');
const MAP = Symbol.for('yaml.map');
const PAIR = Symbol.for('yaml.pair');
const SCALAR = Symbol.for('yaml.scalar');
const SEQ = Symbol.for('yaml.seq');
const NODE_TYPE = Symbol.for('yaml.node.type');
const isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;
const isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;
const isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;
const isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;
const isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;
const isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;
function isCollection(node) {
if (node && typeof node === 'object')
switch (node[NODE_TYPE]) {
case MAP:
case SEQ:
return true;
}
return false;
}
function isNode(node) {
if (node && typeof node === 'object')
switch (node[NODE_TYPE]) {
case ALIAS:
case MAP:
case SCALAR:
case SEQ:
return true;
}
return false;
}
const hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
export { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq };
@@ -0,0 +1,22 @@
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
module.exports = isUndefined;
@@ -0,0 +1,27 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isSetEqual", () => $abed55ea619a7a17$export$a8d0d0c8d1c5df64);
/*
* 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.
*/ /** Returns whether two sets are equal. */ function $abed55ea619a7a17$export$a8d0d0c8d1c5df64(a, b) {
if (a === b) return true;
if (a.size !== b.size) return false;
for (let key of a){
if (!b.has(key)) return false;
}
return true;
}
//# sourceMappingURL=utils.main.js.map
@@ -0,0 +1 @@
{"name":"@types/minimist","version":"1.2.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532119041,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532119041,"integrity":"sha512-1add/phw2K5J+3OG14B9LpJfYG9izv4uK2f9uAyeI0CMYxuw2KVpK/qFcR3J+kz86cVG5KkKFlz6edxpNTGcOw==","mode":420,"size":632},"index.d.ts":{"checkedAt":1794532119042,"integrity":"sha512-agC9j/dgXdkkcYe3V518TCWCiw6VmOFq2JD7Jf4mfR4ietzw5glojpy60sUGs/ZhKJfxSm1YthC3ft9WwG2Juw==","mode":420,"size":3225},"package.json":{"checkedAt":1794532119042,"integrity":"sha512-sk0lYRIhM+vDW5odIrE2LNKLU7WrAO7xnt0LgwSWiDhIanh9q7xq0dWXinhRN4K8k4dDTZ0MzvNjbit3Qa6VEQ==","mode":420,"size":1269}}}
@@ -0,0 +1,50 @@
/**
* Wrap words to a specified length.
*/
export = wrap;
declare function wrap(str: string, options?: wrap.IOptions): string;
declare namespace wrap {
export interface IOptions {
/**
* The width of the text before wrapping to a new line.
* @default ´50´
*/
width?: number;
/**
* The string to use at the beginning of each line.
* @default ´ ´ (two spaces)
*/
indent?: string;
/**
* The string to use at the end of each line.
* @default ´\n´
*/
newline?: string;
/**
* An escape function to run on each line after splitting them.
* @default (str: string) => string;
*/
escape?: (str: string) => string;
/**
* Trim trailing whitespace from the returned string.
* This option is included since .trim() would also strip
* the leading indentation from the first line.
* @default true
*/
trim?: boolean;
/**
* Break a word between any two letters when the word is longer
* than the specified width.
* @default false
*/
cut?: boolean;
}
}
@@ -0,0 +1,532 @@
import { describe, expect, test } from "vitest";
import * as z from "zod/v4";
describe("basic refinement functionality", () => {
test("should create a new schema instance when refining", () => {
const obj1 = z.object({
first: z.string(),
second: z.string(),
});
const obj2 = obj1.partial().strict();
const obj3 = obj2.refine((data) => data.first || data.second, "Either first or second should be filled in.");
expect(obj1 === (obj2 as any)).toEqual(false);
expect(obj2 === (obj3 as any)).toEqual(false);
});
test("should validate according to refinement logic", () => {
const schema = z
.object({
first: z.string(),
second: z.string(),
})
.partial()
.strict()
.refine((data) => data.first || data.second, "Either first or second should be filled in.");
// Should fail on empty object
expect(() => schema.parse({})).toThrow();
// Should pass with first property
expect(schema.parse({ first: "a" })).toEqual({ first: "a" });
// Should pass with second property
expect(schema.parse({ second: "a" })).toEqual({ second: "a" });
// Should pass with both properties
expect(schema.parse({ first: "a", second: "a" })).toEqual({ first: "a", second: "a" });
});
test("should validate strict mode correctly", () => {
const schema = z
.object({
first: z.string(),
second: z.string(),
})
.partial()
.strict();
// Should throw on extra properties
expect(() => schema.parse({ third: "adsf" })).toThrow();
});
});
describe("refinement with custom error messages", () => {
test("should use custom error message when validation fails", () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine((data) => data.password === data.confirmPassword, "Both password and confirmation must match");
const result = validationSchema.safeParse({
email: "aaaa@gmail.com",
password: "aaaaaaaa",
confirmPassword: "bbbbbbbb",
});
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].message).toEqual("Both password and confirmation must match");
}
});
});
describe("async refinements", () => {
test("should support async refinement functions", async () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine(
(data) => Promise.resolve().then(() => data.password === data.confirmPassword),
"Both password and confirmation must match"
);
// Should pass with matching passwords
const validData = {
email: "aaaa@gmail.com",
password: "password",
confirmPassword: "password",
};
await expect(validationSchema.parseAsync(validData)).resolves.toEqual(validData);
// Should fail with non-matching passwords
await expect(
validationSchema.parseAsync({
email: "aaaa@gmail.com",
password: "password",
confirmPassword: "different",
})
).rejects.toThrow();
});
});
describe("early termination options", () => {
test("should abort early with continue: false", () => {
const schema = z
.string()
.superRefine((val, ctx) => {
if (val.length < 2) {
ctx.addIssue({
code: "custom",
message: "BAD",
continue: false,
});
}
})
.refine((_) => false);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].message).toEqual("BAD");
}
});
test("should abort early with fatal: true", () => {
const schema = z
.string()
.superRefine((val, ctx) => {
if (val.length < 2) {
ctx.addIssue({
code: "custom",
fatal: true,
message: "BAD",
});
}
})
.refine((_) => false);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].message).toEqual("BAD");
}
});
test("should abort early with abort flag", () => {
const schema = z
.string()
.refine((_) => false, { abort: true })
.refine((_) => false);
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
}
});
});
describe("custom error paths", () => {
test("should use custom path in error message", async () => {
const result = await z
.object({ password: z.string(), confirm: z.string() })
.refine((data) => data.confirm === data.password, { path: ["confirm"] })
.safeParse({ password: "asdf", confirm: "qewr" });
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].path).toEqual(["confirm"]);
}
});
});
describe("superRefine functionality", () => {
test("should support multiple validation rules", () => {
const Strings = z.array(z.string()).superRefine((val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
input: val,
code: "too_big",
origin: "array",
maximum: 3,
inclusive: true,
exact: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
input: val,
code: "custom",
message: `No duplicates allowed.`,
});
}
});
// Should fail with too many items and duplicates
const result = Strings.safeParse(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].message).toEqual("Too many items 😡");
expect(result.error.issues[1].message).toEqual("No duplicates allowed.");
}
// Should pass with valid input
const validArray = ["asfd", "qwer"];
expect(Strings.parse(validArray)).toEqual(validArray);
});
test("should support async superRefine", async () => {
const Strings = z.array(z.string()).superRefine(async (val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
input: val,
code: "too_big",
origin: "array",
maximum: 3,
inclusive: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
input: val,
code: "custom",
message: `No duplicates allowed.`,
});
}
});
// Should fail with too many items and duplicates
const result = await Strings.safeParseAsync(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(2);
}
// Should pass with valid input
const validArray = ["asfd", "qwer"];
await expect(Strings.parseAsync(validArray)).resolves.toEqual(validArray);
});
test("should accept string as shorthand for custom error message", () => {
const schema = z.string().superRefine((_, ctx) => {
ctx.addIssue("bad stuff");
});
const result = schema.safeParse("asdf");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues).toHaveLength(1);
expect(result.error.issues[0].message).toEqual("bad stuff");
}
});
test("should respect fatal flag in superRefine", () => {
const schema = z
.string()
.superRefine((val, ctx) => {
if (val === "") {
ctx.addIssue({
input: val,
code: "custom",
message: "foo",
fatal: true,
});
}
})
.superRefine((val, ctx) => {
if (val !== " ") {
ctx.addIssue({
input: val,
code: "custom",
message: "bar",
});
}
});
const result = schema.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].message).toEqual("foo");
}
});
});
describe("chained refinements", () => {
test("should collect all validation errors when appropriate", () => {
const objectSchema = z
.object({
length: z.number(),
size: z.number(),
})
.refine(({ length }) => length > 5, {
path: ["length"],
message: "length greater than 5",
})
.refine(({ size }) => size > 7, {
path: ["size"],
message: "size greater than 7",
});
// Should fail with one error
const r1 = objectSchema.safeParse({
length: 4,
size: 9,
});
expect(r1.success).toEqual(false);
if (!r1.success) {
expect(r1.error.issues.length).toEqual(1);
expect(r1.error.issues[0].path).toEqual(["length"]);
}
// Should fail with two errors
const r2 = objectSchema.safeParse({
length: 4,
size: 3,
});
expect(r2.success).toEqual(false);
if (!r2.success) {
expect(r2.error.issues.length).toEqual(2);
}
// Should pass with valid input
const validData = {
length: 6,
size: 8,
};
expect(objectSchema.parse(validData)).toEqual(validData);
});
});
// Commented tests can be uncommented once type-checking issues are resolved
/*
describe("type refinement", () => {
test("refinement type guard", () => {
const validationSchema = z.object({
a: z.string().refine((s): s is "a" => s === "a"),
});
type Input = z.input<typeof validationSchema>;
type Schema = z.infer<typeof validationSchema>;
expectTypeOf<Input["a"]>().not.toEqualTypeOf<"a">();
expectTypeOf<Input["a"]>().toEqualTypeOf<string>();
expectTypeOf<Schema["a"]>().toEqualTypeOf<"a">();
expectTypeOf<Schema["a"]>().not.toEqualTypeOf<string>();
});
test("superRefine - type narrowing", () => {
type NarrowType = { type: string; age: number };
const schema = z
.object({
type: z.string(),
age: z.number(),
})
.nullable()
.superRefine((arg, ctx): arg is NarrowType => {
if (!arg) {
// still need to make a call to ctx.addIssue
ctx.addIssue({
input: arg,
code: "custom",
message: "cannot be null",
fatal: true,
});
return false;
}
return true;
});
expectTypeOf<z.infer<typeof schema>>().toEqualTypeOf<NarrowType>();
expect(schema.safeParse({ type: "test", age: 0 }).success).toEqual(true);
expect(schema.safeParse(null).success).toEqual(false);
});
test("chained mixed refining types", () => {
type firstRefinement = { first: string; second: number; third: true };
type secondRefinement = { first: "bob"; second: number; third: true };
type thirdRefinement = { first: "bob"; second: 33; third: true };
const schema = z
.object({
first: z.string(),
second: z.number(),
third: z.boolean(),
})
.nullable()
.refine((arg): arg is firstRefinement => !!arg?.third)
.superRefine((arg, ctx): arg is secondRefinement => {
expectTypeOf<typeof arg>().toEqualTypeOf<firstRefinement>();
if (arg.first !== "bob") {
ctx.addIssue({
input: arg,
code: "custom",
message: "`first` property must be `bob`",
});
return false;
}
return true;
})
.refine((arg): arg is thirdRefinement => {
expectTypeOf<typeof arg>().toEqualTypeOf<secondRefinement>();
return arg.second === 33;
});
expectTypeOf<z.infer<typeof schema>>().toEqualTypeOf<thirdRefinement>();
});
});
*/
test("when", () => {
const schema = z
.strictObject({
password: z.string().min(8),
confirmPassword: z.string(),
other: z.string(),
})
.refine(
(data) => {
console.log("running check...");
console.log(data);
console.log(data.password);
return data.password === data.confirmPassword;
},
{
message: "Passwords do not match",
path: ["confirmPassword"],
when(payload) {
if (payload.value === undefined) return false;
if (payload.value === null) return false;
// no issues with confirmPassword or password
return payload.issues.every((iss) => iss.path?.[0] !== "confirmPassword" && iss.path?.[0] !== "password");
},
}
);
expect(schema.safeParse(undefined)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received undefined"
}
]],
"success": false,
}
`);
expect(schema.safeParse(null)).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "object",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected object, received null"
}
]],
"success": false,
}
`);
expect(
schema.safeParse({
password: "asdf",
confirmPassword: "asdfg",
other: "qwer",
})
).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "string",
"code": "too_small",
"minimum": 8,
"inclusive": true,
"path": [
"password"
],
"message": "Too small: expected string to have >=8 characters"
}
]],
"success": false,
}
`);
expect(
schema.safeParse({
password: "asdf",
confirmPassword: "asdfg",
other: 1234,
})
).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "string",
"code": "too_small",
"minimum": 8,
"inclusive": true,
"path": [
"password"
],
"message": "Too small: expected string to have >=8 characters"
},
{
"expected": "string",
"code": "invalid_type",
"path": [
"other"
],
"message": "Invalid input: expected string, received number"
}
]],
"success": false,
}
`);
});
@@ -0,0 +1 @@
{"version":3,"file":"isNotParentBindingConstraints.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isNotParentBindingConstraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAO,GACtD,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAO,CAO9C"}
@@ -0,0 +1 @@
{"name":"postcss-import","version":"15.1.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104741,"integrity":"sha512-sBr2KRMNbiV0cHv3pyCe7H/QTFMJozEbbMlIMxpLNyqPobERYp6wayXIyt8CHYRhLR+YJ59oYobynCjWX9ejLg==","mode":493,"size":1118},"lib/assign-layer-names.js":{"checkedAt":1794532104741,"integrity":"sha512-ZDA9UB76tmsL4AKtP5Yl+3DeR0Vq1FrZqqUXvz27Gl/puF6jBsCAdpvaA6VKRuQgGbzGQdVSWBvr46TVpDRLQA==","mode":420,"size":466},"lib/data-url.js":{"checkedAt":1794532104741,"integrity":"sha512-A4loCQeXf7TGbAZbflkdFgk36JmyA8CYekEOGvD8lwsnZgj/86Gr3KyjRtIrITh/gxOji8005fGnVOFlWjVEWg==","mode":420,"size":296},"index.js":{"checkedAt":1794532104741,"integrity":"sha512-WW+zbRZ+NE0acYs4RmNjkT+6GNUBzoXIwg/XgiggzBzwuyMPyDBu7yFSkLRIT9ecW+wEB2dl/UK6ccc1CbUIkg==","mode":493,"size":13191},"lib/join-layer.js":{"checkedAt":1794532104741,"integrity":"sha512-YZnQx09yaeavsP0QiorJFD1zbCW1HeadS92byHvVyUM2bbn0VuR4B+1bl/PtKAJPJv3tnICyTvgD9ah+9Oq1TQ==","mode":420,"size":303},"lib/join-media.js":{"checkedAt":1794532104741,"integrity":"sha512-6m7CZtQ2vMGq3DMnqQNnfdXUvh8k6NpJDiNRp5c8f/cu3wX3bfODM1IIRf+Cw0QalUGu1cyfnmbFrHRgwdI6cA==","mode":420,"size":872},"lib/load-content.js":{"checkedAt":1794532104742,"integrity":"sha512-p7tQO3v7k2KmskKiQs/HXNWvkInwa/KSzUFoO17xPIlEC2Kld3eCyeBK5bx3FAqlcXtItg06CcocndwHaz0rdw==","mode":420,"size":242},"lib/parse-statements.js":{"checkedAt":1794532104742,"integrity":"sha512-AlQkePA99mQeIgxP+DMXsiFbBAl/Fcwt8Q+prah83fKnM8L+AbnuNS5TBerSYIab7TadzgosWDZzr3LdvHxUhg==","mode":420,"size":3773},"lib/process-content.js":{"checkedAt":1794532104742,"integrity":"sha512-5IkvkihtDESND1EUyGyl4AKlYrptSxo4y/WGneViURQ/+smC5MXTtqBtpLMhET6mzjli94ksu08CQPADN17/VA==","mode":420,"size":1332},"lib/resolve-id.js":{"checkedAt":1794532104742,"integrity":"sha512-UZLJGMBrFlxtmP5KKJZLiaXTGRYvAZRL9amAraS/kB/FO+i/0Ub2dmy5uxhoMQbkIXGBKXafwNITCLsfZbpXiA==","mode":420,"size":1030},"package.json":{"checkedAt":1794532104742,"integrity":"sha512-J0f0sYAORE5a2OSk6mSKttSB6LfKYsARIyj+o/FgHa9nZ9X9nK+urvCMkc2k+P7jwYrpH02tGt9RaG8r7pakyg==","mode":420,"size":1278},"README.md":{"checkedAt":1794532104742,"integrity":"sha512-ch5iH8s46PsErk4foOMN0DpTWCwNU6T0+82fUX9X/jfW0XUIW57nuPRSsWfWf88Jf0LMRa75+Ms+h2HrP1AE7A==","mode":420,"size":6954}}}
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Lowercase = Lowercase;
const intrinsic_1 = require("./intrinsic");
/** `[Json]` Intrinsic function to Lowercase LiteralString types */
function Lowercase(T, options = {}) {
return (0, intrinsic_1.Intrinsic)(T, 'Lowercase', options);
}
@@ -0,0 +1,162 @@
/*!
* range-parser
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = rangeParser
/**
* Parse "Range" header `str` relative to the given file `size`.
*
* @param {Number} size
* @param {String} str
* @param {Object} [options]
* @return {Array}
* @public
*/
function rangeParser (size, str, options) {
if (typeof str !== 'string') {
throw new TypeError('argument str must be a string')
}
var index = str.indexOf('=')
if (index === -1) {
return -2
}
// split the range string
var arr = str.slice(index + 1).split(',')
var ranges = []
// add ranges type
ranges.type = str.slice(0, index)
// parse all ranges
for (var i = 0; i < arr.length; i++) {
var range = arr[i].split('-')
var start = parseInt(range[0], 10)
var end = parseInt(range[1], 10)
// -nnn
if (isNaN(start)) {
start = size - end
end = size - 1
// nnn-
} else if (isNaN(end)) {
end = size - 1
}
// limit last-byte-pos to current length
if (end > size - 1) {
end = size - 1
}
// invalid or unsatisifiable
if (isNaN(start) || isNaN(end) || start > end || start < 0) {
continue
}
// add range
ranges.push({
start: start,
end: end
})
}
if (ranges.length < 1) {
// unsatisifiable
return -1
}
return options && options.combine
? combineRanges(ranges)
: ranges
}
/**
* Combine overlapping & adjacent ranges.
* @private
*/
function combineRanges (ranges) {
var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart)
for (var j = 0, i = 1; i < ordered.length; i++) {
var range = ordered[i]
var current = ordered[j]
if (range.start > current.end + 1) {
// next range
ordered[++j] = range
} else if (range.end > current.end) {
// extend range
current.end = range.end
current.index = Math.min(current.index, range.index)
}
}
// trim ordered array
ordered.length = j + 1
// generate combined range
var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex)
// copy ranges type
combined.type = ranges.type
return combined
}
/**
* Map function to add index value to ranges.
* @private
*/
function mapWithIndex (range, index) {
return {
start: range.start,
end: range.end,
index: index
}
}
/**
* Map function to remove index value from ranges.
* @private
*/
function mapWithoutIndex (range) {
return {
start: range.start,
end: range.end
}
}
/**
* Sort function to sort ranges by index.
* @private
*/
function sortByRangeIndex (a, b) {
return a.index - b.index
}
/**
* Sort function to sort ranges by start position.
* @private
*/
function sortByRangeStart (a, b) {
return a.start - b.start
}
@@ -0,0 +1 @@
{"name":"@xterm/xterm","version":"5.5.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532110962,"integrity":"sha512-x2IjI+tet1WJ4THMEVbYOflTx+K0eGFLTzUg2pInnWwV0KQ99uzmOhXsXYtczr/6Y3ggrljLDQG9DQcyYh+iBg==","mode":420,"size":1261},"css/xterm.css":{"checkedAt":1794532110962,"integrity":"sha512-AbNrj/oSHJaILgcdnkYm+DQ08SqVbZ8jlkJbFyyS1WDcAaXAcAfxJnCH69el7oVgTwVwyA5u5T+RdFyUykrV3Q==","mode":420,"size":5559},"lib/xterm.js":{"checkedAt":1794532110963,"integrity":"sha512-Gujw5GajF5is3nMoGv9X+tCMqePLL/60qvAv1LofUZTV9jK8ENbM9L+maGmOsNzuZaiuyc/fpph1KT9uR5w3CQ==","mode":420,"size":289441},"package.json":{"checkedAt":1794532110963,"integrity":"sha512-PEfsLFC5naXcLYi/ONL+/V2fkV7NL1EiUP4dZ6cIOw0wli97+iTW2Ap60w2skLAchi0sWc2IMoqeGhCSB9EAlg==","mode":420,"size":4006},"lib/xterm.js.map":{"checkedAt":1794532110966,"integrity":"sha512-PyHBU2RWr3tv5xhTxjrXgDoVjkfaaLK/p3q03fXmV+lBDuuhrHxbZgb3zIdLsfQoccC015M1X1VzpQ45PAJZ8g==","mode":420,"size":1118392},"README.md":{"checkedAt":1794532110966,"integrity":"sha512-or19gzeU9MpWXugbkNdVRs3fSP/Q42RyDoi1mPtN477YVHEDA6ju+NWJjji9QPNoAK2kEHuy1bSpn+UK2ITyBg==","mode":420,"size":21188},"src/browser/AccessibilityManager.ts":{"checkedAt":1794532110966,"integrity":"sha512-sWIGcBL9LjofDjY382TfqLAi13W47iBWUUCFZzUGDx9/id5T3usbsJlHbad0GwYlIHAb3OxTo3VKIV1sPB8Njg==","mode":420,"size":15864},"src/common/public/AddonManager.ts":{"checkedAt":1794532110967,"integrity":"sha512-hVtOvVvsIVFAGJEaLAZNeAip7LKHa5vwlSMlukSTuq7t4e+teX6m5KK5kCE4lD46nNADMLRRHSDmjJb02EYfCQ==","mode":420,"size":1406},"src/common/buffer/AttributeData.ts":{"checkedAt":1794532110967,"integrity":"sha512-3lluVdG2v47oK/cLSdt6RBqn+qQm3C/3dsKxdMSdT5XOi0Ecek4W6Czo430QUDOkPejXiuyIvjrsYOAy6ztSbw==","mode":420,"size":7626},"src/common/buffer/Buffer.ts":{"checkedAt":1794532110967,"integrity":"sha512-ThRJa5LEwMHlCb0AtRBNp/G/UaB8Lr7Jn71dDmkflnRV/H9McBr9SjnmzGthuApuQcFbXK8wWJN1ADixujlneQ==","mode":420,"size":24063},"src/common/public/BufferApiView.ts":{"checkedAt":1794532110967,"integrity":"sha512-lY8xoGgr8R2PjS3hNmZBlQZ4kQeP8T1cPKyWGd7M+VeItfFMKwkoZSzM3Ztj2BfHWmd/vwakzDiJ3aU54H8N/g==","mode":420,"size":1194},"src/browser/decorations/BufferDecorationRenderer.ts":{"checkedAt":1794532110967,"integrity":"sha512-nk+TgrE4KxWtOmORzxp7JZutKhHmIdTekoZRrRXhef63dAL2prKyBhKPgtNZHhFLE1sGqa9m+Ffd/WoLIZiyJA==","mode":420,"size":5738},"src/common/buffer/BufferLine.ts":{"checkedAt":1794532110967,"integrity":"sha512-JYgMxTVax/MMCJ5rjgwGMuuTItVucpQOls5L/PrDCl039JzPdhYEoze4pdsf3nYFA5VJPtoBZROmvbhNGATyvg==","mode":420,"size":20223},"src/common/public/BufferLineApiView.ts":{"checkedAt":1794532110968,"integrity":"sha512-KFRroEUvlwMkBDWTqK/BzOdRoBP7aQcKxpsWu679y9WcrjUNUhBUTfPE/YEbS2gZX9J7sQ5b6PhX42HtmEw3Jw==","mode":420,"size":1005},"src/common/public/BufferNamespaceApi.ts":{"checkedAt":1794532110968,"integrity":"sha512-gO6KsdIwL2imKL+N+qknfn+8+/yDIprKGmK2By/hE415WO6ZT69Rw8n2BfSVJ6YCtLSv4A/RrNPwXv1ro+cy4A==","mode":420,"size":1486},"src/common/buffer/BufferRange.ts":{"checkedAt":1794532110968,"integrity":"sha512-CIIaFw4HDNstbdTXy8SvJUYpDbBr6jtD0gyJaiCNDhrCB+0HZXYDeNDlwdoonZcQEvOnM1GzRd6fF1oQDzLJ3A==","mode":420,"size":484},"src/common/buffer/BufferReflow.ts":{"checkedAt":1794532110968,"integrity":"sha512-xPLW8bXWi6/ZxPMoppxj3j6mAO9LWbyiYfA90gfdF8V2pLs7eS++hWiYdiPE7fv6FToS38B8Fnc5I3OmNO2xjw==","mode":420,"size":8299},"src/common/services/BufferService.ts":{"checkedAt":1794532110968,"integrity":"sha512-rW0sO6G3xiS+OYzILHGnfgAM7gq6f4Mg5jYQosJ6mYPBNh6C2SCM+NfVPAQ28u+dmQ81a6t4iNZ8Iq27UoUgbA==","mode":420,"size":5391},"src/common/buffer/BufferSet.ts":{"checkedAt":1794532110969,"integrity":"sha512-3aVzCy4Wr8m4EtYRaAxViQ1q8UbM62fUiCknW7FfJOeaRIGItmF8lSO76Hb54pMUA+GO8iyTQO13aL/C/Z6i1g==","mode":420,"size":4147},"src/browser/renderer/shared/CellColorResolver.ts":{"checkedAt":1794532110969,"integrity":"sha512-bOwHD6M6wpRDPBi35wrr6RJyBIKyUGSD0U3hK858xH8Tp0FmV/xhK0k6+rReHwPtQY4cIS3AoQGXoCmE4zZdaw==","mode":420,"size":10018},"src/common/buffer/CellData.ts":{"checkedAt":1794532110969,"integrity":"sha512-33OxGSqDSS0OJwWXeLJeJDzf+nrk2bi/cM+HVIq4l5/2DhgV/qa8G3PCBhBtrKUgimWOyTCEYg6Es4pqoZY4NA==","mode":420,"size":3310},"src/browser/services/CharacterJoinerService.ts":{"checkedAt":1794532110969,"integrity":"sha512-SDTdUzKAfshVon2KuooNx9kS7LsaW58VPU/blQennltugVNLW9cyd02aUwL+mw83oy+uL2ZigoWg2RZKYln+hQ==","mode":420,"size":11290},"src/browser/renderer/shared/CharAtlasCache.ts":{"checkedAt":1794532110969,"integrity":"sha512-6/u/NHu9/5D8zp9NT+u1uAUWRwn/gEPNwYBoabnr5gzP0N/mzIe2kWhTGE2yeegLidAJpgIVoFrV7RxelwbC2w==","mode":420,"size":3157},"src/browser/renderer/shared/CharAtlasUtils.ts":{"checkedAt":1794532110969,"integrity":"sha512-pO+faCEdC9kQRA1/aewIuY07SUBWOOpcWATaydfOliMQ6dqJFRgtCsL672d0Oj/BfBGUynCXSH/vPjwoHmCZuw==","mode":420,"size":3093},"src/common/data/Charsets.ts":{"checkedAt":1794532110969,"integrity":"sha512-yRIbpG8pehJROU8EAMCqre1MaHaMG0c8T6iEAzxuIn2gWm3+3GFKqnjndy/65mbdNE1hgoGLDBejj4mrq8nARQ==","mode":420,"size":4669},"src/common/services/CharsetService.ts":{"checkedAt":17Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"resolveDynamicValueBindingCallback.d.ts","sourceRoot":"","sources":["../../../../src/resolution/calculations/resolveDynamicValueBindingCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,wBAAgB,kCAAkC,CAAC,UAAU,EAC3D,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,mBAAmB,CAAC,UAAU,CAAC,GACvC,QAAQ,CAAC,UAAU,CAAC,CAEtB"}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_identity.cjs",
"module": "../../esm/_identity.js"
}
@@ -0,0 +1,192 @@
import {getSliderThumbId as $aa519ee6cf463259$export$68e648cbec363a18, sliderData as $aa519ee6cf463259$export$d6c8d9636a3dc49c} from "./utils.mjs";
import {useGlobalListeners as $lSlq7$useGlobalListeners, focusWithoutScrolling as $lSlq7$focusWithoutScrolling, clamp as $lSlq7$clamp, mergeProps as $lSlq7$mergeProps, useFormReset as $lSlq7$useFormReset} from "@react-aria/utils";
import {useCallback as $lSlq7$useCallback, useEffect as $lSlq7$useEffect, useRef as $lSlq7$useRef} from "react";
import {useFocusable as $lSlq7$useFocusable} from "@react-aria/focus";
import {useKeyboard as $lSlq7$useKeyboard, useMove as $lSlq7$useMove} from "@react-aria/interactions";
import {useLabel as $lSlq7$useLabel} from "@react-aria/label";
import {useLocale as $lSlq7$useLocale} from "@react-aria/i18n";
function $47b897dc8cdb026b$export$8d15029008292ae(opts, state) {
let { index: index = 0, isRequired: isRequired, validationState: validationState, isInvalid: isInvalid, trackRef: trackRef, inputRef: inputRef, orientation: orientation = state.orientation, name: name } = opts;
let isDisabled = opts.isDisabled || state.isDisabled;
let isVertical = orientation === 'vertical';
let { direction: direction } = (0, $lSlq7$useLocale)();
let { addGlobalListener: addGlobalListener, removeGlobalListener: removeGlobalListener } = (0, $lSlq7$useGlobalListeners)();
let data = (0, $aa519ee6cf463259$export$d6c8d9636a3dc49c).get(state);
var _opts_arialabelledby;
const { labelProps: labelProps, fieldProps: fieldProps } = (0, $lSlq7$useLabel)({
...opts,
id: (0, $aa519ee6cf463259$export$68e648cbec363a18)(state, index),
'aria-labelledby': `${data.id} ${(_opts_arialabelledby = opts['aria-labelledby']) !== null && _opts_arialabelledby !== void 0 ? _opts_arialabelledby : ''}`.trim()
});
const value = state.values[index];
const focusInput = (0, $lSlq7$useCallback)(()=>{
if (inputRef.current) (0, $lSlq7$focusWithoutScrolling)(inputRef.current);
}, [
inputRef
]);
const isFocused = state.focusedThumb === index;
(0, $lSlq7$useEffect)(()=>{
if (isFocused) focusInput();
}, [
isFocused,
focusInput
]);
let reverseX = direction === 'rtl';
let currentPosition = (0, $lSlq7$useRef)(null);
let { keyboardProps: keyboardProps } = (0, $lSlq7$useKeyboard)({
onKeyDown (e) {
let { getThumbMaxValue: getThumbMaxValue, getThumbMinValue: getThumbMinValue, decrementThumb: decrementThumb, incrementThumb: incrementThumb, setThumbValue: setThumbValue, setThumbDragging: setThumbDragging, pageSize: pageSize } = state;
// these are the cases that useMove or useSlider don't handle
if (!/^(PageUp|PageDown|Home|End)$/.test(e.key)) {
e.continuePropagation();
return;
}
// same handling as useMove, stopPropagation to prevent useSlider from handling the event as well.
e.preventDefault();
// remember to set this so that onChangeEnd is fired
setThumbDragging(index, true);
switch(e.key){
case 'PageUp':
incrementThumb(index, pageSize);
break;
case 'PageDown':
decrementThumb(index, pageSize);
break;
case 'Home':
setThumbValue(index, getThumbMinValue(index));
break;
case 'End':
setThumbValue(index, getThumbMaxValue(index));
break;
}
setThumbDragging(index, false);
}
});
let { moveProps: moveProps } = (0, $lSlq7$useMove)({
onMoveStart () {
currentPosition.current = null;
state.setThumbDragging(index, true);
},
onMove ({ deltaX: deltaX, deltaY: deltaY, pointerType: pointerType, shiftKey: shiftKey }) {
const { getThumbPercent: getThumbPercent, setThumbPercent: setThumbPercent, decrementThumb: decrementThumb, incrementThumb: incrementThumb, step: step, pageSize: pageSize } = state;
if (!trackRef.current) return;
let { width: width, height: height } = trackRef.current.getBoundingClientRect();
let size = isVertical ? height : width;
if (currentPosition.current == null) currentPosition.current = getThumbPercent(index) * size;
if (pointerType === 'keyboard') {
if (deltaX > 0 && reverseX || deltaX < 0 && !reverseX || deltaY > 0) decrementThumb(index, shiftKey ? pageSize : step);
else incrementThumb(index, shiftKey ? pageSize : step);
} else {
let delta = isVertical ? deltaY : deltaX;
if (isVertical || reverseX) delta = -delta;
currentPosition.current += delta;
setThumbPercent(index, (0, $lSlq7$clamp)(currentPosition.current / size, 0, 1));
}
},
onMoveEnd () {
state.setThumbDragging(index, false);
}
});
// Immediately register editability with the state
state.setThumbEditable(index, !isDisabled);
const { focusableProps: focusableProps } = (0, $lSlq7$useFocusable)((0, $lSlq7$mergeProps)(opts, {
onFocus: ()=>state.setFocusedThumb(index),
onBlur: ()=>state.setFocusedThumb(undefined)
}), inputRef);
let currentPointer = (0, $lSlq7$useRef)(undefined);
let onDown = (id)=>{
focusInput();
currentPointer.current = id;
state.setThumbDragging(index, true);
addGlobalListener(window, 'mouseup', onUp, false);
addGlobalListener(window, 'touchend', onUp, false);
addGlobalListener(window, 'pointerup', onUp, false);
};
let onUp = (e)=>{
var _e_changedTouches;
var _e_pointerId;
let id = (_e_pointerId = e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0].identifier;
if (id === currentPointer.current) {
focusInput();
state.setThumbDragging(index, false);
removeGlobalListener(window, 'mouseup', onUp, false);
removeGlobalListener(window, 'touchend', onUp, false);
removeGlobalListener(window, 'pointerup', onUp, false);
}
};
let thumbPosition = state.getThumbPercent(index);
if (isVertical || direction === 'rtl') thumbPosition = 1 - thumbPosition;
let interactions = !isDisabled ? (0, $lSlq7$mergeProps)(keyboardProps, moveProps, {
onMouseDown: (e)=>{
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
onDown();
},
onPointerDown: (e)=>{
if (e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey) return;
onDown(e.pointerId);
},
onTouchStart: (e)=>{
onDown(e.changedTouches[0].identifier);
}
}) : {};
(0, $lSlq7$useFormReset)(inputRef, value, (v)=>{
state.setThumbValue(index, v);
});
// We install mouse handlers for the drag motion on the thumb div, but
// not the key handler for moving the thumb with the slider. Instead,
// we focus the range input, and let the browser handle the keyboard
// interactions; we then listen to input's onChange to update state.
return {
inputProps: (0, $lSlq7$mergeProps)(focusableProps, fieldProps, {
type: 'range',
tabIndex: !isDisabled ? 0 : undefined,
min: state.getThumbMinValue(index),
max: state.getThumbMaxValue(index),
step: state.step,
value: value,
name: name,
disabled: isDisabled,
'aria-orientation': orientation,
'aria-valuetext': state.getThumbValueLabel(index),
'aria-required': isRequired || undefined,
'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
'aria-errormessage': opts['aria-errormessage'],
'aria-describedby': [
data['aria-describedby'],
opts['aria-describedby']
].filter(Boolean).join(' '),
'aria-details': [
data['aria-details'],
opts['aria-details']
].filter(Boolean).join(' '),
onChange: (e)=>{
state.setThumbValue(index, parseFloat(e.target.value));
}
}),
thumbProps: {
...interactions,
style: {
position: 'absolute',
[isVertical ? 'top' : 'left']: `${thumbPosition * 100}%`,
transform: 'translate(-50%, -50%)',
touchAction: 'none'
}
},
labelProps: labelProps,
isDragging: state.isThumbDragging(index),
isDisabled: isDisabled,
isFocused: isFocused
};
}
export {$47b897dc8cdb026b$export$8d15029008292ae as useSliderThumb};
//# sourceMappingURL=useSliderThumb.module.js.map
@@ -0,0 +1,123 @@
'use strict';
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
function _defineProperty(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: true,
configurable: true,
writable: true
}) : e[r] = t, e;
}
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = true,
o = false;
try {
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = true, n = r;
} finally {
try {
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
_defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o,
r,
i = _objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
function _slicedToArray(r, e) {
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
}
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r);
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
exports.arrayLikeToArray = _arrayLikeToArray;
exports.arrayWithHoles = _arrayWithHoles;
exports.defineProperty = _defineProperty;
exports.iterableToArrayLimit = _iterableToArrayLimit;
exports.nonIterableRest = _nonIterableRest;
exports.objectSpread2 = _objectSpread2;
exports.objectWithoutProperties = _objectWithoutProperties;
exports.objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
exports.slicedToArray = _slicedToArray;
exports.toPrimitive = _toPrimitive;
exports.toPropertyKey = _toPropertyKey;
exports.unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -0,0 +1,106 @@
// This must remain here so that the `mangleErrors.cjs` build script
// does not have to import this into each source file it rewrites.
import { formatProdErrorMessage } from '@reduxjs/toolkit'
export type {
CombinedState,
QueryCacheKey,
QueryKeys,
QuerySubState,
RootState,
SubscriptionOptions,
} from './core/apiState'
export { QueryStatus } from './core/apiState'
export type { Api, ApiContext, Module } from './apiTypes'
export type {
BaseQueryApi,
BaseQueryArg,
BaseQueryEnhancer,
BaseQueryError,
BaseQueryExtraOptions,
BaseQueryFn,
BaseQueryMeta,
BaseQueryResult,
QueryReturnValue,
} from './baseQueryTypes'
export type {
BaseEndpointDefinition,
EndpointDefinitions,
EndpointDefinition,
EndpointBuilder,
QueryDefinition,
MutationDefinition,
MutationExtraOptions,
InfiniteQueryArgFrom,
InfiniteQueryDefinition,
InfiniteQueryExtraOptions,
PageParamFrom,
TagDescription,
QueryArgFrom,
QueryExtraOptions,
ResultTypeFrom,
DefinitionType,
DefinitionsFromApi,
OverrideResultType,
ResultDescription,
TagTypesFromApi,
UpdateDefinitions,
SchemaFailureHandler,
SchemaFailureConverter,
SchemaFailureInfo,
SchemaType,
} from './endpointDefinitions'
export { fetchBaseQuery } from './fetchBaseQuery'
export type {
FetchBaseQueryArgs,
FetchBaseQueryError,
FetchBaseQueryMeta,
FetchArgs,
} from './fetchBaseQuery'
export { retry } from './retry'
export type { RetryOptions } from './retry'
export { setupListeners } from './core/setupListeners'
export { skipToken } from './core/buildSelectors'
export type {
QueryResultSelectorResult,
MutationResultSelectorResult,
SkipToken,
} from './core/buildSelectors'
export type {
QueryActionCreatorResult,
MutationActionCreatorResult,
StartQueryActionCreatorOptions,
} from './core/buildInitiate'
export type { CreateApi, CreateApiOptions } from './createApi'
export { buildCreateApi } from './createApi'
export { _NEVER, fakeBaseQuery } from './fakeBaseQuery'
export { copyWithStructuralSharing } from './utils/copyWithStructuralSharing'
export { createApi, coreModule, coreModuleName } from './core/index'
export type {
InfiniteData,
InfiniteQueryActionCreatorResult,
InfiniteQueryConfigOptions,
InfiniteQueryResultSelectorResult,
InfiniteQuerySubState,
TypedMutationOnQueryStarted,
TypedQueryOnQueryStarted,
} from './core/index'
export type {
ApiEndpointMutation,
ApiEndpointQuery,
ApiEndpointInfiniteQuery,
ApiModules,
CoreModule,
PrefetchOptions,
} from './core/module'
export { defaultSerializeQueryArgs } from './defaultSerializeQueryArgs'
export type { SerializeQueryArgs } from './defaultSerializeQueryArgs'
export type {
Id as TSHelpersId,
NoInfer as TSHelpersNoInfer,
Override as TSHelpersOverride,
} from './tsHelpers'
export { NamedSchemaError } from './standardSchema'
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var class_provider_1 = require("./class-provider");
Object.defineProperty(exports, "isClassProvider", { enumerable: true, get: function () { return class_provider_1.isClassProvider; } });
var factory_provider_1 = require("./factory-provider");
Object.defineProperty(exports, "isFactoryProvider", { enumerable: true, get: function () { return factory_provider_1.isFactoryProvider; } });
var injection_token_1 = require("./injection-token");
Object.defineProperty(exports, "isNormalToken", { enumerable: true, get: function () { return injection_token_1.isNormalToken; } });
var token_provider_1 = require("./token-provider");
Object.defineProperty(exports, "isTokenProvider", { enumerable: true, get: function () { return token_provider_1.isTokenProvider; } });
var value_provider_1 = require("./value-provider");
Object.defineProperty(exports, "isValueProvider", { enumerable: true, get: function () { return value_provider_1.isValueProvider; } });
@@ -0,0 +1,33 @@
Copyright (c) 2023, Oath Inc.
Licensed under the terms of the New BSD license. See below for terms.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:
- Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
- Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
- Neither the name of Oath Inc. nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of Oath Inc.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,135 @@
/*
* 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 {DOMAttributes, FocusableElement, LongPressEvent} from '@react-types/shared';
import {focusWithoutScrolling, getOwnerDocument, mergeProps, useDescription, useGlobalListeners} from '@react-aria/utils';
import {usePress} from './usePress';
import {useRef} from 'react';
export interface LongPressProps {
/** Whether long press events should be disabled. */
isDisabled?: boolean,
/** Handler that is called when a long press interaction starts. */
onLongPressStart?: (e: LongPressEvent) => void,
/**
* Handler that is called when a long press interaction ends, either
* over the target or when the pointer leaves the target.
*/
onLongPressEnd?: (e: LongPressEvent) => void,
/**
* Handler that is called when the threshold time is met while
* the press is over the target.
*/
onLongPress?: (e: LongPressEvent) => void,
/**
* The amount of time in milliseconds to wait before triggering a long press.
* @default 500ms
*/
threshold?: number,
/**
* A description for assistive techology users indicating that a long press
* action is available, e.g. "Long press to open menu".
*/
accessibilityDescription?: string
}
export interface LongPressResult {
/** Props to spread on the target element. */
longPressProps: DOMAttributes
}
const DEFAULT_THRESHOLD = 500;
/**
* Handles long press interactions across mouse and touch devices. Supports a customizable time threshold,
* accessibility description, and normalizes behavior across browsers and devices.
*/
export function useLongPress(props: LongPressProps): LongPressResult {
let {
isDisabled,
onLongPressStart,
onLongPressEnd,
onLongPress,
threshold = DEFAULT_THRESHOLD,
accessibilityDescription
} = props;
const timeRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
let {addGlobalListener, removeGlobalListener} = useGlobalListeners();
let {pressProps} = usePress({
isDisabled,
onPressStart(e) {
e.continuePropagation();
if (e.pointerType === 'mouse' || e.pointerType === 'touch') {
if (onLongPressStart) {
onLongPressStart({
...e,
type: 'longpressstart'
});
}
timeRef.current = setTimeout(() => {
// Prevent other usePress handlers from also handling this event.
e.target.dispatchEvent(new PointerEvent('pointercancel', {bubbles: true}));
// Ensure target is focused. On touch devices, browsers typically focus on pointer up.
if (getOwnerDocument(e.target).activeElement !== e.target) {
focusWithoutScrolling(e.target as FocusableElement);
}
if (onLongPress) {
onLongPress({
...e,
type: 'longpress'
});
}
timeRef.current = undefined;
}, threshold);
// Prevent context menu, which may be opened on long press on touch devices
if (e.pointerType === 'touch') {
let onContextMenu = e => {
e.preventDefault();
};
addGlobalListener(e.target, 'contextmenu', onContextMenu, {once: true});
addGlobalListener(window, 'pointerup', () => {
// If no contextmenu event is fired quickly after pointerup, remove the handler
// so future context menu events outside a long press are not prevented.
setTimeout(() => {
removeGlobalListener(e.target, 'contextmenu', onContextMenu);
}, 30);
}, {once: true});
}
}
},
onPressEnd(e) {
if (timeRef.current) {
clearTimeout(timeRef.current);
}
if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {
onLongPressEnd({
...e,
type: 'longpressend'
});
}
}
});
let descriptionProps = useDescription(onLongPress && !isDisabled ? accessibilityDescription : undefined);
return {
longPressProps: mergeProps(pressProps, descriptionProps)
};
}
@@ -0,0 +1,23 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "CLEAR_FOCUS_EVENT", () => $a0850d0add29d276$export$447a38995de2c711);
$parcel$export(module.exports, "FOCUS_EVENT", () => $a0850d0add29d276$export$831c820ad60f9d12);
/*
* Copyright 2024 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.
*/ // Custom event names for updating the autocomplete's aria-activedecendant.
const $a0850d0add29d276$export$447a38995de2c711 = 'react-aria-clear-focus';
const $a0850d0add29d276$export$831c820ad60f9d12 = 'react-aria-focus';
//# sourceMappingURL=constants.main.js.map
@@ -0,0 +1,824 @@
flf2a$ 8 7 20 -1 7
CATWALK by Ron Fritz 8/94
Figlet Release 2/0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
_//@
_//@
_//@
_/ @
_/ @
@
_//@
@@
_/ _/@
_/ _/@
@
@
@
@
@
@@
@
_// _// @
_////// _////@
_// _// @
_// _// @
_////// _////@
_// _// @
@@
_// @
_// _//@
_// @
_// @
_//@
_// _// @
_// @
@@
@
_// _// @
_// @
_// @
_// @
_// @
_// _// @
@@
_/ @
_// _//@
_// @
_/// @
_// @
_// _//@
_/ @
@@
_//@
_/@
@
@
@
@
@
@@
_//@
_// @
_// @
_// @
_// @
_// @
_//@
@@
_// @
_// @
_//@
_//@
_//@
_// @
_// @
@@
_// @
_// _// _//@
_/ _/ _// @
_//// _///////@
_/ _/ _// @
_// _// _//@
_// @
@@
@
_// @
_// @
_/// _/////@
_// @
_// @
@
@@
@
@
@
@
@
@
_//@
_/@@
@
@
@
_/////@
@
@
@
@@
@
@
@
@
@
@
_//@
@@
_//@
_// @
_// @
_// @
_// @
_// @
_// @
@@
@
_// @
_// _// @
_// _// @
_// _//@
_// _// @
_/// @
@@
@
_// @
_// @
_// @
_// @
_// @
_/////@
@@
@
_// _/ @
_/ _//@
_// @
_// @
_// @
_//////// @
@@
@
_// _// @
_// @
_// @
_// @
_//@
_///// @
@@
@
_// @
_ _// @
_/ _// @
_// _// @
_//// _/ _//@
_// @
@@
@
_// _/// @
_// @
_/// @
_// @
_//@
_/// _// @
@@
@
_// @
_// @
_// @
_/ _// @
_// _//@
_// _// @
@@
@
_///// _//@
_// @
_// @
_// @
_// @
_// @
@@
@
_/ @
_// _// @
_// _/ @
_// _/ @
_// _//@
_//// @
@@
@
_/ _// @
_// _//@
_/ _// @
_/ _// @
_// @
_// @
@@
@
@
@
@
_//@
@
_//@
@@
@
@
@
@
_//@
@
_//@
_/@@
_//@
_// @
_// @
_// @
_// @
_// @
_//@
@@
@
@
_//////@
@
_//////@
@
@
@@
_// @
_// @
_// @
_//@
_// @
_// @
_// @
@@
_/// @
_// @
_//@
_// @
_// @
@
_// @
@@
@
_/// @
_/ _// @
_/ _// _//@
_// _//_ _//@
_// ``` @
_// @
@@
_/ @
_/ // @
_/ _// @
_// _// @
_////// _// @
_// _// @
_// _//@
@@
_// _// @
_/ _// @
_/ _//@
_/// _/ @
_/ _//@
_/ _/@
_//// _// @
@@
_// @
_// _//@
_// @
_// @
_// @
_// _//@
_//// @
@@
_///// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _// @
_///// @
@@
_////////@
_// @
_// @
_////// @
_// @
_// @
_////////@
@@
_////////@
_// @
_// @
_////// @
_// @
_// @
_// @
@@
_//// @
_/ _// @
_// @
_// @
_// _////@
_// _/ @
_///// @
@@
_// _//@
_// _//@
_// _//@
_////// _//@
_// _//@
_// _//@
_// _//@
@@
_//@
_//@
_//@
_//@
_//@
_//@
_//@
@@
_//@
_//@
_//@
_//@
_//@
_/ _//@
_//// @
@@
_// _// @
_// _// @
_// _// @
_/ _/ @
_// _// @
_// _// @
_// _//@
@@
_// @
_// @
_// @
_// @
_// @
_// @
_////////@
@@
_// _//@
_/ _// _///@
_// _// _ _//@
_// _// _//@
_// _/ _//@
_// _//@
_// _//@
@@
_/// _//@
_/ _// _//@
_// _// _//@
_// _// _//@
_// _/ _//@
_// _/ //@
_// _//@
@@
_//// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _// @
_//// @
@@
_/////// @
_// _//@
_// _//@
_/////// @
_// @
_// @
_// @
@@
_//// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _/ _// @
_// // @
_/ @@
_/////// @
_// _// @
_// _// @
_/ _// @
_// _// @
_// _// @
_// _//@
@@
_// // @
_// _//@
_// @
_// @
_// @
_// _//@
_// // @
@@
_/// _//////@
_// @
_// @
_// @
_// @
_// @
_// @
@@
_// _//@
_// _//@
_// _//@
_// _//@
_// _//@
_// _//@
_///// @
@@
_// _//@
_// _// @
_// _// @
_// _// @
_// _// @
_//// @
_// @
@@
_// _//@
_// _//@
_// _/ _//@
_// _// _//@
_// _/ _// _//@
_/ _/ _////@
_// _//@
@@
_// _//@
_// _// @
_// _// @
_// @
_// _// @
_// _// @
_// _//@
@@
_// _//@
_// _// @
_// _// @
_// @
_// @
_// @
_// @
@@
_/////// _//@
_// @
_// @
_// @
_// @
_// @
_///////////@
@@
_////@
_// @
_// @
_// @
_// @
_// @
_////@
@@
_// @
_// @
_// @
_// @
_// @
_// @
_//@
@@
_////@
_//@
_//@
_//@
_//@
_//@
_////@
@@
_// @
_// _// @
_// _//@
@
@
@
@
@@
@
@
@
@
@
@
@
_/////@@
_//@
_/ @
@
@
@
@
@
@@
@
@
_// @
_// _// @
_// _// @
_// _// @
_// _///@
@@
_// @
_// @
_// @
_// _// @
_// _//@
_// _//@
_// _// @
@@
@
@
_///@
_// @
_// @
_// @
_///@
@@
_//@
_//@
_//@
_// _//@
_/ _//@
_/ _//@
_// _//@
@@
@
@
_// @
_/ _// @
_///// _//@
_/ @
_//// @
@@
_//@
_/ @
_/_/ _/@
_// @
_// @
_// @
_// @
@@
@
@
_// @
_// _//@
_// _//@
_// _//@
_// @
_// @@
@
_// @
_// @
_/ _/ @
_// _//@
_/ _//@
_// _//@
@@
@
_/@
@
_//@
_//@
_//@
_//@
@@
@
_//@
@
_//@
_//@
_//@
_//@
_/// @@
_// @
_// @
_// _//@
_// _// @
_/_// @
_// _// @
_// _//@
@@
_//@
_//@
_//@
_//@
_//@
_//@
_///@
@@
@
@
_/// _// _// @
_// _/ _//@
_// _/ _//@
_// _/ _//@
_/// _/ _//@
@@
@
@
_// _// @
_// _//@
_// _//@
_// _//@
_/// _//@
@@
@
@
_// @
_// _// @
_// _//@
_// _// @
_// @
@@
@
@
_/ _// @
_/ _// @
_/ _//@
_// _// @
_// @
_// @@
@
@
_// @
_/ _// @
_/ _// @
_//_// @
_// @
_///@@
@
@
_/ _///@
_// @
_// @
_// @
_/// @
@@
@
@
_//// @
_// @
_/// @
_//@
_// _//@
@@
_// @
_// @
_/_/ _/@
_// @
_// @
_// @
_// @
@@
@
@
_// _//@
_// _//@
_// _//@
_// _//@
_//_//@
@@
@
@
_// _//@
_// _// @
_// _// @
_/_// @
_// @
@@
@
@
_// _///@
_// / _//@
_// _/ _//@
_/ _/ _/_//@
_/// _///@
@@
@
@
_// _//@
_/ _// @
_/ @
_/ _// @
_// _//@
@@
@
@
_// _//@
_// _// @
_/// @
_// @
_// @
_// @@
@
@
_//// _//@
_// @
_// @
_// @
_////////@
@@
_//@
_// @
_// @
_/// @
_// @
_// @
_//@
@@
_/@
_/@
_/@
@
_/@
_/@
_/@
@@
_// @
_// @
_// @
_///@
_// @
_// @
_// @
@@
_// _/ @
_/ _//@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,121 @@
/**
* @fileoverview disallow unnecessary concatenation of template strings
* @author Henry Zhu
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a concatenation.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is a concatenation.
*/
function isConcatenation(node) {
return node.type === "BinaryExpression" && node.operator === "+";
}
/**
* Checks if the given token is a `+` token or not.
* @param {Token} token The token to check.
* @returns {boolean} `true` if the token is a `+` token.
*/
function isConcatOperatorToken(token) {
return token.value === "+" && token.type === "Punctuator";
}
/**
* Get's the right most node on the left side of a BinaryExpression with + operator.
* @param {ASTNode} node A BinaryExpression node to check.
* @returns {ASTNode} node
*/
function getLeft(node) {
let left = node.left;
while (isConcatenation(left)) {
left = left.right;
}
return left;
}
/**
* Get's the left most node on the right side of a BinaryExpression with + operator.
* @param {ASTNode} node A BinaryExpression node to check.
* @returns {ASTNode} node
*/
function getRight(node) {
let right = node.right;
while (isConcatenation(right)) {
right = right.left;
}
return right;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow unnecessary concatenation of literals or template literals",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/no-useless-concat",
},
schema: [],
messages: {
unexpectedConcat: "Unexpected string concatenation of literals.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
BinaryExpression(node) {
// check if not concatenation
if (node.operator !== "+") {
return;
}
// account for the `foo + "a" + "b"` case
const left = getLeft(node);
const right = getRight(node);
if (
astUtils.isStringLiteral(left) &&
astUtils.isStringLiteral(right) &&
astUtils.isTokenOnSameLine(left, right)
) {
const operatorToken = sourceCode.getFirstTokenBetween(
left,
right,
isConcatOperatorToken,
);
context.report({
node,
loc: operatorToken.loc,
messageId: "unexpectedConcat",
});
}
},
};
},
};
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_x_pseudo=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),d={name:"x-pseudo",weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),weekStart:1,weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"}};return _.default.locale(d,null,!0),d}));
@@ -0,0 +1 @@
{"name":"ignore","version":"5.3.2","requiresBuild":false,"files":{"LICENSE-MIT":{"checkedAt":1794532093313,"integrity":"sha512-1ue5Ra3tpQa14DV4S5WCVRgC8Rah+8eH4wz1u4TaVF8/KRqyM6LbVqW4ypQGHKhRBFONRBj1YSEsmQ9hh/rs1Q==","mode":420,"size":1095},"index.js":{"checkedAt":1794532093313,"integrity":"sha512-zZ3EyTKYF78GsEYQBbTRxGWkFH4YARjjqptH/qHoWKyxVadIfBv+EruanulRH0aZhyWcfxE0iuE5rH8aL1WcUg==","mode":420,"size":16412},"legacy.js":{"checkedAt":1794532093313,"integrity":"sha512-HTH95wPh82f1zuWiR66yh/agK5Z5TpKuhgWhemuW25OH87RSz3BqSnIoS+JvDiFvMEWeDfdmOnn71rcdmerr0w==","mode":420,"size":20754},"package.json":{"checkedAt":1794532093314,"integrity":"sha512-9ZX5xukuXGqKspr8pjI02ZyOOQ1PWcga9wh/gYstdlo5nDf0Lmf0rh2rC5yD8rlUM/UmlpiPo+lV5thYRkLq7A==","mode":420,"size":2072},"README.md":{"checkedAt":1794532093314,"integrity":"sha512-eE5BbrIlf8XU357G9A4Hp01L8fgx9FIS2AuGLTtStygbAvN3lDI2eIAElFys7dyRUYiqiI27WpyeYeeDx0mT4Q==","mode":420,"size":11798},"index.d.ts":{"checkedAt":1794532093314,"integrity":"sha512-AFEfjD/0FT7BD7Bjc+IwkpQHDDaHyuHtDHEj8UJnTau/AcKsGHTWW9OiUeyommDDOvQlQWIKZgKdOw1hHq1D5Q==","mode":420,"size":1499}}}
@@ -0,0 +1,69 @@
import debounce from './debounce.js';
import isObject from './isObject.js';
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
* method to cancel delayed `func` invocations and a `flush` method to
* immediately invoke them. Provide `options` to indicate whether `func`
* should be invoked on the leading and/or trailing edge of the `wait`
* timeout. The `func` is invoked with the last arguments provided to the
* throttled function. Subsequent calls to the throttled function return the
* result of the last `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the throttled function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.throttle` and `_.debounce`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to throttle.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=true]
* Specify invoking on the leading edge of the timeout.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new throttled function.
* @example
*
* // Avoid excessively updating the position while scrolling.
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
* jQuery(element).on('click', throttled);
*
* // Cancel the trailing throttled invocation.
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}
export default throttle;
@@ -0,0 +1,51 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Type = exports.JavaScriptTypeBuilder = exports.JsonTypeBuilder = void 0;
// ------------------------------------------------------------------
// JsonTypeBuilder
// ------------------------------------------------------------------
var json_1 = require("./json");
Object.defineProperty(exports, "JsonTypeBuilder", { enumerable: true, get: function () { return json_1.JsonTypeBuilder; } });
// ------------------------------------------------------------------
// JavaScriptTypeBuilder
// ------------------------------------------------------------------
const TypeBuilder = __importStar(require("./type"));
const javascript_1 = require("./javascript");
Object.defineProperty(exports, "JavaScriptTypeBuilder", { enumerable: true, get: function () { return javascript_1.JavaScriptTypeBuilder; } });
/** JavaScript Type Builder with Static Resolution for TypeScript */
const Type = TypeBuilder;
exports.Type = Type;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more