docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

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,149 @@
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_enc = C.enc;
/**
* UTF-16 BE encoding strategy.
*/
var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
/**
* Converts a word array to a UTF-16 BE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 BE string.
*
* @static
*
* @example
*
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join('');
},
/**
* Converts a UTF-16 BE string to a word array.
*
* @param {string} utf16Str The UTF-16 BE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
*/
parse: function (utf16Str) {
// Shortcut
var utf16StrLength = utf16Str.length;
// Convert
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
}
return WordArray.create(words, utf16StrLength * 2);
}
};
/**
* UTF-16 LE encoding strategy.
*/
C_enc.Utf16LE = {
/**
* Converts a word array to a UTF-16 LE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 LE string.
*
* @static
*
* @example
*
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join('');
},
/**
* Converts a UTF-16 LE string to a word array.
*
* @param {string} utf16Str The UTF-16 LE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
*/
parse: function (utf16Str) {
// Shortcut
var utf16StrLength = utf16Str.length;
// Convert
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
}
return WordArray.create(words, utf16StrLength * 2);
}
};
function swapEndian(word) {
return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
}
}());
return CryptoJS.enc.Utf16;
}));
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var DescriptionListTermRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'dt'
}
}],
type: 'structure'
};
var _default = DescriptionListTermRole;
exports.default = _default;
@@ -0,0 +1 @@
{"version":3,"file":"html-text.d.ts","sourceRoot":"","sources":["html-text.js"],"names":[],"mappings":"AAqBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;+BAf5D,sBAAsB"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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","2":"C L M G N"},C:{"2":"xC","194":"0 1 2 3 4 5 6 7 8 9 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 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 0C 1C"},D:{"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 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","16":"J ZB K D E F A B C L M"},E:{"1":"K D E F A B C L M G 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 ZB 2C ZC 3C"},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 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 KD vC"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"194":"MC"},N:{"2":"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:{"194":"1D 2D"}},B:1,C:"Ping attribute",D:true};
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = unmemoize;
/**
* Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
* unmemoized form. Handy for testing.
*
* @name unmemoize
* @static
* @memberOf module:Utils
* @method
* @see [async.memoize]{@link module:Utils.memoize}
* @category Util
* @param {AsyncFunction} fn - the memoized function
* @returns {AsyncFunction} a function that calls the original unmemoized function
*/
function unmemoize(fn) {
return (...args) => {
return (fn.unmemoized || fn)(...args);
};
}
module.exports = exports.default;
@@ -0,0 +1,11 @@
1.6.0 / 2015-01-11
==================
* feat: exports thenify
* support node 0.8+
1.5.0 / 2015-01-09
==================
* feat: support backward compatible with callback
@@ -0,0 +1,3 @@
export * from './composable-filters.js';
export * from './filter-vite-plugins.js';
export * from './simple-filters.js';
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const decorators_legacy: LibDefinition;
@@ -0,0 +1,288 @@
import {constants} from 'micromark-util-symbol'
/**
* Some of the internal operations of micromark do lots of editing
* operations on very large arrays. This runs into problems with two
* properties of most circa-2020 JavaScript interpreters:
*
* - Array-length modifications at the high end of an array (push/pop) are
* expected to be common and are implemented in (amortized) time
* proportional to the number of elements added or removed, whereas
* other operations (shift/unshift and splice) are much less efficient.
* - Function arguments are passed on the stack, so adding tens of thousands
* of elements to an array with `arr.push(...newElements)` will frequently
* cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)
*
* SpliceBuffers are an implementation of gap buffers, which are a
* generalization of the "queue made of two stacks" idea. The splice buffer
* maintains a cursor, and moving the cursor has cost proportional to the
* distance the cursor moves, but inserting, deleting, or splicing in
* new information at the cursor is as efficient as the push/pop operation.
* This allows for an efficient sequence of splices (or pushes, pops, shifts,
* or unshifts) as long such edits happen at the same part of the array or
* generally sweep through the array from the beginning to the end.
*
* The interface for splice buffers also supports large numbers of inputs by
* passing a single array argument rather passing multiple arguments on the
* function call stack.
*
* @template T
* Item type.
*/
export class SpliceBuffer {
/**
* @param {ReadonlyArray<T> | null | undefined} [initial]
* Initial items (optional).
* @returns
* Splice buffer.
*/
constructor(initial) {
/** @type {Array<T>} */
this.left = initial ? [...initial] : []
/** @type {Array<T>} */
this.right = []
}
/**
* Array access;
* does not move the cursor.
*
* @param {number} index
* Index.
* @return {T}
* Item.
*/
get(index) {
if (index < 0 || index >= this.left.length + this.right.length) {
throw new RangeError(
'Cannot access index `' +
index +
'` in a splice buffer of size `' +
(this.left.length + this.right.length) +
'`'
)
}
if (index < this.left.length) return this.left[index]
return this.right[this.right.length - index + this.left.length - 1]
}
/**
* The length of the splice buffer, one greater than the largest index in the
* array.
*/
get length() {
return this.left.length + this.right.length
}
/**
* Remove and return `list[0]`;
* moves the cursor to `0`.
*
* @returns {T | undefined}
* Item, optional.
*/
shift() {
this.setCursor(0)
return this.right.pop()
}
/**
* Slice the buffer to get an array;
* does not move the cursor.
*
* @param {number} start
* Start.
* @param {number | null | undefined} [end]
* End (optional).
* @returns {Array<T>}
* Array of items.
*/
slice(start, end) {
/** @type {number} */
const stop =
end === null || end === undefined ? Number.POSITIVE_INFINITY : end
if (stop < this.left.length) {
return this.left.slice(start, stop)
}
if (start > this.left.length) {
return this.right
.slice(
this.right.length - stop + this.left.length,
this.right.length - start + this.left.length
)
.reverse()
}
return this.left
.slice(start)
.concat(
this.right.slice(this.right.length - stop + this.left.length).reverse()
)
}
/**
* Mimics the behavior of Array.prototype.splice() except for the change of
* interface necessary to avoid segfaults when patching in very large arrays.
*
* This operation moves cursor is moved to `start` and results in the cursor
* placed after any inserted items.
*
* @param {number} start
* Start;
* zero-based index at which to start changing the array;
* negative numbers count backwards from the end of the array and values
* that are out-of bounds are clamped to the appropriate end of the array.
* @param {number | null | undefined} [deleteCount=0]
* Delete count (default: `0`);
* maximum number of elements to delete, starting from start.
* @param {Array<T> | null | undefined} [items=[]]
* Items to include in place of the deleted items (default: `[]`).
* @return {Array<T>}
* Any removed items.
*/
splice(start, deleteCount, items) {
/** @type {number} */
const count = deleteCount || 0
this.setCursor(Math.trunc(start))
const removed = this.right.splice(
this.right.length - count,
Number.POSITIVE_INFINITY
)
if (items) chunkedPush(this.left, items)
return removed.reverse()
}
/**
* Remove and return the highest-numbered item in the array, so
* `list[list.length - 1]`;
* Moves the cursor to `length`.
*
* @returns {T | undefined}
* Item, optional.
*/
pop() {
this.setCursor(Number.POSITIVE_INFINITY)
return this.left.pop()
}
/**
* Inserts a single item to the high-numbered side of the array;
* moves the cursor to `length`.
*
* @param {T} item
* Item.
* @returns {undefined}
* Nothing.
*/
push(item) {
this.setCursor(Number.POSITIVE_INFINITY)
this.left.push(item)
}
/**
* Inserts many items to the high-numbered side of the array.
* Moves the cursor to `length`.
*
* @param {Array<T>} items
* Items.
* @returns {undefined}
* Nothing.
*/
pushMany(items) {
this.setCursor(Number.POSITIVE_INFINITY)
chunkedPush(this.left, items)
}
/**
* Inserts a single item to the low-numbered side of the array;
* Moves the cursor to `0`.
*
* @param {T} item
* Item.
* @returns {undefined}
* Nothing.
*/
unshift(item) {
this.setCursor(0)
this.right.push(item)
}
/**
* Inserts many items to the low-numbered side of the array;
* moves the cursor to `0`.
*
* @param {Array<T>} items
* Items.
* @returns {undefined}
* Nothing.
*/
unshiftMany(items) {
this.setCursor(0)
chunkedPush(this.right, items.reverse())
}
/**
* Move the cursor to a specific position in the array. Requires
* time proportional to the distance moved.
*
* If `n < 0`, the cursor will end up at the beginning.
* If `n > length`, the cursor will end up at the end.
*
* @param {number} n
* Position.
* @return {undefined}
* Nothing.
*/
setCursor(n) {
if (
n === this.left.length ||
(n > this.left.length && this.right.length === 0) ||
(n < 0 && this.left.length === 0)
)
return
if (n < this.left.length) {
// Move cursor to the this.left
const removed = this.left.splice(n, Number.POSITIVE_INFINITY)
chunkedPush(this.right, removed.reverse())
} else {
// Move cursor to the this.right
const removed = this.right.splice(
this.left.length + this.right.length - n,
Number.POSITIVE_INFINITY
)
chunkedPush(this.left, removed.reverse())
}
}
}
/**
* Avoid stack overflow by pushing items onto the stack in segments
*
* @template T
* Item type.
* @param {Array<T>} list
* List to inject into.
* @param {ReadonlyArray<T>} right
* Items to inject.
* @return {undefined}
* Nothing.
*/
function chunkedPush(list, right) {
/** @type {number} */
let chunkStart = 0
if (right.length < constants.v8MaxSafeChunkSize) {
list.push(...right)
} else {
while (chunkStart < right.length) {
list.push(
...right.slice(chunkStart, chunkStart + constants.v8MaxSafeChunkSize)
)
chunkStart += constants.v8MaxSafeChunkSize
}
}
}
@@ -0,0 +1,70 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isRTL", () => $4d65847630a056a8$export$702d680b21cbd764);
/*
* 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.
*/ // https://en.wikipedia.org/wiki/Right-to-left
const $4d65847630a056a8$var$RTL_SCRIPTS = new Set([
'Arab',
'Syrc',
'Samr',
'Mand',
'Thaa',
'Mend',
'Nkoo',
'Adlm',
'Rohg',
'Hebr'
]);
const $4d65847630a056a8$var$RTL_LANGS = new Set([
'ae',
'ar',
'arc',
'bcc',
'bqi',
'ckb',
'dv',
'fa',
'glk',
'he',
'ku',
'mzn',
'nqo',
'pnb',
'ps',
'sd',
'ug',
'ur',
'yi'
]);
function $4d65847630a056a8$export$702d680b21cbd764(localeString) {
// If the Intl.Locale API is available, use it to get the locale's text direction.
if (Intl.Locale) {
let locale = new Intl.Locale(localeString).maximize();
// Use the text info object to get the direction if possible.
// @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;
if (textInfo) return textInfo.direction === 'rtl';
// Fallback: guess using the script.
// This is more accurate than guessing by language, since languages can be written in multiple scripts.
if (locale.script) return $4d65847630a056a8$var$RTL_SCRIPTS.has(locale.script);
}
// If not, just guess by the language (first part of the locale)
let lang = localeString.split('-')[0];
return $4d65847630a056a8$var$RTL_LANGS.has(lang);
}
//# sourceMappingURL=utils.main.js.map
@@ -0,0 +1,3 @@
import { ClassMetadata } from '../models/ClassMetadata';
export declare function getDefaultClassMetadata(): ClassMetadata;
//# sourceMappingURL=getDefaultClassMetadata.d.ts.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,oBAAoB,CAAC,oFAAwE,CAAC;AAClH","sources":["packages/@react-aria/menu/intl/fi-FI.json"],"sourcesContent":["{\n \"longPressMessage\": \"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"\n}\n"],"names":[],"version":3,"file":"fi-FI.module.js.map"}
@@ -0,0 +1,61 @@
{
"name": "@heroui/breadcrumbs",
"version": "2.2.7",
"description": "Breadcrumbs display a hierarchy of links to the current page or resource in an application.",
"keywords": [
"breadcrumbs"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/components/breadcrumbs"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.0",
"@heroui/system": ">=2.4.0"
},
"dependencies": {
"@react-aria/focus": "3.19.0",
"@react-aria/breadcrumbs": "3.5.19",
"@react-aria/utils": "3.26.0",
"@react-types/breadcrumbs": "3.7.9",
"@react-types/shared": "3.26.0",
"@heroui/react-utils": "2.1.4",
"@heroui/shared-utils": "2.1.3",
"@heroui/shared-icons": "2.1.2"
},
"clean-package": "../../../clean-package.config.json",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1 @@
{"name":"didyoumean","version":"1.2.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104622,"integrity":"sha512-5T9dJ+IEDtyc5l8mU5FVu3C9+L1AX51T0VuGBBJWU+FZG40v30q/7LJYGaGLcD/9tUNOic3O9K3Vw7bRfeTKjA==","mode":420,"size":584},"didYouMean-1.2.1.js":{"checkedAt":1794532104622,"integrity":"sha512-o8bYnEftLLiuF04mYieZSDPvf32qBdZA49wiSJdzQMzCtkViWqJByhWfQIY7w2X+WRylT6XuZU+KWifbKxnKJg==","mode":420,"size":9538},"didYouMean-1.2.1.min.js":{"checkedAt":1794532104622,"integrity":"sha512-g3WBASnHHNiFXxP1WEfsPelkmHhBc01lwQ2xjdX0T09MDx/hrEo2aj+UFeqG5QkHc2GdIKeDGoxRUqNWq8GOyA==","mode":420,"size":1975},"package.json":{"checkedAt":1794532104622,"integrity":"sha512-ycB97IdPr2EE/50X9/qEkMJWjZEjNT6UoX+06ttBASyXA67gUXWcUTjSTH+vgUZ2EJNszJ+XvS2HR7jSF6CeBA==","mode":493,"size":647},"README.md":{"checkedAt":1794532104622,"integrity":"sha512-BzFCt5Tgr03/xfj0fH4JrH0QaH2YUoYnoRD9bUAvwyZ/TPqe3A1UNrvOw/L7xgpf0ipoUyO/gVjybk1YV6+h5g==","mode":420,"size":4511}}}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var windowRole = {
abstract: true,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-modal': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype']]
};
var _default = exports.default = windowRole;
@@ -0,0 +1,6 @@
'use strict';
export default function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
return match && match[1] || '';
}
@@ -0,0 +1 @@
module.exports={C:{"52":0.00443,"115":0.01774,"132":0.00443,"135":0.00443,"140":0.00887,"142":0.00887,"143":0.23057,"144":0.19066,"145":0.00887,"146":0.00443,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 133 134 136 137 138 139 141 147 3.5 3.6"},D:{"39":0.00887,"40":0.00887,"41":0.00887,"42":0.01774,"43":0.00887,"44":0.00887,"45":0.00887,"46":0.00887,"47":0.00887,"48":0.00887,"49":0.00887,"50":0.00887,"51":0.00887,"52":0.00887,"53":0.00887,"54":0.00887,"55":0.00887,"56":0.00887,"57":0.00887,"58":0.00887,"59":0.00887,"60":0.00887,"61":0.00443,"65":0.00443,"71":0.00443,"79":0.00443,"87":0.00887,"91":0.00443,"98":0.00443,"103":0.00443,"104":0.00443,"105":0.00887,"106":0.00443,"108":0.00887,"109":0.31481,"111":1.14841,"112":0.00443,"114":0.00443,"115":0.00443,"116":0.01774,"118":0.00443,"119":0.00443,"120":0.0133,"121":0.06651,"122":0.03104,"123":0.07538,"124":0.02217,"125":0.54538,"126":0.02217,"127":0.00887,"128":0.03547,"129":0.0133,"130":0.0266,"131":0.07094,"132":0.0266,"133":0.06651,"134":0.04877,"135":0.04434,"136":0.07094,"137":0.06651,"138":0.18623,"139":0.27934,"140":6.14996,"141":18.24591,"142":0.22613,"143":0.00887,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 62 63 64 66 67 68 69 70 72 73 74 75 76 77 78 80 81 83 84 85 86 88 89 90 92 93 94 95 96 97 99 100 101 102 107 110 113 117 144 145"},F:{"91":0.02217,"92":0.04434,"95":0.00443,"114":0.00443,"120":0.04877,"121":0.00443,"122":0.1951,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00443,"109":0.03547,"112":0.00443,"113":0.00443,"114":0.00443,"116":0.00443,"117":0.00443,"119":0.00887,"120":0.00443,"121":0.00443,"122":0.00443,"124":0.00443,"125":0.00443,"126":0.00443,"127":0.00887,"128":0.00887,"129":0.00443,"130":0.00887,"131":0.02217,"132":0.0133,"133":0.01774,"134":0.02217,"135":0.01774,"136":0.02217,"137":0.01774,"138":0.03547,"139":0.04434,"140":0.97548,"141":5.47599,"142":0.00887,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 115 118 123"},E:{"8":0.00443,_:"0 4 5 6 7 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.5 17.0 18.2 26.2","15.6":0.01774,"16.3":0.00443,"16.4":0.00443,"16.6":0.01774,"17.1":0.0133,"17.2":0.00443,"17.3":0.00443,"17.4":0.00887,"17.5":0.00887,"17.6":0.02217,"18.0":0.00443,"18.1":0.00443,"18.3":0.01774,"18.4":0.00887,"18.5-18.6":0.03547,"26.0":0.2217,"26.1":0.0133},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00085,"5.0-5.1":0,"6.0-6.1":0.00339,"7.0-7.1":0.00254,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00763,"10.0-10.2":0.00085,"10.3":0.01441,"11.0-11.2":0.21362,"11.3-11.4":0.00509,"12.0-12.1":0.0017,"12.2-12.5":0.04154,"13.0-13.1":0,"13.2":0.00424,"13.3":0.0017,"13.4-13.7":0.00678,"14.0-14.4":0.01441,"14.5-14.8":0.01526,"15.0-15.1":0.01441,"15.2-15.3":0.01102,"15.4":0.01272,"15.5":0.01441,"15.6-15.8":0.18819,"16.0":0.02543,"16.1":0.04747,"16.2":0.02458,"16.3":0.04408,"16.4":0.01102,"16.5":0.0195,"16.6-16.7":0.25177,"17.0":0.0178,"17.1":0.02713,"17.2":0.0195,"17.3":0.02882,"17.4":0.05086,"17.5":0.08731,"17.6-17.7":0.2204,"18.0":0.05001,"18.1":0.10342,"18.2":0.05595,"18.3":0.17971,"18.4":0.0924,"18.5-18.6":4.71153,"26.0":0.58237,"26.1":0.02119},P:{"22":0.01014,"23":0.01014,"24":0.01014,"25":0.02028,"26":0.05071,"27":0.22313,"28":13.11413,"29":1.45036,_:"4 20 21 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.08893,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00002,"4.4":0,"4.4.3-4.4.4":0.00004},K:{"0":0.14472,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.30151,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.18924},Q:{"14.9":0.01113},O:{"0":0.0334},H:{"0":0},L:{"0":32.16769}};
@@ -0,0 +1,59 @@
import $6Fm0V$react from "react";
/*
* 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.
*/
function $c1d7fb2ec91bae71$var$Item(props) {
return null;
}
$c1d7fb2ec91bae71$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
let { childItems: childItems, title: title, children: children } = props;
let rendered = props.title || props.children;
let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'] || '';
// suppressTextValueWarning is used in components like Tabs, which don't have type to select support.
if (!textValue && !(context === null || context === void 0 ? void 0 : context.suppressTextValueWarning) && process.env.NODE_ENV !== 'production') console.warn('<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop.');
yield {
type: 'item',
props: props,
rendered: rendered,
textValue: textValue,
'aria-label': props['aria-label'],
hasChildNodes: $c1d7fb2ec91bae71$var$hasChildItems(props),
*childNodes () {
if (childItems) for (let child of childItems)yield {
type: 'item',
value: child
};
else if (title) {
let items = [];
(0, $6Fm0V$react).Children.forEach(children, (child)=>{
items.push({
type: 'item',
element: child
});
});
yield* items;
}
}
};
};
function $c1d7fb2ec91bae71$var$hasChildItems(props) {
if (props.hasChildItems != null) return props.hasChildItems;
if (props.childItems) return true;
if (props.title && (0, $6Fm0V$react).Children.count(props.children) > 0) return true;
return false;
}
// We don't want getCollectionNode to show up in the type definition
let $c1d7fb2ec91bae71$export$6d08773d2e66f8f2 = $c1d7fb2ec91bae71$var$Item;
export {$c1d7fb2ec91bae71$export$6d08773d2e66f8f2 as Item};
//# sourceMappingURL=Item.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"parsePubArea.d.ts","sourceRoot":"","sources":["../../../../src/registration/verifications/tpm/parsePubArea.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CAyGhE;AAED,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE;QAChB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,WAAW,EAAE,OAAO,CAAC;QACrB,mBAAmB,EAAE,OAAO,CAAC;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,eAAe,EAAE,OAAO,CAAC;QACzB,IAAI,EAAE,OAAO,CAAC;QACd,oBAAoB,EAAE,OAAO,CAAC;QAC9B,UAAU,EAAE,OAAO,CAAC;QACpB,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE;QACV,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,GAAG,CAAC,EAAE,aAAa,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -0,0 +1,18 @@
import getTag from './_getTag.js';
import isObjectLike from './isObjectLike.js';
/** `Object#toString` result references. */
var mapTag = '[object Map]';
/**
* The base implementation of `_.isMap` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
*/
function baseIsMap(value) {
return isObjectLike(value) && getTag(value) == mapTag;
}
export default baseIsMap;
@@ -0,0 +1 @@
{"name":"@babel/helper-module-transforms","version":"7.28.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532117238,"integrity":"sha512-KYRMN3MVTuiy5XkFDHd5PnQmHaQnt3z16nsBDePxZ9YNmq7IFlslpBBlR3UI+zvlbEemzowOYeKil9a0ZkOYxQ==","mode":420,"size":1106},"README.md":{"checkedAt":1794532117238,"integrity":"sha512-vgyhO9YXUJP7jM0ym+eww5q70jq8CG/IYFSG2g2Yflo/Ad2pyqWyfSsz6R4DHeKwdv9thxddvIOfqZFH6fkQYQ==","mode":420,"size":387},"lib/dynamic-import.js":{"checkedAt":1794532117239,"integrity":"sha512-OpJg6TsJUCwulua81BZiEcsw2OKOizz8wtuV7rywcNrukd8expKH+cw+qsHy0dGNBs5sm0THOhkUEwtYdkCaOQ==","mode":420,"size":1759},"lib/dynamic-import.js.map":{"checkedAt":1794532117239,"integrity":"sha512-z2FqIWhIC8+y3uor3zEUo3eQFLmCnrhmQmEUfWSBUGOFhOq/X8Ovh97vGE5qkrWBft9FUxklIqoLQJLPixQuhQ==","mode":420,"size":4015},"lib/get-module-name.js":{"checkedAt":1794532117239,"integrity":"sha512-0UJ4G8b97E3jsv+ZHe2Jec52Sypb2hmhiXUrUh/6gdC/CZfNWXOpqY1Z9Gs6LoYbxg6xRq7tpbnnmuuB6/1u0A==","mode":420,"size":1731},"lib/get-module-name.js.map":{"checkedAt":1794532117239,"integrity":"sha512-NzO+wo7XXbBdtGsCAJRuL+FAFhwDUphqxQEHQysum5dbEd7n5j+G6QKs4p0KIxv9oKpd94xPOtEFePA5vjbAlw==","mode":420,"size":3916},"lib/index.js":{"checkedAt":1794532117239,"integrity":"sha512-BfO6sbwNn17MoB8vxiZIOsAXkonlr09tBYz2OeB75giMK7AmllT3CriatTB89ZyevbJKiiAv9RIH6V7Vvbk4Ug==","mode":420,"size":13496},"lib/index.js.map":{"checkedAt":1794532117239,"integrity":"sha512-U16exHaQRDkQ1lMFWXb0W0qZh4pO6XPlVksQ5g9iAFfsrtIorqX4LNEqzg6U3JJwQMW0h59iJqSE+ZqhIbse5w==","mode":420,"size":32033},"lib/lazy-modules.js":{"checkedAt":1794532117240,"integrity":"sha512-ER7W3Rs73N4sO9ticR8FOLKBAfTd0VAFw8MEJsBjIwObMkzGyJsyelzB/UtaHUnDfdVF3ln5AcJaZ7c3gN/oqw==","mode":420,"size":1005},"lib/lazy-modules.js.map":{"checkedAt":1794532117240,"integrity":"sha512-xjv6x1vzAx3pjGNTKffIR5qzHal5sbS62zuWwbp0HbeQ5+Hf6mWmong0BXtaD+3W290/M9MtnKLoXsjzslmBOw==","mode":420,"size":2379},"lib/normalize-and-load-metadata.js":{"checkedAt":1794532117240,"integrity":"sha512-KwQ4mohm86V/vuvVwyjACx+82zd0CJCZnmRQCm6MIKJDnbRgmcsWkkb9LRqy/xcqKvyvAJBXSC7XncsHCVd6tg==","mode":420,"size":13262},"lib/normalize-and-load-metadata.js.map":{"checkedAt":1794532117240,"integrity":"sha512-cykOocbBya4kbCsnBeAT86n54prH40fMeakKlzyMSHs2dQP26jgRes4DYug+ek6BHYpjfwrVAJZPQ0b2x5x1uw==","mode":420,"size":34957},"lib/rewrite-live-references.js":{"checkedAt":1794532117240,"integrity":"sha512-A7Nn2xJwCKCutVuIqcDQ9GTtYGfTSh/BYAbvrujPTyE8miLyET6aiplgEhwpFnYqrrntxY67JRnPIvXStyBA4w==","mode":420,"size":13596},"lib/rewrite-live-references.js.map":{"checkedAt":1794532117241,"integrity":"sha512-HcDgq+4katD6jIjXinVqxzBekXHvFgBd6HF1UuE/yoDVNYSEuNnBnvmIKlf5SeRQCyjgMlcCcX7DVfbt0Roj3Q==","mode":420,"size":35137},"lib/rewrite-this.js":{"checkedAt":1794532117241,"integrity":"sha512-m54zWXrZZT67YQYvXWXhVVa/rgCaomFdDrHMmCKbNuDSezAE4ZMhEZ97zjeDFQ6HmISQWLDcaw0fdlepzZz0Eg==","mode":420,"size":641},"lib/rewrite-this.js.map":{"checkedAt":1794532117241,"integrity":"sha512-aX3+vYi/cFbQI+6vj4loMaAFOOSh7s/bhvWuQR9OLwxWRDrzOGAxM43WHWLvn5GCmFQ9iCjCkzhBJbnkFIt2Kg==","mode":420,"size":1531},"package.json":{"checkedAt":1794532117241,"integrity":"sha512-/fZlRsFfNL1I/rsFDJe9n0txoSC6+oQ8In1vzf22lU/4RHMcrEPSB8PjySYM23w/yGtmG1phv7fcLwkMJND2bg==","mode":420,"size":874}}}
@@ -0,0 +1,46 @@
// v8 builtin format stack trace
// for when there was no previous prepareStackTrace function to call
var FormatStackTrace = require('./formatstack');
// some notes on the behavior below:
// because the 'stack' member is a one shot access variable (the raw stack is
// formatted on accessing it)
// we try to avoid modifying what the user would have wanted
// thus we use the previous value for prepareStackTrace
//
// The reason we store the callsite variable is because prepareStackTrace
// will not be called again once it has been called for a given error object
// but we want to support getting the stack out of the error multiple times (cause why not)
module.exports = function(err) {
// save original stacktrace
var save = Error.prepareStackTrace;
// replace capture with our function
Error.prepareStackTrace = function(err, trace) {
// cache stack frames so we don't have to get them again
// use a non-enumerable property
Object.defineProperty(err, '_sb_callsites', {
value: trace
});
return (save || FormatStackTrace)(err, trace);
};
// force capture of the stack frames
err.stack;
// someone already asked for the stack so we can't do this trick
// TODO fallback to string parsing?
if (!err._sb_callsites) {
return [];
}
// return original capture function
Error.prepareStackTrace = save;
return err._sb_callsites;
};
@@ -0,0 +1,99 @@
{
"name": "mdast-util-gfm-strikethrough",
"version": "2.0.0",
"description": "mdast extension to parse and serialize GFM strikethrough",
"license": "MIT",
"keywords": [
"unist",
"mdast",
"mdast-util",
"util",
"utility",
"markdown",
"markup",
"strikethrough",
"strike",
"through",
"del",
"delete",
"deletion",
"gfm"
],
"repository": "syntax-tree/mdast-util-gfm-strikethrough",
"bugs": "https://github.com/syntax-tree/mdast-util-gfm-strikethrough/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-to-markdown": "^2.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"micromark-extension-gfm-strikethrough": "^2.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"unist-util-remove-position": "^5.0.0",
"xo": "^0.54.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api-prod": "node --conditions production test.js",
"test-api-dev": "node --conditions development test.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
"overrides": [
{
"files": [
"**/*.ts"
],
"rules": {
"@typescript-eslint/consistent-type-definitions": "off"
}
}
],
"prettier": true
}
}
@@ -0,0 +1,301 @@
// Type definitions for decimal.js >=7.0.0
// Project: https://github.com/MikeMcl/decimal.js
// Definitions by: Michael Mclaughlin <https://github.com/MikeMcl>
// Definitions: https://github.com/MikeMcl/decimal.js
//
// Documentation: http://mikemcl.github.io/decimal.js/
//
// Exports:
//
// class Decimal (default export)
// type Decimal.Constructor
// type Decimal.Instance
// type Decimal.Modulo
// type Decimal.Rounding
// type Decimal.Value
// interface Decimal.Config
//
// Example (alternative syntax commented-out):
//
// import {Decimal} from "decimal.js"
// //import Decimal from "decimal.js"
//
// let r: Decimal.Rounding = Decimal.ROUND_UP;
// let c: Decimal.Configuration = {precision: 4, rounding: r};
// Decimal.set(c);
// let v: Decimal.Value = '12345.6789';
// let d: Decimal = new Decimal(v);
// //let d: Decimal.Instance = new Decimal(v);
//
// The use of compiler option `--strictNullChecks` is recommended.
export default Decimal;
export namespace Decimal {
export type Constructor = typeof Decimal;
export type Instance = Decimal;
export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
export type Modulo = Rounding | 9;
export type Value = string | number | bigint | Decimal;
// http://mikemcl.github.io/decimal.js/#constructor-properties
export interface Config {
precision?: number;
rounding?: Rounding;
toExpNeg?: number;
toExpPos?: number;
minE?: number;
maxE?: number;
crypto?: boolean;
modulo?: Modulo;
defaults?: boolean;
}
}
export declare class Decimal {
readonly d: number[];
readonly e: number;
readonly s: number;
constructor(n: Decimal.Value);
absoluteValue(): Decimal;
abs(): Decimal;
ceil(): Decimal;
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
comparedTo(n: Decimal.Value): number;
cmp(n: Decimal.Value): number;
cosine(): Decimal;
cos(): Decimal;
cubeRoot(): Decimal;
cbrt(): Decimal;
decimalPlaces(): number;
dp(): number;
dividedBy(n: Decimal.Value): Decimal;
div(n: Decimal.Value): Decimal;
dividedToIntegerBy(n: Decimal.Value): Decimal;
divToInt(n: Decimal.Value): Decimal;
equals(n: Decimal.Value): boolean;
eq(n: Decimal.Value): boolean;
floor(): Decimal;
greaterThan(n: Decimal.Value): boolean;
gt(n: Decimal.Value): boolean;
greaterThanOrEqualTo(n: Decimal.Value): boolean;
gte(n: Decimal.Value): boolean;
hyperbolicCosine(): Decimal;
cosh(): Decimal;
hyperbolicSine(): Decimal;
sinh(): Decimal;
hyperbolicTangent(): Decimal;
tanh(): Decimal;
inverseCosine(): Decimal;
acos(): Decimal;
inverseHyperbolicCosine(): Decimal;
acosh(): Decimal;
inverseHyperbolicSine(): Decimal;
asinh(): Decimal;
inverseHyperbolicTangent(): Decimal;
atanh(): Decimal;
inverseSine(): Decimal;
asin(): Decimal;
inverseTangent(): Decimal;
atan(): Decimal;
isFinite(): boolean;
isInteger(): boolean;
isInt(): boolean;
isNaN(): boolean;
isNegative(): boolean;
isNeg(): boolean;
isPositive(): boolean;
isPos(): boolean;
isZero(): boolean;
lessThan(n: Decimal.Value): boolean;
lt(n: Decimal.Value): boolean;
lessThanOrEqualTo(n: Decimal.Value): boolean;
lte(n: Decimal.Value): boolean;
logarithm(n?: Decimal.Value): Decimal;
log(n?: Decimal.Value): Decimal;
minus(n: Decimal.Value): Decimal;
sub(n: Decimal.Value): Decimal;
modulo(n: Decimal.Value): Decimal;
mod(n: Decimal.Value): Decimal;
naturalExponential(): Decimal;
exp(): Decimal;
naturalLogarithm(): Decimal;
ln(): Decimal;
negated(): Decimal;
neg(): Decimal;
plus(n: Decimal.Value): Decimal;
add(n: Decimal.Value): Decimal;
precision(includeZeros?: boolean): number;
sd(includeZeros?: boolean): number;
round(): Decimal;
sine() : Decimal;
sin() : Decimal;
squareRoot(): Decimal;
sqrt(): Decimal;
tangent() : Decimal;
tan() : Decimal;
times(n: Decimal.Value): Decimal;
mul(n: Decimal.Value) : Decimal;
toBinary(significantDigits?: number): string;
toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
toDecimalPlaces(decimalPlaces?: number): Decimal;
toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
toDP(decimalPlaces?: number): Decimal;
toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
toExponential(decimalPlaces?: number): string;
toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
toFixed(decimalPlaces?: number): string;
toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
toFraction(max_denominator?: Decimal.Value): Decimal[];
toHexadecimal(significantDigits?: number): string;
toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
toHex(significantDigits?: number): string;
toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
toJSON(): string;
toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
toNumber(): number;
toOctal(significantDigits?: number): string;
toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
toPower(n: Decimal.Value): Decimal;
pow(n: Decimal.Value): Decimal;
toPrecision(significantDigits?: number): string;
toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
toSignificantDigits(significantDigits?: number): Decimal;
toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
toSD(significantDigits?: number): Decimal;
toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
toString(): string;
truncated(): Decimal;
trunc(): Decimal;
valueOf(): string;
static abs(n: Decimal.Value): Decimal;
static acos(n: Decimal.Value): Decimal;
static acosh(n: Decimal.Value): Decimal;
static add(x: Decimal.Value, y: Decimal.Value): Decimal;
static asin(n: Decimal.Value): Decimal;
static asinh(n: Decimal.Value): Decimal;
static atan(n: Decimal.Value): Decimal;
static atanh(n: Decimal.Value): Decimal;
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
static cbrt(n: Decimal.Value): Decimal;
static ceil(n: Decimal.Value): Decimal;
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
static clone(object?: Decimal.Config): Decimal.Constructor;
static config(object: Decimal.Config): Decimal.Constructor;
static cos(n: Decimal.Value): Decimal;
static cosh(n: Decimal.Value): Decimal;
static div(x: Decimal.Value, y: Decimal.Value): Decimal;
static exp(n: Decimal.Value): Decimal;
static floor(n: Decimal.Value): Decimal;
static hypot(...n: Decimal.Value[]): Decimal;
static isDecimal(object: any): object is Decimal;
static ln(n: Decimal.Value): Decimal;
static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
static log2(n: Decimal.Value): Decimal;
static log10(n: Decimal.Value): Decimal;
static max(...n: Decimal.Value[]): Decimal;
static min(...n: Decimal.Value[]): Decimal;
static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
static noConflict(): Decimal.Constructor; // Browser only
static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
static random(significantDigits?: number): Decimal;
static round(n: Decimal.Value): Decimal;
static set(object: Decimal.Config): Decimal.Constructor;
static sign(n: Decimal.Value): number;
static sin(n: Decimal.Value): Decimal;
static sinh(n: Decimal.Value): Decimal;
static sqrt(n: Decimal.Value): Decimal;
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
static sum(...n: Decimal.Value[]): Decimal;
static tan(n: Decimal.Value): Decimal;
static tanh(n: Decimal.Value): Decimal;
static trunc(n: Decimal.Value): Decimal;
static readonly default?: Decimal.Constructor;
static readonly Decimal?: Decimal.Constructor;
static readonly precision: number;
static readonly rounding: Decimal.Rounding;
static readonly toExpNeg: number;
static readonly toExpPos: number;
static readonly minE: number;
static readonly maxE: number;
static readonly crypto: boolean;
static readonly modulo: Decimal.Modulo;
static readonly ROUND_UP: 0;
static readonly ROUND_DOWN: 1;
static readonly ROUND_CEIL: 2;
static readonly ROUND_FLOOR: 3;
static readonly ROUND_HALF_UP: 4;
static readonly ROUND_HALF_DOWN: 5;
static readonly ROUND_HALF_EVEN: 6;
static readonly ROUND_HALF_CEIL: 7;
static readonly ROUND_HALF_FLOOR: 8;
static readonly EUCLID: 9;
}
export declare function Decimal(n: Decimal.Value): Decimal;
@@ -0,0 +1 @@
{"name":"zod","version":"3.25.76","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532127285,"integrity":"sha512-G1yUyqlliwo69VliJVa8c3NxFc2c8Y+sTC+ki2aq44rYTdSl3eKvclgKgvbDNthGlRQBVX2AtRWxyFhWLV18oA==","mode":420,"size":1072},"v4/core/api.cjs":{"checkedAt":1794532127285,"integrity":"sha512-9f1zf9PfkCatP4rfj850ss6RB07yuQmwydVuLF80fxS+o7EAJe6E1LNmnW/NEcRxsLmZ3xBu3Vua6vfJq3CmOA==","mode":420,"size":26465},"v4/locales/ar.cjs":{"checkedAt":1794532127286,"integrity":"sha512-Ups0SrxGIuJ5+tlHOI0CDQDacrwawWXzzRqqFbGmQU++J/GVSHYVuoJ1jb6OZrl6r5vBUoBNxwm/Cr/I0pYN/g==","mode":420,"size":6420},"v4/locales/az.cjs":{"checkedAt":1794532127286,"integrity":"sha512-mIGhvFBPCLMVxbMjWdYfyC0x1j23WuAlk7lvcfcwlg76x2Cv/Jpwb4eWKxhzcArsml14UnrLrbwLJHS8EDy7ww==","mode":420,"size":5782},"v4/locales/be.cjs":{"checkedAt":1794532127286,"integrity":"sha512-Q4VpD9g5DNF6PnqKjQHpI8qC7N1cCF5xP7aI93hkQxMLuBpIoTNsyPijqwG/EnovIESoSa/AJXNt9xH11RfFvg==","mode":420,"size":7818},"v4/locales/ca.cjs":{"checkedAt":1794532127286,"integrity":"sha512-w659aXBd/QVU1DDgZT1fA/tXCzaUkICtLzS59T4hvXbVTNZJ+4b/uRp8D1WlpD+6r5jcBTlJEU8JIHFZo0qGAA==","mode":420,"size":6103},"v4/classic/checks.cjs":{"checkedAt":1794532127286,"integrity":"sha512-Y0PoIH1P1WGnT7yG5ZU/AYx19EfXbvZOPSWYAbdg1yFfqSugiCxBoHuRtLIz9w815Di9YC3LjDtdCE6QYK+r3g==","mode":420,"size":3883},"v4/core/checks.cjs":{"checkedAt":1794532127287,"integrity":"sha512-EyK2Ob6Jedt/bA9lGKn63mXgHy603NjSlWD0wLQoVHkTTVWRqsuK0Ace6VboQ4m+pZ0oljaA0YPmD2vLh1un0Q==","mode":420,"size":21098},"v4/mini/checks.cjs":{"checkedAt":1794532127287,"integrity":"sha512-saGIc+184MkxkbeEQ/Gd8Iiy2STuIBC0GpszEHYj7Cn/PVFeI2vduY2uRLQO0srhX1rwKlj+LC2agjFSr/SBbQ==","mode":420,"size":4141},"v4/classic/coerce.cjs":{"checkedAt":1794532127287,"integrity":"sha512-YXRzRWS2OMAA0qFqUiAElah3+3sBoNsv32Bvnhxm9t7Uu+IT51eW/IEjvEaDs0bqsaDF2yDAaAL6WW86my6OBA==","mode":420,"size":1772},"v4/mini/coerce.cjs":{"checkedAt":1794532127287,"integrity":"sha512-EITUIGlA/VYZdMSXT6DUCpLN8zDLBGWxf5M0kV2mseh5A2Gxs80IE4fZIRc//D2JDGo/Jm8bEXW0uIRDzXvLZg==","mode":420,"size":1792},"v4/classic/compat.cjs":{"checkedAt":1794532127287,"integrity":"sha512-rHbyKPkYxJxjDO+UYTl3NE7TxfvsG/MLI08/t8szQNja3+gq6C39JekVfbq7xraSPOyUOPdZgKTrSHjQbqtTEA==","mode":420,"size":2316},"v4/core/core.cjs":{"checkedAt":1794532127288,"integrity":"sha512-kAqDyh1LhmeGB3XhEDNHbE+taTZI2vhC4kFANw2oKSSNYm2WaFgT9W1hPPaZP1ataiYPloCJM2gjldhqEkXx3A==","mode":420,"size":2309},"v4/locales/cs.cjs":{"checkedAt":1794532127288,"integrity":"sha512-uBzAX0wc3Kqw59JyQcElwhjG20nfcRuLr43BsNq5S2U3vgfmgdYXA8OlemtiOtHCZ/mI3Wvf856Kqm+zgWDRvg==","mode":420,"size":6408},"v4/locales/de.cjs":{"checkedAt":1794532127288,"integrity":"sha512-4F871/yjj83lIt7Pbv+h9hMJtE66bV59elSnpMTSMjXk/YeURdth/8lBCjCwYYdf++r9pgx3Q0aXw6wfu6R6Ag==","mode":420,"size":5814},"v4/core/doc.cjs":{"checkedAt":1794532127288,"integrity":"sha512-yCKUUNvRJMp2beapyqpnwgs6JHDdOmG60sDO7RY+jtOU/lea8eWl4nTxeXEuIBsJO7nUELwW5Ek/o4f6ulE1nw==","mode":420,"size":1199},"v3/locales/en.cjs":{"checkedAt":1794532127288,"integrity":"sha512-dK8UpOtfNbClJgLk8AIOz8gzq1klRSMqSA9vQEa9PmJPu/VYlpWqbCFiTWcd1gcAwqhOUwUMrxW+zjbtqkc/7g==","mode":420,"size":5971},"v4/locales/en.cjs":{"checkedAt":1794532127288,"integrity":"sha512-5bfRfL1OY2dnp94ToJSxYOMJGL0miPIBUPbRKcuZ1fBahy8rCpPuL67j8GAUZ7/JK97snOuBs1tUh0FBX/f3DA==","mode":420,"size":5683},"v3/helpers/enumUtil.cjs":{"checkedAt":1794532090301,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":420,"size":77},"v4/locales/eo.cjs":{"checkedAt":1794532127288,"integrity":"sha512-aIMktbm+p6+3RAzJtiwPcPS8N91RilRaIGs3et9NjbenWARMGdkokiFtIT8CVhaq2gS4g/WUQuWduC/Biarn4g==","mode":420,"size":5802},"v3/errors.cjs":{"checkedAt":1794532127289,"integrity":"sha512-DlRRbWHEIlbx544cgtWBdlFGu0x65y+pFcew7Dpb0qYq/tfMZFBn5mXk5DsgFe9ZVTMMpIJNkJMVyYVTOHQUzw==","mode":420,"size":579},"v4/classic/errors.cjs":{"checkedAt":1794532127289,"integrity":"sha512-OPF1cqdI0Ejd7+H5AjTOwCaX16KftJrzongkX0aFtw+4hi29vSmW46r2bX0M+/93iNKRHAYHmvBZ7mpHoXRFUA==","mode":420,"size":2465},"v4/core/errors.cjs":{"checkedAt":1794532127289,"integrity":"sha512-zB8CdeL/ecequp1yw+P30rV5dAFe89vUL962yoYeYzBJtuPJmTmUriJnGsITYn3jc8dB6tXsqtk7ntDiHWIV0A==","mode":420,"size":7650},"v3/helpers/errorUtil.cjs":{"checkedAt":1794532127289,"integrity":"sha512-KshhzuPk6WbCcEU3CEzJ2VeNHYNrrCaAMh2qqXq1JUYXLjkYb5i2d7FDdfTSJ8jkR+5lrnUKoolnTMNmShSTRw==","mode":420,"size":418},"v4/locales/es.cjs":{"checkedAt":1794532127289,"integrity":"sha512-eqSDRYEQmUt6U7AURfzplIxL/OOyy/VvkhikuZhgF8UarbpbYaDyRUOLBs/6bf6qnf9hFGXRXkbDh+fcvrgHug==","mode":420,"size":5977},"v3/external.cjs":{"checkedAt":1794532127289,"integrity":"sha512-Wi+FJV8YFBiLRINawlWPD37fVSGwd2RcVsWkhopiTZJRvuP3mdXjczuQ5OlEpnyxk4tySx5m6GDRgz6b8m4/jA==","mode":420,"size":1076},"v4/classic/external.cjs":{"checkedAt":1794532127290,"integrity":"sha512-QoXJt2nNwyYyH/nvclcBdISOKe/hoD/dwYWXyqNiPdDFgcaaEKSk3PUUXjQEOSSAI9KUg8NUzPDhXj3fE/rqwA==","mode":420,"size":5131},"v4/mini/external.cjs":{"checkeLine truncated
@@ -0,0 +1,84 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var IsDetachedBuffer = require('es-abstract/2024/IsDetachedBuffer');
var IsSharedArrayBuffer = require('es-abstract/2024/IsSharedArrayBuffer');
var max = require('es-abstract/2024/max');
var min = require('es-abstract/2024/min');
var SpeciesConstructor = require('es-abstract/2024/SpeciesConstructor');
var ToIntegerOrInfinity = require('es-abstract/2024/ToIntegerOrInfinity');
var arrayBufferByteLength = require('array-buffer-byte-length');
var isArrayBuffer = require('is-array-buffer');
var $TypeError = require('es-errors/type');
module.exports = function slice(start, end) {
var O = this; // step 1
if (!isArrayBuffer(O) || IsSharedArrayBuffer(O) || IsDetachedBuffer(O)) {
throw new $TypeError('receiver must be a non-detached, non-shared ArrayBuffer'); // steps 2-4
}
var len = arrayBufferByteLength(O); // step 5
var relativeStart = ToIntegerOrInfinity(start); // step 6
var first;
if (relativeStart === -Infinity) {
first = 0; // step 7
} else if (relativeStart < 0) {
first = max(len + relativeStart, 0); // step 8
} else {
first = min(relativeStart, len); // step 9
}
var relativeEnd = typeof end === 'undefined' ? len : ToIntegerOrInfinity(end); // step 10
var final;
if (relativeEnd === -Infinity) {
final = 0; // step 11
} else if (relativeEnd < 0) {
final = max(len + relativeEnd, 0); // step 12
} else {
final = min(relativeEnd, len); // step 13
}
var newLen = max(final - first, 0); // step 14
var Ctor = SpeciesConstructor(O, $ArrayBuffer); // step 15
var new$ = new Ctor(newLen); // step 16
if (!isArrayBuffer(new$) || IsSharedArrayBuffer(new$) || IsDetachedBuffer(new$)) {
throw new $TypeError('Species constructor must produce a non-detached, non-shared Array Buffer'); // steps 17-19
}
if (new$ === O) {
throw new $TypeError('new ArrayBuffer should not have been the same as the receiver'); // step 20
}
if (arrayBufferByteLength(new$) < newLen) {
throw new $TypeError('new ArrayBuffer\'s byteLength must be at least the requested length'); // step 21
}
if (IsDetachedBuffer(O)) {
throw new $TypeError('receiver became an detached ArrayBuffer'); // step 23
}
/*
24. Let fromBuf be O.[[ArrayBufferData]].
25. Let toBuf be new.[[ArrayBufferData]].
26. Perform CopyDataBlockBytes(toBuf, 0, fromBuf, first, newLen).
*/
var sourceArr = new $Uint8Array(O);
var destArr = new $Uint8Array(new$);
for (var i = start, ii = 0; i < end; i++, ii++) {
destArr[ii] = sourceArr[i];
}
return new$; // step 27
};
@@ -0,0 +1,23 @@
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150
[CHANGELOG.md]
indent_style = space
indent_size = 2
[*.json]
max_line_length = off
[Makefile]
max_line_length = off
[CHANGELOG.md]
max_line_length = off
@@ -0,0 +1,3 @@
import { useLayoutEffect } from 'react';
import { createDeepCompareEffect } from '../createDeepCompareEffect';
export default createDeepCompareEffect(useLayoutEffect);
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `Za odprtje menija pritisnite in dr\u{17E}ite gumb ali pritisnite Alt+pu\u{161}\u{10D}ica navzdol`
};
//# sourceMappingURL=sl-SI.main.js.map
@@ -0,0 +1,109 @@
export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar';
export { stringify } from './cst-stringify';
export type { Visitor, VisitPath } from './cst-visit';
export { visit } from './cst-visit';
export interface SourceToken {
type: 'byte-order-mark' | 'doc-mode' | 'doc-start' | 'space' | 'comment' | 'newline' | 'directive-line' | 'anchor' | 'tag' | 'seq-item-ind' | 'explicit-key-ind' | 'map-value-ind' | 'flow-map-start' | 'flow-map-end' | 'flow-seq-start' | 'flow-seq-end' | 'flow-error-end' | 'comma' | 'block-scalar-header';
offset: number;
indent: number;
source: string;
}
export interface ErrorToken {
type: 'error';
offset: number;
source: string;
message: string;
}
export interface Directive {
type: 'directive';
offset: number;
source: string;
}
export interface Document {
type: 'document';
offset: number;
start: SourceToken[];
value?: Token;
end?: SourceToken[];
}
export interface DocumentEnd {
type: 'doc-end';
offset: number;
source: string;
end?: SourceToken[];
}
export interface FlowScalar {
type: 'alias' | 'scalar' | 'single-quoted-scalar' | 'double-quoted-scalar';
offset: number;
indent: number;
source: string;
end?: SourceToken[];
}
export interface BlockScalar {
type: 'block-scalar';
offset: number;
indent: number;
props: Token[];
source: string;
}
export interface BlockMap {
type: 'block-map';
offset: number;
indent: number;
items: Array<{
start: SourceToken[];
explicitKey?: true;
key?: never;
sep?: never;
value?: never;
} | {
start: SourceToken[];
explicitKey?: true;
key: Token | null;
sep: SourceToken[];
value?: Token;
}>;
}
export interface BlockSequence {
type: 'block-seq';
offset: number;
indent: number;
items: Array<{
start: SourceToken[];
key?: never;
sep?: never;
value?: Token;
}>;
}
export type CollectionItem = {
start: SourceToken[];
key?: Token | null;
sep?: SourceToken[];
value?: Token;
};
export interface FlowCollection {
type: 'flow-collection';
offset: number;
indent: number;
start: SourceToken;
items: CollectionItem[];
end: SourceToken[];
}
export type Token = SourceToken | ErrorToken | Directive | Document | DocumentEnd | FlowScalar | BlockScalar | BlockMap | BlockSequence | FlowCollection;
export type TokenType = SourceToken['type'] | DocumentEnd['type'] | FlowScalar['type'];
/** The byte order mark */
export declare const BOM = "\uFEFF";
/** Start of doc-mode */
export declare const DOCUMENT = "\u0002";
/** Unexpected end of flow-mode */
export declare const FLOW_END = "\u0018";
/** Next token is a scalar value */
export declare const SCALAR = "\u001F";
/** @returns `true` if `token` is a flow or block collection */
export declare const isCollection: (token: Token | null | undefined) => token is BlockMap | BlockSequence | FlowCollection;
/** @returns `true` if `token` is a flow or block scalar; not an alias */
export declare const isScalar: (token: Token | null | undefined) => token is FlowScalar | BlockScalar;
/** Get a printable representation of a lexer token */
export declare function prettyToken(token: string): string;
/** Identify the type of a lexer token. May return `null` for unknown tokens. */
export declare function tokenType(source: string): TokenType | null;
@@ -0,0 +1,3 @@
import { ESLintUtils } from '@typescript-eslint/utils';
import type { ESLintPluginDocs } from '../../rules';
export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, ESLintPluginDocs>>) => ESLintUtils.RuleModule<MessageIds, Options, ESLintPluginDocs, ESLintUtils.RuleListener>;
@@ -0,0 +1,5 @@
'use strict'
const SemVer = require('../classes/semver')
const patch = (a, loose) => new SemVer(a, loose).patch
module.exports = patch
@@ -0,0 +1,17 @@
Copyright (c) 2014 Hage Yaapa <[http://www.hacksparrow.com](http://www.hacksparrow.com)>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,42 @@
/*
* 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 {AriaTooltipProps} from '@react-types/tooltip';
import {DOMAttributes} from '@react-types/shared';
import {filterDOMProps, mergeProps} from '@react-aria/utils';
import {TooltipTriggerState} from '@react-stately/tooltip';
import {useHover} from '@react-aria/interactions';
export interface TooltipAria {
/**
* Props for the tooltip element.
*/
tooltipProps: DOMAttributes
}
/**
* Provides the accessibility implementation for a Tooltip component.
*/
export function useTooltip(props: AriaTooltipProps, state?: TooltipTriggerState): TooltipAria {
let domProps = filterDOMProps(props, {labelable: true});
let {hoverProps} = useHover({
onHoverStart: () => state?.open(true),
onHoverEnd: () => state?.close()
});
return {
tooltipProps: mergeProps(domProps, hoverProps, {
role: 'tooltip'
})
};
}
@@ -0,0 +1,42 @@
import {codes, values} from 'micromark-util-symbol'
/**
* Turn the number (in string form as either hexa- or plain decimal) coming from
* a numeric character reference into a character.
*
* Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
* non-characters and control characters safe.
*
* @param {string} value
* Value to decode.
* @param {number} base
* Numeric base.
* @returns {string}
* Character.
*/
export function decodeNumericCharacterReference(value, base) {
const code = Number.parseInt(value, base)
if (
// C0 except for HT, LF, FF, CR, space.
code < codes.ht ||
code === codes.vt ||
(code > codes.cr && code < codes.space) ||
// Control character (DEL) of C0, and C1 controls.
(code > codes.tilde && code < 160) ||
// Lone high surrogates and low surrogates.
(code > 55_295 && code < 57_344) ||
// Noncharacters.
(code > 64_975 && code < 65_008) ||
/* eslint-disable no-bitwise */
(code & 65_535) === 65_535 ||
(code & 65_535) === 65_534 ||
/* eslint-enable no-bitwise */
// Out of range
code > 1_114_111
) {
return values.replacementCharacter
}
return String.fromCodePoint(code)
}
@@ -0,0 +1,22 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-flat-configs.js" script.
*/
"use strict"
module.exports = {
plugins: {
get "es-x"() {
return require("../../index.js")
},
},
rules: {
"es-x/no-array-prototype-flat": "error",
"es-x/no-json-superset": "error",
"es-x/no-object-fromentries": "error",
"es-x/no-optional-catch-binding": "error",
"es-x/no-regexp-unicode-property-escapes-2019": "error",
"es-x/no-string-prototype-trimstart-trimend": "error",
"es-x/no-symbol-prototype-description": "error",
},
}
@@ -0,0 +1,67 @@
{
"name": "remove-bom-buffer",
"description": "Remove a byte order mark (BOM) from a buffer.",
"version": "3.0.0",
"homepage": "https://github.com/jonschlinkert/remove-bom-buffer",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Blaine Bublitz (https://twitter.com/BlaineBublitz)",
"Erik Kemperman (https://github.com/erikkemperman)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
],
"repository": "jonschlinkert/remove-bom-buffer",
"bugs": {
"url": "https://github.com/jonschlinkert/remove-bom-buffer/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"is-buffer": "^1.1.5",
"is-utf8": "^0.2.1"
},
"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "^3.2.0"
},
"keywords": [
"bom",
"buffer",
"byte-order-mark",
"normalize",
"remove",
"strip",
"strip-bom",
"strip-bom-buffer",
"strip-bom-string"
],
"verb": {
"related": {
"list": [
"cr",
"has-bom",
"read-file",
"strip-bom-string"
]
},
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
}
}
}
@@ -0,0 +1,511 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = void 0;
exports.determineBranch = determineBranch;
exports.decodeHTML = decodeHTML;
exports.decodeHTMLAttribute = decodeHTMLAttribute;
exports.decodeHTMLStrict = decodeHTMLStrict;
exports.decodeXML = decodeXML;
const decode_data_html_js_1 = require("./generated/decode-data-html.js");
const decode_data_xml_js_1 = require("./generated/decode-data-xml.js");
const decode_codepoint_js_1 = require("./decode-codepoint.js");
var CharCodes;
(function (CharCodes) {
CharCodes[CharCodes["NUM"] = 35] = "NUM";
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
CharCodes[CharCodes["NINE"] = 57] = "NINE";
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
const TO_LOWER_BIT = 32;
var BinTrieFlags;
(function (BinTrieFlags) {
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags || (exports.BinTrieFlags = BinTrieFlags = {}));
function isNumber(code) {
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
}
function isAsciiAlphaNumeric(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||
isNumber(code));
}
/**
* Checks if the given character is a valid end character for an entity in an attribute.
*
* Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
* See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
*/
function isEntityInAttributeInvalidEnd(code) {
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function (EntityDecoderState) {
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
var DecodingMode;
(function (DecodingMode) {
/** Entities in text nodes that can end with any character. */
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
/** Only allow entities terminated with a semicolon. */
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
/** Entities in attributes have limitations on ending characters. */
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode || (exports.DecodingMode = DecodingMode = {}));
/**
* Token decoder with support of writing partial entities.
*/
class EntityDecoder {
constructor(
/** The tree used to decode entities. */
decodeTree,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint,
/** An object that is used to produce errors. */
errors) {
this.decodeTree = decodeTree;
this.emitCodePoint = emitCodePoint;
this.errors = errors;
/** The current state of the decoder. */
this.state = EntityDecoderState.EntityStart;
/** Characters that were consumed while parsing an entity. */
this.consumed = 1;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/
this.result = 0;
/** The current index in the decode tree. */
this.treeIndex = 0;
/** The number of characters that were consumed in excess. */
this.excess = 1;
/** The mode in which the decoder is operating. */
this.decodeMode = DecodingMode.Strict;
}
/** Resets the instance to make it reusable. */
startEntity(decodeMode) {
this.decodeMode = decodeMode;
this.state = EntityDecoderState.EntityStart;
this.result = 0;
this.treeIndex = 0;
this.excess = 1;
this.consumed = 1;
}
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
write(input, offset) {
switch (this.state) {
case EntityDecoderState.EntityStart: {
if (input.charCodeAt(offset) === CharCodes.NUM) {
this.state = EntityDecoderState.NumericStart;
this.consumed += 1;
return this.stateNumericStart(input, offset + 1);
}
this.state = EntityDecoderState.NamedEntity;
return this.stateNamedEntity(input, offset);
}
case EntityDecoderState.NumericStart: {
return this.stateNumericStart(input, offset);
}
case EntityDecoderState.NumericDecimal: {
return this.stateNumericDecimal(input, offset);
}
case EntityDecoderState.NumericHex: {
return this.stateNumericHex(input, offset);
}
case EntityDecoderState.NamedEntity: {
return this.stateNamedEntity(input, offset);
}
}
}
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericStart(input, offset) {
if (offset >= input.length) {
return -1;
}
if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
this.state = EntityDecoderState.NumericHex;
this.consumed += 1;
return this.stateNumericHex(input, offset + 1);
}
this.state = EntityDecoderState.NumericDecimal;
return this.stateNumericDecimal(input, offset);
}
addToNumericResult(input, start, end, base) {
if (start !== end) {
const digitCount = end - start;
this.result =
this.result * Math.pow(base, digitCount) +
Number.parseInt(input.substr(start, digitCount), base);
this.consumed += digitCount;
}
}
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericHex(input, offset) {
const startIndex = offset;
while (offset < input.length) {
const char = input.charCodeAt(offset);
if (isNumber(char) || isHexadecimalCharacter(char)) {
offset += 1;
}
else {
this.addToNumericResult(input, startIndex, offset, 16);
return this.emitNumericEntity(char, 3);
}
}
this.addToNumericResult(input, startIndex, offset, 16);
return -1;
}
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNumericDecimal(input, offset) {
const startIndex = offset;
while (offset < input.length) {
const char = input.charCodeAt(offset);
if (isNumber(char)) {
offset += 1;
}
else {
this.addToNumericResult(input, startIndex, offset, 10);
return this.emitNumericEntity(char, 2);
}
}
this.addToNumericResult(input, startIndex, offset, 10);
return -1;
}
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/
emitNumericEntity(lastCp, expectedLength) {
var _a;
// Ensure we consumed at least one digit.
if (this.consumed <= expectedLength) {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
// Figure out if this is a legit end of the entity
if (lastCp === CharCodes.SEMI) {
this.consumed += 1;
}
else if (this.decodeMode === DecodingMode.Strict) {
return 0;
}
this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
if (this.errors) {
if (lastCp !== CharCodes.SEMI) {
this.errors.missingSemicolonAfterCharacterReference();
}
this.errors.validateNumericCharacterReference(this.result);
}
return this.consumed;
}
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param input The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
stateNamedEntity(input, offset) {
const { decodeTree } = this;
let current = decodeTree[this.treeIndex];
// The mask is the number of bytes of the value, including the current byte.
let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
for (; offset < input.length; offset++, this.excess++) {
const char = input.charCodeAt(offset);
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
if (this.treeIndex < 0) {
return this.result === 0 ||
// If we are parsing an attribute
(this.decodeMode === DecodingMode.Attribute &&
// We shouldn't have consumed any characters after the entity,
(valueLength === 0 ||
// And there should be no invalid characters.
isEntityInAttributeInvalidEnd(char)))
? 0
: this.emitNotTerminatedNamedEntity();
}
current = decodeTree[this.treeIndex];
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
// If the branch is a value, store it and continue
if (valueLength !== 0) {
// If the entity is terminated by a semicolon, we are done.
if (char === CharCodes.SEMI) {
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
}
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
if (this.decodeMode !== DecodingMode.Strict) {
this.result = this.treeIndex;
this.consumed += this.excess;
this.excess = 0;
}
}
}
return -1;
}
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/
emitNotTerminatedNamedEntity() {
var _a;
const { result, decodeTree } = this;
const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
this.emitNamedEntityData(result, valueLength, this.consumed);
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
return this.consumed;
}
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/
emitNamedEntityData(result, valueLength, consumed) {
const { decodeTree } = this;
this.emitCodePoint(valueLength === 1
? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH
: decodeTree[result + 1], consumed);
if (valueLength === 3) {
// For multi-byte values, we need to emit the second byte.
this.emitCodePoint(decodeTree[result + 2], consumed);
}
return consumed;
}
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/
end() {
var _a;
switch (this.state) {
case EntityDecoderState.NamedEntity: {
// Emit a named entity if we have one.
return this.result !== 0 &&
(this.decodeMode !== DecodingMode.Attribute ||
this.result === this.treeIndex)
? this.emitNotTerminatedNamedEntity()
: 0;
}
// Otherwise, emit a numeric entity if we have one.
case EntityDecoderState.NumericDecimal: {
return this.emitNumericEntity(0, 2);
}
case EntityDecoderState.NumericHex: {
return this.emitNumericEntity(0, 3);
}
case EntityDecoderState.NumericStart: {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
case EntityDecoderState.EntityStart: {
// Return 0 if we have no entity.
return 0;
}
}
}
}
exports.EntityDecoder = EntityDecoder;
/**
* Creates a function that decodes entities in a string.
*
* @param decodeTree The decode tree.
* @returns A function that decodes entities in a string.
*/
function getDecoder(decodeTree) {
let returnValue = "";
const decoder = new EntityDecoder(decodeTree, (data) => (returnValue += (0, decode_codepoint_js_1.fromCodePoint)(data)));
return function decodeWithTrie(input, decodeMode) {
let lastIndex = 0;
let offset = 0;
while ((offset = input.indexOf("&", offset)) >= 0) {
returnValue += input.slice(lastIndex, offset);
decoder.startEntity(decodeMode);
const length = decoder.write(input,
// Skip the "&"
offset + 1);
if (length < 0) {
lastIndex = offset + decoder.end();
break;
}
lastIndex = offset + length;
// If `length` is 0, skip the current `&` and continue.
offset = length === 0 ? lastIndex + 1 : lastIndex;
}
const result = returnValue + input.slice(lastIndex);
// Make sure we don't keep a reference to the final string.
returnValue = "";
return result;
};
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/
function determineBranch(decodeTree, current, nodeIndex, char) {
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
// Case 1: Single branch encoded in jump offset
if (branchCount === 0) {
return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
}
// Case 2: Multiple branches encoded in jump table
if (jumpOffset) {
const value = char - jumpOffset;
return value < 0 || value >= branchCount
? -1
: decodeTree[nodeIndex + value] - 1;
}
// Case 3: Multiple branches encoded in dictionary
// Binary search for the character.
let lo = nodeIndex;
let hi = lo + branchCount - 1;
while (lo <= hi) {
const mid = (lo + hi) >>> 1;
const midValue = decodeTree[mid];
if (midValue < char) {
lo = mid + 1;
}
else if (midValue > char) {
hi = mid - 1;
}
else {
return decodeTree[mid + branchCount];
}
}
return -1;
}
const htmlDecoder = /* #__PURE__ */ getDecoder(decode_data_html_js_1.htmlDecodeTree);
const xmlDecoder = /* #__PURE__ */ getDecoder(decode_data_xml_js_1.xmlDecodeTree);
/**
* Decodes an HTML string.
*
* @param htmlString The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/
function decodeHTML(htmlString, mode = DecodingMode.Legacy) {
return htmlDecoder(htmlString, mode);
}
/**
* Decodes an HTML string in an attribute.
*
* @param htmlAttribute The string to decode.
* @returns The decoded string.
*/
function decodeHTMLAttribute(htmlAttribute) {
return htmlDecoder(htmlAttribute, DecodingMode.Attribute);
}
/**
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
*
* @param htmlString The string to decode.
* @returns The decoded string.
*/
function decodeHTMLStrict(htmlString) {
return htmlDecoder(htmlString, DecodingMode.Strict);
}
/**
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
*
* @param xmlString The string to decode.
* @returns The decoded string.
*/
function decodeXML(xmlString) {
return xmlDecoder(xmlString, DecodingMode.Strict);
}
// Re-export for use by eg. htmlparser2
var decode_data_html_js_2 = require("./generated/decode-data-html.js");
Object.defineProperty(exports, "htmlDecodeTree", { enumerable: true, get: function () { return decode_data_html_js_2.htmlDecodeTree; } });
var decode_data_xml_js_2 = require("./generated/decode-data-xml.js");
Object.defineProperty(exports, "xmlDecodeTree", { enumerable: true, get: function () { return decode_data_xml_js_2.xmlDecodeTree; } });
var decode_codepoint_js_2 = require("./decode-codepoint.js");
Object.defineProperty(exports, "decodeCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.decodeCodePoint; } });
Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } });
Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } });
//# sourceMappingURL=decode.js.map
@@ -0,0 +1,6 @@
import {
SelectorIcon
} from "./chunk-N63WUTHU.mjs";
export {
SelectorIcon
};
@@ -0,0 +1 @@
{"name":"json5","version":"1.0.2","requiresBuild":false,"files":{"lib/cli.js":{"checkedAt":1794532098142,"integrity":"sha512-w+tTwEKmAkSR2BCRlaEyk92qWktqDAcQH2/hbAH6E0x8LOnj6nJ+Ta3BX32yJNVrvA0oRYsVFk4lKKsVUhig8g==","mode":420,"size":2220},"dist/index.js":{"checkedAt":1794532098143,"integrity":"sha512-ySIh/hVB9VccA0vtUmPzuxLDcPYds4fl+xngljnPWerSnOAtlJ1ovT+6zPhRnzJdGEE/m0ZAxZ2CNpGhdsu5BA==","mode":420,"size":27997},"lib/index.js":{"checkedAt":1794532098143,"integrity":"sha512-fyf64QTExZ3d+L0zJSDFJMPNClj9LZpk+DaGMKOY98MAnCR3/bqxVgjMESHfnkKRYBNI5ZBrr8k389OZ0coIvA==","mode":420,"size":418},"lib/parse.js":{"checkedAt":1794532098143,"integrity":"sha512-tQq+UlJyHRS5B0PX4TpWSz/dXhO6B8ra7BfalrQ5VhB804Rb7wtfXxJxyAgtTS0xEMSPUCyMcUoD6XeYQb5Jbw==","mode":420,"size":13463},"lib/register.js":{"checkedAt":1794532098143,"integrity":"sha512-6rc9SooR4Jfl76Kk/sMNTXVRQLquz/ZeKj8PfaKL16bKFmInR3ZS4WwEOZosDY/kXKO6wCiLEetsfqyTP1q3NQ==","mode":420,"size":423},"lib/require.js":{"checkedAt":1794532098143,"integrity":"sha512-uDrEHclzzSW+cToW+IjeGUWlEixzWcgAOZcO3ujibYFDaRqgHlN+tpggHFUVAgYSVanlfBU7WyGhUCwy9tzf+Q==","mode":420,"size":119},"lib/stringify.js":{"checkedAt":1794532098143,"integrity":"sha512-NcoypEE8KlM0dVCXvfaUPJPGHaJNRqvgCE3Y3CNXAySF6APVUhZiKC7IBMftW6Hq3d4AHceEnx9fZfpz4/Vs6g==","mode":420,"size":6146},"lib/unicode.js":{"checkedAt":1794532098144,"integrity":"sha512-8BCUBvB+b902bcCUPD9dEHIPAK+H/VJpoSl/aldQL2vvq3+QLXAXxiJCl/7zkFmzbe76jkDWSiccPgzLAWUOQg==","mode":420,"size":15481},"lib/util.js":{"checkedAt":1794532098144,"integrity":"sha512-FNUihfVrNegAAETjEChmxRh0TNork4onjtFOWHfgz4Cbpiks7XKBJB5WGwsT9frY6lEPWY7VU1M+23idiUr0AQ==","mode":420,"size":989},"package.json":{"checkedAt":1794532098144,"integrity":"sha512-eqfViKXc4kNREyAeDUHLUpDcZUmse9uLIRzFJYr2G7tqCKww+J7avGrvFpX2YS4sLuIvsmlTDwAtDpBZ1SR32A==","mode":420,"size":2207},"LICENSE.md":{"checkedAt":1794532098144,"integrity":"sha512-cgIiWWCUPqaXA1Ap9AtwuzP6cHUJotXt3eHA0kCWBxwDdOK3QZsCS4k/N+kvibcnGXy5RC9gewYshGeMNcFrgw==","mode":420,"size":1145},"README.md":{"checkedAt":1794532098144,"integrity":"sha512-kK7oFuVWo2g7Jd871auzpct9uT6/x/92frnsZc8s45LjgkiVWeP9wjiKoPQyOHywOd3YQIsbFMGfYLPq9w3CZA==","mode":420,"size":7680}}}
@@ -0,0 +1,4 @@
import { DebugAppender } from "./DebugAppender.mjs";
export {
DebugAppender
};
@@ -0,0 +1,65 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var hasBigInts = require('has-bigints')();
var hasToStringTag = require('has-tostringtag/shams')();
var forEach = require('for-each');
var v = require('es-value-fixtures');
var isBigInt = require('../');
test('non-BigInt values', function (t) {
/** @type {(typeof v.primitives[number] | object)[]} */
var nonBigInts = v.nonBigInts.concat(
Object(true),
Object(false),
// @ts-expect-error TS sucks with concat
{},
[],
/a/g,
new Date(),
function () {},
NaN,
v.symbols
);
t.plan(nonBigInts.length);
forEach(nonBigInts, function (nonBigInt) {
t.equal(false, isBigInt(nonBigInt), inspect(nonBigInt) + ' is not a BigInt');
});
t.end();
});
test('faked BigInt values', function (t) {
t.test('real BigInt valueOf', { skip: !hasBigInts }, function (st) {
var fakeBigInt = { valueOf: function () { return BigInt(42); } };
st.equal(false, isBigInt(fakeBigInt), 'object with valueOf returning a BigInt is not a BigInt');
st.end();
});
t.test('faked @@toStringTag', { skip: !hasBigInts || !hasToStringTag }, function (st) {
/** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */
var fakeBigInt = { valueOf: function () { return BigInt(42); } };
fakeBigInt[Symbol.toStringTag] = 'BigInt';
st.equal(false, isBigInt(fakeBigInt), 'object with fake BigInt @@toStringTag and valueOf returning a BigInt is not a BigInt');
/** @type {{ valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */
var notSoFakeBigInt = { valueOf: function () { return 42; } };
notSoFakeBigInt[Symbol.toStringTag] = 'BigInt';
st.equal(false, isBigInt(notSoFakeBigInt), 'object with fake BigInt @@toStringTag and valueOf not returning a BigInt is not a BigInt');
st.end();
});
var fakeBigIntString = { toString: function () { return '42n'; } };
t.equal(false, isBigInt(fakeBigIntString), 'object with toString returning 42n is not a BigInt');
t.end();
});
test('BigInt support', { skip: !hasBigInts }, function (t) {
forEach(v.bigints.concat(Object(BigInt(42))), function (bigInt) {
t.equal(true, isBigInt(bigInt), inspect(bigInt) + ' is a BigInt');
});
t.end();
});
@@ -0,0 +1,24 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class AttestationPackageInfo {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.OctetString })
], AttestationPackageInfo.prototype, "packageName", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], AttestationPackageInfo.prototype, "version", void 0);
export class AttestationApplicationId {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AttestationPackageInfo, repeated: "set" })
], AttestationApplicationId.prototype, "packageInfos", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.OctetString, repeated: "set" })
], AttestationApplicationId.prototype, "signatureDigests", void 0);
@@ -0,0 +1 @@
{"version":3,"file":"build-source-map-tree.d.ts","sourceRoot":"","sources":["../src/build-source-map-tree.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,SAAS,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAO9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,EACxC,MAAM,EAAE,eAAe,GACtB,aAAa,CAkBf"}
@@ -0,0 +1,11 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
};
@@ -0,0 +1,262 @@
'use strict';
// http://www.w3.org/TR/CSS21/grammar.html
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
var NEWLINE_REGEX = /\n/g;
var WHITESPACE_REGEX = /^\s*/;
// declaration
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
var COLON_REGEX = /^:\s*/;
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
var SEMICOLON_REGEX = /^[;\s]*/;
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
var TRIM_REGEX = /^\s+|\s+$/g;
// strings
var NEWLINE = '\n';
var FORWARD_SLASH = '/';
var ASTERISK = '*';
var EMPTY_STRING = '';
// types
var TYPE_COMMENT = 'comment';
var TYPE_DECLARATION = 'declaration';
/**
* @param {String} style
* @param {Object} [options]
* @return {Object[]}
* @throws {TypeError}
* @throws {Error}
*/
function index (style, options) {
if (typeof style !== 'string') {
throw new TypeError('First argument must be a string');
}
if (!style) return [];
options = options || {};
/**
* Positional.
*/
var lineno = 1;
var column = 1;
/**
* Update lineno and column based on `str`.
*
* @param {String} str
*/
function updatePosition(str) {
var lines = str.match(NEWLINE_REGEX);
if (lines) lineno += lines.length;
var i = str.lastIndexOf(NEWLINE);
column = ~i ? str.length - i : column + str.length;
}
/**
* Mark position and patch `node.position`.
*
* @return {Function}
*/
function position() {
var start = { line: lineno, column: column };
return function (node) {
node.position = new Position(start);
whitespace();
return node;
};
}
/**
* Store position information for a node.
*
* @constructor
* @property {Object} start
* @property {Object} end
* @property {undefined|String} source
*/
function Position(start) {
this.start = start;
this.end = { line: lineno, column: column };
this.source = options.source;
}
/**
* Non-enumerable source string.
*/
Position.prototype.content = style;
/**
* Error `msg`.
*
* @param {String} msg
* @throws {Error}
*/
function error(msg) {
var err = new Error(
options.source + ':' + lineno + ':' + column + ': ' + msg
);
err.reason = msg;
err.filename = options.source;
err.line = lineno;
err.column = column;
err.source = style;
if (options.silent) ; else {
throw err;
}
}
/**
* Match `re` and return captures.
*
* @param {RegExp} re
* @return {undefined|Array}
*/
function match(re) {
var m = re.exec(style);
if (!m) return;
var str = m[0];
updatePosition(str);
style = style.slice(str.length);
return m;
}
/**
* Parse whitespace.
*/
function whitespace() {
match(WHITESPACE_REGEX);
}
/**
* Parse comments.
*
* @param {Object[]} [rules]
* @return {Object[]}
*/
function comments(rules) {
var c;
rules = rules || [];
while ((c = comment())) {
if (c !== false) {
rules.push(c);
}
}
return rules;
}
/**
* Parse comment.
*
* @return {Object}
* @throws {Error}
*/
function comment() {
var pos = position();
if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
var i = 2;
while (
EMPTY_STRING != style.charAt(i) &&
(ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
) {
++i;
}
i += 2;
if (EMPTY_STRING === style.charAt(i - 1)) {
return error('End of comment missing');
}
var str = style.slice(2, i - 2);
column += 2;
updatePosition(str);
style = style.slice(i);
column += 2;
return pos({
type: TYPE_COMMENT,
comment: str
});
}
/**
* Parse declaration.
*
* @return {Object}
* @throws {Error}
*/
function declaration() {
var pos = position();
// prop
var prop = match(PROPERTY_REGEX);
if (!prop) return;
comment();
// :
if (!match(COLON_REGEX)) return error("property missing ':'");
// val
var val = match(VALUE_REGEX);
var ret = pos({
type: TYPE_DECLARATION,
property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
value: val
? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
: EMPTY_STRING
});
// ;
match(SEMICOLON_REGEX);
return ret;
}
/**
* Parse declarations.
*
* @return {Object[]}
*/
function declarations() {
var decls = [];
comments(decls);
// declarations
var decl;
while ((decl = declaration())) {
if (decl !== false) {
decls.push(decl);
comments(decls);
}
}
return decls;
}
whitespace();
return declarations();
}
/**
* Trim `str`.
*
* @param {String} str
* @return {String}
*/
function trim(str) {
return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
}
module.exports = index;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const _=new Array(60);e(_);const f=new Array(512);e(f);const c=new Array(256);e(c);const u=new Array(29);e(u);const w=new Array(n);function m(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let b,g,p;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(w);const v=t=>t<256?f[t]:f[256+(t>>>7)],y=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=(t,e,a)=>{x(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const i=new Array(16);let n,r,o=0;for(n=1;n<=s;n++)o=o+a[n-1]<<1,i[n]=o;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=A(i[e]++,e))}},R=t=>{let e;for(e=0;e<i;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=t=>{t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},S=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&U(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!U(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},D=(t,e,i)=>{let n,s,l,h,d=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+d++],n+=(255&t.pending_buf[t.sym_buf+d++])<<8,s=t.pending_buf[t.sym_buf+d++],0===n?z(t,s,e):(l=c[s],z(t,l+a+1,e),h=r[l],0!==h&&(s-=u[l],x(t,s,h)),n--,l=v(n),z(t,l,i),h=o[l],0!==h&&(n-=w[l],x(t,n,h)))}while(d<t.sym_next);z(t,256,e)},T=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,r=e.stat_desc.elems;let o,l,h,d=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<r;o++)0!==a[2*o]?(t.heap[++t.heap_len]=d=o,t.depth[o]=0):a[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=d<2?++d:0,a[2*h]=1,t.depth[h]=0,t.opt_len--,n&&(t.static_len-=i[2*h+1]);for(e.max_code=d,o=t.heap_len>>1;o>=1;o--)S(t,a,o);h=r;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),l=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=l,a[2*h]=a[2*o]+a[2*l],t.depth[h]=(t.depth[o]>=t.depth[l]?t.depth[o]:t.depth[l])+1,a[2*o+1]=a[2*l+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;let d,_,f,c,u,w,m=0;for(c=0;c<=s;c++)t.bl_count[c]=0;for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++)_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,m++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=l&&(u=o[_-l]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));if(0!==m){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,m-=2}while(m>0);for(c=h;0!==c;c--)for(_=t.bl_count[c];0!==_;)f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--)}})(t,e),E(a,d,t.bl_count)},O=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},I=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{z(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(z(t,n,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let F=!1;const L=(t,e,a,i)=>{x(t,0+(i?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var N=(t,e,i,n)=>{let s,r,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),T(t,t.l_desc),T(t,t.d_desc),o=(t=>{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.blLine truncated
@@ -0,0 +1,18 @@
'use strict'
const SemVer = require('../classes/semver')
const parse = (version, options, throwErrors = false) => {
if (version instanceof SemVer) {
return version
}
try {
return new SemVer(version, options)
} catch (er) {
if (!throwErrors) {
return null
}
throw er
}
}
module.exports = parse
@@ -0,0 +1,69 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _tokenizer = require('../parser/tokenizer');
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
class ReactHotLoaderTransformer extends _Transformer2.default {
__init() {this.extractedDefaultExportName = null}
constructor( tokens, filePath) {
super();this.tokens = tokens;this.filePath = filePath;ReactHotLoaderTransformer.prototype.__init.call(this);;
}
setExtractedDefaultExportName(extractedDefaultExportName) {
this.extractedDefaultExportName = extractedDefaultExportName;
}
getPrefixCode() {
return `
(function () {
var enterModule = require('react-hot-loader').enterModule;
enterModule && enterModule(module);
})();`
.replace(/\s+/g, " ")
.trim();
}
getSuffixCode() {
const topLevelNames = new Set();
for (const token of this.tokens.tokens) {
if (
!token.isType &&
_tokenizer.isTopLevelDeclaration.call(void 0, token) &&
token.identifierRole !== _tokenizer.IdentifierRole.ImportDeclaration
) {
topLevelNames.add(this.tokens.identifierNameForToken(token));
}
}
const namesToRegister = Array.from(topLevelNames).map((name) => ({
variableName: name,
uniqueLocalName: name,
}));
if (this.extractedDefaultExportName) {
namesToRegister.push({
variableName: this.extractedDefaultExportName,
uniqueLocalName: "default",
});
}
return `
;(function () {
var reactHotLoader = require('react-hot-loader').default;
var leaveModule = require('react-hot-loader').leaveModule;
if (!reactHotLoader) {
return;
}
${namesToRegister
.map(
({variableName, uniqueLocalName}) =>
` reactHotLoader.register(${variableName}, "${uniqueLocalName}", ${JSON.stringify(
this.filePath || "",
)});`,
)
.join("\n")}
leaveModule(module);
})();`;
}
process() {
return false;
}
} exports.default = ReactHotLoaderTransformer;
@@ -0,0 +1,19 @@
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var boundFlatMap = callBind(polyfill);
define(boundFlatMap, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundFlatMap;
@@ -0,0 +1 @@
{"name":"@react-aria/toggle","version":"3.12.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532107702,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532107702,"integrity":"sha512-p+cbRRhXfSvvquvckhh1Idy4NH9vYncCb2cWk0n9lWqBA8C2IMLyx+dhizrEydcWSqheK9RyAW++1kra1TxqPQ==","mode":420,"size":938},"dist/module.js":{"checkedAt":1794532107702,"integrity":"sha512-7356x3dv19l0y5Fi3Pq4pzXUm2MUHq19lnhObScxdwHyT+srHuSzTlkRylKsUyWeE8s3zkQpTSQiw/OO3l3H5A==","mode":420,"size":818},"dist/useToggle.main.js":{"checkedAt":1794532107702,"integrity":"sha512-e0WsJb73d27y2p/1DAWz102qieTcTN6GxMvd4vnJsH8SUvrTpkpNnXC1KXHHDZuPngkdy/s+q0vuihLPwHFqvw==","mode":420,"size":4468},"dist/useToggle.module.js":{"checkedAt":1794532107702,"integrity":"sha512-Y4diX90z1hCs/ggjRe1CRIYYDvMSawcz6SOgZkqayHhBXbRn122kELuS/Cm3p6Ww12tzqpPyrexogUcUDTX3wA==","mode":420,"size":4293},"package.json":{"checkedAt":1794532107702,"integrity":"sha512-Em8QKmLz2KKleDO0Caoi+kRVeUwQXcEfMsu8/y6IQB3vQyLlk9x1eOqM9VF8jrfBKqLXJ2OrPXCic8Oh4Aratw==","mode":420,"size":1123},"dist/main.js.map":{"checkedAt":1794532107703,"integrity":"sha512-H24bqRHOYVAfUDJyMAWLKyK39kef8MDpj1lq69w3HOS5ZCFRzwogvBn421vb62W2nZ4N/iLg1IyyiEYirqNSiA==","mode":420,"size":946},"dist/module.js.map":{"checkedAt":1794532107703,"integrity":"sha512-wSBcOylkobvXby8ENfK78KrXQRqFb8Y/PQSv2/EKxEPMrVroGkoub8OsDWPkhRfiBQuvmEkDkzqvsu8e6fsPsA==","mode":420,"size":942},"dist/types.d.ts.map":{"checkedAt":1794532107703,"integrity":"sha512-07W2yZgtDidr9jl9iicpMqkdtT/R2Esbzb+7w81OagKwiQq0mScDhEUDjl03D//1x3cBFddpDhE9Ko821GXPJw==","mode":420,"size":1562},"dist/useToggle.main.js.map":{"checkedAt":1794532107703,"integrity":"sha512-Eoiboem2mgY8tzIOu4KpefOHzLwXvVpiX63rCXEWacM4+P4TjjqGJgh+05sQwASS0B+XN+KX8xlO25F8XrWfcw==","mode":420,"size":5926},"dist/useToggle.module.js.map":{"checkedAt":1794532107703,"integrity":"sha512-oefsiwFsLDiF8MOeAUNDnco1ZMDm863InH8Kx1uOn6Ms0Ev1NpzV1Yff/+vA7DQBI8g8Id4dJxtSfFme97qjcQ==","mode":420,"size":5920},"README.md":{"checkedAt":1794532107703,"integrity":"sha512-sKIHtmP3QuBfW3DTjNObTrL2V5K8ZXwbS4q8I7ARslzDEgAm+S/EcD4xtAUX/BoVI6W/41oR6pIr1/OLiVnuqQ==","mode":420,"size":136},"dist/import.mjs":{"checkedAt":1794532107703,"integrity":"sha512-21ntYboOT/39vYwGrXwApOsFUQCx6/OJuWNWTipio149+N/ooA05pT7EC0bhrq6nA50TVXhpF/j+IOSXDBhS3w==","mode":420,"size":812},"dist/useToggle.mjs":{"checkedAt":1794532107702,"integrity":"sha512-Y4diX90z1hCs/ggjRe1CRIYYDvMSawcz6SOgZkqayHhBXbRn122kELuS/Cm3p6Ww12tzqpPyrexogUcUDTX3wA==","mode":420,"size":4293},"src/index.ts":{"checkedAt":1794532107704,"integrity":"sha512-pXsheIZuMoPoBlKjMAOvv0/GnHgDB1Bu43ZLF3zhvsUXAUB28L++A+0xLc3icaACGGpB629Bd/ajurXSgbakMQ==","mode":420,"size":765},"dist/types.d.ts":{"checkedAt":1794532107704,"integrity":"sha512-Qo0Uwpzu+uBQGtPczsbqadLszgbNcTu7c64PdD80lLm/jOCHLfWqa51GaiM0EHkt3M1tnEU4WOweyIkqvqBNjg==","mode":420,"size":1125},"src/useToggle.ts":{"checkedAt":1794532107704,"integrity":"sha512-0VSGWvwwiqG4jiyikKWzWQ/VejhijYtDK29S/DddzFMwaJsX6x8pT+MxMEnLX49cnRKz3VnVPq+iU4L8hYCiuQ==","mode":420,"size":4138}}}
@@ -0,0 +1,39 @@
// Kirundi [rn]
import dayjs from '../index';
var locale = {
name: 'rn',
weekdays: 'Ku wa Mungu_Ku wa Mbere_Ku wa Kabiri_Ku wa Gatatu_Ku wa Kane_Ku wa Gatanu_Ku wa Gatandatu'.split('_'),
weekdaysShort: 'Kngu_Kmbr_Kbri_Ktat_Kkan_Ktan_Kdat'.split('_'),
weekdaysMin: 'K7_K1_K2_K3_K4_K5_K6'.split('_'),
months: 'Nzero_Ruhuhuma_Ntwarante_Ndamukiza_Rusama_Ruhenshi_Mukakaro_Myandagaro_Nyakanga_Gitugutu_Munyonyo_Kigarama'.split('_'),
monthsShort: 'Nzer_Ruhuh_Ntwar_Ndam_Rus_Ruhen_Muk_Myand_Nyak_Git_Muny_Kig'.split('_'),
weekStart: 1,
ordinal: function ordinal(n) {
return n;
},
relativeTime: {
future: 'mu %s',
past: '%s',
s: 'amasegonda',
m: 'Umunota',
mm: '%d iminota',
h: 'isaha',
hh: '%d amasaha',
d: 'Umunsi',
dd: '%d iminsi',
M: 'ukwezi',
MM: '%d amezi',
y: 'umwaka',
yy: '%d imyaka'
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,17 @@
/*
didYouMean.js copyright (c) 2013-2014 Dave Porter.
[Available on GitHub](https://github.com/dcporter/didyoumean.js).
Licensed 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
[here](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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
(function(){"use strict";function e(t,r,i){if(!t)return null;if(!e.caseSensitive){t=t.toLowerCase()}var s=e.threshold===null?null:e.threshold*t.length,o=e.thresholdAbsolute,u;if(s!==null&&o!==null)u=Math.min(s,o);else if(s!==null)u=s;else if(o!==null)u=o;else u=null;var a,f,l,c,h,p=r.length;for(h=0;h<p;h++){f=r[h];if(i){f=f[i]}if(!f){continue}if(!e.caseSensitive){l=f.toLowerCase()}else{l=f}c=n(t,l,u);if(u===null||c<u){u=c;if(i&&e.returnWinningObject)a=r[h];else a=f;if(e.returnFirstMatch)return a}}return a||e.nullResultValue}function n(e,n,r){r=r||r===0?r:t;var i=e.length;var s=n.length;if(i===0)return Math.min(r+1,s);if(s===0)return Math.min(r+1,i);if(Math.abs(i-s)>r)return r+1;var o=[],u,a,f,l,c;for(u=0;u<=s;u++){o[u]=[u]}for(a=0;a<=i;a++){o[0][a]=a}for(u=1;u<=s;u++){f=t;l=1;if(u>r)l=u-r;c=s+1;if(c>r+u)c=r+u;for(a=1;a<=i;a++){if(a<l||a>c){o[u][a]=r+1}else{if(n.charAt(u-1)===e.charAt(a-1)){o[u][a]=o[u-1][a-1]}else{o[u][a]=Math.min(o[u-1][a-1]+1,Math.min(o[u][a-1]+1,o[u-1][a]+1))}}if(o[u][a]<f)f=o[u][a]}if(f>r)return r+1}return o[s][i]}e.threshold=.4;e.thresholdAbsolute=20;e.caseSensitive=false;e.nullResultValue=null;e.returnWinningObject=null;e.returnFirstMatch=false;if(typeof module!=="undefined"&&module.exports){module.exports=e}else{window.didYouMean=e}var t=Math.pow(2,32)-1})();
@@ -0,0 +1,124 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombre";
}
case "object": {
if (Array.isArray(data)) {
return "tableau";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "entrée",
email: "adresse e-mail",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date et heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
jwt: "JWT",
template_literal: "entrée",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrée invalide : ${issue.expected} attendu, ${parsedType(issue.input)} reçu`;
case "invalid_value":
if (issue.values.length === 1) return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;
return `Option invalide : une valeur parmi ${util.joinValues(issue.values, "|")} attendue`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : ${issue.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
return `Trop grand : ${issue.origin ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes") return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex") return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,469 @@
import { TypeSystemPolicy } from '../../system/index.mjs';
import { Deref, Pushref } from '../deref/index.mjs';
import { Hash } from '../hash/index.mjs';
import { Kind } from '../../type/symbols/index.mjs';
import { KeyOfPattern } from '../../type/keyof/index.mjs';
import { ExtendsUndefinedCheck } from '../../type/extends/index.mjs';
import { TypeRegistry, FormatRegistry } from '../../type/registry/index.mjs';
import { TypeBoxError } from '../../type/error/index.mjs';
import { Never } from '../../type/never/index.mjs';
// ------------------------------------------------------------------
// ValueGuard
// ------------------------------------------------------------------
import { IsArray, IsUint8Array, IsDate, IsPromise, IsFunction, IsAsyncIterator, IsIterator, IsBoolean, IsNumber, IsBigInt, IsString, IsSymbol, IsInteger, IsNull, IsUndefined } from '../guard/index.mjs';
// ------------------------------------------------------------------
// KindGuard
// ------------------------------------------------------------------
import { IsSchema } from '../../type/guard/kind.mjs';
// ------------------------------------------------------------------
// Errors
// ------------------------------------------------------------------
export class ValueCheckUnknownTypeError extends TypeBoxError {
constructor(schema) {
super(`Unknown type`);
this.schema = schema;
}
}
// ------------------------------------------------------------------
// TypeGuards
// ------------------------------------------------------------------
function IsAnyOrUnknown(schema) {
return schema[Kind] === 'Any' || schema[Kind] === 'Unknown';
}
// ------------------------------------------------------------------
// Guards
// ------------------------------------------------------------------
function IsDefined(value) {
return value !== undefined;
}
// ------------------------------------------------------------------
// Types
// ------------------------------------------------------------------
function FromAny(schema, references, value) {
return true;
}
function FromArgument(schema, references, value) {
return true;
}
function FromArray(schema, references, value) {
if (!IsArray(value))
return false;
if (IsDefined(schema.minItems) && !(value.length >= schema.minItems)) {
return false;
}
if (IsDefined(schema.maxItems) && !(value.length <= schema.maxItems)) {
return false;
}
if (!value.every((value) => Visit(schema.items, references, value))) {
return false;
}
// prettier-ignore
if (schema.uniqueItems === true && !((function () { const set = new Set(); for (const element of value) {
const hashed = Hash(element);
if (set.has(hashed)) {
return false;
}
else {
set.add(hashed);
}
} return true; })())) {
return false;
}
// contains
if (!(IsDefined(schema.contains) || IsNumber(schema.minContains) || IsNumber(schema.maxContains))) {
return true; // exit
}
const containsSchema = IsDefined(schema.contains) ? schema.contains : Never();
const containsCount = value.reduce((acc, value) => (Visit(containsSchema, references, value) ? acc + 1 : acc), 0);
if (containsCount === 0) {
return false;
}
if (IsNumber(schema.minContains) && containsCount < schema.minContains) {
return false;
}
if (IsNumber(schema.maxContains) && containsCount > schema.maxContains) {
return false;
}
return true;
}
function FromAsyncIterator(schema, references, value) {
return IsAsyncIterator(value);
}
function FromBigInt(schema, references, value) {
if (!IsBigInt(value))
return false;
if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
return false;
}
if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
return false;
}
if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
return false;
}
if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
return false;
}
if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === BigInt(0))) {
return false;
}
return true;
}
function FromBoolean(schema, references, value) {
return IsBoolean(value);
}
function FromConstructor(schema, references, value) {
return Visit(schema.returns, references, value.prototype);
}
function FromDate(schema, references, value) {
if (!IsDate(value))
return false;
if (IsDefined(schema.exclusiveMaximumTimestamp) && !(value.getTime() < schema.exclusiveMaximumTimestamp)) {
return false;
}
if (IsDefined(schema.exclusiveMinimumTimestamp) && !(value.getTime() > schema.exclusiveMinimumTimestamp)) {
return false;
}
if (IsDefined(schema.maximumTimestamp) && !(value.getTime() <= schema.maximumTimestamp)) {
return false;
}
if (IsDefined(schema.minimumTimestamp) && !(value.getTime() >= schema.minimumTimestamp)) {
return false;
}
if (IsDefined(schema.multipleOfTimestamp) && !(value.getTime() % schema.multipleOfTimestamp === 0)) {
return false;
}
return true;
}
function FromFunction(schema, references, value) {
return IsFunction(value);
}
function FromImport(schema, references, value) {
const definitions = globalThis.Object.values(schema.$defs);
const target = schema.$defs[schema.$ref];
return Visit(target, [...references, ...definitions], value);
}
function FromInteger(schema, references, value) {
if (!IsInteger(value)) {
return false;
}
if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
return false;
}
if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
return false;
}
if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
return false;
}
if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
return false;
}
if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
return false;
}
return true;
}
function FromIntersect(schema, references, value) {
const check1 = schema.allOf.every((schema) => Visit(schema, references, value));
if (schema.unevaluatedProperties === false) {
const keyPattern = new RegExp(KeyOfPattern(schema));
const check2 = Object.getOwnPropertyNames(value).every((key) => keyPattern.test(key));
return check1 && check2;
}
else if (IsSchema(schema.unevaluatedProperties)) {
const keyCheck = new RegExp(KeyOfPattern(schema));
const check2 = Object.getOwnPropertyNames(value).every((key) => keyCheck.test(key) || Visit(schema.unevaluatedProperties, references, value[key]));
return check1 && check2;
}
else {
return check1;
}
}
function FromIterator(schema, references, value) {
return IsIterator(value);
}
function FromLiteral(schema, references, value) {
return value === schema.const;
}
function FromNever(schema, references, value) {
return false;
}
function FromNot(schema, references, value) {
return !Visit(schema.not, references, value);
}
function FromNull(schema, references, value) {
return IsNull(value);
}
function FromNumber(schema, references, value) {
if (!TypeSystemPolicy.IsNumberLike(value))
return false;
if (IsDefined(schema.exclusiveMaximum) && !(value < schema.exclusiveMaximum)) {
return false;
}
if (IsDefined(schema.exclusiveMinimum) && !(value > schema.exclusiveMinimum)) {
return false;
}
if (IsDefined(schema.minimum) && !(value >= schema.minimum)) {
return false;
}
if (IsDefined(schema.maximum) && !(value <= schema.maximum)) {
return false;
}
if (IsDefined(schema.multipleOf) && !(value % schema.multipleOf === 0)) {
return false;
}
return true;
}
function FromObject(schema, references, value) {
if (!TypeSystemPolicy.IsObjectLike(value))
return false;
if (IsDefined(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
return false;
}
if (IsDefined(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
return false;
}
const knownKeys = Object.getOwnPropertyNames(schema.properties);
for (const knownKey of knownKeys) {
const property = schema.properties[knownKey];
if (schema.required && schema.required.includes(knownKey)) {
if (!Visit(property, references, value[knownKey])) {
return false;
}
if ((ExtendsUndefinedCheck(property) || IsAnyOrUnknown(property)) && !(knownKey in value)) {
return false;
}
}
else {
if (TypeSystemPolicy.IsExactOptionalProperty(value, knownKey) && !Visit(property, references, value[knownKey])) {
return false;
}
}
}
if (schema.additionalProperties === false) {
const valueKeys = Object.getOwnPropertyNames(value);
// optimization: value is valid if schemaKey length matches the valueKey length
if (schema.required && schema.required.length === knownKeys.length && valueKeys.length === knownKeys.length) {
return true;
}
else {
return valueKeys.every((valueKey) => knownKeys.includes(valueKey));
}
}
else if (typeof schema.additionalProperties === 'object') {
const valueKeys = Object.getOwnPropertyNames(value);
return valueKeys.every((key) => knownKeys.includes(key) || Visit(schema.additionalProperties, references, value[key]));
}
else {
return true;
}
}
function FromPromise(schema, references, value) {
return IsPromise(value);
}
function FromRecord(schema, references, value) {
if (!TypeSystemPolicy.IsRecordLike(value)) {
return false;
}
if (IsDefined(schema.minProperties) && !(Object.getOwnPropertyNames(value).length >= schema.minProperties)) {
return false;
}
if (IsDefined(schema.maxProperties) && !(Object.getOwnPropertyNames(value).length <= schema.maxProperties)) {
return false;
}
const [patternKey, patternSchema] = Object.entries(schema.patternProperties)[0];
const regex = new RegExp(patternKey);
// prettier-ignore
const check1 = Object.entries(value).every(([key, value]) => {
return (regex.test(key)) ? Visit(patternSchema, references, value) : true;
});
// prettier-ignore
const check2 = typeof schema.additionalProperties === 'object' ? Object.entries(value).every(([key, value]) => {
return (!regex.test(key)) ? Visit(schema.additionalProperties, references, value) : true;
}) : true;
const check3 = schema.additionalProperties === false
? Object.getOwnPropertyNames(value).every((key) => {
return regex.test(key);
})
: true;
return check1 && check2 && check3;
}
function FromRef(schema, references, value) {
return Visit(Deref(schema, references), references, value);
}
function FromRegExp(schema, references, value) {
const regex = new RegExp(schema.source, schema.flags);
if (IsDefined(schema.minLength)) {
if (!(value.length >= schema.minLength))
return false;
}
if (IsDefined(schema.maxLength)) {
if (!(value.length <= schema.maxLength))
return false;
}
return regex.test(value);
}
function FromString(schema, references, value) {
if (!IsString(value)) {
return false;
}
if (IsDefined(schema.minLength)) {
if (!(value.length >= schema.minLength))
return false;
}
if (IsDefined(schema.maxLength)) {
if (!(value.length <= schema.maxLength))
return false;
}
if (IsDefined(schema.pattern)) {
const regex = new RegExp(schema.pattern);
if (!regex.test(value))
return false;
}
if (IsDefined(schema.format)) {
if (!FormatRegistry.Has(schema.format))
return false;
const func = FormatRegistry.Get(schema.format);
return func(value);
}
return true;
}
function FromSymbol(schema, references, value) {
return IsSymbol(value);
}
function FromTemplateLiteral(schema, references, value) {
return IsString(value) && new RegExp(schema.pattern).test(value);
}
function FromThis(schema, references, value) {
return Visit(Deref(schema, references), references, value);
}
function FromTuple(schema, references, value) {
if (!IsArray(value)) {
return false;
}
if (schema.items === undefined && !(value.length === 0)) {
return false;
}
if (!(value.length === schema.maxItems)) {
return false;
}
if (!schema.items) {
return true;
}
for (let i = 0; i < schema.items.length; i++) {
if (!Visit(schema.items[i], references, value[i]))
return false;
}
return true;
}
function FromUndefined(schema, references, value) {
return IsUndefined(value);
}
function FromUnion(schema, references, value) {
return schema.anyOf.some((inner) => Visit(inner, references, value));
}
function FromUint8Array(schema, references, value) {
if (!IsUint8Array(value)) {
return false;
}
if (IsDefined(schema.maxByteLength) && !(value.length <= schema.maxByteLength)) {
return false;
}
if (IsDefined(schema.minByteLength) && !(value.length >= schema.minByteLength)) {
return false;
}
return true;
}
function FromUnknown(schema, references, value) {
return true;
}
function FromVoid(schema, references, value) {
return TypeSystemPolicy.IsVoidLike(value);
}
function FromKind(schema, references, value) {
if (!TypeRegistry.Has(schema[Kind]))
return false;
const func = TypeRegistry.Get(schema[Kind]);
return func(schema, value);
}
function Visit(schema, references, value) {
const references_ = IsDefined(schema.$id) ? Pushref(schema, references) : references;
const schema_ = schema;
switch (schema_[Kind]) {
case 'Any':
return FromAny(schema_, references_, value);
case 'Argument':
return FromArgument(schema_, references_, value);
case 'Array':
return FromArray(schema_, references_, value);
case 'AsyncIterator':
return FromAsyncIterator(schema_, references_, value);
case 'BigInt':
return FromBigInt(schema_, references_, value);
case 'Boolean':
return FromBoolean(schema_, references_, value);
case 'Constructor':
return FromConstructor(schema_, references_, value);
case 'Date':
return FromDate(schema_, references_, value);
case 'Function':
return FromFunction(schema_, references_, value);
case 'Import':
return FromImport(schema_, references_, value);
case 'Integer':
return FromInteger(schema_, references_, value);
case 'Intersect':
return FromIntersect(schema_, references_, value);
case 'Iterator':
return FromIterator(schema_, references_, value);
case 'Literal':
return FromLiteral(schema_, references_, value);
case 'Never':
return FromNever(schema_, references_, value);
case 'Not':
return FromNot(schema_, references_, value);
case 'Null':
return FromNull(schema_, references_, value);
case 'Number':
return FromNumber(schema_, references_, value);
case 'Object':
return FromObject(schema_, references_, value);
case 'Promise':
return FromPromise(schema_, references_, value);
case 'Record':
return FromRecord(schema_, references_, value);
case 'Ref':
return FromRef(schema_, references_, value);
case 'RegExp':
return FromRegExp(schema_, references_, value);
case 'String':
return FromString(schema_, references_, value);
case 'Symbol':
return FromSymbol(schema_, references_, value);
case 'TemplateLiteral':
return FromTemplateLiteral(schema_, references_, value);
case 'This':
return FromThis(schema_, references_, value);
case 'Tuple':
return FromTuple(schema_, references_, value);
case 'Undefined':
return FromUndefined(schema_, references_, value);
case 'Union':
return FromUnion(schema_, references_, value);
case 'Uint8Array':
return FromUint8Array(schema_, references_, value);
case 'Unknown':
return FromUnknown(schema_, references_, value);
case 'Void':
return FromVoid(schema_, references_, value);
default:
if (!TypeRegistry.Has(schema_[Kind]))
throw new ValueCheckUnknownTypeError(schema_);
return FromKind(schema_, references_, value);
}
}
/** Returns true if the value matches the given type. */
export function Check(...args) {
return args.length === 3 ? Visit(args[0], args[1], args[2]) : Visit(args[0], [], args[1]);
}
@@ -0,0 +1 @@
{"version":3,"file":"PlanServiceNodeBindingRemovedResult.js","sourceRoot":"","sources":["../../../../src/metadata/models/PlanServiceNodeBindingRemovedResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,61 @@
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef {{
skip: () => void;
remove: () => void;
replace: (node: BaseNode) => void;
}} WalkerContext */
export class WalkerBase {
constructor() {
/** @type {boolean} */
this.should_skip = false;
/** @type {boolean} */
this.should_remove = false;
/** @type {BaseNode | null} */
this.replacement = null;
/** @type {WalkerContext} */
this.context = {
skip: () => (this.should_skip = true),
remove: () => (this.should_remove = true),
replace: (node) => (this.replacement = node)
};
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
* @param {BaseNode} node
*/
replace(parent, prop, index, node) {
if (parent) {
if (index !== null) {
parent[prop][index] = node;
} else {
parent[prop] = node;
}
}
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
*/
remove(parent, prop, index) {
if (parent) {
if (index !== null) {
parent[prop].splice(index, 1);
} else {
delete parent[prop];
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"prefer-es6-class.d.ts","sourceRoot":"","sources":["prefer-es6-class.js"],"names":[],"mappings":"wBAoBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,46 @@
'use strict';
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();
var hasStrictMode = require('has-strict-mode')();
var runTests = require('./tests');
test('builtin', function (t) {
var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags');
t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable');
et.end();
});
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object');
st.end();
});
t.test('has the correct descriptor', function (st) {
st.equal(descriptor.configurable, true);
st.equal(descriptor.enumerable, false);
st.equal(typeof descriptor.get, 'function');
st.equal(descriptor.set, undefined);
st.end();
});
runTests(callBind(descriptor.get), t);
t.end();
});
@@ -0,0 +1,46 @@
import { NumberFormatOptions } from '@formatjs/ecma402-abstract';
import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
declare global {
namespace FormatjsIntl {
interface Message {
}
interface IntlConfig {
}
interface Formats {
}
}
}
type Format<Source = string> = Source extends keyof FormatjsIntl.Formats ? FormatjsIntl.Formats[Source] : string;
export interface Formats {
number: Record<Format<'number'>, NumberFormatOptions>;
date: Record<Format<'date'>, Intl.DateTimeFormatOptions>;
time: Record<Format<'time'>, Intl.DateTimeFormatOptions>;
}
export interface FormatterCache {
number: Record<string, NumberFormatOptions>;
dateTime: Record<string, Intl.DateTimeFormat>;
pluralRules: Record<string, Intl.PluralRules>;
}
export interface Formatters {
getNumberFormat(locals?: string | string[], opts?: NumberFormatOptions): Intl.NumberFormat;
getDateTimeFormat(...args: ConstructorParameters<typeof Intl.DateTimeFormat>): Intl.DateTimeFormat;
getPluralRules(...args: ConstructorParameters<typeof Intl.PluralRules>): Intl.PluralRules;
}
export declare enum PART_TYPE {
literal = 0,
object = 1
}
export interface LiteralPart {
type: PART_TYPE.literal;
value: string;
}
export interface ObjectPart<T = any> {
type: PART_TYPE.object;
value: T;
}
export type MessageFormatPart<T> = LiteralPart | ObjectPart<T>;
export type PrimitiveType = string | number | boolean | null | undefined | Date;
export declare function isFormatXMLElementFn<T>(el: PrimitiveType | T | FormatXMLElementFn<T>): el is FormatXMLElementFn<T>;
export declare function formatToParts<T>(els: MessageFormatElement[], locales: string | string[], formatters: Formatters, formats: Formats, values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>, currentPluralValue?: number, originalMessage?: string): MessageFormatPart<T>[];
export type FormatXMLElementFn<T, R = string | T | (string | T)[]> = (parts: Array<string | T>) => R;
export {};
@@ -0,0 +1,39 @@
// Central Atlas Tamazight [tzm]
import dayjs from '../index';
var locale = {
name: 'tzm',
weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
weekStart: 6,
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: 'ⵎⵉⵏⵓⴺ',
mm: '%d ⵎⵉⵏⵓⴺ',
h: 'ⵙⴰⵄⴰ',
hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
d: 'ⴰⵙⵙ',
dd: '%d oⵙⵙⴰⵏ',
M: 'ⴰⵢoⵓⵔ',
MM: '%d ⵉⵢⵢⵉⵔⵏ',
y: 'ⴰⵙⴳⴰⵙ',
yy: '%d ⵉⵙⴳⴰⵙⵏ'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,UAAU,CAAC,MAAM,CAAC;IACpC,aAAa,CAAC,UAAU,CAAC;IACzB,YAAY,CAAC,eAAe,CAAC;IAC7B,aAAa,CAAC,SAAS,CAAC;IACxB,cAAc,CAAC,UAAU,CAAC;IAC1B,iBAAiB,CAAC,OAAS,CAAC,iBAAiB,EAAE,KAAK,UAAU,CAAC,mBAAmB,CAAC;IACnF,kBAAkB,CAAC,OAAS,CAAC,iBAAiB,EAAE,KAAK,UAAU,CAAC,oBAAoB,CAAC;IACrF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,OAAO,CAAC;IAC9C,sBAAsB,CAAC,6BAA6B,CAAC;AACvD","sources":["packages/@react-aria/table/intl/en-US.json"],"sourcesContent":["{\n \"select\": \"Select\",\n \"selectAll\": \"Select All\",\n \"sortable\": \"sortable column\",\n \"ascending\": \"ascending\",\n \"descending\": \"descending\",\n \"ascendingSort\": \"sorted by column {columnName} in ascending order\",\n \"descendingSort\": \"sorted by column {columnName} in descending order\",\n \"columnSize\": \"{value} pixels\",\n \"resizerDescription\": \"Press Enter to start resizing\"\n}\n"],"names":[],"version":3,"file":"en-US.main.js.map"}
@@ -0,0 +1,4 @@
'use strict';
var argv = require('../')(process.argv.slice(2));
console.log(argv);
@@ -0,0 +1,298 @@
import getParser from '../../src/parser/index.js';
import { seedTokens } from '../../src/util.js';
test('block with tags', () => {
const parsed = getParser()(`
/**
* Description may go\x20
* over few lines followed by @tags
* @param {string} name name parameter
*
* @param {any} value value of any type
*/`);
expect(parsed).toEqual([
{
description: 'Description may go over few lines followed by @tags',
tags: [
{
tag: 'param',
name: 'name',
type: 'string',
optional: false,
description: 'name parameter',
problems: [],
source: [
{
number: 4,
source: ' * @param {string} name name parameter',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@param',
postTag: ' ',
name: 'name',
postName: ' ',
type: '{string}',
postType: ' ',
description: 'name parameter',
}),
},
{
number: 5,
source: ' *',
tokens: seedTokens({
start: ' ',
delimiter: '*',
}),
},
],
},
{
tag: 'param',
name: 'value',
type: 'any',
optional: false,
description: 'value of any type',
problems: [],
source: [
{
number: 6,
source: ' * @param {any} value value of any type',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@param',
postTag: ' ',
name: 'value',
postName: ' ',
type: '{any}',
postType: ' ',
description: 'value of any type',
}),
},
{
number: 7,
source: ' */',
tokens: seedTokens({
start: ' ',
end: '*/',
}),
},
],
},
],
source: [
{
number: 1,
source: ' /**',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
}),
},
{
number: 2,
source: ' * Description may go ',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'Description may go ',
}),
},
{
number: 3,
source: ' * over few lines followed by @tags',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'over few lines followed by @tags',
}),
},
{
number: 4,
source: ' * @param {string} name name parameter',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@param',
postTag: ' ',
name: 'name',
postName: ' ',
type: '{string}',
postType: ' ',
description: 'name parameter',
end: '',
}),
},
{
number: 5,
source: ' *',
tokens: seedTokens({
start: ' ',
delimiter: '*',
}),
},
{
number: 6,
source: ' * @param {any} value value of any type',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
tag: '@param',
postTag: ' ',
name: 'value',
postName: ' ',
type: '{any}',
postType: ' ',
description: 'value of any type',
}),
},
{
number: 7,
source: ' */',
tokens: seedTokens({
start: ' ',
end: '*/',
}),
},
],
problems: [],
},
]);
});
test('no source cloning', () => {
const parsed = getParser()(`
/**
* Description may go\x20
* over few lines followed by @tags
* @param {string} name name parameter
*
* @param {any} value value of any type
*/`);
expect(parsed[0].tags[0].source[0] === parsed[0].source[3]).toBe(true);
});
test('empty multi-line block', () => {
const parsed = getParser()(`
/**
*
*/`);
expect(parsed).toEqual([
{
description: '',
tags: [],
source: [
{
number: 1,
source: ' /**',
tokens: {
delimiter: '/**',
description: '',
end: '',
lineEnd: '',
name: '',
postDelimiter: '',
postName: '',
postTag: '',
postType: '',
start: ' ',
tag: '',
type: '',
},
},
{
number: 2,
source: ' *',
tokens: {
delimiter: '*',
description: '',
end: '',
lineEnd: '',
name: '',
postDelimiter: '',
postName: '',
postTag: '',
postType: '',
start: ' ',
tag: '',
type: '',
},
},
{
number: 3,
source: ' */',
tokens: {
delimiter: '',
description: '',
end: '*/',
lineEnd: '',
name: '',
postDelimiter: '',
postName: '',
postTag: '',
postType: '',
start: ' ',
tag: '',
type: '',
},
},
],
problems: [],
},
]);
});
test('empty one-line block', () => {
const parsed = getParser()(`
/** */`);
expect(parsed).toEqual([
{
description: '',
tags: [],
source: [
{
number: 1,
source: ' /** */',
tokens: {
delimiter: '/**',
description: '',
end: '*/',
lineEnd: '',
name: '',
postDelimiter: ' ',
postName: '',
postTag: '',
postType: '',
start: ' ',
tag: '',
type: '',
},
},
],
problems: [],
},
]);
});
test.each([
['one-star', '/*\n*\n*/'],
['three-star', '/***\n*\n*/'],
['one-star oneliner', '/* */'],
['three-star oneliner', '/*** */'],
])('skip block - %s', (name, source) => {
expect(getParser()(source)).toEqual([]);
});
test.each([
['negative', -1],
['float', 1.5],
])('invalid start line - %s', (name, startLine) => {
expect(() => getParser({ startLine })).toThrow('Invalid startLine');
});
@@ -0,0 +1,29 @@
import baseNth from './_baseNth.js';
import toInteger from './toInteger.js';
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth
* element from the end is returned.
*
* @static
* @memberOf _
* @since 4.11.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=0] The index of the element to return.
* @returns {*} Returns the nth element of `array`.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
*
* _.nth(array, 1);
* // => 'b'
*
* _.nth(array, -2);
* // => 'c';
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
}
export default nth;
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=containerGetShouldThrowOnAmbiguousBindingMatch.int.spec.d.ts.map
@@ -0,0 +1,26 @@
'use strict';
var fecha = require('fecha');
var format = require('./format');
/*
* function timestamp (info)
* Returns a new instance of the timestamp Format which adds a timestamp
* to the info. It was previously available in winston < 3.0.0 as:
*
* - { timestamp: true } // `new Date.toISOString()`
* - { timestamp: function:String } // Value returned by `timestamp()`
*/
module.exports = format(function (info) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (opts.format) {
info.timestamp = typeof opts.format === 'function' ? opts.format() : fecha.format(new Date(), opts.format);
}
if (!info.timestamp) {
info.timestamp = new Date().toISOString();
}
if (opts.alias) {
info[opts.alias] = info.timestamp;
}
return info;
});
@@ -0,0 +1,74 @@
{
"name": "eslint-plugin-es",
"version": "3.0.1",
"description": "ESLint plugin about ECMAScript syntactic features.",
"engines": {
"node": ">=8.10.0"
},
"main": "lib/index.js",
"files": [
"lib"
],
"peerDependencies": {
"eslint": ">=4.19.1"
},
"dependencies": {
"eslint-utils": "^2.0.0",
"regexpp": "^3.0.0"
},
"devDependencies": {
"@mysticatea/eslint-plugin": "^11.0.0",
"@vuepress/plugin-pwa": "^1.2.0",
"acorn": "^7.1.0",
"babel-eslint": "^10.0.1",
"codecov": "^3.5.0",
"eslint": "^6.2.2",
"eslint4b": "^6.2.2",
"espree": "^7.0.0",
"globals": "^12.0.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.5",
"nyc": "^14.1.1",
"opener": "^1.5.1",
"rimraf": "^3.0.0",
"semver": "^6.3.0",
"vue-eslint-editor": "^0.2.0",
"vuepress": "^1.2.0"
},
"scripts": {
"clean": "rimraf .nyc_output coverage",
"codecov": "nyc report -r lcovonly && codecov -t ${CODECOV_TOKEN} --disable=gcov",
"coverage": "nyc report -r lcov && opener ./coverage/lcov-report/index.html",
"docs:build": "vuepress build docs",
"docs:watch": "vuepress dev docs",
"lint": "eslint lib tests scripts",
"new": "node scripts/new-rule",
"pretest": "npm run -s lint",
"test": "npm run -s test:mocha",
"test:mocha": "nyc mocha tests/**/*.js --reporter dot",
"update": "run-s update:*",
"update:url": "npm run -s lint -- --fix",
"update:ruledocs": "node scripts/update-docs-rules",
"update:index": "node scripts/update-index",
"preversion": "npm test",
"version": "run-s update:* docs:build && git add .",
"postversion": "git push && git push --tags",
"watch": "mocha tests/**/*.js --reporter progress --watch --growl"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mysticatea/eslint-plugin-es.git"
},
"keywords": [
"eslint",
"plugin",
"eslintplugin"
],
"author": "Toru Nagashima (https://github.com/mysticatea)",
"license": "MIT",
"bugs": {
"url": "https://github.com/mysticatea/eslint-plugin-es/issues"
},
"homepage": "https://github.com/mysticatea/eslint-plugin-es#readme",
"funding": "https://github.com/sponsors/mysticatea"
}
@@ -0,0 +1,5 @@
import type { ChildContext, RuleContext } from './types.js';
export type * from './types.js';
export * from './utils.js';
export declare const setRuleContext: <T = void>(nextRuleContext: ChildContext | RuleContext, callback: () => T) => T;
export declare const useRuleContext: () => ChildContext | RuleContext<string, readonly unknown[]> | undefined;
@@ -0,0 +1 @@
{"name":"reusify","version":"1.1.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095757,"integrity":"sha512-yLelKyGJ2gaRG8tBNe/yi+86d2wfS2M1B1KxiLOXa32etzBcwZJnh0V7ddjbKPVGd4sQ1GM0dGA1LNpmdbRHNA==","mode":420,"size":1087},"benchmarks/createNoCodeFunction.js":{"checkedAt":1794532095757,"integrity":"sha512-dUVuFE3NHIsPnTc9pP1ZrvkrVGz+TYMVgApj7VG6yM4YVnuEhovxMtKkZG4viVIAWtCpXH9HPRBSnIR16YS5nQ==","mode":420,"size":590},"eslint.config.js":{"checkedAt":1794532095757,"integrity":"sha512-OFJXz3p21hhY9ubDXXYAbC7N67ypaluoPebQ6P1fpeh+jBdXsjn2k9dvmAngnHLJ1TeFj9uE5Wh+/A4IjRRGtQ==","mode":420,"size":196},"benchmarks/fib.js":{"checkedAt":1794532095757,"integrity":"sha512-kvlLgMjytO+hY47ooi9ONDEcziN8jEJGD/ArWXJc+Qs2cvc6aL27J22Xv2aVPfNS4FE1xLVXndpg9bpHyZgkFA==","mode":420,"size":177},"benchmarks/reuseNoCodeFunction.js":{"checkedAt":1794532095757,"integrity":"sha512-zAj7MICj1pMMoD/thoNmmm40SXICTFuUTTmInkguKOlwr78TXgH7Z/V0HzdtKAffhRFW0t/KSJYIqcnWoKMqVg==","mode":420,"size":713},"reusify.js":{"checkedAt":1794532095758,"integrity":"sha512-vyldGtKcAUQZki4reYWLf0R9ei1dhReHBgH/hiNkKRYGGtFOWy9HQNrFFL84Y1GheSb/KGMvYc+V+6DomP723Q==","mode":420,"size":454},"test.js":{"checkedAt":1794532095758,"integrity":"sha512-jfLDiZa1jUvKlDwgPWBOio03iL1g2Ju3lYjLmcFaK/XSs3qIgAuSS7yM8xL3F4evXh71opN1+0oyvkkHRvFo0w==","mode":420,"size":1440},"package.json":{"checkedAt":1794532095758,"integrity":"sha512-mPKenk2D+e4TU0mVorW7cR3dqCxJMWUeRwFtbl4rTr8SRMwtDZES+ecOWMnRxV5jSD91TjrW4cehTRzg6S4RLw==","mode":420,"size":1074},"tsconfig.json":{"checkedAt":1794532095758,"integrity":"sha512-xUYOyEOHI6AwG9Ay6EkHoUWAeEkMc7Rc2NjcPdCdmH3hQa283TwGKsXeAL6g9izHrZ9j5ST2r9HMpcnJC+Dydw==","mode":420,"size":156},"README.md":{"checkedAt":1794532095758,"integrity":"sha512-X/BjV8/tR7O1+sJ6oo5F9UtJPYrAIQGg59O1VQ3QOsSlx8ktQODjVwVfy8mqjJ8/sh2Jc+bD47oixYJW3MFpfg==","mode":420,"size":3242},"SECURITY.md":{"checkedAt":1794532095758,"integrity":"sha512-0nt0GWMXpexFLbBcpryZYosPIf4AmBYor0HrBH47topAb1/CuNNADj8eiMktKqZEM6VVua/EBX29nowMfRfu0A==","mode":420,"size":455},"reusify.d.ts":{"checkedAt":1794532095758,"integrity":"sha512-rcjHCkwuYtEwuUHrraEY7e6cmAv7BrNchkEwWOVJrMrPHK2UaC069VxH4+Ly5kkqTIU00gYOPfDSY4vscaWxVg==","mode":420,"size":212},".github/workflows/ci.yml":{"checkedAt":1794532095759,"integrity":"sha512-VzXRg9yaTKAwnYI5cFS8U5r+B0e4eYzWu3Von6rT3PoJwB2p1EcDZACjJ1DcS05nCYQKhbokxL3rAK1bTkyL0w==","mode":420,"size":1775},".github/dependabot.yml":{"checkedAt":1794532095759,"integrity":"sha512-C2DvqAH73+BvcrTWFA7cIX3Kfwsng7Gu32mCB9H9Pa7f3ye9S/uCLt0VOnm/uigodIUvAxIP68lO1hHFmjreiw==","mode":420,"size":125}}}
@@ -0,0 +1,121 @@
/**
* @fileoverview Rule to check spacing between template tags and their literals
* @author Jonathan Wilsson
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @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: "template-tag-spacing",
url: "https://eslint.style/rules/template-tag-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Require or disallow spacing between template tags and their literals",
recommended: false,
url: "https://eslint.org/docs/latest/rules/template-tag-spacing",
},
fixable: "whitespace",
schema: [{ enum: ["always", "never"] }],
messages: {
unexpected:
"Unexpected space between template tag and template literal.",
missing: "Missing space between template tag and template literal.",
},
},
create(context) {
const never = context.options[0] !== "always";
const sourceCode = context.sourceCode;
/**
* Check if a space is present between a template tag and its literal
* @param {ASTNode} node node to evaluate
* @returns {void}
* @private
*/
function checkSpacing(node) {
const tagToken = sourceCode.getTokenBefore(node.quasi);
const literalToken = sourceCode.getFirstToken(node.quasi);
const hasWhitespace = sourceCode.isSpaceBetweenTokens(
tagToken,
literalToken,
);
if (never && hasWhitespace) {
context.report({
node,
loc: {
start: tagToken.loc.end,
end: literalToken.loc.start,
},
messageId: "unexpected",
fix(fixer) {
const comments = sourceCode.getCommentsBefore(
node.quasi,
);
// Don't fix anything if there's a single line comment after the template tag
if (comments.some(comment => comment.type === "Line")) {
return null;
}
return fixer.replaceTextRange(
[tagToken.range[1], literalToken.range[0]],
comments.reduce(
(text, comment) =>
text + sourceCode.getText(comment),
"",
),
);
},
});
} else if (!never && !hasWhitespace) {
context.report({
node,
loc: {
start: node.loc.start,
end: literalToken.loc.start,
},
messageId: "missing",
fix(fixer) {
return fixer.insertTextAfter(tagToken, " ");
},
});
}
}
return {
TaggedTemplateExpression: checkSpacing,
};
},
};
@@ -0,0 +1 @@
{"version":3,"names":["inherit","key","child","parent","Array","from","Set","concat","filter","Boolean"],"sources":["../../src/utils/inherit.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\nexport default function inherit<\n C extends t.Node | undefined,\n P extends t.Node | undefined,\n>(key: keyof C & keyof P, child: C, parent: P): void {\n if (child && parent) {\n // @ts-expect-error Could further refine key definitions\n child[key] = Array.from(\n new Set([].concat(child[key], parent[key]).filter(Boolean)),\n );\n }\n}\n"],"mappings":";;;;;;AAEe,SAASA,OAAOA,CAG7BC,GAAsB,EAAEC,KAAQ,EAAEC,MAAS,EAAQ;EACnD,IAAID,KAAK,IAAIC,MAAM,EAAE;IAEnBD,KAAK,CAACD,GAAG,CAAC,GAAGG,KAAK,CAACC,IAAI,CACrB,IAAIC,GAAG,CAAC,EAAE,CAACC,MAAM,CAACL,KAAK,CAACD,GAAG,CAAC,EAAEE,MAAM,CAACF,GAAG,CAAC,CAAC,CAACO,MAAM,CAACC,OAAO,CAAC,CAC5D,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,18 @@
MIT License
Copyright (c) 2020 Matthew Miller
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,71 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const minTwo = z.string().array().min(2);
const maxTwo = z.string().array().max(2);
const justTwo = z.string().array().length(2);
const intNum = z.string().array().nonempty();
const nonEmptyMax = z.string().array().nonempty().max(2);
type t1 = z.infer<typeof nonEmptyMax>;
util.assertEqual<[string, ...string[]], t1>(true);
type t2 = z.infer<typeof minTwo>;
util.assertEqual<string[], t2>(true);
test("passing validations", () => {
minTwo.parse(["a", "a"]);
minTwo.parse(["a", "a", "a"]);
maxTwo.parse(["a", "a"]);
maxTwo.parse(["a"]);
justTwo.parse(["a", "a"]);
intNum.parse(["a"]);
nonEmptyMax.parse(["a"]);
});
test("failing validations", () => {
expect(() => minTwo.parse(["a"])).toThrow();
expect(() => maxTwo.parse(["a", "a", "a"])).toThrow();
expect(() => justTwo.parse(["a"])).toThrow();
expect(() => justTwo.parse(["a", "a", "a"])).toThrow();
expect(() => intNum.parse([])).toThrow();
expect(() => nonEmptyMax.parse([])).toThrow();
expect(() => nonEmptyMax.parse(["a", "a", "a"])).toThrow();
});
test("parse empty array in nonempty", () => {
expect(() =>
z
.array(z.string())
.nonempty()
.parse([] as any)
).toThrow();
});
test("get element", () => {
justTwo.element.parse("asdf");
expect(() => justTwo.element.parse(12)).toThrow();
});
test("continue parsing despite array size error", () => {
const schema = z.object({
people: z.string().array().min(2),
});
const result = schema.safeParse({
people: [123],
});
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(2);
}
});
test("parse should fail given sparse array", () => {
const schema = z.array(z.string()).nonempty().min(1).max(3);
expect(() => schema.parse(new Array(3))).toThrow();
});
@@ -0,0 +1,91 @@
'use strict';
/* globals window */
var test = require('tape');
var isAsyncFunction = require('../index');
var generatorFuncs = require('make-generator-function')();
var asyncFuncs = require('make-async-function').list();
var hasToStringTag = require('has-tostringtag/shams')();
var forEach = require('for-each');
test('returns false for non-functions', function (t) {
var nonFuncs = [
true,
false,
null,
undefined,
{},
[],
/a/g,
'string',
42,
new Date()
];
t.plan(nonFuncs.length);
forEach(nonFuncs, function (nonFunc) {
t.notOk(isAsyncFunction(nonFunc), nonFunc + ' is not a function');
});
t.end();
});
test('returns false for non-async functions', function (t) {
var func = function () {};
t.notOk(isAsyncFunction(func), 'anonymous function is not an async function');
var namedFunc = function foo() {};
t.notOk(isAsyncFunction(namedFunc), 'named function is not an async function');
if (typeof window === 'undefined') {
t.skip('window.alert is not an async function');
} else {
t.notOk(isAsyncFunction(window.alert), 'window.alert is not an async function');
}
t.end();
});
var fakeToString = function () { return 'async function () { return "TOTALLY REAL I SWEAR!"; }'; };
test('returns false for non-async function with faked toString', function (t) {
var func = function () {};
func.toString = fakeToString;
t.notEqual(String(func), Function.prototype.toString.apply(func), 'faked toString is not real toString');
t.notOk(isAsyncFunction(func), 'anonymous function with faked toString is not an async function');
t.end();
});
test('returns false for generator functions', function (t) {
if (generatorFuncs.length > 0) {
forEach(generatorFuncs, function (generatorFunc) {
t.notOk(isAsyncFunction(generatorFunc), generatorFunc + ' is not async function');
});
} else {
t.skip('generator function is not async function - this environment does not support ES6 generator functions. Please use an engine that supports them.');
}
t.end();
});
test('returns false for non-async function with faked @@toStringTag', { skip: !hasToStringTag || asyncFuncs.length === 0 }, function (t) {
var asyncFunc = asyncFuncs[0];
/** @type {{ toString(): unknown; valueOf(): unknown; [Symbol.toStringTag]?: unknown }} */
var fakeAsyncFunction = {
toString: function () { return String(asyncFunc); },
valueOf: function () { return asyncFunc; }
};
fakeAsyncFunction[Symbol.toStringTag] = 'AsyncFunction';
t.notOk(isAsyncFunction(fakeAsyncFunction), 'fake AsyncFunction with @@toStringTag "AsyncFunction" is not an async function');
t.end();
});
test('returns true for async functions', function (t) {
if (asyncFuncs.length > 0) {
forEach(asyncFuncs, function (asyncFunc) {
t.ok(isAsyncFunction(asyncFunc), asyncFunc + ' is async function');
});
} else {
t.skip('async function is async function - this environment does not support ES2018 async functions. Please use an engine that supports them.');
}
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"clipboard.js","names":["Attributor","BlockBlot","ClassAttributor","EmbedBlot","Scope","StyleAttributor","Delta","BlockEmbed","logger","Module","Quill","AlignAttribute","AlignStyle","BackgroundStyle","CodeBlock","ColorStyle","DirectionAttribute","DirectionStyle","FontStyle","SizeStyle","deleteRange","normalizeExternalHTML","debug","CLIPBOARD_CONFIG","Node","TEXT_NODE","matchText","matchNewline","matchBreak","ELEMENT_NODE","matchBlot","matchAttributor","matchStyles","matchIndent","matchList","matchCodeBlock","matchTable","createMatchAlias","matchIgnore","ATTRIBUTE_ATTRIBUTORS","reduce","memo","attr","keyName","STYLE_ATTRIBUTORS","Clipboard","DEFAULTS","matchers","constructor","quill","options","root","addEventListener","e","onCaptureCopy","onCapturePaste","bind","concat","forEach","_ref","selector","matcher","addMatcher","push","convert","_ref2","html","text","formats","arguments","length","undefined","blotName","insert","delta","convertHTML","deltaEndsWith","ops","attributes","table","compose","retain","delete","normalizeHTML","doc","DOMParser","parseFromString","container","body","nodeMatches","WeakMap","elementMatchers","textMatchers","prepareMatching","traverse","scroll","dangerouslyPasteHTML","index","source","sources","API","setContents","setSelection","SILENT","paste","updateContents","isCut","defaultPrevented","preventDefault","range","selection","getRange","onCopy","clipboardData","setData","normalizeURIList","urlList","split","filter","url","join","isEnabled","getSelection","getData","files","Array","from","uploader","upload","childElementCount","firstElementChild","tagName","onPaste","getText","getSemanticHTML","_ref3","getFormat","pastedDelta","log","USER","scrollSelectionIntoView","pair","querySelectorAll","node","has","matches","get","set","applyFormat","format","value","query","newDelta","op","endText","i","slice","isLine","Element","match","prototype","includes","toLowerCase","isBetweenInlineElements","previousElementSibling","nextElementSibling","preNodes","isPre","parentNode","nodeType","childNodes","childNode","childrenDelta","reducedDelta","_node","keys","classes","styles","name","ATTRIBUTE","attrName","Object","entries","_ref4","embed","language","indent","parent","composed","element","list","checkedAttr","getAttribute","HTMLParagraphElement","nextSibling","firstChild","style","fontStyle","italic","textDecoration","underline","strike","fontWeight","startsWith","parseInt","bold","_ref5","parseFloat","textIndent","parentElement","rows","row","indexOf","data","trim","replace","previousSibling","replaceAll","default"],"sources":["../../src/modules/clipboard.ts"],"sourcesContent":["import type { ScrollBlot } from 'parchment';\nimport {\n Attributor,\n BlockBlot,\n ClassAttributor,\n EmbedBlot,\n Scope,\n StyleAttributor,\n} from 'parchment';\nimport Delta from 'quill-delta';\nimport { BlockEmbed } from '../blots/block.js';\nimport type { EmitterSource } from '../core/emitter.js';\nimport logger from '../core/logger.js';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\nimport type { Range } from '../core/selection.js';\nimport { AlignAttribute, AlignStyle } from '../formats/align.js';\nimport { BackgroundStyle } from '../formats/background.js';\nimport CodeBlock from '../formats/code.js';\nimport { ColorStyle } from '../formats/color.js';\nimport { DirectionAttribute, DirectionStyle } from '../formats/direction.js';\nimport { FontStyle } from '../formats/font.js';\nimport { SizeStyle } from '../formats/size.js';\nimport { deleteRange } from './keyboard.js';\nimport normalizeExternalHTML from './normalizeExternalHTML/index.js';\n\nconst debug = logger('quill:clipboard');\n\ntype Selector = string | Node['TEXT_NODE'] | Node['ELEMENT_NODE'];\ntype Matcher = (node: Node, delta: Delta, scroll: ScrollBlot) => Delta;\n\nconst CLIPBOARD_CONFIG: [Selector, Matcher][] = [\n [Node.TEXT_NODE, matchText],\n [Node.TEXT_NODE, matchNewline],\n ['br', matchBreak],\n [Node.ELEMENT_NODE, matchNewline],\n [Node.ELEMENT_NODE, matchBlot],\n [Node.ELEMENT_NODE, matchAttributor],\n [Node.ELEMENT_NODE, matchStyles],\n ['li', matchIndent],\n ['ol, ul', matchList],\n ['pre', matchCodeBlock],\n ['tr', matchTable],\n ['b', createMatchAlias('bold')],\n ['i', createMatchAlias('italic')],\n ['strike', createMatchAlias('strike')],\n ['style', matchIgnore],\n];\n\nconst ATTRIBUTE_ATTRIBUTORS = [AlignAttribute, DirectionAttribute].reduce(\n (memo: Record<string, Attributor>, attr) => {\n memo[attr.keyName] = attr;\n return memo;\n },\n {},\n);\n\nconst STYLE_ATTRIBUTORS = [\n AlignStyle,\n BackgroundStyle,\n ColorStyle,\n DirectionStyle,\n FontStyle,\n SizeStyle,\n].reduce((memo: Record<string, Attributor>, attr) => {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\n\ninterface ClipboardOptions {\n matchers: [Selector, Matcher][];\n}\n\nclass Clipboard extends Module<ClipboardOptions> {\n static DEFAULTS: ClipboardOptions = {\n Line truncated
@@ -0,0 +1,40 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { defineRegExpHandler } = require("../util/define-regexp-handler")
module.exports = {
meta: {
docs: {
description: "disallow RegExp Unicode property escape sequences.",
category: "ES2018",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-unicode-property-escapes.html",
},
fixable: null,
messages: {
forbidden:
"ES2018 RegExp Unicode property escape sequences are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return defineRegExpHandler(context, (node) => {
let found = false
return {
onUnicodePropertyCharacterSet() {
found = true
},
onExit() {
if (found) {
context.report({ node, messageId: "forbidden" })
}
},
}
})
},
}
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) <2015> <junmer>
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,6 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { type TNever } from '../never/index';
import type { TUnion } from './union-type';
export type Union<T extends TSchema[]> = (T extends [] ? TNever : T extends [TSchema] ? T[0] : TUnion<T>);
/** `[Json]` Creates a Union type */
export declare function Union<Types extends TSchema[]>(types: [...Types], options?: SchemaOptions): Union<Types>;
@@ -0,0 +1,41 @@
import { parse } from './parse';
/**
* Can parse a compiled string, from a tagged template
* @param {String} value
* @param {Object} [props]
*/
export let compile = (str, defs, data) => {
return str.reduce((out, next, i) => {
let tail = defs[i];
// If this is a function we need to:
if (tail && tail.call) {
// 1. Call it with `data`
let res = tail(data);
// 2. Grab the className
let className = res && res.props && res.props.className;
// 3. If there's none, see if this is basically a
// previously styled className by checking the prefix
let end = className || (/^go/.test(res) && res);
if (end) {
// If the `end` is defined means it's a className
tail = '.' + end;
} else if (res && typeof res == 'object') {
// If `res` it's an object, we're either dealing with a vnode
// or an object returned from a function interpolation
tail = res.props ? '' : parse(res, '');
} else {
// Regular value returned. Can be falsy as well.
// Here we check if this is strictly a boolean with false value
// define it as `''` to be picked up as empty, otherwise use
// res value
tail = res === false ? '' : res;
}
}
return out + next + (tail == null ? '' : tail);
}, '');
};
@@ -0,0 +1 @@
{"name":"depd","version":"2.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532088762,"integrity":"sha512-e91yWby415qkF3fwPTo/iim2DC0lEEBy7bqf6+uBPhLveNMVc2N3At7N26qX2P7CY7xBO9J91mDe0X1kRFjLwg==","mode":420,"size":1335},"History.md":{"checkedAt":1794532088762,"integrity":"sha512-ubxQGDs2N/R4y7eLHYj9rHbCls3HPIgpYQrJnDFoI54kImyCaIRY7a1ZhyUlXkE/BbQt1/oaJfQbXUGtledwLQ==","mode":420,"size":2256},"index.js":{"checkedAt":1794532088763,"integrity":"sha512-6hrZvPCac6EN0f2KZtqsEvh3JeFq0n577/bZ/ak3V5l2zV1+1kOcQSKxYXjD/99BDWx6VJGPlLyY+nlQrfO9VA==","mode":420,"size":10932},"LICENSE":{"checkedAt":1794532088763,"integrity":"sha512-F1WWYJyRdnoQHWsQUd6RVjaVuSJFtcS9CiukzCTvKPBIDqInWHjlZvwI0gPRglRffMfr+wiWbLprq+1REu3bvQ==","mode":420,"size":1094},"Readme.md":{"checkedAt":1794532088763,"integrity":"sha512-2bB1U8HF/FBXMtFDW4Gsy/5dFkco/Qx+oOF5WCvG9PudpwR+EZRo5kMZA92oVk1KJmCM36teL3NE0vVqJbAhrQ==","mode":420,"size":9988},"lib/browser/index.js":{"checkedAt":1794532088764,"integrity":"sha512-WEiyjdqsGvldZY0RCujBjTCQRCBrBmxXVwXg+LdfSpGP5pLl+Qu6b+KxxO+DRMcJbE9+LOh/f7FTe1XgSJ11sw==","mode":420,"size":1512}}}
@@ -0,0 +1,37 @@
declare namespace ansiRegex {
interface Options {
/**
Match only the first ANSI escape.
@default false
*/
onlyFirst: boolean;
}
}
/**
Regular expression for matching ANSI escape codes.
@example
```
import ansiRegex = require('ansi-regex');
ansiRegex().test('\u001B[4mcake\u001B[0m');
//=> true
ansiRegex().test('cake');
//=> false
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
//=> ['\u001B[4m', '\u001B[0m']
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
//=> ['\u001B[4m']
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
```
*/
declare function ansiRegex(options?: ansiRegex.Options): RegExp;
export = ansiRegex;
@@ -0,0 +1 @@
{"version":3,"sources":["dist/base64.cjs"],"names":["global","factory","exports","module","define","amd","globalThis","self","base64","this","chars","charsUrl","genLookup","lookupTemp","Uint8Array","len","length","let","i","target","charCodeAt","lookup","lookupUrl","base64UrlPattern","base64Pattern","toArrayBuffer","data","urlMode","bufferLength","p","encoded1","encoded2","encoded3","encoded4","arraybuffer","ArrayBuffer","bytes","fromArrayBuffer","arrBuf","result","remainder","substring","toString","str","TextDecoder","decode","fromString","TextEncoder","encode","validate","encoded","String","test","_e"],"mappings":"CAAA,SAAWA,OAAQC,SAClB,OAAOC,UAAY,UAAY,OAAOC,SAAW,YAAcA,OAAOD,QAAUD,QAAQ,EACxF,OAAOG,SAAW,YAAcA,OAAOC,IAAMD,OAAOH,OAAO,GAC1DD,OAAS,OAAOM,aAAe,YAAcA,WAAaN,QAAUO,KAAMP,OAAOQ,OAASP,QAAQ,EACnG,GAAEQ,KAAM,WAAe,aA8BvB,MAECC,MAAQ,mEAGRC,SAAW,mEAEXC,UAAY,SACX,MAAMC,WAAa,OAAOC,aAAe,YAAc,GAAK,IAAIA,WAAW,GAAG,EAC9E,MAAMC,IAAML,MAAMM,OAClB,IAAKC,IAAIC,EAAI,EAAGA,EAAIH,IAAKG,CAAC,GAAI,CAC7BL,WAAWM,OAAOC,WAAWF,CAAC,GAAKA,CACpC,CACA,OAAOL,UACR,EAGAQ,OAAST,UAAUF,KAAK,EACxBY,UAAYV,UAAUD,QAAQ,EAK/B,MAAMY,iBAAmB,qBACzB,MAAMC,cAAgB,0BAKtB,MAAMhB,OAAS,GAUfA,OAAOiB,cAAgB,CAACC,KAAMC,WAC7B,MACCZ,IAAMW,KAAKV,OACZC,IAAIW,aAAeF,KAAKV,OAAS,IAChCE,EACAW,EAAI,EACJC,SACAC,SACAC,SACAC,SAED,GAAIP,KAAKA,KAAKV,OAAS,KAAO,IAAK,CAClCY,YAAY,GACZ,GAAIF,KAAKA,KAAKV,OAAS,KAAO,IAAK,CAClCY,YAAY,EACb,CACD,CAEA,MACCM,YAAc,IAAIC,YAAYP,YAAY,EAC1CQ,MAAQ,IAAItB,WAAWoB,WAAW,EAClCf,OAASQ,QAAUL,UAAYD,OAEhC,IAAKH,EAAI,EAAGA,EAAIH,IAAKG,GAAK,EAAG,CAC5BY,SAAWX,OAAOO,KAAKN,WAAWF,CAAC,GACnCa,SAAWZ,OAAOO,KAAKN,WAAWF,EAAI,CAAC,GACvCc,SAAWb,OAAOO,KAAKN,WAAWF,EAAI,CAAC,GACvCe,SAAWd,OAAOO,KAAKN,WAAWF,EAAI,CAAC,GAEvCkB,MAAMP,CAAC,IAAOC,UAAY,EAAMC,UAAY,EAC5CK,MAAMP,CAAC,KAAQE,SAAW,KAAO,EAAMC,UAAY,EACnDI,MAAMP,CAAC,KAAQG,SAAW,IAAM,EAAMC,SAAW,EAClD,CAEA,OAAOC,WAER,EAUA1B,OAAO6B,gBAAkB,CAACC,OAAQX,WACjC,MAAMS,MAAQ,IAAItB,WAAWwB,MAAM,EACnCrB,IACCC,EACAqB,OAAS,GAEV,MACCxB,IAAMqB,MAAMpB,OACZG,OAASQ,QAAUhB,SAAWD,MAE/B,IAAKQ,EAAI,EAAGA,EAAIH,IAAKG,GAAK,EAAG,CAC5BqB,QAAUpB,OAAOiB,MAAMlB,IAAM,GAC7BqB,QAAUpB,QAASiB,MAAMlB,GAAK,IAAM,EAAMkB,MAAMlB,EAAI,IAAM,GAC1DqB,QAAUpB,QAASiB,MAAMlB,EAAI,GAAK,KAAO,EAAMkB,MAAMlB,EAAI,IAAM,GAC/DqB,QAAUpB,OAAOiB,MAAMlB,EAAI,GAAK,GACjC,CAEA,MAAMsB,UAAYzB,IAAM,EACxB,GAAIyB,YAAc,EAAG,CACpBD,OAASA,OAAOE,UAAU,EAAGF,OAAOvB,OAAS,CAAC,GAAKW,QAAU,GAAK,IACnE,MAAO,GAAIa,YAAc,EAAG,CAC3BD,OAASA,OAAOE,UAAU,EAAGF,OAAOvB,OAAS,CAAC,GAAKW,QAAU,GAAK,KACnE,CAEA,OAAOY,MAER,EAUA/B,OAAOkC,SAAW,CAACC,IAAKhB,WACvB,OAAO,IAAIiB,aAAcC,OAAOrC,OAAOiB,cAAckB,IAAKhB,OAAO,CAAC,CACnE,EAUAnB,OAAOsC,WAAa,CAACH,IAAKhB,WACzB,OAAOnB,OAAO6B,iBAAgB,IAAIU,aAAcC,OAAOL,GAAG,EAAGhB,OAAO,CACrE,EASAnB,OAAOyC,SAAW,CAACC,QAASvB,WAG3B,GAAI,EAAE,OAAOuB,UAAY,UAAYA,mBAAmBC,QAAS,CAChE,OAAO,KACR,CAGA,IACC,OAAOxB,QAAUJ,iBAAiB6B,KAAKF,OAAO,EAAI1B,cAAc4B,KAAKF,OAAO,CAG7E,CAFE,MAAOG,IACR,OAAO,KACR,CACD,EAEA7C,OAAOA,OAASA,OAEhB,OAAOA,MAEP,CAAC"}
@@ -0,0 +1,73 @@
import { CreateType } from '../create/type.mjs';
import { Computed } from '../computed/index.mjs';
import { Object } from '../object/index.mjs';
import { Intersect } from '../intersect/index.mjs';
import { Union } from '../union/index.mjs';
import { Ref } from '../ref/index.mjs';
import { OptionalKind, TransformKind } from '../symbols/index.mjs';
import { Discard } from '../discard/index.mjs';
import { RequiredFromMappedResult } from './required-from-mapped-result.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import * as KindGuard from '../guard/kind.mjs';
// prettier-ignore
function FromComputed(target, parameters) {
return Computed('Required', [Computed(target, parameters)]);
}
// prettier-ignore
function FromRef($ref) {
return Computed('Required', [Ref($ref)]);
}
// prettier-ignore
function FromProperties(properties) {
const requiredProperties = {};
for (const K of globalThis.Object.getOwnPropertyNames(properties))
requiredProperties[K] = Discard(properties[K], [OptionalKind]);
return requiredProperties;
}
// prettier-ignore
function FromObject(type, properties) {
const options = Discard(type, [TransformKind, '$id', 'required', 'properties']);
const mappedProperties = FromProperties(properties);
return Object(mappedProperties, options);
}
// prettier-ignore
function FromRest(types) {
return types.map(type => RequiredResolve(type));
}
// ------------------------------------------------------------------
// RequiredResolve
// ------------------------------------------------------------------
// prettier-ignore
function RequiredResolve(type) {
return (
// Mappable
KindGuard.IsComputed(type) ? FromComputed(type.target, type.parameters) :
KindGuard.IsRef(type) ? FromRef(type.$ref) :
KindGuard.IsIntersect(type) ? Intersect(FromRest(type.allOf)) :
KindGuard.IsUnion(type) ? Union(FromRest(type.anyOf)) :
KindGuard.IsObject(type) ? FromObject(type, type.properties) :
// Intrinsic
KindGuard.IsBigInt(type) ? type :
KindGuard.IsBoolean(type) ? type :
KindGuard.IsInteger(type) ? type :
KindGuard.IsLiteral(type) ? type :
KindGuard.IsNull(type) ? type :
KindGuard.IsNumber(type) ? type :
KindGuard.IsString(type) ? type :
KindGuard.IsSymbol(type) ? type :
KindGuard.IsUndefined(type) ? type :
// Passthrough
Object({}));
}
/** `[Json]` Constructs a type where all properties are required */
export function Required(type, options) {
if (KindGuard.IsMappedResult(type)) {
return RequiredFromMappedResult(type, options);
}
else {
// special: mapping types require overridable options
return CreateType({ ...RequiredResolve(type), ...options });
}
}
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.enc.Latin1;
@@ -0,0 +1,22 @@
import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsOptional } from '../guard/kind.mjs';
function RequiredKeys(properties) {
const keys = [];
for (let key in properties) {
if (!IsOptional(properties[key]))
keys.push(key);
}
return keys;
}
/** `[Json]` Creates an Object type */
function _Object(properties, options) {
const required = RequiredKeys(properties);
const schematic = required.length > 0 ? { [Kind]: 'Object', type: 'object', properties, required } : { [Kind]: 'Object', type: 'object', properties };
return CreateType(schematic, options);
}
/** `[Json]` Creates an Object type */
export var Object = _Object;
@@ -0,0 +1,104 @@
import { ChatType, GetFileListParam, Peer, RawMessage, SendMessageElement } from '../types';
import { GroupFileInfoUpdateItem, InstanceContext, NapCatCore, NodeIKernelMsgService } from '../index';
import { GeneralCallResult } from '../services/common';
export declare class NTQQMsgApi {
context: InstanceContext;
core: NapCatCore;
constructor(context: InstanceContext, core: NapCatCore);
clickInlineKeyboardButton(...params: Parameters<NodeIKernelMsgService['clickInlineKeyboardButton']>): Promise<GeneralCallResult & {
status: number;
promptText: string;
promptType: number;
promptIcon: number;
}>;
getMsgByClientSeqAndTime(peer: Peer, replyMsgClientSeq: string, replyMsgTime: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
getAioFirstViewLatestMsgs(peer: Peer, MsgCount: number): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
sendShowInputStatusReq(peer: Peer, eventType: number): Promise<unknown>;
getSourceOfReplyMsgV2(peer: Peer, clientSeq: string, time: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
getMsgEmojiLikesList(peer: Peer, msgSeq: string, emojiId: string, emojiType: string, cookie?: string, count?: number): Promise<{
result: number;
errMsg: string;
emojiLikesList: Array<{
tinyId: string;
nickName: string;
headUrl: string;
}>;
cookie: string;
isLastPage: boolean;
isFirstPage: boolean;
}>;
setEmojiLike(peer: Peer, msgSeq: string, emojiId: string, set?: boolean): Promise<unknown>;
getMultiMsg(peer: Peer, rootMsgId: string, parentMsgId: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
} | undefined>;
ForwardMsg(peer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
getMsgsByMsgId(peer: Peer | undefined, msgIds: string[] | undefined): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
getSingleMsg(peer: Peer, seq: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
fetchFavEmojiList(num: number): Promise<GeneralCallResult & {
emojiInfoList: Array<{
uin: string;
emoId: number;
emoPath: string;
isExist: boolean;
resId: string;
url: string;
md5: string;
emoOriginalPath: string;
thumbPath: string;
RomaingType: string;
isAPNG: false;
isMarkFace: false;
eId: string;
epId: string;
ocrWord: string;
modifyWord: string;
exposeNum: number;
clickNum: number;
desc: string;
}>;
}>;
queryMsgsWithFilterExWithSeq(peer: Peer, msgSeq: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
queryMsgsWithFilterExWithSeqV2(peer: Peer, msgSeq: string, MsgTime: string, SendersUid: string[]): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
queryMsgsWithFilterExWithSeqV3(peer: Peer, msgSeq: string, SendersUid: string[]): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
queryFirstMsgBySeq(peer: Peer, msgSeq: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, isReverseOrder: boolean): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
getMsgExBySeq(peer: Peer, msgSeq: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
queryFirstMsgBySender(peer: Peer, SendersUid: string[]): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
setMsgRead(peer: Peer): Promise<GeneralCallResult>;
getGroupFileList(GroupCode: string, params: GetFileListParam): Promise<GroupFileInfoUpdateItem[]>;
getMsgHistory(peer: Peer, msgId: string, count: number, isReverseOrder?: boolean): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
recallMsg(peer: Peer, msgId: string): Promise<[EventRet: unknown, _msgList: RawMessage[]]>;
PrepareTempChat(toUserUid: string, GroupCode: string, nickname: string): Promise<unknown>;
getTempChatInfo(chatType: ChatType, peerUid: string): Promise<import("../types").TmpChatInfoApi>;
sendMsg(peer: Peer, msgElements: SendMessageElement[], timeout?: number): Promise<RawMessage | undefined>;
generateMsgUniqueId(chatType: number): Promise<string>;
forwardMsg(srcPeer: Peer, destPeer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
multiForwardMsg(srcPeer: Peer, destPeer: Peer, msgIds: string[]): Promise<RawMessage>;
markAllMsgAsRead(): Promise<unknown>;
}
@@ -0,0 +1 @@
{"version":3,"file":"BindingFluentSyntax.js","sourceRoot":"","sources":["../../../../src/binding/models/BindingFluentSyntax.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
/**
* Checks if a given date is valid.
* 检查给定的日期是否有效。
*
* @param date - The date to check. (要检查的日期。)
* @returns A boolean indicating whether the given date is valid. (布尔值,表示给定的日期是否有效。)
* @example
* ```ts
* // Checking if a date is valid (检查一个日期是否有效)
* const date1 = new Date('2023-10-01');
* const isValidDate1 = isValid(date1);
* console.log(isValidDate1); // Outputs: true (输出: true)
*
* // Checking if an invalid date is valid (检查一个无效的日期是否有效)
* const date2 = new Date('invalid-date');
* const isValidDate2 = isValid(date2);
* console.log(isValidDate2); // Outputs: false (输出: false)
* ```
*/
export default function isValid(date: Date): boolean;
@@ -0,0 +1,216 @@
# resolve-pkg-maps
Utils to resolve `package.json` subpath & conditional [`exports`](https://nodejs.org/api/packages.html#exports)/[`imports`](https://nodejs.org/api/packages.html#imports) in resolvers.
Implements the [ESM resolution algorithm](https://nodejs.org/api/esm.html#resolver-algorithm-specification). Tested [against Node.js](/tests/) for accuracy.
<sub>Support this project by ⭐️ starring and sharing it. [Follow me](https://github.com/privatenumber) to see what other cool projects I'm working on! ❤️</sub>
## Usage
### Resolving `exports`
_utils/package.json_
```json5
{
// ...
"exports": {
"./reverse": {
"require": "./file.cjs",
"default": "./file.mjs"
}
},
// ...
}
```
```ts
import { resolveExports } from 'resolve-pkg-maps'
const [packageName, packageSubpath] = parseRequest('utils/reverse')
const resolvedPaths: string[] = resolveExports(
getPackageJson(packageName).exports,
packageSubpath,
['import', ...otherConditions]
)
// => ['./file.mjs']
```
### Resolving `imports`
_package.json_
```json5
{
// ...
"imports": {
"#supports-color": {
"node": "./index.js",
"default": "./browser.js"
}
},
// ...
}
```
```ts
import { resolveImports } from 'resolve-pkg-maps'
const resolvedPaths: string[] = resolveImports(
getPackageJson('.').imports,
'#supports-color',
['node', ...otherConditions]
)
// => ['./index.js']
```
## API
### resolveExports(exports, request, conditions)
Returns: `string[]`
Resolves the `request` based on `exports` and `conditions`. Returns an array of paths (e.g. in case a fallback array is matched).
#### exports
Type:
```ts
type Exports = PathOrMap | readonly PathOrMap[]
type PathOrMap = string | PathConditionsMap
type PathConditionsMap = {
[condition: string]: PathConditions | null
}
```
The [`exports` property](https://nodejs.org/api/packages.html#exports) value in `package.json`.
#### request
Type: `string`
The package subpath to resolve. Assumes a normalized path is passed in (eg. [repeating slashes `//`](https://github.com/nodejs/node/issues/44316)).
It _should not_ start with `/` or `./`.
Example: if the full import path is `some-package/subpath/file`, the request is `subpath/file`.
#### conditions
Type: `readonly string[]`
An array of conditions to use when resolving the request. For reference, Node.js's default conditions are [`['node', 'import']`](https://nodejs.org/api/esm.html#:~:text=defaultConditions%20is%20the%20conditional%20environment%20name%20array%2C%20%5B%22node%22%2C%20%22import%22%5D.).
The order of this array does not matter; the order of condition keys in the export map is what matters instead.
Not all conditions in the array need to be met to resolve the request. It just needs enough to resolve to a path.
---
### resolveImports(imports, request, conditions)
Returns: `string[]`
Resolves the `request` based on `imports` and `conditions`. Returns an array of paths (e.g. in case a fallback array is matched).
#### imports
Type:
```ts
type Imports = {
[condition: string]: PathOrMap | readonly PathOrMap[] | null
}
type PathOrMap = string | Imports
```
The [`imports` property](https://nodejs.org/api/packages.html#imports) value in `package.json`.
#### request
Type: `string`
The request resolve. Assumes a normalized path is passed in (eg. [repeating slashes `//`](https://github.com/nodejs/node/issues/44316)).
> **Note:** In Node.js, imports resolutions are limited to requests prefixed with `#`. However, this package does not enforce that requirement in case you want to add custom support for non-prefixed entries.
#### conditions
Type: `readonly string[]`
An array of conditions to use when resolving the request. For reference, Node.js's default conditions are [`['node', 'import']`](https://nodejs.org/api/esm.html#:~:text=defaultConditions%20is%20the%20conditional%20environment%20name%20array%2C%20%5B%22node%22%2C%20%22import%22%5D.).
The order of this array does not matter; the order of condition keys in the import map is what matters instead.
Not all conditions in the array need to be met to resolve the request. It just needs enough to resolve to a path.
---
### Errors
#### `ERR_PACKAGE_PATH_NOT_EXPORTED`
- If the request is not exported by the export map
#### `ERR_PACKAGE_IMPORT_NOT_DEFINED`
- If the request is not defined by the import map
#### `ERR_INVALID_PACKAGE_CONFIG`
- If an object contains properties that are both paths and conditions (e.g. start with and without `.`)
- If an object contains numeric properties
#### `ERR_INVALID_PACKAGE_TARGET`
- If a resolved exports path is not a valid path (e.g. not relative or has protocol)
- If a resolved path includes `..` or `node_modules`
- If a resolved path is a type that cannot be parsed
## FAQ
### Why do the APIs return an array of paths?
`exports`/`imports` supports passing in a [fallback array](https://github.com/jkrems/proposal-pkg-exports/#:~:text=Whenever%20there%20is,to%20new%20cases.) to provide fallback paths if the previous one is invalid:
```json5
{
"exports": {
"./feature": [
"./file.js",
"./fallback.js"
]
}
}
```
Node.js's implementation [picks the first valid path (without attempting to resolve it)](https://github.com/nodejs/node/issues/44282#issuecomment-1220151715) and throws an error if it can't be resolved. Node.js's fallback array is designed for [forward compatibility with features](https://github.com/jkrems/proposal-pkg-exports/#:~:text=providing%20forwards%20compatiblitiy%20for%20new%20features) (e.g. protocols) that can be immediately/inexpensively validated:
```json5
{
"exports": {
"./core-polyfill": ["std:core-module", "./core-polyfill.js"]
}
}
```
However, [Webpack](https://webpack.js.org/guides/package-exports/#alternatives) and [TypeScript](https://github.com/microsoft/TypeScript/blob/71e852922888337ef51a0e48416034a94a6c34d9/src/compiler/moduleSpecifiers.ts#L695) have deviated from this behavior and attempts to resolve the next path if a path cannot be resolved.
By returning an array of matched paths instead of just the first one, the user can decide which behavior to adopt.
### How is it different from [`resolve.exports`](https://github.com/lukeed/resolve.exports)?
`resolve.exports` only resolves `exports`, whereas this package resolves both `exports` & `imports`. This comparison will only cover resolving `exports`.
- Despite it's name, `resolve.exports` handles more than just `exports`. It takes in the entire `package.json` object to handle resolving `.` and [self-references](https://nodejs.org/api/packages.html#self-referencing-a-package-using-its-name). This package only accepts `exports`/`imports` maps from `package.json` and is scoped to only resolving what's defined in the maps.
- `resolve.exports` accepts the full request (e.g. `foo/bar`), whereas this package only accepts the requested subpath (e.g. `bar`).
- `resolve.exports` only returns the first result in a fallback array. This package returns an array of results for the user to decide how to handle it.
- `resolve.exports` supports [subpath folder mapping](https://nodejs.org/docs/latest-v16.x/api/packages.html#subpath-folder-mappings) (deprecated in Node.js v16 & removed in v17) but seems to [have a bug](https://github.com/lukeed/resolve.exports/issues/7). This package does not support subpath folder mapping because Node.js has removed it in favor of using subpath patterns.
- Neither resolvers rely on a file-system
This package also addresses many of the bugs in `resolve.exports`, demonstrated in [this test](/tests/exports/compare-resolve.exports.ts).
@@ -0,0 +1,47 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var callBound = require('call-bound');
var $charAt = callBound('String.prototype.charAt');
var $stringToString = callBound('String.prototype.toString');
var CanonicalNumericIndexString = require('./CanonicalNumericIndexString');
var IsInteger = require('./IsInteger');
var isPropertyKey = require('../helpers/isPropertyKey');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
// https://262.ecma-international.org/8.0/#sec-stringgetownproperty
module.exports = function StringGetOwnProperty(S, P) {
var str;
if (isObject(S)) {
try {
str = $stringToString(S);
} catch (e) { /**/ }
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `S` must be a boxed string object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
if (typeof P !== 'string') {
return void undefined;
}
var index = CanonicalNumericIndexString(P);
var len = str.length;
if (typeof index === 'undefined' || !IsInteger(index) || isNegativeZero(index) || index < 0 || len <= index) {
return void undefined;
}
var resultStr = $charAt(S, index);
return {
'[[Configurable]]': false,
'[[Enumerable]]': true,
'[[Value]]': resultStr,
'[[Writable]]': false
};
};
@@ -0,0 +1,46 @@
var baseClone = require('./_baseClone'),
baseMatches = require('./_baseMatches');
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1;
/**
* Creates a function that performs a partial deep comparison between a given
* object and `source`, returning `true` if the given object has equivalent
* property values, else `false`.
*
* **Note:** The created function is equivalent to `_.isMatch` with `source`
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
module.exports = matches;
@@ -0,0 +1,85 @@
{
"name": "dayjs",
"version": "1.11.19",
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",
"main": "dayjs.min.js",
"types": "index.d.ts",
"scripts": {
"test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && TZ=America/Whitehorse npm run test-tz && npm run test-tz && jest --coverage --coverageThreshold='{ \"global\": { \"lines\": 100} }'",
"test-tz": "date && jest test/timezone.test --coverage=false",
"lint": "./node_modules/.bin/eslint src/* test/* build/*",
"prettier": "prettier --write \"docs/**/*.md\"",
"babel": "cross-env BABEL_ENV=build babel src --out-dir esm --copy-files && node build/esm",
"build": "cross-env BABEL_ENV=build node build && npm run size",
"sauce": "npx karma start karma.sauce.conf.js",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2 && npm run sauce -- 3",
"size": "size-limit && gzip-size dayjs.min.js"
},
"pre-commit": [
"lint"
],
"size-limit": [
{
"limit": "2.99 KB",
"path": "dayjs.min.js"
}
],
"jest": {
"roots": [
"test"
],
"testRegex": "test/(.*?/)?.*test.js$",
"testURL": "http://localhost",
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*"
]
},
"keywords": [
"dayjs",
"date",
"time",
"immutable",
"moment"
],
"author": "iamkun",
"license": "MIT",
"homepage": "https://day.js.org",
"repository": {
"type": "git",
"url": "https://github.com/iamkun/dayjs.git"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.44",
"@babel/core": "^7.0.0-beta.44",
"@babel/node": "^7.0.0-beta.44",
"@babel/preset-env": "^7.0.0-beta.44",
"@semantic-release/github": "^11.0.4",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^22.4.3",
"babel-plugin-external-helpers": "^6.22.0",
"cross-env": "^5.1.6",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jest": "^21.15.0",
"gzip-size-cli": "^2.1.0",
"jasmine-core": "^2.99.1",
"jest": "^22.4.3",
"karma": "^2.0.2",
"karma-jasmine": "^1.1.2",
"karma-sauce-launcher": "^1.1.0",
"mockdate": "^2.0.2",
"moment": "2.29.2",
"moment-timezone": "0.5.31",
"ncp": "^2.0.0",
"pre-commit": "^1.2.2",
"prettier": "^1.16.1",
"rollup": "^2.45.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^7.0.2",
"size-limit": "^0.18.0",
"typescript": "^2.8.3"
}
}
@@ -0,0 +1,38 @@
import defaultFullConfig from '../../stubs/config.full.js'
import { flagEnabled } from '../featureFlags'
export default function getAllConfigs(config) {
const configs = (config?.presets ?? [defaultFullConfig])
.slice()
.reverse()
.flatMap((preset) => getAllConfigs(preset instanceof Function ? preset() : preset))
const features = {
// Add experimental configs here...
respectDefaultRingColorOpacity: {
theme: {
ringColor: ({ theme }) => ({
DEFAULT: '#3b82f67f',
...theme('colors'),
}),
},
},
disableColorOpacityUtilitiesByDefault: {
corePlugins: {
backgroundOpacity: false,
borderOpacity: false,
divideOpacity: false,
placeholderOpacity: false,
ringOpacity: false,
textOpacity: false,
},
},
}
const experimentals = Object.keys(features)
.filter((feature) => flagEnabled(config, feature))
.map((feature) => features[feature])
return [config, ...experimentals, ...configs]
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more